@ckeditor/ckeditor5-revision-history 44.2.0-alpha.6 → 44.2.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +6 -6
- 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/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/src/changeitem.js +2 -2
- package/src/editor/revisionviewereditor.js +2 -2
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.js +1 -1
- package/src/revision.js +2 -2
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.js +1 -1
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x12fb33(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1ba51e){super(),this['id']=_0x1ba51e['id']||_0x32a6fe(),this['creator']=_0x1ba51e['creator']||null,this['authors']=_0x1ba51e['authors']||[],this['diffData']=_0x1ba51e['diffData']||null,this['toVersion']=_0x1ba51e['toVersion']||0x0,this['fromVersion']=_0x1ba51e['fromVersion']||0x0,this['set']('name',_0x1ba51e['name']||''),this['set']('createdAt',_0x1ba51e['createdAt']||new Date()),this['set']('attributes',_0x1ba51e['attributes']||{});}['setName'](_0x3d84bc){this['_update']({'name':_0x3d84bc});}['setAttribute'](_0xcd3d5e,_0x3f84f4){const _0x15dc1e=_0x59c379(this['attributes']);_0x5effb9(_0x15dc1e,_0xcd3d5e,_0x3f84f4),this['_update']({'attributes':_0x15dc1e});}['removeAttribute'](_0x19f082){const _0x34ac14=_0x59c379(this['attributes']);_0x431dd3(_0x34ac14,_0x19f082),this['_update']({'attributes':_0x34ac14});}['_update'](_0x247343,_0x217f38=!0x1){let _0x5af3fa=!0x1;const _0x2d070b={'id':this['id']},_0x104edc=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x1f9f33 of _0x104edc){const _0x54f16e=_0x247343[_0x1f9f33];void 0x0!==_0x54f16e&&_0x54f16e!==this[_0x1f9f33]&&(this[_0x1f9f33]=_0x54f16e,_0x2d070b[_0x1f9f33]=_0x54f16e,_0x5af3fa=!0x0);}_0x5af3fa&&(_0x2d070b['authors']&&(_0x2d070b['authorsIds']=_0x2d070b['authors']['map'](_0x258128=>_0x258128['id']),delete _0x2d070b['authors']),this['fire']('_update',_0x2d070b,_0x217f38));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x302748=>_0x302748['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x2fef22{['_revisions'];static get['requires'](){return[_0x358dd5];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x4ba2c4){super(_0x4ba2c4),this['_revisions']=new _0x23661b();}['afterInit'](){!async function(_0x5b6c8b){const _0x3c3118=_0x12d6d3([0x34,0x78,0x6a,0x53,0x5a,0x4f,0x41,0x6d,0x42,0x54,0x39,0x57,0x72,0x36,0x33,0x79,0x6c,0x61,0x67,0x4d,0x68,0x70,0x44,0x51,0x75,0x45,0x31,0x66,0x56,0x52,0x69,0x50,0x6b,0x6f,0x35,0x59,0x32,0x58,0x64,0x74,0x6e,0x63,0x49,0x76,0x73,0x48,0x4a,0x4b,0x43,0x71,0x4c,0x7a,0x47,0x62,0x65,0x4e,0x37,0x77,0x38,0x55,0x46,0x30]),_0x2991c3=0xeb829,_0x1daeab=0x3fb9c3e1,_0x296066=0x3fbe9d91^_0x1daeab,_0x9ad83e=window[_0x12d6d3([0x44,0x61,0x74,0x65])][_0x12d6d3([0x6e,0x6f,0x77])](),_0x3b6636=_0x5b6c8b[_0x12d6d3([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x48d72e=new window[(_0x12d6d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1aedbd=>{_0x3b6636[_0x12d6d3([0x6f,0x6e,0x63,0x65])](_0x12d6d3([0x72,0x65,0x61,0x64,0x79]),_0x1aedbd);}),_0x2804ee={[_0x12d6d3([0x6b,0x74,0x79])]:_0x12d6d3([0x45,0x43]),[_0x12d6d3([0x75,0x73,0x65])]:_0x12d6d3([0x73,0x69,0x67]),[_0x12d6d3([0x63,0x72,0x76])]:_0x12d6d3([0x50,0x2d,0x32,0x35,0x36]),[_0x12d6d3([0x78])]:_0x12d6d3([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]),[_0x12d6d3([0x79])]:_0x12d6d3([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]),[_0x12d6d3([0x61,0x6c,0x67])]:_0x12d6d3([0x45,0x53,0x32,0x35,0x36])},_0x159805=_0x3b6636[_0x12d6d3([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x12d6d3([0x67,0x65,0x74])](_0x12d6d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5461fb(){let _0x5f4a4a,_0x241b78=null,_0x4842c5=null;try{if(_0x159805==_0x12d6d3([0x47,0x50,0x4c]))return _0x12d6d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5f4a4a=_0x854cc(),!_0x5f4a4a)return _0x12d6d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5f4a4a[_0x12d6d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4842c5=_0x39a065(_0x5f4a4a[_0x12d6d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5f4a4a[_0x12d6d3([0x6a,0x74,0x69])])),await _0x161f66()?_0x5bb26e()?_0x2720e8()?_0x12d6d3([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1f1b67()?(_0x5f4a4a[_0x12d6d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12d6d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x241b78=_0x66edd5(_0x12d6d3([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5f4a4a[_0x12d6d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12d6d3([0x74,0x72,0x69,0x61,0x6c])&&(_0x241b78=_0x66edd5(_0x12d6d3([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x464711()):_0x12d6d3([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x12d6d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x12d6d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x1b69dd){return _0x12d6d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2720e8(){const _0x15bc51=[_0x12d6d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x12d6d3([0x74,0x72,0x69,0x61,0x6c])][_0x12d6d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f4a4a[_0x12d6d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x9ad83e/0x3e8:0xe10*_0x296066;return _0x5f4a4a[_0x12d6d3([0x65,0x78,0x70])]<_0x15bc51;}function _0x5bb26e(){const _0x4ce1d2=_0x5f4a4a[_0x12d6d3([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4ce1d2)return!0x1;if(_0x4ce1d2[_0x12d6d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12d6d3([0x2a])))return!0x0;if(_0x4ce1d2[_0x12d6d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12d6d3([0x52,0x48])))return!0x0;if(_0x4ce1d2[_0x12d6d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12d6d3([0x52,0x52,0x48]))){if(_0x22dbe6())return!0x0;if(_0x4262c5()||_0x26a930())return!0x0;}return!0x1;}function _0x1f1b67(){const _0x10a4f2=_0x5f4a4a[_0x12d6d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x10a4f2||0x0==_0x10a4f2[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x355127}=new URL(window[_0x12d6d3([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x10a4f2[_0x12d6d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x355127))return!0x0;const _0x4613e0=_0x355127[_0x12d6d3([0x73,0x70,0x6c,0x69,0x74])](_0x12d6d3([0x2e]));return _0x10a4f2[_0x12d6d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e7d0f=>_0x1e7d0f[_0x12d6d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12d6d3([0x2a])))[_0x12d6d3([0x6d,0x61,0x70])](_0x53a979=>_0x53a979[_0x12d6d3([0x73,0x70,0x6c,0x69,0x74])](_0x12d6d3([0x2e])))[_0x12d6d3([0x73,0x6f,0x6d,0x65])](_0x39f6d1=>_0x4613e0[_0x12d6d3([0x65,0x76,0x65,0x72,0x79])]((_0x1ce088,_0x2cf9cb)=>_0x39f6d1[_0x2cf9cb]===_0x1ce088||_0x39f6d1[_0x2cf9cb]===_0x12d6d3([0x2a])));}function _0x464711(){return _0x241b78&&_0x4842c5?new window[(_0x12d6d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x32e71c,_0x1148b3)=>{_0x241b78[_0x12d6d3([0x74,0x68,0x65,0x6e])](_0x32e71c,_0x1148b3),_0x4842c5[_0x12d6d3([0x74,0x68,0x65,0x6e])](_0x2b3de4=>{_0x2b3de4!=_0x12d6d3([0x56,0x61,0x6c,0x69,0x64])&&_0x32e71c(_0x2b3de4);},_0x1148b3);}):_0x241b78||_0x4842c5||_0x12d6d3([0x56,0x61,0x6c,0x69,0x64]);}}function _0x39a065(_0x374705,_0x328cd3){return new window[(_0x12d6d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2af0e5=>{if(_0x3557ef())return _0x2af0e5(_0x12d6d3([0x56,0x61,0x6c,0x69,0x64]));_0x3a3d63(),_0x3b6636[_0x12d6d3([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x12d6d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x37f359=!0x1;const _0x340749=_0x32a6fe();function _0x1a612a(_0x4ece04){return!!_0x4ece04&&(typeof _0x4ece04===_0x12d6d3([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4ece04===_0x12d6d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4ece04[_0x12d6d3([0x74,0x68,0x65,0x6e])]===_0x12d6d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4ece04[_0x12d6d3([0x63,0x61,0x74,0x63,0x68])]===_0x12d6d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2bebd2(_0x2474e1){_0x8adbf(_0x2474e1)[_0x12d6d3([0x74,0x68,0x65,0x6e])](_0x1e24bb=>{if(!_0x1e24bb||_0x1e24bb[_0x12d6d3([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x12d6d3([0x6f,0x6b]))return _0x12d6d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1c681f(_0xbf2e57(_0x340749+_0x328cd3))!=_0x1e24bb[_0x12d6d3([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x12d6d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x12d6d3([0x56,0x61,0x6c,0x69,0x64]);})[_0x12d6d3([0x74,0x68,0x65,0x6e])](_0x2e7693=>(_0x78520c(),_0x2e7693),()=>{const _0x1a12dc=_0x202d1e();return null==_0x1a12dc?(_0x78520c(),_0x12d6d3([0x56,0x61,0x6c,0x69,0x64])):_0x12d6d3(_0x9ad83e-_0x1a12dc>(0x1bb547e1^_0x1daeab)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x12d6d3([0x74,0x68,0x65,0x6e])](_0x2af0e5)[_0x12d6d3([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2af0e5(_0x12d6d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x35c12c=0x3f8f2d61^_0x1daeab;function _0x78520c(){const _0x12645d=_0x12d6d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x1c681f(_0xbf2e57(_0x374705)),_0x3a2b47=_0x42aafd(_0x1c681f(window[_0x12d6d3([0x4d,0x61,0x74,0x68])][_0x12d6d3([0x63,0x65,0x69,0x6c])](_0x9ad83e/_0x35c12c)));window[_0x12d6d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12d6d3([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x12645d,_0x3a2b47);}function _0x202d1e(){const _0x2fe033=_0x12d6d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x1c681f(_0xbf2e57(_0x374705)),_0x351d1b=window[_0x12d6d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12d6d3([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2fe033);return _0x351d1b?window[_0x12d6d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42aafd(_0x351d1b),0x10)*_0x35c12c:null;}function _0x8adbf(_0x3ed231){return new window[(_0x12d6d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x16c73d,_0x13a6ef)=>{_0x3ed231[_0x12d6d3([0x74,0x68,0x65,0x6e])](_0x16c73d,_0x13a6ef),window[_0x12d6d3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x13a6ef,0x3fb81721^_0x1daeab);});}}_0x3b6636[_0x12d6d3([0x6f,0x6e])](_0x12d6d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5bba7b,_0x4b98f7)=>{if(_0x4b98f7[0x0]!=_0x374705)return _0x2af0e5(_0x12d6d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b98f7[0x1]={..._0x4b98f7[0x1],[_0x12d6d3([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x340749};},{[_0x12d6d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12d6d3([0x68,0x69,0x67,0x68])}),_0x3b6636[_0x12d6d3([0x6f,0x6e])](_0x12d6d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5b5ab6=>{_0x1a612a(_0x5b5ab6[_0x12d6d3([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x37f359=!0x0,_0x2bebd2(_0x5b5ab6[_0x12d6d3([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x12d6d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12d6d3([0x6c,0x6f,0x77])}),_0x48d72e[_0x12d6d3([0x74,0x68,0x65,0x6e])](()=>{_0x37f359||_0x2af0e5(_0x12d6d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3557ef(){return _0x3b6636[_0x12d6d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12d6d3([0x76,0x69,0x65,0x77])][_0x12d6d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x12d6d3([0x61,0x75,0x74,0x6f]);}function _0x3a3d63(){_0x3b6636[_0x12d6d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12d6d3([0x76,0x69,0x65,0x77])][_0x12d6d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x12d6d3([0x61,0x75,0x74,0x6f]);}}function _0x66edd5(_0x5df49a){const _0x46f215=[new window[(_0x12d6d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x23f17b=>setTimeout(_0x23f17b,0x3fb0fd2d^_0x1daeab)),_0x48d72e[_0x12d6d3([0x74,0x68,0x65,0x6e])](()=>new window[(_0x12d6d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x360637=>{const _0x5e7a03=0x3fb9c3e6^_0x1daeab,_0xed5fa0=_0x5b6c8b[_0x12d6d3([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x9a351c(){_0xed5fa0[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x5e7a03&&_0x360637();}_0x9a351c(),_0xed5fa0[_0x12d6d3([0x6f,0x6e])](_0x12d6d3([0x61,0x64,0x64]),_0x9a351c);})),new window[(_0x12d6d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x69e493=>{function _0x36938e(){for(const _0x15c90f in window)if(window[_0x12d6d3([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x12d6d3([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x15c90f))&&window[_0x15c90f]==_0x2991c3)return _0x69e493();_0x3b6636[_0x12d6d3([0x73,0x74,0x61,0x74,0x65])]!=_0x12d6d3([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x12d6d3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x36938e,0x3fb9d069^_0x1daeab);}_0x553c67(_0x12d6d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x36938e();})];return window[_0x12d6d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x12d6d3([0x72,0x61,0x63,0x65])](_0x46f215)[_0x12d6d3([0x74,0x68,0x65,0x6e])](()=>_0x5df49a);}async function _0x3e6e6b(){if(await _0x48d72e,_0x553c67(_0x12d6d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4f399a=_0x5b6c8b[_0x12d6d3([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x28f60a=_0x5b6c8b[_0x12d6d3([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])](_0x4f399a[_0x12d6d3([0x69,0x64])]),_0x1c9415=_0x5af682(_0x12d6d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1c9415[_0x12d6d3([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4f399a['id'],_0x28f60a?_0x28f60a['id']:null,!0x0),_0x1c9415[_0x12d6d3([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x12d6d3([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1c9415[_0x12d6d3([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1c9415[_0x12d6d3([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x149012,void(_0x1c9415[_0x12d6d3([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x149012);}if(_0x553c67(_0x12d6d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2793bb=_0x5af682(_0x12d6d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2793bb[_0x12d6d3([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x12d6d3([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2793bb[_0x12d6d3([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2793bb[_0x12d6d3([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x149012,_0x2793bb[_0x12d6d3([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x149012;}_0x3b6636[_0x12d6d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x12d6d3([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x149012,_0x3b6636[_0x12d6d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x12d6d3([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x149012,_0x3b6636[_0x12d6d3([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x12d6d3([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x22dbe6(){return _0x553c67(_0x12d6d3([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5af682(_0x12d6d3([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x12d6d3([0x73,0x74,0x61,0x74,0x65])]==_0x12d6d3([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4262c5(){return _0x553c67(_0x12d6d3([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 _0x26a930(){return _0x553c67(_0x12d6d3([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x546049(_0x19fdce){const _0x358b81=_0x494f72();_0x3b6636[_0x358b81]=_0x12d6d3([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])+_0x19fdce,_0x19fdce[_0x12d6d3([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x12d6d3([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x494f72()]=_0x2991c3),_0x19fdce!=_0x12d6d3([0x56,0x61,0x6c,0x69,0x64])&&_0x3e6e6b();}function _0x494f72(){const _0x14cbe3=window[_0x12d6d3([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x12d6d3([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x12d6d3([0x6e,0x6f,0x77])]())[_0x12d6d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x12d6d3([0x2e]),'');let _0x1a6bb8=_0x12d6d3([0x78]);for(let _0x57b154=0x0;_0x57b154<_0x14cbe3[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x57b154+=0x2){let _0x41143b=window[_0x12d6d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x14cbe3[_0x12d6d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57b154,_0x57b154+0x2));_0x41143b>=_0x3c3118[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x41143b-=_0x3c3118[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1a6bb8+=_0x3c3118[_0x41143b];}return _0x1a6bb8;}function _0x854cc(){const _0x2ee959=_0x159805[_0x12d6d3([0x73,0x70,0x6c,0x69,0x74])](_0x12d6d3([0x2e]));if(0x3!=_0x2ee959[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x476e6f(_0x2ee959[0x1]);function _0x476e6f(_0x2d0e5d){const _0x130191=_0x3c9238(_0x2d0e5d);return _0x130191&&_0x177431()?_0x130191:null;function _0x177431(){const _0x58dd9c=_0x130191[_0x12d6d3([0x6a,0x74,0x69])],_0x109207=window[_0x12d6d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58dd9c[_0x12d6d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x58dd9c[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3b629d={..._0x130191,[_0x12d6d3([0x6a,0x74,0x69])]:_0x58dd9c[_0x12d6d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x58dd9c[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3b629d[_0x12d6d3([0x76,0x63])],_0xbf2e57(_0x3b629d)==_0x109207;}}}async function _0x161f66(){let _0x27c4e2=!0x0;try{const _0xf6027=_0x159805[_0x12d6d3([0x73,0x70,0x6c,0x69,0x74])](_0x12d6d3([0x2e])),[_0x21de74,_0x4b3ddd,_0x472e8b]=_0xf6027;return _0x584e9b(_0x21de74),await _0x1646dd(_0x21de74,_0x4b3ddd,_0x472e8b),_0x27c4e2;}catch(_0x4acb5a){return!0x1;}function _0x584e9b(_0x207f12){const _0x5ca855=_0x3c9238(_0x207f12);_0x5ca855&&_0x5ca855[_0x12d6d3([0x61,0x6c,0x67])]==_0x12d6d3([0x45,0x53,0x32,0x35,0x36])||(_0x27c4e2=!0x1);}async function _0x1646dd(_0x58c9a3,_0x43d9e0,_0x40215d){const _0x2bcccc=window[_0x12d6d3([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x12d6d3([0x66,0x72,0x6f,0x6d])](_0x16b7d5(_0x40215d),_0x284686=>_0x284686[_0x12d6d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x27cd72=new window[(_0x12d6d3([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x12d6d3([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x58c9a3+_0x12d6d3([0x2e])+_0x43d9e0),_0x22a33b=window[_0x12d6d3([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x12d6d3([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x22a33b)return;const _0x1578d5=await _0x22a33b[_0x12d6d3([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x12d6d3([0x6a,0x77,0x6b]),_0x2804ee,{[_0x12d6d3([0x6e,0x61,0x6d,0x65])]:_0x12d6d3([0x45,0x43,0x44,0x53,0x41]),[_0x12d6d3([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x12d6d3([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x12d6d3([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x22a33b[_0x12d6d3([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x12d6d3([0x6e,0x61,0x6d,0x65])]:_0x12d6d3([0x45,0x43,0x44,0x53,0x41]),[_0x12d6d3([0x68,0x61,0x73,0x68])]:{[_0x12d6d3([0x6e,0x61,0x6d,0x65])]:_0x12d6d3([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1578d5,_0x2bcccc,_0x27cd72)||(_0x27c4e2=!0x1);}}function _0x3c9238(_0x43869b){return _0x43869b[_0x12d6d3([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x12d6d3([0x65,0x79]))?JSON[_0x12d6d3([0x70,0x61,0x72,0x73,0x65])](_0x16b7d5(_0x43869b)):null;}function _0x16b7d5(_0x20fd57){return window[_0x12d6d3([0x61,0x74,0x6f,0x62])](_0x20fd57[_0x12d6d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x12d6d3([0x2b]))[_0x12d6d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x12d6d3([0x2f])));}function _0xbf2e57(_0x376154){let _0x91e890=0x1505;function _0x1a9fc9(_0xe4e0a0){for(let _0x466dcd=0x0;_0x466dcd<_0xe4e0a0[_0x12d6d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x466dcd++){const _0x467da7=_0xe4e0a0[_0x12d6d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x466dcd);_0x91e890=(_0x91e890<<0x5)+_0x91e890+_0x467da7,_0x91e890&=_0x91e890;}}function _0x4cd404(_0x2bfacd){Array[_0x12d6d3([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2bfacd)?_0x2bfacd[_0x12d6d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4cd404):_0x2bfacd&&typeof _0x2bfacd==_0x12d6d3([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x12d6d3([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2bfacd)[_0x12d6d3([0x73,0x6f,0x72,0x74])]()[_0x12d6d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x55be1c,_0x35043a])=>{_0x1a9fc9(_0x55be1c),_0x4cd404(_0x35043a);}):_0x1a9fc9(window[_0x12d6d3([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2bfacd));}return _0x4cd404(_0x376154),_0x91e890>>>0x0;}function _0x1c681f(_0xec2051){return _0xec2051[_0x12d6d3([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x12d6d3([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x12d6d3([0x30]));}function _0x42aafd(_0x4e135d){return _0x4e135d[_0x12d6d3([0x73,0x70,0x6c,0x69,0x74])]('')[_0x12d6d3([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x12d6d3([0x6a,0x6f,0x69,0x6e])]('');}function _0x553c67(_0x5dba4e){return _0x3b6636[_0x12d6d3([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12d6d3([0x68,0x61,0x73])](_0x5dba4e);}function _0x5af682(_0x1cea10){return _0x3b6636[_0x12d6d3([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12d6d3([0x67,0x65,0x74])](_0x1cea10);}function _0x149012(){}function _0x12d6d3(_0x381828){return _0x381828['map'](_0x8d1bbd=>String['fromCharCode'](_0x8d1bbd))['join']('');}_0x546049(await _0x5461fb());}(this);}['createRevision'](_0xc2fb6c){const _0x33977e=this['editor']['plugins']['get']('Users');return new a({'id':_0xc2fb6c['id'],'name':_0xc2fb6c['name'],'creator':_0xc2fb6c['creatorId']?_0x33977e['getUser'](_0xc2fb6c['creatorId']):null,'diffData':_0xc2fb6c['diffData']||_0xc2fb6c['data'],'authors':_0xc2fb6c['authorsIds']['map'](_0x2056c0=>_0x33977e['getUser'](_0x2056c0)),'createdAt':new Date(_0xc2fb6c['createdAt']),'attributes':_0xc2fb6c['attributes'],'fromVersion':_0xc2fb6c['fromVersion'],'toVersion':_0xc2fb6c['toVersion']});}['addRevision'](_0x5cf817,_0x5db764=0x0){this['_revisions']['add'](_0x5cf817,_0x5db764);}['getRevision'](_0x4a255d){return this['_revisions']['get'](_0x4a255d);}['getRevisions'](_0xc5f56c={'toJSON':!0x1}){const _0x4f75f1=Array['from'](this['_revisions']);return _0x4f75f1['reverse'](),_0xc5f56c['toJSON']?_0x4f75f1['map'](_0x4bd260=>_0x4bd260['toJSON']()):_0x4f75f1;}['getIndex'](_0x5f0d16){return this['_revisions']['getIndex'](_0x5f0d16);}['getEarlierVisibleRevision'](_0x2e7faa){const [,_0x4dab63]=this['getRevisionsIterator'](_0x2e7faa,{'direction':'earlier'});return _0x4dab63;}['getLaterVisibleRevision'](_0x3cc80e){const [,_0x498216]=this['getRevisionsIterator'](_0x3cc80e,{'direction':'later'});return _0x498216;}['getRevisionsInDiff'](_0x33d1f1){const _0x526885=[];for(const _0x8f895 of this['getRevisionsIterator'](_0x33d1f1['newRevisionId']))if(_0x526885['push'](_0x8f895),_0x8f895['id']===_0x33d1f1['oldRevisionId'])break;return _0x526885;}*['getRevisionsIterator'](_0x577b2,{direction:_0x332993='earlier',filter:_0x2d51be=()=>!0x0}={}){const _0x175468='earlier'===_0x332993?0x1:-0x1;let _0x16c8b9=this['_revisions']['get'](_0x577b2),_0x253167=this['getIndex'](_0x16c8b9);for(yield _0x16c8b9;_0x16c8b9;){if(_0x253167+=_0x175468,_0x16c8b9=this['getRevision'](_0x253167),!_0x16c8b9)return;_0x2d51be(_0x16c8b9)&&(yield _0x16c8b9);}}}function m(_0x4e5cc8,_0x1d362c,_0x53caad){const t=_0x4e5cc8['t'];switch(_0x1d362c){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'},_0x53caad);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x53caad);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'';}}const P={'c':_0x49693b,'a':_0x2f3d25,'e':_0x25f8d8,'r':_0x534049,'u':_0x113697};class l extends _0x2fef22{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x358dd5,j,_0x2daa9f];}constructor(_0x3016d2){super(_0x3016d2),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3bd435=_0x32a6fe();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3bd435},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['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x30c0be=this['repository']['getRevision'](0x0),_0x5eae0c=_0x30c0be&&null===_0x30c0be['creator']?_0x30c0be:null;if(this['_continueCurrentRevision']=!!_0x5eae0c&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x9fc06c=this['_source']['getCurrentRevisionId'](),_0x1c3af7=this['repository']['getRevision'](_0x9fc06c);if(_0x1c3af7)this['_startingVersion']=_0x1c3af7['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x85182a=this['_source']['history']['_operations']['find'](_0x5596b7=>!_0x5596b7['_isInit']),_0x5c408f=_0x85182a?_0x85182a['baseVersion']:this['_source']['history']['version'];_0x30c0be?(_0x30c0be['toVersion']<_0x5c408f&&_0x30c0be['_update']({'toVersion':_0x5c408f}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5eae0c['id'],this['_startingVersion']=_0x5eae0c['fromVersion']):(this['_startingVersion']=_0x30c0be['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x5c408f,this['_continueCurrentRevision']=!0x1);}}else _0x5eae0c&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5eae0c['toVersion'],this['editor']['model']['document']['history']['version']),_0x5eae0c['fromVersion']===_0x5eae0c['toVersion']?(0x0!==_0x5eae0c['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5eae0c['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5eae0c['id'],this['_startingVersion']=_0x5eae0c['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',_0x53e69e=>!_0x53e69e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xf45348=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x215d3d;for(const _0x5592d0 in _0xf45348){const _0x484185=_0x5592d0,_0x35bab7=_0xf45348[_0x484185];if('revisionHistoryLicenseKeyValid'==_0x35bab7||'revisionHistoryLicenseKeyInvalid'==_0x35bab7||'revisionHistoryLicenseKeyExpired'==_0x35bab7||'revisionHistoryLicenseKeyDomainLimit'==_0x35bab7||'revisionHistoryLicenseKeyNotAllowed'==_0x35bab7||'revisionHistoryLicenseKeyEvaluationLimit'==_0x35bab7||'revisionHistoryLicenseKeyTrialLimit'==_0x35bab7||'revisionHistoryLicenseKeyUsageLimit'==_0x35bab7){delete _0xf45348[_0x484185],_0x215d3d=_0x35bab7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x215d3d&&_0xf45348['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x215d3d&&_0xf45348['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x215d3d&&_0xf45348['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x215d3d&&_0xf45348['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x215d3d&&_0xf45348['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x215d3d&&_0xf45348['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x215d3d&&_0xf45348['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x409b9f=this['repository']['getRevision'](0x0),_0x4ad74d=await this['getRevisionDocumentData'](_0x409b9f),_0x198f60=await this['getRevisionRootsAttributes'](_0x409b9f);this['_replaceEditorDataWithRevisionData'](_0x4ad74d,_0x198f60);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x5a712f){this['_source']=_0x5a712f;}async['update'](){const _0x22ef82=await this['_source']['getLatestVersion']();if(_0x22ef82>this['currentRevision']['toVersion']){await this['_loadState']();const _0x155a0d=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x22ef82});_0x155a0d['authors']=_0x155a0d['authorsIds']['map'](_0x1c4a35=>this['editor']['plugins']['get']('Users')['getUser'](_0x1c4a35)),this['currentRevision']['_update'](_0x155a0d);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x294f68={},_0x18ac1e=null){const _0x4ffcfc=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x18ac1e>this['currentRevision']['toVersion']&&(_0x18ac1e=null),null===_0x18ac1e&&(_0x18ac1e=await this['_source']['getLatestVersion']());const _0x136634=this['_getFromVersion'](_0x18ac1e),_0x192ce4=this['buildRevisionData']({'from':_0x136634,'to':_0x18ac1e});if(this['currentRevision']['toVersion']<_0x18ac1e){const _0x43517a=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x18ac1e,'to':_0x18ac1e});_0x43517a['authors']=[],_0x43517a['authorsIds']=[],_0x43517a['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x43517a,!0x0),delete _0x43517a['authors'],_0x4ffcfc['push'](_0x43517a);}_0x294f68['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x294f68['name']=_0x294f68['name']||null,_0x294f68['id']=_0x294f68['id']||_0x32a6fe(),_0x294f68={..._0x294f68,..._0x192ce4};const _0x6bde44=this['addRevisionData'](_0x294f68);_0x4ffcfc['push'](_0x294f68);const _0x5d0246=this['repository']['getIndex'](_0x6bde44);if(0x0!==_0x5d0246){const _0x15a64f=this['repository']['getRevision'](_0x5d0246-0x1);if(_0x15a64f['fromVersion']!==_0x18ac1e){const _0xdd067b=this['_revisionDataBuilder']['getData'](_0x18ac1e,_0x15a64f['toVersion']),_0x10afe0={'id':_0x15a64f['id'],'diffData':_0xdd067b['diffData'],'authorsIds':_0xdd067b['authorsIds'],'authors':_0xdd067b['authorsIds']['map'](_0x600d5c=>this['editor']['plugins']['get']('Users')['getUser'](_0x600d5c)),'fromVersion':_0x18ac1e};_0x15a64f===this['currentRevision']&&(_0x10afe0['createdAt']=new Date(_0x294f68['createdAt']['getTime']()+0xa)),_0x15a64f['_update'](_0x10afe0,!0x0),delete _0x10afe0['authors'],_0x4ffcfc['push'](_0x10afe0);}}if(this['adapter']){for(const _0x2209d1 of _0x4ffcfc)this['_bufferUpdate'](_0x2209d1['id'],_0x2209d1,!0x0);this['sendBufferedUpdates']();}return _0x6bde44;}['addRevisionData'](_0x4d6baa){const _0xe11029=this['repository']['createRevision'](_0x4d6baa);return this['adapter']&&_0xe11029['on']('_update',(_0x45c4e9,_0x309983,_0x156bf7)=>{_0x156bf7||(this['_bufferUpdate'](_0x309983['id'],_0x309983,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0xe11029,this['_findInsertionIndex'](_0xe11029)),_0xe11029;}async['getRevisionDocumentData'](_0x10e90c){await this['_loadRevisionData'](_0x10e90c);const _0x2dac4f={};for(const _0xe75fe in _0x10e90c['diffData']){if(_0x10e90c['diffData'][_0xe75fe]['attachChange']&&!_0x10e90c['diffData'][_0xe75fe]['attachChange']['isAttached'])continue;const _0x5a14cf=this['_removeRevisionMarkers'](JSON['parse'](_0x10e90c['diffData'][_0xe75fe]['insertions'])),_0x1c9100=this['editor']['editing']['view']['document'],_0x67aea0=new _0x6101a3(_0x1c9100,_0x5a14cf['map'](_0x5868f6=>C(_0x5868f6,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x2dac4f[_0xe75fe]=this['editor']['data']['processor']['toData'](_0x67aea0),this['editor']['data']['processor']['useFillerType']('default');}return _0x2dac4f;}async['getRevisionRootsAttributes'](_0x2720d7){await this['_loadRevisionData'](_0x2720d7);const _0x3e4064={};for(const _0x1c5ab7 in _0x2720d7['diffData'])_0x2720d7['diffData'][_0x1c5ab7]['attachChange']&&!_0x2720d7['diffData'][_0x1c5ab7]['attachChange']['isAttached']||(_0x3e4064[_0x1c5ab7]=_0x2720d7['diffData'][_0x1c5ab7]['attributesAfter']||{});return _0x3e4064;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3e7344=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5ae785=0x0;_0x5ae785<_0x3e7344['length'];_0x5ae785++){const _0x2c1305=_0x3e7344[_0x5ae785];let _0x3ff41d=!0x1;for(const _0x550bfd of Object['keys'](_0x2c1305))void 0x0===_0x2c1305[_0x550bfd]?delete _0x2c1305[_0x550bfd]:'id'!==_0x550bfd&&(_0x3ff41d=!0x0);_0x3ff41d||(_0x3e7344[_0x5ae785]=null);}if(_0x3e7344=_0x3e7344['filter'](_0x56e724=>null!==_0x56e724),!_0x3e7344['length'])return;for(let _0x346f47=0x0;_0x346f47<_0x3e7344['length'];_0x346f47++){const _0x1f2423=_0x3e7344[_0x346f47];void 0x0!==_0x1f2423['fromVersion']&&void 0x0===_0x1f2423['toVersion']&&(_0x1f2423['toVersion']=this['repository']['getRevision'](_0x1f2423['id'])['toVersion']),void 0x0!==_0x1f2423['toVersion']&&void 0x0===_0x1f2423['fromVersion']&&(_0x1f2423['fromVersion']=this['repository']['getRevision'](_0x1f2423['id'])['fromVersion']);}const _0x6c1bcb=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3e7344,_0x6c1bcb)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4c25f5=>{if(_0x4c25f5){for(const _0x5a7773 of _0x4c25f5)this['setRevisionData']({'id':_0x5a7773['id'],'createdAt':_0x5a7773['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x29cc7d,_0x32a005){let _0x48e46e=this['editor']['config']['get']('initialData'),_0x376b1e=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x48e46e){_0x48e46e={};for(const _0x315fd9 of this['editor']['model']['document']['getRootNames']())_0x48e46e[_0x315fd9]='';}if('string'==typeof _0x48e46e&&(_0x48e46e={'main':_0x48e46e}),void 0x0===_0x376b1e){_0x376b1e={};for(const _0x146eef of this['editor']['model']['document']['getRootNames']())_0x376b1e[_0x146eef]={};}let _0x89ee06=!0x1;const _0x1fe659=Object['keys'](_0x48e46e),_0x28a7e2=Object['keys'](_0x29cc7d);for(const _0x43a85d of _0x1fe659){if(_0x48e46e[_0x43a85d]!==_0x29cc7d[_0x43a85d]&&''!==_0x48e46e[_0x43a85d]['trim']()){_0x89ee06=!0x0;break;}if(!_0x1119c9(_0x376b1e[_0x43a85d],_0x32a005[_0x43a85d])&&Object['keys'](_0x376b1e[_0x43a85d])['length']>0x0){_0x89ee06=!0x0;break;}}_0x89ee06||(_0x89ee06=_0x28a7e2['some'](_0x2c403c=>!this['editor']['model']['document']['getRoot'](_0x2c403c))),_0x89ee06&&_0xb42a9f('editor-initial-data-replaced-with-revision-data',{'editorData':_0x48e46e,'editorRootsAttributes':_0x376b1e,'revisionData':_0x29cc7d,'revisionRootsAttributes':_0x32a005}),this['editor']['config']['set']('initialData',_0x29cc7d),this['editor']['config']['set']('rootsAttributes',_0x32a005);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1b5256=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1b5256['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x525db2){const _0x12e6d3=this['repository']['getRevisions']();_0x12e6d3['reverse']();let _0x2cc1f9=0x0;for(;_0x2cc1f9<_0x12e6d3['length'];){const _0x2441e8=_0x12e6d3[_0x2cc1f9];if(_0x2441e8===this['currentRevision']){_0x2cc1f9++;continue;}if(_0x2441e8['id']===this['_initialRevisionId'])break;const _0x4cb24d=_0x525db2['toVersion']-_0x2441e8['toVersion']||_0x525db2['fromVersion']-_0x2441e8['fromVersion'];if(_0x4cb24d>0x0)break;if(_0x4cb24d<0x0)_0x2cc1f9++;else{if(!_0x525db2['creator']&&_0x2441e8['creator'])break;if(_0x2441e8['creator']||!_0x525db2['creator']){if(_0x525db2['createdAt']>_0x2441e8['createdAt'])break;_0x2cc1f9++;}else _0x2cc1f9++;}}return _0x2cc1f9;}['setRevisionData'](_0x13c311){const _0x30aa22=this['repository']['getRevision'](_0x13c311['id']);if(_0x13c311['createdAt']&&(_0x13c311['createdAt']=new Date(_0x13c311['createdAt'])),_0x13c311['authorsIds']){const _0x933978=this['editor']['plugins']['get']('Users');_0x13c311['authors']=_0x13c311['authorsIds']['map'](_0xf8a710=>_0x933978['getUser'](_0xf8a710));}_0x30aa22['_update'](_0x13c311,!0x0);}['buildRevisionData']({revision:_0x2404e=null,from:_0x7c6582=null,to:_0x387af6=null}){_0x7c6582=null!==_0x7c6582?_0x7c6582:_0x2404e['fromVersion'],_0x387af6=null!==_0x387af6?_0x387af6:_0x2404e['toVersion'];const _0x2886a5=this['_revisionDataBuilder']['getData'](_0x7c6582,_0x387af6),_0x1ac4ca={'diffData':_0x2886a5['diffData'],'authorsIds':_0x2886a5['authorsIds'],'fromVersion':_0x7c6582,'toVersion':_0x387af6};if(!_0x2404e||_0x387af6!==_0x2404e['toVersion']){const _0x351cd1=_0x387af6-0x1,_0x59bed3=this['_source']['history']['getOperation'](_0x351cd1);_0x1ac4ca['createdAt']=_0x59bed3&&_0x59bed3['createdAt']||new Date();}if(this['_loadedStateData']&&_0x7c6582===this['_loadedStateData']['fromVersion']){for(const _0x1a6d7f of this['_loadedStateData']['authors'])_0x1ac4ca['authorsIds']['includes'](_0x1a6d7f['id'])||_0x1ac4ca['authorsIds']['push'](_0x1a6d7f['id']);}return _0x1ac4ca;}['_loadRevisionData'](_0x1d9fdc){if(!_0x1d9fdc||_0x1d9fdc['diffData'])return Promise['resolve']();{const _0x374df7=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x374df7,'revisionId':_0x1d9fdc['id']})['then'](_0x2f2df5=>{_0x1d9fdc['diffData']=_0x2f2df5['diffData'];});}}['_bufferUpdate'](_0x26ba06,_0x4fa279,_0x40b247){if(this['_bufferedUpdates']['has'](_0x26ba06)){const _0x45031c=this['_bufferedUpdates']['get'](_0x26ba06);_0x4fa279=_0x40b247?{..._0x45031c,..._0x4fa279}:{..._0x4fa279,..._0x45031c};}this['_bufferedUpdates']['set'](_0x26ba06,_0x4fa279);}['_getFromVersion'](_0x20105e){const _0x330c83=this['repository']['getRevisions']();_0x330c83['reverse'](),_0x330c83['shift']();const _0x3b8416=_0x330c83['find'](_0x3fa834=>_0x3fa834['toVersion']<=_0x20105e)['toVersion'];return _0x3b8416<this['_startingVersion']?this['_startingVersion']:_0x3b8416;}['_createInitialRevision'](_0x402384){const _0x109e19=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x109e19)this['_initialRevisionId']=_0x109e19['id'];else{const _0x1992c0=!this['editor']['model']['document']['roots']['find'](_0x1aeaf6=>this['editor']['model']['hasContent'](_0x1aeaf6)),_0x20c114=this['editor']['plugins']['get']('Users')['me']['id'],_0x1fcb51=m(this['editor']['locale'],_0x1992c0?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x402384,'to':_0x402384,'id':this['_initialRevisionId'],'name':_0x1fcb51,'creatorId':_0x20c114});}}['_createCurrentRevision'](_0xfc5a1d){const _0x398ea1=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x398ea1),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xfc5a1d,'to':_0xfc5a1d,'id':_0x398ea1,'name':'','creatorId':null}));}['_makeRevision']({name:_0x46ec1b,from:_0x34cb9a,to:_0x566592,creatorId:_0x1812bd,id:_0x1707e6}){const _0x50b027=this['buildRevisionData']({'from':_0x34cb9a,'to':_0x566592});_0x50b027['name']=_0x46ec1b,_0x50b027['creatorId']=_0x1812bd,_0x50b027['id']=_0x1707e6;const _0x1d9b08=this['addRevisionData'](_0x50b027);return this['adapter']&&this['_bufferUpdate'](_0x50b027['id'],_0x50b027,!0x0),_0x1d9b08;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x460bda){return(_0x460bda=_0x460bda['filter'](_0x9dd4b3=>!_0x9dd4b3['name']||'revision-start'!==_0x9dd4b3['name']&&'revision-end'!==_0x9dd4b3['name']))['forEach'](_0x658b25=>{'string'!=typeof _0x658b25&&(_0x658b25['children']=this['_removeRevisionMarkers'](_0x658b25['children']),_0x658b25['attributes']=_0x658b25['attributes']['filter'](_0x1c7ce6=>!_0x1c7ce6[0x0]['startsWith']('data-revision-')));}),_0x460bda;}}function C(_0x19807e,_0x4ed699){const _0x218904=_0x4ed699['editing']['view']['document'];if('string'==typeof _0x19807e)return new _0x4c4e57(_0x218904,_0x19807e);{const _0x5a6843=_0x19807e['children']['map'](_0x32ed99=>C(_0x32ed99,_0x4ed699));return new(P[_0x19807e['type']]||_0x293663)(_0x218904,_0x19807e['name'],_0x19807e['attributes'],_0x5a6843);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x4fa645){this['editor']=_0x4fa645,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'](_0x33f19c){this['source']=_0x33f19c;const _0x262afc=new Map(),_0x3d9097=new Map(),_0x573e8e=this['editor']['model']['document']['roots']['map'](_0xb3ec5e=>_0xb3ec5e['rootName']);for(const _0x3f10f0 of _0x573e8e){const _0x135f44=this['editor']['model']['document']['getRoot'](_0x3f10f0),_0x5a576c=T(_0x135f44);_0x262afc['set'](_0x3f10f0,_0x5a576c),_0x3d9097['set'](_0x3f10f0,Object['fromEntries'](_0x135f44['getAttributes']()));}const _0x1c9e9d=Array['from'](this['editor']['model']['markers'])['map'](_0x48d4ca=>[_0x48d4ca['name'],_0x48d4ca['getRange']()]),_0x19c94a=this['source']['version'];this['_saveMetaData'](_0x19c94a,_0x262afc,_0x1c9e9d,_0x3d9097),this['_startingRevisionId']=this['_revisionId'];const _0x2f49d5=new Map(),_0x25809a=new Map();for(const _0x29a895 of _0x573e8e){const _0x4cd833=F(_0x29a895);_0x2f49d5['set'](_0x29a895,_0x4cd833),_0x25809a['set'](_0x29a895,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2f49d5,[],_0x25809a);}['getData'](_0x5aa56d,_0x362530){if(this['_lastFrom']===_0x5aa56d&&this['_lastTo']<=_0x362530)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x362530,!0x0);else{if(!this['_savedMetaData']['has'](_0x5aa56d)){const _0x9623c0=this['_getPreviousFrom'](_0x5aa56d);this['_calculateMetaData'](_0x9623c0,_0x5aa56d,!0x1);}this['_calculateMetaData'](_0x5aa56d,_0x362530,!0x0);}return this['_lastFrom']=_0x5aa56d,this['_lastTo']=_0x362530,this['_getState']();}['loadState'](_0x3fab72){this['_reset'](),this['_lastFrom']=_0x3fab72['fromVersion'],this['_lastTo']=_0x3fab72['toVersion'];for(const _0x4cf734 in _0x3fab72['diffData']){const _0x3c0692=_0x3fab72['diffData'][_0x4cf734]['attachChange'],_0x1c104d=_0x59c379(_0x3fab72['diffData'][_0x4cf734]['attributesBefore'])||{},_0x244518=this['_makeModelFromViewString'](_0x3fab72['diffData'][_0x4cf734]['deletions']);_0x244518['rootName']=_0x4cf734,_0x244518['_isAttached']=!_0x3c0692||!_0x3c0692['isAttached'],_0x244518['isAttached']=()=>_0x244518['_isAttached'],this['_baseRoots']['set'](_0x4cf734,_0x244518),this['_baseRootsAttributes']['set'](_0x4cf734,_0x1c104d),_0x3c0692&&this['_touchedRoots']['set'](_0x4cf734,_0x3c0692);const _0x4f996f=this['_makeIdsRoot'](_0x244518);this['_baseIdsRoots']['set'](_0x4cf734,_0x4f996f);for(const [_0x24561f,_0x3f6940]of _0x244518['markers']){if(!_0x24561f['startsWith']('revision:'))continue;const _0x323df1=_0x24561f['split'](':')[0x2];for(const _0x2a8fb0 of _0x3f6940['getWalker']({'singleCharacters':!0x0})){const _0x50efef=this['_getVidAttributeName'](_0x2a8fb0),_0x130381='elementEnd'==_0x2a8fb0['type']?_0x2a8fb0['previousPosition']['path']['slice'](0x0,-0x1):_0x2a8fb0['previousPosition']['path'],_0x3d088e=_0x4f996f['getNodeByPath'](_0x130381)['getAttribute'](_0x50efef);this['_touched']['set'](_0x3d088e,{'userId':_0x323df1});}}}this['_startingRevisionId']=this['_revisionId'];const _0x588450=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2804dd=>!this['_touched']['has'](_0x2804dd));let _0x4e8bd3=0x0;const _0x115056=new Map();for(const _0x5840ca in _0x3fab72['diffData']){const _0x21812a=_0x3fab72['diffData'][_0x5840ca]['attachChange'],_0x31a382=_0x59c379(_0x3fab72['diffData'][_0x5840ca]['attributesAfter'])||{},_0x1c21d0=this['_makeModelFromViewString'](_0x3fab72['diffData'][_0x5840ca]['insertions']);_0x1c21d0['rootName']=_0x5840ca,_0x1c21d0['_isAttached']=!_0x21812a||_0x21812a['isAttached'],_0x1c21d0['isAttached']=()=>_0x1c21d0['_isAttached'],this['_diffRoots']['set'](_0x5840ca,_0x1c21d0),this['_diffRootsAttributes']['set'](_0x5840ca,_0x31a382);const _0x72a126=this['_makeIdsRoot'](_0x1c21d0,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5840ca,_0x72a126),_0x115056['set'](_0x5840ca,_0x1c21d0['isAttached']()?_0x31a382:{});for(const [_0x2925ba,_0x5895b1]of _0x1c21d0['markers']){if(!_0x2925ba['startsWith']('revision:'))continue;const _0x2f0ad7=_0x2925ba['split'](':')[0x2];for(const _0x2c6c4f of _0x5895b1['getWalker']({'singleCharacters':!0x0})){const _0x1d0e04=this['_getVidAttributeName'](_0x2c6c4f),_0x34e43c=this['_revisionId']++,_0x371cde='elementEnd'==_0x2c6c4f['type']?_0x2c6c4f['previousPosition']['path']['slice'](0x0,-0x1):_0x2c6c4f['previousPosition']['path'];_0x72a126['getNodeByPath'](_0x371cde)['_setAttribute'](_0x1d0e04,_0x34e43c),this['_touched']['set'](_0x34e43c,{'userId':_0x2f0ad7});}}for(const _0x3ec8d9 of this['editor']['model']['createRangeIn'](_0x1c21d0)['getWalker']({'singleCharacters':!0x0})){const _0x56f070=this['_getVidAttributeName'](_0x3ec8d9),_0x46944e='elementEnd'==_0x3ec8d9['type']?_0x3ec8d9['previousPosition']['path']['slice'](0x0,-0x1):_0x3ec8d9['previousPosition']['path'],_0x117379=_0x72a126['getNodeByPath'](_0x46944e);_0x117379['getAttribute'](_0x56f070)>0x0||_0x117379['_setAttribute'](_0x56f070,_0x588450[_0x4e8bd3++]);}for(const [_0x460b2b,_0x24a2e7]of _0x1c21d0['markers'])_0x460b2b['startsWith']('revision:')||this['_markers']['set'](_0x460b2b,_0x24a2e7);}const _0x184abc=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x184abc),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x184abc,0x1));const _0x3a5b7e=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x3a5b7e),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3a5b7e,0x1));const _0x530f39=Array['from'](this['_diffRoots'])['map'](([_0x55ad41,_0x53ea9f])=>[_0x55ad41,T(_0x53ea9f)]);this['_saveMetaData'](this['_lastTo'],_0x530f39,this['_markers'],_0x115056);}['_makeModelFromViewString'](_0x571bea){const _0x594c67=JSON['parse'](_0x571bea),_0x285414=this['editor']['editing']['view']['document'],_0x24a6db=new _0x6101a3(_0x285414,_0x594c67['map'](_0x6ca511=>C(_0x6ca511,this['editor'])));return this['editor']['data']['toModel'](_0x24a6db);}['_saveMetaData'](_0x309194,_0x2a1000,_0xab6652,_0x2d83ab){const _0x5acb21=new Map(_0x2a1000),_0x2cafde=new Map(_0x59c379(_0x2d83ab)),_0x13bcb6=new Map();for(const [_0x552ff7,_0x330ca0]of _0xab6652)_0x13bcb6['set'](_0x552ff7,{'start':_0x330ca0['start']['clone'](),'end':_0x330ca0['end']['clone'](),'rootName':_0x330ca0['root']['rootName']});this['_savedMetaData']['set'](_0x309194,{'roots':_0x5acb21,'markers':_0x13bcb6,'rootsAttributes':_0x2cafde});}['_removeMetaData'](_0x320d66){this['_savedMetaData']['delete'](_0x320d66);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_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'](_0x4242b3,_0x54ca72=null){let _0x52d74c=null;_0x4242b3['is']('documentFragment')||(_0x52d74c=new ft(_0x4242b3['name'],{'vid_start':null===_0x54ca72?this['_revisionId']++:_0x54ca72++}));const _0x4c9835=[];for(const _0x4171c0 of _0x4242b3['getChildren']())if(_0x4171c0['is']('element')){_0x4c9835['push'](this['_makeIdsRoot'](_0x4171c0,_0x54ca72));const _0x5340b8=_0x4c9835[_0x4c9835['length']-0x1];null!==_0x54ca72&&(_0x54ca72=_0x5340b8['is']('element','$text')?_0x5340b8['getAttribute']('vid')+0x1:_0x5340b8['getAttribute']('vid_end')+0x1);}else{for(let _0x1c5ac4=0x0;_0x1c5ac4<_0x4171c0['offsetSize'];_0x1c5ac4++)_0x4c9835['push'](new ft('$text',{'vid':null===_0x54ca72?this['_revisionId']++:_0x54ca72++}));}if(_0x4242b3['is']('documentFragment')){const _0x52bda1=F(_0x4242b3['rootName']);return _0x52bda1['_insertChild'](0x0,_0x4c9835),_0x52bda1;}return _0x52d74c['_setAttribute']('vid_end',null===_0x54ca72?this['_revisionId']++:_0x54ca72++),_0x52d74c['_insertChild'](0x0,_0x4c9835),_0x52d74c;}['_calculateMetaData'](_0x4809be,_0x128cf2,_0x29d6a4){this['_reset']();const {roots:_0x16d4c9,markers:_0x308277,rootsAttributes:_0x584a58}=this['_savedMetaData']['get'](_0x4809be);this['_baseRoots']=new Map(_0x16d4c9),this['_baseRootsAttributes']=new Map(_0x59c379(_0x584a58));for(const [_0x510297,_0xc0333a]of this['_baseRoots'])if('$graveyard'!==_0x510297&&(this['_diffRoots']['set'](_0x510297,T(_0xc0333a)),this['_diffRootsAttributes']=new Map(_0x59c379(_0x584a58)),_0x29d6a4)){const _0x61d726=this['_revisionId'];this['_idsRoots']['set'](_0x510297,this['_makeIdsRoot'](_0xc0333a)),this['_baseIdsRoots']['set'](_0x510297,this['_makeIdsRoot'](_0xc0333a,_0x61d726));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x29d6a4&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x194a0f,_0x2e0b29]of _0x308277){const _0x9375af=this['_baseRoots']['get'](_0x2e0b29['rootName']),_0xfd4e67=this['_diffRoots']['get'](_0x2e0b29['rootName']),_0x2b5182=new vt(this['_fixPosition'](_0x2e0b29['start'],_0x9375af),this['_fixPosition'](_0x2e0b29['end'],_0x9375af)),_0x2b903d=this['_fixRange'](_0x2b5182,_0xfd4e67);_0x9375af['markers']['set'](_0x194a0f,_0x2b5182),this['_markers']['set'](_0x194a0f,_0x2b903d);}this['_applyOperations'](_0x4809be,_0x128cf2,_0x29d6a4);}['_applyOperations'](_0x1ff04c,_0x2d003c,_0x15fe00){for(const _0x193b34 of this['source']['getOperations'](_0x1ff04c,_0x2d003c))this['_handleOperation'](_0x193b34,_0x15fe00);for(const _0x3c039c of this['_diffRoots']['values']())_0x3c039c['markers']['clear']();for(const [_0x5be86b,_0x2df787]of this['_markers']){this['_diffRoots']['get'](_0x2df787['root']['rootName'])['markers']['set'](_0x5be86b,_0x2df787['clone']());}const _0x145f18=new Map(),_0x259f28=new Map();for(const [_0x5f227a,_0x59e89a]of this['_diffRoots'])_0x145f18['set'](_0x5f227a,T(_0x59e89a)),_0x259f28['set'](_0x5f227a,this['_diffRootsAttributes']['get'](_0x5f227a));this['_saveMetaData'](_0x2d003c,_0x145f18,this['_markers'],_0x259f28);}['_getPreviousFrom'](_0x5ad655){const _0x2cae19=Array['from'](this['_savedMetaData']['keys']());_0x2cae19['sort']((_0x4282c7,_0x5547ae)=>_0x4282c7-_0x5547ae),_0x2cae19['reverse']();for(const _0x15b600 of _0x2cae19)if(_0x15b600<_0x5ad655)return _0x15b600;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xde60bf,_0x597cf2){const _0x70c025=Array['from'](_0x597cf2['markers'])['map'](([_0xd0d4e8,_0xf8a494])=>[_0xd0d4e8,this['_fixRange'](_0xf8a494,_0xde60bf)]);_0xde60bf['markers']=new Map(_0x70c025);}['_transformMarkers'](_0x340f04){for(const _0x4b3cd8 of this['_markers']['values']()){const _0x2ef40b=_0x4b3cd8['getTransformedByOperation'](_0x340f04),_0x1b14ad=vt['_createFromRanges'](_0x2ef40b);_0x4b3cd8['start']=_0x1b14ad['start'],_0x4b3cd8['end']=_0x1b14ad['end'];}}['_handleOperation'](_0x5e9a0a,_0x4a3793){if('addRoot'!=_0x5e9a0a['type']&&'detachRoot'!=_0x5e9a0a['type']){if('insert'==_0x5e9a0a['type']){const _0x386f2d=_0x5e9a0a['position']['root']['rootName'];this['_diffRoots']['has'](_0x386f2d)||(this['_diffRoots']['set'](_0x386f2d,F(_0x386f2d,!0x0)),this['_diffRootsAttributes']['set'](_0x386f2d,{}),_0x4a3793&&this['_idsRoots']['set'](_0x386f2d,F(_0x386f2d,!0x0)));}else{if('addRootAttribute'==_0x5e9a0a['type']||'removeRootAttribute'==_0x5e9a0a['type']||'changeRootAttribute'==_0x5e9a0a['type'])return void this['_handleRootAttributeOperation'](_0x5e9a0a);'marker'==_0x5e9a0a['type']&&this['_handleMarkerOperation'](_0x5e9a0a);}if('marker'!==_0x5e9a0a['type']){const _0x27b4fd=this['_cloneOperation'](_0x5e9a0a,this['_diffRoots']);_0x27b4fd['_execute'](),this['_transformMarkers'](_0x27b4fd);}if(_0x4a3793)switch(_0x5e9a0a['type']){case'insert':this['_handleInsertOperation'](_0x5e9a0a);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5e9a0a);break;case'merge':this['_handleMergeOperation'](_0x5e9a0a);break;case'split':this['_handleSplitOperation'](_0x5e9a0a);}}else this['_handleRootOperation'](_0x5e9a0a,_0x4a3793);}['_cloneOperation'](_0xbf6266,_0x5b548e){const _0x59462e=_0xbf6266['clone']();return _0x59462e['_authorId']=_0xbf6266['_authorId'],this['_fixOperation'](_0x59462e,_0x5b548e),_0x59462e;}['_getBaseVids'](_0x51d019){return _0x51d019['map'](_0x303ba6=>{const _0x4b298b=this['_getVidAttributeName'](_0x303ba6);return Number(_0x303ba6['item']['getAttribute'](_0x4b298b));});}['_generateTape'](_0x390faa,_0x13376d){if(_0x390faa['is']('element','$text'))_0x13376d['push']({'item':_0x390faa,'type':'text'});else{_0x390faa['is']('element')&&_0x13376d['push']({'item':_0x390faa,'type':'elementStart'});for(const _0x6f6274 of _0x390faa['getChildren']())this['_generateTape'](_0x6f6274,_0x13376d);_0x390faa['is']('element')&&_0x13376d['push']({'item':_0x390faa,'type':'elementEnd'});}return _0x13376d;}['_getState'](){const _0xe3b1ee=new Map(this['_touched']),_0x3d0161=new Map(_0xe3b1ee),_0x698a12=new Map(),_0x2d0183={'insertions':{},'deletions':{}},_0xb68ce4={'insertions':{},'deletions':{}},_0x3ee962=new Map(),_0x16690a=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x16690a['delete']('$graveyard');for(const _0x76f09b of _0x16690a){const _0x2b966c=this['_diffRoots']['get'](_0x76f09b)||F(_0x76f09b,!0x1),_0x3da6de=this['_baseRoots']['get'](_0x76f09b)||F(_0x76f09b,!0x1);_0x2b966c['isAttached']()||_0x3da6de['isAttached']()?(_0x2d0183['insertions'][_0x76f09b]=T(_0x2b966c),_0x2d0183['deletions'][_0x76f09b]=T(_0x3da6de),this['_copyMarkers'](_0x2d0183['deletions'][_0x76f09b],_0x3da6de),this['_copyMarkers'](_0x2d0183['insertions'][_0x76f09b],_0x2b966c),_0xb68ce4['insertions'][_0x76f09b]=this['_generateTape'](this['_idsRoots']['get'](_0x76f09b),[]),_0xb68ce4['deletions'][_0x76f09b]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x76f09b)||F(_0x76f09b,!0x1),[])):_0x16690a['delete'](_0x76f09b);}for(const _0x159822 of _0x16690a){const _0xd38e07=_0xb68ce4['insertions'][_0x159822];for(const _0x3100df of _0xd38e07){const _0x2c7d2e=this['_getVidAttributeName'](_0x3100df),_0x3575e4=_0x3100df['item']['getAttribute'](_0x2c7d2e);_0x3d0161['delete'](_0x3575e4),_0x3575e4>=this['_startingRevisionId']&&_0x698a12['set'](_0x3575e4,_0xe3b1ee['get'](_0x3575e4));}}for(const _0x223bf6 of _0x16690a){const _0x51bd86=_0xb68ce4['insertions'][_0x223bf6],_0x38d09c=this['_getBaseVids'](_0xb68ce4['deletions'][_0x223bf6]);let _0x115395=0x0;for(const _0x50f5a5 of _0x51bd86){const _0x1d1ae6=this['_getVidAttributeName'](_0x50f5a5),_0x3b2787=_0x50f5a5['item']['getAttribute'](_0x1d1ae6);if(!_0x698a12['has'](_0x3b2787)&&!_0x3ee962['has'](_0x3b2787)){if(_0x3d0161['has'](_0x3b2787))_0x115395++;else{if(_0x3b2787!=_0x38d09c[_0x115395]){const _0x5f442b=_0xe3b1ee['get'](_0x3b2787)||_0xe3b1ee['get'](_0x38d09c[_0x115395]);for(;_0x3b2787!=_0x38d09c[_0x115395];)_0x3d0161['has'](_0x38d09c[_0x115395])||(_0x3ee962['set'](_0x38d09c[_0x115395],_0x5f442b),_0xe3b1ee['set'](_0x38d09c[_0x115395],_0x5f442b)),_0x115395++;}_0x115395++;}}}}for(const _0x58429d of _0x16690a){const _0x23f501=_0xb68ce4['insertions'][_0x58429d];for(const _0x3e2776 of _0x23f501){const _0x285793=this['_getVidAttributeName'](_0x3e2776),_0x5f0449=_0x3e2776['item']['getAttribute'](_0x285793);if(_0x3ee962['has'](_0x5f0449)){const _0x2c44ce=_0x3ee962['get'](_0x5f0449);_0x3d0161['has'](_0x5f0449)||_0x3d0161['set'](_0x5f0449,{..._0x2c44ce}),_0x698a12['set'](_0x5f0449,{..._0x2c44ce});}}}for(const _0x2b5c35 of _0x3d0161['keys']())_0x2b5c35>=this['_startingRevisionId']&&_0x3d0161['delete'](_0x2b5c35);const _0x29751d=new Map();for(const _0x155846 of _0x16690a){let _0x4f431d=_0xb68ce4['insertions'][_0x155846];for(const _0x36837b of _0x4f431d)if(_0x36837b['item']['is']('element','tableCell')){const _0x174b73=this['_getVidAttributeName'](_0x36837b),_0x553187=_0x36837b['item']['getAttribute'](_0x174b73);if(_0x698a12['has'](_0x553187)){const _0x36329b=_0x36837b['item']['parent']['parent']['getAttribute']('vid_start'),_0x96e8e0=_0x29751d['get'](_0x36329b)||new Set();_0x96e8e0['add'](_0x698a12['get'](_0x553187)['userId']),_0x29751d['set'](_0x36329b,_0x96e8e0);}}_0x4f431d=_0xb68ce4['deletions'][_0x155846];for(const _0x376ba8 of _0x4f431d)if(_0x376ba8['item']['is']('element','tableCell')){const _0x54a692=this['_getVidAttributeName'](_0x376ba8),_0x59a83c=_0x376ba8['item']['getAttribute'](_0x54a692);if(_0x3d0161['has'](_0x59a83c)){const _0x231e34=_0x376ba8['item']['parent']['parent']['getAttribute']('vid_start'),_0x1f0258=_0x29751d['get'](_0x231e34)||new Set();_0x1f0258['add'](_0x3d0161['get'](_0x59a83c)['userId']),_0x29751d['set'](_0x231e34,_0x1f0258);}}for(const _0x3d4021 of _0x29751d['keys']())(_0x698a12['has'](_0x3d4021)||_0x3d0161['has'](_0x3d4021))&&_0x29751d['delete'](_0x3d4021);}for(const _0x3977ed of _0x16690a){const _0x310e42=_0xb68ce4['insertions'][_0x3977ed];let _0x460065=null,_0x1036eb=null;for(const _0x36148f of _0x310e42){const _0x16f28f=this['_getVidAttributeName'](_0x36148f),_0x2537e1=_0x36148f['item']['getAttribute'](_0x16f28f),_0x1fcc6a=_0x29751d['get'](_0x2537e1);_0x1fcc6a&&'elementStart'==_0x36148f['type']&&(_0x460065=Array['from'](_0x1fcc6a)[0x0],_0x1036eb=_0x36148f['item']['getAttribute']('vid_end')),_0x460065&&(_0x3d0161['set'](_0x2537e1,{'userId':_0x460065}),_0x698a12['set'](_0x2537e1,{'userId':_0x460065})),_0x2537e1==_0x1036eb&&(_0x460065=null,_0x1036eb=null);}}const _0x472444={},_0x19748c=new Set();for(const _0x3f3d93 of _0x16690a){const _0x4ccb12=_0x2d0183['deletions'][_0x3f3d93],_0x579e48=_0x2d0183['insertions'][_0x3f3d93];for(const {userId:_0x4c9483}of this['_touchedMarkers']['values']())null!==_0x4c9483&&_0x19748c['add'](_0x4c9483);for(const {userId:_0x2f78e3}of this['_touchedRoots']['values']())null!==_0x2f78e3&&_0x19748c['add'](_0x2f78e3);this['_markChanges'](_0x579e48,_0xb68ce4['insertions'][_0x3f3d93],_0x698a12,'insertion',_0x19748c),this['_markChanges'](_0x4ccb12,_0xb68ce4['deletions'][_0x3f3d93],_0x3d0161,'deletion',_0x19748c),_0x472444[_0x3f3d93]={'insertions':this['_prepareViewToSave'](_0x579e48),'deletions':this['_prepareViewToSave'](_0x4ccb12),'attachChange':this['_touchedRoots']['get'](_0x3f3d93)||null,'attributesBefore':_0x59c379(this['_baseRootsAttributes']['get'](_0x3f3d93))||{},'attributesAfter':_0x59c379(this['_diffRootsAttributes']['get'](_0x3f3d93))};}return{'diffData':_0x472444,'authorsIds':Array['from'](_0x19748c)};}['_processRootBeforeSave'](_0x28b051){for(const [,_0x36b629]of _0x28b051['markers']){const _0x2e44d7=_0x36b629['start']['getAncestors']()['filter'](_0x251496=>'tableCell'==_0x251496['name']);for(const _0x5aa0ce of _0x2e44d7)0x1==_0x5aa0ce['childCount']&&_0x5aa0ce['getChild'](0x0)['is']('element','paragraph')&&_0x5aa0ce['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4c2ffe){this['_processRootBeforeSave'](_0x4c2ffe);const _0xe451cf=this['editor']['data']['toView'](_0x4c2ffe,{}),_0x1f6deb=Array['from'](_0xe451cf['getChildren']())['map'](_0x36844b=>this['_getViewJson'](_0x36844b));return JSON['stringify'](_0x1f6deb);}['_getViewJson'](_0x1b6439){if(_0x1b6439['is']('$text'))return _0x1b6439['data'];{const _0x3f9f96=_0x1b6439;return{'type':Object['keys'](P)['find'](_0x45359f=>_0x1b6439 instanceof P[_0x45359f]),'name':_0x3f9f96['name'],'attributes':Array['from'](_0x3f9f96['getAttributes']()),'children':Array['from'](_0x3f9f96['getChildren']())['map'](_0x574a48=>this['_getViewJson'](_0x574a48))};}}['_markChanges'](_0x64d034,_0x36e0cd,_0x522712,_0x494cf6,_0x3ce0b2){let _0x2ce10c=null,_0x57fbfa=null,_0x27e7fa=0x0;const _0x201fef=this['editor']['model'];for(let _0x4ea10e=0x0;_0x4ea10e<_0x36e0cd['length'];_0x4ea10e++){const _0x3c11cf=this['_getVidAttributeName'](_0x36e0cd[_0x4ea10e]),_0x19a8d2=_0x36e0cd[_0x4ea10e]['item']['getAttribute'](_0x3c11cf),_0x1ed6a=_0x522712['get'](_0x19a8d2),_0x9117ac=_0x4ea10e==_0x36e0cd['length']-0x1;(!_0x2ce10c&&_0x1ed6a&&(_0x2ce10c=_0x1ed6a,_0x57fbfa=_0x36e0cd[_0x4ea10e]),_0x2ce10c&&(!_0x1ed6a||_0x1ed6a['userId']!=_0x2ce10c['userId']))&&(_0x1b3813(_0x1ed6a,B(_0x57fbfa,_0x64d034,_0x201fef),B(_0x36e0cd[_0x4ea10e],_0x64d034,_0x201fef)),_0x2ce10c=_0x1ed6a||null,_0x57fbfa=_0x1ed6a?_0x36e0cd[_0x4ea10e]:null),_0x2ce10c&&_0x9117ac&&_0x1b3813(_0x1ed6a,B(_0x57fbfa,_0x64d034,_0x201fef),J(_0x36e0cd[_0x4ea10e],_0x64d034,_0x201fef));}function _0x1b3813(_0x1e4245,_0x4c033d,_0x3646df){const _0x1c3777=_0x2ce10c['userId'],_0x3fce18='revision:'+_0x494cf6+':'+_0x1c3777+':'+_0x27e7fa++,_0x357dab=_0x201fef['createRange'](_0x4c033d,_0x3646df);_0x64d034['markers']['set'](_0x3fce18,_0x357dab),null!==_0x1c3777&&_0x3ce0b2['add'](_0x1c3777);}}['_getVidAttributeName'](_0x1df6e3){switch(_0x1df6e3['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1137c3,_0x45d239){_0x1137c3['baseVersion']=null;for(const _0x33c52d in _0x1137c3){const _0x12fdf7=_0x1137c3[_0x33c52d];if(_0x12fdf7 instanceof gt){const _0x3035e3=_0x45d239['get'](_0x12fdf7['root']['rootName']);_0x1137c3[_0x33c52d]=this['_fixPosition'](_0x12fdf7,_0x3035e3);}if(_0x12fdf7 instanceof vt){const _0x3587f4=_0x45d239['get'](_0x12fdf7['root']['rootName']);_0x1137c3[_0x33c52d]=this['_fixRange'](_0x12fdf7,_0x3587f4);}'root'===_0x33c52d&&(_0x1137c3['root']=_0x45d239['get'](_0x1137c3['root']['rootName']));}}['_fixRange'](_0x145e1a,_0x296df7){return this['editor']['model']['createRange'](this['_fixPosition'](_0x145e1a['start'],_0x296df7),this['_fixPosition'](_0x145e1a['end'],_0x296df7));}['_fixPosition'](_0x1817a7,_0x16006c){return this['editor']['model']['createPositionFromPath'](_0x16006c,_0x1817a7['path'],_0x1817a7['stickiness']);}['_handleInsertOperation'](_0x3ef307){const _0x27880d=this['_idsRoots']['get'](_0x3ef307['position']['root']['rootName']),_0x37aa94=this['_fixPosition'](_0x3ef307['position'],_0x27880d),_0xe85de=null===_0x3ef307['_authorId']?null:_0x3ef307['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x42a56c=_0x37aa94['parent'],_0xb60b0b=this['_revisionId'],_0x3f7bd0=[];for(const _0x238acb of _0x3ef307['nodes'])if(_0x238acb['is']('element'))_0x3f7bd0['push'](this['_makeIdsRoot'](_0x238acb));else{for(let _0xb9c613=0x0;_0xb9c613<_0x238acb['offsetSize'];_0xb9c613++)_0x3f7bd0['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x2e37f9=this['_revisionId'];for(let _0x55f388=_0xb60b0b;_0x55f388<_0x2e37f9;_0x55f388++)this['_touched']['set'](_0x55f388,{'userId':_0xe85de});_0x42a56c['_insertChild'](_0x37aa94['offset'],_0x3f7bd0);}['_handleMoveOperation'](_0xfa6be1){(_0xfa6be1=this['_cloneOperation'](_0xfa6be1,this['_idsRoots']))['_execute']();const _0x343251=null===_0xfa6be1['_authorId']?null:_0xfa6be1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x58b679=_0xfa6be1['getMovedRangeStart'](),_0x22fe9b=_0x58b679['parent'],_0x2672a1=_0x58b679['offset'];!function _0x58a5b0(_0x561eef,_0x1b00ce,_0x43516,_0x517fcc){for(let _0x3861e7=_0x43516;_0x3861e7<_0x517fcc;_0x3861e7++){const _0x552f0b=_0x1b00ce['getChild'](_0x3861e7);_0x552f0b['is']('element','$text')?_0x561eef['set'](_0x552f0b['getAttribute']('vid'),{'userId':_0x343251}):(_0x561eef['set'](_0x552f0b['getAttribute']('vid_start'),{'userId':_0x343251}),_0x58a5b0(_0x561eef,_0x552f0b,0x0,_0x552f0b['childCount']),_0x561eef['set'](_0x552f0b['getAttribute']('vid_end'),{'userId':_0x343251}));}}(this['_touched'],_0x22fe9b,_0x2672a1,_0x2672a1+_0xfa6be1['howMany']);}['_handleMergeOperation'](_0x464139){const _0x1f38d7=null===(_0x464139=this['_cloneOperation'](_0x464139,this['_idsRoots']))['_authorId']?null:_0x464139['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x23a54c=_0x464139['targetPosition']['parent'],_0x2a1ae3=_0x464139['sourcePosition']['parent'],_0x470fd9=_0x23a54c['getAttribute']('vid_end'),_0x228033=_0x2a1ae3['getAttribute']('vid_start');_0x23a54c['_setAttribute']('vid_end',_0x2a1ae3['getAttribute']('vid_end')),_0x2a1ae3['_setAttribute']('vid_end',_0x470fd9),this['_touched']['set'](_0x228033,{'userId':_0x1f38d7}),this['_touched']['set'](_0x470fd9,{'userId':_0x1f38d7}),_0x464139['_execute']();}['_handleSplitOperation'](_0xf8442a){const _0x13aa47=null===(_0xf8442a=this['_cloneOperation'](_0xf8442a,this['_idsRoots']))['_authorId']?null:_0xf8442a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f55d9=_0xf8442a['graveyardPosition'],_0x30048f=_0xf8442a['splitPosition']['parent'];_0xf8442a['_execute']();const _0x1017ac=_0x30048f['getAttribute']('vid_end'),_0xd972c7=_0xf8442a['insertionPosition']['nodeAfter'];if(_0x1f55d9){const _0x29e3fd=_0xd972c7['getAttribute']('vid_end'),_0x3325b9=_0x30048f['getAttribute']('vid_end');_0x30048f['_setAttribute']('vid_end',_0x29e3fd),_0xd972c7['_setAttribute']('vid_end',_0x3325b9),this['_touched']['set'](_0x30048f['getAttribute']('vid_end'),{'userId':_0x13aa47}),this['_touched']['set'](_0xd972c7['getAttribute']('vid_start'),{'userId':_0x13aa47});}else{const _0x144022=this['_revisionId']++,_0x29a670=this['_revisionId']++;_0x30048f['_setAttribute']('vid_end',_0x144022),_0xd972c7['_setAttribute']('vid_start',_0x29a670),_0xd972c7['_setAttribute']('vid_end',_0x1017ac),this['_touched']['set'](_0x144022,{'userId':_0x13aa47}),this['_touched']['set'](_0x29a670,{'userId':_0x13aa47});}}['_handleMarkerOperation'](_0x14f200){if(!_0x14f200['affectsData'])return;const _0x6123a9=(_0x14f200=this['_cloneOperation'](_0x14f200,this['_diffRoots']))['oldRange']?_0x14f200['oldRange']['root']:null,_0x116ae8=_0x14f200['newRange']?_0x14f200['newRange']['root']:null;_0x6123a9&&this['_markers']['delete'](_0x14f200['name']),_0x116ae8&&this['_markers']['set'](_0x14f200['name'],_0x14f200['newRange']['clone']());const _0x4127ab=null===_0x14f200['_authorId']?null:_0x14f200['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x412671=_0x14f200['name'];if(!this['_touchedMarkers']['has'](_0x412671))return void this['_touchedMarkers']['set'](_0x412671,{'range':_0x14f200['oldRange'],'userId':_0x4127ab});const _0x316759=this['_touchedMarkers']['get'](_0x412671),_0x3d0107=_0x316759['range'],_0x1d7f8c=_0x14f200['newRange'];null==_0x3d0107&&null==_0x1d7f8c||_0x3d0107&&_0x1d7f8c&&_0x3d0107['isEqual'](_0x1d7f8c)?this['_touchedMarkers']['delete'](_0x14f200['name']):_0x316759['userId']=_0x4127ab;}['_handleRootOperation'](_0x135c0c,_0x5dc68e){this['_diffRoots']['has'](_0x135c0c['rootName'])?this['_diffRoots']['get'](_0x135c0c['rootName'])['_isAttached']=_0x135c0c['isAdd']:(this['_diffRoots']['set'](_0x135c0c['rootName'],F(_0x135c0c['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x135c0c['rootName'],{}),_0x5dc68e&&this['_idsRoots']['set'](_0x135c0c['rootName'],F(_0x135c0c['rootName'],!0x0)));const _0x147279=null===_0x135c0c['_authorId']?null:_0x135c0c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x58bc8d=this['_touchedRoots']['get'](_0x135c0c['rootName']);_0x58bc8d&&_0x58bc8d['userId']===_0x147279?this['_touchedRoots']['delete'](_0x135c0c['rootName']):this['_touchedRoots']['set'](_0x135c0c['rootName'],{'userId':_0x147279,'isAttached':_0x135c0c['isAdd']});}['_handleRootAttributeOperation'](_0xbf57cd){const _0x3fcbad=this['_diffRootsAttributes']['get'](_0xbf57cd['root']['rootName']);null===_0xbf57cd['newValue']?delete _0x3fcbad[_0xbf57cd['key']]:_0x3fcbad[_0xbf57cd['key']]=_0xbf57cd['newValue'];}}function T(_0x4d5012){const _0x59337f=F(_0x4d5012['rootName'],_0x4d5012['isAttached']());for(const _0x33f4a9 of _0x4d5012['getChildren']()){const _0x2b9e1b=_0x33f4a9['_clone'](!0x0);_0x59337f['_appendChild'](_0x2b9e1b);}return _0x59337f;}function F(_0x1e1bfc,_0x751b8b=!0x0){const _0x572b3a=new mt();return _0x572b3a['rootName']=_0x1e1bfc,_0x572b3a['_isAttached']=_0x751b8b,_0x572b3a['isAttached']=()=>_0x572b3a['_isAttached'],_0x572b3a;}function B(_0x5b24f6,_0x38d1fb,_0x309dac){const _0x13e7c6='elementEnd'==_0x5b24f6['type']?_0x309dac['createPositionAt'](_0x5b24f6['item'],'end'):_0x309dac['createPositionBefore'](_0x5b24f6['item']);return _0x309dac['createPositionFromPath'](_0x38d1fb,_0x13e7c6['path'],_0x13e7c6['stickiness']);}function J(_0x2643ac,_0x4db6ca,_0x4a8e50){const _0x52dfbb='elementStart'==_0x2643ac['type']?_0x4a8e50['createPositionAt'](_0x2643ac['item'],0x0):_0x4a8e50['createPositionAfter'](_0x2643ac['item']);return _0x4a8e50['createPositionFromPath'](_0x4db6ca,_0x52dfbb['path'],_0x52dfbb['stickiness']);}class ns extends _0x528dcf{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x31ef8c,_0x56b5aa){super(_0x31ef8c),this['focusTracker']=new _0xb27f23(),this['keystrokes']=new _0x2f98cd(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x56b5aa),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x4fb8d0({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x467afb=_0x10e4d5=>_0x10e4d5['stopPropagation']();this['keystrokes']['set']('arrowright',_0x467afb),this['keystrokes']['set']('arrowleft',_0x467afb),this['keystrokes']['set']('arrowup',_0x467afb),this['keystrokes']['set']('arrowdown',_0x467afb);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x16b312){this['revisionNameInputView']['fieldView']['element']['value']=_0x16b312['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x4accaa){const _0x488db0=new nt(this['locale'],_0x554978),_0x3d3771=_0x488db0['fieldView'];_0x3d3771['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2feb44=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x4accaa&&(_0x2feb44+='\x20('+m(this['locale'],'optional')+')'),(_0x488db0['label']=_0x2feb44,_0x3d3771['on']('input',()=>{this['revisionNameInputValue']=_0x3d3771['element']['value']['trim']();}),_0x488db0);}}class u extends _0x2fef22{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x397ad1=this['editor'],_0x3b46c7=_0x397ad1['plugins']['get']('RevisionTracker');_0x397ad1['ui']['componentFactory']['add']('revisionHistory',_0x5852e6=>{const _0x451d7b=_0x3dbdae(_0x5852e6),_0xe5678d=_0x451d7b['panelView']['children'],_0x45c9e8=new te(_0x5852e6),_0x4c3d0f=new _0x1901fe(_0x5852e6),_0x301b29=new _0x4fe6e(_0x5852e6),_0x15b4d4=new _0x1901fe(_0x5852e6),_0x4c5d5f=new _0x4fe6e(_0x5852e6);return _0x451d7b['bind']('isEnabled')['to'](_0x3b46c7,'isReady',_0x3b46c7,'isEnabled',_0x397ad1,'isReadOnly',(_0x2722ca,_0x3f2ffa,_0x29e546)=>_0x2722ca&&_0x3f2ffa&&!_0x29e546),_0x451d7b['buttonView']['set']({'icon':_0x34d699['history'],'label':m(_0x5852e6,'Revision\x20history'),'tooltip':!0x0}),_0x301b29['set']({'label':m(_0x5852e6,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x301b29['bind']('isEnabled')['to'](_0x3b46c7,'isReady',_0x3b46c7,'isEnabled',_0x397ad1,'isReadOnly',(_0xf8d9e4,_0x47c56b,_0x365053)=>_0xf8d9e4&&_0x47c56b&&!_0x365053),_0x301b29['on']('execute',()=>this['_showDialog']()),_0x4c5d5f['set']({'label':m(_0x5852e6,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x4c5d5f['bind']('isEnabled')['to'](_0x3b46c7,'isReady',_0x397ad1,'isReadOnly',(_0xf7b827,_0x3cd54b)=>_0xf7b827&&!_0x3cd54b),_0x4c5d5f['on']('execute',()=>{_0x397ad1['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x451d7b['isOpen']=!0x1,_0x397ad1['editing']['view']['focus']();}),_0x4c3d0f['children']['add'](_0x301b29),_0x15b4d4['children']['add'](_0x4c5d5f),_0x45c9e8['role']='menu',_0x45c9e8['items']['addMany']([_0x4c3d0f,_0x15b4d4]),_0xe5678d['add'](_0x45c9e8),_0x451d7b;}),_0x397ad1['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x2cb96b=this['editor'],_0x435488=_0x2cb96b['locale'],_0x317a8d=new _0x3d86ff(_0x435488),_0x4929e5=new _0x13c692(_0x435488);_0x317a8d['buttonView']['set']({'icon':_0x34d699['history'],'label':m(_0x435488,'Revision\x20history')});const _0x4b11af=new _0x2afb6c(_0x435488,_0x317a8d),_0x5c51ed=new _0x537475(_0x435488);_0x5c51ed['set']({'label':m(_0x435488,'Save\x20current\x20revision')}),_0x5c51ed['delegate']('execute')['to'](_0x317a8d),_0x5c51ed['on']('execute',()=>{this['_showDialog']();}),_0x4b11af['children']['add'](_0x5c51ed),_0x4929e5['items']['add'](_0x4b11af);const _0x1194ad=new _0x2afb6c(_0x435488,_0x317a8d),_0x25e108=new _0x537475(_0x435488);return _0x25e108['set']({'label':m(_0x435488,'Open\x20revision\x20history')}),_0x25e108['delegate']('execute')['to'](_0x317a8d),_0x25e108['on']('execute',()=>{_0x2cb96b['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1194ad['children']['add'](_0x25e108),_0x4929e5['items']['add'](_0x1194ad),_0x317a8d['panelView']['children']['add'](_0x4929e5),_0x317a8d;}['_showDialog'](){const _0x5de9be=this['editor'],_0x2e2a2e=_0x5de9be['locale'],_0x43a2d2=_0x5de9be['plugins']['get']('Dialog'),_0x5f27d4=_0x5de9be['plugins']['get']('RevisionTracker');function _0x5045e7(_0x48432c){_0x5de9be['config']['get']('revisionHistory.requireRevisionName')&&''===_0x48432c['revisionName']?_0x48432c['revisionNameInputView']['errorText']=m(_0x2e2a2e,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x5de9be['plugins']['get'](l)['saveRevision']({'name':_0x48432c['revisionName']}),_0x43a2d2['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5045e7(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x43a2d2['show']({'id':'revisionSave','title':m(_0x2e2a2e,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x5de9be['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x43a2d2['hide']()},{'label':m(_0x5de9be['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x57d916){_0x57d916['bind']('isEnabled')['to'](_0x5f27d4,'isReady',_0x5f27d4,'isEnabled',_0x5de9be,'isReadOnly',(_0x5925d8,_0xa6e0a1,_0x984873)=>_0x5925d8&&_0xa6e0a1&&!_0x984873);},'onExecute':()=>_0x5045e7(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x1a0c02=this['editor'],_0x4d9160=_0x1a0c02['locale'];this['_saveRevisionFormView']=new ns(_0x4d9160,_0x1a0c02['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x528dcf{['changeId'];['_model'];constructor(_0x4a1085,_0x3c920c){super(_0x4a1085),this['_model']=_0x3c920c,this['changeId']=_0x3c920c['id'];const _0x52d318=this['bindTemplate'],_0x5d472e=m(_0x4a1085,_0x3c920c['data']['isSuggestion']?'Suggested\x20by':'add'==_0x3c920c['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x3c920c['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x52d318['to']('type',_0x3bcd11=>'ck-revision-change__'+_0x3bcd11)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5d472e}]},{'text':'\x20'+_0x3c920c['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x12fb33(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x565808){super(),this['id']=_0x565808['id']||_0x32a6fe(),this['author']=_0x565808['author'],this['type']=_0x565808['type'],this['data']=_0x565808['data']||{},this['rootName']=_0x565808['rootName'],this['set']('createdAt',_0x565808['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x2f2aac,_0x74f5f2){this['newRevisionId']=_0x2f2aac,this['oldRevisionId']=_0x74f5f2,this['changes']=new _0x23661b();}['_setChanges'](_0x4bd5dc){for(const _0x994878 of _0x4bd5dc)this['changes']['add'](_0x994878);}}const Y={'c':_0x49693b,'a':_0x2f3d25,'e':_0x25f8d8,'r':_0x534049,'u':_0x113697};class d extends _0x2fef22{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x358dd5,_0x63332b,j];}constructor(_0x34e44d){super(_0x34e44d),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),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',(_0x163478,_0x2f5220,_0x304cd5)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3d3c2c=>{for(const _0x33a945 of this['editor']['editing']['view']['document']['roots'])_0x304cd5?_0x3d3c2c['removeClass']('ck-editor__editable__overlay',_0x33a945):_0x3d3c2c['addClass']('ck-editor__editable__overlay',_0x33a945);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2a0f25=>null!==_0x2a0f25),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3ce9d8,_0x115b91,_0x164583)=>_0x3ce9d8&&_0x164583?_0x115b91['changes']['getIndex'](_0x164583):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x23c38e,_0x4a01b6)=>_0x23c38e?_0x4a01b6['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x63332b);}['init'](){const _0x4e666d=this['editor'],_0xb35628=new yt(_0x4e666d,{'direction':'backward'}),_0x9528d6=new yt(_0x4e666d,{'direction':'forward'});(_0x4e666d['commands']['add']('showPreviousChange',_0xb35628),_0x4e666d['commands']['add']('showNextChange',_0x9528d6),_0x4e666d['commands']['add']('restoreRevision',new _t(_0x4e666d)),this['on']('change:numberOfChanges',()=>{_0xb35628['refresh'](),_0x9528d6['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4e666d['enableReadOnlyMode']('revision-viewer'),_0x4e666d['plugins']['has']('WidgetToolbarRepository'))&&_0x4e666d['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x58dace){await this['loadRevisionData'](_0x58dace);const _0x337ac7={};for(const _0x53a24e in _0x58dace['diffData']){if(_0x58dace['diffData'][_0x53a24e]['attachChange']&&!_0x58dace['diffData'][_0x53a24e]['attachChange']['isAttached'])continue;const _0x4f02bb=this['_removeRevisionMarkers'](JSON['parse'](_0x58dace['diffData'][_0x53a24e]['insertions'])),_0x3afe41=this['editor']['editing']['view']['document'],_0x145e81=new _0x6101a3(_0x3afe41,_0x4f02bb['map'](_0x57635c=>this['_getViewObj'](_0x57635c)));this['editor']['data']['processor']['useFillerType']('marked'),_0x337ac7[_0x53a24e]=this['editor']['data']['processor']['toData'](_0x145e81),this['editor']['data']['processor']['useFillerType']('default');}return _0x337ac7;}async['getRevisionRootsAttributes'](_0x216f19){await this['loadRevisionData'](_0x216f19);const _0x41da84={};for(const _0x530679 in _0x216f19['diffData'])_0x216f19['diffData'][_0x530679]['attachChange']&&!_0x216f19['diffData'][_0x530679]['attachChange']['isAttached']||(_0x41da84[_0x530679]=_0x216f19['diffData'][_0x530679]['attributesAfter']||{});return _0x41da84;}['_removeRevisionMarkers'](_0x46538f){return(_0x46538f=_0x46538f['filter'](_0x4a2144=>!_0x4a2144['name']||'revision-start'!==_0x4a2144['name']&&'revision-end'!==_0x4a2144['name']))['forEach'](_0x121dbd=>{'string'!=typeof _0x121dbd&&(_0x121dbd['children']=this['_removeRevisionMarkers'](_0x121dbd['children']),_0x121dbd['attributes']=_0x121dbd['attributes']['filter'](_0xc41118=>!_0xc41118[0x0]['startsWith']('data-revision-')));}),_0x46538f;}async['compare'](_0x1d416f,_0x5f3561,_0x58bbff=!0x1){if(!this['isEnabled'])return;const _0x425685=this['diff'],_0x1e76e1=this['repository'],_0x95293f='string'==typeof _0x1d416f?_0x1e76e1['getRevision'](_0x1d416f):_0x1d416f,_0x55f6c1='string'==typeof _0x5f3561?_0x1e76e1['getRevision'](_0x5f3561):_0x5f3561,_0x6ae1a4=_0x95293f['id'],_0x336943=_0x55f6c1?_0x55f6c1['id']:null;if(!_0x58bbff&&this['diff']&&this['diff']['newRevisionId']===_0x6ae1a4&&this['diff']['oldRevisionId']===_0x336943)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x6ae1a4,_0x336943);const _0x2e8a40=this['_getRevisionsRange'](_0x95293f,_0x55f6c1,!0x0)['map'](_0x5b4f4c=>this['loadRevisionData'](_0x5b4f4c));return _0x2e8a40['push'](new Promise(_0x1dcca8=>{setTimeout(_0x1dcca8,0x14);})),Promise['all'](_0x2e8a40)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0xdd865b=this['_getDiff'](_0x6ae1a4,_0x336943);for(const _0x10cd2e of _0xdd865b['changes'])this['_changeIdToChange']['set'](_0x10cd2e['id'],_0x10cd2e);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x395a19=>{for(const _0x7f3cd5 of this['editor']['model']['document']['getRootNames']())_0x395a19['detachRoot'](_0x7f3cd5);for(const _0x377d4b of Object['keys'](_0xdd865b['model'])){const _0x64d489=_0x395a19['addRoot'](_0x377d4b);for(const _0x1118da of Object['keys'](_0xdd865b['attributes'][_0x377d4b]))_0x395a19['setAttribute'](_0x1118da,_0xdd865b['attributes'][_0x377d4b][_0x1118da],_0x64d489);_0x395a19['insert'](_0xdd865b['model'][_0x377d4b],_0x64d489,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0xdd865b['changes'])),this['isReady']=!0x0;})['catch'](_0x4ccaef=>{console['error'](_0x4ccaef),this['_cleanUp'](),_0x425685&&(this['diff']=_0x425685),this['isReady']=!0x0;});}['addRevisionData'](_0x397f82,_0x334a54){const _0x686e10=this['repository']['createRevision'](_0x397f82);return _0x686e10['on']('_update',(_0x235e4c,_0xf85c86,_0x349f3f)=>_0x334a54(_0xf85c86,_0x349f3f,_0x686e10)),this['repository']['addRevision'](_0x686e10),_0x686e10;}['loadRevisionData'](_0x2ec58d){if(!_0x2ec58d||_0x2ec58d['diffData'])return Promise['resolve']();{const _0x39aa29=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x39aa29,'revisionId':_0x2ec58d['id']})['then'](_0x5a42dc=>{_0x2ec58d['_update']({'diffData':_0x5a42dc['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x209207=>{for(const _0x419507 of this['editor']['model']['document']['getRootNames']())_0x209207['detachRoot'](_0x419507);});}['_sortAndFilterDiffChanges'](_0x54cf5a){const _0x46e1fb=[],_0x23b005=new Map();for(const _0x11c59f of this['editor']['model']['document']['getRootNames']()){const _0x2bc8df=this['editor']['editing']['view']['getDomRoot'](_0x11c59f);if(!_0x2bc8df)continue;const _0x3aefd4=_0x2bc8df['getClientRects']()['item'](0x0);_0x3aefd4&&(_0x46e1fb['push'](_0x11c59f),_0x23b005['set'](_0x11c59f,_0x3aefd4));}return _0x46e1fb['sort']((_0x234871,_0x203d3b)=>{const _0x53b6fa=_0x23b005['get'](_0x234871),_0x1880fe=_0x23b005['get'](_0x203d3b);return _0x53b6fa['y']-_0x1880fe['y']||_0x53b6fa['x']-_0x1880fe['x'];}),(_0x54cf5a=_0x54cf5a['filter'](_0x51f47f=>_0x46e1fb['includes'](_0x51f47f['rootName'])))['sort']((_0x44c63c,_0x5befd6)=>_0x46e1fb['indexOf'](_0x44c63c['rootName'])-_0x46e1fb['indexOf'](_0x5befd6['rootName'])),_0x54cf5a;}['_makeTape'](_0x58debc){const _0x2861e1=Array['from'](_0x58debc['markers'])['filter'](([_0xdef413,_0x585130])=>_0xdef413['startsWith']('revision:')&&!_0x585130['isCollapsed']),_0x20c12b=Array['from'](this['editor']['model']['createRangeIn'](_0x58debc)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2861e1['length'])for(const _0x1fcc7a of _0x20c12b){const [_0x5d9641,_0x177129]=_0x2861e1[0x0],[,_0x42808f,_0x21e298]=_0x5d9641['split'](':');if(_0x177129['end']['isEqual'](_0x1fcc7a['nextPosition'])&&_0x2861e1['shift'](),(_0x1fcc7a['previousPosition']['isEqual'](_0x177129['start'])||_0x1fcc7a['previousPosition']['isAfter'](_0x177129['start']))&&('insertion'==_0x42808f?_0x1fcc7a['isAdded']={'userId':_0x21e298}:'deletion'==_0x42808f&&(_0x1fcc7a['isRemoved']={'userId':_0x21e298})),0x0==_0x2861e1['length'])break;}return _0x20c12b;}['_refreshStartEndIndex'](_0x2c3043){const _0x55bc6f=new Map();for(let _0x502916=0x0;_0x502916<_0x2c3043['length'];_0x502916++)'text'===_0x2c3043[_0x502916]['type']?(_0x2c3043[_0x502916]['item']['startIndex']=_0x502916,_0x2c3043[_0x502916]['item']['endIndex']=_0x502916):('elementStart'===_0x2c3043[_0x502916]['type']?_0x2c3043[_0x502916]['item']['startIndex']=_0x502916:'elementEnd'===_0x2c3043[_0x502916]['type']&&(_0x2c3043[_0x502916]['item']['endIndex']=_0x502916),_0x55bc6f['set'](_0x2c3043[_0x502916]['id'],_0x502916));for(const _0x2037b8 of _0x55bc6f['values']())'elementStart'===_0x2c3043[_0x2037b8]['type']?_0x2c3043[_0x2037b8]['item']['endIndex']=_0x55bc6f['get'](_0x2c3043[_0x2037b8]['pairId']):'elementEnd'===_0x2c3043[_0x2037b8]['type']&&(_0x2c3043[_0x2037b8]['item']['startIndex']=_0x55bc6f['get'](_0x2c3043[_0x2037b8]['pairId']));}['_processTape'](_0x2ee9bb){for(let _0x4eed7e=0x0;_0x4eed7e<_0x2ee9bb['length'];_0x4eed7e++){if('elementStart'===_0x2ee9bb[_0x4eed7e]['type'])_0x2ee9bb[_0x4eed7e]['item']['startIndex']=_0x4eed7e;else{if('elementEnd'===_0x2ee9bb[_0x4eed7e]['type']){_0x2ee9bb[_0x4eed7e]['item']['endIndex']=_0x4eed7e;const _0x17f42a=_0x2ee9bb[_0x4eed7e]['item']['startIndex'];_0x2ee9bb[_0x17f42a]['pairId']=_0x2ee9bb[_0x4eed7e]['id'],_0x2ee9bb[_0x4eed7e]['pairId']=_0x2ee9bb[_0x17f42a]['id'];}else _0x2ee9bb[_0x4eed7e]['item']['startIndex']=_0x4eed7e,_0x2ee9bb[_0x4eed7e]['item']['endIndex']=_0x4eed7e,_0x2ee9bb[_0x4eed7e]['pairId']=null;}_0x2ee9bb[_0x4eed7e]['markersStart']||(_0x2ee9bb[_0x4eed7e]['markersStart']=[],_0x2ee9bb[_0x4eed7e]['markersEnd']=[]);}}['_markInsertions'](_0x265deb,_0x325f0f){const _0x4e5215=_0x265deb['filter'](_0x36b13d=>!_0x36b13d['isAdded']);for(let _0x4740c8=0x0;_0x4740c8<_0x325f0f['length'];_0x4740c8++)_0x325f0f[_0x4740c8]['isAdded']&&(_0x4e5215[_0x4740c8]['isAdded']=_0x325f0f[_0x4740c8]['isAdded']);}['_makeModelFromViewString'](_0x1c612f){const _0x44eb71=JSON['parse'](_0x1c612f),_0x4b09a7=this['editor']['editing']['view']['document'],_0x11e0f5=new _0x6101a3(_0x4b09a7,_0x44eb71['map'](_0x6bb1f0=>this['_getViewObj'](_0x6bb1f0)));return this['editor']['data']['toModel'](_0x11e0f5);}['_getViewObj'](_0x109fda){const _0x312d18=this['editor']['editing']['view']['document'];if('string'==typeof _0x109fda)return new _0x4c4e57(_0x312d18,_0x109fda);{const _0x56123f=_0x109fda['children']['map'](_0x46344e=>this['_getViewObj'](_0x46344e));return new(Y[_0x109fda['type']]||_0x293663)(_0x312d18,_0x109fda['name'],_0x109fda['attributes'],_0x56123f);}}['_getDiff'](_0x4958d2,_0xa42dd1=null){const _0x9d1417=this['repository']['getRevision'](_0x4958d2),_0x1156c3=_0xa42dd1?this['repository']['getRevision'](_0xa42dd1):null,_0xcd389=this['_getRevisionsRange'](_0x9d1417,_0x1156c3),_0x1e0957=_0xcd389[_0xcd389['length']-0x1],_0xa2be27=new Map(),_0x4c6680={'model':{},'attributes':{},'changes':[]},_0x314f35=new Set(),_0x197d28=new Map();for(let _0x46e555=_0xcd389['length']-0x1;_0x46e555>=0x0;_0x46e555--){const _0x2dcc9b=_0xcd389[_0x46e555];for(const _0x28aa40 of Object['keys'](_0x2dcc9b['diffData']))if(_0x2dcc9b['diffData'][_0x28aa40]['attachChange']){const _0x405f1a=_0x2dcc9b['diffData'][_0x28aa40]['attachChange'];_0x405f1a['isAttached']?(_0x314f35['add'](_0x28aa40),_0x197d28['has'](_0x28aa40)&&_0x197d28['get'](_0x28aa40)['userId']==_0x405f1a['userId']?_0x197d28['delete'](_0x28aa40):_0x197d28['set'](_0x28aa40,_0x405f1a)):_0x197d28['has'](_0x28aa40)?(_0x314f35['delete'](_0x28aa40),_0x197d28['delete'](_0x28aa40)):(_0x314f35['add'](_0x28aa40),_0x197d28['set'](_0x28aa40,_0x405f1a));}else _0x314f35['add'](_0x28aa40);}for(const _0x159bfb of _0x314f35){const _0x1247e0=_0x197d28['has'](_0x159bfb)&&!_0x197d28['get'](_0x159bfb)['isAttached'];let _0x235e04=_0x1247e0?_0xcd389['length']-0x1:0x0;const _0x39350c=_0x1247e0?-0x1:0x1;for(;_0xcd389[_0x235e04];){const _0x431283=_0xcd389[_0x235e04];if(_0x431283['diffData'][_0x159bfb]){const _0xb8f4d8=_0x1247e0?_0x431283['diffData'][_0x159bfb]['attributesBefore']:_0x431283['diffData'][_0x159bfb]['attributesAfter'];_0x4c6680['attributes'][_0x159bfb]=_0xb8f4d8?_0x59c379(_0xb8f4d8):{};break;}_0x235e04+=_0x39350c;}}for(const _0x597585 of _0xcd389){_0x597585['model']={};for(const _0x11d21a of _0x597585['authors'])_0xa2be27['set'](_0x11d21a['id'],_0x11d21a);for(const _0x35402d of _0x314f35){const _0x58364a=_0x597585['diffData'][_0x35402d]?_0x597585['diffData'][_0x35402d]['insertions']:'[]',_0x895787=_0x597585['diffData'][_0x35402d]?_0x597585['diffData'][_0x35402d]['deletions']:'[]';_0x597585['model'][_0x35402d]={'insertions':this['_makeModelFromViewString'](_0x58364a),'deletions':this['_makeModelFromViewString'](_0x895787)};}}for(const _0x4626a6 of _0x314f35){let _0x7777fa=null,_0x5474fc=0x0;const _0x223c5b=new Map(Array['from'](_0x9d1417['model'][_0x4626a6]['insertions']['markers'])['filter'](([_0x590101])=>!_0x590101['startsWith']('revision:')));let _0x40b7be=0x0;for(const _0x1ac827 of _0xcd389){const _0x35de3a=this['_makeTape'](_0x1ac827['model'][_0x4626a6]['insertions']);_0x1ac827==_0x9d1417?(_0x7777fa=_0x35de3a,_0x5474fc=_0x7777fa['length'],_0x7777fa['forEach'](_0x2d97bd=>{_0x2d97bd['id']=_0x40b7be++;}),this['_processTape'](_0x7777fa)):this['_markInsertions'](_0x7777fa,_0x35de3a);const _0x18ec24=_0x7777fa['filter'](_0x3c3472=>!_0x3c3472['isAdded'])['map'](_0x4691b8=>_0x4691b8['id']);let _0xdacb7=0x0;const _0x5db8af=this['_makeTape'](_0x1ac827['model'][_0x4626a6]['deletions']);_0x5db8af['forEach'](_0x5c7d2d=>{_0x5c7d2d['isRemoved']?_0x5c7d2d['id']=_0x5474fc++:_0x5c7d2d['id']=_0x18ec24[_0xdacb7++];}),this['_processTape'](_0x5db8af),this['_setDistance'](_0x7777fa,'isAdded'),this['_setDistance'](_0x5db8af,'isRemoved'),_0x1ac827==_0x9d1417&&this['_markMarkers'](_0x7777fa,_0x223c5b),_0x7777fa=this['_joinTapes'](_0x7777fa,_0x5db8af),this['_refreshStartEndIndex'](_0x7777fa),this['_setDistance'](_0x7777fa,'isRemoved');}_0x7777fa=_0x7777fa['filter'](_0x436a97=>!(_0x436a97['isAdded']&&_0x436a97['isRemoved']));const _0x4f3b0d=new Map(_0x1e0957['model'][_0x4626a6]['deletions']['markers']),_0x4e5d3f=new Set(_0x223c5b['keys']());for(const _0x1e6d8c of _0x4f3b0d['keys']())_0x4e5d3f['delete'](_0x1e6d8c);this['_markSuggestions'](_0x7777fa,_0x4e5d3f),this['_fixObsoleteTags'](_0x7777fa),_0x7777fa=this['_removeMissingPairs'](_0x7777fa),_0x7777fa=this['_markMismatchedRemovedTags'](_0x7777fa),_0x7777fa=this['_removeUnsupportedChanges'](_0x7777fa);const {root:_0x3636ae,changes:_0x29aecb}=this['_makeModelFromTape'](_0x7777fa,_0xa2be27,_0x4626a6);_0x4c6680['model'][_0x4626a6]=_0x3636ae;const _0x37a463=_0x197d28['get'](_0x4626a6);if(_0x37a463){const _0xfdaea5=_0xa2be27['get'](_0x37a463['userId']),_0x4b2c9f=new r({'author':_0xfdaea5,'type':_0x37a463['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4626a6});_0x29aecb['unshift'](_0x4b2c9f),_0x4c6680['attributes'][_0x4626a6]['revisionHistoryAttachChange']=_0x4b2c9f['id'];}_0x4c6680['changes']=_0x4c6680['changes']['concat'](_0x29aecb);}return _0x4c6680;}['_markMarkers'](_0x30f8bb,_0x220175){for(let _0x3e35c1=0x0;_0x3e35c1<_0x30f8bb['length'];_0x3e35c1++)for(const [_0x281c9e,_0x552905]of _0x220175)_0x552905['start']['isEqual'](_0x30f8bb[_0x3e35c1]['previousPosition'])&&_0x30f8bb[_0x3e35c1]['markersStart']['push'](_0x281c9e),_0x552905['end']['isEqual'](_0x30f8bb[_0x3e35c1]['nextPosition'])&&_0x30f8bb[_0x3e35c1]['markersEnd']['push'](_0x281c9e);}['_joinTapes'](_0x18a48c,_0xf9530c){let _0x45c6fd=[],_0x344531=0x0,_0x15046c=0x0;for(;_0x344531<_0x18a48c['length']||_0x15046c<_0xf9530c['length'];){const _0x44c629=_0x18a48c[_0x344531]||{},_0x5130d0=_0xf9530c[_0x15046c]||{};if(_0x44c629['id']==_0x5130d0['id'])_0x344531++,_0x15046c++,_0x45c6fd['push'](_0x44c629);else{if(_0x5130d0['isRemoved']&&_0x44c629['isAdded']){const {commonTape:_0x24677a,iEnd:_0x280327,jEnd:_0x27bf3c}=this['_threeWayMerge'](_0x18a48c,_0x344531,_0xf9530c,_0x15046c);_0x45c6fd=_0x45c6fd['concat'](_0x24677a),_0x344531=_0x280327,_0x15046c=_0x27bf3c;}else _0x5130d0['isRemoved']?(_0x15046c++,_0x45c6fd['push'](_0x5130d0)):(_0x344531++,_0x45c6fd['push'](_0x44c629));}}return _0x45c6fd;}['_markSuggestions'](_0x15fcb2,_0x5da078){const _0x4d3a78=[];for(let _0x55c58a=0x0;_0x55c58a<_0x15fcb2['length'];_0x55c58a++){for(let _0x7d6a31=0x0;_0x7d6a31<_0x15fcb2[_0x55c58a]['markersStart']['length'];_0x7d6a31++){const _0x44697e=_0x15fcb2[_0x55c58a]['markersStart'][_0x7d6a31];if(!_0x5da078['has'](_0x44697e))continue;const {group:_0x5542a7,type:_0x46be09,authorId:_0x42a32b}=_0x13a77c(_0x44697e);'revision-suggestion'!=_0x5542a7||'insertion'!=_0x46be09&&'deletion'!=_0x46be09||(_0x4d3a78['unshift']({'type':_0x46be09,'name':_0x44697e,'userId':_0x42a32b}),_0x15fcb2[_0x55c58a]['markersStart']['splice'](_0x7d6a31,0x1),_0x7d6a31--);}_0x4ffc38(_0x15fcb2[_0x55c58a]);for(let _0x4d2a4e=0x0;_0x4d2a4e<_0x15fcb2[_0x55c58a]['markersEnd']['length'];_0x4d2a4e++){const _0x2cd81d=_0x15fcb2[_0x55c58a]['markersEnd'][_0x4d2a4e];if(!_0x5da078['has'](_0x2cd81d))continue;const {group:_0xafb5e4,type:_0x6fb968}=_0x13a77c(_0x2cd81d);if('revision-suggestion'!=_0xafb5e4||'insertion'!=_0x6fb968&&'deletion'!=_0x6fb968)continue;_0x15fcb2[_0x55c58a]['markersEnd']['splice'](_0x4d2a4e,0x1),_0x4d2a4e--;const _0x324a30=_0x4d3a78['findIndex'](_0x315f64=>_0x315f64['name']==_0x2cd81d);_0x324a30>-0x1&&_0x4d3a78['splice'](_0x324a30,0x1);}}function _0x13a77c(_0x34e93b){const _0x1045bc=_0x34e93b['split'](':');return{'group':_0x1045bc[0x0],'type':_0x1045bc[0x1],'subType':_0x1045bc['length']>=0x5?_0x1045bc[0x2]:null,'id':_0x1045bc['length']<0x5?_0x1045bc[0x2]:_0x1045bc[0x3],'authorId':_0x1045bc['length']<0x5?_0x1045bc[0x3]:_0x1045bc[0x4],'markerCount':0x6==_0x1045bc['length']?_0x1045bc[0x5]:null};}function _0x4ffc38(_0x2688eb){for(let _0x519554=0x0;_0x519554<_0x4d3a78['length'];_0x519554++){if(_0x2688eb['isAdded']&&'insertion'==_0x4d3a78[_0x519554]['type'])return _0x2688eb['isAddSuggestion']=_0x4d3a78[_0x519554],void delete _0x2688eb['isAdded'];if(!_0x2688eb['isAdded']&&!_0x2688eb['isRemoved']&&'deletion'==_0x4d3a78[_0x519554]['type'])return void(_0x2688eb['isRemoveSuggestion']=_0x4d3a78[_0x519554]);}}}['_setDistance'](_0x4402a0,_0x551bc9){let _0x1840af=0x0,_0x4c37dc=!0x1;const _0x5bb6fa=new Map();for(const _0x306eb8 of _0x4402a0)_0x306eb8[_0x551bc9]?_0x4c37dc&&(_0x1840af++,_0x4c37dc=!0x1):(_0x1840af++,_0x4c37dc=!0x0),_0x5bb6fa['set'](_0x306eb8['id'],_0x1840af);for(let _0x56ca72=0x0;_0x56ca72<_0x4402a0['length'];_0x56ca72++){if('isRemoved'==_0x551bc9&&_0x4402a0[_0x56ca72]['isAdded']||'isAdded'==_0x551bc9&&_0x4402a0[_0x56ca72]['isRemoved'])continue;if('text'==_0x4402a0[_0x56ca72]['type']){_0x4402a0[_0x56ca72]['distance']=0x0;continue;}const _0xc2d667=_0x5bb6fa['get'](_0x4402a0[_0x56ca72]['pairId']),_0x14f93a=_0x5bb6fa['get'](_0x4402a0[_0x56ca72]['id']);_0x4402a0[_0x56ca72]['distance']=_0xc2d667-_0x14f93a;}}['_getRevisionsRange'](_0x285a24,_0x12bff4,_0x4b7c50=!0x1){const _0x2616a9=[];let _0x3c986d=this['repository']['getIndex'](_0x285a24),_0xeb408c=this['repository']['getIndex'](_0x12bff4);for(-0x1==_0xeb408c&&(_0xeb408c=this['repository']['_revisions']['length'],_0x4b7c50=!0x1);_0x3c986d<_0xeb408c;)_0x2616a9['push'](this['repository']['getRevision'](_0x3c986d)),_0x3c986d++;return _0x4b7c50&&_0x2616a9['push'](this['repository']['getRevision'](_0x3c986d)),_0x2616a9;}['_threeWayMerge'](_0x58b54e,_0xcda3e2,_0x1d5bbc,_0x266353){const _0x7e9e20=this['editor']['model']['schema'];let _0x230e8e=_0xcda3e2;for(;_0x58b54e[_0x230e8e]&&_0x58b54e[_0x230e8e]['isAdded'];)_0x230e8e++;let _0x2cd7e0=_0x266353;for(;_0x1d5bbc[_0x2cd7e0]&&_0x1d5bbc[_0x2cd7e0]['isRemoved'];)_0x2cd7e0++;_0xb8d056(_0x58b54e,_0xcda3e2,_0x230e8e),_0xb8d056(_0x1d5bbc,_0x266353,_0x2cd7e0);const _0x7691ff=_0x1d5bbc['slice'](_0x266353,_0x2cd7e0)['concat'](_0x58b54e['slice'](_0xcda3e2,_0x230e8e));return _0x7691ff['sort']((_0x572c27,_0x43cead)=>_0x572c27['side']!=_0x43cead['side']?_0x572c27['side']-_0x43cead['side']:_0x572c27['level']!=_0x43cead['level']?_0x572c27['level']-_0x43cead['level']:_0x572c27['distance']!=_0x43cead['distance']?_0x43cead['distance']-_0x572c27['distance']:!!_0x572c27['isAdded']!=!!_0x43cead['isAdded']?-0x1==_0x572c27['side']||0x0==_0x572c27['side']?_0x572c27['isAdded']?-0x1:0x1:_0x572c27['isAdded']?0x1:-0x1:_0x572c27['index']-_0x43cead['index']),{'commonTape':_0x7691ff,'iEnd':_0x230e8e,'jEnd':_0x2cd7e0};function _0xb8d056(_0x38a9c8,_0x229bf6,_0x1ce475){let _0x4c463e=-0x1,_0x575da6=Number['POSITIVE_INFINITY'],_0x3ce0e8=!0x0;for(let _0x1ea3b9=_0x229bf6;_0x1ea3b9<_0x1ce475;_0x1ea3b9++)if(_0x7e9e20['isInline'](_0x38a9c8[_0x1ea3b9]['item'])||(_0x3ce0e8=!0x1),_0x38a9c8[_0x1ea3b9]['item']['startIndex']<_0x229bf6&&(_0x4c463e=_0x1ea3b9),_0x38a9c8[_0x1ea3b9]['item']['endIndex']>=_0x1ce475){_0x575da6=_0x1ea3b9;break;}_0x3ce0e8&&(_0x4c463e=_0x1ce475-0x1);for(let _0x15fe43=_0x229bf6;_0x15fe43<_0x1ce475;_0x15fe43++)_0x38a9c8[_0x15fe43]['side']=_0x15fe43<=_0x4c463e?-0x1:_0x15fe43<_0x575da6?0x0:0x1,_0x38a9c8[_0x15fe43]['index']=_0x15fe43;let _0x3feddf=0x0;for(let _0x3d1e4d=_0x229bf6;_0x3d1e4d<=_0x4c463e;_0x3d1e4d++)0x0==_0x38a9c8[_0x3d1e4d]['distance']?_0x38a9c8[_0x3d1e4d]['level']=_0x3feddf:(_0x3feddf++,_0x38a9c8[_0x3d1e4d]['level']=_0x3feddf,_0x3feddf++);for(let _0x14de90=_0x229bf6;_0x14de90<_0x1ce475;_0x14de90++)0x0==_0x38a9c8[_0x14de90]['side']&&(_0x38a9c8[_0x14de90]['level']=_0x3feddf);_0x3feddf=0x0;for(let _0x1055ce=_0x1ce475-0x1;_0x1055ce>=_0x575da6;_0x1055ce--)0x0==_0x38a9c8[_0x1055ce]['distance']?_0x38a9c8[_0x1055ce]['level']=_0x3feddf:(_0x3feddf--,_0x38a9c8[_0x1055ce]['level']=_0x3feddf,_0x3feddf--);}}['_fixObsoleteTags'](_0x554905){const _0x3ca903=new Map(),_0x26266c=this['editor']['model']['schema'];for(let _0x546546=0x1;_0x546546<_0x554905['length'];_0x546546++){let _0x783b3d,_0x1b975b,_0x24f0d2;const _0x54b43c=_0x554905[_0x546546],_0x1c9d04=_0x554905[_0x546546-0x1];if('text'==_0x54b43c['type'])continue;if(_0x54b43c['type']!=_0x1c9d04['type'])continue;if(!_0x26266c['isBlock'](_0x1c9d04['item'])||_0x26266c['isLimit'](_0x1c9d04['item']))continue;if(!_0x26266c['isBlock'](_0x54b43c['item'])||_0x26266c['isLimit'](_0x54b43c['item']))continue;if((_0x554905[_0x546546]['isAdded']||_0x554905[_0x546546]['isAddSuggestion'])&&_0x554905[_0x546546-0x1]['isRemoved'])_0x783b3d=_0x554905[_0x546546],_0x1b975b=_0x554905[_0x546546-0x1],_0x24f0d2=_0x546546-0x1;else{if(!_0x554905[_0x546546]['isRemoved']||!_0x554905[_0x546546-0x1]['isAdded']&&!_0x554905[_0x546546-0x1]['isAddSuggestion'])continue;_0x783b3d=_0x554905[_0x546546-0x1],_0x1b975b=_0x554905[_0x546546],_0x24f0d2=_0x546546;}const _0x4f7db3=_0x783b3d['level']==_0x1b975b['level'],_0x3a5bdd=Math['abs'](_0x783b3d['level'])<Math['abs'](_0x1b975b['level'])&&0x0==_0x1b975b['distance'];(_0x4f7db3||_0x3a5bdd)&&(_0x3ca903['set'](_0x1b975b['id'],_0x783b3d['id']),_0x554905['splice'](_0x24f0d2,0x1),_0x546546--,_0x783b3d['isAdded']=!0x1);}for(let _0x38aa75=0x0;_0x38aa75<_0x554905['length'];_0x38aa75++)_0x3ca903['has'](_0x554905[_0x38aa75]['pairId'])&&(_0x554905[_0x38aa75]['pairId']=_0x3ca903['get'](_0x554905[_0x38aa75]['pairId']));}['_removeMissingPairs'](_0x50a59a){const _0x29d800=new Set(_0x50a59a['map'](_0x44bbc4=>_0x44bbc4['id']));for(let _0xb489a6=0x0;_0xb489a6<_0x50a59a['length'];_0xb489a6++)_0x29d800['has'](_0x50a59a[_0xb489a6]['pairId'])||0x0==_0x50a59a[_0xb489a6]['distance']||(_0x50a59a[_0xb489a6]['isIncorrect']=!0x0);return _0x50a59a['filter'](_0x45f0d9=>!_0x45f0d9['isIncorrect']);}['_markMismatchedRemovedTags'](_0x30bc1b){const _0x1878cc=new Set();for(let _0x100e31=0x0;_0x100e31<_0x30bc1b['length'];_0x100e31++){if(_0x1878cc['has'](_0x30bc1b[_0x100e31]['id'])&&_0x30bc1b[_0x100e31]['isRemoved']&&(_0x30bc1b[_0x100e31]['isIncorrect']=!0x0),_0x30bc1b[_0x100e31]['isIncorrect'])continue;if(0x0==_0x30bc1b[_0x100e31]['distance'])continue;if('elementStart'!=_0x30bc1b[_0x100e31]['type'])continue;if(null==_0x30bc1b[_0x100e31]['pairId'])continue;let _0x2e1d41=_0x100e31+0x1,_0x577fe5=0x0;for(;_0x30bc1b[_0x2e1d41]['id']!=_0x30bc1b[_0x100e31]['pairId'];)'elementStart'==_0x30bc1b[_0x2e1d41]['type']?_0x577fe5++:'elementEnd'==_0x30bc1b[_0x2e1d41]['type']&&_0x577fe5--,_0x2e1d41++;if(0x0!=_0x577fe5){if(_0x30bc1b[_0x100e31]['isRemoved'])_0x30bc1b[_0x100e31]['isIncorrect']=!0x0;else{for(;_0x2e1d41!=_0x100e31;)_0x30bc1b[_0x2e1d41]['isRemoved']&&0x0!=_0x30bc1b[_0x2e1d41]['distance']&&(_0x30bc1b[_0x2e1d41]['isIncorrect']=!0x0,_0x1878cc['add'](_0x30bc1b[_0x2e1d41]['pairId'])),_0x2e1d41--;}}}return _0x30bc1b['filter'](_0x54249b=>!_0x54249b['isIncorrect']);}['_removeUnsupportedChanges'](_0x48a0fd){const _0x49a630=this['editor']['model']['schema'];for(let _0x3f33ff=0x0;_0x3f33ff<_0x48a0fd['length'];_0x3f33ff++){if(!(_0x48a0fd[_0x3f33ff]['isAdded']||_0x48a0fd[_0x3f33ff]['isAddSuggestion']||_0x48a0fd[_0x3f33ff]['isRemoved']||_0x48a0fd[_0x3f33ff]['isRemoveSuggestion']))continue;if(0x0==_0x48a0fd[_0x3f33ff]['distance'])continue;const _0xa25197=_0x48a0fd[_0x3f33ff]['item'];_0x49a630['isBlock'](_0xa25197)||_0x49a630['isLimit'](_0xa25197)||(_0x48a0fd[_0x3f33ff]['isAdded']&&delete _0x48a0fd[_0x3f33ff]['isAdded'],_0x48a0fd[_0x3f33ff]['isAddSuggestion']&&delete _0x48a0fd[_0x3f33ff]['isAddSuggestion'],_0x48a0fd[_0x3f33ff]['isRemoveSuggestion']&&delete _0x48a0fd[_0x3f33ff]['isRemoveSuggestion'],_0x48a0fd[_0x3f33ff]['isRemoved']&&(_0x48a0fd[_0x3f33ff]['isIncorrect']=!0x0));}return _0x48a0fd['filter'](_0x9b9eba=>!_0x9b9eba['isIncorrect']);}['_makeModelFromTape'](_0x39f41e,_0x434db2,_0x48c866){const _0x59c869=new mt(),_0x372503=[],_0x49cbde=new Map(),_0x2c6835=this['editor']['model'],_0x57ed89=_0x2c6835['schema'],_0x52f19a=[_0x59c869],_0x3c52d5={},_0x2c0cf2={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5b1f26=null;const _0x36c8aa=[0x0];for(let _0x544ce8=0x0;_0x544ce8<_0x39f41e['length'];_0x544ce8++)if('elementStart'===_0x39f41e[_0x544ce8]['type']){_0x39f41e[_0x544ce8]['previousPosition']=_0x2c6835['createPositionFromPath'](_0x59c869,_0x36c8aa);const _0x380727=new ft(_0x39f41e[_0x544ce8]['item']['name'],_0x39f41e[_0x544ce8]['item']['getAttributes']());_0x52f19a[0x0]['_appendChild'](_0x380727),_0x36c8aa['push'](0x0),_0x52f19a['unshift'](_0x380727),_0x39f41e[_0x544ce8]['nextPosition']=_0x2c6835['createPositionFromPath'](_0x59c869,_0x36c8aa);}else'elementEnd'===_0x39f41e[_0x544ce8]['type']?(_0x52f19a['shift'](),_0x39f41e[_0x544ce8]['previousPosition']=_0x2c6835['createPositionFromPath'](_0x59c869,_0x36c8aa),_0x36c8aa['pop'](),_0x36c8aa[_0x36c8aa['length']-0x1]++,_0x39f41e[_0x544ce8]['nextPosition']=_0x2c6835['createPositionFromPath'](_0x59c869,_0x36c8aa)):(_0x39f41e[_0x544ce8]['previousPosition']=_0x2c6835['createPositionFromPath'](_0x59c869,_0x36c8aa),_0x5b1f26?_0x5b1f26['_data']+=_0x39f41e[_0x544ce8]['item']['data']:_0x5b1f26=new wt(_0x39f41e[_0x544ce8]['item']['data'],_0x39f41e[_0x544ce8]['item']['getAttributes']()),_0x39f41e[_0x544ce8+0x1]&&'text'===_0x39f41e[_0x544ce8+0x1]['type']&&_0x2ba697(_0x5b1f26,_0x39f41e[_0x544ce8+0x1]['item'])||(_0x52f19a[0x0]['_appendChild'](_0x5b1f26),_0x5b1f26=null),_0x36c8aa[_0x36c8aa['length']-0x1]+=_0x39f41e[_0x544ce8]['item']['offsetSize'],_0x39f41e[_0x544ce8]['nextPosition']=_0x2c6835['createPositionFromPath'](_0x59c869,_0x36c8aa));for(let _0x3832fa=0x0;_0x3832fa<_0x39f41e['length'];_0x3832fa++){const _0x29495f=_0x39f41e[_0x3832fa]['previousPosition'],_0x4dfda1=_0x39f41e[_0x3832fa]['nextPosition'];for(const _0x125e83 of _0x39f41e[_0x3832fa]['markersStart'])_0x49cbde['set'](_0x125e83,{'start':_0x29495f,'end':null});_0x173b12('isRemoveSuggestion',_0x3832fa,_0x29495f,_0x4dfda1),_0x173b12('isAddSuggestion',_0x3832fa,_0x29495f,_0x4dfda1),_0x173b12('isRemoved',_0x3832fa,_0x29495f,_0x4dfda1),_0x173b12('isAdded',_0x3832fa,_0x29495f,_0x4dfda1);for(const _0x4d4d36 of _0x39f41e[_0x3832fa]['markersEnd']){_0x49cbde['get'](_0x4d4d36)['end']=_0x4dfda1;}}for(const [_0x10930f,_0x2028c8]of _0x49cbde){const _0x37f057=this['editor']['model']['createRange'](_0x2028c8['start'],_0x2028c8['end']);_0x59c869['markers']['set'](_0x10930f,_0x37f057);}return _0x372503['sort']((_0x23027c,_0x3a0e0c)=>{const _0x3ec32c=_0x59c869['markers']['get']('revision:'+_0x23027c['id']),_0x25ca5f=_0x59c869['markers']['get']('revision:'+_0x3a0e0c['id']);return _0x3ec32c['start']['isBefore'](_0x25ca5f['start'])?-0x1:_0x3ec32c['start']['isAfter'](_0x25ca5f['start'])?0x1:_0x3ec32c['end']['isBefore'](_0x25ca5f['end'])?-0x1:_0x3ec32c['end']['isAfter'](_0x25ca5f['end'])?0x1:'add'===_0x23027c['type']?-0x1:0x1;}),{'root':_0x59c869,'changes':_0x372503};function _0x173b12(_0x1b2e42,_0x6a3306,_0xf8e1c7,_0x45d3e3){const _0xe079bf=!!_0x39f41e[_0x6a3306][_0x1b2e42],_0x15212f=_0xe079bf?_0x39f41e[_0x6a3306][_0x1b2e42]['userId']:null,_0x1e41da=_0x6a3306===_0x39f41e['length']-0x1,_0xf34f58=_0x2c0cf2[_0x1b2e42][0x0],_0x52945e=_0x57ed89['isObject'](_0x39f41e[_0x6a3306]['item']);!_0x3c52d5[_0x1b2e42]&&_0xe079bf?_0x3c52d5[_0x1b2e42]={'start':_0xf8e1c7,'tapeItem':_0x39f41e[_0x6a3306],'userId':_0x15212f,'type':_0x1b2e42}:_0x3c52d5[_0x1b2e42]&&!_0xe079bf?(_0x3c52d5[_0x1b2e42]['end']=_0xf8e1c7,_0x2dba11(_0x3c52d5[_0x1b2e42]),_0x3c52d5[_0x1b2e42]=null):_0x3c52d5[_0x1b2e42]&&_0xe079bf&&_0x3c52d5[_0x1b2e42]['userId']!==_0x15212f&&(_0x3c52d5[_0x1b2e42]['end']=_0xf8e1c7,_0xf34f58&&_0xf34f58['userId']===_0x3c52d5[_0x1b2e42]['userId']||_0x2dba11(_0x3c52d5[_0x1b2e42]),_0x3c52d5[_0x1b2e42]={'start':_0xf8e1c7,'tapeItem':_0x39f41e[_0x6a3306],'userId':_0x15212f,'type':_0x1b2e42}),_0x3c52d5[_0x1b2e42]&&_0x52945e&&('elementStart'!==_0x39f41e[_0x6a3306]['type']||_0xf34f58&&_0xf34f58['userId']===_0x15212f||_0x2c0cf2[_0x1b2e42]['unshift']({'userId':_0x15212f,'object':_0x39f41e[_0x6a3306]['item'],'change':_0x3c52d5[_0x1b2e42]}),'elementEnd'===_0x39f41e[_0x6a3306]['type']&&_0xf34f58&&_0xf34f58['object']===_0x39f41e[_0x6a3306]['item']&&(_0x2c0cf2[_0x1b2e42]['shift'](),_0x3c52d5[_0x1b2e42]=_0xf34f58['change'])),_0x3c52d5[_0x1b2e42]&&_0x1e41da&&(_0x3c52d5[_0x1b2e42]['end']=_0x45d3e3,_0x2dba11(_0x3c52d5[_0x1b2e42]),_0x3c52d5[_0x1b2e42]=null);}function _0x2dba11({start:_0x445620,end:_0x354b5b,tapeItem:_0x38238c,userId:_0x44acec,type:_0xce0c8e}){const _0x5afab0=_0x38238c['item'],_0x381160=_0x2c6835['schema']['isBlock'](_0x5afab0)&&!_0x2c6835['schema']['isLimit'](_0x5afab0),_0x1edee2=_0x445620['nodeAfter']==_0x354b5b['parent']&&_0x354b5b['isAtStart'];if(_0x381160&&_0x1edee2)return;const _0x473a6c=_0x2c6835['createRange'](_0x445620,_0x354b5b),_0x2c12a6=_0x434db2['get'](_0x44acec),_0x5ef1d7=new r({'author':_0x2c12a6,'type':'isAdded'==_0xce0c8e||'isAddSuggestion'==_0xce0c8e?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xce0c8e||'isRemoveSuggestion'==_0xce0c8e},'createdAt':new Date(),'rootName':_0x48c866});_0x372503['push'](_0x5ef1d7),_0x59c869['markers']['set']('revision:'+_0x5ef1d7['id'],_0x473a6c);}function _0x2ba697(_0x19c84a,_0x2a1b5b){const _0x35732f=_0x19c84a['getAttributes'](),_0x42ae57=_0x2a1b5b['getAttributes']();for(const _0x51539c of _0x35732f){if(_0x51539c[0x1]!==_0x2a1b5b['getAttribute'](_0x51539c[0x0]))return!0x1;_0x42ae57['next']();}return _0x42ae57['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xf827e2=>{const _0x2af1f9=_0xf827e2['markerName']['split'](':')[0x1],_0x1913e3=this['_getChangeFromId'](_0x2af1f9);if(!_0x1913e3)return null;const _0x121d84='add'==_0x1913e3['type']?'insertion':'deletion',_0x13db88=['ck-suggestion-marker','ck-suggestion-marker-'+_0x121d84];return _0x1913e3['data']['isSuggestion']&&_0x13db88['push']('ck-suggestion-marker-'+_0x121d84+'-new'),this['activeChange']==_0x1913e3&&_0x13db88['push']('ck-suggestion-marker--active'),{'classes':_0x13db88,'attributes':{'data-change-id':_0x2af1f9}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1c3301=>{_0x1c3301['on']('element:pre',(_0x2c7803,_0x3c4d98,_0x3e3ac1)=>{const _0x21043f=_0x3c4d98['viewItem']['getChild'](0x0);if(!_0x21043f||!_0x21043f['is']('element','code'))return;if(!_0x3e3ac1['consumable']['consume'](_0x21043f,{'attributes':['vid_start','vid_end']}))return;const _0x17f6e1=_0x3c4d98['modelRange']['start']['nodeAfter'];_0x3e3ac1['writer']['setAttribute']('vid_start',_0x21043f['getAttribute']('vid_start'),_0x17f6e1),_0x3e3ac1['writer']['setAttribute']('vid_end',_0x21043f['getAttribute']('vid_end'),_0x17f6e1);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x34b4ea=>{_0x34b4ea['on']('element',(_0x2430c2,_0x149728,_0xb14838)=>{if(!_0xb14838['consumable']['consume'](_0x149728['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x149728['modelRange']['isCollapsed'])return;const _0x19179b=_0x149728['modelRange']['start']['nodeAfter'];_0x19179b['hasAttribute']('vid_start')||_0x19179b['hasAttribute']('vid')||(_0xb14838['writer']['setAttribute']('vid_start',_0x149728['viewItem']['getAttribute']('vid_start'),_0x19179b),_0xb14838['writer']['setAttribute']('vid_end',_0x149728['viewItem']['getAttribute']('vid_end'),_0x19179b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x483b8b=>_0x483b8b['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1e6490,[,_0x201f93])=>{['vid_start','vid_end','vid']['includes'](_0x201f93)&&(_0x1e6490['return']=!0x0,_0x1e6490['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2ec096=>{_0x2ec096['on']('attribute:vid',(_0x11a824,_0x2f71f0,_0x1b0f06)=>{if('\x20'!=_0x2f71f0['item']['data']||_0x2f71f0['item']['parent']['maxOffset']>0x1)return;if(!_0x1b0f06['consumable']['consume'](_0x2f71f0['item'],_0x11a824['name']))return;const _0xd68407=_0x1b0f06['writer'],_0x4d28a8=_0x1b0f06['mapper']['toViewRange'](_0x2f71f0['range']);_0xd68407['wrap'](_0x4d28a8,_0xd68407['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2c860a){const _0x542ff2=_0x2c860a['plugins']['get']('RevisionViewer');return(_0x22977c,_0x36b319,_0x251da8)=>{const _0x33c00f=_0x36b319['markerName']['split'](':')[0x1],_0x26a36d=_0x542ff2['_getChangeFromId'](_0x33c00f);if(!_0x26a36d)return null;const _0x50dada='add'==_0x26a36d['type']?'split':'merge';if(!_0x251da8['consumable']['test'](_0x36b319['markerRange'],_0x22977c['name']))return;const _0x95f1eb=_0x36b319['markerRange']['getWalker'](),_0x9c0347=_0x36b319['markerRange']['start'],_0x1ad9e4=_0x2c860a['model']['schema'];let _0x4fbb8b=null,_0x366c91=null,_0x56f025=!0x1,_0x472c3a=!0x1;for(const _0x4d1a94 of _0x95f1eb){const _0x3cde0c=_0x4d1a94['item'];_0x56f025=_0x56f025||_0x1ad9e4['isContent'](_0x3cde0c);const _0x274592=_0x251da8['mapper']['toViewElement'](_0x3cde0c);if(_0x274592&&_0x274592['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4d1a94['type']&&(_0x1ad9e4['isBlock'](_0x3cde0c)&&!_0x1ad9e4['isLimit'](_0x3cde0c)&&(_0x3cde0c['nextSibling']||_0x9c0347['isAtEnd']?_0x4fbb8b&&_0x4fbb8b['parent']==_0x3cde0c||(_0x4fbb8b=_0x3cde0c,_0x5402f4(_0x4d1a94['previousPosition']),_0x472c3a=!0x0):_0x366c91=_0x366c91||_0x4d1a94['previousPosition']));}function _0x5402f4(_0x529680){const _0xcbfa7=_0x251da8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x50dada}),_0x2de14b=_0x251da8['mapper']['toViewPosition'](_0x529680);_0x26a36d['data']['isSuggestion']&&_0x251da8['writer']['addClass']('ck-suggestion-marker-'+_0x50dada+'-new',_0xcbfa7),_0x542ff2['activeChange']==_0x26a36d&&_0x251da8['writer']['addClass']('ck-suggestion-marker--active',_0xcbfa7),_0x251da8['writer']['insert'](_0x2de14b,_0xcbfa7),_0x251da8['mapper']['bindElementToMarker'](_0xcbfa7,_0x36b319['markerName']);}_0x56f025||_0x472c3a||!_0x366c91||_0x5402f4(_0x366c91);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2fecca,_0x4c4327,_0x3b34d7)=>{const _0x3d12eb=_0x3b34d7['mapper']['markerNameToElements'](_0x4c4327['markerName']);if(_0x3d12eb){for(const _0x27dc17 of _0x3d12eb)(_0x27dc17['hasClass']('ck-suggestion-marker-split')||_0x27dc17['hasClass']('ck-suggestion-marker-merge'))&&(_0x3b34d7['mapper']['unbindElementFromMarkerName'](_0x27dc17,_0x4c4327['markerName']),_0x3b34d7['writer']['remove'](_0x27dc17));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0xfee2db,_0x4eba55,_0x354539)=>{const _0x5b0855=_0x4eba55['markerName']['split'](':')[0x1],_0x2fd6ce=this['_getChangeFromId'](_0x5b0855);if(!_0x2fd6ce)return null;const _0x461452='add'==_0x2fd6ce['type']?'split':'merge';if(_0x354539['consumable']['test'](_0x4eba55['markerRange'],_0xfee2db['name']))for(const _0x19405b of _0x4eba55['markerRange']['getItems']()){if(!_0x19405b['is']('element','softBreak'))continue;const _0x1f63b4=_0x354539['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x461452}),_0x18892d=_0x354539['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x19405b));_0x2fd6ce['data']['isSuggestion']&&_0x354539['writer']['addClass']('ck-suggestion-marker-'+_0x461452+'-new',_0x1f63b4),this['activeChange']==_0x2fd6ce&&_0x354539['writer']['addClass']('ck-suggestion-marker--active',_0x1f63b4),_0x354539['writer']['insert'](_0x18892d,_0x1f63b4),_0x354539['mapper']['bindElementToMarker'](_0x1f63b4,_0x4eba55['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x49ee6d=>{for(const _0x49c7b5 of this['editor']['model']['document']['getRootNames']()){const _0x2c4324=this['editor']['model']['document']['getRoot'](_0x49c7b5),_0x48c9c9=this['editor']['editing']['view']['document']['getRoot'](_0x49c7b5);if(_0x48c9c9){const _0x147fa1=_0x2c4324['getAttribute']('revisionHistoryAttachChange');if(_0x49ee6d['removeAttribute']('data-change-id',_0x48c9c9),_0x49ee6d['removeClass']('ck-revision-history-root-add',_0x48c9c9),_0x49ee6d['removeClass']('ck-revision-history-root-remove',_0x48c9c9),_0x49ee6d['removeClass']('ck-revision-history-root--active',_0x48c9c9),_0x147fa1){const _0x190228=this['_getChangeFromId'](_0x147fa1);if(!_0x190228)return null;_0x49ee6d['setAttribute']('data-change-id',_0x147fa1,_0x48c9c9),_0x49ee6d['addClass']('ck-revision-history-root-'+_0x190228['type'],_0x48c9c9),this['activeChange']==_0x190228&&_0x49ee6d['addClass']('ck-revision-history-root--active',_0x48c9c9);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x7fe74e=>'revision-comment:'+_0x7fe74e,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x34c221=>'revision-suggestion:'+_0x34c221,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x233cc5=>({'name':'suggestion:'+_0x233cc5,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x258e85=>{const _0x5a9fd1=_0x258e85['markerName']['split'](':')[0x1];return'insertion'!=_0x5a9fd1&&'deletion'!=_0x5a9fd1?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5a9fd1]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x4f9940,_0x243916,_0x4228c2)=>{const _0xaeb12f=_0x4228c2['mapper']['markerNameToElements'](_0x243916['markerName']);if(_0xaeb12f){for(const _0x595ff5 of _0xaeb12f)_0x595ff5['is']('uiElement')&&(_0x4228c2['mapper']['unbindElementFromMarkerName'](_0x595ff5,_0x243916['markerName']),_0x4228c2['writer']['remove'](_0x595ff5));}},{'priority':'high'});}['_getChangeFromId'](_0x576d3f){return this['_changeIdToChange']['get'](_0x576d3f);}['_getViewForChange'](_0x411730){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x411730),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x7880cb,_0xe28e2,_0xe003ae,_0x345529)=>{_0x345529&&this['_balloon']['remove'](_0x345529),_0xe003ae&&(this['_balloon']['add']({'view':_0xe003ae,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x321a81=this['editor']['editing'],_0x535092=this['_getChangeFromId'](_0xe003ae['changeId']);let _0x34bf17;if(_0x535092['data']['isOnRoot']){const _0x48cfa9=_0x321a81['view']['getDomRoot'](_0x535092['rootName']);_0x34bf17=Array['from'](_0x48cfa9['getClientRects']());}else{const _0x1332ee=this['editor']['model']['markers']['get']('revision:'+_0xe003ae['changeId']);_0x34bf17=Array['from'](_0x321a81['mapper']['markerNameToElements'](_0x1332ee['name']))['map'](_0x63db47=>_0x321a81['view']['domConverter']['mapViewToDom'](_0x63db47))['map'](_0x1fbb94=>Array['from'](_0x1fbb94['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x34bf17[0x0];return _0x34bf17['find'](_0x3f25de=>_0x3f25de['top']-0x3<=this['_activeViewTarget']['y']&&_0x3f25de['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3f25de['left']-0x3<=this['_activeViewTarget']['x']&&_0x3f25de['right']+0x3>=this['_activeViewTarget']['x'])||_0x34bf17[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3f1710,_0x5b33c8,_0xc0ab21,_0x32cdb9)=>{this['activeView']=_0xc0ab21?this['_getViewForChange'](_0xc0ab21):null,this['editor']['model']['change'](()=>{const _0x4b62e9=this['editor']['editing'];_0x32cdb9&&(_0x32cdb9['data']['isOnRoot']?_0x4b62e9['view']['change'](_0x42dc11=>{_0x42dc11['removeClass']('ck-revision-history-root--active',_0x4b62e9['view']['document']['getRoot'](_0x32cdb9['rootName']));}):_0x4b62e9['reconvertMarker']('revision:'+_0x32cdb9['id'])),_0xc0ab21&&(_0xc0ab21['data']['isOnRoot']?_0x4b62e9['view']['change'](_0xfb7f13=>{_0xfb7f13['addClass']('ck-revision-history-root--active',_0x4b62e9['view']['document']['getRoot'](_0xc0ab21['rootName']));}):_0x4b62e9['reconvertMarker']('revision:'+_0xc0ab21['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x442e9a,_0x4e15ce)=>{if(this['activeChange'])return;const _0xb7e660=this['_findChangeIdFromDomTarget'](_0x4e15ce['target']),_0x3225f9=this['_changeIdToChange']['get'](_0xb7e660);_0x3225f9?(this['_activeViewTarget']={'x':_0x4e15ce['domEvent']['x'],'y':_0x4e15ce['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3225f9)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2ec9a6,_0x8afac1)=>{const _0x1ef5e0=this['_findChangeIdFromDomTarget'](_0x8afac1['target']),_0x380502=this['_changeIdToChange']['get'](_0x1ef5e0);_0x380502?(this['_activeViewTarget']={'x':_0x8afac1['domEvent']['x'],'y':_0x8afac1['domEvent']['y']},_0x380502===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x380502):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x35eb55){do{const _0x33ea82=_0x35eb55['getAttribute']('data-change-id');if(_0x33ea82)return _0x33ea82;_0x35eb55=_0x35eb55['parent'];}while(_0x35eb55);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x211c2b=>{for(const _0x2cbc05 of this['editor']['model']['markers'])_0x211c2b['removeMarker'](_0x2cbc05);});}}function Z(_0x52710f,_0x439218){return(_0x34a468,_0x41e489,_0xa29487)=>{if(!_0xa29487['consumable']['test'](_0x41e489['markerRange'],_0x34a468['name']))return;const _0x25789b=_0x41e489['markerRange']['getWalker'](),_0x3f2a0a=_0x41e489['markerRange']['start'],_0x1d0379=_0x52710f['model']['schema'];let _0x798648=null,_0x2738bc=null,_0x493960=!0x1,_0x522f8c=!0x1;for(const _0x3e83a4 of _0x25789b){const _0xb9c21e=_0x3e83a4['item'];_0x493960=_0x493960||_0x1d0379['isContent'](_0xb9c21e);const _0x4d4503=_0xa29487['mapper']['toViewElement'](_0xb9c21e);if(_0x4d4503&&_0x4d4503['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3e83a4['type']&&(_0x1d0379['isBlock'](_0xb9c21e)&&!_0x1d0379['isLimit'](_0xb9c21e)&&(_0xb9c21e['nextSibling']||_0x3f2a0a['isAtEnd']?_0x798648&&_0x798648['parent']==_0xb9c21e||(_0x798648=_0xb9c21e,_0x5600f5(_0x3e83a4['previousPosition']),_0x522f8c=!0x0):_0x2738bc=_0x2738bc||_0x3e83a4['previousPosition']));}function _0x5600f5(_0x4334d2){const _0x41ebf3=_0xa29487['mapper']['toViewPosition'](_0x4334d2),_0x2145d4=_0xa29487['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x439218});_0xa29487['writer']['insert'](_0x41ebf3,_0x2145d4),_0xa29487['mapper']['bindElementToMarker'](_0x2145d4,_0x41e489['markerName']);}_0x493960||_0x522f8c||!_0x2738bc||_0x5600f5(_0x2738bc);};}class _t extends _0x39d2fd{constructor(_0x1b8678){super(_0x1b8678);const _0x276a13=_0x1b8678['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x276a13,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x276a13,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x42dbea=this['editor'],_0x4ead64=_0x42dbea['plugins']['get'](d),_0x2d7cbe=_0x4ead64['isReady']?_0x4ead64['diff']['newRevisionId']:null;_0x42dbea['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2d7cbe);}['refresh'](){const {isReady:_0x465d08,isEnabled:_0x301d19,repository:_0x2fe6c7,diff:_0xf4da90}=this['editor']['plugins']['get'](d),_0x260899=_0xf4da90&&_0x2fe6c7['getLaterVisibleRevision'](_0xf4da90['newRevisionId']);this['isEnabled']=_0x465d08&&_0x301d19&&Boolean(_0x260899);}}class yt extends _0x39d2fd{['_step'];constructor(_0x5da875,{direction:_0x2c56c5}){super(_0x5da875);const _0x414455=_0x5da875['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x2c56c5?0x1:-0x1,this['listenTo'](_0x414455,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x414455,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x414455,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4acc92=this['editor'],_0x42d39d=_0x4acc92['plugins']['get'](d),{isNavigationMode:_0x766d02,currentChangeNumber:_0x954ccc}=_0x42d39d;let _0x53aec1;if(_0x42d39d['activeChange']=_0x766d02?_0x42d39d['diff']['changes']['get'](_0x954ccc+this['_step']):_0x42d39d['diff']['changes']['first'],_0x42d39d['activeChange']['data']['isOnRoot'])_0x53aec1=_0x4acc92['editing']['view']['getDomRoot'](_0x42d39d['activeChange']['rootName']);else{const _0xb40ed0=_0x4acc92['model']['markers']['get']('revision:'+_0x42d39d['activeChange']['id']);_0x53aec1=_0x27c2fd(_0x4acc92['editing'],_0xb40ed0);}_0x57074d({'target':_0x53aec1,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x542ea1,currentChangeNumber:_0x3aa9db,numberOfChanges:_0x5a511b,isReady:_0x3a4b20,isEnabled:_0x568c46}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x568c46&&_0x3a4b20&&_0x5a511b)&&(!_0x542ea1||(0x1===this['_step']?_0x3aa9db<_0x5a511b-0x1:_0x3aa9db>0x0));}}class di extends _0x528dcf{constructor(_0x58b631){super(_0x58b631);const _0x4d82b9=this['bindTemplate'],_0x199c8f=new _0x4fe6e(_0x58b631),_0x5cb16d=new _0x4fe6e(_0x58b631);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',(_0x15a927,_0xd4d47b)=>_0x15a927&&_0xd4d47b>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x464e00,_0x213a27,_0x193b45,_0xa33169)=>{if(!_0x464e00)return m(_0x58b631,'Loading...');if(!_0x193b45)return m(_0x58b631,'No\x20changes');const _0x56e9eb=m(_0x58b631,'NUMBER_OF_CHANGES',_0x193b45);return _0xa33169?m(_0x58b631,'X_OF_Y_CHANGES',[_0x213a27+0x1,_0x193b45]):_0x56e9eb;}),_0x199c8f['set']({'label':m(_0x58b631,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x5cb16d['set']({'label':m(_0x58b631,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x199c8f['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5cb16d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x199c8f['on']('execute',()=>this['fire']('execute','backward')),_0x5cb16d['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',_0x4d82b9['if']('_isStatusLabelVisible','ck-hidden',_0x4da62a=>!_0x4da62a)]},'children':[{'text':_0x4d82b9['to']('isNavigationMode',_0x1cffa1=>_0x1cffa1?m(_0x58b631,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x58b631,'Total')+':\x20')}]},{'text':_0x4d82b9['to']('_statusText')}]},new _0x5e3793(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x199c8f,_0x5cb16d]}]});}}const ce='ck-editor__editable__loading-overlay';class ae extends _0x2fef22{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x49b60b=this['editor']['editing']['view'];_0x49b60b['change'](_0x176e0c=>{for(const _0x558971 of _0x49b60b['document']['roots'])_0x176e0c['addClass'](ce,_0x558971);});}['hide'](){const _0x151216=this['editor']['editing']['view'];_0x151216['change'](_0x1539f7=>{for(const _0x536ddc of _0x151216['document']['roots'])_0x1539f7['removeClass'](ce,_0x536ddc);});}}class g extends _0x2fef22{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ae];}['init'](){const _0x424527=this['editor'],_0x151dfa=_0x424527['plugins']['get'](d),_0x1cf465=_0x424527['plugins']['get'](ae);_0x424527['ui']['componentFactory']['add']('exitToEditing',_0x4a6646=>{const _0x48f1ae=new _0x4fe6e(_0x4a6646);return _0x48f1ae['set']({'label':m(_0x4a6646,'Back\x20to\x20editing'),'icon':_0x34d699['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x48f1ae,'execute',()=>{_0x424527['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x48f1ae;}),_0x424527['ui']['componentFactory']['add']('restoreRevision',_0x3cb70c=>{const _0x4e812e=new _0x4fe6e(_0x3cb70c);return _0x4e812e['set']({'label':m(_0x3cb70c,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4e812e['bind']('isEnabled')['to'](_0x424527['commands']['get']('restoreRevision')),this['listenTo'](_0x4e812e,'execute',()=>_0x424527['execute']('restoreRevision')),_0x4e812e;}),_0x424527['ui']['componentFactory']['add']('changesNavigation',_0x38bf6a=>{const _0xa7c461=new di(_0x38bf6a),_0x56e2bd=_0x424527['commands']['get']('showPreviousChange'),_0x3673f3=_0x424527['commands']['get']('showNextChange');return _0xa7c461['bind']('isBackwardNavigationEnabled')['to'](_0x56e2bd,'isEnabled'),_0xa7c461['bind']('isForwardNavigationEnabled')['to'](_0x3673f3,'isEnabled'),_0xa7c461['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x151dfa),this['listenTo'](_0xa7c461,'execute',(_0x49d903,_0x38520c)=>{_0x424527['execute']('forward'===_0x38520c?'showNextChange':'showPreviousChange');}),_0xa7c461;}),_0x1cf465['show'](),_0x151dfa['on']('change:isReady',(_0x4c4ae1,_0x586102,_0x5aab0c)=>{_0x5aab0c?_0x1cf465['hide']():_0x1cf465['show']();});}}class pt extends nt{['_resizeObserver']=null;constructor(_0x286200,_0x135e76){super(_0x286200,_0x135e76);const _0x55a5d3=this['bindTemplate'];this['set']({'label':m(_0x286200,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x286200,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x55a5d3['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x1140dd=this['fieldView']['element'];this['_tooltipString']=_0x1140dd['scrollWidth']>_0x1140dd['clientWidth']&&_0x1140dd['value']||'';}}class ti extends _0x528dcf{constructor(_0x158d94,_0x8d2024,_0x4afe4d){super(_0x158d94);const _0x3678f4=new _0x267780();_0x3678f4['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x41a551=['ck','ck-revision-history-sidebar__revision-author'];_0x4afe4d&&_0x41a551['push']('ck-revision-history-sidebar__revision-author_creator');const _0x672bee=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x158d94,_0x4afe4d?'Revision\x20creator':'Revision\x20author')},'children':[_0x3678f4,_0x8d2024['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x41a551},'children':_0x672bee});}}function ni(_0x2fee14,_0x3f7f45){const _0x49800c=_0x2fee14['bindTemplate'],_0x3aa37c=_0x2fee14['locale'],_0x422bc9=_0x3dbdae(_0x3aa37c);_0x422bc9['panelPosition']='sw';const _0x4d898b=function(_0x4d6ccf,_0x3c3e59){const _0x470143=function(_0x2f7cfe,_0x4022bb){const _0x5df616=_0x2f7cfe['locale'],_0x4b311b={'Compare\x20against\x20selected':m(_0x5df616,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x5df616,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x5df616,'Restore\x20this\x20revision')};return _0x4022bb['map'](_0x1fa549=>{const _0x1e31c8=_0x4b311b[_0x1fa549['name']];return _0x1e31c8&&_0x1e31c8!==_0x1fa549['name']&&(_0x1fa549['name']=_0x1e31c8),_0x1fa549;});}(_0x4d6ccf,_0x3c3e59),_0x51492f=new _0x23661b();for(const _0x402324 of _0x470143){const _0x20311b={'type':'button','model':new to({'label':_0x402324['name'],'class':_0x402324['class'],'withText':!0x0,'role':'menuitem','_action':_0x402324['action']})};_0x20311b['model']['bind']('isEnabled')['to'](_0x4d6ccf,'isActionsDropdownOpen',_0x25cb55=>'function'!=typeof _0x402324['isEnabled']||(!_0x25cb55||_0x402324['isEnabled'](_0x4d6ccf))),_0x51492f['add'](_0x20311b);}return _0x51492f;}(_0x2fee14,_0x3f7f45);return _0x2fee14['bind']('isActionsDropdownOpen')['to'](_0x422bc9,'isOpen'),_0x422bc9['buttonView']['set']({'label':m(_0x3aa37c,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x34d699['threeVerticalDots']}),_0x422bc9['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x49800c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x49800c['to'](_0x5ef102=>_0x5ef102['stopPropagation']())}}),_0x422bc9['on']('execute',_0x189749=>{_0x2fee14['isReady']&&'function'==typeof _0x189749['source']['_action']&&_0x189749['source']['_action'](_0x2fee14);}),_0x37c010(_0x422bc9,_0x4d898b,{'role':'menu'}),_0x422bc9['listenTo'](_0x2fee14,'change:isActionsDropdownOpen',(_0x166f05,_0x456ae4,_0x1d52b3)=>{if(_0x1d52b3)for(const _0x2b1707 of _0x422bc9['listView']['items']){const _0x5ed166=_0x2b1707['children']['first'],_0x57e6fd=_0x3f7f45['find'](_0x13d1d6=>_0x13d1d6['action']===_0x5ed166['_action'])['isVisible'];_0x2b1707['isVisible']=void 0x0===_0x57e6fd||_0x57e6fd(_0x2fee14);}}),_0x422bc9;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x23f2b7,uid as _0x2db3ef,Collection as _0x3ba397,logWarning as _0xb0d668,FocusTracker as _0x4233b8,KeystrokeHandler as _0x5c227e,scrollViewportToShowTarget as _0x3a19dc,ResizeObserver as at,ElementReplacer as ht,CKEditorError as _0x45f2a2}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x19169d,set as _0x491b60,unset as _0x4c932b,isEqual as _0x16e6eb}from'lodash-es';import{Plugin as _0x4dc320,PendingActions as _0x4f631d,icons as _0x226698,Command as _0x170fd1,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0xcf566a,getMarkerDomElement as _0x37b12f,ConfirmMixin as _0x191d01,sanitizeEditorConfig as _0x152179}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x4b1649,Element as ft,Range as vt,ViewUIElement as _0x5d10d8,ViewRawElement as _0x357ba2,ViewEmptyElement as _0x514ad1,ViewAttributeElement as _0x5849eb,ViewContainerElement as _0x12f307,Position as gt,ViewText as _0x19a85b,ViewElement as _0x2eb06d,DocumentFragment as mt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as _0x3d574f,injectCssTransitionDisabler as ts,submitHandler as _0x58e7c1,LabeledFieldView as nt,createLabeledInputText as _0x49873d,createDropdown as _0x4942c4,ListView as te,ListItemView as _0x28d0b4,ButtonView as _0x5f20b0,MenuBarMenuView as _0x331eca,MenuBarMenuListView as _0x2e1e1b,MenuBarMenuListItemView as _0xd82488,MenuBarMenuListItemButtonView as _0x24d70c,ContextualBalloon as _0xf64d40,ToolbarSeparatorView as _0x3aa6f0,IconView as _0x33bffb,addListToDropdown as _0x38f049,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x42dc1c}from'luxon';class a extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x23f2b7(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x47e6af){super(),this['id']=_0x47e6af['id']||_0x2db3ef(),this['creator']=_0x47e6af['creator']||null,this['authors']=_0x47e6af['authors']||[],this['diffData']=_0x47e6af['diffData']||null,this['toVersion']=_0x47e6af['toVersion']||0x0,this['fromVersion']=_0x47e6af['fromVersion']||0x0,this['set']('name',_0x47e6af['name']||''),this['set']('createdAt',_0x47e6af['createdAt']||new Date()),this['set']('attributes',_0x47e6af['attributes']||{});}['setName'](_0x137ee8){this['_update']({'name':_0x137ee8});}['setAttribute'](_0x2e4815,_0x393a29){const _0x349c25=_0x19169d(this['attributes']);_0x491b60(_0x349c25,_0x2e4815,_0x393a29),this['_update']({'attributes':_0x349c25});}['removeAttribute'](_0x295e05){const _0x385789=_0x19169d(this['attributes']);_0x4c932b(_0x385789,_0x295e05),this['_update']({'attributes':_0x385789});}['_update'](_0x2b9e95,_0x361e56=!0x1){let _0xf03909=!0x1;const _0x5c781f={'id':this['id']},_0xc78ce=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x13fc8f of _0xc78ce){const _0x19d3c8=_0x2b9e95[_0x13fc8f];void 0x0!==_0x19d3c8&&_0x19d3c8!==this[_0x13fc8f]&&(this[_0x13fc8f]=_0x19d3c8,_0x5c781f[_0x13fc8f]=_0x19d3c8,_0xf03909=!0x0);}_0xf03909&&(_0x5c781f['authors']&&(_0x5c781f['authorsIds']=_0x5c781f['authors']['map'](_0x177394=>_0x177394['id']),delete _0x5c781f['authors']),this['fire']('_update',_0x5c781f,_0x361e56));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4e63a5=>_0x4e63a5['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x4dc320{['_revisions'];static get['requires'](){return[_0xcf566a];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x85ca1){super(_0x85ca1),this['_revisions']=new _0x3ba397();}['afterInit'](){!async function(_0x1030c5){const _0x2d63da=_0x106779([0x78,0x70,0x6b,0x65,0x42,0x6e,0x46,0x6c,0x75,0x38,0x57,0x52,0x76,0x74,0x72,0x69,0x7a,0x36,0x4f,0x55,0x34,0x67,0x79,0x35,0x41,0x50,0x4b,0x37,0x71,0x43,0x56,0x73,0x45,0x4a,0x6a,0x54,0x33,0x51,0x47,0x31,0x61,0x63,0x48,0x62,0x32,0x4c,0x49,0x68,0x44,0x66,0x53,0x6f,0x30,0x4e,0x6d,0x64,0x58,0x5a,0x59,0x39,0x77,0x4d]),_0x1905d9=0xeb829,_0x38550e=0x3bd43979,_0x104ea8=0x3bd367f1^_0x38550e,_0x38d0e0=window[_0x106779([0x44,0x61,0x74,0x65])][_0x106779([0x6e,0x6f,0x77])](),_0x4973d2=_0x1030c5[_0x106779([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1878a5=new window[(_0x106779([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53a109=>{_0x4973d2[_0x106779([0x6f,0x6e,0x63,0x65])](_0x106779([0x72,0x65,0x61,0x64,0x79]),_0x53a109);}),_0x13e645={[_0x106779([0x6b,0x74,0x79])]:_0x106779([0x45,0x43]),[_0x106779([0x75,0x73,0x65])]:_0x106779([0x73,0x69,0x67]),[_0x106779([0x63,0x72,0x76])]:_0x106779([0x50,0x2d,0x32,0x35,0x36]),[_0x106779([0x78])]:_0x106779([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]),[_0x106779([0x79])]:_0x106779([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]),[_0x106779([0x61,0x6c,0x67])]:_0x106779([0x45,0x53,0x32,0x35,0x36])},_0x4166e1=_0x4973d2[_0x106779([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x106779([0x67,0x65,0x74])](_0x106779([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2a262a(){let _0x136f5b,_0x2d6706=null,_0x230065=null;try{if(_0x4166e1==_0x106779([0x47,0x50,0x4c]))return _0x106779([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x136f5b=_0x58da00(),!_0x136f5b)return _0x106779([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x136f5b[_0x106779([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x230065=_0x398b84(_0x136f5b[_0x106779([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x136f5b[_0x106779([0x6a,0x74,0x69])])),await _0x47a9d5()?_0x3b4a30()?_0x20179c()?_0x106779([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xdc65a4()?(_0x136f5b[_0x106779([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x106779([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2d6706=_0x595a6b(_0x106779([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x136f5b[_0x106779([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x106779([0x74,0x72,0x69,0x61,0x6c])&&(_0x2d6706=_0x595a6b(_0x106779([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x10ffc3()):_0x106779([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x106779([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x106779([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x63e9c8){return _0x106779([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x20179c(){const _0x6dba2c=[_0x106779([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x106779([0x74,0x72,0x69,0x61,0x6c])][_0x106779([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x136f5b[_0x106779([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x38d0e0/0x3e8:0xe10*_0x104ea8;return _0x136f5b[_0x106779([0x65,0x78,0x70])]<_0x6dba2c;}function _0x3b4a30(){const _0x406570=_0x136f5b[_0x106779([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x406570)return!0x1;if(_0x406570[_0x106779([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x106779([0x2a])))return!0x0;if(_0x406570[_0x106779([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x106779([0x52,0x48])))return!0x0;if(_0x406570[_0x106779([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x106779([0x52,0x52,0x48]))){if(_0x2170d0())return!0x0;if(_0x25bb49()||_0x574c26())return!0x0;}return!0x1;}function _0xdc65a4(){const _0xec576e=_0x136f5b[_0x106779([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xec576e||0x0==_0xec576e[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x12a80f}=new URL(window[_0x106779([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xec576e[_0x106779([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12a80f))return!0x0;const _0x327f66=_0x12a80f[_0x106779([0x73,0x70,0x6c,0x69,0x74])](_0x106779([0x2e]));return _0xec576e[_0x106779([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x401c9b=>_0x401c9b[_0x106779([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x106779([0x2a])))[_0x106779([0x6d,0x61,0x70])](_0x34d996=>_0x34d996[_0x106779([0x73,0x70,0x6c,0x69,0x74])](_0x106779([0x2e])))[_0x106779([0x73,0x6f,0x6d,0x65])](_0x2366d9=>_0x327f66[_0x106779([0x65,0x76,0x65,0x72,0x79])]((_0x515865,_0x138121)=>_0x2366d9[_0x138121]===_0x515865||_0x2366d9[_0x138121]===_0x106779([0x2a])));}function _0x10ffc3(){return _0x2d6706&&_0x230065?new window[(_0x106779([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2f4921,_0x237ca5)=>{_0x2d6706[_0x106779([0x74,0x68,0x65,0x6e])](_0x2f4921,_0x237ca5),_0x230065[_0x106779([0x74,0x68,0x65,0x6e])](_0x3944b9=>{_0x3944b9!=_0x106779([0x56,0x61,0x6c,0x69,0x64])&&_0x2f4921(_0x3944b9);},_0x237ca5);}):_0x2d6706||_0x230065||_0x106779([0x56,0x61,0x6c,0x69,0x64]);}}function _0x398b84(_0x3f8491,_0x2fa215){return new window[(_0x106779([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x11edda=>{if(_0x34c386())return _0x11edda(_0x106779([0x56,0x61,0x6c,0x69,0x64]));_0xf47841(),_0x4973d2[_0x106779([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x106779([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x971dc9=!0x1;const _0x3ce72c=_0x2db3ef();function _0x7db619(_0x4c6488){return!!_0x4c6488&&(typeof _0x4c6488===_0x106779([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4c6488===_0x106779([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4c6488[_0x106779([0x74,0x68,0x65,0x6e])]===_0x106779([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4c6488[_0x106779([0x63,0x61,0x74,0x63,0x68])]===_0x106779([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5e1662(_0x230d53){_0x2621c9(_0x230d53)[_0x106779([0x74,0x68,0x65,0x6e])](_0x24b793=>{if(!_0x24b793||_0x24b793[_0x106779([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x106779([0x6f,0x6b]))return _0x106779([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x17958f(_0x344240(_0x3ce72c+_0x2fa215))!=_0x24b793[_0x106779([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x106779([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x106779([0x56,0x61,0x6c,0x69,0x64]);})[_0x106779([0x74,0x68,0x65,0x6e])](_0x98aa05=>(_0x14180e(),_0x98aa05),()=>{const _0x39e428=_0x11936b();return null==_0x39e428?(_0x14180e(),_0x106779([0x56,0x61,0x6c,0x69,0x64])):_0x106779(_0x38d0e0-_0x39e428>(0x1fd8bd79^_0x38550e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x106779([0x74,0x68,0x65,0x6e])](_0x11edda)[_0x106779([0x63,0x61,0x74,0x63,0x68])](()=>{_0x11edda(_0x106779([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x27cbb7=0x3be2d7f9^_0x38550e;function _0x14180e(){const _0x438765=_0x106779([0x6c,0x6c,0x63,0x74,0x2d])+_0x17958f(_0x344240(_0x3f8491)),_0x1159ab=_0x164646(_0x17958f(window[_0x106779([0x4d,0x61,0x74,0x68])][_0x106779([0x63,0x65,0x69,0x6c])](_0x38d0e0/_0x27cbb7)));window[_0x106779([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x106779([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x438765,_0x1159ab);}function _0x11936b(){const _0x2ab5f1=_0x106779([0x6c,0x6c,0x63,0x74,0x2d])+_0x17958f(_0x344240(_0x3f8491)),_0x57221f=window[_0x106779([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x106779([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2ab5f1);return _0x57221f?window[_0x106779([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x164646(_0x57221f),0x10)*_0x27cbb7:null;}function _0x2621c9(_0x40548c){return new window[(_0x106779([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2897fc,_0x9bac54)=>{_0x40548c[_0x106779([0x74,0x68,0x65,0x6e])](_0x2897fc,_0x9bac54),window[_0x106779([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x9bac54,0x3bd5edb9^_0x38550e);});}}_0x4973d2[_0x106779([0x6f,0x6e])](_0x106779([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x289877,_0x471660)=>{if(_0x471660[0x0]!=_0x3f8491)return _0x11edda(_0x106779([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x471660[0x1]={..._0x471660[0x1],[_0x106779([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3ce72c};},{[_0x106779([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x106779([0x68,0x69,0x67,0x68])}),_0x4973d2[_0x106779([0x6f,0x6e])](_0x106779([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x22365c=>{_0x7db619(_0x22365c[_0x106779([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x971dc9=!0x0,_0x5e1662(_0x22365c[_0x106779([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x106779([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x106779([0x6c,0x6f,0x77])}),_0x1878a5[_0x106779([0x74,0x68,0x65,0x6e])](()=>{_0x971dc9||_0x11edda(_0x106779([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x34c386(){return _0x4973d2[_0x106779([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x106779([0x76,0x69,0x65,0x77])][_0x106779([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x106779([0x61,0x75,0x74,0x6f]);}function _0xf47841(){_0x4973d2[_0x106779([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x106779([0x76,0x69,0x65,0x77])][_0x106779([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x106779([0x61,0x75,0x74,0x6f]);}}function _0x595a6b(_0x48f772){const _0x2dbaa1=[new window[(_0x106779([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c3f50=>setTimeout(_0x4c3f50,0x3bdd07b5^_0x38550e)),_0x1878a5[_0x106779([0x74,0x68,0x65,0x6e])](()=>new window[(_0x106779([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e5975=>{const _0x37e4a2=0x3bd4397e^_0x38550e,_0x340092=_0x1030c5[_0x106779([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x18eb29(){_0x340092[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x37e4a2&&_0x2e5975();}_0x18eb29(),_0x340092[_0x106779([0x6f,0x6e])](_0x106779([0x61,0x64,0x64]),_0x18eb29);})),new window[(_0x106779([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3cb12b=>{function _0x7239b1(){for(const _0x2bf938 in window)if(window[_0x106779([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x106779([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2bf938))&&window[_0x2bf938]==_0x1905d9)return _0x3cb12b();_0x4973d2[_0x106779([0x73,0x74,0x61,0x74,0x65])]!=_0x106779([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x106779([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x7239b1,0x3bd42af1^_0x38550e);}_0x39d562(_0x106779([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x7239b1();})];return window[_0x106779([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x106779([0x72,0x61,0x63,0x65])](_0x2dbaa1)[_0x106779([0x74,0x68,0x65,0x6e])](()=>_0x48f772);}async function _0x1c0dae(){if(await _0x1878a5,_0x39d562(_0x106779([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x6f7b2d=_0x1030c5[_0x106779([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x557ff3=_0x1030c5[_0x106779([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])](_0x6f7b2d[_0x106779([0x69,0x64])]),_0x3a6f89=_0x42f663(_0x106779([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3a6f89[_0x106779([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x6f7b2d['id'],_0x557ff3?_0x557ff3['id']:null,!0x0),_0x3a6f89[_0x106779([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x106779([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3a6f89[_0x106779([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3a6f89[_0x106779([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x10a1a7,void(_0x3a6f89[_0x106779([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x10a1a7);}if(_0x39d562(_0x106779([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0xe0b22d=_0x42f663(_0x106779([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0xe0b22d[_0x106779([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x106779([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0xe0b22d[_0x106779([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0xe0b22d[_0x106779([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x10a1a7,_0xe0b22d[_0x106779([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x10a1a7;}_0x4973d2[_0x106779([0x6d,0x6f,0x64,0x65,0x6c])][_0x106779([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x10a1a7,_0x4973d2[_0x106779([0x6d,0x6f,0x64,0x65,0x6c])][_0x106779([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x10a1a7,_0x4973d2[_0x106779([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x106779([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2170d0(){return _0x39d562(_0x106779([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x42f663(_0x106779([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x106779([0x73,0x74,0x61,0x74,0x65])]==_0x106779([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x25bb49(){return _0x39d562(_0x106779([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 _0x574c26(){return _0x39d562(_0x106779([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x7a3598(_0x262c68){const _0x6a872c=_0x427d53();_0x4973d2[_0x6a872c]=_0x106779([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])+_0x262c68,_0x262c68[_0x106779([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x106779([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x427d53()]=_0x1905d9),_0x262c68!=_0x106779([0x56,0x61,0x6c,0x69,0x64])&&_0x1c0dae();}function _0x427d53(){const _0x3d528f=window[_0x106779([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x106779([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x106779([0x6e,0x6f,0x77])]())[_0x106779([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x106779([0x2e]),'');let _0xeea45e=_0x106779([0x78]);for(let _0x7c6dde=0x0;_0x7c6dde<_0x3d528f[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x7c6dde+=0x2){let _0x164d49=window[_0x106779([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3d528f[_0x106779([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x7c6dde,_0x7c6dde+0x2));_0x164d49>=_0x2d63da[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x164d49-=_0x2d63da[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xeea45e+=_0x2d63da[_0x164d49];}return _0xeea45e;}function _0x58da00(){const _0x493cfc=_0x4166e1[_0x106779([0x73,0x70,0x6c,0x69,0x74])](_0x106779([0x2e]));if(0x3!=_0x493cfc[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4ac622(_0x493cfc[0x1]);function _0x4ac622(_0x1d430e){const _0x3f2fb3=_0x46aa4e(_0x1d430e);return _0x3f2fb3&&_0x204595()?_0x3f2fb3:null;function _0x204595(){const _0x21946d=_0x3f2fb3[_0x106779([0x6a,0x74,0x69])],_0x2f56ee=window[_0x106779([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x21946d[_0x106779([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x21946d[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x8aaebf={..._0x3f2fb3,[_0x106779([0x6a,0x74,0x69])]:_0x21946d[_0x106779([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x21946d[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x8aaebf[_0x106779([0x76,0x63])],_0x344240(_0x8aaebf)==_0x2f56ee;}}}async function _0x47a9d5(){let _0x1e8dad=!0x0;try{const _0xd73c3b=_0x4166e1[_0x106779([0x73,0x70,0x6c,0x69,0x74])](_0x106779([0x2e])),[_0x3a96ce,_0x50a53b,_0x380841]=_0xd73c3b;return _0x360c9c(_0x3a96ce),await _0x40369e(_0x3a96ce,_0x50a53b,_0x380841),_0x1e8dad;}catch(_0x2538b2){return!0x1;}function _0x360c9c(_0x5418d4){const _0x2f4f5c=_0x46aa4e(_0x5418d4);_0x2f4f5c&&_0x2f4f5c[_0x106779([0x61,0x6c,0x67])]==_0x106779([0x45,0x53,0x32,0x35,0x36])||(_0x1e8dad=!0x1);}async function _0x40369e(_0x15e179,_0x58d7ba,_0x3fa5fa){const _0x175d87=window[_0x106779([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x106779([0x66,0x72,0x6f,0x6d])](_0x1c5990(_0x3fa5fa),_0x42b166=>_0x42b166[_0x106779([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x458eee=new window[(_0x106779([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x106779([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x15e179+_0x106779([0x2e])+_0x58d7ba),_0x3bdb12=window[_0x106779([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x106779([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3bdb12)return;const _0xc6b602=await _0x3bdb12[_0x106779([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x106779([0x6a,0x77,0x6b]),_0x13e645,{[_0x106779([0x6e,0x61,0x6d,0x65])]:_0x106779([0x45,0x43,0x44,0x53,0x41]),[_0x106779([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x106779([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x106779([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3bdb12[_0x106779([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x106779([0x6e,0x61,0x6d,0x65])]:_0x106779([0x45,0x43,0x44,0x53,0x41]),[_0x106779([0x68,0x61,0x73,0x68])]:{[_0x106779([0x6e,0x61,0x6d,0x65])]:_0x106779([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xc6b602,_0x175d87,_0x458eee)||(_0x1e8dad=!0x1);}}function _0x46aa4e(_0x403a05){return _0x403a05[_0x106779([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x106779([0x65,0x79]))?JSON[_0x106779([0x70,0x61,0x72,0x73,0x65])](_0x1c5990(_0x403a05)):null;}function _0x1c5990(_0x42b944){return window[_0x106779([0x61,0x74,0x6f,0x62])](_0x42b944[_0x106779([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x106779([0x2b]))[_0x106779([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x106779([0x2f])));}function _0x344240(_0x1d6976){let _0xc16dba=0x1505;function _0x25f028(_0x30b42f){for(let _0x3cdb7b=0x0;_0x3cdb7b<_0x30b42f[_0x106779([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3cdb7b++){const _0x271d57=_0x30b42f[_0x106779([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3cdb7b);_0xc16dba=(_0xc16dba<<0x5)+_0xc16dba+_0x271d57,_0xc16dba&=_0xc16dba;}}function _0x5e4b47(_0x264830){Array[_0x106779([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x264830)?_0x264830[_0x106779([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5e4b47):_0x264830&&typeof _0x264830==_0x106779([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x106779([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x264830)[_0x106779([0x73,0x6f,0x72,0x74])]()[_0x106779([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2f6693,_0x33d081])=>{_0x25f028(_0x2f6693),_0x5e4b47(_0x33d081);}):_0x25f028(window[_0x106779([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x264830));}return _0x5e4b47(_0x1d6976),_0xc16dba>>>0x0;}function _0x17958f(_0x327efa){return _0x327efa[_0x106779([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x106779([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x106779([0x30]));}function _0x164646(_0x3825ae){return _0x3825ae[_0x106779([0x73,0x70,0x6c,0x69,0x74])]('')[_0x106779([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x106779([0x6a,0x6f,0x69,0x6e])]('');}function _0x39d562(_0x406485){return _0x4973d2[_0x106779([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x106779([0x68,0x61,0x73])](_0x406485);}function _0x42f663(_0x4bfb55){return _0x4973d2[_0x106779([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x106779([0x67,0x65,0x74])](_0x4bfb55);}function _0x10a1a7(){}function _0x106779(_0x65a266){return _0x65a266['map'](_0xe8c840=>String['fromCharCode'](_0xe8c840))['join']('');}_0x7a3598(await _0x2a262a());}(this);}['createRevision'](_0x4e4712){const _0x216046=this['editor']['plugins']['get']('Users');return new a({'id':_0x4e4712['id'],'name':_0x4e4712['name'],'creator':_0x4e4712['creatorId']?_0x216046['getUser'](_0x4e4712['creatorId']):null,'diffData':_0x4e4712['diffData']||_0x4e4712['data'],'authors':_0x4e4712['authorsIds']['map'](_0x48b4c4=>_0x216046['getUser'](_0x48b4c4)),'createdAt':new Date(_0x4e4712['createdAt']),'attributes':_0x4e4712['attributes'],'fromVersion':_0x4e4712['fromVersion'],'toVersion':_0x4e4712['toVersion']});}['addRevision'](_0x58caee,_0x4aaafa=0x0){this['_revisions']['add'](_0x58caee,_0x4aaafa);}['getRevision'](_0x1db5f2){return this['_revisions']['get'](_0x1db5f2);}['getRevisions'](_0x3ccfb0={'toJSON':!0x1}){const _0x39de1d=Array['from'](this['_revisions']);return _0x39de1d['reverse'](),_0x3ccfb0['toJSON']?_0x39de1d['map'](_0x1acd93=>_0x1acd93['toJSON']()):_0x39de1d;}['getIndex'](_0x54ef6f){return this['_revisions']['getIndex'](_0x54ef6f);}['getEarlierVisibleRevision'](_0x29351b){const [,_0x23e75f]=this['getRevisionsIterator'](_0x29351b,{'direction':'earlier'});return _0x23e75f;}['getLaterVisibleRevision'](_0x4c7b49){const [,_0x5da032]=this['getRevisionsIterator'](_0x4c7b49,{'direction':'later'});return _0x5da032;}['getRevisionsInDiff'](_0x1db297){const _0x52e083=[];for(const _0x2d68db of this['getRevisionsIterator'](_0x1db297['newRevisionId']))if(_0x52e083['push'](_0x2d68db),_0x2d68db['id']===_0x1db297['oldRevisionId'])break;return _0x52e083;}*['getRevisionsIterator'](_0x45d3ab,{direction:_0x5de911='earlier',filter:_0x3ac3b9=()=>!0x0}={}){const _0x290e5b='earlier'===_0x5de911?0x1:-0x1;let _0x1aed9b=this['_revisions']['get'](_0x45d3ab),_0xc826a3=this['getIndex'](_0x1aed9b);for(yield _0x1aed9b;_0x1aed9b;){if(_0xc826a3+=_0x290e5b,_0x1aed9b=this['getRevision'](_0xc826a3),!_0x1aed9b)return;_0x3ac3b9(_0x1aed9b)&&(yield _0x1aed9b);}}}function m(_0x115fab,_0x26e5fd,_0x3460e7){const t=_0x115fab['t'];switch(_0x26e5fd){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'},_0x3460e7);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3460e7);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'';}}const P={'c':_0x12f307,'a':_0x5849eb,'e':_0x514ad1,'r':_0x357ba2,'u':_0x5d10d8};class l extends _0x4dc320{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xcf566a,j,_0x4f631d];}constructor(_0x49bb79){super(_0x49bb79),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x20f975=_0x2db3ef();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x20f975},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['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x507021=this['repository']['getRevision'](0x0),_0x54de58=_0x507021&&null===_0x507021['creator']?_0x507021:null;if(this['_continueCurrentRevision']=!!_0x54de58&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x39f630=this['_source']['getCurrentRevisionId'](),_0x3aaf59=this['repository']['getRevision'](_0x39f630);if(_0x3aaf59)this['_startingVersion']=_0x3aaf59['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3a8b9c=this['_source']['history']['_operations']['find'](_0x509034=>!_0x509034['_isInit']),_0x40013d=_0x3a8b9c?_0x3a8b9c['baseVersion']:this['_source']['history']['version'];_0x507021?(_0x507021['toVersion']<_0x40013d&&_0x507021['_update']({'toVersion':_0x40013d}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x54de58['id'],this['_startingVersion']=_0x54de58['fromVersion']):(this['_startingVersion']=_0x507021['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x40013d,this['_continueCurrentRevision']=!0x1);}}else _0x54de58&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x54de58['toVersion'],this['editor']['model']['document']['history']['version']),_0x54de58['fromVersion']===_0x54de58['toVersion']?(0x0!==_0x54de58['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x54de58['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x54de58['id'],this['_startingVersion']=_0x54de58['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',_0x3f39c8=>!_0x3f39c8),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x474c03=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x42383e;for(const _0x2fba93 in _0x474c03){const _0x5c3a60=_0x2fba93,_0x203d63=_0x474c03[_0x5c3a60];if('revisionHistoryLicenseKeyValid'==_0x203d63||'revisionHistoryLicenseKeyInvalid'==_0x203d63||'revisionHistoryLicenseKeyExpired'==_0x203d63||'revisionHistoryLicenseKeyDomainLimit'==_0x203d63||'revisionHistoryLicenseKeyNotAllowed'==_0x203d63||'revisionHistoryLicenseKeyEvaluationLimit'==_0x203d63||'revisionHistoryLicenseKeyTrialLimit'==_0x203d63||'revisionHistoryLicenseKeyUsageLimit'==_0x203d63){delete _0x474c03[_0x5c3a60],_0x42383e=_0x203d63,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x42383e&&_0x474c03['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x42383e&&_0x474c03['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x42383e&&_0x474c03['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x42383e&&_0x474c03['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x42383e&&_0x474c03['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x42383e&&_0x474c03['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x42383e&&_0x474c03['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0xc7cd6d=this['repository']['getRevision'](0x0),_0x3eb8aa=await this['getRevisionDocumentData'](_0xc7cd6d),_0x1d186a=await this['getRevisionRootsAttributes'](_0xc7cd6d);this['_replaceEditorDataWithRevisionData'](_0x3eb8aa,_0x1d186a);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3421fa){this['_source']=_0x3421fa;}async['update'](){const _0x30450c=await this['_source']['getLatestVersion']();if(_0x30450c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x56793d=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x30450c});_0x56793d['authors']=_0x56793d['authorsIds']['map'](_0x3015f8=>this['editor']['plugins']['get']('Users')['getUser'](_0x3015f8)),this['currentRevision']['_update'](_0x56793d);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x41f00d={},_0x4556e7=null){const _0x5025a8=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x4556e7>this['currentRevision']['toVersion']&&(_0x4556e7=null),null===_0x4556e7&&(_0x4556e7=await this['_source']['getLatestVersion']());const _0x12d4e0=this['_getFromVersion'](_0x4556e7),_0x3214f2=this['buildRevisionData']({'from':_0x12d4e0,'to':_0x4556e7});if(this['currentRevision']['toVersion']<_0x4556e7){const _0x5bc25c=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x4556e7,'to':_0x4556e7});_0x5bc25c['authors']=[],_0x5bc25c['authorsIds']=[],_0x5bc25c['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x5bc25c,!0x0),delete _0x5bc25c['authors'],_0x5025a8['push'](_0x5bc25c);}_0x41f00d['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x41f00d['name']=_0x41f00d['name']||null,_0x41f00d['id']=_0x41f00d['id']||_0x2db3ef(),_0x41f00d={..._0x41f00d,..._0x3214f2};const _0x5772df=this['addRevisionData'](_0x41f00d);_0x5025a8['push'](_0x41f00d);const _0x588a6b=this['repository']['getIndex'](_0x5772df);if(0x0!==_0x588a6b){const _0x547d5d=this['repository']['getRevision'](_0x588a6b-0x1);if(_0x547d5d['fromVersion']!==_0x4556e7){const _0x14b58e=this['_revisionDataBuilder']['getData'](_0x4556e7,_0x547d5d['toVersion']),_0x38119f={'id':_0x547d5d['id'],'diffData':_0x14b58e['diffData'],'authorsIds':_0x14b58e['authorsIds'],'authors':_0x14b58e['authorsIds']['map'](_0x2e8748=>this['editor']['plugins']['get']('Users')['getUser'](_0x2e8748)),'fromVersion':_0x4556e7};_0x547d5d===this['currentRevision']&&(_0x38119f['createdAt']=new Date(_0x41f00d['createdAt']['getTime']()+0xa)),_0x547d5d['_update'](_0x38119f,!0x0),delete _0x38119f['authors'],_0x5025a8['push'](_0x38119f);}}if(this['adapter']){for(const _0x4cfbf4 of _0x5025a8)this['_bufferUpdate'](_0x4cfbf4['id'],_0x4cfbf4,!0x0);this['sendBufferedUpdates']();}return _0x5772df;}['addRevisionData'](_0x56a8db){const _0x129b71=this['repository']['createRevision'](_0x56a8db);return this['adapter']&&_0x129b71['on']('_update',(_0x43b155,_0x335443,_0x3e83f1)=>{_0x3e83f1||(this['_bufferUpdate'](_0x335443['id'],_0x335443,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x129b71,this['_findInsertionIndex'](_0x129b71)),_0x129b71;}async['getRevisionDocumentData'](_0x369cc3){await this['_loadRevisionData'](_0x369cc3);const _0x12dd7c={};for(const _0x4eb4ca in _0x369cc3['diffData']){if(_0x369cc3['diffData'][_0x4eb4ca]['attachChange']&&!_0x369cc3['diffData'][_0x4eb4ca]['attachChange']['isAttached'])continue;const _0x3dc488=this['_removeRevisionMarkers'](JSON['parse'](_0x369cc3['diffData'][_0x4eb4ca]['insertions'])),_0x153607=this['editor']['editing']['view']['document'],_0x3d2ebf=new _0x4b1649(_0x153607,_0x3dc488['map'](_0x232693=>C(_0x232693,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x12dd7c[_0x4eb4ca]=this['editor']['data']['processor']['toData'](_0x3d2ebf),this['editor']['data']['processor']['useFillerType']('default');}return _0x12dd7c;}async['getRevisionRootsAttributes'](_0x5b35e2){await this['_loadRevisionData'](_0x5b35e2);const _0x519b80={};for(const _0x56327a in _0x5b35e2['diffData'])_0x5b35e2['diffData'][_0x56327a]['attachChange']&&!_0x5b35e2['diffData'][_0x56327a]['attachChange']['isAttached']||(_0x519b80[_0x56327a]=_0x5b35e2['diffData'][_0x56327a]['attributesAfter']||{});return _0x519b80;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x41f620=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1eb313=0x0;_0x1eb313<_0x41f620['length'];_0x1eb313++){const _0x48daa8=_0x41f620[_0x1eb313];let _0x5948c5=!0x1;for(const _0x42803c of Object['keys'](_0x48daa8))void 0x0===_0x48daa8[_0x42803c]?delete _0x48daa8[_0x42803c]:'id'!==_0x42803c&&(_0x5948c5=!0x0);_0x5948c5||(_0x41f620[_0x1eb313]=null);}if(_0x41f620=_0x41f620['filter'](_0x3c2365=>null!==_0x3c2365),!_0x41f620['length'])return;for(let _0x215d55=0x0;_0x215d55<_0x41f620['length'];_0x215d55++){const _0x266eff=_0x41f620[_0x215d55];void 0x0!==_0x266eff['fromVersion']&&void 0x0===_0x266eff['toVersion']&&(_0x266eff['toVersion']=this['repository']['getRevision'](_0x266eff['id'])['toVersion']),void 0x0!==_0x266eff['toVersion']&&void 0x0===_0x266eff['fromVersion']&&(_0x266eff['fromVersion']=this['repository']['getRevision'](_0x266eff['id'])['fromVersion']);}const _0x4cc29a=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x41f620,_0x4cc29a)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2d0d58=>{if(_0x2d0d58){for(const _0x254c80 of _0x2d0d58)this['setRevisionData']({'id':_0x254c80['id'],'createdAt':_0x254c80['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x5861a7,_0x5d555f){let _0x38ff4d=this['editor']['config']['get']('initialData'),_0x57e3df=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x38ff4d){_0x38ff4d={};for(const _0x172d7e of this['editor']['model']['document']['getRootNames']())_0x38ff4d[_0x172d7e]='';}if('string'==typeof _0x38ff4d&&(_0x38ff4d={'main':_0x38ff4d}),void 0x0===_0x57e3df){_0x57e3df={};for(const _0x422f7a of this['editor']['model']['document']['getRootNames']())_0x57e3df[_0x422f7a]={};}let _0x1f2548=!0x1;const _0x3b93c3=Object['keys'](_0x38ff4d),_0x2b2ab3=Object['keys'](_0x5861a7);for(const _0x1c7411 of _0x3b93c3){if(_0x38ff4d[_0x1c7411]!==_0x5861a7[_0x1c7411]&&''!==_0x38ff4d[_0x1c7411]['trim']()){_0x1f2548=!0x0;break;}if(!_0x16e6eb(_0x57e3df[_0x1c7411],_0x5d555f[_0x1c7411])&&Object['keys'](_0x57e3df[_0x1c7411])['length']>0x0){_0x1f2548=!0x0;break;}}_0x1f2548||(_0x1f2548=_0x2b2ab3['some'](_0xa1f083=>!this['editor']['model']['document']['getRoot'](_0xa1f083))),_0x1f2548&&_0xb0d668('editor-initial-data-replaced-with-revision-data',{'editorData':_0x38ff4d,'editorRootsAttributes':_0x57e3df,'revisionData':_0x5861a7,'revisionRootsAttributes':_0x5d555f}),this['editor']['config']['set']('initialData',_0x5861a7),this['editor']['config']['set']('rootsAttributes',_0x5d555f);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5e649b=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5e649b['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4d9192){const _0x33cdec=this['repository']['getRevisions']();_0x33cdec['reverse']();let _0x49ec7c=0x0;for(;_0x49ec7c<_0x33cdec['length'];){const _0x12ecde=_0x33cdec[_0x49ec7c];if(_0x12ecde===this['currentRevision']){_0x49ec7c++;continue;}if(_0x12ecde['id']===this['_initialRevisionId'])break;const _0x29a456=_0x4d9192['toVersion']-_0x12ecde['toVersion']||_0x4d9192['fromVersion']-_0x12ecde['fromVersion'];if(_0x29a456>0x0)break;if(_0x29a456<0x0)_0x49ec7c++;else{if(!_0x4d9192['creator']&&_0x12ecde['creator'])break;if(_0x12ecde['creator']||!_0x4d9192['creator']){if(_0x4d9192['createdAt']>_0x12ecde['createdAt'])break;_0x49ec7c++;}else _0x49ec7c++;}}return _0x49ec7c;}['setRevisionData'](_0x42fce0){const _0x16b192=this['repository']['getRevision'](_0x42fce0['id']);if(_0x42fce0['createdAt']&&(_0x42fce0['createdAt']=new Date(_0x42fce0['createdAt'])),_0x42fce0['authorsIds']){const _0x1f7515=this['editor']['plugins']['get']('Users');_0x42fce0['authors']=_0x42fce0['authorsIds']['map'](_0x4f569a=>_0x1f7515['getUser'](_0x4f569a));}_0x16b192['_update'](_0x42fce0,!0x0);}['buildRevisionData']({revision:_0x31b616=null,from:_0x2ff3dd=null,to:_0x1d6e7b=null}){_0x2ff3dd=null!==_0x2ff3dd?_0x2ff3dd:_0x31b616['fromVersion'],_0x1d6e7b=null!==_0x1d6e7b?_0x1d6e7b:_0x31b616['toVersion'];const _0x2cc757=this['_revisionDataBuilder']['getData'](_0x2ff3dd,_0x1d6e7b),_0x3a4559={'diffData':_0x2cc757['diffData'],'authorsIds':_0x2cc757['authorsIds'],'fromVersion':_0x2ff3dd,'toVersion':_0x1d6e7b};if(!_0x31b616||_0x1d6e7b!==_0x31b616['toVersion']){const _0x10e255=_0x1d6e7b-0x1,_0x4d104c=this['_source']['history']['getOperation'](_0x10e255);_0x3a4559['createdAt']=_0x4d104c&&_0x4d104c['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2ff3dd===this['_loadedStateData']['fromVersion']){for(const _0x4794f5 of this['_loadedStateData']['authors'])_0x3a4559['authorsIds']['includes'](_0x4794f5['id'])||_0x3a4559['authorsIds']['push'](_0x4794f5['id']);}return _0x3a4559;}['_loadRevisionData'](_0x41a607){if(!_0x41a607||_0x41a607['diffData'])return Promise['resolve']();{const _0x511dfb=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x511dfb,'revisionId':_0x41a607['id']})['then'](_0x25d7ac=>{_0x41a607['diffData']=_0x25d7ac['diffData'];});}}['_bufferUpdate'](_0x38e6f3,_0x2cfcfc,_0x38a199){if(this['_bufferedUpdates']['has'](_0x38e6f3)){const _0xc10387=this['_bufferedUpdates']['get'](_0x38e6f3);_0x2cfcfc=_0x38a199?{..._0xc10387,..._0x2cfcfc}:{..._0x2cfcfc,..._0xc10387};}this['_bufferedUpdates']['set'](_0x38e6f3,_0x2cfcfc);}['_getFromVersion'](_0x4fc60d){const _0x397824=this['repository']['getRevisions']();_0x397824['reverse'](),_0x397824['shift']();const _0x10327b=_0x397824['find'](_0x5f2699=>_0x5f2699['toVersion']<=_0x4fc60d)['toVersion'];return _0x10327b<this['_startingVersion']?this['_startingVersion']:_0x10327b;}['_createInitialRevision'](_0x3d7974){const _0x3268fd=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3268fd)this['_initialRevisionId']=_0x3268fd['id'];else{const _0x586787=!this['editor']['model']['document']['roots']['find'](_0x5c56e5=>this['editor']['model']['hasContent'](_0x5c56e5)),_0x3196d3=this['editor']['plugins']['get']('Users')['me']['id'],_0x49d50f=m(this['editor']['locale'],_0x586787?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3d7974,'to':_0x3d7974,'id':this['_initialRevisionId'],'name':_0x49d50f,'creatorId':_0x3196d3});}}['_createCurrentRevision'](_0x4eff9c){const _0x269c9b=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x269c9b),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4eff9c,'to':_0x4eff9c,'id':_0x269c9b,'name':'','creatorId':null}));}['_makeRevision']({name:_0x2b2f1c,from:_0x355315,to:_0x1fa149,creatorId:_0x22d6ed,id:_0x2bc682}){const _0x2f35cb=this['buildRevisionData']({'from':_0x355315,'to':_0x1fa149});_0x2f35cb['name']=_0x2b2f1c,_0x2f35cb['creatorId']=_0x22d6ed,_0x2f35cb['id']=_0x2bc682;const _0xb7d68f=this['addRevisionData'](_0x2f35cb);return this['adapter']&&this['_bufferUpdate'](_0x2f35cb['id'],_0x2f35cb,!0x0),_0xb7d68f;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x5c2baa){return(_0x5c2baa=_0x5c2baa['filter'](_0x45ce69=>!_0x45ce69['name']||'revision-start'!==_0x45ce69['name']&&'revision-end'!==_0x45ce69['name']))['forEach'](_0xd43af2=>{'string'!=typeof _0xd43af2&&(_0xd43af2['children']=this['_removeRevisionMarkers'](_0xd43af2['children']),_0xd43af2['attributes']=_0xd43af2['attributes']['filter'](_0xe89767=>!_0xe89767[0x0]['startsWith']('data-revision-')));}),_0x5c2baa;}}function C(_0x50d92b,_0x468dce){const _0x5b8552=_0x468dce['editing']['view']['document'];if('string'==typeof _0x50d92b)return new _0x19a85b(_0x5b8552,_0x50d92b);{const _0x23adde=_0x50d92b['children']['map'](_0xdd2d0e=>C(_0xdd2d0e,_0x468dce));return new(P[_0x50d92b['type']]||_0x2eb06d)(_0x5b8552,_0x50d92b['name'],_0x50d92b['attributes'],_0x23adde);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x87dbae){this['editor']=_0x87dbae,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'](_0xaea5d){this['source']=_0xaea5d;const _0xdfe7f6=new Map(),_0x26116d=new Map(),_0x506f64=this['editor']['model']['document']['roots']['map'](_0x5cdd8c=>_0x5cdd8c['rootName']);for(const _0x48f485 of _0x506f64){const _0x1afda7=this['editor']['model']['document']['getRoot'](_0x48f485),_0x50b90a=T(_0x1afda7);_0xdfe7f6['set'](_0x48f485,_0x50b90a),_0x26116d['set'](_0x48f485,Object['fromEntries'](_0x1afda7['getAttributes']()));}const _0x252f90=Array['from'](this['editor']['model']['markers'])['map'](_0xdc0bd1=>[_0xdc0bd1['name'],_0xdc0bd1['getRange']()]),_0xf3729c=this['source']['version'];this['_saveMetaData'](_0xf3729c,_0xdfe7f6,_0x252f90,_0x26116d),this['_startingRevisionId']=this['_revisionId'];const _0x17791a=new Map(),_0x3a0dc5=new Map();for(const _0x3c0abd of _0x506f64){const _0x595473=F(_0x3c0abd);_0x17791a['set'](_0x3c0abd,_0x595473),_0x3a0dc5['set'](_0x3c0abd,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x17791a,[],_0x3a0dc5);}['getData'](_0x3c74bc,_0x53cd68){if(this['_lastFrom']===_0x3c74bc&&this['_lastTo']<=_0x53cd68)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x53cd68,!0x0);else{if(!this['_savedMetaData']['has'](_0x3c74bc)){const _0x4e6aea=this['_getPreviousFrom'](_0x3c74bc);this['_calculateMetaData'](_0x4e6aea,_0x3c74bc,!0x1);}this['_calculateMetaData'](_0x3c74bc,_0x53cd68,!0x0);}return this['_lastFrom']=_0x3c74bc,this['_lastTo']=_0x53cd68,this['_getState']();}['loadState'](_0x16dad2){this['_reset'](),this['_lastFrom']=_0x16dad2['fromVersion'],this['_lastTo']=_0x16dad2['toVersion'];for(const _0x17ba9b in _0x16dad2['diffData']){const _0x4a3dcc=_0x16dad2['diffData'][_0x17ba9b]['attachChange'],_0x487b62=_0x19169d(_0x16dad2['diffData'][_0x17ba9b]['attributesBefore'])||{},_0x2e2b45=this['_makeModelFromViewString'](_0x16dad2['diffData'][_0x17ba9b]['deletions']);_0x2e2b45['rootName']=_0x17ba9b,_0x2e2b45['_isAttached']=!_0x4a3dcc||!_0x4a3dcc['isAttached'],_0x2e2b45['isAttached']=()=>_0x2e2b45['_isAttached'],this['_baseRoots']['set'](_0x17ba9b,_0x2e2b45),this['_baseRootsAttributes']['set'](_0x17ba9b,_0x487b62),_0x4a3dcc&&this['_touchedRoots']['set'](_0x17ba9b,_0x4a3dcc);const _0x24c8b0=this['_makeIdsRoot'](_0x2e2b45);this['_baseIdsRoots']['set'](_0x17ba9b,_0x24c8b0);for(const [_0x4b9cd8,_0x4e3c41]of _0x2e2b45['markers']){if(!_0x4b9cd8['startsWith']('revision:'))continue;const _0x174276=_0x4b9cd8['split'](':')[0x2];for(const _0x2dbe3f of _0x4e3c41['getWalker']({'singleCharacters':!0x0})){const _0x27d860=this['_getVidAttributeName'](_0x2dbe3f),_0x4b22ef='elementEnd'==_0x2dbe3f['type']?_0x2dbe3f['previousPosition']['path']['slice'](0x0,-0x1):_0x2dbe3f['previousPosition']['path'],_0x400478=_0x24c8b0['getNodeByPath'](_0x4b22ef)['getAttribute'](_0x27d860);this['_touched']['set'](_0x400478,{'userId':_0x174276});}}}this['_startingRevisionId']=this['_revisionId'];const _0x1e2a4d=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x30be6a=>!this['_touched']['has'](_0x30be6a));let _0x4eb282=0x0;const _0x53815e=new Map();for(const _0x1707f7 in _0x16dad2['diffData']){const _0x352e8f=_0x16dad2['diffData'][_0x1707f7]['attachChange'],_0x2e24d4=_0x19169d(_0x16dad2['diffData'][_0x1707f7]['attributesAfter'])||{},_0x5327ce=this['_makeModelFromViewString'](_0x16dad2['diffData'][_0x1707f7]['insertions']);_0x5327ce['rootName']=_0x1707f7,_0x5327ce['_isAttached']=!_0x352e8f||_0x352e8f['isAttached'],_0x5327ce['isAttached']=()=>_0x5327ce['_isAttached'],this['_diffRoots']['set'](_0x1707f7,_0x5327ce),this['_diffRootsAttributes']['set'](_0x1707f7,_0x2e24d4);const _0xd63f89=this['_makeIdsRoot'](_0x5327ce,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1707f7,_0xd63f89),_0x53815e['set'](_0x1707f7,_0x5327ce['isAttached']()?_0x2e24d4:{});for(const [_0x278f9c,_0x456063]of _0x5327ce['markers']){if(!_0x278f9c['startsWith']('revision:'))continue;const _0x59158d=_0x278f9c['split'](':')[0x2];for(const _0x384696 of _0x456063['getWalker']({'singleCharacters':!0x0})){const _0x38a9e2=this['_getVidAttributeName'](_0x384696),_0x1e2190=this['_revisionId']++,_0x93b8ba='elementEnd'==_0x384696['type']?_0x384696['previousPosition']['path']['slice'](0x0,-0x1):_0x384696['previousPosition']['path'];_0xd63f89['getNodeByPath'](_0x93b8ba)['_setAttribute'](_0x38a9e2,_0x1e2190),this['_touched']['set'](_0x1e2190,{'userId':_0x59158d});}}for(const _0x394fd4 of this['editor']['model']['createRangeIn'](_0x5327ce)['getWalker']({'singleCharacters':!0x0})){const _0x3d041c=this['_getVidAttributeName'](_0x394fd4),_0x39aa7e='elementEnd'==_0x394fd4['type']?_0x394fd4['previousPosition']['path']['slice'](0x0,-0x1):_0x394fd4['previousPosition']['path'],_0x4c1fad=_0xd63f89['getNodeByPath'](_0x39aa7e);_0x4c1fad['getAttribute'](_0x3d041c)>0x0||_0x4c1fad['_setAttribute'](_0x3d041c,_0x1e2a4d[_0x4eb282++]);}for(const [_0xa758af,_0x4a9c6d]of _0x5327ce['markers'])_0xa758af['startsWith']('revision:')||this['_markers']['set'](_0xa758af,_0x4a9c6d);}const _0x321d95=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x321d95),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x321d95,0x1));const _0x2289b7=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2289b7),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2289b7,0x1));const _0x28e5bb=Array['from'](this['_diffRoots'])['map'](([_0x43d3f8,_0x310648])=>[_0x43d3f8,T(_0x310648)]);this['_saveMetaData'](this['_lastTo'],_0x28e5bb,this['_markers'],_0x53815e);}['_makeModelFromViewString'](_0x28a6a0){const _0x1c68c1=JSON['parse'](_0x28a6a0),_0x35a67c=this['editor']['editing']['view']['document'],_0x56d2f7=new _0x4b1649(_0x35a67c,_0x1c68c1['map'](_0x29dc12=>C(_0x29dc12,this['editor'])));return this['editor']['data']['toModel'](_0x56d2f7);}['_saveMetaData'](_0x32e3a7,_0x5b713a,_0x122ce0,_0x415402){const _0xf96de6=new Map(_0x5b713a),_0x3dc2e5=new Map(_0x19169d(_0x415402)),_0x13a3fc=new Map();for(const [_0x4d067c,_0x2ea656]of _0x122ce0)_0x13a3fc['set'](_0x4d067c,{'start':_0x2ea656['start']['clone'](),'end':_0x2ea656['end']['clone'](),'rootName':_0x2ea656['root']['rootName']});this['_savedMetaData']['set'](_0x32e3a7,{'roots':_0xf96de6,'markers':_0x13a3fc,'rootsAttributes':_0x3dc2e5});}['_removeMetaData'](_0x3a56ff){this['_savedMetaData']['delete'](_0x3a56ff);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_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'](_0x3c86da,_0x51503a=null){let _0x4ee2fc=null;_0x3c86da['is']('documentFragment')||(_0x4ee2fc=new ft(_0x3c86da['name'],{'vid_start':null===_0x51503a?this['_revisionId']++:_0x51503a++}));const _0x1302d1=[];for(const _0x519cda of _0x3c86da['getChildren']())if(_0x519cda['is']('element')){_0x1302d1['push'](this['_makeIdsRoot'](_0x519cda,_0x51503a));const _0x1cbf07=_0x1302d1[_0x1302d1['length']-0x1];null!==_0x51503a&&(_0x51503a=_0x1cbf07['is']('element','$text')?_0x1cbf07['getAttribute']('vid')+0x1:_0x1cbf07['getAttribute']('vid_end')+0x1);}else{for(let _0x5bdcdd=0x0;_0x5bdcdd<_0x519cda['offsetSize'];_0x5bdcdd++)_0x1302d1['push'](new ft('$text',{'vid':null===_0x51503a?this['_revisionId']++:_0x51503a++}));}if(_0x3c86da['is']('documentFragment')){const _0x538e45=F(_0x3c86da['rootName']);return _0x538e45['_insertChild'](0x0,_0x1302d1),_0x538e45;}return _0x4ee2fc['_setAttribute']('vid_end',null===_0x51503a?this['_revisionId']++:_0x51503a++),_0x4ee2fc['_insertChild'](0x0,_0x1302d1),_0x4ee2fc;}['_calculateMetaData'](_0x37b40a,_0x46236d,_0x8566d5){this['_reset']();const {roots:_0x3a5387,markers:_0x4d8c0c,rootsAttributes:_0x58b851}=this['_savedMetaData']['get'](_0x37b40a);this['_baseRoots']=new Map(_0x3a5387),this['_baseRootsAttributes']=new Map(_0x19169d(_0x58b851));for(const [_0x38036d,_0x1a50e2]of this['_baseRoots'])if('$graveyard'!==_0x38036d&&(this['_diffRoots']['set'](_0x38036d,T(_0x1a50e2)),this['_diffRootsAttributes']=new Map(_0x19169d(_0x58b851)),_0x8566d5)){const _0xc34614=this['_revisionId'];this['_idsRoots']['set'](_0x38036d,this['_makeIdsRoot'](_0x1a50e2)),this['_baseIdsRoots']['set'](_0x38036d,this['_makeIdsRoot'](_0x1a50e2,_0xc34614));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x8566d5&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2ed091,_0x3666cf]of _0x4d8c0c){const _0x21d380=this['_baseRoots']['get'](_0x3666cf['rootName']),_0x61089c=this['_diffRoots']['get'](_0x3666cf['rootName']),_0x490662=new vt(this['_fixPosition'](_0x3666cf['start'],_0x21d380),this['_fixPosition'](_0x3666cf['end'],_0x21d380)),_0x1ba689=this['_fixRange'](_0x490662,_0x61089c);_0x21d380['markers']['set'](_0x2ed091,_0x490662),this['_markers']['set'](_0x2ed091,_0x1ba689);}this['_applyOperations'](_0x37b40a,_0x46236d,_0x8566d5);}['_applyOperations'](_0x1ccb0b,_0x478f11,_0xb79368){for(const _0x257a5a of this['source']['getOperations'](_0x1ccb0b,_0x478f11))this['_handleOperation'](_0x257a5a,_0xb79368);for(const _0x504c22 of this['_diffRoots']['values']())_0x504c22['markers']['clear']();for(const [_0x3db5b9,_0x574320]of this['_markers']){this['_diffRoots']['get'](_0x574320['root']['rootName'])['markers']['set'](_0x3db5b9,_0x574320['clone']());}const _0x14ac81=new Map(),_0x3b9ef3=new Map();for(const [_0x219d3f,_0x579863]of this['_diffRoots'])_0x14ac81['set'](_0x219d3f,T(_0x579863)),_0x3b9ef3['set'](_0x219d3f,this['_diffRootsAttributes']['get'](_0x219d3f));this['_saveMetaData'](_0x478f11,_0x14ac81,this['_markers'],_0x3b9ef3);}['_getPreviousFrom'](_0x23c1aa){const _0xb4f4c9=Array['from'](this['_savedMetaData']['keys']());_0xb4f4c9['sort']((_0xc95ef,_0x32bdd2)=>_0xc95ef-_0x32bdd2),_0xb4f4c9['reverse']();for(const _0x5a7e91 of _0xb4f4c9)if(_0x5a7e91<_0x23c1aa)return _0x5a7e91;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x42918d,_0x26bfcd){const _0x2e552f=Array['from'](_0x26bfcd['markers'])['map'](([_0x596a64,_0x2bbdec])=>[_0x596a64,this['_fixRange'](_0x2bbdec,_0x42918d)]);_0x42918d['markers']=new Map(_0x2e552f);}['_transformMarkers'](_0x27584f){for(const _0x573af7 of this['_markers']['values']()){const _0x1b6d52=_0x573af7['getTransformedByOperation'](_0x27584f),_0x26f2f4=vt['_createFromRanges'](_0x1b6d52);_0x573af7['start']=_0x26f2f4['start'],_0x573af7['end']=_0x26f2f4['end'];}}['_handleOperation'](_0x17f03b,_0x53bb6e){if('addRoot'!=_0x17f03b['type']&&'detachRoot'!=_0x17f03b['type']){if('insert'==_0x17f03b['type']){const _0x194438=_0x17f03b['position']['root']['rootName'];this['_diffRoots']['has'](_0x194438)||(this['_diffRoots']['set'](_0x194438,F(_0x194438,!0x0)),this['_diffRootsAttributes']['set'](_0x194438,{}),_0x53bb6e&&this['_idsRoots']['set'](_0x194438,F(_0x194438,!0x0)));}else{if('addRootAttribute'==_0x17f03b['type']||'removeRootAttribute'==_0x17f03b['type']||'changeRootAttribute'==_0x17f03b['type'])return void this['_handleRootAttributeOperation'](_0x17f03b);'marker'==_0x17f03b['type']&&this['_handleMarkerOperation'](_0x17f03b);}if('marker'!==_0x17f03b['type']){const _0x37f759=this['_cloneOperation'](_0x17f03b,this['_diffRoots']);_0x37f759['_execute'](),this['_transformMarkers'](_0x37f759);}if(_0x53bb6e)switch(_0x17f03b['type']){case'insert':this['_handleInsertOperation'](_0x17f03b);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x17f03b);break;case'merge':this['_handleMergeOperation'](_0x17f03b);break;case'split':this['_handleSplitOperation'](_0x17f03b);}}else this['_handleRootOperation'](_0x17f03b,_0x53bb6e);}['_cloneOperation'](_0x10b674,_0x5d3f69){const _0x3595b2=_0x10b674['clone']();return _0x3595b2['_authorId']=_0x10b674['_authorId'],this['_fixOperation'](_0x3595b2,_0x5d3f69),_0x3595b2;}['_getBaseVids'](_0x14f35a){return _0x14f35a['map'](_0x51a638=>{const _0x4e9d90=this['_getVidAttributeName'](_0x51a638);return Number(_0x51a638['item']['getAttribute'](_0x4e9d90));});}['_generateTape'](_0x227a0b,_0x109f83){if(_0x227a0b['is']('element','$text'))_0x109f83['push']({'item':_0x227a0b,'type':'text'});else{_0x227a0b['is']('element')&&_0x109f83['push']({'item':_0x227a0b,'type':'elementStart'});for(const _0xfee6d2 of _0x227a0b['getChildren']())this['_generateTape'](_0xfee6d2,_0x109f83);_0x227a0b['is']('element')&&_0x109f83['push']({'item':_0x227a0b,'type':'elementEnd'});}return _0x109f83;}['_getState'](){const _0xcbaea8=new Map(this['_touched']),_0x5a00e1=new Map(_0xcbaea8),_0x57301c=new Map(),_0x29b64b={'insertions':{},'deletions':{}},_0x2fb3c7={'insertions':{},'deletions':{}},_0x5c4164=new Map(),_0x5bbc2a=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x5bbc2a['delete']('$graveyard');for(const _0x1acb3e of _0x5bbc2a){const _0x242a5c=this['_diffRoots']['get'](_0x1acb3e)||F(_0x1acb3e,!0x1),_0x54f287=this['_baseRoots']['get'](_0x1acb3e)||F(_0x1acb3e,!0x1);_0x242a5c['isAttached']()||_0x54f287['isAttached']()?(_0x29b64b['insertions'][_0x1acb3e]=T(_0x242a5c),_0x29b64b['deletions'][_0x1acb3e]=T(_0x54f287),this['_copyMarkers'](_0x29b64b['deletions'][_0x1acb3e],_0x54f287),this['_copyMarkers'](_0x29b64b['insertions'][_0x1acb3e],_0x242a5c),_0x2fb3c7['insertions'][_0x1acb3e]=this['_generateTape'](this['_idsRoots']['get'](_0x1acb3e),[]),_0x2fb3c7['deletions'][_0x1acb3e]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1acb3e)||F(_0x1acb3e,!0x1),[])):_0x5bbc2a['delete'](_0x1acb3e);}for(const _0x1d97a1 of _0x5bbc2a){const _0x3a4e2c=_0x2fb3c7['insertions'][_0x1d97a1];for(const _0x2d6e3a of _0x3a4e2c){const _0x4e7b47=this['_getVidAttributeName'](_0x2d6e3a),_0x445654=_0x2d6e3a['item']['getAttribute'](_0x4e7b47);_0x5a00e1['delete'](_0x445654),_0x445654>=this['_startingRevisionId']&&_0x57301c['set'](_0x445654,_0xcbaea8['get'](_0x445654));}}for(const _0x4656af of _0x5bbc2a){const _0x5c243f=_0x2fb3c7['insertions'][_0x4656af],_0x136eef=this['_getBaseVids'](_0x2fb3c7['deletions'][_0x4656af]);let _0x333c94=0x0;for(const _0x117c33 of _0x5c243f){const _0x22f8ae=this['_getVidAttributeName'](_0x117c33),_0x18de25=_0x117c33['item']['getAttribute'](_0x22f8ae);if(!_0x57301c['has'](_0x18de25)&&!_0x5c4164['has'](_0x18de25)){if(_0x5a00e1['has'](_0x18de25))_0x333c94++;else{if(_0x18de25!=_0x136eef[_0x333c94]){const _0x667ee4=_0xcbaea8['get'](_0x18de25)||_0xcbaea8['get'](_0x136eef[_0x333c94]);for(;_0x18de25!=_0x136eef[_0x333c94];)_0x5a00e1['has'](_0x136eef[_0x333c94])||(_0x5c4164['set'](_0x136eef[_0x333c94],_0x667ee4),_0xcbaea8['set'](_0x136eef[_0x333c94],_0x667ee4)),_0x333c94++;}_0x333c94++;}}}}for(const _0x1a6844 of _0x5bbc2a){const _0x37d1e6=_0x2fb3c7['insertions'][_0x1a6844];for(const _0x2346c5 of _0x37d1e6){const _0x369965=this['_getVidAttributeName'](_0x2346c5),_0x21ce73=_0x2346c5['item']['getAttribute'](_0x369965);if(_0x5c4164['has'](_0x21ce73)){const _0x1c4120=_0x5c4164['get'](_0x21ce73);_0x5a00e1['has'](_0x21ce73)||_0x5a00e1['set'](_0x21ce73,{..._0x1c4120}),_0x57301c['set'](_0x21ce73,{..._0x1c4120});}}}for(const _0x5a736c of _0x5a00e1['keys']())_0x5a736c>=this['_startingRevisionId']&&_0x5a00e1['delete'](_0x5a736c);const _0xc9dffb=new Map();for(const _0x222baa of _0x5bbc2a){let _0x2ab3b0=_0x2fb3c7['insertions'][_0x222baa];for(const _0x3273ff of _0x2ab3b0)if(_0x3273ff['item']['is']('element','tableCell')){const _0x25a0e2=this['_getVidAttributeName'](_0x3273ff),_0x371317=_0x3273ff['item']['getAttribute'](_0x25a0e2);if(_0x57301c['has'](_0x371317)){const _0x1071b9=_0x3273ff['item']['parent']['parent']['getAttribute']('vid_start'),_0x22a19d=_0xc9dffb['get'](_0x1071b9)||new Set();_0x22a19d['add'](_0x57301c['get'](_0x371317)['userId']),_0xc9dffb['set'](_0x1071b9,_0x22a19d);}}_0x2ab3b0=_0x2fb3c7['deletions'][_0x222baa];for(const _0x138f35 of _0x2ab3b0)if(_0x138f35['item']['is']('element','tableCell')){const _0x139e5e=this['_getVidAttributeName'](_0x138f35),_0x4acb2e=_0x138f35['item']['getAttribute'](_0x139e5e);if(_0x5a00e1['has'](_0x4acb2e)){const _0x49e92d=_0x138f35['item']['parent']['parent']['getAttribute']('vid_start'),_0x2761ea=_0xc9dffb['get'](_0x49e92d)||new Set();_0x2761ea['add'](_0x5a00e1['get'](_0x4acb2e)['userId']),_0xc9dffb['set'](_0x49e92d,_0x2761ea);}}for(const _0x3c5013 of _0xc9dffb['keys']())(_0x57301c['has'](_0x3c5013)||_0x5a00e1['has'](_0x3c5013))&&_0xc9dffb['delete'](_0x3c5013);}for(const _0xd89238 of _0x5bbc2a){const _0x44e1a2=_0x2fb3c7['insertions'][_0xd89238];let _0x3dfbfe=null,_0x498788=null;for(const _0x480ae0 of _0x44e1a2){const _0x6318ec=this['_getVidAttributeName'](_0x480ae0),_0x2c2077=_0x480ae0['item']['getAttribute'](_0x6318ec),_0x307a00=_0xc9dffb['get'](_0x2c2077);_0x307a00&&'elementStart'==_0x480ae0['type']&&(_0x3dfbfe=Array['from'](_0x307a00)[0x0],_0x498788=_0x480ae0['item']['getAttribute']('vid_end')),_0x3dfbfe&&(_0x5a00e1['set'](_0x2c2077,{'userId':_0x3dfbfe}),_0x57301c['set'](_0x2c2077,{'userId':_0x3dfbfe})),_0x2c2077==_0x498788&&(_0x3dfbfe=null,_0x498788=null);}}const _0x20cae4={},_0x463d58=new Set();for(const _0x3aac75 of _0x5bbc2a){const _0x210363=_0x29b64b['deletions'][_0x3aac75],_0x185d93=_0x29b64b['insertions'][_0x3aac75];for(const {userId:_0x4330db}of this['_touchedMarkers']['values']())null!==_0x4330db&&_0x463d58['add'](_0x4330db);for(const {userId:_0x6156fe}of this['_touchedRoots']['values']())null!==_0x6156fe&&_0x463d58['add'](_0x6156fe);this['_markChanges'](_0x185d93,_0x2fb3c7['insertions'][_0x3aac75],_0x57301c,'insertion',_0x463d58),this['_markChanges'](_0x210363,_0x2fb3c7['deletions'][_0x3aac75],_0x5a00e1,'deletion',_0x463d58),_0x20cae4[_0x3aac75]={'insertions':this['_prepareViewToSave'](_0x185d93),'deletions':this['_prepareViewToSave'](_0x210363),'attachChange':this['_touchedRoots']['get'](_0x3aac75)||null,'attributesBefore':_0x19169d(this['_baseRootsAttributes']['get'](_0x3aac75))||{},'attributesAfter':_0x19169d(this['_diffRootsAttributes']['get'](_0x3aac75))};}return{'diffData':_0x20cae4,'authorsIds':Array['from'](_0x463d58)};}['_processRootBeforeSave'](_0x3855bb){for(const [,_0x21bd08]of _0x3855bb['markers']){const _0x22371a=_0x21bd08['start']['getAncestors']()['filter'](_0x118185=>'tableCell'==_0x118185['name']);for(const _0x3f5647 of _0x22371a)0x1==_0x3f5647['childCount']&&_0x3f5647['getChild'](0x0)['is']('element','paragraph')&&_0x3f5647['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x501c41){this['_processRootBeforeSave'](_0x501c41);const _0xf117b7=this['editor']['data']['toView'](_0x501c41,{}),_0x3bbc2a=Array['from'](_0xf117b7['getChildren']())['map'](_0x33fdcb=>this['_getViewJson'](_0x33fdcb));return JSON['stringify'](_0x3bbc2a);}['_getViewJson'](_0x31f458){if(_0x31f458['is']('$text'))return _0x31f458['data'];{const _0x284fb6=_0x31f458;return{'type':Object['keys'](P)['find'](_0x47a4d1=>_0x31f458 instanceof P[_0x47a4d1]),'name':_0x284fb6['name'],'attributes':Array['from'](_0x284fb6['getAttributes']()),'children':Array['from'](_0x284fb6['getChildren']())['map'](_0x20256f=>this['_getViewJson'](_0x20256f))};}}['_markChanges'](_0x35860f,_0x178158,_0x303f80,_0x5e10d5,_0x45eb6d){let _0x1c0d08=null,_0x26351f=null,_0x44a4a5=0x0;const _0x59f997=this['editor']['model'];for(let _0x16258c=0x0;_0x16258c<_0x178158['length'];_0x16258c++){const _0x22b47e=this['_getVidAttributeName'](_0x178158[_0x16258c]),_0x258ed6=_0x178158[_0x16258c]['item']['getAttribute'](_0x22b47e),_0x1a3d55=_0x303f80['get'](_0x258ed6),_0x25e349=_0x16258c==_0x178158['length']-0x1;(!_0x1c0d08&&_0x1a3d55&&(_0x1c0d08=_0x1a3d55,_0x26351f=_0x178158[_0x16258c]),_0x1c0d08&&(!_0x1a3d55||_0x1a3d55['userId']!=_0x1c0d08['userId']))&&(_0x15ebe2(_0x1a3d55,B(_0x26351f,_0x35860f,_0x59f997),B(_0x178158[_0x16258c],_0x35860f,_0x59f997)),_0x1c0d08=_0x1a3d55||null,_0x26351f=_0x1a3d55?_0x178158[_0x16258c]:null),_0x1c0d08&&_0x25e349&&_0x15ebe2(_0x1a3d55,B(_0x26351f,_0x35860f,_0x59f997),J(_0x178158[_0x16258c],_0x35860f,_0x59f997));}function _0x15ebe2(_0xbc4f3e,_0x27ef2e,_0x4c21ca){const _0x2a3816=_0x1c0d08['userId'],_0x45b38f='revision:'+_0x5e10d5+':'+_0x2a3816+':'+_0x44a4a5++,_0x3d63b7=_0x59f997['createRange'](_0x27ef2e,_0x4c21ca);_0x35860f['markers']['set'](_0x45b38f,_0x3d63b7),null!==_0x2a3816&&_0x45eb6d['add'](_0x2a3816);}}['_getVidAttributeName'](_0x36bd2d){switch(_0x36bd2d['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0xec34bd,_0x3866f3){_0xec34bd['baseVersion']=null;for(const _0xeacf7a in _0xec34bd){const _0x12d1ce=_0xec34bd[_0xeacf7a];if(_0x12d1ce instanceof gt){const _0x2da11c=_0x3866f3['get'](_0x12d1ce['root']['rootName']);_0xec34bd[_0xeacf7a]=this['_fixPosition'](_0x12d1ce,_0x2da11c);}if(_0x12d1ce instanceof vt){const _0x2f0aaa=_0x3866f3['get'](_0x12d1ce['root']['rootName']);_0xec34bd[_0xeacf7a]=this['_fixRange'](_0x12d1ce,_0x2f0aaa);}'root'===_0xeacf7a&&(_0xec34bd['root']=_0x3866f3['get'](_0xec34bd['root']['rootName']));}}['_fixRange'](_0x24fba9,_0x3aea62){return this['editor']['model']['createRange'](this['_fixPosition'](_0x24fba9['start'],_0x3aea62),this['_fixPosition'](_0x24fba9['end'],_0x3aea62));}['_fixPosition'](_0x375828,_0x18b76d){return this['editor']['model']['createPositionFromPath'](_0x18b76d,_0x375828['path'],_0x375828['stickiness']);}['_handleInsertOperation'](_0x30e0f2){const _0x563cea=this['_idsRoots']['get'](_0x30e0f2['position']['root']['rootName']),_0x1de0d6=this['_fixPosition'](_0x30e0f2['position'],_0x563cea),_0x5e478b=null===_0x30e0f2['_authorId']?null:_0x30e0f2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a1ad3=_0x1de0d6['parent'],_0x148194=this['_revisionId'],_0x233c60=[];for(const _0x5c8493 of _0x30e0f2['nodes'])if(_0x5c8493['is']('element'))_0x233c60['push'](this['_makeIdsRoot'](_0x5c8493));else{for(let _0x4f9dc1=0x0;_0x4f9dc1<_0x5c8493['offsetSize'];_0x4f9dc1++)_0x233c60['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x5db111=this['_revisionId'];for(let _0x45cd31=_0x148194;_0x45cd31<_0x5db111;_0x45cd31++)this['_touched']['set'](_0x45cd31,{'userId':_0x5e478b});_0x4a1ad3['_insertChild'](_0x1de0d6['offset'],_0x233c60);}['_handleMoveOperation'](_0x36acb4){(_0x36acb4=this['_cloneOperation'](_0x36acb4,this['_idsRoots']))['_execute']();const _0x3a87b2=null===_0x36acb4['_authorId']?null:_0x36acb4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3b8165=_0x36acb4['getMovedRangeStart'](),_0x531e3c=_0x3b8165['parent'],_0x3e45ab=_0x3b8165['offset'];!function _0x1d767a(_0x1600d4,_0x5d0004,_0x7dcde5,_0x52408c){for(let _0x59db3b=_0x7dcde5;_0x59db3b<_0x52408c;_0x59db3b++){const _0x3a8296=_0x5d0004['getChild'](_0x59db3b);_0x3a8296['is']('element','$text')?_0x1600d4['set'](_0x3a8296['getAttribute']('vid'),{'userId':_0x3a87b2}):(_0x1600d4['set'](_0x3a8296['getAttribute']('vid_start'),{'userId':_0x3a87b2}),_0x1d767a(_0x1600d4,_0x3a8296,0x0,_0x3a8296['childCount']),_0x1600d4['set'](_0x3a8296['getAttribute']('vid_end'),{'userId':_0x3a87b2}));}}(this['_touched'],_0x531e3c,_0x3e45ab,_0x3e45ab+_0x36acb4['howMany']);}['_handleMergeOperation'](_0x9553ca){const _0x27f434=null===(_0x9553ca=this['_cloneOperation'](_0x9553ca,this['_idsRoots']))['_authorId']?null:_0x9553ca['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3d977d=_0x9553ca['targetPosition']['parent'],_0x4c48f1=_0x9553ca['sourcePosition']['parent'],_0x5c5713=_0x3d977d['getAttribute']('vid_end'),_0x351a01=_0x4c48f1['getAttribute']('vid_start');_0x3d977d['_setAttribute']('vid_end',_0x4c48f1['getAttribute']('vid_end')),_0x4c48f1['_setAttribute']('vid_end',_0x5c5713),this['_touched']['set'](_0x351a01,{'userId':_0x27f434}),this['_touched']['set'](_0x5c5713,{'userId':_0x27f434}),_0x9553ca['_execute']();}['_handleSplitOperation'](_0x26f97d){const _0x425aa6=null===(_0x26f97d=this['_cloneOperation'](_0x26f97d,this['_idsRoots']))['_authorId']?null:_0x26f97d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5656bf=_0x26f97d['graveyardPosition'],_0x2143c8=_0x26f97d['splitPosition']['parent'];_0x26f97d['_execute']();const _0x2dbf66=_0x2143c8['getAttribute']('vid_end'),_0x4d41f6=_0x26f97d['insertionPosition']['nodeAfter'];if(_0x5656bf){const _0x1bb5fd=_0x4d41f6['getAttribute']('vid_end'),_0x562e30=_0x2143c8['getAttribute']('vid_end');_0x2143c8['_setAttribute']('vid_end',_0x1bb5fd),_0x4d41f6['_setAttribute']('vid_end',_0x562e30),this['_touched']['set'](_0x2143c8['getAttribute']('vid_end'),{'userId':_0x425aa6}),this['_touched']['set'](_0x4d41f6['getAttribute']('vid_start'),{'userId':_0x425aa6});}else{const _0x1ab073=this['_revisionId']++,_0x5e4f1e=this['_revisionId']++;_0x2143c8['_setAttribute']('vid_end',_0x1ab073),_0x4d41f6['_setAttribute']('vid_start',_0x5e4f1e),_0x4d41f6['_setAttribute']('vid_end',_0x2dbf66),this['_touched']['set'](_0x1ab073,{'userId':_0x425aa6}),this['_touched']['set'](_0x5e4f1e,{'userId':_0x425aa6});}}['_handleMarkerOperation'](_0x239046){if(!_0x239046['affectsData'])return;const _0x1cc007=(_0x239046=this['_cloneOperation'](_0x239046,this['_diffRoots']))['oldRange']?_0x239046['oldRange']['root']:null,_0x23a822=_0x239046['newRange']?_0x239046['newRange']['root']:null;_0x1cc007&&this['_markers']['delete'](_0x239046['name']),_0x23a822&&this['_markers']['set'](_0x239046['name'],_0x239046['newRange']['clone']());const _0x5d069c=null===_0x239046['_authorId']?null:_0x239046['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2d7619=_0x239046['name'];if(!this['_touchedMarkers']['has'](_0x2d7619))return void this['_touchedMarkers']['set'](_0x2d7619,{'range':_0x239046['oldRange'],'userId':_0x5d069c});const _0x4e9143=this['_touchedMarkers']['get'](_0x2d7619),_0x22d4b2=_0x4e9143['range'],_0x15ddeb=_0x239046['newRange'];null==_0x22d4b2&&null==_0x15ddeb||_0x22d4b2&&_0x15ddeb&&_0x22d4b2['isEqual'](_0x15ddeb)?this['_touchedMarkers']['delete'](_0x239046['name']):_0x4e9143['userId']=_0x5d069c;}['_handleRootOperation'](_0x2cf17c,_0x441019){this['_diffRoots']['has'](_0x2cf17c['rootName'])?this['_diffRoots']['get'](_0x2cf17c['rootName'])['_isAttached']=_0x2cf17c['isAdd']:(this['_diffRoots']['set'](_0x2cf17c['rootName'],F(_0x2cf17c['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x2cf17c['rootName'],{}),_0x441019&&this['_idsRoots']['set'](_0x2cf17c['rootName'],F(_0x2cf17c['rootName'],!0x0)));const _0xd1dfa6=null===_0x2cf17c['_authorId']?null:_0x2cf17c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x49ae70=this['_touchedRoots']['get'](_0x2cf17c['rootName']);_0x49ae70&&_0x49ae70['userId']===_0xd1dfa6?this['_touchedRoots']['delete'](_0x2cf17c['rootName']):this['_touchedRoots']['set'](_0x2cf17c['rootName'],{'userId':_0xd1dfa6,'isAttached':_0x2cf17c['isAdd']});}['_handleRootAttributeOperation'](_0x4225f6){const _0x12fb61=this['_diffRootsAttributes']['get'](_0x4225f6['root']['rootName']);null===_0x4225f6['newValue']?delete _0x12fb61[_0x4225f6['key']]:_0x12fb61[_0x4225f6['key']]=_0x4225f6['newValue'];}}function T(_0x20b37e){const _0x2bdfea=F(_0x20b37e['rootName'],_0x20b37e['isAttached']());for(const _0x4928c0 of _0x20b37e['getChildren']()){const _0x109384=_0x4928c0['_clone'](!0x0);_0x2bdfea['_appendChild'](_0x109384);}return _0x2bdfea;}function F(_0x44a7c9,_0x5b03cf=!0x0){const _0x356089=new mt();return _0x356089['rootName']=_0x44a7c9,_0x356089['_isAttached']=_0x5b03cf,_0x356089['isAttached']=()=>_0x356089['_isAttached'],_0x356089;}function B(_0x23d2d2,_0x7b99f1,_0x5a33f8){const _0x542668='elementEnd'==_0x23d2d2['type']?_0x5a33f8['createPositionAt'](_0x23d2d2['item'],'end'):_0x5a33f8['createPositionBefore'](_0x23d2d2['item']);return _0x5a33f8['createPositionFromPath'](_0x7b99f1,_0x542668['path'],_0x542668['stickiness']);}function J(_0x5b875b,_0x4c2723,_0x97ba5f){const _0x26f3f4='elementStart'==_0x5b875b['type']?_0x97ba5f['createPositionAt'](_0x5b875b['item'],0x0):_0x97ba5f['createPositionAfter'](_0x5b875b['item']);return _0x97ba5f['createPositionFromPath'](_0x4c2723,_0x26f3f4['path'],_0x26f3f4['stickiness']);}class ns extends _0x3d574f{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4dae84,_0x1336e6){super(_0x4dae84),this['focusTracker']=new _0x4233b8(),this['keystrokes']=new _0x5c227e(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1336e6),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x58e7c1({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x378200=_0x3aae74=>_0x3aae74['stopPropagation']();this['keystrokes']['set']('arrowright',_0x378200),this['keystrokes']['set']('arrowleft',_0x378200),this['keystrokes']['set']('arrowup',_0x378200),this['keystrokes']['set']('arrowdown',_0x378200);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x4d9542){this['revisionNameInputView']['fieldView']['element']['value']=_0x4d9542['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xe9981e){const _0x477cf7=new nt(this['locale'],_0x49873d),_0x2500f1=_0x477cf7['fieldView'];_0x2500f1['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x5c1af9=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0xe9981e&&(_0x5c1af9+='\x20('+m(this['locale'],'optional')+')'),(_0x477cf7['label']=_0x5c1af9,_0x2500f1['on']('input',()=>{this['revisionNameInputValue']=_0x2500f1['element']['value']['trim']();}),_0x477cf7);}}class u extends _0x4dc320{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x553f9b=this['editor'],_0x584e6b=_0x553f9b['plugins']['get']('RevisionTracker');_0x553f9b['ui']['componentFactory']['add']('revisionHistory',_0x4723b1=>{const _0x593c53=_0x4942c4(_0x4723b1),_0x5df2af=_0x593c53['panelView']['children'],_0x1755c5=new te(_0x4723b1),_0x3a6c72=new _0x28d0b4(_0x4723b1),_0x3311bf=new _0x5f20b0(_0x4723b1),_0x4f3e0b=new _0x28d0b4(_0x4723b1),_0x6dc811=new _0x5f20b0(_0x4723b1);return _0x593c53['bind']('isEnabled')['to'](_0x584e6b,'isReady',_0x584e6b,'isEnabled',_0x553f9b,'isReadOnly',(_0x157235,_0x48465c,_0xc5b89c)=>_0x157235&&_0x48465c&&!_0xc5b89c),_0x593c53['buttonView']['set']({'icon':_0x226698['history'],'label':m(_0x4723b1,'Revision\x20history'),'tooltip':!0x0}),_0x3311bf['set']({'label':m(_0x4723b1,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x3311bf['bind']('isEnabled')['to'](_0x584e6b,'isReady',_0x584e6b,'isEnabled',_0x553f9b,'isReadOnly',(_0x2657ea,_0x282822,_0x1ace2c)=>_0x2657ea&&_0x282822&&!_0x1ace2c),_0x3311bf['on']('execute',()=>this['_showDialog']()),_0x6dc811['set']({'label':m(_0x4723b1,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x6dc811['bind']('isEnabled')['to'](_0x584e6b,'isReady',_0x553f9b,'isReadOnly',(_0x5d3d3d,_0x16ded8)=>_0x5d3d3d&&!_0x16ded8),_0x6dc811['on']('execute',()=>{_0x553f9b['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x593c53['isOpen']=!0x1,_0x553f9b['editing']['view']['focus']();}),_0x3a6c72['children']['add'](_0x3311bf),_0x4f3e0b['children']['add'](_0x6dc811),_0x1755c5['role']='menu',_0x1755c5['items']['addMany']([_0x3a6c72,_0x4f3e0b]),_0x5df2af['add'](_0x1755c5),_0x593c53;}),_0x553f9b['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x53afaa=this['editor'],_0x475f0b=_0x53afaa['locale'],_0xd010e0=new _0x331eca(_0x475f0b),_0x1cf872=new _0x2e1e1b(_0x475f0b);_0xd010e0['buttonView']['set']({'icon':_0x226698['history'],'label':m(_0x475f0b,'Revision\x20history')});const _0xda65c6=new _0xd82488(_0x475f0b,_0xd010e0),_0x2ebac3=new _0x24d70c(_0x475f0b);_0x2ebac3['set']({'label':m(_0x475f0b,'Save\x20current\x20revision')}),_0x2ebac3['delegate']('execute')['to'](_0xd010e0),_0x2ebac3['on']('execute',()=>{this['_showDialog']();}),_0xda65c6['children']['add'](_0x2ebac3),_0x1cf872['items']['add'](_0xda65c6);const _0x47f3b2=new _0xd82488(_0x475f0b,_0xd010e0),_0x3cf9c4=new _0x24d70c(_0x475f0b);return _0x3cf9c4['set']({'label':m(_0x475f0b,'Open\x20revision\x20history')}),_0x3cf9c4['delegate']('execute')['to'](_0xd010e0),_0x3cf9c4['on']('execute',()=>{_0x53afaa['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x47f3b2['children']['add'](_0x3cf9c4),_0x1cf872['items']['add'](_0x47f3b2),_0xd010e0['panelView']['children']['add'](_0x1cf872),_0xd010e0;}['_showDialog'](){const _0x44bd77=this['editor'],_0x313b42=_0x44bd77['locale'],_0x88c2b2=_0x44bd77['plugins']['get']('Dialog'),_0x1047b3=_0x44bd77['plugins']['get']('RevisionTracker');function _0x267769(_0x2ea96c){_0x44bd77['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2ea96c['revisionName']?_0x2ea96c['revisionNameInputView']['errorText']=m(_0x313b42,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x44bd77['plugins']['get'](l)['saveRevision']({'name':_0x2ea96c['revisionName']}),_0x88c2b2['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x267769(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x88c2b2['show']({'id':'revisionSave','title':m(_0x313b42,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x44bd77['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x88c2b2['hide']()},{'label':m(_0x44bd77['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x27a50e){_0x27a50e['bind']('isEnabled')['to'](_0x1047b3,'isReady',_0x1047b3,'isEnabled',_0x44bd77,'isReadOnly',(_0x40c73f,_0x1dc972,_0xf7e0c2)=>_0x40c73f&&_0x1dc972&&!_0xf7e0c2);},'onExecute':()=>_0x267769(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x224487=this['editor'],_0x3a1932=_0x224487['locale'];this['_saveRevisionFormView']=new ns(_0x3a1932,_0x224487['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x3d574f{['changeId'];['_model'];constructor(_0x3ebda6,_0x593345){super(_0x3ebda6),this['_model']=_0x593345,this['changeId']=_0x593345['id'];const _0x5a0692=this['bindTemplate'],_0xa4e16d=m(_0x3ebda6,_0x593345['data']['isSuggestion']?'Suggested\x20by':'add'==_0x593345['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x593345['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5a0692['to']('type',_0x599854=>'ck-revision-change__'+_0x599854)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0xa4e16d}]},{'text':'\x20'+_0x593345['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x23f2b7(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x334ba8){super(),this['id']=_0x334ba8['id']||_0x2db3ef(),this['author']=_0x334ba8['author'],this['type']=_0x334ba8['type'],this['data']=_0x334ba8['data']||{},this['rootName']=_0x334ba8['rootName'],this['set']('createdAt',_0x334ba8['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x315e80,_0x2ec4c8){this['newRevisionId']=_0x315e80,this['oldRevisionId']=_0x2ec4c8,this['changes']=new _0x3ba397();}['_setChanges'](_0x9d9833){for(const _0x282e0b of _0x9d9833)this['changes']['add'](_0x282e0b);}}const Y={'c':_0x12f307,'a':_0x5849eb,'e':_0x514ad1,'r':_0x357ba2,'u':_0x5d10d8};class d extends _0x4dc320{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xcf566a,_0xf64d40,j];}constructor(_0x5850cc){super(_0x5850cc),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),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',(_0x38dfeb,_0x99f3e5,_0xe3cc93)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x1e71c1=>{for(const _0x1b958a of this['editor']['editing']['view']['document']['roots'])_0xe3cc93?_0x1e71c1['removeClass']('ck-editor__editable__overlay',_0x1b958a):_0x1e71c1['addClass']('ck-editor__editable__overlay',_0x1b958a);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5a5cd0=>null!==_0x5a5cd0),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4a066c,_0x42597d,_0x143861)=>_0x4a066c&&_0x143861?_0x42597d['changes']['getIndex'](_0x143861):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2d4a41,_0x510718)=>_0x2d4a41?_0x510718['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0xf64d40);}['init'](){const _0x309e3e=this['editor'],_0x12658a=new yt(_0x309e3e,{'direction':'backward'}),_0x4ff47e=new yt(_0x309e3e,{'direction':'forward'});(_0x309e3e['commands']['add']('showPreviousChange',_0x12658a),_0x309e3e['commands']['add']('showNextChange',_0x4ff47e),_0x309e3e['commands']['add']('restoreRevision',new _t(_0x309e3e)),this['on']('change:numberOfChanges',()=>{_0x12658a['refresh'](),_0x4ff47e['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x309e3e['enableReadOnlyMode']('revision-viewer'),_0x309e3e['plugins']['has']('WidgetToolbarRepository'))&&_0x309e3e['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x1dac16){await this['loadRevisionData'](_0x1dac16);const _0x2c5a76={};for(const _0x2e2bf2 in _0x1dac16['diffData']){if(_0x1dac16['diffData'][_0x2e2bf2]['attachChange']&&!_0x1dac16['diffData'][_0x2e2bf2]['attachChange']['isAttached'])continue;const _0x15807f=this['_removeRevisionMarkers'](JSON['parse'](_0x1dac16['diffData'][_0x2e2bf2]['insertions'])),_0x3f4b57=this['editor']['editing']['view']['document'],_0x542117=new _0x4b1649(_0x3f4b57,_0x15807f['map'](_0x3eeb74=>this['_getViewObj'](_0x3eeb74)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2c5a76[_0x2e2bf2]=this['editor']['data']['processor']['toData'](_0x542117),this['editor']['data']['processor']['useFillerType']('default');}return _0x2c5a76;}async['getRevisionRootsAttributes'](_0x2a2a83){await this['loadRevisionData'](_0x2a2a83);const _0x3ad9d4={};for(const _0x4d6f9a in _0x2a2a83['diffData'])_0x2a2a83['diffData'][_0x4d6f9a]['attachChange']&&!_0x2a2a83['diffData'][_0x4d6f9a]['attachChange']['isAttached']||(_0x3ad9d4[_0x4d6f9a]=_0x2a2a83['diffData'][_0x4d6f9a]['attributesAfter']||{});return _0x3ad9d4;}['_removeRevisionMarkers'](_0x228d9e){return(_0x228d9e=_0x228d9e['filter'](_0x343d8b=>!_0x343d8b['name']||'revision-start'!==_0x343d8b['name']&&'revision-end'!==_0x343d8b['name']))['forEach'](_0x122365=>{'string'!=typeof _0x122365&&(_0x122365['children']=this['_removeRevisionMarkers'](_0x122365['children']),_0x122365['attributes']=_0x122365['attributes']['filter'](_0x3d26ff=>!_0x3d26ff[0x0]['startsWith']('data-revision-')));}),_0x228d9e;}async['compare'](_0xb095d7,_0x2c5387,_0x1dfcc5=!0x1){if(!this['isEnabled'])return;const _0xc1f16f=this['diff'],_0x3c7587=this['repository'],_0x3e3676='string'==typeof _0xb095d7?_0x3c7587['getRevision'](_0xb095d7):_0xb095d7,_0x1d40ca='string'==typeof _0x2c5387?_0x3c7587['getRevision'](_0x2c5387):_0x2c5387,_0x4757c7=_0x3e3676['id'],_0x232281=_0x1d40ca?_0x1d40ca['id']:null;if(!_0x1dfcc5&&this['diff']&&this['diff']['newRevisionId']===_0x4757c7&&this['diff']['oldRevisionId']===_0x232281)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x4757c7,_0x232281);const _0x34eecd=this['_getRevisionsRange'](_0x3e3676,_0x1d40ca,!0x0)['map'](_0x10a144=>this['loadRevisionData'](_0x10a144));return _0x34eecd['push'](new Promise(_0x224f84=>{setTimeout(_0x224f84,0x14);})),Promise['all'](_0x34eecd)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x5c6cf9=this['_getDiff'](_0x4757c7,_0x232281);for(const _0x5d1b37 of _0x5c6cf9['changes'])this['_changeIdToChange']['set'](_0x5d1b37['id'],_0x5d1b37);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2dff21=>{for(const _0x45b7e5 of this['editor']['model']['document']['getRootNames']())_0x2dff21['detachRoot'](_0x45b7e5);for(const _0x29352b of Object['keys'](_0x5c6cf9['model'])){const _0x4327ec=_0x2dff21['addRoot'](_0x29352b);for(const _0x3e257d of Object['keys'](_0x5c6cf9['attributes'][_0x29352b]))_0x2dff21['setAttribute'](_0x3e257d,_0x5c6cf9['attributes'][_0x29352b][_0x3e257d],_0x4327ec);_0x2dff21['insert'](_0x5c6cf9['model'][_0x29352b],_0x4327ec,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x5c6cf9['changes'])),this['isReady']=!0x0;})['catch'](_0x55704a=>{console['error'](_0x55704a),this['_cleanUp'](),_0xc1f16f&&(this['diff']=_0xc1f16f),this['isReady']=!0x0;});}['addRevisionData'](_0x529e48,_0x27f254){const _0xb75bbb=this['repository']['createRevision'](_0x529e48);return _0xb75bbb['on']('_update',(_0x34f22b,_0x3acfda,_0x18b2cc)=>_0x27f254(_0x3acfda,_0x18b2cc,_0xb75bbb)),this['repository']['addRevision'](_0xb75bbb),_0xb75bbb;}['loadRevisionData'](_0x1de7c7){if(!_0x1de7c7||_0x1de7c7['diffData'])return Promise['resolve']();{const _0x420204=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x420204,'revisionId':_0x1de7c7['id']})['then'](_0x10cb91=>{_0x1de7c7['_update']({'diffData':_0x10cb91['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x578116=>{for(const _0x4d6bd3 of this['editor']['model']['document']['getRootNames']())_0x578116['detachRoot'](_0x4d6bd3);});}['_sortAndFilterDiffChanges'](_0x460c17){const _0x2f9752=[],_0x3c36b9=new Map();for(const _0x5c7913 of this['editor']['model']['document']['getRootNames']()){const _0x2839a7=this['editor']['editing']['view']['getDomRoot'](_0x5c7913);if(!_0x2839a7)continue;const _0x24a34d=_0x2839a7['getClientRects']()['item'](0x0);_0x24a34d&&(_0x2f9752['push'](_0x5c7913),_0x3c36b9['set'](_0x5c7913,_0x24a34d));}return _0x2f9752['sort']((_0x4135f3,_0x198189)=>{const _0x395b00=_0x3c36b9['get'](_0x4135f3),_0x25cebe=_0x3c36b9['get'](_0x198189);return _0x395b00['y']-_0x25cebe['y']||_0x395b00['x']-_0x25cebe['x'];}),(_0x460c17=_0x460c17['filter'](_0x596840=>_0x2f9752['includes'](_0x596840['rootName'])))['sort']((_0x389eaa,_0x2da7f9)=>_0x2f9752['indexOf'](_0x389eaa['rootName'])-_0x2f9752['indexOf'](_0x2da7f9['rootName'])),_0x460c17;}['_makeTape'](_0x12bdf9){const _0x106626=Array['from'](_0x12bdf9['markers'])['filter'](([_0x597e77,_0x4a044e])=>_0x597e77['startsWith']('revision:')&&!_0x4a044e['isCollapsed']),_0xb345a=Array['from'](this['editor']['model']['createRangeIn'](_0x12bdf9)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x106626['length'])for(const _0x2836e3 of _0xb345a){const [_0x1246e7,_0x424cbc]=_0x106626[0x0],[,_0x1b7181,_0x236eec]=_0x1246e7['split'](':');if(_0x424cbc['end']['isEqual'](_0x2836e3['nextPosition'])&&_0x106626['shift'](),(_0x2836e3['previousPosition']['isEqual'](_0x424cbc['start'])||_0x2836e3['previousPosition']['isAfter'](_0x424cbc['start']))&&('insertion'==_0x1b7181?_0x2836e3['isAdded']={'userId':_0x236eec}:'deletion'==_0x1b7181&&(_0x2836e3['isRemoved']={'userId':_0x236eec})),0x0==_0x106626['length'])break;}return _0xb345a;}['_refreshStartEndIndex'](_0x1947ac){const _0x187d04=new Map();for(let _0x2a5f8d=0x0;_0x2a5f8d<_0x1947ac['length'];_0x2a5f8d++)'text'===_0x1947ac[_0x2a5f8d]['type']?(_0x1947ac[_0x2a5f8d]['item']['startIndex']=_0x2a5f8d,_0x1947ac[_0x2a5f8d]['item']['endIndex']=_0x2a5f8d):('elementStart'===_0x1947ac[_0x2a5f8d]['type']?_0x1947ac[_0x2a5f8d]['item']['startIndex']=_0x2a5f8d:'elementEnd'===_0x1947ac[_0x2a5f8d]['type']&&(_0x1947ac[_0x2a5f8d]['item']['endIndex']=_0x2a5f8d),_0x187d04['set'](_0x1947ac[_0x2a5f8d]['id'],_0x2a5f8d));for(const _0x191303 of _0x187d04['values']())'elementStart'===_0x1947ac[_0x191303]['type']?_0x1947ac[_0x191303]['item']['endIndex']=_0x187d04['get'](_0x1947ac[_0x191303]['pairId']):'elementEnd'===_0x1947ac[_0x191303]['type']&&(_0x1947ac[_0x191303]['item']['startIndex']=_0x187d04['get'](_0x1947ac[_0x191303]['pairId']));}['_processTape'](_0x226d9d){for(let _0x1cdbb6=0x0;_0x1cdbb6<_0x226d9d['length'];_0x1cdbb6++){if('elementStart'===_0x226d9d[_0x1cdbb6]['type'])_0x226d9d[_0x1cdbb6]['item']['startIndex']=_0x1cdbb6;else{if('elementEnd'===_0x226d9d[_0x1cdbb6]['type']){_0x226d9d[_0x1cdbb6]['item']['endIndex']=_0x1cdbb6;const _0x258b52=_0x226d9d[_0x1cdbb6]['item']['startIndex'];_0x226d9d[_0x258b52]['pairId']=_0x226d9d[_0x1cdbb6]['id'],_0x226d9d[_0x1cdbb6]['pairId']=_0x226d9d[_0x258b52]['id'];}else _0x226d9d[_0x1cdbb6]['item']['startIndex']=_0x1cdbb6,_0x226d9d[_0x1cdbb6]['item']['endIndex']=_0x1cdbb6,_0x226d9d[_0x1cdbb6]['pairId']=null;}_0x226d9d[_0x1cdbb6]['markersStart']||(_0x226d9d[_0x1cdbb6]['markersStart']=[],_0x226d9d[_0x1cdbb6]['markersEnd']=[]);}}['_markInsertions'](_0x1b6c2b,_0x597224){const _0x36f118=_0x1b6c2b['filter'](_0x29890f=>!_0x29890f['isAdded']);for(let _0x57de39=0x0;_0x57de39<_0x597224['length'];_0x57de39++)_0x597224[_0x57de39]['isAdded']&&(_0x36f118[_0x57de39]['isAdded']=_0x597224[_0x57de39]['isAdded']);}['_makeModelFromViewString'](_0xb40113){const _0x22df4a=JSON['parse'](_0xb40113),_0x1e0e37=this['editor']['editing']['view']['document'],_0x2fdd2d=new _0x4b1649(_0x1e0e37,_0x22df4a['map'](_0x52f7bd=>this['_getViewObj'](_0x52f7bd)));return this['editor']['data']['toModel'](_0x2fdd2d);}['_getViewObj'](_0xbab652){const _0x335abd=this['editor']['editing']['view']['document'];if('string'==typeof _0xbab652)return new _0x19a85b(_0x335abd,_0xbab652);{const _0x3eadf5=_0xbab652['children']['map'](_0x1ed6c9=>this['_getViewObj'](_0x1ed6c9));return new(Y[_0xbab652['type']]||_0x2eb06d)(_0x335abd,_0xbab652['name'],_0xbab652['attributes'],_0x3eadf5);}}['_getDiff'](_0x47d370,_0x1082d1=null){const _0x1d32f3=this['repository']['getRevision'](_0x47d370),_0x4a8d01=_0x1082d1?this['repository']['getRevision'](_0x1082d1):null,_0x210c6a=this['_getRevisionsRange'](_0x1d32f3,_0x4a8d01),_0xf171e9=_0x210c6a[_0x210c6a['length']-0x1],_0x234356=new Map(),_0xab4afe={'model':{},'attributes':{},'changes':[]},_0xd7b437=new Set(),_0x5bc9cd=new Map();for(let _0x10c5fa=_0x210c6a['length']-0x1;_0x10c5fa>=0x0;_0x10c5fa--){const _0x1ba596=_0x210c6a[_0x10c5fa];for(const _0x20e8ed of Object['keys'](_0x1ba596['diffData']))if(_0x1ba596['diffData'][_0x20e8ed]['attachChange']){const _0xd9b46e=_0x1ba596['diffData'][_0x20e8ed]['attachChange'];_0xd9b46e['isAttached']?(_0xd7b437['add'](_0x20e8ed),_0x5bc9cd['has'](_0x20e8ed)&&_0x5bc9cd['get'](_0x20e8ed)['userId']==_0xd9b46e['userId']?_0x5bc9cd['delete'](_0x20e8ed):_0x5bc9cd['set'](_0x20e8ed,_0xd9b46e)):_0x5bc9cd['has'](_0x20e8ed)?(_0xd7b437['delete'](_0x20e8ed),_0x5bc9cd['delete'](_0x20e8ed)):(_0xd7b437['add'](_0x20e8ed),_0x5bc9cd['set'](_0x20e8ed,_0xd9b46e));}else _0xd7b437['add'](_0x20e8ed);}for(const _0x12a210 of _0xd7b437){const _0x2a47d1=_0x5bc9cd['has'](_0x12a210)&&!_0x5bc9cd['get'](_0x12a210)['isAttached'];let _0x3ca5a3=_0x2a47d1?_0x210c6a['length']-0x1:0x0;const _0x5bf3e8=_0x2a47d1?-0x1:0x1;for(;_0x210c6a[_0x3ca5a3];){const _0x269030=_0x210c6a[_0x3ca5a3];if(_0x269030['diffData'][_0x12a210]){const _0x635d17=_0x2a47d1?_0x269030['diffData'][_0x12a210]['attributesBefore']:_0x269030['diffData'][_0x12a210]['attributesAfter'];_0xab4afe['attributes'][_0x12a210]=_0x635d17?_0x19169d(_0x635d17):{};break;}_0x3ca5a3+=_0x5bf3e8;}}for(const _0x546c07 of _0x210c6a){_0x546c07['model']={};for(const _0x263e7a of _0x546c07['authors'])_0x234356['set'](_0x263e7a['id'],_0x263e7a);for(const _0x23982a of _0xd7b437){const _0x2abd1f=_0x546c07['diffData'][_0x23982a]?_0x546c07['diffData'][_0x23982a]['insertions']:'[]',_0x382ed3=_0x546c07['diffData'][_0x23982a]?_0x546c07['diffData'][_0x23982a]['deletions']:'[]';_0x546c07['model'][_0x23982a]={'insertions':this['_makeModelFromViewString'](_0x2abd1f),'deletions':this['_makeModelFromViewString'](_0x382ed3)};}}for(const _0x5c6713 of _0xd7b437){let _0x49948a=null,_0x3df8d0=0x0;const _0x25cc3e=new Map(Array['from'](_0x1d32f3['model'][_0x5c6713]['insertions']['markers'])['filter'](([_0x4efda3])=>!_0x4efda3['startsWith']('revision:')));let _0x3c68bc=0x0;for(const _0x29b1a6 of _0x210c6a){const _0x3633b8=this['_makeTape'](_0x29b1a6['model'][_0x5c6713]['insertions']);_0x29b1a6==_0x1d32f3?(_0x49948a=_0x3633b8,_0x3df8d0=_0x49948a['length'],_0x49948a['forEach'](_0x59faf8=>{_0x59faf8['id']=_0x3c68bc++;}),this['_processTape'](_0x49948a)):this['_markInsertions'](_0x49948a,_0x3633b8);const _0x52416c=_0x49948a['filter'](_0x523021=>!_0x523021['isAdded'])['map'](_0x1c52c9=>_0x1c52c9['id']);let _0x326db1=0x0;const _0x3fcebc=this['_makeTape'](_0x29b1a6['model'][_0x5c6713]['deletions']);_0x3fcebc['forEach'](_0x37e8d0=>{_0x37e8d0['isRemoved']?_0x37e8d0['id']=_0x3df8d0++:_0x37e8d0['id']=_0x52416c[_0x326db1++];}),this['_processTape'](_0x3fcebc),this['_setDistance'](_0x49948a,'isAdded'),this['_setDistance'](_0x3fcebc,'isRemoved'),_0x29b1a6==_0x1d32f3&&this['_markMarkers'](_0x49948a,_0x25cc3e),_0x49948a=this['_joinTapes'](_0x49948a,_0x3fcebc),this['_refreshStartEndIndex'](_0x49948a),this['_setDistance'](_0x49948a,'isRemoved');}_0x49948a=_0x49948a['filter'](_0x16a886=>!(_0x16a886['isAdded']&&_0x16a886['isRemoved']));const _0x266cc2=new Map(_0xf171e9['model'][_0x5c6713]['deletions']['markers']),_0x361677=new Set(_0x25cc3e['keys']());for(const _0x3eea4e of _0x266cc2['keys']())_0x361677['delete'](_0x3eea4e);this['_markSuggestions'](_0x49948a,_0x361677),this['_fixObsoleteTags'](_0x49948a),_0x49948a=this['_removeMissingPairs'](_0x49948a),_0x49948a=this['_markMismatchedRemovedTags'](_0x49948a),_0x49948a=this['_removeUnsupportedChanges'](_0x49948a);const {root:_0x472922,changes:_0x46bd69}=this['_makeModelFromTape'](_0x49948a,_0x234356,_0x5c6713);_0xab4afe['model'][_0x5c6713]=_0x472922;const _0x3f8d4a=_0x5bc9cd['get'](_0x5c6713);if(_0x3f8d4a){const _0x486625=_0x234356['get'](_0x3f8d4a['userId']),_0x3443e7=new r({'author':_0x486625,'type':_0x3f8d4a['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5c6713});_0x46bd69['unshift'](_0x3443e7),_0xab4afe['attributes'][_0x5c6713]['revisionHistoryAttachChange']=_0x3443e7['id'];}_0xab4afe['changes']=_0xab4afe['changes']['concat'](_0x46bd69);}return _0xab4afe;}['_markMarkers'](_0xb362c0,_0x46dba6){for(let _0x3af911=0x0;_0x3af911<_0xb362c0['length'];_0x3af911++)for(const [_0x58ebb4,_0x558a7e]of _0x46dba6)_0x558a7e['start']['isEqual'](_0xb362c0[_0x3af911]['previousPosition'])&&_0xb362c0[_0x3af911]['markersStart']['push'](_0x58ebb4),_0x558a7e['end']['isEqual'](_0xb362c0[_0x3af911]['nextPosition'])&&_0xb362c0[_0x3af911]['markersEnd']['push'](_0x58ebb4);}['_joinTapes'](_0x4e70d2,_0x195f56){let _0xe3c4a1=[],_0x2d926b=0x0,_0xf7668d=0x0;for(;_0x2d926b<_0x4e70d2['length']||_0xf7668d<_0x195f56['length'];){const _0x504e62=_0x4e70d2[_0x2d926b]||{},_0x10b256=_0x195f56[_0xf7668d]||{};if(_0x504e62['id']==_0x10b256['id'])_0x2d926b++,_0xf7668d++,_0xe3c4a1['push'](_0x504e62);else{if(_0x10b256['isRemoved']&&_0x504e62['isAdded']){const {commonTape:_0x1ae4c9,iEnd:_0x1aa3ea,jEnd:_0x34ae4b}=this['_threeWayMerge'](_0x4e70d2,_0x2d926b,_0x195f56,_0xf7668d);_0xe3c4a1=_0xe3c4a1['concat'](_0x1ae4c9),_0x2d926b=_0x1aa3ea,_0xf7668d=_0x34ae4b;}else _0x10b256['isRemoved']?(_0xf7668d++,_0xe3c4a1['push'](_0x10b256)):(_0x2d926b++,_0xe3c4a1['push'](_0x504e62));}}return _0xe3c4a1;}['_markSuggestions'](_0x1e7c3e,_0x53f244){const _0xa55c38=[];for(let _0x292e3d=0x0;_0x292e3d<_0x1e7c3e['length'];_0x292e3d++){for(let _0x444416=0x0;_0x444416<_0x1e7c3e[_0x292e3d]['markersStart']['length'];_0x444416++){const _0x59aeea=_0x1e7c3e[_0x292e3d]['markersStart'][_0x444416];if(!_0x53f244['has'](_0x59aeea))continue;const {group:_0x383f7c,type:_0x14ab18,authorId:_0x5e6790}=_0x988d8e(_0x59aeea);'revision-suggestion'!=_0x383f7c||'insertion'!=_0x14ab18&&'deletion'!=_0x14ab18||(_0xa55c38['unshift']({'type':_0x14ab18,'name':_0x59aeea,'userId':_0x5e6790}),_0x1e7c3e[_0x292e3d]['markersStart']['splice'](_0x444416,0x1),_0x444416--);}_0xddd628(_0x1e7c3e[_0x292e3d]);for(let _0x2326c7=0x0;_0x2326c7<_0x1e7c3e[_0x292e3d]['markersEnd']['length'];_0x2326c7++){const _0x47ae49=_0x1e7c3e[_0x292e3d]['markersEnd'][_0x2326c7];if(!_0x53f244['has'](_0x47ae49))continue;const {group:_0x36036a,type:_0x546888}=_0x988d8e(_0x47ae49);if('revision-suggestion'!=_0x36036a||'insertion'!=_0x546888&&'deletion'!=_0x546888)continue;_0x1e7c3e[_0x292e3d]['markersEnd']['splice'](_0x2326c7,0x1),_0x2326c7--;const _0x2d7e48=_0xa55c38['findIndex'](_0xaa88da=>_0xaa88da['name']==_0x47ae49);_0x2d7e48>-0x1&&_0xa55c38['splice'](_0x2d7e48,0x1);}}function _0x988d8e(_0x34bd7d){const _0x435b49=_0x34bd7d['split'](':');return{'group':_0x435b49[0x0],'type':_0x435b49[0x1],'subType':_0x435b49['length']>=0x5?_0x435b49[0x2]:null,'id':_0x435b49['length']<0x5?_0x435b49[0x2]:_0x435b49[0x3],'authorId':_0x435b49['length']<0x5?_0x435b49[0x3]:_0x435b49[0x4],'markerCount':0x6==_0x435b49['length']?_0x435b49[0x5]:null};}function _0xddd628(_0x1f78ad){for(let _0x342689=0x0;_0x342689<_0xa55c38['length'];_0x342689++){if(_0x1f78ad['isAdded']&&'insertion'==_0xa55c38[_0x342689]['type'])return _0x1f78ad['isAddSuggestion']=_0xa55c38[_0x342689],void delete _0x1f78ad['isAdded'];if(!_0x1f78ad['isAdded']&&!_0x1f78ad['isRemoved']&&'deletion'==_0xa55c38[_0x342689]['type'])return void(_0x1f78ad['isRemoveSuggestion']=_0xa55c38[_0x342689]);}}}['_setDistance'](_0xdef770,_0x442f66){let _0x48e436=0x0,_0x3dfb4c=!0x1;const _0x3ba6a7=new Map();for(const _0x3685fb of _0xdef770)_0x3685fb[_0x442f66]?_0x3dfb4c&&(_0x48e436++,_0x3dfb4c=!0x1):(_0x48e436++,_0x3dfb4c=!0x0),_0x3ba6a7['set'](_0x3685fb['id'],_0x48e436);for(let _0x253885=0x0;_0x253885<_0xdef770['length'];_0x253885++){if('isRemoved'==_0x442f66&&_0xdef770[_0x253885]['isAdded']||'isAdded'==_0x442f66&&_0xdef770[_0x253885]['isRemoved'])continue;if('text'==_0xdef770[_0x253885]['type']){_0xdef770[_0x253885]['distance']=0x0;continue;}const _0x377765=_0x3ba6a7['get'](_0xdef770[_0x253885]['pairId']),_0xeb1140=_0x3ba6a7['get'](_0xdef770[_0x253885]['id']);_0xdef770[_0x253885]['distance']=_0x377765-_0xeb1140;}}['_getRevisionsRange'](_0x27e983,_0x5eb7fb,_0x32655e=!0x1){const _0x685dd4=[];let _0x5a062b=this['repository']['getIndex'](_0x27e983),_0x2c622a=this['repository']['getIndex'](_0x5eb7fb);for(-0x1==_0x2c622a&&(_0x2c622a=this['repository']['_revisions']['length'],_0x32655e=!0x1);_0x5a062b<_0x2c622a;)_0x685dd4['push'](this['repository']['getRevision'](_0x5a062b)),_0x5a062b++;return _0x32655e&&_0x685dd4['push'](this['repository']['getRevision'](_0x5a062b)),_0x685dd4;}['_threeWayMerge'](_0x4f6141,_0x5c3807,_0x9aeab0,_0x50d853){const _0x45ae53=this['editor']['model']['schema'];let _0x19dbb7=_0x5c3807;for(;_0x4f6141[_0x19dbb7]&&_0x4f6141[_0x19dbb7]['isAdded'];)_0x19dbb7++;let _0x79559d=_0x50d853;for(;_0x9aeab0[_0x79559d]&&_0x9aeab0[_0x79559d]['isRemoved'];)_0x79559d++;_0x5d5bf8(_0x4f6141,_0x5c3807,_0x19dbb7),_0x5d5bf8(_0x9aeab0,_0x50d853,_0x79559d);const _0x4a6311=_0x9aeab0['slice'](_0x50d853,_0x79559d)['concat'](_0x4f6141['slice'](_0x5c3807,_0x19dbb7));return _0x4a6311['sort']((_0x3bc858,_0x36c323)=>_0x3bc858['side']!=_0x36c323['side']?_0x3bc858['side']-_0x36c323['side']:_0x3bc858['level']!=_0x36c323['level']?_0x3bc858['level']-_0x36c323['level']:_0x3bc858['distance']!=_0x36c323['distance']?_0x36c323['distance']-_0x3bc858['distance']:!!_0x3bc858['isAdded']!=!!_0x36c323['isAdded']?-0x1==_0x3bc858['side']||0x0==_0x3bc858['side']?_0x3bc858['isAdded']?-0x1:0x1:_0x3bc858['isAdded']?0x1:-0x1:_0x3bc858['index']-_0x36c323['index']),{'commonTape':_0x4a6311,'iEnd':_0x19dbb7,'jEnd':_0x79559d};function _0x5d5bf8(_0x50a91a,_0x31b95d,_0x2214c0){let _0xf44178=-0x1,_0x3df30c=Number['POSITIVE_INFINITY'],_0xdb789a=!0x0;for(let _0x3d8d7f=_0x31b95d;_0x3d8d7f<_0x2214c0;_0x3d8d7f++)if(_0x45ae53['isInline'](_0x50a91a[_0x3d8d7f]['item'])||(_0xdb789a=!0x1),_0x50a91a[_0x3d8d7f]['item']['startIndex']<_0x31b95d&&(_0xf44178=_0x3d8d7f),_0x50a91a[_0x3d8d7f]['item']['endIndex']>=_0x2214c0){_0x3df30c=_0x3d8d7f;break;}_0xdb789a&&(_0xf44178=_0x2214c0-0x1);for(let _0x1e0f17=_0x31b95d;_0x1e0f17<_0x2214c0;_0x1e0f17++)_0x50a91a[_0x1e0f17]['side']=_0x1e0f17<=_0xf44178?-0x1:_0x1e0f17<_0x3df30c?0x0:0x1,_0x50a91a[_0x1e0f17]['index']=_0x1e0f17;let _0xc1fbbc=0x0;for(let _0x1a52ce=_0x31b95d;_0x1a52ce<=_0xf44178;_0x1a52ce++)0x0==_0x50a91a[_0x1a52ce]['distance']?_0x50a91a[_0x1a52ce]['level']=_0xc1fbbc:(_0xc1fbbc++,_0x50a91a[_0x1a52ce]['level']=_0xc1fbbc,_0xc1fbbc++);for(let _0x298d2e=_0x31b95d;_0x298d2e<_0x2214c0;_0x298d2e++)0x0==_0x50a91a[_0x298d2e]['side']&&(_0x50a91a[_0x298d2e]['level']=_0xc1fbbc);_0xc1fbbc=0x0;for(let _0x1ae390=_0x2214c0-0x1;_0x1ae390>=_0x3df30c;_0x1ae390--)0x0==_0x50a91a[_0x1ae390]['distance']?_0x50a91a[_0x1ae390]['level']=_0xc1fbbc:(_0xc1fbbc--,_0x50a91a[_0x1ae390]['level']=_0xc1fbbc,_0xc1fbbc--);}}['_fixObsoleteTags'](_0x5ab1de){const _0x4a0019=new Map(),_0x385f67=this['editor']['model']['schema'];for(let _0x80bdd=0x1;_0x80bdd<_0x5ab1de['length'];_0x80bdd++){let _0x3cb926,_0x3e12d7,_0x231949;const _0x3a2a7d=_0x5ab1de[_0x80bdd],_0x20c2bc=_0x5ab1de[_0x80bdd-0x1];if('text'==_0x3a2a7d['type'])continue;if(_0x3a2a7d['type']!=_0x20c2bc['type'])continue;if(!_0x385f67['isBlock'](_0x20c2bc['item'])||_0x385f67['isLimit'](_0x20c2bc['item']))continue;if(!_0x385f67['isBlock'](_0x3a2a7d['item'])||_0x385f67['isLimit'](_0x3a2a7d['item']))continue;if((_0x5ab1de[_0x80bdd]['isAdded']||_0x5ab1de[_0x80bdd]['isAddSuggestion'])&&_0x5ab1de[_0x80bdd-0x1]['isRemoved'])_0x3cb926=_0x5ab1de[_0x80bdd],_0x3e12d7=_0x5ab1de[_0x80bdd-0x1],_0x231949=_0x80bdd-0x1;else{if(!_0x5ab1de[_0x80bdd]['isRemoved']||!_0x5ab1de[_0x80bdd-0x1]['isAdded']&&!_0x5ab1de[_0x80bdd-0x1]['isAddSuggestion'])continue;_0x3cb926=_0x5ab1de[_0x80bdd-0x1],_0x3e12d7=_0x5ab1de[_0x80bdd],_0x231949=_0x80bdd;}const _0x464416=_0x3cb926['level']==_0x3e12d7['level'],_0x570c59=Math['abs'](_0x3cb926['level'])<Math['abs'](_0x3e12d7['level'])&&0x0==_0x3e12d7['distance'];(_0x464416||_0x570c59)&&(_0x4a0019['set'](_0x3e12d7['id'],_0x3cb926['id']),_0x5ab1de['splice'](_0x231949,0x1),_0x80bdd--,_0x3cb926['isAdded']=!0x1);}for(let _0x2ff6fa=0x0;_0x2ff6fa<_0x5ab1de['length'];_0x2ff6fa++)_0x4a0019['has'](_0x5ab1de[_0x2ff6fa]['pairId'])&&(_0x5ab1de[_0x2ff6fa]['pairId']=_0x4a0019['get'](_0x5ab1de[_0x2ff6fa]['pairId']));}['_removeMissingPairs'](_0x1862bc){const _0xd2c51d=new Set(_0x1862bc['map'](_0x338535=>_0x338535['id']));for(let _0x5f51e7=0x0;_0x5f51e7<_0x1862bc['length'];_0x5f51e7++)_0xd2c51d['has'](_0x1862bc[_0x5f51e7]['pairId'])||0x0==_0x1862bc[_0x5f51e7]['distance']||(_0x1862bc[_0x5f51e7]['isIncorrect']=!0x0);return _0x1862bc['filter'](_0x2ad09e=>!_0x2ad09e['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2847f3){const _0x53994f=new Set();for(let _0x28b5a8=0x0;_0x28b5a8<_0x2847f3['length'];_0x28b5a8++){if(_0x53994f['has'](_0x2847f3[_0x28b5a8]['id'])&&_0x2847f3[_0x28b5a8]['isRemoved']&&(_0x2847f3[_0x28b5a8]['isIncorrect']=!0x0),_0x2847f3[_0x28b5a8]['isIncorrect'])continue;if(0x0==_0x2847f3[_0x28b5a8]['distance'])continue;if('elementStart'!=_0x2847f3[_0x28b5a8]['type'])continue;if(null==_0x2847f3[_0x28b5a8]['pairId'])continue;let _0x3c2b46=_0x28b5a8+0x1,_0x404065=0x0;for(;_0x2847f3[_0x3c2b46]['id']!=_0x2847f3[_0x28b5a8]['pairId'];)'elementStart'==_0x2847f3[_0x3c2b46]['type']?_0x404065++:'elementEnd'==_0x2847f3[_0x3c2b46]['type']&&_0x404065--,_0x3c2b46++;if(0x0!=_0x404065){if(_0x2847f3[_0x28b5a8]['isRemoved'])_0x2847f3[_0x28b5a8]['isIncorrect']=!0x0;else{for(;_0x3c2b46!=_0x28b5a8;)_0x2847f3[_0x3c2b46]['isRemoved']&&0x0!=_0x2847f3[_0x3c2b46]['distance']&&(_0x2847f3[_0x3c2b46]['isIncorrect']=!0x0,_0x53994f['add'](_0x2847f3[_0x3c2b46]['pairId'])),_0x3c2b46--;}}}return _0x2847f3['filter'](_0x975f28=>!_0x975f28['isIncorrect']);}['_removeUnsupportedChanges'](_0x2e6510){const _0x55265b=this['editor']['model']['schema'];for(let _0x26c31a=0x0;_0x26c31a<_0x2e6510['length'];_0x26c31a++){if(!(_0x2e6510[_0x26c31a]['isAdded']||_0x2e6510[_0x26c31a]['isAddSuggestion']||_0x2e6510[_0x26c31a]['isRemoved']||_0x2e6510[_0x26c31a]['isRemoveSuggestion']))continue;if(0x0==_0x2e6510[_0x26c31a]['distance'])continue;const _0x539f25=_0x2e6510[_0x26c31a]['item'];_0x55265b['isBlock'](_0x539f25)||_0x55265b['isLimit'](_0x539f25)||(_0x2e6510[_0x26c31a]['isAdded']&&delete _0x2e6510[_0x26c31a]['isAdded'],_0x2e6510[_0x26c31a]['isAddSuggestion']&&delete _0x2e6510[_0x26c31a]['isAddSuggestion'],_0x2e6510[_0x26c31a]['isRemoveSuggestion']&&delete _0x2e6510[_0x26c31a]['isRemoveSuggestion'],_0x2e6510[_0x26c31a]['isRemoved']&&(_0x2e6510[_0x26c31a]['isIncorrect']=!0x0));}return _0x2e6510['filter'](_0x418170=>!_0x418170['isIncorrect']);}['_makeModelFromTape'](_0x3f2568,_0x445552,_0x51e66e){const _0x3bbb41=new mt(),_0xcfb75a=[],_0x1d81cd=new Map(),_0x3da81e=this['editor']['model'],_0x273db2=_0x3da81e['schema'],_0x44be85=[_0x3bbb41],_0x1a63b4={},_0x24d11f={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0xa6f658=null;const _0x29a76c=[0x0];for(let _0x299d88=0x0;_0x299d88<_0x3f2568['length'];_0x299d88++)if('elementStart'===_0x3f2568[_0x299d88]['type']){_0x3f2568[_0x299d88]['previousPosition']=_0x3da81e['createPositionFromPath'](_0x3bbb41,_0x29a76c);const _0x12f9a9=new ft(_0x3f2568[_0x299d88]['item']['name'],_0x3f2568[_0x299d88]['item']['getAttributes']());_0x44be85[0x0]['_appendChild'](_0x12f9a9),_0x29a76c['push'](0x0),_0x44be85['unshift'](_0x12f9a9),_0x3f2568[_0x299d88]['nextPosition']=_0x3da81e['createPositionFromPath'](_0x3bbb41,_0x29a76c);}else'elementEnd'===_0x3f2568[_0x299d88]['type']?(_0x44be85['shift'](),_0x3f2568[_0x299d88]['previousPosition']=_0x3da81e['createPositionFromPath'](_0x3bbb41,_0x29a76c),_0x29a76c['pop'](),_0x29a76c[_0x29a76c['length']-0x1]++,_0x3f2568[_0x299d88]['nextPosition']=_0x3da81e['createPositionFromPath'](_0x3bbb41,_0x29a76c)):(_0x3f2568[_0x299d88]['previousPosition']=_0x3da81e['createPositionFromPath'](_0x3bbb41,_0x29a76c),_0xa6f658?_0xa6f658['_data']+=_0x3f2568[_0x299d88]['item']['data']:_0xa6f658=new wt(_0x3f2568[_0x299d88]['item']['data'],_0x3f2568[_0x299d88]['item']['getAttributes']()),_0x3f2568[_0x299d88+0x1]&&'text'===_0x3f2568[_0x299d88+0x1]['type']&&_0x194db5(_0xa6f658,_0x3f2568[_0x299d88+0x1]['item'])||(_0x44be85[0x0]['_appendChild'](_0xa6f658),_0xa6f658=null),_0x29a76c[_0x29a76c['length']-0x1]+=_0x3f2568[_0x299d88]['item']['offsetSize'],_0x3f2568[_0x299d88]['nextPosition']=_0x3da81e['createPositionFromPath'](_0x3bbb41,_0x29a76c));for(let _0x3c5f09=0x0;_0x3c5f09<_0x3f2568['length'];_0x3c5f09++){const _0x245a65=_0x3f2568[_0x3c5f09]['previousPosition'],_0x115af6=_0x3f2568[_0x3c5f09]['nextPosition'];for(const _0x2e7c0c of _0x3f2568[_0x3c5f09]['markersStart'])_0x1d81cd['set'](_0x2e7c0c,{'start':_0x245a65,'end':null});_0x300241('isRemoveSuggestion',_0x3c5f09,_0x245a65,_0x115af6),_0x300241('isAddSuggestion',_0x3c5f09,_0x245a65,_0x115af6),_0x300241('isRemoved',_0x3c5f09,_0x245a65,_0x115af6),_0x300241('isAdded',_0x3c5f09,_0x245a65,_0x115af6);for(const _0x195c89 of _0x3f2568[_0x3c5f09]['markersEnd']){_0x1d81cd['get'](_0x195c89)['end']=_0x115af6;}}for(const [_0x59dd0e,_0x5282de]of _0x1d81cd){const _0x4c9161=this['editor']['model']['createRange'](_0x5282de['start'],_0x5282de['end']);_0x3bbb41['markers']['set'](_0x59dd0e,_0x4c9161);}return _0xcfb75a['sort']((_0x19a071,_0x2134fb)=>{const _0x4aac79=_0x3bbb41['markers']['get']('revision:'+_0x19a071['id']),_0x56b5ce=_0x3bbb41['markers']['get']('revision:'+_0x2134fb['id']);return _0x4aac79['start']['isBefore'](_0x56b5ce['start'])?-0x1:_0x4aac79['start']['isAfter'](_0x56b5ce['start'])?0x1:_0x4aac79['end']['isBefore'](_0x56b5ce['end'])?-0x1:_0x4aac79['end']['isAfter'](_0x56b5ce['end'])?0x1:'add'===_0x19a071['type']?-0x1:0x1;}),{'root':_0x3bbb41,'changes':_0xcfb75a};function _0x300241(_0x18e202,_0x482673,_0x314696,_0x2675f4){const _0x2b48c0=!!_0x3f2568[_0x482673][_0x18e202],_0x35f795=_0x2b48c0?_0x3f2568[_0x482673][_0x18e202]['userId']:null,_0x125efb=_0x482673===_0x3f2568['length']-0x1,_0x170744=_0x24d11f[_0x18e202][0x0],_0x1060df=_0x273db2['isObject'](_0x3f2568[_0x482673]['item']);!_0x1a63b4[_0x18e202]&&_0x2b48c0?_0x1a63b4[_0x18e202]={'start':_0x314696,'tapeItem':_0x3f2568[_0x482673],'userId':_0x35f795,'type':_0x18e202}:_0x1a63b4[_0x18e202]&&!_0x2b48c0?(_0x1a63b4[_0x18e202]['end']=_0x314696,_0x548f6c(_0x1a63b4[_0x18e202]),_0x1a63b4[_0x18e202]=null):_0x1a63b4[_0x18e202]&&_0x2b48c0&&_0x1a63b4[_0x18e202]['userId']!==_0x35f795&&(_0x1a63b4[_0x18e202]['end']=_0x314696,_0x170744&&_0x170744['userId']===_0x1a63b4[_0x18e202]['userId']||_0x548f6c(_0x1a63b4[_0x18e202]),_0x1a63b4[_0x18e202]={'start':_0x314696,'tapeItem':_0x3f2568[_0x482673],'userId':_0x35f795,'type':_0x18e202}),_0x1a63b4[_0x18e202]&&_0x1060df&&('elementStart'!==_0x3f2568[_0x482673]['type']||_0x170744&&_0x170744['userId']===_0x35f795||_0x24d11f[_0x18e202]['unshift']({'userId':_0x35f795,'object':_0x3f2568[_0x482673]['item'],'change':_0x1a63b4[_0x18e202]}),'elementEnd'===_0x3f2568[_0x482673]['type']&&_0x170744&&_0x170744['object']===_0x3f2568[_0x482673]['item']&&(_0x24d11f[_0x18e202]['shift'](),_0x1a63b4[_0x18e202]=_0x170744['change'])),_0x1a63b4[_0x18e202]&&_0x125efb&&(_0x1a63b4[_0x18e202]['end']=_0x2675f4,_0x548f6c(_0x1a63b4[_0x18e202]),_0x1a63b4[_0x18e202]=null);}function _0x548f6c({start:_0x4f1b4e,end:_0x3cbe4e,tapeItem:_0x56f107,userId:_0x553b74,type:_0x46e13a}){const _0xb0706b=_0x56f107['item'],_0xca045c=_0x3da81e['schema']['isBlock'](_0xb0706b)&&!_0x3da81e['schema']['isLimit'](_0xb0706b),_0x76492d=_0x4f1b4e['nodeAfter']==_0x3cbe4e['parent']&&_0x3cbe4e['isAtStart'];if(_0xca045c&&_0x76492d)return;const _0x2d9f43=_0x3da81e['createRange'](_0x4f1b4e,_0x3cbe4e),_0x5597ba=_0x445552['get'](_0x553b74),_0x4d1c68=new r({'author':_0x5597ba,'type':'isAdded'==_0x46e13a||'isAddSuggestion'==_0x46e13a?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x46e13a||'isRemoveSuggestion'==_0x46e13a},'createdAt':new Date(),'rootName':_0x51e66e});_0xcfb75a['push'](_0x4d1c68),_0x3bbb41['markers']['set']('revision:'+_0x4d1c68['id'],_0x2d9f43);}function _0x194db5(_0x5a1f57,_0x2cc54e){const _0x47c3c2=_0x5a1f57['getAttributes'](),_0x85171a=_0x2cc54e['getAttributes']();for(const _0x3c11c0 of _0x47c3c2){if(_0x3c11c0[0x1]!==_0x2cc54e['getAttribute'](_0x3c11c0[0x0]))return!0x1;_0x85171a['next']();}return _0x85171a['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3bde31=>{const _0x1447cf=_0x3bde31['markerName']['split'](':')[0x1],_0x3ec2eb=this['_getChangeFromId'](_0x1447cf);if(!_0x3ec2eb)return null;const _0x271fe0='add'==_0x3ec2eb['type']?'insertion':'deletion',_0x2b2ed5=['ck-suggestion-marker','ck-suggestion-marker-'+_0x271fe0];return _0x3ec2eb['data']['isSuggestion']&&_0x2b2ed5['push']('ck-suggestion-marker-'+_0x271fe0+'-new'),this['activeChange']==_0x3ec2eb&&_0x2b2ed5['push']('ck-suggestion-marker--active'),{'classes':_0x2b2ed5,'attributes':{'data-change-id':_0x1447cf}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3ca0bd=>{_0x3ca0bd['on']('element:pre',(_0x4a8649,_0xbab003,_0x18dd15)=>{const _0x331f09=_0xbab003['viewItem']['getChild'](0x0);if(!_0x331f09||!_0x331f09['is']('element','code'))return;if(!_0x18dd15['consumable']['consume'](_0x331f09,{'attributes':['vid_start','vid_end']}))return;const _0x18bb0d=_0xbab003['modelRange']['start']['nodeAfter'];_0x18dd15['writer']['setAttribute']('vid_start',_0x331f09['getAttribute']('vid_start'),_0x18bb0d),_0x18dd15['writer']['setAttribute']('vid_end',_0x331f09['getAttribute']('vid_end'),_0x18bb0d);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x388a4a=>{_0x388a4a['on']('element',(_0x441b2e,_0x55a028,_0x422c95)=>{if(!_0x422c95['consumable']['consume'](_0x55a028['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x55a028['modelRange']['isCollapsed'])return;const _0x8718ea=_0x55a028['modelRange']['start']['nodeAfter'];_0x8718ea['hasAttribute']('vid_start')||_0x8718ea['hasAttribute']('vid')||(_0x422c95['writer']['setAttribute']('vid_start',_0x55a028['viewItem']['getAttribute']('vid_start'),_0x8718ea),_0x422c95['writer']['setAttribute']('vid_end',_0x55a028['viewItem']['getAttribute']('vid_end'),_0x8718ea));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x166c71=>_0x166c71['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x230966,[,_0x313d63])=>{['vid_start','vid_end','vid']['includes'](_0x313d63)&&(_0x230966['return']=!0x0,_0x230966['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x47662f=>{_0x47662f['on']('attribute:vid',(_0x12e8e3,_0x3d6033,_0x21224d)=>{if('\x20'!=_0x3d6033['item']['data']||_0x3d6033['item']['parent']['maxOffset']>0x1)return;if(!_0x21224d['consumable']['consume'](_0x3d6033['item'],_0x12e8e3['name']))return;const _0x15468a=_0x21224d['writer'],_0x3d226b=_0x21224d['mapper']['toViewRange'](_0x3d6033['range']);_0x15468a['wrap'](_0x3d226b,_0x15468a['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x58363d){const _0x4067ec=_0x58363d['plugins']['get']('RevisionViewer');return(_0x1eca6c,_0x3e02af,_0x2b85dc)=>{const _0x460917=_0x3e02af['markerName']['split'](':')[0x1],_0x789ab8=_0x4067ec['_getChangeFromId'](_0x460917);if(!_0x789ab8)return null;const _0x21d68d='add'==_0x789ab8['type']?'split':'merge';if(!_0x2b85dc['consumable']['test'](_0x3e02af['markerRange'],_0x1eca6c['name']))return;const _0x2bd3df=_0x3e02af['markerRange']['getWalker'](),_0x2b0988=_0x3e02af['markerRange']['start'],_0x3c99e8=_0x58363d['model']['schema'];let _0x1906de=null,_0x2e069e=null,_0x15d1d9=!0x1,_0x146f81=!0x1;for(const _0x11f57a of _0x2bd3df){const _0x189af8=_0x11f57a['item'];_0x15d1d9=_0x15d1d9||_0x3c99e8['isContent'](_0x189af8);const _0x279a82=_0x2b85dc['mapper']['toViewElement'](_0x189af8);if(_0x279a82&&_0x279a82['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x11f57a['type']&&(_0x3c99e8['isBlock'](_0x189af8)&&!_0x3c99e8['isLimit'](_0x189af8)&&(_0x189af8['nextSibling']||_0x2b0988['isAtEnd']?_0x1906de&&_0x1906de['parent']==_0x189af8||(_0x1906de=_0x189af8,_0x4b29c2(_0x11f57a['previousPosition']),_0x146f81=!0x0):_0x2e069e=_0x2e069e||_0x11f57a['previousPosition']));}function _0x4b29c2(_0x3dc36b){const _0x103518=_0x2b85dc['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x21d68d}),_0x246851=_0x2b85dc['mapper']['toViewPosition'](_0x3dc36b);_0x789ab8['data']['isSuggestion']&&_0x2b85dc['writer']['addClass']('ck-suggestion-marker-'+_0x21d68d+'-new',_0x103518),_0x4067ec['activeChange']==_0x789ab8&&_0x2b85dc['writer']['addClass']('ck-suggestion-marker--active',_0x103518),_0x2b85dc['writer']['insert'](_0x246851,_0x103518),_0x2b85dc['mapper']['bindElementToMarker'](_0x103518,_0x3e02af['markerName']);}_0x15d1d9||_0x146f81||!_0x2e069e||_0x4b29c2(_0x2e069e);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x14ff65,_0x339558,_0x5de7ad)=>{const _0x42f566=_0x5de7ad['mapper']['markerNameToElements'](_0x339558['markerName']);if(_0x42f566){for(const _0xdcb617 of _0x42f566)(_0xdcb617['hasClass']('ck-suggestion-marker-split')||_0xdcb617['hasClass']('ck-suggestion-marker-merge'))&&(_0x5de7ad['mapper']['unbindElementFromMarkerName'](_0xdcb617,_0x339558['markerName']),_0x5de7ad['writer']['remove'](_0xdcb617));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4137eb,_0x2ff635,_0x5381a8)=>{const _0x200faa=_0x2ff635['markerName']['split'](':')[0x1],_0x18bc0e=this['_getChangeFromId'](_0x200faa);if(!_0x18bc0e)return null;const _0x149a64='add'==_0x18bc0e['type']?'split':'merge';if(_0x5381a8['consumable']['test'](_0x2ff635['markerRange'],_0x4137eb['name']))for(const _0x5de8fe of _0x2ff635['markerRange']['getItems']()){if(!_0x5de8fe['is']('element','softBreak'))continue;const _0x27b9b9=_0x5381a8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x149a64}),_0x39422d=_0x5381a8['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5de8fe));_0x18bc0e['data']['isSuggestion']&&_0x5381a8['writer']['addClass']('ck-suggestion-marker-'+_0x149a64+'-new',_0x27b9b9),this['activeChange']==_0x18bc0e&&_0x5381a8['writer']['addClass']('ck-suggestion-marker--active',_0x27b9b9),_0x5381a8['writer']['insert'](_0x39422d,_0x27b9b9),_0x5381a8['mapper']['bindElementToMarker'](_0x27b9b9,_0x2ff635['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2361e5=>{for(const _0x5dfd0b of this['editor']['model']['document']['getRootNames']()){const _0x7540af=this['editor']['model']['document']['getRoot'](_0x5dfd0b),_0x1373b9=this['editor']['editing']['view']['document']['getRoot'](_0x5dfd0b);if(_0x1373b9){const _0x446b61=_0x7540af['getAttribute']('revisionHistoryAttachChange');if(_0x2361e5['removeAttribute']('data-change-id',_0x1373b9),_0x2361e5['removeClass']('ck-revision-history-root-add',_0x1373b9),_0x2361e5['removeClass']('ck-revision-history-root-remove',_0x1373b9),_0x2361e5['removeClass']('ck-revision-history-root--active',_0x1373b9),_0x446b61){const _0x1c4ee8=this['_getChangeFromId'](_0x446b61);if(!_0x1c4ee8)return null;_0x2361e5['setAttribute']('data-change-id',_0x446b61,_0x1373b9),_0x2361e5['addClass']('ck-revision-history-root-'+_0x1c4ee8['type'],_0x1373b9),this['activeChange']==_0x1c4ee8&&_0x2361e5['addClass']('ck-revision-history-root--active',_0x1373b9);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x133b6b=>'revision-comment:'+_0x133b6b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x17cde6=>'revision-suggestion:'+_0x17cde6,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x12f169=>({'name':'suggestion:'+_0x12f169,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5b00f7=>{const _0x57fc22=_0x5b00f7['markerName']['split'](':')[0x1];return'insertion'!=_0x57fc22&&'deletion'!=_0x57fc22?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x57fc22]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x15ea97,_0x1e5abc,_0x11e661)=>{const _0x5ac769=_0x11e661['mapper']['markerNameToElements'](_0x1e5abc['markerName']);if(_0x5ac769){for(const _0x59901f of _0x5ac769)_0x59901f['is']('uiElement')&&(_0x11e661['mapper']['unbindElementFromMarkerName'](_0x59901f,_0x1e5abc['markerName']),_0x11e661['writer']['remove'](_0x59901f));}},{'priority':'high'});}['_getChangeFromId'](_0x3ba9fb){return this['_changeIdToChange']['get'](_0x3ba9fb);}['_getViewForChange'](_0x14ab96){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x14ab96),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x56d8a0,_0x342646,_0x49ce4b,_0x3c13f4)=>{_0x3c13f4&&this['_balloon']['remove'](_0x3c13f4),_0x49ce4b&&(this['_balloon']['add']({'view':_0x49ce4b,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1e4338=this['editor']['editing'],_0x38135d=this['_getChangeFromId'](_0x49ce4b['changeId']);let _0x3c07f0;if(_0x38135d['data']['isOnRoot']){const _0x2ba1d3=_0x1e4338['view']['getDomRoot'](_0x38135d['rootName']);_0x3c07f0=Array['from'](_0x2ba1d3['getClientRects']());}else{const _0x43f92=this['editor']['model']['markers']['get']('revision:'+_0x49ce4b['changeId']);_0x3c07f0=Array['from'](_0x1e4338['mapper']['markerNameToElements'](_0x43f92['name']))['map'](_0x6fd274=>_0x1e4338['view']['domConverter']['mapViewToDom'](_0x6fd274))['map'](_0x460aa6=>Array['from'](_0x460aa6['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x3c07f0[0x0];return _0x3c07f0['find'](_0x3eafdf=>_0x3eafdf['top']-0x3<=this['_activeViewTarget']['y']&&_0x3eafdf['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3eafdf['left']-0x3<=this['_activeViewTarget']['x']&&_0x3eafdf['right']+0x3>=this['_activeViewTarget']['x'])||_0x3c07f0[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x544813,_0x2a7935,_0x3e7401,_0x8d93eb)=>{this['activeView']=_0x3e7401?this['_getViewForChange'](_0x3e7401):null,this['editor']['model']['change'](()=>{const _0x5504c3=this['editor']['editing'];_0x8d93eb&&(_0x8d93eb['data']['isOnRoot']?_0x5504c3['view']['change'](_0x4ff0e6=>{_0x4ff0e6['removeClass']('ck-revision-history-root--active',_0x5504c3['view']['document']['getRoot'](_0x8d93eb['rootName']));}):_0x5504c3['reconvertMarker']('revision:'+_0x8d93eb['id'])),_0x3e7401&&(_0x3e7401['data']['isOnRoot']?_0x5504c3['view']['change'](_0x3d43d4=>{_0x3d43d4['addClass']('ck-revision-history-root--active',_0x5504c3['view']['document']['getRoot'](_0x3e7401['rootName']));}):_0x5504c3['reconvertMarker']('revision:'+_0x3e7401['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x45fb89,_0x13cb05)=>{if(this['activeChange'])return;const _0x2e6c56=this['_findChangeIdFromDomTarget'](_0x13cb05['target']),_0x409ac5=this['_changeIdToChange']['get'](_0x2e6c56);_0x409ac5?(this['_activeViewTarget']={'x':_0x13cb05['domEvent']['x'],'y':_0x13cb05['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x409ac5)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x154032,_0x3905cc)=>{const _0x3e5350=this['_findChangeIdFromDomTarget'](_0x3905cc['target']),_0x55ff16=this['_changeIdToChange']['get'](_0x3e5350);_0x55ff16?(this['_activeViewTarget']={'x':_0x3905cc['domEvent']['x'],'y':_0x3905cc['domEvent']['y']},_0x55ff16===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x55ff16):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x4031d8){do{const _0x380215=_0x4031d8['getAttribute']('data-change-id');if(_0x380215)return _0x380215;_0x4031d8=_0x4031d8['parent'];}while(_0x4031d8);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x7c3f98=>{for(const _0x122ad8 of this['editor']['model']['markers'])_0x7c3f98['removeMarker'](_0x122ad8);});}}function Z(_0x468496,_0x17be3a){return(_0x133f40,_0xfe6480,_0x1b0636)=>{if(!_0x1b0636['consumable']['test'](_0xfe6480['markerRange'],_0x133f40['name']))return;const _0x15a3fa=_0xfe6480['markerRange']['getWalker'](),_0x5203fb=_0xfe6480['markerRange']['start'],_0x43f9b5=_0x468496['model']['schema'];let _0x2bf5b9=null,_0xaba5a3=null,_0x5688d0=!0x1,_0x469b0c=!0x1;for(const _0x55a0fa of _0x15a3fa){const _0x129f5a=_0x55a0fa['item'];_0x5688d0=_0x5688d0||_0x43f9b5['isContent'](_0x129f5a);const _0x577df2=_0x1b0636['mapper']['toViewElement'](_0x129f5a);if(_0x577df2&&_0x577df2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x55a0fa['type']&&(_0x43f9b5['isBlock'](_0x129f5a)&&!_0x43f9b5['isLimit'](_0x129f5a)&&(_0x129f5a['nextSibling']||_0x5203fb['isAtEnd']?_0x2bf5b9&&_0x2bf5b9['parent']==_0x129f5a||(_0x2bf5b9=_0x129f5a,_0x231c10(_0x55a0fa['previousPosition']),_0x469b0c=!0x0):_0xaba5a3=_0xaba5a3||_0x55a0fa['previousPosition']));}function _0x231c10(_0x4d03d9){const _0x4f809e=_0x1b0636['mapper']['toViewPosition'](_0x4d03d9),_0x4da628=_0x1b0636['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x17be3a});_0x1b0636['writer']['insert'](_0x4f809e,_0x4da628),_0x1b0636['mapper']['bindElementToMarker'](_0x4da628,_0xfe6480['markerName']);}_0x5688d0||_0x469b0c||!_0xaba5a3||_0x231c10(_0xaba5a3);};}class _t extends _0x170fd1{constructor(_0x3c7d6c){super(_0x3c7d6c);const _0x28b9d4=_0x3c7d6c['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x28b9d4,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x28b9d4,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3171ee=this['editor'],_0x195488=_0x3171ee['plugins']['get'](d),_0x2f88a7=_0x195488['isReady']?_0x195488['diff']['newRevisionId']:null;_0x3171ee['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2f88a7);}['refresh'](){const {isReady:_0x2fa5b8,isEnabled:_0x256c02,repository:_0x5194f8,diff:_0x475475}=this['editor']['plugins']['get'](d),_0xfd0e1b=_0x475475&&_0x5194f8['getLaterVisibleRevision'](_0x475475['newRevisionId']);this['isEnabled']=_0x2fa5b8&&_0x256c02&&Boolean(_0xfd0e1b);}}class yt extends _0x170fd1{['_step'];constructor(_0x4f2f4e,{direction:_0xf4275}){super(_0x4f2f4e);const _0xf0b8b9=_0x4f2f4e['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0xf4275?0x1:-0x1,this['listenTo'](_0xf0b8b9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xf0b8b9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xf0b8b9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2b3350=this['editor'],_0x3c6e5b=_0x2b3350['plugins']['get'](d),{isNavigationMode:_0x77cf53,currentChangeNumber:_0x40b5a8}=_0x3c6e5b;let _0x43d2ed;if(_0x3c6e5b['activeChange']=_0x77cf53?_0x3c6e5b['diff']['changes']['get'](_0x40b5a8+this['_step']):_0x3c6e5b['diff']['changes']['first'],_0x3c6e5b['activeChange']['data']['isOnRoot'])_0x43d2ed=_0x2b3350['editing']['view']['getDomRoot'](_0x3c6e5b['activeChange']['rootName']);else{const _0x194a96=_0x2b3350['model']['markers']['get']('revision:'+_0x3c6e5b['activeChange']['id']);_0x43d2ed=_0x37b12f(_0x2b3350['editing'],_0x194a96);}_0x3a19dc({'target':_0x43d2ed,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xfd84b5,currentChangeNumber:_0x4f00a8,numberOfChanges:_0x1cba2e,isReady:_0x1f92a2,isEnabled:_0x30f12e}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x30f12e&&_0x1f92a2&&_0x1cba2e)&&(!_0xfd84b5||(0x1===this['_step']?_0x4f00a8<_0x1cba2e-0x1:_0x4f00a8>0x0));}}class di extends _0x3d574f{constructor(_0x48f94b){super(_0x48f94b);const _0x271d65=this['bindTemplate'],_0xae72cc=new _0x5f20b0(_0x48f94b),_0x326806=new _0x5f20b0(_0x48f94b);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',(_0x5b8e6a,_0x36a6dc)=>_0x5b8e6a&&_0x36a6dc>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2c4283,_0x69c481,_0x1ebcf0,_0x361848)=>{if(!_0x2c4283)return m(_0x48f94b,'Loading...');if(!_0x1ebcf0)return m(_0x48f94b,'No\x20changes');const _0x3a87f3=m(_0x48f94b,'NUMBER_OF_CHANGES',_0x1ebcf0);return _0x361848?m(_0x48f94b,'X_OF_Y_CHANGES',[_0x69c481+0x1,_0x1ebcf0]):_0x3a87f3;}),_0xae72cc['set']({'label':m(_0x48f94b,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x326806['set']({'label':m(_0x48f94b,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0xae72cc['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x326806['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xae72cc['on']('execute',()=>this['fire']('execute','backward')),_0x326806['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',_0x271d65['if']('_isStatusLabelVisible','ck-hidden',_0x206ac8=>!_0x206ac8)]},'children':[{'text':_0x271d65['to']('isNavigationMode',_0x51761a=>_0x51761a?m(_0x48f94b,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x48f94b,'Total')+':\x20')}]},{'text':_0x271d65['to']('_statusText')}]},new _0x3aa6f0(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xae72cc,_0x326806]}]});}}const ce='ck-editor__editable__loading-overlay';class ae extends _0x4dc320{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2bae0d=this['editor']['editing']['view'];_0x2bae0d['change'](_0x1da036=>{for(const _0x153efe of _0x2bae0d['document']['roots'])_0x1da036['addClass'](ce,_0x153efe);});}['hide'](){const _0x4ee177=this['editor']['editing']['view'];_0x4ee177['change'](_0x3b351b=>{for(const _0x3ac288 of _0x4ee177['document']['roots'])_0x3b351b['removeClass'](ce,_0x3ac288);});}}class g extends _0x4dc320{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ae];}['init'](){const _0x4a26d6=this['editor'],_0x51bd15=_0x4a26d6['plugins']['get'](d),_0x39160d=_0x4a26d6['plugins']['get'](ae);_0x4a26d6['ui']['componentFactory']['add']('exitToEditing',_0x67a9a7=>{const _0x73d836=new _0x5f20b0(_0x67a9a7);return _0x73d836['set']({'label':m(_0x67a9a7,'Back\x20to\x20editing'),'icon':_0x226698['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x73d836,'execute',()=>{_0x4a26d6['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x73d836;}),_0x4a26d6['ui']['componentFactory']['add']('restoreRevision',_0x3ef957=>{const _0x157b42=new _0x5f20b0(_0x3ef957);return _0x157b42['set']({'label':m(_0x3ef957,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x157b42['bind']('isEnabled')['to'](_0x4a26d6['commands']['get']('restoreRevision')),this['listenTo'](_0x157b42,'execute',()=>_0x4a26d6['execute']('restoreRevision')),_0x157b42;}),_0x4a26d6['ui']['componentFactory']['add']('changesNavigation',_0x393772=>{const _0x1beb45=new di(_0x393772),_0x598c78=_0x4a26d6['commands']['get']('showPreviousChange'),_0x36f164=_0x4a26d6['commands']['get']('showNextChange');return _0x1beb45['bind']('isBackwardNavigationEnabled')['to'](_0x598c78,'isEnabled'),_0x1beb45['bind']('isForwardNavigationEnabled')['to'](_0x36f164,'isEnabled'),_0x1beb45['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x51bd15),this['listenTo'](_0x1beb45,'execute',(_0x341d20,_0x14e246)=>{_0x4a26d6['execute']('forward'===_0x14e246?'showNextChange':'showPreviousChange');}),_0x1beb45;}),_0x39160d['show'](),_0x51bd15['on']('change:isReady',(_0x288868,_0x4eb784,_0x15cc91)=>{_0x15cc91?_0x39160d['hide']():_0x39160d['show']();});}}class pt extends nt{['_resizeObserver']=null;constructor(_0x558148,_0x57aac9){super(_0x558148,_0x57aac9);const _0x12a50c=this['bindTemplate'];this['set']({'label':m(_0x558148,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x558148,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x12a50c['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5b49d5=this['fieldView']['element'];this['_tooltipString']=_0x5b49d5['scrollWidth']>_0x5b49d5['clientWidth']&&_0x5b49d5['value']||'';}}class ti extends _0x3d574f{constructor(_0x215edf,_0x2aa8aa,_0x283a8f){super(_0x215edf);const _0xab7639=new _0x33bffb();_0xab7639['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x23af54=['ck','ck-revision-history-sidebar__revision-author'];_0x283a8f&&_0x23af54['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3ecb53=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x215edf,_0x283a8f?'Revision\x20creator':'Revision\x20author')},'children':[_0xab7639,_0x2aa8aa['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x23af54},'children':_0x3ecb53});}}function ni(_0x50ac8e,_0xe35da2){const _0x5d41a4=_0x50ac8e['bindTemplate'],_0x23d863=_0x50ac8e['locale'],_0x6f4b15=_0x4942c4(_0x23d863);_0x6f4b15['panelPosition']='sw';const _0x8d8d2=function(_0x5ab63c,_0x1f28d8){const _0x3063a1=function(_0x35bf92,_0x6f27c){const _0x4a801f=_0x35bf92['locale'],_0x10e411={'Compare\x20against\x20selected':m(_0x4a801f,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x4a801f,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x4a801f,'Restore\x20this\x20revision')};return _0x6f27c['map'](_0x5a80fc=>{const _0x57a460=_0x10e411[_0x5a80fc['name']];return _0x57a460&&_0x57a460!==_0x5a80fc['name']&&(_0x5a80fc['name']=_0x57a460),_0x5a80fc;});}(_0x5ab63c,_0x1f28d8),_0x2367e2=new _0x3ba397();for(const _0x4ec9af of _0x3063a1){const _0x3c86e5={'type':'button','model':new to({'label':_0x4ec9af['name'],'class':_0x4ec9af['class'],'withText':!0x0,'role':'menuitem','_action':_0x4ec9af['action']})};_0x3c86e5['model']['bind']('isEnabled')['to'](_0x5ab63c,'isActionsDropdownOpen',_0x479f37=>'function'!=typeof _0x4ec9af['isEnabled']||(!_0x479f37||_0x4ec9af['isEnabled'](_0x5ab63c))),_0x2367e2['add'](_0x3c86e5);}return _0x2367e2;}(_0x50ac8e,_0xe35da2);return _0x50ac8e['bind']('isActionsDropdownOpen')['to'](_0x6f4b15,'isOpen'),_0x6f4b15['buttonView']['set']({'label':m(_0x23d863,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x226698['threeVerticalDots']}),_0x6f4b15['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5d41a4['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5d41a4['to'](_0x1ef8dc=>_0x1ef8dc['stopPropagation']())}}),_0x6f4b15['on']('execute',_0x151dde=>{_0x50ac8e['isReady']&&'function'==typeof _0x151dde['source']['_action']&&_0x151dde['source']['_action'](_0x50ac8e);}),_0x38f049(_0x6f4b15,_0x8d8d2,{'role':'menu'}),_0x6f4b15['listenTo'](_0x50ac8e,'change:isActionsDropdownOpen',(_0x94e599,_0x11b55d,_0x3c9f39)=>{if(_0x3c9f39)for(const _0x376093 of _0x6f4b15['listView']['items']){const _0x39437f=_0x376093['children']['first'],_0x234af4=_0xe35da2['find'](_0x3f1c97=>_0x3f1c97['action']===_0x39437f['_action'])['isVisible'];_0x376093['isVisible']=void 0x0===_0x234af4||_0x234af4(_0x50ac8e);}}),_0x6f4b15;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x191d01(_0x3d574f){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x2ba5fc,_0x5394dc,_0x594d8a,_0x2abd2d){super(_0x2ba5fc);const _0x8218a5=this['bindTemplate'],_0xc2707e=function(_0x568c54,_0x40f6cc){const _0x2f92ef=Array['from'](_0x40f6cc['authors'])['filter'](_0x2fb4bc=>_0x2fb4bc!=_0x40f6cc['creator']);return _0x40f6cc['creator']&&_0x2f92ef['unshift'](_0x40f6cc['creator']),_0x2f92ef['map'](_0x211975=>new ti(_0x568c54,_0x211975,_0x211975==_0x40f6cc['creator']));}(_0x2ba5fc,_0x5394dc);this['id']=_0x5394dc['id'],this['_revision']=_0x5394dc,this['_requireRevisionName']=_0x2abd2d,this['bind']('name','createdAt')['to'](_0x5394dc),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x52d762=>{return _0x43fbdb=_0x2ba5fc['uiLanguage'],(_0xd2bd40=_0x52d762)['toLocaleDateString'](_0x43fbdb,{'month':'long','day':'numeric'})+',\x20'+_0xd2bd40['toLocaleTimeString'](_0x43fbdb,{'hour':'numeric','minute':'numeric'});var _0x43fbdb,_0xd2bd40;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new pt(_0x2ba5fc,_0x49873d),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x34be21=>_0x34be21||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x4159cb,_0x5e324a)=>_0x4159cb&&_0x5e324a),this['revisionActionsView']=_0x594d8a&&_0x594d8a['length']?ni(this,_0x594d8a):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x8218a5['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x8218a5['if']('isEnabled','ck-disabled',_0x552df2=>!_0x552df2),_0x8218a5['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x8218a5['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x8218a5['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':_0x8218a5['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':_0xc2707e}]},this['revisionActionsView']],'on':{'click':_0x8218a5['to'](_0x2190e5=>{_0x2190e5['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x3f4c5a=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x3f4c5a,'change',()=>{this['_requireRevisionName']&&!_0x3f4c5a['value']||this['fire']('setName',{'id':this['id'],'name':_0x3f4c5a['value']}),_0x3f4c5a['value']||(_0x3f4c5a['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function mi(_0x451063,_0x268686){const _0x22e194=_0x42dc1c['fromJSDate'](_0x451063)['setLocale'](_0x268686),_0x3782eb=_0x42dc1c['local'](),_0x4a4340=_0x3782eb['minus']({'days':0x1})['startOf']('day');let _0x48e0dd,_0x359121;return _0x22e194['hasSame'](_0x3782eb,'day')?(_0x48e0dd=_0x22e194['startOf']('day')['toJSDate'](),_0x359121=_0x22e194['toRelativeCalendar']()):_0x22e194['hasSame'](_0x4a4340,'day')?(_0x48e0dd=_0x4a4340['toJSDate'](),_0x359121=_0x22e194['toRelativeCalendar']()):_0x22e194['hasSame'](_0x3782eb,'week')?(_0x48e0dd=_0x22e194['startOf']('week')['toJSDate'](),_0x359121=_0x22e194['weekdayLong']||''):_0x22e194['hasSame'](_0x3782eb,'year')?(_0x48e0dd=_0x22e194['startOf']('month')['toJSDate'](),_0x359121=_0x22e194['monthLong']||''):(_0x48e0dd=_0x22e194['startOf']('year')['toJSDate'](),_0x359121=String(_0x22e194['year'])),{'startDate':_0x48e0dd,'localizedPeriodName':_0x359121};}class vi extends _0x3d574f{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x10648c,_0x56fabf,_0x2bdc47,_0x5aff9a){super(_0x10648c);const _0x475520=mi(_0x56fabf,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x56fabf,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x2bdc47,this['_requireRevisionName']=_0x5aff9a,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':_0x475520}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x33e229){const _0x2fa9a0=new ai(this['locale'],_0x33e229,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2fa9a0);}['removeRevision'](_0x10aade){const _0x3c88b7=this['revisionViews']['find'](_0x2cd8cb=>_0x2cd8cb['id']===_0x10aade['id']);this['revisionViews']['remove'](_0x3c88b7);}}class as extends _0x3d574f{constructor(_0x1fd6af){super(_0x1fd6af);const _0x530faf=new _0x33bffb();_0x530faf['content']=_0x226698['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x530faf,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x1fd6af,'Revision\x20history')]}]});}}class li extends _0x3d574f{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x5dbc34,_0x5cc28b,_0x3cfe6c,_0x48c693){super(_0x5dbc34);const _0x5a3dc5=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x5cc28b,this['_revisionActions']=_0x3cfe6c,this['_requireRevisionName']=_0x48c693,this['on']('select',(_0x4caddf,_0x2475b2)=>{this['fire']('revisionSelected',_0x2475b2);}),this['on']('setName',(_0x2858f2,_0x4864fd)=>{this['fire']('revisionSetName',_0x4864fd);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x5dbc34),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x5a3dc5['if']('isEnabled','ck-disabled',_0x8d8ef=>!_0x8d8ef)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x2dfcfe of this['_revisions'])this['_addRevision'](_0x2dfcfe);this['_revisions']['on']('add',(_0x422761,_0x129e19)=>{this['_addRevision'](_0x129e19);}),this['_revisions']['on']('remove',(_0x24c90c,_0x9098cc)=>{this['_removeRevision'](_0x9098cc);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x494be9=>_0x494be9['revisionViews']['map'](_0x487965=>_0x487965))['flat']();}['selectRevision'](_0x147781){for(const _0x3c6c3c of this['revisionViews'])_0x147781&&_0x147781['id']===_0x3c6c3c['id']?_0x3c6c3c['select']():_0x3c6c3c['deselect']();}['highlightRevisions'](_0x3bf941){for(const _0x269c49 of this['revisionViews'])_0x3bf941['some'](({id:_0x6d1ca3})=>_0x6d1ca3===_0x269c49['id'])?_0x269c49['highlight']():_0x269c49['unhighlight']();}['_addRevision'](_0x4dae49){const _0x3f7199=mi(_0x4dae49['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x412a47=this['timePeriodViews']['get'](0x0);_0x412a47&&_0x412a47['startDate']['getTime']()===_0x3f7199['getTime']()||(_0x412a47=new vi(this['locale'],_0x3f7199,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x412a47)),_0x412a47['addRevision'](_0x4dae49);}['_removeRevision'](_0x39ac02){const _0x21a1bb=mi(_0x39ac02['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x21a1bb)['removeRevision'](_0x39ac02);}['_getTimePeriodViewByStartDate'](_0x439e78){return this['timePeriodViews']['find'](_0x587693=>_0x587693['startDate']['getTime']()===_0x439e78['getTime']());}}class w extends _0x4dc320{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(
|
|
29
|
-
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0xa7d56c,_0x477ef2){super(_0x477ef2),this['sourceElement']=_0xa7d56c,this['model']['document']['createRoot']();const _0x542ee9=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x542ee9);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x26ee62,_0x261377){const _0x4042c8=new this(_0x26ee62,_0x261377);return await _0x4042c8['initPlugins'](),await _0x4042c8['ui']['init'](_0x26ee62),await _0x4042c8['data']['init'](_0x4042c8['config']['get']('initialData')||''),_0x4042c8['fire']('ready'),_0x4042c8;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x2fef22{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7babaa){function _0xc85fff(_0x42d815){return _0x42d815['map'](_0x165fdb=>String['fromCharCode'](_0x165fdb))['join']('');}super(_0x7babaa),this['result']='end',_0x7babaa[_0xc85fff([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xc85fff([0x76,0x69,0x65,0x77])][_0xc85fff([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xc85fff([0x61,0x75,0x74,0x6f]),_0x7babaa[_0xc85fff([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xc85fff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xc85fff([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xc85fff([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xc85fff([0x6f,0x6b])});}}class k extends _0x2fef22{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x3aea2a){if(super(_0x3aea2a),!this['editor']['config']['get']('revisionHistory'))throw new _0xfe2b9b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x5af4da=>this['_showRevisionViewer']({..._0x5af4da,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x7490bf=>this['_closeRevisionViewer'](_0x7490bf)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x513303=>this['_restoreRevision'](_0x513303)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0xaa2ee0){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0xaa2ee0;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x163a3b){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x163a3b);}['getRevision'](_0x4f9011){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4f9011);}['getRevisions'](_0x11b500){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x11b500||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4549f4=this['editor'],_0x4a454d=_0x1d0f8a(_0x4549f4,p),_0x208e15=_0x4549f4['plugins']['get']('RevisionTracker'),_0x564b47=_0x4549f4['plugins']['get']('Users')['users'];return _0x4a454d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4a454d['lazyRoots'],(_0x4a454d['plugins']['push'](Rt,d,g,class extends _0x2fef22{static get['requires'](){return[d,'Users'];}['init'](){const _0x7cf77d=this['editor']['plugins']['get']('Users');for(const _0x149b96 of _0x564b47)_0x149b96['isAnonymous']||_0x7cf77d['getUser'](_0x149b96['id'])||_0x7cf77d['addUser'](_0x149b96);const _0x527c15=_0x208e15['repository']['getRevisions']();let _0x261f03=null;const _0x54f417=this['editor']['plugins']['get']('RevisionViewer');_0x54f417['adapter']=_0x208e15['adapter'],_0x54f417['bind']('isEnabled')['to'](_0x208e15),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4549f4,'isReadOnly',_0x2a7f44=>!_0x2a7f44);for(const _0x332995 of _0x527c15){const _0x112891=null===_0x332995['creator'];if(_0x112891&&_0x332995['toVersion']===_0x332995['fromVersion'])continue;const _0x1e941f=_0x332995['toJSON']();_0x54f417['addRevisionData'](_0x1e941f,(_0x41cdc3,_0x1ba30e,_0x3a8f84)=>{if(_0x112891){if(_0x261f03)_0x261f03['_update'](_0x41cdc3,_0x1ba30e);else{if(!_0x1ba30e){const _0x533bd1=_0x3a8f84['toJSON']();_0x533bd1['id']=_0x32a6fe(),_0x208e15['saveRevision'](_0x533bd1,_0x3a8f84['toVersion'])['then'](_0x504d2a=>{_0x261f03=_0x504d2a;});}}}else _0x332995['_update'](_0x41cdc3,_0x1ba30e);});}}},w),_0x4a454d);}['_enhanceShowRevisionViewerCallback'](){const _0x16897a=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3c393d=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x2edaae=this['editor']['plugins']['get']('Autosave');await _0x2edaae['save']();}else await _0x3c393d['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2908b7=this['editor']['plugins']['get']('Dialog');_0x2908b7['isOpen']&&_0x2908b7['hide']();}const _0x23f983=this['_getRevisionViewerEditorConfig']();return _0x16897a(_0x23f983)['then'](_0x888c77=>{return(this['_viewerEditor']=_0x888c77,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x888c77;})['catch'](_0x5267dc=>(console['error'](_0x5267dc),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x44487d=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x44487d(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x478118=this['editor']['plugins']['get']('Annotations');_0x478118['refreshVisibility'](),_0x478118['refreshPositioning']();}})));}['_showRevisionViewer'](_0x199dc4){const _0x211dda=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x248392=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x8a0707=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x8a0707,_0x199dc4)['then'](_0x332e48=>(_0x248392['style']['display']='block',_0x211dda['style']['display']='none',_0x332e48));}['_closeRevisionViewer'](_0x1db955){const _0x259550=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x259550['style']['display']='',_0x1db955['destroy']();}async['_restoreRevision'](_0x2d2240){const _0x5279ac=this['editor'],_0x41e006=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5849d4=_0x5279ac['plugins']['get']('RevisionTracker'),_0xd538c5=_0x41e006['repository']['getRevision'](_0x2d2240);let _0x92a888,_0xa3633,_0x192e63;try{_0x92a888=await _0x41e006['getRevisionData'](_0xd538c5),_0xa3633=await _0x41e006['getRevisionRootsAttributes'](_0xd538c5);}catch(_0x4aea5b){return void console['error'](_0x4aea5b);}_0x5279ac['model']['change'](_0x33bf23=>{for(const _0x559a2f of Array['from'](_0x5279ac['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x33bf23['removeMarker'](_0x559a2f);}),_0x41e006['isReady']=!0x1,_0x5279ac['model']['enqueueChange'](_0x4e1bc0=>{_0x4e1bc0['setSelection'](null),_0x4e1bc0['removeSelectionAttribute'](_0x5279ac['model']['document']['selection']['getAttributeKeys']());const _0x5a950f=Object['keys'](_0x92a888);for(const _0x27a80c of _0x5279ac['model']['document']['roots'])'$graveyard'!=_0x27a80c['rootName']&&_0x27a80c['isAttached']()&&!_0x5a950f['includes'](_0x27a80c['rootName'])&&_0x4e1bc0['detachRoot'](_0x27a80c);for(const _0xf0a644 of _0x5a950f){let _0x264e2d=_0x5279ac['model']['document']['getRoot'](_0xf0a644);_0x264e2d&&_0x264e2d['isAttached']()||(_0x264e2d=_0x4e1bc0['addRoot'](_0xf0a644));const _0xf152e3=_0xa3633[_0xf0a644],_0x43a560=Object['keys'](_0xf152e3),_0x16be95=_0x92a888[_0xf0a644];for(const _0x48949c of _0x264e2d['getAttributeKeys']())_0x43a560['includes'](_0x48949c)||_0x4e1bc0['removeAttribute'](_0x48949c,_0x264e2d);for(const _0x495c92 of _0x43a560)_0x4e1bc0['setAttribute'](_0x495c92,_0xa3633[_0xf0a644][_0x495c92],_0x264e2d);_0x4e1bc0['remove'](_0x4e1bc0['createRangeIn'](_0x264e2d)),_0x4e1bc0['insert'](_0x5279ac['data']['parse'](_0x16be95,_0x264e2d),_0x264e2d,0x0);}});const _0x595523=m(_0x5279ac['locale'],'Restored');if(_0xd538c5['name'])_0x192e63=-0x1==_0xd538c5['name']['indexOf'](_0x595523)?_0x595523+':\x20'+_0xd538c5['name']:_0xd538c5['name'];else _0x192e63=_0x595523+':\x20'+(_0xd538c5['createdAt']['toLocaleDateString'](_0x5279ac['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xd538c5['createdAt']['toLocaleTimeString'](_0x5279ac['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5849d4['saveRevision']({'name':_0x192e63}),_0x41e006['isReady']=!0x0,_0x5279ac['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,ae as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};
|
|
28
|
+
bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x1fefdb){super(_0x1fefdb),this['_revisionViewer']=_0x1fefdb['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1cf36f=this['_revisionsRepository']['_revisions'],_0x55b48a=this['_createRevisionActions'](),_0x493970=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new li(this['editor']['locale'],_0x1cf36f,_0x55b48a,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',(_0x483496,_0x3cce41)=>{_0x3cce41['revisionViews']['on']('add',(_0xe6829a,_0x2df4d7)=>{_0x2df4d7['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)),_0x493970['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x3cfc48=this['_revisionsRepository']['getRevision'](0x0);if(_0x3cfc48){const _0x54718a=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3cfc48['id']);this['_revisionViewer']['compare'](_0x3cfc48,_0x54718a);}}['_handleRevisionSelected'](_0x1f5cf1,_0x2563b2){const _0x1aafe9=this['_revisionsRepository']['getRevision'](_0x2563b2['id']),_0x2750ce=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1aafe9['id']);this['_revisionViewer']['compare'](_0x1aafe9,_0x2750ce);}['_handleRevisionSetName'](_0x3df462,_0x34d74e){this['_revisionsRepository']['getRevision'](_0x34d74e['id'])['setName'](_0x34d74e['name']);}['_handleDiffChange'](_0x403c9b,_0x16f75a,_0x4a5cae){const _0x45628e=this['_revisionsRepository']['getRevisionsInDiff'](_0x4a5cae);_0x45628e['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x45628e),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x45628e[0x0]));}['_createRevisionActions'](){const _0xab1c32=this['editor'],_0x45f8e0=w['availableRevisionActions'],_0x4a1d25=_0xab1c32['config']['get']('revisionHistory.revisionActions')||w['defaultRevisionActions'];if(_0x4a1d25['length'])return _0x4a1d25['map'](_0x47a0f2=>{const _0x1709da='string'==typeof _0x47a0f2?Object['assign']({},_0x45f8e0[_0x47a0f2]):_0x47a0f2;return _0x1709da['action']=_0x1709da['action']['bind'](this,_0xab1c32),_0x1709da['isVisible']&&(_0x1709da['isVisible']=_0x1709da['isVisible']['bind'](this,_0xab1c32)),_0x1709da;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1cc831},_0x5046af)=>{const _0x143004=_0x1cc831['get'](d),_0x2b1bdb=_0x143004['repository'];let _0x128a91=_0x143004['diff']['newRevisionId'],_0x7242b8=_0x5046af['id'];_0x2b1bdb['getIndex'](_0x128a91)>_0x2b1bdb['getIndex'](_0x7242b8)&&([_0x128a91,_0x7242b8]=[_0x7242b8,_0x128a91]),_0x143004['compare'](_0x128a91,_0x7242b8);},'isVisible':({plugins:_0x32c046},_0x414736)=>{const _0x570fac=_0x32c046['get'](d);return!(_0x570fac['repository']['getRevisionsInDiff'](_0x570fac['diff'])['length']>0x2)&&!_0x414736['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x355d44,{id:_0x2c7eec})=>{_0x355d44['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2c7eec);},'isVisible':({plugins:_0x166d38},_0x31a37a)=>!!_0x166d38['get'](d)['repository']['getLaterVisibleRevision'](_0x31a37a['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5e63d4},{id:_0x5aa77d,revisionNameView:_0x4560a7})=>{const _0x2fde3f=_0x5e63d4['get'](d),_0x25fea6=_0x2fde3f['repository']['getEarlierVisibleRevision'](_0x5aa77d);_0x2fde3f['compare'](_0x5aa77d,_0x25fea6),_0x4560a7['focus'](),_0x4560a7['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x3909f4,_0x4850f7){super(_0x3909f4),this['_view']=_0x4850f7,this['_toolbarConfig']=ot(_0x3909f4['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x3109f1){const _0x398608=this['editor'],_0x233a12=this['view'],_0x14b7fe=_0x398608['editing']['view'],_0x48fcc0=_0x233a12['editable'],_0x145465=_0x14b7fe['document']['getRoot']();_0x48fcc0['name']=_0x145465['rootName'],_0x233a12['render']();const _0x117d50=_0x48fcc0['element'];this['setEditableElement'](_0x48fcc0['name'],_0x117d50),_0x233a12['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x14b7fe['attachDomRoot'](_0x117d50),this['_elementReplacer']['replace'](_0x3109f1,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x4040ae=this['view'],_0x24bdb6=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x24bdb6['detachDomRoot'](_0x4040ae['editable']['name']),_0x4040ae['destroy']();}['_initToolbar'](){const _0x19713a=this['view'];_0x19713a['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x19713a['stickyPanel']['limiterElement']=_0x19713a['element'],_0x19713a['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x3e98aa})=>_0x3e98aa),_0x19713a['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x19713a['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x4c4055,_0x47af67,_0x57f2ce={}){super(_0x4c4055),this['stickyPanel']=new ut(_0x4c4055),this['toolbar']=new lt(_0x4c4055,{'shouldGroupWhenFull':_0x57f2ce['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x4c4055,_0x47af67);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
|
|
29
|
+
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x411a2d,_0x6288f6){super(_0x6288f6),this['sourceElement']=_0x411a2d,this['model']['document']['createRoot']();const _0x19e30d=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x19e30d);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x3936b8,_0x47d607){const _0x18e38e=new this(_0x3936b8,_0x47d607);return await _0x18e38e['initPlugins'](),await _0x18e38e['ui']['init'](_0x3936b8),await _0x18e38e['data']['init'](_0x18e38e['config']['get']('initialData')||''),_0x18e38e['fire']('ready'),_0x18e38e;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x4dc320{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x405399){function _0x528a7c(_0x325190){return _0x325190['map'](_0x43ba75=>String['fromCharCode'](_0x43ba75))['join']('');}super(_0x405399),this['result']='end',_0x405399[_0x528a7c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x528a7c([0x76,0x69,0x65,0x77])][_0x528a7c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x528a7c([0x61,0x75,0x74,0x6f]),_0x405399[_0x528a7c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x528a7c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x528a7c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x528a7c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x528a7c([0x6f,0x6b])});}}class k extends _0x4dc320{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x2348ee){if(super(_0x2348ee),!this['editor']['config']['get']('revisionHistory'))throw new _0x45f2a2('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x218174=>this['_showRevisionViewer']({..._0x218174,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4f1f7b=>this['_closeRevisionViewer'](_0x4f1f7b)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x65f2c=>this['_restoreRevision'](_0x65f2c)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x38aae2){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x38aae2;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4eebec){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4eebec);}['getRevision'](_0x40a5e9){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x40a5e9);}['getRevisions'](_0x46bb2b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x46bb2b||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xe958f5=this['editor'],_0x4e48cd=_0x152179(_0xe958f5,p),_0x388c94=_0xe958f5['plugins']['get']('RevisionTracker'),_0x4abab3=_0xe958f5['plugins']['get']('Users')['users'];return _0x4e48cd['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4e48cd['lazyRoots'],(_0x4e48cd['plugins']['push'](Rt,d,g,class extends _0x4dc320{static get['requires'](){return[d,'Users'];}['init'](){const _0x36c03c=this['editor']['plugins']['get']('Users');for(const _0x434264 of _0x4abab3)_0x434264['isAnonymous']||_0x36c03c['getUser'](_0x434264['id'])||_0x36c03c['addUser'](_0x434264);const _0x4fca6e=_0x388c94['repository']['getRevisions']();let _0xbafeb6=null;const _0x2309d6=this['editor']['plugins']['get']('RevisionViewer');_0x2309d6['adapter']=_0x388c94['adapter'],_0x2309d6['bind']('isEnabled')['to'](_0x388c94),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xe958f5,'isReadOnly',_0x1d5ae1=>!_0x1d5ae1);for(const _0x44113e of _0x4fca6e){const _0x1231db=null===_0x44113e['creator'];if(_0x1231db&&_0x44113e['toVersion']===_0x44113e['fromVersion'])continue;const _0x371caa=_0x44113e['toJSON']();_0x2309d6['addRevisionData'](_0x371caa,(_0x2231f6,_0x4e0e93,_0x4396ba)=>{if(_0x1231db){if(_0xbafeb6)_0xbafeb6['_update'](_0x2231f6,_0x4e0e93);else{if(!_0x4e0e93){const _0x26428e=_0x4396ba['toJSON']();_0x26428e['id']=_0x2db3ef(),_0x388c94['saveRevision'](_0x26428e,_0x4396ba['toVersion'])['then'](_0x115351=>{_0xbafeb6=_0x115351;});}}}else _0x44113e['_update'](_0x2231f6,_0x4e0e93);});}}},w),_0x4e48cd);}['_enhanceShowRevisionViewerCallback'](){const _0x52138c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x567a3d=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x4b5907=this['editor']['plugins']['get']('Autosave');await _0x4b5907['save']();}else await _0x567a3d['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5baf0a=this['editor']['plugins']['get']('Dialog');_0x5baf0a['isOpen']&&_0x5baf0a['hide']();}const _0x1a4aad=this['_getRevisionViewerEditorConfig']();return _0x52138c(_0x1a4aad)['then'](_0x38b4eb=>{return(this['_viewerEditor']=_0x38b4eb,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x38b4eb;})['catch'](_0x19e44a=>(console['error'](_0x19e44a),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x57ab01=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x57ab01(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x41cddb=this['editor']['plugins']['get']('Annotations');_0x41cddb['refreshVisibility'](),_0x41cddb['refreshPositioning']();}})));}['_showRevisionViewer'](_0x166bb2){const _0x30cbac=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x5bf6de=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x45fea7=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x45fea7,_0x166bb2)['then'](_0x36d379=>(_0x5bf6de['style']['display']='block',_0x30cbac['style']['display']='none',_0x36d379));}['_closeRevisionViewer'](_0x288210){const _0x5daa69=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5daa69['style']['display']='',_0x288210['destroy']();}async['_restoreRevision'](_0x57c726){const _0x10facc=this['editor'],_0x11a43c=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x455549=_0x10facc['plugins']['get']('RevisionTracker'),_0xdb153e=_0x11a43c['repository']['getRevision'](_0x57c726);let _0x30a66b,_0x47a25b,_0x57292c;try{_0x30a66b=await _0x11a43c['getRevisionData'](_0xdb153e),_0x47a25b=await _0x11a43c['getRevisionRootsAttributes'](_0xdb153e);}catch(_0x420e7b){return void console['error'](_0x420e7b);}_0x10facc['model']['change'](_0x5e5494=>{for(const _0x6d42f2 of Array['from'](_0x10facc['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5e5494['removeMarker'](_0x6d42f2);}),_0x11a43c['isReady']=!0x1,_0x10facc['model']['enqueueChange'](_0x32e8f0=>{_0x32e8f0['setSelection'](null),_0x32e8f0['removeSelectionAttribute'](_0x10facc['model']['document']['selection']['getAttributeKeys']());const _0x5cdf14=Object['keys'](_0x30a66b);for(const _0x3ba7d9 of _0x10facc['model']['document']['roots'])'$graveyard'!=_0x3ba7d9['rootName']&&_0x3ba7d9['isAttached']()&&!_0x5cdf14['includes'](_0x3ba7d9['rootName'])&&_0x32e8f0['detachRoot'](_0x3ba7d9);for(const _0x567332 of _0x5cdf14){let _0x48faca=_0x10facc['model']['document']['getRoot'](_0x567332);_0x48faca&&_0x48faca['isAttached']()||(_0x48faca=_0x32e8f0['addRoot'](_0x567332));const _0xc3e02b=_0x47a25b[_0x567332],_0x2e9fb4=Object['keys'](_0xc3e02b),_0x1f9153=_0x30a66b[_0x567332];for(const _0x1454d0 of _0x48faca['getAttributeKeys']())_0x2e9fb4['includes'](_0x1454d0)||_0x32e8f0['removeAttribute'](_0x1454d0,_0x48faca);for(const _0x30f65e of _0x2e9fb4)_0x32e8f0['setAttribute'](_0x30f65e,_0x47a25b[_0x567332][_0x30f65e],_0x48faca);_0x32e8f0['remove'](_0x32e8f0['createRangeIn'](_0x48faca)),_0x32e8f0['insert'](_0x10facc['data']['parse'](_0x1f9153,_0x48faca),_0x48faca,0x0);}});const _0x5d2a08=m(_0x10facc['locale'],'Restored');if(_0xdb153e['name'])_0x57292c=-0x1==_0xdb153e['name']['indexOf'](_0x5d2a08)?_0x5d2a08+':\x20'+_0xdb153e['name']:_0xdb153e['name'];else _0x57292c=_0x5d2a08+':\x20'+(_0xdb153e['createdAt']['toLocaleDateString'](_0x10facc['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xdb153e['createdAt']['toLocaleTimeString'](_0x10facc['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x455549['saveRevision']({'name':_0x57292c}),_0x11a43c['isReady']=!0x0,_0x10facc['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,ae as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};
|