@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250402.0 → 0.0.0-nightly-20250403.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +2 -1
- 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 +11 -11
- 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/revisionhistoryutils.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
|
-
_0x38c0dd(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x658459){super(),this['id']=_0x658459['id']||_0x27ee83(),this['creator']=_0x658459['creator']||null,this['authors']=_0x658459['authors']||[],this['diffData']=_0x658459['diffData']||null,this['toVersion']=_0x658459['toVersion']||0x0,this['fromVersion']=_0x658459['fromVersion']||0x0,this['set']('name',_0x658459['name']||''),this['set']('createdAt',_0x658459['createdAt']||new Date()),this['set']('attributes',_0x658459['attributes']||{});}['setName'](_0xe534df){this['_update']({'name':_0xe534df});}['setAttribute'](_0x2cc900,_0x172eb7){const _0x2d98f3=_0x4ec41c(this['attributes']);_0x112824(_0x2d98f3,_0x2cc900,_0x172eb7),this['_update']({'attributes':_0x2d98f3});}['removeAttribute'](_0x296eaf){const _0x6e0974=_0x4ec41c(this['attributes']);_0x473edd(_0x6e0974,_0x296eaf),this['_update']({'attributes':_0x6e0974});}['_update'](_0x50c145,_0x352239=!0x1){let _0x3e6596=!0x1;const _0x3bc3aa={'id':this['id']},_0x1339a0=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x42390a of _0x1339a0){const _0x5801ad=_0x50c145[_0x42390a];void 0x0!==_0x5801ad&&_0x5801ad!==this[_0x42390a]&&(this[_0x42390a]=_0x5801ad,_0x3bc3aa[_0x42390a]=_0x5801ad,_0x3e6596=!0x0);}_0x3e6596&&(_0x3bc3aa['authors']&&(_0x3bc3aa['authorsIds']=_0x3bc3aa['authors']['map'](_0x188ce8=>_0x188ce8['id']),delete _0x3bc3aa['authors']),this['fire']('_update',_0x3bc3aa,_0x352239));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x5af905=>_0x5af905['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x5bfc96{['_revisions'];static get['requires'](){return[_0x688979];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x534fb6){super(_0x534fb6),this['_revisions']=new _0x32397e();}['afterInit'](){!async function(_0xfea203){const _0x3cedca=_0x3541c6([0x75,0x77,0x51,0x6a,0x61,0x4f,0x37,0x68,0x4b,0x45,0x42,0x69,0x66,0x79,0x67,0x34,0x39,0x4c,0x6b,0x4a,0x54,0x57,0x46,0x4d,0x59,0x74,0x35,0x47,0x6e,0x44,0x38,0x4e,0x50,0x7a,0x41,0x78,0x63,0x58,0x6c,0x5a,0x53,0x52,0x55,0x73,0x64,0x70,0x71,0x65,0x56,0x6f,0x76,0x49,0x32,0x33,0x30,0x36,0x6d,0x72,0x48,0x62,0x43,0x31]),_0x1c3be0=0xeb829,_0x97e87c=0x1e4bc1ce,_0x2a8080=0x1e4ca22e^_0x97e87c,_0x4393b6=window[_0x3541c6([0x44,0x61,0x74,0x65])][_0x3541c6([0x6e,0x6f,0x77])](),_0x3a7dd0=_0xfea203[_0x3541c6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x184642=new window[(_0x3541c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e8619=>{_0x3a7dd0[_0x3541c6([0x6f,0x6e,0x63,0x65])](_0x3541c6([0x72,0x65,0x61,0x64,0x79]),_0x4e8619);}),_0x222b39={[_0x3541c6([0x6b,0x74,0x79])]:_0x3541c6([0x45,0x43]),[_0x3541c6([0x75,0x73,0x65])]:_0x3541c6([0x73,0x69,0x67]),[_0x3541c6([0x63,0x72,0x76])]:_0x3541c6([0x50,0x2d,0x32,0x35,0x36]),[_0x3541c6([0x78])]:_0x3541c6([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]),[_0x3541c6([0x79])]:_0x3541c6([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]),[_0x3541c6([0x61,0x6c,0x67])]:_0x3541c6([0x45,0x53,0x32,0x35,0x36])},_0x4d7fd7=_0x3a7dd0[_0x3541c6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3541c6([0x67,0x65,0x74])](_0x3541c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x39a303(){let _0x1162c4,_0x2c4ec3=null,_0x124b5e=null;try{if(_0x4d7fd7==_0x3541c6([0x47,0x50,0x4c]))return _0x3541c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1162c4=_0x4bd1ca(),!_0x1162c4)return _0x3541c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1162c4[_0x3541c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x124b5e=_0x51329b(_0x1162c4[_0x3541c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1162c4[_0x3541c6([0x6a,0x74,0x69])])),await _0x2de589()?_0x3bac06()?_0x11ff8c()?_0x3541c6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5afc99()?(_0x1162c4[_0x3541c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3541c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2c4ec3=_0xda8f20(_0x3541c6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1162c4[_0x3541c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3541c6([0x74,0x72,0x69,0x61,0x6c])&&(_0x2c4ec3=_0xda8f20(_0x3541c6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4005cb()):_0x3541c6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3541c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3541c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4fe306){return _0x3541c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x11ff8c(){const _0x1ed637=[_0x3541c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3541c6([0x74,0x72,0x69,0x61,0x6c])][_0x3541c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1162c4[_0x3541c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4393b6/0x3e8:0xe10*_0x2a8080;return _0x1162c4[_0x3541c6([0x65,0x78,0x70])]<_0x1ed637;}function _0x3bac06(){const _0x522eab=_0x1162c4[_0x3541c6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x522eab)return!0x1;if(_0x522eab[_0x3541c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3541c6([0x2a])))return!0x0;if(_0x522eab[_0x3541c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3541c6([0x52,0x48])))return!0x0;if(_0x522eab[_0x3541c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3541c6([0x52,0x52,0x48]))){if(_0x4c88fa())return!0x0;if(_0x10e1ad()||_0x394e2a())return!0x0;}return!0x1;}function _0x5afc99(){const _0x4404b8=_0x1162c4[_0x3541c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4404b8||0x0==_0x4404b8[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x56e30d}=new URL(window[_0x3541c6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4404b8[_0x3541c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x56e30d))return!0x0;const _0xb8881b=_0x56e30d[_0x3541c6([0x73,0x70,0x6c,0x69,0x74])](_0x3541c6([0x2e]));return _0x4404b8[_0x3541c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2ebbf7=>_0x2ebbf7[_0x3541c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3541c6([0x2a])))[_0x3541c6([0x6d,0x61,0x70])](_0x553dbd=>_0x553dbd[_0x3541c6([0x73,0x70,0x6c,0x69,0x74])](_0x3541c6([0x2e])))[_0x3541c6([0x73,0x6f,0x6d,0x65])](_0xe00d4c=>_0xb8881b[_0x3541c6([0x65,0x76,0x65,0x72,0x79])]((_0x376529,_0x2470fd)=>_0xe00d4c[_0x2470fd]===_0x376529||_0xe00d4c[_0x2470fd]===_0x3541c6([0x2a])));}function _0x4005cb(){return _0x2c4ec3&&_0x124b5e?new window[(_0x3541c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1bf413,_0x217981)=>{_0x2c4ec3[_0x3541c6([0x74,0x68,0x65,0x6e])](_0x1bf413,_0x217981),_0x124b5e[_0x3541c6([0x74,0x68,0x65,0x6e])](_0x5178cd=>{_0x5178cd!=_0x3541c6([0x56,0x61,0x6c,0x69,0x64])&&_0x1bf413(_0x5178cd);},_0x217981);}):_0x2c4ec3||_0x124b5e||_0x3541c6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x51329b(_0x1b8377,_0x2c8d0d){return new window[(_0x3541c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x344c8c=>{if(_0x59138e())return _0x344c8c(_0x3541c6([0x56,0x61,0x6c,0x69,0x64]));_0x6d5e45(),_0x3a7dd0[_0x3541c6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3541c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3354da=!0x1;const _0x6c8030=_0x27ee83();function _0x47a8bc(_0xf65dc3){return!!_0xf65dc3&&(typeof _0xf65dc3===_0x3541c6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xf65dc3===_0x3541c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xf65dc3[_0x3541c6([0x74,0x68,0x65,0x6e])]===_0x3541c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xf65dc3[_0x3541c6([0x63,0x61,0x74,0x63,0x68])]===_0x3541c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xf1dbb3(_0x1daa3c){_0x4204af(_0x1daa3c)[_0x3541c6([0x74,0x68,0x65,0x6e])](_0x319cfb=>{if(!_0x319cfb||_0x319cfb[_0x3541c6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3541c6([0x6f,0x6b]))return _0x3541c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x15475d(_0x3fed05(_0x6c8030+_0x2c8d0d))!=_0x319cfb[_0x3541c6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3541c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3541c6([0x56,0x61,0x6c,0x69,0x64]);})[_0x3541c6([0x74,0x68,0x65,0x6e])](_0x11e6d4=>(_0x1428bc(),_0x11e6d4),()=>{const _0x11038d=_0x1b60fc();return null==_0x11038d?(_0x1428bc(),_0x3541c6([0x56,0x61,0x6c,0x69,0x64])):_0x3541c6(_0x4393b6-_0x11038d>(0x3a4745ce^_0x97e87c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3541c6([0x74,0x68,0x65,0x6e])](_0x344c8c)[_0x3541c6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x344c8c(_0x3541c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x46c732=0x1e7d2f4e^_0x97e87c;function _0x1428bc(){const _0x24c278=_0x3541c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x15475d(_0x3fed05(_0x1b8377)),_0xb04de0=_0x117fa5(_0x15475d(window[_0x3541c6([0x4d,0x61,0x74,0x68])][_0x3541c6([0x63,0x65,0x69,0x6c])](_0x4393b6/_0x46c732)));window[_0x3541c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3541c6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x24c278,_0xb04de0);}function _0x1b60fc(){const _0x4adbd3=_0x3541c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x15475d(_0x3fed05(_0x1b8377)),_0x443e9d=window[_0x3541c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3541c6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4adbd3);return _0x443e9d?window[_0x3541c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x117fa5(_0x443e9d),0x10)*_0x46c732:null;}function _0x4204af(_0x2eaa17){return new window[(_0x3541c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3eb056,_0x123515)=>{_0x2eaa17[_0x3541c6([0x74,0x68,0x65,0x6e])](_0x3eb056,_0x123515),window[_0x3541c6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x123515,0x1e4a150e^_0x97e87c);});}}_0x3a7dd0[_0x3541c6([0x6f,0x6e])](_0x3541c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xf4432b,_0x2a90ee)=>{if(_0x2a90ee[0x0]!=_0x1b8377)return _0x344c8c(_0x3541c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2a90ee[0x1]={..._0x2a90ee[0x1],[_0x3541c6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x6c8030};},{[_0x3541c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3541c6([0x68,0x69,0x67,0x68])}),_0x3a7dd0[_0x3541c6([0x6f,0x6e])](_0x3541c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xbc6210=>{_0x47a8bc(_0xbc6210[_0x3541c6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3354da=!0x0,_0xf1dbb3(_0xbc6210[_0x3541c6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3541c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3541c6([0x6c,0x6f,0x77])}),_0x184642[_0x3541c6([0x74,0x68,0x65,0x6e])](()=>{_0x3354da||_0x344c8c(_0x3541c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x59138e(){return _0x3a7dd0[_0x3541c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3541c6([0x76,0x69,0x65,0x77])][_0x3541c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3541c6([0x61,0x75,0x74,0x6f]);}function _0x6d5e45(){_0x3a7dd0[_0x3541c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3541c6([0x76,0x69,0x65,0x77])][_0x3541c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3541c6([0x61,0x75,0x74,0x6f]);}}function _0xda8f20(_0x3412a5){const _0x500eb5=[new window[(_0x3541c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x30c385=>setTimeout(_0x30c385,0x1e42ff02^_0x97e87c)),_0x184642[_0x3541c6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3541c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd54ae3=>{const _0x166237=0x1e4bc1c9^_0x97e87c,_0x3ad24a=_0xfea203[_0x3541c6([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x54c12a(){_0x3ad24a[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x166237&&_0xd54ae3();}_0x54c12a(),_0x3ad24a[_0x3541c6([0x6f,0x6e])](_0x3541c6([0x61,0x64,0x64]),_0x54c12a);})),new window[(_0x3541c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x223555=>{function _0x5e773e(){for(const _0x47db95 in window)if(window[_0x3541c6([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x3541c6([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x47db95))&&window[_0x47db95]==_0x1c3be0)return _0x223555();_0x3a7dd0[_0x3541c6([0x73,0x74,0x61,0x74,0x65])]!=_0x3541c6([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x3541c6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5e773e,0x1e4bd246^_0x97e87c);}_0xf4d70b(_0x3541c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x5e773e();})];return window[_0x3541c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3541c6([0x72,0x61,0x63,0x65])](_0x500eb5)[_0x3541c6([0x74,0x68,0x65,0x6e])](()=>_0x3412a5);}async function _0x54c667(){if(await _0x184642,_0xf4d70b(_0x3541c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x5f331f=_0xfea203[_0x3541c6([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x283510=_0xfea203[_0x3541c6([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])](_0x5f331f[_0x3541c6([0x69,0x64])]),_0x5a83b2=_0x2fc935(_0x3541c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x5a83b2[_0x3541c6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x5f331f['id'],_0x283510?_0x283510['id']:null,!0x0),_0x5a83b2[_0x3541c6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3541c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5a83b2[_0x3541c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5a83b2[_0x3541c6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x31e1d3,void(_0x5a83b2[_0x3541c6([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x31e1d3);}if(_0xf4d70b(_0x3541c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2ba720=_0x2fc935(_0x3541c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2ba720[_0x3541c6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3541c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2ba720[_0x3541c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2ba720[_0x3541c6([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x31e1d3,_0x2ba720[_0x3541c6([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x31e1d3;}_0x3a7dd0[_0x3541c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x3541c6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x31e1d3,_0x3a7dd0[_0x3541c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x3541c6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x31e1d3,_0x3a7dd0[_0x3541c6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3541c6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4c88fa(){return _0xf4d70b(_0x3541c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2fc935(_0x3541c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3541c6([0x73,0x74,0x61,0x74,0x65])]==_0x3541c6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x10e1ad(){return _0xf4d70b(_0x3541c6([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 _0x394e2a(){return _0xf4d70b(_0x3541c6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x23e872(_0x1b9bad){const _0x43d82a=_0x313519();_0x3a7dd0[_0x43d82a]=_0x3541c6([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])+_0x1b9bad,_0x1b9bad[_0x3541c6([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x3541c6([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x313519()]=_0x1c3be0),_0x1b9bad!=_0x3541c6([0x56,0x61,0x6c,0x69,0x64])&&_0x54c667();}function _0x313519(){const _0x53ad53=window[_0x3541c6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3541c6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3541c6([0x6e,0x6f,0x77])]())[_0x3541c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3541c6([0x2e]),'');let _0x4a957a=_0x3541c6([0x75]);for(let _0x2444b1=0x0;_0x2444b1<_0x53ad53[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2444b1+=0x2){let _0x1dfc03=window[_0x3541c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53ad53[_0x3541c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2444b1,_0x2444b1+0x2));_0x1dfc03>=_0x3cedca[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1dfc03-=_0x3cedca[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4a957a+=_0x3cedca[_0x1dfc03];}return _0x4a957a;}function _0x4bd1ca(){const _0x45af7e=_0x4d7fd7[_0x3541c6([0x73,0x70,0x6c,0x69,0x74])](_0x3541c6([0x2e]));if(0x3!=_0x45af7e[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x40bed2(_0x45af7e[0x1]);function _0x40bed2(_0x36fbfd){const _0x9fe9e0=_0x53cfca(_0x36fbfd);return _0x9fe9e0&&_0x54591c()?_0x9fe9e0:null;function _0x54591c(){const _0x43a464=_0x9fe9e0[_0x3541c6([0x6a,0x74,0x69])],_0x1a7009=window[_0x3541c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x43a464[_0x3541c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x43a464[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5a6514={..._0x9fe9e0,[_0x3541c6([0x6a,0x74,0x69])]:_0x43a464[_0x3541c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x43a464[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5a6514[_0x3541c6([0x76,0x63])],_0x3fed05(_0x5a6514)==_0x1a7009;}}}async function _0x2de589(){let _0xa26dc2=!0x0;try{const _0x1dec85=_0x4d7fd7[_0x3541c6([0x73,0x70,0x6c,0x69,0x74])](_0x3541c6([0x2e])),[_0x5a3871,_0x47cfd3,_0x407c42]=_0x1dec85;return _0x5ee34d(_0x5a3871),await _0x5c03f6(_0x5a3871,_0x47cfd3,_0x407c42),_0xa26dc2;}catch(_0x28d006){return!0x1;}function _0x5ee34d(_0x45273b){const _0x5bbd25=_0x53cfca(_0x45273b);_0x5bbd25&&_0x5bbd25[_0x3541c6([0x61,0x6c,0x67])]==_0x3541c6([0x45,0x53,0x32,0x35,0x36])||(_0xa26dc2=!0x1);}async function _0x5c03f6(_0x2e74ab,_0x1247e8,_0x22cabd){const _0x220fe9=window[_0x3541c6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3541c6([0x66,0x72,0x6f,0x6d])](_0x15fd5e(_0x22cabd),_0x431a62=>_0x431a62[_0x3541c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5757fe=new window[(_0x3541c6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3541c6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2e74ab+_0x3541c6([0x2e])+_0x1247e8),_0x386df6=window[_0x3541c6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3541c6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x386df6)return;const _0x3bd57f=await _0x386df6[_0x3541c6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3541c6([0x6a,0x77,0x6b]),_0x222b39,{[_0x3541c6([0x6e,0x61,0x6d,0x65])]:_0x3541c6([0x45,0x43,0x44,0x53,0x41]),[_0x3541c6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3541c6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3541c6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x386df6[_0x3541c6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3541c6([0x6e,0x61,0x6d,0x65])]:_0x3541c6([0x45,0x43,0x44,0x53,0x41]),[_0x3541c6([0x68,0x61,0x73,0x68])]:{[_0x3541c6([0x6e,0x61,0x6d,0x65])]:_0x3541c6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3bd57f,_0x220fe9,_0x5757fe)||(_0xa26dc2=!0x1);}}function _0x53cfca(_0x54bb04){return _0x54bb04[_0x3541c6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3541c6([0x65,0x79]))?JSON[_0x3541c6([0x70,0x61,0x72,0x73,0x65])](_0x15fd5e(_0x54bb04)):null;}function _0x15fd5e(_0x1fa6eb){return window[_0x3541c6([0x61,0x74,0x6f,0x62])](_0x1fa6eb[_0x3541c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3541c6([0x2b]))[_0x3541c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3541c6([0x2f])));}function _0x3fed05(_0x5a45e8){let _0x5ebb6d=0x1505;function _0x5391b1(_0x34d318){for(let _0x4d419f=0x0;_0x4d419f<_0x34d318[_0x3541c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d419f++){const _0x5b5235=_0x34d318[_0x3541c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d419f);_0x5ebb6d=(_0x5ebb6d<<0x5)+_0x5ebb6d+_0x5b5235,_0x5ebb6d&=_0x5ebb6d;}}function _0x5a03a7(_0x3d0ba2){Array[_0x3541c6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3d0ba2)?_0x3d0ba2[_0x3541c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5a03a7):_0x3d0ba2&&typeof _0x3d0ba2==_0x3541c6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3541c6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3d0ba2)[_0x3541c6([0x73,0x6f,0x72,0x74])]()[_0x3541c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x51b5f1,_0xc9874c])=>{_0x5391b1(_0x51b5f1),_0x5a03a7(_0xc9874c);}):_0x5391b1(window[_0x3541c6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3d0ba2));}return _0x5a03a7(_0x5a45e8),_0x5ebb6d>>>0x0;}function _0x15475d(_0x1083d0){return _0x1083d0[_0x3541c6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3541c6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3541c6([0x30]));}function _0x117fa5(_0x3f1806){return _0x3f1806[_0x3541c6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3541c6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3541c6([0x6a,0x6f,0x69,0x6e])]('');}function _0xf4d70b(_0x3d3da1){return _0x3a7dd0[_0x3541c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3541c6([0x68,0x61,0x73])](_0x3d3da1);}function _0x2fc935(_0x481753){return _0x3a7dd0[_0x3541c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3541c6([0x67,0x65,0x74])](_0x481753);}function _0x31e1d3(){}function _0x3541c6(_0x412559){return _0x412559['map'](_0x5f9dde=>String['fromCharCode'](_0x5f9dde))['join']('');}_0x23e872(await _0x39a303());}(this);}['createRevision'](_0x3f21a4){const _0x49d9d9=this['editor']['plugins']['get']('Users');return new h({'id':_0x3f21a4['id'],'name':_0x3f21a4['name'],'creator':_0x3f21a4['creatorId']?_0x49d9d9['getUser'](_0x3f21a4['creatorId']):null,'diffData':_0x3f21a4['diffData']||_0x3f21a4['data'],'authors':_0x3f21a4['authorsIds']['map'](_0x2dde7f=>_0x49d9d9['getUser'](_0x2dde7f)),'createdAt':new Date(_0x3f21a4['createdAt']),'attributes':_0x3f21a4['attributes'],'fromVersion':_0x3f21a4['fromVersion'],'toVersion':_0x3f21a4['toVersion']});}['addRevision'](_0x345c42,_0x71abe9=0x0){this['_revisions']['add'](_0x345c42,_0x71abe9);}['getRevision'](_0x509f3b){return this['_revisions']['get'](_0x509f3b);}['getRevisions'](_0x212582={'toJSON':!0x1}){const _0x166c98=Array['from'](this['_revisions']);return _0x166c98['reverse'](),_0x212582['toJSON']?_0x166c98['map'](_0x5f5bea=>_0x5f5bea['toJSON']()):_0x166c98;}['getIndex'](_0x4eafa2){return this['_revisions']['getIndex'](_0x4eafa2);}['getEarlierVisibleRevision'](_0xcb483d){const [,_0x16723a]=this['getRevisionsIterator'](_0xcb483d,{'direction':'earlier'});return _0x16723a;}['getLaterVisibleRevision'](_0x2f0757){const [,_0x4d24d4]=this['getRevisionsIterator'](_0x2f0757,{'direction':'later'});return _0x4d24d4;}['getRevisionsInDiff'](_0x500bc6){const _0x89c0c0=[];for(const _0xfa4b0f of this['getRevisionsIterator'](_0x500bc6['newRevisionId']))if(_0x89c0c0['push'](_0xfa4b0f),_0xfa4b0f['id']===_0x500bc6['oldRevisionId'])break;return _0x89c0c0;}*['getRevisionsIterator'](_0x3b20e3,{direction:_0xb5e7b4='earlier',filter:_0x4aaaba=()=>!0x0}={}){const _0x11b4d6='earlier'===_0xb5e7b4?0x1:-0x1;let _0x115148=this['_revisions']['get'](_0x3b20e3),_0xe35688=this['getIndex'](_0x115148);for(yield _0x115148;_0x115148;){if(_0xe35688+=_0x11b4d6,_0x115148=this['getRevision'](_0xe35688),!_0x115148)return;_0x4aaaba(_0x115148)&&(yield _0x115148);}}}class V extends _0x5bfc96{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x51844e,'c'],[_0x51a66d,'a'],[_0x189f2d,'e'],[_0x51d6e7,'r'],[_0xea271,'u']]);['_typeCharToViewClass']=new Map([['c',_0x51844e],['a',_0x51a66d],['e',_0x189f2d],['r',_0x51d6e7],['u',_0xea271]]);async['loadRevisionData'](_0x58ece4,_0x22085d){if(_0x58ece4['diffData']||!_0x22085d)return;const _0x230461=this['editor']['config']['get']('collaboration.channelId'),_0x3c9095=await _0x22085d['getRevision']({'channelId':_0x230461,'revisionId':_0x58ece4['id']});_0x58ece4['diffData']=_0x3c9095['diffData'];}['getRevisionDocumentData'](_0x5ece74){const _0xbfbe4b={};for(const _0x391187 in _0x5ece74['diffData']){if(_0x5ece74['diffData'][_0x391187]['attachChange']&&!_0x5ece74['diffData'][_0x391187]['attachChange']['isAttached'])continue;const _0x553f1b=this['_removeRevisionMarkers'](JSON['parse'](_0x5ece74['diffData'][_0x391187]['insertions'])),_0x2b58ec=this['editor']['editing']['view']['document'],_0x4ee75e=new _0x35262a(_0x2b58ec,_0x553f1b['map'](_0x4a104e=>this['_getViewFromDiffObj'](_0x4a104e,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xbfbe4b[_0x391187]=this['editor']['data']['processor']['toData'](_0x4ee75e),this['editor']['data']['processor']['useFillerType']('default');}return _0xbfbe4b;}['getRevisionRootsAttributes'](_0x1db425){const _0x5eb791={};for(const _0x27317d in _0x1db425['diffData'])_0x1db425['diffData'][_0x27317d]['attachChange']&&!_0x1db425['diffData'][_0x27317d]['attachChange']['isAttached']||(_0x5eb791[_0x27317d]=_0x1db425['diffData'][_0x27317d]['attributesAfter']||{});return _0x5eb791;}['_getTypeCharForViewElement'](_0x56de8e){return this['_viewClassToTypeChar']['get'](_0x56de8e['constructor']);}['_getViewFromDiffObj'](_0x2c128a,_0x4645f4){const _0x3fafba=this['editor']['editing']['view']['document'];if('string'==typeof _0x2c128a)return new _0x2595bd(_0x3fafba,_0x2c128a);{let _0x53d004,_0x5004ef;_0x5004ef='u'==_0x2c128a['type']||'r'==_0x2c128a['type']?[]:_0x2c128a['children']['map'](_0x182148=>this['_getViewFromDiffObj'](_0x182148,_0x4645f4));const _0x1af6bb=this['_typeCharToViewClass']['get'](_0x2c128a['type'])||_0x21e0f1,_0x5b780a=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x53d004=new _0x1af6bb(_0x3fafba,_0x2c128a['name'],_0x2c128a['attributes'],_0x5004ef),'u'==_0x2c128a['type']){const _0x34f8e7=_0x2c128a['children'][0x0];if(_0x53d004['render']=function(_0xa7dc2a){const _0x5669ea=_0xa7dc2a['createElement']('div');return _0x5669ea['innerHTML']=_0x34f8e7,_0x5669ea['childNodes'][0x0];},_0x4645f4){const _0x14833e=new _0x35262a(_0x3fafba);_0x14833e['_appendChild'](_0x53d004);const _0x5425ed=Array['from'](_0x5b780a['viewChildrenToDom'](_0x14833e,{'bind':!0x1})),_0x55bb94=_0x5b780a['domDocument']['createElement']('div');_0x55bb94['append'](..._0x5425ed),_0x53d004=Array['from'](_0x5b780a['domChildrenToView'](_0x55bb94))[0x0];}}else{if('r'==_0x2c128a['type']){const _0x4320db=_0x2c128a['children'][0x0];if(_0x53d004['render']=function(_0x4474f6){_0x4474f6['innerHTML']=_0x4320db;},_0x4645f4){const _0x4276c5=new _0x35262a(_0x3fafba);_0x4276c5['_appendChild'](_0x53d004);const _0x3ecab9=Array['from'](_0x5b780a['viewChildrenToDom'](_0x4276c5,{'bind':!0x1})),_0x18f06a=_0x5b780a['domDocument']['createElement']('div');_0x18f06a['append'](..._0x3ecab9);const _0x419377=Array['from'](_0x5b780a['domChildrenToView'](_0x18f06a));_0x419377['length']>0x1?_0x53d004['_appendChild'](_0x419377):_0x53d004=_0x419377[0x0];}}}if(_0x2c128a['customProperties']){for(const [_0x48b046,_0x4a91cc]of _0x2c128a['customProperties'])_0x53d004['_setCustomProperty'](_0x48b046,_0x4a91cc);}const _0x5b4efa=_0x2c128a['fillerOffset']||null;return _0x53d004['getFillerOffset']=()=>_0x5b4efa,_0x53d004;}}['_makeModelFromViewString'](_0x515222){const _0x1bc5fe=JSON['parse'](_0x515222),_0x17f203=this['editor']['editing']['view']['document'],_0x540002=new _0x35262a(_0x17f203,_0x1bc5fe['map'](_0x309461=>this['_getViewFromDiffObj'](_0x309461,!0x0)));return this['editor']['data']['toModel'](_0x540002);}['_removeRevisionMarkers'](_0x1c39fc){return(_0x1c39fc=_0x1c39fc['filter'](_0x5ab929=>!_0x5ab929['name']||'revision-start'!==_0x5ab929['name']&&'revision-end'!==_0x5ab929['name']))['forEach'](_0x31827f=>{'string'!=typeof _0x31827f&&(_0x31827f['children']=this['_removeRevisionMarkers'](_0x31827f['children']),_0x31827f['attributes']=_0x31827f['attributes']['filter'](_0x14dd47=>!_0x14dd47[0x0]['startsWith']('data-revision-')));}),_0x1c39fc;}}function g(_0x267cac,_0x5a2791,_0x56cd3f){const t=_0x267cac['t'];switch(_0x5a2791){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'},_0x56cd3f);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x56cd3f);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class u extends _0x5bfc96{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x688979,I,V,_0x478b8b];}constructor(_0x5e05cb){super(_0x5e05cb),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3152c2=_0x27ee83();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3152c2},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x238406=this['repository']['getRevision'](0x0),_0x51b635=_0x238406&&null===_0x238406['creator']?_0x238406:null;if(this['_continueCurrentRevision']=!!_0x51b635&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x57423c=this['_source']['getCurrentRevisionId'](),_0x5c070c=this['repository']['getRevision'](_0x57423c);if(_0x5c070c)this['_startingVersion']=_0x5c070c['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x6f7e34=this['_source']['history']['_operations']['find'](_0x3b8996=>!_0x3b8996['_isInit']),_0x3d17b9=_0x6f7e34?_0x6f7e34['baseVersion']:this['_source']['history']['version'];_0x238406?(_0x238406['toVersion']<_0x3d17b9&&_0x238406['_update']({'toVersion':_0x3d17b9}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x51b635['id'],this['_startingVersion']=_0x51b635['fromVersion']):(this['_startingVersion']=_0x238406['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3d17b9,this['_continueCurrentRevision']=!0x1);}}else _0x51b635&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x51b635['toVersion'],this['editor']['model']['document']['history']['version']),_0x51b635['fromVersion']===_0x51b635['toVersion']?(0x0!==_0x51b635['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x51b635['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x51b635['id'],this['_startingVersion']=_0x51b635['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',_0x1fbc8c=>!_0x1fbc8c),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x9aa905=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23208b;for(const _0x54fc8f in _0x9aa905){const _0x586a8e=_0x54fc8f,_0x3f291f=_0x9aa905[_0x586a8e];if('revisionHistoryLicenseKeyValid'==_0x3f291f||'revisionHistoryLicenseKeyInvalid'==_0x3f291f||'revisionHistoryLicenseKeyExpired'==_0x3f291f||'revisionHistoryLicenseKeyDomainLimit'==_0x3f291f||'revisionHistoryLicenseKeyNotAllowed'==_0x3f291f||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3f291f||'revisionHistoryLicenseKeyTrialLimit'==_0x3f291f||'revisionHistoryLicenseKeyUsageLimit'==_0x3f291f){delete _0x9aa905[_0x586a8e],_0x23208b=_0x3f291f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x23208b&&_0x9aa905['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x23208b&&_0x9aa905['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x23208b&&_0x9aa905['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x23208b&&_0x9aa905['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x23208b&&_0x9aa905['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x23208b&&_0x9aa905['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x23208b&&_0x9aa905['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x37fcc9=this['repository']['getRevision'](0x0),_0x4b1c00=await this['getRevisionDocumentData'](_0x37fcc9),_0x5b6b9f=await this['getRevisionRootsAttributes'](_0x37fcc9);this['_replaceEditorDataWithRevisionData'](_0x4b1c00,_0x5b6b9f);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1317ba){this['_source']=_0x1317ba;}async['update'](){const _0x5ee6ee=await this['_source']['getLatestVersion']();if(_0x5ee6ee>this['currentRevision']['toVersion']){await this['_loadState']();const _0x55868d=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5ee6ee});_0x55868d['authors']=_0x55868d['authorsIds']['map'](_0x549a7b=>this['editor']['plugins']['get']('Users')['getUser'](_0x549a7b)),this['currentRevision']['_update'](_0x55868d);}}async['saveRevision'](_0x20a51e={},_0x2a4180=null){const _0x3a2a49=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2a4180>this['currentRevision']['toVersion']&&(_0x2a4180=null),null===_0x2a4180&&(_0x2a4180=await this['_source']['getLatestVersion']());const _0x4eabad=this['_getFromVersion'](_0x2a4180),_0x2f7479=this['buildRevisionData']({'from':_0x4eabad,'to':_0x2a4180});if(this['currentRevision']['toVersion']<_0x2a4180){const _0x40f125=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2a4180,'to':_0x2a4180});_0x40f125['authors']=[],_0x40f125['authorsIds']=[],_0x40f125['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x40f125,!0x0),delete _0x40f125['authors'],_0x3a2a49['push'](_0x40f125);}_0x20a51e['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x20a51e['name']=_0x20a51e['name']||null,_0x20a51e['id']=_0x20a51e['id']||_0x27ee83(),_0x20a51e={..._0x20a51e,..._0x2f7479};const _0x2acff0=this['addRevisionData'](_0x20a51e);_0x3a2a49['push'](_0x20a51e);const _0x3a81c7=this['repository']['getIndex'](_0x2acff0);if(0x0!==_0x3a81c7){const _0x299e1c=this['repository']['getRevision'](_0x3a81c7-0x1);if(_0x299e1c['fromVersion']!==_0x2a4180){const _0x5185c1=this['_revisionDataBuilder']['getData'](_0x2a4180,_0x299e1c['toVersion']),_0x461263={'id':_0x299e1c['id'],'diffData':_0x5185c1['diffData'],'authorsIds':_0x5185c1['authorsIds'],'authors':_0x5185c1['authorsIds']['map'](_0x716a5e=>this['editor']['plugins']['get']('Users')['getUser'](_0x716a5e)),'fromVersion':_0x2a4180};_0x299e1c===this['currentRevision']&&(_0x461263['createdAt']=new Date(_0x20a51e['createdAt']['getTime']()+0xa)),_0x299e1c['_update'](_0x461263,!0x0),delete _0x461263['authors'],_0x3a2a49['push'](_0x461263);}}if(this['adapter']){for(const _0x288f41 of _0x3a2a49)this['_bufferUpdate'](_0x288f41['id'],_0x288f41,!0x0);this['sendBufferedUpdates']();}return _0x2acff0;}['addRevisionData'](_0x5a9d8a){const _0x26edda=this['repository']['createRevision'](_0x5a9d8a);return this['adapter']&&_0x26edda['on']('_update',(_0x4920e1,_0x4c5f1d,_0x56ccca)=>{_0x56ccca||(this['_bufferUpdate'](_0x4c5f1d['id'],_0x4c5f1d,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x26edda,this['_findInsertionIndex'](_0x26edda)),_0x26edda;}async['getRevisionDocumentData'](_0x408d1c){return await this['_utils']['loadRevisionData'](_0x408d1c,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x408d1c);}async['getRevisionRootsAttributes'](_0xaa237c){return await this['_utils']['loadRevisionData'](_0xaa237c,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xaa237c);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xa3e590=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3e8612=0x0;_0x3e8612<_0xa3e590['length'];_0x3e8612++){const _0x3c2d80=_0xa3e590[_0x3e8612];let _0x4f1569=!0x1;for(const _0xe3cbc9 of Object['keys'](_0x3c2d80))void 0x0===_0x3c2d80[_0xe3cbc9]?delete _0x3c2d80[_0xe3cbc9]:'id'!==_0xe3cbc9&&(_0x4f1569=!0x0);_0x4f1569||(_0xa3e590[_0x3e8612]=null);}if(_0xa3e590=_0xa3e590['filter'](_0x5eee2e=>null!==_0x5eee2e),!_0xa3e590['length'])return;for(let _0x3d747b=0x0;_0x3d747b<_0xa3e590['length'];_0x3d747b++){const _0x5364c1=_0xa3e590[_0x3d747b];void 0x0!==_0x5364c1['fromVersion']&&void 0x0===_0x5364c1['toVersion']&&(_0x5364c1['toVersion']=this['repository']['getRevision'](_0x5364c1['id'])['toVersion']),void 0x0!==_0x5364c1['toVersion']&&void 0x0===_0x5364c1['fromVersion']&&(_0x5364c1['fromVersion']=this['repository']['getRevision'](_0x5364c1['id'])['fromVersion']);}const _0x362b07=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xa3e590,_0x362b07)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x13f866=>{if(_0x13f866){for(const _0x3978b3 of _0x13f866)this['setRevisionData']({'id':_0x3978b3['id'],'createdAt':_0x3978b3['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x262028=null,from:_0x5447c7=null,to:_0x19e6b0=null}){_0x5447c7=null!==_0x5447c7?_0x5447c7:_0x262028['fromVersion'],_0x19e6b0=null!==_0x19e6b0?_0x19e6b0:_0x262028['toVersion'];const _0x3479b7=this['_revisionDataBuilder']['getData'](_0x5447c7,_0x19e6b0),_0x13cea9={'diffData':_0x3479b7['diffData'],'authorsIds':_0x3479b7['authorsIds'],'fromVersion':_0x5447c7,'toVersion':_0x19e6b0};if(!_0x262028||_0x19e6b0!==_0x262028['toVersion']){const _0x35676e=_0x19e6b0-0x1,_0x234717=this['_source']['history']['getOperation'](_0x35676e);_0x13cea9['createdAt']=_0x234717&&_0x234717['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5447c7===this['_loadedStateData']['fromVersion']){for(const _0x50d8d3 of this['_loadedStateData']['authors'])_0x13cea9['authorsIds']['includes'](_0x50d8d3['id'])||_0x13cea9['authorsIds']['push'](_0x50d8d3['id']);}return _0x13cea9;}['_bufferUpdate'](_0x1bf458,_0x30527a,_0x7a09f2){if(this['_bufferedUpdates']['has'](_0x1bf458)){const _0x414e27=this['_bufferedUpdates']['get'](_0x1bf458);_0x30527a=_0x7a09f2?{..._0x414e27,..._0x30527a}:{..._0x30527a,..._0x414e27};}this['_bufferedUpdates']['set'](_0x1bf458,_0x30527a);}['setRevisionData'](_0x3cd0cd){const _0x5a64c5=this['repository']['getRevision'](_0x3cd0cd['id']);if(_0x3cd0cd['createdAt']&&(_0x3cd0cd['createdAt']=new Date(_0x3cd0cd['createdAt'])),_0x3cd0cd['authorsIds']){const _0x3f5cde=this['editor']['plugins']['get']('Users');_0x3cd0cd['authors']=_0x3cd0cd['authorsIds']['map'](_0x46fedc=>_0x3f5cde['getUser'](_0x46fedc));}_0x5a64c5['_update'](_0x3cd0cd,!0x0);}['_createInitialRevision'](_0x412d57){const _0x3cf189=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3cf189)this['_initialRevisionId']=_0x3cf189['id'];else{const _0x2cc59f=!this['editor']['model']['document']['roots']['find'](_0x14d61b=>this['editor']['model']['hasContent'](_0x14d61b)),_0x1d6ba8=this['editor']['plugins']['get']('Users')['me']['id'],_0x5155de=g(this['editor']['locale'],_0x2cc59f?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x412d57,'to':_0x412d57,'id':this['_initialRevisionId'],'name':_0x5155de,'creatorId':_0x1d6ba8});}}['_createCurrentRevision'](_0x1fe3f8){const _0x356a89=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x356a89),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1fe3f8,'to':_0x1fe3f8,'id':_0x356a89,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x28dc95,_0x19359d){let _0x4403f8=this['editor']['config']['get']('initialData'),_0x30cce3=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x4403f8){_0x4403f8={};for(const _0x5a9063 of this['editor']['model']['document']['getRootNames']())_0x4403f8[_0x5a9063]='';}if('string'==typeof _0x4403f8&&(_0x4403f8={'main':_0x4403f8}),void 0x0===_0x30cce3){_0x30cce3={};for(const _0x320908 of this['editor']['model']['document']['getRootNames']())_0x30cce3[_0x320908]={};}let _0x279aae=!0x1;const _0xa00ccb=Object['keys'](_0x4403f8),_0x2b7758=Object['keys'](_0x28dc95);for(const _0x3f21af of _0xa00ccb){if(_0x4403f8[_0x3f21af]!==_0x28dc95[_0x3f21af]&&''!==_0x4403f8[_0x3f21af]['trim']()){_0x279aae=!0x0;break;}if(!_0x3dce40(_0x30cce3[_0x3f21af],_0x19359d[_0x3f21af])&&Object['keys'](_0x30cce3[_0x3f21af])['length']>0x0){_0x279aae=!0x0;break;}}_0x279aae||(_0x279aae=_0x2b7758['some'](_0xe6334f=>!this['editor']['model']['document']['getRoot'](_0xe6334f))),_0x279aae&&_0xa63e6('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4403f8,'editorRootsAttributes':_0x30cce3,'revisionData':_0x28dc95,'revisionRootsAttributes':_0x19359d}),this['editor']['config']['set']('initialData',_0x28dc95),this['editor']['config']['set']('rootsAttributes',_0x19359d);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x38c9a5=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x38c9a5['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0xb0d363){const _0x4ed257=this['repository']['getRevisions']();_0x4ed257['reverse']();let _0x1fb1d4=0x0;for(;_0x1fb1d4<_0x4ed257['length'];){const _0x56f524=_0x4ed257[_0x1fb1d4];if(_0x56f524===this['currentRevision']){_0x1fb1d4++;continue;}if(_0x56f524['id']===this['_initialRevisionId'])break;const _0x3c5afb=_0xb0d363['toVersion']-_0x56f524['toVersion']||_0xb0d363['fromVersion']-_0x56f524['fromVersion'];if(_0x3c5afb>0x0)break;if(_0x3c5afb<0x0)_0x1fb1d4++;else{if(!_0xb0d363['creator']&&_0x56f524['creator'])break;if(_0x56f524['creator']||!_0xb0d363['creator']){if(_0xb0d363['createdAt']>_0x56f524['createdAt'])break;_0x1fb1d4++;}else _0x1fb1d4++;}}return _0x1fb1d4;}['_getFromVersion'](_0xa24a1){const _0x3f0554=this['repository']['getRevisions']();_0x3f0554['reverse'](),_0x3f0554['shift']();const _0x5c3fc4=_0x3f0554['find'](_0x373c73=>_0x373c73['toVersion']<=_0xa24a1)['toVersion'];return _0x5c3fc4<this['_startingVersion']?this['_startingVersion']:_0x5c3fc4;}['_makeRevision']({name:_0x54295c,from:_0x547d41,to:_0x39f90a,creatorId:_0x37622b,id:_0x262a96}){const _0x554f5b=this['buildRevisionData']({'from':_0x547d41,'to':_0x39f90a});_0x554f5b['name']=_0x54295c,_0x554f5b['creatorId']=_0x37622b,_0x554f5b['id']=_0x262a96;const _0x4f7ed6=this['addRevisionData'](_0x554f5b);return this['adapter']&&this['_bufferUpdate'](_0x554f5b['id'],_0x554f5b,!0x0),_0x4f7ed6;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3d947d){this['editor']=_0x3d947d,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'](_0x29836e){this['source']=_0x29836e;const _0x224bbc=new Map(),_0x570230=new Map(),_0x5dd1ba=this['editor']['model']['document']['roots']['map'](_0x1cc1be=>_0x1cc1be['rootName']);for(const _0x5e4909 of _0x5dd1ba){const _0x35b52a=this['editor']['model']['document']['getRoot'](_0x5e4909),_0x13dedf=N(_0x35b52a);_0x224bbc['set'](_0x5e4909,_0x13dedf),_0x570230['set'](_0x5e4909,Object['fromEntries'](_0x35b52a['getAttributes']()));}const _0x51e374=Array['from'](this['editor']['model']['markers'])['map'](_0x3b0acd=>[_0x3b0acd['name'],_0x3b0acd['getRange']()]),_0x576cdb=this['source']['version'];this['_saveMetaData'](_0x576cdb,_0x224bbc,_0x51e374,_0x570230),this['_startingRevisionId']=this['_revisionId'];const _0x313186=new Map(),_0x4b6937=new Map();for(const _0x46820e of _0x5dd1ba){const _0x4229d7=P(_0x46820e);_0x313186['set'](_0x46820e,_0x4229d7),_0x4b6937['set'](_0x46820e,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x313186,[],_0x4b6937);}['getData'](_0x515d1a,_0x5164f9){if(this['_lastFrom']===_0x515d1a&&this['_lastTo']<=_0x5164f9)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5164f9,!0x0);else{if(!this['_savedMetaData']['has'](_0x515d1a)){const _0x13cb48=this['_getPreviousFrom'](_0x515d1a);this['_calculateMetaData'](_0x13cb48,_0x515d1a,!0x1);}this['_calculateMetaData'](_0x515d1a,_0x5164f9,!0x0);}return this['_lastFrom']=_0x515d1a,this['_lastTo']=_0x5164f9,this['_getState']();}['loadState'](_0x75492d){const _0x356f49=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x75492d['fromVersion'],this['_lastTo']=_0x75492d['toVersion'];for(const _0x42855a in _0x75492d['diffData']){const _0x5df251=_0x75492d['diffData'][_0x42855a]['attachChange'],_0x3fa58d=_0x4ec41c(_0x75492d['diffData'][_0x42855a]['attributesBefore'])||{},_0x2653b8=_0x356f49['_makeModelFromViewString'](_0x75492d['diffData'][_0x42855a]['deletions']);_0x2653b8['rootName']=_0x42855a,_0x2653b8['_isAttached']=!_0x5df251||!_0x5df251['isAttached'],_0x2653b8['isAttached']=()=>_0x2653b8['_isAttached'],this['_baseRoots']['set'](_0x42855a,_0x2653b8),this['_baseRootsAttributes']['set'](_0x42855a,_0x3fa58d),_0x5df251&&this['_touchedRoots']['set'](_0x42855a,_0x5df251);const _0x9b2b5f=this['_makeIdsRoot'](_0x2653b8);this['_baseIdsRoots']['set'](_0x42855a,_0x9b2b5f);for(const [_0x18900a,_0xf1d8a2]of _0x2653b8['markers']){if(!_0x18900a['startsWith']('revision:'))continue;const _0x48f0c6=_0x18900a['split'](':')[0x2];for(const _0x2f43af of _0xf1d8a2['getWalker']({'singleCharacters':!0x0})){const _0x40502f=this['_getVidAttributeName'](_0x2f43af),_0x54dc26='elementEnd'==_0x2f43af['type']?_0x2f43af['previousPosition']['path']['slice'](0x0,-0x1):_0x2f43af['previousPosition']['path'],_0x3918f6=_0x9b2b5f['getNodeByPath'](_0x54dc26)['getAttribute'](_0x40502f);this['_touched']['set'](_0x3918f6,{'userId':_0x48f0c6});}}}this['_startingRevisionId']=this['_revisionId'];const _0x2f8855=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2b664f=>!this['_touched']['has'](_0x2b664f));let _0x1fb5c2=0x0;const _0x4e7698=new Map();for(const _0x34adc4 in _0x75492d['diffData']){const _0x525502=_0x75492d['diffData'][_0x34adc4]['attachChange'],_0x31d928=_0x4ec41c(_0x75492d['diffData'][_0x34adc4]['attributesAfter'])||{},_0x183c78=_0x356f49['_makeModelFromViewString'](_0x75492d['diffData'][_0x34adc4]['insertions']);_0x183c78['rootName']=_0x34adc4,_0x183c78['_isAttached']=!_0x525502||_0x525502['isAttached'],_0x183c78['isAttached']=()=>_0x183c78['_isAttached'],this['_diffRoots']['set'](_0x34adc4,_0x183c78),this['_diffRootsAttributes']['set'](_0x34adc4,_0x31d928);const _0x591449=this['_makeIdsRoot'](_0x183c78,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x34adc4,_0x591449),_0x4e7698['set'](_0x34adc4,_0x183c78['isAttached']()?_0x31d928:{});for(const [_0x262325,_0x28bdd8]of _0x183c78['markers']){if(!_0x262325['startsWith']('revision:'))continue;const _0xf3f23c=_0x262325['split'](':')[0x2];for(const _0x5e79d1 of _0x28bdd8['getWalker']({'singleCharacters':!0x0})){const _0x574ccd=this['_getVidAttributeName'](_0x5e79d1),_0x353a8a=this['_revisionId']++,_0x3531df='elementEnd'==_0x5e79d1['type']?_0x5e79d1['previousPosition']['path']['slice'](0x0,-0x1):_0x5e79d1['previousPosition']['path'];_0x591449['getNodeByPath'](_0x3531df)['_setAttribute'](_0x574ccd,_0x353a8a),this['_touched']['set'](_0x353a8a,{'userId':_0xf3f23c});}}for(const _0x916474 of this['editor']['model']['createRangeIn'](_0x183c78)['getWalker']({'singleCharacters':!0x0})){const _0x5108b2=this['_getVidAttributeName'](_0x916474),_0x5c8d8c='elementEnd'==_0x916474['type']?_0x916474['previousPosition']['path']['slice'](0x0,-0x1):_0x916474['previousPosition']['path'],_0x3c823a=_0x591449['getNodeByPath'](_0x5c8d8c);_0x3c823a['getAttribute'](_0x5108b2)>0x0||_0x3c823a['_setAttribute'](_0x5108b2,_0x2f8855[_0x1fb5c2++]);}for(const [_0x48e9f0,_0x366e55]of _0x183c78['markers'])_0x48e9f0['startsWith']('revision:')||this['_markers']['set'](_0x48e9f0,_0x366e55);}const _0x382745=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x382745),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x382745,0x1));const _0x30ace6=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x30ace6),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x30ace6,0x1));const _0x482fbb=Array['from'](this['_diffRoots'])['map'](([_0x4d4984,_0xbbf167])=>[_0x4d4984,N(_0xbbf167)]);this['_saveMetaData'](this['_lastTo'],_0x482fbb,this['_markers'],_0x4e7698);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x13be81,_0x119546,_0x96f2d1,_0x22eacb){const _0x55acfb=new Map(_0x119546),_0x59d28f=new Map(_0x4ec41c(_0x22eacb)),_0x578020=new Map();for(const [_0x3ddc83,_0x163b90]of _0x96f2d1)_0x578020['set'](_0x3ddc83,{'start':_0x163b90['start']['clone'](),'end':_0x163b90['end']['clone'](),'rootName':_0x163b90['root']['rootName']});this['_savedMetaData']['set'](_0x13be81,{'roots':_0x55acfb,'markers':_0x578020,'rootsAttributes':_0x59d28f});}['_removeMetaData'](_0x2690de){this['_savedMetaData']['delete'](_0x2690de);}['_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'](_0x57083a,_0x17a284=null){let _0x3cf672=null;_0x57083a['is']('documentFragment')||(_0x3cf672=new ut(_0x57083a['name'],{'vid_start':null===_0x17a284?this['_revisionId']++:_0x17a284++}));const _0x4f3792=[];for(const _0x4b7e41 of _0x57083a['getChildren']())if(_0x4b7e41['is']('element')){_0x4f3792['push'](this['_makeIdsRoot'](_0x4b7e41,_0x17a284));const _0x697af5=_0x4f3792[_0x4f3792['length']-0x1];null!==_0x17a284&&(_0x17a284=_0x697af5['is']('element','$text')?_0x697af5['getAttribute']('vid')+0x1:_0x697af5['getAttribute']('vid_end')+0x1);}else{for(let _0x36003d=0x0;_0x36003d<_0x4b7e41['offsetSize'];_0x36003d++)_0x4f3792['push'](new ut('$text',{'vid':null===_0x17a284?this['_revisionId']++:_0x17a284++}));}if(_0x57083a['is']('documentFragment')){const _0x38d8a2=P(_0x57083a['rootName']);return _0x38d8a2['_insertChild'](0x0,_0x4f3792),_0x38d8a2;}return _0x3cf672['_setAttribute']('vid_end',null===_0x17a284?this['_revisionId']++:_0x17a284++),_0x3cf672['_insertChild'](0x0,_0x4f3792),_0x3cf672;}['_calculateMetaData'](_0x3bc964,_0x196568,_0x6f5a98){this['_reset']();const {roots:_0xaacaf0,markers:_0xae4513,rootsAttributes:_0x46bcd8}=this['_savedMetaData']['get'](_0x3bc964);this['_baseRoots']=new Map(_0xaacaf0),this['_baseRootsAttributes']=new Map(_0x4ec41c(_0x46bcd8));for(const [_0x5c2bae,_0x5683cf]of this['_baseRoots'])if('$graveyard'!==_0x5c2bae&&(this['_diffRoots']['set'](_0x5c2bae,N(_0x5683cf)),this['_diffRootsAttributes']=new Map(_0x4ec41c(_0x46bcd8)),_0x6f5a98)){const _0x5e9a10=this['_revisionId'];this['_idsRoots']['set'](_0x5c2bae,this['_makeIdsRoot'](_0x5683cf)),this['_baseIdsRoots']['set'](_0x5c2bae,this['_makeIdsRoot'](_0x5683cf,_0x5e9a10));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x6f5a98&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0xf2b67a,_0xc2d299]of _0xae4513){const _0x43cc40=this['_baseRoots']['get'](_0xc2d299['rootName']),_0x48c7ea=this['_diffRoots']['get'](_0xc2d299['rootName']),_0x55e2c7=new ft(this['_fixPosition'](_0xc2d299['start'],_0x43cc40),this['_fixPosition'](_0xc2d299['end'],_0x43cc40)),_0x35746d=this['_fixRange'](_0x55e2c7,_0x48c7ea);_0x43cc40['markers']['set'](_0xf2b67a,_0x55e2c7),this['_markers']['set'](_0xf2b67a,_0x35746d);}this['_applyOperations'](_0x3bc964,_0x196568,_0x6f5a98);}['_applyOperations'](_0x29a12f,_0x1d2cc5,_0x51f6a2){for(const _0xdac29d of this['source']['getOperations'](_0x29a12f,_0x1d2cc5))this['_handleOperation'](_0xdac29d,_0x51f6a2);for(const _0x36b359 of this['_diffRoots']['values']())_0x36b359['markers']['clear']();for(const [_0x1ba839,_0x349482]of this['_markers']){this['_diffRoots']['get'](_0x349482['root']['rootName'])['markers']['set'](_0x1ba839,_0x349482['clone']());}const _0x352c86=new Map(),_0x2337f8=new Map();for(const [_0xe4fd04,_0x153c6c]of this['_diffRoots'])_0x352c86['set'](_0xe4fd04,N(_0x153c6c)),_0x2337f8['set'](_0xe4fd04,this['_diffRootsAttributes']['get'](_0xe4fd04));this['_saveMetaData'](_0x1d2cc5,_0x352c86,this['_markers'],_0x2337f8);}['_getPreviousFrom'](_0x830012){const _0xe5ab49=Array['from'](this['_savedMetaData']['keys']());_0xe5ab49['sort']((_0x40e1b6,_0xe996c9)=>_0x40e1b6-_0xe996c9),_0xe5ab49['reverse']();for(const _0x5ad65a of _0xe5ab49)if(_0x5ad65a<_0x830012)return _0x5ad65a;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x35d472,_0x32712d){const _0x1e2331=Array['from'](_0x32712d['markers'])['map'](([_0x12c1cf,_0x482963])=>[_0x12c1cf,this['_fixRange'](_0x482963,_0x35d472)]);_0x35d472['markers']=new Map(_0x1e2331);}['_transformMarkers'](_0x35e034){for(const _0x230f98 of this['_markers']['values']()){const _0x4a5087=_0x230f98['getTransformedByOperation'](_0x35e034),_0x1fc541=ft['_createFromRanges'](_0x4a5087);_0x230f98['start']=_0x1fc541['start'],_0x230f98['end']=_0x1fc541['end'];}}['_handleOperation'](_0x1e7d5b,_0x4815aa){if('addRoot'!=_0x1e7d5b['type']&&'detachRoot'!=_0x1e7d5b['type']){if('insert'==_0x1e7d5b['type']){const _0x591b78=_0x1e7d5b['position']['root']['rootName'];this['_diffRoots']['has'](_0x591b78)||(this['_diffRoots']['set'](_0x591b78,P(_0x591b78,!0x0)),this['_diffRootsAttributes']['set'](_0x591b78,{}),_0x4815aa&&this['_idsRoots']['set'](_0x591b78,P(_0x591b78,!0x0)));}else{if('addRootAttribute'==_0x1e7d5b['type']||'removeRootAttribute'==_0x1e7d5b['type']||'changeRootAttribute'==_0x1e7d5b['type'])return void this['_handleRootAttributeOperation'](_0x1e7d5b);'marker'==_0x1e7d5b['type']&&this['_handleMarkerOperation'](_0x1e7d5b);}if('marker'!==_0x1e7d5b['type']){const _0x24518e=this['_cloneOperation'](_0x1e7d5b,this['_diffRoots']);_0x24518e['_execute'](),this['_transformMarkers'](_0x24518e);}if(_0x4815aa)switch(_0x1e7d5b['type']){case'insert':this['_handleInsertOperation'](_0x1e7d5b);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1e7d5b);break;case'merge':this['_handleMergeOperation'](_0x1e7d5b);break;case'split':this['_handleSplitOperation'](_0x1e7d5b);}}else this['_handleRootOperation'](_0x1e7d5b,_0x4815aa);}['_cloneOperation'](_0xc2689c,_0x333e5d){const _0x455c01=_0xc2689c['clone']();return _0x455c01['_authorId']=_0xc2689c['_authorId'],this['_fixOperation'](_0x455c01,_0x333e5d),_0x455c01;}['_getBaseVids'](_0x315771){return _0x315771['map'](_0x507d55=>{const _0x37f90a=this['_getVidAttributeName'](_0x507d55);return Number(_0x507d55['item']['getAttribute'](_0x37f90a));});}['_generateTape'](_0x298261,_0x397ccd){if(_0x298261['is']('element','$text'))_0x397ccd['push']({'item':_0x298261,'type':'text'});else{_0x298261['is']('element')&&_0x397ccd['push']({'item':_0x298261,'type':'elementStart'});for(const _0x3673d9 of _0x298261['getChildren']())this['_generateTape'](_0x3673d9,_0x397ccd);_0x298261['is']('element')&&_0x397ccd['push']({'item':_0x298261,'type':'elementEnd'});}return _0x397ccd;}['_getState'](){const _0x5e9a1c=new Map(this['_touched']),_0x42f60f=new Map(_0x5e9a1c),_0x3766e9=new Map(),_0x900ec1={'insertions':{},'deletions':{}},_0x22503f={'insertions':{},'deletions':{}},_0x5a1c22=new Map(),_0x4d28c3=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x4d28c3['delete']('$graveyard');for(const _0x656215 of _0x4d28c3){const _0xed4aa3=this['_diffRoots']['get'](_0x656215)||P(_0x656215,!0x1),_0x30a184=this['_baseRoots']['get'](_0x656215)||P(_0x656215,!0x1);_0xed4aa3['isAttached']()||_0x30a184['isAttached']()?(_0x900ec1['insertions'][_0x656215]=N(_0xed4aa3),_0x900ec1['deletions'][_0x656215]=N(_0x30a184),this['_copyMarkers'](_0x900ec1['deletions'][_0x656215],_0x30a184),this['_copyMarkers'](_0x900ec1['insertions'][_0x656215],_0xed4aa3),_0x22503f['insertions'][_0x656215]=this['_generateTape'](this['_idsRoots']['get'](_0x656215),[]),_0x22503f['deletions'][_0x656215]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x656215)||P(_0x656215,!0x1),[])):_0x4d28c3['delete'](_0x656215);}for(const _0x51b488 of _0x4d28c3){const _0x5bd2f9=_0x22503f['insertions'][_0x51b488];for(const _0x375e4a of _0x5bd2f9){const _0x442b44=this['_getVidAttributeName'](_0x375e4a),_0x53a74b=_0x375e4a['item']['getAttribute'](_0x442b44);_0x42f60f['delete'](_0x53a74b),_0x53a74b>=this['_startingRevisionId']&&_0x3766e9['set'](_0x53a74b,_0x5e9a1c['get'](_0x53a74b));}}for(const _0x391d62 of _0x4d28c3){const _0x432b0d=_0x22503f['insertions'][_0x391d62],_0x317ca6=this['_getBaseVids'](_0x22503f['deletions'][_0x391d62]);let _0x4c2687=0x0;for(const _0x4d6745 of _0x432b0d){const _0x2a44b3=this['_getVidAttributeName'](_0x4d6745),_0x199622=_0x4d6745['item']['getAttribute'](_0x2a44b3);if(!_0x3766e9['has'](_0x199622)&&!_0x5a1c22['has'](_0x199622)){if(_0x42f60f['has'](_0x199622))_0x4c2687++;else{if(_0x199622!=_0x317ca6[_0x4c2687]){const _0x5087ed=_0x5e9a1c['get'](_0x199622)||_0x5e9a1c['get'](_0x317ca6[_0x4c2687]);for(;_0x199622!=_0x317ca6[_0x4c2687];)_0x42f60f['has'](_0x317ca6[_0x4c2687])||(_0x5a1c22['set'](_0x317ca6[_0x4c2687],_0x5087ed),_0x5e9a1c['set'](_0x317ca6[_0x4c2687],_0x5087ed)),_0x4c2687++;}_0x4c2687++;}}}}for(const _0x1239ae of _0x4d28c3){const _0xb79ecf=_0x22503f['insertions'][_0x1239ae];for(const _0x157a38 of _0xb79ecf){const _0x43eb71=this['_getVidAttributeName'](_0x157a38),_0x3f3fcc=_0x157a38['item']['getAttribute'](_0x43eb71);if(_0x5a1c22['has'](_0x3f3fcc)){const _0x6e75c1=_0x5a1c22['get'](_0x3f3fcc);_0x42f60f['has'](_0x3f3fcc)||_0x42f60f['set'](_0x3f3fcc,{..._0x6e75c1}),_0x3766e9['set'](_0x3f3fcc,{..._0x6e75c1});}}}for(const _0x5e66b2 of _0x42f60f['keys']())_0x5e66b2>=this['_startingRevisionId']&&_0x42f60f['delete'](_0x5e66b2);const _0x5a17ae=new Map();for(const _0x2739c6 of _0x4d28c3){let _0x282110=_0x22503f['insertions'][_0x2739c6];for(const _0x6114a of _0x282110)if(_0x6114a['item']['is']('element','tableCell')){const _0x1660e5=this['_getVidAttributeName'](_0x6114a),_0x452673=_0x6114a['item']['getAttribute'](_0x1660e5);if(_0x3766e9['has'](_0x452673)){const _0x9be6bf=_0x6114a['item']['parent']['parent']['getAttribute']('vid_start'),_0x2677e9=_0x5a17ae['get'](_0x9be6bf)||new Set();_0x2677e9['add'](_0x3766e9['get'](_0x452673)['userId']),_0x5a17ae['set'](_0x9be6bf,_0x2677e9);}}_0x282110=_0x22503f['deletions'][_0x2739c6];for(const _0x5d46d3 of _0x282110)if(_0x5d46d3['item']['is']('element','tableCell')){const _0x4b834a=this['_getVidAttributeName'](_0x5d46d3),_0x11e95a=_0x5d46d3['item']['getAttribute'](_0x4b834a);if(_0x42f60f['has'](_0x11e95a)){const _0x5bc843=_0x5d46d3['item']['parent']['parent']['getAttribute']('vid_start'),_0x12ce3d=_0x5a17ae['get'](_0x5bc843)||new Set();_0x12ce3d['add'](_0x42f60f['get'](_0x11e95a)['userId']),_0x5a17ae['set'](_0x5bc843,_0x12ce3d);}}for(const _0xecb24f of _0x5a17ae['keys']())(_0x3766e9['has'](_0xecb24f)||_0x42f60f['has'](_0xecb24f))&&_0x5a17ae['delete'](_0xecb24f);}for(const _0x35972d of _0x4d28c3){const _0x2609a8=_0x22503f['insertions'][_0x35972d];let _0x535f6c=null,_0x480dc1=null;for(const _0x36c0b2 of _0x2609a8){const _0x240b85=this['_getVidAttributeName'](_0x36c0b2),_0x5b6c71=_0x36c0b2['item']['getAttribute'](_0x240b85),_0x466251=_0x5a17ae['get'](_0x5b6c71);_0x466251&&'elementStart'==_0x36c0b2['type']&&(_0x535f6c=Array['from'](_0x466251)[0x0],_0x480dc1=_0x36c0b2['item']['getAttribute']('vid_end')),_0x535f6c&&(_0x42f60f['set'](_0x5b6c71,{'userId':_0x535f6c}),_0x3766e9['set'](_0x5b6c71,{'userId':_0x535f6c})),_0x5b6c71==_0x480dc1&&(_0x535f6c=null,_0x480dc1=null);}}const _0x2169a3={},_0x2f82a6=new Set();for(const _0x4806ed of _0x4d28c3){const _0x23b030=_0x900ec1['deletions'][_0x4806ed],_0x19f954=_0x900ec1['insertions'][_0x4806ed];for(const {userId:_0x3be527}of this['_touchedMarkers']['values']())null!==_0x3be527&&_0x2f82a6['add'](_0x3be527);for(const {userId:_0x5898fe}of this['_touchedRoots']['values']())null!==_0x5898fe&&_0x2f82a6['add'](_0x5898fe);this['_markChanges'](_0x19f954,_0x22503f['insertions'][_0x4806ed],_0x3766e9,'insertion',_0x2f82a6),this['_markChanges'](_0x23b030,_0x22503f['deletions'][_0x4806ed],_0x42f60f,'deletion',_0x2f82a6),_0x2169a3[_0x4806ed]={'insertions':this['_prepareViewToSave'](_0x19f954),'deletions':this['_prepareViewToSave'](_0x23b030),'attachChange':this['_touchedRoots']['get'](_0x4806ed)||null,'attributesBefore':_0x4ec41c(this['_baseRootsAttributes']['get'](_0x4806ed))||{},'attributesAfter':_0x4ec41c(this['_diffRootsAttributes']['get'](_0x4806ed))};}return{'diffData':_0x2169a3,'authorsIds':Array['from'](_0x2f82a6)};}['_processRootBeforeSave'](_0x42260d){for(const [,_0x2d6d57]of _0x42260d['markers']){const _0x12401f=_0x2d6d57['start']['getAncestors']()['filter'](_0x4c2578=>'tableCell'==_0x4c2578['name']);for(const _0x39c1f4 of _0x12401f)0x1==_0x39c1f4['childCount']&&_0x39c1f4['getChild'](0x0)['is']('element','paragraph')&&_0x39c1f4['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x39c16f){this['_processRootBeforeSave'](_0x39c16f);const _0xf4ff84=this['editor']['data']['toView'](_0x39c16f,{}),_0x46a912=Array['from'](_0xf4ff84['getChildren']())['map'](_0x865874=>this['_getViewJson'](_0x865874));return JSON['stringify'](_0x46a912);}['_getViewJson'](_0x48a5f3){if(_0x48a5f3['is']('$text'))return _0x48a5f3['data'];{const _0x4d3843=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x78ad75=_0x48a5f3,_0x19cbb2=this['editor']['data']['htmlProcessor']['domConverter'],_0x521a65={'type':_0x4d3843['_getTypeCharForViewElement'](_0x78ad75),'name':_0x78ad75['name'],'attributes':Array['from'](_0x78ad75['getAttributes']()),'children':Array['from'](_0x78ad75['getChildren']())['map'](_0x5826aa=>this['_getViewJson'](_0x5826aa))};if(_0x48a5f3['is']('uiElement')&&'$comment'!=_0x48a5f3['name']){const _0xdb3ca9=_0x48a5f3['render'](_0x19cbb2['domDocument'],_0x19cbb2);_0x521a65['children']['push'](_0xdb3ca9['outerHTML']);}else{if(_0x48a5f3['is']('rawElement')){const _0x31b9ef=_0x19cbb2['domDocument']['createElement'](_0x78ad75['name']);_0x48a5f3['render'](_0x31b9ef,_0x19cbb2),_0x521a65['children']['push'](_0x31b9ef['innerHTML']);}}const _0x5ea519=Array['from'](_0x78ad75['getCustomProperties']());_0x5ea519['length']>0x0&&(_0x521a65['customProperties']=_0x5ea519);const _0x4d8d56=_0x78ad75['getFillerOffset']();return null!==_0x4d8d56&&(_0x521a65['fillerOffset']=_0x4d8d56),_0x521a65;}}['_markChanges'](_0xe1662e,_0x1be8e8,_0x5eeb1f,_0x5aa9e5,_0x3d83ef){let _0x5f1d6c=null,_0xcd1570=null,_0x56db2b=0x0;const _0x32979b=this['editor']['model'];for(let _0x276210=0x0;_0x276210<_0x1be8e8['length'];_0x276210++){const _0x3433d4=this['_getVidAttributeName'](_0x1be8e8[_0x276210]),_0x556f86=_0x1be8e8[_0x276210]['item']['getAttribute'](_0x3433d4),_0x1e1bcc=_0x5eeb1f['get'](_0x556f86),_0x585261=_0x276210==_0x1be8e8['length']-0x1;(!_0x5f1d6c&&_0x1e1bcc&&(_0x5f1d6c=_0x1e1bcc,_0xcd1570=_0x1be8e8[_0x276210]),_0x5f1d6c&&(!_0x1e1bcc||_0x1e1bcc['userId']!=_0x5f1d6c['userId']))&&(_0x1413eb(_0x1e1bcc,F(_0xcd1570,_0xe1662e,_0x32979b),F(_0x1be8e8[_0x276210],_0xe1662e,_0x32979b)),_0x5f1d6c=_0x1e1bcc||null,_0xcd1570=_0x1e1bcc?_0x1be8e8[_0x276210]:null),_0x5f1d6c&&_0x585261&&_0x1413eb(_0x1e1bcc,F(_0xcd1570,_0xe1662e,_0x32979b),B(_0x1be8e8[_0x276210],_0xe1662e,_0x32979b));}function _0x1413eb(_0x34951a,_0x520b2e,_0x5288ab){const _0x5827cb=_0x5f1d6c['userId'],_0x45ade0='revision:'+_0x5aa9e5+':'+_0x5827cb+':'+_0x56db2b++,_0x524c68=_0x32979b['createRange'](_0x520b2e,_0x5288ab);_0xe1662e['markers']['set'](_0x45ade0,_0x524c68),null!==_0x5827cb&&_0x3d83ef['add'](_0x5827cb);}}['_getVidAttributeName'](_0x43a9bb){switch(_0x43a9bb['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x521b3d,_0x58d114){_0x521b3d['baseVersion']=null;for(const _0x267297 in _0x521b3d){const _0x127df9=_0x521b3d[_0x267297];if(_0x127df9 instanceof vt){const _0x1484bd=_0x58d114['get'](_0x127df9['root']['rootName']);_0x521b3d[_0x267297]=this['_fixPosition'](_0x127df9,_0x1484bd);}if(_0x127df9 instanceof ft){const _0x173918=_0x58d114['get'](_0x127df9['root']['rootName']);_0x521b3d[_0x267297]=this['_fixRange'](_0x127df9,_0x173918);}'root'===_0x267297&&(_0x521b3d['root']=_0x58d114['get'](_0x521b3d['root']['rootName']));}}['_fixRange'](_0x2bcfa5,_0x47402c){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2bcfa5['start'],_0x47402c),this['_fixPosition'](_0x2bcfa5['end'],_0x47402c));}['_fixPosition'](_0x132cd2,_0x54aaf1){return this['editor']['model']['createPositionFromPath'](_0x54aaf1,_0x132cd2['path'],_0x132cd2['stickiness']);}['_handleInsertOperation'](_0xed679d){const _0x31866c=this['_idsRoots']['get'](_0xed679d['position']['root']['rootName']),_0x76ea2e=this['_fixPosition'](_0xed679d['position'],_0x31866c),_0x5acfe7=null===_0xed679d['_authorId']?null:_0xed679d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21324c=_0x76ea2e['parent'],_0x4c43a4=this['_revisionId'],_0x5f5922=[];for(const _0x6ca7d of _0xed679d['nodes'])if(_0x6ca7d['is']('element'))_0x5f5922['push'](this['_makeIdsRoot'](_0x6ca7d));else{for(let _0x523bc3=0x0;_0x523bc3<_0x6ca7d['offsetSize'];_0x523bc3++)_0x5f5922['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x5c44fb=this['_revisionId'];for(let _0x598e9a=_0x4c43a4;_0x598e9a<_0x5c44fb;_0x598e9a++)this['_touched']['set'](_0x598e9a,{'userId':_0x5acfe7});_0x21324c['_insertChild'](_0x76ea2e['offset'],_0x5f5922);}['_handleMoveOperation'](_0x19e521){(_0x19e521=this['_cloneOperation'](_0x19e521,this['_idsRoots']))['_execute']();const _0x2e4e6b=null===_0x19e521['_authorId']?null:_0x19e521['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5c0812=_0x19e521['getMovedRangeStart'](),_0x544475=_0x5c0812['parent'],_0x2200d1=_0x5c0812['offset'];!function _0x5597e7(_0x3bdd44,_0x38240e,_0x30550a,_0x3f43b0){for(let _0xebe929=_0x30550a;_0xebe929<_0x3f43b0;_0xebe929++){const _0x408e77=_0x38240e['getChild'](_0xebe929);_0x408e77['is']('element','$text')?_0x3bdd44['set'](_0x408e77['getAttribute']('vid'),{'userId':_0x2e4e6b}):(_0x3bdd44['set'](_0x408e77['getAttribute']('vid_start'),{'userId':_0x2e4e6b}),_0x5597e7(_0x3bdd44,_0x408e77,0x0,_0x408e77['childCount']),_0x3bdd44['set'](_0x408e77['getAttribute']('vid_end'),{'userId':_0x2e4e6b}));}}(this['_touched'],_0x544475,_0x2200d1,_0x2200d1+_0x19e521['howMany']);}['_handleMergeOperation'](_0x327f13){const _0x209f88=null===(_0x327f13=this['_cloneOperation'](_0x327f13,this['_idsRoots']))['_authorId']?null:_0x327f13['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x16036e=_0x327f13['targetPosition']['parent'],_0x337cb9=_0x327f13['sourcePosition']['parent'],_0x53c778=_0x16036e['getAttribute']('vid_end'),_0x5480b7=_0x337cb9['getAttribute']('vid_start');_0x16036e['_setAttribute']('vid_end',_0x337cb9['getAttribute']('vid_end')),_0x337cb9['_setAttribute']('vid_end',_0x53c778),this['_touched']['set'](_0x5480b7,{'userId':_0x209f88}),this['_touched']['set'](_0x53c778,{'userId':_0x209f88}),_0x327f13['_execute']();}['_handleSplitOperation'](_0x19ab3c){const _0x51f4ce=null===(_0x19ab3c=this['_cloneOperation'](_0x19ab3c,this['_idsRoots']))['_authorId']?null:_0x19ab3c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3d608f=_0x19ab3c['graveyardPosition'],_0x1e5995=_0x19ab3c['splitPosition']['parent'];_0x19ab3c['_execute']();const _0x517e57=_0x1e5995['getAttribute']('vid_end'),_0x301039=_0x19ab3c['insertionPosition']['nodeAfter'];if(_0x3d608f){const _0x2b3839=_0x301039['getAttribute']('vid_end'),_0x228906=_0x1e5995['getAttribute']('vid_end');_0x1e5995['_setAttribute']('vid_end',_0x2b3839),_0x301039['_setAttribute']('vid_end',_0x228906),this['_touched']['set'](_0x1e5995['getAttribute']('vid_end'),{'userId':_0x51f4ce}),this['_touched']['set'](_0x301039['getAttribute']('vid_start'),{'userId':_0x51f4ce});}else{const _0x201768=this['_revisionId']++,_0x47d7c9=this['_revisionId']++;_0x1e5995['_setAttribute']('vid_end',_0x201768),_0x301039['_setAttribute']('vid_start',_0x47d7c9),_0x301039['_setAttribute']('vid_end',_0x517e57),this['_touched']['set'](_0x201768,{'userId':_0x51f4ce}),this['_touched']['set'](_0x47d7c9,{'userId':_0x51f4ce});}}['_handleMarkerOperation'](_0x4407a0){if(!_0x4407a0['affectsData'])return;const _0x2c3f1a=(_0x4407a0=this['_cloneOperation'](_0x4407a0,this['_diffRoots']))['oldRange']?_0x4407a0['oldRange']['root']:null,_0x8def55=_0x4407a0['newRange']?_0x4407a0['newRange']['root']:null;_0x2c3f1a&&this['_markers']['delete'](_0x4407a0['name']),_0x8def55&&this['_markers']['set'](_0x4407a0['name'],_0x4407a0['newRange']['clone']());const _0x330f7d=null===_0x4407a0['_authorId']?null:_0x4407a0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1c1faa=_0x4407a0['name'];if(!this['_touchedMarkers']['has'](_0x1c1faa))return void this['_touchedMarkers']['set'](_0x1c1faa,{'range':_0x4407a0['oldRange'],'userId':_0x330f7d});const _0x44cea8=this['_touchedMarkers']['get'](_0x1c1faa),_0xeea72f=_0x44cea8['range'],_0xb81985=_0x4407a0['newRange'];null==_0xeea72f&&null==_0xb81985||_0xeea72f&&_0xb81985&&_0xeea72f['isEqual'](_0xb81985)?this['_touchedMarkers']['delete'](_0x4407a0['name']):_0x44cea8['userId']=_0x330f7d;}['_handleRootOperation'](_0x5590d6,_0x14927c){this['_diffRoots']['has'](_0x5590d6['rootName'])?this['_diffRoots']['get'](_0x5590d6['rootName'])['_isAttached']=_0x5590d6['isAdd']:(this['_diffRoots']['set'](_0x5590d6['rootName'],P(_0x5590d6['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5590d6['rootName'],{}),_0x14927c&&this['_idsRoots']['set'](_0x5590d6['rootName'],P(_0x5590d6['rootName'],!0x0)));const _0xf2e826=null===_0x5590d6['_authorId']?null:_0x5590d6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5743b7=this['_touchedRoots']['get'](_0x5590d6['rootName']);_0x5743b7&&_0x5743b7['userId']===_0xf2e826?this['_touchedRoots']['delete'](_0x5590d6['rootName']):this['_touchedRoots']['set'](_0x5590d6['rootName'],{'userId':_0xf2e826,'isAttached':_0x5590d6['isAdd']});}['_handleRootAttributeOperation'](_0x38c12b){const _0x343d80=this['_diffRootsAttributes']['get'](_0x38c12b['root']['rootName']);null===_0x38c12b['newValue']?delete _0x343d80[_0x38c12b['key']]:_0x343d80[_0x38c12b['key']]=_0x38c12b['newValue'];}}function N(_0x1b6716){const _0x85a385=P(_0x1b6716['rootName'],_0x1b6716['isAttached']());for(const _0x2c96f7 of _0x1b6716['getChildren']()){const _0x36f279=_0x2c96f7['_clone'](!0x0);_0x85a385['_appendChild'](_0x36f279);}return _0x85a385;}function P(_0x5e0472,_0x1f5694=!0x0){const _0xade8c7=new gt();return _0xade8c7['rootName']=_0x5e0472,_0xade8c7['_isAttached']=_0x1f5694,_0xade8c7['isAttached']=()=>_0xade8c7['_isAttached'],_0xade8c7;}function F(_0x37392c,_0xad64b4,_0xdd6d56){const _0x20c6cb='elementEnd'==_0x37392c['type']?_0xdd6d56['createPositionAt'](_0x37392c['item'],'end'):_0xdd6d56['createPositionBefore'](_0x37392c['item']);return _0xdd6d56['createPositionFromPath'](_0xad64b4,_0x20c6cb['path'],_0x20c6cb['stickiness']);}function B(_0xd6d224,_0x3b8b49,_0x5a8c52){const _0x1340ba='elementStart'==_0xd6d224['type']?_0x5a8c52['createPositionAt'](_0xd6d224['item'],0x0):_0x5a8c52['createPositionAfter'](_0xd6d224['item']);return _0x5a8c52['createPositionFromPath'](_0x3b8b49,_0x1340ba['path'],_0x1340ba['stickiness']);}class os extends _0x3cddfa{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1745b0,_0x46ec4c){super(_0x1745b0),this['focusTracker']=new _0xe1bf60(),this['keystrokes']=new _0x483130(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x46ec4c),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'](),_0x59d0e6({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x31ca67=_0x4ea6c4=>_0x4ea6c4['stopPropagation']();this['keystrokes']['set']('arrowright',_0x31ca67),this['keystrokes']['set']('arrowleft',_0x31ca67),this['keystrokes']['set']('arrowup',_0x31ca67),this['keystrokes']['set']('arrowdown',_0x31ca67);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x5be870){this['revisionNameInputView']['fieldView']['element']['value']=_0x5be870['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xaeafca){const _0xb244e0=new nt(this['locale'],ti),_0xfbc647=_0xb244e0['fieldView'];_0xfbc647['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1c0a33=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0xaeafca&&(_0x1c0a33+='\x20('+g(this['locale'],'optional')+')'),(_0xb244e0['label']=_0x1c0a33,_0xfbc647['on']('input',()=>{this['revisionNameInputValue']=_0xfbc647['element']['value']['trim']();}),_0xb244e0);}}class f extends _0x5bfc96{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x31256b=this['editor'],_0x37756a=_0x31256b['plugins']['get']('RevisionTracker');_0x31256b['ui']['componentFactory']['add']('revisionHistory',_0x342fbc=>{const _0x4c0d37=_0x3750d8(_0x342fbc),_0x2d206f=_0x4c0d37['panelView']['children'],_0x3da47d=new _0x5e0f1e(_0x342fbc),_0x288441=new te(_0x342fbc),_0x1c65a0=new _0x54f12b(_0x342fbc),_0x26d465=new te(_0x342fbc),_0x44a688=new _0x54f12b(_0x342fbc);return _0x4c0d37['bind']('isEnabled')['to'](_0x37756a,'isReady',_0x37756a,'isEnabled',_0x31256b,'isReadOnly',(_0x4b46b5,_0x318c13,_0x5c3d26)=>_0x4b46b5&&_0x318c13&&!_0x5c3d26),_0x4c0d37['buttonView']['set']({'icon':_0x329d0b,'label':g(_0x342fbc,'Revision\x20history'),'tooltip':!0x0}),_0x1c65a0['set']({'label':g(_0x342fbc,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x1c65a0['bind']('isEnabled')['to'](_0x37756a,'isReady',_0x37756a,'isEnabled',_0x31256b,'isReadOnly',(_0x192a18,_0x51fb17,_0x54c871)=>_0x192a18&&_0x51fb17&&!_0x54c871),_0x1c65a0['on']('execute',()=>this['_showDialog']()),_0x44a688['set']({'label':g(_0x342fbc,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x44a688['bind']('isEnabled')['to'](_0x37756a,'isReady',_0x31256b,'isReadOnly',(_0x2877e3,_0x4e7621)=>_0x2877e3&&!_0x4e7621),_0x44a688['on']('execute',()=>{_0x31256b['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x4c0d37['isOpen']=!0x1,_0x31256b['editing']['view']['focus']();}),_0x288441['children']['add'](_0x1c65a0),_0x26d465['children']['add'](_0x44a688),_0x3da47d['role']='menu',_0x3da47d['items']['addMany']([_0x288441,_0x26d465]),_0x2d206f['add'](_0x3da47d),_0x4c0d37;}),_0x31256b['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x406b3a=this['editor'],_0x3822a1=_0x406b3a['locale'],_0x49912f=new _0x5efd36(_0x3822a1),_0x5f493b=new _0x4957e5(_0x3822a1);_0x49912f['buttonView']['set']({'icon':_0x329d0b,'label':g(_0x3822a1,'Revision\x20history')});const _0x52ca28=new _0x305113(_0x3822a1,_0x49912f),_0x2896c9=new _0x51297c(_0x3822a1);_0x2896c9['set']({'label':g(_0x3822a1,'Save\x20current\x20revision')}),_0x2896c9['delegate']('execute')['to'](_0x49912f),_0x2896c9['on']('execute',()=>{this['_showDialog']();}),_0x52ca28['children']['add'](_0x2896c9),_0x5f493b['items']['add'](_0x52ca28);const _0x1b9069=new _0x305113(_0x3822a1,_0x49912f),_0x410459=new _0x51297c(_0x3822a1);return _0x410459['set']({'label':g(_0x3822a1,'Open\x20revision\x20history')}),_0x410459['delegate']('execute')['to'](_0x49912f),_0x410459['on']('execute',()=>{_0x406b3a['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1b9069['children']['add'](_0x410459),_0x5f493b['items']['add'](_0x1b9069),_0x49912f['panelView']['children']['add'](_0x5f493b),_0x49912f;}['_showDialog'](){const _0x387034=this['editor'],_0x2d257a=_0x387034['locale'],_0x586c6b=_0x387034['plugins']['get']('Dialog'),_0x13ad7a=_0x387034['plugins']['get']('RevisionTracker');function _0x1e3b14(_0x511732){_0x387034['config']['get']('revisionHistory.requireRevisionName')&&''===_0x511732['revisionName']?_0x511732['revisionNameInputView']['errorText']=g(_0x2d257a,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x387034['plugins']['get'](u)['saveRevision']({'name':_0x511732['revisionName']}),_0x586c6b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1e3b14(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x586c6b['show']({'id':'revisionSave','title':g(_0x2d257a,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x387034['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x586c6b['hide']()},{'label':g(_0x387034['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0xd03390){_0xd03390['bind']('isEnabled')['to'](_0x13ad7a,'isReady',_0x13ad7a,'isEnabled',_0x387034,'isReadOnly',(_0x29304a,_0x4a89c1,_0x5617e3)=>_0x29304a&&_0x4a89c1&&!_0x5617e3);},'onExecute':()=>_0x1e3b14(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2a8ada=this['editor'],_0xcd7f5d=_0x2a8ada['locale'];this['_saveRevisionFormView']=new os(_0xcd7f5d,_0x2a8ada['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x3cddfa{['changeId'];['_model'];constructor(_0x195c39,_0x5638d0){super(_0x195c39),this['_model']=_0x5638d0,this['changeId']=_0x5638d0['id'];const _0x27e98c=this['bindTemplate'],_0x2fe3a2=g(_0x195c39,_0x5638d0['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5638d0['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5638d0['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x27e98c['to']('type',_0x540177=>'ck-revision-change__'+_0x540177)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2fe3a2}]},{'text':'\x20'+_0x5638d0['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x38c0dd(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x3e1e4b){super(),this['id']=_0x3e1e4b['id']||_0x27ee83(),this['author']=_0x3e1e4b['author'],this['type']=_0x3e1e4b['type'],this['data']=_0x3e1e4b['data']||{},this['rootName']=_0x3e1e4b['rootName'],this['set']('createdAt',_0x3e1e4b['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x246a23,_0x121e04){this['newRevisionId']=_0x246a23,this['oldRevisionId']=_0x121e04,this['changes']=new _0x32397e();}['_setChanges'](_0x40027e){for(const _0x5a9fc4 of _0x40027e)this['changes']['add'](_0x5a9fc4);}}class m extends _0x5bfc96{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x688979,_0x3a7d79,I,V];}constructor(_0x9d81ee){super(_0x9d81ee),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x168525,_0x4bb9ab,_0x5656e8)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x366436=>{for(const _0x233f79 of this['editor']['editing']['view']['document']['roots'])_0x5656e8?_0x366436['removeClass']('ck-editor__editable__overlay',_0x233f79):_0x366436['addClass']('ck-editor__editable__overlay',_0x233f79);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x53724e=>null!==_0x53724e),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x332633,_0x241076,_0x35338c)=>_0x332633&&_0x35338c?_0x241076['changes']['getIndex'](_0x35338c):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x32cc9e,_0x483bb1)=>_0x32cc9e?_0x483bb1['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3a7d79);}['init'](){const _0x56590e=this['editor'],_0x578667=new pt(_0x56590e,{'direction':'backward'}),_0x285e4e=new pt(_0x56590e,{'direction':'forward'});(_0x56590e['commands']['add']('showPreviousChange',_0x578667),_0x56590e['commands']['add']('showNextChange',_0x285e4e),_0x56590e['commands']['add']('restoreRevision',new wt(_0x56590e)),this['on']('change:numberOfChanges',()=>{_0x578667['refresh'](),_0x285e4e['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x56590e['enableReadOnlyMode']('revision-viewer'),_0x56590e['plugins']['has']('WidgetToolbarRepository'))&&_0x56590e['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x1c8e24){return await this['_utils']['loadRevisionData'](_0x1c8e24,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1c8e24);}async['getRevisionRootsAttributes'](_0x4a910d){return await this['_utils']['loadRevisionData'](_0x4a910d,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4a910d);}async['compare'](_0x16b0fc,_0x23fdab,_0x1f33df=!0x1){if(!this['isEnabled'])return;const _0x28b6f1=this['diff'],_0x29f5bd=this['repository'],_0x57973a='string'==typeof _0x16b0fc?_0x29f5bd['getRevision'](_0x16b0fc):_0x16b0fc,_0x26b39d='string'==typeof _0x23fdab?_0x29f5bd['getRevision'](_0x23fdab):_0x23fdab,_0x50ff63=_0x57973a['id'],_0x368042=_0x26b39d?_0x26b39d['id']:null;if(!_0x1f33df&&this['diff']&&this['diff']['newRevisionId']===_0x50ff63&&this['diff']['oldRevisionId']===_0x368042)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x50ff63,_0x368042);const _0x5e0a66=this['_getRevisionsRange'](_0x57973a,_0x26b39d,!0x0)['map'](_0x364e66=>this['_utils']['loadRevisionData'](_0x364e66,this['adapter']));return _0x5e0a66['push'](new Promise(_0x523a64=>{setTimeout(_0x523a64,0x14);})),Promise['all'](_0x5e0a66)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x14928c=this['_getDiff'](_0x50ff63,_0x368042);for(const _0x5d1596 of _0x14928c['changes'])this['_changeIdToChange']['set'](_0x5d1596['id'],_0x5d1596);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x48af5e=>{for(const _0x548809 of this['editor']['model']['document']['getRootNames']())_0x48af5e['detachRoot'](_0x548809);for(const _0x1d56d9 of Object['keys'](_0x14928c['model'])){const _0x58ac08=_0x48af5e['addRoot'](_0x1d56d9);for(const _0x3c982b of Object['keys'](_0x14928c['attributes'][_0x1d56d9]))_0x48af5e['setAttribute'](_0x3c982b,_0x14928c['attributes'][_0x1d56d9][_0x3c982b],_0x58ac08);_0x48af5e['insert'](_0x14928c['model'][_0x1d56d9],_0x58ac08,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x14928c['changes'])),this['isReady']=!0x0;})['catch'](_0x23e803=>{console['error'](_0x23e803),this['_cleanUp'](),_0x28b6f1&&(this['diff']=_0x28b6f1),this['isReady']=!0x0;});}['addRevisionData'](_0x475136,_0x22bead){const _0x516e0d=this['repository']['createRevision'](_0x475136);return _0x516e0d['on']('_update',(_0xf38de2,_0x184047,_0x3db8f2)=>_0x22bead(_0x184047,_0x3db8f2,_0x516e0d)),this['repository']['addRevision'](_0x516e0d),_0x516e0d;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x38fdcb=>{for(const _0x17d53c of this['editor']['model']['document']['getRootNames']())_0x38fdcb['detachRoot'](_0x17d53c);});}['_sortAndFilterDiffChanges'](_0xbbeb08){const _0x3d8acd=[],_0x916aad=new Map();for(const _0x3a5c1b of this['editor']['model']['document']['getRootNames']()){const _0x1a697e=this['editor']['editing']['view']['getDomRoot'](_0x3a5c1b);if(!_0x1a697e)continue;const _0x3598ad=_0x1a697e['getClientRects']()['item'](0x0);_0x3598ad&&(_0x3d8acd['push'](_0x3a5c1b),_0x916aad['set'](_0x3a5c1b,_0x3598ad));}return _0x3d8acd['sort']((_0x4989df,_0x196d1f)=>{const _0x26583c=_0x916aad['get'](_0x4989df),_0x10385b=_0x916aad['get'](_0x196d1f);return _0x26583c['y']-_0x10385b['y']||_0x26583c['x']-_0x10385b['x'];}),(_0xbbeb08=_0xbbeb08['filter'](_0x4b78ac=>_0x3d8acd['includes'](_0x4b78ac['rootName'])))['sort']((_0x3ce2e8,_0x2ab363)=>_0x3d8acd['indexOf'](_0x3ce2e8['rootName'])-_0x3d8acd['indexOf'](_0x2ab363['rootName'])),_0xbbeb08;}['_makeTape'](_0x4d12c5){const _0x306c13=Array['from'](_0x4d12c5['markers'])['filter'](([_0x3359f1,_0x4676ca])=>_0x3359f1['startsWith']('revision:')&&!_0x4676ca['isCollapsed']),_0x52edd2=Array['from'](this['editor']['model']['createRangeIn'](_0x4d12c5)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x306c13['length'])for(const _0x3a95f6 of _0x52edd2){const [_0x19a5ce,_0x3917d1]=_0x306c13[0x0],[,_0x223291,_0x558873]=_0x19a5ce['split'](':');if(_0x3917d1['end']['isEqual'](_0x3a95f6['nextPosition'])&&_0x306c13['shift'](),(_0x3a95f6['previousPosition']['isEqual'](_0x3917d1['start'])||_0x3a95f6['previousPosition']['isAfter'](_0x3917d1['start']))&&('insertion'==_0x223291?_0x3a95f6['isAdded']={'userId':_0x558873}:'deletion'==_0x223291&&(_0x3a95f6['isRemoved']={'userId':_0x558873})),0x0==_0x306c13['length'])break;}return _0x52edd2;}['_refreshStartEndIndex'](_0x315e22){const _0x39b26c=new Map();for(let _0xba2b2f=0x0;_0xba2b2f<_0x315e22['length'];_0xba2b2f++)'text'===_0x315e22[_0xba2b2f]['type']?(_0x315e22[_0xba2b2f]['item']['startIndex']=_0xba2b2f,_0x315e22[_0xba2b2f]['item']['endIndex']=_0xba2b2f):('elementStart'===_0x315e22[_0xba2b2f]['type']?_0x315e22[_0xba2b2f]['item']['startIndex']=_0xba2b2f:'elementEnd'===_0x315e22[_0xba2b2f]['type']&&(_0x315e22[_0xba2b2f]['item']['endIndex']=_0xba2b2f),_0x39b26c['set'](_0x315e22[_0xba2b2f]['id'],_0xba2b2f));for(const _0x37b668 of _0x39b26c['values']())'elementStart'===_0x315e22[_0x37b668]['type']?_0x315e22[_0x37b668]['item']['endIndex']=_0x39b26c['get'](_0x315e22[_0x37b668]['pairId']):'elementEnd'===_0x315e22[_0x37b668]['type']&&(_0x315e22[_0x37b668]['item']['startIndex']=_0x39b26c['get'](_0x315e22[_0x37b668]['pairId']));}['_processTape'](_0x1397d1){for(let _0x1b8a4b=0x0;_0x1b8a4b<_0x1397d1['length'];_0x1b8a4b++){if('elementStart'===_0x1397d1[_0x1b8a4b]['type'])_0x1397d1[_0x1b8a4b]['item']['startIndex']=_0x1b8a4b;else{if('elementEnd'===_0x1397d1[_0x1b8a4b]['type']){_0x1397d1[_0x1b8a4b]['item']['endIndex']=_0x1b8a4b;const _0xb9ba0f=_0x1397d1[_0x1b8a4b]['item']['startIndex'];_0x1397d1[_0xb9ba0f]['pairId']=_0x1397d1[_0x1b8a4b]['id'],_0x1397d1[_0x1b8a4b]['pairId']=_0x1397d1[_0xb9ba0f]['id'];}else _0x1397d1[_0x1b8a4b]['item']['startIndex']=_0x1b8a4b,_0x1397d1[_0x1b8a4b]['item']['endIndex']=_0x1b8a4b,_0x1397d1[_0x1b8a4b]['pairId']=null;}_0x1397d1[_0x1b8a4b]['markersStart']||(_0x1397d1[_0x1b8a4b]['markersStart']=[],_0x1397d1[_0x1b8a4b]['markersEnd']=[]);}}['_markInsertions'](_0xfabc3c,_0x5c565e){const _0x50e83c=_0xfabc3c['filter'](_0x14b8c1=>!_0x14b8c1['isAdded']);for(let _0x140fca=0x0;_0x140fca<_0x5c565e['length'];_0x140fca++)_0x5c565e[_0x140fca]['isAdded']&&(_0x50e83c[_0x140fca]['isAdded']=_0x5c565e[_0x140fca]['isAdded']);}['_getDiff'](_0xcbe3dd,_0x212e4b=null){const _0x1e31c2=this['repository']['getRevision'](_0xcbe3dd),_0x553afb=_0x212e4b?this['repository']['getRevision'](_0x212e4b):null,_0x12e47f=this['_getRevisionsRange'](_0x1e31c2,_0x553afb),_0x39bd2c=_0x12e47f[_0x12e47f['length']-0x1],_0x545e1b=new Map(),_0x5a7b8d={'model':{},'attributes':{},'changes':[]},_0x3f2c4b=new Set(),_0x277fd2=new Map();for(let _0x383de0=_0x12e47f['length']-0x1;_0x383de0>=0x0;_0x383de0--){const _0x2515a5=_0x12e47f[_0x383de0];for(const _0x503b40 of Object['keys'](_0x2515a5['diffData']))if(_0x2515a5['diffData'][_0x503b40]['attachChange']){const _0x120edb=_0x2515a5['diffData'][_0x503b40]['attachChange'];_0x120edb['isAttached']?(_0x3f2c4b['add'](_0x503b40),_0x277fd2['has'](_0x503b40)&&_0x277fd2['get'](_0x503b40)['userId']==_0x120edb['userId']?_0x277fd2['delete'](_0x503b40):_0x277fd2['set'](_0x503b40,_0x120edb)):_0x277fd2['has'](_0x503b40)?(_0x3f2c4b['delete'](_0x503b40),_0x277fd2['delete'](_0x503b40)):(_0x3f2c4b['add'](_0x503b40),_0x277fd2['set'](_0x503b40,_0x120edb));}else _0x3f2c4b['add'](_0x503b40);}for(const _0x27e597 of _0x3f2c4b){const _0x47d6d1=_0x277fd2['has'](_0x27e597)&&!_0x277fd2['get'](_0x27e597)['isAttached'];let _0x39a386=_0x47d6d1?_0x12e47f['length']-0x1:0x0;const _0x4e26af=_0x47d6d1?-0x1:0x1;for(;_0x12e47f[_0x39a386];){const _0x1f8f69=_0x12e47f[_0x39a386];if(_0x1f8f69['diffData'][_0x27e597]){const _0x48d879=_0x47d6d1?_0x1f8f69['diffData'][_0x27e597]['attributesBefore']:_0x1f8f69['diffData'][_0x27e597]['attributesAfter'];_0x5a7b8d['attributes'][_0x27e597]=_0x48d879?_0x4ec41c(_0x48d879):{};break;}_0x39a386+=_0x4e26af;}}for(const _0x2402c1 of _0x12e47f){_0x2402c1['model']={};for(const _0x173c03 of _0x2402c1['authors'])_0x545e1b['set'](_0x173c03['id'],_0x173c03);for(const _0x41eb1c of _0x3f2c4b){const _0x223ac0=_0x2402c1['diffData'][_0x41eb1c]?_0x2402c1['diffData'][_0x41eb1c]['insertions']:'[]',_0x246138=_0x2402c1['diffData'][_0x41eb1c]?_0x2402c1['diffData'][_0x41eb1c]['deletions']:'[]';_0x2402c1['model'][_0x41eb1c]={'insertions':this['_utils']['_makeModelFromViewString'](_0x223ac0),'deletions':this['_utils']['_makeModelFromViewString'](_0x246138)};}}for(const _0x427c3c of _0x3f2c4b){let _0x182dac=null,_0x5626ed=0x0;const _0x57a435=new Map(Array['from'](_0x1e31c2['model'][_0x427c3c]['insertions']['markers'])['filter'](([_0x433672])=>!_0x433672['startsWith']('revision:')));let _0x2009af=0x0;for(const _0x1be253 of _0x12e47f){const _0x1b47af=this['_makeTape'](_0x1be253['model'][_0x427c3c]['insertions']);_0x1be253==_0x1e31c2?(_0x182dac=_0x1b47af,_0x5626ed=_0x182dac['length'],_0x182dac['forEach'](_0x58be70=>{_0x58be70['id']=_0x2009af++;}),this['_processTape'](_0x182dac)):this['_markInsertions'](_0x182dac,_0x1b47af);const _0x2a1d5=_0x182dac['filter'](_0x38b562=>!_0x38b562['isAdded'])['map'](_0x150fcb=>_0x150fcb['id']);let _0x137114=0x0;const _0x397bf7=this['_makeTape'](_0x1be253['model'][_0x427c3c]['deletions']);_0x397bf7['forEach'](_0x5723b0=>{_0x5723b0['isRemoved']?_0x5723b0['id']=_0x5626ed++:_0x5723b0['id']=_0x2a1d5[_0x137114++];}),this['_processTape'](_0x397bf7),this['_setDistance'](_0x182dac,'isAdded'),this['_setDistance'](_0x397bf7,'isRemoved'),_0x1be253==_0x1e31c2&&this['_markMarkers'](_0x182dac,_0x57a435),_0x182dac=this['_joinTapes'](_0x182dac,_0x397bf7),this['_refreshStartEndIndex'](_0x182dac),this['_setDistance'](_0x182dac,'isRemoved');}_0x182dac=_0x182dac['filter'](_0x175901=>!(_0x175901['isAdded']&&_0x175901['isRemoved']));const _0xf51f38=new Map(_0x39bd2c['model'][_0x427c3c]['deletions']['markers']),_0x55cda4=new Set(_0x57a435['keys']());for(const _0x13d661 of _0xf51f38['keys']())_0x55cda4['delete'](_0x13d661);this['_markSuggestions'](_0x182dac,_0x55cda4),this['_fixObsoleteTags'](_0x182dac),_0x182dac=this['_removeMissingPairs'](_0x182dac),_0x182dac=this['_markMismatchedRemovedTags'](_0x182dac),_0x182dac=this['_removeUnsupportedChanges'](_0x182dac);const {root:_0x63736,changes:_0xd28a0a}=this['_makeModelFromTape'](_0x182dac,_0x545e1b,_0x427c3c);_0x5a7b8d['model'][_0x427c3c]=_0x63736;const _0x50c302=_0x277fd2['get'](_0x427c3c);if(_0x50c302){const _0x17d045=_0x545e1b['get'](_0x50c302['userId']),_0x1a6792=new r({'author':_0x17d045,'type':_0x50c302['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x427c3c});_0xd28a0a['unshift'](_0x1a6792),_0x5a7b8d['attributes'][_0x427c3c]['revisionHistoryAttachChange']=_0x1a6792['id'];}_0x5a7b8d['changes']=_0x5a7b8d['changes']['concat'](_0xd28a0a);}return _0x5a7b8d;}['_markMarkers'](_0x4a8e37,_0x4bfa8f){for(let _0x15915d=0x0;_0x15915d<_0x4a8e37['length'];_0x15915d++)for(const [_0xf15c8e,_0x47fdcb]of _0x4bfa8f)!_0x47fdcb['isCollapsed']&&_0x47fdcb['start']['isEqual'](_0x4a8e37[_0x15915d]['previousPosition'])&&_0x4a8e37[_0x15915d]['markersStart']['push'](_0xf15c8e),_0x47fdcb['end']['isEqual'](_0x4a8e37[_0x15915d]['nextPosition'])&&_0x4a8e37[_0x15915d]['markersEnd']['push'](_0xf15c8e);}['_joinTapes'](_0x48d5b5,_0x35e9b4){let _0x2135f7=[],_0x12bd3d=0x0,_0x115f19=0x0;for(;_0x12bd3d<_0x48d5b5['length']||_0x115f19<_0x35e9b4['length'];){const _0x48684f=_0x48d5b5[_0x12bd3d]||{},_0x4e1b0e=_0x35e9b4[_0x115f19]||{};if(_0x48684f['id']==_0x4e1b0e['id'])_0x12bd3d++,_0x115f19++,_0x2135f7['push'](_0x48684f);else{if(_0x4e1b0e['isRemoved']&&_0x48684f['isAdded']){const {commonTape:_0x38aff0,iEnd:_0x6cee27,jEnd:_0x4f2b4c}=this['_threeWayMerge'](_0x48d5b5,_0x12bd3d,_0x35e9b4,_0x115f19);_0x2135f7=_0x2135f7['concat'](_0x38aff0),_0x12bd3d=_0x6cee27,_0x115f19=_0x4f2b4c;}else _0x4e1b0e['isRemoved']?(_0x115f19++,_0x2135f7['push'](_0x4e1b0e)):(_0x12bd3d++,_0x2135f7['push'](_0x48684f));}}return _0x2135f7;}['_markSuggestions'](_0x3ed0e3,_0x1548c8){const _0x4fb823=[];for(let _0x3ef3da=0x0;_0x3ef3da<_0x3ed0e3['length'];_0x3ef3da++){for(let _0x56092c=0x0;_0x56092c<_0x3ed0e3[_0x3ef3da]['markersStart']['length'];_0x56092c++){const _0x5ed9da=_0x3ed0e3[_0x3ef3da]['markersStart'][_0x56092c];if(!_0x1548c8['has'](_0x5ed9da))continue;const {group:_0xc9c7f2,type:_0x1986e5,authorId:_0x5585f8}=_0x399d04(_0x5ed9da);'revision-suggestion'!=_0xc9c7f2||'insertion'!=_0x1986e5&&'deletion'!=_0x1986e5||(_0x4fb823['unshift']({'type':_0x1986e5,'name':_0x5ed9da,'userId':_0x5585f8}),_0x3ed0e3[_0x3ef3da]['markersStart']['splice'](_0x56092c,0x1),_0x56092c--);}_0x34cf50(_0x3ed0e3[_0x3ef3da]);for(let _0x23d4c8=0x0;_0x23d4c8<_0x3ed0e3[_0x3ef3da]['markersEnd']['length'];_0x23d4c8++){const _0x259796=_0x3ed0e3[_0x3ef3da]['markersEnd'][_0x23d4c8];if(!_0x1548c8['has'](_0x259796))continue;const {group:_0x1dc596,type:_0x48d133}=_0x399d04(_0x259796);if('revision-suggestion'!=_0x1dc596||'insertion'!=_0x48d133&&'deletion'!=_0x48d133)continue;_0x3ed0e3[_0x3ef3da]['markersEnd']['splice'](_0x23d4c8,0x1),_0x23d4c8--;const _0x4a7fd7=_0x4fb823['findIndex'](_0x41034b=>_0x41034b['name']==_0x259796);_0x4a7fd7>-0x1&&_0x4fb823['splice'](_0x4a7fd7,0x1);}}function _0x399d04(_0x54e35c){const _0x3af699=_0x54e35c['split'](':');return{'group':_0x3af699[0x0],'type':_0x3af699[0x1],'subType':_0x3af699['length']>=0x5?_0x3af699[0x2]:null,'id':_0x3af699['length']<0x5?_0x3af699[0x2]:_0x3af699[0x3],'authorId':_0x3af699['length']<0x5?_0x3af699[0x3]:_0x3af699[0x4],'markerCount':0x6==_0x3af699['length']?_0x3af699[0x5]:null};}function _0x34cf50(_0x433df3){for(let _0x3f673b=0x0;_0x3f673b<_0x4fb823['length'];_0x3f673b++){if(_0x433df3['isAdded']&&'insertion'==_0x4fb823[_0x3f673b]['type'])return _0x433df3['isAddSuggestion']=_0x4fb823[_0x3f673b],void delete _0x433df3['isAdded'];if(!_0x433df3['isAdded']&&!_0x433df3['isRemoved']&&'deletion'==_0x4fb823[_0x3f673b]['type'])return void(_0x433df3['isRemoveSuggestion']=_0x4fb823[_0x3f673b]);}}}['_setDistance'](_0x2c5181,_0x1cd508){let _0x2596cb=0x0,_0xd44ac8=!0x1;const _0x5c8480=new Map();for(const _0x140769 of _0x2c5181)_0x140769[_0x1cd508]?_0xd44ac8&&(_0x2596cb++,_0xd44ac8=!0x1):(_0x2596cb++,_0xd44ac8=!0x0),_0x5c8480['set'](_0x140769['id'],_0x2596cb);for(let _0x1d9c84=0x0;_0x1d9c84<_0x2c5181['length'];_0x1d9c84++){if('isRemoved'==_0x1cd508&&_0x2c5181[_0x1d9c84]['isAdded']||'isAdded'==_0x1cd508&&_0x2c5181[_0x1d9c84]['isRemoved'])continue;if('text'==_0x2c5181[_0x1d9c84]['type']){_0x2c5181[_0x1d9c84]['distance']=0x0;continue;}const _0x5182f6=_0x5c8480['get'](_0x2c5181[_0x1d9c84]['pairId']),_0x2f2ea5=_0x5c8480['get'](_0x2c5181[_0x1d9c84]['id']);_0x2c5181[_0x1d9c84]['distance']=_0x5182f6-_0x2f2ea5;}}['_getRevisionsRange'](_0x1ed8c6,_0x175eeb,_0x572c3c=!0x1){const _0x36920c=[];let _0x412712=this['repository']['getIndex'](_0x1ed8c6),_0x50ef6d=this['repository']['getIndex'](_0x175eeb);for(-0x1==_0x50ef6d&&(_0x50ef6d=this['repository']['_revisions']['length'],_0x572c3c=!0x1);_0x412712<_0x50ef6d;)_0x36920c['push'](this['repository']['getRevision'](_0x412712)),_0x412712++;return _0x572c3c&&_0x36920c['push'](this['repository']['getRevision'](_0x412712)),_0x36920c;}['_threeWayMerge'](_0x57c55a,_0x26baea,_0x39deb7,_0xeb96fe){const _0x14b5be=this['editor']['model']['schema'];let _0x4350d1=_0x26baea;for(;_0x57c55a[_0x4350d1]&&_0x57c55a[_0x4350d1]['isAdded'];)_0x4350d1++;let _0x26168c=_0xeb96fe;for(;_0x39deb7[_0x26168c]&&_0x39deb7[_0x26168c]['isRemoved'];)_0x26168c++;_0x28971c(_0x57c55a,_0x26baea,_0x4350d1),_0x28971c(_0x39deb7,_0xeb96fe,_0x26168c);const _0x134bf0=_0x39deb7['slice'](_0xeb96fe,_0x26168c)['concat'](_0x57c55a['slice'](_0x26baea,_0x4350d1));return _0x134bf0['sort']((_0x559eaf,_0x3ecc20)=>_0x559eaf['side']!=_0x3ecc20['side']?_0x559eaf['side']-_0x3ecc20['side']:_0x559eaf['level']!=_0x3ecc20['level']?_0x559eaf['level']-_0x3ecc20['level']:_0x559eaf['distance']!=_0x3ecc20['distance']?_0x3ecc20['distance']-_0x559eaf['distance']:!!_0x559eaf['isAdded']!=!!_0x3ecc20['isAdded']?-0x1==_0x559eaf['side']||0x0==_0x559eaf['side']?_0x559eaf['isAdded']?-0x1:0x1:_0x559eaf['isAdded']?0x1:-0x1:_0x559eaf['index']-_0x3ecc20['index']),{'commonTape':_0x134bf0,'iEnd':_0x4350d1,'jEnd':_0x26168c};function _0x28971c(_0x545249,_0x78f262,_0x10bb16){let _0x45ad6a=-0x1,_0x340948=Number['POSITIVE_INFINITY'],_0x54fadb=!0x0;for(let _0x4af9cf=_0x78f262;_0x4af9cf<_0x10bb16;_0x4af9cf++)if(_0x14b5be['isInline'](_0x545249[_0x4af9cf]['item'])||(_0x54fadb=!0x1),_0x545249[_0x4af9cf]['item']['startIndex']<_0x78f262&&(_0x45ad6a=_0x4af9cf),_0x545249[_0x4af9cf]['item']['endIndex']>=_0x10bb16){_0x340948=_0x4af9cf;break;}_0x54fadb&&(_0x45ad6a=_0x10bb16-0x1);for(let _0x196dce=_0x78f262;_0x196dce<_0x10bb16;_0x196dce++)_0x545249[_0x196dce]['side']=_0x196dce<=_0x45ad6a?-0x1:_0x196dce<_0x340948?0x0:0x1,_0x545249[_0x196dce]['index']=_0x196dce;let _0x1fbef4=0x0;for(let _0x3ffdba=_0x78f262;_0x3ffdba<=_0x45ad6a;_0x3ffdba++)0x0==_0x545249[_0x3ffdba]['distance']?_0x545249[_0x3ffdba]['level']=_0x1fbef4:(_0x1fbef4++,_0x545249[_0x3ffdba]['level']=_0x1fbef4,_0x1fbef4++);for(let _0x48d0fc=_0x78f262;_0x48d0fc<_0x10bb16;_0x48d0fc++)0x0==_0x545249[_0x48d0fc]['side']&&(_0x545249[_0x48d0fc]['level']=_0x1fbef4);_0x1fbef4=0x0;for(let _0xaa47d7=_0x10bb16-0x1;_0xaa47d7>=_0x340948;_0xaa47d7--)0x0==_0x545249[_0xaa47d7]['distance']?_0x545249[_0xaa47d7]['level']=_0x1fbef4:(_0x1fbef4--,_0x545249[_0xaa47d7]['level']=_0x1fbef4,_0x1fbef4--);}}['_fixObsoleteTags'](_0x495d53){const _0x570398=new Map(),_0x863c4d=this['editor']['model']['schema'];for(let _0x1dce70=0x1;_0x1dce70<_0x495d53['length'];_0x1dce70++){let _0x5d055d,_0x97e0ff,_0x24452e;const _0xf7ba96=_0x495d53[_0x1dce70],_0x5507de=_0x495d53[_0x1dce70-0x1];if('text'==_0xf7ba96['type'])continue;if(_0xf7ba96['type']!=_0x5507de['type'])continue;if(!_0x863c4d['isBlock'](_0x5507de['item'])||_0x863c4d['isLimit'](_0x5507de['item']))continue;if(!_0x863c4d['isBlock'](_0xf7ba96['item'])||_0x863c4d['isLimit'](_0xf7ba96['item']))continue;if((_0x495d53[_0x1dce70]['isAdded']||_0x495d53[_0x1dce70]['isAddSuggestion'])&&_0x495d53[_0x1dce70-0x1]['isRemoved'])_0x5d055d=_0x495d53[_0x1dce70],_0x97e0ff=_0x495d53[_0x1dce70-0x1],_0x24452e=_0x1dce70-0x1;else{if(!_0x495d53[_0x1dce70]['isRemoved']||!_0x495d53[_0x1dce70-0x1]['isAdded']&&!_0x495d53[_0x1dce70-0x1]['isAddSuggestion'])continue;_0x5d055d=_0x495d53[_0x1dce70-0x1],_0x97e0ff=_0x495d53[_0x1dce70],_0x24452e=_0x1dce70;}const _0xc7bc2a=_0x5d055d['level']==_0x97e0ff['level'],_0x249dd9=Math['abs'](_0x5d055d['level'])<Math['abs'](_0x97e0ff['level'])&&0x0==_0x97e0ff['distance'];(_0xc7bc2a||_0x249dd9)&&(_0x570398['set'](_0x97e0ff['id'],_0x5d055d['id']),_0x495d53['splice'](_0x24452e,0x1),_0x1dce70--,_0x5d055d['isAdded']=!0x1);}for(let _0x5bdc63=0x0;_0x5bdc63<_0x495d53['length'];_0x5bdc63++)_0x570398['has'](_0x495d53[_0x5bdc63]['pairId'])&&(_0x495d53[_0x5bdc63]['pairId']=_0x570398['get'](_0x495d53[_0x5bdc63]['pairId']));}['_removeMissingPairs'](_0xdac1a3){const _0x2bb391=new Set(_0xdac1a3['map'](_0x18dc5a=>_0x18dc5a['id']));for(let _0x196000=0x0;_0x196000<_0xdac1a3['length'];_0x196000++)_0x2bb391['has'](_0xdac1a3[_0x196000]['pairId'])||0x0==_0xdac1a3[_0x196000]['distance']||(_0xdac1a3[_0x196000]['isIncorrect']=!0x0);return _0xdac1a3['filter'](_0x61e17e=>!_0x61e17e['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5bfa8e){const _0x203bc9=new Set();for(let _0x4e5ab8=0x0;_0x4e5ab8<_0x5bfa8e['length'];_0x4e5ab8++){if(_0x203bc9['has'](_0x5bfa8e[_0x4e5ab8]['id'])&&_0x5bfa8e[_0x4e5ab8]['isRemoved']&&(_0x5bfa8e[_0x4e5ab8]['isIncorrect']=!0x0),_0x5bfa8e[_0x4e5ab8]['isIncorrect'])continue;if(0x0==_0x5bfa8e[_0x4e5ab8]['distance'])continue;if('elementStart'!=_0x5bfa8e[_0x4e5ab8]['type'])continue;if(null==_0x5bfa8e[_0x4e5ab8]['pairId'])continue;let _0x25f505=_0x4e5ab8+0x1,_0x6deb37=0x0;for(;_0x5bfa8e[_0x25f505]['id']!=_0x5bfa8e[_0x4e5ab8]['pairId'];)'elementStart'==_0x5bfa8e[_0x25f505]['type']?_0x6deb37++:'elementEnd'==_0x5bfa8e[_0x25f505]['type']&&_0x6deb37--,_0x25f505++;if(0x0!=_0x6deb37){if(_0x5bfa8e[_0x4e5ab8]['isRemoved'])_0x5bfa8e[_0x4e5ab8]['isIncorrect']=!0x0;else{for(;_0x25f505!=_0x4e5ab8;)_0x5bfa8e[_0x25f505]['isRemoved']&&0x0!=_0x5bfa8e[_0x25f505]['distance']&&(_0x5bfa8e[_0x25f505]['isIncorrect']=!0x0,_0x203bc9['add'](_0x5bfa8e[_0x25f505]['pairId'])),_0x25f505--;}}}return _0x5bfa8e['filter'](_0x51e76a=>!_0x51e76a['isIncorrect']);}['_removeUnsupportedChanges'](_0x1e5d01){const _0x157c0b=this['editor']['model']['schema'];for(let _0x2260a9=0x0;_0x2260a9<_0x1e5d01['length'];_0x2260a9++){if(!(_0x1e5d01[_0x2260a9]['isAdded']||_0x1e5d01[_0x2260a9]['isAddSuggestion']||_0x1e5d01[_0x2260a9]['isRemoved']||_0x1e5d01[_0x2260a9]['isRemoveSuggestion']))continue;if(0x0==_0x1e5d01[_0x2260a9]['distance'])continue;const _0x579182=_0x1e5d01[_0x2260a9]['item'];_0x157c0b['isBlock'](_0x579182)||_0x157c0b['isLimit'](_0x579182)||(_0x1e5d01[_0x2260a9]['isAdded']&&delete _0x1e5d01[_0x2260a9]['isAdded'],_0x1e5d01[_0x2260a9]['isAddSuggestion']&&delete _0x1e5d01[_0x2260a9]['isAddSuggestion'],_0x1e5d01[_0x2260a9]['isRemoveSuggestion']&&delete _0x1e5d01[_0x2260a9]['isRemoveSuggestion'],_0x1e5d01[_0x2260a9]['isRemoved']&&(_0x1e5d01[_0x2260a9]['isIncorrect']=!0x0));}return _0x1e5d01['filter'](_0x541cee=>!_0x541cee['isIncorrect']);}['_makeModelFromTape'](_0x50cc5b,_0x2ed8da,_0x1a6228){const _0x5c4b97=new gt(),_0x5a85a9=[],_0x516401=new Map(),_0x3c7469=this['editor']['model'],_0x513238=_0x3c7469['schema'],_0x96a5f2=[_0x5c4b97],_0x51b108={},_0x3c6e79={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x2207c1=null;const _0xd84957=[0x0];for(let _0x40fafe=0x0;_0x40fafe<_0x50cc5b['length'];_0x40fafe++)if('elementStart'===_0x50cc5b[_0x40fafe]['type']){_0x50cc5b[_0x40fafe]['previousPosition']=_0x3c7469['createPositionFromPath'](_0x5c4b97,_0xd84957);const _0x437dcf=new ut(_0x50cc5b[_0x40fafe]['item']['name'],_0x50cc5b[_0x40fafe]['item']['getAttributes']());_0x96a5f2[0x0]['_appendChild'](_0x437dcf),_0xd84957['push'](0x0),_0x96a5f2['unshift'](_0x437dcf),_0x50cc5b[_0x40fafe]['nextPosition']=_0x3c7469['createPositionFromPath'](_0x5c4b97,_0xd84957);}else'elementEnd'===_0x50cc5b[_0x40fafe]['type']?(_0x96a5f2['shift'](),_0x50cc5b[_0x40fafe]['previousPosition']=_0x3c7469['createPositionFromPath'](_0x5c4b97,_0xd84957),_0xd84957['pop'](),_0xd84957[_0xd84957['length']-0x1]++,_0x50cc5b[_0x40fafe]['nextPosition']=_0x3c7469['createPositionFromPath'](_0x5c4b97,_0xd84957)):(_0x50cc5b[_0x40fafe]['previousPosition']=_0x3c7469['createPositionFromPath'](_0x5c4b97,_0xd84957),_0x2207c1?_0x2207c1['_data']+=_0x50cc5b[_0x40fafe]['item']['data']:_0x2207c1=new mt(_0x50cc5b[_0x40fafe]['item']['data'],_0x50cc5b[_0x40fafe]['item']['getAttributes']()),_0x50cc5b[_0x40fafe+0x1]&&'text'===_0x50cc5b[_0x40fafe+0x1]['type']&&_0xbc0708(_0x2207c1,_0x50cc5b[_0x40fafe+0x1]['item'])||(_0x96a5f2[0x0]['_appendChild'](_0x2207c1),_0x2207c1=null),_0xd84957[_0xd84957['length']-0x1]+=_0x50cc5b[_0x40fafe]['item']['offsetSize'],_0x50cc5b[_0x40fafe]['nextPosition']=_0x3c7469['createPositionFromPath'](_0x5c4b97,_0xd84957));for(let _0x4d0d56=0x0;_0x4d0d56<_0x50cc5b['length'];_0x4d0d56++){const _0xd981c5=_0x50cc5b[_0x4d0d56]['previousPosition'],_0x1ec229=_0x50cc5b[_0x4d0d56]['nextPosition'];for(const _0x31ec19 of _0x50cc5b[_0x4d0d56]['markersStart'])_0x516401['set'](_0x31ec19,{'start':_0xd981c5,'end':null});_0x10ee86('isRemoveSuggestion',_0x4d0d56,_0xd981c5,_0x1ec229),_0x10ee86('isAddSuggestion',_0x4d0d56,_0xd981c5,_0x1ec229),_0x10ee86('isRemoved',_0x4d0d56,_0xd981c5,_0x1ec229),_0x10ee86('isAdded',_0x4d0d56,_0xd981c5,_0x1ec229);for(const _0x5983f6 of _0x50cc5b[_0x4d0d56]['markersEnd']){const _0x36d74d=_0x516401['get'](_0x5983f6);_0x36d74d?_0x36d74d['end']=_0x1ec229:_0x516401['set'](_0x5983f6,{'start':_0x1ec229,'end':_0x1ec229});}}for(const [_0x1e4f52,_0x3f4d87]of _0x516401){const _0x1a39d6=this['editor']['model']['createRange'](_0x3f4d87['start'],_0x3f4d87['end']);_0x5c4b97['markers']['set'](_0x1e4f52,_0x1a39d6);}return _0x5a85a9['sort']((_0x432c5c,_0x4a44a4)=>{const _0x1a8079=_0x5c4b97['markers']['get']('revision:'+_0x432c5c['id']),_0x54b52c=_0x5c4b97['markers']['get']('revision:'+_0x4a44a4['id']);return _0x1a8079['start']['isBefore'](_0x54b52c['start'])?-0x1:_0x1a8079['start']['isAfter'](_0x54b52c['start'])?0x1:_0x1a8079['end']['isBefore'](_0x54b52c['end'])?-0x1:_0x1a8079['end']['isAfter'](_0x54b52c['end'])?0x1:'add'===_0x432c5c['type']?-0x1:0x1;}),{'root':_0x5c4b97,'changes':_0x5a85a9};function _0x10ee86(_0x45d9ea,_0x4c4094,_0x2a534d,_0x1fd5b8){const _0x447354=!!_0x50cc5b[_0x4c4094][_0x45d9ea],_0x1fdbbf=_0x447354?_0x50cc5b[_0x4c4094][_0x45d9ea]['userId']:null,_0x2b8193=_0x4c4094===_0x50cc5b['length']-0x1,_0x5ce99c=_0x3c6e79[_0x45d9ea][0x0],_0x1fc3a6=_0x513238['isObject'](_0x50cc5b[_0x4c4094]['item']);!_0x51b108[_0x45d9ea]&&_0x447354?_0x51b108[_0x45d9ea]={'start':_0x2a534d,'tapeItem':_0x50cc5b[_0x4c4094],'userId':_0x1fdbbf,'type':_0x45d9ea}:_0x51b108[_0x45d9ea]&&!_0x447354?(_0x51b108[_0x45d9ea]['end']=_0x2a534d,_0x1f823b(_0x51b108[_0x45d9ea]),_0x51b108[_0x45d9ea]=null):_0x51b108[_0x45d9ea]&&_0x447354&&_0x51b108[_0x45d9ea]['userId']!==_0x1fdbbf&&(_0x51b108[_0x45d9ea]['end']=_0x2a534d,_0x5ce99c&&_0x5ce99c['userId']===_0x51b108[_0x45d9ea]['userId']||_0x1f823b(_0x51b108[_0x45d9ea]),_0x51b108[_0x45d9ea]={'start':_0x2a534d,'tapeItem':_0x50cc5b[_0x4c4094],'userId':_0x1fdbbf,'type':_0x45d9ea}),_0x51b108[_0x45d9ea]&&_0x1fc3a6&&('elementStart'!==_0x50cc5b[_0x4c4094]['type']||_0x5ce99c&&_0x5ce99c['userId']===_0x1fdbbf||_0x3c6e79[_0x45d9ea]['unshift']({'userId':_0x1fdbbf,'object':_0x50cc5b[_0x4c4094]['item'],'change':_0x51b108[_0x45d9ea]}),'elementEnd'===_0x50cc5b[_0x4c4094]['type']&&_0x5ce99c&&_0x5ce99c['object']===_0x50cc5b[_0x4c4094]['item']&&(_0x3c6e79[_0x45d9ea]['shift'](),_0x51b108[_0x45d9ea]=_0x5ce99c['change'])),_0x51b108[_0x45d9ea]&&_0x2b8193&&(_0x51b108[_0x45d9ea]['end']=_0x1fd5b8,_0x1f823b(_0x51b108[_0x45d9ea]),_0x51b108[_0x45d9ea]=null);}function _0x1f823b({start:_0x7238ce,end:_0x599da5,tapeItem:_0x1b43c2,userId:_0x5a83ed,type:_0x2b4074}){const _0x575225=_0x1b43c2['item'],_0x42438=_0x3c7469['schema']['isBlock'](_0x575225)&&!_0x3c7469['schema']['isLimit'](_0x575225),_0x29f9ba=_0x7238ce['nodeAfter']==_0x599da5['parent']&&_0x599da5['isAtStart'];if(_0x42438&&_0x29f9ba)return;const _0x2aecf6=_0x3c7469['createRange'](_0x7238ce,_0x599da5),_0x5dab65=_0x2ed8da['get'](_0x5a83ed),_0x126f26=new r({'author':_0x5dab65,'type':'isAdded'==_0x2b4074||'isAddSuggestion'==_0x2b4074?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2b4074||'isRemoveSuggestion'==_0x2b4074},'createdAt':new Date(),'rootName':_0x1a6228});_0x5a85a9['push'](_0x126f26),_0x5c4b97['markers']['set']('revision:'+_0x126f26['id'],_0x2aecf6);}function _0xbc0708(_0x38a9d3,_0x50bdcb){const _0x28ffb4=_0x38a9d3['getAttributes'](),_0x170f78=_0x50bdcb['getAttributes']();for(const _0x517c88 of _0x28ffb4){if(_0x517c88[0x1]!==_0x50bdcb['getAttribute'](_0x517c88[0x0]))return!0x1;_0x170f78['next']();}return _0x170f78['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5a3bc2=>{const _0x492e51=_0x5a3bc2['markerName']['split'](':')[0x1],_0x17793f=this['_getChangeFromId'](_0x492e51);if(!_0x17793f)return null;const _0x1b2578='add'==_0x17793f['type']?'insertion':'deletion',_0x2b9c1e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x1b2578];return _0x17793f['data']['isSuggestion']&&_0x2b9c1e['push']('ck-suggestion-marker-'+_0x1b2578+'-new'),this['activeChange']==_0x17793f&&_0x2b9c1e['push']('ck-suggestion-marker--active'),{'classes':_0x2b9c1e,'attributes':{'data-change-id':_0x492e51}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xd64d42=>{_0xd64d42['on']('element:pre',(_0x158652,_0x5e3892,_0x129f6e)=>{const _0xb64558=_0x5e3892['viewItem']['getChild'](0x0);if(!_0xb64558||!_0xb64558['is']('element','code'))return;if(!_0x129f6e['consumable']['consume'](_0xb64558,{'attributes':['vid_start','vid_end']}))return;const _0xa706e=_0x5e3892['modelRange']['start']['nodeAfter'];_0x129f6e['writer']['setAttribute']('vid_start',_0xb64558['getAttribute']('vid_start'),_0xa706e),_0x129f6e['writer']['setAttribute']('vid_end',_0xb64558['getAttribute']('vid_end'),_0xa706e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x537952=>{_0x537952['on']('element',(_0x47347e,_0x476172,_0x2d8785)=>{if(!_0x2d8785['consumable']['consume'](_0x476172['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x476172['modelRange']['isCollapsed'])return;const _0xfec13c=_0x476172['modelRange']['start']['nodeAfter'];_0xfec13c['hasAttribute']('vid_start')||_0xfec13c['hasAttribute']('vid')||(_0x2d8785['writer']['setAttribute']('vid_start',_0x476172['viewItem']['getAttribute']('vid_start'),_0xfec13c),_0x2d8785['writer']['setAttribute']('vid_end',_0x476172['viewItem']['getAttribute']('vid_end'),_0xfec13c));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x51cdaf=>_0x51cdaf['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x445cbe,[,_0x5ef168])=>{['vid_start','vid_end','vid']['includes'](_0x5ef168)&&(_0x445cbe['return']=!0x0,_0x445cbe['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x35d92d=>{_0x35d92d['on']('attribute:vid',(_0x3f84a7,_0x43bd64,_0x1dc2fb)=>{if('\x20'!=_0x43bd64['item']['data']||_0x43bd64['item']['parent']['maxOffset']>0x1)return;if(!_0x1dc2fb['consumable']['consume'](_0x43bd64['item'],_0x3f84a7['name']))return;const _0x2e677e=_0x1dc2fb['writer'],_0x13c226=_0x1dc2fb['mapper']['toViewRange'](_0x43bd64['range']);_0x2e677e['wrap'](_0x13c226,_0x2e677e['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x27a603){const _0xc78611=_0x27a603['plugins']['get']('RevisionViewer');return(_0x11bb09,_0x56fcc1,_0x14a27c)=>{const _0x21cb91=_0x56fcc1['markerName']['split'](':')[0x1],_0x3cc0bd=_0xc78611['_getChangeFromId'](_0x21cb91);if(!_0x3cc0bd)return null;const _0x243602='add'==_0x3cc0bd['type']?'split':'merge';if(!_0x14a27c['consumable']['test'](_0x56fcc1['markerRange'],_0x11bb09['name']))return;const _0x178c4f=_0x56fcc1['markerRange']['getWalker'](),_0x3e7174=_0x56fcc1['markerRange']['start'],_0x1d9c1f=_0x27a603['model']['schema'];let _0x2fa55c=null,_0x5e4e41=null,_0x31bba3=!0x1,_0xb4785a=!0x1;for(const _0x5eaaa9 of _0x178c4f){const _0x15cf5f=_0x5eaaa9['item'];_0x31bba3=_0x31bba3||_0x1d9c1f['isContent'](_0x15cf5f);const _0x331ee0=_0x14a27c['mapper']['toViewElement'](_0x15cf5f);if(_0x331ee0&&_0x331ee0['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5eaaa9['type']&&(_0x1d9c1f['isBlock'](_0x15cf5f)&&!_0x1d9c1f['isLimit'](_0x15cf5f)&&(_0x15cf5f['nextSibling']||_0x3e7174['isAtEnd']?_0x2fa55c&&_0x2fa55c['parent']==_0x15cf5f||(_0x2fa55c=_0x15cf5f,_0x37300f(_0x5eaaa9['previousPosition']),_0xb4785a=!0x0):_0x5e4e41=_0x5e4e41||_0x5eaaa9['previousPosition']));}function _0x37300f(_0x10c5cb){const _0x331f8d=_0x14a27c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x243602}),_0x4f92da=_0x14a27c['mapper']['toViewPosition'](_0x10c5cb);_0x3cc0bd['data']['isSuggestion']&&_0x14a27c['writer']['addClass']('ck-suggestion-marker-'+_0x243602+'-new',_0x331f8d),_0xc78611['activeChange']==_0x3cc0bd&&_0x14a27c['writer']['addClass']('ck-suggestion-marker--active',_0x331f8d),_0x14a27c['writer']['insert'](_0x4f92da,_0x331f8d),_0x14a27c['mapper']['bindElementToMarker'](_0x331f8d,_0x56fcc1['markerName']);}_0x31bba3||_0xb4785a||!_0x5e4e41||_0x37300f(_0x5e4e41);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x50541d,_0x4cae3c,_0x55d902)=>{const _0x1ae2cb=_0x55d902['mapper']['markerNameToElements'](_0x4cae3c['markerName']);if(_0x1ae2cb){for(const _0x173a03 of _0x1ae2cb)(_0x173a03['hasClass']('ck-suggestion-marker-split')||_0x173a03['hasClass']('ck-suggestion-marker-merge'))&&(_0x55d902['mapper']['unbindElementFromMarkerName'](_0x173a03,_0x4cae3c['markerName']),_0x55d902['writer']['remove'](_0x173a03));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1610e8,_0x5221aa,_0x4c3114)=>{const _0x7a9933=_0x5221aa['markerName']['split'](':')[0x1],_0x2e3182=this['_getChangeFromId'](_0x7a9933);if(!_0x2e3182)return null;const _0x7bb68a='add'==_0x2e3182['type']?'split':'merge';if(_0x4c3114['consumable']['test'](_0x5221aa['markerRange'],_0x1610e8['name']))for(const _0x4536cb of _0x5221aa['markerRange']['getItems']()){if(!_0x4536cb['is']('element','softBreak'))continue;const _0x6aedbb=_0x4c3114['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x7bb68a}),_0x2dbaa0=_0x4c3114['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4536cb));_0x2e3182['data']['isSuggestion']&&_0x4c3114['writer']['addClass']('ck-suggestion-marker-'+_0x7bb68a+'-new',_0x6aedbb),this['activeChange']==_0x2e3182&&_0x4c3114['writer']['addClass']('ck-suggestion-marker--active',_0x6aedbb),_0x4c3114['writer']['insert'](_0x2dbaa0,_0x6aedbb),_0x4c3114['mapper']['bindElementToMarker'](_0x6aedbb,_0x5221aa['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2ccc71=>{for(const _0x59938d of this['editor']['model']['document']['getRootNames']()){const _0x426a58=this['editor']['model']['document']['getRoot'](_0x59938d),_0x2123c4=this['editor']['editing']['view']['document']['getRoot'](_0x59938d);if(_0x2123c4){const _0x24dd6d=_0x426a58['getAttribute']('revisionHistoryAttachChange');if(_0x2ccc71['removeAttribute']('data-change-id',_0x2123c4),_0x2ccc71['removeClass']('ck-revision-history-root-add',_0x2123c4),_0x2ccc71['removeClass']('ck-revision-history-root-remove',_0x2123c4),_0x2ccc71['removeClass']('ck-revision-history-root--active',_0x2123c4),_0x24dd6d){const _0x39d4aa=this['_getChangeFromId'](_0x24dd6d);if(!_0x39d4aa)return null;_0x2ccc71['setAttribute']('data-change-id',_0x24dd6d,_0x2123c4),_0x2ccc71['addClass']('ck-revision-history-root-'+_0x39d4aa['type'],_0x2123c4),this['activeChange']==_0x39d4aa&&_0x2ccc71['addClass']('ck-revision-history-root--active',_0x2123c4);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xdd9c9f=>'revision-comment:'+_0xdd9c9f,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x395e0b=>'revision-suggestion:'+_0x395e0b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x29df03=>({'name':'suggestion:'+_0x29df03,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3b8f55=>{const _0x5e28fd=_0x3b8f55['markerName']['split'](':')[0x1];return'insertion'!=_0x5e28fd&&'deletion'!=_0x5e28fd?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5e28fd]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x29d9ea,_0x21f7ca,_0x476541)=>{const _0x24da14=_0x476541['mapper']['markerNameToElements'](_0x21f7ca['markerName']);if(_0x24da14){for(const _0x2275ee of _0x24da14)_0x2275ee['is']('uiElement')&&(_0x476541['mapper']['unbindElementFromMarkerName'](_0x2275ee,_0x21f7ca['markerName']),_0x476541['writer']['remove'](_0x2275ee));}},{'priority':'high'});}['_getChangeFromId'](_0x3390dd){return this['_changeIdToChange']['get'](_0x3390dd);}['_getViewForChange'](_0x57152f){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x57152f),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x394137,_0x4ffa97,_0x1c73f6,_0x2fd469)=>{_0x2fd469&&this['_balloon']['remove'](_0x2fd469),_0x1c73f6&&(this['_balloon']['add']({'view':_0x1c73f6,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5b235e=this['editor']['editing'],_0x41d04e=this['_getChangeFromId'](_0x1c73f6['changeId']);let _0x37363b;if(_0x41d04e['data']['isOnRoot']){const _0x1baabb=_0x5b235e['view']['getDomRoot'](_0x41d04e['rootName']);_0x37363b=Array['from'](_0x1baabb['getClientRects']());}else{const _0x47f291=this['editor']['model']['markers']['get']('revision:'+_0x1c73f6['changeId']);_0x37363b=Array['from'](_0x5b235e['mapper']['markerNameToElements'](_0x47f291['name']))['map'](_0x4e8cdb=>_0x5b235e['view']['domConverter']['mapViewToDom'](_0x4e8cdb))['map'](_0x1f9698=>Array['from'](_0x1f9698['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x37363b[0x0];return _0x37363b['find'](_0x2d7271=>_0x2d7271['top']-0x3<=this['_activeViewTarget']['y']&&_0x2d7271['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2d7271['left']-0x3<=this['_activeViewTarget']['x']&&_0x2d7271['right']+0x3>=this['_activeViewTarget']['x'])||_0x37363b[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x13f5df,_0x510b40,_0x3d37cd,_0x28cb0a)=>{this['activeView']=_0x3d37cd?this['_getViewForChange'](_0x3d37cd):null,this['editor']['model']['change'](()=>{const _0x378d6a=this['editor']['editing'];_0x28cb0a&&(_0x28cb0a['data']['isOnRoot']?_0x378d6a['view']['change'](_0x4d2dbf=>{_0x4d2dbf['removeClass']('ck-revision-history-root--active',_0x378d6a['view']['document']['getRoot'](_0x28cb0a['rootName']));}):_0x378d6a['reconvertMarker']('revision:'+_0x28cb0a['id'])),_0x3d37cd&&(_0x3d37cd['data']['isOnRoot']?_0x378d6a['view']['change'](_0x198e04=>{_0x198e04['addClass']('ck-revision-history-root--active',_0x378d6a['view']['document']['getRoot'](_0x3d37cd['rootName']));}):_0x378d6a['reconvertMarker']('revision:'+_0x3d37cd['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x588fdd,_0x1454da)=>{if(this['activeChange'])return;const _0x58ed77=this['_findChangeIdFromDomTarget'](_0x1454da['target']),_0x59d2f8=this['_changeIdToChange']['get'](_0x58ed77);_0x59d2f8?(this['_activeViewTarget']={'x':_0x1454da['domEvent']['x'],'y':_0x1454da['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x59d2f8)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4133c9,_0x1f0c86)=>{const _0x1e02a9=this['_findChangeIdFromDomTarget'](_0x1f0c86['target']),_0x48fb23=this['_changeIdToChange']['get'](_0x1e02a9);_0x48fb23?(this['_activeViewTarget']={'x':_0x1f0c86['domEvent']['x'],'y':_0x1f0c86['domEvent']['y']},_0x48fb23===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x48fb23):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x4f9e4d){do{const _0x12cf56=_0x4f9e4d['getAttribute']('data-change-id');if(_0x12cf56)return _0x12cf56;_0x4f9e4d=_0x4f9e4d['parent'];}while(_0x4f9e4d);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x20b49e=>{for(const _0x1c9f32 of this['editor']['model']['markers'])_0x20b49e['removeMarker'](_0x1c9f32);});}}function X(_0x1d5796,_0x215cb1){return(_0x4d7004,_0x1f882d,_0x1ee31c)=>{if(!_0x1ee31c['consumable']['test'](_0x1f882d['markerRange'],_0x4d7004['name']))return;const _0x56ea91=_0x1f882d['markerRange']['getWalker'](),_0x48cb25=_0x1f882d['markerRange']['start'],_0x1ae532=_0x1d5796['model']['schema'];let _0x2aa1ee=null,_0x30b315=null,_0x484ba7=!0x1,_0x37799f=!0x1;for(const _0x451584 of _0x56ea91){const _0x5ca97d=_0x451584['item'];_0x484ba7=_0x484ba7||_0x1ae532['isContent'](_0x5ca97d);const _0x18d4fb=_0x1ee31c['mapper']['toViewElement'](_0x5ca97d);if(_0x18d4fb&&_0x18d4fb['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x451584['type']&&(_0x1ae532['isBlock'](_0x5ca97d)&&!_0x1ae532['isLimit'](_0x5ca97d)&&(_0x5ca97d['nextSibling']||_0x48cb25['isAtEnd']?_0x2aa1ee&&_0x2aa1ee['parent']==_0x5ca97d||(_0x2aa1ee=_0x5ca97d,_0x4e1d57(_0x451584['previousPosition']),_0x37799f=!0x0):_0x30b315=_0x30b315||_0x451584['previousPosition']));}function _0x4e1d57(_0x2385d7){const _0x385272=_0x1ee31c['mapper']['toViewPosition'](_0x2385d7),_0x37eb24=_0x1ee31c['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x215cb1});_0x1ee31c['writer']['insert'](_0x385272,_0x37eb24),_0x1ee31c['mapper']['bindElementToMarker'](_0x37eb24,_0x1f882d['markerName']);}_0x484ba7||_0x37799f||!_0x30b315||_0x4e1d57(_0x30b315);};}class wt extends _0x261801{constructor(_0x15656c){super(_0x15656c);const _0x36783b=_0x15656c['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x36783b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x36783b,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x183aa4=this['editor'],_0x465674=_0x183aa4['plugins']['get'](m),_0x2f33a0=_0x465674['isReady']?_0x465674['diff']['newRevisionId']:null;_0x183aa4['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2f33a0);}['refresh'](){const {isReady:_0x17557e,isEnabled:_0x27175b,repository:_0x5ae571,diff:_0x1a1638}=this['editor']['plugins']['get'](m),_0x32cc32=_0x1a1638&&_0x5ae571['getLaterVisibleRevision'](_0x1a1638['newRevisionId']);this['isEnabled']=_0x17557e&&_0x27175b&&Boolean(_0x32cc32);}}class pt extends _0x261801{['_step'];constructor(_0x302a2d,{direction:_0x2adf79}){super(_0x302a2d);const _0x58fc44=_0x302a2d['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x2adf79?0x1:-0x1,this['listenTo'](_0x58fc44,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x58fc44,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x58fc44,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x418ad3=this['editor'],_0x552035=_0x418ad3['plugins']['get'](m),{isNavigationMode:_0x3f5e83,currentChangeNumber:_0x15f17a}=_0x552035;let _0x58d7ea;if(_0x552035['activeChange']=_0x3f5e83?_0x552035['diff']['changes']['get'](_0x15f17a+this['_step']):_0x552035['diff']['changes']['first'],_0x552035['activeChange']['data']['isOnRoot'])_0x58d7ea=_0x418ad3['editing']['view']['getDomRoot'](_0x552035['activeChange']['rootName']);else{const _0x461207=_0x418ad3['model']['markers']['get']('revision:'+_0x552035['activeChange']['id']);_0x58d7ea=_0x5e4f4f(_0x418ad3['editing'],_0x461207);}_0x36f1ca({'target':_0x58d7ea,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5f1db0,currentChangeNumber:_0x39f353,numberOfChanges:_0x3020ba,isReady:_0xc94dec,isEnabled:_0x14f49c}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x14f49c&&_0xc94dec&&_0x3020ba)&&(!_0x5f1db0||(0x1===this['_step']?_0x39f353<_0x3020ba-0x1:_0x39f353>0x0));}}class _i extends _0x3cddfa{constructor(_0x129a2f){super(_0x129a2f);const _0x292a8c=this['bindTemplate'],_0x496068=new _0x54f12b(_0x129a2f),_0x10ac35=new _0x54f12b(_0x129a2f);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',(_0x24801c,_0xe06a6)=>_0x24801c&&_0xe06a6>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4d374e,_0x590806,_0x4092ca,_0xb36d7c)=>{if(!_0x4d374e)return g(_0x129a2f,'Loading...');if(!_0x4092ca)return g(_0x129a2f,'No\x20changes');const _0x371262=g(_0x129a2f,'NUMBER_OF_CHANGES',_0x4092ca);return _0xb36d7c?g(_0x129a2f,'X_OF_Y_CHANGES',[_0x590806+0x1,_0x4092ca]):_0x371262;}),_0x496068['set']({'label':g(_0x129a2f,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x603296}),_0x10ac35['set']({'label':g(_0x129a2f,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x24f9d6}),_0x496068['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x10ac35['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x496068['on']('execute',()=>this['fire']('execute','backward')),_0x10ac35['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',_0x292a8c['if']('_isStatusLabelVisible','ck-hidden',_0x3a05a7=>!_0x3a05a7)]},'children':[{'text':_0x292a8c['to']('isNavigationMode',_0x136dfe=>_0x136dfe?g(_0x129a2f,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x129a2f,'Total')+':\x20')}]},{'text':_0x292a8c['to']('_statusText')}]},new _0x5b3a52(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x496068,_0x10ac35]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x5bfc96{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2b5e0e=this['editor']['editing']['view'];_0x2b5e0e['change'](_0x3e3a67=>{for(const _0x5743ea of _0x2b5e0e['document']['roots'])_0x3e3a67['addClass'](ce,_0x5743ea);});}['hide'](){const _0x4c50f2=this['editor']['editing']['view'];_0x4c50f2['change'](_0x5c1c33=>{for(const _0x4dfbe9 of _0x4c50f2['document']['roots'])_0x5c1c33['removeClass'](ce,_0x4dfbe9);});}}class R extends _0x5bfc96{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x43be25=this['editor'],_0x22f009=_0x43be25['plugins']['get'](m),_0x3a8784=_0x43be25['plugins']['get'](le);_0x43be25['ui']['componentFactory']['add']('exitToEditing',_0x251bbb=>{const _0x527b49=new _0x54f12b(_0x251bbb);return _0x527b49['set']({'label':g(_0x251bbb,'Back\x20to\x20editing'),'icon':_0x5200f8,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x527b49,'execute',()=>{_0x43be25['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x527b49;}),_0x43be25['ui']['componentFactory']['add']('restoreRevision',_0x3c9528=>{const _0x1da7c3=new _0x54f12b(_0x3c9528);return _0x1da7c3['set']({'label':g(_0x3c9528,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1da7c3['bind']('isEnabled')['to'](_0x43be25['commands']['get']('restoreRevision')),this['listenTo'](_0x1da7c3,'execute',()=>_0x43be25['execute']('restoreRevision')),_0x1da7c3;}),_0x43be25['ui']['componentFactory']['add']('changesNavigation',_0x3017ca=>{const _0x3d3aa1=new _i(_0x3017ca),_0x29f21b=_0x43be25['commands']['get']('showPreviousChange'),_0x25d570=_0x43be25['commands']['get']('showNextChange');return _0x3d3aa1['bind']('isBackwardNavigationEnabled')['to'](_0x29f21b,'isEnabled'),_0x3d3aa1['bind']('isForwardNavigationEnabled')['to'](_0x25d570,'isEnabled'),_0x3d3aa1['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x22f009),this['listenTo'](_0x3d3aa1,'execute',(_0x3f91a9,_0x2bd344)=>{_0x43be25['execute']('forward'===_0x2bd344?'showNextChange':'showPreviousChange');}),_0x3d3aa1;}),_0x3a8784['show'](),_0x22f009['on']('change:isReady',(_0x3b38f0,_0x478a8b,_0x5bf7b3)=>{_0x5bf7b3?_0x3a8784['hide']():_0x3a8784['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x1b1a1c,_0xecf869){super(_0x1b1a1c,_0xecf869);const _0x443745=this['bindTemplate'];this['set']({'label':g(_0x1b1a1c,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x1b1a1c,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x443745['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 _0x59f29d=this['fieldView']['element'];this['_tooltipString']=_0x59f29d['scrollWidth']>_0x59f29d['clientWidth']&&_0x59f29d['value']||'';}}class oi extends _0x3cddfa{constructor(_0x4f45c8,_0x26c87c,_0x5be784){super(_0x4f45c8);const _0x5b6514=new _0x438faf();_0x5b6514['set']({'content':_0xf46e84,'viewBox':'0\x200\x2011\x2010'});const _0x5df5eb=['ck','ck-revision-history-sidebar__revision-author'];_0x5be784&&_0x5df5eb['push']('ck-revision-history-sidebar__revision-author_creator');const _0x4d64d0=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x4f45c8,_0x5be784?'Revision\x20creator':'Revision\x20author')},'children':[_0x5b6514,_0x26c87c['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x5df5eb},'children':_0x4d64d0});}}function ni(_0x3d8359,_0x4d0639){const _0x1d3e29=_0x3d8359['bindTemplate'],_0x18410c=_0x3d8359['locale'],_0x5cba37=_0x3750d8(_0x18410c);_0x5cba37['panelPosition']='sw';const _0x36f7ae=function(_0x22961f,_0x5259b2){const _0x2645e5=function(_0x48ddd3,_0x1322e4){const _0x52eec1=_0x48ddd3['locale'],_0x129731={'Compare\x20against\x20selected':g(_0x52eec1,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x52eec1,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x52eec1,'Restore\x20this\x20revision')};return _0x1322e4['map'](_0x1fcc14=>{const _0x4d0a1c=_0x129731[_0x1fcc14['name']];return _0x4d0a1c&&_0x4d0a1c!==_0x1fcc14['name']&&(_0x1fcc14['name']=_0x4d0a1c),_0x1fcc14;});}(_0x22961f,_0x5259b2),_0x319dbb=new _0x32397e();for(const _0x30b0b3 of _0x2645e5){const _0x1efa4c={'type':'button','model':new to({'label':_0x30b0b3['name'],'class':_0x30b0b3['class'],'withText':!0x0,'role':'menuitem','_action':_0x30b0b3['action']})};_0x1efa4c['model']['bind']('isEnabled')['to'](_0x22961f,'isActionsDropdownOpen',_0x35a463=>'function'!=typeof _0x30b0b3['isEnabled']||(!_0x35a463||_0x30b0b3['isEnabled'](_0x22961f))),_0x319dbb['add'](_0x1efa4c);}return _0x319dbb;}(_0x3d8359,_0x4d0639);return _0x3d8359['bind']('isActionsDropdownOpen')['to'](_0x5cba37,'isOpen'),_0x5cba37['buttonView']['set']({'label':g(_0x18410c,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x560b20}),_0x5cba37['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1d3e29['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1d3e29['to'](_0x290a28=>_0x290a28['stopPropagation']())}}),_0x5cba37['on']('execute',_0x2da1f0=>{_0x3d8359['isReady']&&'function'==typeof _0x2da1f0['source']['_action']&&_0x2da1f0['source']['_action'](_0x3d8359);}),_0x56357f(_0x5cba37,_0x36f7ae,{'role':'menu'}),_0x5cba37['listenTo'](_0x3d8359,'change:isActionsDropdownOpen',(_0xf7623e,_0x3d880c,_0x48d2db)=>{if(_0x48d2db)for(const _0x4e5393 of _0x5cba37['listView']['items']){const _0x507cc1=_0x4e5393['children']['first'],_0x307adc=_0x4d0639['find'](_0x24c0b5=>_0x24c0b5['action']===_0x507cc1['_action'])['isVisible'];_0x4e5393['isVisible']=void 0x0===_0x307adc||_0x307adc(_0x3d8359);}}),_0x5cba37;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x5bf972,uid as _0x27e53b,Collection as _0x593c71,logWarning as _0x2778d6,FocusTracker as _0x34fe9f,KeystrokeHandler as _0x2590ba,scrollViewportToShowTarget as _0x4ce4c0,ResizeObserver as at,ElementReplacer as ot,CKEditorError as _0x4ef6d7}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2d84f0,set as _0x3e679f,unset as _0x2f6c0c,isEqual as _0x1db4c9}from'es-toolkit/compat';import{Plugin as _0x1129e8,PendingActions as _0x4121ed,Command as _0xf25a1a,ElementApiMixin as _0x24d417,Editor as _0x70a0ca}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x51945f,getMarkerDomElement as _0x15a1f8,ConfirmMixin as _0x14d47a,sanitizeEditorConfig as _0x9f1790}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0xdabad5,ViewAttributeElement as _0x3f8696,ViewEmptyElement as _0x23648c,ViewRawElement as _0x1a34d7,ViewUIElement as _0x4a0fd1,ViewDocumentFragment as _0xf55500,ViewText as _0x4f8869,ViewElement as _0x295176,Element as ut,Range as ft,Position as vt,DocumentFragment as gt,Text as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x2e06aa,IconChevronUp as _0x503250,IconChevronDown as _0x5047e5,IconUndo as _0x2d942,IconUser as _0x538d40,IconThreeVerticalDots as _0x57f849}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x5e71d5,injectCssTransitionDisabler as ts,submitHandler as _0x3bb16f,LabeledFieldView as nt,createLabeledInputText as ti,createDropdown as _0x1d7232,ListView as _0x439ab0,ListItemView as te,ButtonView as _0x4391bf,MenuBarMenuView as _0x3caac8,MenuBarMenuListView as _0x4c8396,MenuBarMenuListItemView as _0x43111e,MenuBarMenuListItemButtonView as _0x24aebe,ContextualBalloon as _0x3a0b12,ToolbarSeparatorView as _0xcf7e6e,IconView as _0x3f7079,addListToDropdown as _0x10eafb,ViewModel as to,EditorUI as st,normalizeToolbarConfig as et,BoxedEditorUIView as rt,StickyPanelView as ht,ToolbarView as dt,InlineEditableUIView as ct}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x389c1a}from'luxon';class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x5bf972(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x185b4f){super(),this['id']=_0x185b4f['id']||_0x27e53b(),this['creator']=_0x185b4f['creator']||null,this['authors']=_0x185b4f['authors']||[],this['diffData']=_0x185b4f['diffData']||null,this['toVersion']=_0x185b4f['toVersion']||0x0,this['fromVersion']=_0x185b4f['fromVersion']||0x0,this['set']('name',_0x185b4f['name']||''),this['set']('createdAt',_0x185b4f['createdAt']||new Date()),this['set']('attributes',_0x185b4f['attributes']||{});}['setName'](_0x458ad8){this['_update']({'name':_0x458ad8});}['setAttribute'](_0x58b816,_0x36abf3){const _0x41f26b=_0x2d84f0(this['attributes']);_0x3e679f(_0x41f26b,_0x58b816,_0x36abf3),this['_update']({'attributes':_0x41f26b});}['removeAttribute'](_0x3ad2f8){const _0x131241=_0x2d84f0(this['attributes']);_0x2f6c0c(_0x131241,_0x3ad2f8),this['_update']({'attributes':_0x131241});}['_update'](_0x1e3ac5,_0x1641c1=!0x1){let _0x4008fc=!0x1;const _0x2005e6={'id':this['id']},_0x166940=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x16bab7 of _0x166940){const _0x230ce7=_0x1e3ac5[_0x16bab7];void 0x0!==_0x230ce7&&_0x230ce7!==this[_0x16bab7]&&(this[_0x16bab7]=_0x230ce7,_0x2005e6[_0x16bab7]=_0x230ce7,_0x4008fc=!0x0);}_0x4008fc&&(_0x2005e6['authors']&&(_0x2005e6['authorsIds']=_0x2005e6['authors']['map'](_0xf02e=>_0xf02e['id']),delete _0x2005e6['authors']),this['fire']('_update',_0x2005e6,_0x1641c1));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x25fe51=>_0x25fe51['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x1129e8{['_revisions'];static get['requires'](){return[_0x51945f];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5dcbb0){super(_0x5dcbb0),this['_revisions']=new _0x593c71();}['afterInit'](){!async function(_0x50e13c){const _0x27e545=_0x38bee2([0x78,0x58,0x35,0x72,0x42,0x32,0x43,0x4e,0x71,0x75,0x56,0x4a,0x30,0x50,0x79,0x4b,0x7a,0x65,0x59,0x57,0x41,0x45,0x62,0x4f,0x6d,0x76,0x34,0x6e,0x53,0x48,0x49,0x51,0x73,0x67,0x64,0x4c,0x6a,0x66,0x6b,0x33,0x61,0x74,0x63,0x4d,0x47,0x44,0x69,0x37,0x39,0x54,0x6f,0x77,0x55,0x68,0x6c,0x38,0x5a,0x36,0x31,0x52,0x70,0x46]),_0xcae713=0xeb829,_0x1eef6e=0x1f6cb370,_0x267ed0=0x1f6bd088^_0x1eef6e,_0x504361=window[_0x38bee2([0x44,0x61,0x74,0x65])][_0x38bee2([0x6e,0x6f,0x77])](),_0x7231bf=_0x50e13c[_0x38bee2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1cbbf6=new window[(_0x38bee2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x356b7e=>{_0x7231bf[_0x38bee2([0x6f,0x6e,0x63,0x65])](_0x38bee2([0x72,0x65,0x61,0x64,0x79]),_0x356b7e);}),_0xbc582e={[_0x38bee2([0x6b,0x74,0x79])]:_0x38bee2([0x45,0x43]),[_0x38bee2([0x75,0x73,0x65])]:_0x38bee2([0x73,0x69,0x67]),[_0x38bee2([0x63,0x72,0x76])]:_0x38bee2([0x50,0x2d,0x32,0x35,0x36]),[_0x38bee2([0x78])]:_0x38bee2([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]),[_0x38bee2([0x79])]:_0x38bee2([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]),[_0x38bee2([0x61,0x6c,0x67])]:_0x38bee2([0x45,0x53,0x32,0x35,0x36])},_0x4b47a0=_0x7231bf[_0x38bee2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x38bee2([0x67,0x65,0x74])](_0x38bee2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5ea7e2(){let _0x41b206,_0x37fee1=null,_0x2197e3=null;try{if(_0x4b47a0==_0x38bee2([0x47,0x50,0x4c]))return _0x38bee2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x41b206=_0x21e7d0(),!_0x41b206)return _0x38bee2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x41b206[_0x38bee2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2197e3=_0xf81b8b(_0x41b206[_0x38bee2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x41b206[_0x38bee2([0x6a,0x74,0x69])])),await _0x371e0c()?_0xa005d3()?_0x41e33e()?_0x38bee2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1fbd7a()?(_0x41b206[_0x38bee2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x38bee2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x37fee1=_0x523622(_0x38bee2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x41b206[_0x38bee2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x38bee2([0x74,0x72,0x69,0x61,0x6c])&&(_0x37fee1=_0x523622(_0x38bee2([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x14480e()):_0x38bee2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x38bee2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x38bee2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3ba028){return _0x38bee2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x41e33e(){const _0x80fa27=[_0x38bee2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x38bee2([0x74,0x72,0x69,0x61,0x6c])][_0x38bee2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41b206[_0x38bee2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x504361/0x3e8:0xe10*_0x267ed0;return _0x41b206[_0x38bee2([0x65,0x78,0x70])]<_0x80fa27;}function _0xa005d3(){const _0x13ae8c=_0x41b206[_0x38bee2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x13ae8c)return!0x1;if(_0x13ae8c[_0x38bee2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38bee2([0x2a])))return!0x0;if(_0x13ae8c[_0x38bee2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38bee2([0x52,0x48])))return!0x0;if(_0x13ae8c[_0x38bee2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38bee2([0x52,0x52,0x48]))){if(_0x35c0fb())return!0x0;if(_0x147fa8()||_0x1e2acd())return!0x0;}return!0x1;}function _0x1fbd7a(){const _0x41fbf9=_0x41b206[_0x38bee2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x41fbf9||0x0==_0x41fbf9[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5c5ab5}=new URL(window[_0x38bee2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x41fbf9[_0x38bee2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c5ab5))return!0x0;const _0x409193=_0x5c5ab5[_0x38bee2([0x73,0x70,0x6c,0x69,0x74])](_0x38bee2([0x2e]));return _0x41fbf9[_0x38bee2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x309cd1=>_0x309cd1[_0x38bee2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38bee2([0x2a])))[_0x38bee2([0x6d,0x61,0x70])](_0x3709b8=>_0x3709b8[_0x38bee2([0x73,0x70,0x6c,0x69,0x74])](_0x38bee2([0x2e])))[_0x38bee2([0x73,0x6f,0x6d,0x65])](_0x476ca9=>_0x409193[_0x38bee2([0x65,0x76,0x65,0x72,0x79])]((_0x21843c,_0x23f491)=>_0x476ca9[_0x23f491]===_0x21843c||_0x476ca9[_0x23f491]===_0x38bee2([0x2a])));}function _0x14480e(){return _0x37fee1&&_0x2197e3?new window[(_0x38bee2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3200dd,_0x1ec2e6)=>{_0x37fee1[_0x38bee2([0x74,0x68,0x65,0x6e])](_0x3200dd,_0x1ec2e6),_0x2197e3[_0x38bee2([0x74,0x68,0x65,0x6e])](_0xdb6eef=>{_0xdb6eef!=_0x38bee2([0x56,0x61,0x6c,0x69,0x64])&&_0x3200dd(_0xdb6eef);},_0x1ec2e6);}):_0x37fee1||_0x2197e3||_0x38bee2([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf81b8b(_0x2ec965,_0x4b633f){return new window[(_0x38bee2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d7a24=>{if(_0x2fa3a9())return _0x3d7a24(_0x38bee2([0x56,0x61,0x6c,0x69,0x64]));_0x2b9c53(),_0x7231bf[_0x38bee2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x38bee2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x13b9f4=!0x1;const _0x2fc275=_0x27e53b();function _0x5a77dd(_0x25423f){return!!_0x25423f&&(typeof _0x25423f===_0x38bee2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x25423f===_0x38bee2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x25423f[_0x38bee2([0x74,0x68,0x65,0x6e])]===_0x38bee2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x25423f[_0x38bee2([0x63,0x61,0x74,0x63,0x68])]===_0x38bee2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x48ede3(_0x1b13e5){_0x211602(_0x1b13e5)[_0x38bee2([0x74,0x68,0x65,0x6e])](_0x43dcb7=>{if(!_0x43dcb7||_0x43dcb7[_0x38bee2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x38bee2([0x6f,0x6b]))return _0x38bee2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x143dae(_0x208db1(_0x2fc275+_0x4b633f))!=_0x43dcb7[_0x38bee2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x38bee2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x38bee2([0x56,0x61,0x6c,0x69,0x64]);})[_0x38bee2([0x74,0x68,0x65,0x6e])](_0x2c65f4=>(_0x1fffc3(),_0x2c65f4),()=>{const _0x4050f9=_0x22f26b();return null==_0x4050f9?(_0x1fffc3(),_0x38bee2([0x56,0x61,0x6c,0x69,0x64])):_0x38bee2(_0x504361-_0x4050f9>(0x3b603770^_0x1eef6e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x38bee2([0x74,0x68,0x65,0x6e])](_0x3d7a24)[_0x38bee2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3d7a24(_0x38bee2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x59e8e5=0x1f5a5df0^_0x1eef6e;function _0x1fffc3(){const _0x5e521e=_0x38bee2([0x6c,0x6c,0x63,0x74,0x2d])+_0x143dae(_0x208db1(_0x2ec965)),_0x3a27a6=_0x4e6925(_0x143dae(window[_0x38bee2([0x4d,0x61,0x74,0x68])][_0x38bee2([0x63,0x65,0x69,0x6c])](_0x504361/_0x59e8e5)));window[_0x38bee2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x38bee2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5e521e,_0x3a27a6);}function _0x22f26b(){const _0x2b45db=_0x38bee2([0x6c,0x6c,0x63,0x74,0x2d])+_0x143dae(_0x208db1(_0x2ec965)),_0xbdbdcb=window[_0x38bee2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x38bee2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b45db);return _0xbdbdcb?window[_0x38bee2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e6925(_0xbdbdcb),0x10)*_0x59e8e5:null;}function _0x211602(_0xd16c52){return new window[(_0x38bee2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x467c86,_0x204def)=>{_0xd16c52[_0x38bee2([0x74,0x68,0x65,0x6e])](_0x467c86,_0x204def),window[_0x38bee2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x204def,0x1f6d67b0^_0x1eef6e);});}}_0x7231bf[_0x38bee2([0x6f,0x6e])](_0x38bee2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f9550,_0x4540bb)=>{if(_0x4540bb[0x0]!=_0x2ec965)return _0x3d7a24(_0x38bee2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4540bb[0x1]={..._0x4540bb[0x1],[_0x38bee2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2fc275};},{[_0x38bee2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x38bee2([0x68,0x69,0x67,0x68])}),_0x7231bf[_0x38bee2([0x6f,0x6e])](_0x38bee2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x6a7599=>{_0x5a77dd(_0x6a7599[_0x38bee2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x13b9f4=!0x0,_0x48ede3(_0x6a7599[_0x38bee2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x38bee2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x38bee2([0x6c,0x6f,0x77])}),_0x1cbbf6[_0x38bee2([0x74,0x68,0x65,0x6e])](()=>{_0x13b9f4||_0x3d7a24(_0x38bee2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2fa3a9(){return _0x7231bf[_0x38bee2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38bee2([0x76,0x69,0x65,0x77])][_0x38bee2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x38bee2([0x61,0x75,0x74,0x6f]);}function _0x2b9c53(){_0x7231bf[_0x38bee2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38bee2([0x76,0x69,0x65,0x77])][_0x38bee2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x38bee2([0x61,0x75,0x74,0x6f]);}}function _0x523622(_0x3f56dd){const _0x27df3a=[new window[(_0x38bee2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55b9aa=>setTimeout(_0x55b9aa,0x1f658dbc^_0x1eef6e)),_0x1cbbf6[_0x38bee2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x38bee2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x780278=>{const _0x5990a7=0x1f6cb377^_0x1eef6e,_0x282bca=_0x50e13c[_0x38bee2([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4a1d27(){_0x282bca[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x5990a7&&_0x780278();}_0x4a1d27(),_0x282bca[_0x38bee2([0x6f,0x6e])](_0x38bee2([0x61,0x64,0x64]),_0x4a1d27);})),new window[(_0x38bee2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d60d7=>{function _0x3dfecf(){for(const _0x2ca073 in window)if(window[_0x38bee2([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x38bee2([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2ca073))&&window[_0x2ca073]==_0xcae713)return _0x5d60d7();_0x7231bf[_0x38bee2([0x73,0x74,0x61,0x74,0x65])]!=_0x38bee2([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x38bee2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3dfecf,0x1f6ca0f8^_0x1eef6e);}_0x5ca9d1(_0x38bee2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3dfecf();})];return window[_0x38bee2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x38bee2([0x72,0x61,0x63,0x65])](_0x27df3a)[_0x38bee2([0x74,0x68,0x65,0x6e])](()=>_0x3f56dd);}async function _0x362099(){if(await _0x1cbbf6,_0x5ca9d1(_0x38bee2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x32b42b=_0x50e13c[_0x38bee2([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5ae453=_0x50e13c[_0x38bee2([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])](_0x32b42b[_0x38bee2([0x69,0x64])]),_0x3fe664=_0x2b08c6(_0x38bee2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3fe664[_0x38bee2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x32b42b['id'],_0x5ae453?_0x5ae453['id']:null,!0x0),_0x3fe664[_0x38bee2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x38bee2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3fe664[_0x38bee2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3fe664[_0x38bee2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x1d9f4d,void(_0x3fe664[_0x38bee2([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x1d9f4d);}if(_0x5ca9d1(_0x38bee2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x844e99=_0x2b08c6(_0x38bee2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x844e99[_0x38bee2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x38bee2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x844e99[_0x38bee2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x844e99[_0x38bee2([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x1d9f4d,_0x844e99[_0x38bee2([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x1d9f4d;}_0x7231bf[_0x38bee2([0x6d,0x6f,0x64,0x65,0x6c])][_0x38bee2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1d9f4d,_0x7231bf[_0x38bee2([0x6d,0x6f,0x64,0x65,0x6c])][_0x38bee2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1d9f4d,_0x7231bf[_0x38bee2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x38bee2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35c0fb(){return _0x5ca9d1(_0x38bee2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2b08c6(_0x38bee2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x38bee2([0x73,0x74,0x61,0x74,0x65])]==_0x38bee2([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x147fa8(){return _0x5ca9d1(_0x38bee2([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 _0x1e2acd(){return _0x5ca9d1(_0x38bee2([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1af030(_0x5a2e09){const _0x2e6553=_0x2c34ec();_0x7231bf[_0x2e6553]=_0x38bee2([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])+_0x5a2e09,_0x5a2e09[_0x38bee2([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x38bee2([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x2c34ec()]=_0xcae713),_0x5a2e09!=_0x38bee2([0x56,0x61,0x6c,0x69,0x64])&&_0x362099();}function _0x2c34ec(){const _0x434153=window[_0x38bee2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x38bee2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x38bee2([0x6e,0x6f,0x77])]())[_0x38bee2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x38bee2([0x2e]),'');let _0x3fe41d=_0x38bee2([0x78]);for(let _0x415b57=0x0;_0x415b57<_0x434153[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x415b57+=0x2){let _0x19b9e9=window[_0x38bee2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x434153[_0x38bee2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x415b57,_0x415b57+0x2));_0x19b9e9>=_0x27e545[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x19b9e9-=_0x27e545[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3fe41d+=_0x27e545[_0x19b9e9];}return _0x3fe41d;}function _0x21e7d0(){const _0x4790a5=_0x4b47a0[_0x38bee2([0x73,0x70,0x6c,0x69,0x74])](_0x38bee2([0x2e]));if(0x3!=_0x4790a5[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x417b61(_0x4790a5[0x1]);function _0x417b61(_0x1024ad){const _0x4a5b65=_0x2d98cd(_0x1024ad);return _0x4a5b65&&_0xecb1f7()?_0x4a5b65:null;function _0xecb1f7(){const _0x2167b4=_0x4a5b65[_0x38bee2([0x6a,0x74,0x69])],_0x1a8299=window[_0x38bee2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2167b4[_0x38bee2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2167b4[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4a9f5f={..._0x4a5b65,[_0x38bee2([0x6a,0x74,0x69])]:_0x2167b4[_0x38bee2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2167b4[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4a9f5f[_0x38bee2([0x76,0x63])],_0x208db1(_0x4a9f5f)==_0x1a8299;}}}async function _0x371e0c(){let _0x237dc0=!0x0;try{const _0xfbf2c8=_0x4b47a0[_0x38bee2([0x73,0x70,0x6c,0x69,0x74])](_0x38bee2([0x2e])),[_0x4142d9,_0x3d2231,_0x3657ba]=_0xfbf2c8;return _0x5a04df(_0x4142d9),await _0x320a5d(_0x4142d9,_0x3d2231,_0x3657ba),_0x237dc0;}catch(_0x3a40ea){return!0x1;}function _0x5a04df(_0x592d55){const _0x26e31d=_0x2d98cd(_0x592d55);_0x26e31d&&_0x26e31d[_0x38bee2([0x61,0x6c,0x67])]==_0x38bee2([0x45,0x53,0x32,0x35,0x36])||(_0x237dc0=!0x1);}async function _0x320a5d(_0x12746c,_0x298527,_0x4f0ca3){const _0x48da13=window[_0x38bee2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x38bee2([0x66,0x72,0x6f,0x6d])](_0x2f0fb3(_0x4f0ca3),_0x3ffffc=>_0x3ffffc[_0x38bee2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x595d23=new window[(_0x38bee2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x38bee2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x12746c+_0x38bee2([0x2e])+_0x298527),_0x591a33=window[_0x38bee2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x38bee2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x591a33)return;const _0xa4ac00=await _0x591a33[_0x38bee2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x38bee2([0x6a,0x77,0x6b]),_0xbc582e,{[_0x38bee2([0x6e,0x61,0x6d,0x65])]:_0x38bee2([0x45,0x43,0x44,0x53,0x41]),[_0x38bee2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x38bee2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x38bee2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x591a33[_0x38bee2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x38bee2([0x6e,0x61,0x6d,0x65])]:_0x38bee2([0x45,0x43,0x44,0x53,0x41]),[_0x38bee2([0x68,0x61,0x73,0x68])]:{[_0x38bee2([0x6e,0x61,0x6d,0x65])]:_0x38bee2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xa4ac00,_0x48da13,_0x595d23)||(_0x237dc0=!0x1);}}function _0x2d98cd(_0x3ae31d){return _0x3ae31d[_0x38bee2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x38bee2([0x65,0x79]))?JSON[_0x38bee2([0x70,0x61,0x72,0x73,0x65])](_0x2f0fb3(_0x3ae31d)):null;}function _0x2f0fb3(_0x1721d6){return window[_0x38bee2([0x61,0x74,0x6f,0x62])](_0x1721d6[_0x38bee2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x38bee2([0x2b]))[_0x38bee2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x38bee2([0x2f])));}function _0x208db1(_0x59ea65){let _0x3cece6=0x1505;function _0x2fb502(_0x5d1feb){for(let _0x208fa7=0x0;_0x208fa7<_0x5d1feb[_0x38bee2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x208fa7++){const _0x31ad57=_0x5d1feb[_0x38bee2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x208fa7);_0x3cece6=(_0x3cece6<<0x5)+_0x3cece6+_0x31ad57,_0x3cece6&=_0x3cece6;}}function _0x166957(_0x350c0c){Array[_0x38bee2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x350c0c)?_0x350c0c[_0x38bee2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x166957):_0x350c0c&&typeof _0x350c0c==_0x38bee2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x38bee2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x350c0c)[_0x38bee2([0x73,0x6f,0x72,0x74])]()[_0x38bee2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x512b93,_0x123e79])=>{_0x2fb502(_0x512b93),_0x166957(_0x123e79);}):_0x2fb502(window[_0x38bee2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x350c0c));}return _0x166957(_0x59ea65),_0x3cece6>>>0x0;}function _0x143dae(_0x55392f){return _0x55392f[_0x38bee2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x38bee2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x38bee2([0x30]));}function _0x4e6925(_0xcb7c2e){return _0xcb7c2e[_0x38bee2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x38bee2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x38bee2([0x6a,0x6f,0x69,0x6e])]('');}function _0x5ca9d1(_0x477537){return _0x7231bf[_0x38bee2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x38bee2([0x68,0x61,0x73])](_0x477537);}function _0x2b08c6(_0x12ec48){return _0x7231bf[_0x38bee2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x38bee2([0x67,0x65,0x74])](_0x12ec48);}function _0x1d9f4d(){}function _0x38bee2(_0x5ae50f){return _0x5ae50f['map'](_0x4b40d6=>String['fromCharCode'](_0x4b40d6))['join']('');}_0x1af030(await _0x5ea7e2());}(this);}['createRevision'](_0x56e0b0){const _0xbacaf4=this['editor']['plugins']['get']('Users');return new h({'id':_0x56e0b0['id'],'name':_0x56e0b0['name'],'creator':_0x56e0b0['creatorId']?_0xbacaf4['getUser'](_0x56e0b0['creatorId']):null,'diffData':_0x56e0b0['diffData']||_0x56e0b0['data'],'authors':_0x56e0b0['authorsIds']['map'](_0x42e5c8=>_0xbacaf4['getUser'](_0x42e5c8)),'createdAt':new Date(_0x56e0b0['createdAt']),'attributes':_0x56e0b0['attributes'],'fromVersion':_0x56e0b0['fromVersion'],'toVersion':_0x56e0b0['toVersion']});}['addRevision'](_0x310671,_0x213492=0x0){this['_revisions']['add'](_0x310671,_0x213492);}['getRevision'](_0x8d6c42){return this['_revisions']['get'](_0x8d6c42);}['getRevisions'](_0x17a419={'toJSON':!0x1}){const _0x3580ee=Array['from'](this['_revisions']);return _0x3580ee['reverse'](),_0x17a419['toJSON']?_0x3580ee['map'](_0x5a5c01=>_0x5a5c01['toJSON']()):_0x3580ee;}['getIndex'](_0x2648ff){return this['_revisions']['getIndex'](_0x2648ff);}['getEarlierVisibleRevision'](_0x5bcd97){const [,_0x5081e3]=this['getRevisionsIterator'](_0x5bcd97,{'direction':'earlier'});return _0x5081e3;}['getLaterVisibleRevision'](_0x569340){const [,_0x2bd797]=this['getRevisionsIterator'](_0x569340,{'direction':'later'});return _0x2bd797;}['getRevisionsInDiff'](_0x23a79e){const _0x4d57d2=[];for(const _0x39b936 of this['getRevisionsIterator'](_0x23a79e['newRevisionId']))if(_0x4d57d2['push'](_0x39b936),_0x39b936['id']===_0x23a79e['oldRevisionId'])break;return _0x4d57d2;}*['getRevisionsIterator'](_0x43c4a8,{direction:_0x11ef9e='earlier',filter:_0xece0a5=()=>!0x0}={}){const _0xdd0633='earlier'===_0x11ef9e?0x1:-0x1;let _0x5415d4=this['_revisions']['get'](_0x43c4a8),_0x3efa50=this['getIndex'](_0x5415d4);for(yield _0x5415d4;_0x5415d4;){if(_0x3efa50+=_0xdd0633,_0x5415d4=this['getRevision'](_0x3efa50),!_0x5415d4)return;_0xece0a5(_0x5415d4)&&(yield _0x5415d4);}}}class V extends _0x1129e8{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0xdabad5,'c'],[_0x3f8696,'a'],[_0x23648c,'e'],[_0x1a34d7,'r'],[_0x4a0fd1,'u']]);['_typeCharToViewClass']=new Map([['c',_0xdabad5],['a',_0x3f8696],['e',_0x23648c],['r',_0x1a34d7],['u',_0x4a0fd1]]);async['loadRevisionData'](_0x3e17f2,_0x51fa47){if(_0x3e17f2['diffData']||!_0x51fa47)return;const _0x166ca2=this['editor']['config']['get']('collaboration.channelId'),_0x5bfb20=await _0x51fa47['getRevision']({'channelId':_0x166ca2,'revisionId':_0x3e17f2['id']});_0x3e17f2['diffData']=_0x5bfb20['diffData'];}['getRevisionDocumentData'](_0x472f44){const _0x4ecfe6={};for(const _0x5b2731 in _0x472f44['diffData']){if(_0x472f44['diffData'][_0x5b2731]['attachChange']&&!_0x472f44['diffData'][_0x5b2731]['attachChange']['isAttached'])continue;const _0x3bcde7=this['_removeRevisionMarkers'](JSON['parse'](_0x472f44['diffData'][_0x5b2731]['insertions'])),_0x247ae6=this['editor']['editing']['view']['document'],_0x8d7703=new _0xf55500(_0x247ae6,_0x3bcde7['map'](_0x412aef=>this['_getViewFromDiffObj'](_0x412aef,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4ecfe6[_0x5b2731]=this['editor']['data']['processor']['toData'](_0x8d7703),this['editor']['data']['processor']['useFillerType']('default');}return _0x4ecfe6;}['getRevisionRootsAttributes'](_0x47d789){const _0x13edfa={};for(const _0x34454c in _0x47d789['diffData'])_0x47d789['diffData'][_0x34454c]['attachChange']&&!_0x47d789['diffData'][_0x34454c]['attachChange']['isAttached']||(_0x13edfa[_0x34454c]=_0x47d789['diffData'][_0x34454c]['attributesAfter']||{});return _0x13edfa;}['_getTypeCharForViewElement'](_0x43f859){return this['_viewClassToTypeChar']['get'](_0x43f859['constructor']);}['_getViewFromDiffObj'](_0x87fc8c,_0x3d206b){const _0x564669=this['editor']['editing']['view']['document'];if('string'==typeof _0x87fc8c)return new _0x4f8869(_0x564669,_0x87fc8c);{let _0x302e77,_0x1fb70a;_0x1fb70a='u'==_0x87fc8c['type']||'r'==_0x87fc8c['type']?[]:_0x87fc8c['children']['map'](_0x38515c=>this['_getViewFromDiffObj'](_0x38515c,_0x3d206b));const _0x5a8ae1=this['_typeCharToViewClass']['get'](_0x87fc8c['type'])||_0x295176,_0x50bb73=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x302e77=new _0x5a8ae1(_0x564669,_0x87fc8c['name'],_0x87fc8c['attributes'],_0x1fb70a),'u'==_0x87fc8c['type']){const _0x2e2639=_0x87fc8c['children'][0x0];if(_0x302e77['render']=function(_0x5175bd){const _0x4176fb=_0x5175bd['createElement']('div');return _0x4176fb['innerHTML']=_0x2e2639,_0x4176fb['childNodes'][0x0];},_0x3d206b){const _0x55d153=new _0xf55500(_0x564669);_0x55d153['_appendChild'](_0x302e77);const _0x98b029=Array['from'](_0x50bb73['viewChildrenToDom'](_0x55d153,{'bind':!0x1})),_0x150505=_0x50bb73['domDocument']['createElement']('div');_0x150505['append'](..._0x98b029),_0x302e77=Array['from'](_0x50bb73['domChildrenToView'](_0x150505))[0x0];}}else{if('r'==_0x87fc8c['type']){const _0xd0c031=_0x87fc8c['children'][0x0];if(_0x302e77['render']=function(_0x24c5e9){_0x24c5e9['innerHTML']=_0xd0c031;},_0x3d206b){const _0x7d50cf=new _0xf55500(_0x564669);_0x7d50cf['_appendChild'](_0x302e77);const _0x5eeb61=Array['from'](_0x50bb73['viewChildrenToDom'](_0x7d50cf,{'bind':!0x1})),_0x4efe7a=_0x50bb73['domDocument']['createElement']('div');_0x4efe7a['append'](..._0x5eeb61);const _0x2cd752=Array['from'](_0x50bb73['domChildrenToView'](_0x4efe7a));_0x2cd752['length']>0x1?_0x302e77['_appendChild'](_0x2cd752):_0x302e77=_0x2cd752[0x0];}}}if(_0x87fc8c['customProperties']){for(const [_0xd7226e,_0x626ef8]of _0x87fc8c['customProperties'])_0x302e77['_setCustomProperty'](_0xd7226e,_0x626ef8);}const _0x13a312=_0x87fc8c['fillerOffset']||null;return _0x302e77['getFillerOffset']=()=>_0x13a312,_0x302e77;}}['_makeModelFromViewString'](_0x5f490f){const _0x550061=JSON['parse'](_0x5f490f),_0x2af72c=this['editor']['editing']['view']['document'],_0x2505e7=new _0xf55500(_0x2af72c,_0x550061['map'](_0x305b80=>this['_getViewFromDiffObj'](_0x305b80,!0x0)));return this['editor']['data']['toModel'](_0x2505e7);}['_removeRevisionMarkers'](_0x1228a2){return(_0x1228a2=_0x1228a2['filter'](_0x2e97fa=>!_0x2e97fa['name']||'revision-start'!==_0x2e97fa['name']&&'revision-end'!==_0x2e97fa['name']))['forEach'](_0x45513e=>{'string'!=typeof _0x45513e&&(_0x45513e['children']=this['_removeRevisionMarkers'](_0x45513e['children']),_0x45513e['attributes']=_0x45513e['attributes']['filter'](_0x28e7cf=>!_0x28e7cf[0x0]['startsWith']('data-revision-')));}),_0x1228a2;}}function g(_0x27e284,_0x383776,_0x45b7a7){const t=_0x27e284['t'];switch(_0x383776){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'},_0x45b7a7);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x45b7a7);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class u extends _0x1129e8{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x51945f,I,V,_0x4121ed];}constructor(_0x1987da){super(_0x1987da),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x522caf=_0x27e53b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x522caf},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0xe8ee3a=this['repository']['getRevision'](0x0),_0x6912c1=_0xe8ee3a&&null===_0xe8ee3a['creator']?_0xe8ee3a:null;if(this['_continueCurrentRevision']=!!_0x6912c1&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x46d4f0=this['_source']['getCurrentRevisionId'](),_0x2eddc1=this['repository']['getRevision'](_0x46d4f0);if(_0x2eddc1)this['_startingVersion']=_0x2eddc1['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x84f600=this['_source']['history']['_operations']['find'](_0x2616ae=>!_0x2616ae['_isInit']),_0x2875c2=_0x84f600?_0x84f600['baseVersion']:this['_source']['history']['version'];_0xe8ee3a?(_0xe8ee3a['toVersion']<_0x2875c2&&_0xe8ee3a['_update']({'toVersion':_0x2875c2}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x6912c1['id'],this['_startingVersion']=_0x6912c1['fromVersion']):(this['_startingVersion']=_0xe8ee3a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2875c2,this['_continueCurrentRevision']=!0x1);}}else _0x6912c1&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x6912c1['toVersion'],this['editor']['model']['document']['history']['version']),_0x6912c1['fromVersion']===_0x6912c1['toVersion']?(0x0!==_0x6912c1['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x6912c1['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x6912c1['id'],this['_startingVersion']=_0x6912c1['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',_0x43c97e=>!_0x43c97e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x384f7a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1106ec;for(const _0x5aac98 in _0x384f7a){const _0x4696ee=_0x5aac98,_0x303cae=_0x384f7a[_0x4696ee];if('revisionHistoryLicenseKeyValid'==_0x303cae||'revisionHistoryLicenseKeyInvalid'==_0x303cae||'revisionHistoryLicenseKeyExpired'==_0x303cae||'revisionHistoryLicenseKeyDomainLimit'==_0x303cae||'revisionHistoryLicenseKeyNotAllowed'==_0x303cae||'revisionHistoryLicenseKeyEvaluationLimit'==_0x303cae||'revisionHistoryLicenseKeyTrialLimit'==_0x303cae||'revisionHistoryLicenseKeyUsageLimit'==_0x303cae){delete _0x384f7a[_0x4696ee],_0x1106ec=_0x303cae,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1106ec&&_0x384f7a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1106ec&&_0x384f7a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1106ec&&_0x384f7a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1106ec&&_0x384f7a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1106ec&&_0x384f7a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x1106ec&&_0x384f7a['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1106ec&&_0x384f7a['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x30d87e=this['repository']['getRevision'](0x0),_0x559d12=await this['getRevisionDocumentData'](_0x30d87e),_0x195118=await this['getRevisionRootsAttributes'](_0x30d87e);this['_replaceEditorDataWithRevisionData'](_0x559d12,_0x195118);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x566bd0){this['_source']=_0x566bd0;}async['update'](){const _0x3aef4e=await this['_source']['getLatestVersion']();if(_0x3aef4e>this['currentRevision']['toVersion']){await this['_loadState']();const _0x2de7df=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3aef4e});_0x2de7df['authors']=_0x2de7df['authorsIds']['map'](_0xc9e5d5=>this['editor']['plugins']['get']('Users')['getUser'](_0xc9e5d5)),this['currentRevision']['_update'](_0x2de7df);}}async['saveRevision'](_0x54e882={},_0x28676e=null){const _0x1cddbf=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x28676e>this['currentRevision']['toVersion']&&(_0x28676e=null),null===_0x28676e&&(_0x28676e=await this['_source']['getLatestVersion']());const _0x373fd7=this['_getFromVersion'](_0x28676e),_0xd3e1ab=this['buildRevisionData']({'from':_0x373fd7,'to':_0x28676e});if(this['currentRevision']['toVersion']<_0x28676e){const _0x140cdc=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x28676e,'to':_0x28676e});_0x140cdc['authors']=[],_0x140cdc['authorsIds']=[],_0x140cdc['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x140cdc,!0x0),delete _0x140cdc['authors'],_0x1cddbf['push'](_0x140cdc);}_0x54e882['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x54e882['name']=_0x54e882['name']||null,_0x54e882['id']=_0x54e882['id']||_0x27e53b(),_0x54e882={..._0x54e882,..._0xd3e1ab};const _0x5cc2e3=this['addRevisionData'](_0x54e882);_0x1cddbf['push'](_0x54e882);const _0x220f6b=this['repository']['getIndex'](_0x5cc2e3);if(0x0!==_0x220f6b){const _0x3ff58d=this['repository']['getRevision'](_0x220f6b-0x1);if(_0x3ff58d['fromVersion']!==_0x28676e){const _0x265a5f=this['_revisionDataBuilder']['getData'](_0x28676e,_0x3ff58d['toVersion']),_0x150c81={'id':_0x3ff58d['id'],'diffData':_0x265a5f['diffData'],'authorsIds':_0x265a5f['authorsIds'],'authors':_0x265a5f['authorsIds']['map'](_0x4bc8c9=>this['editor']['plugins']['get']('Users')['getUser'](_0x4bc8c9)),'fromVersion':_0x28676e};_0x3ff58d===this['currentRevision']&&(_0x150c81['createdAt']=new Date(_0x54e882['createdAt']['getTime']()+0xa)),_0x3ff58d['_update'](_0x150c81,!0x0),delete _0x150c81['authors'],_0x1cddbf['push'](_0x150c81);}}if(this['adapter']){for(const _0x59bc49 of _0x1cddbf)this['_bufferUpdate'](_0x59bc49['id'],_0x59bc49,!0x0);this['sendBufferedUpdates']();}return _0x5cc2e3;}['addRevisionData'](_0x174500){const _0xf3657a=this['repository']['createRevision'](_0x174500);return this['adapter']&&_0xf3657a['on']('_update',(_0x4674b1,_0xdb0047,_0x2b76b5)=>{_0x2b76b5||(this['_bufferUpdate'](_0xdb0047['id'],_0xdb0047,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0xf3657a,this['_findInsertionIndex'](_0xf3657a)),_0xf3657a;}async['getRevisionDocumentData'](_0x2d54a8){return await this['_utils']['loadRevisionData'](_0x2d54a8,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2d54a8);}async['getRevisionRootsAttributes'](_0x4ce722){return await this['_utils']['loadRevisionData'](_0x4ce722,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4ce722);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3d0a41=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x356a35=0x0;_0x356a35<_0x3d0a41['length'];_0x356a35++){const _0x5a4441=_0x3d0a41[_0x356a35];let _0x2360f4=!0x1;for(const _0x890984 of Object['keys'](_0x5a4441))void 0x0===_0x5a4441[_0x890984]?delete _0x5a4441[_0x890984]:'id'!==_0x890984&&(_0x2360f4=!0x0);_0x2360f4||(_0x3d0a41[_0x356a35]=null);}if(_0x3d0a41=_0x3d0a41['filter'](_0x4aa6fb=>null!==_0x4aa6fb),!_0x3d0a41['length'])return;for(let _0x3d53b8=0x0;_0x3d53b8<_0x3d0a41['length'];_0x3d53b8++){const _0x27c35c=_0x3d0a41[_0x3d53b8];void 0x0!==_0x27c35c['fromVersion']&&void 0x0===_0x27c35c['toVersion']&&(_0x27c35c['toVersion']=this['repository']['getRevision'](_0x27c35c['id'])['toVersion']),void 0x0!==_0x27c35c['toVersion']&&void 0x0===_0x27c35c['fromVersion']&&(_0x27c35c['fromVersion']=this['repository']['getRevision'](_0x27c35c['id'])['fromVersion']);}const _0x5a9297=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3d0a41,_0x5a9297)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x223f8b=>{if(_0x223f8b){for(const _0x1f17cf of _0x223f8b)this['setRevisionData']({'id':_0x1f17cf['id'],'createdAt':_0x1f17cf['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x3c1bda=null,from:_0x2fca99=null,to:_0x4e81a9=null}){_0x2fca99=null!==_0x2fca99?_0x2fca99:_0x3c1bda['fromVersion'],_0x4e81a9=null!==_0x4e81a9?_0x4e81a9:_0x3c1bda['toVersion'];const _0x13da1f=this['_revisionDataBuilder']['getData'](_0x2fca99,_0x4e81a9),_0x47da2d={'diffData':_0x13da1f['diffData'],'authorsIds':_0x13da1f['authorsIds'],'fromVersion':_0x2fca99,'toVersion':_0x4e81a9};if(!_0x3c1bda||_0x4e81a9!==_0x3c1bda['toVersion']){const _0x17d5f2=_0x4e81a9-0x1,_0x3802e6=this['_source']['history']['getOperation'](_0x17d5f2);_0x47da2d['createdAt']=_0x3802e6&&_0x3802e6['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2fca99===this['_loadedStateData']['fromVersion']){for(const _0x5660c3 of this['_loadedStateData']['authors'])_0x47da2d['authorsIds']['includes'](_0x5660c3['id'])||_0x47da2d['authorsIds']['push'](_0x5660c3['id']);}return _0x47da2d;}['_bufferUpdate'](_0x248201,_0x33701c,_0x390576){if(this['_bufferedUpdates']['has'](_0x248201)){const _0x57c75e=this['_bufferedUpdates']['get'](_0x248201);_0x33701c=_0x390576?{..._0x57c75e,..._0x33701c}:{..._0x33701c,..._0x57c75e};}this['_bufferedUpdates']['set'](_0x248201,_0x33701c);}['setRevisionData'](_0x567067){const _0x12fa79=this['repository']['getRevision'](_0x567067['id']);if(_0x567067['createdAt']&&(_0x567067['createdAt']=new Date(_0x567067['createdAt'])),_0x567067['authorsIds']){const _0x48a224=this['editor']['plugins']['get']('Users');_0x567067['authors']=_0x567067['authorsIds']['map'](_0x5ca47c=>_0x48a224['getUser'](_0x5ca47c));}_0x12fa79['_update'](_0x567067,!0x0);}['_createInitialRevision'](_0x533d2c){const _0x11e96d=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x11e96d)this['_initialRevisionId']=_0x11e96d['id'];else{const _0x2783d0=!this['editor']['model']['document']['roots']['find'](_0x520dfa=>this['editor']['model']['hasContent'](_0x520dfa)),_0x1de281=this['editor']['plugins']['get']('Users')['me']['id'],_0x1bbafb=g(this['editor']['locale'],_0x2783d0?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x533d2c,'to':_0x533d2c,'id':this['_initialRevisionId'],'name':_0x1bbafb,'creatorId':_0x1de281});}}['_createCurrentRevision'](_0x424428){const _0x4e796e=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4e796e),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x424428,'to':_0x424428,'id':_0x4e796e,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x488743,_0x4e751d){let _0x32fc01=this['editor']['config']['get']('initialData'),_0x21a61b=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x32fc01){_0x32fc01={};for(const _0x1504a4 of this['editor']['model']['document']['getRootNames']())_0x32fc01[_0x1504a4]='';}if('string'==typeof _0x32fc01&&(_0x32fc01={'main':_0x32fc01}),void 0x0===_0x21a61b){_0x21a61b={};for(const _0x5925b9 of this['editor']['model']['document']['getRootNames']())_0x21a61b[_0x5925b9]={};}let _0x43ee1b=!0x1;const _0x5a08d2=Object['keys'](_0x32fc01),_0x35613f=Object['keys'](_0x488743);for(const _0x3d6821 of _0x5a08d2){if(_0x32fc01[_0x3d6821]!==_0x488743[_0x3d6821]&&''!==_0x32fc01[_0x3d6821]['trim']()){_0x43ee1b=!0x0;break;}if(!_0x1db4c9(_0x21a61b[_0x3d6821],_0x4e751d[_0x3d6821])&&Object['keys'](_0x21a61b[_0x3d6821])['length']>0x0){_0x43ee1b=!0x0;break;}}_0x43ee1b||(_0x43ee1b=_0x35613f['some'](_0x5db340=>!this['editor']['model']['document']['getRoot'](_0x5db340))),_0x43ee1b&&_0x2778d6('editor-initial-data-replaced-with-revision-data',{'editorData':_0x32fc01,'editorRootsAttributes':_0x21a61b,'revisionData':_0x488743,'revisionRootsAttributes':_0x4e751d}),this['editor']['config']['set']('initialData',_0x488743),this['editor']['config']['set']('rootsAttributes',_0x4e751d);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1ed0c8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1ed0c8['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x482034){const _0x12be82=this['repository']['getRevisions']();_0x12be82['reverse']();let _0x42cb9a=0x0;for(;_0x42cb9a<_0x12be82['length'];){const _0x5da1e5=_0x12be82[_0x42cb9a];if(_0x5da1e5===this['currentRevision']){_0x42cb9a++;continue;}if(_0x5da1e5['id']===this['_initialRevisionId'])break;const _0x195686=_0x482034['toVersion']-_0x5da1e5['toVersion']||_0x482034['fromVersion']-_0x5da1e5['fromVersion'];if(_0x195686>0x0)break;if(_0x195686<0x0)_0x42cb9a++;else{if(!_0x482034['creator']&&_0x5da1e5['creator'])break;if(_0x5da1e5['creator']||!_0x482034['creator']){if(_0x482034['createdAt']>_0x5da1e5['createdAt'])break;_0x42cb9a++;}else _0x42cb9a++;}}return _0x42cb9a;}['_getFromVersion'](_0x154e65){const _0x42a96f=this['repository']['getRevisions']();_0x42a96f['reverse'](),_0x42a96f['shift']();const _0x10bc9c=_0x42a96f['find'](_0x3fcd88=>_0x3fcd88['toVersion']<=_0x154e65)['toVersion'];return _0x10bc9c<this['_startingVersion']?this['_startingVersion']:_0x10bc9c;}['_makeRevision']({name:_0x392a69,from:_0x3925f2,to:_0x48abfc,creatorId:_0x43ca59,id:_0x28600e}){const _0x1c0e87=this['buildRevisionData']({'from':_0x3925f2,'to':_0x48abfc});_0x1c0e87['name']=_0x392a69,_0x1c0e87['creatorId']=_0x43ca59,_0x1c0e87['id']=_0x28600e;const _0x3d70c8=this['addRevisionData'](_0x1c0e87);return this['adapter']&&this['_bufferUpdate'](_0x1c0e87['id'],_0x1c0e87,!0x0),_0x3d70c8;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1127ea){this['editor']=_0x1127ea,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'](_0x507665){this['source']=_0x507665;const _0x10c3e0=new Map(),_0x2304d8=new Map(),_0x2a8597=this['editor']['model']['document']['roots']['map'](_0x1986c9=>_0x1986c9['rootName']);for(const _0x27836a of _0x2a8597){const _0x53303a=this['editor']['model']['document']['getRoot'](_0x27836a),_0x1c1053=N(_0x53303a);_0x10c3e0['set'](_0x27836a,_0x1c1053),_0x2304d8['set'](_0x27836a,Object['fromEntries'](_0x53303a['getAttributes']()));}const _0x37cfb3=Array['from'](this['editor']['model']['markers'])['map'](_0x2f9e6c=>[_0x2f9e6c['name'],_0x2f9e6c['getRange']()]),_0x54378a=this['source']['version'];this['_saveMetaData'](_0x54378a,_0x10c3e0,_0x37cfb3,_0x2304d8),this['_startingRevisionId']=this['_revisionId'];const _0x41cca=new Map(),_0x223154=new Map();for(const _0x2607f7 of _0x2a8597){const _0xe0ada4=P(_0x2607f7);_0x41cca['set'](_0x2607f7,_0xe0ada4),_0x223154['set'](_0x2607f7,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x41cca,[],_0x223154);}['getData'](_0x149f54,_0x33c502){if(this['_lastFrom']===_0x149f54&&this['_lastTo']<=_0x33c502)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x33c502,!0x0);else{if(!this['_savedMetaData']['has'](_0x149f54)){const _0x1eae5d=this['_getPreviousFrom'](_0x149f54);this['_calculateMetaData'](_0x1eae5d,_0x149f54,!0x1);}this['_calculateMetaData'](_0x149f54,_0x33c502,!0x0);}return this['_lastFrom']=_0x149f54,this['_lastTo']=_0x33c502,this['_getState']();}['loadState'](_0x2b1072){const _0x29e9d0=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x2b1072['fromVersion'],this['_lastTo']=_0x2b1072['toVersion'];for(const _0x5d421b in _0x2b1072['diffData']){const _0x30009e=_0x2b1072['diffData'][_0x5d421b]['attachChange'],_0xf09f15=_0x2d84f0(_0x2b1072['diffData'][_0x5d421b]['attributesBefore'])||{},_0x2aeafb=_0x29e9d0['_makeModelFromViewString'](_0x2b1072['diffData'][_0x5d421b]['deletions']);_0x2aeafb['rootName']=_0x5d421b,_0x2aeafb['_isAttached']=!_0x30009e||!_0x30009e['isAttached'],_0x2aeafb['isAttached']=()=>_0x2aeafb['_isAttached'],this['_baseRoots']['set'](_0x5d421b,_0x2aeafb),this['_baseRootsAttributes']['set'](_0x5d421b,_0xf09f15),_0x30009e&&this['_touchedRoots']['set'](_0x5d421b,_0x30009e);const _0x2e0d2a=this['_makeIdsRoot'](_0x2aeafb);this['_baseIdsRoots']['set'](_0x5d421b,_0x2e0d2a);for(const [_0x19dc45,_0x2ea62b]of _0x2aeafb['markers']){if(!_0x19dc45['startsWith']('revision:'))continue;const _0x1dcd7a=_0x19dc45['split'](':')[0x2];for(const _0x28611a of _0x2ea62b['getWalker']({'singleCharacters':!0x0})){const _0x4ee558=this['_getVidAttributeName'](_0x28611a),_0x32b4d7='elementEnd'==_0x28611a['type']?_0x28611a['previousPosition']['path']['slice'](0x0,-0x1):_0x28611a['previousPosition']['path'],_0x576622=_0x2e0d2a['getNodeByPath'](_0x32b4d7)['getAttribute'](_0x4ee558);this['_touched']['set'](_0x576622,{'userId':_0x1dcd7a});}}}this['_startingRevisionId']=this['_revisionId'];const _0x533b13=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4c8389=>!this['_touched']['has'](_0x4c8389));let _0x57ba2e=0x0;const _0x7f49b5=new Map();for(const _0x272de1 in _0x2b1072['diffData']){const _0x11dde8=_0x2b1072['diffData'][_0x272de1]['attachChange'],_0x2299ec=_0x2d84f0(_0x2b1072['diffData'][_0x272de1]['attributesAfter'])||{},_0x1f88a9=_0x29e9d0['_makeModelFromViewString'](_0x2b1072['diffData'][_0x272de1]['insertions']);_0x1f88a9['rootName']=_0x272de1,_0x1f88a9['_isAttached']=!_0x11dde8||_0x11dde8['isAttached'],_0x1f88a9['isAttached']=()=>_0x1f88a9['_isAttached'],this['_diffRoots']['set'](_0x272de1,_0x1f88a9),this['_diffRootsAttributes']['set'](_0x272de1,_0x2299ec);const _0x48fdc1=this['_makeIdsRoot'](_0x1f88a9,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x272de1,_0x48fdc1),_0x7f49b5['set'](_0x272de1,_0x1f88a9['isAttached']()?_0x2299ec:{});for(const [_0x294d16,_0x19346e]of _0x1f88a9['markers']){if(!_0x294d16['startsWith']('revision:'))continue;const _0x29f2e1=_0x294d16['split'](':')[0x2];for(const _0x29e99b of _0x19346e['getWalker']({'singleCharacters':!0x0})){const _0x5071ad=this['_getVidAttributeName'](_0x29e99b),_0x42705f=this['_revisionId']++,_0x496f6c='elementEnd'==_0x29e99b['type']?_0x29e99b['previousPosition']['path']['slice'](0x0,-0x1):_0x29e99b['previousPosition']['path'];_0x48fdc1['getNodeByPath'](_0x496f6c)['_setAttribute'](_0x5071ad,_0x42705f),this['_touched']['set'](_0x42705f,{'userId':_0x29f2e1});}}for(const _0x4352a0 of this['editor']['model']['createRangeIn'](_0x1f88a9)['getWalker']({'singleCharacters':!0x0})){const _0x37c4fc=this['_getVidAttributeName'](_0x4352a0),_0x3dd20b='elementEnd'==_0x4352a0['type']?_0x4352a0['previousPosition']['path']['slice'](0x0,-0x1):_0x4352a0['previousPosition']['path'],_0x3ca39d=_0x48fdc1['getNodeByPath'](_0x3dd20b);_0x3ca39d['getAttribute'](_0x37c4fc)>0x0||_0x3ca39d['_setAttribute'](_0x37c4fc,_0x533b13[_0x57ba2e++]);}for(const [_0x328467,_0x449ed6]of _0x1f88a9['markers'])_0x328467['startsWith']('revision:')||this['_markers']['set'](_0x328467,_0x449ed6);}const _0x4bd4af=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x4bd4af),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4bd4af,0x1));const _0x53076c=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x53076c),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x53076c,0x1));const _0x4a383f=Array['from'](this['_diffRoots'])['map'](([_0xb21bce,_0x23947c])=>[_0xb21bce,N(_0x23947c)]);this['_saveMetaData'](this['_lastTo'],_0x4a383f,this['_markers'],_0x7f49b5);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1db9c2,_0x3a07bd,_0xc84461,_0x468347){const _0x2dc88a=new Map(_0x3a07bd),_0xb56a3a=new Map(_0x2d84f0(_0x468347)),_0x13b207=new Map();for(const [_0x5b18ee,_0x46956f]of _0xc84461)_0x13b207['set'](_0x5b18ee,{'start':_0x46956f['start']['clone'](),'end':_0x46956f['end']['clone'](),'rootName':_0x46956f['root']['rootName']});this['_savedMetaData']['set'](_0x1db9c2,{'roots':_0x2dc88a,'markers':_0x13b207,'rootsAttributes':_0xb56a3a});}['_removeMetaData'](_0x1508f8){this['_savedMetaData']['delete'](_0x1508f8);}['_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'](_0x6c74d5,_0x3b257b=null){let _0x57f2ba=null;_0x6c74d5['is']('documentFragment')||(_0x57f2ba=new ut(_0x6c74d5['name'],{'vid_start':null===_0x3b257b?this['_revisionId']++:_0x3b257b++}));const _0x313762=[];for(const _0x46ce40 of _0x6c74d5['getChildren']())if(_0x46ce40['is']('element')){_0x313762['push'](this['_makeIdsRoot'](_0x46ce40,_0x3b257b));const _0x5ec70d=_0x313762[_0x313762['length']-0x1];null!==_0x3b257b&&(_0x3b257b=_0x5ec70d['is']('element','$text')?_0x5ec70d['getAttribute']('vid')+0x1:_0x5ec70d['getAttribute']('vid_end')+0x1);}else{for(let _0x506cb4=0x0;_0x506cb4<_0x46ce40['offsetSize'];_0x506cb4++)_0x313762['push'](new ut('$text',{'vid':null===_0x3b257b?this['_revisionId']++:_0x3b257b++}));}if(_0x6c74d5['is']('documentFragment')){const _0x2f0d5f=P(_0x6c74d5['rootName']);return _0x2f0d5f['_insertChild'](0x0,_0x313762),_0x2f0d5f;}return _0x57f2ba['_setAttribute']('vid_end',null===_0x3b257b?this['_revisionId']++:_0x3b257b++),_0x57f2ba['_insertChild'](0x0,_0x313762),_0x57f2ba;}['_calculateMetaData'](_0x380271,_0x3d8063,_0x5423ce){this['_reset']();const {roots:_0x2b5f43,markers:_0x5a7f3f,rootsAttributes:_0x3e2b74}=this['_savedMetaData']['get'](_0x380271);this['_baseRoots']=new Map(_0x2b5f43),this['_baseRootsAttributes']=new Map(_0x2d84f0(_0x3e2b74));for(const [_0x17af98,_0x3b9842]of this['_baseRoots'])if('$graveyard'!==_0x17af98&&(this['_diffRoots']['set'](_0x17af98,N(_0x3b9842)),this['_diffRootsAttributes']=new Map(_0x2d84f0(_0x3e2b74)),_0x5423ce)){const _0x36c4c5=this['_revisionId'];this['_idsRoots']['set'](_0x17af98,this['_makeIdsRoot'](_0x3b9842)),this['_baseIdsRoots']['set'](_0x17af98,this['_makeIdsRoot'](_0x3b9842,_0x36c4c5));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x5423ce&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x21af06,_0x447f9e]of _0x5a7f3f){const _0x5d0555=this['_baseRoots']['get'](_0x447f9e['rootName']),_0xecdff7=this['_diffRoots']['get'](_0x447f9e['rootName']),_0x951e30=new ft(this['_fixPosition'](_0x447f9e['start'],_0x5d0555),this['_fixPosition'](_0x447f9e['end'],_0x5d0555)),_0x2274f0=this['_fixRange'](_0x951e30,_0xecdff7);_0x5d0555['markers']['set'](_0x21af06,_0x951e30),this['_markers']['set'](_0x21af06,_0x2274f0);}this['_applyOperations'](_0x380271,_0x3d8063,_0x5423ce);}['_applyOperations'](_0x5ca05f,_0x1e7ba9,_0x6342c4){for(const _0x5aa025 of this['source']['getOperations'](_0x5ca05f,_0x1e7ba9))this['_handleOperation'](_0x5aa025,_0x6342c4);for(const _0x15ee0b of this['_diffRoots']['values']())_0x15ee0b['markers']['clear']();for(const [_0x2e3fe7,_0x1938a4]of this['_markers']){this['_diffRoots']['get'](_0x1938a4['root']['rootName'])['markers']['set'](_0x2e3fe7,_0x1938a4['clone']());}const _0x5d0d75=new Map(),_0x1f71d7=new Map();for(const [_0x227ca8,_0x365256]of this['_diffRoots'])_0x5d0d75['set'](_0x227ca8,N(_0x365256)),_0x1f71d7['set'](_0x227ca8,this['_diffRootsAttributes']['get'](_0x227ca8));this['_saveMetaData'](_0x1e7ba9,_0x5d0d75,this['_markers'],_0x1f71d7);}['_getPreviousFrom'](_0x1ebcfe){const _0x28c7f6=Array['from'](this['_savedMetaData']['keys']());_0x28c7f6['sort']((_0x53a844,_0x4f3f4b)=>_0x53a844-_0x4f3f4b),_0x28c7f6['reverse']();for(const _0x172984 of _0x28c7f6)if(_0x172984<_0x1ebcfe)return _0x172984;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4084cf,_0x22719d){const _0x1c678e=Array['from'](_0x22719d['markers'])['map'](([_0x25d4d1,_0xfaa586])=>[_0x25d4d1,this['_fixRange'](_0xfaa586,_0x4084cf)]);_0x4084cf['markers']=new Map(_0x1c678e);}['_transformMarkers'](_0x4535fe){for(const _0x3847d2 of this['_markers']['values']()){const _0x4127e8=_0x3847d2['getTransformedByOperation'](_0x4535fe),_0x43ce29=ft['_createFromRanges'](_0x4127e8);_0x3847d2['start']=_0x43ce29['start'],_0x3847d2['end']=_0x43ce29['end'];}}['_handleOperation'](_0x4dd70e,_0x37b92a){if('addRoot'!=_0x4dd70e['type']&&'detachRoot'!=_0x4dd70e['type']){if('insert'==_0x4dd70e['type']){const _0x3f8924=_0x4dd70e['position']['root']['rootName'];this['_diffRoots']['has'](_0x3f8924)||(this['_diffRoots']['set'](_0x3f8924,P(_0x3f8924,!0x0)),this['_diffRootsAttributes']['set'](_0x3f8924,{}),_0x37b92a&&this['_idsRoots']['set'](_0x3f8924,P(_0x3f8924,!0x0)));}else{if('addRootAttribute'==_0x4dd70e['type']||'removeRootAttribute'==_0x4dd70e['type']||'changeRootAttribute'==_0x4dd70e['type'])return void this['_handleRootAttributeOperation'](_0x4dd70e);'marker'==_0x4dd70e['type']&&this['_handleMarkerOperation'](_0x4dd70e);}if('marker'!==_0x4dd70e['type']){const _0x113492=this['_cloneOperation'](_0x4dd70e,this['_diffRoots']);_0x113492['_execute'](),this['_transformMarkers'](_0x113492);}if(_0x37b92a)switch(_0x4dd70e['type']){case'insert':this['_handleInsertOperation'](_0x4dd70e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4dd70e);break;case'merge':this['_handleMergeOperation'](_0x4dd70e);break;case'split':this['_handleSplitOperation'](_0x4dd70e);}}else this['_handleRootOperation'](_0x4dd70e,_0x37b92a);}['_cloneOperation'](_0x444475,_0x532437){const _0x599e97=_0x444475['clone']();return _0x599e97['_authorId']=_0x444475['_authorId'],this['_fixOperation'](_0x599e97,_0x532437),_0x599e97;}['_getBaseVids'](_0x47a6f5){return _0x47a6f5['map'](_0x512a31=>{const _0x1e8004=this['_getVidAttributeName'](_0x512a31);return Number(_0x512a31['item']['getAttribute'](_0x1e8004));});}['_generateTape'](_0x3d45a3,_0x421e66){if(_0x3d45a3['is']('element','$text'))_0x421e66['push']({'item':_0x3d45a3,'type':'text'});else{_0x3d45a3['is']('element')&&_0x421e66['push']({'item':_0x3d45a3,'type':'elementStart'});for(const _0x5d59d6 of _0x3d45a3['getChildren']())this['_generateTape'](_0x5d59d6,_0x421e66);_0x3d45a3['is']('element')&&_0x421e66['push']({'item':_0x3d45a3,'type':'elementEnd'});}return _0x421e66;}['_getState'](){const _0x3d6161=new Map(this['_touched']),_0x51ce02=new Map(_0x3d6161),_0x2be1a0=new Map(),_0x3a90d6={'insertions':{},'deletions':{}},_0x30ca5d={'insertions':{},'deletions':{}},_0xe5db7=new Map(),_0xa0a703=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0xa0a703['delete']('$graveyard');for(const _0x4ffbe4 of _0xa0a703){const _0x5e6a2f=this['_diffRoots']['get'](_0x4ffbe4)||P(_0x4ffbe4,!0x1),_0x5b00a5=this['_baseRoots']['get'](_0x4ffbe4)||P(_0x4ffbe4,!0x1);_0x5e6a2f['isAttached']()||_0x5b00a5['isAttached']()?(_0x3a90d6['insertions'][_0x4ffbe4]=N(_0x5e6a2f),_0x3a90d6['deletions'][_0x4ffbe4]=N(_0x5b00a5),this['_copyMarkers'](_0x3a90d6['deletions'][_0x4ffbe4],_0x5b00a5),this['_copyMarkers'](_0x3a90d6['insertions'][_0x4ffbe4],_0x5e6a2f),_0x30ca5d['insertions'][_0x4ffbe4]=this['_generateTape'](this['_idsRoots']['get'](_0x4ffbe4),[]),_0x30ca5d['deletions'][_0x4ffbe4]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x4ffbe4)||P(_0x4ffbe4,!0x1),[])):_0xa0a703['delete'](_0x4ffbe4);}for(const _0x2342ec of _0xa0a703){const _0x1612f5=_0x30ca5d['insertions'][_0x2342ec];for(const _0x5cae08 of _0x1612f5){const _0x2e9d9c=this['_getVidAttributeName'](_0x5cae08),_0x458d6a=_0x5cae08['item']['getAttribute'](_0x2e9d9c);_0x51ce02['delete'](_0x458d6a),_0x458d6a>=this['_startingRevisionId']&&_0x2be1a0['set'](_0x458d6a,_0x3d6161['get'](_0x458d6a));}}for(const _0x4b11a5 of _0xa0a703){const _0x3926d3=_0x30ca5d['insertions'][_0x4b11a5],_0x1eacd0=this['_getBaseVids'](_0x30ca5d['deletions'][_0x4b11a5]);let _0x2308c7=0x0;for(const _0x3ccdfb of _0x3926d3){const _0x42f438=this['_getVidAttributeName'](_0x3ccdfb),_0x25fd64=_0x3ccdfb['item']['getAttribute'](_0x42f438);if(!_0x2be1a0['has'](_0x25fd64)&&!_0xe5db7['has'](_0x25fd64)){if(_0x51ce02['has'](_0x25fd64))_0x2308c7++;else{if(_0x25fd64!=_0x1eacd0[_0x2308c7]){const _0x87098e=_0x3d6161['get'](_0x25fd64)||_0x3d6161['get'](_0x1eacd0[_0x2308c7]);for(;_0x25fd64!=_0x1eacd0[_0x2308c7];)_0x51ce02['has'](_0x1eacd0[_0x2308c7])||(_0xe5db7['set'](_0x1eacd0[_0x2308c7],_0x87098e),_0x3d6161['set'](_0x1eacd0[_0x2308c7],_0x87098e)),_0x2308c7++;}_0x2308c7++;}}}}for(const _0x1a5e67 of _0xa0a703){const _0x4fb0a2=_0x30ca5d['insertions'][_0x1a5e67];for(const _0x37eac8 of _0x4fb0a2){const _0x175b39=this['_getVidAttributeName'](_0x37eac8),_0x512950=_0x37eac8['item']['getAttribute'](_0x175b39);if(_0xe5db7['has'](_0x512950)){const _0x2b2e57=_0xe5db7['get'](_0x512950);_0x51ce02['has'](_0x512950)||_0x51ce02['set'](_0x512950,{..._0x2b2e57}),_0x2be1a0['set'](_0x512950,{..._0x2b2e57});}}}for(const _0x5b28c2 of _0x51ce02['keys']())_0x5b28c2>=this['_startingRevisionId']&&_0x51ce02['delete'](_0x5b28c2);const _0xb5d73c=new Map();for(const _0x48eacf of _0xa0a703){let _0x103f07=_0x30ca5d['insertions'][_0x48eacf];for(const _0x4640f7 of _0x103f07)if(_0x4640f7['item']['is']('element','tableCell')){const _0x269b0a=this['_getVidAttributeName'](_0x4640f7),_0xcdffc9=_0x4640f7['item']['getAttribute'](_0x269b0a);if(_0x2be1a0['has'](_0xcdffc9)){const _0x4b9c01=_0x4640f7['item']['parent']['parent']['getAttribute']('vid_start'),_0x16646d=_0xb5d73c['get'](_0x4b9c01)||new Set();_0x16646d['add'](_0x2be1a0['get'](_0xcdffc9)['userId']),_0xb5d73c['set'](_0x4b9c01,_0x16646d);}}_0x103f07=_0x30ca5d['deletions'][_0x48eacf];for(const _0x2640e2 of _0x103f07)if(_0x2640e2['item']['is']('element','tableCell')){const _0x1cf0ed=this['_getVidAttributeName'](_0x2640e2),_0x4f9e49=_0x2640e2['item']['getAttribute'](_0x1cf0ed);if(_0x51ce02['has'](_0x4f9e49)){const _0x64c1c=_0x2640e2['item']['parent']['parent']['getAttribute']('vid_start'),_0x25138e=_0xb5d73c['get'](_0x64c1c)||new Set();_0x25138e['add'](_0x51ce02['get'](_0x4f9e49)['userId']),_0xb5d73c['set'](_0x64c1c,_0x25138e);}}for(const _0x2a757f of _0xb5d73c['keys']())(_0x2be1a0['has'](_0x2a757f)||_0x51ce02['has'](_0x2a757f))&&_0xb5d73c['delete'](_0x2a757f);}for(const _0xb6113a of _0xa0a703){const _0x21ee19=_0x30ca5d['insertions'][_0xb6113a];let _0x24437f=null,_0x10cc9a=null;for(const _0x5475de of _0x21ee19){const _0x4540e3=this['_getVidAttributeName'](_0x5475de),_0x261440=_0x5475de['item']['getAttribute'](_0x4540e3),_0x20641f=_0xb5d73c['get'](_0x261440);_0x20641f&&'elementStart'==_0x5475de['type']&&(_0x24437f=Array['from'](_0x20641f)[0x0],_0x10cc9a=_0x5475de['item']['getAttribute']('vid_end')),_0x24437f&&(_0x51ce02['set'](_0x261440,{'userId':_0x24437f}),_0x2be1a0['set'](_0x261440,{'userId':_0x24437f})),_0x261440==_0x10cc9a&&(_0x24437f=null,_0x10cc9a=null);}}const _0x1c9e54={},_0x3fa0dd=new Set();for(const _0x52efb2 of _0xa0a703){const _0x4b5bed=_0x3a90d6['deletions'][_0x52efb2],_0x1e0a83=_0x3a90d6['insertions'][_0x52efb2];for(const {userId:_0x32214f}of this['_touchedMarkers']['values']())null!==_0x32214f&&_0x3fa0dd['add'](_0x32214f);for(const {userId:_0x463663}of this['_touchedRoots']['values']())null!==_0x463663&&_0x3fa0dd['add'](_0x463663);this['_markChanges'](_0x1e0a83,_0x30ca5d['insertions'][_0x52efb2],_0x2be1a0,'insertion',_0x3fa0dd),this['_markChanges'](_0x4b5bed,_0x30ca5d['deletions'][_0x52efb2],_0x51ce02,'deletion',_0x3fa0dd),_0x1c9e54[_0x52efb2]={'insertions':this['_prepareViewToSave'](_0x1e0a83),'deletions':this['_prepareViewToSave'](_0x4b5bed),'attachChange':this['_touchedRoots']['get'](_0x52efb2)||null,'attributesBefore':_0x2d84f0(this['_baseRootsAttributes']['get'](_0x52efb2))||{},'attributesAfter':_0x2d84f0(this['_diffRootsAttributes']['get'](_0x52efb2))};}return{'diffData':_0x1c9e54,'authorsIds':Array['from'](_0x3fa0dd)};}['_processRootBeforeSave'](_0x11d60c){for(const [,_0x3909ef]of _0x11d60c['markers']){const _0x38bf57=_0x3909ef['start']['getAncestors']()['filter'](_0x3b461a=>'tableCell'==_0x3b461a['name']);for(const _0x135656 of _0x38bf57)0x1==_0x135656['childCount']&&_0x135656['getChild'](0x0)['is']('element','paragraph')&&_0x135656['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x46f0d5){this['_processRootBeforeSave'](_0x46f0d5);const _0x58636a=this['editor']['data']['toView'](_0x46f0d5,{}),_0x15fd07=Array['from'](_0x58636a['getChildren']())['map'](_0x397064=>this['_getViewJson'](_0x397064));return JSON['stringify'](_0x15fd07);}['_getViewJson'](_0x524649){if(_0x524649['is']('$text'))return _0x524649['data'];{const _0x397b5c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x145058=_0x524649,_0x2409ce=this['editor']['data']['htmlProcessor']['domConverter'],_0x3aa170={'type':_0x397b5c['_getTypeCharForViewElement'](_0x145058),'name':_0x145058['name'],'attributes':Array['from'](_0x145058['getAttributes']()),'children':Array['from'](_0x145058['getChildren']())['map'](_0x8c2e12=>this['_getViewJson'](_0x8c2e12))};if(_0x524649['is']('uiElement')&&'$comment'!=_0x524649['name']){const _0x28ba0c=_0x524649['render'](_0x2409ce['domDocument'],_0x2409ce);_0x3aa170['children']['push'](_0x28ba0c['outerHTML']);}else{if(_0x524649['is']('rawElement')){const _0x596b10=_0x2409ce['domDocument']['createElement'](_0x145058['name']);_0x524649['render'](_0x596b10,_0x2409ce),_0x3aa170['children']['push'](_0x596b10['innerHTML']);}}const _0x3b988c=Array['from'](_0x145058['getCustomProperties']());_0x3b988c['length']>0x0&&(_0x3aa170['customProperties']=_0x3b988c);const _0x4fc4b4=_0x145058['getFillerOffset']();return null!==_0x4fc4b4&&(_0x3aa170['fillerOffset']=_0x4fc4b4),_0x3aa170;}}['_markChanges'](_0x3b540f,_0x6f8476,_0x23f97a,_0x5605a4,_0xc20c35){let _0x2d3db3=null,_0x54febc=null,_0x116081=0x0;const _0x39c645=this['editor']['model'];for(let _0x1cba24=0x0;_0x1cba24<_0x6f8476['length'];_0x1cba24++){const _0x1f6d6c=this['_getVidAttributeName'](_0x6f8476[_0x1cba24]),_0x18ace7=_0x6f8476[_0x1cba24]['item']['getAttribute'](_0x1f6d6c),_0x15493f=_0x23f97a['get'](_0x18ace7),_0x3d53be=_0x1cba24==_0x6f8476['length']-0x1;(!_0x2d3db3&&_0x15493f&&(_0x2d3db3=_0x15493f,_0x54febc=_0x6f8476[_0x1cba24]),_0x2d3db3&&(!_0x15493f||_0x15493f['userId']!=_0x2d3db3['userId']))&&(_0x401fb8(_0x15493f,F(_0x54febc,_0x3b540f,_0x39c645),F(_0x6f8476[_0x1cba24],_0x3b540f,_0x39c645)),_0x2d3db3=_0x15493f||null,_0x54febc=_0x15493f?_0x6f8476[_0x1cba24]:null),_0x2d3db3&&_0x3d53be&&_0x401fb8(_0x15493f,F(_0x54febc,_0x3b540f,_0x39c645),B(_0x6f8476[_0x1cba24],_0x3b540f,_0x39c645));}function _0x401fb8(_0x7f5ecc,_0x4868b0,_0x50b2c4){const _0x181eda=_0x2d3db3['userId'],_0x53219d='revision:'+_0x5605a4+':'+_0x181eda+':'+_0x116081++,_0x12fc49=_0x39c645['createRange'](_0x4868b0,_0x50b2c4);_0x3b540f['markers']['set'](_0x53219d,_0x12fc49),null!==_0x181eda&&_0xc20c35['add'](_0x181eda);}}['_getVidAttributeName'](_0x383ddb){switch(_0x383ddb['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x27e612,_0x501583){_0x27e612['baseVersion']=null;for(const _0x5bab80 in _0x27e612){const _0x64367d=_0x27e612[_0x5bab80];if(_0x64367d instanceof vt){const _0x102f2d=_0x501583['get'](_0x64367d['root']['rootName']);_0x27e612[_0x5bab80]=this['_fixPosition'](_0x64367d,_0x102f2d);}if(_0x64367d instanceof ft){const _0x34c146=_0x501583['get'](_0x64367d['root']['rootName']);_0x27e612[_0x5bab80]=this['_fixRange'](_0x64367d,_0x34c146);}'root'===_0x5bab80&&(_0x27e612['root']=_0x501583['get'](_0x27e612['root']['rootName']));}}['_fixRange'](_0x349771,_0x4448cc){return this['editor']['model']['createRange'](this['_fixPosition'](_0x349771['start'],_0x4448cc),this['_fixPosition'](_0x349771['end'],_0x4448cc));}['_fixPosition'](_0x4c40ef,_0x5b5d0b){return this['editor']['model']['createPositionFromPath'](_0x5b5d0b,_0x4c40ef['path'],_0x4c40ef['stickiness']);}['_handleInsertOperation'](_0x213c1c){const _0x3bb3d5=this['_idsRoots']['get'](_0x213c1c['position']['root']['rootName']),_0x5c5632=this['_fixPosition'](_0x213c1c['position'],_0x3bb3d5),_0x3efaed=null===_0x213c1c['_authorId']?null:_0x213c1c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5bf265=_0x5c5632['parent'],_0x231644=this['_revisionId'],_0x1fde09=[];for(const _0x41e219 of _0x213c1c['nodes'])if(_0x41e219['is']('element'))_0x1fde09['push'](this['_makeIdsRoot'](_0x41e219));else{for(let _0x28b095=0x0;_0x28b095<_0x41e219['offsetSize'];_0x28b095++)_0x1fde09['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x3eeba2=this['_revisionId'];for(let _0x1c0109=_0x231644;_0x1c0109<_0x3eeba2;_0x1c0109++)this['_touched']['set'](_0x1c0109,{'userId':_0x3efaed});_0x5bf265['_insertChild'](_0x5c5632['offset'],_0x1fde09);}['_handleMoveOperation'](_0x3163d6){(_0x3163d6=this['_cloneOperation'](_0x3163d6,this['_idsRoots']))['_execute']();const _0x338cba=null===_0x3163d6['_authorId']?null:_0x3163d6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2944c3=_0x3163d6['getMovedRangeStart'](),_0x42f8c5=_0x2944c3['parent'],_0x3095c5=_0x2944c3['offset'];!function _0x1d755c(_0x190505,_0x4307c7,_0x54b67b,_0x300e87){for(let _0x33babc=_0x54b67b;_0x33babc<_0x300e87;_0x33babc++){const _0x3d285f=_0x4307c7['getChild'](_0x33babc);_0x3d285f['is']('element','$text')?_0x190505['set'](_0x3d285f['getAttribute']('vid'),{'userId':_0x338cba}):(_0x190505['set'](_0x3d285f['getAttribute']('vid_start'),{'userId':_0x338cba}),_0x1d755c(_0x190505,_0x3d285f,0x0,_0x3d285f['childCount']),_0x190505['set'](_0x3d285f['getAttribute']('vid_end'),{'userId':_0x338cba}));}}(this['_touched'],_0x42f8c5,_0x3095c5,_0x3095c5+_0x3163d6['howMany']);}['_handleMergeOperation'](_0x53a1fa){const _0x468b02=null===(_0x53a1fa=this['_cloneOperation'](_0x53a1fa,this['_idsRoots']))['_authorId']?null:_0x53a1fa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4927a5=_0x53a1fa['targetPosition']['parent'],_0x14c6a7=_0x53a1fa['sourcePosition']['parent'],_0x4100e8=_0x4927a5['getAttribute']('vid_end'),_0x502f2e=_0x14c6a7['getAttribute']('vid_start');_0x4927a5['_setAttribute']('vid_end',_0x14c6a7['getAttribute']('vid_end')),_0x14c6a7['_setAttribute']('vid_end',_0x4100e8),this['_touched']['set'](_0x502f2e,{'userId':_0x468b02}),this['_touched']['set'](_0x4100e8,{'userId':_0x468b02}),_0x53a1fa['_execute']();}['_handleSplitOperation'](_0x3e6b10){const _0x4ffc19=null===(_0x3e6b10=this['_cloneOperation'](_0x3e6b10,this['_idsRoots']))['_authorId']?null:_0x3e6b10['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x56acde=_0x3e6b10['graveyardPosition'],_0x1c2ec6=_0x3e6b10['splitPosition']['parent'];_0x3e6b10['_execute']();const _0x27df57=_0x1c2ec6['getAttribute']('vid_end'),_0x3a7ed7=_0x3e6b10['insertionPosition']['nodeAfter'];if(_0x56acde){const _0x36fbcc=_0x3a7ed7['getAttribute']('vid_end'),_0xbb120f=_0x1c2ec6['getAttribute']('vid_end');_0x1c2ec6['_setAttribute']('vid_end',_0x36fbcc),_0x3a7ed7['_setAttribute']('vid_end',_0xbb120f),this['_touched']['set'](_0x1c2ec6['getAttribute']('vid_end'),{'userId':_0x4ffc19}),this['_touched']['set'](_0x3a7ed7['getAttribute']('vid_start'),{'userId':_0x4ffc19});}else{const _0xfbe7ff=this['_revisionId']++,_0x4f1e53=this['_revisionId']++;_0x1c2ec6['_setAttribute']('vid_end',_0xfbe7ff),_0x3a7ed7['_setAttribute']('vid_start',_0x4f1e53),_0x3a7ed7['_setAttribute']('vid_end',_0x27df57),this['_touched']['set'](_0xfbe7ff,{'userId':_0x4ffc19}),this['_touched']['set'](_0x4f1e53,{'userId':_0x4ffc19});}}['_handleMarkerOperation'](_0x3c8694){if(!_0x3c8694['affectsData'])return;const _0x3e6658=(_0x3c8694=this['_cloneOperation'](_0x3c8694,this['_diffRoots']))['oldRange']?_0x3c8694['oldRange']['root']:null,_0x3cc408=_0x3c8694['newRange']?_0x3c8694['newRange']['root']:null;_0x3e6658&&this['_markers']['delete'](_0x3c8694['name']),_0x3cc408&&this['_markers']['set'](_0x3c8694['name'],_0x3c8694['newRange']['clone']());const _0x591616=null===_0x3c8694['_authorId']?null:_0x3c8694['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x245e3a=_0x3c8694['name'];if(!this['_touchedMarkers']['has'](_0x245e3a))return void this['_touchedMarkers']['set'](_0x245e3a,{'range':_0x3c8694['oldRange'],'userId':_0x591616});const _0x2a3b70=this['_touchedMarkers']['get'](_0x245e3a),_0x170395=_0x2a3b70['range'],_0x4b6fd8=_0x3c8694['newRange'];null==_0x170395&&null==_0x4b6fd8||_0x170395&&_0x4b6fd8&&_0x170395['isEqual'](_0x4b6fd8)?this['_touchedMarkers']['delete'](_0x3c8694['name']):_0x2a3b70['userId']=_0x591616;}['_handleRootOperation'](_0x2e89b6,_0x2ec684){this['_diffRoots']['has'](_0x2e89b6['rootName'])?this['_diffRoots']['get'](_0x2e89b6['rootName'])['_isAttached']=_0x2e89b6['isAdd']:(this['_diffRoots']['set'](_0x2e89b6['rootName'],P(_0x2e89b6['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x2e89b6['rootName'],{}),_0x2ec684&&this['_idsRoots']['set'](_0x2e89b6['rootName'],P(_0x2e89b6['rootName'],!0x0)));const _0x50ae89=null===_0x2e89b6['_authorId']?null:_0x2e89b6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x55336f=this['_touchedRoots']['get'](_0x2e89b6['rootName']);_0x55336f&&_0x55336f['userId']===_0x50ae89?this['_touchedRoots']['delete'](_0x2e89b6['rootName']):this['_touchedRoots']['set'](_0x2e89b6['rootName'],{'userId':_0x50ae89,'isAttached':_0x2e89b6['isAdd']});}['_handleRootAttributeOperation'](_0x5c2e46){const _0x287936=this['_diffRootsAttributes']['get'](_0x5c2e46['root']['rootName']);null===_0x5c2e46['newValue']?delete _0x287936[_0x5c2e46['key']]:_0x287936[_0x5c2e46['key']]=_0x5c2e46['newValue'];}}function N(_0x5b19a3){const _0x185ead=P(_0x5b19a3['rootName'],_0x5b19a3['isAttached']());for(const _0x17837b of _0x5b19a3['getChildren']()){const _0x1dc5dd=_0x17837b['_clone'](!0x0);_0x185ead['_appendChild'](_0x1dc5dd);}return _0x185ead;}function P(_0x2a1de1,_0x152e3c=!0x0){const _0x6cfaf1=new gt();return _0x6cfaf1['rootName']=_0x2a1de1,_0x6cfaf1['_isAttached']=_0x152e3c,_0x6cfaf1['isAttached']=()=>_0x6cfaf1['_isAttached'],_0x6cfaf1;}function F(_0x1dd6c2,_0x1aee4e,_0x3b6768){const _0xddb69e='elementEnd'==_0x1dd6c2['type']?_0x3b6768['createPositionAt'](_0x1dd6c2['item'],'end'):_0x3b6768['createPositionBefore'](_0x1dd6c2['item']);return _0x3b6768['createPositionFromPath'](_0x1aee4e,_0xddb69e['path'],_0xddb69e['stickiness']);}function B(_0x307d6a,_0x5822a1,_0x32300c){const _0x2938d0='elementStart'==_0x307d6a['type']?_0x32300c['createPositionAt'](_0x307d6a['item'],0x0):_0x32300c['createPositionAfter'](_0x307d6a['item']);return _0x32300c['createPositionFromPath'](_0x5822a1,_0x2938d0['path'],_0x2938d0['stickiness']);}class os extends _0x5e71d5{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4b94a8,_0xd48a9b){super(_0x4b94a8),this['focusTracker']=new _0x34fe9f(),this['keystrokes']=new _0x2590ba(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0xd48a9b),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'](),_0x3bb16f({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x59dec7=_0x573dd5=>_0x573dd5['stopPropagation']();this['keystrokes']['set']('arrowright',_0x59dec7),this['keystrokes']['set']('arrowleft',_0x59dec7),this['keystrokes']['set']('arrowup',_0x59dec7),this['keystrokes']['set']('arrowdown',_0x59dec7);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x102b13){this['revisionNameInputView']['fieldView']['element']['value']=_0x102b13['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x210f7c){const _0x5396ea=new nt(this['locale'],ti),_0x573044=_0x5396ea['fieldView'];_0x573044['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x5b6e35=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x210f7c&&(_0x5b6e35+='\x20('+g(this['locale'],'optional')+')'),(_0x5396ea['label']=_0x5b6e35,_0x573044['on']('input',()=>{this['revisionNameInputValue']=_0x573044['element']['value']['trim']();}),_0x5396ea);}}class f extends _0x1129e8{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x28a756=this['editor'],_0x36f871=_0x28a756['plugins']['get']('RevisionTracker');_0x28a756['ui']['componentFactory']['add']('revisionHistory',_0x131d3a=>{const _0x133b3d=_0x1d7232(_0x131d3a),_0x3ad02d=_0x133b3d['panelView']['children'],_0x2512a0=new _0x439ab0(_0x131d3a),_0x50b3b7=new te(_0x131d3a),_0x459f6d=new _0x4391bf(_0x131d3a),_0x2c7ce8=new te(_0x131d3a),_0x3d54c4=new _0x4391bf(_0x131d3a);return _0x133b3d['bind']('isEnabled')['to'](_0x36f871,'isReady',_0x36f871,'isEnabled',_0x28a756,'isReadOnly',(_0x26cd4d,_0x15eaf5,_0x24396d)=>_0x26cd4d&&_0x15eaf5&&!_0x24396d),_0x133b3d['buttonView']['set']({'icon':_0x2e06aa,'label':g(_0x131d3a,'Revision\x20history'),'tooltip':!0x0}),_0x459f6d['set']({'label':g(_0x131d3a,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x459f6d['bind']('isEnabled')['to'](_0x36f871,'isReady',_0x36f871,'isEnabled',_0x28a756,'isReadOnly',(_0x440f25,_0x34e576,_0x18a902)=>_0x440f25&&_0x34e576&&!_0x18a902),_0x459f6d['on']('execute',()=>this['_showDialog']()),_0x3d54c4['set']({'label':g(_0x131d3a,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x3d54c4['bind']('isEnabled')['to'](_0x36f871,'isReady',_0x28a756,'isReadOnly',(_0x232530,_0x151da5)=>_0x232530&&!_0x151da5),_0x3d54c4['on']('execute',()=>{_0x28a756['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x133b3d['isOpen']=!0x1,_0x28a756['editing']['view']['focus']();}),_0x50b3b7['children']['add'](_0x459f6d),_0x2c7ce8['children']['add'](_0x3d54c4),_0x2512a0['role']='menu',_0x2512a0['items']['addMany']([_0x50b3b7,_0x2c7ce8]),_0x3ad02d['add'](_0x2512a0),_0x133b3d;}),_0x28a756['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x5db176=this['editor'],_0x10d1cf=_0x5db176['locale'],_0x23df26=new _0x3caac8(_0x10d1cf),_0x5df9c4=new _0x4c8396(_0x10d1cf);_0x23df26['buttonView']['set']({'icon':_0x2e06aa,'label':g(_0x10d1cf,'Revision\x20history')});const _0x4e1068=new _0x43111e(_0x10d1cf,_0x23df26),_0xf80302=new _0x24aebe(_0x10d1cf);_0xf80302['set']({'label':g(_0x10d1cf,'Save\x20current\x20revision')}),_0xf80302['delegate']('execute')['to'](_0x23df26),_0xf80302['on']('execute',()=>{this['_showDialog']();}),_0x4e1068['children']['add'](_0xf80302),_0x5df9c4['items']['add'](_0x4e1068);const _0x543355=new _0x43111e(_0x10d1cf,_0x23df26),_0x1d0f25=new _0x24aebe(_0x10d1cf);return _0x1d0f25['set']({'label':g(_0x10d1cf,'Open\x20revision\x20history')}),_0x1d0f25['delegate']('execute')['to'](_0x23df26),_0x1d0f25['on']('execute',()=>{_0x5db176['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x543355['children']['add'](_0x1d0f25),_0x5df9c4['items']['add'](_0x543355),_0x23df26['panelView']['children']['add'](_0x5df9c4),_0x23df26;}['_showDialog'](){const _0x39815c=this['editor'],_0x43bec9=_0x39815c['locale'],_0x181cf4=_0x39815c['plugins']['get']('Dialog'),_0x4ace47=_0x39815c['plugins']['get']('RevisionTracker');function _0x5e08db(_0x4f42f8){_0x39815c['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4f42f8['revisionName']?_0x4f42f8['revisionNameInputView']['errorText']=g(_0x43bec9,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x39815c['plugins']['get'](u)['saveRevision']({'name':_0x4f42f8['revisionName']}),_0x181cf4['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5e08db(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x181cf4['show']({'id':'revisionSave','title':g(_0x43bec9,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x39815c['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x181cf4['hide']()},{'label':g(_0x39815c['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5a05cb){_0x5a05cb['bind']('isEnabled')['to'](_0x4ace47,'isReady',_0x4ace47,'isEnabled',_0x39815c,'isReadOnly',(_0xca8930,_0x44fe4e,_0xb22cd8)=>_0xca8930&&_0x44fe4e&&!_0xb22cd8);},'onExecute':()=>_0x5e08db(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x3fc61d=this['editor'],_0x28bdfe=_0x3fc61d['locale'];this['_saveRevisionFormView']=new os(_0x28bdfe,_0x3fc61d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x5e71d5{['changeId'];['_model'];constructor(_0x55febd,_0x3ca4cd){super(_0x55febd),this['_model']=_0x3ca4cd,this['changeId']=_0x3ca4cd['id'];const _0x379493=this['bindTemplate'],_0x48ffa0=g(_0x55febd,_0x3ca4cd['data']['isSuggestion']?'Suggested\x20by':'add'==_0x3ca4cd['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x3ca4cd['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x379493['to']('type',_0x4608d5=>'ck-revision-change__'+_0x4608d5)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x48ffa0}]},{'text':'\x20'+_0x3ca4cd['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x5bf972(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x188e5e){super(),this['id']=_0x188e5e['id']||_0x27e53b(),this['author']=_0x188e5e['author'],this['type']=_0x188e5e['type'],this['data']=_0x188e5e['data']||{},this['rootName']=_0x188e5e['rootName'],this['set']('createdAt',_0x188e5e['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1f6fb7,_0x38d02d){this['newRevisionId']=_0x1f6fb7,this['oldRevisionId']=_0x38d02d,this['changes']=new _0x593c71();}['_setChanges'](_0x4e6ade){for(const _0x2c70da of _0x4e6ade)this['changes']['add'](_0x2c70da);}}class m extends _0x1129e8{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x51945f,_0x3a0b12,I,V];}constructor(_0x5af13a){super(_0x5af13a),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x292c6f,_0x5933d2,_0x3c218e)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x251fed=>{for(const _0xc330d8 of this['editor']['editing']['view']['document']['roots'])_0x3c218e?_0x251fed['removeClass']('ck-editor__editable__overlay',_0xc330d8):_0x251fed['addClass']('ck-editor__editable__overlay',_0xc330d8);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x51bc84=>null!==_0x51bc84),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x42f309,_0x32eaab,_0x149805)=>_0x42f309&&_0x149805?_0x32eaab['changes']['getIndex'](_0x149805):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x53fa90,_0x547db3)=>_0x53fa90?_0x547db3['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3a0b12);}['init'](){const _0x4cac02=this['editor'],_0x4808af=new pt(_0x4cac02,{'direction':'backward'}),_0x3f1006=new pt(_0x4cac02,{'direction':'forward'});(_0x4cac02['commands']['add']('showPreviousChange',_0x4808af),_0x4cac02['commands']['add']('showNextChange',_0x3f1006),_0x4cac02['commands']['add']('restoreRevision',new wt(_0x4cac02)),this['on']('change:numberOfChanges',()=>{_0x4808af['refresh'](),_0x3f1006['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4cac02['enableReadOnlyMode']('revision-viewer'),_0x4cac02['plugins']['has']('WidgetToolbarRepository'))&&_0x4cac02['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x5e915a){return await this['_utils']['loadRevisionData'](_0x5e915a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5e915a);}async['getRevisionRootsAttributes'](_0x5d0c0c){return await this['_utils']['loadRevisionData'](_0x5d0c0c,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5d0c0c);}async['compare'](_0x14d4ca,_0x31ad1a,_0x1d6008=!0x1){if(!this['isEnabled'])return;const _0xcd939=this['diff'],_0x3c7ef5=this['repository'],_0x1783ce='string'==typeof _0x14d4ca?_0x3c7ef5['getRevision'](_0x14d4ca):_0x14d4ca,_0x39e10c='string'==typeof _0x31ad1a?_0x3c7ef5['getRevision'](_0x31ad1a):_0x31ad1a,_0x549995=_0x1783ce['id'],_0x241583=_0x39e10c?_0x39e10c['id']:null;if(!_0x1d6008&&this['diff']&&this['diff']['newRevisionId']===_0x549995&&this['diff']['oldRevisionId']===_0x241583)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x549995,_0x241583);const _0x2fd57b=this['_getRevisionsRange'](_0x1783ce,_0x39e10c,!0x0)['map'](_0x530ef7=>this['_utils']['loadRevisionData'](_0x530ef7,this['adapter']));return _0x2fd57b['push'](new Promise(_0x450338=>{setTimeout(_0x450338,0x14);})),Promise['all'](_0x2fd57b)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4e9097=this['_getDiff'](_0x549995,_0x241583);for(const _0x7b206f of _0x4e9097['changes'])this['_changeIdToChange']['set'](_0x7b206f['id'],_0x7b206f);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4052af=>{for(const _0x5af242 of this['editor']['model']['document']['getRootNames']())_0x4052af['detachRoot'](_0x5af242);for(const _0x5fefb8 of Object['keys'](_0x4e9097['model'])){const _0x53b9b2=_0x4052af['addRoot'](_0x5fefb8);for(const _0x2f5171 of Object['keys'](_0x4e9097['attributes'][_0x5fefb8]))_0x4052af['setAttribute'](_0x2f5171,_0x4e9097['attributes'][_0x5fefb8][_0x2f5171],_0x53b9b2);_0x4052af['insert'](_0x4e9097['model'][_0x5fefb8],_0x53b9b2,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4e9097['changes'])),this['isReady']=!0x0;})['catch'](_0x420949=>{console['error'](_0x420949),this['_cleanUp'](),_0xcd939&&(this['diff']=_0xcd939),this['isReady']=!0x0;});}['addRevisionData'](_0x1a2cd9,_0x463b14){const _0x30ab7a=this['repository']['createRevision'](_0x1a2cd9);return _0x30ab7a['on']('_update',(_0x3f2cb7,_0x1f3068,_0x206c2b)=>_0x463b14(_0x1f3068,_0x206c2b,_0x30ab7a)),this['repository']['addRevision'](_0x30ab7a),_0x30ab7a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x261162=>{for(const _0x32f2f7 of this['editor']['model']['document']['getRootNames']())_0x261162['detachRoot'](_0x32f2f7);});}['_sortAndFilterDiffChanges'](_0x2256ab){const _0x3d3ff3=[],_0x274369=new Map();for(const _0x4ac1ea of this['editor']['model']['document']['getRootNames']()){const _0x57ab8e=this['editor']['editing']['view']['getDomRoot'](_0x4ac1ea);if(!_0x57ab8e)continue;const _0xaa1792=_0x57ab8e['getClientRects']()['item'](0x0);_0xaa1792&&(_0x3d3ff3['push'](_0x4ac1ea),_0x274369['set'](_0x4ac1ea,_0xaa1792));}return _0x3d3ff3['sort']((_0x387953,_0x4f3691)=>{const _0x26bac2=_0x274369['get'](_0x387953),_0x114e49=_0x274369['get'](_0x4f3691);return _0x26bac2['y']-_0x114e49['y']||_0x26bac2['x']-_0x114e49['x'];}),(_0x2256ab=_0x2256ab['filter'](_0x2c9a30=>_0x3d3ff3['includes'](_0x2c9a30['rootName'])))['sort']((_0x4ce2ad,_0x1208bf)=>_0x3d3ff3['indexOf'](_0x4ce2ad['rootName'])-_0x3d3ff3['indexOf'](_0x1208bf['rootName'])),_0x2256ab;}['_makeTape'](_0x51f59f){const _0x1a9c85=Array['from'](_0x51f59f['markers'])['filter'](([_0x5eb242,_0x19a8ca])=>_0x5eb242['startsWith']('revision:')&&!_0x19a8ca['isCollapsed']),_0x1c0a25=Array['from'](this['editor']['model']['createRangeIn'](_0x51f59f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1a9c85['length'])for(const _0x52da90 of _0x1c0a25){const [_0x7bf34f,_0x182185]=_0x1a9c85[0x0],[,_0x5a34d8,_0x4b5d9f]=_0x7bf34f['split'](':');if(_0x182185['end']['isEqual'](_0x52da90['nextPosition'])&&_0x1a9c85['shift'](),(_0x52da90['previousPosition']['isEqual'](_0x182185['start'])||_0x52da90['previousPosition']['isAfter'](_0x182185['start']))&&('insertion'==_0x5a34d8?_0x52da90['isAdded']={'userId':_0x4b5d9f}:'deletion'==_0x5a34d8&&(_0x52da90['isRemoved']={'userId':_0x4b5d9f})),0x0==_0x1a9c85['length'])break;}return _0x1c0a25;}['_refreshStartEndIndex'](_0x499d66){const _0x6f2733=new Map();for(let _0xf93ee0=0x0;_0xf93ee0<_0x499d66['length'];_0xf93ee0++)'text'===_0x499d66[_0xf93ee0]['type']?(_0x499d66[_0xf93ee0]['item']['startIndex']=_0xf93ee0,_0x499d66[_0xf93ee0]['item']['endIndex']=_0xf93ee0):('elementStart'===_0x499d66[_0xf93ee0]['type']?_0x499d66[_0xf93ee0]['item']['startIndex']=_0xf93ee0:'elementEnd'===_0x499d66[_0xf93ee0]['type']&&(_0x499d66[_0xf93ee0]['item']['endIndex']=_0xf93ee0),_0x6f2733['set'](_0x499d66[_0xf93ee0]['id'],_0xf93ee0));for(const _0x2dba13 of _0x6f2733['values']())'elementStart'===_0x499d66[_0x2dba13]['type']?_0x499d66[_0x2dba13]['item']['endIndex']=_0x6f2733['get'](_0x499d66[_0x2dba13]['pairId']):'elementEnd'===_0x499d66[_0x2dba13]['type']&&(_0x499d66[_0x2dba13]['item']['startIndex']=_0x6f2733['get'](_0x499d66[_0x2dba13]['pairId']));}['_processTape'](_0x4a150c){for(let _0x858c26=0x0;_0x858c26<_0x4a150c['length'];_0x858c26++){if('elementStart'===_0x4a150c[_0x858c26]['type'])_0x4a150c[_0x858c26]['item']['startIndex']=_0x858c26;else{if('elementEnd'===_0x4a150c[_0x858c26]['type']){_0x4a150c[_0x858c26]['item']['endIndex']=_0x858c26;const _0x121e43=_0x4a150c[_0x858c26]['item']['startIndex'];_0x4a150c[_0x121e43]['pairId']=_0x4a150c[_0x858c26]['id'],_0x4a150c[_0x858c26]['pairId']=_0x4a150c[_0x121e43]['id'];}else _0x4a150c[_0x858c26]['item']['startIndex']=_0x858c26,_0x4a150c[_0x858c26]['item']['endIndex']=_0x858c26,_0x4a150c[_0x858c26]['pairId']=null;}_0x4a150c[_0x858c26]['markersStart']||(_0x4a150c[_0x858c26]['markersStart']=[],_0x4a150c[_0x858c26]['markersEnd']=[]);}}['_markInsertions'](_0x4f2cb6,_0x400a60){const _0x4097db=_0x4f2cb6['filter'](_0xd47923=>!_0xd47923['isAdded']);for(let _0x4d0b9e=0x0;_0x4d0b9e<_0x400a60['length'];_0x4d0b9e++)_0x400a60[_0x4d0b9e]['isAdded']&&(_0x4097db[_0x4d0b9e]['isAdded']=_0x400a60[_0x4d0b9e]['isAdded']);}['_getDiff'](_0x4aca98,_0x7a581e=null){const _0x4139d7=this['repository']['getRevision'](_0x4aca98),_0x313493=_0x7a581e?this['repository']['getRevision'](_0x7a581e):null,_0x5b344c=this['_getRevisionsRange'](_0x4139d7,_0x313493),_0x19d8e9=_0x5b344c[_0x5b344c['length']-0x1],_0x3d1d34=new Map(),_0x358d9d={'model':{},'attributes':{},'changes':[]},_0x2dfd0e=new Set(),_0x4603f5=new Map();for(let _0x3008a0=_0x5b344c['length']-0x1;_0x3008a0>=0x0;_0x3008a0--){const _0x1a0265=_0x5b344c[_0x3008a0];for(const _0x5de691 of Object['keys'](_0x1a0265['diffData']))if(_0x1a0265['diffData'][_0x5de691]['attachChange']){const _0x1828dc=_0x1a0265['diffData'][_0x5de691]['attachChange'];_0x1828dc['isAttached']?(_0x2dfd0e['add'](_0x5de691),_0x4603f5['has'](_0x5de691)&&_0x4603f5['get'](_0x5de691)['userId']==_0x1828dc['userId']?_0x4603f5['delete'](_0x5de691):_0x4603f5['set'](_0x5de691,_0x1828dc)):_0x4603f5['has'](_0x5de691)?(_0x2dfd0e['delete'](_0x5de691),_0x4603f5['delete'](_0x5de691)):(_0x2dfd0e['add'](_0x5de691),_0x4603f5['set'](_0x5de691,_0x1828dc));}else _0x2dfd0e['add'](_0x5de691);}for(const _0x6534c8 of _0x2dfd0e){const _0x51d327=_0x4603f5['has'](_0x6534c8)&&!_0x4603f5['get'](_0x6534c8)['isAttached'];let _0x500fd8=_0x51d327?_0x5b344c['length']-0x1:0x0;const _0x1eb8e7=_0x51d327?-0x1:0x1;for(;_0x5b344c[_0x500fd8];){const _0x23315b=_0x5b344c[_0x500fd8];if(_0x23315b['diffData'][_0x6534c8]){const _0x3ceb4a=_0x51d327?_0x23315b['diffData'][_0x6534c8]['attributesBefore']:_0x23315b['diffData'][_0x6534c8]['attributesAfter'];_0x358d9d['attributes'][_0x6534c8]=_0x3ceb4a?_0x2d84f0(_0x3ceb4a):{};break;}_0x500fd8+=_0x1eb8e7;}}for(const _0x4721d6 of _0x5b344c){_0x4721d6['model']={};for(const _0x295ae4 of _0x4721d6['authors'])_0x3d1d34['set'](_0x295ae4['id'],_0x295ae4);for(const _0x713a50 of _0x2dfd0e){const _0x24f12f=_0x4721d6['diffData'][_0x713a50]?_0x4721d6['diffData'][_0x713a50]['insertions']:'[]',_0xf71bea=_0x4721d6['diffData'][_0x713a50]?_0x4721d6['diffData'][_0x713a50]['deletions']:'[]';_0x4721d6['model'][_0x713a50]={'insertions':this['_utils']['_makeModelFromViewString'](_0x24f12f),'deletions':this['_utils']['_makeModelFromViewString'](_0xf71bea)};}}for(const _0x27e7dc of _0x2dfd0e){let _0x5a4195=null,_0x2afe63=0x0;const _0x333db3=new Map(Array['from'](_0x4139d7['model'][_0x27e7dc]['insertions']['markers'])['filter'](([_0x286f22])=>!_0x286f22['startsWith']('revision:')));let _0x252445=0x0;for(const _0x5bb5f1 of _0x5b344c){const _0x2f6adc=this['_makeTape'](_0x5bb5f1['model'][_0x27e7dc]['insertions']);_0x5bb5f1==_0x4139d7?(_0x5a4195=_0x2f6adc,_0x2afe63=_0x5a4195['length'],_0x5a4195['forEach'](_0x265177=>{_0x265177['id']=_0x252445++;}),this['_processTape'](_0x5a4195)):this['_markInsertions'](_0x5a4195,_0x2f6adc);const _0x2062bf=_0x5a4195['filter'](_0x3dd848=>!_0x3dd848['isAdded'])['map'](_0x552837=>_0x552837['id']);let _0x2ccab3=0x0;const _0x49aaf9=this['_makeTape'](_0x5bb5f1['model'][_0x27e7dc]['deletions']);_0x49aaf9['forEach'](_0x5d589a=>{_0x5d589a['isRemoved']?_0x5d589a['id']=_0x2afe63++:_0x5d589a['id']=_0x2062bf[_0x2ccab3++];}),this['_processTape'](_0x49aaf9),this['_setDistance'](_0x5a4195,'isAdded'),this['_setDistance'](_0x49aaf9,'isRemoved'),_0x5bb5f1==_0x4139d7&&this['_markMarkers'](_0x5a4195,_0x333db3),_0x5a4195=this['_joinTapes'](_0x5a4195,_0x49aaf9),this['_refreshStartEndIndex'](_0x5a4195),this['_setDistance'](_0x5a4195,'isRemoved');}_0x5a4195=_0x5a4195['filter'](_0x2ea90c=>!(_0x2ea90c['isAdded']&&_0x2ea90c['isRemoved']));const _0x50ad2d=new Map(_0x19d8e9['model'][_0x27e7dc]['deletions']['markers']),_0x2ce0d5=new Set(_0x333db3['keys']());for(const _0x4f6caf of _0x50ad2d['keys']())_0x2ce0d5['delete'](_0x4f6caf);this['_markSuggestions'](_0x5a4195,_0x2ce0d5),this['_fixObsoleteTags'](_0x5a4195),_0x5a4195=this['_removeMissingPairs'](_0x5a4195),_0x5a4195=this['_markMismatchedRemovedTags'](_0x5a4195),_0x5a4195=this['_removeUnsupportedChanges'](_0x5a4195);const {root:_0x8598e7,changes:_0x48b3b5}=this['_makeModelFromTape'](_0x5a4195,_0x3d1d34,_0x27e7dc);_0x358d9d['model'][_0x27e7dc]=_0x8598e7;const _0x131369=_0x4603f5['get'](_0x27e7dc);if(_0x131369){const _0x4693e3=_0x3d1d34['get'](_0x131369['userId']),_0x1c6045=new r({'author':_0x4693e3,'type':_0x131369['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x27e7dc});_0x48b3b5['unshift'](_0x1c6045),_0x358d9d['attributes'][_0x27e7dc]['revisionHistoryAttachChange']=_0x1c6045['id'];}_0x358d9d['changes']=_0x358d9d['changes']['concat'](_0x48b3b5);}return _0x358d9d;}['_markMarkers'](_0x412ddb,_0x57c456){for(let _0x44fd5f=0x0;_0x44fd5f<_0x412ddb['length'];_0x44fd5f++)for(const [_0x3ed044,_0x14ff5b]of _0x57c456)!_0x14ff5b['isCollapsed']&&_0x14ff5b['start']['isEqual'](_0x412ddb[_0x44fd5f]['previousPosition'])&&_0x412ddb[_0x44fd5f]['markersStart']['push'](_0x3ed044),_0x14ff5b['end']['isEqual'](_0x412ddb[_0x44fd5f]['nextPosition'])&&_0x412ddb[_0x44fd5f]['markersEnd']['push'](_0x3ed044);}['_joinTapes'](_0x5c1b00,_0x160106){let _0x1db472=[],_0xc658b0=0x0,_0x2aa488=0x0;for(;_0xc658b0<_0x5c1b00['length']||_0x2aa488<_0x160106['length'];){const _0x134a9a=_0x5c1b00[_0xc658b0]||{},_0x2108b=_0x160106[_0x2aa488]||{};if(_0x134a9a['id']==_0x2108b['id'])_0xc658b0++,_0x2aa488++,_0x1db472['push'](_0x134a9a);else{if(_0x2108b['isRemoved']&&_0x134a9a['isAdded']){const {commonTape:_0x4590bf,iEnd:_0x2d404e,jEnd:_0x58b5de}=this['_threeWayMerge'](_0x5c1b00,_0xc658b0,_0x160106,_0x2aa488);_0x1db472=_0x1db472['concat'](_0x4590bf),_0xc658b0=_0x2d404e,_0x2aa488=_0x58b5de;}else _0x2108b['isRemoved']?(_0x2aa488++,_0x1db472['push'](_0x2108b)):(_0xc658b0++,_0x1db472['push'](_0x134a9a));}}return _0x1db472;}['_markSuggestions'](_0x3237ff,_0x24d512){const _0x249546=[];for(let _0x2ed0b9=0x0;_0x2ed0b9<_0x3237ff['length'];_0x2ed0b9++){for(let _0x5d947e=0x0;_0x5d947e<_0x3237ff[_0x2ed0b9]['markersStart']['length'];_0x5d947e++){const _0x51a3be=_0x3237ff[_0x2ed0b9]['markersStart'][_0x5d947e];if(!_0x24d512['has'](_0x51a3be))continue;const {group:_0x576cfe,type:_0x516e2c,authorId:_0x348217}=_0x28dc48(_0x51a3be);'revision-suggestion'!=_0x576cfe||'insertion'!=_0x516e2c&&'deletion'!=_0x516e2c||(_0x249546['unshift']({'type':_0x516e2c,'name':_0x51a3be,'userId':_0x348217}),_0x3237ff[_0x2ed0b9]['markersStart']['splice'](_0x5d947e,0x1),_0x5d947e--);}_0x5523ca(_0x3237ff[_0x2ed0b9]);for(let _0x59fabf=0x0;_0x59fabf<_0x3237ff[_0x2ed0b9]['markersEnd']['length'];_0x59fabf++){const _0x51a364=_0x3237ff[_0x2ed0b9]['markersEnd'][_0x59fabf];if(!_0x24d512['has'](_0x51a364))continue;const {group:_0x1c78bb,type:_0x395cce}=_0x28dc48(_0x51a364);if('revision-suggestion'!=_0x1c78bb||'insertion'!=_0x395cce&&'deletion'!=_0x395cce)continue;_0x3237ff[_0x2ed0b9]['markersEnd']['splice'](_0x59fabf,0x1),_0x59fabf--;const _0x14f343=_0x249546['findIndex'](_0x3ec395=>_0x3ec395['name']==_0x51a364);_0x14f343>-0x1&&_0x249546['splice'](_0x14f343,0x1);}}function _0x28dc48(_0x49a50d){const _0x553fec=_0x49a50d['split'](':');return{'group':_0x553fec[0x0],'type':_0x553fec[0x1],'subType':_0x553fec['length']>=0x5?_0x553fec[0x2]:null,'id':_0x553fec['length']<0x5?_0x553fec[0x2]:_0x553fec[0x3],'authorId':_0x553fec['length']<0x5?_0x553fec[0x3]:_0x553fec[0x4],'markerCount':0x6==_0x553fec['length']?_0x553fec[0x5]:null};}function _0x5523ca(_0x3fac20){for(let _0x1ed553=0x0;_0x1ed553<_0x249546['length'];_0x1ed553++){if(_0x3fac20['isAdded']&&'insertion'==_0x249546[_0x1ed553]['type'])return _0x3fac20['isAddSuggestion']=_0x249546[_0x1ed553],void delete _0x3fac20['isAdded'];if(!_0x3fac20['isAdded']&&!_0x3fac20['isRemoved']&&'deletion'==_0x249546[_0x1ed553]['type'])return void(_0x3fac20['isRemoveSuggestion']=_0x249546[_0x1ed553]);}}}['_setDistance'](_0x28de55,_0x11405e){let _0x4b9c80=0x0,_0x4dfc91=!0x1;const _0x4b6432=new Map();for(const _0x31e5a7 of _0x28de55)_0x31e5a7[_0x11405e]?_0x4dfc91&&(_0x4b9c80++,_0x4dfc91=!0x1):(_0x4b9c80++,_0x4dfc91=!0x0),_0x4b6432['set'](_0x31e5a7['id'],_0x4b9c80);for(let _0x3c9928=0x0;_0x3c9928<_0x28de55['length'];_0x3c9928++){if('isRemoved'==_0x11405e&&_0x28de55[_0x3c9928]['isAdded']||'isAdded'==_0x11405e&&_0x28de55[_0x3c9928]['isRemoved'])continue;if('text'==_0x28de55[_0x3c9928]['type']){_0x28de55[_0x3c9928]['distance']=0x0;continue;}const _0x9d561d=_0x4b6432['get'](_0x28de55[_0x3c9928]['pairId']),_0x2af732=_0x4b6432['get'](_0x28de55[_0x3c9928]['id']);_0x28de55[_0x3c9928]['distance']=_0x9d561d-_0x2af732;}}['_getRevisionsRange'](_0xbd66e3,_0x3ae503,_0x3e97f3=!0x1){const _0x477c1d=[];let _0x5088a0=this['repository']['getIndex'](_0xbd66e3),_0x2101f4=this['repository']['getIndex'](_0x3ae503);for(-0x1==_0x2101f4&&(_0x2101f4=this['repository']['_revisions']['length'],_0x3e97f3=!0x1);_0x5088a0<_0x2101f4;)_0x477c1d['push'](this['repository']['getRevision'](_0x5088a0)),_0x5088a0++;return _0x3e97f3&&_0x477c1d['push'](this['repository']['getRevision'](_0x5088a0)),_0x477c1d;}['_threeWayMerge'](_0xbaa896,_0x63c609,_0x209b6e,_0x2d5332){const _0x3e740d=this['editor']['model']['schema'];let _0x5a1aae=_0x63c609;for(;_0xbaa896[_0x5a1aae]&&_0xbaa896[_0x5a1aae]['isAdded'];)_0x5a1aae++;let _0x5f0a9b=_0x2d5332;for(;_0x209b6e[_0x5f0a9b]&&_0x209b6e[_0x5f0a9b]['isRemoved'];)_0x5f0a9b++;_0x227798(_0xbaa896,_0x63c609,_0x5a1aae),_0x227798(_0x209b6e,_0x2d5332,_0x5f0a9b);const _0xed271f=_0x209b6e['slice'](_0x2d5332,_0x5f0a9b)['concat'](_0xbaa896['slice'](_0x63c609,_0x5a1aae));return _0xed271f['sort']((_0x18172c,_0x2ee2fe)=>_0x18172c['side']!=_0x2ee2fe['side']?_0x18172c['side']-_0x2ee2fe['side']:_0x18172c['level']!=_0x2ee2fe['level']?_0x18172c['level']-_0x2ee2fe['level']:_0x18172c['distance']!=_0x2ee2fe['distance']?_0x2ee2fe['distance']-_0x18172c['distance']:!!_0x18172c['isAdded']!=!!_0x2ee2fe['isAdded']?-0x1==_0x18172c['side']||0x0==_0x18172c['side']?_0x18172c['isAdded']?-0x1:0x1:_0x18172c['isAdded']?0x1:-0x1:_0x18172c['index']-_0x2ee2fe['index']),{'commonTape':_0xed271f,'iEnd':_0x5a1aae,'jEnd':_0x5f0a9b};function _0x227798(_0x4fbccf,_0x598a9b,_0x29ba86){let _0x2a174c=-0x1,_0x54ec3b=Number['POSITIVE_INFINITY'],_0x4c9d9d=!0x0;for(let _0x478e21=_0x598a9b;_0x478e21<_0x29ba86;_0x478e21++)if(_0x3e740d['isInline'](_0x4fbccf[_0x478e21]['item'])||(_0x4c9d9d=!0x1),_0x4fbccf[_0x478e21]['item']['startIndex']<_0x598a9b&&(_0x2a174c=_0x478e21),_0x4fbccf[_0x478e21]['item']['endIndex']>=_0x29ba86){_0x54ec3b=_0x478e21;break;}_0x4c9d9d&&(_0x2a174c=_0x29ba86-0x1);for(let _0x1ed8b8=_0x598a9b;_0x1ed8b8<_0x29ba86;_0x1ed8b8++)_0x4fbccf[_0x1ed8b8]['side']=_0x1ed8b8<=_0x2a174c?-0x1:_0x1ed8b8<_0x54ec3b?0x0:0x1,_0x4fbccf[_0x1ed8b8]['index']=_0x1ed8b8;let _0xe5425b=0x0;for(let _0x21d7ee=_0x598a9b;_0x21d7ee<=_0x2a174c;_0x21d7ee++)0x0==_0x4fbccf[_0x21d7ee]['distance']?_0x4fbccf[_0x21d7ee]['level']=_0xe5425b:(_0xe5425b++,_0x4fbccf[_0x21d7ee]['level']=_0xe5425b,_0xe5425b++);for(let _0x33aa0c=_0x598a9b;_0x33aa0c<_0x29ba86;_0x33aa0c++)0x0==_0x4fbccf[_0x33aa0c]['side']&&(_0x4fbccf[_0x33aa0c]['level']=_0xe5425b);_0xe5425b=0x0;for(let _0x26beb0=_0x29ba86-0x1;_0x26beb0>=_0x54ec3b;_0x26beb0--)0x0==_0x4fbccf[_0x26beb0]['distance']?_0x4fbccf[_0x26beb0]['level']=_0xe5425b:(_0xe5425b--,_0x4fbccf[_0x26beb0]['level']=_0xe5425b,_0xe5425b--);}}['_fixObsoleteTags'](_0x2ac173){const _0x298ee7=new Map(),_0x311846=this['editor']['model']['schema'];for(let _0x160e84=0x1;_0x160e84<_0x2ac173['length'];_0x160e84++){let _0x43c05f,_0x4b2e4e,_0x298b28;const _0x38bdd7=_0x2ac173[_0x160e84],_0x51abd4=_0x2ac173[_0x160e84-0x1];if('text'==_0x38bdd7['type'])continue;if(_0x38bdd7['type']!=_0x51abd4['type'])continue;if(!_0x311846['isBlock'](_0x51abd4['item'])||_0x311846['isLimit'](_0x51abd4['item']))continue;if(!_0x311846['isBlock'](_0x38bdd7['item'])||_0x311846['isLimit'](_0x38bdd7['item']))continue;if((_0x2ac173[_0x160e84]['isAdded']||_0x2ac173[_0x160e84]['isAddSuggestion'])&&_0x2ac173[_0x160e84-0x1]['isRemoved'])_0x43c05f=_0x2ac173[_0x160e84],_0x4b2e4e=_0x2ac173[_0x160e84-0x1],_0x298b28=_0x160e84-0x1;else{if(!_0x2ac173[_0x160e84]['isRemoved']||!_0x2ac173[_0x160e84-0x1]['isAdded']&&!_0x2ac173[_0x160e84-0x1]['isAddSuggestion'])continue;_0x43c05f=_0x2ac173[_0x160e84-0x1],_0x4b2e4e=_0x2ac173[_0x160e84],_0x298b28=_0x160e84;}const _0x2fcd46=_0x43c05f['level']==_0x4b2e4e['level'],_0x30af19=Math['abs'](_0x43c05f['level'])<Math['abs'](_0x4b2e4e['level'])&&0x0==_0x4b2e4e['distance'];(_0x2fcd46||_0x30af19)&&(_0x298ee7['set'](_0x4b2e4e['id'],_0x43c05f['id']),_0x2ac173['splice'](_0x298b28,0x1),_0x160e84--,_0x43c05f['isAdded']=!0x1);}for(let _0x5cf1fe=0x0;_0x5cf1fe<_0x2ac173['length'];_0x5cf1fe++)_0x298ee7['has'](_0x2ac173[_0x5cf1fe]['pairId'])&&(_0x2ac173[_0x5cf1fe]['pairId']=_0x298ee7['get'](_0x2ac173[_0x5cf1fe]['pairId']));}['_removeMissingPairs'](_0x15ffd8){const _0x4254d3=new Set(_0x15ffd8['map'](_0x416322=>_0x416322['id']));for(let _0x2550db=0x0;_0x2550db<_0x15ffd8['length'];_0x2550db++)_0x4254d3['has'](_0x15ffd8[_0x2550db]['pairId'])||0x0==_0x15ffd8[_0x2550db]['distance']||(_0x15ffd8[_0x2550db]['isIncorrect']=!0x0);return _0x15ffd8['filter'](_0x241847=>!_0x241847['isIncorrect']);}['_markMismatchedRemovedTags'](_0x10d59c){const _0x192c0c=new Set();for(let _0x38a671=0x0;_0x38a671<_0x10d59c['length'];_0x38a671++){if(_0x192c0c['has'](_0x10d59c[_0x38a671]['id'])&&_0x10d59c[_0x38a671]['isRemoved']&&(_0x10d59c[_0x38a671]['isIncorrect']=!0x0),_0x10d59c[_0x38a671]['isIncorrect'])continue;if(0x0==_0x10d59c[_0x38a671]['distance'])continue;if('elementStart'!=_0x10d59c[_0x38a671]['type'])continue;if(null==_0x10d59c[_0x38a671]['pairId'])continue;let _0x490b4d=_0x38a671+0x1,_0x1cf5e6=0x0;for(;_0x10d59c[_0x490b4d]['id']!=_0x10d59c[_0x38a671]['pairId'];)'elementStart'==_0x10d59c[_0x490b4d]['type']?_0x1cf5e6++:'elementEnd'==_0x10d59c[_0x490b4d]['type']&&_0x1cf5e6--,_0x490b4d++;if(0x0!=_0x1cf5e6){if(_0x10d59c[_0x38a671]['isRemoved'])_0x10d59c[_0x38a671]['isIncorrect']=!0x0;else{for(;_0x490b4d!=_0x38a671;)_0x10d59c[_0x490b4d]['isRemoved']&&0x0!=_0x10d59c[_0x490b4d]['distance']&&(_0x10d59c[_0x490b4d]['isIncorrect']=!0x0,_0x192c0c['add'](_0x10d59c[_0x490b4d]['pairId'])),_0x490b4d--;}}}return _0x10d59c['filter'](_0x2d5893=>!_0x2d5893['isIncorrect']);}['_removeUnsupportedChanges'](_0x44355f){const _0x3a8dd2=this['editor']['model']['schema'];for(let _0x5281e1=0x0;_0x5281e1<_0x44355f['length'];_0x5281e1++){if(!(_0x44355f[_0x5281e1]['isAdded']||_0x44355f[_0x5281e1]['isAddSuggestion']||_0x44355f[_0x5281e1]['isRemoved']||_0x44355f[_0x5281e1]['isRemoveSuggestion']))continue;if(0x0==_0x44355f[_0x5281e1]['distance'])continue;const _0x497652=_0x44355f[_0x5281e1]['item'];_0x3a8dd2['isBlock'](_0x497652)||_0x3a8dd2['isLimit'](_0x497652)||(_0x44355f[_0x5281e1]['isAdded']&&delete _0x44355f[_0x5281e1]['isAdded'],_0x44355f[_0x5281e1]['isAddSuggestion']&&delete _0x44355f[_0x5281e1]['isAddSuggestion'],_0x44355f[_0x5281e1]['isRemoveSuggestion']&&delete _0x44355f[_0x5281e1]['isRemoveSuggestion'],_0x44355f[_0x5281e1]['isRemoved']&&(_0x44355f[_0x5281e1]['isIncorrect']=!0x0));}return _0x44355f['filter'](_0x1d5983=>!_0x1d5983['isIncorrect']);}['_makeModelFromTape'](_0x4e61d6,_0x2db06e,_0x17bcba){const _0x1c59bd=new gt(),_0x1a2980=[],_0xa46a23=new Map(),_0x286a5f=this['editor']['model'],_0x4be0ac=_0x286a5f['schema'],_0x4499a9=[_0x1c59bd],_0x5f42fb={},_0x1b1af5={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x32bed6=null;const _0x5d303c=[0x0];for(let _0x556e71=0x0;_0x556e71<_0x4e61d6['length'];_0x556e71++)if('elementStart'===_0x4e61d6[_0x556e71]['type']){_0x4e61d6[_0x556e71]['previousPosition']=_0x286a5f['createPositionFromPath'](_0x1c59bd,_0x5d303c);const _0x23b8ee=new ut(_0x4e61d6[_0x556e71]['item']['name'],_0x4e61d6[_0x556e71]['item']['getAttributes']());_0x4499a9[0x0]['_appendChild'](_0x23b8ee),_0x5d303c['push'](0x0),_0x4499a9['unshift'](_0x23b8ee),_0x4e61d6[_0x556e71]['nextPosition']=_0x286a5f['createPositionFromPath'](_0x1c59bd,_0x5d303c);}else'elementEnd'===_0x4e61d6[_0x556e71]['type']?(_0x4499a9['shift'](),_0x4e61d6[_0x556e71]['previousPosition']=_0x286a5f['createPositionFromPath'](_0x1c59bd,_0x5d303c),_0x5d303c['pop'](),_0x5d303c[_0x5d303c['length']-0x1]++,_0x4e61d6[_0x556e71]['nextPosition']=_0x286a5f['createPositionFromPath'](_0x1c59bd,_0x5d303c)):(_0x4e61d6[_0x556e71]['previousPosition']=_0x286a5f['createPositionFromPath'](_0x1c59bd,_0x5d303c),_0x32bed6?_0x32bed6['_data']+=_0x4e61d6[_0x556e71]['item']['data']:_0x32bed6=new mt(_0x4e61d6[_0x556e71]['item']['data'],_0x4e61d6[_0x556e71]['item']['getAttributes']()),_0x4e61d6[_0x556e71+0x1]&&'text'===_0x4e61d6[_0x556e71+0x1]['type']&&_0x2d6e70(_0x32bed6,_0x4e61d6[_0x556e71+0x1]['item'])||(_0x4499a9[0x0]['_appendChild'](_0x32bed6),_0x32bed6=null),_0x5d303c[_0x5d303c['length']-0x1]+=_0x4e61d6[_0x556e71]['item']['offsetSize'],_0x4e61d6[_0x556e71]['nextPosition']=_0x286a5f['createPositionFromPath'](_0x1c59bd,_0x5d303c));for(let _0x381461=0x0;_0x381461<_0x4e61d6['length'];_0x381461++){const _0x35e262=_0x4e61d6[_0x381461]['previousPosition'],_0x47ec51=_0x4e61d6[_0x381461]['nextPosition'];for(const _0x2300c1 of _0x4e61d6[_0x381461]['markersStart'])_0xa46a23['set'](_0x2300c1,{'start':_0x35e262,'end':null});_0x31b6a2('isRemoveSuggestion',_0x381461,_0x35e262,_0x47ec51),_0x31b6a2('isAddSuggestion',_0x381461,_0x35e262,_0x47ec51),_0x31b6a2('isRemoved',_0x381461,_0x35e262,_0x47ec51),_0x31b6a2('isAdded',_0x381461,_0x35e262,_0x47ec51);for(const _0x3ec025 of _0x4e61d6[_0x381461]['markersEnd']){const _0x11233e=_0xa46a23['get'](_0x3ec025);_0x11233e?_0x11233e['end']=_0x47ec51:_0xa46a23['set'](_0x3ec025,{'start':_0x47ec51,'end':_0x47ec51});}}for(const [_0x4eae29,_0x709a72]of _0xa46a23){const _0x407abb=this['editor']['model']['createRange'](_0x709a72['start'],_0x709a72['end']);_0x1c59bd['markers']['set'](_0x4eae29,_0x407abb);}return _0x1a2980['sort']((_0x256139,_0x425678)=>{const _0x1dd3e3=_0x1c59bd['markers']['get']('revision:'+_0x256139['id']),_0x5539cf=_0x1c59bd['markers']['get']('revision:'+_0x425678['id']);return _0x1dd3e3['start']['isBefore'](_0x5539cf['start'])?-0x1:_0x1dd3e3['start']['isAfter'](_0x5539cf['start'])?0x1:_0x1dd3e3['end']['isBefore'](_0x5539cf['end'])?-0x1:_0x1dd3e3['end']['isAfter'](_0x5539cf['end'])?0x1:'add'===_0x256139['type']?-0x1:0x1;}),{'root':_0x1c59bd,'changes':_0x1a2980};function _0x31b6a2(_0x3bb3f0,_0x4389b3,_0x5a57c8,_0xed5bd0){const _0x305208=!!_0x4e61d6[_0x4389b3][_0x3bb3f0],_0x76db3e=_0x305208?_0x4e61d6[_0x4389b3][_0x3bb3f0]['userId']:null,_0x215b6b=_0x4389b3===_0x4e61d6['length']-0x1,_0x27f38f=_0x1b1af5[_0x3bb3f0][0x0],_0x48a380=_0x4be0ac['isObject'](_0x4e61d6[_0x4389b3]['item']);!_0x5f42fb[_0x3bb3f0]&&_0x305208?_0x5f42fb[_0x3bb3f0]={'start':_0x5a57c8,'tapeItem':_0x4e61d6[_0x4389b3],'userId':_0x76db3e,'type':_0x3bb3f0}:_0x5f42fb[_0x3bb3f0]&&!_0x305208?(_0x5f42fb[_0x3bb3f0]['end']=_0x5a57c8,_0x56fdb2(_0x5f42fb[_0x3bb3f0]),_0x5f42fb[_0x3bb3f0]=null):_0x5f42fb[_0x3bb3f0]&&_0x305208&&_0x5f42fb[_0x3bb3f0]['userId']!==_0x76db3e&&(_0x5f42fb[_0x3bb3f0]['end']=_0x5a57c8,_0x27f38f&&_0x27f38f['userId']===_0x5f42fb[_0x3bb3f0]['userId']||_0x56fdb2(_0x5f42fb[_0x3bb3f0]),_0x5f42fb[_0x3bb3f0]={'start':_0x5a57c8,'tapeItem':_0x4e61d6[_0x4389b3],'userId':_0x76db3e,'type':_0x3bb3f0}),_0x5f42fb[_0x3bb3f0]&&_0x48a380&&('elementStart'!==_0x4e61d6[_0x4389b3]['type']||_0x27f38f&&_0x27f38f['userId']===_0x76db3e||_0x1b1af5[_0x3bb3f0]['unshift']({'userId':_0x76db3e,'object':_0x4e61d6[_0x4389b3]['item'],'change':_0x5f42fb[_0x3bb3f0]}),'elementEnd'===_0x4e61d6[_0x4389b3]['type']&&_0x27f38f&&_0x27f38f['object']===_0x4e61d6[_0x4389b3]['item']&&(_0x1b1af5[_0x3bb3f0]['shift'](),_0x5f42fb[_0x3bb3f0]=_0x27f38f['change'])),_0x5f42fb[_0x3bb3f0]&&_0x215b6b&&(_0x5f42fb[_0x3bb3f0]['end']=_0xed5bd0,_0x56fdb2(_0x5f42fb[_0x3bb3f0]),_0x5f42fb[_0x3bb3f0]=null);}function _0x56fdb2({start:_0x4cb20b,end:_0x101b47,tapeItem:_0x2a2f2b,userId:_0x1e5095,type:_0x1853ac}){const _0x3cbb98=_0x2a2f2b['item'],_0x20924f=_0x286a5f['schema']['isBlock'](_0x3cbb98)&&!_0x286a5f['schema']['isLimit'](_0x3cbb98),_0x465b82=_0x4cb20b['nodeAfter']==_0x101b47['parent']&&_0x101b47['isAtStart'];if(_0x20924f&&_0x465b82)return;const _0x452e4c=_0x286a5f['createRange'](_0x4cb20b,_0x101b47),_0x305fcf=_0x2db06e['get'](_0x1e5095),_0x2ab1db=new r({'author':_0x305fcf,'type':'isAdded'==_0x1853ac||'isAddSuggestion'==_0x1853ac?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1853ac||'isRemoveSuggestion'==_0x1853ac},'createdAt':new Date(),'rootName':_0x17bcba});_0x1a2980['push'](_0x2ab1db),_0x1c59bd['markers']['set']('revision:'+_0x2ab1db['id'],_0x452e4c);}function _0x2d6e70(_0x3235b9,_0x1ac943){const _0x4ce321=_0x3235b9['getAttributes'](),_0x269998=_0x1ac943['getAttributes']();for(const _0x2840b3 of _0x4ce321){if(_0x2840b3[0x1]!==_0x1ac943['getAttribute'](_0x2840b3[0x0]))return!0x1;_0x269998['next']();}return _0x269998['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x545abf=>{const _0x3ce995=_0x545abf['markerName']['split'](':')[0x1],_0x4b22ae=this['_getChangeFromId'](_0x3ce995);if(!_0x4b22ae)return null;const _0xe9dbcd='add'==_0x4b22ae['type']?'insertion':'deletion',_0x1157a1=['ck-suggestion-marker','ck-suggestion-marker-'+_0xe9dbcd];return _0x4b22ae['data']['isSuggestion']&&_0x1157a1['push']('ck-suggestion-marker-'+_0xe9dbcd+'-new'),this['activeChange']==_0x4b22ae&&_0x1157a1['push']('ck-suggestion-marker--active'),{'classes':_0x1157a1,'attributes':{'data-change-id':_0x3ce995}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1756da=>{_0x1756da['on']('element:pre',(_0x4028c1,_0x28789f,_0x35e69a)=>{const _0x4c9046=_0x28789f['viewItem']['getChild'](0x0);if(!_0x4c9046||!_0x4c9046['is']('element','code'))return;if(!_0x35e69a['consumable']['consume'](_0x4c9046,{'attributes':['vid_start','vid_end']}))return;const _0x1adc65=_0x28789f['modelRange']['start']['nodeAfter'];_0x35e69a['writer']['setAttribute']('vid_start',_0x4c9046['getAttribute']('vid_start'),_0x1adc65),_0x35e69a['writer']['setAttribute']('vid_end',_0x4c9046['getAttribute']('vid_end'),_0x1adc65);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x51e3d8=>{_0x51e3d8['on']('element',(_0x2b4502,_0x21cf4a,_0x4850ed)=>{if(!_0x4850ed['consumable']['consume'](_0x21cf4a['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x21cf4a['modelRange']['isCollapsed'])return;const _0x4c02d8=_0x21cf4a['modelRange']['start']['nodeAfter'];_0x4c02d8['hasAttribute']('vid_start')||_0x4c02d8['hasAttribute']('vid')||(_0x4850ed['writer']['setAttribute']('vid_start',_0x21cf4a['viewItem']['getAttribute']('vid_start'),_0x4c02d8),_0x4850ed['writer']['setAttribute']('vid_end',_0x21cf4a['viewItem']['getAttribute']('vid_end'),_0x4c02d8));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x17caa2=>_0x17caa2['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3691c2,[,_0x11e3cd])=>{['vid_start','vid_end','vid']['includes'](_0x11e3cd)&&(_0x3691c2['return']=!0x0,_0x3691c2['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x46f58f=>{_0x46f58f['on']('attribute:vid',(_0x47d3fb,_0x3d8376,_0x3f0ac5)=>{if('\x20'!=_0x3d8376['item']['data']||_0x3d8376['item']['parent']['maxOffset']>0x1)return;if(!_0x3f0ac5['consumable']['consume'](_0x3d8376['item'],_0x47d3fb['name']))return;const _0x42abd9=_0x3f0ac5['writer'],_0x5d1a9c=_0x3f0ac5['mapper']['toViewRange'](_0x3d8376['range']);_0x42abd9['wrap'](_0x5d1a9c,_0x42abd9['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4245cf){const _0x23d3dc=_0x4245cf['plugins']['get']('RevisionViewer');return(_0x2e0f86,_0x422c54,_0x200d17)=>{const _0x33e989=_0x422c54['markerName']['split'](':')[0x1],_0xdc4c43=_0x23d3dc['_getChangeFromId'](_0x33e989);if(!_0xdc4c43)return null;const _0x22474e='add'==_0xdc4c43['type']?'split':'merge';if(!_0x200d17['consumable']['test'](_0x422c54['markerRange'],_0x2e0f86['name']))return;const _0xdf26da=_0x422c54['markerRange']['getWalker'](),_0x187ceb=_0x422c54['markerRange']['start'],_0x28ed53=_0x4245cf['model']['schema'];let _0x1bcb61=null,_0x1f9757=null,_0x33eea2=!0x1,_0xeb5ac6=!0x1;for(const _0x47603f of _0xdf26da){const _0x379115=_0x47603f['item'];_0x33eea2=_0x33eea2||_0x28ed53['isContent'](_0x379115);const _0x316f53=_0x200d17['mapper']['toViewElement'](_0x379115);if(_0x316f53&&_0x316f53['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x47603f['type']&&(_0x28ed53['isBlock'](_0x379115)&&!_0x28ed53['isLimit'](_0x379115)&&(_0x379115['nextSibling']||_0x187ceb['isAtEnd']?_0x1bcb61&&_0x1bcb61['parent']==_0x379115||(_0x1bcb61=_0x379115,_0x234958(_0x47603f['previousPosition']),_0xeb5ac6=!0x0):_0x1f9757=_0x1f9757||_0x47603f['previousPosition']));}function _0x234958(_0xb8325f){const _0x255294=_0x200d17['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x22474e}),_0x1e9cbd=_0x200d17['mapper']['toViewPosition'](_0xb8325f);_0xdc4c43['data']['isSuggestion']&&_0x200d17['writer']['addClass']('ck-suggestion-marker-'+_0x22474e+'-new',_0x255294),_0x23d3dc['activeChange']==_0xdc4c43&&_0x200d17['writer']['addClass']('ck-suggestion-marker--active',_0x255294),_0x200d17['writer']['insert'](_0x1e9cbd,_0x255294),_0x200d17['mapper']['bindElementToMarker'](_0x255294,_0x422c54['markerName']);}_0x33eea2||_0xeb5ac6||!_0x1f9757||_0x234958(_0x1f9757);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x5ee294,_0x2d2621,_0x1c6922)=>{const _0x445fde=_0x1c6922['mapper']['markerNameToElements'](_0x2d2621['markerName']);if(_0x445fde){for(const _0x54ae1e of _0x445fde)(_0x54ae1e['hasClass']('ck-suggestion-marker-split')||_0x54ae1e['hasClass']('ck-suggestion-marker-merge'))&&(_0x1c6922['mapper']['unbindElementFromMarkerName'](_0x54ae1e,_0x2d2621['markerName']),_0x1c6922['writer']['remove'](_0x54ae1e));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0xf6cd95,_0x403b62,_0x48ba22)=>{const _0x28b3cd=_0x403b62['markerName']['split'](':')[0x1],_0x5b5e56=this['_getChangeFromId'](_0x28b3cd);if(!_0x5b5e56)return null;const _0x42d56a='add'==_0x5b5e56['type']?'split':'merge';if(_0x48ba22['consumable']['test'](_0x403b62['markerRange'],_0xf6cd95['name']))for(const _0x2f098e of _0x403b62['markerRange']['getItems']()){if(!_0x2f098e['is']('element','softBreak'))continue;const _0x3f940b=_0x48ba22['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x42d56a}),_0x437231=_0x48ba22['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x2f098e));_0x5b5e56['data']['isSuggestion']&&_0x48ba22['writer']['addClass']('ck-suggestion-marker-'+_0x42d56a+'-new',_0x3f940b),this['activeChange']==_0x5b5e56&&_0x48ba22['writer']['addClass']('ck-suggestion-marker--active',_0x3f940b),_0x48ba22['writer']['insert'](_0x437231,_0x3f940b),_0x48ba22['mapper']['bindElementToMarker'](_0x3f940b,_0x403b62['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1ce418=>{for(const _0x17040d of this['editor']['model']['document']['getRootNames']()){const _0xf86f44=this['editor']['model']['document']['getRoot'](_0x17040d),_0x175e22=this['editor']['editing']['view']['document']['getRoot'](_0x17040d);if(_0x175e22){const _0xb9f89a=_0xf86f44['getAttribute']('revisionHistoryAttachChange');if(_0x1ce418['removeAttribute']('data-change-id',_0x175e22),_0x1ce418['removeClass']('ck-revision-history-root-add',_0x175e22),_0x1ce418['removeClass']('ck-revision-history-root-remove',_0x175e22),_0x1ce418['removeClass']('ck-revision-history-root--active',_0x175e22),_0xb9f89a){const _0x4792df=this['_getChangeFromId'](_0xb9f89a);if(!_0x4792df)return null;_0x1ce418['setAttribute']('data-change-id',_0xb9f89a,_0x175e22),_0x1ce418['addClass']('ck-revision-history-root-'+_0x4792df['type'],_0x175e22),this['activeChange']==_0x4792df&&_0x1ce418['addClass']('ck-revision-history-root--active',_0x175e22);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x488318=>'revision-comment:'+_0x488318,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3d87e6=>'revision-suggestion:'+_0x3d87e6,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0xf7b3bf=>({'name':'suggestion:'+_0xf7b3bf,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3fef33=>{const _0x342151=_0x3fef33['markerName']['split'](':')[0x1];return'insertion'!=_0x342151&&'deletion'!=_0x342151?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x342151]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x29641c,_0x3e41b0,_0x54a492)=>{const _0x89a5f8=_0x54a492['mapper']['markerNameToElements'](_0x3e41b0['markerName']);if(_0x89a5f8){for(const _0x1b49b4 of _0x89a5f8)_0x1b49b4['is']('uiElement')&&(_0x54a492['mapper']['unbindElementFromMarkerName'](_0x1b49b4,_0x3e41b0['markerName']),_0x54a492['writer']['remove'](_0x1b49b4));}},{'priority':'high'});}['_getChangeFromId'](_0x53dc71){return this['_changeIdToChange']['get'](_0x53dc71);}['_getViewForChange'](_0x125803){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x125803),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x45acb5,_0x45ee8b,_0x420669,_0x101b39)=>{_0x101b39&&this['_balloon']['remove'](_0x101b39),_0x420669&&(this['_balloon']['add']({'view':_0x420669,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x398bde=this['editor']['editing'],_0x5e3676=this['_getChangeFromId'](_0x420669['changeId']);let _0x392607;if(_0x5e3676['data']['isOnRoot']){const _0x59eb01=_0x398bde['view']['getDomRoot'](_0x5e3676['rootName']);_0x392607=Array['from'](_0x59eb01['getClientRects']());}else{const _0x334f55=this['editor']['model']['markers']['get']('revision:'+_0x420669['changeId']);_0x392607=Array['from'](_0x398bde['mapper']['markerNameToElements'](_0x334f55['name']))['map'](_0x1a0e8c=>_0x398bde['view']['domConverter']['mapViewToDom'](_0x1a0e8c))['map'](_0x21f1c7=>Array['from'](_0x21f1c7['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x392607[0x0];return _0x392607['find'](_0x110cc2=>_0x110cc2['top']-0x3<=this['_activeViewTarget']['y']&&_0x110cc2['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x110cc2['left']-0x3<=this['_activeViewTarget']['x']&&_0x110cc2['right']+0x3>=this['_activeViewTarget']['x'])||_0x392607[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x255da3,_0x8f7a9c,_0x361748,_0x1fd319)=>{this['activeView']=_0x361748?this['_getViewForChange'](_0x361748):null,this['editor']['model']['change'](()=>{const _0x4f2b11=this['editor']['editing'];_0x1fd319&&(_0x1fd319['data']['isOnRoot']?_0x4f2b11['view']['change'](_0x33e440=>{_0x33e440['removeClass']('ck-revision-history-root--active',_0x4f2b11['view']['document']['getRoot'](_0x1fd319['rootName']));}):_0x4f2b11['reconvertMarker']('revision:'+_0x1fd319['id'])),_0x361748&&(_0x361748['data']['isOnRoot']?_0x4f2b11['view']['change'](_0x46648e=>{_0x46648e['addClass']('ck-revision-history-root--active',_0x4f2b11['view']['document']['getRoot'](_0x361748['rootName']));}):_0x4f2b11['reconvertMarker']('revision:'+_0x361748['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x172c60,_0x5cb66b)=>{if(this['activeChange'])return;const _0xa66b0c=this['_findChangeIdFromDomTarget'](_0x5cb66b['target']),_0x1f554e=this['_changeIdToChange']['get'](_0xa66b0c);_0x1f554e?(this['_activeViewTarget']={'x':_0x5cb66b['domEvent']['x'],'y':_0x5cb66b['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1f554e)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x48101c,_0x5b8e67)=>{const _0x57dc40=this['_findChangeIdFromDomTarget'](_0x5b8e67['target']),_0x1f6fb8=this['_changeIdToChange']['get'](_0x57dc40);_0x1f6fb8?(this['_activeViewTarget']={'x':_0x5b8e67['domEvent']['x'],'y':_0x5b8e67['domEvent']['y']},_0x1f6fb8===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1f6fb8):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5ed0d8){do{const _0x11b604=_0x5ed0d8['getAttribute']('data-change-id');if(_0x11b604)return _0x11b604;_0x5ed0d8=_0x5ed0d8['parent'];}while(_0x5ed0d8);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x2cf9a0=>{for(const _0x2f3ff1 of this['editor']['model']['markers'])_0x2cf9a0['removeMarker'](_0x2f3ff1);});}}function X(_0x3d76ec,_0x290273){return(_0x43a567,_0x5c72fb,_0xadd99f)=>{if(!_0xadd99f['consumable']['test'](_0x5c72fb['markerRange'],_0x43a567['name']))return;const _0x34fd43=_0x5c72fb['markerRange']['getWalker'](),_0x2c9b53=_0x5c72fb['markerRange']['start'],_0xbaf8fb=_0x3d76ec['model']['schema'];let _0x583d9c=null,_0x44b9f4=null,_0x55ca37=!0x1,_0x133fea=!0x1;for(const _0x3114a6 of _0x34fd43){const _0x5090c2=_0x3114a6['item'];_0x55ca37=_0x55ca37||_0xbaf8fb['isContent'](_0x5090c2);const _0x34b94c=_0xadd99f['mapper']['toViewElement'](_0x5090c2);if(_0x34b94c&&_0x34b94c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3114a6['type']&&(_0xbaf8fb['isBlock'](_0x5090c2)&&!_0xbaf8fb['isLimit'](_0x5090c2)&&(_0x5090c2['nextSibling']||_0x2c9b53['isAtEnd']?_0x583d9c&&_0x583d9c['parent']==_0x5090c2||(_0x583d9c=_0x5090c2,_0x2c604c(_0x3114a6['previousPosition']),_0x133fea=!0x0):_0x44b9f4=_0x44b9f4||_0x3114a6['previousPosition']));}function _0x2c604c(_0x210f20){const _0x1e8f31=_0xadd99f['mapper']['toViewPosition'](_0x210f20),_0x44c5d6=_0xadd99f['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x290273});_0xadd99f['writer']['insert'](_0x1e8f31,_0x44c5d6),_0xadd99f['mapper']['bindElementToMarker'](_0x44c5d6,_0x5c72fb['markerName']);}_0x55ca37||_0x133fea||!_0x44b9f4||_0x2c604c(_0x44b9f4);};}class wt extends _0xf25a1a{constructor(_0x69b6eb){super(_0x69b6eb);const _0x4d7995=_0x69b6eb['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x4d7995,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4d7995,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x563dc6=this['editor'],_0x2d3f52=_0x563dc6['plugins']['get'](m),_0x1abb28=_0x2d3f52['isReady']?_0x2d3f52['diff']['newRevisionId']:null;_0x563dc6['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1abb28);}['refresh'](){const {isReady:_0x159dd7,isEnabled:_0x4a2f0c,repository:_0x5eda8a,diff:_0x253b0e}=this['editor']['plugins']['get'](m),_0x59cb72=_0x253b0e&&_0x5eda8a['getLaterVisibleRevision'](_0x253b0e['newRevisionId']);this['isEnabled']=_0x159dd7&&_0x4a2f0c&&Boolean(_0x59cb72);}}class pt extends _0xf25a1a{['_step'];constructor(_0x184e42,{direction:_0x41fdbb}){super(_0x184e42);const _0x365a6d=_0x184e42['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x41fdbb?0x1:-0x1,this['listenTo'](_0x365a6d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x365a6d,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x365a6d,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2143c6=this['editor'],_0x54d536=_0x2143c6['plugins']['get'](m),{isNavigationMode:_0x57d973,currentChangeNumber:_0xebbe76}=_0x54d536;let _0x239d41;if(_0x54d536['activeChange']=_0x57d973?_0x54d536['diff']['changes']['get'](_0xebbe76+this['_step']):_0x54d536['diff']['changes']['first'],_0x54d536['activeChange']['data']['isOnRoot'])_0x239d41=_0x2143c6['editing']['view']['getDomRoot'](_0x54d536['activeChange']['rootName']);else{const _0x5e2de8=_0x2143c6['model']['markers']['get']('revision:'+_0x54d536['activeChange']['id']);_0x239d41=_0x15a1f8(_0x2143c6['editing'],_0x5e2de8);}_0x4ce4c0({'target':_0x239d41,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4ab41a,currentChangeNumber:_0x10edf7,numberOfChanges:_0xc223c,isReady:_0x16c13e,isEnabled:_0x2a88fd}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x2a88fd&&_0x16c13e&&_0xc223c)&&(!_0x4ab41a||(0x1===this['_step']?_0x10edf7<_0xc223c-0x1:_0x10edf7>0x0));}}class _i extends _0x5e71d5{constructor(_0x3047e7){super(_0x3047e7);const _0x251f61=this['bindTemplate'],_0x37a95a=new _0x4391bf(_0x3047e7),_0x20704d=new _0x4391bf(_0x3047e7);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',(_0xd565f4,_0x5c190a)=>_0xd565f4&&_0x5c190a>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4cc81d,_0x288581,_0x1c7dec,_0x4d682d)=>{if(!_0x4cc81d)return g(_0x3047e7,'Loading...');if(!_0x1c7dec)return g(_0x3047e7,'No\x20changes');const _0x597e11=g(_0x3047e7,'NUMBER_OF_CHANGES',_0x1c7dec);return _0x4d682d?g(_0x3047e7,'X_OF_Y_CHANGES',[_0x288581+0x1,_0x1c7dec]):_0x597e11;}),_0x37a95a['set']({'label':g(_0x3047e7,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x503250}),_0x20704d['set']({'label':g(_0x3047e7,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5047e5}),_0x37a95a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x20704d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x37a95a['on']('execute',()=>this['fire']('execute','backward')),_0x20704d['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',_0x251f61['if']('_isStatusLabelVisible','ck-hidden',_0x2b9ea8=>!_0x2b9ea8)]},'children':[{'text':_0x251f61['to']('isNavigationMode',_0x4747bc=>_0x4747bc?g(_0x3047e7,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x3047e7,'Total')+':\x20')}]},{'text':_0x251f61['to']('_statusText')}]},new _0xcf7e6e(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x37a95a,_0x20704d]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x1129e8{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x89341a=this['editor']['editing']['view'];_0x89341a['change'](_0x361e09=>{for(const _0x550ba7 of _0x89341a['document']['roots'])_0x361e09['addClass'](ce,_0x550ba7);});}['hide'](){const _0x39f98e=this['editor']['editing']['view'];_0x39f98e['change'](_0x5a0bc6=>{for(const _0x63f8fc of _0x39f98e['document']['roots'])_0x5a0bc6['removeClass'](ce,_0x63f8fc);});}}class R extends _0x1129e8{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x1a04e1=this['editor'],_0x3f14ee=_0x1a04e1['plugins']['get'](m),_0x173937=_0x1a04e1['plugins']['get'](le);_0x1a04e1['ui']['componentFactory']['add']('exitToEditing',_0xc7db55=>{const _0x3b8070=new _0x4391bf(_0xc7db55);return _0x3b8070['set']({'label':g(_0xc7db55,'Back\x20to\x20editing'),'icon':_0x2d942,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3b8070,'execute',()=>{_0x1a04e1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3b8070;}),_0x1a04e1['ui']['componentFactory']['add']('restoreRevision',_0x4a8fce=>{const _0x13a25a=new _0x4391bf(_0x4a8fce);return _0x13a25a['set']({'label':g(_0x4a8fce,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x13a25a['bind']('isEnabled')['to'](_0x1a04e1['commands']['get']('restoreRevision')),this['listenTo'](_0x13a25a,'execute',()=>_0x1a04e1['execute']('restoreRevision')),_0x13a25a;}),_0x1a04e1['ui']['componentFactory']['add']('changesNavigation',_0x16b28e=>{const _0x54dfaa=new _i(_0x16b28e),_0x400c58=_0x1a04e1['commands']['get']('showPreviousChange'),_0x37a4aa=_0x1a04e1['commands']['get']('showNextChange');return _0x54dfaa['bind']('isBackwardNavigationEnabled')['to'](_0x400c58,'isEnabled'),_0x54dfaa['bind']('isForwardNavigationEnabled')['to'](_0x37a4aa,'isEnabled'),_0x54dfaa['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3f14ee),this['listenTo'](_0x54dfaa,'execute',(_0x5125b2,_0x5984fa)=>{_0x1a04e1['execute']('forward'===_0x5984fa?'showNextChange':'showPreviousChange');}),_0x54dfaa;}),_0x173937['show'](),_0x3f14ee['on']('change:isReady',(_0x369444,_0x104cd9,_0x55ddd1)=>{_0x55ddd1?_0x173937['hide']():_0x173937['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x4dbc8b,_0x750172){super(_0x4dbc8b,_0x750172);const _0x316df5=this['bindTemplate'];this['set']({'label':g(_0x4dbc8b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x4dbc8b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x316df5['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 _0x14d782=this['fieldView']['element'];this['_tooltipString']=_0x14d782['scrollWidth']>_0x14d782['clientWidth']&&_0x14d782['value']||'';}}class oi extends _0x5e71d5{constructor(_0x45afff,_0x4fbe8e,_0x4dc658){super(_0x45afff);const _0xcbca78=new _0x3f7079();_0xcbca78['set']({'content':_0x538d40,'viewBox':'0\x200\x2011\x2010'});const _0x4f26cc=['ck','ck-revision-history-sidebar__revision-author'];_0x4dc658&&_0x4f26cc['push']('ck-revision-history-sidebar__revision-author_creator');const _0x24e9ba=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x45afff,_0x4dc658?'Revision\x20creator':'Revision\x20author')},'children':[_0xcbca78,_0x4fbe8e['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4f26cc},'children':_0x24e9ba});}}function ni(_0x2b1be4,_0x44cbec){const _0x4e433c=_0x2b1be4['bindTemplate'],_0x23b9b3=_0x2b1be4['locale'],_0x795559=_0x1d7232(_0x23b9b3);_0x795559['panelPosition']='sw';const _0x389760=function(_0x5e1ad0,_0x2ae829){const _0xd8dd14=function(_0x5b26d8,_0x485e00){const _0x17b9e2=_0x5b26d8['locale'],_0x474f22={'Compare\x20against\x20selected':g(_0x17b9e2,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x17b9e2,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x17b9e2,'Restore\x20this\x20revision')};return _0x485e00['map'](_0x1d8b37=>{const _0x413c4c=_0x474f22[_0x1d8b37['name']];return _0x413c4c&&_0x413c4c!==_0x1d8b37['name']&&(_0x1d8b37['name']=_0x413c4c),_0x1d8b37;});}(_0x5e1ad0,_0x2ae829),_0x41ef99=new _0x593c71();for(const _0x4f453e of _0xd8dd14){const _0xc4295={'type':'button','model':new to({'label':_0x4f453e['name'],'class':_0x4f453e['class'],'withText':!0x0,'role':'menuitem','_action':_0x4f453e['action']})};_0xc4295['model']['bind']('isEnabled')['to'](_0x5e1ad0,'isActionsDropdownOpen',_0xcaf71d=>'function'!=typeof _0x4f453e['isEnabled']||(!_0xcaf71d||_0x4f453e['isEnabled'](_0x5e1ad0))),_0x41ef99['add'](_0xc4295);}return _0x41ef99;}(_0x2b1be4,_0x44cbec);return _0x2b1be4['bind']('isActionsDropdownOpen')['to'](_0x795559,'isOpen'),_0x795559['buttonView']['set']({'label':g(_0x23b9b3,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x57f849}),_0x795559['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x4e433c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x4e433c['to'](_0x552281=>_0x552281['stopPropagation']())}}),_0x795559['on']('execute',_0x5abac2=>{_0x2b1be4['isReady']&&'function'==typeof _0x5abac2['source']['_action']&&_0x5abac2['source']['_action'](_0x2b1be4);}),_0x10eafb(_0x795559,_0x389760,{'role':'menu'}),_0x795559['listenTo'](_0x2b1be4,'change:isActionsDropdownOpen',(_0x1a9f80,_0x107876,_0x200609)=>{if(_0x200609)for(const _0x599777 of _0x795559['listView']['items']){const _0x1e2360=_0x599777['children']['first'],_0x569455=_0x44cbec['find'](_0x5d7028=>_0x5d7028['action']===_0x1e2360['_action'])['isVisible'];_0x599777['isVisible']=void 0x0===_0x569455||_0x569455(_0x2b1be4);}}),_0x795559;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x14d47a(_0x5e71d5){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0xe11167,_0x288c89,_0x2e19cf,_0xea8d5d){super(_0xe11167);const _0x3f7123=this['bindTemplate'],_0x19cd53=function(_0x2df3c2,_0x46324f){const _0x2265b1=Array['from'](_0x46324f['authors'])['filter'](_0x44a4fc=>_0x44a4fc!=_0x46324f['creator']);return _0x46324f['creator']&&_0x2265b1['unshift'](_0x46324f['creator']),_0x2265b1['map'](_0x2f9943=>new oi(_0x2df3c2,_0x2f9943,_0x2f9943==_0x46324f['creator']));}(_0xe11167,_0x288c89);this['id']=_0x288c89['id'],this['_revision']=_0x288c89,this['_requireRevisionName']=_0xea8d5d,this['bind']('name','createdAt')['to'](_0x288c89),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1c4005=>{return _0x591a53=_0xe11167['uiLanguage'],(_0x527492=_0x1c4005)['toLocaleDateString'](_0x591a53,{'month':'long','day':'numeric'})+',\x20'+_0x527492['toLocaleTimeString'](_0x591a53,{'hour':'numeric','minute':'numeric'});var _0x591a53,_0x527492;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new lt(_0xe11167,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0xaddde0=>_0xaddde0||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x49e2e5,_0xee09ba)=>_0x49e2e5&&_0xee09ba),this['revisionActionsView']=_0x2e19cf&&_0x2e19cf['length']?ni(this,_0x2e19cf):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x3f7123['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x3f7123['if']('isEnabled','ck-disabled',_0x3982ff=>!_0x3982ff),_0x3f7123['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x3f7123['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x3f7123['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':_0x3f7123['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':_0x19cd53}]},this['revisionActionsView']],'on':{'click':_0x3f7123['to'](_0x2af0e7=>{_0x2af0e7['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4e8cd4=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4e8cd4,'change',()=>{this['_requireRevisionName']&&!_0x4e8cd4['value']||this['fire']('setName',{'id':this['id'],'name':_0x4e8cd4['value']}),_0x4e8cd4['value']||(_0x4e8cd4['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function vi(_0x565384,_0x1376b1){const _0x91003a=_0x389c1a['fromJSDate'](_0x565384)['setLocale'](_0x1376b1),_0x540ec8=_0x389c1a['local'](),_0x344956=_0x540ec8['minus']({'days':0x1})['startOf']('day');let _0x2c0ebe,_0x365059;return _0x91003a['hasSame'](_0x540ec8,'day')?(_0x2c0ebe=_0x91003a['startOf']('day')['toJSDate'](),_0x365059=_0x91003a['toRelativeCalendar']()):_0x91003a['hasSame'](_0x344956,'day')?(_0x2c0ebe=_0x344956['toJSDate'](),_0x365059=_0x91003a['toRelativeCalendar']()):_0x91003a['hasSame'](_0x540ec8,'week')?(_0x2c0ebe=_0x91003a['startOf']('week')['toJSDate'](),_0x365059=_0x91003a['weekdayLong']||''):_0x91003a['hasSame'](_0x540ec8,'year')?(_0x2c0ebe=_0x91003a['startOf']('month')['toJSDate'](),_0x365059=_0x91003a['monthLong']||''):(_0x2c0ebe=_0x91003a['startOf']('year')['toJSDate'](),_0x365059=String(_0x91003a['year'])),{'startDate':_0x2c0ebe,'localizedPeriodName':_0x365059};}class mi extends _0x5e71d5{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x16b7da,_0xcc47c3,_0x58e151,_0x1c1b49){super(_0x16b7da);const _0x45d496=vi(_0xcc47c3,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0xcc47c3,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x58e151,this['_requireRevisionName']=_0x1c1b49,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':_0x45d496}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x246b4a){const _0x2da842=new ai(this['locale'],_0x246b4a,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2da842);}['removeRevision'](_0xd00f32){const _0x3025cd=this['revisionViews']['find'](_0x494e76=>_0x494e76['id']===_0xd00f32['id']);this['revisionViews']['remove'](_0x3025cd);}}class as extends _0x5e71d5{constructor(_0x5ea3a1){super(_0x5ea3a1);const _0x57014e=new _0x3f7079();_0x57014e['content']=_0x2e06aa,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x57014e,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x5ea3a1,'Revision\x20history')]}]});}}class di extends _0x5e71d5{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x55047e,_0x14552d,_0x53da68,_0x34847e){super(_0x55047e);const _0x4d1aae=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x14552d,this['_revisionActions']=_0x53da68,this['_requireRevisionName']=_0x34847e,this['on']('select',(_0x17c3f3,_0x3a8d43)=>{this['fire']('revisionSelected',_0x3a8d43);}),this['on']('setName',(_0x1ad069,_0x4e4773)=>{this['fire']('revisionSetName',_0x4e4773);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x55047e),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4d1aae['if']('isEnabled','ck-disabled',_0xb3962b=>!_0xb3962b)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x509a10 of this['_revisions'])this['_addRevision'](_0x509a10);this['_revisions']['on']('add',(_0x211ba0,_0x2ee62a)=>{this['_addRevision'](_0x2ee62a);}),this['_revisions']['on']('remove',(_0x4ee55d,_0x435950)=>{this['_removeRevision'](_0x435950);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x1d76fe=>_0x1d76fe['revisionViews']['map'](_0x4316cd=>_0x4316cd))['flat']();}['selectRevision'](_0x363a49){for(const _0x401eff of this['revisionViews'])_0x363a49&&_0x363a49['id']===_0x401eff['id']?_0x401eff['select']():_0x401eff['deselect']();}['highlightRevisions'](_0xca9fb9){for(const _0x1bbff9 of this['revisionViews'])_0xca9fb9['some'](({id:_0x528645})=>_0x528645===_0x1bbff9['id'])?_0x1bbff9['highlight']():_0x1bbff9['unhighlight']();}['_addRevision'](_0x4e4dd9){const _0x150ac1=vi(_0x4e4dd9['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x287c9b=this['timePeriodViews']['get'](0x0);_0x287c9b&&_0x287c9b['startDate']['getTime']()===_0x150ac1['getTime']()||(_0x287c9b=new mi(this['locale'],_0x150ac1,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x287c9b)),_0x287c9b['addRevision'](_0x4e4dd9);}['_removeRevision'](_0x46308f){const _0x128314=vi(_0x46308f['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x128314)['removeRevision'](_0x46308f);}['_getTimePeriodViewByStartDate'](_0x1ada13){return this['timePeriodViews']['find'](_0x539009=>_0x539009['startDate']['getTime']()===_0x1ada13['getTime']());}}class d extends _0x1129e8{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
_t();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(
|
|
29
|
-
_0x488038(_0x32c873){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x244f39,_0x322e64){super(_0x322e64),this['sourceElement']=_0x244f39,this['model']['document']['createRoot']();const _0x3527fb=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x3527fb);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4dfd4e,_0x1a8ffd){const _0xee4b63=new this(_0x4dfd4e,_0x1a8ffd);return await _0xee4b63['initPlugins'](),await _0xee4b63['ui']['init'](_0x4dfd4e),await _0xee4b63['data']['init'](_0xee4b63['config']['get']('initialData')||''),_0xee4b63['fire']('ready'),_0xee4b63;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x5bfc96{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2039fe){function _0x2fb723(_0x260f2d){return _0x260f2d['map'](_0x545de4=>String['fromCharCode'](_0x545de4))['join']('');}super(_0x2039fe),this['result']='end',_0x2039fe[_0x2fb723([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2fb723([0x76,0x69,0x65,0x77])][_0x2fb723([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2fb723([0x61,0x75,0x74,0x6f]),_0x2039fe[_0x2fb723([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2fb723([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2fb723([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2fb723([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2fb723([0x6f,0x6b])});}}class k extends _0x5bfc96{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x2a4eff){if(super(_0x2a4eff),!this['editor']['config']['get']('revisionHistory'))throw new _0x39a46b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2b5eb5=>this['_showRevisionViewer']({..._0x2b5eb5,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x18428c=>this['_closeRevisionViewer'](_0x18428c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3a87dd=>this['_restoreRevision'](_0x3a87dd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2eb421){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2eb421;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1cb6a0){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1cb6a0);}['getRevision'](_0x36c54d){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x36c54d);}['getRevisions'](_0x475da3){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x475da3||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x39fd13=this['editor'],_0x5cb69e=_0x45b597(_0x39fd13,p),_0xf0c118=_0x39fd13['plugins']['get']('RevisionTracker'),_0x1f50f3=_0x39fd13['plugins']['get']('Users')['users'];return _0x5cb69e['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5cb69e['lazyRoots'],(_0x5cb69e['plugins']['push'](yt,m,R,class extends _0x5bfc96{static get['requires'](){return[m,'Users'];}['init'](){const _0x4661cb=this['editor']['plugins']['get']('Users');for(const _0x1da1bd of _0x1f50f3)_0x1da1bd['isAnonymous']||_0x4661cb['getUser'](_0x1da1bd['id'])||_0x4661cb['addUser'](_0x1da1bd);const _0x183124=_0xf0c118['repository']['getRevisions']();let _0x90301d=null;const _0x594211=this['editor']['plugins']['get']('RevisionViewer');_0x594211['adapter']=_0xf0c118['adapter'],_0x594211['bind']('isEnabled')['to'](_0xf0c118),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x39fd13,'isReadOnly',_0x172063=>!_0x172063);for(const _0x5bbf0d of _0x183124){const _0x1c596b=null===_0x5bbf0d['creator'];if(_0x1c596b&&_0x5bbf0d['toVersion']===_0x5bbf0d['fromVersion'])continue;const _0xa50c81=_0x5bbf0d['toJSON']();_0x594211['addRevisionData'](_0xa50c81,(_0x38a114,_0x4aae7e,_0x3c19f5)=>{if(_0x1c596b){if(_0x90301d)_0x90301d['_update'](_0x38a114,_0x4aae7e);else{if(!_0x4aae7e){const _0xa2b5f4=_0x3c19f5['toJSON']();_0xa2b5f4['id']=_0x27ee83(),_0xf0c118['saveRevision'](_0xa2b5f4,_0x3c19f5['toVersion'])['then'](_0x3f1ea2=>{_0x90301d=_0x3f1ea2;});}}}else _0x5bbf0d['_update'](_0x38a114,_0x4aae7e);});}}},d),_0x5cb69e);}['_enhanceShowRevisionViewerCallback'](){const _0x37d91f=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3c62aa=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x172e9f=this['editor']['plugins']['get']('Autosave');await _0x172e9f['save']();}else await _0x3c62aa['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x813215=this['editor']['plugins']['get']('Dialog');_0x813215['isOpen']&&_0x813215['hide']();}const _0x203d27=this['_getRevisionViewerEditorConfig']();return _0x37d91f(_0x203d27)['then'](_0x1bb7af=>{return(this['_viewerEditor']=_0x1bb7af,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x1bb7af);})['catch'](_0x3bb452=>(console['error'](_0x3bb452),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1aaf42=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x1aaf42(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x1ef3de=this['editor']['plugins']['get']('Annotations');_0x1ef3de['refreshVisibility'](),_0x1ef3de['refreshPositioning']();}})));}['_showRevisionViewer'](_0x366fc8){const _0x36fa65=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x45dc41=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x105ad0=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x105ad0,_0x366fc8)['then'](_0x161405=>(_0x45dc41['style']['display']='block',_0x36fa65['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x161405));}['_closeRevisionViewer'](_0x2aa122){const _0x1f0594=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x1f0594['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x2aa122['destroy']();}async['_restoreRevision'](_0x3c2901){const _0x73f7fb=this['editor'],_0x12e694=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3867d7=_0x73f7fb['plugins']['get']('RevisionTracker'),_0x5b1f03=_0x73f7fb['plugins']['get']('RevisionHistoryUtils'),_0x882e8a=_0x12e694['repository']['getRevision'](_0x3c2901);let _0x5e16d5,_0x46540c,_0x1c1cc6;try{await _0x5b1f03['loadRevisionData'](_0x882e8a,this['adapter']),_0x5e16d5=_0x5b1f03['getRevisionDocumentData'](_0x882e8a),_0x46540c=_0x5b1f03['getRevisionRootsAttributes'](_0x882e8a);}catch(_0xb61b3f){return void console['error'](_0xb61b3f);}_0x73f7fb['model']['change'](_0x31b16c=>{for(const _0x2fab26 of Array['from'](_0x73f7fb['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x31b16c['removeMarker'](_0x2fab26);}),_0x12e694['isReady']=!0x1,_0x73f7fb['model']['enqueueChange'](_0x390911=>{_0x390911['setSelection'](null),_0x390911['removeSelectionAttribute'](_0x73f7fb['model']['document']['selection']['getAttributeKeys']());const _0x5587b9=Object['keys'](_0x5e16d5);for(const _0x23ec98 of _0x73f7fb['model']['document']['roots'])'$graveyard'!=_0x23ec98['rootName']&&_0x23ec98['isAttached']()&&!_0x5587b9['includes'](_0x23ec98['rootName'])&&_0x390911['detachRoot'](_0x23ec98);for(const _0x59d2fa of _0x5587b9){let _0x1f2c16=_0x73f7fb['model']['document']['getRoot'](_0x59d2fa);_0x1f2c16&&_0x1f2c16['isAttached']()||(_0x1f2c16=_0x390911['addRoot'](_0x59d2fa));const _0x134942=_0x46540c[_0x59d2fa],_0x33af27=Object['keys'](_0x134942),_0x398913=_0x5e16d5[_0x59d2fa];for(const _0x44e7c4 of _0x1f2c16['getAttributeKeys']())_0x33af27['includes'](_0x44e7c4)||_0x390911['removeAttribute'](_0x44e7c4,_0x1f2c16);for(const _0x4a1c95 of _0x33af27)_0x390911['setAttribute'](_0x4a1c95,_0x46540c[_0x59d2fa][_0x4a1c95],_0x1f2c16);_0x390911['remove'](_0x390911['createRangeIn'](_0x1f2c16)),_0x390911['insert'](_0x73f7fb['data']['parse'](_0x398913,_0x1f2c16),_0x1f2c16,0x0);}});const _0x248e34=g(_0x73f7fb['locale'],'Restored');if(_0x882e8a['name'])_0x1c1cc6=-0x1==_0x882e8a['name']['indexOf'](_0x248e34)?_0x248e34+':\x20'+_0x882e8a['name']:_0x882e8a['name'];else _0x1c1cc6=_0x248e34+':\x20'+(_0x882e8a['createdAt']['toLocaleDateString'](_0x73f7fb['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x882e8a['createdAt']['toLocaleTimeString'](_0x73f7fb['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3867d7['saveRevision']({'name':_0x1c1cc6}),_0x12e694['isReady']=!0x0,_0x73f7fb['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,le as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
|
|
28
|
+
_t();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x33719f){super(_0x33719f),this['_revisionViewer']=_0x33719f['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2f1fee=this['_revisionsRepository']['_revisions'],_0x534bc4=this['_createRevisionActions'](),_0x554bb4=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x2f1fee,_0x534bc4,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',(_0x1db243,_0x53e096)=>{_0x53e096['revisionViews']['on']('add',(_0x36d3b3,_0x4901e1)=>{_0x4901e1['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)),_0x554bb4['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x3be37b=this['_revisionsRepository']['getRevision'](0x0);if(_0x3be37b){const _0x30c6f0=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3be37b['id']);this['_revisionViewer']['compare'](_0x3be37b,_0x30c6f0);}}['_handleRevisionSelected'](_0x38cacf,_0x14b2aa){const _0x1d17f3=this['_revisionsRepository']['getRevision'](_0x14b2aa['id']),_0x4f5740=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1d17f3['id']);this['_revisionViewer']['compare'](_0x1d17f3,_0x4f5740);}['_handleRevisionSetName'](_0x5e7e72,_0x2aca78){this['_revisionsRepository']['getRevision'](_0x2aca78['id'])['setName'](_0x2aca78['name']);}['_handleDiffChange'](_0x58da5b,_0x5d02b0,_0x16a463){const _0x235a89=this['_revisionsRepository']['getRevisionsInDiff'](_0x16a463);_0x235a89['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x235a89),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x235a89[0x0]));}['_createRevisionActions'](){const _0x15dffd=this['editor'],_0x2a1e5e=d['availableRevisionActions'],_0x16c904=_0x15dffd['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x16c904['length'])return _0x16c904['map'](_0x491b46=>{const _0xa3db5='string'==typeof _0x491b46?Object['assign']({},_0x2a1e5e[_0x491b46]):_0x491b46;return _0xa3db5['action']=_0xa3db5['action']['bind'](this,_0x15dffd),_0xa3db5['isVisible']&&(_0xa3db5['isVisible']=_0xa3db5['isVisible']['bind'](this,_0x15dffd)),_0xa3db5;});}}function _t(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1fb94c},_0x1061a5)=>{const _0x4a17ce=_0x1fb94c['get'](m),_0x46e11a=_0x4a17ce['repository'];let _0x12af90=_0x4a17ce['diff']['newRevisionId'],_0xe6c29b=_0x1061a5['id'];_0x46e11a['getIndex'](_0x12af90)>_0x46e11a['getIndex'](_0xe6c29b)&&([_0x12af90,_0xe6c29b]=[_0xe6c29b,_0x12af90]),_0x4a17ce['compare'](_0x12af90,_0xe6c29b);},'isVisible':({plugins:_0x18cdc2},_0x395624)=>{const _0x2a4956=_0x18cdc2['get'](m);return!(_0x2a4956['repository']['getRevisionsInDiff'](_0x2a4956['diff'])['length']>0x2)&&!_0x395624['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x151daa,{id:_0x2ca761})=>{_0x151daa['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2ca761);},'isVisible':({plugins:_0x31b492},_0xf8b023)=>!!_0x31b492['get'](m)['repository']['getLaterVisibleRevision'](_0xf8b023['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3e2ae1},{id:_0x27b1bb,revisionNameView:_0x1837dd})=>{const _0x4b15c2=_0x3e2ae1['get'](m),_0x5e2e74=_0x4b15c2['repository']['getEarlierVisibleRevision'](_0x27b1bb);_0x4b15c2['compare'](_0x27b1bb,_0x5e2e74),_0x1837dd['focus'](),_0x1837dd['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4e8fad,_0x569d5d){super(_0x4e8fad),this['_view']=_0x569d5d,this['_toolbarConfig']=et(_0x4e8fad['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x4385bc){const _0x263537=this['editor'],_0x3c50bd=this['view'],_0x1dea25=_0x263537['editing']['view'],_0x5c3ec5=_0x3c50bd['editable'],_0x30a8b3=_0x1dea25['document']['getRoot']();_0x5c3ec5['name']=_0x30a8b3['rootName'],_0x3c50bd['render']();const _0x243d15=_0x5c3ec5['element'];this['setEditableElement'](_0x5c3ec5['name'],_0x243d15),_0x3c50bd['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1dea25['attachDomRoot'](_0x243d15),this['_elementReplacer']['replace'](_0x4385bc,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x4bb28e=this['view'],_0x12042b=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x12042b['detachDomRoot'](_0x4bb28e['editable']['name']),_0x4bb28e['destroy']();}['_initToolbar'](){const _0x3bb75e=this['view'];_0x3bb75e['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3bb75e['stickyPanel']['limiterElement']=_0x3bb75e['element'],_0x3bb75e['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x48a056})=>_0x48a056),_0x3bb75e['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3bb75e['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x171ad7,_0x319f0d,_0x27890d={}){super(_0x171ad7),this['stickyPanel']=new ht(_0x171ad7),this['toolbar']=new dt(_0x171ad7,{'shouldGroupWhenFull':_0x27890d['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x171ad7,_0x319f0d);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x24d417(_0x70a0ca){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x487a38,_0x27b824){super(_0x27b824),this['sourceElement']=_0x487a38,this['model']['document']['createRoot']();const _0x375f05=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x375f05);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x320c34,_0x51acec){const _0x4b50fa=new this(_0x320c34,_0x51acec);return await _0x4b50fa['initPlugins'](),await _0x4b50fa['ui']['init'](_0x320c34),await _0x4b50fa['data']['init'](_0x4b50fa['config']['get']('initialData')||''),_0x4b50fa['fire']('ready'),_0x4b50fa;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x1129e8{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x446bf5){function _0x443577(_0x5c224a){return _0x5c224a['map'](_0x2e25c3=>String['fromCharCode'](_0x2e25c3))['join']('');}super(_0x446bf5),this['result']='end',_0x446bf5[_0x443577([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x443577([0x76,0x69,0x65,0x77])][_0x443577([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x443577([0x61,0x75,0x74,0x6f]),_0x446bf5[_0x443577([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x443577([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x443577([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x443577([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x443577([0x6f,0x6b])});}}class k extends _0x1129e8{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x3a9eef){if(super(_0x3a9eef),!this['editor']['config']['get']('revisionHistory'))throw new _0x4ef6d7('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x560887=>this['_showRevisionViewer']({..._0x560887,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x5f21d6=>this['_closeRevisionViewer'](_0x5f21d6)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3b19e0=>this['_restoreRevision'](_0x3b19e0)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3f72b5){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3f72b5;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4cae7e){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4cae7e);}['getRevision'](_0x43066f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x43066f);}['getRevisions'](_0x5d7522){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5d7522||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x154a17=this['editor'],_0x360b4f=_0x9f1790(_0x154a17,p),_0x3931d5=_0x154a17['plugins']['get']('RevisionTracker'),_0x253f6e=_0x154a17['plugins']['get']('Users')['users'];return _0x360b4f['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x360b4f['lazyRoots'],(_0x360b4f['plugins']['push'](yt,m,R,class extends _0x1129e8{static get['requires'](){return[m,'Users'];}['init'](){const _0x4914b8=this['editor']['plugins']['get']('Users');for(const _0x2d2cb0 of _0x253f6e)_0x2d2cb0['isAnonymous']||_0x4914b8['getUser'](_0x2d2cb0['id'])||_0x4914b8['addUser'](_0x2d2cb0);const _0x1d5186=_0x3931d5['repository']['getRevisions']();let _0x3de215=null;const _0xd1b851=this['editor']['plugins']['get']('RevisionViewer');_0xd1b851['adapter']=_0x3931d5['adapter'],_0xd1b851['bind']('isEnabled')['to'](_0x3931d5),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x154a17,'isReadOnly',_0x4c38f9=>!_0x4c38f9);for(const _0x3ffbfa of _0x1d5186){const _0x16a2d7=null===_0x3ffbfa['creator'];if(_0x16a2d7&&_0x3ffbfa['toVersion']===_0x3ffbfa['fromVersion'])continue;const _0x555621=_0x3ffbfa['toJSON']();_0xd1b851['addRevisionData'](_0x555621,(_0x32e176,_0xd0e833,_0x4b3c0b)=>{if(_0x16a2d7){if(_0x3de215)_0x3de215['_update'](_0x32e176,_0xd0e833);else{if(!_0xd0e833){const _0x7db74=_0x4b3c0b['toJSON']();_0x7db74['id']=_0x27e53b(),_0x3931d5['saveRevision'](_0x7db74,_0x4b3c0b['toVersion'])['then'](_0x4622bf=>{_0x3de215=_0x4622bf;});}}}else _0x3ffbfa['_update'](_0x32e176,_0xd0e833);});}}},d),_0x360b4f);}['_enhanceShowRevisionViewerCallback'](){const _0x478bfa=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x7078b7=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x47568f=this['editor']['plugins']['get']('Autosave');await _0x47568f['save']();}else await _0x7078b7['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x56c78f=this['editor']['plugins']['get']('Dialog');_0x56c78f['isOpen']&&_0x56c78f['hide']();}const _0x342371=this['_getRevisionViewerEditorConfig']();return _0x478bfa(_0x342371)['then'](_0x51c537=>{return(this['_viewerEditor']=_0x51c537,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x51c537);})['catch'](_0x4e9c73=>(console['error'](_0x4e9c73),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5fd160=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5fd160(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x1b5c0a=this['editor']['plugins']['get']('Annotations');_0x1b5c0a['refreshVisibility'](),_0x1b5c0a['refreshPositioning']();}})));}['_showRevisionViewer'](_0x2e206){const _0x235830=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x364868=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x20d269=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x20d269,_0x2e206)['then'](_0x2a4f83=>(_0x364868['style']['display']='block',_0x235830['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2a4f83));}['_closeRevisionViewer'](_0xef0c7a){const _0x4d0bf1=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4d0bf1['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xef0c7a['destroy']();}async['_restoreRevision'](_0x1bac32){const _0x3d4f41=this['editor'],_0x3980b4=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x578e05=_0x3d4f41['plugins']['get']('RevisionTracker'),_0x35796d=_0x3d4f41['plugins']['get']('RevisionHistoryUtils'),_0x4b0eac=_0x3980b4['repository']['getRevision'](_0x1bac32);let _0x47f7f5,_0x4b102a,_0x2893b6;try{await _0x35796d['loadRevisionData'](_0x4b0eac,this['adapter']),_0x47f7f5=_0x35796d['getRevisionDocumentData'](_0x4b0eac),_0x4b102a=_0x35796d['getRevisionRootsAttributes'](_0x4b0eac);}catch(_0x22dd0a){return void console['error'](_0x22dd0a);}_0x3d4f41['model']['change'](_0x5e8226=>{for(const _0xc5f953 of Array['from'](_0x3d4f41['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5e8226['removeMarker'](_0xc5f953);}),_0x3980b4['isReady']=!0x1,_0x3d4f41['model']['enqueueChange'](_0x28d546=>{_0x28d546['setSelection'](null),_0x28d546['removeSelectionAttribute'](_0x3d4f41['model']['document']['selection']['getAttributeKeys']());const _0x4469c1=Object['keys'](_0x47f7f5);for(const _0x36ab75 of _0x3d4f41['model']['document']['roots'])'$graveyard'!=_0x36ab75['rootName']&&_0x36ab75['isAttached']()&&!_0x4469c1['includes'](_0x36ab75['rootName'])&&_0x28d546['detachRoot'](_0x36ab75);for(const _0x568e76 of _0x4469c1){let _0xd807f1=_0x3d4f41['model']['document']['getRoot'](_0x568e76);_0xd807f1&&_0xd807f1['isAttached']()||(_0xd807f1=_0x28d546['addRoot'](_0x568e76));const _0x4eb4b2=_0x4b102a[_0x568e76],_0x267b1c=Object['keys'](_0x4eb4b2),_0x143489=_0x47f7f5[_0x568e76];for(const _0x83eb69 of _0xd807f1['getAttributeKeys']())_0x267b1c['includes'](_0x83eb69)||_0x28d546['removeAttribute'](_0x83eb69,_0xd807f1);for(const _0x1d5b3e of _0x267b1c)_0x28d546['setAttribute'](_0x1d5b3e,_0x4b102a[_0x568e76][_0x1d5b3e],_0xd807f1);_0x28d546['remove'](_0x28d546['createRangeIn'](_0xd807f1)),_0x28d546['insert'](_0x3d4f41['data']['parse'](_0x143489,_0xd807f1),_0xd807f1,0x0);}});const _0x593e74=g(_0x3d4f41['locale'],'Restored');if(_0x4b0eac['name'])_0x2893b6=-0x1==_0x4b0eac['name']['indexOf'](_0x593e74)?_0x593e74+':\x20'+_0x4b0eac['name']:_0x4b0eac['name'];else _0x2893b6=_0x593e74+':\x20'+(_0x4b0eac['createdAt']['toLocaleDateString'](_0x3d4f41['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4b0eac['createdAt']['toLocaleTimeString'](_0x3d4f41['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x578e05['saveRevision']({'name':_0x2893b6}),_0x3980b4['isReady']=!0x0,_0x3d4f41['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,le as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
|