@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250129.1 → 0.0.0-nightly-20250130.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/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
- package/src/changeitem.js +2 -2
- package/src/editor/revisionviewereditor.js +2 -2
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.js +1 -1
- package/src/revision.js +2 -2
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.js +1 -1
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x12b2e6(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x448216){super(),this['id']=_0x448216['id']||_0x26665b(),this['creator']=_0x448216['creator']||null,this['authors']=_0x448216['authors']||[],this['diffData']=_0x448216['diffData']||null,this['toVersion']=_0x448216['toVersion']||0x0,this['fromVersion']=_0x448216['fromVersion']||0x0,this['set']('name',_0x448216['name']||''),this['set']('createdAt',_0x448216['createdAt']||new Date()),this['set']('attributes',_0x448216['attributes']||{});}['setName'](_0x312f12){this['_update']({'name':_0x312f12});}['setAttribute'](_0x3eaa8b,_0x4286bc){const _0x28f4fb=_0x8ddc1e(this['attributes']);_0xa4165b(_0x28f4fb,_0x3eaa8b,_0x4286bc),this['_update']({'attributes':_0x28f4fb});}['removeAttribute'](_0x432709){const _0x2a36dc=_0x8ddc1e(this['attributes']);_0x51522e(_0x2a36dc,_0x432709),this['_update']({'attributes':_0x2a36dc});}['_update'](_0x2759ba,_0x10a892=!0x1){let _0x25d680=!0x1;const _0x4b0024={'id':this['id']},_0x3b95a4=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x574f1a of _0x3b95a4){const _0xc34c35=_0x2759ba[_0x574f1a];void 0x0!==_0xc34c35&&_0xc34c35!==this[_0x574f1a]&&(this[_0x574f1a]=_0xc34c35,_0x4b0024[_0x574f1a]=_0xc34c35,_0x25d680=!0x0);}_0x25d680&&(_0x4b0024['authors']&&(_0x4b0024['authorsIds']=_0x4b0024['authors']['map'](_0x3996da=>_0x3996da['id']),delete _0x4b0024['authors']),this['fire']('_update',_0x4b0024,_0x10a892));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3a4f35=>_0x3a4f35['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x1dcddc{['_revisions'];static get['requires'](){return[_0x120842];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x126811){super(_0x126811),this['_revisions']=new _0x1bc718();}['afterInit'](){!async function(_0x32eeeb){const _0x525c06=_0x307734([0x53,0x4b,0x4d,0x35,0x52,0x67,0x63,0x79,0x44,0x58,0x6d,0x33,0x57,0x65,0x66,0x34,0x5a,0x68,0x69,0x36,0x71,0x61,0x70,0x30,0x38,0x31,0x6f,0x6b,0x72,0x41,0x76,0x56,0x55,0x49,0x51,0x4a,0x42,0x77,0x73,0x78,0x64,0x59,0x4e,0x43,0x48,0x6e,0x6c,0x32,0x50,0x75,0x4f,0x37,0x6a,0x4c,0x46,0x62,0x74,0x39,0x7a,0x45,0x47,0x54]),_0x52a2a8=0xeb829,_0x52fb1f=0x581dbd5,_0x159c50=0x586862d^_0x52fb1f,_0x8daeef=window[_0x307734([0x44,0x61,0x74,0x65])][_0x307734([0x6e,0x6f,0x77])](),_0x2d7daa=_0x32eeeb[_0x307734([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4231dc=new window[(_0x307734([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57a0d3=>{_0x2d7daa[_0x307734([0x6f,0x6e,0x63,0x65])](_0x307734([0x72,0x65,0x61,0x64,0x79]),_0x57a0d3);}),_0x42a7e9={[_0x307734([0x6b,0x74,0x79])]:_0x307734([0x45,0x43]),[_0x307734([0x75,0x73,0x65])]:_0x307734([0x73,0x69,0x67]),[_0x307734([0x63,0x72,0x76])]:_0x307734([0x50,0x2d,0x32,0x35,0x36]),[_0x307734([0x78])]:_0x307734([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]),[_0x307734([0x79])]:_0x307734([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]),[_0x307734([0x61,0x6c,0x67])]:_0x307734([0x45,0x53,0x32,0x35,0x36])},_0x3647b0=_0x2d7daa[_0x307734([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x307734([0x67,0x65,0x74])](_0x307734([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x45e997(){let _0x19f338,_0x2ad104=null,_0x181c37=null;try{if(_0x3647b0==_0x307734([0x47,0x50,0x4c]))return _0x307734([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x19f338=_0x18716f(),!_0x19f338)return _0x307734([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x19f338[_0x307734([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x181c37=_0x595a3e(_0x19f338[_0x307734([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x19f338[_0x307734([0x6a,0x74,0x69])])),await _0x3f6348()?_0x55e690()?_0x4c81e7()?_0x307734([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3e1cce()?(_0x19f338[_0x307734([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x307734([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2ad104=_0x3196b3(_0x307734([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x19f338[_0x307734([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x307734([0x74,0x72,0x69,0x61,0x6c])&&(_0x2ad104=_0x3196b3(_0x307734([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3af6b3()):_0x307734([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x307734([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x307734([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4071e9){return _0x307734([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4c81e7(){const _0x9873be=[_0x307734([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x307734([0x74,0x72,0x69,0x61,0x6c])][_0x307734([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x19f338[_0x307734([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x8daeef/0x3e8:0xe10*_0x159c50;return _0x19f338[_0x307734([0x65,0x78,0x70])]<_0x9873be;}function _0x55e690(){const _0x1c5ea2=_0x19f338[_0x307734([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1c5ea2)return!0x1;if(_0x1c5ea2[_0x307734([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x307734([0x2a])))return!0x0;if(_0x1c5ea2[_0x307734([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x307734([0x52,0x48])))return!0x0;if(_0x1c5ea2[_0x307734([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x307734([0x52,0x52,0x48]))){if(_0x3cf2d4())return!0x0;if(_0x158425()||_0x7c4367())return!0x0;}return!0x1;}function _0x3e1cce(){const _0xc2db1b=_0x19f338[_0x307734([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xc2db1b||0x0==_0xc2db1b[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1ec868}=new URL(window[_0x307734([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xc2db1b[_0x307734([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1ec868))return!0x0;const _0xd98926=_0x1ec868[_0x307734([0x73,0x70,0x6c,0x69,0x74])](_0x307734([0x2e]));return _0xc2db1b[_0x307734([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a8150=>_0x5a8150[_0x307734([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x307734([0x2a])))[_0x307734([0x6d,0x61,0x70])](_0x35d19d=>_0x35d19d[_0x307734([0x73,0x70,0x6c,0x69,0x74])](_0x307734([0x2e])))[_0x307734([0x73,0x6f,0x6d,0x65])](_0x5d90b0=>_0xd98926[_0x307734([0x65,0x76,0x65,0x72,0x79])]((_0x3257b1,_0x4e57f4)=>_0x5d90b0[_0x4e57f4]===_0x3257b1||_0x5d90b0[_0x4e57f4]===_0x307734([0x2a])));}function _0x3af6b3(){return _0x2ad104&&_0x181c37?new window[(_0x307734([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c162a,_0x43958e)=>{_0x2ad104[_0x307734([0x74,0x68,0x65,0x6e])](_0x5c162a,_0x43958e),_0x181c37[_0x307734([0x74,0x68,0x65,0x6e])](_0x26ef0d=>{_0x26ef0d!=_0x307734([0x56,0x61,0x6c,0x69,0x64])&&_0x5c162a(_0x26ef0d);},_0x43958e);}):_0x2ad104||_0x181c37||_0x307734([0x56,0x61,0x6c,0x69,0x64]);}}function _0x595a3e(_0x54c7ff,_0x3166d2){return new window[(_0x307734([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x70d585=>{if(_0x461a02())return _0x70d585(_0x307734([0x56,0x61,0x6c,0x69,0x64]));_0x9ded7e(),_0x2d7daa[_0x307734([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x307734([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5f4564=!0x1;const _0x4d244a=_0x26665b();function _0x27206f(_0x3c5407){return!!_0x3c5407&&(typeof _0x3c5407===_0x307734([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3c5407===_0x307734([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3c5407[_0x307734([0x74,0x68,0x65,0x6e])]===_0x307734([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3c5407[_0x307734([0x63,0x61,0x74,0x63,0x68])]===_0x307734([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x51cd97(_0xf36dd3){_0x24ec5c(_0xf36dd3)[_0x307734([0x74,0x68,0x65,0x6e])](_0x5a9a9f=>{if(!_0x5a9a9f||_0x5a9a9f[_0x307734([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x307734([0x6f,0x6b]))return _0x307734([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1eba73(_0x60aea4(_0x4d244a+_0x3166d2))!=_0x5a9a9f[_0x307734([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x307734([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x307734([0x56,0x61,0x6c,0x69,0x64]);})[_0x307734([0x74,0x68,0x65,0x6e])](_0x360a3a=>(_0xfcfbac(),_0x360a3a),()=>{const _0x509d6d=_0x1c8090();return null==_0x509d6d?(_0xfcfbac(),_0x307734([0x56,0x61,0x6c,0x69,0x64])):_0x307734(_0x8daeef-_0x509d6d>(0x218d5fd5^_0x52fb1f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x307734([0x74,0x68,0x65,0x6e])](_0x70d585)[_0x307734([0x63,0x61,0x74,0x63,0x68])](()=>{_0x70d585(_0x307734([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x30d995=0x5b73555^_0x52fb1f;function _0xfcfbac(){const _0x396290=_0x307734([0x6c,0x6c,0x63,0x74,0x2d])+_0x1eba73(_0x60aea4(_0x54c7ff)),_0x37fccb=_0xa842fb(_0x1eba73(window[_0x307734([0x4d,0x61,0x74,0x68])][_0x307734([0x63,0x65,0x69,0x6c])](_0x8daeef/_0x30d995)));window[_0x307734([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x307734([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x396290,_0x37fccb);}function _0x1c8090(){const _0x3a8887=_0x307734([0x6c,0x6c,0x63,0x74,0x2d])+_0x1eba73(_0x60aea4(_0x54c7ff)),_0x22984f=window[_0x307734([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x307734([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3a8887);return _0x22984f?window[_0x307734([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa842fb(_0x22984f),0x10)*_0x30d995:null;}function _0x24ec5c(_0x4c059c){return new window[(_0x307734([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2fbe5b,_0x4eeae7)=>{_0x4c059c[_0x307734([0x74,0x68,0x65,0x6e])](_0x2fbe5b,_0x4eeae7),window[_0x307734([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4eeae7,0x5800f15^_0x52fb1f);});}}_0x2d7daa[_0x307734([0x6f,0x6e])](_0x307734([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x24ce1d,_0x4c8baa)=>{if(_0x4c8baa[0x0]!=_0x54c7ff)return _0x70d585(_0x307734([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4c8baa[0x1]={..._0x4c8baa[0x1],[_0x307734([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4d244a};},{[_0x307734([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x307734([0x68,0x69,0x67,0x68])}),_0x2d7daa[_0x307734([0x6f,0x6e])](_0x307734([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x18d45b=>{_0x27206f(_0x18d45b[_0x307734([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5f4564=!0x0,_0x51cd97(_0x18d45b[_0x307734([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x307734([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x307734([0x6c,0x6f,0x77])}),_0x4231dc[_0x307734([0x74,0x68,0x65,0x6e])](()=>{_0x5f4564||_0x70d585(_0x307734([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x461a02(){return _0x2d7daa[_0x307734([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x307734([0x76,0x69,0x65,0x77])][_0x307734([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x307734([0x61,0x75,0x74,0x6f]);}function _0x9ded7e(){_0x2d7daa[_0x307734([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x307734([0x76,0x69,0x65,0x77])][_0x307734([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x307734([0x61,0x75,0x74,0x6f]);}}function _0x3196b3(_0xb9d922){const _0x79742a=[new window[(_0x307734([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a8546=>setTimeout(_0x3a8546,0x588e519^_0x52fb1f)),_0x4231dc[_0x307734([0x74,0x68,0x65,0x6e])](()=>new window[(_0x307734([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35ca2e=>{const _0x5706e9=0x581dbd2^_0x52fb1f,_0x499bc0=_0x32eeeb[_0x307734([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x362534(){_0x499bc0[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x5706e9&&_0x35ca2e();}_0x362534(),_0x499bc0[_0x307734([0x6f,0x6e])](_0x307734([0x61,0x64,0x64]),_0x362534);})),new window[(_0x307734([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe7aebb=>{function _0x1e4908(){for(const _0x2dd939 in window)if(window[_0x307734([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x307734([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2dd939))&&window[_0x2dd939]==_0x52a2a8)return _0xe7aebb();_0x2d7daa[_0x307734([0x73,0x74,0x61,0x74,0x65])]!=_0x307734([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x307734([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1e4908,0x581c85d^_0x52fb1f);}_0x1d3ddd(_0x307734([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1e4908();})];return window[_0x307734([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x307734([0x72,0x61,0x63,0x65])](_0x79742a)[_0x307734([0x74,0x68,0x65,0x6e])](()=>_0xb9d922);}async function _0x2bfc01(){if(await _0x4231dc,_0x1d3ddd(_0x307734([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x58c5f9=_0x32eeeb[_0x307734([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0xd89c1c=_0x32eeeb[_0x307734([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])](_0x58c5f9[_0x307734([0x69,0x64])]),_0x20dd92=_0x70cbf0(_0x307734([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x20dd92[_0x307734([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x58c5f9['id'],_0xd89c1c?_0xd89c1c['id']:null,!0x0),_0x20dd92[_0x307734([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x307734([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x20dd92[_0x307734([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x20dd92[_0x307734([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x5ced19,void(_0x20dd92[_0x307734([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x5ced19);}if(_0x1d3ddd(_0x307734([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x556876=_0x70cbf0(_0x307734([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x556876[_0x307734([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x307734([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x556876[_0x307734([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x556876[_0x307734([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x5ced19,_0x556876[_0x307734([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x5ced19;}_0x2d7daa[_0x307734([0x6d,0x6f,0x64,0x65,0x6c])][_0x307734([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5ced19,_0x2d7daa[_0x307734([0x6d,0x6f,0x64,0x65,0x6c])][_0x307734([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5ced19,_0x2d7daa[_0x307734([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x307734([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3cf2d4(){return _0x1d3ddd(_0x307734([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x70cbf0(_0x307734([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x307734([0x73,0x74,0x61,0x74,0x65])]==_0x307734([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x158425(){return _0x1d3ddd(_0x307734([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 _0x7c4367(){return _0x1d3ddd(_0x307734([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x19b1d0(_0x2f6d0e){const _0x47c161=_0x560997();_0x2d7daa[_0x47c161]=_0x307734([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])+_0x2f6d0e,_0x2f6d0e[_0x307734([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x307734([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x560997()]=_0x52a2a8),_0x2f6d0e!=_0x307734([0x56,0x61,0x6c,0x69,0x64])&&_0x2bfc01();}function _0x560997(){const _0x21fa40=window[_0x307734([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x307734([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x307734([0x6e,0x6f,0x77])]())[_0x307734([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x307734([0x2e]),'');let _0x4598ab=_0x307734([0x53]);for(let _0x145e49=0x0;_0x145e49<_0x21fa40[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x145e49+=0x2){let _0x321368=window[_0x307734([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x21fa40[_0x307734([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x145e49,_0x145e49+0x2));_0x321368>=_0x525c06[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x321368-=_0x525c06[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4598ab+=_0x525c06[_0x321368];}return _0x4598ab;}function _0x18716f(){const _0x3b06f3=_0x3647b0[_0x307734([0x73,0x70,0x6c,0x69,0x74])](_0x307734([0x2e]));if(0x3!=_0x3b06f3[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x35151e(_0x3b06f3[0x1]);function _0x35151e(_0x7928d7){const _0x1fad66=_0xe7bb0b(_0x7928d7);return _0x1fad66&&_0x4c3185()?_0x1fad66:null;function _0x4c3185(){const _0x4d58ce=_0x1fad66[_0x307734([0x6a,0x74,0x69])],_0x3a4bd4=window[_0x307734([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4d58ce[_0x307734([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4d58ce[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x15e7b7={..._0x1fad66,[_0x307734([0x6a,0x74,0x69])]:_0x4d58ce[_0x307734([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4d58ce[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x15e7b7[_0x307734([0x76,0x63])],_0x60aea4(_0x15e7b7)==_0x3a4bd4;}}}async function _0x3f6348(){let _0x5d5ef4=!0x0;try{const _0x1e9602=_0x3647b0[_0x307734([0x73,0x70,0x6c,0x69,0x74])](_0x307734([0x2e])),[_0x2cc1cf,_0x2f5227,_0x3091ef]=_0x1e9602;return _0x53d903(_0x2cc1cf),await _0x24d829(_0x2cc1cf,_0x2f5227,_0x3091ef),_0x5d5ef4;}catch(_0x513f02){return!0x1;}function _0x53d903(_0x3cb011){const _0x515d68=_0xe7bb0b(_0x3cb011);_0x515d68&&_0x515d68[_0x307734([0x61,0x6c,0x67])]==_0x307734([0x45,0x53,0x32,0x35,0x36])||(_0x5d5ef4=!0x1);}async function _0x24d829(_0x5f3b1b,_0x2ddf93,_0x5165bf){const _0x4bc835=window[_0x307734([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x307734([0x66,0x72,0x6f,0x6d])](_0x1d20a4(_0x5165bf),_0x8e3a83=>_0x8e3a83[_0x307734([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x38b59b=new window[(_0x307734([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x307734([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5f3b1b+_0x307734([0x2e])+_0x2ddf93),_0xb0664b=window[_0x307734([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x307734([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xb0664b)return;const _0x461a4d=await _0xb0664b[_0x307734([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x307734([0x6a,0x77,0x6b]),_0x42a7e9,{[_0x307734([0x6e,0x61,0x6d,0x65])]:_0x307734([0x45,0x43,0x44,0x53,0x41]),[_0x307734([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x307734([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x307734([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xb0664b[_0x307734([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x307734([0x6e,0x61,0x6d,0x65])]:_0x307734([0x45,0x43,0x44,0x53,0x41]),[_0x307734([0x68,0x61,0x73,0x68])]:{[_0x307734([0x6e,0x61,0x6d,0x65])]:_0x307734([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x461a4d,_0x4bc835,_0x38b59b)||(_0x5d5ef4=!0x1);}}function _0xe7bb0b(_0x5d750a){return _0x5d750a[_0x307734([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x307734([0x65,0x79]))?JSON[_0x307734([0x70,0x61,0x72,0x73,0x65])](_0x1d20a4(_0x5d750a)):null;}function _0x1d20a4(_0xda69e0){return window[_0x307734([0x61,0x74,0x6f,0x62])](_0xda69e0[_0x307734([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x307734([0x2b]))[_0x307734([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x307734([0x2f])));}function _0x60aea4(_0x5deef5){let _0x2747f6=0x1505;function _0x2d0f92(_0x683d09){for(let _0x2301ba=0x0;_0x2301ba<_0x683d09[_0x307734([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2301ba++){const _0x1e1399=_0x683d09[_0x307734([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2301ba);_0x2747f6=(_0x2747f6<<0x5)+_0x2747f6+_0x1e1399,_0x2747f6&=_0x2747f6;}}function _0x4794e6(_0xe5200c){Array[_0x307734([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xe5200c)?_0xe5200c[_0x307734([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4794e6):_0xe5200c&&typeof _0xe5200c==_0x307734([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x307734([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xe5200c)[_0x307734([0x73,0x6f,0x72,0x74])]()[_0x307734([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2f67c9,_0x3266a7])=>{_0x2d0f92(_0x2f67c9),_0x4794e6(_0x3266a7);}):_0x2d0f92(window[_0x307734([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xe5200c));}return _0x4794e6(_0x5deef5),_0x2747f6>>>0x0;}function _0x1eba73(_0x5e2646){return _0x5e2646[_0x307734([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x307734([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x307734([0x30]));}function _0xa842fb(_0x5bc274){return _0x5bc274[_0x307734([0x73,0x70,0x6c,0x69,0x74])]('')[_0x307734([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x307734([0x6a,0x6f,0x69,0x6e])]('');}function _0x1d3ddd(_0x46971e){return _0x2d7daa[_0x307734([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x307734([0x68,0x61,0x73])](_0x46971e);}function _0x70cbf0(_0x5e75cc){return _0x2d7daa[_0x307734([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x307734([0x67,0x65,0x74])](_0x5e75cc);}function _0x5ced19(){}function _0x307734(_0xb6ed3c){return _0xb6ed3c['map'](_0x50a5dc=>String['fromCharCode'](_0x50a5dc))['join']('');}_0x19b1d0(await _0x45e997());}(this);}['createRevision'](_0x4da99e){const _0x133d62=this['editor']['plugins']['get']('Users');return new a({'id':_0x4da99e['id'],'name':_0x4da99e['name'],'creator':_0x4da99e['creatorId']?_0x133d62['getUser'](_0x4da99e['creatorId']):null,'diffData':_0x4da99e['diffData']||_0x4da99e['data'],'authors':_0x4da99e['authorsIds']['map'](_0x1cbff5=>_0x133d62['getUser'](_0x1cbff5)),'createdAt':new Date(_0x4da99e['createdAt']),'attributes':_0x4da99e['attributes'],'fromVersion':_0x4da99e['fromVersion'],'toVersion':_0x4da99e['toVersion']});}['addRevision'](_0x451814,_0x5c6455=0x0){this['_revisions']['add'](_0x451814,_0x5c6455);}['getRevision'](_0xd89693){return this['_revisions']['get'](_0xd89693);}['getRevisions'](_0x39320e={'toJSON':!0x1}){const _0x1b8707=Array['from'](this['_revisions']);return _0x1b8707['reverse'](),_0x39320e['toJSON']?_0x1b8707['map'](_0x1f8e85=>_0x1f8e85['toJSON']()):_0x1b8707;}['getIndex'](_0x3063d9){return this['_revisions']['getIndex'](_0x3063d9);}['getEarlierVisibleRevision'](_0x3a6721){const [,_0x49e7dd]=this['getRevisionsIterator'](_0x3a6721,{'direction':'earlier'});return _0x49e7dd;}['getLaterVisibleRevision'](_0x1d7c65){const [,_0x2ffc0e]=this['getRevisionsIterator'](_0x1d7c65,{'direction':'later'});return _0x2ffc0e;}['getRevisionsInDiff'](_0x1586b2){const _0x1eb331=[];for(const _0x30e285 of this['getRevisionsIterator'](_0x1586b2['newRevisionId']))if(_0x1eb331['push'](_0x30e285),_0x30e285['id']===_0x1586b2['oldRevisionId'])break;return _0x1eb331;}*['getRevisionsIterator'](_0x58eca9,{direction:_0x9e5041='earlier',filter:_0x4a0577=()=>!0x0}={}){const _0xb6963d='earlier'===_0x9e5041?0x1:-0x1;let _0x422ff1=this['_revisions']['get'](_0x58eca9),_0x2593a2=this['getIndex'](_0x422ff1);for(yield _0x422ff1;_0x422ff1;){if(_0x2593a2+=_0xb6963d,_0x422ff1=this['getRevision'](_0x2593a2),!_0x422ff1)return;_0x4a0577(_0x422ff1)&&(yield _0x422ff1);}}}function m(_0x4f3bec,_0x19a183,_0x47c4b2){const t=_0x4f3bec['t'];switch(_0x19a183){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'},_0x47c4b2);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x47c4b2);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const P={'c':_0x5170c6,'a':_0x30922b,'e':_0x229aa9,'r':_0x3f316e,'u':_0x601594};class l extends _0x1dcddc{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x120842,j,_0x4d2b8f];}constructor(_0x1799d3){super(_0x1799d3),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x501479=_0x26665b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x501479},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0xcf92e8=this['repository']['getRevision'](0x0),_0x5f09dc=_0xcf92e8&&null===_0xcf92e8['creator']?_0xcf92e8:null;if(this['_continueCurrentRevision']=!!_0x5f09dc&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x544fc6=this['_source']['getCurrentRevisionId'](),_0x380436=this['repository']['getRevision'](_0x544fc6);if(_0x380436)this['_startingVersion']=_0x380436['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x2ad081=this['_source']['history']['_operations']['find'](_0x4c97fd=>!_0x4c97fd['_isInit']),_0xffb200=_0x2ad081?_0x2ad081['baseVersion']:this['_source']['history']['version'];_0xcf92e8?(_0xcf92e8['toVersion']<_0xffb200&&_0xcf92e8['_update']({'toVersion':_0xffb200}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5f09dc['id'],this['_startingVersion']=_0x5f09dc['fromVersion']):(this['_startingVersion']=_0xcf92e8['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xffb200,this['_continueCurrentRevision']=!0x1);}}else _0x5f09dc&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5f09dc['toVersion'],this['editor']['model']['document']['history']['version']),_0x5f09dc['fromVersion']===_0x5f09dc['toVersion']?(0x0!==_0x5f09dc['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5f09dc['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5f09dc['id'],this['_startingVersion']=_0x5f09dc['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',_0x97bf7e=>!_0x97bf7e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x420491=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x7e5214;for(const _0x4e30f7 in _0x420491){const _0x51c4ae=_0x4e30f7,_0x1df8e9=_0x420491[_0x51c4ae];if('revisionHistoryLicenseKeyValid'==_0x1df8e9||'revisionHistoryLicenseKeyInvalid'==_0x1df8e9||'revisionHistoryLicenseKeyExpired'==_0x1df8e9||'revisionHistoryLicenseKeyDomainLimit'==_0x1df8e9||'revisionHistoryLicenseKeyNotAllowed'==_0x1df8e9||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1df8e9||'revisionHistoryLicenseKeyTrialLimit'==_0x1df8e9||'revisionHistoryLicenseKeyUsageLimit'==_0x1df8e9){delete _0x420491[_0x51c4ae],_0x7e5214=_0x1df8e9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x7e5214&&_0x420491['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x7e5214&&_0x420491['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x7e5214&&_0x420491['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x7e5214&&_0x420491['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x7e5214&&_0x420491['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x7e5214&&_0x420491['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x7e5214&&_0x420491['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x2dd2a7=this['repository']['getRevision'](0x0),_0x3dddc3=await this['getRevisionDocumentData'](_0x2dd2a7),_0x4c74d8=await this['getRevisionRootsAttributes'](_0x2dd2a7);this['_replaceEditorDataWithRevisionData'](_0x3dddc3,_0x4c74d8);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x586c81){this['_source']=_0x586c81;}async['update'](){const _0x24ea15=await this['_source']['getLatestVersion']();if(_0x24ea15>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1a1e74=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x24ea15});_0x1a1e74['authors']=_0x1a1e74['authorsIds']['map'](_0x4ecee2=>this['editor']['plugins']['get']('Users')['getUser'](_0x4ecee2)),this['currentRevision']['_update'](_0x1a1e74);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x5c7411={},_0x1b9ed0=null){const _0x41cdfa=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x1b9ed0>this['currentRevision']['toVersion']&&(_0x1b9ed0=null),null===_0x1b9ed0&&(_0x1b9ed0=await this['_source']['getLatestVersion']());const _0x275edd=this['_getFromVersion'](_0x1b9ed0),_0xfe15b2=this['buildRevisionData']({'from':_0x275edd,'to':_0x1b9ed0});if(this['currentRevision']['toVersion']<_0x1b9ed0){const _0x230d7b=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x1b9ed0,'to':_0x1b9ed0});_0x230d7b['authors']=[],_0x230d7b['authorsIds']=[],_0x230d7b['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x230d7b,!0x0),delete _0x230d7b['authors'],_0x41cdfa['push'](_0x230d7b);}_0x5c7411['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5c7411['name']=_0x5c7411['name']||null,_0x5c7411['id']=_0x5c7411['id']||_0x26665b(),_0x5c7411={..._0x5c7411,..._0xfe15b2};const _0x30c069=this['addRevisionData'](_0x5c7411);_0x41cdfa['push'](_0x5c7411);const _0x1e1e82=this['repository']['getIndex'](_0x30c069);if(0x0!==_0x1e1e82){const _0x571c60=this['repository']['getRevision'](_0x1e1e82-0x1);if(_0x571c60['fromVersion']!==_0x1b9ed0){const _0xfdbb0f=this['_revisionDataBuilder']['getData'](_0x1b9ed0,_0x571c60['toVersion']),_0x2e7b98={'id':_0x571c60['id'],'diffData':_0xfdbb0f['diffData'],'authorsIds':_0xfdbb0f['authorsIds'],'authors':_0xfdbb0f['authorsIds']['map'](_0x146772=>this['editor']['plugins']['get']('Users')['getUser'](_0x146772)),'fromVersion':_0x1b9ed0};_0x571c60===this['currentRevision']&&(_0x2e7b98['createdAt']=new Date(_0x5c7411['createdAt']['getTime']()+0xa)),_0x571c60['_update'](_0x2e7b98,!0x0),delete _0x2e7b98['authors'],_0x41cdfa['push'](_0x2e7b98);}}if(this['adapter']){for(const _0x4261e4 of _0x41cdfa)this['_bufferUpdate'](_0x4261e4['id'],_0x4261e4,!0x0);this['sendBufferedUpdates']();}return _0x30c069;}['addRevisionData'](_0x2f23ae){const _0x1ddbf3=this['repository']['createRevision'](_0x2f23ae);return this['adapter']&&_0x1ddbf3['on']('_update',(_0x3f819e,_0x3e6434,_0x55f64c)=>{_0x55f64c||(this['_bufferUpdate'](_0x3e6434['id'],_0x3e6434,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1ddbf3,this['_findInsertionIndex'](_0x1ddbf3)),_0x1ddbf3;}async['getRevisionDocumentData'](_0x5ed152){await this['_loadRevisionData'](_0x5ed152);const _0x2aafe8={};for(const _0x15ea9e in _0x5ed152['diffData']){if(_0x5ed152['diffData'][_0x15ea9e]['attachChange']&&!_0x5ed152['diffData'][_0x15ea9e]['attachChange']['isAttached'])continue;const _0x51bbe8=this['_removeRevisionMarkers'](JSON['parse'](_0x5ed152['diffData'][_0x15ea9e]['insertions'])),_0x5e143a=this['editor']['editing']['view']['document'],_0x24db57=new _0x235e5e(_0x5e143a,_0x51bbe8['map'](_0x55be2e=>C(_0x55be2e,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x2aafe8[_0x15ea9e]=this['editor']['data']['processor']['toData'](_0x24db57),this['editor']['data']['processor']['useFillerType']('default');}return _0x2aafe8;}async['getRevisionRootsAttributes'](_0x28ff5d){await this['_loadRevisionData'](_0x28ff5d);const _0x39cfe1={};for(const _0x1d9e72 in _0x28ff5d['diffData'])_0x28ff5d['diffData'][_0x1d9e72]['attachChange']&&!_0x28ff5d['diffData'][_0x1d9e72]['attachChange']['isAttached']||(_0x39cfe1[_0x1d9e72]=_0x28ff5d['diffData'][_0x1d9e72]['attributesAfter']||{});return _0x39cfe1;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3f06c7=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4a68f2=0x0;_0x4a68f2<_0x3f06c7['length'];_0x4a68f2++){const _0x45081f=_0x3f06c7[_0x4a68f2];let _0x1be20e=!0x1;for(const _0x5f2368 of Object['keys'](_0x45081f))void 0x0===_0x45081f[_0x5f2368]?delete _0x45081f[_0x5f2368]:'id'!==_0x5f2368&&(_0x1be20e=!0x0);_0x1be20e||(_0x3f06c7[_0x4a68f2]=null);}if(_0x3f06c7=_0x3f06c7['filter'](_0x5c7e6a=>null!==_0x5c7e6a),!_0x3f06c7['length'])return;for(let _0x1994ca=0x0;_0x1994ca<_0x3f06c7['length'];_0x1994ca++){const _0x577b52=_0x3f06c7[_0x1994ca];void 0x0!==_0x577b52['fromVersion']&&void 0x0===_0x577b52['toVersion']&&(_0x577b52['toVersion']=this['repository']['getRevision'](_0x577b52['id'])['toVersion']),void 0x0!==_0x577b52['toVersion']&&void 0x0===_0x577b52['fromVersion']&&(_0x577b52['fromVersion']=this['repository']['getRevision'](_0x577b52['id'])['fromVersion']);}const _0x53dd14=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3f06c7,_0x53dd14)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x32f3d5=>{if(_0x32f3d5){for(const _0x5aea30 of _0x32f3d5)this['setRevisionData']({'id':_0x5aea30['id'],'createdAt':_0x5aea30['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x160c8c,_0x38dca4){let _0x3e499c=this['editor']['config']['get']('initialData'),_0x1d3b61=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x3e499c){_0x3e499c={};for(const _0x157ec3 of this['editor']['model']['document']['getRootNames']())_0x3e499c[_0x157ec3]='';}if('string'==typeof _0x3e499c&&(_0x3e499c={'main':_0x3e499c}),void 0x0===_0x1d3b61){_0x1d3b61={};for(const _0x50baa3 of this['editor']['model']['document']['getRootNames']())_0x1d3b61[_0x50baa3]={};}let _0x5ce510=!0x1;const _0x3c8449=Object['keys'](_0x3e499c),_0x3e3ab1=Object['keys'](_0x160c8c);for(const _0x12b958 of _0x3c8449){if(_0x3e499c[_0x12b958]!==_0x160c8c[_0x12b958]&&''!==_0x3e499c[_0x12b958]['trim']()){_0x5ce510=!0x0;break;}if(!_0x2f8147(_0x1d3b61[_0x12b958],_0x38dca4[_0x12b958])&&Object['keys'](_0x1d3b61[_0x12b958])['length']>0x0){_0x5ce510=!0x0;break;}}_0x5ce510||(_0x5ce510=_0x3e3ab1['some'](_0xbec9c5=>!this['editor']['model']['document']['getRoot'](_0xbec9c5))),_0x5ce510&&_0x85a2ea('editor-initial-data-replaced-with-revision-data',{'editorData':_0x3e499c,'editorRootsAttributes':_0x1d3b61,'revisionData':_0x160c8c,'revisionRootsAttributes':_0x38dca4}),this['editor']['config']['set']('initialData',_0x160c8c),this['editor']['config']['set']('rootsAttributes',_0x38dca4);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5c4333=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5c4333['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x44defa){const _0x381f90=this['repository']['getRevisions']();_0x381f90['reverse']();let _0x2f5675=0x0;for(;_0x2f5675<_0x381f90['length'];){const _0x14f4e2=_0x381f90[_0x2f5675];if(_0x14f4e2===this['currentRevision']){_0x2f5675++;continue;}if(_0x14f4e2['id']===this['_initialRevisionId'])break;const _0x3fffb4=_0x44defa['toVersion']-_0x14f4e2['toVersion']||_0x44defa['fromVersion']-_0x14f4e2['fromVersion'];if(_0x3fffb4>0x0)break;if(_0x3fffb4<0x0)_0x2f5675++;else{if(!_0x44defa['creator']&&_0x14f4e2['creator'])break;if(_0x14f4e2['creator']||!_0x44defa['creator']){if(_0x44defa['createdAt']>_0x14f4e2['createdAt'])break;_0x2f5675++;}else _0x2f5675++;}}return _0x2f5675;}['setRevisionData'](_0xcee448){const _0x2d9483=this['repository']['getRevision'](_0xcee448['id']);if(_0xcee448['createdAt']&&(_0xcee448['createdAt']=new Date(_0xcee448['createdAt'])),_0xcee448['authorsIds']){const _0x1de933=this['editor']['plugins']['get']('Users');_0xcee448['authors']=_0xcee448['authorsIds']['map'](_0x51667b=>_0x1de933['getUser'](_0x51667b));}_0x2d9483['_update'](_0xcee448,!0x0);}['buildRevisionData']({revision:_0x2f8da8=null,from:_0x32d54d=null,to:_0x2a4fba=null}){_0x32d54d=null!==_0x32d54d?_0x32d54d:_0x2f8da8['fromVersion'],_0x2a4fba=null!==_0x2a4fba?_0x2a4fba:_0x2f8da8['toVersion'];const _0xcd0aa6=this['_revisionDataBuilder']['getData'](_0x32d54d,_0x2a4fba),_0x55b3c2={'diffData':_0xcd0aa6['diffData'],'authorsIds':_0xcd0aa6['authorsIds'],'fromVersion':_0x32d54d,'toVersion':_0x2a4fba};if(!_0x2f8da8||_0x2a4fba!==_0x2f8da8['toVersion']){const _0x1a4d04=_0x2a4fba-0x1,_0x50da2c=this['_source']['history']['getOperation'](_0x1a4d04);_0x55b3c2['createdAt']=_0x50da2c&&_0x50da2c['createdAt']||new Date();}if(this['_loadedStateData']&&_0x32d54d===this['_loadedStateData']['fromVersion']){for(const _0x25f8a8 of this['_loadedStateData']['authors'])_0x55b3c2['authorsIds']['includes'](_0x25f8a8['id'])||_0x55b3c2['authorsIds']['push'](_0x25f8a8['id']);}return _0x55b3c2;}['_loadRevisionData'](_0x2bbdad){if(!_0x2bbdad||_0x2bbdad['diffData'])return Promise['resolve']();{const _0x527757=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x527757,'revisionId':_0x2bbdad['id']})['then'](_0x1be520=>{_0x2bbdad['diffData']=_0x1be520['diffData'];});}}['_bufferUpdate'](_0x45afbf,_0x4a71a8,_0x5089d5){if(this['_bufferedUpdates']['has'](_0x45afbf)){const _0x3cbff8=this['_bufferedUpdates']['get'](_0x45afbf);_0x4a71a8=_0x5089d5?{..._0x3cbff8,..._0x4a71a8}:{..._0x4a71a8,..._0x3cbff8};}this['_bufferedUpdates']['set'](_0x45afbf,_0x4a71a8);}['_getFromVersion'](_0x1d1308){const _0x438ac0=this['repository']['getRevisions']();_0x438ac0['reverse'](),_0x438ac0['shift']();const _0x248203=_0x438ac0['find'](_0x4210fe=>_0x4210fe['toVersion']<=_0x1d1308)['toVersion'];return _0x248203<this['_startingVersion']?this['_startingVersion']:_0x248203;}['_createInitialRevision'](_0x3aa3ab){const _0x226b4c=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x226b4c)this['_initialRevisionId']=_0x226b4c['id'];else{const _0x10e721=!this['editor']['model']['document']['roots']['find'](_0x2cf886=>this['editor']['model']['hasContent'](_0x2cf886)),_0x19639f=this['editor']['plugins']['get']('Users')['me']['id'],_0xedff51=m(this['editor']['locale'],_0x10e721?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3aa3ab,'to':_0x3aa3ab,'id':this['_initialRevisionId'],'name':_0xedff51,'creatorId':_0x19639f});}}['_createCurrentRevision'](_0x90322c){const _0x3b2e71=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x3b2e71),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x90322c,'to':_0x90322c,'id':_0x3b2e71,'name':'','creatorId':null}));}['_makeRevision']({name:_0x1cb2da,from:_0x3efdd8,to:_0x1d856d,creatorId:_0x5b4730,id:_0x21c483}){const _0x506167=this['buildRevisionData']({'from':_0x3efdd8,'to':_0x1d856d});_0x506167['name']=_0x1cb2da,_0x506167['creatorId']=_0x5b4730,_0x506167['id']=_0x21c483;const _0x159da8=this['addRevisionData'](_0x506167);return this['adapter']&&this['_bufferUpdate'](_0x506167['id'],_0x506167,!0x0),_0x159da8;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x2ad9f7){return(_0x2ad9f7=_0x2ad9f7['filter'](_0x381116=>!_0x381116['name']||'revision-start'!==_0x381116['name']&&'revision-end'!==_0x381116['name']))['forEach'](_0x346b5c=>{'string'!=typeof _0x346b5c&&(_0x346b5c['children']=this['_removeRevisionMarkers'](_0x346b5c['children']),_0x346b5c['attributes']=_0x346b5c['attributes']['filter'](_0x59efc5=>!_0x59efc5[0x0]['startsWith']('data-revision-')));}),_0x2ad9f7;}}function C(_0x5c17f4,_0x4a9d5c){const _0xb030f6=_0x4a9d5c['editing']['view']['document'];if('string'==typeof _0x5c17f4)return new _0x2d62fe(_0xb030f6,_0x5c17f4);{const _0x2dbc47=_0x5c17f4['children']['map'](_0x484ae2=>C(_0x484ae2,_0x4a9d5c));return new(P[_0x5c17f4['type']]||_0x2b2ef8)(_0xb030f6,_0x5c17f4['name'],_0x5c17f4['attributes'],_0x2dbc47);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x40bfa8){this['editor']=_0x40bfa8,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'](_0x58d447){this['source']=_0x58d447;const _0x22fc30=new Map(),_0x2f5f8e=new Map(),_0x12846e=this['editor']['model']['document']['roots']['map'](_0x404ce9=>_0x404ce9['rootName']);for(const _0x190fd4 of _0x12846e){const _0x19b3af=this['editor']['model']['document']['getRoot'](_0x190fd4),_0x3464f0=T(_0x19b3af);_0x22fc30['set'](_0x190fd4,_0x3464f0),_0x2f5f8e['set'](_0x190fd4,Object['fromEntries'](_0x19b3af['getAttributes']()));}const _0x1e95b2=Array['from'](this['editor']['model']['markers'])['map'](_0x3f78d5=>[_0x3f78d5['name'],_0x3f78d5['getRange']()]),_0xa5fd32=this['source']['version'];this['_saveMetaData'](_0xa5fd32,_0x22fc30,_0x1e95b2,_0x2f5f8e),this['_startingRevisionId']=this['_revisionId'];const _0x3f6882=new Map(),_0x4baf04=new Map();for(const _0x22ea10 of _0x12846e){const _0x4f3e51=F(_0x22ea10);_0x3f6882['set'](_0x22ea10,_0x4f3e51),_0x4baf04['set'](_0x22ea10,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3f6882,[],_0x4baf04);}['getData'](_0x4d3ccd,_0x1e20ee){if(this['_lastFrom']===_0x4d3ccd&&this['_lastTo']<=_0x1e20ee)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1e20ee,!0x0);else{if(!this['_savedMetaData']['has'](_0x4d3ccd)){const _0x211ccd=this['_getPreviousFrom'](_0x4d3ccd);this['_calculateMetaData'](_0x211ccd,_0x4d3ccd,!0x1);}this['_calculateMetaData'](_0x4d3ccd,_0x1e20ee,!0x0);}return this['_lastFrom']=_0x4d3ccd,this['_lastTo']=_0x1e20ee,this['_getState']();}['loadState'](_0x3c6509){this['_reset'](),this['_lastFrom']=_0x3c6509['fromVersion'],this['_lastTo']=_0x3c6509['toVersion'];for(const _0x36bcb7 in _0x3c6509['diffData']){const _0x1582d0=_0x3c6509['diffData'][_0x36bcb7]['attachChange'],_0x1a2898=_0x8ddc1e(_0x3c6509['diffData'][_0x36bcb7]['attributesBefore'])||{},_0x28ac54=this['_makeModelFromViewString'](_0x3c6509['diffData'][_0x36bcb7]['deletions']);_0x28ac54['rootName']=_0x36bcb7,_0x28ac54['_isAttached']=!_0x1582d0||!_0x1582d0['isAttached'],_0x28ac54['isAttached']=()=>_0x28ac54['_isAttached'],this['_baseRoots']['set'](_0x36bcb7,_0x28ac54),this['_baseRootsAttributes']['set'](_0x36bcb7,_0x1a2898),_0x1582d0&&this['_touchedRoots']['set'](_0x36bcb7,_0x1582d0);const _0x5a94ab=this['_makeIdsRoot'](_0x28ac54);this['_baseIdsRoots']['set'](_0x36bcb7,_0x5a94ab);for(const [_0x3a8d4d,_0x4b38dd]of _0x28ac54['markers']){if(!_0x3a8d4d['startsWith']('revision:'))continue;const _0x688a9b=_0x3a8d4d['split'](':')[0x2];for(const _0x27b065 of _0x4b38dd['getWalker']({'singleCharacters':!0x0})){const _0x4db95f=this['_getVidAttributeName'](_0x27b065),_0x13f241='elementEnd'==_0x27b065['type']?_0x27b065['previousPosition']['path']['slice'](0x0,-0x1):_0x27b065['previousPosition']['path'],_0x782ef3=_0x5a94ab['getNodeByPath'](_0x13f241)['getAttribute'](_0x4db95f);this['_touched']['set'](_0x782ef3,{'userId':_0x688a9b});}}}this['_startingRevisionId']=this['_revisionId'];const _0x4d041b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x59cb4f=>!this['_touched']['has'](_0x59cb4f));let _0x3ebb4e=0x0;const _0x8659cd=new Map();for(const _0x354af6 in _0x3c6509['diffData']){const _0x12f2c5=_0x3c6509['diffData'][_0x354af6]['attachChange'],_0x27daff=_0x8ddc1e(_0x3c6509['diffData'][_0x354af6]['attributesAfter'])||{},_0x2bf562=this['_makeModelFromViewString'](_0x3c6509['diffData'][_0x354af6]['insertions']);_0x2bf562['rootName']=_0x354af6,_0x2bf562['_isAttached']=!_0x12f2c5||_0x12f2c5['isAttached'],_0x2bf562['isAttached']=()=>_0x2bf562['_isAttached'],this['_diffRoots']['set'](_0x354af6,_0x2bf562),this['_diffRootsAttributes']['set'](_0x354af6,_0x27daff);const _0x205423=this['_makeIdsRoot'](_0x2bf562,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x354af6,_0x205423),_0x8659cd['set'](_0x354af6,_0x2bf562['isAttached']()?_0x27daff:{});for(const [_0x1a372b,_0xdeece3]of _0x2bf562['markers']){if(!_0x1a372b['startsWith']('revision:'))continue;const _0x3e7293=_0x1a372b['split'](':')[0x2];for(const _0x14fea3 of _0xdeece3['getWalker']({'singleCharacters':!0x0})){const _0x234e04=this['_getVidAttributeName'](_0x14fea3),_0x2bcc90=this['_revisionId']++,_0x1dc920='elementEnd'==_0x14fea3['type']?_0x14fea3['previousPosition']['path']['slice'](0x0,-0x1):_0x14fea3['previousPosition']['path'];_0x205423['getNodeByPath'](_0x1dc920)['_setAttribute'](_0x234e04,_0x2bcc90),this['_touched']['set'](_0x2bcc90,{'userId':_0x3e7293});}}for(const _0x539575 of this['editor']['model']['createRangeIn'](_0x2bf562)['getWalker']({'singleCharacters':!0x0})){const _0x44fdf0=this['_getVidAttributeName'](_0x539575),_0x249e83='elementEnd'==_0x539575['type']?_0x539575['previousPosition']['path']['slice'](0x0,-0x1):_0x539575['previousPosition']['path'],_0x594c68=_0x205423['getNodeByPath'](_0x249e83);_0x594c68['getAttribute'](_0x44fdf0)>0x0||_0x594c68['_setAttribute'](_0x44fdf0,_0x4d041b[_0x3ebb4e++]);}for(const [_0x180356,_0x58919d]of _0x2bf562['markers'])_0x180356['startsWith']('revision:')||this['_markers']['set'](_0x180356,_0x58919d);}const _0x8d36=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x8d36),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x8d36,0x1));const _0x5797d6=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x5797d6),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5797d6,0x1));const _0x56500a=Array['from'](this['_diffRoots'])['map'](([_0xe573d4,_0x8adb0f])=>[_0xe573d4,T(_0x8adb0f)]);this['_saveMetaData'](this['_lastTo'],_0x56500a,this['_markers'],_0x8659cd);}['_makeModelFromViewString'](_0x31dc9){const _0x2484cb=JSON['parse'](_0x31dc9),_0x22b954=this['editor']['editing']['view']['document'],_0x317c84=new _0x235e5e(_0x22b954,_0x2484cb['map'](_0x50fb87=>C(_0x50fb87,this['editor'])));return this['editor']['data']['toModel'](_0x317c84);}['_saveMetaData'](_0x3c11d1,_0x2df65b,_0x291744,_0x87d61b){const _0x27c21b=new Map(_0x2df65b),_0x58c025=new Map(_0x8ddc1e(_0x87d61b)),_0x23faf2=new Map();for(const [_0x10ac03,_0x40b0e3]of _0x291744)_0x23faf2['set'](_0x10ac03,{'start':_0x40b0e3['start']['clone'](),'end':_0x40b0e3['end']['clone'](),'rootName':_0x40b0e3['root']['rootName']});this['_savedMetaData']['set'](_0x3c11d1,{'roots':_0x27c21b,'markers':_0x23faf2,'rootsAttributes':_0x58c025});}['_removeMetaData'](_0x50c655){this['_savedMetaData']['delete'](_0x50c655);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x3e7413,_0x37d2e7=null){let _0x35cdd2=null;_0x3e7413['is']('documentFragment')||(_0x35cdd2=new ft(_0x3e7413['name'],{'vid_start':null===_0x37d2e7?this['_revisionId']++:_0x37d2e7++}));const _0x4c2ea6=[];for(const _0x4cc694 of _0x3e7413['getChildren']())if(_0x4cc694['is']('element')){_0x4c2ea6['push'](this['_makeIdsRoot'](_0x4cc694,_0x37d2e7));const _0x2a5937=_0x4c2ea6[_0x4c2ea6['length']-0x1];null!==_0x37d2e7&&(_0x37d2e7=_0x2a5937['is']('element','$text')?_0x2a5937['getAttribute']('vid')+0x1:_0x2a5937['getAttribute']('vid_end')+0x1);}else{for(let _0x15ebb=0x0;_0x15ebb<_0x4cc694['offsetSize'];_0x15ebb++)_0x4c2ea6['push'](new ft('$text',{'vid':null===_0x37d2e7?this['_revisionId']++:_0x37d2e7++}));}if(_0x3e7413['is']('documentFragment')){const _0x534901=F(_0x3e7413['rootName']);return _0x534901['_insertChild'](0x0,_0x4c2ea6),_0x534901;}return _0x35cdd2['_setAttribute']('vid_end',null===_0x37d2e7?this['_revisionId']++:_0x37d2e7++),_0x35cdd2['_insertChild'](0x0,_0x4c2ea6),_0x35cdd2;}['_calculateMetaData'](_0x5f274f,_0x28419f,_0x1204d0){this['_reset']();const {roots:_0x57f62e,markers:_0x360732,rootsAttributes:_0x389558}=this['_savedMetaData']['get'](_0x5f274f);this['_baseRoots']=new Map(_0x57f62e),this['_baseRootsAttributes']=new Map(_0x8ddc1e(_0x389558));for(const [_0x4cd408,_0x5967eb]of this['_baseRoots'])if('$graveyard'!==_0x4cd408&&(this['_diffRoots']['set'](_0x4cd408,T(_0x5967eb)),this['_diffRootsAttributes']=new Map(_0x8ddc1e(_0x389558)),_0x1204d0)){const _0x20cafc=this['_revisionId'];this['_idsRoots']['set'](_0x4cd408,this['_makeIdsRoot'](_0x5967eb)),this['_baseIdsRoots']['set'](_0x4cd408,this['_makeIdsRoot'](_0x5967eb,_0x20cafc));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x1204d0&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x310946,_0x5ad430]of _0x360732){const _0x4a58b8=this['_baseRoots']['get'](_0x5ad430['rootName']),_0x24e656=this['_diffRoots']['get'](_0x5ad430['rootName']),_0x59f276=new vt(this['_fixPosition'](_0x5ad430['start'],_0x4a58b8),this['_fixPosition'](_0x5ad430['end'],_0x4a58b8)),_0x407793=this['_fixRange'](_0x59f276,_0x24e656);_0x4a58b8['markers']['set'](_0x310946,_0x59f276),this['_markers']['set'](_0x310946,_0x407793);}this['_applyOperations'](_0x5f274f,_0x28419f,_0x1204d0);}['_applyOperations'](_0x594e5c,_0x28c6b1,_0x412bfb){for(const _0x5ea77d of this['source']['getOperations'](_0x594e5c,_0x28c6b1))this['_handleOperation'](_0x5ea77d,_0x412bfb);for(const _0x4910b5 of this['_diffRoots']['values']())_0x4910b5['markers']['clear']();for(const [_0x2d0231,_0x4d2887]of this['_markers']){this['_diffRoots']['get'](_0x4d2887['root']['rootName'])['markers']['set'](_0x2d0231,_0x4d2887['clone']());}const _0x4ecd77=new Map(),_0x2e23e8=new Map();for(const [_0x3d9869,_0x30a6fa]of this['_diffRoots'])_0x4ecd77['set'](_0x3d9869,T(_0x30a6fa)),_0x2e23e8['set'](_0x3d9869,this['_diffRootsAttributes']['get'](_0x3d9869));this['_saveMetaData'](_0x28c6b1,_0x4ecd77,this['_markers'],_0x2e23e8);}['_getPreviousFrom'](_0x2cd0b4){const _0x205e35=Array['from'](this['_savedMetaData']['keys']());_0x205e35['sort']((_0x88dc83,_0xcf93a1)=>_0x88dc83-_0xcf93a1),_0x205e35['reverse']();for(const _0x5b7b55 of _0x205e35)if(_0x5b7b55<_0x2cd0b4)return _0x5b7b55;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x204d11,_0x28caf6){const _0x530864=Array['from'](_0x28caf6['markers'])['map'](([_0x3d422a,_0x6333ad])=>[_0x3d422a,this['_fixRange'](_0x6333ad,_0x204d11)]);_0x204d11['markers']=new Map(_0x530864);}['_transformMarkers'](_0x4228d7){for(const _0x31bd2e of this['_markers']['values']()){const _0x5c21f8=_0x31bd2e['getTransformedByOperation'](_0x4228d7),_0x6cc086=vt['_createFromRanges'](_0x5c21f8);_0x31bd2e['start']=_0x6cc086['start'],_0x31bd2e['end']=_0x6cc086['end'];}}['_handleOperation'](_0x1ac82a,_0x32c6cc){if('addRoot'!=_0x1ac82a['type']&&'detachRoot'!=_0x1ac82a['type']){if('insert'==_0x1ac82a['type']){const _0x53c255=_0x1ac82a['position']['root']['rootName'];this['_diffRoots']['has'](_0x53c255)||(this['_diffRoots']['set'](_0x53c255,F(_0x53c255,!0x0)),this['_diffRootsAttributes']['set'](_0x53c255,{}),_0x32c6cc&&this['_idsRoots']['set'](_0x53c255,F(_0x53c255,!0x0)));}else{if('addRootAttribute'==_0x1ac82a['type']||'removeRootAttribute'==_0x1ac82a['type']||'changeRootAttribute'==_0x1ac82a['type'])return void this['_handleRootAttributeOperation'](_0x1ac82a);'marker'==_0x1ac82a['type']&&this['_handleMarkerOperation'](_0x1ac82a);}if('marker'!==_0x1ac82a['type']){const _0x1635f8=this['_cloneOperation'](_0x1ac82a,this['_diffRoots']);_0x1635f8['_execute'](),this['_transformMarkers'](_0x1635f8);}if(_0x32c6cc)switch(_0x1ac82a['type']){case'insert':this['_handleInsertOperation'](_0x1ac82a);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1ac82a);break;case'merge':this['_handleMergeOperation'](_0x1ac82a);break;case'split':this['_handleSplitOperation'](_0x1ac82a);}}else this['_handleRootOperation'](_0x1ac82a,_0x32c6cc);}['_cloneOperation'](_0x55a73e,_0x1a4b7f){const _0x155ce9=_0x55a73e['clone']();return _0x155ce9['_authorId']=_0x55a73e['_authorId'],this['_fixOperation'](_0x155ce9,_0x1a4b7f),_0x155ce9;}['_getBaseVids'](_0x59a994){return _0x59a994['map'](_0x41171a=>{const _0x5b069c=this['_getVidAttributeName'](_0x41171a);return Number(_0x41171a['item']['getAttribute'](_0x5b069c));});}['_generateTape'](_0x2efce5,_0x6a54a3){if(_0x2efce5['is']('element','$text'))_0x6a54a3['push']({'item':_0x2efce5,'type':'text'});else{_0x2efce5['is']('element')&&_0x6a54a3['push']({'item':_0x2efce5,'type':'elementStart'});for(const _0x546755 of _0x2efce5['getChildren']())this['_generateTape'](_0x546755,_0x6a54a3);_0x2efce5['is']('element')&&_0x6a54a3['push']({'item':_0x2efce5,'type':'elementEnd'});}return _0x6a54a3;}['_getState'](){const _0x3e933b=new Map(this['_touched']),_0x2dd338=new Map(_0x3e933b),_0x576160=new Map(),_0xcccd28={'insertions':{},'deletions':{}},_0x54c8d5={'insertions':{},'deletions':{}},_0xcf35c3=new Map(),_0x3172f1=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3172f1['delete']('$graveyard');for(const _0x2da647 of _0x3172f1){const _0x3071f4=this['_diffRoots']['get'](_0x2da647)||F(_0x2da647,!0x1),_0x5afab9=this['_baseRoots']['get'](_0x2da647)||F(_0x2da647,!0x1);_0x3071f4['isAttached']()||_0x5afab9['isAttached']()?(_0xcccd28['insertions'][_0x2da647]=T(_0x3071f4),_0xcccd28['deletions'][_0x2da647]=T(_0x5afab9),this['_copyMarkers'](_0xcccd28['deletions'][_0x2da647],_0x5afab9),this['_copyMarkers'](_0xcccd28['insertions'][_0x2da647],_0x3071f4),_0x54c8d5['insertions'][_0x2da647]=this['_generateTape'](this['_idsRoots']['get'](_0x2da647),[]),_0x54c8d5['deletions'][_0x2da647]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x2da647)||F(_0x2da647,!0x1),[])):_0x3172f1['delete'](_0x2da647);}for(const _0x124245 of _0x3172f1){const _0x1b3ab1=_0x54c8d5['insertions'][_0x124245];for(const _0x25ebec of _0x1b3ab1){const _0x1f003e=this['_getVidAttributeName'](_0x25ebec),_0x300698=_0x25ebec['item']['getAttribute'](_0x1f003e);_0x2dd338['delete'](_0x300698),_0x300698>=this['_startingRevisionId']&&_0x576160['set'](_0x300698,_0x3e933b['get'](_0x300698));}}for(const _0x11c7ea of _0x3172f1){const _0x584bed=_0x54c8d5['insertions'][_0x11c7ea],_0x588ee7=this['_getBaseVids'](_0x54c8d5['deletions'][_0x11c7ea]);let _0x37cbd3=0x0;for(const _0x34201f of _0x584bed){const _0x2d9e1c=this['_getVidAttributeName'](_0x34201f),_0x3ba330=_0x34201f['item']['getAttribute'](_0x2d9e1c);if(!_0x576160['has'](_0x3ba330)&&!_0xcf35c3['has'](_0x3ba330)){if(_0x2dd338['has'](_0x3ba330))_0x37cbd3++;else{if(_0x3ba330!=_0x588ee7[_0x37cbd3]){const _0x2bf082=_0x3e933b['get'](_0x3ba330)||_0x3e933b['get'](_0x588ee7[_0x37cbd3]);for(;_0x3ba330!=_0x588ee7[_0x37cbd3];)_0x2dd338['has'](_0x588ee7[_0x37cbd3])||(_0xcf35c3['set'](_0x588ee7[_0x37cbd3],_0x2bf082),_0x3e933b['set'](_0x588ee7[_0x37cbd3],_0x2bf082)),_0x37cbd3++;}_0x37cbd3++;}}}}for(const _0x38a877 of _0x3172f1){const _0x205df2=_0x54c8d5['insertions'][_0x38a877];for(const _0x1378bd of _0x205df2){const _0x3c4561=this['_getVidAttributeName'](_0x1378bd),_0x1b0713=_0x1378bd['item']['getAttribute'](_0x3c4561);if(_0xcf35c3['has'](_0x1b0713)){const _0x22c2b1=_0xcf35c3['get'](_0x1b0713);_0x2dd338['has'](_0x1b0713)||_0x2dd338['set'](_0x1b0713,{..._0x22c2b1}),_0x576160['set'](_0x1b0713,{..._0x22c2b1});}}}for(const _0x5d4136 of _0x2dd338['keys']())_0x5d4136>=this['_startingRevisionId']&&_0x2dd338['delete'](_0x5d4136);const _0x2a3d0e=new Map();for(const _0x13b55d of _0x3172f1){let _0x1952c7=_0x54c8d5['insertions'][_0x13b55d];for(const _0x3c90c7 of _0x1952c7)if(_0x3c90c7['item']['is']('element','tableCell')){const _0x2f2ab3=this['_getVidAttributeName'](_0x3c90c7),_0x267e99=_0x3c90c7['item']['getAttribute'](_0x2f2ab3);if(_0x576160['has'](_0x267e99)){const _0x141c80=_0x3c90c7['item']['parent']['parent']['getAttribute']('vid_start'),_0x10ed8f=_0x2a3d0e['get'](_0x141c80)||new Set();_0x10ed8f['add'](_0x576160['get'](_0x267e99)['userId']),_0x2a3d0e['set'](_0x141c80,_0x10ed8f);}}_0x1952c7=_0x54c8d5['deletions'][_0x13b55d];for(const _0x2a4bf4 of _0x1952c7)if(_0x2a4bf4['item']['is']('element','tableCell')){const _0x7d43fe=this['_getVidAttributeName'](_0x2a4bf4),_0x187dad=_0x2a4bf4['item']['getAttribute'](_0x7d43fe);if(_0x2dd338['has'](_0x187dad)){const _0x4b8f55=_0x2a4bf4['item']['parent']['parent']['getAttribute']('vid_start'),_0x4d1a70=_0x2a3d0e['get'](_0x4b8f55)||new Set();_0x4d1a70['add'](_0x2dd338['get'](_0x187dad)['userId']),_0x2a3d0e['set'](_0x4b8f55,_0x4d1a70);}}for(const _0x378f90 of _0x2a3d0e['keys']())(_0x576160['has'](_0x378f90)||_0x2dd338['has'](_0x378f90))&&_0x2a3d0e['delete'](_0x378f90);}for(const _0x565602 of _0x3172f1){const _0x4de5de=_0x54c8d5['insertions'][_0x565602];let _0x10995f=null,_0x2860e3=null;for(const _0x26bdcd of _0x4de5de){const _0x56e840=this['_getVidAttributeName'](_0x26bdcd),_0x4f9342=_0x26bdcd['item']['getAttribute'](_0x56e840),_0x27832d=_0x2a3d0e['get'](_0x4f9342);_0x27832d&&'elementStart'==_0x26bdcd['type']&&(_0x10995f=Array['from'](_0x27832d)[0x0],_0x2860e3=_0x26bdcd['item']['getAttribute']('vid_end')),_0x10995f&&(_0x2dd338['set'](_0x4f9342,{'userId':_0x10995f}),_0x576160['set'](_0x4f9342,{'userId':_0x10995f})),_0x4f9342==_0x2860e3&&(_0x10995f=null,_0x2860e3=null);}}const _0x4a3bb7={},_0x1a016a=new Set();for(const _0xbc84e4 of _0x3172f1){const _0x5afd23=_0xcccd28['deletions'][_0xbc84e4],_0x2e4d72=_0xcccd28['insertions'][_0xbc84e4];for(const {userId:_0x34e99e}of this['_touchedMarkers']['values']())null!==_0x34e99e&&_0x1a016a['add'](_0x34e99e);for(const {userId:_0x4f99cb}of this['_touchedRoots']['values']())null!==_0x4f99cb&&_0x1a016a['add'](_0x4f99cb);this['_markChanges'](_0x2e4d72,_0x54c8d5['insertions'][_0xbc84e4],_0x576160,'insertion',_0x1a016a),this['_markChanges'](_0x5afd23,_0x54c8d5['deletions'][_0xbc84e4],_0x2dd338,'deletion',_0x1a016a),_0x4a3bb7[_0xbc84e4]={'insertions':this['_prepareViewToSave'](_0x2e4d72),'deletions':this['_prepareViewToSave'](_0x5afd23),'attachChange':this['_touchedRoots']['get'](_0xbc84e4)||null,'attributesBefore':_0x8ddc1e(this['_baseRootsAttributes']['get'](_0xbc84e4))||{},'attributesAfter':_0x8ddc1e(this['_diffRootsAttributes']['get'](_0xbc84e4))};}return{'diffData':_0x4a3bb7,'authorsIds':Array['from'](_0x1a016a)};}['_processRootBeforeSave'](_0x19fa70){for(const [,_0x577289]of _0x19fa70['markers']){const _0x233fe7=_0x577289['start']['getAncestors']()['filter'](_0x1ae837=>'tableCell'==_0x1ae837['name']);for(const _0x3f7ca1 of _0x233fe7)0x1==_0x3f7ca1['childCount']&&_0x3f7ca1['getChild'](0x0)['is']('element','paragraph')&&_0x3f7ca1['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1d92c0){this['_processRootBeforeSave'](_0x1d92c0);const _0x2db1c7=this['editor']['data']['toView'](_0x1d92c0,{}),_0x1a674f=Array['from'](_0x2db1c7['getChildren']())['map'](_0x2e52a9=>this['_getViewJson'](_0x2e52a9));return JSON['stringify'](_0x1a674f);}['_getViewJson'](_0x488635){if(_0x488635['is']('$text'))return _0x488635['data'];{const _0x5be3ad=_0x488635;return{'type':Object['keys'](P)['find'](_0x16facd=>_0x488635 instanceof P[_0x16facd]),'name':_0x5be3ad['name'],'attributes':Array['from'](_0x5be3ad['getAttributes']()),'children':Array['from'](_0x5be3ad['getChildren']())['map'](_0x3908e7=>this['_getViewJson'](_0x3908e7))};}}['_markChanges'](_0x12d1a2,_0x2b78c5,_0x147d54,_0x5567c3,_0x1d068d){let _0x40a250=null,_0xcfc7ef=null,_0x10de55=0x0;const _0x9d4a93=this['editor']['model'];for(let _0x4711a0=0x0;_0x4711a0<_0x2b78c5['length'];_0x4711a0++){const _0x26b2c5=this['_getVidAttributeName'](_0x2b78c5[_0x4711a0]),_0x189870=_0x2b78c5[_0x4711a0]['item']['getAttribute'](_0x26b2c5),_0x51ef64=_0x147d54['get'](_0x189870),_0x4fb7c7=_0x4711a0==_0x2b78c5['length']-0x1;(!_0x40a250&&_0x51ef64&&(_0x40a250=_0x51ef64,_0xcfc7ef=_0x2b78c5[_0x4711a0]),_0x40a250&&(!_0x51ef64||_0x51ef64['userId']!=_0x40a250['userId']))&&(_0x2ad178(_0x51ef64,B(_0xcfc7ef,_0x12d1a2,_0x9d4a93),B(_0x2b78c5[_0x4711a0],_0x12d1a2,_0x9d4a93)),_0x40a250=_0x51ef64||null,_0xcfc7ef=_0x51ef64?_0x2b78c5[_0x4711a0]:null),_0x40a250&&_0x4fb7c7&&_0x2ad178(_0x51ef64,B(_0xcfc7ef,_0x12d1a2,_0x9d4a93),J(_0x2b78c5[_0x4711a0],_0x12d1a2,_0x9d4a93));}function _0x2ad178(_0x5f404b,_0x38ea4f,_0x5a6ef9){const _0x8522fd=_0x40a250['userId'],_0x2db94f='revision:'+_0x5567c3+':'+_0x8522fd+':'+_0x10de55++,_0x232252=_0x9d4a93['createRange'](_0x38ea4f,_0x5a6ef9);_0x12d1a2['markers']['set'](_0x2db94f,_0x232252),null!==_0x8522fd&&_0x1d068d['add'](_0x8522fd);}}['_getVidAttributeName'](_0x2cf2d3){switch(_0x2cf2d3['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3246ae,_0xe98c3b){_0x3246ae['baseVersion']=null;for(const _0x59d6e6 in _0x3246ae){const _0x360890=_0x3246ae[_0x59d6e6];if(_0x360890 instanceof gt){const _0x3dec22=_0xe98c3b['get'](_0x360890['root']['rootName']);_0x3246ae[_0x59d6e6]=this['_fixPosition'](_0x360890,_0x3dec22);}if(_0x360890 instanceof vt){const _0x22e13d=_0xe98c3b['get'](_0x360890['root']['rootName']);_0x3246ae[_0x59d6e6]=this['_fixRange'](_0x360890,_0x22e13d);}'root'===_0x59d6e6&&(_0x3246ae['root']=_0xe98c3b['get'](_0x3246ae['root']['rootName']));}}['_fixRange'](_0x11c263,_0x10ee44){return this['editor']['model']['createRange'](this['_fixPosition'](_0x11c263['start'],_0x10ee44),this['_fixPosition'](_0x11c263['end'],_0x10ee44));}['_fixPosition'](_0x5d072b,_0x32a7be){return this['editor']['model']['createPositionFromPath'](_0x32a7be,_0x5d072b['path'],_0x5d072b['stickiness']);}['_handleInsertOperation'](_0x351811){const _0x51c5db=this['_idsRoots']['get'](_0x351811['position']['root']['rootName']),_0x2ee5b3=this['_fixPosition'](_0x351811['position'],_0x51c5db),_0x1f4f12=null===_0x351811['_authorId']?null:_0x351811['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5243c5=_0x2ee5b3['parent'],_0x69c79a=this['_revisionId'],_0x3924ec=[];for(const _0x270cb8 of _0x351811['nodes'])if(_0x270cb8['is']('element'))_0x3924ec['push'](this['_makeIdsRoot'](_0x270cb8));else{for(let _0x209bcb=0x0;_0x209bcb<_0x270cb8['offsetSize'];_0x209bcb++)_0x3924ec['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x1b8989=this['_revisionId'];for(let _0x27fb21=_0x69c79a;_0x27fb21<_0x1b8989;_0x27fb21++)this['_touched']['set'](_0x27fb21,{'userId':_0x1f4f12});_0x5243c5['_insertChild'](_0x2ee5b3['offset'],_0x3924ec);}['_handleMoveOperation'](_0x4264d3){(_0x4264d3=this['_cloneOperation'](_0x4264d3,this['_idsRoots']))['_execute']();const _0x2c9931=null===_0x4264d3['_authorId']?null:_0x4264d3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x197a55=_0x4264d3['getMovedRangeStart'](),_0x74daeb=_0x197a55['parent'],_0x661ecd=_0x197a55['offset'];!function _0x27c091(_0x34b469,_0x210172,_0x5780ff,_0x17c840){for(let _0x67f81f=_0x5780ff;_0x67f81f<_0x17c840;_0x67f81f++){const _0x54f317=_0x210172['getChild'](_0x67f81f);_0x54f317['is']('element','$text')?_0x34b469['set'](_0x54f317['getAttribute']('vid'),{'userId':_0x2c9931}):(_0x34b469['set'](_0x54f317['getAttribute']('vid_start'),{'userId':_0x2c9931}),_0x27c091(_0x34b469,_0x54f317,0x0,_0x54f317['childCount']),_0x34b469['set'](_0x54f317['getAttribute']('vid_end'),{'userId':_0x2c9931}));}}(this['_touched'],_0x74daeb,_0x661ecd,_0x661ecd+_0x4264d3['howMany']);}['_handleMergeOperation'](_0x46d123){const _0xf7bd6e=null===(_0x46d123=this['_cloneOperation'](_0x46d123,this['_idsRoots']))['_authorId']?null:_0x46d123['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x123775=_0x46d123['targetPosition']['parent'],_0x5c6989=_0x46d123['sourcePosition']['parent'],_0x671425=_0x123775['getAttribute']('vid_end'),_0x4c30ea=_0x5c6989['getAttribute']('vid_start');_0x123775['_setAttribute']('vid_end',_0x5c6989['getAttribute']('vid_end')),_0x5c6989['_setAttribute']('vid_end',_0x671425),this['_touched']['set'](_0x4c30ea,{'userId':_0xf7bd6e}),this['_touched']['set'](_0x671425,{'userId':_0xf7bd6e}),_0x46d123['_execute']();}['_handleSplitOperation'](_0x2390d1){const _0x13419d=null===(_0x2390d1=this['_cloneOperation'](_0x2390d1,this['_idsRoots']))['_authorId']?null:_0x2390d1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x293edb=_0x2390d1['graveyardPosition'],_0x499711=_0x2390d1['splitPosition']['parent'];_0x2390d1['_execute']();const _0x462aa2=_0x499711['getAttribute']('vid_end'),_0x18bcbf=_0x2390d1['insertionPosition']['nodeAfter'];if(_0x293edb){const _0x516394=_0x18bcbf['getAttribute']('vid_end'),_0x399590=_0x499711['getAttribute']('vid_end');_0x499711['_setAttribute']('vid_end',_0x516394),_0x18bcbf['_setAttribute']('vid_end',_0x399590),this['_touched']['set'](_0x499711['getAttribute']('vid_end'),{'userId':_0x13419d}),this['_touched']['set'](_0x18bcbf['getAttribute']('vid_start'),{'userId':_0x13419d});}else{const _0xdcd91=this['_revisionId']++,_0x35f5d2=this['_revisionId']++;_0x499711['_setAttribute']('vid_end',_0xdcd91),_0x18bcbf['_setAttribute']('vid_start',_0x35f5d2),_0x18bcbf['_setAttribute']('vid_end',_0x462aa2),this['_touched']['set'](_0xdcd91,{'userId':_0x13419d}),this['_touched']['set'](_0x35f5d2,{'userId':_0x13419d});}}['_handleMarkerOperation'](_0x8599fe){if(!_0x8599fe['affectsData'])return;const _0x3d5d28=(_0x8599fe=this['_cloneOperation'](_0x8599fe,this['_diffRoots']))['oldRange']?_0x8599fe['oldRange']['root']:null,_0x10e8dd=_0x8599fe['newRange']?_0x8599fe['newRange']['root']:null;_0x3d5d28&&this['_markers']['delete'](_0x8599fe['name']),_0x10e8dd&&this['_markers']['set'](_0x8599fe['name'],_0x8599fe['newRange']['clone']());const _0x229a38=null===_0x8599fe['_authorId']?null:_0x8599fe['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x51effb=_0x8599fe['name'];if(!this['_touchedMarkers']['has'](_0x51effb))return void this['_touchedMarkers']['set'](_0x51effb,{'range':_0x8599fe['oldRange'],'userId':_0x229a38});const _0x1932e8=this['_touchedMarkers']['get'](_0x51effb),_0x48097f=_0x1932e8['range'],_0x3e0144=_0x8599fe['newRange'];null==_0x48097f&&null==_0x3e0144||_0x48097f&&_0x3e0144&&_0x48097f['isEqual'](_0x3e0144)?this['_touchedMarkers']['delete'](_0x8599fe['name']):_0x1932e8['userId']=_0x229a38;}['_handleRootOperation'](_0x5255ff,_0x5ab3fa){this['_diffRoots']['has'](_0x5255ff['rootName'])?this['_diffRoots']['get'](_0x5255ff['rootName'])['_isAttached']=_0x5255ff['isAdd']:(this['_diffRoots']['set'](_0x5255ff['rootName'],F(_0x5255ff['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5255ff['rootName'],{}),_0x5ab3fa&&this['_idsRoots']['set'](_0x5255ff['rootName'],F(_0x5255ff['rootName'],!0x0)));const _0x142c31=null===_0x5255ff['_authorId']?null:_0x5255ff['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x27034d=this['_touchedRoots']['get'](_0x5255ff['rootName']);_0x27034d&&_0x27034d['userId']===_0x142c31?this['_touchedRoots']['delete'](_0x5255ff['rootName']):this['_touchedRoots']['set'](_0x5255ff['rootName'],{'userId':_0x142c31,'isAttached':_0x5255ff['isAdd']});}['_handleRootAttributeOperation'](_0x4e81f9){const _0x98627c=this['_diffRootsAttributes']['get'](_0x4e81f9['root']['rootName']);null===_0x4e81f9['newValue']?delete _0x98627c[_0x4e81f9['key']]:_0x98627c[_0x4e81f9['key']]=_0x4e81f9['newValue'];}}function T(_0x4e9cd8){const _0x1160f7=F(_0x4e9cd8['rootName'],_0x4e9cd8['isAttached']());for(const _0x337708 of _0x4e9cd8['getChildren']()){const _0x409dd9=_0x337708['_clone'](!0x0);_0x1160f7['_appendChild'](_0x409dd9);}return _0x1160f7;}function F(_0x3f3d05,_0xd1dfc5=!0x0){const _0x2c4f0a=new mt();return _0x2c4f0a['rootName']=_0x3f3d05,_0x2c4f0a['_isAttached']=_0xd1dfc5,_0x2c4f0a['isAttached']=()=>_0x2c4f0a['_isAttached'],_0x2c4f0a;}function B(_0x30cb47,_0x47ba4a,_0x576741){const _0x3503d0='elementEnd'==_0x30cb47['type']?_0x576741['createPositionAt'](_0x30cb47['item'],'end'):_0x576741['createPositionBefore'](_0x30cb47['item']);return _0x576741['createPositionFromPath'](_0x47ba4a,_0x3503d0['path'],_0x3503d0['stickiness']);}function J(_0x128317,_0x38264,_0x58819f){const _0x50ff62='elementStart'==_0x128317['type']?_0x58819f['createPositionAt'](_0x128317['item'],0x0):_0x58819f['createPositionAfter'](_0x128317['item']);return _0x58819f['createPositionFromPath'](_0x38264,_0x50ff62['path'],_0x50ff62['stickiness']);}class ns extends _0x7889d9{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x47d532,_0x3f4510){super(_0x47d532),this['focusTracker']=new _0x50ff50(),this['keystrokes']=new _0x97bc6d(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3f4510),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'](),_0x383085({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5df474=_0x260ef6=>_0x260ef6['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5df474),this['keystrokes']['set']('arrowleft',_0x5df474),this['keystrokes']['set']('arrowup',_0x5df474),this['keystrokes']['set']('arrowdown',_0x5df474);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x242c4e){this['revisionNameInputView']['fieldView']['element']['value']=_0x242c4e['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xced3d6){const _0x280685=new nt(this['locale'],_0x5147df),_0x3879eb=_0x280685['fieldView'];_0x3879eb['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1b52b3=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0xced3d6&&(_0x1b52b3+='\x20('+m(this['locale'],'optional')+')'),(_0x280685['label']=_0x1b52b3,_0x3879eb['on']('input',()=>{this['revisionNameInputValue']=_0x3879eb['element']['value']['trim']();}),_0x280685);}}class u extends _0x1dcddc{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x5cffdb=this['editor'],_0x161747=_0x5cffdb['plugins']['get']('RevisionTracker');_0x5cffdb['ui']['componentFactory']['add']('revisionHistory',_0xb43454=>{const _0x168828=_0x5d08e6(_0xb43454),_0xac2220=_0x168828['panelView']['children'],_0x351cc5=new te(_0xb43454),_0x448123=new _0x2933a6(_0xb43454),_0x495395=new _0x4eb591(_0xb43454),_0x22c2b6=new _0x2933a6(_0xb43454),_0x251f31=new _0x4eb591(_0xb43454);return _0x168828['bind']('isEnabled')['to'](_0x161747,'isReady',_0x161747,'isEnabled',_0x5cffdb,'isReadOnly',(_0x34c967,_0x227d8d,_0x379b31)=>_0x34c967&&_0x227d8d&&!_0x379b31),_0x168828['buttonView']['set']({'icon':_0x4c3af1['history'],'label':m(_0xb43454,'Revision\x20history'),'tooltip':!0x0}),_0x495395['set']({'label':m(_0xb43454,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x495395['bind']('isEnabled')['to'](_0x161747,'isReady',_0x161747,'isEnabled',_0x5cffdb,'isReadOnly',(_0xe81082,_0xd575b6,_0x1820ec)=>_0xe81082&&_0xd575b6&&!_0x1820ec),_0x495395['on']('execute',()=>this['_showDialog']()),_0x251f31['set']({'label':m(_0xb43454,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x251f31['bind']('isEnabled')['to'](_0x161747,'isReady',_0x5cffdb,'isReadOnly',(_0x40c200,_0x40bbd7)=>_0x40c200&&!_0x40bbd7),_0x251f31['on']('execute',()=>{_0x5cffdb['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x168828['isOpen']=!0x1,_0x5cffdb['editing']['view']['focus']();}),_0x448123['children']['add'](_0x495395),_0x22c2b6['children']['add'](_0x251f31),_0x351cc5['role']='menu',_0x351cc5['items']['addMany']([_0x448123,_0x22c2b6]),_0xac2220['add'](_0x351cc5),_0x168828;}),_0x5cffdb['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x39bb83=this['editor'],_0x3316e6=_0x39bb83['locale'],_0x3c2a1b=new _0x1e4e07(_0x3316e6),_0x4ab33c=new _0x32912f(_0x3316e6);_0x3c2a1b['buttonView']['set']({'icon':_0x4c3af1['history'],'label':m(_0x3316e6,'Revision\x20history')});const _0x4baa8b=new _0x450752(_0x3316e6,_0x3c2a1b),_0x3f7b62=new _0x1d5c43(_0x3316e6);_0x3f7b62['set']({'label':m(_0x3316e6,'Save\x20current\x20revision')}),_0x3f7b62['delegate']('execute')['to'](_0x3c2a1b),_0x3f7b62['on']('execute',()=>{this['_showDialog']();}),_0x4baa8b['children']['add'](_0x3f7b62),_0x4ab33c['items']['add'](_0x4baa8b);const _0x3a706c=new _0x450752(_0x3316e6,_0x3c2a1b),_0x104a1c=new _0x1d5c43(_0x3316e6);return _0x104a1c['set']({'label':m(_0x3316e6,'Open\x20revision\x20history')}),_0x104a1c['delegate']('execute')['to'](_0x3c2a1b),_0x104a1c['on']('execute',()=>{_0x39bb83['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3a706c['children']['add'](_0x104a1c),_0x4ab33c['items']['add'](_0x3a706c),_0x3c2a1b['panelView']['children']['add'](_0x4ab33c),_0x3c2a1b;}['_showDialog'](){const _0x4db930=this['editor'],_0xe3546=_0x4db930['locale'],_0xf5a168=_0x4db930['plugins']['get']('Dialog'),_0x3317cb=_0x4db930['plugins']['get']('RevisionTracker');function _0x2d720b(_0x42cdb4){_0x4db930['config']['get']('revisionHistory.requireRevisionName')&&''===_0x42cdb4['revisionName']?_0x42cdb4['revisionNameInputView']['errorText']=m(_0xe3546,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4db930['plugins']['get'](l)['saveRevision']({'name':_0x42cdb4['revisionName']}),_0xf5a168['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x2d720b(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0xf5a168['show']({'id':'revisionSave','title':m(_0xe3546,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x4db930['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0xf5a168['hide']()},{'label':m(_0x4db930['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4f922e){_0x4f922e['bind']('isEnabled')['to'](_0x3317cb,'isReady',_0x3317cb,'isEnabled',_0x4db930,'isReadOnly',(_0x34c360,_0xca55e6,_0x2b56eb)=>_0x34c360&&_0xca55e6&&!_0x2b56eb);},'onExecute':()=>_0x2d720b(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x5dd5e1=this['editor'],_0xe06e09=_0x5dd5e1['locale'];this['_saveRevisionFormView']=new ns(_0xe06e09,_0x5dd5e1['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x7889d9{['changeId'];['_model'];constructor(_0xbd674f,_0x190ac8){super(_0xbd674f),this['_model']=_0x190ac8,this['changeId']=_0x190ac8['id'];const _0x40dd13=this['bindTemplate'],_0x39b7f9=m(_0xbd674f,_0x190ac8['data']['isSuggestion']?'Suggested\x20by':'add'==_0x190ac8['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x190ac8['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x40dd13['to']('type',_0x182e0f=>'ck-revision-change__'+_0x182e0f)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x39b7f9}]},{'text':'\x20'+_0x190ac8['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x12b2e6(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x5d62e4){super(),this['id']=_0x5d62e4['id']||_0x26665b(),this['author']=_0x5d62e4['author'],this['type']=_0x5d62e4['type'],this['data']=_0x5d62e4['data']||{},this['rootName']=_0x5d62e4['rootName'],this['set']('createdAt',_0x5d62e4['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x14df9f,_0x4f5094){this['newRevisionId']=_0x14df9f,this['oldRevisionId']=_0x4f5094,this['changes']=new _0x1bc718();}['_setChanges'](_0x46d6e7){for(const _0x383577 of _0x46d6e7)this['changes']['add'](_0x383577);}}const Y={'c':_0x5170c6,'a':_0x30922b,'e':_0x229aa9,'r':_0x3f316e,'u':_0x601594};class d extends _0x1dcddc{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x120842,_0x21f525,j];}constructor(_0x884769){super(_0x884769),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x300e2d,_0x549953,_0xd361f9)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x49535b=>{for(const _0x261cff of this['editor']['editing']['view']['document']['roots'])_0xd361f9?_0x49535b['removeClass']('ck-editor__editable__overlay',_0x261cff):_0x49535b['addClass']('ck-editor__editable__overlay',_0x261cff);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x59c06b=>null!==_0x59c06b),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1925ae,_0x49d456,_0x271cd0)=>_0x1925ae&&_0x271cd0?_0x49d456['changes']['getIndex'](_0x271cd0):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x35fa76,_0x4302d8)=>_0x35fa76?_0x4302d8['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x21f525);}['init'](){const _0x29ceb0=this['editor'],_0x47081c=new yt(_0x29ceb0,{'direction':'backward'}),_0x15a7c4=new yt(_0x29ceb0,{'direction':'forward'});(_0x29ceb0['commands']['add']('showPreviousChange',_0x47081c),_0x29ceb0['commands']['add']('showNextChange',_0x15a7c4),_0x29ceb0['commands']['add']('restoreRevision',new _t(_0x29ceb0)),this['on']('change:numberOfChanges',()=>{_0x47081c['refresh'](),_0x15a7c4['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x29ceb0['enableReadOnlyMode']('revision-viewer'),_0x29ceb0['plugins']['has']('WidgetToolbarRepository'))&&_0x29ceb0['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x3cbbca){await this['loadRevisionData'](_0x3cbbca);const _0xf1491={};for(const _0xd808bf in _0x3cbbca['diffData']){if(_0x3cbbca['diffData'][_0xd808bf]['attachChange']&&!_0x3cbbca['diffData'][_0xd808bf]['attachChange']['isAttached'])continue;const _0x276bc9=this['_removeRevisionMarkers'](JSON['parse'](_0x3cbbca['diffData'][_0xd808bf]['insertions'])),_0x599b46=this['editor']['editing']['view']['document'],_0x15d873=new _0x235e5e(_0x599b46,_0x276bc9['map'](_0x47a2ec=>this['_getViewObj'](_0x47a2ec)));this['editor']['data']['processor']['useFillerType']('marked'),_0xf1491[_0xd808bf]=this['editor']['data']['processor']['toData'](_0x15d873),this['editor']['data']['processor']['useFillerType']('default');}return _0xf1491;}async['getRevisionRootsAttributes'](_0x687782){await this['loadRevisionData'](_0x687782);const _0x27e559={};for(const _0x4dab0 in _0x687782['diffData'])_0x687782['diffData'][_0x4dab0]['attachChange']&&!_0x687782['diffData'][_0x4dab0]['attachChange']['isAttached']||(_0x27e559[_0x4dab0]=_0x687782['diffData'][_0x4dab0]['attributesAfter']||{});return _0x27e559;}['_removeRevisionMarkers'](_0x487469){return(_0x487469=_0x487469['filter'](_0x2f7e19=>!_0x2f7e19['name']||'revision-start'!==_0x2f7e19['name']&&'revision-end'!==_0x2f7e19['name']))['forEach'](_0x1055a4=>{'string'!=typeof _0x1055a4&&(_0x1055a4['children']=this['_removeRevisionMarkers'](_0x1055a4['children']),_0x1055a4['attributes']=_0x1055a4['attributes']['filter'](_0x5d37a0=>!_0x5d37a0[0x0]['startsWith']('data-revision-')));}),_0x487469;}async['compare'](_0x25cd17,_0x567030,_0x268c29=!0x1){if(!this['isEnabled'])return;const _0x4258f8=this['diff'],_0x4ab35d=this['repository'],_0x97eee0='string'==typeof _0x25cd17?_0x4ab35d['getRevision'](_0x25cd17):_0x25cd17,_0x5f5d7a='string'==typeof _0x567030?_0x4ab35d['getRevision'](_0x567030):_0x567030,_0xb85064=_0x97eee0['id'],_0x543a88=_0x5f5d7a?_0x5f5d7a['id']:null;if(!_0x268c29&&this['diff']&&this['diff']['newRevisionId']===_0xb85064&&this['diff']['oldRevisionId']===_0x543a88)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0xb85064,_0x543a88);const _0x54c049=this['_getRevisionsRange'](_0x97eee0,_0x5f5d7a,!0x0)['map'](_0x4f5350=>this['loadRevisionData'](_0x4f5350));return _0x54c049['push'](new Promise(_0x20e267=>{setTimeout(_0x20e267,0x14);})),Promise['all'](_0x54c049)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1ba467=this['_getDiff'](_0xb85064,_0x543a88);for(const _0x291b5e of _0x1ba467['changes'])this['_changeIdToChange']['set'](_0x291b5e['id'],_0x291b5e);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x326cd7=>{for(const _0xc87f06 of this['editor']['model']['document']['getRootNames']())_0x326cd7['detachRoot'](_0xc87f06);for(const _0x47ae5f of Object['keys'](_0x1ba467['model'])){const _0x4e3a5d=_0x326cd7['addRoot'](_0x47ae5f);for(const _0x359208 of Object['keys'](_0x1ba467['attributes'][_0x47ae5f]))_0x326cd7['setAttribute'](_0x359208,_0x1ba467['attributes'][_0x47ae5f][_0x359208],_0x4e3a5d);_0x326cd7['insert'](_0x1ba467['model'][_0x47ae5f],_0x4e3a5d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1ba467['changes'])),this['isReady']=!0x0;})['catch'](_0x2d7421=>{console['error'](_0x2d7421),this['_cleanUp'](),_0x4258f8&&(this['diff']=_0x4258f8),this['isReady']=!0x0;});}['addRevisionData'](_0x4180bc,_0x2140ed){const _0x289aa5=this['repository']['createRevision'](_0x4180bc);return _0x289aa5['on']('_update',(_0x206218,_0x8dc874,_0x54d4ae)=>_0x2140ed(_0x8dc874,_0x54d4ae,_0x289aa5)),this['repository']['addRevision'](_0x289aa5),_0x289aa5;}['loadRevisionData'](_0x578bd7){if(!_0x578bd7||_0x578bd7['diffData'])return Promise['resolve']();{const _0x3e9c71=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x3e9c71,'revisionId':_0x578bd7['id']})['then'](_0x3f4d06=>{_0x578bd7['_update']({'diffData':_0x3f4d06['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x93c6fd=>{for(const _0x441048 of this['editor']['model']['document']['getRootNames']())_0x93c6fd['detachRoot'](_0x441048);});}['_sortAndFilterDiffChanges'](_0x13e91f){const _0x51f583=[],_0x241f2=new Map();for(const _0x3b6fed of this['editor']['model']['document']['getRootNames']()){const _0x5d507e=this['editor']['editing']['view']['getDomRoot'](_0x3b6fed);if(!_0x5d507e)continue;const _0x561db0=_0x5d507e['getClientRects']()['item'](0x0);_0x561db0&&(_0x51f583['push'](_0x3b6fed),_0x241f2['set'](_0x3b6fed,_0x561db0));}return _0x51f583['sort']((_0xc7cf9f,_0x47f187)=>{const _0x3b5884=_0x241f2['get'](_0xc7cf9f),_0x134718=_0x241f2['get'](_0x47f187);return _0x3b5884['y']-_0x134718['y']||_0x3b5884['x']-_0x134718['x'];}),(_0x13e91f=_0x13e91f['filter'](_0x2c6d4b=>_0x51f583['includes'](_0x2c6d4b['rootName'])))['sort']((_0x547527,_0x253363)=>_0x51f583['indexOf'](_0x547527['rootName'])-_0x51f583['indexOf'](_0x253363['rootName'])),_0x13e91f;}['_makeTape'](_0x3709fb){const _0x5607a3=Array['from'](_0x3709fb['markers'])['filter'](([_0x263ae8,_0xa42c2d])=>_0x263ae8['startsWith']('revision:')&&!_0xa42c2d['isCollapsed']),_0x2e5df9=Array['from'](this['editor']['model']['createRangeIn'](_0x3709fb)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x5607a3['length'])for(const _0x55252a of _0x2e5df9){const [_0x1ad2ba,_0x4040bc]=_0x5607a3[0x0],[,_0xec8e05,_0x3042f9]=_0x1ad2ba['split'](':');if(_0x4040bc['end']['isEqual'](_0x55252a['nextPosition'])&&_0x5607a3['shift'](),(_0x55252a['previousPosition']['isEqual'](_0x4040bc['start'])||_0x55252a['previousPosition']['isAfter'](_0x4040bc['start']))&&('insertion'==_0xec8e05?_0x55252a['isAdded']={'userId':_0x3042f9}:'deletion'==_0xec8e05&&(_0x55252a['isRemoved']={'userId':_0x3042f9})),0x0==_0x5607a3['length'])break;}return _0x2e5df9;}['_refreshStartEndIndex'](_0xba4525){const _0x31e1f8=new Map();for(let _0xa470a0=0x0;_0xa470a0<_0xba4525['length'];_0xa470a0++)'text'===_0xba4525[_0xa470a0]['type']?(_0xba4525[_0xa470a0]['item']['startIndex']=_0xa470a0,_0xba4525[_0xa470a0]['item']['endIndex']=_0xa470a0):('elementStart'===_0xba4525[_0xa470a0]['type']?_0xba4525[_0xa470a0]['item']['startIndex']=_0xa470a0:'elementEnd'===_0xba4525[_0xa470a0]['type']&&(_0xba4525[_0xa470a0]['item']['endIndex']=_0xa470a0),_0x31e1f8['set'](_0xba4525[_0xa470a0]['id'],_0xa470a0));for(const _0x17cf4f of _0x31e1f8['values']())'elementStart'===_0xba4525[_0x17cf4f]['type']?_0xba4525[_0x17cf4f]['item']['endIndex']=_0x31e1f8['get'](_0xba4525[_0x17cf4f]['pairId']):'elementEnd'===_0xba4525[_0x17cf4f]['type']&&(_0xba4525[_0x17cf4f]['item']['startIndex']=_0x31e1f8['get'](_0xba4525[_0x17cf4f]['pairId']));}['_processTape'](_0x4f38ea){for(let _0x3745d6=0x0;_0x3745d6<_0x4f38ea['length'];_0x3745d6++){if('elementStart'===_0x4f38ea[_0x3745d6]['type'])_0x4f38ea[_0x3745d6]['item']['startIndex']=_0x3745d6;else{if('elementEnd'===_0x4f38ea[_0x3745d6]['type']){_0x4f38ea[_0x3745d6]['item']['endIndex']=_0x3745d6;const _0x3f7851=_0x4f38ea[_0x3745d6]['item']['startIndex'];_0x4f38ea[_0x3f7851]['pairId']=_0x4f38ea[_0x3745d6]['id'],_0x4f38ea[_0x3745d6]['pairId']=_0x4f38ea[_0x3f7851]['id'];}else _0x4f38ea[_0x3745d6]['item']['startIndex']=_0x3745d6,_0x4f38ea[_0x3745d6]['item']['endIndex']=_0x3745d6,_0x4f38ea[_0x3745d6]['pairId']=null;}_0x4f38ea[_0x3745d6]['markersStart']||(_0x4f38ea[_0x3745d6]['markersStart']=[],_0x4f38ea[_0x3745d6]['markersEnd']=[]);}}['_markInsertions'](_0x4bb2fe,_0xdf1334){const _0x5b8115=_0x4bb2fe['filter'](_0x31b6f0=>!_0x31b6f0['isAdded']);for(let _0x243fac=0x0;_0x243fac<_0xdf1334['length'];_0x243fac++)_0xdf1334[_0x243fac]['isAdded']&&(_0x5b8115[_0x243fac]['isAdded']=_0xdf1334[_0x243fac]['isAdded']);}['_makeModelFromViewString'](_0x440cae){const _0x42e0f8=JSON['parse'](_0x440cae),_0x4584a3=this['editor']['editing']['view']['document'],_0x3841d8=new _0x235e5e(_0x4584a3,_0x42e0f8['map'](_0x33c6d7=>this['_getViewObj'](_0x33c6d7)));return this['editor']['data']['toModel'](_0x3841d8);}['_getViewObj'](_0x21e9c3){const _0x2d2f77=this['editor']['editing']['view']['document'];if('string'==typeof _0x21e9c3)return new _0x2d62fe(_0x2d2f77,_0x21e9c3);{const _0x52b840=_0x21e9c3['children']['map'](_0x24624b=>this['_getViewObj'](_0x24624b));return new(Y[_0x21e9c3['type']]||_0x2b2ef8)(_0x2d2f77,_0x21e9c3['name'],_0x21e9c3['attributes'],_0x52b840);}}['_getDiff'](_0x49d89c,_0x4ba441=null){const _0xe818a=this['repository']['getRevision'](_0x49d89c),_0x1adca4=_0x4ba441?this['repository']['getRevision'](_0x4ba441):null,_0xdb221d=this['_getRevisionsRange'](_0xe818a,_0x1adca4),_0x2c8290=_0xdb221d[_0xdb221d['length']-0x1],_0x28797d=new Map(),_0x15ae84={'model':{},'attributes':{},'changes':[]},_0x236ef8=new Set(),_0x3fe530=new Map();for(let _0x4d19e7=_0xdb221d['length']-0x1;_0x4d19e7>=0x0;_0x4d19e7--){const _0x3c6090=_0xdb221d[_0x4d19e7];for(const _0x43240d of Object['keys'](_0x3c6090['diffData']))if(_0x3c6090['diffData'][_0x43240d]['attachChange']){const _0x3b36e0=_0x3c6090['diffData'][_0x43240d]['attachChange'];_0x3b36e0['isAttached']?(_0x236ef8['add'](_0x43240d),_0x3fe530['has'](_0x43240d)&&_0x3fe530['get'](_0x43240d)['userId']==_0x3b36e0['userId']?_0x3fe530['delete'](_0x43240d):_0x3fe530['set'](_0x43240d,_0x3b36e0)):_0x3fe530['has'](_0x43240d)?(_0x236ef8['delete'](_0x43240d),_0x3fe530['delete'](_0x43240d)):(_0x236ef8['add'](_0x43240d),_0x3fe530['set'](_0x43240d,_0x3b36e0));}else _0x236ef8['add'](_0x43240d);}for(const _0x3a5134 of _0x236ef8){const _0x5223fa=_0x3fe530['has'](_0x3a5134)&&!_0x3fe530['get'](_0x3a5134)['isAttached'];let _0x46ff3a=_0x5223fa?_0xdb221d['length']-0x1:0x0;const _0x8cc7be=_0x5223fa?-0x1:0x1;for(;_0xdb221d[_0x46ff3a];){const _0x2b0338=_0xdb221d[_0x46ff3a];if(_0x2b0338['diffData'][_0x3a5134]){const _0x4c6b7b=_0x5223fa?_0x2b0338['diffData'][_0x3a5134]['attributesBefore']:_0x2b0338['diffData'][_0x3a5134]['attributesAfter'];_0x15ae84['attributes'][_0x3a5134]=_0x4c6b7b?_0x8ddc1e(_0x4c6b7b):{};break;}_0x46ff3a+=_0x8cc7be;}}for(const _0x4b216c of _0xdb221d){_0x4b216c['model']={};for(const _0x206a6e of _0x4b216c['authors'])_0x28797d['set'](_0x206a6e['id'],_0x206a6e);for(const _0x4f2b41 of _0x236ef8){const _0x20e539=_0x4b216c['diffData'][_0x4f2b41]?_0x4b216c['diffData'][_0x4f2b41]['insertions']:'[]',_0x33e664=_0x4b216c['diffData'][_0x4f2b41]?_0x4b216c['diffData'][_0x4f2b41]['deletions']:'[]';_0x4b216c['model'][_0x4f2b41]={'insertions':this['_makeModelFromViewString'](_0x20e539),'deletions':this['_makeModelFromViewString'](_0x33e664)};}}for(const _0x55b87a of _0x236ef8){let _0x4be579=null,_0x13e7ab=0x0;const _0x2d2400=new Map(Array['from'](_0xe818a['model'][_0x55b87a]['insertions']['markers'])['filter'](([_0x1d7846])=>!_0x1d7846['startsWith']('revision:')));let _0x34dcb2=0x0;for(const _0x14c8a7 of _0xdb221d){const _0x38ef77=this['_makeTape'](_0x14c8a7['model'][_0x55b87a]['insertions']);_0x14c8a7==_0xe818a?(_0x4be579=_0x38ef77,_0x13e7ab=_0x4be579['length'],_0x4be579['forEach'](_0x15cd37=>{_0x15cd37['id']=_0x34dcb2++;}),this['_processTape'](_0x4be579)):this['_markInsertions'](_0x4be579,_0x38ef77);const _0xeeb193=_0x4be579['filter'](_0x4dc71f=>!_0x4dc71f['isAdded'])['map'](_0x27528f=>_0x27528f['id']);let _0x428889=0x0;const _0x5c6a0a=this['_makeTape'](_0x14c8a7['model'][_0x55b87a]['deletions']);_0x5c6a0a['forEach'](_0x6ce605=>{_0x6ce605['isRemoved']?_0x6ce605['id']=_0x13e7ab++:_0x6ce605['id']=_0xeeb193[_0x428889++];}),this['_processTape'](_0x5c6a0a),this['_setDistance'](_0x4be579,'isAdded'),this['_setDistance'](_0x5c6a0a,'isRemoved'),_0x14c8a7==_0xe818a&&this['_markMarkers'](_0x4be579,_0x2d2400),_0x4be579=this['_joinTapes'](_0x4be579,_0x5c6a0a),this['_refreshStartEndIndex'](_0x4be579),this['_setDistance'](_0x4be579,'isRemoved');}_0x4be579=_0x4be579['filter'](_0x4909e6=>!(_0x4909e6['isAdded']&&_0x4909e6['isRemoved']));const _0x5e2ba2=new Map(_0x2c8290['model'][_0x55b87a]['deletions']['markers']),_0x185b43=new Set(_0x2d2400['keys']());for(const _0x4455eb of _0x5e2ba2['keys']())_0x185b43['delete'](_0x4455eb);this['_markSuggestions'](_0x4be579,_0x185b43),this['_fixObsoleteTags'](_0x4be579),_0x4be579=this['_removeMissingPairs'](_0x4be579),_0x4be579=this['_markMismatchedRemovedTags'](_0x4be579),_0x4be579=this['_removeUnsupportedChanges'](_0x4be579);const {root:_0x63b0fd,changes:_0x28a785}=this['_makeModelFromTape'](_0x4be579,_0x28797d,_0x55b87a);_0x15ae84['model'][_0x55b87a]=_0x63b0fd;const _0x5f4ea1=_0x3fe530['get'](_0x55b87a);if(_0x5f4ea1){const _0x503d2f=_0x28797d['get'](_0x5f4ea1['userId']),_0x1eebc4=new r({'author':_0x503d2f,'type':_0x5f4ea1['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x55b87a});_0x28a785['unshift'](_0x1eebc4),_0x15ae84['attributes'][_0x55b87a]['revisionHistoryAttachChange']=_0x1eebc4['id'];}_0x15ae84['changes']=_0x15ae84['changes']['concat'](_0x28a785);}return _0x15ae84;}['_markMarkers'](_0x338ef2,_0x13784b){for(let _0x3313bf=0x0;_0x3313bf<_0x338ef2['length'];_0x3313bf++)for(const [_0x2aa024,_0x336308]of _0x13784b)_0x336308['start']['isEqual'](_0x338ef2[_0x3313bf]['previousPosition'])&&_0x338ef2[_0x3313bf]['markersStart']['push'](_0x2aa024),_0x336308['end']['isEqual'](_0x338ef2[_0x3313bf]['nextPosition'])&&_0x338ef2[_0x3313bf]['markersEnd']['push'](_0x2aa024);}['_joinTapes'](_0x5f33b8,_0x1763b6){let _0x39f76a=[],_0xf240e6=0x0,_0x2496d2=0x0;for(;_0xf240e6<_0x5f33b8['length']||_0x2496d2<_0x1763b6['length'];){const _0x19aa81=_0x5f33b8[_0xf240e6]||{},_0x28f264=_0x1763b6[_0x2496d2]||{};if(_0x19aa81['id']==_0x28f264['id'])_0xf240e6++,_0x2496d2++,_0x39f76a['push'](_0x19aa81);else{if(_0x28f264['isRemoved']&&_0x19aa81['isAdded']){const {commonTape:_0x5b1d91,iEnd:_0x7e40c5,jEnd:_0x2d0f56}=this['_threeWayMerge'](_0x5f33b8,_0xf240e6,_0x1763b6,_0x2496d2);_0x39f76a=_0x39f76a['concat'](_0x5b1d91),_0xf240e6=_0x7e40c5,_0x2496d2=_0x2d0f56;}else _0x28f264['isRemoved']?(_0x2496d2++,_0x39f76a['push'](_0x28f264)):(_0xf240e6++,_0x39f76a['push'](_0x19aa81));}}return _0x39f76a;}['_markSuggestions'](_0x219e89,_0x382362){const _0x4c47c4=[];for(let _0x347f61=0x0;_0x347f61<_0x219e89['length'];_0x347f61++){for(let _0x132bdc=0x0;_0x132bdc<_0x219e89[_0x347f61]['markersStart']['length'];_0x132bdc++){const _0xf03689=_0x219e89[_0x347f61]['markersStart'][_0x132bdc];if(!_0x382362['has'](_0xf03689))continue;const {group:_0x364919,type:_0x467986,authorId:_0x1af915}=_0x9e561(_0xf03689);'revision-suggestion'!=_0x364919||'insertion'!=_0x467986&&'deletion'!=_0x467986||(_0x4c47c4['unshift']({'type':_0x467986,'name':_0xf03689,'userId':_0x1af915}),_0x219e89[_0x347f61]['markersStart']['splice'](_0x132bdc,0x1),_0x132bdc--);}_0x1c0e7e(_0x219e89[_0x347f61]);for(let _0x325899=0x0;_0x325899<_0x219e89[_0x347f61]['markersEnd']['length'];_0x325899++){const _0x44e364=_0x219e89[_0x347f61]['markersEnd'][_0x325899];if(!_0x382362['has'](_0x44e364))continue;const {group:_0x35058e,type:_0x3e1a29}=_0x9e561(_0x44e364);if('revision-suggestion'!=_0x35058e||'insertion'!=_0x3e1a29&&'deletion'!=_0x3e1a29)continue;_0x219e89[_0x347f61]['markersEnd']['splice'](_0x325899,0x1),_0x325899--;const _0x57475f=_0x4c47c4['findIndex'](_0x53fbd8=>_0x53fbd8['name']==_0x44e364);_0x57475f>-0x1&&_0x4c47c4['splice'](_0x57475f,0x1);}}function _0x9e561(_0x57d7f5){const _0x13fc4f=_0x57d7f5['split'](':');return{'group':_0x13fc4f[0x0],'type':_0x13fc4f[0x1],'subType':_0x13fc4f['length']>=0x5?_0x13fc4f[0x2]:null,'id':_0x13fc4f['length']<0x5?_0x13fc4f[0x2]:_0x13fc4f[0x3],'authorId':_0x13fc4f['length']<0x5?_0x13fc4f[0x3]:_0x13fc4f[0x4],'markerCount':0x6==_0x13fc4f['length']?_0x13fc4f[0x5]:null};}function _0x1c0e7e(_0x1266ce){for(let _0x43b00b=0x0;_0x43b00b<_0x4c47c4['length'];_0x43b00b++){if(_0x1266ce['isAdded']&&'insertion'==_0x4c47c4[_0x43b00b]['type'])return _0x1266ce['isAddSuggestion']=_0x4c47c4[_0x43b00b],void delete _0x1266ce['isAdded'];if(!_0x1266ce['isAdded']&&!_0x1266ce['isRemoved']&&'deletion'==_0x4c47c4[_0x43b00b]['type'])return void(_0x1266ce['isRemoveSuggestion']=_0x4c47c4[_0x43b00b]);}}}['_setDistance'](_0x4e3fad,_0x53e8dd){let _0x550612=0x0,_0xbdf416=!0x1;const _0x43d808=new Map();for(const _0x51565e of _0x4e3fad)_0x51565e[_0x53e8dd]?_0xbdf416&&(_0x550612++,_0xbdf416=!0x1):(_0x550612++,_0xbdf416=!0x0),_0x43d808['set'](_0x51565e['id'],_0x550612);for(let _0x5de8ba=0x0;_0x5de8ba<_0x4e3fad['length'];_0x5de8ba++){if('isRemoved'==_0x53e8dd&&_0x4e3fad[_0x5de8ba]['isAdded']||'isAdded'==_0x53e8dd&&_0x4e3fad[_0x5de8ba]['isRemoved'])continue;if('text'==_0x4e3fad[_0x5de8ba]['type']){_0x4e3fad[_0x5de8ba]['distance']=0x0;continue;}const _0xc43256=_0x43d808['get'](_0x4e3fad[_0x5de8ba]['pairId']),_0x3c12ea=_0x43d808['get'](_0x4e3fad[_0x5de8ba]['id']);_0x4e3fad[_0x5de8ba]['distance']=_0xc43256-_0x3c12ea;}}['_getRevisionsRange'](_0x14f901,_0x528b55,_0x304497=!0x1){const _0x5e6531=[];let _0xff1993=this['repository']['getIndex'](_0x14f901),_0xf48aac=this['repository']['getIndex'](_0x528b55);for(-0x1==_0xf48aac&&(_0xf48aac=this['repository']['_revisions']['length'],_0x304497=!0x1);_0xff1993<_0xf48aac;)_0x5e6531['push'](this['repository']['getRevision'](_0xff1993)),_0xff1993++;return _0x304497&&_0x5e6531['push'](this['repository']['getRevision'](_0xff1993)),_0x5e6531;}['_threeWayMerge'](_0x1e5be6,_0x31143b,_0x3e2c12,_0x10c304){const _0x2b7cfc=this['editor']['model']['schema'];let _0x59f0fc=_0x31143b;for(;_0x1e5be6[_0x59f0fc]&&_0x1e5be6[_0x59f0fc]['isAdded'];)_0x59f0fc++;let _0x5ad4d7=_0x10c304;for(;_0x3e2c12[_0x5ad4d7]&&_0x3e2c12[_0x5ad4d7]['isRemoved'];)_0x5ad4d7++;_0x5501a5(_0x1e5be6,_0x31143b,_0x59f0fc),_0x5501a5(_0x3e2c12,_0x10c304,_0x5ad4d7);const _0x3f0c5c=_0x3e2c12['slice'](_0x10c304,_0x5ad4d7)['concat'](_0x1e5be6['slice'](_0x31143b,_0x59f0fc));return _0x3f0c5c['sort']((_0x977a5a,_0x5bc952)=>_0x977a5a['side']!=_0x5bc952['side']?_0x977a5a['side']-_0x5bc952['side']:_0x977a5a['level']!=_0x5bc952['level']?_0x977a5a['level']-_0x5bc952['level']:_0x977a5a['distance']!=_0x5bc952['distance']?_0x5bc952['distance']-_0x977a5a['distance']:!!_0x977a5a['isAdded']!=!!_0x5bc952['isAdded']?-0x1==_0x977a5a['side']||0x0==_0x977a5a['side']?_0x977a5a['isAdded']?-0x1:0x1:_0x977a5a['isAdded']?0x1:-0x1:_0x977a5a['index']-_0x5bc952['index']),{'commonTape':_0x3f0c5c,'iEnd':_0x59f0fc,'jEnd':_0x5ad4d7};function _0x5501a5(_0x5b9d74,_0x52103e,_0x26a124){let _0x5eb5c9=-0x1,_0x3ecacb=Number['POSITIVE_INFINITY'],_0x1b671a=!0x0;for(let _0x215901=_0x52103e;_0x215901<_0x26a124;_0x215901++)if(_0x2b7cfc['isInline'](_0x5b9d74[_0x215901]['item'])||(_0x1b671a=!0x1),_0x5b9d74[_0x215901]['item']['startIndex']<_0x52103e&&(_0x5eb5c9=_0x215901),_0x5b9d74[_0x215901]['item']['endIndex']>=_0x26a124){_0x3ecacb=_0x215901;break;}_0x1b671a&&(_0x5eb5c9=_0x26a124-0x1);for(let _0x134bb6=_0x52103e;_0x134bb6<_0x26a124;_0x134bb6++)_0x5b9d74[_0x134bb6]['side']=_0x134bb6<=_0x5eb5c9?-0x1:_0x134bb6<_0x3ecacb?0x0:0x1,_0x5b9d74[_0x134bb6]['index']=_0x134bb6;let _0x58b42e=0x0;for(let _0x473dea=_0x52103e;_0x473dea<=_0x5eb5c9;_0x473dea++)0x0==_0x5b9d74[_0x473dea]['distance']?_0x5b9d74[_0x473dea]['level']=_0x58b42e:(_0x58b42e++,_0x5b9d74[_0x473dea]['level']=_0x58b42e,_0x58b42e++);for(let _0xbb4d10=_0x52103e;_0xbb4d10<_0x26a124;_0xbb4d10++)0x0==_0x5b9d74[_0xbb4d10]['side']&&(_0x5b9d74[_0xbb4d10]['level']=_0x58b42e);_0x58b42e=0x0;for(let _0x47c29d=_0x26a124-0x1;_0x47c29d>=_0x3ecacb;_0x47c29d--)0x0==_0x5b9d74[_0x47c29d]['distance']?_0x5b9d74[_0x47c29d]['level']=_0x58b42e:(_0x58b42e--,_0x5b9d74[_0x47c29d]['level']=_0x58b42e,_0x58b42e--);}}['_fixObsoleteTags'](_0x101070){const _0x48d3f5=new Map(),_0x5aa613=this['editor']['model']['schema'];for(let _0x4a8bf4=0x1;_0x4a8bf4<_0x101070['length'];_0x4a8bf4++){let _0x4cc274,_0x7d0a38,_0x5888c4;const _0x3e08f3=_0x101070[_0x4a8bf4],_0x1983aa=_0x101070[_0x4a8bf4-0x1];if('text'==_0x3e08f3['type'])continue;if(_0x3e08f3['type']!=_0x1983aa['type'])continue;if(!_0x5aa613['isBlock'](_0x1983aa['item'])||_0x5aa613['isLimit'](_0x1983aa['item']))continue;if(!_0x5aa613['isBlock'](_0x3e08f3['item'])||_0x5aa613['isLimit'](_0x3e08f3['item']))continue;if((_0x101070[_0x4a8bf4]['isAdded']||_0x101070[_0x4a8bf4]['isAddSuggestion'])&&_0x101070[_0x4a8bf4-0x1]['isRemoved'])_0x4cc274=_0x101070[_0x4a8bf4],_0x7d0a38=_0x101070[_0x4a8bf4-0x1],_0x5888c4=_0x4a8bf4-0x1;else{if(!_0x101070[_0x4a8bf4]['isRemoved']||!_0x101070[_0x4a8bf4-0x1]['isAdded']&&!_0x101070[_0x4a8bf4-0x1]['isAddSuggestion'])continue;_0x4cc274=_0x101070[_0x4a8bf4-0x1],_0x7d0a38=_0x101070[_0x4a8bf4],_0x5888c4=_0x4a8bf4;}const _0x3d0410=_0x4cc274['level']==_0x7d0a38['level'],_0x3da600=Math['abs'](_0x4cc274['level'])<Math['abs'](_0x7d0a38['level'])&&0x0==_0x7d0a38['distance'];(_0x3d0410||_0x3da600)&&(_0x48d3f5['set'](_0x7d0a38['id'],_0x4cc274['id']),_0x101070['splice'](_0x5888c4,0x1),_0x4a8bf4--,_0x4cc274['isAdded']=!0x1);}for(let _0x279b5f=0x0;_0x279b5f<_0x101070['length'];_0x279b5f++)_0x48d3f5['has'](_0x101070[_0x279b5f]['pairId'])&&(_0x101070[_0x279b5f]['pairId']=_0x48d3f5['get'](_0x101070[_0x279b5f]['pairId']));}['_removeMissingPairs'](_0x1e8b4b){const _0x406f29=new Set(_0x1e8b4b['map'](_0x1b3b0e=>_0x1b3b0e['id']));for(let _0xdcb46=0x0;_0xdcb46<_0x1e8b4b['length'];_0xdcb46++)_0x406f29['has'](_0x1e8b4b[_0xdcb46]['pairId'])||0x0==_0x1e8b4b[_0xdcb46]['distance']||(_0x1e8b4b[_0xdcb46]['isIncorrect']=!0x0);return _0x1e8b4b['filter'](_0x41125e=>!_0x41125e['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5567e8){const _0x52c9b7=new Set();for(let _0x3a3442=0x0;_0x3a3442<_0x5567e8['length'];_0x3a3442++){if(_0x52c9b7['has'](_0x5567e8[_0x3a3442]['id'])&&_0x5567e8[_0x3a3442]['isRemoved']&&(_0x5567e8[_0x3a3442]['isIncorrect']=!0x0),_0x5567e8[_0x3a3442]['isIncorrect'])continue;if(0x0==_0x5567e8[_0x3a3442]['distance'])continue;if('elementStart'!=_0x5567e8[_0x3a3442]['type'])continue;if(null==_0x5567e8[_0x3a3442]['pairId'])continue;let _0x57bc6c=_0x3a3442+0x1,_0x25b44c=0x0;for(;_0x5567e8[_0x57bc6c]['id']!=_0x5567e8[_0x3a3442]['pairId'];)'elementStart'==_0x5567e8[_0x57bc6c]['type']?_0x25b44c++:'elementEnd'==_0x5567e8[_0x57bc6c]['type']&&_0x25b44c--,_0x57bc6c++;if(0x0!=_0x25b44c){if(_0x5567e8[_0x3a3442]['isRemoved'])_0x5567e8[_0x3a3442]['isIncorrect']=!0x0;else{for(;_0x57bc6c!=_0x3a3442;)_0x5567e8[_0x57bc6c]['isRemoved']&&0x0!=_0x5567e8[_0x57bc6c]['distance']&&(_0x5567e8[_0x57bc6c]['isIncorrect']=!0x0,_0x52c9b7['add'](_0x5567e8[_0x57bc6c]['pairId'])),_0x57bc6c--;}}}return _0x5567e8['filter'](_0x387e93=>!_0x387e93['isIncorrect']);}['_removeUnsupportedChanges'](_0x482abf){const _0x57c665=this['editor']['model']['schema'];for(let _0x15207d=0x0;_0x15207d<_0x482abf['length'];_0x15207d++){if(!(_0x482abf[_0x15207d]['isAdded']||_0x482abf[_0x15207d]['isAddSuggestion']||_0x482abf[_0x15207d]['isRemoved']||_0x482abf[_0x15207d]['isRemoveSuggestion']))continue;if(0x0==_0x482abf[_0x15207d]['distance'])continue;const _0x258924=_0x482abf[_0x15207d]['item'];_0x57c665['isBlock'](_0x258924)||_0x57c665['isLimit'](_0x258924)||(_0x482abf[_0x15207d]['isAdded']&&delete _0x482abf[_0x15207d]['isAdded'],_0x482abf[_0x15207d]['isAddSuggestion']&&delete _0x482abf[_0x15207d]['isAddSuggestion'],_0x482abf[_0x15207d]['isRemoveSuggestion']&&delete _0x482abf[_0x15207d]['isRemoveSuggestion'],_0x482abf[_0x15207d]['isRemoved']&&(_0x482abf[_0x15207d]['isIncorrect']=!0x0));}return _0x482abf['filter'](_0x4ad56f=>!_0x4ad56f['isIncorrect']);}['_makeModelFromTape'](_0x2c19f2,_0x5402ce,_0x476eac){const _0x3675e2=new mt(),_0x2708a2=[],_0x13b3a3=new Map(),_0x8c37d2=this['editor']['model'],_0x2bd256=_0x8c37d2['schema'],_0xd0253=[_0x3675e2],_0x27771e={},_0x253cf2={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x1cad2c=null;const _0x40119f=[0x0];for(let _0x36e9a0=0x0;_0x36e9a0<_0x2c19f2['length'];_0x36e9a0++)if('elementStart'===_0x2c19f2[_0x36e9a0]['type']){_0x2c19f2[_0x36e9a0]['previousPosition']=_0x8c37d2['createPositionFromPath'](_0x3675e2,_0x40119f);const _0x49c0a8=new ft(_0x2c19f2[_0x36e9a0]['item']['name'],_0x2c19f2[_0x36e9a0]['item']['getAttributes']());_0xd0253[0x0]['_appendChild'](_0x49c0a8),_0x40119f['push'](0x0),_0xd0253['unshift'](_0x49c0a8),_0x2c19f2[_0x36e9a0]['nextPosition']=_0x8c37d2['createPositionFromPath'](_0x3675e2,_0x40119f);}else'elementEnd'===_0x2c19f2[_0x36e9a0]['type']?(_0xd0253['shift'](),_0x2c19f2[_0x36e9a0]['previousPosition']=_0x8c37d2['createPositionFromPath'](_0x3675e2,_0x40119f),_0x40119f['pop'](),_0x40119f[_0x40119f['length']-0x1]++,_0x2c19f2[_0x36e9a0]['nextPosition']=_0x8c37d2['createPositionFromPath'](_0x3675e2,_0x40119f)):(_0x2c19f2[_0x36e9a0]['previousPosition']=_0x8c37d2['createPositionFromPath'](_0x3675e2,_0x40119f),_0x1cad2c?_0x1cad2c['_data']+=_0x2c19f2[_0x36e9a0]['item']['data']:_0x1cad2c=new wt(_0x2c19f2[_0x36e9a0]['item']['data'],_0x2c19f2[_0x36e9a0]['item']['getAttributes']()),_0x2c19f2[_0x36e9a0+0x1]&&'text'===_0x2c19f2[_0x36e9a0+0x1]['type']&&_0x4bb7a3(_0x1cad2c,_0x2c19f2[_0x36e9a0+0x1]['item'])||(_0xd0253[0x0]['_appendChild'](_0x1cad2c),_0x1cad2c=null),_0x40119f[_0x40119f['length']-0x1]+=_0x2c19f2[_0x36e9a0]['item']['offsetSize'],_0x2c19f2[_0x36e9a0]['nextPosition']=_0x8c37d2['createPositionFromPath'](_0x3675e2,_0x40119f));for(let _0x1a7510=0x0;_0x1a7510<_0x2c19f2['length'];_0x1a7510++){const _0x5b87ff=_0x2c19f2[_0x1a7510]['previousPosition'],_0x2af39e=_0x2c19f2[_0x1a7510]['nextPosition'];for(const _0x178d37 of _0x2c19f2[_0x1a7510]['markersStart'])_0x13b3a3['set'](_0x178d37,{'start':_0x5b87ff,'end':null});_0x1270b7('isRemoveSuggestion',_0x1a7510,_0x5b87ff,_0x2af39e),_0x1270b7('isAddSuggestion',_0x1a7510,_0x5b87ff,_0x2af39e),_0x1270b7('isRemoved',_0x1a7510,_0x5b87ff,_0x2af39e),_0x1270b7('isAdded',_0x1a7510,_0x5b87ff,_0x2af39e);for(const _0x2b0d9d of _0x2c19f2[_0x1a7510]['markersEnd']){_0x13b3a3['get'](_0x2b0d9d)['end']=_0x2af39e;}}for(const [_0x4ce7f2,_0xc06035]of _0x13b3a3){const _0x3c35f4=this['editor']['model']['createRange'](_0xc06035['start'],_0xc06035['end']);_0x3675e2['markers']['set'](_0x4ce7f2,_0x3c35f4);}return _0x2708a2['sort']((_0x155d8a,_0x727100)=>{const _0x5acf61=_0x3675e2['markers']['get']('revision:'+_0x155d8a['id']),_0x5a148d=_0x3675e2['markers']['get']('revision:'+_0x727100['id']);return _0x5acf61['start']['isBefore'](_0x5a148d['start'])?-0x1:_0x5acf61['start']['isAfter'](_0x5a148d['start'])?0x1:_0x5acf61['end']['isBefore'](_0x5a148d['end'])?-0x1:_0x5acf61['end']['isAfter'](_0x5a148d['end'])?0x1:'add'===_0x155d8a['type']?-0x1:0x1;}),{'root':_0x3675e2,'changes':_0x2708a2};function _0x1270b7(_0x33936d,_0x59508b,_0x8e05f0,_0x4c10df){const _0x534a3a=!!_0x2c19f2[_0x59508b][_0x33936d],_0x2138a0=_0x534a3a?_0x2c19f2[_0x59508b][_0x33936d]['userId']:null,_0x23e6bd=_0x59508b===_0x2c19f2['length']-0x1,_0x2d1427=_0x253cf2[_0x33936d][0x0],_0x23519a=_0x2bd256['isObject'](_0x2c19f2[_0x59508b]['item']);!_0x27771e[_0x33936d]&&_0x534a3a?_0x27771e[_0x33936d]={'start':_0x8e05f0,'tapeItem':_0x2c19f2[_0x59508b],'userId':_0x2138a0,'type':_0x33936d}:_0x27771e[_0x33936d]&&!_0x534a3a?(_0x27771e[_0x33936d]['end']=_0x8e05f0,_0x30533f(_0x27771e[_0x33936d]),_0x27771e[_0x33936d]=null):_0x27771e[_0x33936d]&&_0x534a3a&&_0x27771e[_0x33936d]['userId']!==_0x2138a0&&(_0x27771e[_0x33936d]['end']=_0x8e05f0,_0x2d1427&&_0x2d1427['userId']===_0x27771e[_0x33936d]['userId']||_0x30533f(_0x27771e[_0x33936d]),_0x27771e[_0x33936d]={'start':_0x8e05f0,'tapeItem':_0x2c19f2[_0x59508b],'userId':_0x2138a0,'type':_0x33936d}),_0x27771e[_0x33936d]&&_0x23519a&&('elementStart'!==_0x2c19f2[_0x59508b]['type']||_0x2d1427&&_0x2d1427['userId']===_0x2138a0||_0x253cf2[_0x33936d]['unshift']({'userId':_0x2138a0,'object':_0x2c19f2[_0x59508b]['item'],'change':_0x27771e[_0x33936d]}),'elementEnd'===_0x2c19f2[_0x59508b]['type']&&_0x2d1427&&_0x2d1427['object']===_0x2c19f2[_0x59508b]['item']&&(_0x253cf2[_0x33936d]['shift'](),_0x27771e[_0x33936d]=_0x2d1427['change'])),_0x27771e[_0x33936d]&&_0x23e6bd&&(_0x27771e[_0x33936d]['end']=_0x4c10df,_0x30533f(_0x27771e[_0x33936d]),_0x27771e[_0x33936d]=null);}function _0x30533f({start:_0x822c13,end:_0x474455,tapeItem:_0x11c522,userId:_0x539917,type:_0x398d76}){const _0x384cdb=_0x11c522['item'],_0x2b9839=_0x8c37d2['schema']['isBlock'](_0x384cdb)&&!_0x8c37d2['schema']['isLimit'](_0x384cdb),_0x4bebd5=_0x822c13['nodeAfter']==_0x474455['parent']&&_0x474455['isAtStart'];if(_0x2b9839&&_0x4bebd5)return;const _0x5ebd70=_0x8c37d2['createRange'](_0x822c13,_0x474455),_0x22a6f7=_0x5402ce['get'](_0x539917),_0x4a2a29=new r({'author':_0x22a6f7,'type':'isAdded'==_0x398d76||'isAddSuggestion'==_0x398d76?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x398d76||'isRemoveSuggestion'==_0x398d76},'createdAt':new Date(),'rootName':_0x476eac});_0x2708a2['push'](_0x4a2a29),_0x3675e2['markers']['set']('revision:'+_0x4a2a29['id'],_0x5ebd70);}function _0x4bb7a3(_0x43b44d,_0x4f71e8){const _0x4bb4cd=_0x43b44d['getAttributes'](),_0x1abea8=_0x4f71e8['getAttributes']();for(const _0x169398 of _0x4bb4cd){if(_0x169398[0x1]!==_0x4f71e8['getAttribute'](_0x169398[0x0]))return!0x1;_0x1abea8['next']();}return _0x1abea8['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x48247a=>{const _0x31884a=_0x48247a['markerName']['split'](':')[0x1],_0x12953b=this['_getChangeFromId'](_0x31884a);if(!_0x12953b)return null;const _0x4e3d4a='add'==_0x12953b['type']?'insertion':'deletion',_0x36324e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4e3d4a];return _0x12953b['data']['isSuggestion']&&_0x36324e['push']('ck-suggestion-marker-'+_0x4e3d4a+'-new'),this['activeChange']==_0x12953b&&_0x36324e['push']('ck-suggestion-marker--active'),{'classes':_0x36324e,'attributes':{'data-change-id':_0x31884a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x592e1a=>{_0x592e1a['on']('element:pre',(_0x28fb87,_0x643f0d,_0x3e69d7)=>{const _0x18234f=_0x643f0d['viewItem']['getChild'](0x0);if(!_0x18234f||!_0x18234f['is']('element','code'))return;if(!_0x3e69d7['consumable']['consume'](_0x18234f,{'attributes':['vid_start','vid_end']}))return;const _0x5eca3d=_0x643f0d['modelRange']['start']['nodeAfter'];_0x3e69d7['writer']['setAttribute']('vid_start',_0x18234f['getAttribute']('vid_start'),_0x5eca3d),_0x3e69d7['writer']['setAttribute']('vid_end',_0x18234f['getAttribute']('vid_end'),_0x5eca3d);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3c5a07=>{_0x3c5a07['on']('element',(_0x394941,_0x3a0e24,_0x3f132d)=>{if(!_0x3f132d['consumable']['consume'](_0x3a0e24['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3a0e24['modelRange']['isCollapsed'])return;const _0x4a30f9=_0x3a0e24['modelRange']['start']['nodeAfter'];_0x4a30f9['hasAttribute']('vid_start')||_0x4a30f9['hasAttribute']('vid')||(_0x3f132d['writer']['setAttribute']('vid_start',_0x3a0e24['viewItem']['getAttribute']('vid_start'),_0x4a30f9),_0x3f132d['writer']['setAttribute']('vid_end',_0x3a0e24['viewItem']['getAttribute']('vid_end'),_0x4a30f9));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x8a95ca=>_0x8a95ca['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3ae482,[,_0x54a049])=>{['vid_start','vid_end','vid']['includes'](_0x54a049)&&(_0x3ae482['return']=!0x0,_0x3ae482['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x12438d=>{_0x12438d['on']('attribute:vid',(_0x1f0c60,_0x4a9693,_0x35e790)=>{if('\x20'!=_0x4a9693['item']['data']||_0x4a9693['item']['parent']['maxOffset']>0x1)return;if(!_0x35e790['consumable']['consume'](_0x4a9693['item'],_0x1f0c60['name']))return;const _0x1498f7=_0x35e790['writer'],_0x5840e1=_0x35e790['mapper']['toViewRange'](_0x4a9693['range']);_0x1498f7['wrap'](_0x5840e1,_0x1498f7['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1359f3){const _0x46a244=_0x1359f3['plugins']['get']('RevisionViewer');return(_0x437efd,_0x11e81e,_0x48d245)=>{const _0x44c15f=_0x11e81e['markerName']['split'](':')[0x1],_0x3ff1e0=_0x46a244['_getChangeFromId'](_0x44c15f);if(!_0x3ff1e0)return null;const _0x50d5ed='add'==_0x3ff1e0['type']?'split':'merge';if(!_0x48d245['consumable']['test'](_0x11e81e['markerRange'],_0x437efd['name']))return;const _0x34920e=_0x11e81e['markerRange']['getWalker'](),_0x2ba9bf=_0x11e81e['markerRange']['start'],_0x37e0e=_0x1359f3['model']['schema'];let _0x2f2026=null,_0x2de506=null,_0x345610=!0x1,_0x541ee0=!0x1;for(const _0x3bb489 of _0x34920e){const _0x3df9cc=_0x3bb489['item'];_0x345610=_0x345610||_0x37e0e['isContent'](_0x3df9cc);const _0x34171b=_0x48d245['mapper']['toViewElement'](_0x3df9cc);if(_0x34171b&&_0x34171b['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3bb489['type']&&(_0x37e0e['isBlock'](_0x3df9cc)&&!_0x37e0e['isLimit'](_0x3df9cc)&&(_0x3df9cc['nextSibling']||_0x2ba9bf['isAtEnd']?_0x2f2026&&_0x2f2026['parent']==_0x3df9cc||(_0x2f2026=_0x3df9cc,_0x91e479(_0x3bb489['previousPosition']),_0x541ee0=!0x0):_0x2de506=_0x2de506||_0x3bb489['previousPosition']));}function _0x91e479(_0x553470){const _0x41c059=_0x48d245['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x50d5ed}),_0x5780b2=_0x48d245['mapper']['toViewPosition'](_0x553470);_0x3ff1e0['data']['isSuggestion']&&_0x48d245['writer']['addClass']('ck-suggestion-marker-'+_0x50d5ed+'-new',_0x41c059),_0x46a244['activeChange']==_0x3ff1e0&&_0x48d245['writer']['addClass']('ck-suggestion-marker--active',_0x41c059),_0x48d245['writer']['insert'](_0x5780b2,_0x41c059),_0x48d245['mapper']['bindElementToMarker'](_0x41c059,_0x11e81e['markerName']);}_0x345610||_0x541ee0||!_0x2de506||_0x91e479(_0x2de506);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x89cd06,_0xb51364,_0x4bf35d)=>{const _0x1d95f3=_0x4bf35d['mapper']['markerNameToElements'](_0xb51364['markerName']);if(_0x1d95f3){for(const _0x13c6e1 of _0x1d95f3)(_0x13c6e1['hasClass']('ck-suggestion-marker-split')||_0x13c6e1['hasClass']('ck-suggestion-marker-merge'))&&(_0x4bf35d['mapper']['unbindElementFromMarkerName'](_0x13c6e1,_0xb51364['markerName']),_0x4bf35d['writer']['remove'](_0x13c6e1));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x21ef13,_0x2bd58d,_0x5d6ce0)=>{const _0x21a923=_0x2bd58d['markerName']['split'](':')[0x1],_0x57e943=this['_getChangeFromId'](_0x21a923);if(!_0x57e943)return null;const _0x5ecc15='add'==_0x57e943['type']?'split':'merge';if(_0x5d6ce0['consumable']['test'](_0x2bd58d['markerRange'],_0x21ef13['name']))for(const _0x96df9e of _0x2bd58d['markerRange']['getItems']()){if(!_0x96df9e['is']('element','softBreak'))continue;const _0xbf4561=_0x5d6ce0['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5ecc15}),_0x2779b9=_0x5d6ce0['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x96df9e));_0x57e943['data']['isSuggestion']&&_0x5d6ce0['writer']['addClass']('ck-suggestion-marker-'+_0x5ecc15+'-new',_0xbf4561),this['activeChange']==_0x57e943&&_0x5d6ce0['writer']['addClass']('ck-suggestion-marker--active',_0xbf4561),_0x5d6ce0['writer']['insert'](_0x2779b9,_0xbf4561),_0x5d6ce0['mapper']['bindElementToMarker'](_0xbf4561,_0x2bd58d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x182d62=>{for(const _0x37f04a of this['editor']['model']['document']['getRootNames']()){const _0x254b98=this['editor']['model']['document']['getRoot'](_0x37f04a),_0x32a20e=this['editor']['editing']['view']['document']['getRoot'](_0x37f04a);if(_0x32a20e){const _0x2f5ea7=_0x254b98['getAttribute']('revisionHistoryAttachChange');if(_0x182d62['removeAttribute']('data-change-id',_0x32a20e),_0x182d62['removeClass']('ck-revision-history-root-add',_0x32a20e),_0x182d62['removeClass']('ck-revision-history-root-remove',_0x32a20e),_0x182d62['removeClass']('ck-revision-history-root--active',_0x32a20e),_0x2f5ea7){const _0xe7147f=this['_getChangeFromId'](_0x2f5ea7);if(!_0xe7147f)return null;_0x182d62['setAttribute']('data-change-id',_0x2f5ea7,_0x32a20e),_0x182d62['addClass']('ck-revision-history-root-'+_0xe7147f['type'],_0x32a20e),this['activeChange']==_0xe7147f&&_0x182d62['addClass']('ck-revision-history-root--active',_0x32a20e);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x5bf642=>'revision-comment:'+_0x5bf642,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1ce841=>'revision-suggestion:'+_0x1ce841,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0xd1ba97=>({'name':'suggestion:'+_0xd1ba97,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xd1abcb=>{const _0x10f0bd=_0xd1abcb['markerName']['split'](':')[0x1];return'insertion'!=_0x10f0bd&&'deletion'!=_0x10f0bd?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x10f0bd]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0xfa68c7,_0xc2cebe,_0x418255)=>{const _0x3a1414=_0x418255['mapper']['markerNameToElements'](_0xc2cebe['markerName']);if(_0x3a1414){for(const _0x1a7886 of _0x3a1414)_0x1a7886['is']('uiElement')&&(_0x418255['mapper']['unbindElementFromMarkerName'](_0x1a7886,_0xc2cebe['markerName']),_0x418255['writer']['remove'](_0x1a7886));}},{'priority':'high'});}['_getChangeFromId'](_0x5733eb){return this['_changeIdToChange']['get'](_0x5733eb);}['_getViewForChange'](_0x5ca95b){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x5ca95b),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x33ebd3,_0x2eef1b,_0x4c2ae9,_0x5639e8)=>{_0x5639e8&&this['_balloon']['remove'](_0x5639e8),_0x4c2ae9&&(this['_balloon']['add']({'view':_0x4c2ae9,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0xfa8a2=this['editor']['editing'],_0xf2e537=this['_getChangeFromId'](_0x4c2ae9['changeId']);let _0x1481b5;if(_0xf2e537['data']['isOnRoot']){const _0x538795=_0xfa8a2['view']['getDomRoot'](_0xf2e537['rootName']);_0x1481b5=Array['from'](_0x538795['getClientRects']());}else{const _0xf3eca6=this['editor']['model']['markers']['get']('revision:'+_0x4c2ae9['changeId']);_0x1481b5=Array['from'](_0xfa8a2['mapper']['markerNameToElements'](_0xf3eca6['name']))['map'](_0x2ba5a4=>_0xfa8a2['view']['domConverter']['mapViewToDom'](_0x2ba5a4))['map'](_0x406393=>Array['from'](_0x406393['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1481b5[0x0];return _0x1481b5['find'](_0x3fd6ff=>_0x3fd6ff['top']-0x3<=this['_activeViewTarget']['y']&&_0x3fd6ff['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3fd6ff['left']-0x3<=this['_activeViewTarget']['x']&&_0x3fd6ff['right']+0x3>=this['_activeViewTarget']['x'])||_0x1481b5[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2a8de9,_0x319d21,_0x444e33,_0x5ec29c)=>{this['activeView']=_0x444e33?this['_getViewForChange'](_0x444e33):null,this['editor']['model']['change'](()=>{const _0x4d2abc=this['editor']['editing'];_0x5ec29c&&(_0x5ec29c['data']['isOnRoot']?_0x4d2abc['view']['change'](_0x5e8294=>{_0x5e8294['removeClass']('ck-revision-history-root--active',_0x4d2abc['view']['document']['getRoot'](_0x5ec29c['rootName']));}):_0x4d2abc['reconvertMarker']('revision:'+_0x5ec29c['id'])),_0x444e33&&(_0x444e33['data']['isOnRoot']?_0x4d2abc['view']['change'](_0x3ae0f3=>{_0x3ae0f3['addClass']('ck-revision-history-root--active',_0x4d2abc['view']['document']['getRoot'](_0x444e33['rootName']));}):_0x4d2abc['reconvertMarker']('revision:'+_0x444e33['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x183501,_0x418f6c)=>{if(this['activeChange'])return;const _0x5c1397=this['_findChangeIdFromDomTarget'](_0x418f6c['target']),_0x4c5e03=this['_changeIdToChange']['get'](_0x5c1397);_0x4c5e03?(this['_activeViewTarget']={'x':_0x418f6c['domEvent']['x'],'y':_0x418f6c['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x4c5e03)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3bf480,_0x766cd9)=>{const _0x4d8792=this['_findChangeIdFromDomTarget'](_0x766cd9['target']),_0x3949c1=this['_changeIdToChange']['get'](_0x4d8792);_0x3949c1?(this['_activeViewTarget']={'x':_0x766cd9['domEvent']['x'],'y':_0x766cd9['domEvent']['y']},_0x3949c1===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x3949c1):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3735e5){do{const _0x37525e=_0x3735e5['getAttribute']('data-change-id');if(_0x37525e)return _0x37525e;_0x3735e5=_0x3735e5['parent'];}while(_0x3735e5);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x417968=>{for(const _0x5ed809 of this['editor']['model']['markers'])_0x417968['removeMarker'](_0x5ed809);});}}function Z(_0xce5647,_0x26fca7){return(_0x415664,_0x2c0691,_0x232932)=>{if(!_0x232932['consumable']['test'](_0x2c0691['markerRange'],_0x415664['name']))return;const _0x286cb7=_0x2c0691['markerRange']['getWalker'](),_0x2af878=_0x2c0691['markerRange']['start'],_0x2aa551=_0xce5647['model']['schema'];let _0x33b068=null,_0x3c7a4a=null,_0x461d58=!0x1,_0x402416=!0x1;for(const _0x4b5378 of _0x286cb7){const _0x843d88=_0x4b5378['item'];_0x461d58=_0x461d58||_0x2aa551['isContent'](_0x843d88);const _0x5a4b54=_0x232932['mapper']['toViewElement'](_0x843d88);if(_0x5a4b54&&_0x5a4b54['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4b5378['type']&&(_0x2aa551['isBlock'](_0x843d88)&&!_0x2aa551['isLimit'](_0x843d88)&&(_0x843d88['nextSibling']||_0x2af878['isAtEnd']?_0x33b068&&_0x33b068['parent']==_0x843d88||(_0x33b068=_0x843d88,_0x239178(_0x4b5378['previousPosition']),_0x402416=!0x0):_0x3c7a4a=_0x3c7a4a||_0x4b5378['previousPosition']));}function _0x239178(_0x4c7386){const _0x252dba=_0x232932['mapper']['toViewPosition'](_0x4c7386),_0x1e33d2=_0x232932['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x26fca7});_0x232932['writer']['insert'](_0x252dba,_0x1e33d2),_0x232932['mapper']['bindElementToMarker'](_0x1e33d2,_0x2c0691['markerName']);}_0x461d58||_0x402416||!_0x3c7a4a||_0x239178(_0x3c7a4a);};}class _t extends _0x26805d{constructor(_0x39f58e){super(_0x39f58e);const _0x54873f=_0x39f58e['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x54873f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x54873f,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4ca842=this['editor'],_0x302443=_0x4ca842['plugins']['get'](d),_0x4e8995=_0x302443['isReady']?_0x302443['diff']['newRevisionId']:null;_0x4ca842['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4e8995);}['refresh'](){const {isReady:_0x31c2eb,isEnabled:_0x2dd8b6,repository:_0x5189a9,diff:_0x4db387}=this['editor']['plugins']['get'](d),_0x31f768=_0x4db387&&_0x5189a9['getLaterVisibleRevision'](_0x4db387['newRevisionId']);this['isEnabled']=_0x31c2eb&&_0x2dd8b6&&Boolean(_0x31f768);}}class yt extends _0x26805d{['_step'];constructor(_0x537031,{direction:_0x18cc11}){super(_0x537031);const _0x1be6cf=_0x537031['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x18cc11?0x1:-0x1,this['listenTo'](_0x1be6cf,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1be6cf,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1be6cf,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x130a08=this['editor'],_0x2659fe=_0x130a08['plugins']['get'](d),{isNavigationMode:_0x13846f,currentChangeNumber:_0x453614}=_0x2659fe;let _0x336287;if(_0x2659fe['activeChange']=_0x13846f?_0x2659fe['diff']['changes']['get'](_0x453614+this['_step']):_0x2659fe['diff']['changes']['first'],_0x2659fe['activeChange']['data']['isOnRoot'])_0x336287=_0x130a08['editing']['view']['getDomRoot'](_0x2659fe['activeChange']['rootName']);else{const _0x2bcc7c=_0x130a08['model']['markers']['get']('revision:'+_0x2659fe['activeChange']['id']);_0x336287=_0xa998b0(_0x130a08['editing'],_0x2bcc7c);}_0x518268({'target':_0x336287,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5b1496,currentChangeNumber:_0x41ee74,numberOfChanges:_0x1ec3b2,isReady:_0x41fad2,isEnabled:_0x4b2542}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x4b2542&&_0x41fad2&&_0x1ec3b2)&&(!_0x5b1496||(0x1===this['_step']?_0x41ee74<_0x1ec3b2-0x1:_0x41ee74>0x0));}}class _i extends _0x7889d9{constructor(_0xb31cd4){super(_0xb31cd4);const _0xf4a232=this['bindTemplate'],_0x49f3f1=new _0x4eb591(_0xb31cd4),_0x4ff7d2=new _0x4eb591(_0xb31cd4);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',(_0x4f6d9c,_0x19546d)=>_0x4f6d9c&&_0x19546d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x55fad9,_0x260abf,_0x2a759f,_0x59e122)=>{if(!_0x55fad9)return m(_0xb31cd4,'Loading...');if(!_0x2a759f)return m(_0xb31cd4,'No\x20changes');const _0x407608=m(_0xb31cd4,'NUMBER_OF_CHANGES',_0x2a759f);return _0x59e122?m(_0xb31cd4,'X_OF_Y_CHANGES',[_0x260abf+0x1,_0x2a759f]):_0x407608;}),_0x49f3f1['set']({'label':m(_0xb31cd4,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x4ff7d2['set']({'label':m(_0xb31cd4,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x49f3f1['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4ff7d2['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x49f3f1['on']('execute',()=>this['fire']('execute','backward')),_0x4ff7d2['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',_0xf4a232['if']('_isStatusLabelVisible','ck-hidden',_0x4a19a0=>!_0x4a19a0)]},'children':[{'text':_0xf4a232['to']('isNavigationMode',_0x45bb26=>_0x45bb26?m(_0xb31cd4,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0xb31cd4,'Total')+':\x20')}]},{'text':_0xf4a232['to']('_statusText')}]},new _0x41df2c(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x49f3f1,_0x4ff7d2]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x1dcddc{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x18a908=this['editor']['editing']['view'];_0x18a908['change'](_0x123b90=>{for(const _0x22ca79 of _0x18a908['document']['roots'])_0x123b90['addClass'](ce,_0x22ca79);});}['hide'](){const _0x337f7c=this['editor']['editing']['view'];_0x337f7c['change'](_0x59138a=>{for(const _0x2fae7d of _0x337f7c['document']['roots'])_0x59138a['removeClass'](ce,_0x2fae7d);});}}class g extends _0x1dcddc{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0xbe9b94=this['editor'],_0x11c38b=_0xbe9b94['plugins']['get'](d),_0x3d4cb3=_0xbe9b94['plugins']['get'](le);_0xbe9b94['ui']['componentFactory']['add']('exitToEditing',_0x3a71c4=>{const _0x473d2d=new _0x4eb591(_0x3a71c4);return _0x473d2d['set']({'label':m(_0x3a71c4,'Back\x20to\x20editing'),'icon':_0x4c3af1['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x473d2d,'execute',()=>{_0xbe9b94['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x473d2d;}),_0xbe9b94['ui']['componentFactory']['add']('restoreRevision',_0x2245cc=>{const _0x29edc8=new _0x4eb591(_0x2245cc);return _0x29edc8['set']({'label':m(_0x2245cc,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x29edc8['bind']('isEnabled')['to'](_0xbe9b94['commands']['get']('restoreRevision')),this['listenTo'](_0x29edc8,'execute',()=>_0xbe9b94['execute']('restoreRevision')),_0x29edc8;}),_0xbe9b94['ui']['componentFactory']['add']('changesNavigation',_0x4e0f5b=>{const _0x8f992b=new _i(_0x4e0f5b),_0x3f5f40=_0xbe9b94['commands']['get']('showPreviousChange'),_0x5acdbd=_0xbe9b94['commands']['get']('showNextChange');return _0x8f992b['bind']('isBackwardNavigationEnabled')['to'](_0x3f5f40,'isEnabled'),_0x8f992b['bind']('isForwardNavigationEnabled')['to'](_0x5acdbd,'isEnabled'),_0x8f992b['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x11c38b),this['listenTo'](_0x8f992b,'execute',(_0x226672,_0x3839f1)=>{_0xbe9b94['execute']('forward'===_0x3839f1?'showNextChange':'showPreviousChange');}),_0x8f992b;}),_0x3d4cb3['show'](),_0x11c38b['on']('change:isReady',(_0x38a07d,_0x422ae8,_0x1e6e78)=>{_0x1e6e78?_0x3d4cb3['hide']():_0x3d4cb3['show']();});}}class pt extends nt{['_resizeObserver']=null;constructor(_0x148b39,_0x18e4ad){super(_0x148b39,_0x18e4ad);const _0x1562bc=this['bindTemplate'];this['set']({'label':m(_0x148b39,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x148b39,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x1562bc['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 _0x3f6f3e=this['fieldView']['element'];this['_tooltipString']=_0x3f6f3e['scrollWidth']>_0x3f6f3e['clientWidth']&&_0x3f6f3e['value']||'';}}class ti extends _0x7889d9{constructor(_0xc6b10c,_0x37ec8a,_0x21de80){super(_0xc6b10c);const _0x7bcf43=new _0x17fb42();_0x7bcf43['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x22225e=['ck','ck-revision-history-sidebar__revision-author'];_0x21de80&&_0x22225e['push']('ck-revision-history-sidebar__revision-author_creator');const _0xbdd5b7=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0xc6b10c,_0x21de80?'Revision\x20creator':'Revision\x20author')},'children':[_0x7bcf43,_0x37ec8a['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x22225e},'children':_0xbdd5b7});}}function ni(_0x580b5f,_0x3153cc){const _0x3437c3=_0x580b5f['bindTemplate'],_0x4856a1=_0x580b5f['locale'],_0x5614e8=_0x5d08e6(_0x4856a1);_0x5614e8['panelPosition']='sw';const _0x371a5b=function(_0x1708b3,_0x43a114){const _0x417587=function(_0x14baf2,_0x44b874){const _0x16b531=_0x14baf2['locale'],_0x5e940c={'Compare\x20against\x20selected':m(_0x16b531,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x16b531,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x16b531,'Restore\x20this\x20revision')};return _0x44b874['map'](_0x5f2d9c=>{const _0xf9f9ee=_0x5e940c[_0x5f2d9c['name']];return _0xf9f9ee&&_0xf9f9ee!==_0x5f2d9c['name']&&(_0x5f2d9c['name']=_0xf9f9ee),_0x5f2d9c;});}(_0x1708b3,_0x43a114),_0x37fab6=new _0x1bc718();for(const _0x3cc470 of _0x417587){const _0x44e1e0={'type':'button','model':new to({'label':_0x3cc470['name'],'class':_0x3cc470['class'],'withText':!0x0,'role':'menuitem','_action':_0x3cc470['action']})};_0x44e1e0['model']['bind']('isEnabled')['to'](_0x1708b3,'isActionsDropdownOpen',_0x143f03=>'function'!=typeof _0x3cc470['isEnabled']||(!_0x143f03||_0x3cc470['isEnabled'](_0x1708b3))),_0x37fab6['add'](_0x44e1e0);}return _0x37fab6;}(_0x580b5f,_0x3153cc);return _0x580b5f['bind']('isActionsDropdownOpen')['to'](_0x5614e8,'isOpen'),_0x5614e8['buttonView']['set']({'label':m(_0x4856a1,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x4c3af1['threeVerticalDots']}),_0x5614e8['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3437c3['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3437c3['to'](_0xa199e0=>_0xa199e0['stopPropagation']())}}),_0x5614e8['on']('execute',_0x190ad9=>{_0x580b5f['isReady']&&'function'==typeof _0x190ad9['source']['_action']&&_0x190ad9['source']['_action'](_0x580b5f);}),_0x5db666(_0x5614e8,_0x371a5b,{'role':'menu'}),_0x5614e8['listenTo'](_0x580b5f,'change:isActionsDropdownOpen',(_0x3aa8ba,_0x2a45bc,_0x441df2)=>{if(_0x441df2)for(const _0x2b3954 of _0x5614e8['listView']['items']){const _0x5563b3=_0x2b3954['children']['first'],_0x16c1de=_0x3153cc['find'](_0x14142a=>_0x14142a['action']===_0x5563b3['_action'])['isVisible'];_0x2b3954['isVisible']=void 0x0===_0x16c1de||_0x16c1de(_0x580b5f);}}),_0x5614e8;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x2a5857,uid as _0x1956ee,Collection as _0x31c62c,logWarning as _0x2b939c,FocusTracker as _0x2e779e,KeystrokeHandler as _0x15fa03,scrollViewportToShowTarget as _0x19c568,ResizeObserver as nt,ElementReplacer as ht,CKEditorError as _0xfd894b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x1f4985,set as _0x32d10b,unset as _0x32cff7,isEqual as _0x6b44e1}from'lodash-es';import{Plugin as _0x2c5c18,PendingActions as _0x63e2a1,icons as _0x2bd20b,Command as _0x38e84c,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x7c88bc,getMarkerDomElement as _0x4cc2ac,ConfirmMixin as ti,sanitizeEditorConfig as _0xbf95a9}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x469a15,ViewText as _0x2750d6,ViewElement as _0x37bd31,Element as ft,Range as vt,Position as gt,DocumentFragment as mt,ViewContainerElement as _0x5c1362,ViewAttributeElement as _0x18e29a,ViewEmptyElement as _0x75b35a,ViewRawElement as _0x73cc,ViewUIElement as _0x24b245,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x59fc7b,submitHandler as _0x555b07,LabeledFieldView as _0x10b4fb,createLabeledInputText as _0x4d4b85,createDropdown as _0x5ecf4f,ListView as _0x5f2164,ListItemView as _0x5d4f84,ButtonView as te,MenuBarMenuView as _0x1db517,MenuBarMenuListView as _0x1d8128,MenuBarMenuListItemView as _0x2f0393,MenuBarMenuListItemButtonView as _0x5839df,ContextualBalloon as _0x419539,ToolbarSeparatorView as _0x533f92,IconView as _0x310cef,addListToDropdown as to,ViewModel as _0x1b631c,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x1fc178}from'luxon';class a extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2a5857(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x318677){super(),this['id']=_0x318677['id']||_0x1956ee(),this['creator']=_0x318677['creator']||null,this['authors']=_0x318677['authors']||[],this['diffData']=_0x318677['diffData']||null,this['toVersion']=_0x318677['toVersion']||0x0,this['fromVersion']=_0x318677['fromVersion']||0x0,this['set']('name',_0x318677['name']||''),this['set']('createdAt',_0x318677['createdAt']||new Date()),this['set']('attributes',_0x318677['attributes']||{});}['setName'](_0x125073){this['_update']({'name':_0x125073});}['setAttribute'](_0x2cbbe3,_0x2cbe1a){const _0x1bb1dd=_0x1f4985(this['attributes']);_0x32d10b(_0x1bb1dd,_0x2cbbe3,_0x2cbe1a),this['_update']({'attributes':_0x1bb1dd});}['removeAttribute'](_0x2d92df){const _0x43a2b7=_0x1f4985(this['attributes']);_0x32cff7(_0x43a2b7,_0x2d92df),this['_update']({'attributes':_0x43a2b7});}['_update'](_0x422ca2,_0xc98923=!0x1){let _0x369aad=!0x1;const _0x34cf82={'id':this['id']},_0xf39e1c=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x286680 of _0xf39e1c){const _0x374ca7=_0x422ca2[_0x286680];void 0x0!==_0x374ca7&&_0x374ca7!==this[_0x286680]&&(this[_0x286680]=_0x374ca7,_0x34cf82[_0x286680]=_0x374ca7,_0x369aad=!0x0);}_0x369aad&&(_0x34cf82['authors']&&(_0x34cf82['authorsIds']=_0x34cf82['authors']['map'](_0xc0e46b=>_0xc0e46b['id']),delete _0x34cf82['authors']),this['fire']('_update',_0x34cf82,_0xc98923));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x38197f=>_0x38197f['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x2c5c18{['_revisions'];static get['requires'](){return[_0x7c88bc];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xa931e2){super(_0xa931e2),this['_revisions']=new _0x31c62c();}['afterInit'](){!async function(_0x3a4062){const _0x4267c2=_0x1c6fed([0x30,0x34,0x63,0x56,0x66,0x4a,0x4e,0x38,0x43,0x55,0x50,0x6f,0x68,0x5a,0x61,0x7a,0x75,0x62,0x79,0x32,0x78,0x44,0x47,0x48,0x71,0x73,0x49,0x39,0x6b,0x46,0x4c,0x67,0x33,0x4d,0x41,0x76,0x6e,0x6c,0x37,0x6d,0x51,0x42,0x4b,0x45,0x70,0x58,0x53,0x6a,0x72,0x77,0x52,0x69,0x74,0x64,0x57,0x54,0x65,0x35,0x36,0x4f,0x31,0x59]),_0x2781d3=0xeb829,_0x2bd8fa=0x6d2aad51,_0x1ebbea=0x6d2df341^_0x2bd8fa,_0x3834b3=window[_0x1c6fed([0x44,0x61,0x74,0x65])][_0x1c6fed([0x6e,0x6f,0x77])](),_0x1f0bd5=_0x3a4062[_0x1c6fed([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x462b4e=new window[(_0x1c6fed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2fdf43=>{_0x1f0bd5[_0x1c6fed([0x6f,0x6e,0x63,0x65])](_0x1c6fed([0x72,0x65,0x61,0x64,0x79]),_0x2fdf43);}),_0xa5ba69={[_0x1c6fed([0x6b,0x74,0x79])]:_0x1c6fed([0x45,0x43]),[_0x1c6fed([0x75,0x73,0x65])]:_0x1c6fed([0x73,0x69,0x67]),[_0x1c6fed([0x63,0x72,0x76])]:_0x1c6fed([0x50,0x2d,0x32,0x35,0x36]),[_0x1c6fed([0x78])]:_0x1c6fed([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]),[_0x1c6fed([0x79])]:_0x1c6fed([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]),[_0x1c6fed([0x61,0x6c,0x67])]:_0x1c6fed([0x45,0x53,0x32,0x35,0x36])},_0x302c81=_0x1f0bd5[_0x1c6fed([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1c6fed([0x67,0x65,0x74])](_0x1c6fed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3f6b28(){let _0x1b82f8,_0x31dad4=null,_0x2888b4=null;try{if(_0x302c81==_0x1c6fed([0x47,0x50,0x4c]))return _0x1c6fed([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1b82f8=_0xfca79c(),!_0x1b82f8)return _0x1c6fed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1b82f8[_0x1c6fed([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2888b4=_0xcb756e(_0x1b82f8[_0x1c6fed([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1b82f8[_0x1c6fed([0x6a,0x74,0x69])])),await _0x2c9f77()?_0x52103c()?_0x517bee()?_0x1c6fed([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e20b3()?(_0x1b82f8[_0x1c6fed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c6fed([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x31dad4=_0x3541bb(_0x1c6fed([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1b82f8[_0x1c6fed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c6fed([0x74,0x72,0x69,0x61,0x6c])&&(_0x31dad4=_0x3541bb(_0x1c6fed([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4660e6()):_0x1c6fed([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1c6fed([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1c6fed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4252e4){return _0x1c6fed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x517bee(){const _0x4b1de3=[_0x1c6fed([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1c6fed([0x74,0x72,0x69,0x61,0x6c])][_0x1c6fed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b82f8[_0x1c6fed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3834b3/0x3e8:0xe10*_0x1ebbea;return _0x1b82f8[_0x1c6fed([0x65,0x78,0x70])]<_0x4b1de3;}function _0x52103c(){const _0x511423=_0x1b82f8[_0x1c6fed([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x511423)return!0x1;if(_0x511423[_0x1c6fed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6fed([0x2a])))return!0x0;if(_0x511423[_0x1c6fed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6fed([0x52,0x48])))return!0x0;if(_0x511423[_0x1c6fed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6fed([0x52,0x52,0x48]))){if(_0x4416d6())return!0x0;if(_0x78d6d5()||_0x12a324())return!0x0;}return!0x1;}function _0x1e20b3(){const _0x4b2cd3=_0x1b82f8[_0x1c6fed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4b2cd3||0x0==_0x4b2cd3[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x130249}=new URL(window[_0x1c6fed([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4b2cd3[_0x1c6fed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x130249))return!0x0;const _0x48c98e=_0x130249[_0x1c6fed([0x73,0x70,0x6c,0x69,0x74])](_0x1c6fed([0x2e]));return _0x4b2cd3[_0x1c6fed([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1ab25b=>_0x1ab25b[_0x1c6fed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6fed([0x2a])))[_0x1c6fed([0x6d,0x61,0x70])](_0x2060c3=>_0x2060c3[_0x1c6fed([0x73,0x70,0x6c,0x69,0x74])](_0x1c6fed([0x2e])))[_0x1c6fed([0x73,0x6f,0x6d,0x65])](_0x4f7216=>_0x48c98e[_0x1c6fed([0x65,0x76,0x65,0x72,0x79])]((_0x5d7adc,_0x481e67)=>_0x4f7216[_0x481e67]===_0x5d7adc||_0x4f7216[_0x481e67]===_0x1c6fed([0x2a])));}function _0x4660e6(){return _0x31dad4&&_0x2888b4?new window[(_0x1c6fed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x48f75f,_0x52fb84)=>{_0x31dad4[_0x1c6fed([0x74,0x68,0x65,0x6e])](_0x48f75f,_0x52fb84),_0x2888b4[_0x1c6fed([0x74,0x68,0x65,0x6e])](_0x132bb3=>{_0x132bb3!=_0x1c6fed([0x56,0x61,0x6c,0x69,0x64])&&_0x48f75f(_0x132bb3);},_0x52fb84);}):_0x31dad4||_0x2888b4||_0x1c6fed([0x56,0x61,0x6c,0x69,0x64]);}}function _0xcb756e(_0xabd9c0,_0x59f547){return new window[(_0x1c6fed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9fc98b=>{if(_0x393680())return _0x9fc98b(_0x1c6fed([0x56,0x61,0x6c,0x69,0x64]));_0x1484bb(),_0x1f0bd5[_0x1c6fed([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1c6fed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4af541=!0x1;const _0x105c71=_0x1956ee();function _0x3abc3a(_0x185e9b){return!!_0x185e9b&&(typeof _0x185e9b===_0x1c6fed([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x185e9b===_0x1c6fed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x185e9b[_0x1c6fed([0x74,0x68,0x65,0x6e])]===_0x1c6fed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x185e9b[_0x1c6fed([0x63,0x61,0x74,0x63,0x68])]===_0x1c6fed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x15c84a(_0x5d7b34){_0x44a925(_0x5d7b34)[_0x1c6fed([0x74,0x68,0x65,0x6e])](_0x5e9943=>{if(!_0x5e9943||_0x5e9943[_0x1c6fed([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1c6fed([0x6f,0x6b]))return _0x1c6fed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2ed8d5(_0x474edc(_0x105c71+_0x59f547))!=_0x5e9943[_0x1c6fed([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1c6fed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1c6fed([0x56,0x61,0x6c,0x69,0x64]);})[_0x1c6fed([0x74,0x68,0x65,0x6e])](_0x42560c=>(_0x41fd8c(),_0x42560c),()=>{const _0xfdc2ae=_0x303c86();return null==_0xfdc2ae?(_0x41fd8c(),_0x1c6fed([0x56,0x61,0x6c,0x69,0x64])):_0x1c6fed(_0x3834b3-_0xfdc2ae>(0x49262951^_0x2bd8fa)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1c6fed([0x74,0x68,0x65,0x6e])](_0x9fc98b)[_0x1c6fed([0x63,0x61,0x74,0x63,0x68])](()=>{_0x9fc98b(_0x1c6fed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5ea92d=0x6d1c43d1^_0x2bd8fa;function _0x41fd8c(){const _0x8044a=_0x1c6fed([0x6c,0x6c,0x63,0x74,0x2d])+_0x2ed8d5(_0x474edc(_0xabd9c0)),_0x7b98d8=_0x241e34(_0x2ed8d5(window[_0x1c6fed([0x4d,0x61,0x74,0x68])][_0x1c6fed([0x63,0x65,0x69,0x6c])](_0x3834b3/_0x5ea92d)));window[_0x1c6fed([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c6fed([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x8044a,_0x7b98d8);}function _0x303c86(){const _0x578ab1=_0x1c6fed([0x6c,0x6c,0x63,0x74,0x2d])+_0x2ed8d5(_0x474edc(_0xabd9c0)),_0x1ea8bc=window[_0x1c6fed([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c6fed([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x578ab1);return _0x1ea8bc?window[_0x1c6fed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x241e34(_0x1ea8bc),0x10)*_0x5ea92d:null;}function _0x44a925(_0x4897c9){return new window[(_0x1c6fed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x559c11,_0x316c9f)=>{_0x4897c9[_0x1c6fed([0x74,0x68,0x65,0x6e])](_0x559c11,_0x316c9f),window[_0x1c6fed([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x316c9f,0x6d2b7991^_0x2bd8fa);});}}_0x1f0bd5[_0x1c6fed([0x6f,0x6e])](_0x1c6fed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x539530,_0x4e070f)=>{if(_0x4e070f[0x0]!=_0xabd9c0)return _0x9fc98b(_0x1c6fed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4e070f[0x1]={..._0x4e070f[0x1],[_0x1c6fed([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x105c71};},{[_0x1c6fed([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c6fed([0x68,0x69,0x67,0x68])}),_0x1f0bd5[_0x1c6fed([0x6f,0x6e])](_0x1c6fed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5483b1=>{_0x3abc3a(_0x5483b1[_0x1c6fed([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4af541=!0x0,_0x15c84a(_0x5483b1[_0x1c6fed([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1c6fed([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c6fed([0x6c,0x6f,0x77])}),_0x462b4e[_0x1c6fed([0x74,0x68,0x65,0x6e])](()=>{_0x4af541||_0x9fc98b(_0x1c6fed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x393680(){return _0x1f0bd5[_0x1c6fed([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c6fed([0x76,0x69,0x65,0x77])][_0x1c6fed([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1c6fed([0x61,0x75,0x74,0x6f]);}function _0x1484bb(){_0x1f0bd5[_0x1c6fed([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c6fed([0x76,0x69,0x65,0x77])][_0x1c6fed([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1c6fed([0x61,0x75,0x74,0x6f]);}}function _0x3541bb(_0x30f2df){const _0x5774be=[new window[(_0x1c6fed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x108aa6=>setTimeout(_0x108aa6,0x6d23939d^_0x2bd8fa)),_0x462b4e[_0x1c6fed([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1c6fed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1db96a=>{const _0x382668=0x6d2aad56^_0x2bd8fa,_0x5a35e5=_0x3a4062[_0x1c6fed([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x13735e(){_0x5a35e5[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x382668&&_0x1db96a();}_0x13735e(),_0x5a35e5[_0x1c6fed([0x6f,0x6e])](_0x1c6fed([0x61,0x64,0x64]),_0x13735e);})),new window[(_0x1c6fed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x181509=>{function _0x3489ab(){for(const _0x22157b in window)if(window[_0x1c6fed([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x1c6fed([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x22157b))&&window[_0x22157b]==_0x2781d3)return _0x181509();_0x1f0bd5[_0x1c6fed([0x73,0x74,0x61,0x74,0x65])]!=_0x1c6fed([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x1c6fed([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3489ab,0x6d2abed9^_0x2bd8fa);}_0x2bf777(_0x1c6fed([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3489ab();})];return window[_0x1c6fed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1c6fed([0x72,0x61,0x63,0x65])](_0x5774be)[_0x1c6fed([0x74,0x68,0x65,0x6e])](()=>_0x30f2df);}async function _0x4a4ef0(){if(await _0x462b4e,_0x2bf777(_0x1c6fed([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x548314=_0x3a4062[_0x1c6fed([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x32b10b=_0x3a4062[_0x1c6fed([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])](_0x548314[_0x1c6fed([0x69,0x64])]),_0x44ff8b=_0x4581f3(_0x1c6fed([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x44ff8b[_0x1c6fed([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x548314['id'],_0x32b10b?_0x32b10b['id']:null,!0x0),_0x44ff8b[_0x1c6fed([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1c6fed([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x44ff8b[_0x1c6fed([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x44ff8b[_0x1c6fed([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x5e2c22,void(_0x44ff8b[_0x1c6fed([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x5e2c22);}if(_0x2bf777(_0x1c6fed([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x3c7104=_0x4581f3(_0x1c6fed([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x3c7104[_0x1c6fed([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1c6fed([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3c7104[_0x1c6fed([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3c7104[_0x1c6fed([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x5e2c22,_0x3c7104[_0x1c6fed([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x5e2c22;}_0x1f0bd5[_0x1c6fed([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c6fed([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5e2c22,_0x1f0bd5[_0x1c6fed([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c6fed([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5e2c22,_0x1f0bd5[_0x1c6fed([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1c6fed([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4416d6(){return _0x2bf777(_0x1c6fed([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4581f3(_0x1c6fed([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1c6fed([0x73,0x74,0x61,0x74,0x65])]==_0x1c6fed([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x78d6d5(){return _0x2bf777(_0x1c6fed([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 _0x12a324(){return _0x2bf777(_0x1c6fed([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x261a03(_0x3df13a){const _0x270863=_0x28c8d7();_0x1f0bd5[_0x270863]=_0x1c6fed([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])+_0x3df13a,_0x3df13a[_0x1c6fed([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x1c6fed([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x28c8d7()]=_0x2781d3),_0x3df13a!=_0x1c6fed([0x56,0x61,0x6c,0x69,0x64])&&_0x4a4ef0();}function _0x28c8d7(){const _0x34c273=window[_0x1c6fed([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1c6fed([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1c6fed([0x6e,0x6f,0x77])]())[_0x1c6fed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1c6fed([0x2e]),'');let _0xb7223e=_0x1c6fed([0x63]);for(let _0x4bae94=0x0;_0x4bae94<_0x34c273[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4bae94+=0x2){let _0x11eefc=window[_0x1c6fed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34c273[_0x1c6fed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4bae94,_0x4bae94+0x2));_0x11eefc>=_0x4267c2[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x11eefc-=_0x4267c2[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xb7223e+=_0x4267c2[_0x11eefc];}return _0xb7223e;}function _0xfca79c(){const _0x2b059d=_0x302c81[_0x1c6fed([0x73,0x70,0x6c,0x69,0x74])](_0x1c6fed([0x2e]));if(0x3!=_0x2b059d[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2c50ee(_0x2b059d[0x1]);function _0x2c50ee(_0x57e2e2){const _0x257cbb=_0x21fbda(_0x57e2e2);return _0x257cbb&&_0x4bdfc1()?_0x257cbb:null;function _0x4bdfc1(){const _0x512ec3=_0x257cbb[_0x1c6fed([0x6a,0x74,0x69])],_0x143dfe=window[_0x1c6fed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x512ec3[_0x1c6fed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x512ec3[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x22c63e={..._0x257cbb,[_0x1c6fed([0x6a,0x74,0x69])]:_0x512ec3[_0x1c6fed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x512ec3[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x22c63e[_0x1c6fed([0x76,0x63])],_0x474edc(_0x22c63e)==_0x143dfe;}}}async function _0x2c9f77(){let _0x273f34=!0x0;try{const _0x203936=_0x302c81[_0x1c6fed([0x73,0x70,0x6c,0x69,0x74])](_0x1c6fed([0x2e])),[_0x3ee3a9,_0x35ccb5,_0x1b11a1]=_0x203936;return _0xe46e8(_0x3ee3a9),await _0x5aa615(_0x3ee3a9,_0x35ccb5,_0x1b11a1),_0x273f34;}catch(_0x1ed4cf){return!0x1;}function _0xe46e8(_0x2e4178){const _0x1b754b=_0x21fbda(_0x2e4178);_0x1b754b&&_0x1b754b[_0x1c6fed([0x61,0x6c,0x67])]==_0x1c6fed([0x45,0x53,0x32,0x35,0x36])||(_0x273f34=!0x1);}async function _0x5aa615(_0x6d55b5,_0x105945,_0x19ee5c){const _0x2cad96=window[_0x1c6fed([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1c6fed([0x66,0x72,0x6f,0x6d])](_0x47d8cc(_0x19ee5c),_0x181c97=>_0x181c97[_0x1c6fed([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5f1576=new window[(_0x1c6fed([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1c6fed([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x6d55b5+_0x1c6fed([0x2e])+_0x105945),_0x30087d=window[_0x1c6fed([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1c6fed([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x30087d)return;const _0x48bd77=await _0x30087d[_0x1c6fed([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1c6fed([0x6a,0x77,0x6b]),_0xa5ba69,{[_0x1c6fed([0x6e,0x61,0x6d,0x65])]:_0x1c6fed([0x45,0x43,0x44,0x53,0x41]),[_0x1c6fed([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1c6fed([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1c6fed([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x30087d[_0x1c6fed([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1c6fed([0x6e,0x61,0x6d,0x65])]:_0x1c6fed([0x45,0x43,0x44,0x53,0x41]),[_0x1c6fed([0x68,0x61,0x73,0x68])]:{[_0x1c6fed([0x6e,0x61,0x6d,0x65])]:_0x1c6fed([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48bd77,_0x2cad96,_0x5f1576)||(_0x273f34=!0x1);}}function _0x21fbda(_0x4a9364){return _0x4a9364[_0x1c6fed([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1c6fed([0x65,0x79]))?JSON[_0x1c6fed([0x70,0x61,0x72,0x73,0x65])](_0x47d8cc(_0x4a9364)):null;}function _0x47d8cc(_0x4a9c35){return window[_0x1c6fed([0x61,0x74,0x6f,0x62])](_0x4a9c35[_0x1c6fed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1c6fed([0x2b]))[_0x1c6fed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1c6fed([0x2f])));}function _0x474edc(_0x5adf73){let _0x1990cc=0x1505;function _0x4397d8(_0x259cbc){for(let _0x4896b4=0x0;_0x4896b4<_0x259cbc[_0x1c6fed([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4896b4++){const _0x1a0de2=_0x259cbc[_0x1c6fed([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4896b4);_0x1990cc=(_0x1990cc<<0x5)+_0x1990cc+_0x1a0de2,_0x1990cc&=_0x1990cc;}}function _0x3343a7(_0xc5c499){Array[_0x1c6fed([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xc5c499)?_0xc5c499[_0x1c6fed([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3343a7):_0xc5c499&&typeof _0xc5c499==_0x1c6fed([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1c6fed([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xc5c499)[_0x1c6fed([0x73,0x6f,0x72,0x74])]()[_0x1c6fed([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x36206b,_0x6fbb5a])=>{_0x4397d8(_0x36206b),_0x3343a7(_0x6fbb5a);}):_0x4397d8(window[_0x1c6fed([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xc5c499));}return _0x3343a7(_0x5adf73),_0x1990cc>>>0x0;}function _0x2ed8d5(_0x22722e){return _0x22722e[_0x1c6fed([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1c6fed([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1c6fed([0x30]));}function _0x241e34(_0x5e9a88){return _0x5e9a88[_0x1c6fed([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1c6fed([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1c6fed([0x6a,0x6f,0x69,0x6e])]('');}function _0x2bf777(_0x28a59a){return _0x1f0bd5[_0x1c6fed([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1c6fed([0x68,0x61,0x73])](_0x28a59a);}function _0x4581f3(_0x1d12aa){return _0x1f0bd5[_0x1c6fed([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1c6fed([0x67,0x65,0x74])](_0x1d12aa);}function _0x5e2c22(){}function _0x1c6fed(_0x7bb7c5){return _0x7bb7c5['map'](_0x8c5176=>String['fromCharCode'](_0x8c5176))['join']('');}_0x261a03(await _0x3f6b28());}(this);}['createRevision'](_0x5bc859){const _0x1bcefe=this['editor']['plugins']['get']('Users');return new a({'id':_0x5bc859['id'],'name':_0x5bc859['name'],'creator':_0x5bc859['creatorId']?_0x1bcefe['getUser'](_0x5bc859['creatorId']):null,'diffData':_0x5bc859['diffData']||_0x5bc859['data'],'authors':_0x5bc859['authorsIds']['map'](_0xf655ba=>_0x1bcefe['getUser'](_0xf655ba)),'createdAt':new Date(_0x5bc859['createdAt']),'attributes':_0x5bc859['attributes'],'fromVersion':_0x5bc859['fromVersion'],'toVersion':_0x5bc859['toVersion']});}['addRevision'](_0x185137,_0x416639=0x0){this['_revisions']['add'](_0x185137,_0x416639);}['getRevision'](_0x3dc6e3){return this['_revisions']['get'](_0x3dc6e3);}['getRevisions'](_0x10ba8b={'toJSON':!0x1}){const _0x106bb2=Array['from'](this['_revisions']);return _0x106bb2['reverse'](),_0x10ba8b['toJSON']?_0x106bb2['map'](_0x56645d=>_0x56645d['toJSON']()):_0x106bb2;}['getIndex'](_0x4a8eb3){return this['_revisions']['getIndex'](_0x4a8eb3);}['getEarlierVisibleRevision'](_0x4071d6){const [,_0x20c35d]=this['getRevisionsIterator'](_0x4071d6,{'direction':'earlier'});return _0x20c35d;}['getLaterVisibleRevision'](_0x7e8978){const [,_0x88a497]=this['getRevisionsIterator'](_0x7e8978,{'direction':'later'});return _0x88a497;}['getRevisionsInDiff'](_0x535bbe){const _0x3b2cde=[];for(const _0x42a609 of this['getRevisionsIterator'](_0x535bbe['newRevisionId']))if(_0x3b2cde['push'](_0x42a609),_0x42a609['id']===_0x535bbe['oldRevisionId'])break;return _0x3b2cde;}*['getRevisionsIterator'](_0x228fcf,{direction:_0x24e527='earlier',filter:_0x3e59b2=()=>!0x0}={}){const _0x36b119='earlier'===_0x24e527?0x1:-0x1;let _0x2342b5=this['_revisions']['get'](_0x228fcf),_0x15f468=this['getIndex'](_0x2342b5);for(yield _0x2342b5;_0x2342b5;){if(_0x15f468+=_0x36b119,_0x2342b5=this['getRevision'](_0x15f468),!_0x2342b5)return;_0x3e59b2(_0x2342b5)&&(yield _0x2342b5);}}}function m(_0x164dde,_0x193987,_0xda5880){const t=_0x164dde['t'];switch(_0x193987){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'},_0xda5880);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xda5880);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const P={'c':_0x5c1362,'a':_0x18e29a,'e':_0x75b35a,'r':_0x73cc,'u':_0x24b245};class l extends _0x2c5c18{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x7c88bc,j,_0x63e2a1];}constructor(_0x524add){super(_0x524add),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x33b54b=_0x1956ee();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x33b54b},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x14f577=this['repository']['getRevision'](0x0),_0x134e31=_0x14f577&&null===_0x14f577['creator']?_0x14f577:null;if(this['_continueCurrentRevision']=!!_0x134e31&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4533aa=this['_source']['getCurrentRevisionId'](),_0x7450fb=this['repository']['getRevision'](_0x4533aa);if(_0x7450fb)this['_startingVersion']=_0x7450fb['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x2ad7a7=this['_source']['history']['_operations']['find'](_0x48614c=>!_0x48614c['_isInit']),_0x27b3de=_0x2ad7a7?_0x2ad7a7['baseVersion']:this['_source']['history']['version'];_0x14f577?(_0x14f577['toVersion']<_0x27b3de&&_0x14f577['_update']({'toVersion':_0x27b3de}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x134e31['id'],this['_startingVersion']=_0x134e31['fromVersion']):(this['_startingVersion']=_0x14f577['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x27b3de,this['_continueCurrentRevision']=!0x1);}}else _0x134e31&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x134e31['toVersion'],this['editor']['model']['document']['history']['version']),_0x134e31['fromVersion']===_0x134e31['toVersion']?(0x0!==_0x134e31['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x134e31['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x134e31['id'],this['_startingVersion']=_0x134e31['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',_0x317033=>!_0x317033),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x179eeb=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5f5077;for(const _0xf8050 in _0x179eeb){const _0x5b2127=_0xf8050,_0xb2672e=_0x179eeb[_0x5b2127];if('revisionHistoryLicenseKeyValid'==_0xb2672e||'revisionHistoryLicenseKeyInvalid'==_0xb2672e||'revisionHistoryLicenseKeyExpired'==_0xb2672e||'revisionHistoryLicenseKeyDomainLimit'==_0xb2672e||'revisionHistoryLicenseKeyNotAllowed'==_0xb2672e||'revisionHistoryLicenseKeyEvaluationLimit'==_0xb2672e||'revisionHistoryLicenseKeyTrialLimit'==_0xb2672e||'revisionHistoryLicenseKeyUsageLimit'==_0xb2672e){delete _0x179eeb[_0x5b2127],_0x5f5077=_0xb2672e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5f5077&&_0x179eeb['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5f5077&&_0x179eeb['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5f5077&&_0x179eeb['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5f5077&&_0x179eeb['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5f5077&&_0x179eeb['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x5f5077&&_0x179eeb['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5f5077&&_0x179eeb['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x79da4c=this['repository']['getRevision'](0x0),_0x1a90bb=await this['getRevisionDocumentData'](_0x79da4c),_0x50b76f=await this['getRevisionRootsAttributes'](_0x79da4c);this['_replaceEditorDataWithRevisionData'](_0x1a90bb,_0x50b76f);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x223d2b){this['_source']=_0x223d2b;}async['update'](){const _0x4d7c57=await this['_source']['getLatestVersion']();if(_0x4d7c57>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3bb4d3=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4d7c57});_0x3bb4d3['authors']=_0x3bb4d3['authorsIds']['map'](_0x98a8e4=>this['editor']['plugins']['get']('Users')['getUser'](_0x98a8e4)),this['currentRevision']['_update'](_0x3bb4d3);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x43f56d={},_0x3d0db0=null){const _0x4992b8=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3d0db0>this['currentRevision']['toVersion']&&(_0x3d0db0=null),null===_0x3d0db0&&(_0x3d0db0=await this['_source']['getLatestVersion']());const _0xe9e03b=this['_getFromVersion'](_0x3d0db0),_0x9e0f53=this['buildRevisionData']({'from':_0xe9e03b,'to':_0x3d0db0});if(this['currentRevision']['toVersion']<_0x3d0db0){const _0x20b80f=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3d0db0,'to':_0x3d0db0});_0x20b80f['authors']=[],_0x20b80f['authorsIds']=[],_0x20b80f['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x20b80f,!0x0),delete _0x20b80f['authors'],_0x4992b8['push'](_0x20b80f);}_0x43f56d['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x43f56d['name']=_0x43f56d['name']||null,_0x43f56d['id']=_0x43f56d['id']||_0x1956ee(),_0x43f56d={..._0x43f56d,..._0x9e0f53};const _0x40cd17=this['addRevisionData'](_0x43f56d);_0x4992b8['push'](_0x43f56d);const _0x46746a=this['repository']['getIndex'](_0x40cd17);if(0x0!==_0x46746a){const _0x1959e8=this['repository']['getRevision'](_0x46746a-0x1);if(_0x1959e8['fromVersion']!==_0x3d0db0){const _0x400b6d=this['_revisionDataBuilder']['getData'](_0x3d0db0,_0x1959e8['toVersion']),_0x145afb={'id':_0x1959e8['id'],'diffData':_0x400b6d['diffData'],'authorsIds':_0x400b6d['authorsIds'],'authors':_0x400b6d['authorsIds']['map'](_0x55d494=>this['editor']['plugins']['get']('Users')['getUser'](_0x55d494)),'fromVersion':_0x3d0db0};_0x1959e8===this['currentRevision']&&(_0x145afb['createdAt']=new Date(_0x43f56d['createdAt']['getTime']()+0xa)),_0x1959e8['_update'](_0x145afb,!0x0),delete _0x145afb['authors'],_0x4992b8['push'](_0x145afb);}}if(this['adapter']){for(const _0x5d0ee1 of _0x4992b8)this['_bufferUpdate'](_0x5d0ee1['id'],_0x5d0ee1,!0x0);this['sendBufferedUpdates']();}return _0x40cd17;}['addRevisionData'](_0x165dbe){const _0x4d946b=this['repository']['createRevision'](_0x165dbe);return this['adapter']&&_0x4d946b['on']('_update',(_0x4bb776,_0x4a5ba7,_0x3d8c31)=>{_0x3d8c31||(this['_bufferUpdate'](_0x4a5ba7['id'],_0x4a5ba7,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4d946b,this['_findInsertionIndex'](_0x4d946b)),_0x4d946b;}async['getRevisionDocumentData'](_0x3bd0ef){await this['_loadRevisionData'](_0x3bd0ef);const _0x41783b={};for(const _0x181548 in _0x3bd0ef['diffData']){if(_0x3bd0ef['diffData'][_0x181548]['attachChange']&&!_0x3bd0ef['diffData'][_0x181548]['attachChange']['isAttached'])continue;const _0x3e9d76=this['_removeRevisionMarkers'](JSON['parse'](_0x3bd0ef['diffData'][_0x181548]['insertions'])),_0x151504=this['editor']['editing']['view']['document'],_0x3c1ae7=new _0x469a15(_0x151504,_0x3e9d76['map'](_0x594652=>C(_0x594652,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x41783b[_0x181548]=this['editor']['data']['processor']['toData'](_0x3c1ae7),this['editor']['data']['processor']['useFillerType']('default');}return _0x41783b;}async['getRevisionRootsAttributes'](_0xa2f888){await this['_loadRevisionData'](_0xa2f888);const _0x51d1cf={};for(const _0x5a93b8 in _0xa2f888['diffData'])_0xa2f888['diffData'][_0x5a93b8]['attachChange']&&!_0xa2f888['diffData'][_0x5a93b8]['attachChange']['isAttached']||(_0x51d1cf[_0x5a93b8]=_0xa2f888['diffData'][_0x5a93b8]['attributesAfter']||{});return _0x51d1cf;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x41241b=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x225e5b=0x0;_0x225e5b<_0x41241b['length'];_0x225e5b++){const _0x34094f=_0x41241b[_0x225e5b];let _0x571934=!0x1;for(const _0x5d6bcf of Object['keys'](_0x34094f))void 0x0===_0x34094f[_0x5d6bcf]?delete _0x34094f[_0x5d6bcf]:'id'!==_0x5d6bcf&&(_0x571934=!0x0);_0x571934||(_0x41241b[_0x225e5b]=null);}if(_0x41241b=_0x41241b['filter'](_0x4941d8=>null!==_0x4941d8),!_0x41241b['length'])return;for(let _0x358d61=0x0;_0x358d61<_0x41241b['length'];_0x358d61++){const _0x110a9f=_0x41241b[_0x358d61];void 0x0!==_0x110a9f['fromVersion']&&void 0x0===_0x110a9f['toVersion']&&(_0x110a9f['toVersion']=this['repository']['getRevision'](_0x110a9f['id'])['toVersion']),void 0x0!==_0x110a9f['toVersion']&&void 0x0===_0x110a9f['fromVersion']&&(_0x110a9f['fromVersion']=this['repository']['getRevision'](_0x110a9f['id'])['fromVersion']);}const _0x45a6bd=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x41241b,_0x45a6bd)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x16b22d=>{if(_0x16b22d){for(const _0x4f3e7e of _0x16b22d)this['setRevisionData']({'id':_0x4f3e7e['id'],'createdAt':_0x4f3e7e['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0xab7346,_0x85d7af){let _0x3ae914=this['editor']['config']['get']('initialData'),_0x14a85d=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x3ae914){_0x3ae914={};for(const _0x28be16 of this['editor']['model']['document']['getRootNames']())_0x3ae914[_0x28be16]='';}if('string'==typeof _0x3ae914&&(_0x3ae914={'main':_0x3ae914}),void 0x0===_0x14a85d){_0x14a85d={};for(const _0x24fc1b of this['editor']['model']['document']['getRootNames']())_0x14a85d[_0x24fc1b]={};}let _0x30942c=!0x1;const _0x462648=Object['keys'](_0x3ae914),_0x3fe2a6=Object['keys'](_0xab7346);for(const _0xecb76c of _0x462648){if(_0x3ae914[_0xecb76c]!==_0xab7346[_0xecb76c]&&''!==_0x3ae914[_0xecb76c]['trim']()){_0x30942c=!0x0;break;}if(!_0x6b44e1(_0x14a85d[_0xecb76c],_0x85d7af[_0xecb76c])&&Object['keys'](_0x14a85d[_0xecb76c])['length']>0x0){_0x30942c=!0x0;break;}}_0x30942c||(_0x30942c=_0x3fe2a6['some'](_0x9d31de=>!this['editor']['model']['document']['getRoot'](_0x9d31de))),_0x30942c&&_0x2b939c('editor-initial-data-replaced-with-revision-data',{'editorData':_0x3ae914,'editorRootsAttributes':_0x14a85d,'revisionData':_0xab7346,'revisionRootsAttributes':_0x85d7af}),this['editor']['config']['set']('initialData',_0xab7346),this['editor']['config']['set']('rootsAttributes',_0x85d7af);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x4edf43=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4edf43['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1c7b41){const _0x2cb170=this['repository']['getRevisions']();_0x2cb170['reverse']();let _0x1bedd0=0x0;for(;_0x1bedd0<_0x2cb170['length'];){const _0x258e8d=_0x2cb170[_0x1bedd0];if(_0x258e8d===this['currentRevision']){_0x1bedd0++;continue;}if(_0x258e8d['id']===this['_initialRevisionId'])break;const _0x5cefd4=_0x1c7b41['toVersion']-_0x258e8d['toVersion']||_0x1c7b41['fromVersion']-_0x258e8d['fromVersion'];if(_0x5cefd4>0x0)break;if(_0x5cefd4<0x0)_0x1bedd0++;else{if(!_0x1c7b41['creator']&&_0x258e8d['creator'])break;if(_0x258e8d['creator']||!_0x1c7b41['creator']){if(_0x1c7b41['createdAt']>_0x258e8d['createdAt'])break;_0x1bedd0++;}else _0x1bedd0++;}}return _0x1bedd0;}['setRevisionData'](_0x27bca1){const _0x5a82b5=this['repository']['getRevision'](_0x27bca1['id']);if(_0x27bca1['createdAt']&&(_0x27bca1['createdAt']=new Date(_0x27bca1['createdAt'])),_0x27bca1['authorsIds']){const _0x4db691=this['editor']['plugins']['get']('Users');_0x27bca1['authors']=_0x27bca1['authorsIds']['map'](_0x36adb2=>_0x4db691['getUser'](_0x36adb2));}_0x5a82b5['_update'](_0x27bca1,!0x0);}['buildRevisionData']({revision:_0x573915=null,from:_0x148c65=null,to:_0xbfb5f5=null}){_0x148c65=null!==_0x148c65?_0x148c65:_0x573915['fromVersion'],_0xbfb5f5=null!==_0xbfb5f5?_0xbfb5f5:_0x573915['toVersion'];const _0x2dca1c=this['_revisionDataBuilder']['getData'](_0x148c65,_0xbfb5f5),_0x175144={'diffData':_0x2dca1c['diffData'],'authorsIds':_0x2dca1c['authorsIds'],'fromVersion':_0x148c65,'toVersion':_0xbfb5f5};if(!_0x573915||_0xbfb5f5!==_0x573915['toVersion']){const _0x50d47e=_0xbfb5f5-0x1,_0x42ced4=this['_source']['history']['getOperation'](_0x50d47e);_0x175144['createdAt']=_0x42ced4&&_0x42ced4['createdAt']||new Date();}if(this['_loadedStateData']&&_0x148c65===this['_loadedStateData']['fromVersion']){for(const _0x27529b of this['_loadedStateData']['authors'])_0x175144['authorsIds']['includes'](_0x27529b['id'])||_0x175144['authorsIds']['push'](_0x27529b['id']);}return _0x175144;}['_loadRevisionData'](_0xd7960f){if(!_0xd7960f||_0xd7960f['diffData'])return Promise['resolve']();{const _0x54b49e=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x54b49e,'revisionId':_0xd7960f['id']})['then'](_0x423c6c=>{_0xd7960f['diffData']=_0x423c6c['diffData'];});}}['_bufferUpdate'](_0x36a83b,_0x34aedc,_0x3d35ba){if(this['_bufferedUpdates']['has'](_0x36a83b)){const _0x262914=this['_bufferedUpdates']['get'](_0x36a83b);_0x34aedc=_0x3d35ba?{..._0x262914,..._0x34aedc}:{..._0x34aedc,..._0x262914};}this['_bufferedUpdates']['set'](_0x36a83b,_0x34aedc);}['_getFromVersion'](_0x10f9f8){const _0x254d63=this['repository']['getRevisions']();_0x254d63['reverse'](),_0x254d63['shift']();const _0x356051=_0x254d63['find'](_0x1c0751=>_0x1c0751['toVersion']<=_0x10f9f8)['toVersion'];return _0x356051<this['_startingVersion']?this['_startingVersion']:_0x356051;}['_createInitialRevision'](_0x46dcd4){const _0x1a30af=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1a30af)this['_initialRevisionId']=_0x1a30af['id'];else{const _0x1efbf8=!this['editor']['model']['document']['roots']['find'](_0x3c301d=>this['editor']['model']['hasContent'](_0x3c301d)),_0xa5d96e=this['editor']['plugins']['get']('Users')['me']['id'],_0xce5f21=m(this['editor']['locale'],_0x1efbf8?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x46dcd4,'to':_0x46dcd4,'id':this['_initialRevisionId'],'name':_0xce5f21,'creatorId':_0xa5d96e});}}['_createCurrentRevision'](_0x4e54aa){const _0x4f901c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4f901c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4e54aa,'to':_0x4e54aa,'id':_0x4f901c,'name':'','creatorId':null}));}['_makeRevision']({name:_0x981957,from:_0x31a880,to:_0x32fe89,creatorId:_0x51e6a8,id:_0x14db01}){const _0x32fc05=this['buildRevisionData']({'from':_0x31a880,'to':_0x32fe89});_0x32fc05['name']=_0x981957,_0x32fc05['creatorId']=_0x51e6a8,_0x32fc05['id']=_0x14db01;const _0x1dc718=this['addRevisionData'](_0x32fc05);return this['adapter']&&this['_bufferUpdate'](_0x32fc05['id'],_0x32fc05,!0x0),_0x1dc718;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x3d09be){return(_0x3d09be=_0x3d09be['filter'](_0xacfcb6=>!_0xacfcb6['name']||'revision-start'!==_0xacfcb6['name']&&'revision-end'!==_0xacfcb6['name']))['forEach'](_0x23e523=>{'string'!=typeof _0x23e523&&(_0x23e523['children']=this['_removeRevisionMarkers'](_0x23e523['children']),_0x23e523['attributes']=_0x23e523['attributes']['filter'](_0x20ffda=>!_0x20ffda[0x0]['startsWith']('data-revision-')));}),_0x3d09be;}}function C(_0x39efb3,_0xe1ee17){const _0x50c912=_0xe1ee17['editing']['view']['document'];if('string'==typeof _0x39efb3)return new _0x2750d6(_0x50c912,_0x39efb3);{const _0x2be379=_0x39efb3['children']['map'](_0x5ce7a9=>C(_0x5ce7a9,_0xe1ee17));return new(P[_0x39efb3['type']]||_0x37bd31)(_0x50c912,_0x39efb3['name'],_0x39efb3['attributes'],_0x2be379);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3eadcb){this['editor']=_0x3eadcb,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'](_0x47f819){this['source']=_0x47f819;const _0x4b820a=new Map(),_0x3186c4=new Map(),_0x3c5718=this['editor']['model']['document']['roots']['map'](_0x2bcf8a=>_0x2bcf8a['rootName']);for(const _0x144df4 of _0x3c5718){const _0x4c4b5e=this['editor']['model']['document']['getRoot'](_0x144df4),_0x4e0348=T(_0x4c4b5e);_0x4b820a['set'](_0x144df4,_0x4e0348),_0x3186c4['set'](_0x144df4,Object['fromEntries'](_0x4c4b5e['getAttributes']()));}const _0x1a5536=Array['from'](this['editor']['model']['markers'])['map'](_0x39ed02=>[_0x39ed02['name'],_0x39ed02['getRange']()]),_0x2c8c78=this['source']['version'];this['_saveMetaData'](_0x2c8c78,_0x4b820a,_0x1a5536,_0x3186c4),this['_startingRevisionId']=this['_revisionId'];const _0x4194cb=new Map(),_0x1c5ce5=new Map();for(const _0x20f761 of _0x3c5718){const _0x3e596d=F(_0x20f761);_0x4194cb['set'](_0x20f761,_0x3e596d),_0x1c5ce5['set'](_0x20f761,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4194cb,[],_0x1c5ce5);}['getData'](_0x1f4de1,_0xd30040){if(this['_lastFrom']===_0x1f4de1&&this['_lastTo']<=_0xd30040)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xd30040,!0x0);else{if(!this['_savedMetaData']['has'](_0x1f4de1)){const _0x5336ec=this['_getPreviousFrom'](_0x1f4de1);this['_calculateMetaData'](_0x5336ec,_0x1f4de1,!0x1);}this['_calculateMetaData'](_0x1f4de1,_0xd30040,!0x0);}return this['_lastFrom']=_0x1f4de1,this['_lastTo']=_0xd30040,this['_getState']();}['loadState'](_0x32666c){this['_reset'](),this['_lastFrom']=_0x32666c['fromVersion'],this['_lastTo']=_0x32666c['toVersion'];for(const _0x4d1757 in _0x32666c['diffData']){const _0x31a64c=_0x32666c['diffData'][_0x4d1757]['attachChange'],_0x133cb3=_0x1f4985(_0x32666c['diffData'][_0x4d1757]['attributesBefore'])||{},_0x500263=this['_makeModelFromViewString'](_0x32666c['diffData'][_0x4d1757]['deletions']);_0x500263['rootName']=_0x4d1757,_0x500263['_isAttached']=!_0x31a64c||!_0x31a64c['isAttached'],_0x500263['isAttached']=()=>_0x500263['_isAttached'],this['_baseRoots']['set'](_0x4d1757,_0x500263),this['_baseRootsAttributes']['set'](_0x4d1757,_0x133cb3),_0x31a64c&&this['_touchedRoots']['set'](_0x4d1757,_0x31a64c);const _0x2b05f9=this['_makeIdsRoot'](_0x500263);this['_baseIdsRoots']['set'](_0x4d1757,_0x2b05f9);for(const [_0x4510a5,_0x45dab8]of _0x500263['markers']){if(!_0x4510a5['startsWith']('revision:'))continue;const _0xa4ef48=_0x4510a5['split'](':')[0x2];for(const _0x546090 of _0x45dab8['getWalker']({'singleCharacters':!0x0})){const _0x495910=this['_getVidAttributeName'](_0x546090),_0x4333d2='elementEnd'==_0x546090['type']?_0x546090['previousPosition']['path']['slice'](0x0,-0x1):_0x546090['previousPosition']['path'],_0x47345c=_0x2b05f9['getNodeByPath'](_0x4333d2)['getAttribute'](_0x495910);this['_touched']['set'](_0x47345c,{'userId':_0xa4ef48});}}}this['_startingRevisionId']=this['_revisionId'];const _0x4791e3=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4b43b7=>!this['_touched']['has'](_0x4b43b7));let _0x2e2c90=0x0;const _0x145f12=new Map();for(const _0x39a8dc in _0x32666c['diffData']){const _0x5be640=_0x32666c['diffData'][_0x39a8dc]['attachChange'],_0xd94b69=_0x1f4985(_0x32666c['diffData'][_0x39a8dc]['attributesAfter'])||{},_0x11ee6b=this['_makeModelFromViewString'](_0x32666c['diffData'][_0x39a8dc]['insertions']);_0x11ee6b['rootName']=_0x39a8dc,_0x11ee6b['_isAttached']=!_0x5be640||_0x5be640['isAttached'],_0x11ee6b['isAttached']=()=>_0x11ee6b['_isAttached'],this['_diffRoots']['set'](_0x39a8dc,_0x11ee6b),this['_diffRootsAttributes']['set'](_0x39a8dc,_0xd94b69);const _0x7fd7d2=this['_makeIdsRoot'](_0x11ee6b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x39a8dc,_0x7fd7d2),_0x145f12['set'](_0x39a8dc,_0x11ee6b['isAttached']()?_0xd94b69:{});for(const [_0x301b72,_0x19e552]of _0x11ee6b['markers']){if(!_0x301b72['startsWith']('revision:'))continue;const _0x4fda51=_0x301b72['split'](':')[0x2];for(const _0x51bf69 of _0x19e552['getWalker']({'singleCharacters':!0x0})){const _0x23e338=this['_getVidAttributeName'](_0x51bf69),_0x4641db=this['_revisionId']++,_0x3809f2='elementEnd'==_0x51bf69['type']?_0x51bf69['previousPosition']['path']['slice'](0x0,-0x1):_0x51bf69['previousPosition']['path'];_0x7fd7d2['getNodeByPath'](_0x3809f2)['_setAttribute'](_0x23e338,_0x4641db),this['_touched']['set'](_0x4641db,{'userId':_0x4fda51});}}for(const _0x591639 of this['editor']['model']['createRangeIn'](_0x11ee6b)['getWalker']({'singleCharacters':!0x0})){const _0x5833b7=this['_getVidAttributeName'](_0x591639),_0xecc645='elementEnd'==_0x591639['type']?_0x591639['previousPosition']['path']['slice'](0x0,-0x1):_0x591639['previousPosition']['path'],_0x4510b3=_0x7fd7d2['getNodeByPath'](_0xecc645);_0x4510b3['getAttribute'](_0x5833b7)>0x0||_0x4510b3['_setAttribute'](_0x5833b7,_0x4791e3[_0x2e2c90++]);}for(const [_0x3f8961,_0x531789]of _0x11ee6b['markers'])_0x3f8961['startsWith']('revision:')||this['_markers']['set'](_0x3f8961,_0x531789);}const _0xd7bafb=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0xd7bafb),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xd7bafb,0x1));const _0x38d263=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x38d263),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x38d263,0x1));const _0x122b09=Array['from'](this['_diffRoots'])['map'](([_0x27fd8c,_0x4ee7e7])=>[_0x27fd8c,T(_0x4ee7e7)]);this['_saveMetaData'](this['_lastTo'],_0x122b09,this['_markers'],_0x145f12);}['_makeModelFromViewString'](_0x25906c){const _0x541f0c=JSON['parse'](_0x25906c),_0x1e01d8=this['editor']['editing']['view']['document'],_0x496a2a=new _0x469a15(_0x1e01d8,_0x541f0c['map'](_0x460c29=>C(_0x460c29,this['editor'])));return this['editor']['data']['toModel'](_0x496a2a);}['_saveMetaData'](_0x3833bf,_0x21bbe1,_0x49e6b2,_0x6585e6){const _0x28592e=new Map(_0x21bbe1),_0x310893=new Map(_0x1f4985(_0x6585e6)),_0x247db9=new Map();for(const [_0x56ea58,_0x4e74e7]of _0x49e6b2)_0x247db9['set'](_0x56ea58,{'start':_0x4e74e7['start']['clone'](),'end':_0x4e74e7['end']['clone'](),'rootName':_0x4e74e7['root']['rootName']});this['_savedMetaData']['set'](_0x3833bf,{'roots':_0x28592e,'markers':_0x247db9,'rootsAttributes':_0x310893});}['_removeMetaData'](_0x508e41){this['_savedMetaData']['delete'](_0x508e41);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x3d7d73,_0x5d7c05=null){let _0x387794=null;_0x3d7d73['is']('documentFragment')||(_0x387794=new ft(_0x3d7d73['name'],{'vid_start':null===_0x5d7c05?this['_revisionId']++:_0x5d7c05++}));const _0x2c4aa1=[];for(const _0x96b65d of _0x3d7d73['getChildren']())if(_0x96b65d['is']('element')){_0x2c4aa1['push'](this['_makeIdsRoot'](_0x96b65d,_0x5d7c05));const _0xf65e4c=_0x2c4aa1[_0x2c4aa1['length']-0x1];null!==_0x5d7c05&&(_0x5d7c05=_0xf65e4c['is']('element','$text')?_0xf65e4c['getAttribute']('vid')+0x1:_0xf65e4c['getAttribute']('vid_end')+0x1);}else{for(let _0x59ecbc=0x0;_0x59ecbc<_0x96b65d['offsetSize'];_0x59ecbc++)_0x2c4aa1['push'](new ft('$text',{'vid':null===_0x5d7c05?this['_revisionId']++:_0x5d7c05++}));}if(_0x3d7d73['is']('documentFragment')){const _0x30c2b5=F(_0x3d7d73['rootName']);return _0x30c2b5['_insertChild'](0x0,_0x2c4aa1),_0x30c2b5;}return _0x387794['_setAttribute']('vid_end',null===_0x5d7c05?this['_revisionId']++:_0x5d7c05++),_0x387794['_insertChild'](0x0,_0x2c4aa1),_0x387794;}['_calculateMetaData'](_0x551d4a,_0x3375fb,_0xd0197c){this['_reset']();const {roots:_0x180b6e,markers:_0x5b6d7f,rootsAttributes:_0x449c72}=this['_savedMetaData']['get'](_0x551d4a);this['_baseRoots']=new Map(_0x180b6e),this['_baseRootsAttributes']=new Map(_0x1f4985(_0x449c72));for(const [_0x10e148,_0x480d7a]of this['_baseRoots'])if('$graveyard'!==_0x10e148&&(this['_diffRoots']['set'](_0x10e148,T(_0x480d7a)),this['_diffRootsAttributes']=new Map(_0x1f4985(_0x449c72)),_0xd0197c)){const _0x4cb9e7=this['_revisionId'];this['_idsRoots']['set'](_0x10e148,this['_makeIdsRoot'](_0x480d7a)),this['_baseIdsRoots']['set'](_0x10e148,this['_makeIdsRoot'](_0x480d7a,_0x4cb9e7));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0xd0197c&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x395db8,_0x1c71f9]of _0x5b6d7f){const _0x570a29=this['_baseRoots']['get'](_0x1c71f9['rootName']),_0x26b5b8=this['_diffRoots']['get'](_0x1c71f9['rootName']),_0x2a985d=new vt(this['_fixPosition'](_0x1c71f9['start'],_0x570a29),this['_fixPosition'](_0x1c71f9['end'],_0x570a29)),_0x185b5b=this['_fixRange'](_0x2a985d,_0x26b5b8);_0x570a29['markers']['set'](_0x395db8,_0x2a985d),this['_markers']['set'](_0x395db8,_0x185b5b);}this['_applyOperations'](_0x551d4a,_0x3375fb,_0xd0197c);}['_applyOperations'](_0x33b866,_0x5caf4b,_0xae22f8){for(const _0xdd41aa of this['source']['getOperations'](_0x33b866,_0x5caf4b))this['_handleOperation'](_0xdd41aa,_0xae22f8);for(const _0x5c77df of this['_diffRoots']['values']())_0x5c77df['markers']['clear']();for(const [_0x307b15,_0x433cdf]of this['_markers']){this['_diffRoots']['get'](_0x433cdf['root']['rootName'])['markers']['set'](_0x307b15,_0x433cdf['clone']());}const _0x9b5be2=new Map(),_0x4edd22=new Map();for(const [_0x1b1634,_0x2d9108]of this['_diffRoots'])_0x9b5be2['set'](_0x1b1634,T(_0x2d9108)),_0x4edd22['set'](_0x1b1634,this['_diffRootsAttributes']['get'](_0x1b1634));this['_saveMetaData'](_0x5caf4b,_0x9b5be2,this['_markers'],_0x4edd22);}['_getPreviousFrom'](_0x543797){const _0x2abe81=Array['from'](this['_savedMetaData']['keys']());_0x2abe81['sort']((_0x1eb842,_0x4a5949)=>_0x1eb842-_0x4a5949),_0x2abe81['reverse']();for(const _0xf8cb3e of _0x2abe81)if(_0xf8cb3e<_0x543797)return _0xf8cb3e;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x56ede9,_0x350e01){const _0x257e1e=Array['from'](_0x350e01['markers'])['map'](([_0x3f7d83,_0x53a64e])=>[_0x3f7d83,this['_fixRange'](_0x53a64e,_0x56ede9)]);_0x56ede9['markers']=new Map(_0x257e1e);}['_transformMarkers'](_0x402e98){for(const _0x9e2edc of this['_markers']['values']()){const _0x18dde5=_0x9e2edc['getTransformedByOperation'](_0x402e98),_0x491cee=vt['_createFromRanges'](_0x18dde5);_0x9e2edc['start']=_0x491cee['start'],_0x9e2edc['end']=_0x491cee['end'];}}['_handleOperation'](_0x38614e,_0x393fe6){if('addRoot'!=_0x38614e['type']&&'detachRoot'!=_0x38614e['type']){if('insert'==_0x38614e['type']){const _0x530977=_0x38614e['position']['root']['rootName'];this['_diffRoots']['has'](_0x530977)||(this['_diffRoots']['set'](_0x530977,F(_0x530977,!0x0)),this['_diffRootsAttributes']['set'](_0x530977,{}),_0x393fe6&&this['_idsRoots']['set'](_0x530977,F(_0x530977,!0x0)));}else{if('addRootAttribute'==_0x38614e['type']||'removeRootAttribute'==_0x38614e['type']||'changeRootAttribute'==_0x38614e['type'])return void this['_handleRootAttributeOperation'](_0x38614e);'marker'==_0x38614e['type']&&this['_handleMarkerOperation'](_0x38614e);}if('marker'!==_0x38614e['type']){const _0x1b7219=this['_cloneOperation'](_0x38614e,this['_diffRoots']);_0x1b7219['_execute'](),this['_transformMarkers'](_0x1b7219);}if(_0x393fe6)switch(_0x38614e['type']){case'insert':this['_handleInsertOperation'](_0x38614e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x38614e);break;case'merge':this['_handleMergeOperation'](_0x38614e);break;case'split':this['_handleSplitOperation'](_0x38614e);}}else this['_handleRootOperation'](_0x38614e,_0x393fe6);}['_cloneOperation'](_0x505145,_0xf07668){const _0x363be5=_0x505145['clone']();return _0x363be5['_authorId']=_0x505145['_authorId'],this['_fixOperation'](_0x363be5,_0xf07668),_0x363be5;}['_getBaseVids'](_0x39d07d){return _0x39d07d['map'](_0xccba3e=>{const _0x4abba9=this['_getVidAttributeName'](_0xccba3e);return Number(_0xccba3e['item']['getAttribute'](_0x4abba9));});}['_generateTape'](_0x242f6b,_0x1ae8d7){if(_0x242f6b['is']('element','$text'))_0x1ae8d7['push']({'item':_0x242f6b,'type':'text'});else{_0x242f6b['is']('element')&&_0x1ae8d7['push']({'item':_0x242f6b,'type':'elementStart'});for(const _0x3de1de of _0x242f6b['getChildren']())this['_generateTape'](_0x3de1de,_0x1ae8d7);_0x242f6b['is']('element')&&_0x1ae8d7['push']({'item':_0x242f6b,'type':'elementEnd'});}return _0x1ae8d7;}['_getState'](){const _0x11e331=new Map(this['_touched']),_0x27c56b=new Map(_0x11e331),_0x54502b=new Map(),_0x9741e0={'insertions':{},'deletions':{}},_0x317cfe={'insertions':{},'deletions':{}},_0x3aab49=new Map(),_0x428a4f=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x428a4f['delete']('$graveyard');for(const _0x54313b of _0x428a4f){const _0x4a0ad8=this['_diffRoots']['get'](_0x54313b)||F(_0x54313b,!0x1),_0x3e1258=this['_baseRoots']['get'](_0x54313b)||F(_0x54313b,!0x1);_0x4a0ad8['isAttached']()||_0x3e1258['isAttached']()?(_0x9741e0['insertions'][_0x54313b]=T(_0x4a0ad8),_0x9741e0['deletions'][_0x54313b]=T(_0x3e1258),this['_copyMarkers'](_0x9741e0['deletions'][_0x54313b],_0x3e1258),this['_copyMarkers'](_0x9741e0['insertions'][_0x54313b],_0x4a0ad8),_0x317cfe['insertions'][_0x54313b]=this['_generateTape'](this['_idsRoots']['get'](_0x54313b),[]),_0x317cfe['deletions'][_0x54313b]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x54313b)||F(_0x54313b,!0x1),[])):_0x428a4f['delete'](_0x54313b);}for(const _0xaf575 of _0x428a4f){const _0x428bba=_0x317cfe['insertions'][_0xaf575];for(const _0xef89b1 of _0x428bba){const _0x2fa257=this['_getVidAttributeName'](_0xef89b1),_0x4449c7=_0xef89b1['item']['getAttribute'](_0x2fa257);_0x27c56b['delete'](_0x4449c7),_0x4449c7>=this['_startingRevisionId']&&_0x54502b['set'](_0x4449c7,_0x11e331['get'](_0x4449c7));}}for(const _0x419ec6 of _0x428a4f){const _0x3bea14=_0x317cfe['insertions'][_0x419ec6],_0x41ae3b=this['_getBaseVids'](_0x317cfe['deletions'][_0x419ec6]);let _0x222cdc=0x0;for(const _0x14481a of _0x3bea14){const _0x3f4195=this['_getVidAttributeName'](_0x14481a),_0x2da3bd=_0x14481a['item']['getAttribute'](_0x3f4195);if(!_0x54502b['has'](_0x2da3bd)&&!_0x3aab49['has'](_0x2da3bd)){if(_0x27c56b['has'](_0x2da3bd))_0x222cdc++;else{if(_0x2da3bd!=_0x41ae3b[_0x222cdc]){const _0x320421=_0x11e331['get'](_0x2da3bd)||_0x11e331['get'](_0x41ae3b[_0x222cdc]);for(;_0x2da3bd!=_0x41ae3b[_0x222cdc];)_0x27c56b['has'](_0x41ae3b[_0x222cdc])||(_0x3aab49['set'](_0x41ae3b[_0x222cdc],_0x320421),_0x11e331['set'](_0x41ae3b[_0x222cdc],_0x320421)),_0x222cdc++;}_0x222cdc++;}}}}for(const _0x24cfec of _0x428a4f){const _0x39d647=_0x317cfe['insertions'][_0x24cfec];for(const _0xc29f3d of _0x39d647){const _0x4d88b4=this['_getVidAttributeName'](_0xc29f3d),_0x13fe3d=_0xc29f3d['item']['getAttribute'](_0x4d88b4);if(_0x3aab49['has'](_0x13fe3d)){const _0xb45d18=_0x3aab49['get'](_0x13fe3d);_0x27c56b['has'](_0x13fe3d)||_0x27c56b['set'](_0x13fe3d,{..._0xb45d18}),_0x54502b['set'](_0x13fe3d,{..._0xb45d18});}}}for(const _0x4c6d19 of _0x27c56b['keys']())_0x4c6d19>=this['_startingRevisionId']&&_0x27c56b['delete'](_0x4c6d19);const _0x775670=new Map();for(const _0x2c2ffb of _0x428a4f){let _0xff0700=_0x317cfe['insertions'][_0x2c2ffb];for(const _0x50dd61 of _0xff0700)if(_0x50dd61['item']['is']('element','tableCell')){const _0x39ab5f=this['_getVidAttributeName'](_0x50dd61),_0x42967b=_0x50dd61['item']['getAttribute'](_0x39ab5f);if(_0x54502b['has'](_0x42967b)){const _0x54f13a=_0x50dd61['item']['parent']['parent']['getAttribute']('vid_start'),_0xa74be2=_0x775670['get'](_0x54f13a)||new Set();_0xa74be2['add'](_0x54502b['get'](_0x42967b)['userId']),_0x775670['set'](_0x54f13a,_0xa74be2);}}_0xff0700=_0x317cfe['deletions'][_0x2c2ffb];for(const _0x416b85 of _0xff0700)if(_0x416b85['item']['is']('element','tableCell')){const _0x5aa19a=this['_getVidAttributeName'](_0x416b85),_0x343ba1=_0x416b85['item']['getAttribute'](_0x5aa19a);if(_0x27c56b['has'](_0x343ba1)){const _0x234ca3=_0x416b85['item']['parent']['parent']['getAttribute']('vid_start'),_0x381800=_0x775670['get'](_0x234ca3)||new Set();_0x381800['add'](_0x27c56b['get'](_0x343ba1)['userId']),_0x775670['set'](_0x234ca3,_0x381800);}}for(const _0x43ed39 of _0x775670['keys']())(_0x54502b['has'](_0x43ed39)||_0x27c56b['has'](_0x43ed39))&&_0x775670['delete'](_0x43ed39);}for(const _0x57f619 of _0x428a4f){const _0x165566=_0x317cfe['insertions'][_0x57f619];let _0x2bed17=null,_0x43d755=null;for(const _0x43437b of _0x165566){const _0x36dfa1=this['_getVidAttributeName'](_0x43437b),_0x7d3e3=_0x43437b['item']['getAttribute'](_0x36dfa1),_0x2ca3e5=_0x775670['get'](_0x7d3e3);_0x2ca3e5&&'elementStart'==_0x43437b['type']&&(_0x2bed17=Array['from'](_0x2ca3e5)[0x0],_0x43d755=_0x43437b['item']['getAttribute']('vid_end')),_0x2bed17&&(_0x27c56b['set'](_0x7d3e3,{'userId':_0x2bed17}),_0x54502b['set'](_0x7d3e3,{'userId':_0x2bed17})),_0x7d3e3==_0x43d755&&(_0x2bed17=null,_0x43d755=null);}}const _0x4d8775={},_0xa10fe5=new Set();for(const _0x11c75e of _0x428a4f){const _0x5e34be=_0x9741e0['deletions'][_0x11c75e],_0x1af9a9=_0x9741e0['insertions'][_0x11c75e];for(const {userId:_0x5aec39}of this['_touchedMarkers']['values']())null!==_0x5aec39&&_0xa10fe5['add'](_0x5aec39);for(const {userId:_0x1ea5e2}of this['_touchedRoots']['values']())null!==_0x1ea5e2&&_0xa10fe5['add'](_0x1ea5e2);this['_markChanges'](_0x1af9a9,_0x317cfe['insertions'][_0x11c75e],_0x54502b,'insertion',_0xa10fe5),this['_markChanges'](_0x5e34be,_0x317cfe['deletions'][_0x11c75e],_0x27c56b,'deletion',_0xa10fe5),_0x4d8775[_0x11c75e]={'insertions':this['_prepareViewToSave'](_0x1af9a9),'deletions':this['_prepareViewToSave'](_0x5e34be),'attachChange':this['_touchedRoots']['get'](_0x11c75e)||null,'attributesBefore':_0x1f4985(this['_baseRootsAttributes']['get'](_0x11c75e))||{},'attributesAfter':_0x1f4985(this['_diffRootsAttributes']['get'](_0x11c75e))};}return{'diffData':_0x4d8775,'authorsIds':Array['from'](_0xa10fe5)};}['_processRootBeforeSave'](_0x5c5d13){for(const [,_0x1fbfdc]of _0x5c5d13['markers']){const _0x15f5d7=_0x1fbfdc['start']['getAncestors']()['filter'](_0x304eaf=>'tableCell'==_0x304eaf['name']);for(const _0x64866b of _0x15f5d7)0x1==_0x64866b['childCount']&&_0x64866b['getChild'](0x0)['is']('element','paragraph')&&_0x64866b['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3e73aa){this['_processRootBeforeSave'](_0x3e73aa);const _0x209c28=this['editor']['data']['toView'](_0x3e73aa,{}),_0x46d42e=Array['from'](_0x209c28['getChildren']())['map'](_0x56f5cf=>this['_getViewJson'](_0x56f5cf));return JSON['stringify'](_0x46d42e);}['_getViewJson'](_0x2077af){if(_0x2077af['is']('$text'))return _0x2077af['data'];{const _0x5a7236=_0x2077af;return{'type':Object['keys'](P)['find'](_0x368c75=>_0x2077af instanceof P[_0x368c75]),'name':_0x5a7236['name'],'attributes':Array['from'](_0x5a7236['getAttributes']()),'children':Array['from'](_0x5a7236['getChildren']())['map'](_0x24b03f=>this['_getViewJson'](_0x24b03f))};}}['_markChanges'](_0x3be2ae,_0x167e1d,_0x5e9c3c,_0x497a50,_0xea1158){let _0x412ffe=null,_0x5a18f8=null,_0x27151f=0x0;const _0x366edf=this['editor']['model'];for(let _0x487f42=0x0;_0x487f42<_0x167e1d['length'];_0x487f42++){const _0x5ab58e=this['_getVidAttributeName'](_0x167e1d[_0x487f42]),_0x504e49=_0x167e1d[_0x487f42]['item']['getAttribute'](_0x5ab58e),_0x359679=_0x5e9c3c['get'](_0x504e49),_0x379fda=_0x487f42==_0x167e1d['length']-0x1;(!_0x412ffe&&_0x359679&&(_0x412ffe=_0x359679,_0x5a18f8=_0x167e1d[_0x487f42]),_0x412ffe&&(!_0x359679||_0x359679['userId']!=_0x412ffe['userId']))&&(_0x15fb93(_0x359679,B(_0x5a18f8,_0x3be2ae,_0x366edf),B(_0x167e1d[_0x487f42],_0x3be2ae,_0x366edf)),_0x412ffe=_0x359679||null,_0x5a18f8=_0x359679?_0x167e1d[_0x487f42]:null),_0x412ffe&&_0x379fda&&_0x15fb93(_0x359679,B(_0x5a18f8,_0x3be2ae,_0x366edf),J(_0x167e1d[_0x487f42],_0x3be2ae,_0x366edf));}function _0x15fb93(_0x4bef47,_0x32eb69,_0x22ad60){const _0x21ca3c=_0x412ffe['userId'],_0x160098='revision:'+_0x497a50+':'+_0x21ca3c+':'+_0x27151f++,_0x412069=_0x366edf['createRange'](_0x32eb69,_0x22ad60);_0x3be2ae['markers']['set'](_0x160098,_0x412069),null!==_0x21ca3c&&_0xea1158['add'](_0x21ca3c);}}['_getVidAttributeName'](_0x2f88be){switch(_0x2f88be['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1bd018,_0x544e97){_0x1bd018['baseVersion']=null;for(const _0x23f0d2 in _0x1bd018){const _0x548eb9=_0x1bd018[_0x23f0d2];if(_0x548eb9 instanceof gt){const _0x51e2eb=_0x544e97['get'](_0x548eb9['root']['rootName']);_0x1bd018[_0x23f0d2]=this['_fixPosition'](_0x548eb9,_0x51e2eb);}if(_0x548eb9 instanceof vt){const _0x26147f=_0x544e97['get'](_0x548eb9['root']['rootName']);_0x1bd018[_0x23f0d2]=this['_fixRange'](_0x548eb9,_0x26147f);}'root'===_0x23f0d2&&(_0x1bd018['root']=_0x544e97['get'](_0x1bd018['root']['rootName']));}}['_fixRange'](_0xbce9da,_0x5c00fb){return this['editor']['model']['createRange'](this['_fixPosition'](_0xbce9da['start'],_0x5c00fb),this['_fixPosition'](_0xbce9da['end'],_0x5c00fb));}['_fixPosition'](_0x3b39e9,_0x36c415){return this['editor']['model']['createPositionFromPath'](_0x36c415,_0x3b39e9['path'],_0x3b39e9['stickiness']);}['_handleInsertOperation'](_0x351296){const _0x4fc482=this['_idsRoots']['get'](_0x351296['position']['root']['rootName']),_0x21f74e=this['_fixPosition'](_0x351296['position'],_0x4fc482),_0x51c145=null===_0x351296['_authorId']?null:_0x351296['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4455ea=_0x21f74e['parent'],_0x345c8f=this['_revisionId'],_0x2e38bf=[];for(const _0xf347e1 of _0x351296['nodes'])if(_0xf347e1['is']('element'))_0x2e38bf['push'](this['_makeIdsRoot'](_0xf347e1));else{for(let _0x5f5493=0x0;_0x5f5493<_0xf347e1['offsetSize'];_0x5f5493++)_0x2e38bf['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x4804e5=this['_revisionId'];for(let _0x544002=_0x345c8f;_0x544002<_0x4804e5;_0x544002++)this['_touched']['set'](_0x544002,{'userId':_0x51c145});_0x4455ea['_insertChild'](_0x21f74e['offset'],_0x2e38bf);}['_handleMoveOperation'](_0xae5325){(_0xae5325=this['_cloneOperation'](_0xae5325,this['_idsRoots']))['_execute']();const _0x394710=null===_0xae5325['_authorId']?null:_0xae5325['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x54a1cc=_0xae5325['getMovedRangeStart'](),_0x5d61d6=_0x54a1cc['parent'],_0x41decb=_0x54a1cc['offset'];!function _0x1f83d4(_0x102be6,_0x1bad94,_0x286452,_0xfbf380){for(let _0x3cdb0f=_0x286452;_0x3cdb0f<_0xfbf380;_0x3cdb0f++){const _0x4dff71=_0x1bad94['getChild'](_0x3cdb0f);_0x4dff71['is']('element','$text')?_0x102be6['set'](_0x4dff71['getAttribute']('vid'),{'userId':_0x394710}):(_0x102be6['set'](_0x4dff71['getAttribute']('vid_start'),{'userId':_0x394710}),_0x1f83d4(_0x102be6,_0x4dff71,0x0,_0x4dff71['childCount']),_0x102be6['set'](_0x4dff71['getAttribute']('vid_end'),{'userId':_0x394710}));}}(this['_touched'],_0x5d61d6,_0x41decb,_0x41decb+_0xae5325['howMany']);}['_handleMergeOperation'](_0x568375){const _0x1a7299=null===(_0x568375=this['_cloneOperation'](_0x568375,this['_idsRoots']))['_authorId']?null:_0x568375['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x349b62=_0x568375['targetPosition']['parent'],_0x32904a=_0x568375['sourcePosition']['parent'],_0x1775f1=_0x349b62['getAttribute']('vid_end'),_0x905a4e=_0x32904a['getAttribute']('vid_start');_0x349b62['_setAttribute']('vid_end',_0x32904a['getAttribute']('vid_end')),_0x32904a['_setAttribute']('vid_end',_0x1775f1),this['_touched']['set'](_0x905a4e,{'userId':_0x1a7299}),this['_touched']['set'](_0x1775f1,{'userId':_0x1a7299}),_0x568375['_execute']();}['_handleSplitOperation'](_0x13a546){const _0x4b6cd8=null===(_0x13a546=this['_cloneOperation'](_0x13a546,this['_idsRoots']))['_authorId']?null:_0x13a546['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x319770=_0x13a546['graveyardPosition'],_0xbf4c50=_0x13a546['splitPosition']['parent'];_0x13a546['_execute']();const _0x26973c=_0xbf4c50['getAttribute']('vid_end'),_0x302dc4=_0x13a546['insertionPosition']['nodeAfter'];if(_0x319770){const _0xeda880=_0x302dc4['getAttribute']('vid_end'),_0x13b2cd=_0xbf4c50['getAttribute']('vid_end');_0xbf4c50['_setAttribute']('vid_end',_0xeda880),_0x302dc4['_setAttribute']('vid_end',_0x13b2cd),this['_touched']['set'](_0xbf4c50['getAttribute']('vid_end'),{'userId':_0x4b6cd8}),this['_touched']['set'](_0x302dc4['getAttribute']('vid_start'),{'userId':_0x4b6cd8});}else{const _0x24ed81=this['_revisionId']++,_0x52c634=this['_revisionId']++;_0xbf4c50['_setAttribute']('vid_end',_0x24ed81),_0x302dc4['_setAttribute']('vid_start',_0x52c634),_0x302dc4['_setAttribute']('vid_end',_0x26973c),this['_touched']['set'](_0x24ed81,{'userId':_0x4b6cd8}),this['_touched']['set'](_0x52c634,{'userId':_0x4b6cd8});}}['_handleMarkerOperation'](_0x299a6e){if(!_0x299a6e['affectsData'])return;const _0x49c5c0=(_0x299a6e=this['_cloneOperation'](_0x299a6e,this['_diffRoots']))['oldRange']?_0x299a6e['oldRange']['root']:null,_0x617c14=_0x299a6e['newRange']?_0x299a6e['newRange']['root']:null;_0x49c5c0&&this['_markers']['delete'](_0x299a6e['name']),_0x617c14&&this['_markers']['set'](_0x299a6e['name'],_0x299a6e['newRange']['clone']());const _0x10b734=null===_0x299a6e['_authorId']?null:_0x299a6e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x13922a=_0x299a6e['name'];if(!this['_touchedMarkers']['has'](_0x13922a))return void this['_touchedMarkers']['set'](_0x13922a,{'range':_0x299a6e['oldRange'],'userId':_0x10b734});const _0x3929d3=this['_touchedMarkers']['get'](_0x13922a),_0x322cce=_0x3929d3['range'],_0x4c0a5a=_0x299a6e['newRange'];null==_0x322cce&&null==_0x4c0a5a||_0x322cce&&_0x4c0a5a&&_0x322cce['isEqual'](_0x4c0a5a)?this['_touchedMarkers']['delete'](_0x299a6e['name']):_0x3929d3['userId']=_0x10b734;}['_handleRootOperation'](_0x3d0813,_0x34ad79){this['_diffRoots']['has'](_0x3d0813['rootName'])?this['_diffRoots']['get'](_0x3d0813['rootName'])['_isAttached']=_0x3d0813['isAdd']:(this['_diffRoots']['set'](_0x3d0813['rootName'],F(_0x3d0813['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3d0813['rootName'],{}),_0x34ad79&&this['_idsRoots']['set'](_0x3d0813['rootName'],F(_0x3d0813['rootName'],!0x0)));const _0x5ba876=null===_0x3d0813['_authorId']?null:_0x3d0813['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x276e37=this['_touchedRoots']['get'](_0x3d0813['rootName']);_0x276e37&&_0x276e37['userId']===_0x5ba876?this['_touchedRoots']['delete'](_0x3d0813['rootName']):this['_touchedRoots']['set'](_0x3d0813['rootName'],{'userId':_0x5ba876,'isAttached':_0x3d0813['isAdd']});}['_handleRootAttributeOperation'](_0x4adf3e){const _0x43bc6a=this['_diffRootsAttributes']['get'](_0x4adf3e['root']['rootName']);null===_0x4adf3e['newValue']?delete _0x43bc6a[_0x4adf3e['key']]:_0x43bc6a[_0x4adf3e['key']]=_0x4adf3e['newValue'];}}function T(_0x4e82f3){const _0xe209f4=F(_0x4e82f3['rootName'],_0x4e82f3['isAttached']());for(const _0x21a8fa of _0x4e82f3['getChildren']()){const _0x23b924=_0x21a8fa['_clone'](!0x0);_0xe209f4['_appendChild'](_0x23b924);}return _0xe209f4;}function F(_0x2bce62,_0x28749a=!0x0){const _0x3efcfa=new mt();return _0x3efcfa['rootName']=_0x2bce62,_0x3efcfa['_isAttached']=_0x28749a,_0x3efcfa['isAttached']=()=>_0x3efcfa['_isAttached'],_0x3efcfa;}function B(_0x3e4aa9,_0x5bba31,_0x507497){const _0x30efff='elementEnd'==_0x3e4aa9['type']?_0x507497['createPositionAt'](_0x3e4aa9['item'],'end'):_0x507497['createPositionBefore'](_0x3e4aa9['item']);return _0x507497['createPositionFromPath'](_0x5bba31,_0x30efff['path'],_0x30efff['stickiness']);}function J(_0xd0a490,_0x4f5c95,_0x3e0a72){const _0x53223d='elementStart'==_0xd0a490['type']?_0x3e0a72['createPositionAt'](_0xd0a490['item'],0x0):_0x3e0a72['createPositionAfter'](_0xd0a490['item']);return _0x3e0a72['createPositionFromPath'](_0x4f5c95,_0x53223d['path'],_0x53223d['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3a6786,_0x48bbe3){super(_0x3a6786),this['focusTracker']=new _0x2e779e(),this['keystrokes']=new _0x15fa03(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x48bbe3),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x59fc7b(this);}['render'](){super['render'](),_0x555b07({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5b1268=_0x39dede=>_0x39dede['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5b1268),this['keystrokes']['set']('arrowleft',_0x5b1268),this['keystrokes']['set']('arrowup',_0x5b1268),this['keystrokes']['set']('arrowdown',_0x5b1268);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x27b45c){this['revisionNameInputView']['fieldView']['element']['value']=_0x27b45c['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x59d223){const _0x79be44=new _0x10b4fb(this['locale'],_0x4d4b85),_0x5f03a2=_0x79be44['fieldView'];_0x5f03a2['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3d0655=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x59d223&&(_0x3d0655+='\x20('+m(this['locale'],'optional')+')'),(_0x79be44['label']=_0x3d0655,_0x5f03a2['on']('input',()=>{this['revisionNameInputValue']=_0x5f03a2['element']['value']['trim']();}),_0x79be44);}}class u extends _0x2c5c18{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x53cdd8=this['editor'],_0x3db71b=_0x53cdd8['plugins']['get']('RevisionTracker');_0x53cdd8['ui']['componentFactory']['add']('revisionHistory',_0x225491=>{const _0x41ee92=_0x5ecf4f(_0x225491),_0x1a520b=_0x41ee92['panelView']['children'],_0x59a302=new _0x5f2164(_0x225491),_0x545008=new _0x5d4f84(_0x225491),_0x4b7c79=new te(_0x225491),_0x553b09=new _0x5d4f84(_0x225491),_0x2f3abc=new te(_0x225491);return _0x41ee92['bind']('isEnabled')['to'](_0x3db71b,'isReady',_0x3db71b,'isEnabled',_0x53cdd8,'isReadOnly',(_0xd8f9dc,_0x331a23,_0x26f3a0)=>_0xd8f9dc&&_0x331a23&&!_0x26f3a0),_0x41ee92['buttonView']['set']({'icon':_0x2bd20b['history'],'label':m(_0x225491,'Revision\x20history'),'tooltip':!0x0}),_0x4b7c79['set']({'label':m(_0x225491,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x4b7c79['bind']('isEnabled')['to'](_0x3db71b,'isReady',_0x3db71b,'isEnabled',_0x53cdd8,'isReadOnly',(_0x9391d,_0x2275fd,_0x369816)=>_0x9391d&&_0x2275fd&&!_0x369816),_0x4b7c79['on']('execute',()=>this['_showDialog']()),_0x2f3abc['set']({'label':m(_0x225491,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x2f3abc['bind']('isEnabled')['to'](_0x3db71b,'isReady',_0x53cdd8,'isReadOnly',(_0x37861c,_0x2c504f)=>_0x37861c&&!_0x2c504f),_0x2f3abc['on']('execute',()=>{_0x53cdd8['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x41ee92['isOpen']=!0x1,_0x53cdd8['editing']['view']['focus']();}),_0x545008['children']['add'](_0x4b7c79),_0x553b09['children']['add'](_0x2f3abc),_0x59a302['role']='menu',_0x59a302['items']['addMany']([_0x545008,_0x553b09]),_0x1a520b['add'](_0x59a302),_0x41ee92;}),_0x53cdd8['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x475b59=this['editor'],_0x222202=_0x475b59['locale'],_0x93eb46=new _0x1db517(_0x222202),_0x4d5c68=new _0x1d8128(_0x222202);_0x93eb46['buttonView']['set']({'icon':_0x2bd20b['history'],'label':m(_0x222202,'Revision\x20history')});const _0x5829e1=new _0x2f0393(_0x222202,_0x93eb46),_0x5d1bc4=new _0x5839df(_0x222202);_0x5d1bc4['set']({'label':m(_0x222202,'Save\x20current\x20revision')}),_0x5d1bc4['delegate']('execute')['to'](_0x93eb46),_0x5d1bc4['on']('execute',()=>{this['_showDialog']();}),_0x5829e1['children']['add'](_0x5d1bc4),_0x4d5c68['items']['add'](_0x5829e1);const _0x107754=new _0x2f0393(_0x222202,_0x93eb46),_0x5739c6=new _0x5839df(_0x222202);return _0x5739c6['set']({'label':m(_0x222202,'Open\x20revision\x20history')}),_0x5739c6['delegate']('execute')['to'](_0x93eb46),_0x5739c6['on']('execute',()=>{_0x475b59['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x107754['children']['add'](_0x5739c6),_0x4d5c68['items']['add'](_0x107754),_0x93eb46['panelView']['children']['add'](_0x4d5c68),_0x93eb46;}['_showDialog'](){const _0x2e23cc=this['editor'],_0x239ccf=_0x2e23cc['locale'],_0x2774fc=_0x2e23cc['plugins']['get']('Dialog'),_0x1fa2d4=_0x2e23cc['plugins']['get']('RevisionTracker');function _0xc75839(_0x4ab83a){_0x2e23cc['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4ab83a['revisionName']?_0x4ab83a['revisionNameInputView']['errorText']=m(_0x239ccf,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2e23cc['plugins']['get'](l)['saveRevision']({'name':_0x4ab83a['revisionName']}),_0x2774fc['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xc75839(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x2774fc['show']({'id':'revisionSave','title':m(_0x239ccf,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x2e23cc['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x2774fc['hide']()},{'label':m(_0x2e23cc['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3cafaa){_0x3cafaa['bind']('isEnabled')['to'](_0x1fa2d4,'isReady',_0x1fa2d4,'isEnabled',_0x2e23cc,'isReadOnly',(_0x3e2ad9,_0x2d7314,_0x109082)=>_0x3e2ad9&&_0x2d7314&&!_0x109082);},'onExecute':()=>_0xc75839(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x4edf4d=this['editor'],_0x21126a=_0x4edf4d['locale'];this['_saveRevisionFormView']=new hs(_0x21126a,_0x4edf4d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends ts{['changeId'];['_model'];constructor(_0xbb7d0e,_0x3f1e00){super(_0xbb7d0e),this['_model']=_0x3f1e00,this['changeId']=_0x3f1e00['id'];const _0x14f7cd=this['bindTemplate'],_0x2e3786=m(_0xbb7d0e,_0x3f1e00['data']['isSuggestion']?'Suggested\x20by':'add'==_0x3f1e00['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x3f1e00['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x14f7cd['to']('type',_0x446854=>'ck-revision-change__'+_0x446854)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2e3786}]},{'text':'\x20'+_0x3f1e00['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x2a5857(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x6d4b13){super(),this['id']=_0x6d4b13['id']||_0x1956ee(),this['author']=_0x6d4b13['author'],this['type']=_0x6d4b13['type'],this['data']=_0x6d4b13['data']||{},this['rootName']=_0x6d4b13['rootName'],this['set']('createdAt',_0x6d4b13['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xae4e6a,_0x566d75){this['newRevisionId']=_0xae4e6a,this['oldRevisionId']=_0x566d75,this['changes']=new _0x31c62c();}['_setChanges'](_0x43f615){for(const _0x389ad9 of _0x43f615)this['changes']['add'](_0x389ad9);}}const Y={'c':_0x5c1362,'a':_0x18e29a,'e':_0x75b35a,'r':_0x73cc,'u':_0x24b245};class d extends _0x2c5c18{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x7c88bc,_0x419539,j];}constructor(_0x30b713){super(_0x30b713),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x4fb701,_0x1eb3ed,_0x1eb17c)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3c8929=>{for(const _0x24dff4 of this['editor']['editing']['view']['document']['roots'])_0x1eb17c?_0x3c8929['removeClass']('ck-editor__editable__overlay',_0x24dff4):_0x3c8929['addClass']('ck-editor__editable__overlay',_0x24dff4);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x242cd4=>null!==_0x242cd4),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xf96545,_0x124cd0,_0xaa58f0)=>_0xf96545&&_0xaa58f0?_0x124cd0['changes']['getIndex'](_0xaa58f0):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4e5ee8,_0xf94667)=>_0x4e5ee8?_0xf94667['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x419539);}['init'](){const _0x2f996f=this['editor'],_0x46acb1=new _t(_0x2f996f,{'direction':'backward'}),_0x4678fe=new _t(_0x2f996f,{'direction':'forward'});(_0x2f996f['commands']['add']('showPreviousChange',_0x46acb1),_0x2f996f['commands']['add']('showNextChange',_0x4678fe),_0x2f996f['commands']['add']('restoreRevision',new pt(_0x2f996f)),this['on']('change:numberOfChanges',()=>{_0x46acb1['refresh'](),_0x4678fe['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2f996f['enableReadOnlyMode']('revision-viewer'),_0x2f996f['plugins']['has']('WidgetToolbarRepository'))&&_0x2f996f['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x4542d5){await this['loadRevisionData'](_0x4542d5);const _0x2d7760={};for(const _0x2cd59d in _0x4542d5['diffData']){if(_0x4542d5['diffData'][_0x2cd59d]['attachChange']&&!_0x4542d5['diffData'][_0x2cd59d]['attachChange']['isAttached'])continue;const _0x4b7cf4=this['_removeRevisionMarkers'](JSON['parse'](_0x4542d5['diffData'][_0x2cd59d]['insertions'])),_0x568b7a=this['editor']['editing']['view']['document'],_0x4eabde=new _0x469a15(_0x568b7a,_0x4b7cf4['map'](_0x1df2ba=>this['_getViewObj'](_0x1df2ba)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2d7760[_0x2cd59d]=this['editor']['data']['processor']['toData'](_0x4eabde),this['editor']['data']['processor']['useFillerType']('default');}return _0x2d7760;}async['getRevisionRootsAttributes'](_0x387afd){await this['loadRevisionData'](_0x387afd);const _0x37bd6f={};for(const _0x39f620 in _0x387afd['diffData'])_0x387afd['diffData'][_0x39f620]['attachChange']&&!_0x387afd['diffData'][_0x39f620]['attachChange']['isAttached']||(_0x37bd6f[_0x39f620]=_0x387afd['diffData'][_0x39f620]['attributesAfter']||{});return _0x37bd6f;}['_removeRevisionMarkers'](_0x12c018){return(_0x12c018=_0x12c018['filter'](_0xcfc587=>!_0xcfc587['name']||'revision-start'!==_0xcfc587['name']&&'revision-end'!==_0xcfc587['name']))['forEach'](_0xfcae8d=>{'string'!=typeof _0xfcae8d&&(_0xfcae8d['children']=this['_removeRevisionMarkers'](_0xfcae8d['children']),_0xfcae8d['attributes']=_0xfcae8d['attributes']['filter'](_0x3afb3d=>!_0x3afb3d[0x0]['startsWith']('data-revision-')));}),_0x12c018;}async['compare'](_0x13976f,_0x22698c,_0xd51ca5=!0x1){if(!this['isEnabled'])return;const _0x2309f7=this['diff'],_0x2a11be=this['repository'],_0x28d4f6='string'==typeof _0x13976f?_0x2a11be['getRevision'](_0x13976f):_0x13976f,_0x18a61b='string'==typeof _0x22698c?_0x2a11be['getRevision'](_0x22698c):_0x22698c,_0x24de76=_0x28d4f6['id'],_0x463a1a=_0x18a61b?_0x18a61b['id']:null;if(!_0xd51ca5&&this['diff']&&this['diff']['newRevisionId']===_0x24de76&&this['diff']['oldRevisionId']===_0x463a1a)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x24de76,_0x463a1a);const _0x27fcdc=this['_getRevisionsRange'](_0x28d4f6,_0x18a61b,!0x0)['map'](_0x36001c=>this['loadRevisionData'](_0x36001c));return _0x27fcdc['push'](new Promise(_0x8fbc75=>{setTimeout(_0x8fbc75,0x14);})),Promise['all'](_0x27fcdc)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4a76a3=this['_getDiff'](_0x24de76,_0x463a1a);for(const _0x5081b7 of _0x4a76a3['changes'])this['_changeIdToChange']['set'](_0x5081b7['id'],_0x5081b7);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x906814=>{for(const _0x33ecc3 of this['editor']['model']['document']['getRootNames']())_0x906814['detachRoot'](_0x33ecc3);for(const _0x46bc87 of Object['keys'](_0x4a76a3['model'])){const _0xeee88=_0x906814['addRoot'](_0x46bc87);for(const _0x551634 of Object['keys'](_0x4a76a3['attributes'][_0x46bc87]))_0x906814['setAttribute'](_0x551634,_0x4a76a3['attributes'][_0x46bc87][_0x551634],_0xeee88);_0x906814['insert'](_0x4a76a3['model'][_0x46bc87],_0xeee88,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4a76a3['changes'])),this['isReady']=!0x0;})['catch'](_0x16e61b=>{console['error'](_0x16e61b),this['_cleanUp'](),_0x2309f7&&(this['diff']=_0x2309f7),this['isReady']=!0x0;});}['addRevisionData'](_0x52f13f,_0x58c01a){const _0x15c8b0=this['repository']['createRevision'](_0x52f13f);return _0x15c8b0['on']('_update',(_0x1bcdb2,_0x513931,_0x58ac10)=>_0x58c01a(_0x513931,_0x58ac10,_0x15c8b0)),this['repository']['addRevision'](_0x15c8b0),_0x15c8b0;}['loadRevisionData'](_0x5f12a3){if(!_0x5f12a3||_0x5f12a3['diffData'])return Promise['resolve']();{const _0x4d8c04=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x4d8c04,'revisionId':_0x5f12a3['id']})['then'](_0x51d791=>{_0x5f12a3['_update']({'diffData':_0x51d791['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4b57af=>{for(const _0x5ae2a3 of this['editor']['model']['document']['getRootNames']())_0x4b57af['detachRoot'](_0x5ae2a3);});}['_sortAndFilterDiffChanges'](_0x18bd1e){const _0x3648cc=[],_0x4343a7=new Map();for(const _0x42bc05 of this['editor']['model']['document']['getRootNames']()){const _0x45ebc5=this['editor']['editing']['view']['getDomRoot'](_0x42bc05);if(!_0x45ebc5)continue;const _0x34cf0e=_0x45ebc5['getClientRects']()['item'](0x0);_0x34cf0e&&(_0x3648cc['push'](_0x42bc05),_0x4343a7['set'](_0x42bc05,_0x34cf0e));}return _0x3648cc['sort']((_0x410f3f,_0x448422)=>{const _0xbd871=_0x4343a7['get'](_0x410f3f),_0x16c956=_0x4343a7['get'](_0x448422);return _0xbd871['y']-_0x16c956['y']||_0xbd871['x']-_0x16c956['x'];}),(_0x18bd1e=_0x18bd1e['filter'](_0x5b8b88=>_0x3648cc['includes'](_0x5b8b88['rootName'])))['sort']((_0x52b9db,_0x5250b1)=>_0x3648cc['indexOf'](_0x52b9db['rootName'])-_0x3648cc['indexOf'](_0x5250b1['rootName'])),_0x18bd1e;}['_makeTape'](_0x40e0b3){const _0x467d3b=Array['from'](_0x40e0b3['markers'])['filter'](([_0x131883,_0x39a0da])=>_0x131883['startsWith']('revision:')&&!_0x39a0da['isCollapsed']),_0x19b5e4=Array['from'](this['editor']['model']['createRangeIn'](_0x40e0b3)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x467d3b['length'])for(const _0x487f85 of _0x19b5e4){const [_0x24b0bb,_0x4d89df]=_0x467d3b[0x0],[,_0xf67f52,_0x576d67]=_0x24b0bb['split'](':');if(_0x4d89df['end']['isEqual'](_0x487f85['nextPosition'])&&_0x467d3b['shift'](),(_0x487f85['previousPosition']['isEqual'](_0x4d89df['start'])||_0x487f85['previousPosition']['isAfter'](_0x4d89df['start']))&&('insertion'==_0xf67f52?_0x487f85['isAdded']={'userId':_0x576d67}:'deletion'==_0xf67f52&&(_0x487f85['isRemoved']={'userId':_0x576d67})),0x0==_0x467d3b['length'])break;}return _0x19b5e4;}['_refreshStartEndIndex'](_0x21d4c3){const _0x109d4b=new Map();for(let _0x2ea50a=0x0;_0x2ea50a<_0x21d4c3['length'];_0x2ea50a++)'text'===_0x21d4c3[_0x2ea50a]['type']?(_0x21d4c3[_0x2ea50a]['item']['startIndex']=_0x2ea50a,_0x21d4c3[_0x2ea50a]['item']['endIndex']=_0x2ea50a):('elementStart'===_0x21d4c3[_0x2ea50a]['type']?_0x21d4c3[_0x2ea50a]['item']['startIndex']=_0x2ea50a:'elementEnd'===_0x21d4c3[_0x2ea50a]['type']&&(_0x21d4c3[_0x2ea50a]['item']['endIndex']=_0x2ea50a),_0x109d4b['set'](_0x21d4c3[_0x2ea50a]['id'],_0x2ea50a));for(const _0x340b15 of _0x109d4b['values']())'elementStart'===_0x21d4c3[_0x340b15]['type']?_0x21d4c3[_0x340b15]['item']['endIndex']=_0x109d4b['get'](_0x21d4c3[_0x340b15]['pairId']):'elementEnd'===_0x21d4c3[_0x340b15]['type']&&(_0x21d4c3[_0x340b15]['item']['startIndex']=_0x109d4b['get'](_0x21d4c3[_0x340b15]['pairId']));}['_processTape'](_0x1c479f){for(let _0x51cae5=0x0;_0x51cae5<_0x1c479f['length'];_0x51cae5++){if('elementStart'===_0x1c479f[_0x51cae5]['type'])_0x1c479f[_0x51cae5]['item']['startIndex']=_0x51cae5;else{if('elementEnd'===_0x1c479f[_0x51cae5]['type']){_0x1c479f[_0x51cae5]['item']['endIndex']=_0x51cae5;const _0xeef66d=_0x1c479f[_0x51cae5]['item']['startIndex'];_0x1c479f[_0xeef66d]['pairId']=_0x1c479f[_0x51cae5]['id'],_0x1c479f[_0x51cae5]['pairId']=_0x1c479f[_0xeef66d]['id'];}else _0x1c479f[_0x51cae5]['item']['startIndex']=_0x51cae5,_0x1c479f[_0x51cae5]['item']['endIndex']=_0x51cae5,_0x1c479f[_0x51cae5]['pairId']=null;}_0x1c479f[_0x51cae5]['markersStart']||(_0x1c479f[_0x51cae5]['markersStart']=[],_0x1c479f[_0x51cae5]['markersEnd']=[]);}}['_markInsertions'](_0x26935c,_0x3fce9e){const _0x4af0c2=_0x26935c['filter'](_0x1e947e=>!_0x1e947e['isAdded']);for(let _0x50d243=0x0;_0x50d243<_0x3fce9e['length'];_0x50d243++)_0x3fce9e[_0x50d243]['isAdded']&&(_0x4af0c2[_0x50d243]['isAdded']=_0x3fce9e[_0x50d243]['isAdded']);}['_makeModelFromViewString'](_0x46e2b5){const _0x596562=JSON['parse'](_0x46e2b5),_0x4094be=this['editor']['editing']['view']['document'],_0x1ed58b=new _0x469a15(_0x4094be,_0x596562['map'](_0x27c102=>this['_getViewObj'](_0x27c102)));return this['editor']['data']['toModel'](_0x1ed58b);}['_getViewObj'](_0x5f569a){const _0xf588a2=this['editor']['editing']['view']['document'];if('string'==typeof _0x5f569a)return new _0x2750d6(_0xf588a2,_0x5f569a);{const _0x3506b1=_0x5f569a['children']['map'](_0x3326d3=>this['_getViewObj'](_0x3326d3));return new(Y[_0x5f569a['type']]||_0x37bd31)(_0xf588a2,_0x5f569a['name'],_0x5f569a['attributes'],_0x3506b1);}}['_getDiff'](_0x535892,_0x2d1f3e=null){const _0x7bdb5e=this['repository']['getRevision'](_0x535892),_0x3bd344=_0x2d1f3e?this['repository']['getRevision'](_0x2d1f3e):null,_0x345645=this['_getRevisionsRange'](_0x7bdb5e,_0x3bd344),_0x26b0a0=_0x345645[_0x345645['length']-0x1],_0x5872b3=new Map(),_0x2d64b5={'model':{},'attributes':{},'changes':[]},_0x3742f7=new Set(),_0x5af2dc=new Map();for(let _0x3ac9d5=_0x345645['length']-0x1;_0x3ac9d5>=0x0;_0x3ac9d5--){const _0x39c868=_0x345645[_0x3ac9d5];for(const _0x24ab3d of Object['keys'](_0x39c868['diffData']))if(_0x39c868['diffData'][_0x24ab3d]['attachChange']){const _0x3d4cb9=_0x39c868['diffData'][_0x24ab3d]['attachChange'];_0x3d4cb9['isAttached']?(_0x3742f7['add'](_0x24ab3d),_0x5af2dc['has'](_0x24ab3d)&&_0x5af2dc['get'](_0x24ab3d)['userId']==_0x3d4cb9['userId']?_0x5af2dc['delete'](_0x24ab3d):_0x5af2dc['set'](_0x24ab3d,_0x3d4cb9)):_0x5af2dc['has'](_0x24ab3d)?(_0x3742f7['delete'](_0x24ab3d),_0x5af2dc['delete'](_0x24ab3d)):(_0x3742f7['add'](_0x24ab3d),_0x5af2dc['set'](_0x24ab3d,_0x3d4cb9));}else _0x3742f7['add'](_0x24ab3d);}for(const _0x55f026 of _0x3742f7){const _0x326902=_0x5af2dc['has'](_0x55f026)&&!_0x5af2dc['get'](_0x55f026)['isAttached'];let _0x3f9895=_0x326902?_0x345645['length']-0x1:0x0;const _0x151132=_0x326902?-0x1:0x1;for(;_0x345645[_0x3f9895];){const _0x5042c2=_0x345645[_0x3f9895];if(_0x5042c2['diffData'][_0x55f026]){const _0x42de67=_0x326902?_0x5042c2['diffData'][_0x55f026]['attributesBefore']:_0x5042c2['diffData'][_0x55f026]['attributesAfter'];_0x2d64b5['attributes'][_0x55f026]=_0x42de67?_0x1f4985(_0x42de67):{};break;}_0x3f9895+=_0x151132;}}for(const _0x443ac5 of _0x345645){_0x443ac5['model']={};for(const _0x1c17a0 of _0x443ac5['authors'])_0x5872b3['set'](_0x1c17a0['id'],_0x1c17a0);for(const _0x5e4430 of _0x3742f7){const _0x4058a2=_0x443ac5['diffData'][_0x5e4430]?_0x443ac5['diffData'][_0x5e4430]['insertions']:'[]',_0x38f0b9=_0x443ac5['diffData'][_0x5e4430]?_0x443ac5['diffData'][_0x5e4430]['deletions']:'[]';_0x443ac5['model'][_0x5e4430]={'insertions':this['_makeModelFromViewString'](_0x4058a2),'deletions':this['_makeModelFromViewString'](_0x38f0b9)};}}for(const _0x2fa139 of _0x3742f7){let _0x56ce68=null,_0x53a901=0x0;const _0x315f77=new Map(Array['from'](_0x7bdb5e['model'][_0x2fa139]['insertions']['markers'])['filter'](([_0x1ac220])=>!_0x1ac220['startsWith']('revision:')));let _0x42087d=0x0;for(const _0x225adc of _0x345645){const _0x741943=this['_makeTape'](_0x225adc['model'][_0x2fa139]['insertions']);_0x225adc==_0x7bdb5e?(_0x56ce68=_0x741943,_0x53a901=_0x56ce68['length'],_0x56ce68['forEach'](_0x2df8ae=>{_0x2df8ae['id']=_0x42087d++;}),this['_processTape'](_0x56ce68)):this['_markInsertions'](_0x56ce68,_0x741943);const _0x12f8e7=_0x56ce68['filter'](_0x2d8458=>!_0x2d8458['isAdded'])['map'](_0x1a2a09=>_0x1a2a09['id']);let _0x4e0e84=0x0;const _0x321fd7=this['_makeTape'](_0x225adc['model'][_0x2fa139]['deletions']);_0x321fd7['forEach'](_0x35bbcd=>{_0x35bbcd['isRemoved']?_0x35bbcd['id']=_0x53a901++:_0x35bbcd['id']=_0x12f8e7[_0x4e0e84++];}),this['_processTape'](_0x321fd7),this['_setDistance'](_0x56ce68,'isAdded'),this['_setDistance'](_0x321fd7,'isRemoved'),_0x225adc==_0x7bdb5e&&this['_markMarkers'](_0x56ce68,_0x315f77),_0x56ce68=this['_joinTapes'](_0x56ce68,_0x321fd7),this['_refreshStartEndIndex'](_0x56ce68),this['_setDistance'](_0x56ce68,'isRemoved');}_0x56ce68=_0x56ce68['filter'](_0x47255f=>!(_0x47255f['isAdded']&&_0x47255f['isRemoved']));const _0x45c6f2=new Map(_0x26b0a0['model'][_0x2fa139]['deletions']['markers']),_0x149f8c=new Set(_0x315f77['keys']());for(const _0x52aba8 of _0x45c6f2['keys']())_0x149f8c['delete'](_0x52aba8);this['_markSuggestions'](_0x56ce68,_0x149f8c),this['_fixObsoleteTags'](_0x56ce68),_0x56ce68=this['_removeMissingPairs'](_0x56ce68),_0x56ce68=this['_markMismatchedRemovedTags'](_0x56ce68),_0x56ce68=this['_removeUnsupportedChanges'](_0x56ce68);const {root:_0x40211c,changes:_0x1261bb}=this['_makeModelFromTape'](_0x56ce68,_0x5872b3,_0x2fa139);_0x2d64b5['model'][_0x2fa139]=_0x40211c;const _0x39c9ee=_0x5af2dc['get'](_0x2fa139);if(_0x39c9ee){const _0x3e579f=_0x5872b3['get'](_0x39c9ee['userId']),_0x5a80e9=new r({'author':_0x3e579f,'type':_0x39c9ee['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x2fa139});_0x1261bb['unshift'](_0x5a80e9),_0x2d64b5['attributes'][_0x2fa139]['revisionHistoryAttachChange']=_0x5a80e9['id'];}_0x2d64b5['changes']=_0x2d64b5['changes']['concat'](_0x1261bb);}return _0x2d64b5;}['_markMarkers'](_0x1c2635,_0x2061c3){for(let _0x42aa7f=0x0;_0x42aa7f<_0x1c2635['length'];_0x42aa7f++)for(const [_0x117fe9,_0x2f9ac0]of _0x2061c3)_0x2f9ac0['start']['isEqual'](_0x1c2635[_0x42aa7f]['previousPosition'])&&_0x1c2635[_0x42aa7f]['markersStart']['push'](_0x117fe9),_0x2f9ac0['end']['isEqual'](_0x1c2635[_0x42aa7f]['nextPosition'])&&_0x1c2635[_0x42aa7f]['markersEnd']['push'](_0x117fe9);}['_joinTapes'](_0x3e0837,_0x4b3b26){let _0x3abf04=[],_0x278a63=0x0,_0x492c34=0x0;for(;_0x278a63<_0x3e0837['length']||_0x492c34<_0x4b3b26['length'];){const _0x2433b4=_0x3e0837[_0x278a63]||{},_0x336eb5=_0x4b3b26[_0x492c34]||{};if(_0x2433b4['id']==_0x336eb5['id'])_0x278a63++,_0x492c34++,_0x3abf04['push'](_0x2433b4);else{if(_0x336eb5['isRemoved']&&_0x2433b4['isAdded']){const {commonTape:_0x160937,iEnd:_0x4752aa,jEnd:_0x4f59d8}=this['_threeWayMerge'](_0x3e0837,_0x278a63,_0x4b3b26,_0x492c34);_0x3abf04=_0x3abf04['concat'](_0x160937),_0x278a63=_0x4752aa,_0x492c34=_0x4f59d8;}else _0x336eb5['isRemoved']?(_0x492c34++,_0x3abf04['push'](_0x336eb5)):(_0x278a63++,_0x3abf04['push'](_0x2433b4));}}return _0x3abf04;}['_markSuggestions'](_0x798cf3,_0x2b0b63){const _0x5892c5=[];for(let _0x5fbeb8=0x0;_0x5fbeb8<_0x798cf3['length'];_0x5fbeb8++){for(let _0x2dfa2b=0x0;_0x2dfa2b<_0x798cf3[_0x5fbeb8]['markersStart']['length'];_0x2dfa2b++){const _0x58524b=_0x798cf3[_0x5fbeb8]['markersStart'][_0x2dfa2b];if(!_0x2b0b63['has'](_0x58524b))continue;const {group:_0x30771f,type:_0x3acc3c,authorId:_0x118acb}=_0x4ec9de(_0x58524b);'revision-suggestion'!=_0x30771f||'insertion'!=_0x3acc3c&&'deletion'!=_0x3acc3c||(_0x5892c5['unshift']({'type':_0x3acc3c,'name':_0x58524b,'userId':_0x118acb}),_0x798cf3[_0x5fbeb8]['markersStart']['splice'](_0x2dfa2b,0x1),_0x2dfa2b--);}_0x36a9cb(_0x798cf3[_0x5fbeb8]);for(let _0x310787=0x0;_0x310787<_0x798cf3[_0x5fbeb8]['markersEnd']['length'];_0x310787++){const _0x481293=_0x798cf3[_0x5fbeb8]['markersEnd'][_0x310787];if(!_0x2b0b63['has'](_0x481293))continue;const {group:_0x300c21,type:_0x34ca37}=_0x4ec9de(_0x481293);if('revision-suggestion'!=_0x300c21||'insertion'!=_0x34ca37&&'deletion'!=_0x34ca37)continue;_0x798cf3[_0x5fbeb8]['markersEnd']['splice'](_0x310787,0x1),_0x310787--;const _0x75a1ed=_0x5892c5['findIndex'](_0x4c8c7c=>_0x4c8c7c['name']==_0x481293);_0x75a1ed>-0x1&&_0x5892c5['splice'](_0x75a1ed,0x1);}}function _0x4ec9de(_0x12050e){const _0x2dbb7a=_0x12050e['split'](':');return{'group':_0x2dbb7a[0x0],'type':_0x2dbb7a[0x1],'subType':_0x2dbb7a['length']>=0x5?_0x2dbb7a[0x2]:null,'id':_0x2dbb7a['length']<0x5?_0x2dbb7a[0x2]:_0x2dbb7a[0x3],'authorId':_0x2dbb7a['length']<0x5?_0x2dbb7a[0x3]:_0x2dbb7a[0x4],'markerCount':0x6==_0x2dbb7a['length']?_0x2dbb7a[0x5]:null};}function _0x36a9cb(_0x1727f1){for(let _0xc58941=0x0;_0xc58941<_0x5892c5['length'];_0xc58941++){if(_0x1727f1['isAdded']&&'insertion'==_0x5892c5[_0xc58941]['type'])return _0x1727f1['isAddSuggestion']=_0x5892c5[_0xc58941],void delete _0x1727f1['isAdded'];if(!_0x1727f1['isAdded']&&!_0x1727f1['isRemoved']&&'deletion'==_0x5892c5[_0xc58941]['type'])return void(_0x1727f1['isRemoveSuggestion']=_0x5892c5[_0xc58941]);}}}['_setDistance'](_0x363ca4,_0x2f2591){let _0x33e112=0x0,_0x5b5964=!0x1;const _0x38dcbb=new Map();for(const _0x4490e4 of _0x363ca4)_0x4490e4[_0x2f2591]?_0x5b5964&&(_0x33e112++,_0x5b5964=!0x1):(_0x33e112++,_0x5b5964=!0x0),_0x38dcbb['set'](_0x4490e4['id'],_0x33e112);for(let _0x1d604e=0x0;_0x1d604e<_0x363ca4['length'];_0x1d604e++){if('isRemoved'==_0x2f2591&&_0x363ca4[_0x1d604e]['isAdded']||'isAdded'==_0x2f2591&&_0x363ca4[_0x1d604e]['isRemoved'])continue;if('text'==_0x363ca4[_0x1d604e]['type']){_0x363ca4[_0x1d604e]['distance']=0x0;continue;}const _0x333075=_0x38dcbb['get'](_0x363ca4[_0x1d604e]['pairId']),_0x5c38fd=_0x38dcbb['get'](_0x363ca4[_0x1d604e]['id']);_0x363ca4[_0x1d604e]['distance']=_0x333075-_0x5c38fd;}}['_getRevisionsRange'](_0x36d37c,_0x4435ba,_0x1b90e2=!0x1){const _0x15760e=[];let _0x311840=this['repository']['getIndex'](_0x36d37c),_0x15c965=this['repository']['getIndex'](_0x4435ba);for(-0x1==_0x15c965&&(_0x15c965=this['repository']['_revisions']['length'],_0x1b90e2=!0x1);_0x311840<_0x15c965;)_0x15760e['push'](this['repository']['getRevision'](_0x311840)),_0x311840++;return _0x1b90e2&&_0x15760e['push'](this['repository']['getRevision'](_0x311840)),_0x15760e;}['_threeWayMerge'](_0x503d51,_0x2acd87,_0x15c7cb,_0x445f30){const _0x1bcebb=this['editor']['model']['schema'];let _0x385d17=_0x2acd87;for(;_0x503d51[_0x385d17]&&_0x503d51[_0x385d17]['isAdded'];)_0x385d17++;let _0x538b52=_0x445f30;for(;_0x15c7cb[_0x538b52]&&_0x15c7cb[_0x538b52]['isRemoved'];)_0x538b52++;_0x51d406(_0x503d51,_0x2acd87,_0x385d17),_0x51d406(_0x15c7cb,_0x445f30,_0x538b52);const _0xb28be4=_0x15c7cb['slice'](_0x445f30,_0x538b52)['concat'](_0x503d51['slice'](_0x2acd87,_0x385d17));return _0xb28be4['sort']((_0x4cce93,_0x11ca1c)=>_0x4cce93['side']!=_0x11ca1c['side']?_0x4cce93['side']-_0x11ca1c['side']:_0x4cce93['level']!=_0x11ca1c['level']?_0x4cce93['level']-_0x11ca1c['level']:_0x4cce93['distance']!=_0x11ca1c['distance']?_0x11ca1c['distance']-_0x4cce93['distance']:!!_0x4cce93['isAdded']!=!!_0x11ca1c['isAdded']?-0x1==_0x4cce93['side']||0x0==_0x4cce93['side']?_0x4cce93['isAdded']?-0x1:0x1:_0x4cce93['isAdded']?0x1:-0x1:_0x4cce93['index']-_0x11ca1c['index']),{'commonTape':_0xb28be4,'iEnd':_0x385d17,'jEnd':_0x538b52};function _0x51d406(_0x201bff,_0x416b29,_0x3aaeac){let _0x66e95c=-0x1,_0x14faef=Number['POSITIVE_INFINITY'],_0x2f6285=!0x0;for(let _0x1e319d=_0x416b29;_0x1e319d<_0x3aaeac;_0x1e319d++)if(_0x1bcebb['isInline'](_0x201bff[_0x1e319d]['item'])||(_0x2f6285=!0x1),_0x201bff[_0x1e319d]['item']['startIndex']<_0x416b29&&(_0x66e95c=_0x1e319d),_0x201bff[_0x1e319d]['item']['endIndex']>=_0x3aaeac){_0x14faef=_0x1e319d;break;}_0x2f6285&&(_0x66e95c=_0x3aaeac-0x1);for(let _0x406845=_0x416b29;_0x406845<_0x3aaeac;_0x406845++)_0x201bff[_0x406845]['side']=_0x406845<=_0x66e95c?-0x1:_0x406845<_0x14faef?0x0:0x1,_0x201bff[_0x406845]['index']=_0x406845;let _0x57e867=0x0;for(let _0xc6a8ce=_0x416b29;_0xc6a8ce<=_0x66e95c;_0xc6a8ce++)0x0==_0x201bff[_0xc6a8ce]['distance']?_0x201bff[_0xc6a8ce]['level']=_0x57e867:(_0x57e867++,_0x201bff[_0xc6a8ce]['level']=_0x57e867,_0x57e867++);for(let _0x147df5=_0x416b29;_0x147df5<_0x3aaeac;_0x147df5++)0x0==_0x201bff[_0x147df5]['side']&&(_0x201bff[_0x147df5]['level']=_0x57e867);_0x57e867=0x0;for(let _0x2e09ee=_0x3aaeac-0x1;_0x2e09ee>=_0x14faef;_0x2e09ee--)0x0==_0x201bff[_0x2e09ee]['distance']?_0x201bff[_0x2e09ee]['level']=_0x57e867:(_0x57e867--,_0x201bff[_0x2e09ee]['level']=_0x57e867,_0x57e867--);}}['_fixObsoleteTags'](_0x4f0a1e){const _0xc7c649=new Map(),_0x4c2d5c=this['editor']['model']['schema'];for(let _0x279fbb=0x1;_0x279fbb<_0x4f0a1e['length'];_0x279fbb++){let _0x132d8a,_0x2cd60d,_0x39b553;const _0x63f792=_0x4f0a1e[_0x279fbb],_0xf2763e=_0x4f0a1e[_0x279fbb-0x1];if('text'==_0x63f792['type'])continue;if(_0x63f792['type']!=_0xf2763e['type'])continue;if(!_0x4c2d5c['isBlock'](_0xf2763e['item'])||_0x4c2d5c['isLimit'](_0xf2763e['item']))continue;if(!_0x4c2d5c['isBlock'](_0x63f792['item'])||_0x4c2d5c['isLimit'](_0x63f792['item']))continue;if((_0x4f0a1e[_0x279fbb]['isAdded']||_0x4f0a1e[_0x279fbb]['isAddSuggestion'])&&_0x4f0a1e[_0x279fbb-0x1]['isRemoved'])_0x132d8a=_0x4f0a1e[_0x279fbb],_0x2cd60d=_0x4f0a1e[_0x279fbb-0x1],_0x39b553=_0x279fbb-0x1;else{if(!_0x4f0a1e[_0x279fbb]['isRemoved']||!_0x4f0a1e[_0x279fbb-0x1]['isAdded']&&!_0x4f0a1e[_0x279fbb-0x1]['isAddSuggestion'])continue;_0x132d8a=_0x4f0a1e[_0x279fbb-0x1],_0x2cd60d=_0x4f0a1e[_0x279fbb],_0x39b553=_0x279fbb;}const _0x31153a=_0x132d8a['level']==_0x2cd60d['level'],_0x2366b3=Math['abs'](_0x132d8a['level'])<Math['abs'](_0x2cd60d['level'])&&0x0==_0x2cd60d['distance'];(_0x31153a||_0x2366b3)&&(_0xc7c649['set'](_0x2cd60d['id'],_0x132d8a['id']),_0x4f0a1e['splice'](_0x39b553,0x1),_0x279fbb--,_0x132d8a['isAdded']=!0x1);}for(let _0x417ce3=0x0;_0x417ce3<_0x4f0a1e['length'];_0x417ce3++)_0xc7c649['has'](_0x4f0a1e[_0x417ce3]['pairId'])&&(_0x4f0a1e[_0x417ce3]['pairId']=_0xc7c649['get'](_0x4f0a1e[_0x417ce3]['pairId']));}['_removeMissingPairs'](_0x46c53f){const _0x139f7a=new Set(_0x46c53f['map'](_0x2efba5=>_0x2efba5['id']));for(let _0x59c6bd=0x0;_0x59c6bd<_0x46c53f['length'];_0x59c6bd++)_0x139f7a['has'](_0x46c53f[_0x59c6bd]['pairId'])||0x0==_0x46c53f[_0x59c6bd]['distance']||(_0x46c53f[_0x59c6bd]['isIncorrect']=!0x0);return _0x46c53f['filter'](_0x374b33=>!_0x374b33['isIncorrect']);}['_markMismatchedRemovedTags'](_0x275177){const _0xd19893=new Set();for(let _0x2cb7f9=0x0;_0x2cb7f9<_0x275177['length'];_0x2cb7f9++){if(_0xd19893['has'](_0x275177[_0x2cb7f9]['id'])&&_0x275177[_0x2cb7f9]['isRemoved']&&(_0x275177[_0x2cb7f9]['isIncorrect']=!0x0),_0x275177[_0x2cb7f9]['isIncorrect'])continue;if(0x0==_0x275177[_0x2cb7f9]['distance'])continue;if('elementStart'!=_0x275177[_0x2cb7f9]['type'])continue;if(null==_0x275177[_0x2cb7f9]['pairId'])continue;let _0x1cb4ca=_0x2cb7f9+0x1,_0x23bdf7=0x0;for(;_0x275177[_0x1cb4ca]['id']!=_0x275177[_0x2cb7f9]['pairId'];)'elementStart'==_0x275177[_0x1cb4ca]['type']?_0x23bdf7++:'elementEnd'==_0x275177[_0x1cb4ca]['type']&&_0x23bdf7--,_0x1cb4ca++;if(0x0!=_0x23bdf7){if(_0x275177[_0x2cb7f9]['isRemoved'])_0x275177[_0x2cb7f9]['isIncorrect']=!0x0;else{for(;_0x1cb4ca!=_0x2cb7f9;)_0x275177[_0x1cb4ca]['isRemoved']&&0x0!=_0x275177[_0x1cb4ca]['distance']&&(_0x275177[_0x1cb4ca]['isIncorrect']=!0x0,_0xd19893['add'](_0x275177[_0x1cb4ca]['pairId'])),_0x1cb4ca--;}}}return _0x275177['filter'](_0x426faf=>!_0x426faf['isIncorrect']);}['_removeUnsupportedChanges'](_0x1ddca6){const _0x2f6f54=this['editor']['model']['schema'];for(let _0x9d376=0x0;_0x9d376<_0x1ddca6['length'];_0x9d376++){if(!(_0x1ddca6[_0x9d376]['isAdded']||_0x1ddca6[_0x9d376]['isAddSuggestion']||_0x1ddca6[_0x9d376]['isRemoved']||_0x1ddca6[_0x9d376]['isRemoveSuggestion']))continue;if(0x0==_0x1ddca6[_0x9d376]['distance'])continue;const _0x3aeed4=_0x1ddca6[_0x9d376]['item'];_0x2f6f54['isBlock'](_0x3aeed4)||_0x2f6f54['isLimit'](_0x3aeed4)||(_0x1ddca6[_0x9d376]['isAdded']&&delete _0x1ddca6[_0x9d376]['isAdded'],_0x1ddca6[_0x9d376]['isAddSuggestion']&&delete _0x1ddca6[_0x9d376]['isAddSuggestion'],_0x1ddca6[_0x9d376]['isRemoveSuggestion']&&delete _0x1ddca6[_0x9d376]['isRemoveSuggestion'],_0x1ddca6[_0x9d376]['isRemoved']&&(_0x1ddca6[_0x9d376]['isIncorrect']=!0x0));}return _0x1ddca6['filter'](_0x8481f0=>!_0x8481f0['isIncorrect']);}['_makeModelFromTape'](_0x49e2ff,_0x25c2a4,_0x5dcb56){const _0xef23e9=new mt(),_0x56d29a=[],_0x10f376=new Map(),_0x18078d=this['editor']['model'],_0x570ffc=_0x18078d['schema'],_0x2aabd7=[_0xef23e9],_0x482ebd={},_0x42554d={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x12cee6=null;const _0xa3ec46=[0x0];for(let _0x101e1e=0x0;_0x101e1e<_0x49e2ff['length'];_0x101e1e++)if('elementStart'===_0x49e2ff[_0x101e1e]['type']){_0x49e2ff[_0x101e1e]['previousPosition']=_0x18078d['createPositionFromPath'](_0xef23e9,_0xa3ec46);const _0x5bb9e6=new ft(_0x49e2ff[_0x101e1e]['item']['name'],_0x49e2ff[_0x101e1e]['item']['getAttributes']());_0x2aabd7[0x0]['_appendChild'](_0x5bb9e6),_0xa3ec46['push'](0x0),_0x2aabd7['unshift'](_0x5bb9e6),_0x49e2ff[_0x101e1e]['nextPosition']=_0x18078d['createPositionFromPath'](_0xef23e9,_0xa3ec46);}else'elementEnd'===_0x49e2ff[_0x101e1e]['type']?(_0x2aabd7['shift'](),_0x49e2ff[_0x101e1e]['previousPosition']=_0x18078d['createPositionFromPath'](_0xef23e9,_0xa3ec46),_0xa3ec46['pop'](),_0xa3ec46[_0xa3ec46['length']-0x1]++,_0x49e2ff[_0x101e1e]['nextPosition']=_0x18078d['createPositionFromPath'](_0xef23e9,_0xa3ec46)):(_0x49e2ff[_0x101e1e]['previousPosition']=_0x18078d['createPositionFromPath'](_0xef23e9,_0xa3ec46),_0x12cee6?_0x12cee6['_data']+=_0x49e2ff[_0x101e1e]['item']['data']:_0x12cee6=new wt(_0x49e2ff[_0x101e1e]['item']['data'],_0x49e2ff[_0x101e1e]['item']['getAttributes']()),_0x49e2ff[_0x101e1e+0x1]&&'text'===_0x49e2ff[_0x101e1e+0x1]['type']&&_0x4482d7(_0x12cee6,_0x49e2ff[_0x101e1e+0x1]['item'])||(_0x2aabd7[0x0]['_appendChild'](_0x12cee6),_0x12cee6=null),_0xa3ec46[_0xa3ec46['length']-0x1]+=_0x49e2ff[_0x101e1e]['item']['offsetSize'],_0x49e2ff[_0x101e1e]['nextPosition']=_0x18078d['createPositionFromPath'](_0xef23e9,_0xa3ec46));for(let _0x1f28a5=0x0;_0x1f28a5<_0x49e2ff['length'];_0x1f28a5++){const _0x1593a9=_0x49e2ff[_0x1f28a5]['previousPosition'],_0x5bf5cc=_0x49e2ff[_0x1f28a5]['nextPosition'];for(const _0xeb97a9 of _0x49e2ff[_0x1f28a5]['markersStart'])_0x10f376['set'](_0xeb97a9,{'start':_0x1593a9,'end':null});_0x360adf('isRemoveSuggestion',_0x1f28a5,_0x1593a9,_0x5bf5cc),_0x360adf('isAddSuggestion',_0x1f28a5,_0x1593a9,_0x5bf5cc),_0x360adf('isRemoved',_0x1f28a5,_0x1593a9,_0x5bf5cc),_0x360adf('isAdded',_0x1f28a5,_0x1593a9,_0x5bf5cc);for(const _0x5823a9 of _0x49e2ff[_0x1f28a5]['markersEnd']){_0x10f376['get'](_0x5823a9)['end']=_0x5bf5cc;}}for(const [_0x3d6a92,_0x2eff15]of _0x10f376){const _0x965462=this['editor']['model']['createRange'](_0x2eff15['start'],_0x2eff15['end']);_0xef23e9['markers']['set'](_0x3d6a92,_0x965462);}return _0x56d29a['sort']((_0x3d6c33,_0x1e0817)=>{const _0x2c65cb=_0xef23e9['markers']['get']('revision:'+_0x3d6c33['id']),_0x4c9f9b=_0xef23e9['markers']['get']('revision:'+_0x1e0817['id']);return _0x2c65cb['start']['isBefore'](_0x4c9f9b['start'])?-0x1:_0x2c65cb['start']['isAfter'](_0x4c9f9b['start'])?0x1:_0x2c65cb['end']['isBefore'](_0x4c9f9b['end'])?-0x1:_0x2c65cb['end']['isAfter'](_0x4c9f9b['end'])?0x1:'add'===_0x3d6c33['type']?-0x1:0x1;}),{'root':_0xef23e9,'changes':_0x56d29a};function _0x360adf(_0x223f59,_0x1d9fc6,_0xf9c37,_0x10f5b8){const _0x16e01b=!!_0x49e2ff[_0x1d9fc6][_0x223f59],_0x23fcd6=_0x16e01b?_0x49e2ff[_0x1d9fc6][_0x223f59]['userId']:null,_0x9ac67a=_0x1d9fc6===_0x49e2ff['length']-0x1,_0x40702f=_0x42554d[_0x223f59][0x0],_0x242519=_0x570ffc['isObject'](_0x49e2ff[_0x1d9fc6]['item']);!_0x482ebd[_0x223f59]&&_0x16e01b?_0x482ebd[_0x223f59]={'start':_0xf9c37,'tapeItem':_0x49e2ff[_0x1d9fc6],'userId':_0x23fcd6,'type':_0x223f59}:_0x482ebd[_0x223f59]&&!_0x16e01b?(_0x482ebd[_0x223f59]['end']=_0xf9c37,_0x524e3b(_0x482ebd[_0x223f59]),_0x482ebd[_0x223f59]=null):_0x482ebd[_0x223f59]&&_0x16e01b&&_0x482ebd[_0x223f59]['userId']!==_0x23fcd6&&(_0x482ebd[_0x223f59]['end']=_0xf9c37,_0x40702f&&_0x40702f['userId']===_0x482ebd[_0x223f59]['userId']||_0x524e3b(_0x482ebd[_0x223f59]),_0x482ebd[_0x223f59]={'start':_0xf9c37,'tapeItem':_0x49e2ff[_0x1d9fc6],'userId':_0x23fcd6,'type':_0x223f59}),_0x482ebd[_0x223f59]&&_0x242519&&('elementStart'!==_0x49e2ff[_0x1d9fc6]['type']||_0x40702f&&_0x40702f['userId']===_0x23fcd6||_0x42554d[_0x223f59]['unshift']({'userId':_0x23fcd6,'object':_0x49e2ff[_0x1d9fc6]['item'],'change':_0x482ebd[_0x223f59]}),'elementEnd'===_0x49e2ff[_0x1d9fc6]['type']&&_0x40702f&&_0x40702f['object']===_0x49e2ff[_0x1d9fc6]['item']&&(_0x42554d[_0x223f59]['shift'](),_0x482ebd[_0x223f59]=_0x40702f['change'])),_0x482ebd[_0x223f59]&&_0x9ac67a&&(_0x482ebd[_0x223f59]['end']=_0x10f5b8,_0x524e3b(_0x482ebd[_0x223f59]),_0x482ebd[_0x223f59]=null);}function _0x524e3b({start:_0x3fd8b2,end:_0x2b4faa,tapeItem:_0x3c4a19,userId:_0xce5c3d,type:_0x5efecb}){const _0x53a155=_0x3c4a19['item'],_0x4a6c94=_0x18078d['schema']['isBlock'](_0x53a155)&&!_0x18078d['schema']['isLimit'](_0x53a155),_0xda3f2b=_0x3fd8b2['nodeAfter']==_0x2b4faa['parent']&&_0x2b4faa['isAtStart'];if(_0x4a6c94&&_0xda3f2b)return;const _0xe79aff=_0x18078d['createRange'](_0x3fd8b2,_0x2b4faa),_0x4ff404=_0x25c2a4['get'](_0xce5c3d),_0x12cf9e=new r({'author':_0x4ff404,'type':'isAdded'==_0x5efecb||'isAddSuggestion'==_0x5efecb?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5efecb||'isRemoveSuggestion'==_0x5efecb},'createdAt':new Date(),'rootName':_0x5dcb56});_0x56d29a['push'](_0x12cf9e),_0xef23e9['markers']['set']('revision:'+_0x12cf9e['id'],_0xe79aff);}function _0x4482d7(_0x16cb49,_0x86cff8){const _0x17f9e1=_0x16cb49['getAttributes'](),_0x9b4519=_0x86cff8['getAttributes']();for(const _0x3a6493 of _0x17f9e1){if(_0x3a6493[0x1]!==_0x86cff8['getAttribute'](_0x3a6493[0x0]))return!0x1;_0x9b4519['next']();}return _0x9b4519['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x56cfe1=>{const _0x47e55a=_0x56cfe1['markerName']['split'](':')[0x1],_0x43780e=this['_getChangeFromId'](_0x47e55a);if(!_0x43780e)return null;const _0x54d77c='add'==_0x43780e['type']?'insertion':'deletion',_0x28102b=['ck-suggestion-marker','ck-suggestion-marker-'+_0x54d77c];return _0x43780e['data']['isSuggestion']&&_0x28102b['push']('ck-suggestion-marker-'+_0x54d77c+'-new'),this['activeChange']==_0x43780e&&_0x28102b['push']('ck-suggestion-marker--active'),{'classes':_0x28102b,'attributes':{'data-change-id':_0x47e55a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x22ca34=>{_0x22ca34['on']('element:pre',(_0x1a9d58,_0x417cc0,_0x1dbb49)=>{const _0x18b2b0=_0x417cc0['viewItem']['getChild'](0x0);if(!_0x18b2b0||!_0x18b2b0['is']('element','code'))return;if(!_0x1dbb49['consumable']['consume'](_0x18b2b0,{'attributes':['vid_start','vid_end']}))return;const _0x53cf24=_0x417cc0['modelRange']['start']['nodeAfter'];_0x1dbb49['writer']['setAttribute']('vid_start',_0x18b2b0['getAttribute']('vid_start'),_0x53cf24),_0x1dbb49['writer']['setAttribute']('vid_end',_0x18b2b0['getAttribute']('vid_end'),_0x53cf24);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2b4056=>{_0x2b4056['on']('element',(_0x2da59c,_0x536c04,_0x273b5a)=>{if(!_0x273b5a['consumable']['consume'](_0x536c04['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x536c04['modelRange']['isCollapsed'])return;const _0x34d8a7=_0x536c04['modelRange']['start']['nodeAfter'];_0x34d8a7['hasAttribute']('vid_start')||_0x34d8a7['hasAttribute']('vid')||(_0x273b5a['writer']['setAttribute']('vid_start',_0x536c04['viewItem']['getAttribute']('vid_start'),_0x34d8a7),_0x273b5a['writer']['setAttribute']('vid_end',_0x536c04['viewItem']['getAttribute']('vid_end'),_0x34d8a7));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4ff71a=>_0x4ff71a['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4ac928,[,_0x59ac2b])=>{['vid_start','vid_end','vid']['includes'](_0x59ac2b)&&(_0x4ac928['return']=!0x0,_0x4ac928['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3bae52=>{_0x3bae52['on']('attribute:vid',(_0xe56320,_0x3b34cc,_0x3755f5)=>{if('\x20'!=_0x3b34cc['item']['data']||_0x3b34cc['item']['parent']['maxOffset']>0x1)return;if(!_0x3755f5['consumable']['consume'](_0x3b34cc['item'],_0xe56320['name']))return;const _0x3c5b6c=_0x3755f5['writer'],_0x51e989=_0x3755f5['mapper']['toViewRange'](_0x3b34cc['range']);_0x3c5b6c['wrap'](_0x51e989,_0x3c5b6c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1eda49){const _0x4cf8b4=_0x1eda49['plugins']['get']('RevisionViewer');return(_0x18c65d,_0x25ca30,_0x26d256)=>{const _0x50e7e6=_0x25ca30['markerName']['split'](':')[0x1],_0x5170aa=_0x4cf8b4['_getChangeFromId'](_0x50e7e6);if(!_0x5170aa)return null;const _0x556e73='add'==_0x5170aa['type']?'split':'merge';if(!_0x26d256['consumable']['test'](_0x25ca30['markerRange'],_0x18c65d['name']))return;const _0x33d08f=_0x25ca30['markerRange']['getWalker'](),_0x3003ae=_0x25ca30['markerRange']['start'],_0x36426d=_0x1eda49['model']['schema'];let _0x8eb3ce=null,_0x11c551=null,_0x4f30ab=!0x1,_0x30ea11=!0x1;for(const _0x12c2f1 of _0x33d08f){const _0x5649bd=_0x12c2f1['item'];_0x4f30ab=_0x4f30ab||_0x36426d['isContent'](_0x5649bd);const _0xa02929=_0x26d256['mapper']['toViewElement'](_0x5649bd);if(_0xa02929&&_0xa02929['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x12c2f1['type']&&(_0x36426d['isBlock'](_0x5649bd)&&!_0x36426d['isLimit'](_0x5649bd)&&(_0x5649bd['nextSibling']||_0x3003ae['isAtEnd']?_0x8eb3ce&&_0x8eb3ce['parent']==_0x5649bd||(_0x8eb3ce=_0x5649bd,_0x11f907(_0x12c2f1['previousPosition']),_0x30ea11=!0x0):_0x11c551=_0x11c551||_0x12c2f1['previousPosition']));}function _0x11f907(_0x5b0150){const _0x26b43d=_0x26d256['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x556e73}),_0x5a9e99=_0x26d256['mapper']['toViewPosition'](_0x5b0150);_0x5170aa['data']['isSuggestion']&&_0x26d256['writer']['addClass']('ck-suggestion-marker-'+_0x556e73+'-new',_0x26b43d),_0x4cf8b4['activeChange']==_0x5170aa&&_0x26d256['writer']['addClass']('ck-suggestion-marker--active',_0x26b43d),_0x26d256['writer']['insert'](_0x5a9e99,_0x26b43d),_0x26d256['mapper']['bindElementToMarker'](_0x26b43d,_0x25ca30['markerName']);}_0x4f30ab||_0x30ea11||!_0x11c551||_0x11f907(_0x11c551);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x49a024,_0x1fea33,_0x519d35)=>{const _0xf0a7d5=_0x519d35['mapper']['markerNameToElements'](_0x1fea33['markerName']);if(_0xf0a7d5){for(const _0x5cf1be of _0xf0a7d5)(_0x5cf1be['hasClass']('ck-suggestion-marker-split')||_0x5cf1be['hasClass']('ck-suggestion-marker-merge'))&&(_0x519d35['mapper']['unbindElementFromMarkerName'](_0x5cf1be,_0x1fea33['markerName']),_0x519d35['writer']['remove'](_0x5cf1be));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x434d28,_0x5df545,_0x2d5ddb)=>{const _0x27adb2=_0x5df545['markerName']['split'](':')[0x1],_0x12e8f8=this['_getChangeFromId'](_0x27adb2);if(!_0x12e8f8)return null;const _0x14e591='add'==_0x12e8f8['type']?'split':'merge';if(_0x2d5ddb['consumable']['test'](_0x5df545['markerRange'],_0x434d28['name']))for(const _0x217e5d of _0x5df545['markerRange']['getItems']()){if(!_0x217e5d['is']('element','softBreak'))continue;const _0x567265=_0x2d5ddb['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x14e591}),_0x22fe8f=_0x2d5ddb['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x217e5d));_0x12e8f8['data']['isSuggestion']&&_0x2d5ddb['writer']['addClass']('ck-suggestion-marker-'+_0x14e591+'-new',_0x567265),this['activeChange']==_0x12e8f8&&_0x2d5ddb['writer']['addClass']('ck-suggestion-marker--active',_0x567265),_0x2d5ddb['writer']['insert'](_0x22fe8f,_0x567265),_0x2d5ddb['mapper']['bindElementToMarker'](_0x567265,_0x5df545['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1f4668=>{for(const _0x1a73f5 of this['editor']['model']['document']['getRootNames']()){const _0x59b4bf=this['editor']['model']['document']['getRoot'](_0x1a73f5),_0xf89389=this['editor']['editing']['view']['document']['getRoot'](_0x1a73f5);if(_0xf89389){const _0x18c147=_0x59b4bf['getAttribute']('revisionHistoryAttachChange');if(_0x1f4668['removeAttribute']('data-change-id',_0xf89389),_0x1f4668['removeClass']('ck-revision-history-root-add',_0xf89389),_0x1f4668['removeClass']('ck-revision-history-root-remove',_0xf89389),_0x1f4668['removeClass']('ck-revision-history-root--active',_0xf89389),_0x18c147){const _0x456dbd=this['_getChangeFromId'](_0x18c147);if(!_0x456dbd)return null;_0x1f4668['setAttribute']('data-change-id',_0x18c147,_0xf89389),_0x1f4668['addClass']('ck-revision-history-root-'+_0x456dbd['type'],_0xf89389),this['activeChange']==_0x456dbd&&_0x1f4668['addClass']('ck-revision-history-root--active',_0xf89389);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3aae2c=>'revision-comment:'+_0x3aae2c,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x23175a=>'revision-suggestion:'+_0x23175a,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x402104=>({'name':'suggestion:'+_0x402104,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1de521=>{const _0x3c4960=_0x1de521['markerName']['split'](':')[0x1];return'insertion'!=_0x3c4960&&'deletion'!=_0x3c4960?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3c4960]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x151e3a,_0x592df8,_0x542db5)=>{const _0x1bd66e=_0x542db5['mapper']['markerNameToElements'](_0x592df8['markerName']);if(_0x1bd66e){for(const _0x53305d of _0x1bd66e)_0x53305d['is']('uiElement')&&(_0x542db5['mapper']['unbindElementFromMarkerName'](_0x53305d,_0x592df8['markerName']),_0x542db5['writer']['remove'](_0x53305d));}},{'priority':'high'});}['_getChangeFromId'](_0x40260){return this['_changeIdToChange']['get'](_0x40260);}['_getViewForChange'](_0x258f6b){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x258f6b),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x160bdf,_0x444b1b,_0x3ae135,_0x23516e)=>{_0x23516e&&this['_balloon']['remove'](_0x23516e),_0x3ae135&&(this['_balloon']['add']({'view':_0x3ae135,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x54ed90=this['editor']['editing'],_0x22f5ef=this['_getChangeFromId'](_0x3ae135['changeId']);let _0x9fcd53;if(_0x22f5ef['data']['isOnRoot']){const _0x51fd54=_0x54ed90['view']['getDomRoot'](_0x22f5ef['rootName']);_0x9fcd53=Array['from'](_0x51fd54['getClientRects']());}else{const _0x5a5b8b=this['editor']['model']['markers']['get']('revision:'+_0x3ae135['changeId']);_0x9fcd53=Array['from'](_0x54ed90['mapper']['markerNameToElements'](_0x5a5b8b['name']))['map'](_0x4475b9=>_0x54ed90['view']['domConverter']['mapViewToDom'](_0x4475b9))['map'](_0x2e60b9=>Array['from'](_0x2e60b9['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x9fcd53[0x0];return _0x9fcd53['find'](_0x23c687=>_0x23c687['top']-0x3<=this['_activeViewTarget']['y']&&_0x23c687['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x23c687['left']-0x3<=this['_activeViewTarget']['x']&&_0x23c687['right']+0x3>=this['_activeViewTarget']['x'])||_0x9fcd53[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5a9f24,_0x1c3eb3,_0x17b500,_0x2822f5)=>{this['activeView']=_0x17b500?this['_getViewForChange'](_0x17b500):null,this['editor']['model']['change'](()=>{const _0x1021fa=this['editor']['editing'];_0x2822f5&&(_0x2822f5['data']['isOnRoot']?_0x1021fa['view']['change'](_0x195674=>{_0x195674['removeClass']('ck-revision-history-root--active',_0x1021fa['view']['document']['getRoot'](_0x2822f5['rootName']));}):_0x1021fa['reconvertMarker']('revision:'+_0x2822f5['id'])),_0x17b500&&(_0x17b500['data']['isOnRoot']?_0x1021fa['view']['change'](_0xba1d5e=>{_0xba1d5e['addClass']('ck-revision-history-root--active',_0x1021fa['view']['document']['getRoot'](_0x17b500['rootName']));}):_0x1021fa['reconvertMarker']('revision:'+_0x17b500['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x68d842,_0x3bcd82)=>{if(this['activeChange'])return;const _0x114906=this['_findChangeIdFromDomTarget'](_0x3bcd82['target']),_0x3d2388=this['_changeIdToChange']['get'](_0x114906);_0x3d2388?(this['_activeViewTarget']={'x':_0x3bcd82['domEvent']['x'],'y':_0x3bcd82['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3d2388)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4765b0,_0x2895c7)=>{const _0x151758=this['_findChangeIdFromDomTarget'](_0x2895c7['target']),_0x3d6a81=this['_changeIdToChange']['get'](_0x151758);_0x3d6a81?(this['_activeViewTarget']={'x':_0x2895c7['domEvent']['x'],'y':_0x2895c7['domEvent']['y']},_0x3d6a81===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x3d6a81):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x275bbf){do{const _0x493e77=_0x275bbf['getAttribute']('data-change-id');if(_0x493e77)return _0x493e77;_0x275bbf=_0x275bbf['parent'];}while(_0x275bbf);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x552791=>{for(const _0x4a9aba of this['editor']['model']['markers'])_0x552791['removeMarker'](_0x4a9aba);});}}function Z(_0x17c61f,_0x3a69d1){return(_0x3ed4e4,_0x1aa9cf,_0x376d68)=>{if(!_0x376d68['consumable']['test'](_0x1aa9cf['markerRange'],_0x3ed4e4['name']))return;const _0x1762d0=_0x1aa9cf['markerRange']['getWalker'](),_0xf25f46=_0x1aa9cf['markerRange']['start'],_0x218bda=_0x17c61f['model']['schema'];let _0x2c27b7=null,_0x5078b8=null,_0x1de4e7=!0x1,_0x282e72=!0x1;for(const _0x1691d9 of _0x1762d0){const _0x2e4dc8=_0x1691d9['item'];_0x1de4e7=_0x1de4e7||_0x218bda['isContent'](_0x2e4dc8);const _0x5b2f58=_0x376d68['mapper']['toViewElement'](_0x2e4dc8);if(_0x5b2f58&&_0x5b2f58['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1691d9['type']&&(_0x218bda['isBlock'](_0x2e4dc8)&&!_0x218bda['isLimit'](_0x2e4dc8)&&(_0x2e4dc8['nextSibling']||_0xf25f46['isAtEnd']?_0x2c27b7&&_0x2c27b7['parent']==_0x2e4dc8||(_0x2c27b7=_0x2e4dc8,_0x1b8019(_0x1691d9['previousPosition']),_0x282e72=!0x0):_0x5078b8=_0x5078b8||_0x1691d9['previousPosition']));}function _0x1b8019(_0x20f35c){const _0x1aaf6d=_0x376d68['mapper']['toViewPosition'](_0x20f35c),_0x2fda1c=_0x376d68['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3a69d1});_0x376d68['writer']['insert'](_0x1aaf6d,_0x2fda1c),_0x376d68['mapper']['bindElementToMarker'](_0x2fda1c,_0x1aa9cf['markerName']);}_0x1de4e7||_0x282e72||!_0x5078b8||_0x1b8019(_0x5078b8);};}class pt extends _0x38e84c{constructor(_0x452434){super(_0x452434);const _0x309895=_0x452434['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x309895,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x309895,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x42bb84=this['editor'],_0x511387=_0x42bb84['plugins']['get'](d),_0x11566e=_0x511387['isReady']?_0x511387['diff']['newRevisionId']:null;_0x42bb84['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x11566e);}['refresh'](){const {isReady:_0xb0521c,isEnabled:_0x418dfc,repository:_0x137ac7,diff:_0x2fa49c}=this['editor']['plugins']['get'](d),_0x5a52d1=_0x2fa49c&&_0x137ac7['getLaterVisibleRevision'](_0x2fa49c['newRevisionId']);this['isEnabled']=_0xb0521c&&_0x418dfc&&Boolean(_0x5a52d1);}}class _t extends _0x38e84c{['_step'];constructor(_0x38f422,{direction:_0x4f7ac4}){super(_0x38f422);const _0x2ac4c7=_0x38f422['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x4f7ac4?0x1:-0x1,this['listenTo'](_0x2ac4c7,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2ac4c7,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2ac4c7,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2dae21=this['editor'],_0x189b2d=_0x2dae21['plugins']['get'](d),{isNavigationMode:_0x41c20d,currentChangeNumber:_0x1788ff}=_0x189b2d;let _0xca33dd;if(_0x189b2d['activeChange']=_0x41c20d?_0x189b2d['diff']['changes']['get'](_0x1788ff+this['_step']):_0x189b2d['diff']['changes']['first'],_0x189b2d['activeChange']['data']['isOnRoot'])_0xca33dd=_0x2dae21['editing']['view']['getDomRoot'](_0x189b2d['activeChange']['rootName']);else{const _0x3e5836=_0x2dae21['model']['markers']['get']('revision:'+_0x189b2d['activeChange']['id']);_0xca33dd=_0x4cc2ac(_0x2dae21['editing'],_0x3e5836);}_0x19c568({'target':_0xca33dd,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xf2e7b1,currentChangeNumber:_0x266db8,numberOfChanges:_0x1a2144,isReady:_0x1e7a1e,isEnabled:_0x59029e}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x59029e&&_0x1e7a1e&&_0x1a2144)&&(!_0xf2e7b1||(0x1===this['_step']?_0x266db8<_0x1a2144-0x1:_0x266db8>0x0));}}class li extends ts{constructor(_0xf79828){super(_0xf79828);const _0x4984f9=this['bindTemplate'],_0x2cf0dc=new te(_0xf79828),_0x1c8eb9=new te(_0xf79828);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',(_0x5a8bca,_0x3bc1ed)=>_0x5a8bca&&_0x3bc1ed>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2da140,_0x423d19,_0x3551d1,_0x4a85dd)=>{if(!_0x2da140)return m(_0xf79828,'Loading...');if(!_0x3551d1)return m(_0xf79828,'No\x20changes');const _0x134910=m(_0xf79828,'NUMBER_OF_CHANGES',_0x3551d1);return _0x4a85dd?m(_0xf79828,'X_OF_Y_CHANGES',[_0x423d19+0x1,_0x3551d1]):_0x134910;}),_0x2cf0dc['set']({'label':m(_0xf79828,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x1c8eb9['set']({'label':m(_0xf79828,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x2cf0dc['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1c8eb9['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2cf0dc['on']('execute',()=>this['fire']('execute','backward')),_0x1c8eb9['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',_0x4984f9['if']('_isStatusLabelVisible','ck-hidden',_0x1b914a=>!_0x1b914a)]},'children':[{'text':_0x4984f9['to']('isNavigationMode',_0x2c3a9e=>_0x2c3a9e?m(_0xf79828,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0xf79828,'Total')+':\x20')}]},{'text':_0x4984f9['to']('_statusText')}]},new _0x533f92(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2cf0dc,_0x1c8eb9]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x2c5c18{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2e0497=this['editor']['editing']['view'];_0x2e0497['change'](_0x2ab2cf=>{for(const _0xb5133f of _0x2e0497['document']['roots'])_0x2ab2cf['addClass'](le,_0xb5133f);});}['hide'](){const _0x5eca46=this['editor']['editing']['view'];_0x5eca46['change'](_0x451774=>{for(const _0x1973b9 of _0x5eca46['document']['roots'])_0x451774['removeClass'](le,_0x1973b9);});}}class g extends _0x2c5c18{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ge];}['init'](){const _0x1f9403=this['editor'],_0x5efc82=_0x1f9403['plugins']['get'](d),_0x421c10=_0x1f9403['plugins']['get'](ge);_0x1f9403['ui']['componentFactory']['add']('exitToEditing',_0x352fd3=>{const _0x2cdc76=new te(_0x352fd3);return _0x2cdc76['set']({'label':m(_0x352fd3,'Back\x20to\x20editing'),'icon':_0x2bd20b['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2cdc76,'execute',()=>{_0x1f9403['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2cdc76;}),_0x1f9403['ui']['componentFactory']['add']('restoreRevision',_0x1a5ec3=>{const _0x529bab=new te(_0x1a5ec3);return _0x529bab['set']({'label':m(_0x1a5ec3,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x529bab['bind']('isEnabled')['to'](_0x1f9403['commands']['get']('restoreRevision')),this['listenTo'](_0x529bab,'execute',()=>_0x1f9403['execute']('restoreRevision')),_0x529bab;}),_0x1f9403['ui']['componentFactory']['add']('changesNavigation',_0x436e32=>{const _0x2d327a=new li(_0x436e32),_0x60c8ac=_0x1f9403['commands']['get']('showPreviousChange'),_0x1174cc=_0x1f9403['commands']['get']('showNextChange');return _0x2d327a['bind']('isBackwardNavigationEnabled')['to'](_0x60c8ac,'isEnabled'),_0x2d327a['bind']('isForwardNavigationEnabled')['to'](_0x1174cc,'isEnabled'),_0x2d327a['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x5efc82),this['listenTo'](_0x2d327a,'execute',(_0x59043a,_0xa50422)=>{_0x1f9403['execute']('forward'===_0xa50422?'showNextChange':'showPreviousChange');}),_0x2d327a;}),_0x421c10['show'](),_0x5efc82['on']('change:isReady',(_0x4567ac,_0xaabf74,_0x2ebb64)=>{_0x2ebb64?_0x421c10['hide']():_0x421c10['show']();});}}class at extends _0x10b4fb{['_resizeObserver']=null;constructor(_0x5d947c,_0x49fa7d){super(_0x5d947c,_0x49fa7d);const _0xfd7b99=this['bindTemplate'];this['set']({'label':m(_0x5d947c,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x5d947c,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0xfd7b99['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 _0x85f14=this['fieldView']['element'];this['_tooltipString']=_0x85f14['scrollWidth']>_0x85f14['clientWidth']&&_0x85f14['value']||'';}}class ri extends ts{constructor(_0x56dd8d,_0x311b19,_0x1c1889){super(_0x56dd8d);const _0x191eae=new _0x310cef();_0x191eae['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x4e5ccf=['ck','ck-revision-history-sidebar__revision-author'];_0x1c1889&&_0x4e5ccf['push']('ck-revision-history-sidebar__revision-author_creator');const _0x6a0ee6=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x56dd8d,_0x1c1889?'Revision\x20creator':'Revision\x20author')},'children':[_0x191eae,_0x311b19['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4e5ccf},'children':_0x6a0ee6});}}function oi(_0x4c08e4,_0x558ff0){const _0x59f991=_0x4c08e4['bindTemplate'],_0x29df1b=_0x4c08e4['locale'],_0x28a661=_0x5ecf4f(_0x29df1b);_0x28a661['panelPosition']='sw';const _0x5aba33=function(_0x3d823a,_0x311fdd){const _0x3df4e4=function(_0x261e6d,_0x3e4ba7){const _0x4673ba=_0x261e6d['locale'],_0x1f1561={'Compare\x20against\x20selected':m(_0x4673ba,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x4673ba,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x4673ba,'Restore\x20this\x20revision')};return _0x3e4ba7['map'](_0x4cfba0=>{const _0x4aa948=_0x1f1561[_0x4cfba0['name']];return _0x4aa948&&_0x4aa948!==_0x4cfba0['name']&&(_0x4cfba0['name']=_0x4aa948),_0x4cfba0;});}(_0x3d823a,_0x311fdd),_0xfcace3=new _0x31c62c();for(const _0x2ad164 of _0x3df4e4){const _0x5d4d60={'type':'button','model':new _0x1b631c({'label':_0x2ad164['name'],'class':_0x2ad164['class'],'withText':!0x0,'role':'menuitem','_action':_0x2ad164['action']})};_0x5d4d60['model']['bind']('isEnabled')['to'](_0x3d823a,'isActionsDropdownOpen',_0x2dee1a=>'function'!=typeof _0x2ad164['isEnabled']||(!_0x2dee1a||_0x2ad164['isEnabled'](_0x3d823a))),_0xfcace3['add'](_0x5d4d60);}return _0xfcace3;}(_0x4c08e4,_0x558ff0);return _0x4c08e4['bind']('isActionsDropdownOpen')['to'](_0x28a661,'isOpen'),_0x28a661['buttonView']['set']({'label':m(_0x29df1b,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2bd20b['threeVerticalDots']}),_0x28a661['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x59f991['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x59f991['to'](_0x173d20=>_0x173d20['stopPropagation']())}}),_0x28a661['on']('execute',_0x25b403=>{_0x4c08e4['isReady']&&'function'==typeof _0x25b403['source']['_action']&&_0x25b403['source']['_action'](_0x4c08e4);}),to(_0x28a661,_0x5aba33,{'role':'menu'}),_0x28a661['listenTo'](_0x4c08e4,'change:isActionsDropdownOpen',(_0x82f976,_0x335de4,_0x14cc2b)=>{if(_0x14cc2b)for(const _0xaf404 of _0x28a661['listView']['items']){const _0x5650e1=_0xaf404['children']['first'],_0x4e7e9d=_0x558ff0['find'](_0x36d559=>_0x36d559['action']===_0x5650e1['_action'])['isVisible'];_0xaf404['isVisible']=void 0x0===_0x4e7e9d||_0x4e7e9d(_0x4c08e4);}}),_0x28a661;}class hi extends/* #__PURE__ -- @preserve */
|
|
26
|
+
ti(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x116f6c,_0x53906b,_0x5772a1,_0x3fc14f){super(_0x116f6c);const _0x343fc0=this['bindTemplate'],_0xe8ad87=function(_0x2a2563,_0x26ecf8){const _0x2beb0a=Array['from'](_0x26ecf8['authors'])['filter'](_0x4e7012=>_0x4e7012!=_0x26ecf8['creator']);return _0x26ecf8['creator']&&_0x2beb0a['unshift'](_0x26ecf8['creator']),_0x2beb0a['map'](_0xe72660=>new ri(_0x2a2563,_0xe72660,_0xe72660==_0x26ecf8['creator']));}(_0x116f6c,_0x53906b);this['id']=_0x53906b['id'],this['_revision']=_0x53906b,this['_requireRevisionName']=_0x3fc14f,this['bind']('name','createdAt')['to'](_0x53906b),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2f126c=>{return _0x1934eb=_0x116f6c['uiLanguage'],(_0x589116=_0x2f126c)['toLocaleDateString'](_0x1934eb,{'month':'long','day':'numeric'})+',\x20'+_0x589116['toLocaleTimeString'](_0x1934eb,{'hour':'numeric','minute':'numeric'});var _0x1934eb,_0x589116;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new at(_0x116f6c,_0x4d4b85),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x355c0f=>_0x355c0f||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x399404,_0x190711)=>_0x399404&&_0x190711),this['revisionActionsView']=_0x5772a1&&_0x5772a1['length']?oi(this,_0x5772a1):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x343fc0['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x343fc0['if']('isEnabled','ck-disabled',_0xa7e181=>!_0xa7e181),_0x343fc0['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x343fc0['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x343fc0['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':_0x343fc0['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':_0xe8ad87}]},this['revisionActionsView']],'on':{'click':_0x343fc0['to'](_0x5e1024=>{_0x5e1024['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x107043=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x107043,'change',()=>{this['_requireRevisionName']&&!_0x107043['value']||this['fire']('setName',{'id':this['id'],'name':_0x107043['value']}),_0x107043['value']||(_0x107043['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ci(_0xee92fc,_0x1c90bd){const _0x2a385e=_0x1fc178['fromJSDate'](_0xee92fc)['setLocale'](_0x1c90bd),_0x58ceaf=_0x1fc178['local'](),_0x3dbae0=_0x58ceaf['minus']({'days':0x1})['startOf']('day');let _0x18abe9,_0x279370;return _0x2a385e['hasSame'](_0x58ceaf,'day')?(_0x18abe9=_0x2a385e['startOf']('day')['toJSDate'](),_0x279370=_0x2a385e['toRelativeCalendar']()):_0x2a385e['hasSame'](_0x3dbae0,'day')?(_0x18abe9=_0x3dbae0['toJSDate'](),_0x279370=_0x2a385e['toRelativeCalendar']()):_0x2a385e['hasSame'](_0x58ceaf,'week')?(_0x18abe9=_0x2a385e['startOf']('week')['toJSDate'](),_0x279370=_0x2a385e['weekdayLong']||''):_0x2a385e['hasSame'](_0x58ceaf,'year')?(_0x18abe9=_0x2a385e['startOf']('month')['toJSDate'](),_0x279370=_0x2a385e['monthLong']||''):(_0x18abe9=_0x2a385e['startOf']('year')['toJSDate'](),_0x279370=String(_0x2a385e['year'])),{'startDate':_0x18abe9,'localizedPeriodName':_0x279370};}class ai extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x565b22,_0x9ac592,_0x16c91a,_0x1a05da){super(_0x565b22);const _0x3d6372=ci(_0x9ac592,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x9ac592,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x16c91a,this['_requireRevisionName']=_0x1a05da,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':_0x3d6372}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x3c0149){const _0x2b75fb=new hi(this['locale'],_0x3c0149,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2b75fb);}['removeRevision'](_0x20c021){const _0x3e04e1=this['revisionViews']['find'](_0x52e79e=>_0x52e79e['id']===_0x20c021['id']);this['revisionViews']['remove'](_0x3e04e1);}}class as extends ts{constructor(_0x4acf3c){super(_0x4acf3c);const _0x1e8686=new _0x310cef();_0x1e8686['content']=_0x2bd20b['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1e8686,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x4acf3c,'Revision\x20history')]}]});}}class ni extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x251855,_0x2a8795,_0x407ef1,_0x3ce393){super(_0x251855);const _0x2952da=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x2a8795,this['_revisionActions']=_0x407ef1,this['_requireRevisionName']=_0x3ce393,this['on']('select',(_0x2ec65a,_0x1d07b5)=>{this['fire']('revisionSelected',_0x1d07b5);}),this['on']('setName',(_0x2f54ce,_0x5e8522)=>{this['fire']('revisionSetName',_0x5e8522);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x251855),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x2952da['if']('isEnabled','ck-disabled',_0x1fdec1=>!_0x1fdec1)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x499e0b of this['_revisions'])this['_addRevision'](_0x499e0b);this['_revisions']['on']('add',(_0x3eaa30,_0x2f8f8b)=>{this['_addRevision'](_0x2f8f8b);}),this['_revisions']['on']('remove',(_0x53ef04,_0x1a36df)=>{this['_removeRevision'](_0x1a36df);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x51ace8=>_0x51ace8['revisionViews']['map'](_0x38e132=>_0x38e132))['flat']();}['selectRevision'](_0x303507){for(const _0x575947 of this['revisionViews'])_0x303507&&_0x303507['id']===_0x575947['id']?_0x575947['select']():_0x575947['deselect']();}['highlightRevisions'](_0x492854){for(const _0x5bb877 of this['revisionViews'])_0x492854['some'](({id:_0x37855c})=>_0x37855c===_0x5bb877['id'])?_0x5bb877['highlight']():_0x5bb877['unhighlight']();}['_addRevision'](_0x3542a7){const _0x120439=ci(_0x3542a7['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x43c16f=this['timePeriodViews']['get'](0x0);_0x43c16f&&_0x43c16f['startDate']['getTime']()===_0x120439['getTime']()||(_0x43c16f=new ai(this['locale'],_0x120439,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x43c16f)),_0x43c16f['addRevision'](_0x3542a7);}['_removeRevision'](_0x1d67fa){const _0xfc6b64=ci(_0x1d67fa['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xfc6b64)['removeRevision'](_0x1d67fa);}['_getTimePeriodViewByStartDate'](_0x57f7b5){return this['timePeriodViews']['find'](_0x414e16=>_0x414e16['startDate']['getTime']()===_0x57f7b5['getTime']());}}class w extends _0x2c5c18{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
|
|
29
|
-
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1ab655,_0x3eff8f){super(_0x3eff8f),this['sourceElement']=_0x1ab655,this['model']['document']['createRoot']();const _0x27f2fb=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x27f2fb);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x455259,_0x5485f1){const _0x4070a6=new this(_0x455259,_0x5485f1);return await _0x4070a6['initPlugins'](),await _0x4070a6['ui']['init'](_0x455259),await _0x4070a6['data']['init'](_0x4070a6['config']['get']('initialData')||''),_0x4070a6['fire']('ready'),_0x4070a6;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x1dcddc{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c4540){function _0x1def6b(_0x5168ad){return _0x5168ad['map'](_0x57ac2c=>String['fromCharCode'](_0x57ac2c))['join']('');}super(_0x3c4540),this['result']='end',_0x3c4540[_0x1def6b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1def6b([0x76,0x69,0x65,0x77])][_0x1def6b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1def6b([0x61,0x75,0x74,0x6f]),_0x3c4540[_0x1def6b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1def6b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1def6b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1def6b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1def6b([0x6f,0x6b])});}}class k extends _0x1dcddc{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x1f6c00){if(super(_0x1f6c00),!this['editor']['config']['get']('revisionHistory'))throw new _0x4d98a1('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x51ef5d=>this['_showRevisionViewer']({..._0x51ef5d,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x3c74e9=>this['_closeRevisionViewer'](_0x3c74e9)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x558b10=>this['_restoreRevision'](_0x558b10)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3c129f){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3c129f;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x311138){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x311138);}['getRevision'](_0x245140){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x245140);}['getRevisions'](_0x1185b7){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1185b7||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x163c9d=this['editor'],_0x4c1c32=_0x48f4d0(_0x163c9d,p),_0x7e0cdc=_0x163c9d['plugins']['get']('RevisionTracker'),_0x882db9=_0x163c9d['plugins']['get']('Users')['users'];return _0x4c1c32['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4c1c32['lazyRoots'],(_0x4c1c32['plugins']['push'](Rt,d,g,class extends _0x1dcddc{static get['requires'](){return[d,'Users'];}['init'](){const _0xcc5f51=this['editor']['plugins']['get']('Users');for(const _0x49c264 of _0x882db9)_0x49c264['isAnonymous']||_0xcc5f51['getUser'](_0x49c264['id'])||_0xcc5f51['addUser'](_0x49c264);const _0x30d879=_0x7e0cdc['repository']['getRevisions']();let _0x32854b=null;const _0x393773=this['editor']['plugins']['get']('RevisionViewer');_0x393773['adapter']=_0x7e0cdc['adapter'],_0x393773['bind']('isEnabled')['to'](_0x7e0cdc),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x163c9d,'isReadOnly',_0x2455fe=>!_0x2455fe);for(const _0x476a21 of _0x30d879){const _0x28e982=null===_0x476a21['creator'];if(_0x28e982&&_0x476a21['toVersion']===_0x476a21['fromVersion'])continue;const _0x20eab5=_0x476a21['toJSON']();_0x393773['addRevisionData'](_0x20eab5,(_0x3f10cf,_0x1d0852,_0x2e64ee)=>{if(_0x28e982){if(_0x32854b)_0x32854b['_update'](_0x3f10cf,_0x1d0852);else{if(!_0x1d0852){const _0x26eee9=_0x2e64ee['toJSON']();_0x26eee9['id']=_0x26665b(),_0x7e0cdc['saveRevision'](_0x26eee9,_0x2e64ee['toVersion'])['then'](_0x4ff7a6=>{_0x32854b=_0x4ff7a6;});}}}else _0x476a21['_update'](_0x3f10cf,_0x1d0852);});}}},w),_0x4c1c32);}['_enhanceShowRevisionViewerCallback'](){const _0x3421aa=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x42bceb=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x3abd64=this['editor']['plugins']['get']('Autosave');await _0x3abd64['save']();}else await _0x42bceb['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x4b7d2b=this['editor']['plugins']['get']('Dialog');_0x4b7d2b['isOpen']&&_0x4b7d2b['hide']();}const _0x411f93=this['_getRevisionViewerEditorConfig']();return _0x3421aa(_0x411f93)['then'](_0xf90135=>{return(this['_viewerEditor']=_0xf90135,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0xf90135;})['catch'](_0x39a841=>(console['error'](_0x39a841),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x279650=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x279650(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x89bc55=this['editor']['plugins']['get']('Annotations');_0x89bc55['refreshVisibility'](),_0x89bc55['refreshPositioning']();}})));}['_showRevisionViewer'](_0x41790c){const _0x55fc80=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x29f003=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2a8bc9=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x2a8bc9,_0x41790c)['then'](_0x172655=>(_0x29f003['style']['display']='block',_0x55fc80['style']['display']='none',_0x172655));}['_closeRevisionViewer'](_0x2734cd){const _0x57000c=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x57000c['style']['display']='',_0x2734cd['destroy']();}async['_restoreRevision'](_0x55ba94){const _0x4a0286=this['editor'],_0x1ef6e7=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xd5139a=_0x4a0286['plugins']['get']('RevisionTracker'),_0x22c09c=_0x1ef6e7['repository']['getRevision'](_0x55ba94);let _0xcc58e4,_0x429bee,_0x33071a;try{_0xcc58e4=await _0x1ef6e7['getRevisionData'](_0x22c09c),_0x429bee=await _0x1ef6e7['getRevisionRootsAttributes'](_0x22c09c);}catch(_0x3f2d84){return void console['error'](_0x3f2d84);}_0x4a0286['model']['change'](_0x1ab97a=>{for(const _0x237876 of Array['from'](_0x4a0286['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1ab97a['removeMarker'](_0x237876);}),_0x1ef6e7['isReady']=!0x1,_0x4a0286['model']['enqueueChange'](_0x387a20=>{_0x387a20['setSelection'](null),_0x387a20['removeSelectionAttribute'](_0x4a0286['model']['document']['selection']['getAttributeKeys']());const _0x2ea84c=Object['keys'](_0xcc58e4);for(const _0x129a1c of _0x4a0286['model']['document']['roots'])'$graveyard'!=_0x129a1c['rootName']&&_0x129a1c['isAttached']()&&!_0x2ea84c['includes'](_0x129a1c['rootName'])&&_0x387a20['detachRoot'](_0x129a1c);for(const _0x1d9ed4 of _0x2ea84c){let _0x59c9fa=_0x4a0286['model']['document']['getRoot'](_0x1d9ed4);_0x59c9fa&&_0x59c9fa['isAttached']()||(_0x59c9fa=_0x387a20['addRoot'](_0x1d9ed4));const _0x4870f3=_0x429bee[_0x1d9ed4],_0xba4d41=Object['keys'](_0x4870f3),_0x39e1bf=_0xcc58e4[_0x1d9ed4];for(const _0x549c8a of _0x59c9fa['getAttributeKeys']())_0xba4d41['includes'](_0x549c8a)||_0x387a20['removeAttribute'](_0x549c8a,_0x59c9fa);for(const _0x2d6dff of _0xba4d41)_0x387a20['setAttribute'](_0x2d6dff,_0x429bee[_0x1d9ed4][_0x2d6dff],_0x59c9fa);_0x387a20['remove'](_0x387a20['createRangeIn'](_0x59c9fa)),_0x387a20['insert'](_0x4a0286['data']['parse'](_0x39e1bf,_0x59c9fa),_0x59c9fa,0x0);}});const _0x20b6bd=m(_0x4a0286['locale'],'Restored');if(_0x22c09c['name'])_0x33071a=-0x1==_0x22c09c['name']['indexOf'](_0x20b6bd)?_0x20b6bd+':\x20'+_0x22c09c['name']:_0x22c09c['name'];else _0x33071a=_0x20b6bd+':\x20'+(_0x22c09c['createdAt']['toLocaleDateString'](_0x4a0286['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x22c09c['createdAt']['toLocaleTimeString'](_0x4a0286['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xd5139a['saveRevision']({'name':_0x33071a}),_0x1ef6e7['isReady']=!0x0,_0x4a0286['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};
|
|
28
|
+
yt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x18c697){super(_0x18c697),this['_revisionViewer']=_0x18c697['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x5df5b4=this['_revisionsRepository']['_revisions'],_0x5b904f=this['_createRevisionActions'](),_0x5b49fe=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ni(this['editor']['locale'],_0x5df5b4,_0x5b904f,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',(_0xcf473b,_0x321a84)=>{_0x321a84['revisionViews']['on']('add',(_0x1b6547,_0x53299f)=>{_0x53299f['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)),_0x5b49fe['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x459692=this['_revisionsRepository']['getRevision'](0x0);if(_0x459692){const _0x1f4afa=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x459692['id']);this['_revisionViewer']['compare'](_0x459692,_0x1f4afa);}}['_handleRevisionSelected'](_0xb1fb71,_0x19e5d6){const _0x46dab3=this['_revisionsRepository']['getRevision'](_0x19e5d6['id']),_0x2eb03c=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x46dab3['id']);this['_revisionViewer']['compare'](_0x46dab3,_0x2eb03c);}['_handleRevisionSetName'](_0x3dc62f,_0x3019be){this['_revisionsRepository']['getRevision'](_0x3019be['id'])['setName'](_0x3019be['name']);}['_handleDiffChange'](_0x13a5e3,_0xb6ab06,_0x2da8b6){const _0x30f8ca=this['_revisionsRepository']['getRevisionsInDiff'](_0x2da8b6);_0x30f8ca['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x30f8ca),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x30f8ca[0x0]));}['_createRevisionActions'](){const _0x557472=this['editor'],_0x4fb5c4=w['availableRevisionActions'],_0x388531=_0x557472['config']['get']('revisionHistory.revisionActions')||w['defaultRevisionActions'];if(_0x388531['length'])return _0x388531['map'](_0x3fd390=>{const _0x51de13='string'==typeof _0x3fd390?Object['assign']({},_0x4fb5c4[_0x3fd390]):_0x3fd390;return _0x51de13['action']=_0x51de13['action']['bind'](this,_0x557472),_0x51de13['isVisible']&&(_0x51de13['isVisible']=_0x51de13['isVisible']['bind'](this,_0x557472)),_0x51de13;});}}function yt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x2935bc},_0x1f1970)=>{const _0xca107d=_0x2935bc['get'](d),_0x213f6e=_0xca107d['repository'];let _0x278e7f=_0xca107d['diff']['newRevisionId'],_0x170de2=_0x1f1970['id'];_0x213f6e['getIndex'](_0x278e7f)>_0x213f6e['getIndex'](_0x170de2)&&([_0x278e7f,_0x170de2]=[_0x170de2,_0x278e7f]),_0xca107d['compare'](_0x278e7f,_0x170de2);},'isVisible':({plugins:_0x58a26b},_0x54cede)=>{const _0x360bc5=_0x58a26b['get'](d);return!(_0x360bc5['repository']['getRevisionsInDiff'](_0x360bc5['diff'])['length']>0x2)&&!_0x54cede['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x36be8b,{id:_0x2f2436})=>{_0x36be8b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2f2436);},'isVisible':({plugins:_0xe734be},_0x59e720)=>!!_0xe734be['get'](d)['repository']['getLaterVisibleRevision'](_0x59e720['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x31d8b2},{id:_0x114010,revisionNameView:_0x82ee0d})=>{const _0x568cde=_0x31d8b2['get'](d),_0x4d3b05=_0x568cde['repository']['getEarlierVisibleRevision'](_0x114010);_0x568cde['compare'](_0x114010,_0x4d3b05),_0x82ee0d['focus'](),_0x82ee0d['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4aaf27,_0x2a90d4){super(_0x4aaf27),this['_view']=_0x2a90d4,this['_toolbarConfig']=ot(_0x4aaf27['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x1f5fea){const _0xb33849=this['editor'],_0x12d0d9=this['view'],_0x4d57ba=_0xb33849['editing']['view'],_0x5a1c04=_0x12d0d9['editable'],_0x2696a7=_0x4d57ba['document']['getRoot']();_0x5a1c04['name']=_0x2696a7['rootName'],_0x12d0d9['render']();const _0x5cad79=_0x5a1c04['element'];this['setEditableElement'](_0x5a1c04['name'],_0x5cad79),_0x12d0d9['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4d57ba['attachDomRoot'](_0x5cad79),this['_elementReplacer']['replace'](_0x1f5fea,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x3d43a6=this['view'],_0x304b71=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x304b71['detachDomRoot'](_0x3d43a6['editable']['name']),_0x3d43a6['destroy']();}['_initToolbar'](){const _0x1ddbae=this['view'];_0x1ddbae['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1ddbae['stickyPanel']['limiterElement']=_0x1ddbae['element'],_0x1ddbae['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xfaacba})=>_0xfaacba),_0x1ddbae['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1ddbae['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x51f496,_0x44eb69,_0x203119={}){super(_0x51f496),this['stickyPanel']=new ut(_0x51f496),this['toolbar']=new lt(_0x51f496,{'shouldGroupWhenFull':_0x203119['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x51f496,_0x44eb69);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
|
|
29
|
+
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x43f2f8,_0x322be7){super(_0x322be7),this['sourceElement']=_0x43f2f8,this['model']['document']['createRoot']();const _0x3fb5ff=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x3fb5ff);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x50bb70,_0x5e1304){const _0x30b2cd=new this(_0x50bb70,_0x5e1304);return await _0x30b2cd['initPlugins'](),await _0x30b2cd['ui']['init'](_0x50bb70),await _0x30b2cd['data']['init'](_0x30b2cd['config']['get']('initialData')||''),_0x30b2cd['fire']('ready'),_0x30b2cd;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class bt extends _0x2c5c18{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ed5b9){function _0xd875ed(_0x36a8ab){return _0x36a8ab['map'](_0x2c330a=>String['fromCharCode'](_0x2c330a))['join']('');}super(_0x4ed5b9),this['result']='end',_0x4ed5b9[_0xd875ed([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xd875ed([0x76,0x69,0x65,0x77])][_0xd875ed([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xd875ed([0x61,0x75,0x74,0x6f]),_0x4ed5b9[_0xd875ed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xd875ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xd875ed([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xd875ed([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xd875ed([0x6f,0x6b])});}}class k extends _0x2c5c18{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x777e94){if(super(_0x777e94),!this['editor']['config']['get']('revisionHistory'))throw new _0xfd894b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x7119f5=>this['_showRevisionViewer']({..._0x7119f5,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2bdf6b=>this['_closeRevisionViewer'](_0x2bdf6b)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1a91a2=>this['_restoreRevision'](_0x1a91a2)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x51c42a){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x51c42a;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x25ec67){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x25ec67);}['getRevision'](_0x22e348){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x22e348);}['getRevisions'](_0xd66e4d){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0xd66e4d||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x529582=this['editor'],_0x5a143d=_0xbf95a9(_0x529582,p),_0x247a09=_0x529582['plugins']['get']('RevisionTracker'),_0x45cd99=_0x529582['plugins']['get']('Users')['users'];return _0x5a143d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5a143d['lazyRoots'],(_0x5a143d['plugins']['push'](bt,d,g,class extends _0x2c5c18{static get['requires'](){return[d,'Users'];}['init'](){const _0x45e85c=this['editor']['plugins']['get']('Users');for(const _0x4e9ba3 of _0x45cd99)_0x4e9ba3['isAnonymous']||_0x45e85c['getUser'](_0x4e9ba3['id'])||_0x45e85c['addUser'](_0x4e9ba3);const _0x5734da=_0x247a09['repository']['getRevisions']();let _0x475e10=null;const _0x53626c=this['editor']['plugins']['get']('RevisionViewer');_0x53626c['adapter']=_0x247a09['adapter'],_0x53626c['bind']('isEnabled')['to'](_0x247a09),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x529582,'isReadOnly',_0x43b7d0=>!_0x43b7d0);for(const _0x161a44 of _0x5734da){const _0x392991=null===_0x161a44['creator'];if(_0x392991&&_0x161a44['toVersion']===_0x161a44['fromVersion'])continue;const _0x32ad71=_0x161a44['toJSON']();_0x53626c['addRevisionData'](_0x32ad71,(_0x14bcda,_0x3df7e6,_0x118856)=>{if(_0x392991){if(_0x475e10)_0x475e10['_update'](_0x14bcda,_0x3df7e6);else{if(!_0x3df7e6){const _0x4609d2=_0x118856['toJSON']();_0x4609d2['id']=_0x1956ee(),_0x247a09['saveRevision'](_0x4609d2,_0x118856['toVersion'])['then'](_0x5b1400=>{_0x475e10=_0x5b1400;});}}}else _0x161a44['_update'](_0x14bcda,_0x3df7e6);});}}},w),_0x5a143d);}['_enhanceShowRevisionViewerCallback'](){const _0x1f0fe8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x15a273=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x12a10f=this['editor']['plugins']['get']('Autosave');await _0x12a10f['save']();}else await _0x15a273['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1c4560=this['editor']['plugins']['get']('Dialog');_0x1c4560['isOpen']&&_0x1c4560['hide']();}const _0x3a72e8=this['_getRevisionViewerEditorConfig']();return _0x1f0fe8(_0x3a72e8)['then'](_0xab7ef5=>{return(this['_viewerEditor']=_0xab7ef5,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0xab7ef5;})['catch'](_0x2e3c3b=>(console['error'](_0x2e3c3b),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3ee980=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3ee980(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4b432b=this['editor']['plugins']['get']('Annotations');_0x4b432b['refreshVisibility'](),_0x4b432b['refreshPositioning']();}})));}['_showRevisionViewer'](_0x4a77f7){const _0x45e1a0=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2d5de4=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3c95f4=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x3c95f4,_0x4a77f7)['then'](_0xe476b5=>(_0x2d5de4['style']['display']='block',_0x45e1a0['style']['display']='none',_0xe476b5));}['_closeRevisionViewer'](_0x11d432){const _0x4d3e13=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4d3e13['style']['display']='',_0x11d432['destroy']();}async['_restoreRevision'](_0x4fd0ef){const _0x44e8d1=this['editor'],_0x1b10b2=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3b9ba5=_0x44e8d1['plugins']['get']('RevisionTracker'),_0x50b8e3=_0x1b10b2['repository']['getRevision'](_0x4fd0ef);let _0x207fb5,_0x5eda20,_0x2c14a8;try{_0x207fb5=await _0x1b10b2['getRevisionData'](_0x50b8e3),_0x5eda20=await _0x1b10b2['getRevisionRootsAttributes'](_0x50b8e3);}catch(_0xa3d2cd){return void console['error'](_0xa3d2cd);}_0x44e8d1['model']['change'](_0x5e3f55=>{for(const _0x43c2cb of Array['from'](_0x44e8d1['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5e3f55['removeMarker'](_0x43c2cb);}),_0x1b10b2['isReady']=!0x1,_0x44e8d1['model']['enqueueChange'](_0x12fcd4=>{_0x12fcd4['setSelection'](null),_0x12fcd4['removeSelectionAttribute'](_0x44e8d1['model']['document']['selection']['getAttributeKeys']());const _0x26e58c=Object['keys'](_0x207fb5);for(const _0x19fd92 of _0x44e8d1['model']['document']['roots'])'$graveyard'!=_0x19fd92['rootName']&&_0x19fd92['isAttached']()&&!_0x26e58c['includes'](_0x19fd92['rootName'])&&_0x12fcd4['detachRoot'](_0x19fd92);for(const _0x5a0f7f of _0x26e58c){let _0x25f7cb=_0x44e8d1['model']['document']['getRoot'](_0x5a0f7f);_0x25f7cb&&_0x25f7cb['isAttached']()||(_0x25f7cb=_0x12fcd4['addRoot'](_0x5a0f7f));const _0x444c71=_0x5eda20[_0x5a0f7f],_0x580a9e=Object['keys'](_0x444c71),_0x5e6d64=_0x207fb5[_0x5a0f7f];for(const _0x84e64f of _0x25f7cb['getAttributeKeys']())_0x580a9e['includes'](_0x84e64f)||_0x12fcd4['removeAttribute'](_0x84e64f,_0x25f7cb);for(const _0x17c9bf of _0x580a9e)_0x12fcd4['setAttribute'](_0x17c9bf,_0x5eda20[_0x5a0f7f][_0x17c9bf],_0x25f7cb);_0x12fcd4['remove'](_0x12fcd4['createRangeIn'](_0x25f7cb)),_0x12fcd4['insert'](_0x44e8d1['data']['parse'](_0x5e6d64,_0x25f7cb),_0x25f7cb,0x0);}});const _0x5d831c=m(_0x44e8d1['locale'],'Restored');if(_0x50b8e3['name'])_0x2c14a8=-0x1==_0x50b8e3['name']['indexOf'](_0x5d831c)?_0x5d831c+':\x20'+_0x50b8e3['name']:_0x50b8e3['name'];else _0x2c14a8=_0x5d831c+':\x20'+(_0x50b8e3['createdAt']['toLocaleDateString'](_0x44e8d1['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x50b8e3['createdAt']['toLocaleTimeString'](_0x44e8d1['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3b9ba5['saveRevision']({'name':_0x2c14a8}),_0x1b10b2['isReady']=!0x0,_0x44e8d1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,ge as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};
|