@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250408.0 → 0.0.0-nightly-20250409.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +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/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +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
|
-
_0x5f9c8d(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x522c34){super(),this['id']=_0x522c34['id']||_0x3f13b1(),this['creator']=_0x522c34['creator']||null,this['authors']=_0x522c34['authors']||[],this['diffData']=_0x522c34['diffData']||null,this['toVersion']=_0x522c34['toVersion']||0x0,this['fromVersion']=_0x522c34['fromVersion']||0x0,this['set']('name',_0x522c34['name']||''),this['set']('createdAt',_0x522c34['createdAt']||new Date()),this['set']('attributes',_0x522c34['attributes']||{});}['setName'](_0x5b6630){this['_update']({'name':_0x5b6630});}['setAttribute'](_0x298181,_0x4092f7){const _0x568581=_0x4d0c8a(this['attributes']);_0x4630f1(_0x568581,_0x298181,_0x4092f7),this['_update']({'attributes':_0x568581});}['removeAttribute'](_0x79f97e){const _0x21a3d3=_0x4d0c8a(this['attributes']);_0x47c7f8(_0x21a3d3,_0x79f97e),this['_update']({'attributes':_0x21a3d3});}['_update'](_0x404a28,_0x54b942=!0x1){let _0x509e27=!0x1;const _0x632be4={'id':this['id']},_0x312b95=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x180365 of _0x312b95){const _0x26105c=_0x404a28[_0x180365];void 0x0!==_0x26105c&&_0x26105c!==this[_0x180365]&&(this[_0x180365]=_0x26105c,_0x632be4[_0x180365]=_0x26105c,_0x509e27=!0x0);}_0x509e27&&(_0x632be4['authors']&&(_0x632be4['authorsIds']=_0x632be4['authors']['map'](_0x2a78aa=>_0x2a78aa['id']),delete _0x632be4['authors']),this['fire']('_update',_0x632be4,_0x54b942));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x34aa2e=>_0x34aa2e['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x3edab6{['_revisions'];static get['requires'](){return[_0x2c4ff3];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x8a572d){super(_0x8a572d),this['_revisions']=new _0x133f10();}['afterInit'](){!async function(_0x1ba974){const _0x22e6c1=_0x532282([0x71,0x34,0x37,0x4b,0x58,0x6f,0x63,0x69,0x72,0x4d,0x78,0x79,0x59,0x73,0x39,0x64,0x51,0x56,0x4e,0x7a,0x62,0x45,0x31,0x66,0x70,0x55,0x32,0x30,0x76,0x75,0x4c,0x35,0x33,0x48,0x67,0x43,0x42,0x65,0x6c,0x5a,0x41,0x47,0x61,0x4f,0x46,0x6a,0x53,0x54,0x4a,0x77,0x38,0x52,0x68,0x6d,0x44,0x74,0x36,0x6b,0x50,0x57,0x6e,0x49]),_0x1cbbfa=0xeb829,_0x59edd5=0x102169ba,_0x329c16=0x10260dca^_0x59edd5,_0x59ce5b=window[_0x532282([0x44,0x61,0x74,0x65])][_0x532282([0x6e,0x6f,0x77])](),_0x1a9480=_0x1ba974[_0x532282([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3602a5=new window[(_0x532282([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1446cd=>{_0x1a9480[_0x532282([0x6f,0x6e,0x63,0x65])](_0x532282([0x72,0x65,0x61,0x64,0x79]),_0x1446cd);}),_0x420a16={[_0x532282([0x6b,0x74,0x79])]:_0x532282([0x45,0x43]),[_0x532282([0x75,0x73,0x65])]:_0x532282([0x73,0x69,0x67]),[_0x532282([0x63,0x72,0x76])]:_0x532282([0x50,0x2d,0x32,0x35,0x36]),[_0x532282([0x78])]:_0x532282([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]),[_0x532282([0x79])]:_0x532282([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]),[_0x532282([0x61,0x6c,0x67])]:_0x532282([0x45,0x53,0x32,0x35,0x36])},_0x30b9a3=_0x1a9480[_0x532282([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x532282([0x67,0x65,0x74])](_0x532282([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1efa84(){let _0x22a9b3,_0x1ced02=null,_0xf16e52=null;try{if(_0x30b9a3==_0x532282([0x47,0x50,0x4c]))return _0x532282([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x22a9b3=_0x64ed1f(),!_0x22a9b3)return _0x532282([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x22a9b3[_0x532282([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xf16e52=_0x22a955(_0x22a9b3[_0x532282([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x22a9b3[_0x532282([0x6a,0x74,0x69])])),await _0x100981()?_0x590411()?_0x3aad49()?_0x532282([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4cef0b()?(_0x22a9b3[_0x532282([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x532282([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1ced02=_0x4f4cdb(_0x532282([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x22a9b3[_0x532282([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x532282([0x74,0x72,0x69,0x61,0x6c])&&(_0x1ced02=_0x4f4cdb(_0x532282([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x22981c()):_0x532282([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x532282([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x532282([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xc10019){return _0x532282([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3aad49(){const _0x1afbbb=[_0x532282([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x532282([0x74,0x72,0x69,0x61,0x6c])][_0x532282([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22a9b3[_0x532282([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x59ce5b/0x3e8:0xe10*_0x329c16;return _0x22a9b3[_0x532282([0x65,0x78,0x70])]<_0x1afbbb;}function _0x590411(){const _0x944f2d=_0x22a9b3[_0x532282([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x944f2d)return!0x1;if(_0x944f2d[_0x532282([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x532282([0x2a])))return!0x0;if(_0x944f2d[_0x532282([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x532282([0x52,0x48])))return!0x0;if(_0x944f2d[_0x532282([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x532282([0x52,0x52,0x48]))){if(_0x2de8ef())return!0x0;if(_0x55dc93()||_0xdaf991())return!0x0;}return!0x1;}function _0x4cef0b(){const _0x371e87=_0x22a9b3[_0x532282([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x371e87||0x0==_0x371e87[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x13dce3}=new URL(window[_0x532282([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x371e87[_0x532282([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13dce3))return!0x0;const _0x13e42a=_0x13dce3[_0x532282([0x73,0x70,0x6c,0x69,0x74])](_0x532282([0x2e]));return _0x371e87[_0x532282([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xa76974=>_0xa76974[_0x532282([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x532282([0x2a])))[_0x532282([0x6d,0x61,0x70])](_0x5b2d72=>_0x5b2d72[_0x532282([0x73,0x70,0x6c,0x69,0x74])](_0x532282([0x2e])))[_0x532282([0x73,0x6f,0x6d,0x65])](_0x36caba=>_0x13e42a[_0x532282([0x65,0x76,0x65,0x72,0x79])]((_0x51a5b5,_0x1d7d70)=>_0x36caba[_0x1d7d70]===_0x51a5b5||_0x36caba[_0x1d7d70]===_0x532282([0x2a])));}function _0x22981c(){return _0x1ced02&&_0xf16e52?new window[(_0x532282([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x324839,_0x6725bf)=>{_0x1ced02[_0x532282([0x74,0x68,0x65,0x6e])](_0x324839,_0x6725bf),_0xf16e52[_0x532282([0x74,0x68,0x65,0x6e])](_0x5880b0=>{_0x5880b0!=_0x532282([0x56,0x61,0x6c,0x69,0x64])&&_0x324839(_0x5880b0);},_0x6725bf);}):_0x1ced02||_0xf16e52||_0x532282([0x56,0x61,0x6c,0x69,0x64]);}}function _0x22a955(_0x27237d,_0x46c3bc){return new window[(_0x532282([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57abaa=>{if(_0x45f743())return _0x57abaa(_0x532282([0x56,0x61,0x6c,0x69,0x64]));_0x105909(),_0x1a9480[_0x532282([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x532282([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x203457=!0x1;const _0x35ada4=_0x3f13b1();function _0x4aa62d(_0xefd20d){return!!_0xefd20d&&(typeof _0xefd20d===_0x532282([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xefd20d===_0x532282([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xefd20d[_0x532282([0x74,0x68,0x65,0x6e])]===_0x532282([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xefd20d[_0x532282([0x63,0x61,0x74,0x63,0x68])]===_0x532282([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x39f4e1(_0x21aca4){_0x3e370f(_0x21aca4)[_0x532282([0x74,0x68,0x65,0x6e])](_0xd31d0f=>{if(!_0xd31d0f||_0xd31d0f[_0x532282([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x532282([0x6f,0x6b]))return _0x532282([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x172ab4(_0x1d42a2(_0x35ada4+_0x46c3bc))!=_0xd31d0f[_0x532282([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x532282([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x532282([0x56,0x61,0x6c,0x69,0x64]);})[_0x532282([0x74,0x68,0x65,0x6e])](_0x1eef25=>(_0x47ec2c(),_0x1eef25),()=>{const _0x70ff85=_0x4fe34d();return null==_0x70ff85?(_0x47ec2c(),_0x532282([0x56,0x61,0x6c,0x69,0x64])):_0x532282(_0x59ce5b-_0x70ff85>(0x342dedba^_0x59edd5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x532282([0x74,0x68,0x65,0x6e])](_0x57abaa)[_0x532282([0x63,0x61,0x74,0x63,0x68])](()=>{_0x57abaa(_0x532282([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x16d7ba=0x1017873a^_0x59edd5;function _0x47ec2c(){const _0x25085c=_0x532282([0x6c,0x6c,0x63,0x74,0x2d])+_0x172ab4(_0x1d42a2(_0x27237d)),_0x5ce5a9=_0x29f7c8(_0x172ab4(window[_0x532282([0x4d,0x61,0x74,0x68])][_0x532282([0x63,0x65,0x69,0x6c])](_0x59ce5b/_0x16d7ba)));window[_0x532282([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x532282([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x25085c,_0x5ce5a9);}function _0x4fe34d(){const _0x387cad=_0x532282([0x6c,0x6c,0x63,0x74,0x2d])+_0x172ab4(_0x1d42a2(_0x27237d)),_0xd9c5eb=window[_0x532282([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x532282([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x387cad);return _0xd9c5eb?window[_0x532282([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29f7c8(_0xd9c5eb),0x10)*_0x16d7ba:null;}function _0x3e370f(_0xc125dd){return new window[(_0x532282([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3c6a2b,_0x25db95)=>{_0xc125dd[_0x532282([0x74,0x68,0x65,0x6e])](_0x3c6a2b,_0x25db95),window[_0x532282([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x25db95,0x1020bd7a^_0x59edd5);});}}_0x1a9480[_0x532282([0x6f,0x6e])](_0x532282([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4cb8a3,_0x343762)=>{if(_0x343762[0x0]!=_0x27237d)return _0x57abaa(_0x532282([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x343762[0x1]={..._0x343762[0x1],[_0x532282([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x35ada4};},{[_0x532282([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x532282([0x68,0x69,0x67,0x68])}),_0x1a9480[_0x532282([0x6f,0x6e])](_0x532282([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3d1390=>{_0x4aa62d(_0x3d1390[_0x532282([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x203457=!0x0,_0x39f4e1(_0x3d1390[_0x532282([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x532282([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x532282([0x6c,0x6f,0x77])}),_0x3602a5[_0x532282([0x74,0x68,0x65,0x6e])](()=>{_0x203457||_0x57abaa(_0x532282([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x45f743(){return _0x1a9480[_0x532282([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x532282([0x76,0x69,0x65,0x77])][_0x532282([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x532282([0x61,0x75,0x74,0x6f]);}function _0x105909(){_0x1a9480[_0x532282([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x532282([0x76,0x69,0x65,0x77])][_0x532282([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x532282([0x61,0x75,0x74,0x6f]);}}function _0x4f4cdb(_0x1b5c00){const _0xeef1cc=[new window[(_0x532282([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xdb9da8=>setTimeout(_0xdb9da8,0x10285776^_0x59edd5)),_0x3602a5[_0x532282([0x74,0x68,0x65,0x6e])](()=>new window[(_0x532282([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e9f4a=>{const _0x8e57b6=0x102169bd^_0x59edd5,_0x389b58=_0x1ba974[_0x532282([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x5766d7(){_0x389b58[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x8e57b6&&_0x1e9f4a();}_0x5766d7(),_0x389b58[_0x532282([0x6f,0x6e])](_0x532282([0x61,0x64,0x64]),_0x5766d7);})),new window[(_0x532282([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54d7b0=>{function _0x4c667f(){for(const _0x15a208 in window)if(window[_0x532282([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x532282([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x15a208))&&window[_0x15a208]==_0x1cbbfa)return _0x54d7b0();_0x1a9480[_0x532282([0x73,0x74,0x61,0x74,0x65])]!=_0x532282([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x532282([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4c667f,0x10217a32^_0x59edd5);}_0x3f1a40(_0x532282([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x4c667f();})];return window[_0x532282([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x532282([0x72,0x61,0x63,0x65])](_0xeef1cc)[_0x532282([0x74,0x68,0x65,0x6e])](()=>_0x1b5c00);}async function _0x16e6fb(){if(await _0x3602a5,_0x3f1a40(_0x532282([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x434a2d=_0x1ba974[_0x532282([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2982cc=_0x1ba974[_0x532282([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])](_0x434a2d[_0x532282([0x69,0x64])]),_0x585cc9=_0x2a8d50(_0x532282([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x585cc9[_0x532282([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x434a2d['id'],_0x2982cc?_0x2982cc['id']:null,!0x0),_0x585cc9[_0x532282([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x532282([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x585cc9[_0x532282([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x585cc9[_0x532282([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x553f1e,void(_0x585cc9[_0x532282([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x553f1e);}if(_0x3f1a40(_0x532282([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x35d3d7=_0x2a8d50(_0x532282([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x35d3d7[_0x532282([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x532282([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x35d3d7[_0x532282([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x35d3d7[_0x532282([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x553f1e,_0x35d3d7[_0x532282([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x553f1e;}_0x1a9480[_0x532282([0x6d,0x6f,0x64,0x65,0x6c])][_0x532282([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x553f1e,_0x1a9480[_0x532282([0x6d,0x6f,0x64,0x65,0x6c])][_0x532282([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x553f1e,_0x1a9480[_0x532282([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x532282([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2de8ef(){return _0x3f1a40(_0x532282([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2a8d50(_0x532282([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x532282([0x73,0x74,0x61,0x74,0x65])]==_0x532282([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x55dc93(){return _0x3f1a40(_0x532282([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 _0xdaf991(){return _0x3f1a40(_0x532282([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2b142a(_0x46e23a){const _0x5b6657=_0x38510c();_0x1a9480[_0x5b6657]=_0x532282([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])+_0x46e23a,_0x46e23a[_0x532282([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x532282([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x38510c()]=_0x1cbbfa),_0x46e23a!=_0x532282([0x56,0x61,0x6c,0x69,0x64])&&_0x16e6fb();}function _0x38510c(){const _0x1c31e6=window[_0x532282([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x532282([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x532282([0x6e,0x6f,0x77])]())[_0x532282([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x532282([0x2e]),'');let _0x7c03ac=_0x532282([0x71]);for(let _0xc8e141=0x0;_0xc8e141<_0x1c31e6[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xc8e141+=0x2){let _0x3efd4c=window[_0x532282([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c31e6[_0x532282([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc8e141,_0xc8e141+0x2));_0x3efd4c>=_0x22e6c1[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3efd4c-=_0x22e6c1[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x7c03ac+=_0x22e6c1[_0x3efd4c];}return _0x7c03ac;}function _0x64ed1f(){const _0x5abd0a=_0x30b9a3[_0x532282([0x73,0x70,0x6c,0x69,0x74])](_0x532282([0x2e]));if(0x3!=_0x5abd0a[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x27201a(_0x5abd0a[0x1]);function _0x27201a(_0x18f067){const _0x36ade5=_0xc32dab(_0x18f067);return _0x36ade5&&_0x11978f()?_0x36ade5:null;function _0x11978f(){const _0x10eb1e=_0x36ade5[_0x532282([0x6a,0x74,0x69])],_0x4178ab=window[_0x532282([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10eb1e[_0x532282([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10eb1e[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x29580a={..._0x36ade5,[_0x532282([0x6a,0x74,0x69])]:_0x10eb1e[_0x532282([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x10eb1e[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x29580a[_0x532282([0x76,0x63])],_0x1d42a2(_0x29580a)==_0x4178ab;}}}async function _0x100981(){let _0x1ca079=!0x0;try{const _0x4453ae=_0x30b9a3[_0x532282([0x73,0x70,0x6c,0x69,0x74])](_0x532282([0x2e])),[_0x136fdb,_0xe953b,_0x5f546b]=_0x4453ae;return _0xcb4ccd(_0x136fdb),await _0x1c5204(_0x136fdb,_0xe953b,_0x5f546b),_0x1ca079;}catch(_0x4d8a2d){return!0x1;}function _0xcb4ccd(_0x399139){const _0x371f68=_0xc32dab(_0x399139);_0x371f68&&_0x371f68[_0x532282([0x61,0x6c,0x67])]==_0x532282([0x45,0x53,0x32,0x35,0x36])||(_0x1ca079=!0x1);}async function _0x1c5204(_0x26033f,_0x538c3e,_0x3514dc){const _0x1dde4b=window[_0x532282([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x532282([0x66,0x72,0x6f,0x6d])](_0x1eb123(_0x3514dc),_0x4a2202=>_0x4a2202[_0x532282([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f5f5d=new window[(_0x532282([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x532282([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x26033f+_0x532282([0x2e])+_0x538c3e),_0x11951a=window[_0x532282([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x532282([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x11951a)return;const _0xbf2e8a=await _0x11951a[_0x532282([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x532282([0x6a,0x77,0x6b]),_0x420a16,{[_0x532282([0x6e,0x61,0x6d,0x65])]:_0x532282([0x45,0x43,0x44,0x53,0x41]),[_0x532282([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x532282([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x532282([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x11951a[_0x532282([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x532282([0x6e,0x61,0x6d,0x65])]:_0x532282([0x45,0x43,0x44,0x53,0x41]),[_0x532282([0x68,0x61,0x73,0x68])]:{[_0x532282([0x6e,0x61,0x6d,0x65])]:_0x532282([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xbf2e8a,_0x1dde4b,_0x2f5f5d)||(_0x1ca079=!0x1);}}function _0xc32dab(_0x1d1164){return _0x1d1164[_0x532282([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x532282([0x65,0x79]))?JSON[_0x532282([0x70,0x61,0x72,0x73,0x65])](_0x1eb123(_0x1d1164)):null;}function _0x1eb123(_0x41ec3c){return window[_0x532282([0x61,0x74,0x6f,0x62])](_0x41ec3c[_0x532282([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x532282([0x2b]))[_0x532282([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x532282([0x2f])));}function _0x1d42a2(_0x50edab){let _0x262281=0x1505;function _0x43a3be(_0x254d9b){for(let _0x2a941c=0x0;_0x2a941c<_0x254d9b[_0x532282([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2a941c++){const _0x4b7810=_0x254d9b[_0x532282([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2a941c);_0x262281=(_0x262281<<0x5)+_0x262281+_0x4b7810,_0x262281&=_0x262281;}}function _0x527080(_0x10f968){Array[_0x532282([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x10f968)?_0x10f968[_0x532282([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x527080):_0x10f968&&typeof _0x10f968==_0x532282([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x532282([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x10f968)[_0x532282([0x73,0x6f,0x72,0x74])]()[_0x532282([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1f65f7,_0x103d1a])=>{_0x43a3be(_0x1f65f7),_0x527080(_0x103d1a);}):_0x43a3be(window[_0x532282([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x10f968));}return _0x527080(_0x50edab),_0x262281>>>0x0;}function _0x172ab4(_0x2ead9b){return _0x2ead9b[_0x532282([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x532282([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x532282([0x30]));}function _0x29f7c8(_0xc3da63){return _0xc3da63[_0x532282([0x73,0x70,0x6c,0x69,0x74])]('')[_0x532282([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x532282([0x6a,0x6f,0x69,0x6e])]('');}function _0x3f1a40(_0x17c753){return _0x1a9480[_0x532282([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x532282([0x68,0x61,0x73])](_0x17c753);}function _0x2a8d50(_0x3510f8){return _0x1a9480[_0x532282([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x532282([0x67,0x65,0x74])](_0x3510f8);}function _0x553f1e(){}function _0x532282(_0x33e34f){return _0x33e34f['map'](_0x473981=>String['fromCharCode'](_0x473981))['join']('');}_0x2b142a(await _0x1efa84());}(this);}['createRevision'](_0x232d1a){const _0x2956b4=this['editor']['plugins']['get']('Users');return new h({'id':_0x232d1a['id'],'name':_0x232d1a['name'],'creator':_0x232d1a['creatorId']?_0x2956b4['getUser'](_0x232d1a['creatorId']):null,'diffData':_0x232d1a['diffData']||_0x232d1a['data'],'authors':_0x232d1a['authorsIds']['map'](_0x56d861=>_0x2956b4['getUser'](_0x56d861)),'createdAt':new Date(_0x232d1a['createdAt']),'attributes':_0x232d1a['attributes'],'fromVersion':_0x232d1a['fromVersion'],'toVersion':_0x232d1a['toVersion']});}['addRevision'](_0x2d6cf8,_0x5e7c7f=0x0){this['_revisions']['add'](_0x2d6cf8,_0x5e7c7f);}['getRevision'](_0x5b2f10){return this['_revisions']['get'](_0x5b2f10);}['getRevisions'](_0x5b5cda={'toJSON':!0x1}){const _0x32ef25=Array['from'](this['_revisions']);return _0x32ef25['reverse'](),_0x5b5cda['toJSON']?_0x32ef25['map'](_0x45a95e=>_0x45a95e['toJSON']()):_0x32ef25;}['getIndex'](_0x2d67cb){return this['_revisions']['getIndex'](_0x2d67cb);}['getEarlierVisibleRevision'](_0x20fd49){const [,_0x8c3e7]=this['getRevisionsIterator'](_0x20fd49,{'direction':'earlier'});return _0x8c3e7;}['getLaterVisibleRevision'](_0x4d8b8f){const [,_0x40e241]=this['getRevisionsIterator'](_0x4d8b8f,{'direction':'later'});return _0x40e241;}['getRevisionsInDiff'](_0x55c7db){const _0x3a388f=[];for(const _0x1ed8d7 of this['getRevisionsIterator'](_0x55c7db['newRevisionId']))if(_0x3a388f['push'](_0x1ed8d7),_0x1ed8d7['id']===_0x55c7db['oldRevisionId'])break;return _0x3a388f;}*['getRevisionsIterator'](_0x1078fc,{direction:_0x574e60='earlier',filter:_0x17f086=()=>!0x0}={}){const _0x3072eb='earlier'===_0x574e60?0x1:-0x1;let _0xc3d3ef=this['_revisions']['get'](_0x1078fc),_0x4c9cb2=this['getIndex'](_0xc3d3ef);for(yield _0xc3d3ef;_0xc3d3ef;){if(_0x4c9cb2+=_0x3072eb,_0xc3d3ef=this['getRevision'](_0x4c9cb2),!_0xc3d3ef)return;_0x17f086(_0xc3d3ef)&&(yield _0xc3d3ef);}}}class V extends _0x3edab6{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x4a3f64,'c'],[_0x14b714,'a'],[_0x23ea8d,'e'],[_0x492b2e,'r'],[_0x4d6a0b,'u']]);['_typeCharToViewClass']=new Map([['c',_0x4a3f64],['a',_0x14b714],['e',_0x23ea8d],['r',_0x492b2e],['u',_0x4d6a0b]]);async['loadRevisionData'](_0x4c307b,_0x497574){if(_0x4c307b['diffData']||!_0x497574)return;const _0x57ff62=this['editor']['config']['get']('collaboration.channelId'),_0x18bc70=await _0x497574['getRevision']({'channelId':_0x57ff62,'revisionId':_0x4c307b['id']});_0x4c307b['diffData']=_0x18bc70['diffData'];}['getRevisionDocumentData'](_0x22f4ab){const _0x22319d={};for(const _0x29263f in _0x22f4ab['diffData']){if(_0x22f4ab['diffData'][_0x29263f]['attachChange']&&!_0x22f4ab['diffData'][_0x29263f]['attachChange']['isAttached'])continue;const _0x3e2525=this['_removeRevisionMarkers'](JSON['parse'](_0x22f4ab['diffData'][_0x29263f]['insertions'])),_0x3b7e2e=this['editor']['editing']['view']['document'],_0x56e0d8=new _0x5386e2(_0x3b7e2e,_0x3e2525['map'](_0x4948a5=>this['_getViewFromDiffObj'](_0x4948a5,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x22319d[_0x29263f]=this['editor']['data']['processor']['toData'](_0x56e0d8),this['editor']['data']['processor']['useFillerType']('default');}return _0x22319d;}['getRevisionRootsAttributes'](_0x28f278){const _0x452458={};for(const _0x4a47cf in _0x28f278['diffData'])_0x28f278['diffData'][_0x4a47cf]['attachChange']&&!_0x28f278['diffData'][_0x4a47cf]['attachChange']['isAttached']||(_0x452458[_0x4a47cf]=_0x28f278['diffData'][_0x4a47cf]['attributesAfter']||{});return _0x452458;}['_getTypeCharForViewElement'](_0x58564c){return this['_viewClassToTypeChar']['get'](_0x58564c['constructor']);}['_getViewFromDiffObj'](_0x240163,_0x3de6d){const _0x4d0ed8=this['editor']['editing']['view']['document'];if('string'==typeof _0x240163)return new _0x440b9c(_0x4d0ed8,_0x240163);{let _0x32c31b,_0x28606a;_0x28606a='u'==_0x240163['type']||'r'==_0x240163['type']?[]:_0x240163['children']['map'](_0x2a478a=>this['_getViewFromDiffObj'](_0x2a478a,_0x3de6d));const _0x440f84=this['_typeCharToViewClass']['get'](_0x240163['type'])||_0x46e5f8,_0x3aed48=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x32c31b=new _0x440f84(_0x4d0ed8,_0x240163['name'],_0x240163['attributes'],_0x28606a),'u'==_0x240163['type']&&_0x240163['children'][0x0]){const _0x16e0e1=_0x240163['children'][0x0];if(_0x32c31b['render']=function(_0x802c3e){const _0x16bc09=_0x802c3e['createElement']('div');return _0x16bc09['innerHTML']=_0x16e0e1,_0x16bc09['childNodes'][0x0];},_0x3de6d){const _0x282a0b=new _0x5386e2(_0x4d0ed8);_0x282a0b['_appendChild'](_0x32c31b);const _0x1540a7=Array['from'](_0x3aed48['viewChildrenToDom'](_0x282a0b,{'bind':!0x1})),_0x36e31e=_0x3aed48['domDocument']['createElement']('div');_0x36e31e['append'](..._0x1540a7),_0x32c31b=Array['from'](_0x3aed48['domChildrenToView'](_0x36e31e))[0x0];}}else{if('r'==_0x240163['type']&&_0x240163['children'][0x0]){const _0x797085=_0x240163['children'][0x0];if(_0x32c31b['render']=function(_0x1e4bc5){_0x1e4bc5['innerHTML']=_0x797085;},_0x3de6d){const _0x270557=new _0x5386e2(_0x4d0ed8);_0x270557['_appendChild'](_0x32c31b);const _0x225913=Array['from'](_0x3aed48['viewChildrenToDom'](_0x270557,{'bind':!0x1})),_0x5a80a9=_0x3aed48['domDocument']['createElement']('div');_0x5a80a9['append'](..._0x225913);const _0x5130d8=Array['from'](_0x3aed48['domChildrenToView'](_0x5a80a9));_0x5130d8['length']>0x1?_0x32c31b['_appendChild'](_0x5130d8):_0x32c31b=_0x5130d8[0x0];}}}if(_0x240163['customProperties']){for(const [_0x2986a7,_0x25036d]of _0x240163['customProperties'])_0x32c31b['_setCustomProperty'](_0x2986a7,_0x25036d);}const _0x2f46e4=void 0x0===_0x240163['fillerOffset']?null:_0x240163['fillerOffset'];return null!==_0x2f46e4&&(_0x32c31b['getFillerOffset']=()=>_0x2f46e4),_0x32c31b;}}['_makeModelFromViewString'](_0x5b3bf3){const _0x4b09e3=JSON['parse'](_0x5b3bf3),_0x5d5d20=this['editor']['editing']['view']['document'],_0x288b5a=new _0x5386e2(_0x5d5d20,_0x4b09e3['map'](_0x441501=>this['_getViewFromDiffObj'](_0x441501,!0x0)));return this['editor']['data']['toModel'](_0x288b5a);}['_removeRevisionMarkers'](_0x2fc8cc){return(_0x2fc8cc=_0x2fc8cc['filter'](_0x275324=>!_0x275324['name']||'revision-start'!==_0x275324['name']&&'revision-end'!==_0x275324['name']))['forEach'](_0x13c0b0=>{'string'!=typeof _0x13c0b0&&(_0x13c0b0['children']=this['_removeRevisionMarkers'](_0x13c0b0['children']),_0x13c0b0['attributes']=_0x13c0b0['attributes']['filter'](_0x2770e8=>!_0x2770e8[0x0]['startsWith']('data-revision-')));}),_0x2fc8cc;}}function g(_0x264a16,_0xc7c966,_0x5a3324){const t=_0x264a16['t'];switch(_0xc7c966){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'},_0x5a3324);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5a3324);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 _0x3edab6{['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[_0x2c4ff3,I,V,_0x1ac2a4];}constructor(_0x55d745){super(_0x55d745),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 _0x12d724=_0x3f13b1();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x12d724},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 _0x3521d3=this['repository']['getRevision'](0x0),_0x307b52=_0x3521d3&&null===_0x3521d3['creator']?_0x3521d3:null;if(this['_continueCurrentRevision']=!!_0x307b52&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x2a58c8=this['_source']['getCurrentRevisionId'](),_0x16696b=this['repository']['getRevision'](_0x2a58c8);if(_0x16696b)this['_startingVersion']=_0x16696b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x65b521=this['_source']['history']['_operations']['find'](_0x101241=>!_0x101241['_isInit']),_0x3f7bca=_0x65b521?_0x65b521['baseVersion']:this['_source']['history']['version'];_0x3521d3?(_0x3521d3['toVersion']<_0x3f7bca&&_0x3521d3['_update']({'toVersion':_0x3f7bca}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x307b52['id'],this['_startingVersion']=_0x307b52['fromVersion']):(this['_startingVersion']=_0x3521d3['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3f7bca,this['_continueCurrentRevision']=!0x1);}}else _0x307b52&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x307b52['toVersion'],this['editor']['model']['document']['history']['version']),_0x307b52['fromVersion']===_0x307b52['toVersion']?(0x0!==_0x307b52['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x307b52['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x307b52['id'],this['_startingVersion']=_0x307b52['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',_0x1f4694=>!_0x1f4694),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3efd9d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x516a34;for(const _0x14331d in _0x3efd9d){const _0x39dfa7=_0x14331d,_0x23859a=_0x3efd9d[_0x39dfa7];if('revisionHistoryLicenseKeyValid'==_0x23859a||'revisionHistoryLicenseKeyInvalid'==_0x23859a||'revisionHistoryLicenseKeyExpired'==_0x23859a||'revisionHistoryLicenseKeyDomainLimit'==_0x23859a||'revisionHistoryLicenseKeyNotAllowed'==_0x23859a||'revisionHistoryLicenseKeyEvaluationLimit'==_0x23859a||'revisionHistoryLicenseKeyTrialLimit'==_0x23859a||'revisionHistoryLicenseKeyUsageLimit'==_0x23859a){delete _0x3efd9d[_0x39dfa7],_0x516a34=_0x23859a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x516a34&&_0x3efd9d['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x516a34&&_0x3efd9d['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x516a34&&_0x3efd9d['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x516a34&&_0x3efd9d['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x516a34&&_0x3efd9d['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x516a34&&_0x3efd9d['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x516a34&&_0x3efd9d['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x271044=this['repository']['getRevision'](0x0),_0xb6ea84=await this['getRevisionDocumentData'](_0x271044),_0x2f33da=await this['getRevisionRootsAttributes'](_0x271044);this['_replaceEditorDataWithRevisionData'](_0xb6ea84,_0x2f33da);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3e27d0){this['_source']=_0x3e27d0;}async['update'](){const _0x32c397=await this['_source']['getLatestVersion']();if(_0x32c397>this['currentRevision']['toVersion']){await this['_loadState']();const _0x4a7ea6=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x32c397});_0x4a7ea6['authors']=_0x4a7ea6['authorsIds']['map'](_0x2c412b=>this['editor']['plugins']['get']('Users')['getUser'](_0x2c412b)),this['currentRevision']['_update'](_0x4a7ea6);}}async['saveRevision'](_0x3efd17={},_0xed3a5d=null){const _0x374567=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xed3a5d>this['currentRevision']['toVersion']&&(_0xed3a5d=null),null===_0xed3a5d&&(_0xed3a5d=await this['_source']['getLatestVersion']());const _0x336472=this['_getFromVersion'](_0xed3a5d),_0x5824c7=this['buildRevisionData']({'from':_0x336472,'to':_0xed3a5d});if(this['currentRevision']['toVersion']<_0xed3a5d){const _0x1a7a27=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xed3a5d,'to':_0xed3a5d});_0x1a7a27['authors']=[],_0x1a7a27['authorsIds']=[],_0x1a7a27['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1a7a27,!0x0),delete _0x1a7a27['authors'],_0x374567['push'](_0x1a7a27);}_0x3efd17['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x3efd17['name']=_0x3efd17['name']||null,_0x3efd17['id']=_0x3efd17['id']||_0x3f13b1(),_0x3efd17={..._0x3efd17,..._0x5824c7};const _0x24a185=this['addRevisionData'](_0x3efd17);_0x374567['push'](_0x3efd17);const _0x83e793=this['repository']['getIndex'](_0x24a185);if(0x0!==_0x83e793){const _0x35c506=this['repository']['getRevision'](_0x83e793-0x1);if(_0x35c506['fromVersion']!==_0xed3a5d){const _0x243c10=this['_revisionDataBuilder']['getData'](_0xed3a5d,_0x35c506['toVersion']),_0x4296f1={'id':_0x35c506['id'],'diffData':_0x243c10['diffData'],'authorsIds':_0x243c10['authorsIds'],'authors':_0x243c10['authorsIds']['map'](_0x74ab61=>this['editor']['plugins']['get']('Users')['getUser'](_0x74ab61)),'fromVersion':_0xed3a5d};_0x35c506===this['currentRevision']&&(_0x4296f1['createdAt']=new Date(_0x3efd17['createdAt']['getTime']()+0xa)),_0x35c506['_update'](_0x4296f1,!0x0),delete _0x4296f1['authors'],_0x374567['push'](_0x4296f1);}}if(this['adapter']){for(const _0xf1c828 of _0x374567)this['_bufferUpdate'](_0xf1c828['id'],_0xf1c828,!0x0);this['sendBufferedUpdates']();}return _0x24a185;}['addRevisionData'](_0x27a0c6){const _0x5e5fb9=this['repository']['createRevision'](_0x27a0c6);return this['adapter']&&_0x5e5fb9['on']('_update',(_0x24f906,_0x30b3a1,_0x13c4d4)=>{_0x13c4d4||(this['_bufferUpdate'](_0x30b3a1['id'],_0x30b3a1,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5e5fb9,this['_findInsertionIndex'](_0x5e5fb9)),_0x5e5fb9;}async['getRevisionDocumentData'](_0x4a1290){return await this['_utils']['loadRevisionData'](_0x4a1290,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4a1290);}async['getRevisionRootsAttributes'](_0x325eec){return await this['_utils']['loadRevisionData'](_0x325eec,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x325eec);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x187590=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x2ba0f6=0x0;_0x2ba0f6<_0x187590['length'];_0x2ba0f6++){const _0x51338c=_0x187590[_0x2ba0f6];let _0x3b4401=!0x1;for(const _0x5b6c10 of Object['keys'](_0x51338c))void 0x0===_0x51338c[_0x5b6c10]?delete _0x51338c[_0x5b6c10]:'id'!==_0x5b6c10&&(_0x3b4401=!0x0);_0x3b4401||(_0x187590[_0x2ba0f6]=null);}if(_0x187590=_0x187590['filter'](_0x1a1ab9=>null!==_0x1a1ab9),!_0x187590['length'])return;for(let _0x3c978c=0x0;_0x3c978c<_0x187590['length'];_0x3c978c++){const _0x51c317=_0x187590[_0x3c978c];void 0x0!==_0x51c317['fromVersion']&&void 0x0===_0x51c317['toVersion']&&(_0x51c317['toVersion']=this['repository']['getRevision'](_0x51c317['id'])['toVersion']),void 0x0!==_0x51c317['toVersion']&&void 0x0===_0x51c317['fromVersion']&&(_0x51c317['fromVersion']=this['repository']['getRevision'](_0x51c317['id'])['fromVersion']);}const _0x42f39d=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x187590,_0x42f39d)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x19cb95=>{if(_0x19cb95){for(const _0xff9937 of _0x19cb95)this['setRevisionData']({'id':_0xff9937['id'],'createdAt':_0xff9937['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x10eeb4=null,from:_0x17356f=null,to:_0x2d76d7=null}){_0x17356f=null!==_0x17356f?_0x17356f:_0x10eeb4['fromVersion'],_0x2d76d7=null!==_0x2d76d7?_0x2d76d7:_0x10eeb4['toVersion'];const _0x33d787=this['_revisionDataBuilder']['getData'](_0x17356f,_0x2d76d7),_0x4a6aef={'diffData':_0x33d787['diffData'],'authorsIds':_0x33d787['authorsIds'],'fromVersion':_0x17356f,'toVersion':_0x2d76d7};if(!_0x10eeb4||_0x2d76d7!==_0x10eeb4['toVersion']){const _0x2f0fd7=_0x2d76d7-0x1,_0x402066=this['_source']['history']['getOperation'](_0x2f0fd7);_0x4a6aef['createdAt']=_0x402066&&_0x402066['createdAt']||new Date();}if(this['_loadedStateData']&&_0x17356f===this['_loadedStateData']['fromVersion']){for(const _0x5204ad of this['_loadedStateData']['authors'])_0x4a6aef['authorsIds']['includes'](_0x5204ad['id'])||_0x4a6aef['authorsIds']['push'](_0x5204ad['id']);}return _0x4a6aef;}['_bufferUpdate'](_0x50459b,_0x427952,_0x3b890a){if(this['_bufferedUpdates']['has'](_0x50459b)){const _0x202216=this['_bufferedUpdates']['get'](_0x50459b);_0x427952=_0x3b890a?{..._0x202216,..._0x427952}:{..._0x427952,..._0x202216};}this['_bufferedUpdates']['set'](_0x50459b,_0x427952);}['setRevisionData'](_0x5dfd62){const _0x259b79=this['repository']['getRevision'](_0x5dfd62['id']);if(_0x5dfd62['createdAt']&&(_0x5dfd62['createdAt']=new Date(_0x5dfd62['createdAt'])),_0x5dfd62['authorsIds']){const _0x5860b4=this['editor']['plugins']['get']('Users');_0x5dfd62['authors']=_0x5dfd62['authorsIds']['map'](_0x2e77ee=>_0x5860b4['getUser'](_0x2e77ee));}_0x259b79['_update'](_0x5dfd62,!0x0);}['_createInitialRevision'](_0x3a3ddb){const _0x5af7dd=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5af7dd)this['_initialRevisionId']=_0x5af7dd['id'];else{const _0x6c0802=!this['editor']['model']['document']['roots']['find'](_0x3a2aaa=>this['editor']['model']['hasContent'](_0x3a2aaa)),_0xb764f2=this['editor']['plugins']['get']('Users')['me']['id'],_0x2d38e0=g(this['editor']['locale'],_0x6c0802?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3a3ddb,'to':_0x3a3ddb,'id':this['_initialRevisionId'],'name':_0x2d38e0,'creatorId':_0xb764f2});}}['_createCurrentRevision'](_0x129c80){const _0x251c1a=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x251c1a),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x129c80,'to':_0x129c80,'id':_0x251c1a,'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'](_0x5aeddd,_0x5d5b4e){let _0x46972f=this['editor']['config']['get']('initialData'),_0x59ede=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x46972f){_0x46972f={};for(const _0x59b221 of this['editor']['model']['document']['getRootNames']())_0x46972f[_0x59b221]='';}if('string'==typeof _0x46972f&&(_0x46972f={'main':_0x46972f}),void 0x0===_0x59ede){_0x59ede={};for(const _0x23ed80 of this['editor']['model']['document']['getRootNames']())_0x59ede[_0x23ed80]={};}let _0x153e15=!0x1;const _0x2f7a97=Object['keys'](_0x46972f),_0x12f025=Object['keys'](_0x5aeddd);for(const _0x184a6b of _0x2f7a97){if(_0x46972f[_0x184a6b]!==_0x5aeddd[_0x184a6b]&&''!==_0x46972f[_0x184a6b]['trim']()){_0x153e15=!0x0;break;}if(!_0x1306cd(_0x59ede[_0x184a6b],_0x5d5b4e[_0x184a6b])&&Object['keys'](_0x59ede[_0x184a6b])['length']>0x0){_0x153e15=!0x0;break;}}_0x153e15||(_0x153e15=_0x12f025['some'](_0x4f107d=>!this['editor']['model']['document']['getRoot'](_0x4f107d))),_0x153e15&&_0x16bf25('editor-initial-data-replaced-with-revision-data',{'editorData':_0x46972f,'editorRootsAttributes':_0x59ede,'revisionData':_0x5aeddd,'revisionRootsAttributes':_0x5d5b4e}),this['editor']['config']['set']('initialData',_0x5aeddd),this['editor']['config']['set']('rootsAttributes',_0x5d5b4e);}['_addPendingAction'](){if(!this['_pendingAction']){const _0xdf4484=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0xdf4484['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x284eab){const _0x2ee06a=this['repository']['getRevisions']();_0x2ee06a['reverse']();let _0x56462d=0x0;for(;_0x56462d<_0x2ee06a['length'];){const _0x428552=_0x2ee06a[_0x56462d];if(_0x428552===this['currentRevision']){_0x56462d++;continue;}if(_0x428552['id']===this['_initialRevisionId'])break;const _0x19bcf1=_0x284eab['toVersion']-_0x428552['toVersion']||_0x284eab['fromVersion']-_0x428552['fromVersion'];if(_0x19bcf1>0x0)break;if(_0x19bcf1<0x0)_0x56462d++;else{if(!_0x284eab['creator']&&_0x428552['creator'])break;if(_0x428552['creator']||!_0x284eab['creator']){if(_0x284eab['createdAt']>_0x428552['createdAt'])break;_0x56462d++;}else _0x56462d++;}}return _0x56462d;}['_getFromVersion'](_0x5af19a){const _0x10cc6e=this['repository']['getRevisions']();_0x10cc6e['reverse'](),_0x10cc6e['shift']();const _0x3ca832=_0x10cc6e['find'](_0x2bfb42=>_0x2bfb42['toVersion']<=_0x5af19a)['toVersion'];return _0x3ca832<this['_startingVersion']?this['_startingVersion']:_0x3ca832;}['_makeRevision']({name:_0x2d1e30,from:_0x52f82f,to:_0x1ade95,creatorId:_0x40c0d5,id:_0x94aae6}){const _0x4dd591=this['buildRevisionData']({'from':_0x52f82f,'to':_0x1ade95});_0x4dd591['name']=_0x2d1e30,_0x4dd591['creatorId']=_0x40c0d5,_0x4dd591['id']=_0x94aae6;const _0x5837b0=this['addRevisionData'](_0x4dd591);return this['adapter']&&this['_bufferUpdate'](_0x4dd591['id'],_0x4dd591,!0x0),_0x5837b0;}['_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(_0x8392a6){this['editor']=_0x8392a6,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'](_0x40caf4){this['source']=_0x40caf4;const _0x34f8f7=new Map(),_0x426807=new Map(),_0x5e0888=this['editor']['model']['document']['roots']['map'](_0x38f2c4=>_0x38f2c4['rootName']);for(const _0x3c51e0 of _0x5e0888){const _0x1807af=this['editor']['model']['document']['getRoot'](_0x3c51e0),_0x3c0b0e=N(_0x1807af);_0x34f8f7['set'](_0x3c51e0,_0x3c0b0e),_0x426807['set'](_0x3c51e0,Object['fromEntries'](_0x1807af['getAttributes']()));}const _0x315483=Array['from'](this['editor']['model']['markers'])['map'](_0x52c1e3=>[_0x52c1e3['name'],_0x52c1e3['getRange']()]),_0xe08a89=this['source']['version'];this['_saveMetaData'](_0xe08a89,_0x34f8f7,_0x315483,_0x426807),this['_startingRevisionId']=this['_revisionId'];const _0x561b26=new Map(),_0x1ae79c=new Map();for(const _0x3f929 of _0x5e0888){const _0x4f0739=P(_0x3f929);_0x561b26['set'](_0x3f929,_0x4f0739),_0x1ae79c['set'](_0x3f929,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x561b26,[],_0x1ae79c);}['getData'](_0xa42415,_0x5d970f){if(this['_lastFrom']===_0xa42415&&this['_lastTo']<=_0x5d970f)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5d970f,!0x0);else{if(!this['_savedMetaData']['has'](_0xa42415)){const _0xe2f5dd=this['_getPreviousFrom'](_0xa42415);this['_calculateMetaData'](_0xe2f5dd,_0xa42415,!0x1);}this['_calculateMetaData'](_0xa42415,_0x5d970f,!0x0);}return this['_lastFrom']=_0xa42415,this['_lastTo']=_0x5d970f,this['_getState']();}['loadState'](_0x2dd139){const _0x3199fa=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x2dd139['fromVersion'],this['_lastTo']=_0x2dd139['toVersion'];for(const _0x4ac1df in _0x2dd139['diffData']){const _0x3f5a07=_0x2dd139['diffData'][_0x4ac1df]['attachChange'],_0x4b79eb=_0x4d0c8a(_0x2dd139['diffData'][_0x4ac1df]['attributesBefore'])||{},_0xec6e35=_0x3199fa['_makeModelFromViewString'](_0x2dd139['diffData'][_0x4ac1df]['deletions']);_0xec6e35['rootName']=_0x4ac1df,_0xec6e35['_isAttached']=!_0x3f5a07||!_0x3f5a07['isAttached'],_0xec6e35['isAttached']=()=>_0xec6e35['_isAttached'],this['_baseRoots']['set'](_0x4ac1df,_0xec6e35),this['_baseRootsAttributes']['set'](_0x4ac1df,_0x4b79eb),_0x3f5a07&&this['_touchedRoots']['set'](_0x4ac1df,_0x3f5a07);const _0x47376e=this['_makeIdsRoot'](_0xec6e35);this['_baseIdsRoots']['set'](_0x4ac1df,_0x47376e);for(const [_0x28e642,_0x2bf62d]of _0xec6e35['markers']){if(!_0x28e642['startsWith']('revision:'))continue;const _0x1efb5f=_0x28e642['split'](':')[0x2];for(const _0x534a39 of _0x2bf62d['getWalker']({'singleCharacters':!0x0})){const _0x2418a1=this['_getVidAttributeName'](_0x534a39),_0x3df114='elementEnd'==_0x534a39['type']?_0x534a39['previousPosition']['path']['slice'](0x0,-0x1):_0x534a39['previousPosition']['path'],_0x18db03=_0x47376e['getNodeByPath'](_0x3df114)['getAttribute'](_0x2418a1);this['_touched']['set'](_0x18db03,{'userId':_0x1efb5f});}}}this['_startingRevisionId']=this['_revisionId'];const _0x48f472=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5a6019=>!this['_touched']['has'](_0x5a6019));let _0x185a69=0x0;const _0x4f55fb=new Map();for(const _0x51f943 in _0x2dd139['diffData']){const _0x7545f3=_0x2dd139['diffData'][_0x51f943]['attachChange'],_0x5c251a=_0x4d0c8a(_0x2dd139['diffData'][_0x51f943]['attributesAfter'])||{},_0x55f377=_0x3199fa['_makeModelFromViewString'](_0x2dd139['diffData'][_0x51f943]['insertions']);_0x55f377['rootName']=_0x51f943,_0x55f377['_isAttached']=!_0x7545f3||_0x7545f3['isAttached'],_0x55f377['isAttached']=()=>_0x55f377['_isAttached'],this['_diffRoots']['set'](_0x51f943,_0x55f377),this['_diffRootsAttributes']['set'](_0x51f943,_0x5c251a);const _0x208db4=this['_makeIdsRoot'](_0x55f377,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x51f943,_0x208db4),_0x4f55fb['set'](_0x51f943,_0x55f377['isAttached']()?_0x5c251a:{});for(const [_0x3c1184,_0x3d5a57]of _0x55f377['markers']){if(!_0x3c1184['startsWith']('revision:'))continue;const _0x59312f=_0x3c1184['split'](':')[0x2];for(const _0x67e659 of _0x3d5a57['getWalker']({'singleCharacters':!0x0})){const _0x4571e4=this['_getVidAttributeName'](_0x67e659),_0x46cc35=this['_revisionId']++,_0x2ca11d='elementEnd'==_0x67e659['type']?_0x67e659['previousPosition']['path']['slice'](0x0,-0x1):_0x67e659['previousPosition']['path'];_0x208db4['getNodeByPath'](_0x2ca11d)['_setAttribute'](_0x4571e4,_0x46cc35),this['_touched']['set'](_0x46cc35,{'userId':_0x59312f});}}for(const _0xd59ce4 of this['editor']['model']['createRangeIn'](_0x55f377)['getWalker']({'singleCharacters':!0x0})){const _0x2708c7=this['_getVidAttributeName'](_0xd59ce4),_0x3b046f='elementEnd'==_0xd59ce4['type']?_0xd59ce4['previousPosition']['path']['slice'](0x0,-0x1):_0xd59ce4['previousPosition']['path'],_0x4b9bc1=_0x208db4['getNodeByPath'](_0x3b046f);_0x4b9bc1['getAttribute'](_0x2708c7)>0x0||_0x4b9bc1['_setAttribute'](_0x2708c7,_0x48f472[_0x185a69++]);}for(const [_0x452fdf,_0x1fcf53]of _0x55f377['markers'])_0x452fdf['startsWith']('revision:')||this['_markers']['set'](_0x452fdf,_0x1fcf53);}const _0x5152c3=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x5152c3),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5152c3,0x1));const _0x4ef602=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x4ef602),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4ef602,0x1));const _0x43d132=Array['from'](this['_diffRoots'])['map'](([_0x1a307f,_0x5968d0])=>[_0x1a307f,N(_0x5968d0)]);this['_saveMetaData'](this['_lastTo'],_0x43d132,this['_markers'],_0x4f55fb);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x52afa3,_0x40bf62,_0x300e3d,_0x5abfe4){const _0x38c527=new Map(_0x40bf62),_0x4a0c6d=new Map(_0x4d0c8a(_0x5abfe4)),_0x4d196c=new Map();for(const [_0x53f54e,_0x3788c1]of _0x300e3d)_0x4d196c['set'](_0x53f54e,{'start':_0x3788c1['start']['clone'](),'end':_0x3788c1['end']['clone'](),'rootName':_0x3788c1['root']['rootName']});this['_savedMetaData']['set'](_0x52afa3,{'roots':_0x38c527,'markers':_0x4d196c,'rootsAttributes':_0x4a0c6d});}['_removeMetaData'](_0x19ed61){this['_savedMetaData']['delete'](_0x19ed61);}['_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'](_0x10890c,_0x3973bb=null){let _0x3645a2=null;_0x10890c['is']('documentFragment')||(_0x3645a2=new ut(_0x10890c['name'],{'vid_start':null===_0x3973bb?this['_revisionId']++:_0x3973bb++}));const _0x3f0174=[];for(const _0x54bad6 of _0x10890c['getChildren']())if(_0x54bad6['is']('element')){_0x3f0174['push'](this['_makeIdsRoot'](_0x54bad6,_0x3973bb));const _0x41843b=_0x3f0174[_0x3f0174['length']-0x1];null!==_0x3973bb&&(_0x3973bb=_0x41843b['is']('element','$text')?_0x41843b['getAttribute']('vid')+0x1:_0x41843b['getAttribute']('vid_end')+0x1);}else{for(let _0x4203cb=0x0;_0x4203cb<_0x54bad6['offsetSize'];_0x4203cb++)_0x3f0174['push'](new ut('$text',{'vid':null===_0x3973bb?this['_revisionId']++:_0x3973bb++}));}if(_0x10890c['is']('documentFragment')){const _0x393719=P(_0x10890c['rootName']);return _0x393719['_insertChild'](0x0,_0x3f0174),_0x393719;}return _0x3645a2['_setAttribute']('vid_end',null===_0x3973bb?this['_revisionId']++:_0x3973bb++),_0x3645a2['_insertChild'](0x0,_0x3f0174),_0x3645a2;}['_calculateMetaData'](_0x33b2c7,_0x548bcb,_0x5863e2){this['_reset']();const {roots:_0xce8306,markers:_0x427313,rootsAttributes:_0xd858ca}=this['_savedMetaData']['get'](_0x33b2c7);this['_baseRoots']=new Map(_0xce8306),this['_baseRootsAttributes']=new Map(_0x4d0c8a(_0xd858ca));for(const [_0x53d9f5,_0x1a2fde]of this['_baseRoots'])if('$graveyard'!==_0x53d9f5&&(this['_diffRoots']['set'](_0x53d9f5,N(_0x1a2fde)),this['_diffRootsAttributes']=new Map(_0x4d0c8a(_0xd858ca)),_0x5863e2)){const _0x263bd3=this['_revisionId'];this['_idsRoots']['set'](_0x53d9f5,this['_makeIdsRoot'](_0x1a2fde)),this['_baseIdsRoots']['set'](_0x53d9f5,this['_makeIdsRoot'](_0x1a2fde,_0x263bd3));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x5863e2&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0xd196af,_0x193300]of _0x427313){const _0x4bc029=this['_baseRoots']['get'](_0x193300['rootName']),_0x33fa00=this['_diffRoots']['get'](_0x193300['rootName']),_0x337545=new lt(this['_fixPosition'](_0x193300['start'],_0x4bc029),this['_fixPosition'](_0x193300['end'],_0x4bc029)),_0x26e28e=this['_fixRange'](_0x337545,_0x33fa00);_0x4bc029['markers']['set'](_0xd196af,_0x337545),this['_markers']['set'](_0xd196af,_0x26e28e);}this['_applyOperations'](_0x33b2c7,_0x548bcb,_0x5863e2);}['_applyOperations'](_0x4b70b4,_0xe12572,_0x3d1fd9){for(const _0x4ea064 of this['source']['getOperations'](_0x4b70b4,_0xe12572))this['_handleOperation'](_0x4ea064,_0x3d1fd9);for(const _0x29a64a of this['_diffRoots']['values']())_0x29a64a['markers']['clear']();for(const [_0x54328a,_0x2025b6]of this['_markers']){this['_diffRoots']['get'](_0x2025b6['root']['rootName'])['markers']['set'](_0x54328a,_0x2025b6['clone']());}const _0x4c4e2e=new Map(),_0x3ca483=new Map();for(const [_0x126788,_0x20b2e8]of this['_diffRoots'])_0x4c4e2e['set'](_0x126788,N(_0x20b2e8)),_0x3ca483['set'](_0x126788,this['_diffRootsAttributes']['get'](_0x126788));this['_saveMetaData'](_0xe12572,_0x4c4e2e,this['_markers'],_0x3ca483);}['_getPreviousFrom'](_0x1c27a8){const _0x4e19b3=Array['from'](this['_savedMetaData']['keys']());_0x4e19b3['sort']((_0x31cad1,_0x1b8dc6)=>_0x31cad1-_0x1b8dc6),_0x4e19b3['reverse']();for(const _0x3c21c7 of _0x4e19b3)if(_0x3c21c7<_0x1c27a8)return _0x3c21c7;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xdca976,_0x1e8bac){const _0x2b3008=Array['from'](_0x1e8bac['markers'])['map'](([_0x2890a1,_0x31c429])=>[_0x2890a1,this['_fixRange'](_0x31c429,_0xdca976)]);_0xdca976['markers']=new Map(_0x2b3008);}['_transformMarkers'](_0x259e40){for(const _0x347cb2 of this['_markers']['values']()){const _0x1713a7=_0x347cb2['getTransformedByOperation'](_0x259e40),_0x573275=lt['_createFromRanges'](_0x1713a7);_0x347cb2['start']=_0x573275['start'],_0x347cb2['end']=_0x573275['end'];}}['_handleOperation'](_0x4729e2,_0x9db045){if('addRoot'!=_0x4729e2['type']&&'detachRoot'!=_0x4729e2['type']){if('insert'==_0x4729e2['type']){const _0x33ec19=_0x4729e2['position']['root']['rootName'];this['_diffRoots']['has'](_0x33ec19)||(this['_diffRoots']['set'](_0x33ec19,P(_0x33ec19,!0x0)),this['_diffRootsAttributes']['set'](_0x33ec19,{}),_0x9db045&&this['_idsRoots']['set'](_0x33ec19,P(_0x33ec19,!0x0)));}else{if('addRootAttribute'==_0x4729e2['type']||'removeRootAttribute'==_0x4729e2['type']||'changeRootAttribute'==_0x4729e2['type'])return void this['_handleRootAttributeOperation'](_0x4729e2);'marker'==_0x4729e2['type']&&this['_handleMarkerOperation'](_0x4729e2);}if('marker'!==_0x4729e2['type']){const _0x5c8ee7=this['_cloneOperation'](_0x4729e2,this['_diffRoots']);_0x5c8ee7['_execute'](),this['_transformMarkers'](_0x5c8ee7);}if(_0x9db045)switch(_0x4729e2['type']){case'insert':this['_handleInsertOperation'](_0x4729e2);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4729e2);break;case'merge':this['_handleMergeOperation'](_0x4729e2);break;case'split':this['_handleSplitOperation'](_0x4729e2);}}else this['_handleRootOperation'](_0x4729e2,_0x9db045);}['_cloneOperation'](_0x40301c,_0x45eea3){const _0x2c1097=_0x40301c['clone']();return _0x2c1097['_authorId']=_0x40301c['_authorId'],this['_fixOperation'](_0x2c1097,_0x45eea3),_0x2c1097;}['_getBaseVids'](_0x372601){return _0x372601['map'](_0x23ef59=>{const _0x4f7da8=this['_getVidAttributeName'](_0x23ef59);return Number(_0x23ef59['item']['getAttribute'](_0x4f7da8));});}['_generateTape'](_0x439448,_0x3b9bec){if(_0x439448['is']('element','$text'))_0x3b9bec['push']({'item':_0x439448,'type':'text'});else{_0x439448['is']('element')&&_0x3b9bec['push']({'item':_0x439448,'type':'elementStart'});for(const _0x33d7d3 of _0x439448['getChildren']())this['_generateTape'](_0x33d7d3,_0x3b9bec);_0x439448['is']('element')&&_0x3b9bec['push']({'item':_0x439448,'type':'elementEnd'});}return _0x3b9bec;}['_getState'](){const _0x318f1a=new Map(this['_touched']),_0x5ed827=new Map(_0x318f1a),_0x293285=new Map(),_0x4dd2d7={'insertions':{},'deletions':{}},_0x313e1b={'insertions':{},'deletions':{}},_0x424d9e=new Map(),_0x3269f7=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3269f7['delete']('$graveyard');for(const _0x465401 of _0x3269f7){const _0x3b1333=this['_diffRoots']['get'](_0x465401)||P(_0x465401,!0x1),_0x5b1f77=this['_baseRoots']['get'](_0x465401)||P(_0x465401,!0x1);_0x3b1333['isAttached']()||_0x5b1f77['isAttached']()?(_0x4dd2d7['insertions'][_0x465401]=N(_0x3b1333),_0x4dd2d7['deletions'][_0x465401]=N(_0x5b1f77),this['_copyMarkers'](_0x4dd2d7['deletions'][_0x465401],_0x5b1f77),this['_copyMarkers'](_0x4dd2d7['insertions'][_0x465401],_0x3b1333),_0x313e1b['insertions'][_0x465401]=this['_generateTape'](this['_idsRoots']['get'](_0x465401),[]),_0x313e1b['deletions'][_0x465401]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x465401)||P(_0x465401,!0x1),[])):_0x3269f7['delete'](_0x465401);}for(const _0x13262e of _0x3269f7){const _0x3f7a15=_0x313e1b['insertions'][_0x13262e];for(const _0x445d48 of _0x3f7a15){const _0x401d35=this['_getVidAttributeName'](_0x445d48),_0xcb49de=_0x445d48['item']['getAttribute'](_0x401d35);_0x5ed827['delete'](_0xcb49de),_0xcb49de>=this['_startingRevisionId']&&_0x293285['set'](_0xcb49de,_0x318f1a['get'](_0xcb49de));}}for(const _0x24c85c of _0x3269f7){const _0xc663a=_0x313e1b['insertions'][_0x24c85c],_0x4cd9b1=this['_getBaseVids'](_0x313e1b['deletions'][_0x24c85c]);let _0x32ba21=0x0;for(const _0x30a530 of _0xc663a){const _0x2eb813=this['_getVidAttributeName'](_0x30a530),_0xe5693c=_0x30a530['item']['getAttribute'](_0x2eb813);if(!_0x293285['has'](_0xe5693c)&&!_0x424d9e['has'](_0xe5693c)){if(_0x5ed827['has'](_0xe5693c))_0x32ba21++;else{if(_0xe5693c!=_0x4cd9b1[_0x32ba21]){const _0x8d38be=_0x318f1a['get'](_0xe5693c)||_0x318f1a['get'](_0x4cd9b1[_0x32ba21]);for(;_0xe5693c!=_0x4cd9b1[_0x32ba21];)_0x5ed827['has'](_0x4cd9b1[_0x32ba21])||(_0x424d9e['set'](_0x4cd9b1[_0x32ba21],_0x8d38be),_0x318f1a['set'](_0x4cd9b1[_0x32ba21],_0x8d38be)),_0x32ba21++;}_0x32ba21++;}}}}for(const _0x5e712c of _0x3269f7){const _0x593fb4=_0x313e1b['insertions'][_0x5e712c];for(const _0x3590b1 of _0x593fb4){const _0x3f38c5=this['_getVidAttributeName'](_0x3590b1),_0x4eb7f4=_0x3590b1['item']['getAttribute'](_0x3f38c5);if(_0x424d9e['has'](_0x4eb7f4)){const _0x50ee0e=_0x424d9e['get'](_0x4eb7f4);_0x5ed827['has'](_0x4eb7f4)||_0x5ed827['set'](_0x4eb7f4,{..._0x50ee0e}),_0x293285['set'](_0x4eb7f4,{..._0x50ee0e});}}}for(const _0x68cb0 of _0x5ed827['keys']())_0x68cb0>=this['_startingRevisionId']&&_0x5ed827['delete'](_0x68cb0);const _0x1788bc=new Map();for(const _0x20e2d9 of _0x3269f7){let _0x5332cc=_0x313e1b['insertions'][_0x20e2d9];for(const _0x9f397b of _0x5332cc)if(_0x9f397b['item']['is']('element','tableCell')){const _0x5d2377=this['_getVidAttributeName'](_0x9f397b),_0x19c823=_0x9f397b['item']['getAttribute'](_0x5d2377);if(_0x293285['has'](_0x19c823)){const _0x4a5f37=_0x9f397b['item']['parent']['parent']['getAttribute']('vid_start'),_0x45698f=_0x1788bc['get'](_0x4a5f37)||new Set();_0x45698f['add'](_0x293285['get'](_0x19c823)['userId']),_0x1788bc['set'](_0x4a5f37,_0x45698f);}}_0x5332cc=_0x313e1b['deletions'][_0x20e2d9];for(const _0xd0db7 of _0x5332cc)if(_0xd0db7['item']['is']('element','tableCell')){const _0x78e327=this['_getVidAttributeName'](_0xd0db7),_0x5f32ad=_0xd0db7['item']['getAttribute'](_0x78e327);if(_0x5ed827['has'](_0x5f32ad)){const _0x2e5f65=_0xd0db7['item']['parent']['parent']['getAttribute']('vid_start'),_0x161b97=_0x1788bc['get'](_0x2e5f65)||new Set();_0x161b97['add'](_0x5ed827['get'](_0x5f32ad)['userId']),_0x1788bc['set'](_0x2e5f65,_0x161b97);}}for(const _0x3f37a0 of _0x1788bc['keys']())(_0x293285['has'](_0x3f37a0)||_0x5ed827['has'](_0x3f37a0))&&_0x1788bc['delete'](_0x3f37a0);}for(const _0x3db5a0 of _0x3269f7){const _0x577d6f=_0x313e1b['insertions'][_0x3db5a0];let _0x5444b3=null,_0x12a927=null;for(const _0x2eac21 of _0x577d6f){const _0xdd1051=this['_getVidAttributeName'](_0x2eac21),_0x24da05=_0x2eac21['item']['getAttribute'](_0xdd1051),_0x588888=_0x1788bc['get'](_0x24da05);_0x588888&&'elementStart'==_0x2eac21['type']&&(_0x5444b3=Array['from'](_0x588888)[0x0],_0x12a927=_0x2eac21['item']['getAttribute']('vid_end')),_0x5444b3&&(_0x5ed827['set'](_0x24da05,{'userId':_0x5444b3}),_0x293285['set'](_0x24da05,{'userId':_0x5444b3})),_0x24da05==_0x12a927&&(_0x5444b3=null,_0x12a927=null);}}const _0x41fe00={},_0x4c365f=new Set();for(const _0x9900e8 of _0x3269f7){const _0x1ed8fd=_0x4dd2d7['deletions'][_0x9900e8],_0x2123a2=_0x4dd2d7['insertions'][_0x9900e8];for(const {userId:_0x9b7b6f}of this['_touchedMarkers']['values']())null!==_0x9b7b6f&&_0x4c365f['add'](_0x9b7b6f);for(const {userId:_0x19c412}of this['_touchedRoots']['values']())null!==_0x19c412&&_0x4c365f['add'](_0x19c412);this['_markChanges'](_0x2123a2,_0x313e1b['insertions'][_0x9900e8],_0x293285,'insertion',_0x4c365f),this['_markChanges'](_0x1ed8fd,_0x313e1b['deletions'][_0x9900e8],_0x5ed827,'deletion',_0x4c365f),_0x41fe00[_0x9900e8]={'insertions':this['_prepareViewToSave'](_0x2123a2),'deletions':this['_prepareViewToSave'](_0x1ed8fd),'attachChange':this['_touchedRoots']['get'](_0x9900e8)||null,'attributesBefore':_0x4d0c8a(this['_baseRootsAttributes']['get'](_0x9900e8))||{},'attributesAfter':_0x4d0c8a(this['_diffRootsAttributes']['get'](_0x9900e8))};}return{'diffData':_0x41fe00,'authorsIds':Array['from'](_0x4c365f)};}['_processRootBeforeSave'](_0x160ee7){for(const [,_0x4d2f4d]of _0x160ee7['markers']){const _0x5ba31c=_0x4d2f4d['start']['getAncestors']()['filter'](_0x1a6300=>'tableCell'==_0x1a6300['name']);for(const _0x7c6a of _0x5ba31c)0x1==_0x7c6a['childCount']&&_0x7c6a['getChild'](0x0)['is']('element','paragraph')&&_0x7c6a['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x435153){this['_processRootBeforeSave'](_0x435153);const _0x56e84b=this['editor']['data']['toView'](_0x435153,{}),_0x49b7c4=Array['from'](_0x56e84b['getChildren']())['map'](_0x39a181=>this['_getViewJson'](_0x39a181));return JSON['stringify'](_0x49b7c4);}['_getViewJson'](_0x811eaf){if(_0x811eaf['is']('$text'))return _0x811eaf['data'];{const _0xc80f71=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xc7a455=_0x811eaf,_0x4ee548=this['editor']['data']['htmlProcessor']['domConverter'],_0x2dda6a={'type':_0xc80f71['_getTypeCharForViewElement'](_0xc7a455),'name':_0xc7a455['name'],'attributes':Array['from'](_0xc7a455['getAttributes']()),'children':Array['from'](_0xc7a455['getChildren']())['map'](_0x295928=>this['_getViewJson'](_0x295928))};if(_0x811eaf['is']('uiElement')&&'$comment'!=_0x811eaf['name']){const _0x2763a7=_0x811eaf['render'](_0x4ee548['domDocument'],_0x4ee548);_0x2dda6a['children']['push'](_0x2763a7['outerHTML']);}else{if(_0x811eaf['is']('rawElement')){const _0xbb6e92=_0x4ee548['domDocument']['createElement'](_0xc7a455['name']);_0x811eaf['render'](_0xbb6e92,_0x4ee548),_0x2dda6a['children']['push'](_0xbb6e92['innerHTML']);}}const _0x47a2a0=Array['from'](_0xc7a455['getCustomProperties']());_0x47a2a0['length']>0x0&&(_0x2dda6a['customProperties']=_0x47a2a0);const _0x4098fe=_0xc7a455['getFillerOffset']();return null!==_0x4098fe&&(_0x2dda6a['fillerOffset']=_0x4098fe),_0x2dda6a;}}['_markChanges'](_0x16d388,_0x52f4c7,_0x465b1e,_0x3dab8c,_0x2b52e6){let _0x3a0077=null,_0x1a1b77=null,_0x1803ae=0x0;const _0x311a29=this['editor']['model'];for(let _0x792974=0x0;_0x792974<_0x52f4c7['length'];_0x792974++){const _0x27e2b9=this['_getVidAttributeName'](_0x52f4c7[_0x792974]),_0x7871cb=_0x52f4c7[_0x792974]['item']['getAttribute'](_0x27e2b9),_0x21871c=_0x465b1e['get'](_0x7871cb),_0x238a31=_0x792974==_0x52f4c7['length']-0x1;(!_0x3a0077&&_0x21871c&&(_0x3a0077=_0x21871c,_0x1a1b77=_0x52f4c7[_0x792974]),_0x3a0077&&(!_0x21871c||_0x21871c['userId']!=_0x3a0077['userId']))&&(_0x25758b(_0x21871c,F(_0x1a1b77,_0x16d388,_0x311a29),F(_0x52f4c7[_0x792974],_0x16d388,_0x311a29)),_0x3a0077=_0x21871c||null,_0x1a1b77=_0x21871c?_0x52f4c7[_0x792974]:null),_0x3a0077&&_0x238a31&&_0x25758b(_0x21871c,F(_0x1a1b77,_0x16d388,_0x311a29),B(_0x52f4c7[_0x792974],_0x16d388,_0x311a29));}function _0x25758b(_0x44875f,_0x504645,_0x15edef){const _0x977293=_0x3a0077['userId'],_0xe69ed3='revision:'+_0x3dab8c+':'+_0x977293+':'+_0x1803ae++,_0x301677=_0x311a29['createRange'](_0x504645,_0x15edef);_0x16d388['markers']['set'](_0xe69ed3,_0x301677),null!==_0x977293&&_0x2b52e6['add'](_0x977293);}}['_getVidAttributeName'](_0x167d14){switch(_0x167d14['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x575e49,_0x57cf58){_0x575e49['baseVersion']=null;for(const _0x137419 in _0x575e49){const _0xd0a3d7=_0x575e49[_0x137419];if(_0xd0a3d7 instanceof ft){const _0x201e21=_0x57cf58['get'](_0xd0a3d7['root']['rootName']);_0x575e49[_0x137419]=this['_fixPosition'](_0xd0a3d7,_0x201e21);}if(_0xd0a3d7 instanceof lt){const _0xfe6323=_0x57cf58['get'](_0xd0a3d7['root']['rootName']);_0x575e49[_0x137419]=this['_fixRange'](_0xd0a3d7,_0xfe6323);}'root'===_0x137419&&(_0x575e49['root']=_0x57cf58['get'](_0x575e49['root']['rootName']));}}['_fixRange'](_0x293cb1,_0x1c7295){return this['editor']['model']['createRange'](this['_fixPosition'](_0x293cb1['start'],_0x1c7295),this['_fixPosition'](_0x293cb1['end'],_0x1c7295));}['_fixPosition'](_0x1ed84a,_0x1af8aa){return this['editor']['model']['createPositionFromPath'](_0x1af8aa,_0x1ed84a['path'],_0x1ed84a['stickiness']);}['_handleInsertOperation'](_0x353613){const _0x33029e=this['_idsRoots']['get'](_0x353613['position']['root']['rootName']),_0x35f92d=this['_fixPosition'](_0x353613['position'],_0x33029e),_0x2b5fba=null===_0x353613['_authorId']?null:_0x353613['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xf3c0e7=_0x35f92d['parent'],_0x13b89c=this['_revisionId'],_0xbee714=[];for(const _0x33cf87 of _0x353613['nodes'])if(_0x33cf87['is']('element'))_0xbee714['push'](this['_makeIdsRoot'](_0x33cf87));else{for(let _0x497fc5=0x0;_0x497fc5<_0x33cf87['offsetSize'];_0x497fc5++)_0xbee714['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x5bbe22=this['_revisionId'];for(let _0x4da636=_0x13b89c;_0x4da636<_0x5bbe22;_0x4da636++)this['_touched']['set'](_0x4da636,{'userId':_0x2b5fba});_0xf3c0e7['_insertChild'](_0x35f92d['offset'],_0xbee714);}['_handleMoveOperation'](_0x565f3e){(_0x565f3e=this['_cloneOperation'](_0x565f3e,this['_idsRoots']))['_execute']();const _0x5e5343=null===_0x565f3e['_authorId']?null:_0x565f3e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x470f66=_0x565f3e['getMovedRangeStart'](),_0x3e6e0d=_0x470f66['parent'],_0x3e6c7c=_0x470f66['offset'];!function _0x8ceb12(_0x2b27a4,_0x5225cc,_0x5744af,_0x123ff1){for(let _0xb2985a=_0x5744af;_0xb2985a<_0x123ff1;_0xb2985a++){const _0x49f11b=_0x5225cc['getChild'](_0xb2985a);_0x49f11b['is']('element','$text')?_0x2b27a4['set'](_0x49f11b['getAttribute']('vid'),{'userId':_0x5e5343}):(_0x2b27a4['set'](_0x49f11b['getAttribute']('vid_start'),{'userId':_0x5e5343}),_0x8ceb12(_0x2b27a4,_0x49f11b,0x0,_0x49f11b['childCount']),_0x2b27a4['set'](_0x49f11b['getAttribute']('vid_end'),{'userId':_0x5e5343}));}}(this['_touched'],_0x3e6e0d,_0x3e6c7c,_0x3e6c7c+_0x565f3e['howMany']);}['_handleMergeOperation'](_0x17c83d){const _0x2c2bf6=null===(_0x17c83d=this['_cloneOperation'](_0x17c83d,this['_idsRoots']))['_authorId']?null:_0x17c83d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2fe5b4=_0x17c83d['targetPosition']['parent'],_0x1360af=_0x17c83d['sourcePosition']['parent'],_0x2fe112=_0x2fe5b4['getAttribute']('vid_end'),_0x161f74=_0x1360af['getAttribute']('vid_start');_0x2fe5b4['_setAttribute']('vid_end',_0x1360af['getAttribute']('vid_end')),_0x1360af['_setAttribute']('vid_end',_0x2fe112),this['_touched']['set'](_0x161f74,{'userId':_0x2c2bf6}),this['_touched']['set'](_0x2fe112,{'userId':_0x2c2bf6}),_0x17c83d['_execute']();}['_handleSplitOperation'](_0x104613){const _0x31bdc3=null===(_0x104613=this['_cloneOperation'](_0x104613,this['_idsRoots']))['_authorId']?null:_0x104613['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xa007b9=_0x104613['graveyardPosition'],_0x440754=_0x104613['splitPosition']['parent'];_0x104613['_execute']();const _0x4de571=_0x440754['getAttribute']('vid_end'),_0x214c1d=_0x104613['insertionPosition']['nodeAfter'];if(_0xa007b9){const _0x458d55=_0x214c1d['getAttribute']('vid_end'),_0x804d4a=_0x440754['getAttribute']('vid_end');_0x440754['_setAttribute']('vid_end',_0x458d55),_0x214c1d['_setAttribute']('vid_end',_0x804d4a),this['_touched']['set'](_0x440754['getAttribute']('vid_end'),{'userId':_0x31bdc3}),this['_touched']['set'](_0x214c1d['getAttribute']('vid_start'),{'userId':_0x31bdc3});}else{const _0x5e2f14=this['_revisionId']++,_0x5d1eb0=this['_revisionId']++;_0x440754['_setAttribute']('vid_end',_0x5e2f14),_0x214c1d['_setAttribute']('vid_start',_0x5d1eb0),_0x214c1d['_setAttribute']('vid_end',_0x4de571),this['_touched']['set'](_0x5e2f14,{'userId':_0x31bdc3}),this['_touched']['set'](_0x5d1eb0,{'userId':_0x31bdc3});}}['_handleMarkerOperation'](_0x5bc87a){if(!_0x5bc87a['affectsData'])return;const _0x26c757=(_0x5bc87a=this['_cloneOperation'](_0x5bc87a,this['_diffRoots']))['oldRange']?_0x5bc87a['oldRange']['root']:null,_0x2b7401=_0x5bc87a['newRange']?_0x5bc87a['newRange']['root']:null;_0x26c757&&this['_markers']['delete'](_0x5bc87a['name']),_0x2b7401&&this['_markers']['set'](_0x5bc87a['name'],_0x5bc87a['newRange']['clone']());const _0x3ddef9=null===_0x5bc87a['_authorId']?null:_0x5bc87a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x514f75=_0x5bc87a['name'];if(!this['_touchedMarkers']['has'](_0x514f75))return void this['_touchedMarkers']['set'](_0x514f75,{'range':_0x5bc87a['oldRange'],'userId':_0x3ddef9});const _0x5050cb=this['_touchedMarkers']['get'](_0x514f75),_0x3f5df1=_0x5050cb['range'],_0x34c109=_0x5bc87a['newRange'];null==_0x3f5df1&&null==_0x34c109||_0x3f5df1&&_0x34c109&&_0x3f5df1['isEqual'](_0x34c109)?this['_touchedMarkers']['delete'](_0x5bc87a['name']):_0x5050cb['userId']=_0x3ddef9;}['_handleRootOperation'](_0x466e32,_0x40beba){this['_diffRoots']['has'](_0x466e32['rootName'])?this['_diffRoots']['get'](_0x466e32['rootName'])['_isAttached']=_0x466e32['isAdd']:(this['_diffRoots']['set'](_0x466e32['rootName'],P(_0x466e32['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x466e32['rootName'],{}),_0x40beba&&this['_idsRoots']['set'](_0x466e32['rootName'],P(_0x466e32['rootName'],!0x0)));const _0x445a5e=null===_0x466e32['_authorId']?null:_0x466e32['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x670bab=this['_touchedRoots']['get'](_0x466e32['rootName']);_0x670bab&&_0x670bab['userId']===_0x445a5e?this['_touchedRoots']['delete'](_0x466e32['rootName']):this['_touchedRoots']['set'](_0x466e32['rootName'],{'userId':_0x445a5e,'isAttached':_0x466e32['isAdd']});}['_handleRootAttributeOperation'](_0x9b1d6){const _0x208453=this['_diffRootsAttributes']['get'](_0x9b1d6['root']['rootName']);null===_0x9b1d6['newValue']?delete _0x208453[_0x9b1d6['key']]:_0x208453[_0x9b1d6['key']]=_0x9b1d6['newValue'];}}function N(_0x21068d){const _0x5ed845=P(_0x21068d['rootName'],_0x21068d['isAttached']());for(const _0x56f1ee of _0x21068d['getChildren']()){const _0x588b00=_0x56f1ee['_clone'](!0x0);_0x5ed845['_appendChild'](_0x588b00);}return _0x5ed845;}function P(_0x397548,_0x2504b0=!0x0){const _0x2cfc03=new vt();return _0x2cfc03['rootName']=_0x397548,_0x2cfc03['_isAttached']=_0x2504b0,_0x2cfc03['isAttached']=()=>_0x2cfc03['_isAttached'],_0x2cfc03;}function F(_0x5612bc,_0x1a43a6,_0x42bdb3){const _0x18da72='elementEnd'==_0x5612bc['type']?_0x42bdb3['createPositionAt'](_0x5612bc['item'],'end'):_0x42bdb3['createPositionBefore'](_0x5612bc['item']);return _0x42bdb3['createPositionFromPath'](_0x1a43a6,_0x18da72['path'],_0x18da72['stickiness']);}function B(_0x462a87,_0x121ecf,_0x15f6e8){const _0x396842='elementStart'==_0x462a87['type']?_0x15f6e8['createPositionAt'](_0x462a87['item'],0x0):_0x15f6e8['createPositionAfter'](_0x462a87['item']);return _0x15f6e8['createPositionFromPath'](_0x121ecf,_0x396842['path'],_0x396842['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0xd08d44,_0x2c59eb){super(_0xd08d44),this['focusTracker']=new _0x115a29(),this['keystrokes']=new _0x17e0c5(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2c59eb),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x5e28ec(this);}['render'](){super['render'](),_0x586a95({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x55427f=_0x4a3a95=>_0x4a3a95['stopPropagation']();this['keystrokes']['set']('arrowright',_0x55427f),this['keystrokes']['set']('arrowleft',_0x55427f),this['keystrokes']['set']('arrowup',_0x55427f),this['keystrokes']['set']('arrowdown',_0x55427f);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x23391c){this['revisionNameInputView']['fieldView']['element']['value']=_0x23391c['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x104900){const _0x54aee7=new _0x4403fd(this['locale'],_0x44c797),_0x33db53=_0x54aee7['fieldView'];_0x33db53['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3325ea=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x104900&&(_0x3325ea+='\x20('+g(this['locale'],'optional')+')'),(_0x54aee7['label']=_0x3325ea,_0x33db53['on']('input',()=>{this['revisionNameInputValue']=_0x33db53['element']['value']['trim']();}),_0x54aee7);}}class f extends _0x3edab6{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0xeadb38=this['editor'],_0x31d6d7=_0xeadb38['plugins']['get']('RevisionTracker');_0xeadb38['ui']['componentFactory']['add']('revisionHistory',_0x2f25fd=>{const _0x1a5bd=_0x45e760(_0x2f25fd),_0x5ee620=_0x1a5bd['panelView']['children'],_0x4a2d3b=new _0x3ce9e8(_0x2f25fd),_0x2662da=new _0x2d4b0c(_0x2f25fd),_0x1d369f=new te(_0x2f25fd),_0x378990=new _0x2d4b0c(_0x2f25fd),_0x1ba788=new te(_0x2f25fd);return _0x1a5bd['bind']('isEnabled')['to'](_0x31d6d7,'isReady',_0x31d6d7,'isEnabled',_0xeadb38,'isReadOnly',(_0x68eba4,_0x3ff630,_0x1350da)=>_0x68eba4&&_0x3ff630&&!_0x1350da),_0x1a5bd['buttonView']['set']({'icon':_0x2267dd,'label':g(_0x2f25fd,'Revision\x20history'),'tooltip':!0x0}),_0x1d369f['set']({'label':g(_0x2f25fd,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x1d369f['bind']('isEnabled')['to'](_0x31d6d7,'isReady',_0x31d6d7,'isEnabled',_0xeadb38,'isReadOnly',(_0xf0a3ff,_0x49d33b,_0x130ab3)=>_0xf0a3ff&&_0x49d33b&&!_0x130ab3),_0x1d369f['on']('execute',()=>this['_showDialog']()),_0x1ba788['set']({'label':g(_0x2f25fd,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x1ba788['bind']('isEnabled')['to'](_0x31d6d7,'isReady',_0xeadb38,'isReadOnly',(_0x5d2ec9,_0x5ca4c7)=>_0x5d2ec9&&!_0x5ca4c7),_0x1ba788['on']('execute',()=>{_0xeadb38['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x1a5bd['isOpen']=!0x1,_0xeadb38['editing']['view']['focus']();}),_0x2662da['children']['add'](_0x1d369f),_0x378990['children']['add'](_0x1ba788),_0x4a2d3b['role']='menu',_0x4a2d3b['items']['addMany']([_0x2662da,_0x378990]),_0x5ee620['add'](_0x4a2d3b),_0x1a5bd;}),_0xeadb38['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x5db245=this['editor'],_0x28dac6=_0x5db245['locale'],_0x2368ee=new _0x25ebac(_0x28dac6),_0x3f7a10=new _0x406b21(_0x28dac6);_0x2368ee['buttonView']['set']({'icon':_0x2267dd,'label':g(_0x28dac6,'Revision\x20history')});const _0x4a9a80=new _0x3d83f5(_0x28dac6,_0x2368ee),_0x480c58=new _0x5da5b2(_0x28dac6);_0x480c58['set']({'label':g(_0x28dac6,'Save\x20current\x20revision')}),_0x480c58['delegate']('execute')['to'](_0x2368ee),_0x480c58['on']('execute',()=>{this['_showDialog']();}),_0x4a9a80['children']['add'](_0x480c58),_0x3f7a10['items']['add'](_0x4a9a80);const _0x5a2f12=new _0x3d83f5(_0x28dac6,_0x2368ee),_0x58cbfb=new _0x5da5b2(_0x28dac6);return _0x58cbfb['set']({'label':g(_0x28dac6,'Open\x20revision\x20history')}),_0x58cbfb['delegate']('execute')['to'](_0x2368ee),_0x58cbfb['on']('execute',()=>{_0x5db245['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x5a2f12['children']['add'](_0x58cbfb),_0x3f7a10['items']['add'](_0x5a2f12),_0x2368ee['panelView']['children']['add'](_0x3f7a10),_0x2368ee;}['_showDialog'](){const _0x44addd=this['editor'],_0x59d9d0=_0x44addd['locale'],_0x1b4dd9=_0x44addd['plugins']['get']('Dialog'),_0x3f5826=_0x44addd['plugins']['get']('RevisionTracker');function _0x1e9487(_0x2d1746){_0x44addd['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2d1746['revisionName']?_0x2d1746['revisionNameInputView']['errorText']=g(_0x59d9d0,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x44addd['plugins']['get'](u)['saveRevision']({'name':_0x2d1746['revisionName']}),_0x1b4dd9['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1e9487(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x1b4dd9['show']({'id':'revisionSave','title':g(_0x59d9d0,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x44addd['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x1b4dd9['hide']()},{'label':g(_0x44addd['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4d9cb4){_0x4d9cb4['bind']('isEnabled')['to'](_0x3f5826,'isReady',_0x3f5826,'isEnabled',_0x44addd,'isReadOnly',(_0x556a99,_0x589e31,_0x11e80d)=>_0x556a99&&_0x589e31&&!_0x11e80d);},'onExecute':()=>_0x1e9487(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x4361ea=this['editor'],_0x172db1=_0x4361ea['locale'];this['_saveRevisionFormView']=new hs(_0x172db1,_0x4361ea['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends ts{['changeId'];['_model'];constructor(_0x365dd5,_0x44c5f2){super(_0x365dd5),this['_model']=_0x44c5f2,this['changeId']=_0x44c5f2['id'];const _0x3c18ef=this['bindTemplate'],_0x854025=g(_0x365dd5,_0x44c5f2['data']['isSuggestion']?'Suggested\x20by':'add'==_0x44c5f2['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x44c5f2['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3c18ef['to']('type',_0x38c24e=>'ck-revision-change__'+_0x38c24e)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x854025}]},{'text':'\x20'+_0x44c5f2['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x5f9c8d(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2778ef){super(),this['id']=_0x2778ef['id']||_0x3f13b1(),this['author']=_0x2778ef['author'],this['type']=_0x2778ef['type'],this['data']=_0x2778ef['data']||{},this['rootName']=_0x2778ef['rootName'],this['set']('createdAt',_0x2778ef['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(_0x762b81,_0x4c638f){this['newRevisionId']=_0x762b81,this['oldRevisionId']=_0x4c638f,this['changes']=new _0x133f10();}['_setChanges'](_0x5019b9){for(const _0x5db378 of _0x5019b9)this['changes']['add'](_0x5db378);}}class m extends _0x3edab6{['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[_0x2c4ff3,_0x1ee4b5,I,V];}constructor(_0x593b51){super(_0x593b51),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',(_0x25e759,_0x5539dc,_0x4ed1b5)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3459ef=>{for(const _0x299425 of this['editor']['editing']['view']['document']['roots'])_0x4ed1b5?_0x3459ef['removeClass']('ck-editor__editable__overlay',_0x299425):_0x3459ef['addClass']('ck-editor__editable__overlay',_0x299425);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x24e96e=>null!==_0x24e96e),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4c6493,_0xc79ed3,_0x2e4fc2)=>_0x4c6493&&_0x2e4fc2?_0xc79ed3['changes']['getIndex'](_0x2e4fc2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x495433,_0x41a3fa)=>_0x495433?_0x41a3fa['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1ee4b5);}['init'](){const _0x53e900=this['editor'],_0x17dde1=new wt(_0x53e900,{'direction':'backward'}),_0x2dcba6=new wt(_0x53e900,{'direction':'forward'});(_0x53e900['commands']['add']('showPreviousChange',_0x17dde1),_0x53e900['commands']['add']('showNextChange',_0x2dcba6),_0x53e900['commands']['add']('restoreRevision',new mt(_0x53e900)),this['on']('change:numberOfChanges',()=>{_0x17dde1['refresh'](),_0x2dcba6['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x53e900['enableReadOnlyMode']('revision-viewer'),_0x53e900['plugins']['has']('WidgetToolbarRepository'))&&_0x53e900['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x4faf69){return await this['_utils']['loadRevisionData'](_0x4faf69,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4faf69);}async['getRevisionRootsAttributes'](_0x2e2429){return await this['_utils']['loadRevisionData'](_0x2e2429,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2e2429);}async['compare'](_0x4d2f79,_0x55e5c2,_0x5aad62=!0x1){if(!this['isEnabled'])return;const _0x473e89=this['diff'],_0x401269=this['repository'],_0x1b6484='string'==typeof _0x4d2f79?_0x401269['getRevision'](_0x4d2f79):_0x4d2f79,_0x32f213='string'==typeof _0x55e5c2?_0x401269['getRevision'](_0x55e5c2):_0x55e5c2,_0x1a0161=_0x1b6484['id'],_0x481032=_0x32f213?_0x32f213['id']:null;if(!_0x5aad62&&this['diff']&&this['diff']['newRevisionId']===_0x1a0161&&this['diff']['oldRevisionId']===_0x481032)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x1a0161,_0x481032);const _0x13a5fe=this['_getRevisionsRange'](_0x1b6484,_0x32f213,!0x0)['map'](_0x1d880f=>this['_utils']['loadRevisionData'](_0x1d880f,this['adapter']));return _0x13a5fe['push'](new Promise(_0x14a94b=>{setTimeout(_0x14a94b,0x14);})),Promise['all'](_0x13a5fe)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x273c58=this['_getDiff'](_0x1a0161,_0x481032);for(const _0x401b24 of _0x273c58['changes'])this['_changeIdToChange']['set'](_0x401b24['id'],_0x401b24);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x513b6e=>{for(const _0x1611e2 of this['editor']['model']['document']['getRootNames']())_0x513b6e['detachRoot'](_0x1611e2);for(const _0x27024b of Object['keys'](_0x273c58['model'])){const _0x184cb9=_0x513b6e['addRoot'](_0x27024b);for(const _0x27c058 of Object['keys'](_0x273c58['attributes'][_0x27024b]))_0x513b6e['setAttribute'](_0x27c058,_0x273c58['attributes'][_0x27024b][_0x27c058],_0x184cb9);_0x513b6e['insert'](_0x273c58['model'][_0x27024b],_0x184cb9,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x273c58['changes'])),this['isReady']=!0x0;})['catch'](_0x384e29=>{console['error'](_0x384e29),this['_cleanUp'](),_0x473e89&&(this['diff']=_0x473e89),this['isReady']=!0x0;});}['addRevisionData'](_0x11c487,_0x4bfd56){const _0x6862d6=this['repository']['createRevision'](_0x11c487);return _0x6862d6['on']('_update',(_0x43eaa1,_0x36ee0f,_0x3ae999)=>_0x4bfd56(_0x36ee0f,_0x3ae999,_0x6862d6)),this['repository']['addRevision'](_0x6862d6),_0x6862d6;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x240ecb=>{for(const _0x38fe9d of this['editor']['model']['document']['getRootNames']())_0x240ecb['detachRoot'](_0x38fe9d);});}['_sortAndFilterDiffChanges'](_0x29cb14){const _0x10b5b4=[],_0x133925=new Map();for(const _0x4e0d43 of this['editor']['model']['document']['getRootNames']()){const _0x4a0835=this['editor']['editing']['view']['getDomRoot'](_0x4e0d43);if(!_0x4a0835)continue;const _0x376016=_0x4a0835['getClientRects']()['item'](0x0);_0x376016&&(_0x10b5b4['push'](_0x4e0d43),_0x133925['set'](_0x4e0d43,_0x376016));}return _0x10b5b4['sort']((_0x1f077c,_0xefd3c9)=>{const _0x52bab2=_0x133925['get'](_0x1f077c),_0x2b8d01=_0x133925['get'](_0xefd3c9);return _0x52bab2['y']-_0x2b8d01['y']||_0x52bab2['x']-_0x2b8d01['x'];}),(_0x29cb14=_0x29cb14['filter'](_0x5e0862=>_0x10b5b4['includes'](_0x5e0862['rootName'])))['sort']((_0x2d5254,_0x1e0f43)=>_0x10b5b4['indexOf'](_0x2d5254['rootName'])-_0x10b5b4['indexOf'](_0x1e0f43['rootName'])),_0x29cb14;}['_makeTape'](_0x19d2a2){const _0x249996=Array['from'](_0x19d2a2['markers'])['filter'](([_0x1ab7e7,_0x44d07d])=>_0x1ab7e7['startsWith']('revision:')&&!_0x44d07d['isCollapsed']),_0x180665=Array['from'](this['editor']['model']['createRangeIn'](_0x19d2a2)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x249996['length'])for(const _0x8e6636 of _0x180665){const [_0x17775b,_0x291d0a]=_0x249996[0x0],[,_0xdf987c,_0x161c0e]=_0x17775b['split'](':');if(_0x291d0a['end']['isEqual'](_0x8e6636['nextPosition'])&&_0x249996['shift'](),(_0x8e6636['previousPosition']['isEqual'](_0x291d0a['start'])||_0x8e6636['previousPosition']['isAfter'](_0x291d0a['start']))&&('insertion'==_0xdf987c?_0x8e6636['isAdded']={'userId':_0x161c0e}:'deletion'==_0xdf987c&&(_0x8e6636['isRemoved']={'userId':_0x161c0e})),0x0==_0x249996['length'])break;}return _0x180665;}['_refreshStartEndIndex'](_0x22c65d){const _0x34c30e=new Map();for(let _0x6c38c3=0x0;_0x6c38c3<_0x22c65d['length'];_0x6c38c3++)'text'===_0x22c65d[_0x6c38c3]['type']?(_0x22c65d[_0x6c38c3]['item']['startIndex']=_0x6c38c3,_0x22c65d[_0x6c38c3]['item']['endIndex']=_0x6c38c3):('elementStart'===_0x22c65d[_0x6c38c3]['type']?_0x22c65d[_0x6c38c3]['item']['startIndex']=_0x6c38c3:'elementEnd'===_0x22c65d[_0x6c38c3]['type']&&(_0x22c65d[_0x6c38c3]['item']['endIndex']=_0x6c38c3),_0x34c30e['set'](_0x22c65d[_0x6c38c3]['id'],_0x6c38c3));for(const _0x2119cc of _0x34c30e['values']())'elementStart'===_0x22c65d[_0x2119cc]['type']?_0x22c65d[_0x2119cc]['item']['endIndex']=_0x34c30e['get'](_0x22c65d[_0x2119cc]['pairId']):'elementEnd'===_0x22c65d[_0x2119cc]['type']&&(_0x22c65d[_0x2119cc]['item']['startIndex']=_0x34c30e['get'](_0x22c65d[_0x2119cc]['pairId']));}['_processTape'](_0x3af3ce){for(let _0x272007=0x0;_0x272007<_0x3af3ce['length'];_0x272007++){if('elementStart'===_0x3af3ce[_0x272007]['type'])_0x3af3ce[_0x272007]['item']['startIndex']=_0x272007;else{if('elementEnd'===_0x3af3ce[_0x272007]['type']){_0x3af3ce[_0x272007]['item']['endIndex']=_0x272007;const _0x6d5404=_0x3af3ce[_0x272007]['item']['startIndex'];_0x3af3ce[_0x6d5404]['pairId']=_0x3af3ce[_0x272007]['id'],_0x3af3ce[_0x272007]['pairId']=_0x3af3ce[_0x6d5404]['id'];}else _0x3af3ce[_0x272007]['item']['startIndex']=_0x272007,_0x3af3ce[_0x272007]['item']['endIndex']=_0x272007,_0x3af3ce[_0x272007]['pairId']=null;}_0x3af3ce[_0x272007]['markersStart']||(_0x3af3ce[_0x272007]['markersStart']=[],_0x3af3ce[_0x272007]['markersEnd']=[]);}}['_markInsertions'](_0x49b2f0,_0x14f65e){const _0x23c473=_0x49b2f0['filter'](_0x400285=>!_0x400285['isAdded']);for(let _0x256eb8=0x0;_0x256eb8<_0x14f65e['length'];_0x256eb8++)_0x14f65e[_0x256eb8]['isAdded']&&(_0x23c473[_0x256eb8]['isAdded']=_0x14f65e[_0x256eb8]['isAdded']);}['_getDiff'](_0x50e154,_0x4fbe0b=null){const _0x3ab10d=this['repository']['getRevision'](_0x50e154),_0x1a5eb7=_0x4fbe0b?this['repository']['getRevision'](_0x4fbe0b):null,_0x36e7b5=this['_getRevisionsRange'](_0x3ab10d,_0x1a5eb7),_0x4532f2=_0x36e7b5[_0x36e7b5['length']-0x1],_0x57a7b2=new Map(),_0x38b71d={'model':{},'attributes':{},'changes':[]},_0x1fa8f2=new Set(),_0x177e2c=new Map();for(let _0x108d77=_0x36e7b5['length']-0x1;_0x108d77>=0x0;_0x108d77--){const _0x43c8a8=_0x36e7b5[_0x108d77];for(const _0x29259e of Object['keys'](_0x43c8a8['diffData']))if(_0x43c8a8['diffData'][_0x29259e]['attachChange']){const _0xdd9dfd=_0x43c8a8['diffData'][_0x29259e]['attachChange'];_0xdd9dfd['isAttached']?(_0x1fa8f2['add'](_0x29259e),_0x177e2c['has'](_0x29259e)&&_0x177e2c['get'](_0x29259e)['userId']==_0xdd9dfd['userId']?_0x177e2c['delete'](_0x29259e):_0x177e2c['set'](_0x29259e,_0xdd9dfd)):_0x177e2c['has'](_0x29259e)?(_0x1fa8f2['delete'](_0x29259e),_0x177e2c['delete'](_0x29259e)):(_0x1fa8f2['add'](_0x29259e),_0x177e2c['set'](_0x29259e,_0xdd9dfd));}else _0x1fa8f2['add'](_0x29259e);}for(const _0x336ca0 of _0x1fa8f2){const _0x3fc4c0=_0x177e2c['has'](_0x336ca0)&&!_0x177e2c['get'](_0x336ca0)['isAttached'];let _0x2ef735=_0x3fc4c0?_0x36e7b5['length']-0x1:0x0;const _0x346ef7=_0x3fc4c0?-0x1:0x1;for(;_0x36e7b5[_0x2ef735];){const _0x4048d5=_0x36e7b5[_0x2ef735];if(_0x4048d5['diffData'][_0x336ca0]){const _0x11861a=_0x3fc4c0?_0x4048d5['diffData'][_0x336ca0]['attributesBefore']:_0x4048d5['diffData'][_0x336ca0]['attributesAfter'];_0x38b71d['attributes'][_0x336ca0]=_0x11861a?_0x4d0c8a(_0x11861a):{};break;}_0x2ef735+=_0x346ef7;}}for(const _0xdb8024 of _0x36e7b5){_0xdb8024['model']={};for(const _0xa75397 of _0xdb8024['authors'])_0x57a7b2['set'](_0xa75397['id'],_0xa75397);for(const _0x598a5c of _0x1fa8f2){const _0x56b06b=_0xdb8024['diffData'][_0x598a5c]?_0xdb8024['diffData'][_0x598a5c]['insertions']:'[]',_0x4e2f97=_0xdb8024['diffData'][_0x598a5c]?_0xdb8024['diffData'][_0x598a5c]['deletions']:'[]';_0xdb8024['model'][_0x598a5c]={'insertions':this['_utils']['_makeModelFromViewString'](_0x56b06b),'deletions':this['_utils']['_makeModelFromViewString'](_0x4e2f97)};}}for(const _0xb6c776 of _0x1fa8f2){let _0x36313e=null,_0x5a2c86=0x0;const _0x41d3e8=new Map(Array['from'](_0x3ab10d['model'][_0xb6c776]['insertions']['markers'])['filter'](([_0x475b33])=>!_0x475b33['startsWith']('revision:')));let _0x3b8756=0x0;for(const _0x15efd1 of _0x36e7b5){const _0x4a462f=this['_makeTape'](_0x15efd1['model'][_0xb6c776]['insertions']);_0x15efd1==_0x3ab10d?(_0x36313e=_0x4a462f,_0x5a2c86=_0x36313e['length'],_0x36313e['forEach'](_0x3312b2=>{_0x3312b2['id']=_0x3b8756++;}),this['_processTape'](_0x36313e)):this['_markInsertions'](_0x36313e,_0x4a462f);const _0x17b372=_0x36313e['filter'](_0x55d103=>!_0x55d103['isAdded'])['map'](_0x23dc6c=>_0x23dc6c['id']);let _0x1e6ea2=0x0;const _0x3dac91=this['_makeTape'](_0x15efd1['model'][_0xb6c776]['deletions']);_0x3dac91['forEach'](_0x502879=>{_0x502879['isRemoved']?_0x502879['id']=_0x5a2c86++:_0x502879['id']=_0x17b372[_0x1e6ea2++];}),this['_processTape'](_0x3dac91),this['_setDistance'](_0x36313e,'isAdded'),this['_setDistance'](_0x3dac91,'isRemoved'),_0x15efd1==_0x3ab10d&&this['_markMarkers'](_0x36313e,_0x41d3e8),_0x36313e=this['_joinTapes'](_0x36313e,_0x3dac91),this['_refreshStartEndIndex'](_0x36313e),this['_setDistance'](_0x36313e,'isRemoved');}_0x36313e=_0x36313e['filter'](_0x15ca01=>!(_0x15ca01['isAdded']&&_0x15ca01['isRemoved']));const _0x1e5d5b=new Map(_0x4532f2['model'][_0xb6c776]['deletions']['markers']),_0x818654=new Set(_0x41d3e8['keys']());for(const _0x3dd8b8 of _0x1e5d5b['keys']())_0x818654['delete'](_0x3dd8b8);this['_markSuggestions'](_0x36313e,_0x818654),this['_fixObsoleteTags'](_0x36313e),_0x36313e=this['_removeMissingPairs'](_0x36313e),_0x36313e=this['_markMismatchedRemovedTags'](_0x36313e),_0x36313e=this['_removeUnsupportedChanges'](_0x36313e);const {root:_0x3a35de,changes:_0x49dfaa}=this['_makeModelFromTape'](_0x36313e,_0x57a7b2,_0xb6c776);_0x38b71d['model'][_0xb6c776]=_0x3a35de;const _0x5e895e=_0x177e2c['get'](_0xb6c776);if(_0x5e895e){const _0x27b024=_0x57a7b2['get'](_0x5e895e['userId']),_0x56536a=new r({'author':_0x27b024,'type':_0x5e895e['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0xb6c776});_0x49dfaa['unshift'](_0x56536a),_0x38b71d['attributes'][_0xb6c776]['revisionHistoryAttachChange']=_0x56536a['id'];}_0x38b71d['changes']=_0x38b71d['changes']['concat'](_0x49dfaa);}return _0x38b71d;}['_markMarkers'](_0x88fd3,_0x26649d){for(let _0x1b02f6=0x0;_0x1b02f6<_0x88fd3['length'];_0x1b02f6++)for(const [_0x44a4d9,_0x3855f0]of _0x26649d)!_0x3855f0['isCollapsed']&&_0x3855f0['start']['isEqual'](_0x88fd3[_0x1b02f6]['previousPosition'])&&_0x88fd3[_0x1b02f6]['markersStart']['push'](_0x44a4d9),_0x3855f0['end']['isEqual'](_0x88fd3[_0x1b02f6]['nextPosition'])&&_0x88fd3[_0x1b02f6]['markersEnd']['push'](_0x44a4d9);}['_joinTapes'](_0x2a5999,_0x179a4d){let _0xbcdcda=[],_0xe209d=0x0,_0x5070c1=0x0;for(;_0xe209d<_0x2a5999['length']||_0x5070c1<_0x179a4d['length'];){const _0x1bd2a8=_0x2a5999[_0xe209d]||{},_0x2f3e48=_0x179a4d[_0x5070c1]||{};if(_0x1bd2a8['id']==_0x2f3e48['id'])_0xe209d++,_0x5070c1++,_0xbcdcda['push'](_0x1bd2a8);else{if(_0x2f3e48['isRemoved']&&_0x1bd2a8['isAdded']){const {commonTape:_0x5526ac,iEnd:_0x4aeca7,jEnd:_0x403f61}=this['_threeWayMerge'](_0x2a5999,_0xe209d,_0x179a4d,_0x5070c1);_0xbcdcda=_0xbcdcda['concat'](_0x5526ac),_0xe209d=_0x4aeca7,_0x5070c1=_0x403f61;}else _0x2f3e48['isRemoved']?(_0x5070c1++,_0xbcdcda['push'](_0x2f3e48)):(_0xe209d++,_0xbcdcda['push'](_0x1bd2a8));}}return _0xbcdcda;}['_markSuggestions'](_0x51c6d1,_0xeadbb){const _0xb31261=[];for(let _0x491305=0x0;_0x491305<_0x51c6d1['length'];_0x491305++){for(let _0x392bdd=0x0;_0x392bdd<_0x51c6d1[_0x491305]['markersStart']['length'];_0x392bdd++){const _0x287c1c=_0x51c6d1[_0x491305]['markersStart'][_0x392bdd];if(!_0xeadbb['has'](_0x287c1c))continue;const {group:_0x47daff,type:_0x24a569,authorId:_0x20e150}=_0x561990(_0x287c1c);'revision-suggestion'!=_0x47daff||'insertion'!=_0x24a569&&'deletion'!=_0x24a569||(_0xb31261['unshift']({'type':_0x24a569,'name':_0x287c1c,'userId':_0x20e150}),_0x51c6d1[_0x491305]['markersStart']['splice'](_0x392bdd,0x1),_0x392bdd--);}_0x4d4e06(_0x51c6d1[_0x491305]);for(let _0x18686e=0x0;_0x18686e<_0x51c6d1[_0x491305]['markersEnd']['length'];_0x18686e++){const _0x16aa40=_0x51c6d1[_0x491305]['markersEnd'][_0x18686e];if(!_0xeadbb['has'](_0x16aa40))continue;const {group:_0x501bdf,type:_0x29576f}=_0x561990(_0x16aa40);if('revision-suggestion'!=_0x501bdf||'insertion'!=_0x29576f&&'deletion'!=_0x29576f)continue;_0x51c6d1[_0x491305]['markersEnd']['splice'](_0x18686e,0x1),_0x18686e--;const _0xc4a7d2=_0xb31261['findIndex'](_0x3ece8c=>_0x3ece8c['name']==_0x16aa40);_0xc4a7d2>-0x1&&_0xb31261['splice'](_0xc4a7d2,0x1);}}function _0x561990(_0x50f551){const _0x207029=_0x50f551['split'](':');return{'group':_0x207029[0x0],'type':_0x207029[0x1],'subType':_0x207029['length']>=0x5?_0x207029[0x2]:null,'id':_0x207029['length']<0x5?_0x207029[0x2]:_0x207029[0x3],'authorId':_0x207029['length']<0x5?_0x207029[0x3]:_0x207029[0x4],'markerCount':0x6==_0x207029['length']?_0x207029[0x5]:null};}function _0x4d4e06(_0x3999f8){for(let _0x19cf89=0x0;_0x19cf89<_0xb31261['length'];_0x19cf89++){if(_0x3999f8['isAdded']&&'insertion'==_0xb31261[_0x19cf89]['type'])return _0x3999f8['isAddSuggestion']=_0xb31261[_0x19cf89],void delete _0x3999f8['isAdded'];if(!_0x3999f8['isAdded']&&!_0x3999f8['isRemoved']&&'deletion'==_0xb31261[_0x19cf89]['type'])return void(_0x3999f8['isRemoveSuggestion']=_0xb31261[_0x19cf89]);}}}['_setDistance'](_0x4fa9d8,_0x3b68ae){let _0x54adc5=0x0,_0x2d5203=!0x1;const _0x2f45e1=new Map();for(const _0x27528e of _0x4fa9d8)_0x27528e[_0x3b68ae]?_0x2d5203&&(_0x54adc5++,_0x2d5203=!0x1):(_0x54adc5++,_0x2d5203=!0x0),_0x2f45e1['set'](_0x27528e['id'],_0x54adc5);for(let _0x5b1e6c=0x0;_0x5b1e6c<_0x4fa9d8['length'];_0x5b1e6c++){if('isRemoved'==_0x3b68ae&&_0x4fa9d8[_0x5b1e6c]['isAdded']||'isAdded'==_0x3b68ae&&_0x4fa9d8[_0x5b1e6c]['isRemoved'])continue;if('text'==_0x4fa9d8[_0x5b1e6c]['type']){_0x4fa9d8[_0x5b1e6c]['distance']=0x0;continue;}const _0x3a395c=_0x2f45e1['get'](_0x4fa9d8[_0x5b1e6c]['pairId']),_0x385eb7=_0x2f45e1['get'](_0x4fa9d8[_0x5b1e6c]['id']);_0x4fa9d8[_0x5b1e6c]['distance']=_0x3a395c-_0x385eb7;}}['_getRevisionsRange'](_0x3f9e4f,_0x4a7938,_0x19b258=!0x1){const _0x32cb26=[];let _0x3e666b=this['repository']['getIndex'](_0x3f9e4f),_0x43167c=this['repository']['getIndex'](_0x4a7938);for(-0x1==_0x43167c&&(_0x43167c=this['repository']['_revisions']['length'],_0x19b258=!0x1);_0x3e666b<_0x43167c;)_0x32cb26['push'](this['repository']['getRevision'](_0x3e666b)),_0x3e666b++;return _0x19b258&&_0x32cb26['push'](this['repository']['getRevision'](_0x3e666b)),_0x32cb26;}['_threeWayMerge'](_0x19b9b,_0x222a5e,_0x561432,_0x4819c6){const _0x1f27bb=this['editor']['model']['schema'];let _0x30cbaa=_0x222a5e;for(;_0x19b9b[_0x30cbaa]&&_0x19b9b[_0x30cbaa]['isAdded'];)_0x30cbaa++;let _0x1c1e0c=_0x4819c6;for(;_0x561432[_0x1c1e0c]&&_0x561432[_0x1c1e0c]['isRemoved'];)_0x1c1e0c++;_0x577f96(_0x19b9b,_0x222a5e,_0x30cbaa),_0x577f96(_0x561432,_0x4819c6,_0x1c1e0c);const _0x5598a9=_0x561432['slice'](_0x4819c6,_0x1c1e0c)['concat'](_0x19b9b['slice'](_0x222a5e,_0x30cbaa));return _0x5598a9['sort']((_0x537308,_0x16bfdd)=>_0x537308['side']!=_0x16bfdd['side']?_0x537308['side']-_0x16bfdd['side']:_0x537308['level']!=_0x16bfdd['level']?_0x537308['level']-_0x16bfdd['level']:_0x537308['distance']!=_0x16bfdd['distance']?_0x16bfdd['distance']-_0x537308['distance']:!!_0x537308['isAdded']!=!!_0x16bfdd['isAdded']?-0x1==_0x537308['side']||0x0==_0x537308['side']?_0x537308['isAdded']?-0x1:0x1:_0x537308['isAdded']?0x1:-0x1:_0x537308['index']-_0x16bfdd['index']),{'commonTape':_0x5598a9,'iEnd':_0x30cbaa,'jEnd':_0x1c1e0c};function _0x577f96(_0x2cd146,_0x57cb61,_0x3792f5){let _0xb41466=-0x1,_0x5403ff=Number['POSITIVE_INFINITY'],_0x7d5d1c=!0x0;for(let _0x29fef5=_0x57cb61;_0x29fef5<_0x3792f5;_0x29fef5++)if(_0x1f27bb['isInline'](_0x2cd146[_0x29fef5]['item'])||(_0x7d5d1c=!0x1),_0x2cd146[_0x29fef5]['item']['startIndex']<_0x57cb61&&(_0xb41466=_0x29fef5),_0x2cd146[_0x29fef5]['item']['endIndex']>=_0x3792f5){_0x5403ff=_0x29fef5;break;}_0x7d5d1c&&(_0xb41466=_0x3792f5-0x1);for(let _0x295f19=_0x57cb61;_0x295f19<_0x3792f5;_0x295f19++)_0x2cd146[_0x295f19]['side']=_0x295f19<=_0xb41466?-0x1:_0x295f19<_0x5403ff?0x0:0x1,_0x2cd146[_0x295f19]['index']=_0x295f19;let _0x59302c=0x0;for(let _0x429f06=_0x57cb61;_0x429f06<=_0xb41466;_0x429f06++)0x0==_0x2cd146[_0x429f06]['distance']?_0x2cd146[_0x429f06]['level']=_0x59302c:(_0x59302c++,_0x2cd146[_0x429f06]['level']=_0x59302c,_0x59302c++);for(let _0x5cc99e=_0x57cb61;_0x5cc99e<_0x3792f5;_0x5cc99e++)0x0==_0x2cd146[_0x5cc99e]['side']&&(_0x2cd146[_0x5cc99e]['level']=_0x59302c);_0x59302c=0x0;for(let _0x5e3b43=_0x3792f5-0x1;_0x5e3b43>=_0x5403ff;_0x5e3b43--)0x0==_0x2cd146[_0x5e3b43]['distance']?_0x2cd146[_0x5e3b43]['level']=_0x59302c:(_0x59302c--,_0x2cd146[_0x5e3b43]['level']=_0x59302c,_0x59302c--);}}['_fixObsoleteTags'](_0x306757){const _0x5994cb=new Map(),_0x3fe8af=this['editor']['model']['schema'];for(let _0x13f1b9=0x1;_0x13f1b9<_0x306757['length'];_0x13f1b9++){let _0x52afec,_0x5af017,_0x2ffb78;const _0x3da00f=_0x306757[_0x13f1b9],_0x8f9548=_0x306757[_0x13f1b9-0x1];if('text'==_0x3da00f['type'])continue;if(_0x3da00f['type']!=_0x8f9548['type'])continue;if(!_0x3fe8af['isBlock'](_0x8f9548['item'])||_0x3fe8af['isLimit'](_0x8f9548['item']))continue;if(!_0x3fe8af['isBlock'](_0x3da00f['item'])||_0x3fe8af['isLimit'](_0x3da00f['item']))continue;if((_0x306757[_0x13f1b9]['isAdded']||_0x306757[_0x13f1b9]['isAddSuggestion'])&&_0x306757[_0x13f1b9-0x1]['isRemoved'])_0x52afec=_0x306757[_0x13f1b9],_0x5af017=_0x306757[_0x13f1b9-0x1],_0x2ffb78=_0x13f1b9-0x1;else{if(!_0x306757[_0x13f1b9]['isRemoved']||!_0x306757[_0x13f1b9-0x1]['isAdded']&&!_0x306757[_0x13f1b9-0x1]['isAddSuggestion'])continue;_0x52afec=_0x306757[_0x13f1b9-0x1],_0x5af017=_0x306757[_0x13f1b9],_0x2ffb78=_0x13f1b9;}const _0x17564c=_0x52afec['level']==_0x5af017['level'],_0x3a11c7=Math['abs'](_0x52afec['level'])<Math['abs'](_0x5af017['level'])&&0x0==_0x5af017['distance'];(_0x17564c||_0x3a11c7)&&(_0x5994cb['set'](_0x5af017['id'],_0x52afec['id']),_0x306757['splice'](_0x2ffb78,0x1),_0x13f1b9--,_0x52afec['isAdded']=!0x1);}for(let _0x148dba=0x0;_0x148dba<_0x306757['length'];_0x148dba++)_0x5994cb['has'](_0x306757[_0x148dba]['pairId'])&&(_0x306757[_0x148dba]['pairId']=_0x5994cb['get'](_0x306757[_0x148dba]['pairId']));}['_removeMissingPairs'](_0x38aa56){const _0x224238=new Set(_0x38aa56['map'](_0x370ea8=>_0x370ea8['id']));for(let _0x47b8f3=0x0;_0x47b8f3<_0x38aa56['length'];_0x47b8f3++)_0x224238['has'](_0x38aa56[_0x47b8f3]['pairId'])||0x0==_0x38aa56[_0x47b8f3]['distance']||(_0x38aa56[_0x47b8f3]['isIncorrect']=!0x0);return _0x38aa56['filter'](_0x36ad6a=>!_0x36ad6a['isIncorrect']);}['_markMismatchedRemovedTags'](_0xd1c0b){const _0x3354a=new Set();for(let _0x2a0c34=0x0;_0x2a0c34<_0xd1c0b['length'];_0x2a0c34++){if(_0x3354a['has'](_0xd1c0b[_0x2a0c34]['id'])&&_0xd1c0b[_0x2a0c34]['isRemoved']&&(_0xd1c0b[_0x2a0c34]['isIncorrect']=!0x0),_0xd1c0b[_0x2a0c34]['isIncorrect'])continue;if(0x0==_0xd1c0b[_0x2a0c34]['distance'])continue;if('elementStart'!=_0xd1c0b[_0x2a0c34]['type'])continue;if(null==_0xd1c0b[_0x2a0c34]['pairId'])continue;let _0x13af3e=_0x2a0c34+0x1,_0x24498e=0x0;for(;_0xd1c0b[_0x13af3e]['id']!=_0xd1c0b[_0x2a0c34]['pairId'];)'elementStart'==_0xd1c0b[_0x13af3e]['type']?_0x24498e++:'elementEnd'==_0xd1c0b[_0x13af3e]['type']&&_0x24498e--,_0x13af3e++;if(0x0!=_0x24498e){if(_0xd1c0b[_0x2a0c34]['isRemoved'])_0xd1c0b[_0x2a0c34]['isIncorrect']=!0x0;else{for(;_0x13af3e!=_0x2a0c34;)_0xd1c0b[_0x13af3e]['isRemoved']&&0x0!=_0xd1c0b[_0x13af3e]['distance']&&(_0xd1c0b[_0x13af3e]['isIncorrect']=!0x0,_0x3354a['add'](_0xd1c0b[_0x13af3e]['pairId'])),_0x13af3e--;}}}return _0xd1c0b['filter'](_0x4f402d=>!_0x4f402d['isIncorrect']);}['_removeUnsupportedChanges'](_0x200bd8){const _0x302af0=this['editor']['model']['schema'];for(let _0x27a2e1=0x0;_0x27a2e1<_0x200bd8['length'];_0x27a2e1++){if(!(_0x200bd8[_0x27a2e1]['isAdded']||_0x200bd8[_0x27a2e1]['isAddSuggestion']||_0x200bd8[_0x27a2e1]['isRemoved']||_0x200bd8[_0x27a2e1]['isRemoveSuggestion']))continue;if(0x0==_0x200bd8[_0x27a2e1]['distance'])continue;const _0x4d2d47=_0x200bd8[_0x27a2e1]['item'];_0x302af0['isBlock'](_0x4d2d47)||_0x302af0['isLimit'](_0x4d2d47)||(_0x200bd8[_0x27a2e1]['isAdded']&&delete _0x200bd8[_0x27a2e1]['isAdded'],_0x200bd8[_0x27a2e1]['isAddSuggestion']&&delete _0x200bd8[_0x27a2e1]['isAddSuggestion'],_0x200bd8[_0x27a2e1]['isRemoveSuggestion']&&delete _0x200bd8[_0x27a2e1]['isRemoveSuggestion'],_0x200bd8[_0x27a2e1]['isRemoved']&&(_0x200bd8[_0x27a2e1]['isIncorrect']=!0x0));}return _0x200bd8['filter'](_0x4bbf0c=>!_0x4bbf0c['isIncorrect']);}['_makeModelFromTape'](_0x52c19c,_0x5b3342,_0x35bde7){const _0x14605f=new vt(),_0x1a51fd=[],_0x53a9ba=new Map(),_0xc9ca3b=this['editor']['model'],_0x214668=_0xc9ca3b['schema'],_0x4d5215=[_0x14605f],_0x1b4cd8={},_0x1c7e8b={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x2203f=null;const _0x220d07=[0x0];for(let _0x12905b=0x0;_0x12905b<_0x52c19c['length'];_0x12905b++)if('elementStart'===_0x52c19c[_0x12905b]['type']){_0x52c19c[_0x12905b]['previousPosition']=_0xc9ca3b['createPositionFromPath'](_0x14605f,_0x220d07);const _0x4145ef=new ut(_0x52c19c[_0x12905b]['item']['name'],_0x52c19c[_0x12905b]['item']['getAttributes']());_0x4d5215[0x0]['_appendChild'](_0x4145ef),_0x220d07['push'](0x0),_0x4d5215['unshift'](_0x4145ef),_0x52c19c[_0x12905b]['nextPosition']=_0xc9ca3b['createPositionFromPath'](_0x14605f,_0x220d07);}else'elementEnd'===_0x52c19c[_0x12905b]['type']?(_0x4d5215['shift'](),_0x52c19c[_0x12905b]['previousPosition']=_0xc9ca3b['createPositionFromPath'](_0x14605f,_0x220d07),_0x220d07['pop'](),_0x220d07[_0x220d07['length']-0x1]++,_0x52c19c[_0x12905b]['nextPosition']=_0xc9ca3b['createPositionFromPath'](_0x14605f,_0x220d07)):(_0x52c19c[_0x12905b]['previousPosition']=_0xc9ca3b['createPositionFromPath'](_0x14605f,_0x220d07),_0x2203f?_0x2203f['_data']+=_0x52c19c[_0x12905b]['item']['data']:_0x2203f=new gt(_0x52c19c[_0x12905b]['item']['data'],_0x52c19c[_0x12905b]['item']['getAttributes']()),_0x52c19c[_0x12905b+0x1]&&'text'===_0x52c19c[_0x12905b+0x1]['type']&&_0x4632ed(_0x2203f,_0x52c19c[_0x12905b+0x1]['item'])||(_0x4d5215[0x0]['_appendChild'](_0x2203f),_0x2203f=null),_0x220d07[_0x220d07['length']-0x1]+=_0x52c19c[_0x12905b]['item']['offsetSize'],_0x52c19c[_0x12905b]['nextPosition']=_0xc9ca3b['createPositionFromPath'](_0x14605f,_0x220d07));for(let _0x3fc265=0x0;_0x3fc265<_0x52c19c['length'];_0x3fc265++){const _0x526f1f=_0x52c19c[_0x3fc265]['previousPosition'],_0x3621ed=_0x52c19c[_0x3fc265]['nextPosition'];for(const _0x24fbb3 of _0x52c19c[_0x3fc265]['markersStart'])_0x53a9ba['set'](_0x24fbb3,{'start':_0x526f1f,'end':null});_0xa0f886('isRemoveSuggestion',_0x3fc265,_0x526f1f,_0x3621ed),_0xa0f886('isAddSuggestion',_0x3fc265,_0x526f1f,_0x3621ed),_0xa0f886('isRemoved',_0x3fc265,_0x526f1f,_0x3621ed),_0xa0f886('isAdded',_0x3fc265,_0x526f1f,_0x3621ed);for(const _0x2c04a2 of _0x52c19c[_0x3fc265]['markersEnd']){const _0x39326e=_0x53a9ba['get'](_0x2c04a2);_0x39326e?_0x39326e['end']=_0x3621ed:_0x53a9ba['set'](_0x2c04a2,{'start':_0x3621ed,'end':_0x3621ed});}}for(const [_0x5875c1,_0xcedc9b]of _0x53a9ba){const _0xea7c61=this['editor']['model']['createRange'](_0xcedc9b['start'],_0xcedc9b['end']);_0x14605f['markers']['set'](_0x5875c1,_0xea7c61);}return _0x1a51fd['sort']((_0x50e6bf,_0x6ec783)=>{const _0x5b9c9f=_0x14605f['markers']['get']('revision:'+_0x50e6bf['id']),_0x38e28d=_0x14605f['markers']['get']('revision:'+_0x6ec783['id']);return _0x5b9c9f['start']['isBefore'](_0x38e28d['start'])?-0x1:_0x5b9c9f['start']['isAfter'](_0x38e28d['start'])?0x1:_0x5b9c9f['end']['isBefore'](_0x38e28d['end'])?-0x1:_0x5b9c9f['end']['isAfter'](_0x38e28d['end'])?0x1:'add'===_0x50e6bf['type']?-0x1:0x1;}),{'root':_0x14605f,'changes':_0x1a51fd};function _0xa0f886(_0x5da71e,_0x3bf6ef,_0x2bf76d,_0x2c7dd0){const _0x1c401a=!!_0x52c19c[_0x3bf6ef][_0x5da71e],_0x2ad4fc=_0x1c401a?_0x52c19c[_0x3bf6ef][_0x5da71e]['userId']:null,_0x1fce96=_0x3bf6ef===_0x52c19c['length']-0x1,_0x386215=_0x1c7e8b[_0x5da71e][0x0],_0x447121=_0x214668['isObject'](_0x52c19c[_0x3bf6ef]['item']);!_0x1b4cd8[_0x5da71e]&&_0x1c401a?_0x1b4cd8[_0x5da71e]={'start':_0x2bf76d,'tapeItem':_0x52c19c[_0x3bf6ef],'userId':_0x2ad4fc,'type':_0x5da71e}:_0x1b4cd8[_0x5da71e]&&!_0x1c401a?(_0x1b4cd8[_0x5da71e]['end']=_0x2bf76d,_0x39c97b(_0x1b4cd8[_0x5da71e]),_0x1b4cd8[_0x5da71e]=null):_0x1b4cd8[_0x5da71e]&&_0x1c401a&&_0x1b4cd8[_0x5da71e]['userId']!==_0x2ad4fc&&(_0x1b4cd8[_0x5da71e]['end']=_0x2bf76d,_0x386215&&_0x386215['userId']===_0x1b4cd8[_0x5da71e]['userId']||_0x39c97b(_0x1b4cd8[_0x5da71e]),_0x1b4cd8[_0x5da71e]={'start':_0x2bf76d,'tapeItem':_0x52c19c[_0x3bf6ef],'userId':_0x2ad4fc,'type':_0x5da71e}),_0x1b4cd8[_0x5da71e]&&_0x447121&&('elementStart'!==_0x52c19c[_0x3bf6ef]['type']||_0x386215&&_0x386215['userId']===_0x2ad4fc||_0x1c7e8b[_0x5da71e]['unshift']({'userId':_0x2ad4fc,'object':_0x52c19c[_0x3bf6ef]['item'],'change':_0x1b4cd8[_0x5da71e]}),'elementEnd'===_0x52c19c[_0x3bf6ef]['type']&&_0x386215&&_0x386215['object']===_0x52c19c[_0x3bf6ef]['item']&&(_0x1c7e8b[_0x5da71e]['shift'](),_0x1b4cd8[_0x5da71e]=_0x386215['change'])),_0x1b4cd8[_0x5da71e]&&_0x1fce96&&(_0x1b4cd8[_0x5da71e]['end']=_0x2c7dd0,_0x39c97b(_0x1b4cd8[_0x5da71e]),_0x1b4cd8[_0x5da71e]=null);}function _0x39c97b({start:_0x3080e7,end:_0x166ed3,tapeItem:_0x3763d5,userId:_0x389b92,type:_0x507f71}){const _0x41d1f3=_0x3763d5['item'],_0x4a3b52=_0xc9ca3b['schema']['isBlock'](_0x41d1f3)&&!_0xc9ca3b['schema']['isLimit'](_0x41d1f3),_0x1fa44e=_0x3080e7['nodeAfter']==_0x166ed3['parent']&&_0x166ed3['isAtStart'];if(_0x4a3b52&&_0x1fa44e)return;const _0x45d2dc=_0xc9ca3b['createRange'](_0x3080e7,_0x166ed3),_0x37cfea=_0x5b3342['get'](_0x389b92),_0x22dde4=new r({'author':_0x37cfea,'type':'isAdded'==_0x507f71||'isAddSuggestion'==_0x507f71?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x507f71||'isRemoveSuggestion'==_0x507f71},'createdAt':new Date(),'rootName':_0x35bde7});_0x1a51fd['push'](_0x22dde4),_0x14605f['markers']['set']('revision:'+_0x22dde4['id'],_0x45d2dc);}function _0x4632ed(_0x3d824a,_0x5357b6){const _0x129f81=_0x3d824a['getAttributes'](),_0x5d6cd3=_0x5357b6['getAttributes']();for(const _0x55ce01 of _0x129f81){if(_0x55ce01[0x1]!==_0x5357b6['getAttribute'](_0x55ce01[0x0]))return!0x1;_0x5d6cd3['next']();}return _0x5d6cd3['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x2b40cc=>{const _0x477255=_0x2b40cc['markerName']['split'](':')[0x1],_0x285d0e=this['_getChangeFromId'](_0x477255);if(!_0x285d0e)return null;const _0x4ac39b='add'==_0x285d0e['type']?'insertion':'deletion',_0x56f286=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4ac39b];return _0x285d0e['data']['isSuggestion']&&_0x56f286['push']('ck-suggestion-marker-'+_0x4ac39b+'-new'),this['activeChange']==_0x285d0e&&_0x56f286['push']('ck-suggestion-marker--active'),{'classes':_0x56f286,'attributes':{'data-change-id':_0x477255}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xc60de2=>{_0xc60de2['on']('element:pre',(_0x16ceb7,_0x239591,_0x4fda77)=>{const _0x9243cc=_0x239591['viewItem']['getChild'](0x0);if(!_0x9243cc||!_0x9243cc['is']('element','code'))return;if(!_0x4fda77['consumable']['consume'](_0x9243cc,{'attributes':['vid_start','vid_end']}))return;const _0x4edc75=_0x239591['modelRange']['start']['nodeAfter'];_0x4fda77['writer']['setAttribute']('vid_start',_0x9243cc['getAttribute']('vid_start'),_0x4edc75),_0x4fda77['writer']['setAttribute']('vid_end',_0x9243cc['getAttribute']('vid_end'),_0x4edc75);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3c1340=>{_0x3c1340['on']('element',(_0x130cf9,_0x17b373,_0x5c4e07)=>{if(!_0x5c4e07['consumable']['consume'](_0x17b373['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x17b373['modelRange']['isCollapsed'])return;const _0x4fa757=_0x17b373['modelRange']['start']['nodeAfter'];_0x4fa757['hasAttribute']('vid_start')||_0x4fa757['hasAttribute']('vid')||(_0x5c4e07['writer']['setAttribute']('vid_start',_0x17b373['viewItem']['getAttribute']('vid_start'),_0x4fa757),_0x5c4e07['writer']['setAttribute']('vid_end',_0x17b373['viewItem']['getAttribute']('vid_end'),_0x4fa757));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x56e1c6=>_0x56e1c6['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x34f15e,[,_0x2c796f])=>{['vid_start','vid_end','vid']['includes'](_0x2c796f)&&(_0x34f15e['return']=!0x0,_0x34f15e['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x35224d=>{_0x35224d['on']('attribute:vid',(_0x540062,_0x27df4c,_0x2b072b)=>{if('\x20'!=_0x27df4c['item']['data']||_0x27df4c['item']['parent']['maxOffset']>0x1)return;if(!_0x2b072b['consumable']['consume'](_0x27df4c['item'],_0x540062['name']))return;const _0x52d0ac=_0x2b072b['writer'],_0x2143da=_0x2b072b['mapper']['toViewRange'](_0x27df4c['range']);_0x52d0ac['wrap'](_0x2143da,_0x52d0ac['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2daaef){const _0x8ae13=_0x2daaef['plugins']['get']('RevisionViewer');return(_0x16e284,_0x1aef63,_0x4f197a)=>{const _0x486a34=_0x1aef63['markerName']['split'](':')[0x1],_0x345bfc=_0x8ae13['_getChangeFromId'](_0x486a34);if(!_0x345bfc)return null;const _0x1ac892='add'==_0x345bfc['type']?'split':'merge';if(!_0x4f197a['consumable']['test'](_0x1aef63['markerRange'],_0x16e284['name']))return;const _0x3d062f=_0x1aef63['markerRange']['getWalker'](),_0x4d099b=_0x1aef63['markerRange']['start'],_0x5b8ec3=_0x2daaef['model']['schema'];let _0x27456c=null,_0xff6380=null,_0x19145b=!0x1,_0x13cd77=!0x1;for(const _0x3aa5a7 of _0x3d062f){const _0xc63dc4=_0x3aa5a7['item'];_0x19145b=_0x19145b||_0x5b8ec3['isContent'](_0xc63dc4);const _0x46abbc=_0x4f197a['mapper']['toViewElement'](_0xc63dc4);if(_0x46abbc&&_0x46abbc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3aa5a7['type']&&(_0x5b8ec3['isBlock'](_0xc63dc4)&&!_0x5b8ec3['isLimit'](_0xc63dc4)&&(_0xc63dc4['nextSibling']||_0x4d099b['isAtEnd']?_0x27456c&&_0x27456c['parent']==_0xc63dc4||(_0x27456c=_0xc63dc4,_0x3155d8(_0x3aa5a7['previousPosition']),_0x13cd77=!0x0):_0xff6380=_0xff6380||_0x3aa5a7['previousPosition']));}function _0x3155d8(_0x576e0f){const _0x4e83fa=_0x4f197a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1ac892}),_0x24b4de=_0x4f197a['mapper']['toViewPosition'](_0x576e0f);_0x345bfc['data']['isSuggestion']&&_0x4f197a['writer']['addClass']('ck-suggestion-marker-'+_0x1ac892+'-new',_0x4e83fa),_0x8ae13['activeChange']==_0x345bfc&&_0x4f197a['writer']['addClass']('ck-suggestion-marker--active',_0x4e83fa),_0x4f197a['writer']['insert'](_0x24b4de,_0x4e83fa),_0x4f197a['mapper']['bindElementToMarker'](_0x4e83fa,_0x1aef63['markerName']);}_0x19145b||_0x13cd77||!_0xff6380||_0x3155d8(_0xff6380);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xf0a557,_0x57889a,_0x3a083d)=>{const _0x2ec0c0=_0x3a083d['mapper']['markerNameToElements'](_0x57889a['markerName']);if(_0x2ec0c0){for(const _0x50f71a of _0x2ec0c0)(_0x50f71a['hasClass']('ck-suggestion-marker-split')||_0x50f71a['hasClass']('ck-suggestion-marker-merge'))&&(_0x3a083d['mapper']['unbindElementFromMarkerName'](_0x50f71a,_0x57889a['markerName']),_0x3a083d['writer']['remove'](_0x50f71a));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0xa4e9df,_0x41847e,_0x425510)=>{const _0x4d1147=_0x41847e['markerName']['split'](':')[0x1],_0x258014=this['_getChangeFromId'](_0x4d1147);if(!_0x258014)return null;const _0x33e51b='add'==_0x258014['type']?'split':'merge';if(_0x425510['consumable']['test'](_0x41847e['markerRange'],_0xa4e9df['name']))for(const _0x2b6c70 of _0x41847e['markerRange']['getItems']()){if(!_0x2b6c70['is']('element','softBreak'))continue;const _0x36283b=_0x425510['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x33e51b}),_0x558710=_0x425510['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x2b6c70));_0x258014['data']['isSuggestion']&&_0x425510['writer']['addClass']('ck-suggestion-marker-'+_0x33e51b+'-new',_0x36283b),this['activeChange']==_0x258014&&_0x425510['writer']['addClass']('ck-suggestion-marker--active',_0x36283b),_0x425510['writer']['insert'](_0x558710,_0x36283b),_0x425510['mapper']['bindElementToMarker'](_0x36283b,_0x41847e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4b5f9d=>{for(const _0x1705b4 of this['editor']['model']['document']['getRootNames']()){const _0x2cd172=this['editor']['model']['document']['getRoot'](_0x1705b4),_0x32f66b=this['editor']['editing']['view']['document']['getRoot'](_0x1705b4);if(_0x32f66b){const _0x31109b=_0x2cd172['getAttribute']('revisionHistoryAttachChange');if(_0x4b5f9d['removeAttribute']('data-change-id',_0x32f66b),_0x4b5f9d['removeClass']('ck-revision-history-root-add',_0x32f66b),_0x4b5f9d['removeClass']('ck-revision-history-root-remove',_0x32f66b),_0x4b5f9d['removeClass']('ck-revision-history-root--active',_0x32f66b),_0x31109b){const _0x33690b=this['_getChangeFromId'](_0x31109b);if(!_0x33690b)return null;_0x4b5f9d['setAttribute']('data-change-id',_0x31109b,_0x32f66b),_0x4b5f9d['addClass']('ck-revision-history-root-'+_0x33690b['type'],_0x32f66b),this['activeChange']==_0x33690b&&_0x4b5f9d['addClass']('ck-revision-history-root--active',_0x32f66b);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x58ceda=>'revision-comment:'+_0x58ceda,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x25336c=>'revision-suggestion:'+_0x25336c,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x324909=>({'name':'suggestion:'+_0x324909,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4f7459=>{const _0x3b7aa7=_0x4f7459['markerName']['split'](':')[0x1];return'insertion'!=_0x3b7aa7&&'deletion'!=_0x3b7aa7?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3b7aa7]};}}),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',(_0x52e196,_0x2a98da,_0x2f4c4b)=>{const _0xd6e74c=_0x2f4c4b['mapper']['markerNameToElements'](_0x2a98da['markerName']);if(_0xd6e74c){for(const _0x8d16ab of _0xd6e74c)_0x8d16ab['is']('uiElement')&&(_0x2f4c4b['mapper']['unbindElementFromMarkerName'](_0x8d16ab,_0x2a98da['markerName']),_0x2f4c4b['writer']['remove'](_0x8d16ab));}},{'priority':'high'});}['_getChangeFromId'](_0x5d480d){return this['_changeIdToChange']['get'](_0x5d480d);}['_getViewForChange'](_0x57ef0e){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x57ef0e),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x52297e,_0x1dd5a3,_0x1fb6cd,_0x142ca2)=>{_0x142ca2&&this['_balloon']['remove'](_0x142ca2),_0x1fb6cd&&(this['_balloon']['add']({'view':_0x1fb6cd,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x308eb=this['editor']['editing'],_0x485fc1=this['_getChangeFromId'](_0x1fb6cd['changeId']);let _0x278f43;if(_0x485fc1['data']['isOnRoot']){const _0x48f8fc=_0x308eb['view']['getDomRoot'](_0x485fc1['rootName']);_0x278f43=Array['from'](_0x48f8fc['getClientRects']());}else{const _0x158510=this['editor']['model']['markers']['get']('revision:'+_0x1fb6cd['changeId']);_0x278f43=Array['from'](_0x308eb['mapper']['markerNameToElements'](_0x158510['name']))['map'](_0x45b986=>_0x308eb['view']['domConverter']['mapViewToDom'](_0x45b986))['map'](_0x58ff86=>Array['from'](_0x58ff86['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x278f43[0x0];return _0x278f43['find'](_0x3e9ecc=>_0x3e9ecc['top']-0x3<=this['_activeViewTarget']['y']&&_0x3e9ecc['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3e9ecc['left']-0x3<=this['_activeViewTarget']['x']&&_0x3e9ecc['right']+0x3>=this['_activeViewTarget']['x'])||_0x278f43[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x52fd29,_0x229e8d,_0x15d087,_0x4bc346)=>{this['activeView']=_0x15d087?this['_getViewForChange'](_0x15d087):null,this['editor']['model']['change'](()=>{const _0xb9f7bf=this['editor']['editing'];_0x4bc346&&(_0x4bc346['data']['isOnRoot']?_0xb9f7bf['view']['change'](_0x2a0835=>{_0x2a0835['removeClass']('ck-revision-history-root--active',_0xb9f7bf['view']['document']['getRoot'](_0x4bc346['rootName']));}):_0xb9f7bf['reconvertMarker']('revision:'+_0x4bc346['id'])),_0x15d087&&(_0x15d087['data']['isOnRoot']?_0xb9f7bf['view']['change'](_0x736381=>{_0x736381['addClass']('ck-revision-history-root--active',_0xb9f7bf['view']['document']['getRoot'](_0x15d087['rootName']));}):_0xb9f7bf['reconvertMarker']('revision:'+_0x15d087['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x136786,_0x4b5ba0)=>{if(this['activeChange'])return;const _0x47127a=this['_findChangeIdFromDomTarget'](_0x4b5ba0['target']),_0x51b35e=this['_changeIdToChange']['get'](_0x47127a);_0x51b35e?(this['_activeViewTarget']={'x':_0x4b5ba0['domEvent']['x'],'y':_0x4b5ba0['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x51b35e)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x41b14d,_0x48af99)=>{const _0x3afc6b=this['_findChangeIdFromDomTarget'](_0x48af99['target']),_0x82499e=this['_changeIdToChange']['get'](_0x3afc6b);_0x82499e?(this['_activeViewTarget']={'x':_0x48af99['domEvent']['x'],'y':_0x48af99['domEvent']['y']},_0x82499e===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x82499e):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x29ec0d){do{const _0x302143=_0x29ec0d['getAttribute']('data-change-id');if(_0x302143)return _0x302143;_0x29ec0d=_0x29ec0d['parent'];}while(_0x29ec0d);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5a0806=>{for(const _0x212e34 of this['editor']['model']['markers'])_0x5a0806['removeMarker'](_0x212e34);});}}function X(_0x111782,_0x1f5342){return(_0x283cfd,_0x3f272c,_0x184a10)=>{if(!_0x184a10['consumable']['test'](_0x3f272c['markerRange'],_0x283cfd['name']))return;const _0x1f7b11=_0x3f272c['markerRange']['getWalker'](),_0x394a35=_0x3f272c['markerRange']['start'],_0xc869e=_0x111782['model']['schema'];let _0x2285e3=null,_0x5708c1=null,_0x902573=!0x1,_0x238cff=!0x1;for(const _0x215cda of _0x1f7b11){const _0x2bddbd=_0x215cda['item'];_0x902573=_0x902573||_0xc869e['isContent'](_0x2bddbd);const _0x322a7e=_0x184a10['mapper']['toViewElement'](_0x2bddbd);if(_0x322a7e&&_0x322a7e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x215cda['type']&&(_0xc869e['isBlock'](_0x2bddbd)&&!_0xc869e['isLimit'](_0x2bddbd)&&(_0x2bddbd['nextSibling']||_0x394a35['isAtEnd']?_0x2285e3&&_0x2285e3['parent']==_0x2bddbd||(_0x2285e3=_0x2bddbd,_0x581fc2(_0x215cda['previousPosition']),_0x238cff=!0x0):_0x5708c1=_0x5708c1||_0x215cda['previousPosition']));}function _0x581fc2(_0xab9f90){const _0x57f9c3=_0x184a10['mapper']['toViewPosition'](_0xab9f90),_0x5796a7=_0x184a10['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1f5342});_0x184a10['writer']['insert'](_0x57f9c3,_0x5796a7),_0x184a10['mapper']['bindElementToMarker'](_0x5796a7,_0x3f272c['markerName']);}_0x902573||_0x238cff||!_0x5708c1||_0x581fc2(_0x5708c1);};}class mt extends _0x5052bf{constructor(_0x4a407a){super(_0x4a407a);const _0x25f413=_0x4a407a['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x25f413,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x25f413,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x418cb4=this['editor'],_0x54e61a=_0x418cb4['plugins']['get'](m),_0xca756c=_0x54e61a['isReady']?_0x54e61a['diff']['newRevisionId']:null;_0x418cb4['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xca756c);}['refresh'](){const {isReady:_0x3d2edb,isEnabled:_0x47bf42,repository:_0x3fd945,diff:_0x5ee789}=this['editor']['plugins']['get'](m),_0x2ba5c3=_0x5ee789&&_0x3fd945['getLaterVisibleRevision'](_0x5ee789['newRevisionId']);this['isEnabled']=_0x3d2edb&&_0x47bf42&&Boolean(_0x2ba5c3);}}class wt extends _0x5052bf{['_step'];constructor(_0x5ef8c0,{direction:_0x17b1f7}){super(_0x5ef8c0);const _0x23764b=_0x5ef8c0['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x17b1f7?0x1:-0x1,this['listenTo'](_0x23764b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x23764b,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x23764b,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x51718d=this['editor'],_0x56514e=_0x51718d['plugins']['get'](m),{isNavigationMode:_0x33a133,currentChangeNumber:_0x58e12a}=_0x56514e;let _0x4c3a30;if(_0x56514e['activeChange']=_0x33a133?_0x56514e['diff']['changes']['get'](_0x58e12a+this['_step']):_0x56514e['diff']['changes']['first'],_0x56514e['activeChange']['data']['isOnRoot'])_0x4c3a30=_0x51718d['editing']['view']['getDomRoot'](_0x56514e['activeChange']['rootName']);else{const _0x498d05=_0x51718d['model']['markers']['get']('revision:'+_0x56514e['activeChange']['id']);_0x4c3a30=_0x839c63(_0x51718d['editing'],_0x498d05);}_0x25496f({'target':_0x4c3a30,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x40e3a5,currentChangeNumber:_0x544e8d,numberOfChanges:_0x16aeae,isReady:_0x352428,isEnabled:_0xc9dc2b}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0xc9dc2b&&_0x352428&&_0x16aeae)&&(!_0x40e3a5||(0x1===this['_step']?_0x544e8d<_0x16aeae-0x1:_0x544e8d>0x0));}}class di extends ts{constructor(_0x2986ad){super(_0x2986ad);const _0x285252=this['bindTemplate'],_0x39bb06=new te(_0x2986ad),_0x40aa0a=new te(_0x2986ad);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',(_0x4cb7a5,_0x29a4d9)=>_0x4cb7a5&&_0x29a4d9>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x229506,_0x4e7268,_0x26a169,_0x3afc06)=>{if(!_0x229506)return g(_0x2986ad,'Loading...');if(!_0x26a169)return g(_0x2986ad,'No\x20changes');const _0x101856=g(_0x2986ad,'NUMBER_OF_CHANGES',_0x26a169);return _0x3afc06?g(_0x2986ad,'X_OF_Y_CHANGES',[_0x4e7268+0x1,_0x26a169]):_0x101856;}),_0x39bb06['set']({'label':g(_0x2986ad,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0xbeb4d2}),_0x40aa0a['set']({'label':g(_0x2986ad,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5c3a70}),_0x39bb06['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x40aa0a['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x39bb06['on']('execute',()=>this['fire']('execute','backward')),_0x40aa0a['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',_0x285252['if']('_isStatusLabelVisible','ck-hidden',_0x2a0166=>!_0x2a0166)]},'children':[{'text':_0x285252['to']('isNavigationMode',_0x325314=>_0x325314?g(_0x2986ad,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x2986ad,'Total')+':\x20')}]},{'text':_0x285252['to']('_statusText')}]},new _0x16798e(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x39bb06,_0x40aa0a]}]});}}const le='ck-editor__editable__loading-overlay';class de extends _0x3edab6{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x57d1c1=this['editor']['editing']['view'];_0x57d1c1['change'](_0x24b559=>{for(const _0x4625d6 of _0x57d1c1['document']['roots'])_0x24b559['addClass'](le,_0x4625d6);});}['hide'](){const _0x39ab2c=this['editor']['editing']['view'];_0x39ab2c['change'](_0x8d3dbe=>{for(const _0x1e9519 of _0x39ab2c['document']['roots'])_0x8d3dbe['removeClass'](le,_0x1e9519);});}}class R extends _0x3edab6{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,de];}['init'](){const _0x69b48d=this['editor'],_0x22aa18=_0x69b48d['plugins']['get'](m),_0xd905f=_0x69b48d['plugins']['get'](de);_0x69b48d['ui']['componentFactory']['add']('exitToEditing',_0x22b2f2=>{const _0x262336=new te(_0x22b2f2);return _0x262336['set']({'label':g(_0x22b2f2,'Back\x20to\x20editing'),'icon':_0x19e875,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x262336,'execute',()=>{_0x69b48d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x262336;}),_0x69b48d['ui']['componentFactory']['add']('restoreRevision',_0x1e00d7=>{const _0x513eee=new te(_0x1e00d7);return _0x513eee['set']({'label':g(_0x1e00d7,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x513eee['bind']('isEnabled')['to'](_0x69b48d['commands']['get']('restoreRevision')),this['listenTo'](_0x513eee,'execute',()=>_0x69b48d['execute']('restoreRevision')),_0x513eee;}),_0x69b48d['ui']['componentFactory']['add']('changesNavigation',_0x3ceb1a=>{const _0x36a7fb=new di(_0x3ceb1a),_0x23e0d1=_0x69b48d['commands']['get']('showPreviousChange'),_0x25aa6b=_0x69b48d['commands']['get']('showNextChange');return _0x36a7fb['bind']('isBackwardNavigationEnabled')['to'](_0x23e0d1,'isEnabled'),_0x36a7fb['bind']('isForwardNavigationEnabled')['to'](_0x25aa6b,'isEnabled'),_0x36a7fb['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x22aa18),this['listenTo'](_0x36a7fb,'execute',(_0x1c7497,_0x3b319f)=>{_0x69b48d['execute']('forward'===_0x3b319f?'showNextChange':'showPreviousChange');}),_0x36a7fb;}),_0xd905f['show'](),_0x22aa18['on']('change:isReady',(_0x2f1d90,_0x1474ef,_0x479c38)=>{_0x479c38?_0xd905f['hide']():_0xd905f['show']();});}}class at extends _0x4403fd{['_resizeObserver']=null;constructor(_0x2f66d3,_0x251333){super(_0x2f66d3,_0x251333);const _0x44b02d=this['bindTemplate'];this['set']({'label':g(_0x2f66d3,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x2f66d3,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x44b02d['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new nt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x451a74=this['fieldView']['element'];this['_tooltipString']=_0x451a74['scrollWidth']>_0x451a74['clientWidth']&&_0x451a74['value']||'';}}class si extends ts{constructor(_0x5cf806,_0x14df67,_0x38e359){super(_0x5cf806);const _0x511370=new _0x27a6cc();_0x511370['set']({'content':_0x201ae9,'viewBox':'0\x200\x2011\x2010'});const _0x1d564e=['ck','ck-revision-history-sidebar__revision-author'];_0x38e359&&_0x1d564e['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1b11cc=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x5cf806,_0x38e359?'Revision\x20creator':'Revision\x20author')},'children':[_0x511370,_0x14df67['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1d564e},'children':_0x1b11cc});}}function oi(_0x26f77a,_0x432bf6){const _0x5e5410=_0x26f77a['bindTemplate'],_0x3b4a86=_0x26f77a['locale'],_0x5d3d16=_0x45e760(_0x3b4a86);_0x5d3d16['panelPosition']='sw';const _0x34a852=function(_0x542cbc,_0x16bb68){const _0x30f3b8=function(_0x25a3dd,_0x2e36c6){const _0x5468b0=_0x25a3dd['locale'],_0x257589={'Compare\x20against\x20selected':g(_0x5468b0,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x5468b0,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x5468b0,'Restore\x20this\x20revision')};return _0x2e36c6['map'](_0x222b6b=>{const _0x2cc4a6=_0x257589[_0x222b6b['name']];return _0x2cc4a6&&_0x2cc4a6!==_0x222b6b['name']&&(_0x222b6b['name']=_0x2cc4a6),_0x222b6b;});}(_0x542cbc,_0x16bb68),_0x96a56c=new _0x133f10();for(const _0x4f04bb of _0x30f3b8){const _0x2ff1f4={'type':'button','model':new to({'label':_0x4f04bb['name'],'class':_0x4f04bb['class'],'withText':!0x0,'role':'menuitem','_action':_0x4f04bb['action']})};_0x2ff1f4['model']['bind']('isEnabled')['to'](_0x542cbc,'isActionsDropdownOpen',_0x32e25d=>'function'!=typeof _0x4f04bb['isEnabled']||(!_0x32e25d||_0x4f04bb['isEnabled'](_0x542cbc))),_0x96a56c['add'](_0x2ff1f4);}return _0x96a56c;}(_0x26f77a,_0x432bf6);return _0x26f77a['bind']('isActionsDropdownOpen')['to'](_0x5d3d16,'isOpen'),_0x5d3d16['buttonView']['set']({'label':g(_0x3b4a86,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x14114e}),_0x5d3d16['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5e5410['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5e5410['to'](_0x58543c=>_0x58543c['stopPropagation']())}}),_0x5d3d16['on']('execute',_0x502876=>{_0x26f77a['isReady']&&'function'==typeof _0x502876['source']['_action']&&_0x502876['source']['_action'](_0x26f77a);}),_0x22278b(_0x5d3d16,_0x34a852,{'role':'menu'}),_0x5d3d16['listenTo'](_0x26f77a,'change:isActionsDropdownOpen',(_0x14241c,_0x57a295,_0x40a7cf)=>{if(_0x40a7cf)for(const _0x14b63a of _0x5d3d16['listView']['items']){const _0x87c629=_0x14b63a['children']['first'],_0x100e02=_0x432bf6['find'](_0x57b201=>_0x57b201['action']===_0x87c629['_action'])['isVisible'];_0x14b63a['isVisible']=void 0x0===_0x100e02||_0x100e02(_0x26f77a);}}),_0x5d3d16;}class hi extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x27e923,uid as _0x402ab0,Collection as _0x1301ad,logWarning as _0x4c8407,FocusTracker as _0xc3e64e,KeystrokeHandler as _0x1082ff,scrollViewportToShowTarget as _0x55b855,ResizeObserver as at,ElementReplacer as ot,CKEditorError as _0x51ece8}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2611c8,set as _0x32cded,unset as _0x21f1a6,isEqual as _0x40d4f8}from'es-toolkit/compat';import{Plugin as _0x4489ae,PendingActions as _0x46ffbc,Command as _0x180cbd,ElementApiMixin as _0x3249be,Editor as _0x2b34f8}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x5cb796,getMarkerDomElement as _0x91cb6f,ConfirmMixin as _0x180a86,sanitizeEditorConfig as _0x4493fa}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x58ed23,ViewAttributeElement as _0xb91259,ViewEmptyElement as _0x2e854e,ViewRawElement as _0x47d335,ViewUIElement as _0x242f84,ViewDocumentFragment as _0x130a2d,ViewText as _0x2b4261,ViewElement as _0x820fb5,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 _0x25d66f,IconChevronUp as _0x3f13b7,IconChevronDown as _0x5ad88d,IconUndo as _0x1b0aa9,IconUser as _0x636f70,IconThreeVerticalDots as _0x47c6f0}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x3c4eb7,injectCssTransitionDisabler as ts,submitHandler as _0xa709b3,LabeledFieldView as nt,createLabeledInputText as ti,createDropdown as _0x387160,ListView as _0x4eb355,ListItemView as te,ButtonView as _0x2e6643,MenuBarMenuView as _0x18dac9,MenuBarMenuListView as _0x970e28,MenuBarMenuListItemView as _0x1006d3,MenuBarMenuListItemButtonView as _0x15a5e5,ContextualBalloon as _0x472b27,ToolbarSeparatorView as _0x31076d,IconView as _0x3266ad,addListToDropdown as _0x12319e,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 _0x2f423f}from'luxon';class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x27e923(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1f1a95){super(),this['id']=_0x1f1a95['id']||_0x402ab0(),this['creator']=_0x1f1a95['creator']||null,this['authors']=_0x1f1a95['authors']||[],this['diffData']=_0x1f1a95['diffData']||null,this['toVersion']=_0x1f1a95['toVersion']||0x0,this['fromVersion']=_0x1f1a95['fromVersion']||0x0,this['set']('name',_0x1f1a95['name']||''),this['set']('createdAt',_0x1f1a95['createdAt']||new Date()),this['set']('attributes',_0x1f1a95['attributes']||{});}['setName'](_0x2435bc){this['_update']({'name':_0x2435bc});}['setAttribute'](_0x5cbfb5,_0x5bc14d){const _0x27082b=_0x2611c8(this['attributes']);_0x32cded(_0x27082b,_0x5cbfb5,_0x5bc14d),this['_update']({'attributes':_0x27082b});}['removeAttribute'](_0x10426e){const _0x5809d4=_0x2611c8(this['attributes']);_0x21f1a6(_0x5809d4,_0x10426e),this['_update']({'attributes':_0x5809d4});}['_update'](_0x566094,_0x262558=!0x1){let _0x86897f=!0x1;const _0x1a450d={'id':this['id']},_0xde9d1e=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x3318d3 of _0xde9d1e){const _0x5a69c0=_0x566094[_0x3318d3];void 0x0!==_0x5a69c0&&_0x5a69c0!==this[_0x3318d3]&&(this[_0x3318d3]=_0x5a69c0,_0x1a450d[_0x3318d3]=_0x5a69c0,_0x86897f=!0x0);}_0x86897f&&(_0x1a450d['authors']&&(_0x1a450d['authorsIds']=_0x1a450d['authors']['map'](_0x54ab6f=>_0x54ab6f['id']),delete _0x1a450d['authors']),this['fire']('_update',_0x1a450d,_0x262558));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x28d818=>_0x28d818['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x4489ae{['_revisions'];static get['requires'](){return[_0x5cb796];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5794c2){super(_0x5794c2),this['_revisions']=new _0x1301ad();}['afterInit'](){!async function(_0x46abc8){const _0x2c0758=_0x58761a([0x70,0x73,0x58,0x47,0x37,0x6b,0x4d,0x52,0x79,0x4e,0x76,0x53,0x51,0x35,0x55,0x64,0x74,0x50,0x34,0x4a,0x49,0x32,0x57,0x48,0x41,0x6e,0x5a,0x39,0x43,0x44,0x68,0x6d,0x59,0x30,0x78,0x65,0x67,0x75,0x45,0x31,0x4b,0x69,0x46,0x71,0x4f,0x54,0x33,0x63,0x72,0x61,0x66,0x56,0x4c,0x36,0x6f,0x7a,0x6c,0x62,0x6a,0x38,0x77,0x42]),_0x504970=0xeb829,_0x26835e=0x79692806,_0x43845e=0x796e4c8e^_0x26835e,_0x3bb223=window[_0x58761a([0x44,0x61,0x74,0x65])][_0x58761a([0x6e,0x6f,0x77])](),_0x48548d=_0x46abc8[_0x58761a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1ad87d=new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x403154=>{_0x48548d[_0x58761a([0x6f,0x6e,0x63,0x65])](_0x58761a([0x72,0x65,0x61,0x64,0x79]),_0x403154);}),_0x4c2b3e={[_0x58761a([0x6b,0x74,0x79])]:_0x58761a([0x45,0x43]),[_0x58761a([0x75,0x73,0x65])]:_0x58761a([0x73,0x69,0x67]),[_0x58761a([0x63,0x72,0x76])]:_0x58761a([0x50,0x2d,0x32,0x35,0x36]),[_0x58761a([0x78])]:_0x58761a([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]),[_0x58761a([0x79])]:_0x58761a([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]),[_0x58761a([0x61,0x6c,0x67])]:_0x58761a([0x45,0x53,0x32,0x35,0x36])},_0x214fec=_0x48548d[_0x58761a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x58761a([0x67,0x65,0x74])](_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x472114(){let _0x21a073,_0x29a8ef=null,_0x2f62d7=null;try{if(_0x214fec==_0x58761a([0x47,0x50,0x4c]))return _0x58761a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x21a073=_0x36c363(),!_0x21a073)return _0x58761a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x21a073[_0x58761a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f62d7=_0x471b39(_0x21a073[_0x58761a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x21a073[_0x58761a([0x6a,0x74,0x69])])),await _0x251f3c()?_0x4b743c()?_0x4b1f4f()?_0x58761a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x322944()?(_0x21a073[_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x58761a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x29a8ef=_0x2dc2e3(_0x58761a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x21a073[_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x58761a([0x74,0x72,0x69,0x61,0x6c])&&(_0x29a8ef=_0x2dc2e3(_0x58761a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1ada66()):_0x58761a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x58761a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x58761a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x236556){return _0x58761a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4b1f4f(){const _0xc7d920=[_0x58761a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x58761a([0x74,0x72,0x69,0x61,0x6c])][_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x21a073[_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3bb223/0x3e8:0xe10*_0x43845e;return _0x21a073[_0x58761a([0x65,0x78,0x70])]<_0xc7d920;}function _0x4b743c(){const _0x133b71=_0x21a073[_0x58761a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x133b71)return!0x1;if(_0x133b71[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58761a([0x2a])))return!0x0;if(_0x133b71[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58761a([0x52,0x48])))return!0x0;if(_0x133b71[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58761a([0x52,0x52,0x48]))){if(_0x2b263b())return!0x0;if(_0x19e9fe()||_0x459a51())return!0x0;}return!0x1;}function _0x322944(){const _0x37d7bf=_0x21a073[_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x37d7bf||0x0==_0x37d7bf[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xea35d6}=new URL(window[_0x58761a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x37d7bf[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xea35d6))return!0x0;const _0x2018c9=_0xea35d6[_0x58761a([0x73,0x70,0x6c,0x69,0x74])](_0x58761a([0x2e]));return _0x37d7bf[_0x58761a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x41ea9d=>_0x41ea9d[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58761a([0x2a])))[_0x58761a([0x6d,0x61,0x70])](_0x1c6ee4=>_0x1c6ee4[_0x58761a([0x73,0x70,0x6c,0x69,0x74])](_0x58761a([0x2e])))[_0x58761a([0x73,0x6f,0x6d,0x65])](_0x2092f2=>_0x2018c9[_0x58761a([0x65,0x76,0x65,0x72,0x79])]((_0x965a64,_0x437b6d)=>_0x2092f2[_0x437b6d]===_0x965a64||_0x2092f2[_0x437b6d]===_0x58761a([0x2a])));}function _0x1ada66(){return _0x29a8ef&&_0x2f62d7?new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x61cfe2,_0xa61653)=>{_0x29a8ef[_0x58761a([0x74,0x68,0x65,0x6e])](_0x61cfe2,_0xa61653),_0x2f62d7[_0x58761a([0x74,0x68,0x65,0x6e])](_0x398b39=>{_0x398b39!=_0x58761a([0x56,0x61,0x6c,0x69,0x64])&&_0x61cfe2(_0x398b39);},_0xa61653);}):_0x29a8ef||_0x2f62d7||_0x58761a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x471b39(_0x677873,_0x5317dd){return new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40544e=>{if(_0x5df5fd())return _0x40544e(_0x58761a([0x56,0x61,0x6c,0x69,0x64]));_0x1e54d8(),_0x48548d[_0x58761a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x58761a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x111139=!0x1;const _0x182bc8=_0x402ab0();function _0x2807d7(_0xdf4307){return!!_0xdf4307&&(typeof _0xdf4307===_0x58761a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xdf4307===_0x58761a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xdf4307[_0x58761a([0x74,0x68,0x65,0x6e])]===_0x58761a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xdf4307[_0x58761a([0x63,0x61,0x74,0x63,0x68])]===_0x58761a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x57f9be(_0x9e011c){_0x38e8bc(_0x9e011c)[_0x58761a([0x74,0x68,0x65,0x6e])](_0x198ca8=>{if(!_0x198ca8||_0x198ca8[_0x58761a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x58761a([0x6f,0x6b]))return _0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x51eb52(_0x15b27f(_0x182bc8+_0x5317dd))!=_0x198ca8[_0x58761a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x58761a([0x56,0x61,0x6c,0x69,0x64]);})[_0x58761a([0x74,0x68,0x65,0x6e])](_0x58e7ed=>(_0x4e45f7(),_0x58e7ed),()=>{const _0x5d9092=_0x23bd1f();return null==_0x5d9092?(_0x4e45f7(),_0x58761a([0x56,0x61,0x6c,0x69,0x64])):_0x58761a(_0x3bb223-_0x5d9092>(0x5d65ac06^_0x26835e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x58761a([0x74,0x68,0x65,0x6e])](_0x40544e)[_0x58761a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x40544e(_0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1caf3d=0x795fc686^_0x26835e;function _0x4e45f7(){const _0x1a6345=_0x58761a([0x6c,0x6c,0x63,0x74,0x2d])+_0x51eb52(_0x15b27f(_0x677873)),_0x32e487=_0x3cc8e0(_0x51eb52(window[_0x58761a([0x4d,0x61,0x74,0x68])][_0x58761a([0x63,0x65,0x69,0x6c])](_0x3bb223/_0x1caf3d)));window[_0x58761a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x58761a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1a6345,_0x32e487);}function _0x23bd1f(){const _0x1b54b8=_0x58761a([0x6c,0x6c,0x63,0x74,0x2d])+_0x51eb52(_0x15b27f(_0x677873)),_0xa34552=window[_0x58761a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x58761a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b54b8);return _0xa34552?window[_0x58761a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3cc8e0(_0xa34552),0x10)*_0x1caf3d:null;}function _0x38e8bc(_0x284422){return new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14c829,_0x4a730)=>{_0x284422[_0x58761a([0x74,0x68,0x65,0x6e])](_0x14c829,_0x4a730),window[_0x58761a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4a730,0x7968fcc6^_0x26835e);});}}_0x48548d[_0x58761a([0x6f,0x6e])](_0x58761a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f727c,_0x225af3)=>{if(_0x225af3[0x0]!=_0x677873)return _0x40544e(_0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x225af3[0x1]={..._0x225af3[0x1],[_0x58761a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x182bc8};},{[_0x58761a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x58761a([0x68,0x69,0x67,0x68])}),_0x48548d[_0x58761a([0x6f,0x6e])](_0x58761a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x236edf=>{_0x2807d7(_0x236edf[_0x58761a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x111139=!0x0,_0x57f9be(_0x236edf[_0x58761a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x58761a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x58761a([0x6c,0x6f,0x77])}),_0x1ad87d[_0x58761a([0x74,0x68,0x65,0x6e])](()=>{_0x111139||_0x40544e(_0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5df5fd(){return _0x48548d[_0x58761a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58761a([0x76,0x69,0x65,0x77])][_0x58761a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x58761a([0x61,0x75,0x74,0x6f]);}function _0x1e54d8(){_0x48548d[_0x58761a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58761a([0x76,0x69,0x65,0x77])][_0x58761a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x58761a([0x61,0x75,0x74,0x6f]);}}function _0x2dc2e3(_0x4f129f){const _0xf768ad=[new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x187a63=>setTimeout(_0x187a63,0x796016ca^_0x26835e)),_0x1ad87d[_0x58761a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4554ef=>{const _0x53fb9b=0x79692801^_0x26835e,_0x26b79b=_0x46abc8[_0x58761a([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x3144f6(){_0x26b79b[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x53fb9b&&_0x4554ef();}_0x3144f6(),_0x26b79b[_0x58761a([0x6f,0x6e])](_0x58761a([0x61,0x64,0x64]),_0x3144f6);})),new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x113522=>{function _0x53d03f(){for(const _0x4e2f94 in window)if(window[_0x58761a([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x58761a([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4e2f94))&&window[_0x4e2f94]==_0x504970)return _0x113522();_0x48548d[_0x58761a([0x73,0x74,0x61,0x74,0x65])]!=_0x58761a([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x58761a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x53d03f,0x79693b8e^_0x26835e);}_0x28e9b0(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x53d03f();})];return window[_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x58761a([0x72,0x61,0x63,0x65])](_0xf768ad)[_0x58761a([0x74,0x68,0x65,0x6e])](()=>_0x4f129f);}async function _0x2db44a(){if(await _0x1ad87d,_0x28e9b0(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x589fe0=_0x46abc8[_0x58761a([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4426a2=_0x46abc8[_0x58761a([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])](_0x589fe0[_0x58761a([0x69,0x64])]),_0x200375=_0x41f606(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x200375[_0x58761a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x589fe0['id'],_0x4426a2?_0x4426a2['id']:null,!0x0),_0x200375[_0x58761a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x58761a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x200375[_0x58761a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x200375[_0x58761a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3cb891,void(_0x200375[_0x58761a([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3cb891);}if(_0x28e9b0(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x47e324=_0x41f606(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x47e324[_0x58761a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x58761a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x47e324[_0x58761a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x47e324[_0x58761a([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3cb891,_0x47e324[_0x58761a([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3cb891;}_0x48548d[_0x58761a([0x6d,0x6f,0x64,0x65,0x6c])][_0x58761a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3cb891,_0x48548d[_0x58761a([0x6d,0x6f,0x64,0x65,0x6c])][_0x58761a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3cb891,_0x48548d[_0x58761a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x58761a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2b263b(){return _0x28e9b0(_0x58761a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x41f606(_0x58761a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x58761a([0x73,0x74,0x61,0x74,0x65])]==_0x58761a([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x19e9fe(){return _0x28e9b0(_0x58761a([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 _0x459a51(){return _0x28e9b0(_0x58761a([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x11bd69(_0x817e28){const _0xfe0538=_0x326309();_0x48548d[_0xfe0538]=_0x58761a([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])+_0x817e28,_0x817e28[_0x58761a([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x58761a([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x326309()]=_0x504970),_0x817e28!=_0x58761a([0x56,0x61,0x6c,0x69,0x64])&&_0x2db44a();}function _0x326309(){const _0x28d8dc=window[_0x58761a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x58761a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x58761a([0x6e,0x6f,0x77])]())[_0x58761a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x58761a([0x2e]),'');let _0x28f14b=_0x58761a([0x70]);for(let _0x4b5b93=0x0;_0x4b5b93<_0x28d8dc[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b5b93+=0x2){let _0x5ec40f=window[_0x58761a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x28d8dc[_0x58761a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b5b93,_0x4b5b93+0x2));_0x5ec40f>=_0x2c0758[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5ec40f-=_0x2c0758[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x28f14b+=_0x2c0758[_0x5ec40f];}return _0x28f14b;}function _0x36c363(){const _0xa26e0d=_0x214fec[_0x58761a([0x73,0x70,0x6c,0x69,0x74])](_0x58761a([0x2e]));if(0x3!=_0xa26e0d[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5498f6(_0xa26e0d[0x1]);function _0x5498f6(_0x40c42d){const _0x1670a3=_0x2ba6b8(_0x40c42d);return _0x1670a3&&_0x52417a()?_0x1670a3:null;function _0x52417a(){const _0x237f3b=_0x1670a3[_0x58761a([0x6a,0x74,0x69])],_0x26166c=window[_0x58761a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x237f3b[_0x58761a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x237f3b[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x30c703={..._0x1670a3,[_0x58761a([0x6a,0x74,0x69])]:_0x237f3b[_0x58761a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x237f3b[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x30c703[_0x58761a([0x76,0x63])],_0x15b27f(_0x30c703)==_0x26166c;}}}async function _0x251f3c(){let _0x51c456=!0x0;try{const _0x4c97ff=_0x214fec[_0x58761a([0x73,0x70,0x6c,0x69,0x74])](_0x58761a([0x2e])),[_0x2952d6,_0x5e7b0c,_0xa5f0df]=_0x4c97ff;return _0x3477e4(_0x2952d6),await _0x4e3fec(_0x2952d6,_0x5e7b0c,_0xa5f0df),_0x51c456;}catch(_0x290de2){return!0x1;}function _0x3477e4(_0x389496){const _0x399765=_0x2ba6b8(_0x389496);_0x399765&&_0x399765[_0x58761a([0x61,0x6c,0x67])]==_0x58761a([0x45,0x53,0x32,0x35,0x36])||(_0x51c456=!0x1);}async function _0x4e3fec(_0x1521b0,_0xae335c,_0x214a98){const _0x11d9aa=window[_0x58761a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x58761a([0x66,0x72,0x6f,0x6d])](_0x39d242(_0x214a98),_0x11ccff=>_0x11ccff[_0x58761a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3b8da9=new window[(_0x58761a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x58761a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1521b0+_0x58761a([0x2e])+_0xae335c),_0x2288e1=window[_0x58761a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x58761a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2288e1)return;const _0x4e9bd4=await _0x2288e1[_0x58761a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x58761a([0x6a,0x77,0x6b]),_0x4c2b3e,{[_0x58761a([0x6e,0x61,0x6d,0x65])]:_0x58761a([0x45,0x43,0x44,0x53,0x41]),[_0x58761a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x58761a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x58761a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2288e1[_0x58761a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x58761a([0x6e,0x61,0x6d,0x65])]:_0x58761a([0x45,0x43,0x44,0x53,0x41]),[_0x58761a([0x68,0x61,0x73,0x68])]:{[_0x58761a([0x6e,0x61,0x6d,0x65])]:_0x58761a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4e9bd4,_0x11d9aa,_0x3b8da9)||(_0x51c456=!0x1);}}function _0x2ba6b8(_0x447d9f){return _0x447d9f[_0x58761a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x58761a([0x65,0x79]))?JSON[_0x58761a([0x70,0x61,0x72,0x73,0x65])](_0x39d242(_0x447d9f)):null;}function _0x39d242(_0x1586d0){return window[_0x58761a([0x61,0x74,0x6f,0x62])](_0x1586d0[_0x58761a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x58761a([0x2b]))[_0x58761a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x58761a([0x2f])));}function _0x15b27f(_0x198da3){let _0x152fdd=0x1505;function _0x4b8463(_0x99fe68){for(let _0x424a14=0x0;_0x424a14<_0x99fe68[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x424a14++){const _0x3c3055=_0x99fe68[_0x58761a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x424a14);_0x152fdd=(_0x152fdd<<0x5)+_0x152fdd+_0x3c3055,_0x152fdd&=_0x152fdd;}}function _0x3f0322(_0x32a5b7){Array[_0x58761a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x32a5b7)?_0x32a5b7[_0x58761a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3f0322):_0x32a5b7&&typeof _0x32a5b7==_0x58761a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x58761a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x32a5b7)[_0x58761a([0x73,0x6f,0x72,0x74])]()[_0x58761a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x23f2b5,_0x4d73ee])=>{_0x4b8463(_0x23f2b5),_0x3f0322(_0x4d73ee);}):_0x4b8463(window[_0x58761a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x32a5b7));}return _0x3f0322(_0x198da3),_0x152fdd>>>0x0;}function _0x51eb52(_0x4e69f2){return _0x4e69f2[_0x58761a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x58761a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x58761a([0x30]));}function _0x3cc8e0(_0x57fd06){return _0x57fd06[_0x58761a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x58761a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x58761a([0x6a,0x6f,0x69,0x6e])]('');}function _0x28e9b0(_0x4280a4){return _0x48548d[_0x58761a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x58761a([0x68,0x61,0x73])](_0x4280a4);}function _0x41f606(_0x449823){return _0x48548d[_0x58761a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x58761a([0x67,0x65,0x74])](_0x449823);}function _0x3cb891(){}function _0x58761a(_0x1d9af5){return _0x1d9af5['map'](_0x272359=>String['fromCharCode'](_0x272359))['join']('');}_0x11bd69(await _0x472114());}(this);}['createRevision'](_0x4180d7){const _0x1fa7b5=this['editor']['plugins']['get']('Users');return new h({'id':_0x4180d7['id'],'name':_0x4180d7['name'],'creator':_0x4180d7['creatorId']?_0x1fa7b5['getUser'](_0x4180d7['creatorId']):null,'diffData':_0x4180d7['diffData']||_0x4180d7['data'],'authors':_0x4180d7['authorsIds']['map'](_0x1528df=>_0x1fa7b5['getUser'](_0x1528df)),'createdAt':new Date(_0x4180d7['createdAt']),'attributes':_0x4180d7['attributes'],'fromVersion':_0x4180d7['fromVersion'],'toVersion':_0x4180d7['toVersion']});}['addRevision'](_0x25fd87,_0x305270=0x0){this['_revisions']['add'](_0x25fd87,_0x305270);}['getRevision'](_0x3f357e){return this['_revisions']['get'](_0x3f357e);}['getRevisions'](_0x284256={'toJSON':!0x1}){const _0x186309=Array['from'](this['_revisions']);return _0x186309['reverse'](),_0x284256['toJSON']?_0x186309['map'](_0x3051e6=>_0x3051e6['toJSON']()):_0x186309;}['getIndex'](_0x270d6e){return this['_revisions']['getIndex'](_0x270d6e);}['getEarlierVisibleRevision'](_0x5d9e67){const [,_0x1d18c2]=this['getRevisionsIterator'](_0x5d9e67,{'direction':'earlier'});return _0x1d18c2;}['getLaterVisibleRevision'](_0x1acb9e){const [,_0x55ed2e]=this['getRevisionsIterator'](_0x1acb9e,{'direction':'later'});return _0x55ed2e;}['getRevisionsInDiff'](_0xac39eb){const _0x21c936=[];for(const _0x238ce9 of this['getRevisionsIterator'](_0xac39eb['newRevisionId']))if(_0x21c936['push'](_0x238ce9),_0x238ce9['id']===_0xac39eb['oldRevisionId'])break;return _0x21c936;}*['getRevisionsIterator'](_0x2423fc,{direction:_0x591cf1='earlier',filter:_0x1e9e99=()=>!0x0}={}){const _0x91f239='earlier'===_0x591cf1?0x1:-0x1;let _0x46d1fd=this['_revisions']['get'](_0x2423fc),_0x3b3935=this['getIndex'](_0x46d1fd);for(yield _0x46d1fd;_0x46d1fd;){if(_0x3b3935+=_0x91f239,_0x46d1fd=this['getRevision'](_0x3b3935),!_0x46d1fd)return;_0x1e9e99(_0x46d1fd)&&(yield _0x46d1fd);}}}class V extends _0x4489ae{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x58ed23,'c'],[_0xb91259,'a'],[_0x2e854e,'e'],[_0x47d335,'r'],[_0x242f84,'u']]);['_typeCharToViewClass']=new Map([['c',_0x58ed23],['a',_0xb91259],['e',_0x2e854e],['r',_0x47d335],['u',_0x242f84]]);async['loadRevisionData'](_0x2bb1ac,_0x410724){if(_0x2bb1ac['diffData']||!_0x410724)return;const _0x5ec004=this['editor']['config']['get']('collaboration.channelId'),_0x4100d5=await _0x410724['getRevision']({'channelId':_0x5ec004,'revisionId':_0x2bb1ac['id']});_0x2bb1ac['diffData']=_0x4100d5['diffData'];}['getRevisionDocumentData'](_0xc8e7e9){const _0x47a44a={};for(const _0x26f7c8 in _0xc8e7e9['diffData']){if(_0xc8e7e9['diffData'][_0x26f7c8]['attachChange']&&!_0xc8e7e9['diffData'][_0x26f7c8]['attachChange']['isAttached'])continue;const _0x234dfe=this['_removeRevisionMarkers'](JSON['parse'](_0xc8e7e9['diffData'][_0x26f7c8]['insertions'])),_0x4ed498=this['editor']['editing']['view']['document'],_0x37862e=new _0x130a2d(_0x4ed498,_0x234dfe['map'](_0x2b69e7=>this['_getViewFromDiffObj'](_0x2b69e7,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x47a44a[_0x26f7c8]=this['editor']['data']['processor']['toData'](_0x37862e),this['editor']['data']['processor']['useFillerType']('default');}return _0x47a44a;}['getRevisionRootsAttributes'](_0x77d5ff){const _0x358192={};for(const _0x2d4d25 in _0x77d5ff['diffData'])_0x77d5ff['diffData'][_0x2d4d25]['attachChange']&&!_0x77d5ff['diffData'][_0x2d4d25]['attachChange']['isAttached']||(_0x358192[_0x2d4d25]=_0x77d5ff['diffData'][_0x2d4d25]['attributesAfter']||{});return _0x358192;}['_getTypeCharForViewElement'](_0x46403d){return this['_viewClassToTypeChar']['get'](_0x46403d['constructor']);}['_getViewFromDiffObj'](_0x40c347,_0x5e4f7c){const _0x35d1fb=this['editor']['editing']['view']['document'];if('string'==typeof _0x40c347)return new _0x2b4261(_0x35d1fb,_0x40c347);{let _0x390c77,_0x6723e7;_0x6723e7='u'==_0x40c347['type']||'r'==_0x40c347['type']?[]:_0x40c347['children']['map'](_0x2d3f4a=>this['_getViewFromDiffObj'](_0x2d3f4a,_0x5e4f7c));const _0xe31234=this['_typeCharToViewClass']['get'](_0x40c347['type'])||_0x820fb5,_0x3b673a=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x390c77=new _0xe31234(_0x35d1fb,_0x40c347['name'],_0x40c347['attributes'],_0x6723e7),'u'==_0x40c347['type']&&_0x40c347['children'][0x0]){const _0x3abfc3=_0x40c347['children'][0x0];if(_0x390c77['render']=function(_0x3566ab){const _0x3a9712=_0x3566ab['createElement']('div');return _0x3a9712['innerHTML']=_0x3abfc3,_0x3a9712['childNodes'][0x0];},_0x5e4f7c){const _0x134f9d=new _0x130a2d(_0x35d1fb);_0x134f9d['_appendChild'](_0x390c77);const _0x2d0ade=Array['from'](_0x3b673a['viewChildrenToDom'](_0x134f9d,{'bind':!0x1})),_0x3ebdc0=_0x3b673a['domDocument']['createElement']('div');_0x3ebdc0['append'](..._0x2d0ade),_0x390c77=Array['from'](_0x3b673a['domChildrenToView'](_0x3ebdc0))[0x0];}}else{if('r'==_0x40c347['type']&&_0x40c347['children'][0x0]){const _0x165dd4=_0x40c347['children'][0x0];if(_0x390c77['render']=function(_0x512e24){_0x512e24['innerHTML']=_0x165dd4;},_0x5e4f7c){const _0x3ba80d=new _0x130a2d(_0x35d1fb);_0x3ba80d['_appendChild'](_0x390c77);const _0xd1bf5f=Array['from'](_0x3b673a['viewChildrenToDom'](_0x3ba80d,{'bind':!0x1})),_0x4bc62a=_0x3b673a['domDocument']['createElement']('div');_0x4bc62a['append'](..._0xd1bf5f);const _0x258ce3=Array['from'](_0x3b673a['domChildrenToView'](_0x4bc62a));_0x258ce3['length']>0x1?_0x390c77['_appendChild'](_0x258ce3):_0x390c77=_0x258ce3[0x0];}}}if(_0x40c347['customProperties']){for(const [_0x364aa9,_0x504114]of _0x40c347['customProperties'])_0x390c77['_setCustomProperty'](_0x364aa9,_0x504114);}const _0x21e797=void 0x0===_0x40c347['fillerOffset']?null:_0x40c347['fillerOffset'];return null!==_0x21e797&&(_0x390c77['getFillerOffset']=()=>_0x21e797),_0x390c77;}}['_makeModelFromViewString'](_0x1c90d0){const _0x5dd9bc=JSON['parse'](_0x1c90d0),_0x1f941c=this['editor']['editing']['view']['document'],_0x56f9c5=new _0x130a2d(_0x1f941c,_0x5dd9bc['map'](_0x56e6da=>this['_getViewFromDiffObj'](_0x56e6da,!0x0)));return this['editor']['data']['toModel'](_0x56f9c5);}['_removeRevisionMarkers'](_0x4bc6ad){return(_0x4bc6ad=_0x4bc6ad['filter'](_0x5e1cb0=>!_0x5e1cb0['name']||'revision-start'!==_0x5e1cb0['name']&&'revision-end'!==_0x5e1cb0['name']))['forEach'](_0x393c9b=>{'string'!=typeof _0x393c9b&&(_0x393c9b['children']=this['_removeRevisionMarkers'](_0x393c9b['children']),_0x393c9b['attributes']=_0x393c9b['attributes']['filter'](_0x403848=>!_0x403848[0x0]['startsWith']('data-revision-')));}),_0x4bc6ad;}}function g(_0x3060e0,_0x3f1760,_0x1f9ed2){const t=_0x3060e0['t'];switch(_0x3f1760){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'},_0x1f9ed2);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1f9ed2);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 _0x4489ae{['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[_0x5cb796,I,V,_0x46ffbc];}constructor(_0x2721da){super(_0x2721da),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 _0x4f4e5d=_0x402ab0();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4f4e5d},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 _0x2c2803=this['repository']['getRevision'](0x0),_0x267392=_0x2c2803&&null===_0x2c2803['creator']?_0x2c2803:null;if(this['_continueCurrentRevision']=!!_0x267392&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x490a98=this['_source']['getCurrentRevisionId'](),_0x19e10b=this['repository']['getRevision'](_0x490a98);if(_0x19e10b)this['_startingVersion']=_0x19e10b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3a3fcc=this['_source']['history']['_operations']['find'](_0x5d2c79=>!_0x5d2c79['_isInit']),_0x2cfa14=_0x3a3fcc?_0x3a3fcc['baseVersion']:this['_source']['history']['version'];_0x2c2803?(_0x2c2803['toVersion']<_0x2cfa14&&_0x2c2803['_update']({'toVersion':_0x2cfa14}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x267392['id'],this['_startingVersion']=_0x267392['fromVersion']):(this['_startingVersion']=_0x2c2803['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2cfa14,this['_continueCurrentRevision']=!0x1);}}else _0x267392&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x267392['toVersion'],this['editor']['model']['document']['history']['version']),_0x267392['fromVersion']===_0x267392['toVersion']?(0x0!==_0x267392['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x267392['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x267392['id'],this['_startingVersion']=_0x267392['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',_0x181550=>!_0x181550),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x324e61=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xe14db7;for(const _0x94f3f2 in _0x324e61){const _0x402fd6=_0x94f3f2,_0x2d8355=_0x324e61[_0x402fd6];if('revisionHistoryLicenseKeyValid'==_0x2d8355||'revisionHistoryLicenseKeyInvalid'==_0x2d8355||'revisionHistoryLicenseKeyExpired'==_0x2d8355||'revisionHistoryLicenseKeyDomainLimit'==_0x2d8355||'revisionHistoryLicenseKeyNotAllowed'==_0x2d8355||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2d8355||'revisionHistoryLicenseKeyTrialLimit'==_0x2d8355||'revisionHistoryLicenseKeyUsageLimit'==_0x2d8355){delete _0x324e61[_0x402fd6],_0xe14db7=_0x2d8355,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xe14db7&&_0x324e61['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xe14db7&&_0x324e61['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xe14db7&&_0x324e61['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xe14db7&&_0x324e61['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xe14db7&&_0x324e61['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0xe14db7&&_0x324e61['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xe14db7&&_0x324e61['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x56d599=this['repository']['getRevision'](0x0),_0x5e2700=await this['getRevisionDocumentData'](_0x56d599),_0x22d644=await this['getRevisionRootsAttributes'](_0x56d599);this['_replaceEditorDataWithRevisionData'](_0x5e2700,_0x22d644);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x403fbd){this['_source']=_0x403fbd;}async['update'](){const _0x22f7c8=await this['_source']['getLatestVersion']();if(_0x22f7c8>this['currentRevision']['toVersion']){await this['_loadState']();const _0xfa3e21=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x22f7c8});_0xfa3e21['authors']=_0xfa3e21['authorsIds']['map'](_0x4f8e66=>this['editor']['plugins']['get']('Users')['getUser'](_0x4f8e66)),this['currentRevision']['_update'](_0xfa3e21);}}async['saveRevision'](_0x333f15={},_0x1c0ea3=null){const _0x265efb=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x1c0ea3>this['currentRevision']['toVersion']&&(_0x1c0ea3=null),null===_0x1c0ea3&&(_0x1c0ea3=await this['_source']['getLatestVersion']());const _0x450182=this['_getFromVersion'](_0x1c0ea3),_0x281743=this['buildRevisionData']({'from':_0x450182,'to':_0x1c0ea3});if(this['currentRevision']['toVersion']<_0x1c0ea3){const _0x3c927e=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x1c0ea3,'to':_0x1c0ea3});_0x3c927e['authors']=[],_0x3c927e['authorsIds']=[],_0x3c927e['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3c927e,!0x0),delete _0x3c927e['authors'],_0x265efb['push'](_0x3c927e);}_0x333f15['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x333f15['name']=_0x333f15['name']||null,_0x333f15['id']=_0x333f15['id']||_0x402ab0(),_0x333f15={..._0x333f15,..._0x281743};const _0x494705=this['addRevisionData'](_0x333f15);_0x265efb['push'](_0x333f15);const _0x34023c=this['repository']['getIndex'](_0x494705);if(0x0!==_0x34023c){const _0x452549=this['repository']['getRevision'](_0x34023c-0x1);if(_0x452549['fromVersion']!==_0x1c0ea3){const _0x5ab35c=this['_revisionDataBuilder']['getData'](_0x1c0ea3,_0x452549['toVersion']),_0x4ef481={'id':_0x452549['id'],'diffData':_0x5ab35c['diffData'],'authorsIds':_0x5ab35c['authorsIds'],'authors':_0x5ab35c['authorsIds']['map'](_0x159ba2=>this['editor']['plugins']['get']('Users')['getUser'](_0x159ba2)),'fromVersion':_0x1c0ea3};_0x452549===this['currentRevision']&&(_0x4ef481['createdAt']=new Date(_0x333f15['createdAt']['getTime']()+0xa)),_0x452549['_update'](_0x4ef481,!0x0),delete _0x4ef481['authors'],_0x265efb['push'](_0x4ef481);}}if(this['adapter']){for(const _0x20122f of _0x265efb)this['_bufferUpdate'](_0x20122f['id'],_0x20122f,!0x0);this['sendBufferedUpdates']();}return _0x494705;}['addRevisionData'](_0x55a0e2){const _0x2695f4=this['repository']['createRevision'](_0x55a0e2);return this['adapter']&&_0x2695f4['on']('_update',(_0x34bb00,_0x160ff5,_0x3ef9b7)=>{_0x3ef9b7||(this['_bufferUpdate'](_0x160ff5['id'],_0x160ff5,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2695f4,this['_findInsertionIndex'](_0x2695f4)),_0x2695f4;}async['getRevisionDocumentData'](_0xde2496){return await this['_utils']['loadRevisionData'](_0xde2496,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xde2496);}async['getRevisionRootsAttributes'](_0x51f6be){return await this['_utils']['loadRevisionData'](_0x51f6be,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x51f6be);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2090ee=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x57953a=0x0;_0x57953a<_0x2090ee['length'];_0x57953a++){const _0x525dbe=_0x2090ee[_0x57953a];let _0x5046a4=!0x1;for(const _0x578666 of Object['keys'](_0x525dbe))void 0x0===_0x525dbe[_0x578666]?delete _0x525dbe[_0x578666]:'id'!==_0x578666&&(_0x5046a4=!0x0);_0x5046a4||(_0x2090ee[_0x57953a]=null);}if(_0x2090ee=_0x2090ee['filter'](_0x4d8e4d=>null!==_0x4d8e4d),!_0x2090ee['length'])return;for(let _0x3e72f0=0x0;_0x3e72f0<_0x2090ee['length'];_0x3e72f0++){const _0x3cd727=_0x2090ee[_0x3e72f0];void 0x0!==_0x3cd727['fromVersion']&&void 0x0===_0x3cd727['toVersion']&&(_0x3cd727['toVersion']=this['repository']['getRevision'](_0x3cd727['id'])['toVersion']),void 0x0!==_0x3cd727['toVersion']&&void 0x0===_0x3cd727['fromVersion']&&(_0x3cd727['fromVersion']=this['repository']['getRevision'](_0x3cd727['id'])['fromVersion']);}const _0x539a84=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2090ee,_0x539a84)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x441020=>{if(_0x441020){for(const _0x36d284 of _0x441020)this['setRevisionData']({'id':_0x36d284['id'],'createdAt':_0x36d284['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x326c98=null,from:_0x1bc445=null,to:_0x5b5fe7=null}){_0x1bc445=null!==_0x1bc445?_0x1bc445:_0x326c98['fromVersion'],_0x5b5fe7=null!==_0x5b5fe7?_0x5b5fe7:_0x326c98['toVersion'];const _0x116f5f=this['_revisionDataBuilder']['getData'](_0x1bc445,_0x5b5fe7),_0x16ea48={'diffData':_0x116f5f['diffData'],'authorsIds':_0x116f5f['authorsIds'],'fromVersion':_0x1bc445,'toVersion':_0x5b5fe7};if(!_0x326c98||_0x5b5fe7!==_0x326c98['toVersion']){const _0x174f34=_0x5b5fe7-0x1,_0x3ba127=this['_source']['history']['getOperation'](_0x174f34);_0x16ea48['createdAt']=_0x3ba127&&_0x3ba127['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1bc445===this['_loadedStateData']['fromVersion']){for(const _0x500c21 of this['_loadedStateData']['authors'])_0x16ea48['authorsIds']['includes'](_0x500c21['id'])||_0x16ea48['authorsIds']['push'](_0x500c21['id']);}return _0x16ea48;}['_bufferUpdate'](_0x4dae34,_0x49f140,_0x795b69){if(this['_bufferedUpdates']['has'](_0x4dae34)){const _0x293e15=this['_bufferedUpdates']['get'](_0x4dae34);_0x49f140=_0x795b69?{..._0x293e15,..._0x49f140}:{..._0x49f140,..._0x293e15};}this['_bufferedUpdates']['set'](_0x4dae34,_0x49f140);}['setRevisionData'](_0x8603d3){const _0x180998=this['repository']['getRevision'](_0x8603d3['id']);if(_0x8603d3['createdAt']&&(_0x8603d3['createdAt']=new Date(_0x8603d3['createdAt'])),_0x8603d3['authorsIds']){const _0x298c61=this['editor']['plugins']['get']('Users');_0x8603d3['authors']=_0x8603d3['authorsIds']['map'](_0x20dbf6=>_0x298c61['getUser'](_0x20dbf6));}_0x180998['_update'](_0x8603d3,!0x0);}['_createInitialRevision'](_0x2d6553){const _0x146097=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x146097)this['_initialRevisionId']=_0x146097['id'];else{const _0x351d80=!this['editor']['model']['document']['roots']['find'](_0x5ad131=>this['editor']['model']['hasContent'](_0x5ad131)),_0x390d52=this['editor']['plugins']['get']('Users')['me']['id'],_0x16af33=g(this['editor']['locale'],_0x351d80?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2d6553,'to':_0x2d6553,'id':this['_initialRevisionId'],'name':_0x16af33,'creatorId':_0x390d52});}}['_createCurrentRevision'](_0x4d342b){const _0x50f327=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x50f327),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4d342b,'to':_0x4d342b,'id':_0x50f327,'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'](_0x31ca65,_0x111544){let _0x123244=this['editor']['config']['get']('initialData'),_0x529dc3=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x123244){_0x123244={};for(const _0x5a528f of this['editor']['model']['document']['getRootNames']())_0x123244[_0x5a528f]='';}if('string'==typeof _0x123244&&(_0x123244={'main':_0x123244}),void 0x0===_0x529dc3){_0x529dc3={};for(const _0x33874e of this['editor']['model']['document']['getRootNames']())_0x529dc3[_0x33874e]={};}let _0x517de0=!0x1;const _0x54a2d0=Object['keys'](_0x123244),_0xc78007=Object['keys'](_0x31ca65);for(const _0xf42996 of _0x54a2d0){if(_0x123244[_0xf42996]!==_0x31ca65[_0xf42996]&&''!==_0x123244[_0xf42996]['trim']()){_0x517de0=!0x0;break;}if(!_0x40d4f8(_0x529dc3[_0xf42996],_0x111544[_0xf42996])&&Object['keys'](_0x529dc3[_0xf42996])['length']>0x0){_0x517de0=!0x0;break;}}_0x517de0||(_0x517de0=_0xc78007['some'](_0x110f2f=>!this['editor']['model']['document']['getRoot'](_0x110f2f))),_0x517de0&&_0x4c8407('editor-initial-data-replaced-with-revision-data',{'editorData':_0x123244,'editorRootsAttributes':_0x529dc3,'revisionData':_0x31ca65,'revisionRootsAttributes':_0x111544}),this['editor']['config']['set']('initialData',_0x31ca65),this['editor']['config']['set']('rootsAttributes',_0x111544);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2cb9ce=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2cb9ce['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x24a0da){const _0x2b2260=this['repository']['getRevisions']();_0x2b2260['reverse']();let _0x39ccfe=0x0;for(;_0x39ccfe<_0x2b2260['length'];){const _0xdc059b=_0x2b2260[_0x39ccfe];if(_0xdc059b===this['currentRevision']){_0x39ccfe++;continue;}if(_0xdc059b['id']===this['_initialRevisionId'])break;const _0x1d2938=_0x24a0da['toVersion']-_0xdc059b['toVersion']||_0x24a0da['fromVersion']-_0xdc059b['fromVersion'];if(_0x1d2938>0x0)break;if(_0x1d2938<0x0)_0x39ccfe++;else{if(!_0x24a0da['creator']&&_0xdc059b['creator'])break;if(_0xdc059b['creator']||!_0x24a0da['creator']){if(_0x24a0da['createdAt']>_0xdc059b['createdAt'])break;_0x39ccfe++;}else _0x39ccfe++;}}return _0x39ccfe;}['_getFromVersion'](_0x595df5){const _0x49967f=this['repository']['getRevisions']();_0x49967f['reverse'](),_0x49967f['shift']();const _0x3d26fd=_0x49967f['find'](_0x51dd38=>_0x51dd38['toVersion']<=_0x595df5)['toVersion'];return _0x3d26fd<this['_startingVersion']?this['_startingVersion']:_0x3d26fd;}['_makeRevision']({name:_0x173f74,from:_0x2e7ecc,to:_0x2325fc,creatorId:_0x421480,id:_0x1838d2}){const _0x18e3e9=this['buildRevisionData']({'from':_0x2e7ecc,'to':_0x2325fc});_0x18e3e9['name']=_0x173f74,_0x18e3e9['creatorId']=_0x421480,_0x18e3e9['id']=_0x1838d2;const _0xf51899=this['addRevisionData'](_0x18e3e9);return this['adapter']&&this['_bufferUpdate'](_0x18e3e9['id'],_0x18e3e9,!0x0),_0xf51899;}['_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(_0x2f6746){this['editor']=_0x2f6746,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'](_0x51007b){this['source']=_0x51007b;const _0x2c0e57=new Map(),_0x5eafb5=new Map(),_0x42a640=this['editor']['model']['document']['roots']['map'](_0x253b10=>_0x253b10['rootName']);for(const _0x31434d of _0x42a640){const _0xec6adb=this['editor']['model']['document']['getRoot'](_0x31434d),_0x542640=N(_0xec6adb);_0x2c0e57['set'](_0x31434d,_0x542640),_0x5eafb5['set'](_0x31434d,Object['fromEntries'](_0xec6adb['getAttributes']()));}const _0x4ffe5e=Array['from'](this['editor']['model']['markers'])['map'](_0x5bb06a=>[_0x5bb06a['name'],_0x5bb06a['getRange']()]),_0x53a375=this['source']['version'];this['_saveMetaData'](_0x53a375,_0x2c0e57,_0x4ffe5e,_0x5eafb5),this['_startingRevisionId']=this['_revisionId'];const _0x3220e8=new Map(),_0x33772c=new Map();for(const _0x339fdf of _0x42a640){const _0x40a77f=P(_0x339fdf);_0x3220e8['set'](_0x339fdf,_0x40a77f),_0x33772c['set'](_0x339fdf,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3220e8,[],_0x33772c);}['getData'](_0x4d2bbc,_0x3821b6){if(this['_lastFrom']===_0x4d2bbc&&this['_lastTo']<=_0x3821b6)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3821b6,!0x0);else{if(!this['_savedMetaData']['has'](_0x4d2bbc)){const _0x2bd826=this['_getPreviousFrom'](_0x4d2bbc);this['_calculateMetaData'](_0x2bd826,_0x4d2bbc,!0x1);}this['_calculateMetaData'](_0x4d2bbc,_0x3821b6,!0x0);}return this['_lastFrom']=_0x4d2bbc,this['_lastTo']=_0x3821b6,this['_getState']();}['loadState'](_0x16105c){const _0x12a196=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x16105c['fromVersion'],this['_lastTo']=_0x16105c['toVersion'];for(const _0x38bd5a in _0x16105c['diffData']){const _0x4789f6=_0x16105c['diffData'][_0x38bd5a]['attachChange'],_0x76ce77=_0x2611c8(_0x16105c['diffData'][_0x38bd5a]['attributesBefore'])||{},_0x2e4895=_0x12a196['_makeModelFromViewString'](_0x16105c['diffData'][_0x38bd5a]['deletions']);_0x2e4895['rootName']=_0x38bd5a,_0x2e4895['_isAttached']=!_0x4789f6||!_0x4789f6['isAttached'],_0x2e4895['isAttached']=()=>_0x2e4895['_isAttached'],this['_baseRoots']['set'](_0x38bd5a,_0x2e4895),this['_baseRootsAttributes']['set'](_0x38bd5a,_0x76ce77),_0x4789f6&&this['_touchedRoots']['set'](_0x38bd5a,_0x4789f6);const _0x504e93=this['_makeIdsRoot'](_0x2e4895);this['_baseIdsRoots']['set'](_0x38bd5a,_0x504e93);for(const [_0x413d3f,_0x5a2809]of _0x2e4895['markers']){if(!_0x413d3f['startsWith']('revision:'))continue;const _0x44f319=_0x413d3f['split'](':')[0x2];for(const _0x74313a of _0x5a2809['getWalker']({'singleCharacters':!0x0})){const _0x374b50=this['_getVidAttributeName'](_0x74313a),_0x91f6df='elementEnd'==_0x74313a['type']?_0x74313a['previousPosition']['path']['slice'](0x0,-0x1):_0x74313a['previousPosition']['path'],_0x2a13fd=_0x504e93['getNodeByPath'](_0x91f6df)['getAttribute'](_0x374b50);this['_touched']['set'](_0x2a13fd,{'userId':_0x44f319});}}}this['_startingRevisionId']=this['_revisionId'];const _0x24fb1b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4875dc=>!this['_touched']['has'](_0x4875dc));let _0x13c4f4=0x0;const _0x5a3ad8=new Map();for(const _0x599065 in _0x16105c['diffData']){const _0x13e0aa=_0x16105c['diffData'][_0x599065]['attachChange'],_0x30723a=_0x2611c8(_0x16105c['diffData'][_0x599065]['attributesAfter'])||{},_0x13960b=_0x12a196['_makeModelFromViewString'](_0x16105c['diffData'][_0x599065]['insertions']);_0x13960b['rootName']=_0x599065,_0x13960b['_isAttached']=!_0x13e0aa||_0x13e0aa['isAttached'],_0x13960b['isAttached']=()=>_0x13960b['_isAttached'],this['_diffRoots']['set'](_0x599065,_0x13960b),this['_diffRootsAttributes']['set'](_0x599065,_0x30723a);const _0x1fd6cb=this['_makeIdsRoot'](_0x13960b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x599065,_0x1fd6cb),_0x5a3ad8['set'](_0x599065,_0x13960b['isAttached']()?_0x30723a:{});for(const [_0x48c2bb,_0x4c2a4e]of _0x13960b['markers']){if(!_0x48c2bb['startsWith']('revision:'))continue;const _0xf91e80=_0x48c2bb['split'](':')[0x2];for(const _0x3b3a3b of _0x4c2a4e['getWalker']({'singleCharacters':!0x0})){const _0x14ae25=this['_getVidAttributeName'](_0x3b3a3b),_0x3ecc09=this['_revisionId']++,_0x17a211='elementEnd'==_0x3b3a3b['type']?_0x3b3a3b['previousPosition']['path']['slice'](0x0,-0x1):_0x3b3a3b['previousPosition']['path'];_0x1fd6cb['getNodeByPath'](_0x17a211)['_setAttribute'](_0x14ae25,_0x3ecc09),this['_touched']['set'](_0x3ecc09,{'userId':_0xf91e80});}}for(const _0x572cc3 of this['editor']['model']['createRangeIn'](_0x13960b)['getWalker']({'singleCharacters':!0x0})){const _0x31e7d4=this['_getVidAttributeName'](_0x572cc3),_0x28edff='elementEnd'==_0x572cc3['type']?_0x572cc3['previousPosition']['path']['slice'](0x0,-0x1):_0x572cc3['previousPosition']['path'],_0x1cbe2f=_0x1fd6cb['getNodeByPath'](_0x28edff);_0x1cbe2f['getAttribute'](_0x31e7d4)>0x0||_0x1cbe2f['_setAttribute'](_0x31e7d4,_0x24fb1b[_0x13c4f4++]);}for(const [_0x27123f,_0x51cd59]of _0x13960b['markers'])_0x27123f['startsWith']('revision:')||this['_markers']['set'](_0x27123f,_0x51cd59);}const _0x278b42=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x278b42),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x278b42,0x1));const _0x485d10=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x485d10),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x485d10,0x1));const _0x37baf3=Array['from'](this['_diffRoots'])['map'](([_0x2e0a3d,_0x299e15])=>[_0x2e0a3d,N(_0x299e15)]);this['_saveMetaData'](this['_lastTo'],_0x37baf3,this['_markers'],_0x5a3ad8);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x246a10,_0x4bdd37,_0x9744b0,_0x3bae57){const _0x128746=new Map(_0x4bdd37),_0x351754=new Map(_0x2611c8(_0x3bae57)),_0x594eb3=new Map();for(const [_0x3d056b,_0x57c05c]of _0x9744b0)_0x594eb3['set'](_0x3d056b,{'start':_0x57c05c['start']['clone'](),'end':_0x57c05c['end']['clone'](),'rootName':_0x57c05c['root']['rootName']});this['_savedMetaData']['set'](_0x246a10,{'roots':_0x128746,'markers':_0x594eb3,'rootsAttributes':_0x351754});}['_removeMetaData'](_0x17dd4a){this['_savedMetaData']['delete'](_0x17dd4a);}['_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'](_0x8984dd,_0x17bc10=null){let _0x3137c0=null;_0x8984dd['is']('documentFragment')||(_0x3137c0=new ut(_0x8984dd['name'],{'vid_start':null===_0x17bc10?this['_revisionId']++:_0x17bc10++}));const _0x10343f=[];for(const _0x34e95a of _0x8984dd['getChildren']())if(_0x34e95a['is']('element')){_0x10343f['push'](this['_makeIdsRoot'](_0x34e95a,_0x17bc10));const _0x48d323=_0x10343f[_0x10343f['length']-0x1];null!==_0x17bc10&&(_0x17bc10=_0x48d323['is']('element','$text')?_0x48d323['getAttribute']('vid')+0x1:_0x48d323['getAttribute']('vid_end')+0x1);}else{for(let _0xf07e7f=0x0;_0xf07e7f<_0x34e95a['offsetSize'];_0xf07e7f++)_0x10343f['push'](new ut('$text',{'vid':null===_0x17bc10?this['_revisionId']++:_0x17bc10++}));}if(_0x8984dd['is']('documentFragment')){const _0x456ddc=P(_0x8984dd['rootName']);return _0x456ddc['_insertChild'](0x0,_0x10343f),_0x456ddc;}return _0x3137c0['_setAttribute']('vid_end',null===_0x17bc10?this['_revisionId']++:_0x17bc10++),_0x3137c0['_insertChild'](0x0,_0x10343f),_0x3137c0;}['_calculateMetaData'](_0xe75bba,_0x20b3a2,_0x4a284b){this['_reset']();const {roots:_0x35925e,markers:_0x4472b,rootsAttributes:_0x4976c4}=this['_savedMetaData']['get'](_0xe75bba);this['_baseRoots']=new Map(_0x35925e),this['_baseRootsAttributes']=new Map(_0x2611c8(_0x4976c4));for(const [_0x1cfa8d,_0x664cf5]of this['_baseRoots'])if('$graveyard'!==_0x1cfa8d&&(this['_diffRoots']['set'](_0x1cfa8d,N(_0x664cf5)),this['_diffRootsAttributes']=new Map(_0x2611c8(_0x4976c4)),_0x4a284b)){const _0x175144=this['_revisionId'];this['_idsRoots']['set'](_0x1cfa8d,this['_makeIdsRoot'](_0x664cf5)),this['_baseIdsRoots']['set'](_0x1cfa8d,this['_makeIdsRoot'](_0x664cf5,_0x175144));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x4a284b&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2a4c97,_0xf4feed]of _0x4472b){const _0x1e0ceb=this['_baseRoots']['get'](_0xf4feed['rootName']),_0x1f6116=this['_diffRoots']['get'](_0xf4feed['rootName']),_0x423907=new ft(this['_fixPosition'](_0xf4feed['start'],_0x1e0ceb),this['_fixPosition'](_0xf4feed['end'],_0x1e0ceb)),_0x11a904=this['_fixRange'](_0x423907,_0x1f6116);_0x1e0ceb['markers']['set'](_0x2a4c97,_0x423907),this['_markers']['set'](_0x2a4c97,_0x11a904);}this['_applyOperations'](_0xe75bba,_0x20b3a2,_0x4a284b);}['_applyOperations'](_0x8b98e9,_0x36eede,_0x1f92b5){for(const _0x3a48cb of this['source']['getOperations'](_0x8b98e9,_0x36eede))this['_handleOperation'](_0x3a48cb,_0x1f92b5);for(const _0x330114 of this['_diffRoots']['values']())_0x330114['markers']['clear']();for(const [_0x403344,_0x11e326]of this['_markers']){this['_diffRoots']['get'](_0x11e326['root']['rootName'])['markers']['set'](_0x403344,_0x11e326['clone']());}const _0x3718f2=new Map(),_0x2cf0df=new Map();for(const [_0x5dc996,_0x33b7b9]of this['_diffRoots'])_0x3718f2['set'](_0x5dc996,N(_0x33b7b9)),_0x2cf0df['set'](_0x5dc996,this['_diffRootsAttributes']['get'](_0x5dc996));this['_saveMetaData'](_0x36eede,_0x3718f2,this['_markers'],_0x2cf0df);}['_getPreviousFrom'](_0x491795){const _0x3f1fbb=Array['from'](this['_savedMetaData']['keys']());_0x3f1fbb['sort']((_0x56fb37,_0x3ad9f5)=>_0x56fb37-_0x3ad9f5),_0x3f1fbb['reverse']();for(const _0x3366cc of _0x3f1fbb)if(_0x3366cc<_0x491795)return _0x3366cc;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4f66df,_0x5130d0){const _0x150538=Array['from'](_0x5130d0['markers'])['map'](([_0x43aa93,_0x512b82])=>[_0x43aa93,this['_fixRange'](_0x512b82,_0x4f66df)]);_0x4f66df['markers']=new Map(_0x150538);}['_transformMarkers'](_0x4d05db){for(const _0x6c4b65 of this['_markers']['values']()){const _0x102fa0=_0x6c4b65['getTransformedByOperation'](_0x4d05db),_0xdf86f7=ft['_createFromRanges'](_0x102fa0);_0x6c4b65['start']=_0xdf86f7['start'],_0x6c4b65['end']=_0xdf86f7['end'];}}['_handleOperation'](_0x362bfd,_0x455388){if('addRoot'!=_0x362bfd['type']&&'detachRoot'!=_0x362bfd['type']){if('insert'==_0x362bfd['type']){const _0x4f7abf=_0x362bfd['position']['root']['rootName'];this['_diffRoots']['has'](_0x4f7abf)||(this['_diffRoots']['set'](_0x4f7abf,P(_0x4f7abf,!0x0)),this['_diffRootsAttributes']['set'](_0x4f7abf,{}),_0x455388&&this['_idsRoots']['set'](_0x4f7abf,P(_0x4f7abf,!0x0)));}else{if('addRootAttribute'==_0x362bfd['type']||'removeRootAttribute'==_0x362bfd['type']||'changeRootAttribute'==_0x362bfd['type'])return void this['_handleRootAttributeOperation'](_0x362bfd);'marker'==_0x362bfd['type']&&this['_handleMarkerOperation'](_0x362bfd);}if('marker'!==_0x362bfd['type']){const _0x4ac56b=this['_cloneOperation'](_0x362bfd,this['_diffRoots']);_0x4ac56b['_execute'](),this['_transformMarkers'](_0x4ac56b);}if(_0x455388)switch(_0x362bfd['type']){case'insert':this['_handleInsertOperation'](_0x362bfd);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x362bfd);break;case'merge':this['_handleMergeOperation'](_0x362bfd);break;case'split':this['_handleSplitOperation'](_0x362bfd);}}else this['_handleRootOperation'](_0x362bfd,_0x455388);}['_cloneOperation'](_0x5e078b,_0x248728){const _0x2a2d20=_0x5e078b['clone']();return _0x2a2d20['_authorId']=_0x5e078b['_authorId'],this['_fixOperation'](_0x2a2d20,_0x248728),_0x2a2d20;}['_getBaseVids'](_0x2fdf26){return _0x2fdf26['map'](_0x3909c3=>{const _0x24be35=this['_getVidAttributeName'](_0x3909c3);return Number(_0x3909c3['item']['getAttribute'](_0x24be35));});}['_generateTape'](_0x17dc40,_0x37b0df){if(_0x17dc40['is']('element','$text'))_0x37b0df['push']({'item':_0x17dc40,'type':'text'});else{_0x17dc40['is']('element')&&_0x37b0df['push']({'item':_0x17dc40,'type':'elementStart'});for(const _0x213844 of _0x17dc40['getChildren']())this['_generateTape'](_0x213844,_0x37b0df);_0x17dc40['is']('element')&&_0x37b0df['push']({'item':_0x17dc40,'type':'elementEnd'});}return _0x37b0df;}['_getState'](){const _0x4d842c=new Map(this['_touched']),_0x558734=new Map(_0x4d842c),_0x3f0507=new Map(),_0x23f7f3={'insertions':{},'deletions':{}},_0x252a87={'insertions':{},'deletions':{}},_0x1286cb=new Map(),_0x1cfa66=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x1cfa66['delete']('$graveyard');for(const _0x703ee7 of _0x1cfa66){const _0x2d555d=this['_diffRoots']['get'](_0x703ee7)||P(_0x703ee7,!0x1),_0x363b57=this['_baseRoots']['get'](_0x703ee7)||P(_0x703ee7,!0x1);_0x2d555d['isAttached']()||_0x363b57['isAttached']()?(_0x23f7f3['insertions'][_0x703ee7]=N(_0x2d555d),_0x23f7f3['deletions'][_0x703ee7]=N(_0x363b57),this['_copyMarkers'](_0x23f7f3['deletions'][_0x703ee7],_0x363b57),this['_copyMarkers'](_0x23f7f3['insertions'][_0x703ee7],_0x2d555d),_0x252a87['insertions'][_0x703ee7]=this['_generateTape'](this['_idsRoots']['get'](_0x703ee7),[]),_0x252a87['deletions'][_0x703ee7]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x703ee7)||P(_0x703ee7,!0x1),[])):_0x1cfa66['delete'](_0x703ee7);}for(const _0xb6ee45 of _0x1cfa66){const _0x46eac5=_0x252a87['insertions'][_0xb6ee45];for(const _0x2b9f2d of _0x46eac5){const _0x44f357=this['_getVidAttributeName'](_0x2b9f2d),_0x50d934=_0x2b9f2d['item']['getAttribute'](_0x44f357);_0x558734['delete'](_0x50d934),_0x50d934>=this['_startingRevisionId']&&_0x3f0507['set'](_0x50d934,_0x4d842c['get'](_0x50d934));}}for(const _0x16ea4b of _0x1cfa66){const _0x52b7e3=_0x252a87['insertions'][_0x16ea4b],_0xd5951c=this['_getBaseVids'](_0x252a87['deletions'][_0x16ea4b]);let _0x39883b=0x0;for(const _0x4d7ac3 of _0x52b7e3){const _0x4867d7=this['_getVidAttributeName'](_0x4d7ac3),_0x117c88=_0x4d7ac3['item']['getAttribute'](_0x4867d7);if(!_0x3f0507['has'](_0x117c88)&&!_0x1286cb['has'](_0x117c88)){if(_0x558734['has'](_0x117c88))_0x39883b++;else{if(_0x117c88!=_0xd5951c[_0x39883b]){const _0x24921a=_0x4d842c['get'](_0x117c88)||_0x4d842c['get'](_0xd5951c[_0x39883b]);for(;_0x117c88!=_0xd5951c[_0x39883b];)_0x558734['has'](_0xd5951c[_0x39883b])||(_0x1286cb['set'](_0xd5951c[_0x39883b],_0x24921a),_0x4d842c['set'](_0xd5951c[_0x39883b],_0x24921a)),_0x39883b++;}_0x39883b++;}}}}for(const _0x249803 of _0x1cfa66){const _0x1dfd95=_0x252a87['insertions'][_0x249803];for(const _0x19e5ae of _0x1dfd95){const _0x34e887=this['_getVidAttributeName'](_0x19e5ae),_0x58ebb3=_0x19e5ae['item']['getAttribute'](_0x34e887);if(_0x1286cb['has'](_0x58ebb3)){const _0x547a53=_0x1286cb['get'](_0x58ebb3);_0x558734['has'](_0x58ebb3)||_0x558734['set'](_0x58ebb3,{..._0x547a53}),_0x3f0507['set'](_0x58ebb3,{..._0x547a53});}}}for(const _0x2fb004 of _0x558734['keys']())_0x2fb004>=this['_startingRevisionId']&&_0x558734['delete'](_0x2fb004);const _0x5ea8cc=new Map();for(const _0x28f1f8 of _0x1cfa66){let _0x319ac2=_0x252a87['insertions'][_0x28f1f8];for(const _0xb576cc of _0x319ac2)if(_0xb576cc['item']['is']('element','tableCell')){const _0x7819b2=this['_getVidAttributeName'](_0xb576cc),_0x1b2765=_0xb576cc['item']['getAttribute'](_0x7819b2);if(_0x3f0507['has'](_0x1b2765)){const _0xdc112e=_0xb576cc['item']['parent']['parent']['getAttribute']('vid_start'),_0x274e69=_0x5ea8cc['get'](_0xdc112e)||new Set();_0x274e69['add'](_0x3f0507['get'](_0x1b2765)['userId']),_0x5ea8cc['set'](_0xdc112e,_0x274e69);}}_0x319ac2=_0x252a87['deletions'][_0x28f1f8];for(const _0x47f1ca of _0x319ac2)if(_0x47f1ca['item']['is']('element','tableCell')){const _0x12b147=this['_getVidAttributeName'](_0x47f1ca),_0x5e0a88=_0x47f1ca['item']['getAttribute'](_0x12b147);if(_0x558734['has'](_0x5e0a88)){const _0x546d70=_0x47f1ca['item']['parent']['parent']['getAttribute']('vid_start'),_0x328375=_0x5ea8cc['get'](_0x546d70)||new Set();_0x328375['add'](_0x558734['get'](_0x5e0a88)['userId']),_0x5ea8cc['set'](_0x546d70,_0x328375);}}for(const _0x33d7ab of _0x5ea8cc['keys']())(_0x3f0507['has'](_0x33d7ab)||_0x558734['has'](_0x33d7ab))&&_0x5ea8cc['delete'](_0x33d7ab);}for(const _0x30963a of _0x1cfa66){const _0x107bd8=_0x252a87['insertions'][_0x30963a];let _0x4db486=null,_0x5014ce=null;for(const _0x141423 of _0x107bd8){const _0x189042=this['_getVidAttributeName'](_0x141423),_0x41e6f6=_0x141423['item']['getAttribute'](_0x189042),_0x4e0113=_0x5ea8cc['get'](_0x41e6f6);_0x4e0113&&'elementStart'==_0x141423['type']&&(_0x4db486=Array['from'](_0x4e0113)[0x0],_0x5014ce=_0x141423['item']['getAttribute']('vid_end')),_0x4db486&&(_0x558734['set'](_0x41e6f6,{'userId':_0x4db486}),_0x3f0507['set'](_0x41e6f6,{'userId':_0x4db486})),_0x41e6f6==_0x5014ce&&(_0x4db486=null,_0x5014ce=null);}}const _0xbee828={},_0x36ef8d=new Set();for(const _0x460f28 of _0x1cfa66){const _0x48f85a=_0x23f7f3['deletions'][_0x460f28],_0x53b889=_0x23f7f3['insertions'][_0x460f28];for(const {userId:_0x51a996}of this['_touchedMarkers']['values']())null!==_0x51a996&&_0x36ef8d['add'](_0x51a996);for(const {userId:_0x1ae4e2}of this['_touchedRoots']['values']())null!==_0x1ae4e2&&_0x36ef8d['add'](_0x1ae4e2);this['_markChanges'](_0x53b889,_0x252a87['insertions'][_0x460f28],_0x3f0507,'insertion',_0x36ef8d),this['_markChanges'](_0x48f85a,_0x252a87['deletions'][_0x460f28],_0x558734,'deletion',_0x36ef8d),_0xbee828[_0x460f28]={'insertions':this['_prepareViewToSave'](_0x53b889),'deletions':this['_prepareViewToSave'](_0x48f85a),'attachChange':this['_touchedRoots']['get'](_0x460f28)||null,'attributesBefore':_0x2611c8(this['_baseRootsAttributes']['get'](_0x460f28))||{},'attributesAfter':_0x2611c8(this['_diffRootsAttributes']['get'](_0x460f28))};}return{'diffData':_0xbee828,'authorsIds':Array['from'](_0x36ef8d)};}['_processRootBeforeSave'](_0x84a926){for(const [,_0x561f2f]of _0x84a926['markers']){const _0x3f0f3c=_0x561f2f['start']['getAncestors']()['filter'](_0x54f5e5=>'tableCell'==_0x54f5e5['name']);for(const _0xb2e149 of _0x3f0f3c)0x1==_0xb2e149['childCount']&&_0xb2e149['getChild'](0x0)['is']('element','paragraph')&&_0xb2e149['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x203dcf){this['_processRootBeforeSave'](_0x203dcf);const _0x3dd060=this['editor']['data']['toView'](_0x203dcf,{}),_0x2abb65=Array['from'](_0x3dd060['getChildren']())['map'](_0x2e1c72=>this['_getViewJson'](_0x2e1c72));return JSON['stringify'](_0x2abb65);}['_getViewJson'](_0x115777){if(_0x115777['is']('$text'))return _0x115777['data'];{const _0x5650c7=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5223d6=_0x115777,_0x41be79=this['editor']['data']['htmlProcessor']['domConverter'],_0x76c484={'type':_0x5650c7['_getTypeCharForViewElement'](_0x5223d6),'name':_0x5223d6['name'],'attributes':Array['from'](_0x5223d6['getAttributes']()),'children':Array['from'](_0x5223d6['getChildren']())['map'](_0x21a27a=>this['_getViewJson'](_0x21a27a))};if(_0x115777['is']('uiElement')&&'$comment'!=_0x115777['name']){const _0x29d409=_0x115777['render'](_0x41be79['domDocument'],_0x41be79);_0x76c484['children']['push'](_0x29d409['outerHTML']);}else{if(_0x115777['is']('rawElement')){const _0x38b3ed=_0x41be79['domDocument']['createElement'](_0x5223d6['name']);_0x115777['render'](_0x38b3ed,_0x41be79),_0x76c484['children']['push'](_0x38b3ed['innerHTML']);}}const _0x5b7bb5=Array['from'](_0x5223d6['getCustomProperties']());_0x5b7bb5['length']>0x0&&(_0x76c484['customProperties']=_0x5b7bb5);const _0x20904a=_0x5223d6['getFillerOffset']();return null!==_0x20904a&&(_0x76c484['fillerOffset']=_0x20904a),_0x76c484;}}['_markChanges'](_0x1b2cd2,_0x5df137,_0x11228c,_0x1d48c5,_0x1cbfc2){let _0x857ca=null,_0x1656a8=null,_0x553e66=0x0;const _0xf1cd30=this['editor']['model'];for(let _0x505407=0x0;_0x505407<_0x5df137['length'];_0x505407++){const _0x1f236d=this['_getVidAttributeName'](_0x5df137[_0x505407]),_0x5ad25e=_0x5df137[_0x505407]['item']['getAttribute'](_0x1f236d),_0x1b0f3b=_0x11228c['get'](_0x5ad25e),_0x516987=_0x505407==_0x5df137['length']-0x1;(!_0x857ca&&_0x1b0f3b&&(_0x857ca=_0x1b0f3b,_0x1656a8=_0x5df137[_0x505407]),_0x857ca&&(!_0x1b0f3b||_0x1b0f3b['userId']!=_0x857ca['userId']))&&(_0x3f3653(_0x1b0f3b,F(_0x1656a8,_0x1b2cd2,_0xf1cd30),F(_0x5df137[_0x505407],_0x1b2cd2,_0xf1cd30)),_0x857ca=_0x1b0f3b||null,_0x1656a8=_0x1b0f3b?_0x5df137[_0x505407]:null),_0x857ca&&_0x516987&&_0x3f3653(_0x1b0f3b,F(_0x1656a8,_0x1b2cd2,_0xf1cd30),B(_0x5df137[_0x505407],_0x1b2cd2,_0xf1cd30));}function _0x3f3653(_0x2ddf70,_0xa89c73,_0x237faa){const _0x1c5294=_0x857ca['userId'],_0xa457b1='revision:'+_0x1d48c5+':'+_0x1c5294+':'+_0x553e66++,_0x452a39=_0xf1cd30['createRange'](_0xa89c73,_0x237faa);_0x1b2cd2['markers']['set'](_0xa457b1,_0x452a39),null!==_0x1c5294&&_0x1cbfc2['add'](_0x1c5294);}}['_getVidAttributeName'](_0x3a4849){switch(_0x3a4849['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x466038,_0x731b1d){_0x466038['baseVersion']=null;for(const _0x1c4a0b in _0x466038){const _0x13a198=_0x466038[_0x1c4a0b];if(_0x13a198 instanceof vt){const _0x84dfdc=_0x731b1d['get'](_0x13a198['root']['rootName']);_0x466038[_0x1c4a0b]=this['_fixPosition'](_0x13a198,_0x84dfdc);}if(_0x13a198 instanceof ft){const _0x40bf2c=_0x731b1d['get'](_0x13a198['root']['rootName']);_0x466038[_0x1c4a0b]=this['_fixRange'](_0x13a198,_0x40bf2c);}'root'===_0x1c4a0b&&(_0x466038['root']=_0x731b1d['get'](_0x466038['root']['rootName']));}}['_fixRange'](_0xee054,_0x5f2f81){return this['editor']['model']['createRange'](this['_fixPosition'](_0xee054['start'],_0x5f2f81),this['_fixPosition'](_0xee054['end'],_0x5f2f81));}['_fixPosition'](_0x8d456,_0x8e689b){return this['editor']['model']['createPositionFromPath'](_0x8e689b,_0x8d456['path'],_0x8d456['stickiness']);}['_handleInsertOperation'](_0x186ad7){const _0x5bd9b7=this['_idsRoots']['get'](_0x186ad7['position']['root']['rootName']),_0x474e61=this['_fixPosition'](_0x186ad7['position'],_0x5bd9b7),_0x32a41f=null===_0x186ad7['_authorId']?null:_0x186ad7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xd07b0d=_0x474e61['parent'],_0x266b4d=this['_revisionId'],_0x186940=[];for(const _0x2d535d of _0x186ad7['nodes'])if(_0x2d535d['is']('element'))_0x186940['push'](this['_makeIdsRoot'](_0x2d535d));else{for(let _0x5c346a=0x0;_0x5c346a<_0x2d535d['offsetSize'];_0x5c346a++)_0x186940['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x5dec9e=this['_revisionId'];for(let _0x2c8cae=_0x266b4d;_0x2c8cae<_0x5dec9e;_0x2c8cae++)this['_touched']['set'](_0x2c8cae,{'userId':_0x32a41f});_0xd07b0d['_insertChild'](_0x474e61['offset'],_0x186940);}['_handleMoveOperation'](_0x5967a7){(_0x5967a7=this['_cloneOperation'](_0x5967a7,this['_idsRoots']))['_execute']();const _0x20aa7d=null===_0x5967a7['_authorId']?null:_0x5967a7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x13b602=_0x5967a7['getMovedRangeStart'](),_0xabffa0=_0x13b602['parent'],_0x2eb2c9=_0x13b602['offset'];!function _0x544224(_0x382e58,_0x5c4e1e,_0x1403da,_0x580e2d){for(let _0x3ed3e1=_0x1403da;_0x3ed3e1<_0x580e2d;_0x3ed3e1++){const _0x49d0e9=_0x5c4e1e['getChild'](_0x3ed3e1);_0x49d0e9['is']('element','$text')?_0x382e58['set'](_0x49d0e9['getAttribute']('vid'),{'userId':_0x20aa7d}):(_0x382e58['set'](_0x49d0e9['getAttribute']('vid_start'),{'userId':_0x20aa7d}),_0x544224(_0x382e58,_0x49d0e9,0x0,_0x49d0e9['childCount']),_0x382e58['set'](_0x49d0e9['getAttribute']('vid_end'),{'userId':_0x20aa7d}));}}(this['_touched'],_0xabffa0,_0x2eb2c9,_0x2eb2c9+_0x5967a7['howMany']);}['_handleMergeOperation'](_0x1d7200){const _0x16d1b9=null===(_0x1d7200=this['_cloneOperation'](_0x1d7200,this['_idsRoots']))['_authorId']?null:_0x1d7200['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x58c683=_0x1d7200['targetPosition']['parent'],_0x3826f0=_0x1d7200['sourcePosition']['parent'],_0x2fec3a=_0x58c683['getAttribute']('vid_end'),_0x5577f2=_0x3826f0['getAttribute']('vid_start');_0x58c683['_setAttribute']('vid_end',_0x3826f0['getAttribute']('vid_end')),_0x3826f0['_setAttribute']('vid_end',_0x2fec3a),this['_touched']['set'](_0x5577f2,{'userId':_0x16d1b9}),this['_touched']['set'](_0x2fec3a,{'userId':_0x16d1b9}),_0x1d7200['_execute']();}['_handleSplitOperation'](_0x19809f){const _0x19fdf9=null===(_0x19809f=this['_cloneOperation'](_0x19809f,this['_idsRoots']))['_authorId']?null:_0x19809f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x7e5b3e=_0x19809f['graveyardPosition'],_0x41fbad=_0x19809f['splitPosition']['parent'];_0x19809f['_execute']();const _0x40e106=_0x41fbad['getAttribute']('vid_end'),_0xb50238=_0x19809f['insertionPosition']['nodeAfter'];if(_0x7e5b3e){const _0x583797=_0xb50238['getAttribute']('vid_end'),_0x31feae=_0x41fbad['getAttribute']('vid_end');_0x41fbad['_setAttribute']('vid_end',_0x583797),_0xb50238['_setAttribute']('vid_end',_0x31feae),this['_touched']['set'](_0x41fbad['getAttribute']('vid_end'),{'userId':_0x19fdf9}),this['_touched']['set'](_0xb50238['getAttribute']('vid_start'),{'userId':_0x19fdf9});}else{const _0x32603c=this['_revisionId']++,_0x556dc6=this['_revisionId']++;_0x41fbad['_setAttribute']('vid_end',_0x32603c),_0xb50238['_setAttribute']('vid_start',_0x556dc6),_0xb50238['_setAttribute']('vid_end',_0x40e106),this['_touched']['set'](_0x32603c,{'userId':_0x19fdf9}),this['_touched']['set'](_0x556dc6,{'userId':_0x19fdf9});}}['_handleMarkerOperation'](_0xc6e869){if(!_0xc6e869['affectsData'])return;const _0x1bbf20=(_0xc6e869=this['_cloneOperation'](_0xc6e869,this['_diffRoots']))['oldRange']?_0xc6e869['oldRange']['root']:null,_0x4e98d6=_0xc6e869['newRange']?_0xc6e869['newRange']['root']:null;_0x1bbf20&&this['_markers']['delete'](_0xc6e869['name']),_0x4e98d6&&this['_markers']['set'](_0xc6e869['name'],_0xc6e869['newRange']['clone']());const _0x2864a1=null===_0xc6e869['_authorId']?null:_0xc6e869['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x63ba63=_0xc6e869['name'];if(!this['_touchedMarkers']['has'](_0x63ba63))return void this['_touchedMarkers']['set'](_0x63ba63,{'range':_0xc6e869['oldRange'],'userId':_0x2864a1});const _0x4c50db=this['_touchedMarkers']['get'](_0x63ba63),_0x1cca60=_0x4c50db['range'],_0x1e79ec=_0xc6e869['newRange'];null==_0x1cca60&&null==_0x1e79ec||_0x1cca60&&_0x1e79ec&&_0x1cca60['isEqual'](_0x1e79ec)?this['_touchedMarkers']['delete'](_0xc6e869['name']):_0x4c50db['userId']=_0x2864a1;}['_handleRootOperation'](_0x1922b7,_0x28c285){this['_diffRoots']['has'](_0x1922b7['rootName'])?this['_diffRoots']['get'](_0x1922b7['rootName'])['_isAttached']=_0x1922b7['isAdd']:(this['_diffRoots']['set'](_0x1922b7['rootName'],P(_0x1922b7['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1922b7['rootName'],{}),_0x28c285&&this['_idsRoots']['set'](_0x1922b7['rootName'],P(_0x1922b7['rootName'],!0x0)));const _0x14dbd6=null===_0x1922b7['_authorId']?null:_0x1922b7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x286d22=this['_touchedRoots']['get'](_0x1922b7['rootName']);_0x286d22&&_0x286d22['userId']===_0x14dbd6?this['_touchedRoots']['delete'](_0x1922b7['rootName']):this['_touchedRoots']['set'](_0x1922b7['rootName'],{'userId':_0x14dbd6,'isAttached':_0x1922b7['isAdd']});}['_handleRootAttributeOperation'](_0x28a9a8){const _0x552b51=this['_diffRootsAttributes']['get'](_0x28a9a8['root']['rootName']);null===_0x28a9a8['newValue']?delete _0x552b51[_0x28a9a8['key']]:_0x552b51[_0x28a9a8['key']]=_0x28a9a8['newValue'];}}function N(_0x3cacd1){const _0x563520=P(_0x3cacd1['rootName'],_0x3cacd1['isAttached']());for(const _0x10ea52 of _0x3cacd1['getChildren']()){const _0x3abd94=_0x10ea52['_clone'](!0x0);_0x563520['_appendChild'](_0x3abd94);}return _0x563520;}function P(_0x2e42a6,_0xcc5038=!0x0){const _0x39f69e=new gt();return _0x39f69e['rootName']=_0x2e42a6,_0x39f69e['_isAttached']=_0xcc5038,_0x39f69e['isAttached']=()=>_0x39f69e['_isAttached'],_0x39f69e;}function F(_0x1dd695,_0x29c749,_0x52919f){const _0x4ce649='elementEnd'==_0x1dd695['type']?_0x52919f['createPositionAt'](_0x1dd695['item'],'end'):_0x52919f['createPositionBefore'](_0x1dd695['item']);return _0x52919f['createPositionFromPath'](_0x29c749,_0x4ce649['path'],_0x4ce649['stickiness']);}function B(_0x41f90c,_0x230556,_0x52e23d){const _0x5754b7='elementStart'==_0x41f90c['type']?_0x52e23d['createPositionAt'](_0x41f90c['item'],0x0):_0x52e23d['createPositionAfter'](_0x41f90c['item']);return _0x52e23d['createPositionFromPath'](_0x230556,_0x5754b7['path'],_0x5754b7['stickiness']);}class os extends _0x3c4eb7{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5aebd4,_0x5a556c){super(_0x5aebd4),this['focusTracker']=new _0xc3e64e(),this['keystrokes']=new _0x1082ff(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5a556c),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'](),_0xa709b3({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x3fb8dc=_0x2a2e23=>_0x2a2e23['stopPropagation']();this['keystrokes']['set']('arrowright',_0x3fb8dc),this['keystrokes']['set']('arrowleft',_0x3fb8dc),this['keystrokes']['set']('arrowup',_0x3fb8dc),this['keystrokes']['set']('arrowdown',_0x3fb8dc);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2417b8){this['revisionNameInputView']['fieldView']['element']['value']=_0x2417b8['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x39e4ff){const _0x5b4c41=new nt(this['locale'],ti),_0x1d1cd2=_0x5b4c41['fieldView'];_0x1d1cd2['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x595a7a=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x39e4ff&&(_0x595a7a+='\x20('+g(this['locale'],'optional')+')'),(_0x5b4c41['label']=_0x595a7a,_0x1d1cd2['on']('input',()=>{this['revisionNameInputValue']=_0x1d1cd2['element']['value']['trim']();}),_0x5b4c41);}}class f extends _0x4489ae{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x23c148=this['editor'],_0x2e4a2e=_0x23c148['plugins']['get']('RevisionTracker');_0x23c148['ui']['componentFactory']['add']('revisionHistory',_0x2cf503=>{const _0x4df512=_0x387160(_0x2cf503),_0x33661b=_0x4df512['panelView']['children'],_0x267a76=new _0x4eb355(_0x2cf503),_0x46467b=new te(_0x2cf503),_0x422605=new _0x2e6643(_0x2cf503),_0x5c7fde=new te(_0x2cf503),_0x259e1f=new _0x2e6643(_0x2cf503);return _0x4df512['bind']('isEnabled')['to'](_0x2e4a2e,'isReady',_0x2e4a2e,'isEnabled',_0x23c148,'isReadOnly',(_0x4bf2ba,_0x3060b0,_0x212b96)=>_0x4bf2ba&&_0x3060b0&&!_0x212b96),_0x4df512['buttonView']['set']({'icon':_0x25d66f,'label':g(_0x2cf503,'Revision\x20history'),'tooltip':!0x0}),_0x422605['set']({'label':g(_0x2cf503,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x422605['bind']('isEnabled')['to'](_0x2e4a2e,'isReady',_0x2e4a2e,'isEnabled',_0x23c148,'isReadOnly',(_0x261ffe,_0x5ef2a2,_0x5f01b2)=>_0x261ffe&&_0x5ef2a2&&!_0x5f01b2),_0x422605['on']('execute',()=>this['_showDialog']()),_0x259e1f['set']({'label':g(_0x2cf503,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x259e1f['bind']('isEnabled')['to'](_0x2e4a2e,'isReady',_0x23c148,'isReadOnly',(_0x51ec4f,_0x288dda)=>_0x51ec4f&&!_0x288dda),_0x259e1f['on']('execute',()=>{_0x23c148['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x4df512['isOpen']=!0x1,_0x23c148['editing']['view']['focus']();}),_0x46467b['children']['add'](_0x422605),_0x5c7fde['children']['add'](_0x259e1f),_0x267a76['role']='menu',_0x267a76['items']['addMany']([_0x46467b,_0x5c7fde]),_0x33661b['add'](_0x267a76),_0x4df512;}),_0x23c148['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3545e8=this['editor'],_0x45efdb=_0x3545e8['locale'],_0x1fa9b8=new _0x18dac9(_0x45efdb),_0x220bc3=new _0x970e28(_0x45efdb);_0x1fa9b8['buttonView']['set']({'icon':_0x25d66f,'label':g(_0x45efdb,'Revision\x20history')});const _0x437c96=new _0x1006d3(_0x45efdb,_0x1fa9b8),_0x26b7ce=new _0x15a5e5(_0x45efdb);_0x26b7ce['set']({'label':g(_0x45efdb,'Save\x20current\x20revision')}),_0x26b7ce['delegate']('execute')['to'](_0x1fa9b8),_0x26b7ce['on']('execute',()=>{this['_showDialog']();}),_0x437c96['children']['add'](_0x26b7ce),_0x220bc3['items']['add'](_0x437c96);const _0x57d3fd=new _0x1006d3(_0x45efdb,_0x1fa9b8),_0x18f8ca=new _0x15a5e5(_0x45efdb);return _0x18f8ca['set']({'label':g(_0x45efdb,'Open\x20revision\x20history')}),_0x18f8ca['delegate']('execute')['to'](_0x1fa9b8),_0x18f8ca['on']('execute',()=>{_0x3545e8['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x57d3fd['children']['add'](_0x18f8ca),_0x220bc3['items']['add'](_0x57d3fd),_0x1fa9b8['panelView']['children']['add'](_0x220bc3),_0x1fa9b8;}['_showDialog'](){const _0x56045a=this['editor'],_0x2bddc6=_0x56045a['locale'],_0x39227b=_0x56045a['plugins']['get']('Dialog'),_0x3b89dc=_0x56045a['plugins']['get']('RevisionTracker');function _0x3dc4a2(_0x5cca6f){_0x56045a['config']['get']('revisionHistory.requireRevisionName')&&''===_0x5cca6f['revisionName']?_0x5cca6f['revisionNameInputView']['errorText']=g(_0x2bddc6,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x56045a['plugins']['get'](u)['saveRevision']({'name':_0x5cca6f['revisionName']}),_0x39227b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3dc4a2(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x39227b['show']({'id':'revisionSave','title':g(_0x2bddc6,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x56045a['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x39227b['hide']()},{'label':g(_0x56045a['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x45a3e1){_0x45a3e1['bind']('isEnabled')['to'](_0x3b89dc,'isReady',_0x3b89dc,'isEnabled',_0x56045a,'isReadOnly',(_0x377d6c,_0x2ccec3,_0x402e58)=>_0x377d6c&&_0x2ccec3&&!_0x402e58);},'onExecute':()=>_0x3dc4a2(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x21801d=this['editor'],_0x207a4e=_0x21801d['locale'];this['_saveRevisionFormView']=new os(_0x207a4e,_0x21801d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x3c4eb7{['changeId'];['_model'];constructor(_0x4e722f,_0x318d99){super(_0x4e722f),this['_model']=_0x318d99,this['changeId']=_0x318d99['id'];const _0x20b6d6=this['bindTemplate'],_0x347da7=g(_0x4e722f,_0x318d99['data']['isSuggestion']?'Suggested\x20by':'add'==_0x318d99['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x318d99['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x20b6d6['to']('type',_0x5b62d5=>'ck-revision-change__'+_0x5b62d5)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x347da7}]},{'text':'\x20'+_0x318d99['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x27e923(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x281444){super(),this['id']=_0x281444['id']||_0x402ab0(),this['author']=_0x281444['author'],this['type']=_0x281444['type'],this['data']=_0x281444['data']||{},this['rootName']=_0x281444['rootName'],this['set']('createdAt',_0x281444['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(_0x47b0e6,_0x3fbb3b){this['newRevisionId']=_0x47b0e6,this['oldRevisionId']=_0x3fbb3b,this['changes']=new _0x1301ad();}['_setChanges'](_0x3b5ade){for(const _0x58ea15 of _0x3b5ade)this['changes']['add'](_0x58ea15);}}class m extends _0x4489ae{['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[_0x5cb796,_0x472b27,I,V];}constructor(_0x32d953){super(_0x32d953),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',(_0x5bd6f5,_0x2e34c1,_0x33b0bf)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x30b53e=>{for(const _0x388ad of this['editor']['editing']['view']['document']['roots'])_0x33b0bf?_0x30b53e['removeClass']('ck-editor__editable__overlay',_0x388ad):_0x30b53e['addClass']('ck-editor__editable__overlay',_0x388ad);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x533f84=>null!==_0x533f84),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x37cef3,_0x5288bf,_0x481bae)=>_0x37cef3&&_0x481bae?_0x5288bf['changes']['getIndex'](_0x481bae):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4b9fd9,_0x4a9f29)=>_0x4b9fd9?_0x4a9f29['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x472b27);}['init'](){const _0x1c364f=this['editor'],_0x4edcb6=new pt(_0x1c364f,{'direction':'backward'}),_0x26b743=new pt(_0x1c364f,{'direction':'forward'});(_0x1c364f['commands']['add']('showPreviousChange',_0x4edcb6),_0x1c364f['commands']['add']('showNextChange',_0x26b743),_0x1c364f['commands']['add']('restoreRevision',new wt(_0x1c364f)),this['on']('change:numberOfChanges',()=>{_0x4edcb6['refresh'](),_0x26b743['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1c364f['enableReadOnlyMode']('revision-viewer'),_0x1c364f['plugins']['has']('WidgetToolbarRepository'))&&_0x1c364f['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x54bb62){return await this['_utils']['loadRevisionData'](_0x54bb62,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x54bb62);}async['getRevisionRootsAttributes'](_0x51b605){return await this['_utils']['loadRevisionData'](_0x51b605,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x51b605);}async['compare'](_0x5c5a0b,_0xee1755,_0x3530f5=!0x1){if(!this['isEnabled'])return;const _0x409b0b=this['diff'],_0x84ce3=this['repository'],_0x38fee1='string'==typeof _0x5c5a0b?_0x84ce3['getRevision'](_0x5c5a0b):_0x5c5a0b,_0x120a69='string'==typeof _0xee1755?_0x84ce3['getRevision'](_0xee1755):_0xee1755,_0x41b389=_0x38fee1['id'],_0x381346=_0x120a69?_0x120a69['id']:null;if(!_0x3530f5&&this['diff']&&this['diff']['newRevisionId']===_0x41b389&&this['diff']['oldRevisionId']===_0x381346)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x41b389,_0x381346);const _0x136971=this['_getRevisionsRange'](_0x38fee1,_0x120a69,!0x0)['map'](_0x407ecb=>this['_utils']['loadRevisionData'](_0x407ecb,this['adapter']));return _0x136971['push'](new Promise(_0x249a26=>{setTimeout(_0x249a26,0x14);})),Promise['all'](_0x136971)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x49e664=this['_getDiff'](_0x41b389,_0x381346);for(const _0x2aeee7 of _0x49e664['changes'])this['_changeIdToChange']['set'](_0x2aeee7['id'],_0x2aeee7);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4cb75b=>{for(const _0x56495b of this['editor']['model']['document']['getRootNames']())_0x4cb75b['detachRoot'](_0x56495b);for(const _0x46f075 of Object['keys'](_0x49e664['model'])){const _0x336020=_0x4cb75b['addRoot'](_0x46f075);for(const _0x1faeb3 of Object['keys'](_0x49e664['attributes'][_0x46f075]))_0x4cb75b['setAttribute'](_0x1faeb3,_0x49e664['attributes'][_0x46f075][_0x1faeb3],_0x336020);_0x4cb75b['insert'](_0x49e664['model'][_0x46f075],_0x336020,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x49e664['changes'])),this['isReady']=!0x0;})['catch'](_0x24c971=>{console['error'](_0x24c971),this['_cleanUp'](),_0x409b0b&&(this['diff']=_0x409b0b),this['isReady']=!0x0;});}['addRevisionData'](_0x5a045f,_0x18d743){const _0x3c0ed0=this['repository']['createRevision'](_0x5a045f);return _0x3c0ed0['on']('_update',(_0x301eb0,_0x4c7498,_0x1c2e22)=>_0x18d743(_0x4c7498,_0x1c2e22,_0x3c0ed0)),this['repository']['addRevision'](_0x3c0ed0),_0x3c0ed0;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x497765=>{for(const _0x511b15 of this['editor']['model']['document']['getRootNames']())_0x497765['detachRoot'](_0x511b15);});}['_sortAndFilterDiffChanges'](_0x5e6e0d){const _0x57d72c=[],_0x59857f=new Map();for(const _0x49103b of this['editor']['model']['document']['getRootNames']()){const _0x13d385=this['editor']['editing']['view']['getDomRoot'](_0x49103b);if(!_0x13d385)continue;const _0x4c6f1d=_0x13d385['getClientRects']()['item'](0x0);_0x4c6f1d&&(_0x57d72c['push'](_0x49103b),_0x59857f['set'](_0x49103b,_0x4c6f1d));}return _0x57d72c['sort']((_0x84a6cf,_0x18a71a)=>{const _0x390f4d=_0x59857f['get'](_0x84a6cf),_0x16f958=_0x59857f['get'](_0x18a71a);return _0x390f4d['y']-_0x16f958['y']||_0x390f4d['x']-_0x16f958['x'];}),(_0x5e6e0d=_0x5e6e0d['filter'](_0x450cb5=>_0x57d72c['includes'](_0x450cb5['rootName'])))['sort']((_0x5b5dbd,_0x3a88dc)=>_0x57d72c['indexOf'](_0x5b5dbd['rootName'])-_0x57d72c['indexOf'](_0x3a88dc['rootName'])),_0x5e6e0d;}['_makeTape'](_0x1166a6){const _0x10d297=Array['from'](_0x1166a6['markers'])['filter'](([_0x2e26f1,_0x561e7a])=>_0x2e26f1['startsWith']('revision:')&&!_0x561e7a['isCollapsed']),_0x5a2f77=Array['from'](this['editor']['model']['createRangeIn'](_0x1166a6)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x10d297['length'])for(const _0x14ee58 of _0x5a2f77){const [_0x354393,_0x5b6795]=_0x10d297[0x0],[,_0x35889f,_0x579579]=_0x354393['split'](':');if(_0x5b6795['end']['isEqual'](_0x14ee58['nextPosition'])&&_0x10d297['shift'](),(_0x14ee58['previousPosition']['isEqual'](_0x5b6795['start'])||_0x14ee58['previousPosition']['isAfter'](_0x5b6795['start']))&&('insertion'==_0x35889f?_0x14ee58['isAdded']={'userId':_0x579579}:'deletion'==_0x35889f&&(_0x14ee58['isRemoved']={'userId':_0x579579})),0x0==_0x10d297['length'])break;}return _0x5a2f77;}['_refreshStartEndIndex'](_0x1ef66a){const _0x17db75=new Map();for(let _0x30cec2=0x0;_0x30cec2<_0x1ef66a['length'];_0x30cec2++)'text'===_0x1ef66a[_0x30cec2]['type']?(_0x1ef66a[_0x30cec2]['item']['startIndex']=_0x30cec2,_0x1ef66a[_0x30cec2]['item']['endIndex']=_0x30cec2):('elementStart'===_0x1ef66a[_0x30cec2]['type']?_0x1ef66a[_0x30cec2]['item']['startIndex']=_0x30cec2:'elementEnd'===_0x1ef66a[_0x30cec2]['type']&&(_0x1ef66a[_0x30cec2]['item']['endIndex']=_0x30cec2),_0x17db75['set'](_0x1ef66a[_0x30cec2]['id'],_0x30cec2));for(const _0x257df3 of _0x17db75['values']())'elementStart'===_0x1ef66a[_0x257df3]['type']?_0x1ef66a[_0x257df3]['item']['endIndex']=_0x17db75['get'](_0x1ef66a[_0x257df3]['pairId']):'elementEnd'===_0x1ef66a[_0x257df3]['type']&&(_0x1ef66a[_0x257df3]['item']['startIndex']=_0x17db75['get'](_0x1ef66a[_0x257df3]['pairId']));}['_processTape'](_0x3a3191){for(let _0x4d3be7=0x0;_0x4d3be7<_0x3a3191['length'];_0x4d3be7++){if('elementStart'===_0x3a3191[_0x4d3be7]['type'])_0x3a3191[_0x4d3be7]['item']['startIndex']=_0x4d3be7;else{if('elementEnd'===_0x3a3191[_0x4d3be7]['type']){_0x3a3191[_0x4d3be7]['item']['endIndex']=_0x4d3be7;const _0x3aba67=_0x3a3191[_0x4d3be7]['item']['startIndex'];_0x3a3191[_0x3aba67]['pairId']=_0x3a3191[_0x4d3be7]['id'],_0x3a3191[_0x4d3be7]['pairId']=_0x3a3191[_0x3aba67]['id'];}else _0x3a3191[_0x4d3be7]['item']['startIndex']=_0x4d3be7,_0x3a3191[_0x4d3be7]['item']['endIndex']=_0x4d3be7,_0x3a3191[_0x4d3be7]['pairId']=null;}_0x3a3191[_0x4d3be7]['markersStart']||(_0x3a3191[_0x4d3be7]['markersStart']=[],_0x3a3191[_0x4d3be7]['markersEnd']=[]);}}['_markInsertions'](_0x4f421d,_0x4d2a58){const _0x55afe9=_0x4f421d['filter'](_0x2d8c50=>!_0x2d8c50['isAdded']);for(let _0x572b93=0x0;_0x572b93<_0x4d2a58['length'];_0x572b93++)_0x4d2a58[_0x572b93]['isAdded']&&(_0x55afe9[_0x572b93]['isAdded']=_0x4d2a58[_0x572b93]['isAdded']);}['_getDiff'](_0x16f879,_0x5d68f5=null){const _0x293111=this['repository']['getRevision'](_0x16f879),_0x26b578=_0x5d68f5?this['repository']['getRevision'](_0x5d68f5):null,_0x429cf8=this['_getRevisionsRange'](_0x293111,_0x26b578),_0x3cfb7e=_0x429cf8[_0x429cf8['length']-0x1],_0x51b2c8=new Map(),_0x2cc64e={'model':{},'attributes':{},'changes':[]},_0x2adb27=new Set(),_0x4e1d03=new Map();for(let _0x3f8cf5=_0x429cf8['length']-0x1;_0x3f8cf5>=0x0;_0x3f8cf5--){const _0x2eadc7=_0x429cf8[_0x3f8cf5];for(const _0x53ee7c of Object['keys'](_0x2eadc7['diffData']))if(_0x2eadc7['diffData'][_0x53ee7c]['attachChange']){const _0x30648e=_0x2eadc7['diffData'][_0x53ee7c]['attachChange'];_0x30648e['isAttached']?(_0x2adb27['add'](_0x53ee7c),_0x4e1d03['has'](_0x53ee7c)&&_0x4e1d03['get'](_0x53ee7c)['userId']==_0x30648e['userId']?_0x4e1d03['delete'](_0x53ee7c):_0x4e1d03['set'](_0x53ee7c,_0x30648e)):_0x4e1d03['has'](_0x53ee7c)?(_0x2adb27['delete'](_0x53ee7c),_0x4e1d03['delete'](_0x53ee7c)):(_0x2adb27['add'](_0x53ee7c),_0x4e1d03['set'](_0x53ee7c,_0x30648e));}else _0x2adb27['add'](_0x53ee7c);}for(const _0x1d8180 of _0x2adb27){const _0x17abad=_0x4e1d03['has'](_0x1d8180)&&!_0x4e1d03['get'](_0x1d8180)['isAttached'];let _0x43da14=_0x17abad?_0x429cf8['length']-0x1:0x0;const _0x31adf4=_0x17abad?-0x1:0x1;for(;_0x429cf8[_0x43da14];){const _0x16bf59=_0x429cf8[_0x43da14];if(_0x16bf59['diffData'][_0x1d8180]){const _0x17f562=_0x17abad?_0x16bf59['diffData'][_0x1d8180]['attributesBefore']:_0x16bf59['diffData'][_0x1d8180]['attributesAfter'];_0x2cc64e['attributes'][_0x1d8180]=_0x17f562?_0x2611c8(_0x17f562):{};break;}_0x43da14+=_0x31adf4;}}for(const _0x445a23 of _0x429cf8){_0x445a23['model']={};for(const _0x296468 of _0x445a23['authors'])_0x51b2c8['set'](_0x296468['id'],_0x296468);for(const _0x40f521 of _0x2adb27){const _0x93cb2b=_0x445a23['diffData'][_0x40f521]?_0x445a23['diffData'][_0x40f521]['insertions']:'[]',_0x3fc0cd=_0x445a23['diffData'][_0x40f521]?_0x445a23['diffData'][_0x40f521]['deletions']:'[]';_0x445a23['model'][_0x40f521]={'insertions':this['_utils']['_makeModelFromViewString'](_0x93cb2b),'deletions':this['_utils']['_makeModelFromViewString'](_0x3fc0cd)};}}for(const _0x801f7b of _0x2adb27){let _0x4e4428=null,_0x1aa583=0x0;const _0x2dc115=new Map(Array['from'](_0x293111['model'][_0x801f7b]['insertions']['markers'])['filter'](([_0x10654f])=>!_0x10654f['startsWith']('revision:')));let _0x287d57=0x0;for(const _0x2cd9f2 of _0x429cf8){const _0x20048d=this['_makeTape'](_0x2cd9f2['model'][_0x801f7b]['insertions']);_0x2cd9f2==_0x293111?(_0x4e4428=_0x20048d,_0x1aa583=_0x4e4428['length'],_0x4e4428['forEach'](_0x17afee=>{_0x17afee['id']=_0x287d57++;}),this['_processTape'](_0x4e4428)):this['_markInsertions'](_0x4e4428,_0x20048d);const _0x1195b6=_0x4e4428['filter'](_0x1f1a8c=>!_0x1f1a8c['isAdded'])['map'](_0x422c0b=>_0x422c0b['id']);let _0x1ba443=0x0;const _0x38876e=this['_makeTape'](_0x2cd9f2['model'][_0x801f7b]['deletions']);_0x38876e['forEach'](_0x4f94bd=>{_0x4f94bd['isRemoved']?_0x4f94bd['id']=_0x1aa583++:_0x4f94bd['id']=_0x1195b6[_0x1ba443++];}),this['_processTape'](_0x38876e),this['_setDistance'](_0x4e4428,'isAdded'),this['_setDistance'](_0x38876e,'isRemoved'),_0x2cd9f2==_0x293111&&this['_markMarkers'](_0x4e4428,_0x2dc115),_0x4e4428=this['_joinTapes'](_0x4e4428,_0x38876e),this['_refreshStartEndIndex'](_0x4e4428),this['_setDistance'](_0x4e4428,'isRemoved');}_0x4e4428=_0x4e4428['filter'](_0x529792=>!(_0x529792['isAdded']&&_0x529792['isRemoved']));const _0x5f7f6b=new Map(_0x3cfb7e['model'][_0x801f7b]['deletions']['markers']),_0x222bd1=new Set(_0x2dc115['keys']());for(const _0xc4ba03 of _0x5f7f6b['keys']())_0x222bd1['delete'](_0xc4ba03);this['_markSuggestions'](_0x4e4428,_0x222bd1),this['_fixObsoleteTags'](_0x4e4428),_0x4e4428=this['_removeMissingPairs'](_0x4e4428),_0x4e4428=this['_markMismatchedRemovedTags'](_0x4e4428),_0x4e4428=this['_removeUnsupportedChanges'](_0x4e4428);const {root:_0x226c18,changes:_0x589138}=this['_makeModelFromTape'](_0x4e4428,_0x51b2c8,_0x801f7b);_0x2cc64e['model'][_0x801f7b]=_0x226c18;const _0x7aff57=_0x4e1d03['get'](_0x801f7b);if(_0x7aff57){const _0x2f9c8b=_0x51b2c8['get'](_0x7aff57['userId']),_0x1a2686=new r({'author':_0x2f9c8b,'type':_0x7aff57['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x801f7b});_0x589138['unshift'](_0x1a2686),_0x2cc64e['attributes'][_0x801f7b]['revisionHistoryAttachChange']=_0x1a2686['id'];}_0x2cc64e['changes']=_0x2cc64e['changes']['concat'](_0x589138);}return _0x2cc64e;}['_markMarkers'](_0xaa745b,_0x7f8822){for(let _0x3e8f81=0x0;_0x3e8f81<_0xaa745b['length'];_0x3e8f81++)for(const [_0x2c0b5d,_0x5f2d22]of _0x7f8822)!_0x5f2d22['isCollapsed']&&_0x5f2d22['start']['isEqual'](_0xaa745b[_0x3e8f81]['previousPosition'])&&_0xaa745b[_0x3e8f81]['markersStart']['push'](_0x2c0b5d),_0x5f2d22['end']['isEqual'](_0xaa745b[_0x3e8f81]['nextPosition'])&&_0xaa745b[_0x3e8f81]['markersEnd']['push'](_0x2c0b5d);}['_joinTapes'](_0x3c62d3,_0x841879){let _0x2d7c68=[],_0x3c6718=0x0,_0x25918f=0x0;for(;_0x3c6718<_0x3c62d3['length']||_0x25918f<_0x841879['length'];){const _0x1c319f=_0x3c62d3[_0x3c6718]||{},_0x1537b7=_0x841879[_0x25918f]||{};if(_0x1c319f['id']==_0x1537b7['id'])_0x3c6718++,_0x25918f++,_0x2d7c68['push'](_0x1c319f);else{if(_0x1537b7['isRemoved']&&_0x1c319f['isAdded']){const {commonTape:_0x235a8c,iEnd:_0x77d6a6,jEnd:_0x5df16c}=this['_threeWayMerge'](_0x3c62d3,_0x3c6718,_0x841879,_0x25918f);_0x2d7c68=_0x2d7c68['concat'](_0x235a8c),_0x3c6718=_0x77d6a6,_0x25918f=_0x5df16c;}else _0x1537b7['isRemoved']?(_0x25918f++,_0x2d7c68['push'](_0x1537b7)):(_0x3c6718++,_0x2d7c68['push'](_0x1c319f));}}return _0x2d7c68;}['_markSuggestions'](_0x4612b3,_0x30d747){const _0x185255=[];for(let _0x374563=0x0;_0x374563<_0x4612b3['length'];_0x374563++){for(let _0x563987=0x0;_0x563987<_0x4612b3[_0x374563]['markersStart']['length'];_0x563987++){const _0x4a3135=_0x4612b3[_0x374563]['markersStart'][_0x563987];if(!_0x30d747['has'](_0x4a3135))continue;const {group:_0x3bab55,type:_0x1acd35,authorId:_0x3f06c1}=_0x3fb9fc(_0x4a3135);'revision-suggestion'!=_0x3bab55||'insertion'!=_0x1acd35&&'deletion'!=_0x1acd35||(_0x185255['unshift']({'type':_0x1acd35,'name':_0x4a3135,'userId':_0x3f06c1}),_0x4612b3[_0x374563]['markersStart']['splice'](_0x563987,0x1),_0x563987--);}_0x484d59(_0x4612b3[_0x374563]);for(let _0x376503=0x0;_0x376503<_0x4612b3[_0x374563]['markersEnd']['length'];_0x376503++){const _0x3ae380=_0x4612b3[_0x374563]['markersEnd'][_0x376503];if(!_0x30d747['has'](_0x3ae380))continue;const {group:_0x1238a7,type:_0xc5ddc0}=_0x3fb9fc(_0x3ae380);if('revision-suggestion'!=_0x1238a7||'insertion'!=_0xc5ddc0&&'deletion'!=_0xc5ddc0)continue;_0x4612b3[_0x374563]['markersEnd']['splice'](_0x376503,0x1),_0x376503--;const _0x50d66a=_0x185255['findIndex'](_0x27bdd4=>_0x27bdd4['name']==_0x3ae380);_0x50d66a>-0x1&&_0x185255['splice'](_0x50d66a,0x1);}}function _0x3fb9fc(_0x2c28ce){const _0x2ee64e=_0x2c28ce['split'](':');return{'group':_0x2ee64e[0x0],'type':_0x2ee64e[0x1],'subType':_0x2ee64e['length']>=0x5?_0x2ee64e[0x2]:null,'id':_0x2ee64e['length']<0x5?_0x2ee64e[0x2]:_0x2ee64e[0x3],'authorId':_0x2ee64e['length']<0x5?_0x2ee64e[0x3]:_0x2ee64e[0x4],'markerCount':0x6==_0x2ee64e['length']?_0x2ee64e[0x5]:null};}function _0x484d59(_0x30ea51){for(let _0x36055b=0x0;_0x36055b<_0x185255['length'];_0x36055b++){if(_0x30ea51['isAdded']&&'insertion'==_0x185255[_0x36055b]['type'])return _0x30ea51['isAddSuggestion']=_0x185255[_0x36055b],void delete _0x30ea51['isAdded'];if(!_0x30ea51['isAdded']&&!_0x30ea51['isRemoved']&&'deletion'==_0x185255[_0x36055b]['type'])return void(_0x30ea51['isRemoveSuggestion']=_0x185255[_0x36055b]);}}}['_setDistance'](_0x387d03,_0x43214c){let _0x557d56=0x0,_0x527513=!0x1;const _0xc0699f=new Map();for(const _0x5969c0 of _0x387d03)_0x5969c0[_0x43214c]?_0x527513&&(_0x557d56++,_0x527513=!0x1):(_0x557d56++,_0x527513=!0x0),_0xc0699f['set'](_0x5969c0['id'],_0x557d56);for(let _0x1c1502=0x0;_0x1c1502<_0x387d03['length'];_0x1c1502++){if('isRemoved'==_0x43214c&&_0x387d03[_0x1c1502]['isAdded']||'isAdded'==_0x43214c&&_0x387d03[_0x1c1502]['isRemoved'])continue;if('text'==_0x387d03[_0x1c1502]['type']){_0x387d03[_0x1c1502]['distance']=0x0;continue;}const _0x291d1a=_0xc0699f['get'](_0x387d03[_0x1c1502]['pairId']),_0x3f4f52=_0xc0699f['get'](_0x387d03[_0x1c1502]['id']);_0x387d03[_0x1c1502]['distance']=_0x291d1a-_0x3f4f52;}}['_getRevisionsRange'](_0x54cc8e,_0xcfe050,_0x3ac365=!0x1){const _0x3c609=[];let _0x5ba09b=this['repository']['getIndex'](_0x54cc8e),_0x4318bf=this['repository']['getIndex'](_0xcfe050);for(-0x1==_0x4318bf&&(_0x4318bf=this['repository']['_revisions']['length'],_0x3ac365=!0x1);_0x5ba09b<_0x4318bf;)_0x3c609['push'](this['repository']['getRevision'](_0x5ba09b)),_0x5ba09b++;return _0x3ac365&&_0x3c609['push'](this['repository']['getRevision'](_0x5ba09b)),_0x3c609;}['_threeWayMerge'](_0x5216b0,_0x45bb07,_0x22e3f4,_0x4b79ea){const _0x6e2aed=this['editor']['model']['schema'];let _0x57ab04=_0x45bb07;for(;_0x5216b0[_0x57ab04]&&_0x5216b0[_0x57ab04]['isAdded'];)_0x57ab04++;let _0x978f45=_0x4b79ea;for(;_0x22e3f4[_0x978f45]&&_0x22e3f4[_0x978f45]['isRemoved'];)_0x978f45++;_0x127915(_0x5216b0,_0x45bb07,_0x57ab04),_0x127915(_0x22e3f4,_0x4b79ea,_0x978f45);const _0x3430ee=_0x22e3f4['slice'](_0x4b79ea,_0x978f45)['concat'](_0x5216b0['slice'](_0x45bb07,_0x57ab04));return _0x3430ee['sort']((_0x56283f,_0x3021b8)=>_0x56283f['side']!=_0x3021b8['side']?_0x56283f['side']-_0x3021b8['side']:_0x56283f['level']!=_0x3021b8['level']?_0x56283f['level']-_0x3021b8['level']:_0x56283f['distance']!=_0x3021b8['distance']?_0x3021b8['distance']-_0x56283f['distance']:!!_0x56283f['isAdded']!=!!_0x3021b8['isAdded']?-0x1==_0x56283f['side']||0x0==_0x56283f['side']?_0x56283f['isAdded']?-0x1:0x1:_0x56283f['isAdded']?0x1:-0x1:_0x56283f['index']-_0x3021b8['index']),{'commonTape':_0x3430ee,'iEnd':_0x57ab04,'jEnd':_0x978f45};function _0x127915(_0x3c965c,_0x46f5d1,_0x1952f4){let _0x3cccce=-0x1,_0x1a2a47=Number['POSITIVE_INFINITY'],_0x4ca7ad=!0x0;for(let _0xf4ab4c=_0x46f5d1;_0xf4ab4c<_0x1952f4;_0xf4ab4c++)if(_0x6e2aed['isInline'](_0x3c965c[_0xf4ab4c]['item'])||(_0x4ca7ad=!0x1),_0x3c965c[_0xf4ab4c]['item']['startIndex']<_0x46f5d1&&(_0x3cccce=_0xf4ab4c),_0x3c965c[_0xf4ab4c]['item']['endIndex']>=_0x1952f4){_0x1a2a47=_0xf4ab4c;break;}_0x4ca7ad&&(_0x3cccce=_0x1952f4-0x1);for(let _0x5aecec=_0x46f5d1;_0x5aecec<_0x1952f4;_0x5aecec++)_0x3c965c[_0x5aecec]['side']=_0x5aecec<=_0x3cccce?-0x1:_0x5aecec<_0x1a2a47?0x0:0x1,_0x3c965c[_0x5aecec]['index']=_0x5aecec;let _0x19f9be=0x0;for(let _0x128dea=_0x46f5d1;_0x128dea<=_0x3cccce;_0x128dea++)0x0==_0x3c965c[_0x128dea]['distance']?_0x3c965c[_0x128dea]['level']=_0x19f9be:(_0x19f9be++,_0x3c965c[_0x128dea]['level']=_0x19f9be,_0x19f9be++);for(let _0x55bf86=_0x46f5d1;_0x55bf86<_0x1952f4;_0x55bf86++)0x0==_0x3c965c[_0x55bf86]['side']&&(_0x3c965c[_0x55bf86]['level']=_0x19f9be);_0x19f9be=0x0;for(let _0x506f76=_0x1952f4-0x1;_0x506f76>=_0x1a2a47;_0x506f76--)0x0==_0x3c965c[_0x506f76]['distance']?_0x3c965c[_0x506f76]['level']=_0x19f9be:(_0x19f9be--,_0x3c965c[_0x506f76]['level']=_0x19f9be,_0x19f9be--);}}['_fixObsoleteTags'](_0xdd1c68){const _0xe6670d=new Map(),_0x308053=this['editor']['model']['schema'];for(let _0x5106ad=0x1;_0x5106ad<_0xdd1c68['length'];_0x5106ad++){let _0x509c20,_0x17c640,_0x33ecc3;const _0x6c50b3=_0xdd1c68[_0x5106ad],_0x265ae6=_0xdd1c68[_0x5106ad-0x1];if('text'==_0x6c50b3['type'])continue;if(_0x6c50b3['type']!=_0x265ae6['type'])continue;if(!_0x308053['isBlock'](_0x265ae6['item'])||_0x308053['isLimit'](_0x265ae6['item']))continue;if(!_0x308053['isBlock'](_0x6c50b3['item'])||_0x308053['isLimit'](_0x6c50b3['item']))continue;if((_0xdd1c68[_0x5106ad]['isAdded']||_0xdd1c68[_0x5106ad]['isAddSuggestion'])&&_0xdd1c68[_0x5106ad-0x1]['isRemoved'])_0x509c20=_0xdd1c68[_0x5106ad],_0x17c640=_0xdd1c68[_0x5106ad-0x1],_0x33ecc3=_0x5106ad-0x1;else{if(!_0xdd1c68[_0x5106ad]['isRemoved']||!_0xdd1c68[_0x5106ad-0x1]['isAdded']&&!_0xdd1c68[_0x5106ad-0x1]['isAddSuggestion'])continue;_0x509c20=_0xdd1c68[_0x5106ad-0x1],_0x17c640=_0xdd1c68[_0x5106ad],_0x33ecc3=_0x5106ad;}const _0x1d3ff5=_0x509c20['level']==_0x17c640['level'],_0x38d2f7=Math['abs'](_0x509c20['level'])<Math['abs'](_0x17c640['level'])&&0x0==_0x17c640['distance'];(_0x1d3ff5||_0x38d2f7)&&(_0xe6670d['set'](_0x17c640['id'],_0x509c20['id']),_0xdd1c68['splice'](_0x33ecc3,0x1),_0x5106ad--,_0x509c20['isAdded']=!0x1);}for(let _0x4571bf=0x0;_0x4571bf<_0xdd1c68['length'];_0x4571bf++)_0xe6670d['has'](_0xdd1c68[_0x4571bf]['pairId'])&&(_0xdd1c68[_0x4571bf]['pairId']=_0xe6670d['get'](_0xdd1c68[_0x4571bf]['pairId']));}['_removeMissingPairs'](_0x2c232a){const _0x3e80af=new Set(_0x2c232a['map'](_0x35c682=>_0x35c682['id']));for(let _0x28cd53=0x0;_0x28cd53<_0x2c232a['length'];_0x28cd53++)_0x3e80af['has'](_0x2c232a[_0x28cd53]['pairId'])||0x0==_0x2c232a[_0x28cd53]['distance']||(_0x2c232a[_0x28cd53]['isIncorrect']=!0x0);return _0x2c232a['filter'](_0x590075=>!_0x590075['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1f0f63){const _0x363e75=new Set();for(let _0x5216ca=0x0;_0x5216ca<_0x1f0f63['length'];_0x5216ca++){if(_0x363e75['has'](_0x1f0f63[_0x5216ca]['id'])&&_0x1f0f63[_0x5216ca]['isRemoved']&&(_0x1f0f63[_0x5216ca]['isIncorrect']=!0x0),_0x1f0f63[_0x5216ca]['isIncorrect'])continue;if(0x0==_0x1f0f63[_0x5216ca]['distance'])continue;if('elementStart'!=_0x1f0f63[_0x5216ca]['type'])continue;if(null==_0x1f0f63[_0x5216ca]['pairId'])continue;let _0x44794d=_0x5216ca+0x1,_0x2a2feb=0x0;for(;_0x1f0f63[_0x44794d]['id']!=_0x1f0f63[_0x5216ca]['pairId'];)'elementStart'==_0x1f0f63[_0x44794d]['type']?_0x2a2feb++:'elementEnd'==_0x1f0f63[_0x44794d]['type']&&_0x2a2feb--,_0x44794d++;if(0x0!=_0x2a2feb){if(_0x1f0f63[_0x5216ca]['isRemoved'])_0x1f0f63[_0x5216ca]['isIncorrect']=!0x0;else{for(;_0x44794d!=_0x5216ca;)_0x1f0f63[_0x44794d]['isRemoved']&&0x0!=_0x1f0f63[_0x44794d]['distance']&&(_0x1f0f63[_0x44794d]['isIncorrect']=!0x0,_0x363e75['add'](_0x1f0f63[_0x44794d]['pairId'])),_0x44794d--;}}}return _0x1f0f63['filter'](_0xe66ebd=>!_0xe66ebd['isIncorrect']);}['_removeUnsupportedChanges'](_0x3bdf52){const _0x19ba0f=this['editor']['model']['schema'];for(let _0x17164a=0x0;_0x17164a<_0x3bdf52['length'];_0x17164a++){if(!(_0x3bdf52[_0x17164a]['isAdded']||_0x3bdf52[_0x17164a]['isAddSuggestion']||_0x3bdf52[_0x17164a]['isRemoved']||_0x3bdf52[_0x17164a]['isRemoveSuggestion']))continue;if(0x0==_0x3bdf52[_0x17164a]['distance'])continue;const _0x7baf8c=_0x3bdf52[_0x17164a]['item'];_0x19ba0f['isBlock'](_0x7baf8c)||_0x19ba0f['isLimit'](_0x7baf8c)||(_0x3bdf52[_0x17164a]['isAdded']&&delete _0x3bdf52[_0x17164a]['isAdded'],_0x3bdf52[_0x17164a]['isAddSuggestion']&&delete _0x3bdf52[_0x17164a]['isAddSuggestion'],_0x3bdf52[_0x17164a]['isRemoveSuggestion']&&delete _0x3bdf52[_0x17164a]['isRemoveSuggestion'],_0x3bdf52[_0x17164a]['isRemoved']&&(_0x3bdf52[_0x17164a]['isIncorrect']=!0x0));}return _0x3bdf52['filter'](_0x29db8c=>!_0x29db8c['isIncorrect']);}['_makeModelFromTape'](_0x337512,_0x4aa98f,_0x5d74ad){const _0x2325ff=new gt(),_0x5ae669=[],_0x5280e7=new Map(),_0x107429=this['editor']['model'],_0xa53d9a=_0x107429['schema'],_0x210ed3=[_0x2325ff],_0x1f41f6={},_0x1adf06={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4b0325=null;const _0x168450=[0x0];for(let _0x1733f6=0x0;_0x1733f6<_0x337512['length'];_0x1733f6++)if('elementStart'===_0x337512[_0x1733f6]['type']){_0x337512[_0x1733f6]['previousPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450);const _0xa19087=new ut(_0x337512[_0x1733f6]['item']['name'],_0x337512[_0x1733f6]['item']['getAttributes']());_0x210ed3[0x0]['_appendChild'](_0xa19087),_0x168450['push'](0x0),_0x210ed3['unshift'](_0xa19087),_0x337512[_0x1733f6]['nextPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450);}else'elementEnd'===_0x337512[_0x1733f6]['type']?(_0x210ed3['shift'](),_0x337512[_0x1733f6]['previousPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450),_0x168450['pop'](),_0x168450[_0x168450['length']-0x1]++,_0x337512[_0x1733f6]['nextPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450)):(_0x337512[_0x1733f6]['previousPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450),_0x4b0325?_0x4b0325['_data']+=_0x337512[_0x1733f6]['item']['data']:_0x4b0325=new mt(_0x337512[_0x1733f6]['item']['data'],_0x337512[_0x1733f6]['item']['getAttributes']()),_0x337512[_0x1733f6+0x1]&&'text'===_0x337512[_0x1733f6+0x1]['type']&&_0x349cfe(_0x4b0325,_0x337512[_0x1733f6+0x1]['item'])||(_0x210ed3[0x0]['_appendChild'](_0x4b0325),_0x4b0325=null),_0x168450[_0x168450['length']-0x1]+=_0x337512[_0x1733f6]['item']['offsetSize'],_0x337512[_0x1733f6]['nextPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450));for(let _0x23556c=0x0;_0x23556c<_0x337512['length'];_0x23556c++){const _0x551363=_0x337512[_0x23556c]['previousPosition'],_0x508f48=_0x337512[_0x23556c]['nextPosition'];for(const _0x378164 of _0x337512[_0x23556c]['markersStart'])_0x5280e7['set'](_0x378164,{'start':_0x551363,'end':null});_0x573d4f('isRemoveSuggestion',_0x23556c,_0x551363,_0x508f48),_0x573d4f('isAddSuggestion',_0x23556c,_0x551363,_0x508f48),_0x573d4f('isRemoved',_0x23556c,_0x551363,_0x508f48),_0x573d4f('isAdded',_0x23556c,_0x551363,_0x508f48);for(const _0x4e6a35 of _0x337512[_0x23556c]['markersEnd']){const _0x3b00d5=_0x5280e7['get'](_0x4e6a35);_0x3b00d5?_0x3b00d5['end']=_0x508f48:_0x5280e7['set'](_0x4e6a35,{'start':_0x508f48,'end':_0x508f48});}}for(const [_0x32f5a0,_0x5ca44a]of _0x5280e7){const _0x3f74f8=this['editor']['model']['createRange'](_0x5ca44a['start'],_0x5ca44a['end']);_0x2325ff['markers']['set'](_0x32f5a0,_0x3f74f8);}return _0x5ae669['sort']((_0x99dcd3,_0x15d0a5)=>{const _0x594a16=_0x2325ff['markers']['get']('revision:'+_0x99dcd3['id']),_0x581617=_0x2325ff['markers']['get']('revision:'+_0x15d0a5['id']);return _0x594a16['start']['isBefore'](_0x581617['start'])?-0x1:_0x594a16['start']['isAfter'](_0x581617['start'])?0x1:_0x594a16['end']['isBefore'](_0x581617['end'])?-0x1:_0x594a16['end']['isAfter'](_0x581617['end'])?0x1:'add'===_0x99dcd3['type']?-0x1:0x1;}),{'root':_0x2325ff,'changes':_0x5ae669};function _0x573d4f(_0x5e5540,_0x422659,_0x4fd936,_0x4a3217){const _0x122592=!!_0x337512[_0x422659][_0x5e5540],_0x4d26c0=_0x122592?_0x337512[_0x422659][_0x5e5540]['userId']:null,_0x5d12c4=_0x422659===_0x337512['length']-0x1,_0x428549=_0x1adf06[_0x5e5540][0x0],_0x3a2ed1=_0xa53d9a['isObject'](_0x337512[_0x422659]['item']);!_0x1f41f6[_0x5e5540]&&_0x122592?_0x1f41f6[_0x5e5540]={'start':_0x4fd936,'tapeItem':_0x337512[_0x422659],'userId':_0x4d26c0,'type':_0x5e5540}:_0x1f41f6[_0x5e5540]&&!_0x122592?(_0x1f41f6[_0x5e5540]['end']=_0x4fd936,_0x4d123b(_0x1f41f6[_0x5e5540]),_0x1f41f6[_0x5e5540]=null):_0x1f41f6[_0x5e5540]&&_0x122592&&_0x1f41f6[_0x5e5540]['userId']!==_0x4d26c0&&(_0x1f41f6[_0x5e5540]['end']=_0x4fd936,_0x428549&&_0x428549['userId']===_0x1f41f6[_0x5e5540]['userId']||_0x4d123b(_0x1f41f6[_0x5e5540]),_0x1f41f6[_0x5e5540]={'start':_0x4fd936,'tapeItem':_0x337512[_0x422659],'userId':_0x4d26c0,'type':_0x5e5540}),_0x1f41f6[_0x5e5540]&&_0x3a2ed1&&('elementStart'!==_0x337512[_0x422659]['type']||_0x428549&&_0x428549['userId']===_0x4d26c0||_0x1adf06[_0x5e5540]['unshift']({'userId':_0x4d26c0,'object':_0x337512[_0x422659]['item'],'change':_0x1f41f6[_0x5e5540]}),'elementEnd'===_0x337512[_0x422659]['type']&&_0x428549&&_0x428549['object']===_0x337512[_0x422659]['item']&&(_0x1adf06[_0x5e5540]['shift'](),_0x1f41f6[_0x5e5540]=_0x428549['change'])),_0x1f41f6[_0x5e5540]&&_0x5d12c4&&(_0x1f41f6[_0x5e5540]['end']=_0x4a3217,_0x4d123b(_0x1f41f6[_0x5e5540]),_0x1f41f6[_0x5e5540]=null);}function _0x4d123b({start:_0x4d55bf,end:_0x45e82d,tapeItem:_0x2bf0e5,userId:_0x46c51e,type:_0x4d8826}){const _0x1be872=_0x2bf0e5['item'],_0x9a7d6=_0x107429['schema']['isBlock'](_0x1be872)&&!_0x107429['schema']['isLimit'](_0x1be872),_0x2938e2=_0x4d55bf['nodeAfter']==_0x45e82d['parent']&&_0x45e82d['isAtStart'];if(_0x9a7d6&&_0x2938e2)return;const _0x1dda9b=_0x107429['createRange'](_0x4d55bf,_0x45e82d),_0x272cd1=_0x4aa98f['get'](_0x46c51e),_0x402c17=new r({'author':_0x272cd1,'type':'isAdded'==_0x4d8826||'isAddSuggestion'==_0x4d8826?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4d8826||'isRemoveSuggestion'==_0x4d8826},'createdAt':new Date(),'rootName':_0x5d74ad});_0x5ae669['push'](_0x402c17),_0x2325ff['markers']['set']('revision:'+_0x402c17['id'],_0x1dda9b);}function _0x349cfe(_0x4ea160,_0x5d1d04){const _0x7ae8f0=_0x4ea160['getAttributes'](),_0x57f32e=_0x5d1d04['getAttributes']();for(const _0xa1870e of _0x7ae8f0){if(_0xa1870e[0x1]!==_0x5d1d04['getAttribute'](_0xa1870e[0x0]))return!0x1;_0x57f32e['next']();}return _0x57f32e['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x301a15=>{const _0x2628bd=_0x301a15['markerName']['split'](':')[0x1],_0x3e9f0c=this['_getChangeFromId'](_0x2628bd);if(!_0x3e9f0c)return null;const _0x236e24='add'==_0x3e9f0c['type']?'insertion':'deletion',_0xa0d412=['ck-suggestion-marker','ck-suggestion-marker-'+_0x236e24];return _0x3e9f0c['data']['isSuggestion']&&_0xa0d412['push']('ck-suggestion-marker-'+_0x236e24+'-new'),this['activeChange']==_0x3e9f0c&&_0xa0d412['push']('ck-suggestion-marker--active'),{'classes':_0xa0d412,'attributes':{'data-change-id':_0x2628bd}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x69b9d7=>{_0x69b9d7['on']('element:pre',(_0x419ab0,_0x5c25f9,_0x3ca030)=>{const _0xa4c60c=_0x5c25f9['viewItem']['getChild'](0x0);if(!_0xa4c60c||!_0xa4c60c['is']('element','code'))return;if(!_0x3ca030['consumable']['consume'](_0xa4c60c,{'attributes':['vid_start','vid_end']}))return;const _0x216708=_0x5c25f9['modelRange']['start']['nodeAfter'];_0x3ca030['writer']['setAttribute']('vid_start',_0xa4c60c['getAttribute']('vid_start'),_0x216708),_0x3ca030['writer']['setAttribute']('vid_end',_0xa4c60c['getAttribute']('vid_end'),_0x216708);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x19742d=>{_0x19742d['on']('element',(_0x10a24e,_0x3262ef,_0x157949)=>{if(!_0x157949['consumable']['consume'](_0x3262ef['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3262ef['modelRange']['isCollapsed'])return;const _0x1cb04c=_0x3262ef['modelRange']['start']['nodeAfter'];_0x1cb04c['hasAttribute']('vid_start')||_0x1cb04c['hasAttribute']('vid')||(_0x157949['writer']['setAttribute']('vid_start',_0x3262ef['viewItem']['getAttribute']('vid_start'),_0x1cb04c),_0x157949['writer']['setAttribute']('vid_end',_0x3262ef['viewItem']['getAttribute']('vid_end'),_0x1cb04c));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xf2dfb5=>_0xf2dfb5['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x415c3f,[,_0x50289])=>{['vid_start','vid_end','vid']['includes'](_0x50289)&&(_0x415c3f['return']=!0x0,_0x415c3f['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x13bdea=>{_0x13bdea['on']('attribute:vid',(_0x50c0df,_0x359959,_0x1a39d5)=>{if('\x20'!=_0x359959['item']['data']||_0x359959['item']['parent']['maxOffset']>0x1)return;if(!_0x1a39d5['consumable']['consume'](_0x359959['item'],_0x50c0df['name']))return;const _0x208a0f=_0x1a39d5['writer'],_0x3cc5eb=_0x1a39d5['mapper']['toViewRange'](_0x359959['range']);_0x208a0f['wrap'](_0x3cc5eb,_0x208a0f['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x192d6c){const _0x3c2d37=_0x192d6c['plugins']['get']('RevisionViewer');return(_0x417d84,_0x53c641,_0x16be74)=>{const _0x36ffe6=_0x53c641['markerName']['split'](':')[0x1],_0x34c5c1=_0x3c2d37['_getChangeFromId'](_0x36ffe6);if(!_0x34c5c1)return null;const _0x1f79ac='add'==_0x34c5c1['type']?'split':'merge';if(!_0x16be74['consumable']['test'](_0x53c641['markerRange'],_0x417d84['name']))return;const _0x51075a=_0x53c641['markerRange']['getWalker'](),_0x28c71f=_0x53c641['markerRange']['start'],_0x12b406=_0x192d6c['model']['schema'];let _0x3a1e2a=null,_0x4c15be=null,_0x395b10=!0x1,_0x524275=!0x1;for(const _0x38979a of _0x51075a){const _0x260d56=_0x38979a['item'];_0x395b10=_0x395b10||_0x12b406['isContent'](_0x260d56);const _0x233035=_0x16be74['mapper']['toViewElement'](_0x260d56);if(_0x233035&&_0x233035['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x38979a['type']&&(_0x12b406['isBlock'](_0x260d56)&&!_0x12b406['isLimit'](_0x260d56)&&(_0x260d56['nextSibling']||_0x28c71f['isAtEnd']?_0x3a1e2a&&_0x3a1e2a['parent']==_0x260d56||(_0x3a1e2a=_0x260d56,_0x5d95bb(_0x38979a['previousPosition']),_0x524275=!0x0):_0x4c15be=_0x4c15be||_0x38979a['previousPosition']));}function _0x5d95bb(_0x34cd6e){const _0x1fd4da=_0x16be74['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1f79ac}),_0x2e2057=_0x16be74['mapper']['toViewPosition'](_0x34cd6e);_0x34c5c1['data']['isSuggestion']&&_0x16be74['writer']['addClass']('ck-suggestion-marker-'+_0x1f79ac+'-new',_0x1fd4da),_0x3c2d37['activeChange']==_0x34c5c1&&_0x16be74['writer']['addClass']('ck-suggestion-marker--active',_0x1fd4da),_0x16be74['writer']['insert'](_0x2e2057,_0x1fd4da),_0x16be74['mapper']['bindElementToMarker'](_0x1fd4da,_0x53c641['markerName']);}_0x395b10||_0x524275||!_0x4c15be||_0x5d95bb(_0x4c15be);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x25901b,_0x463ac9,_0xb342fc)=>{const _0x213721=_0xb342fc['mapper']['markerNameToElements'](_0x463ac9['markerName']);if(_0x213721){for(const _0x287ae4 of _0x213721)(_0x287ae4['hasClass']('ck-suggestion-marker-split')||_0x287ae4['hasClass']('ck-suggestion-marker-merge'))&&(_0xb342fc['mapper']['unbindElementFromMarkerName'](_0x287ae4,_0x463ac9['markerName']),_0xb342fc['writer']['remove'](_0x287ae4));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3ea244,_0x371d27,_0x144aaa)=>{const _0x55daa4=_0x371d27['markerName']['split'](':')[0x1],_0x6ac274=this['_getChangeFromId'](_0x55daa4);if(!_0x6ac274)return null;const _0x101922='add'==_0x6ac274['type']?'split':'merge';if(_0x144aaa['consumable']['test'](_0x371d27['markerRange'],_0x3ea244['name']))for(const _0x5050e8 of _0x371d27['markerRange']['getItems']()){if(!_0x5050e8['is']('element','softBreak'))continue;const _0x3a8e29=_0x144aaa['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x101922}),_0x19e1b8=_0x144aaa['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5050e8));_0x6ac274['data']['isSuggestion']&&_0x144aaa['writer']['addClass']('ck-suggestion-marker-'+_0x101922+'-new',_0x3a8e29),this['activeChange']==_0x6ac274&&_0x144aaa['writer']['addClass']('ck-suggestion-marker--active',_0x3a8e29),_0x144aaa['writer']['insert'](_0x19e1b8,_0x3a8e29),_0x144aaa['mapper']['bindElementToMarker'](_0x3a8e29,_0x371d27['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4d4055=>{for(const _0x44b7d6 of this['editor']['model']['document']['getRootNames']()){const _0x56b45b=this['editor']['model']['document']['getRoot'](_0x44b7d6),_0x4fecb8=this['editor']['editing']['view']['document']['getRoot'](_0x44b7d6);if(_0x4fecb8){const _0x353bb4=_0x56b45b['getAttribute']('revisionHistoryAttachChange');if(_0x4d4055['removeAttribute']('data-change-id',_0x4fecb8),_0x4d4055['removeClass']('ck-revision-history-root-add',_0x4fecb8),_0x4d4055['removeClass']('ck-revision-history-root-remove',_0x4fecb8),_0x4d4055['removeClass']('ck-revision-history-root--active',_0x4fecb8),_0x353bb4){const _0x5e0e61=this['_getChangeFromId'](_0x353bb4);if(!_0x5e0e61)return null;_0x4d4055['setAttribute']('data-change-id',_0x353bb4,_0x4fecb8),_0x4d4055['addClass']('ck-revision-history-root-'+_0x5e0e61['type'],_0x4fecb8),this['activeChange']==_0x5e0e61&&_0x4d4055['addClass']('ck-revision-history-root--active',_0x4fecb8);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4bce34=>'revision-comment:'+_0x4bce34,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x9e8618=>'revision-suggestion:'+_0x9e8618,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x186524=>({'name':'suggestion:'+_0x186524,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x102d5a=>{const _0x4de864=_0x102d5a['markerName']['split'](':')[0x1];return'insertion'!=_0x4de864&&'deletion'!=_0x4de864?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4de864]};}}),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',(_0x2e8900,_0x586bd6,_0x31fb19)=>{const _0x496796=_0x31fb19['mapper']['markerNameToElements'](_0x586bd6['markerName']);if(_0x496796){for(const _0xb550e7 of _0x496796)_0xb550e7['is']('uiElement')&&(_0x31fb19['mapper']['unbindElementFromMarkerName'](_0xb550e7,_0x586bd6['markerName']),_0x31fb19['writer']['remove'](_0xb550e7));}},{'priority':'high'});}['_getChangeFromId'](_0x28acca){return this['_changeIdToChange']['get'](_0x28acca);}['_getViewForChange'](_0xfbed57){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0xfbed57),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x37bf6d,_0x1fbf2d,_0x4ab901,_0x3526c0)=>{_0x3526c0&&this['_balloon']['remove'](_0x3526c0),_0x4ab901&&(this['_balloon']['add']({'view':_0x4ab901,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x399cc1=this['editor']['editing'],_0x1e8d72=this['_getChangeFromId'](_0x4ab901['changeId']);let _0x570d12;if(_0x1e8d72['data']['isOnRoot']){const _0x598906=_0x399cc1['view']['getDomRoot'](_0x1e8d72['rootName']);_0x570d12=Array['from'](_0x598906['getClientRects']());}else{const _0xe52a5d=this['editor']['model']['markers']['get']('revision:'+_0x4ab901['changeId']);_0x570d12=Array['from'](_0x399cc1['mapper']['markerNameToElements'](_0xe52a5d['name']))['map'](_0x1585be=>_0x399cc1['view']['domConverter']['mapViewToDom'](_0x1585be))['map'](_0xa0efe6=>Array['from'](_0xa0efe6['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x570d12[0x0];return _0x570d12['find'](_0x4798a3=>_0x4798a3['top']-0x3<=this['_activeViewTarget']['y']&&_0x4798a3['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4798a3['left']-0x3<=this['_activeViewTarget']['x']&&_0x4798a3['right']+0x3>=this['_activeViewTarget']['x'])||_0x570d12[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4acae1,_0x23eb4e,_0x4f7b98,_0x1def0a)=>{this['activeView']=_0x4f7b98?this['_getViewForChange'](_0x4f7b98):null,this['editor']['model']['change'](()=>{const _0x40468c=this['editor']['editing'];_0x1def0a&&(_0x1def0a['data']['isOnRoot']?_0x40468c['view']['change'](_0x124618=>{_0x124618['removeClass']('ck-revision-history-root--active',_0x40468c['view']['document']['getRoot'](_0x1def0a['rootName']));}):_0x40468c['reconvertMarker']('revision:'+_0x1def0a['id'])),_0x4f7b98&&(_0x4f7b98['data']['isOnRoot']?_0x40468c['view']['change'](_0x2b7d39=>{_0x2b7d39['addClass']('ck-revision-history-root--active',_0x40468c['view']['document']['getRoot'](_0x4f7b98['rootName']));}):_0x40468c['reconvertMarker']('revision:'+_0x4f7b98['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5db80d,_0x1698d6)=>{if(this['activeChange'])return;const _0x1a66b0=this['_findChangeIdFromDomTarget'](_0x1698d6['target']),_0x25816b=this['_changeIdToChange']['get'](_0x1a66b0);_0x25816b?(this['_activeViewTarget']={'x':_0x1698d6['domEvent']['x'],'y':_0x1698d6['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x25816b)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x5a880a,_0x553472)=>{const _0x1074fd=this['_findChangeIdFromDomTarget'](_0x553472['target']),_0x14c24d=this['_changeIdToChange']['get'](_0x1074fd);_0x14c24d?(this['_activeViewTarget']={'x':_0x553472['domEvent']['x'],'y':_0x553472['domEvent']['y']},_0x14c24d===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x14c24d):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5f4cf5){do{const _0x23e303=_0x5f4cf5['getAttribute']('data-change-id');if(_0x23e303)return _0x23e303;_0x5f4cf5=_0x5f4cf5['parent'];}while(_0x5f4cf5);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x41defa=>{for(const _0x374d73 of this['editor']['model']['markers'])_0x41defa['removeMarker'](_0x374d73);});}}function X(_0x2cea79,_0x5693aa){return(_0x44d232,_0x3ffcec,_0xe13e75)=>{if(!_0xe13e75['consumable']['test'](_0x3ffcec['markerRange'],_0x44d232['name']))return;const _0x14a3a8=_0x3ffcec['markerRange']['getWalker'](),_0x3d9007=_0x3ffcec['markerRange']['start'],_0x22cbf7=_0x2cea79['model']['schema'];let _0x135fc6=null,_0x2ab30b=null,_0x4acaf3=!0x1,_0x2a5152=!0x1;for(const _0x3829f0 of _0x14a3a8){const _0x149c66=_0x3829f0['item'];_0x4acaf3=_0x4acaf3||_0x22cbf7['isContent'](_0x149c66);const _0x10b63f=_0xe13e75['mapper']['toViewElement'](_0x149c66);if(_0x10b63f&&_0x10b63f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3829f0['type']&&(_0x22cbf7['isBlock'](_0x149c66)&&!_0x22cbf7['isLimit'](_0x149c66)&&(_0x149c66['nextSibling']||_0x3d9007['isAtEnd']?_0x135fc6&&_0x135fc6['parent']==_0x149c66||(_0x135fc6=_0x149c66,_0x47b84c(_0x3829f0['previousPosition']),_0x2a5152=!0x0):_0x2ab30b=_0x2ab30b||_0x3829f0['previousPosition']));}function _0x47b84c(_0x5595db){const _0x473b5b=_0xe13e75['mapper']['toViewPosition'](_0x5595db),_0x3c19f7=_0xe13e75['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5693aa});_0xe13e75['writer']['insert'](_0x473b5b,_0x3c19f7),_0xe13e75['mapper']['bindElementToMarker'](_0x3c19f7,_0x3ffcec['markerName']);}_0x4acaf3||_0x2a5152||!_0x2ab30b||_0x47b84c(_0x2ab30b);};}class wt extends _0x180cbd{constructor(_0x58da1f){super(_0x58da1f);const _0x1615d8=_0x58da1f['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x1615d8,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1615d8,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x57ea39=this['editor'],_0x599f97=_0x57ea39['plugins']['get'](m),_0x56642c=_0x599f97['isReady']?_0x599f97['diff']['newRevisionId']:null;_0x57ea39['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x56642c);}['refresh'](){const {isReady:_0x42d4d3,isEnabled:_0x5052b1,repository:_0x547fe4,diff:_0x239f0e}=this['editor']['plugins']['get'](m),_0x1254ad=_0x239f0e&&_0x547fe4['getLaterVisibleRevision'](_0x239f0e['newRevisionId']);this['isEnabled']=_0x42d4d3&&_0x5052b1&&Boolean(_0x1254ad);}}class pt extends _0x180cbd{['_step'];constructor(_0x2930b8,{direction:_0x376795}){super(_0x2930b8);const _0x365781=_0x2930b8['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x376795?0x1:-0x1,this['listenTo'](_0x365781,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x365781,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x365781,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x21777d=this['editor'],_0x2441b3=_0x21777d['plugins']['get'](m),{isNavigationMode:_0xbdfa40,currentChangeNumber:_0xefddc9}=_0x2441b3;let _0x20f5e0;if(_0x2441b3['activeChange']=_0xbdfa40?_0x2441b3['diff']['changes']['get'](_0xefddc9+this['_step']):_0x2441b3['diff']['changes']['first'],_0x2441b3['activeChange']['data']['isOnRoot'])_0x20f5e0=_0x21777d['editing']['view']['getDomRoot'](_0x2441b3['activeChange']['rootName']);else{const _0x5b6673=_0x21777d['model']['markers']['get']('revision:'+_0x2441b3['activeChange']['id']);_0x20f5e0=_0x91cb6f(_0x21777d['editing'],_0x5b6673);}_0x55b855({'target':_0x20f5e0,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x3c7b89,currentChangeNumber:_0x1d0c19,numberOfChanges:_0x505187,isReady:_0x30119a,isEnabled:_0x59e194}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x59e194&&_0x30119a&&_0x505187)&&(!_0x3c7b89||(0x1===this['_step']?_0x1d0c19<_0x505187-0x1:_0x1d0c19>0x0));}}class _i extends _0x3c4eb7{constructor(_0x188f9a){super(_0x188f9a);const _0x18db88=this['bindTemplate'],_0x1a5fb9=new _0x2e6643(_0x188f9a),_0xe639b9=new _0x2e6643(_0x188f9a);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',(_0x28868a,_0x4d3b84)=>_0x28868a&&_0x4d3b84>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x24e4f5,_0x3a4561,_0x1a767b,_0x1f9540)=>{if(!_0x24e4f5)return g(_0x188f9a,'Loading...');if(!_0x1a767b)return g(_0x188f9a,'No\x20changes');const _0x32130d=g(_0x188f9a,'NUMBER_OF_CHANGES',_0x1a767b);return _0x1f9540?g(_0x188f9a,'X_OF_Y_CHANGES',[_0x3a4561+0x1,_0x1a767b]):_0x32130d;}),_0x1a5fb9['set']({'label':g(_0x188f9a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3f13b7}),_0xe639b9['set']({'label':g(_0x188f9a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5ad88d}),_0x1a5fb9['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0xe639b9['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1a5fb9['on']('execute',()=>this['fire']('execute','backward')),_0xe639b9['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',_0x18db88['if']('_isStatusLabelVisible','ck-hidden',_0x1d1e3f=>!_0x1d1e3f)]},'children':[{'text':_0x18db88['to']('isNavigationMode',_0x5e5e1e=>_0x5e5e1e?g(_0x188f9a,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x188f9a,'Total')+':\x20')}]},{'text':_0x18db88['to']('_statusText')}]},new _0x31076d(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1a5fb9,_0xe639b9]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x4489ae{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x26acd9=this['editor']['editing']['view'];_0x26acd9['change'](_0x447b16=>{for(const _0x17f853 of _0x26acd9['document']['roots'])_0x447b16['addClass'](ce,_0x17f853);});}['hide'](){const _0x2ebf26=this['editor']['editing']['view'];_0x2ebf26['change'](_0x178865=>{for(const _0x96a884 of _0x2ebf26['document']['roots'])_0x178865['removeClass'](ce,_0x96a884);});}}class R extends _0x4489ae{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x2c2184=this['editor'],_0x89ce=_0x2c2184['plugins']['get'](m),_0x479b19=_0x2c2184['plugins']['get'](le);_0x2c2184['ui']['componentFactory']['add']('exitToEditing',_0x33c346=>{const _0x55dbaa=new _0x2e6643(_0x33c346);return _0x55dbaa['set']({'label':g(_0x33c346,'Back\x20to\x20editing'),'icon':_0x1b0aa9,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x55dbaa,'execute',()=>{_0x2c2184['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x55dbaa;}),_0x2c2184['ui']['componentFactory']['add']('restoreRevision',_0xe522f1=>{const _0x52dbfa=new _0x2e6643(_0xe522f1);return _0x52dbfa['set']({'label':g(_0xe522f1,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x52dbfa['bind']('isEnabled')['to'](_0x2c2184['commands']['get']('restoreRevision')),this['listenTo'](_0x52dbfa,'execute',()=>_0x2c2184['execute']('restoreRevision')),_0x52dbfa;}),_0x2c2184['ui']['componentFactory']['add']('changesNavigation',_0xcf84cc=>{const _0x5f0a6e=new _i(_0xcf84cc),_0x402711=_0x2c2184['commands']['get']('showPreviousChange'),_0x17ab3c=_0x2c2184['commands']['get']('showNextChange');return _0x5f0a6e['bind']('isBackwardNavigationEnabled')['to'](_0x402711,'isEnabled'),_0x5f0a6e['bind']('isForwardNavigationEnabled')['to'](_0x17ab3c,'isEnabled'),_0x5f0a6e['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x89ce),this['listenTo'](_0x5f0a6e,'execute',(_0xba9f2e,_0x3342ad)=>{_0x2c2184['execute']('forward'===_0x3342ad?'showNextChange':'showPreviousChange');}),_0x5f0a6e;}),_0x479b19['show'](),_0x89ce['on']('change:isReady',(_0x133492,_0x110761,_0x5d85dd)=>{_0x5d85dd?_0x479b19['hide']():_0x479b19['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x1b5cce,_0xd3b92d){super(_0x1b5cce,_0xd3b92d);const _0x494038=this['bindTemplate'];this['set']({'label':g(_0x1b5cce,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x1b5cce,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x494038['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 _0x1a67e6=this['fieldView']['element'];this['_tooltipString']=_0x1a67e6['scrollWidth']>_0x1a67e6['clientWidth']&&_0x1a67e6['value']||'';}}class oi extends _0x3c4eb7{constructor(_0x4acb3b,_0x42e297,_0x8dd978){super(_0x4acb3b);const _0x1a5257=new _0x3266ad();_0x1a5257['set']({'content':_0x636f70,'viewBox':'0\x200\x2011\x2010'});const _0x3cff55=['ck','ck-revision-history-sidebar__revision-author'];_0x8dd978&&_0x3cff55['push']('ck-revision-history-sidebar__revision-author_creator');const _0x22d4d3=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x4acb3b,_0x8dd978?'Revision\x20creator':'Revision\x20author')},'children':[_0x1a5257,_0x42e297['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x3cff55},'children':_0x22d4d3});}}function ni(_0x49828a,_0x28cfd5){const _0x419f9e=_0x49828a['bindTemplate'],_0x483c9b=_0x49828a['locale'],_0x1a55c9=_0x387160(_0x483c9b);_0x1a55c9['panelPosition']='sw';const _0x587ffe=function(_0x18c03a,_0x3967f){const _0x32156f=function(_0x1ef66e,_0x59d44f){const _0xcbdbeb=_0x1ef66e['locale'],_0x4d15a5={'Compare\x20against\x20selected':g(_0xcbdbeb,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0xcbdbeb,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0xcbdbeb,'Restore\x20this\x20revision')};return _0x59d44f['map'](_0x5ce1cb=>{const _0x1f2d90=_0x4d15a5[_0x5ce1cb['name']];return _0x1f2d90&&_0x1f2d90!==_0x5ce1cb['name']&&(_0x5ce1cb['name']=_0x1f2d90),_0x5ce1cb;});}(_0x18c03a,_0x3967f),_0x12e4b7=new _0x1301ad();for(const _0x11f561 of _0x32156f){const _0x116d0e={'type':'button','model':new to({'label':_0x11f561['name'],'class':_0x11f561['class'],'withText':!0x0,'role':'menuitem','_action':_0x11f561['action']})};_0x116d0e['model']['bind']('isEnabled')['to'](_0x18c03a,'isActionsDropdownOpen',_0x52393a=>'function'!=typeof _0x11f561['isEnabled']||(!_0x52393a||_0x11f561['isEnabled'](_0x18c03a))),_0x12e4b7['add'](_0x116d0e);}return _0x12e4b7;}(_0x49828a,_0x28cfd5);return _0x49828a['bind']('isActionsDropdownOpen')['to'](_0x1a55c9,'isOpen'),_0x1a55c9['buttonView']['set']({'label':g(_0x483c9b,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x47c6f0}),_0x1a55c9['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x419f9e['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x419f9e['to'](_0x4a0268=>_0x4a0268['stopPropagation']())}}),_0x1a55c9['on']('execute',_0x5ce068=>{_0x49828a['isReady']&&'function'==typeof _0x5ce068['source']['_action']&&_0x5ce068['source']['_action'](_0x49828a);}),_0x12319e(_0x1a55c9,_0x587ffe,{'role':'menu'}),_0x1a55c9['listenTo'](_0x49828a,'change:isActionsDropdownOpen',(_0x2bfba1,_0x9cece4,_0x2179de)=>{if(_0x2179de)for(const _0x421e3e of _0x1a55c9['listView']['items']){const _0x38527e=_0x421e3e['children']['first'],_0x2432b1=_0x28cfd5['find'](_0x35ecd8=>_0x35ecd8['action']===_0x38527e['_action'])['isVisible'];_0x421e3e['isVisible']=void 0x0===_0x2432b1||_0x2432b1(_0x49828a);}}),_0x1a55c9;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x180a86(_0x3c4eb7){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x191b33,_0xf349c8,_0xc414e,_0x168a90){super(_0x191b33);const _0x404df5=this['bindTemplate'],_0xa3b725=function(_0x5bfd20,_0x1b9a9b){const _0x505ab2=Array['from'](_0x1b9a9b['authors'])['filter'](_0x82a1d0=>_0x82a1d0!=_0x1b9a9b['creator']);return _0x1b9a9b['creator']&&_0x505ab2['unshift'](_0x1b9a9b['creator']),_0x505ab2['map'](_0x2c0ba5=>new oi(_0x5bfd20,_0x2c0ba5,_0x2c0ba5==_0x1b9a9b['creator']));}(_0x191b33,_0xf349c8);this['id']=_0xf349c8['id'],this['_revision']=_0xf349c8,this['_requireRevisionName']=_0x168a90,this['bind']('name','createdAt')['to'](_0xf349c8),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x5662f2=>{return _0x52e352=_0x191b33['uiLanguage'],(_0x172ee6=_0x5662f2)['toLocaleDateString'](_0x52e352,{'month':'long','day':'numeric'})+',\x20'+_0x172ee6['toLocaleTimeString'](_0x52e352,{'hour':'numeric','minute':'numeric'});var _0x52e352,_0x172ee6;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new lt(_0x191b33,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x26c073=>_0x26c073||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x38f594,_0x3b9a31)=>_0x38f594&&_0x3b9a31),this['revisionActionsView']=_0xc414e&&_0xc414e['length']?ni(this,_0xc414e):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x404df5['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x404df5['if']('isEnabled','ck-disabled',_0x3df9ed=>!_0x3df9ed),_0x404df5['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x404df5['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x404df5['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':_0x404df5['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':_0xa3b725}]},this['revisionActionsView']],'on':{'click':_0x404df5['to'](_0x7af1d1=>{_0x7af1d1['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x3aa462=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x3aa462,'change',()=>{this['_requireRevisionName']&&!_0x3aa462['value']||this['fire']('setName',{'id':this['id'],'name':_0x3aa462['value']}),_0x3aa462['value']||(_0x3aa462['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(_0x326464,_0x534c31){const _0x56f5ac=_0x2f423f['fromJSDate'](_0x326464)['setLocale'](_0x534c31),_0x590328=_0x2f423f['local'](),_0x2aae4a=_0x590328['minus']({'days':0x1})['startOf']('day');let _0x119b5c,_0x4b0c1a;return _0x56f5ac['hasSame'](_0x590328,'day')?(_0x119b5c=_0x56f5ac['startOf']('day')['toJSDate'](),_0x4b0c1a=_0x56f5ac['toRelativeCalendar']()):_0x56f5ac['hasSame'](_0x2aae4a,'day')?(_0x119b5c=_0x2aae4a['toJSDate'](),_0x4b0c1a=_0x56f5ac['toRelativeCalendar']()):_0x56f5ac['hasSame'](_0x590328,'week')?(_0x119b5c=_0x56f5ac['startOf']('week')['toJSDate'](),_0x4b0c1a=_0x56f5ac['weekdayLong']||''):_0x56f5ac['hasSame'](_0x590328,'year')?(_0x119b5c=_0x56f5ac['startOf']('month')['toJSDate'](),_0x4b0c1a=_0x56f5ac['monthLong']||''):(_0x119b5c=_0x56f5ac['startOf']('year')['toJSDate'](),_0x4b0c1a=String(_0x56f5ac['year'])),{'startDate':_0x119b5c,'localizedPeriodName':_0x4b0c1a};}class mi extends _0x3c4eb7{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x14e63f,_0xbe5d23,_0x27bbde,_0x23ad8b){super(_0x14e63f);const _0x359e81=vi(_0xbe5d23,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0xbe5d23,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x27bbde,this['_requireRevisionName']=_0x23ad8b,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':_0x359e81}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x346c){const _0x1a1041=new ai(this['locale'],_0x346c,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1a1041);}['removeRevision'](_0x10bb8e){const _0x514ba8=this['revisionViews']['find'](_0x176c3a=>_0x176c3a['id']===_0x10bb8e['id']);this['revisionViews']['remove'](_0x514ba8);}}class as extends _0x3c4eb7{constructor(_0x65ce33){super(_0x65ce33);const _0x1f9a48=new _0x3266ad();_0x1f9a48['content']=_0x25d66f,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1f9a48,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x65ce33,'Revision\x20history')]}]});}}class di extends _0x3c4eb7{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x28df0d,_0xced98a,_0x9b9ba5,_0x33cd68){super(_0x28df0d);const _0x5aa395=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0xced98a,this['_revisionActions']=_0x9b9ba5,this['_requireRevisionName']=_0x33cd68,this['on']('select',(_0x4f2ec6,_0x1e9cce)=>{this['fire']('revisionSelected',_0x1e9cce);}),this['on']('setName',(_0x5ada68,_0x5c537a)=>{this['fire']('revisionSetName',_0x5c537a);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x28df0d),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x5aa395['if']('isEnabled','ck-disabled',_0x26f66f=>!_0x26f66f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x186057 of this['_revisions'])this['_addRevision'](_0x186057);this['_revisions']['on']('add',(_0x5b85de,_0x20a743)=>{this['_addRevision'](_0x20a743);}),this['_revisions']['on']('remove',(_0x474a40,_0x20a450)=>{this['_removeRevision'](_0x20a450);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x52187d=>_0x52187d['revisionViews']['map'](_0x588e7c=>_0x588e7c))['flat']();}['selectRevision'](_0x57f88a){for(const _0x332b4d of this['revisionViews'])_0x57f88a&&_0x57f88a['id']===_0x332b4d['id']?_0x332b4d['select']():_0x332b4d['deselect']();}['highlightRevisions'](_0x441f3a){for(const _0x494574 of this['revisionViews'])_0x441f3a['some'](({id:_0x280ea7})=>_0x280ea7===_0x494574['id'])?_0x494574['highlight']():_0x494574['unhighlight']();}['_addRevision'](_0x1745f2){const _0x34f7d5=vi(_0x1745f2['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x13a7cc=this['timePeriodViews']['get'](0x0);_0x13a7cc&&_0x13a7cc['startDate']['getTime']()===_0x34f7d5['getTime']()||(_0x13a7cc=new mi(this['locale'],_0x34f7d5,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x13a7cc)),_0x13a7cc['addRevision'](_0x1745f2);}['_removeRevision'](_0x2ca5b5){const _0x49ada2=vi(_0x2ca5b5['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x49ada2)['removeRevision'](_0x2ca5b5);}['_getTimePeriodViewByStartDate'](_0x4750f0){return this['timePeriodViews']['find'](_0x3532fe=>_0x3532fe['startDate']['getTime']()===_0x4750f0['getTime']());}}class d extends _0x4489ae{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
|
|
29
|
-
_0x1f2948(_0xe0216){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x6c1542,_0x4eaa13){super(_0x4eaa13),this['sourceElement']=_0x6c1542,this['model']['document']['createRoot']();const _0xa78889=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0xa78889);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x7e1457,_0x5d66b2){const _0x1bc8e8=new this(_0x7e1457,_0x5d66b2);return await _0x1bc8e8['initPlugins'](),await _0x1bc8e8['ui']['init'](_0x7e1457),await _0x1bc8e8['data']['init'](_0x1bc8e8['config']['get']('initialData')||''),_0x1bc8e8['fire']('ready'),_0x1bc8e8;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class _t extends _0x3edab6{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20412a){function _0x56adc4(_0xb26ff3){return _0xb26ff3['map'](_0x248aee=>String['fromCharCode'](_0x248aee))['join']('');}super(_0x20412a),this['result']='end',_0x20412a[_0x56adc4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x56adc4([0x76,0x69,0x65,0x77])][_0x56adc4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x56adc4([0x61,0x75,0x74,0x6f]),_0x20412a[_0x56adc4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x56adc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x56adc4([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x56adc4([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x56adc4([0x6f,0x6b])});}}class k extends _0x3edab6{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x201218){if(super(_0x201218),!this['editor']['config']['get']('revisionHistory'))throw new _0x5203b4('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x13f6bd=>this['_showRevisionViewer']({..._0x13f6bd,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1fe6b9=>this['_closeRevisionViewer'](_0x1fe6b9)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x394784=>this['_restoreRevision'](_0x394784)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4aab25){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4aab25;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x16d990){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x16d990);}['getRevision'](_0x5889b3){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5889b3);}['getRevisions'](_0x3e1ab4){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3e1ab4||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x3cf8cc=this['editor'],_0x2f571a=_0x16e123(_0x3cf8cc,p),_0x237aa2=_0x3cf8cc['plugins']['get']('RevisionTracker'),_0x4b4ad3=_0x3cf8cc['plugins']['get']('Users')['users'];return _0x2f571a['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2f571a['lazyRoots'],(_0x2f571a['plugins']['push'](_t,m,R,class extends _0x3edab6{static get['requires'](){return[m,'Users'];}['init'](){const _0x482fb6=this['editor']['plugins']['get']('Users');for(const _0x5696e0 of _0x4b4ad3)_0x5696e0['isAnonymous']||_0x482fb6['getUser'](_0x5696e0['id'])||_0x482fb6['addUser'](_0x5696e0);const _0x5e5af1=_0x237aa2['repository']['getRevisions']();let _0x5b6246=null;const _0x35e0b7=this['editor']['plugins']['get']('RevisionViewer');_0x35e0b7['adapter']=_0x237aa2['adapter'],_0x35e0b7['bind']('isEnabled')['to'](_0x237aa2),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x3cf8cc,'isReadOnly',_0x39025a=>!_0x39025a);for(const _0x197b44 of _0x5e5af1){const _0x309c51=null===_0x197b44['creator'];if(_0x309c51&&_0x197b44['toVersion']===_0x197b44['fromVersion'])continue;const _0x3e275f=_0x197b44['toJSON']();_0x35e0b7['addRevisionData'](_0x3e275f,(_0x48d7bb,_0x3e87a1,_0x45207e)=>{if(_0x309c51){if(_0x5b6246)_0x5b6246['_update'](_0x48d7bb,_0x3e87a1);else{if(!_0x3e87a1){const _0x4448d7=_0x45207e['toJSON']();_0x4448d7['id']=_0x3f13b1(),_0x237aa2['saveRevision'](_0x4448d7,_0x45207e['toVersion'])['then'](_0x2a8860=>{_0x5b6246=_0x2a8860;});}}}else _0x197b44['_update'](_0x48d7bb,_0x3e87a1);});}}},d),_0x2f571a);}['_enhanceShowRevisionViewerCallback'](){const _0x4c9ae=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1572b1=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x4c4c5c=this['editor']['plugins']['get']('Autosave');await _0x4c4c5c['save']();}else await _0x1572b1['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5baf8e=this['editor']['plugins']['get']('Dialog');_0x5baf8e['isOpen']&&_0x5baf8e['hide']();}const _0x4aa50b=this['_getRevisionViewerEditorConfig']();return _0x4c9ae(_0x4aa50b)['then'](_0x3c882e=>{return(this['_viewerEditor']=_0x3c882e,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'),_0x3c882e);})['catch'](_0x97ee1f=>(console['error'](_0x97ee1f),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x312bd9=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'](),_0x312bd9(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x53b8ef=this['editor']['plugins']['get']('Annotations');_0x53b8ef['refreshVisibility'](),_0x53b8ef['refreshPositioning']();}})));}['_showRevisionViewer'](_0x2d406c){const _0x251054=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x355e0c=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2e5016=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x2e5016,_0x2d406c)['then'](_0x554394=>(_0x355e0c['style']['display']='block',_0x251054['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x554394));}['_closeRevisionViewer'](_0x3d870f){const _0x3c4314=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3c4314['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3d870f['destroy']();}async['_restoreRevision'](_0x5037a5){const _0x10ef55=this['editor'],_0x256ebf=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x175be1=_0x10ef55['plugins']['get']('RevisionTracker'),_0x2ac194=_0x10ef55['plugins']['get']('RevisionHistoryUtils'),_0xc5ae55=_0x256ebf['repository']['getRevision'](_0x5037a5);let _0x1d65fc,_0x75ab36,_0x4d2b86;try{await _0x2ac194['loadRevisionData'](_0xc5ae55,this['adapter']),_0x1d65fc=_0x2ac194['getRevisionDocumentData'](_0xc5ae55),_0x75ab36=_0x2ac194['getRevisionRootsAttributes'](_0xc5ae55);}catch(_0x32e682){return void console['error'](_0x32e682);}_0x10ef55['model']['change'](_0x2ff3c0=>{for(const _0x2caf7a of Array['from'](_0x10ef55['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2ff3c0['removeMarker'](_0x2caf7a);}),_0x256ebf['isReady']=!0x1,_0x10ef55['model']['enqueueChange'](_0x45f552=>{_0x45f552['setSelection'](null),_0x45f552['removeSelectionAttribute'](_0x10ef55['model']['document']['selection']['getAttributeKeys']());const _0x13e25f=Object['keys'](_0x1d65fc);for(const _0x36388d of _0x10ef55['model']['document']['roots'])'$graveyard'!=_0x36388d['rootName']&&_0x36388d['isAttached']()&&!_0x13e25f['includes'](_0x36388d['rootName'])&&_0x45f552['detachRoot'](_0x36388d);for(const _0x5fbbab of _0x13e25f){let _0x4306c0=_0x10ef55['model']['document']['getRoot'](_0x5fbbab);_0x4306c0&&_0x4306c0['isAttached']()||(_0x4306c0=_0x45f552['addRoot'](_0x5fbbab));const _0x276aff=_0x75ab36[_0x5fbbab],_0x404d68=Object['keys'](_0x276aff),_0x4cd78e=_0x1d65fc[_0x5fbbab];for(const _0x37e2b of _0x4306c0['getAttributeKeys']())_0x404d68['includes'](_0x37e2b)||_0x45f552['removeAttribute'](_0x37e2b,_0x4306c0);for(const _0x3cca6d of _0x404d68)_0x45f552['setAttribute'](_0x3cca6d,_0x75ab36[_0x5fbbab][_0x3cca6d],_0x4306c0);_0x45f552['remove'](_0x45f552['createRangeIn'](_0x4306c0)),_0x45f552['insert'](_0x10ef55['data']['parse'](_0x4cd78e,_0x4306c0),_0x4306c0,0x0);}});const _0x207535=g(_0x10ef55['locale'],'Restored');if(_0xc5ae55['name'])_0x4d2b86=-0x1==_0xc5ae55['name']['indexOf'](_0x207535)?_0x207535+':\x20'+_0xc5ae55['name']:_0xc5ae55['name'];else _0x4d2b86=_0x207535+':\x20'+(_0xc5ae55['createdAt']['toLocaleDateString'](_0x10ef55['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xc5ae55['createdAt']['toLocaleTimeString'](_0x10ef55['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x175be1['saveRevision']({'name':_0x4d2b86}),_0x256ebf['isReady']=!0x0,_0x10ef55['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,de 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(_0xc7319d){super(_0xc7319d),this['_revisionViewer']=_0xc7319d['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1ffffa=this['_revisionsRepository']['_revisions'],_0x29b226=this['_createRevisionActions'](),_0xf4665d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x1ffffa,_0x29b226,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',(_0x4c47bc,_0x274084)=>{_0x274084['revisionViews']['on']('add',(_0x161360,_0x2173a1)=>{_0x2173a1['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)),_0xf4665d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x2e8e78=this['_revisionsRepository']['getRevision'](0x0);if(_0x2e8e78){const _0xab8b22=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2e8e78['id']);this['_revisionViewer']['compare'](_0x2e8e78,_0xab8b22);}}['_handleRevisionSelected'](_0x46fa93,_0x421cf0){const _0x3aa4b4=this['_revisionsRepository']['getRevision'](_0x421cf0['id']),_0x3323ad=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3aa4b4['id']);this['_revisionViewer']['compare'](_0x3aa4b4,_0x3323ad);}['_handleRevisionSetName'](_0x16cbed,_0x302f70){this['_revisionsRepository']['getRevision'](_0x302f70['id'])['setName'](_0x302f70['name']);}['_handleDiffChange'](_0x483174,_0x2c7a25,_0x4d1ef6){const _0x2ec472=this['_revisionsRepository']['getRevisionsInDiff'](_0x4d1ef6);_0x2ec472['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x2ec472),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x2ec472[0x0]));}['_createRevisionActions'](){const _0x20410a=this['editor'],_0x299fdd=d['availableRevisionActions'],_0x59ba7b=_0x20410a['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x59ba7b['length'])return _0x59ba7b['map'](_0x4893da=>{const _0x26b910='string'==typeof _0x4893da?Object['assign']({},_0x299fdd[_0x4893da]):_0x4893da;return _0x26b910['action']=_0x26b910['action']['bind'](this,_0x20410a),_0x26b910['isVisible']&&(_0x26b910['isVisible']=_0x26b910['isVisible']['bind'](this,_0x20410a)),_0x26b910;});}}function _t(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x12e6b3},_0x2c07a3)=>{const _0x31af5b=_0x12e6b3['get'](m),_0x1eb9bf=_0x31af5b['repository'];let _0x16347a=_0x31af5b['diff']['newRevisionId'],_0x2dea38=_0x2c07a3['id'];_0x1eb9bf['getIndex'](_0x16347a)>_0x1eb9bf['getIndex'](_0x2dea38)&&([_0x16347a,_0x2dea38]=[_0x2dea38,_0x16347a]),_0x31af5b['compare'](_0x16347a,_0x2dea38);},'isVisible':({plugins:_0xd52178},_0x45aa15)=>{const _0x398314=_0xd52178['get'](m);return!(_0x398314['repository']['getRevisionsInDiff'](_0x398314['diff'])['length']>0x2)&&!_0x45aa15['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x451da4,{id:_0x10a62f})=>{_0x451da4['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x10a62f);},'isVisible':({plugins:_0xe95e54},_0x2885d5)=>!!_0xe95e54['get'](m)['repository']['getLaterVisibleRevision'](_0x2885d5['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3ad43c},{id:_0x135906,revisionNameView:_0x1205af})=>{const _0x1d9a39=_0x3ad43c['get'](m),_0x1e7847=_0x1d9a39['repository']['getEarlierVisibleRevision'](_0x135906);_0x1d9a39['compare'](_0x135906,_0x1e7847),_0x1205af['focus'](),_0x1205af['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x3f8022,_0x3af00e){super(_0x3f8022),this['_view']=_0x3af00e,this['_toolbarConfig']=et(_0x3f8022['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x4f6465){const _0x3050de=this['editor'],_0x517d5a=this['view'],_0x19d76b=_0x3050de['editing']['view'],_0x18bfc1=_0x517d5a['editable'],_0x25113d=_0x19d76b['document']['getRoot']();_0x18bfc1['name']=_0x25113d['rootName'],_0x517d5a['render']();const _0x254654=_0x18bfc1['element'];this['setEditableElement'](_0x18bfc1['name'],_0x254654),_0x517d5a['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x19d76b['attachDomRoot'](_0x254654),this['_elementReplacer']['replace'](_0x4f6465,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0xe8d1e8=this['view'],_0x134c4e=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x134c4e['detachDomRoot'](_0xe8d1e8['editable']['name']),_0xe8d1e8['destroy']();}['_initToolbar'](){const _0x4bb621=this['view'];_0x4bb621['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4bb621['stickyPanel']['limiterElement']=_0x4bb621['element'],_0x4bb621['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x362732})=>_0x362732),_0x4bb621['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4bb621['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x434abd,_0x1e3987,_0x3e95a4={}){super(_0x434abd),this['stickyPanel']=new ht(_0x434abd),this['toolbar']=new dt(_0x434abd,{'shouldGroupWhenFull':_0x3e95a4['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x434abd,_0x1e3987);}['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
|
+
_0x3249be(_0x2b34f8){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x340a46,_0xed8f81){super(_0xed8f81),this['sourceElement']=_0x340a46,this['model']['document']['createRoot']();const _0x52305b=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x52305b);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x27a44f,_0x367b5a){const _0x1c1786=new this(_0x27a44f,_0x367b5a);return await _0x1c1786['initPlugins'](),await _0x1c1786['ui']['init'](_0x27a44f),await _0x1c1786['data']['init'](_0x1c1786['config']['get']('initialData')||''),_0x1c1786['fire']('ready'),_0x1c1786;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x4489ae{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf7d861){function _0x5202dc(_0x509719){return _0x509719['map'](_0x4251df=>String['fromCharCode'](_0x4251df))['join']('');}super(_0xf7d861),this['result']='end',_0xf7d861[_0x5202dc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5202dc([0x76,0x69,0x65,0x77])][_0x5202dc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5202dc([0x61,0x75,0x74,0x6f]),_0xf7d861[_0x5202dc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5202dc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5202dc([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5202dc([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5202dc([0x6f,0x6b])});}}class k extends _0x4489ae{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x2365f2){if(super(_0x2365f2),!this['editor']['config']['get']('revisionHistory'))throw new _0x51ece8('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4cf1c5=>this['_showRevisionViewer']({..._0x4cf1c5,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x43d649=>this['_closeRevisionViewer'](_0x43d649)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4578d3=>this['_restoreRevision'](_0x4578d3)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x26357f){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x26357f;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x243938){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x243938);}['getRevision'](_0x1f4e28){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1f4e28);}['getRevisions'](_0x40dd3f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x40dd3f||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4d98a6=this['editor'],_0x341d1d=_0x4493fa(_0x4d98a6,p),_0x26d16c=_0x4d98a6['plugins']['get']('RevisionTracker'),_0x2742c0=_0x4d98a6['plugins']['get']('Users')['users'];return _0x341d1d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x341d1d['lazyRoots'],(_0x341d1d['plugins']['push'](yt,m,R,class extends _0x4489ae{static get['requires'](){return[m,'Users'];}['init'](){const _0x848a31=this['editor']['plugins']['get']('Users');for(const _0x285cfe of _0x2742c0)_0x285cfe['isAnonymous']||_0x848a31['getUser'](_0x285cfe['id'])||_0x848a31['addUser'](_0x285cfe);const _0x2a070b=_0x26d16c['repository']['getRevisions']();let _0x5a676a=null;const _0x50fd0b=this['editor']['plugins']['get']('RevisionViewer');_0x50fd0b['adapter']=_0x26d16c['adapter'],_0x50fd0b['bind']('isEnabled')['to'](_0x26d16c),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4d98a6,'isReadOnly',_0x30fa7b=>!_0x30fa7b);for(const _0x5497e3 of _0x2a070b){const _0x3030d7=null===_0x5497e3['creator'];if(_0x3030d7&&_0x5497e3['toVersion']===_0x5497e3['fromVersion'])continue;const _0x47efb4=_0x5497e3['toJSON']();_0x50fd0b['addRevisionData'](_0x47efb4,(_0x55852d,_0x48a4ad,_0xd6e5ac)=>{if(_0x3030d7){if(_0x5a676a)_0x5a676a['_update'](_0x55852d,_0x48a4ad);else{if(!_0x48a4ad){const _0x1b912f=_0xd6e5ac['toJSON']();_0x1b912f['id']=_0x402ab0(),_0x26d16c['saveRevision'](_0x1b912f,_0xd6e5ac['toVersion'])['then'](_0x1fa2c4=>{_0x5a676a=_0x1fa2c4;});}}}else _0x5497e3['_update'](_0x55852d,_0x48a4ad);});}}},d),_0x341d1d);}['_enhanceShowRevisionViewerCallback'](){const _0x463c01=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xdb3636=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x12db06=this['editor']['plugins']['get']('Autosave');await _0x12db06['save']();}else await _0xdb3636['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x216793=this['editor']['plugins']['get']('Dialog');_0x216793['isOpen']&&_0x216793['hide']();}const _0x5c3e0b=this['_getRevisionViewerEditorConfig']();return _0x463c01(_0x5c3e0b)['then'](_0x22153b=>{return(this['_viewerEditor']=_0x22153b,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'),_0x22153b);})['catch'](_0x3b4764=>(console['error'](_0x3b4764),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x25aeb7=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'](),_0x25aeb7(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3e1487=this['editor']['plugins']['get']('Annotations');_0x3e1487['refreshVisibility'](),_0x3e1487['refreshPositioning']();}})));}['_showRevisionViewer'](_0x5e65a0){const _0x43918f=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2c3a03=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5ced2a=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x5ced2a,_0x5e65a0)['then'](_0x43f567=>(_0x2c3a03['style']['display']='block',_0x43918f['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x43f567));}['_closeRevisionViewer'](_0x36bcb2){const _0x5e30a6=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5e30a6['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x36bcb2['destroy']();}async['_restoreRevision'](_0x1e2914){const _0x2f1b77=this['editor'],_0x22fe9f=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x19118a=_0x2f1b77['plugins']['get']('RevisionTracker'),_0x25f987=_0x2f1b77['plugins']['get']('RevisionHistoryUtils'),_0x28aca7=_0x22fe9f['repository']['getRevision'](_0x1e2914);let _0x11157a,_0x5ab1d7,_0x1c580a;try{await _0x25f987['loadRevisionData'](_0x28aca7,this['adapter']),_0x11157a=_0x25f987['getRevisionDocumentData'](_0x28aca7),_0x5ab1d7=_0x25f987['getRevisionRootsAttributes'](_0x28aca7);}catch(_0x1a684a){return void console['error'](_0x1a684a);}_0x2f1b77['model']['change'](_0xb5e803=>{for(const _0x355c3d of Array['from'](_0x2f1b77['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xb5e803['removeMarker'](_0x355c3d);}),_0x22fe9f['isReady']=!0x1,_0x2f1b77['model']['enqueueChange'](_0x2f31f1=>{_0x2f31f1['setSelection'](null),_0x2f31f1['removeSelectionAttribute'](_0x2f1b77['model']['document']['selection']['getAttributeKeys']());const _0x478d58=Object['keys'](_0x11157a);for(const _0x52dff9 of _0x2f1b77['model']['document']['roots'])'$graveyard'!=_0x52dff9['rootName']&&_0x52dff9['isAttached']()&&!_0x478d58['includes'](_0x52dff9['rootName'])&&_0x2f31f1['detachRoot'](_0x52dff9);for(const _0x432901 of _0x478d58){let _0x2d16d4=_0x2f1b77['model']['document']['getRoot'](_0x432901);_0x2d16d4&&_0x2d16d4['isAttached']()||(_0x2d16d4=_0x2f31f1['addRoot'](_0x432901));const _0x2fbc0a=_0x5ab1d7[_0x432901],_0x23bcbc=Object['keys'](_0x2fbc0a),_0x2f501f=_0x11157a[_0x432901];for(const _0x19cb3e of _0x2d16d4['getAttributeKeys']())_0x23bcbc['includes'](_0x19cb3e)||_0x2f31f1['removeAttribute'](_0x19cb3e,_0x2d16d4);for(const _0x2a3b89 of _0x23bcbc)_0x2f31f1['setAttribute'](_0x2a3b89,_0x5ab1d7[_0x432901][_0x2a3b89],_0x2d16d4);_0x2f31f1['remove'](_0x2f31f1['createRangeIn'](_0x2d16d4)),_0x2f31f1['insert'](_0x2f1b77['data']['parse'](_0x2f501f,_0x2d16d4),_0x2d16d4,0x0);}});const _0xd23f57=g(_0x2f1b77['locale'],'Restored');if(_0x28aca7['name'])_0x1c580a=-0x1==_0x28aca7['name']['indexOf'](_0xd23f57)?_0xd23f57+':\x20'+_0x28aca7['name']:_0x28aca7['name'];else _0x1c580a=_0xd23f57+':\x20'+(_0x28aca7['createdAt']['toLocaleDateString'](_0x2f1b77['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x28aca7['createdAt']['toLocaleTimeString'](_0x2f1b77['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x19118a['saveRevision']({'name':_0x1c580a}),_0x22fe9f['isReady']=!0x0,_0x2f1b77['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};
|