@ckeditor/ckeditor5-revision-history 48.2.0-alpha.3 → 48.2.0-alpha.5

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -7
  2. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x4cc566,uid as _0x39af30,Collection as _0x4ec909,logWarning as _0x58e586,FocusTracker as _0x3faa7f,KeystrokeHandler as _0x4dc357,scrollViewportToShowTarget as _0x1f3b6f,ResizeObserver as _0x938bc0,ElementReplacer as _0xf2e4c6,CKEditorError as _0x37ae31}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x80fe75,set as _0x3f1c53,unset as _0x201552,isEqual as _0x51eea3}from'es-toolkit/compat';import{Plugin as _0x41f403,PendingActions as _0xcf8949,Command as _0x5bba97,ElementApiMixin as _0x47b989,Editor as _0x5909ee}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x5445fe,getMarkerDomElement as _0x1827f5,ConfirmMixin as _0x4def72,sanitizeEditorConfig as _0xee47a9}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x2c0c23,ViewAttributeElement as _0x26364e,ViewEmptyElement as _0x1ca6f7,ViewRawElement as _0x1355c1,ViewUIElement as _0x16bb6e,ViewDocumentFragment as _0x314527,ViewText as _0x39aa85,ViewElement as _0x326378,ModelElement as _0x3afe29,ModelRange as _0x303fe7,ModelPosition as _0x33bdb0,ModelDocumentFragment as _0x479b0a,ModelText as _0x5f2a14}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x4718bb,IconChevronUp as _0x284f98,IconChevronDown as _0x5976d2,IconUndo as _0x26b685,IconUser as _0x498d03,IconThreeVerticalDots as _0x4836c2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x3babf8,View as _0x1d5c9d,submitHandler as _0x4990f0,LabeledFieldView as _0x5b487d,createLabeledInputText as _0x58f4b5,createDropdown as _0x47df31,ListView as _0x44e5cd,ListItemView as _0x504708,ButtonView as _0x4e9658,MenuBarMenuView as _0x30a116,MenuBarMenuListView as _0x559a0c,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
24
- _0x4cc566(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x11f425){super(),this['id']=_0x11f425['id']||_0x39af30(),this['creator']=_0x11f425['creator']||null,this['authors']=_0x11f425['authors']||[],this['diffData']=_0x11f425['diffData']||null,this['toVersion']=_0x11f425['toVersion']||0x0,this['fromVersion']=_0x11f425['fromVersion']||0x0,this['set']('name',_0x11f425['name']||''),this['set']('createdAt',_0x11f425['createdAt']||new Date()),this['set']('attributes',_0x11f425['attributes']||{});}['setName'](_0x5dd046){this['_update']({'name':_0x5dd046});}['setAttribute'](_0x55b7d1,_0x1dc25c){const _0x23b239=_0x80fe75(this['attributes']);_0x3f1c53(_0x23b239,_0x55b7d1,_0x1dc25c),this['_update']({'attributes':_0x23b239});}['removeAttribute'](_0x349fa2){const _0x579de8=_0x80fe75(this['attributes']);_0x201552(_0x579de8,_0x349fa2),this['_update']({'attributes':_0x579de8});}['_update'](_0x396747,_0x4c929f=!0x1){let _0x154054=!0x1;const _0x119519={'id':this['id']},_0x72fd1a=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x899217 of _0x72fd1a){const _0x52733c=_0x396747[_0x899217];void 0x0!==_0x52733c&&_0x52733c!==this[_0x899217]&&(this[_0x899217]=_0x52733c,_0x119519[_0x899217]=_0x52733c,_0x154054=!0x0);}_0x154054&&(_0x119519['authors']&&(_0x119519['authorsIds']=_0x119519['authors']['map'](_0x1cc1eb=>_0x1cc1eb['id']),delete _0x119519['authors']),this['fire']('_update',_0x119519,_0x4c929f));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x16947f=>_0x16947f['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x41f403{['_revisions'];static get['requires'](){return[_0x5445fe];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2659f5){super(_0x2659f5),this['_revisions']=new _0x4ec909();}['afterInit'](){!async function(_0x3ac7fb){const _0x5a325f=_0x45f8b2([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x2716ba=0xeb829,_0x15c312=0x359e09b0,_0x3f2c8b=0x35998238^_0x15c312,_0x48de87=window[_0x45f8b2([0x44,0x61,0x74,0x65])][_0x45f8b2([0x6e,0x6f,0x77])](),_0x303aac=_0x3ac7fb[_0x45f8b2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x32740d=new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x523831=>{_0x303aac[_0x45f8b2([0x6f,0x6e,0x63,0x65])](_0x45f8b2([0x72,0x65,0x61,0x64,0x79]),_0x523831);}),_0x53c2d5={[_0x45f8b2([0x6b,0x74,0x79])]:_0x45f8b2([0x45,0x43]),[_0x45f8b2([0x75,0x73,0x65])]:_0x45f8b2([0x73,0x69,0x67]),[_0x45f8b2([0x63,0x72,0x76])]:_0x45f8b2([0x50,0x2d,0x32,0x35,0x36]),[_0x45f8b2([0x78])]:_0x45f8b2([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]),[_0x45f8b2([0x79])]:_0x45f8b2([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]),[_0x45f8b2([0x61,0x6c,0x67])]:_0x45f8b2([0x45,0x53,0x32,0x35,0x36])},_0x1475ce=_0x303aac[_0x45f8b2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x45f8b2([0x67,0x65,0x74])](_0x45f8b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3993a0(){let _0x2e434d,_0x581c40=null,_0x1783e0=null;try{if(_0x1475ce==_0x45f8b2([0x47,0x50,0x4c]))return _0x45f8b2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e434d=_0x263503(),!_0x2e434d)return _0x45f8b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e434d[_0x45f8b2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1783e0=_0x1779ce(_0x2e434d[_0x45f8b2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e434d[_0x45f8b2([0x6a,0x74,0x69])])),await _0x1ed1d5()?_0xae9f01()?_0x25ebc7()?_0x45f8b2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x485e57()?(_0x2e434d[_0x45f8b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x45f8b2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x581c40=_0x50cf21(_0x45f8b2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0xcd6d18()):_0x45f8b2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x45f8b2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x45f8b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x45f8b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x25ebc7(){const _0x217f8d=[_0x45f8b2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x45f8b2([0x74,0x72,0x69,0x61,0x6c])][_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e434d[_0x45f8b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x48de87/0x3e8:0xe10*_0x3f2c8b;return _0x2e434d[_0x45f8b2([0x65,0x78,0x70])]<_0x217f8d;}function _0xae9f01(){const _0x3c31a7=_0x2e434d[_0x45f8b2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3c31a7)return!0x1;if(_0x3c31a7[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45f8b2([0x2a])))return!0x0;if(_0x3c31a7[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45f8b2([0x52,0x48])))return!0x0;if(_0x3c31a7[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45f8b2([0x52,0x52,0x48]))){if(_0x3c394a())return!0x0;if(_0x2c342e()||_0x57cbd4())return!0x0;}return!0x1;}function _0x485e57(){const _0x1f438a=_0x2e434d[_0x45f8b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1f438a||0x0==_0x1f438a[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x32cc0e}=new URL(window[_0x45f8b2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1f438a[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32cc0e))return!0x0;const _0x46d078=_0x32cc0e[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])](_0x45f8b2([0x2e]));return _0x1f438a[_0x45f8b2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xcd6043=>_0xcd6043[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45f8b2([0x2a])))[_0x45f8b2([0x6d,0x61,0x70])](_0x500b8a=>_0x500b8a[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])](_0x45f8b2([0x2e])))[_0x45f8b2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e8536=>_0x4e8536[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x46d078[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45f8b2([0x6d,0x61,0x70])](_0x1636ec=>Array(_0x46d078[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1636ec[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45f8b2([0x66,0x69,0x6c,0x6c])](_0x1636ec[0x0]===_0x45f8b2([0x2a])?_0x45f8b2([0x2a]):'')[_0x45f8b2([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1636ec))[_0x45f8b2([0x73,0x6f,0x6d,0x65])](_0x1ff7df=>_0x46d078[_0x45f8b2([0x65,0x76,0x65,0x72,0x79])]((_0x41f879,_0x30fefc)=>_0x1ff7df[_0x30fefc]===_0x41f879||_0x1ff7df[_0x30fefc]===_0x45f8b2([0x2a])));}function _0xcd6d18(){return _0x581c40&&_0x1783e0?new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2cbf18,_0xef1222)=>{_0x581c40[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x2cbf18,_0xef1222),_0x1783e0[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x3068bc=>{_0x3068bc!=_0x45f8b2([0x56,0x61,0x6c,0x69,0x64])&&_0x2cbf18(_0x3068bc);},_0xef1222);}):_0x581c40||_0x1783e0||_0x45f8b2([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1779ce(_0x19f56d,_0x528b60){return new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x376df4=>{if(_0x52e574())return _0x376df4(_0x45f8b2([0x56,0x61,0x6c,0x69,0x64]));_0x24566c(),_0x303aac[_0x45f8b2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x45f8b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x164918=!0x1;const _0x4a6344=_0x39af30();function _0x2624de(_0xc70b91){return!!_0xc70b91&&(typeof _0xc70b91===_0x45f8b2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xc70b91===_0x45f8b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xc70b91[_0x45f8b2([0x74,0x68,0x65,0x6e])]===_0x45f8b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xc70b91[_0x45f8b2([0x63,0x61,0x74,0x63,0x68])]===_0x45f8b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4b9b0b(_0x39d078){_0x16ddf6(_0x39d078)[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x1c6ba4=>{if(!_0x1c6ba4||_0x1c6ba4[_0x45f8b2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x45f8b2([0x6f,0x6b]))return _0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x523873(_0x2cf24c(_0x4a6344+_0x528b60))!=_0x1c6ba4[_0x45f8b2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x45f8b2([0x56,0x61,0x6c,0x69,0x64]);})[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x1ccf72=>(_0x59e7a2(),_0x1ccf72),()=>{const _0x50ae50=_0x45aac3();return null==_0x50ae50?(_0x59e7a2(),_0x45f8b2([0x56,0x61,0x6c,0x69,0x64])):_0x45f8b2(_0x48de87-_0x50ae50>(0x11928db0^_0x15c312)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x376df4)[_0x45f8b2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x376df4(_0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x483ca8=0x35a8e730^_0x15c312;function _0x59e7a2(){const _0x3530b5=_0x45f8b2([0x6c,0x6c,0x63,0x74,0x2d])+_0x523873(_0x2cf24c(_0x19f56d)),_0x10a5dc=_0x5dc02d(_0x523873(window[_0x45f8b2([0x4d,0x61,0x74,0x68])][_0x45f8b2([0x63,0x65,0x69,0x6c])](_0x48de87/_0x483ca8)));window[_0x45f8b2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45f8b2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3530b5,_0x10a5dc);}function _0x45aac3(){const _0x2b5924=_0x45f8b2([0x6c,0x6c,0x63,0x74,0x2d])+_0x523873(_0x2cf24c(_0x19f56d)),_0x1b6289=window[_0x45f8b2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45f8b2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b5924);return _0x1b6289?window[_0x45f8b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5dc02d(_0x1b6289),0x10)*_0x483ca8:null;}function _0x16ddf6(_0x294bfe){return new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1a9017,_0x39950c)=>{_0x294bfe[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x1a9017,_0x39950c),window[_0x45f8b2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x39950c,0x359fdd70^_0x15c312);});}}_0x303aac[_0x45f8b2([0x6f,0x6e])](_0x45f8b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2b6c14,_0x3b6b69)=>{if(_0x3b6b69[0x0]!=_0x19f56d)return _0x376df4(_0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3b6b69[0x1]={..._0x3b6b69[0x1],[_0x45f8b2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4a6344};},{[_0x45f8b2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45f8b2([0x68,0x69,0x67,0x68])}),_0x303aac[_0x45f8b2([0x6f,0x6e])](_0x45f8b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x15b5a2=>{_0x2624de(_0x15b5a2[_0x45f8b2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x164918=!0x0,_0x4b9b0b(_0x15b5a2[_0x45f8b2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x45f8b2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45f8b2([0x6c,0x6f,0x77])}),_0x32740d[_0x45f8b2([0x74,0x68,0x65,0x6e])](()=>{_0x164918||_0x376df4(_0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52e574(){return _0x303aac[_0x45f8b2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45f8b2([0x76,0x69,0x65,0x77])][_0x45f8b2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x45f8b2([0x61,0x75,0x74,0x6f]);}function _0x24566c(){_0x303aac[_0x45f8b2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45f8b2([0x76,0x69,0x65,0x77])][_0x45f8b2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x45f8b2([0x61,0x75,0x74,0x6f]);}}function _0x50cf21(_0x1c95c8){const _0x580966=[new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2758d2=>setTimeout(_0x2758d2,0x3597377c^_0x15c312)),_0x32740d[_0x45f8b2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x51dabb=>{const _0x22de52=0x359e09b7^_0x15c312,_0x3b9daa=_0x3ac7fb[_0x45f8b2([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x1d5d0d(){_0x3b9daa[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x22de52&&_0x51dabb();}_0x1d5d0d(),_0x3b9daa[_0x45f8b2([0x6f,0x6e])](_0x45f8b2([0x61,0x64,0x64]),_0x1d5d0d);})),new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19bbae=>{function _0x1b6aab(){for(const _0x2203b5 in window)if(window[_0x45f8b2([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x45f8b2([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2203b5))&&window[_0x2203b5]==_0x2716ba)return _0x19bbae();_0x303aac[_0x45f8b2([0x73,0x74,0x61,0x74,0x65])]!=_0x45f8b2([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x45f8b2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1b6aab,0x359e1a38^_0x15c312);}_0x16a9c6(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1b6aab();})];return window[_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x45f8b2([0x72,0x61,0x63,0x65])](_0x580966)[_0x45f8b2([0x74,0x68,0x65,0x6e])](()=>_0x1c95c8);}async function _0x35b485(){if(await _0x32740d,_0x16a9c6(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x42066d=_0x3ac7fb[_0x45f8b2([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x235a48=_0x3ac7fb[_0x45f8b2([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])](_0x42066d[_0x45f8b2([0x69,0x64])]),_0x1f2a6d=_0x47dd27(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1f2a6d[_0x45f8b2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x42066d['id'],_0x235a48?_0x235a48['id']:null,!0x0),_0x1f2a6d[_0x45f8b2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x45f8b2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1f2a6d[_0x45f8b2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1f2a6d[_0x45f8b2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x1cf479,void(_0x1f2a6d[_0x45f8b2([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x1cf479);}if(_0x16a9c6(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x3399d6=_0x47dd27(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x3399d6[_0x45f8b2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x45f8b2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3399d6[_0x45f8b2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3399d6[_0x45f8b2([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x1cf479,_0x3399d6[_0x45f8b2([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x1cf479;}_0x303aac[_0x45f8b2([0x6d,0x6f,0x64,0x65,0x6c])][_0x45f8b2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1cf479,_0x303aac[_0x45f8b2([0x6d,0x6f,0x64,0x65,0x6c])][_0x45f8b2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1cf479,_0x303aac[_0x45f8b2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x45f8b2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3c394a(){return _0x16a9c6(_0x45f8b2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x47dd27(_0x45f8b2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x45f8b2([0x73,0x74,0x61,0x74,0x65])]==_0x45f8b2([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2c342e(){return _0x16a9c6(_0x45f8b2([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 _0x57cbd4(){return _0x16a9c6(_0x45f8b2([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x470352(_0x1f2012){const _0x58be43=_0x1a1eef();_0x303aac[_0x58be43]=_0x45f8b2([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])+_0x1f2012,_0x1f2012[_0x45f8b2([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x45f8b2([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x1a1eef()]=_0x2716ba),_0x1f2012!=_0x45f8b2([0x56,0x61,0x6c,0x69,0x64])&&_0x35b485();}function _0x1a1eef(){const _0xc47bf1=window[_0x45f8b2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x45f8b2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x45f8b2([0x6e,0x6f,0x77])]())[_0x45f8b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x45f8b2([0x2e]),'');let _0x47bf17=_0x45f8b2([0x76]);for(let _0x220308=0x0;_0x220308<_0xc47bf1[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x220308+=0x2){let _0x38ac25=window[_0x45f8b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc47bf1[_0x45f8b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x220308,_0x220308+0x2));_0x38ac25>=_0x5a325f[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x38ac25-=_0x5a325f[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x47bf17+=_0x5a325f[_0x38ac25];}return _0x47bf17;}function _0x263503(){const _0x23cbff=_0x1475ce[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])](_0x45f8b2([0x2e]));if(0x3!=_0x23cbff[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x33763e(_0x23cbff[0x1]);function _0x33763e(_0x26f89f){const _0x33f659=_0x125bff(_0x26f89f);return _0x33f659&&_0x486d45()?_0x33f659:null;function _0x486d45(){const _0x1b2f4a=_0x33f659[_0x45f8b2([0x6a,0x74,0x69])],_0x18dc63=window[_0x45f8b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b2f4a[_0x45f8b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b2f4a[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1d09cb={..._0x33f659,[_0x45f8b2([0x6a,0x74,0x69])]:_0x1b2f4a[_0x45f8b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b2f4a[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1d09cb[_0x45f8b2([0x76,0x63])],_0x2cf24c(_0x1d09cb)==_0x18dc63;}}}async function _0x1ed1d5(){let _0x2a5b08=!0x0;try{const _0xf17fa=_0x1475ce[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])](_0x45f8b2([0x2e])),[_0x5ec3e5,_0x279c1f,_0xf7931d]=_0xf17fa;return _0x1c6b8c(_0x5ec3e5),await _0x25de89(_0x5ec3e5,_0x279c1f,_0xf7931d),_0x2a5b08;}catch{return!0x1;}function _0x1c6b8c(_0x29b1c7){const _0xa00b87=_0x125bff(_0x29b1c7);_0xa00b87&&_0xa00b87[_0x45f8b2([0x61,0x6c,0x67])]==_0x45f8b2([0x45,0x53,0x32,0x35,0x36])||(_0x2a5b08=!0x1);}async function _0x25de89(_0xa41a8,_0x304850,_0x32639f){const _0x5527ef=window[_0x45f8b2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x45f8b2([0x66,0x72,0x6f,0x6d])](_0x32ca25(_0x32639f),_0x3c817f=>_0x3c817f[_0x45f8b2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4f36b6=new window[(_0x45f8b2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x45f8b2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xa41a8+_0x45f8b2([0x2e])+_0x304850),_0x3f7ddb=window[_0x45f8b2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x45f8b2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f7ddb)return;const _0x7c691b=await _0x3f7ddb[_0x45f8b2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x45f8b2([0x6a,0x77,0x6b]),_0x53c2d5,{[_0x45f8b2([0x6e,0x61,0x6d,0x65])]:_0x45f8b2([0x45,0x43,0x44,0x53,0x41]),[_0x45f8b2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x45f8b2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x45f8b2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f7ddb[_0x45f8b2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x45f8b2([0x6e,0x61,0x6d,0x65])]:_0x45f8b2([0x45,0x43,0x44,0x53,0x41]),[_0x45f8b2([0x68,0x61,0x73,0x68])]:{[_0x45f8b2([0x6e,0x61,0x6d,0x65])]:_0x45f8b2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x7c691b,_0x5527ef,_0x4f36b6)||(_0x2a5b08=!0x1);}}function _0x125bff(_0x545061){return _0x545061[_0x45f8b2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x45f8b2([0x65,0x79]))?JSON[_0x45f8b2([0x70,0x61,0x72,0x73,0x65])](_0x32ca25(_0x545061)):null;}function _0x32ca25(_0x1735a9){return window[_0x45f8b2([0x61,0x74,0x6f,0x62])](_0x1735a9[_0x45f8b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x45f8b2([0x2b]))[_0x45f8b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x45f8b2([0x2f])));}function _0x2cf24c(_0x1fa3c7){let _0x2733dc=0x1505;function _0x5f0adc(_0x4e0b92){for(let _0x28cb63=0x0;_0x28cb63<_0x4e0b92[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28cb63++){const _0x5c79f1=_0x4e0b92[_0x45f8b2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x28cb63);_0x2733dc=(_0x2733dc<<0x5)+_0x2733dc+_0x5c79f1,_0x2733dc&=_0x2733dc;}}function _0x3189fa(_0xaabfe6){Array[_0x45f8b2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xaabfe6)?_0xaabfe6[_0x45f8b2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3189fa):_0xaabfe6&&typeof _0xaabfe6==_0x45f8b2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x45f8b2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xaabfe6)[_0x45f8b2([0x73,0x6f,0x72,0x74])]()[_0x45f8b2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x536e91,_0x38a994])=>{_0x5f0adc(_0x536e91),_0x3189fa(_0x38a994);}):_0x5f0adc(window[_0x45f8b2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xaabfe6));}return _0x3189fa(_0x1fa3c7),_0x2733dc>>>0x0;}function _0x523873(_0x1c52bf){return _0x1c52bf[_0x45f8b2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x45f8b2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x45f8b2([0x30]));}function _0x5dc02d(_0x5e6d70){return _0x5e6d70[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x45f8b2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x45f8b2([0x6a,0x6f,0x69,0x6e])]('');}function _0x16a9c6(_0x2fc427){return _0x303aac[_0x45f8b2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x45f8b2([0x68,0x61,0x73])](_0x2fc427);}function _0x47dd27(_0x16f14b){return _0x303aac[_0x45f8b2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x45f8b2([0x67,0x65,0x74])](_0x16f14b);}function _0x1cf479(){}function _0x45f8b2(_0x2f9bd1){return _0x2f9bd1['map'](_0x5cc708=>String['fromCharCode'](_0x5cc708))['join']('');}_0x470352(await _0x3993a0());}(this);}['createRevision'](_0x55a276){const _0xf8f372=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x55a276['id'],'name':_0x55a276['name'],'creator':_0x55a276['creatorId']?_0xf8f372['getUser'](_0x55a276['creatorId']):null,'diffData':_0x55a276['diffData']||_0x55a276['data'],'authors':_0x55a276['authorsIds']['map'](_0xdec7dc=>_0xf8f372['getUser'](_0xdec7dc)),'createdAt':new Date(_0x55a276['createdAt']),'attributes':_0x55a276['attributes'],'fromVersion':_0x55a276['fromVersion'],'toVersion':_0x55a276['toVersion']});}['addRevision'](_0x15cf65,_0x4a4c0a=0x0){this['_revisions']['add'](_0x15cf65,_0x4a4c0a);}['getRevision'](_0x2655a3){return this['_revisions']['get'](_0x2655a3);}['getRevisions'](_0x4390ec={'toJSON':!0x1}){const _0x195864=Array['from'](this['_revisions']);return _0x195864['reverse'](),_0x4390ec['toJSON']?_0x195864['map'](_0x54fc04=>_0x54fc04['toJSON']()):_0x195864;}['getIndex'](_0x1743a1){return this['_revisions']['getIndex'](_0x1743a1);}['getEarlierVisibleRevision'](_0x150411){const [,_0x1f8d54]=this['getRevisionsIterator'](_0x150411,{'direction':'earlier'});return _0x1f8d54;}['getLaterVisibleRevision'](_0x5a966b){const [,_0x548af1]=this['getRevisionsIterator'](_0x5a966b,{'direction':'later'});return _0x548af1;}['getRevisionsInDiff'](_0x28a5dc){const _0x284834=[];for(const _0x50fadf of this['getRevisionsIterator'](_0x28a5dc['newRevisionId']))if(_0x284834['push'](_0x50fadf),_0x50fadf['id']===_0x28a5dc['oldRevisionId'])break;return _0x284834;}*['getRevisionsIterator'](_0x479e49,{direction:_0x3da5db='earlier',filter:_0x5add4e=()=>!0x0}={}){const _0x13fc49='earlier'===_0x3da5db?0x1:-0x1;let _0x382d26=this['_revisions']['get'](_0x479e49),_0x192d0b=this['getIndex'](_0x382d26);for(yield _0x382d26;_0x382d26;){if(_0x192d0b+=_0x13fc49,_0x382d26=this['getRevision'](_0x192d0b),!_0x382d26)return;_0x5add4e(_0x382d26)&&(yield _0x382d26);}}}class RevisionHistoryUtils extends _0x41f403{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2c0c23,'c'],[_0x26364e,'a'],[_0x1ca6f7,'e'],[_0x1355c1,'r'],[_0x16bb6e,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2c0c23],['a',_0x26364e],['e',_0x1ca6f7],['r',_0x1355c1],['u',_0x16bb6e]]);async['loadRevisionData'](_0x10e5f6,_0x170612){if(_0x10e5f6['diffData']||!_0x170612)return;const _0x1e57dc=this['editor']['config']['get']('collaboration.channelId'),_0x577bd0=await _0x170612['getRevision']({'channelId':_0x1e57dc,'revisionId':_0x10e5f6['id']});_0x10e5f6['diffData']=_0x577bd0['diffData'];}['getRevisionDocumentData'](_0x12e8d9){const _0x668b8e={};for(const _0x40fb1d in _0x12e8d9['diffData']){if(_0x12e8d9['diffData'][_0x40fb1d]['attachChange']&&!_0x12e8d9['diffData'][_0x40fb1d]['attachChange']['isAttached'])continue;const _0x4e22b8=this['_removeRevisionMarkers'](JSON['parse'](_0x12e8d9['diffData'][_0x40fb1d]['insertions'])),_0x593356=this['editor']['editing']['view']['document'],_0xc4e44a=new _0x314527(_0x593356,_0x4e22b8['map'](_0xc3d98c=>this['_getViewFromDiffObj'](_0xc3d98c,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x668b8e[_0x40fb1d]=this['editor']['data']['processor']['toData'](_0xc4e44a),this['editor']['data']['processor']['useFillerType']('default');}return _0x668b8e;}['getRevisionRootsAttributes'](_0x1da376){const _0x122d64={};for(const _0xaf8cf7 in _0x1da376['diffData'])_0x1da376['diffData'][_0xaf8cf7]['attachChange']&&!_0x1da376['diffData'][_0xaf8cf7]['attachChange']['isAttached']||(_0x122d64[_0xaf8cf7]=_0x1da376['diffData'][_0xaf8cf7]['attributesAfter']||{});return _0x122d64;}['getRevisionRootsModelElements'](_0x4eac23){const _0x42e948={};for(const _0x49987e in _0x4eac23['diffData']){if(_0x4eac23['diffData'][_0x49987e]['attachChange']&&!_0x4eac23['diffData'][_0x49987e]['attachChange']['isAttached'])continue;const _0x46fd72=_0x4eac23['diffData'][_0x49987e]['rootElementName'];_0x46fd72&&(_0x42e948[_0x49987e]=_0x46fd72);}return _0x42e948;}['_getTypeCharForViewElement'](_0x118cc0){return this['_viewClassToTypeChar']['get'](_0x118cc0['constructor']);}['_getViewFromDiffObj'](_0x43c654,_0x4cbd1c){const _0x22c545=this['editor']['editing']['view']['document'];if('string'==typeof _0x43c654)return new _0x39aa85(_0x22c545,_0x43c654);{let _0xa651b5,_0x23a3aa;_0x23a3aa='u'==_0x43c654['type']||'r'==_0x43c654['type']?[]:_0x43c654['children']['map'](_0xa3e971=>this['_getViewFromDiffObj'](_0xa3e971,_0x4cbd1c));const _0x156397=this['_typeCharToViewClass']['get'](_0x43c654['type'])||_0x326378,_0x4e972c=this['editor']['data']['htmlProcessor']['domConverter'];if(_0xa651b5=new _0x156397(_0x22c545,_0x43c654['name'],_0x43c654['attributes'],_0x23a3aa),'u'==_0x43c654['type']&&_0x43c654['children'][0x0]){const _0x3bef2d=_0x43c654['children'][0x0];if(_0xa651b5['render']=function(_0x560701){const _0x1e8d17=_0x560701['createElement']('div');return _0x1e8d17['innerHTML']=_0x3bef2d,_0x1e8d17['childNodes'][0x0];},_0x4cbd1c){const _0x2d63e1=new _0x314527(_0x22c545);_0x2d63e1['_appendChild'](_0xa651b5);const _0x5b46ab=Array['from'](_0x4e972c['viewChildrenToDom'](_0x2d63e1,{'bind':!0x1})),_0x171608=_0x4e972c['domDocument']['createElement']('div');_0x171608['append'](..._0x5b46ab),_0xa651b5=Array['from'](_0x4e972c['domChildrenToView'](_0x171608))[0x0];}}else{if('r'==_0x43c654['type']&&_0x43c654['children'][0x0]){const _0x5f534e=_0x43c654['children'][0x0];if(_0xa651b5['render']=function(_0x21f003){_0x21f003['innerHTML']=_0x5f534e;},_0x4cbd1c){const _0xb1050e=new _0x314527(_0x22c545);_0xb1050e['_appendChild'](_0xa651b5);const _0x3986f3=Array['from'](_0x4e972c['viewChildrenToDom'](_0xb1050e,{'bind':!0x1})),_0x5df9b6=_0x4e972c['domDocument']['createElement']('div');_0x5df9b6['append'](..._0x3986f3);const _0x49e14d=Array['from'](_0x4e972c['domChildrenToView'](_0x5df9b6));_0x49e14d['length']>0x1?_0xa651b5['_appendChild'](_0x49e14d):_0xa651b5=_0x49e14d[0x0];}}}if(_0x43c654['customProperties']){for(const [_0x36a591,_0x46a434]of _0x43c654['customProperties'])_0xa651b5['_setCustomProperty'](_0x36a591,_0x46a434);}const _0x546d26=void 0x0===_0x43c654['fillerOffset']?null:_0x43c654['fillerOffset'];return null!==_0x546d26&&(_0xa651b5['getFillerOffset']=()=>_0x546d26),_0xa651b5;}}['_makeModelFromViewString'](_0x5a6b29,_0x510750){const _0x2f0e96=JSON['parse'](_0x5a6b29),_0x4d4640=this['editor']['editing']['view']['document'],_0x37a3cf=new _0x314527(_0x4d4640,_0x2f0e96['map'](_0x12da0d=>this['_getViewFromDiffObj'](_0x12da0d,!0x0))),_0x1303fd=this['editor']['data']['toModel'](_0x37a3cf,_0x510750);return _0x1303fd['name']=_0x510750,_0x1303fd;}['_removeRevisionMarkers'](_0x1f487f){return(_0x1f487f=_0x1f487f['filter'](_0x2e9aee=>!_0x2e9aee['name']||'revision-start'!==_0x2e9aee['name']&&'revision-end'!==_0x2e9aee['name']))['forEach'](_0x35be32=>{'string'!=typeof _0x35be32&&(_0x35be32['children']=this['_removeRevisionMarkers'](_0x35be32['children']),_0x35be32['attributes']=_0x35be32['attributes']['filter'](_0x4435de=>!_0x4435de[0x0]['startsWith']('data-revision-')));}),_0x1f487f;}}function ft(_0x359d28,_0x3a1a37,_0x337d64){const t=_0x359d28['t'];switch(_0x3a1a37){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'},_0x337d64);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x337d64);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x41f403{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5445fe,RevisionsRepository,RevisionHistoryUtils,_0xcf8949];}constructor(_0x254d29){super(_0x254d29),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3984ec=_0x39af30();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3984ec},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x56c37f=this['repository']['getRevision'](0x0),_0x523728=_0x56c37f&&null===_0x56c37f['creator']?_0x56c37f:null;if(this['_continueCurrentRevision']=!!_0x523728&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5f4ace=this['_source']['getCurrentRevisionId'](),_0x8f333e=this['repository']['getRevision'](_0x5f4ace);if(_0x8f333e)this['_startingVersion']=_0x8f333e['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3c7979=this['_source']['history']['_operations']['find'](_0x1b3d97=>!_0x1b3d97['_isInit']),_0x552bb3=_0x3c7979?_0x3c7979['baseVersion']:this['_source']['history']['version'];_0x56c37f?(_0x56c37f['toVersion']<_0x552bb3&&_0x56c37f['_update']({'toVersion':_0x552bb3}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x523728['id'],this['_startingVersion']=_0x523728['fromVersion']):(this['_startingVersion']=_0x56c37f['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x552bb3,this['_continueCurrentRevision']=!0x1);}}else _0x523728&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x523728['toVersion'],this['editor']['model']['document']['history']['version']),_0x523728['fromVersion']===_0x523728['toVersion']?(0x0!==_0x523728['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x523728['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x523728['id'],this['_startingVersion']=_0x523728['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',_0x145e80=>!_0x145e80),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x11efe2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ef1e9;for(const _0x134890 in _0x11efe2){const _0x38e36f=_0x134890,_0x5be723=_0x11efe2[_0x38e36f];if('revisionHistoryLicenseKeyValid'==_0x5be723||'revisionHistoryLicenseKeyInvalid'==_0x5be723||'revisionHistoryLicenseKeyExpired'==_0x5be723||'revisionHistoryLicenseKeyDomainLimit'==_0x5be723||'revisionHistoryLicenseKeyNotAllowed'==_0x5be723||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5be723||'revisionHistoryLicenseKeyUsageLimit'==_0x5be723){delete _0x11efe2[_0x38e36f],_0x4ef1e9=_0x5be723,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4d0f8f=this['repository']['getRevision'](0x0),_0x16b7e3=await this['getRevisionDocumentData'](_0x4d0f8f),_0xedf393=await this['getRevisionRootsAttributes'](_0x4d0f8f),_0x23b4ae=this['_utils']['getRevisionRootsModelElements'](_0x4d0f8f);this['_replaceEditorDataWithRevisionData'](_0x16b7e3,_0xedf393,_0x23b4ae);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x5e5128){this['_source']=_0x5e5128;}async['update'](){const _0x1be3d7=await this['_source']['getLatestVersion']();if(_0x1be3d7>this['currentRevision']['toVersion']){await this['_loadState']();const _0x338056=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1be3d7});_0x338056['authors']=_0x338056['authorsIds']['map'](_0x467815=>this['editor']['plugins']['get']('Users')['getUser'](_0x467815)),this['currentRevision']['_update'](_0x338056);}}async['saveRevision'](_0x441f40={},_0x42b305=null){const _0x4d5403=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x42b305>this['currentRevision']['toVersion']&&(_0x42b305=null),null===_0x42b305&&(_0x42b305=await this['_source']['getLatestVersion']());const _0x50f4c3=this['_getFromVersion'](_0x42b305),_0x2c8b2b=this['buildRevisionData']({'from':_0x50f4c3,'to':_0x42b305});if(this['currentRevision']['toVersion']<_0x42b305){const _0x99ed1e=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x42b305,'to':_0x42b305});_0x99ed1e['authors']=[],_0x99ed1e['authorsIds']=[],_0x99ed1e['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x99ed1e,!0x0),delete _0x99ed1e['authors'],_0x4d5403['push'](_0x99ed1e);}_0x441f40['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x441f40['name']=_0x441f40['name']||null,_0x441f40['id']=_0x441f40['id']||_0x39af30(),_0x441f40={..._0x441f40,..._0x2c8b2b};const _0x4b4b65=this['addRevisionData'](_0x441f40);_0x4d5403['push'](_0x441f40);const _0x316354=this['repository']['getIndex'](_0x4b4b65);if(0x0!==_0x316354){const _0x4519ac=this['repository']['getRevision'](_0x316354-0x1);if(_0x4519ac['fromVersion']!==_0x42b305){const _0x1e3150=this['_revisionDataBuilder']['getData'](_0x42b305,_0x4519ac['toVersion']),_0x5342db={'id':_0x4519ac['id'],'diffData':_0x1e3150['diffData'],'authorsIds':_0x1e3150['authorsIds'],'authors':_0x1e3150['authorsIds']['map'](_0x118358=>this['editor']['plugins']['get']('Users')['getUser'](_0x118358)),'fromVersion':_0x42b305};_0x4519ac===this['currentRevision']&&(_0x5342db['createdAt']=new Date(_0x441f40['createdAt']['getTime']()+0xa)),_0x4519ac['_update'](_0x5342db,!0x0),delete _0x5342db['authors'],_0x4d5403['push'](_0x5342db);}}if(this['adapter']){for(const _0x2ad9ed of _0x4d5403)this['_bufferUpdate'](_0x2ad9ed['id'],_0x2ad9ed,!0x0);this['sendBufferedUpdates']();}return _0x4b4b65;}['addRevisionData'](_0x2a6007){const _0x44f782=this['repository']['createRevision'](_0x2a6007);return this['adapter']&&_0x44f782['on']('_update',(_0x56daf9,_0x4f5369,_0x415c8f)=>{_0x415c8f||(this['_bufferUpdate'](_0x4f5369['id'],_0x4f5369,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x44f782,this['_findInsertionIndex'](_0x44f782)),_0x44f782;}async['getRevisionDocumentData'](_0x2f7f52){return await this['_utils']['loadRevisionData'](_0x2f7f52,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2f7f52);}async['getRevisionRootsAttributes'](_0xf08ebc){return await this['_utils']['loadRevisionData'](_0xf08ebc,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xf08ebc);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x4d30b4=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1fc2d2=0x0;_0x1fc2d2<_0x4d30b4['length'];_0x1fc2d2++){const _0x5a84d8=_0x4d30b4[_0x1fc2d2];let _0x26c1fa=!0x1;for(const _0x14d5b7 of Object['keys'](_0x5a84d8))void 0x0===_0x5a84d8[_0x14d5b7]?delete _0x5a84d8[_0x14d5b7]:'id'!==_0x14d5b7&&(_0x26c1fa=!0x0);_0x26c1fa||(_0x4d30b4[_0x1fc2d2]=null);}if(_0x4d30b4=_0x4d30b4['filter'](_0x2a0c69=>null!==_0x2a0c69),!_0x4d30b4['length'])return;for(let _0x3fd1d6=0x0;_0x3fd1d6<_0x4d30b4['length'];_0x3fd1d6++){const _0x2020d0=_0x4d30b4[_0x3fd1d6];void 0x0!==_0x2020d0['fromVersion']&&void 0x0===_0x2020d0['toVersion']&&(_0x2020d0['toVersion']=this['repository']['getRevision'](_0x2020d0['id'])['toVersion']),void 0x0!==_0x2020d0['toVersion']&&void 0x0===_0x2020d0['fromVersion']&&(_0x2020d0['fromVersion']=this['repository']['getRevision'](_0x2020d0['id'])['fromVersion']);}const _0x635e91=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x4d30b4,_0x635e91)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x48dda6=>{if(_0x48dda6){for(const _0x35b2c0 of _0x48dda6)this['setRevisionData']({'id':_0x35b2c0['id'],'createdAt':_0x35b2c0['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x2b9859=null,from:_0x2eadde=null,to:_0x1d0e99=null}){_0x2eadde=null!==_0x2eadde?_0x2eadde:_0x2b9859['fromVersion'],_0x1d0e99=null!==_0x1d0e99?_0x1d0e99:_0x2b9859['toVersion'];const _0x5d00c8=this['_revisionDataBuilder']['getData'](_0x2eadde,_0x1d0e99),_0x2b7985={'diffData':_0x5d00c8['diffData'],'authorsIds':_0x5d00c8['authorsIds'],'fromVersion':_0x2eadde,'toVersion':_0x1d0e99};if(!_0x2b9859||_0x1d0e99!==_0x2b9859['toVersion']){const _0x13d14d=_0x1d0e99-0x1,_0x15b736=this['_source']['history']['getOperation'](_0x13d14d);_0x2b7985['createdAt']=_0x15b736&&_0x15b736['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2eadde===this['_loadedStateData']['fromVersion']){for(const _0x3dc95c of this['_loadedStateData']['authors'])_0x2b7985['authorsIds']['includes'](_0x3dc95c['id'])||_0x2b7985['authorsIds']['push'](_0x3dc95c['id']);}return _0x2b7985;}['_bufferUpdate'](_0x9ee8dc,_0x2e3f9c,_0x5d4450){if(this['_bufferedUpdates']['has'](_0x9ee8dc)){const _0x389c8f=this['_bufferedUpdates']['get'](_0x9ee8dc);_0x2e3f9c=_0x5d4450?{..._0x389c8f,..._0x2e3f9c}:{..._0x2e3f9c,..._0x389c8f};}this['_bufferedUpdates']['set'](_0x9ee8dc,_0x2e3f9c);}['setRevisionData'](_0x37834d){const _0x4c1d77=this['repository']['getRevision'](_0x37834d['id']);if(_0x37834d['createdAt']&&(_0x37834d['createdAt']=new Date(_0x37834d['createdAt'])),_0x37834d['authorsIds']){const _0x3c5d81=this['editor']['plugins']['get']('Users');_0x37834d['authors']=_0x37834d['authorsIds']['map'](_0x56e914=>_0x3c5d81['getUser'](_0x56e914));}_0x4c1d77['_update'](_0x37834d,!0x0);}['_createInitialRevision'](_0x8329da){const _0x4acd53=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4acd53)this['_initialRevisionId']=_0x4acd53['id'];else{const _0xe755a8=!this['editor']['model']['document']['roots']['find'](_0x9881b6=>this['editor']['model']['hasContent'](_0x9881b6)),_0x187ba2=this['editor']['plugins']['get']('Users')['me']['id'],_0x19cda8=ft(this['editor']['locale'],_0xe755a8?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x8329da,'to':_0x8329da,'id':this['_initialRevisionId'],'name':_0x19cda8,'creatorId':_0x187ba2});}}['_createCurrentRevision'](_0x479bb4){const _0x2aa6b4=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2aa6b4),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x479bb4,'to':_0x479bb4,'id':_0x2aa6b4,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x26e19f,_0x5c4962,_0x3fb73d){const _0x5406fe={},_0x5621a1={},_0x577b5d={},_0x3878fa=this['editor']['config']['get']('roots')||{};for(const [_0x52446b,_0x237694]of Object['entries'](_0x3878fa))_0x237694['lazyLoad']||(_0x5406fe[_0x52446b]=_0x237694['initialData']??'',_0x5621a1[_0x52446b]=_0x237694['modelAttributes']||{},_0x237694['modelElement']&&(_0x577b5d[_0x52446b]=_0x237694['modelElement']));for(const _0x436113 of this['editor']['model']['document']['getRootNames']())_0x5406fe[_0x436113]??='',_0x5621a1[_0x436113]??={};let _0x4c513d=!0x1;const _0x5ec3a9=Object['keys'](_0x5406fe),_0x1cb258=Object['keys'](_0x26e19f);for(const _0xf9a7b4 of _0x5ec3a9){if(_0x5406fe[_0xf9a7b4]!==_0x26e19f[_0xf9a7b4]&&''!==_0x5406fe[_0xf9a7b4]['trim']()){_0x4c513d=!0x0;break;}if(!_0x51eea3(_0x5621a1[_0xf9a7b4],_0x5c4962[_0xf9a7b4])&&Object['keys'](_0x5621a1[_0xf9a7b4])['length']>0x0){_0x4c513d=!0x0;break;}const _0x4136a4=_0x577b5d[_0xf9a7b4],_0x1a6a50=_0x3fb73d[_0xf9a7b4];if(_0x4136a4&&_0x1a6a50&&_0x4136a4!==_0x1a6a50){_0x4c513d=!0x0;break;}}_0x4c513d||(_0x4c513d=_0x1cb258['some'](_0x1627cd=>!this['editor']['model']['document']['getRoot'](_0x1627cd))),_0x4c513d&&_0x58e586('editor-initial-data-replaced-with-revision-data',{'editorData':_0x5406fe,'editorRootsAttributes':_0x5621a1,'editorRootsModelElements':_0x577b5d,'revisionData':_0x26e19f,'revisionRootsAttributes':_0x5c4962,'revisionRootsModelElements':_0x3fb73d});for(const [_0x58d362,_0x153628]of Object['entries'](_0x26e19f))this['editor']['config']['set']('roots.'+_0x58d362+'.initialData',_0x153628);for(const [_0x563f0a,_0x3ed76e]of Object['entries'](_0x5c4962))this['editor']['config']['set']('roots.'+_0x563f0a+'.modelAttributes',_0x3ed76e);const _0x195f29=this['editor']['model']['document'];for(const [_0x55ef8,_0x52b69c]of Object['entries'](_0x3fb73d)){this['editor']['config']['set']('roots.'+_0x55ef8+'.modelElement',_0x52b69c);const _0x47b826=_0x195f29['getRoot'](_0x55ef8);_0x47b826&&_0x47b826['name']!==_0x52b69c&&(_0x195f29['roots']['remove'](_0x55ef8),_0x195f29['createRoot'](_0x52b69c,_0x55ef8));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2ea4ba=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2ea4ba['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x50f5fa){const _0x7484d3=this['repository']['getRevisions']();_0x7484d3['reverse']();let _0x1152b6=0x0;for(;_0x1152b6<_0x7484d3['length'];){const _0x3743f4=_0x7484d3[_0x1152b6];if(_0x3743f4===this['currentRevision']){_0x1152b6++;continue;}if(_0x3743f4['id']===this['_initialRevisionId'])break;const _0x358b68=_0x50f5fa['toVersion']-_0x3743f4['toVersion']||_0x50f5fa['fromVersion']-_0x3743f4['fromVersion'];if(_0x358b68>0x0)break;if(_0x358b68<0x0)_0x1152b6++;else{if(!_0x50f5fa['creator']&&_0x3743f4['creator'])break;if(_0x3743f4['creator']||!_0x50f5fa['creator']){if(_0x50f5fa['createdAt']>_0x3743f4['createdAt'])break;_0x1152b6++;}else _0x1152b6++;}}return _0x1152b6;}['_getFromVersion'](_0x4f4f96){const _0x54c175=this['repository']['getRevisions']();_0x54c175['reverse'](),_0x54c175['shift']();const _0x46cfb5=_0x54c175['find'](_0x94ccae=>_0x94ccae['toVersion']<=_0x4f4f96)['toVersion'];return _0x46cfb5<this['_startingVersion']?this['_startingVersion']:_0x46cfb5;}['_makeRevision']({name:_0x359d9e,from:_0x30a167,to:_0x1cd6b0,creatorId:_0x44944f,id:_0x7756c1}){const _0x2920c7=this['buildRevisionData']({'from':_0x30a167,'to':_0x1cd6b0});_0x2920c7['name']=_0x359d9e,_0x2920c7['creatorId']=_0x44944f,_0x2920c7['id']=_0x7756c1;const _0x25edc8=this['addRevisionData'](_0x2920c7);return this['adapter']&&this['_bufferUpdate'](_0x2920c7['id'],_0x2920c7,!0x0),_0x25edc8;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3ab851){this['editor']=_0x3ab851,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'](_0x14080e){this['source']=_0x14080e;const _0x435e7f=new Map(),_0x49fb1b=new Map(),_0x2f747b=this['editor']['model']['document']['roots']['map'](_0x5a0e1c=>_0x5a0e1c['rootName']);for(const _0x248557 of _0x2f747b){const _0x2cf8d4=this['editor']['model']['document']['getRoot'](_0x248557),_0x56f26a=gt(_0x2cf8d4);_0x435e7f['set'](_0x248557,_0x56f26a),_0x49fb1b['set'](_0x248557,Object['fromEntries'](_0x2cf8d4['getAttributes']()));}const _0x38a7b5=Array['from'](this['editor']['model']['markers'])['map'](_0x1f6fd9=>[_0x1f6fd9['name'],_0x1f6fd9['getRange']()]),_0x5e70fa=this['source']['version'];this['_saveMetaData'](_0x5e70fa,_0x435e7f,_0x38a7b5,_0x49fb1b),this['_startingRevisionId']=this['_revisionId'];const _0x3fbea1=new Map(),_0xfaf4dd=new Map();for(const _0x5b4920 of _0x2f747b){const _0xdccbec=wt(_0x5b4920,this['editor']['model']['document']['getRoot'](_0x5b4920)['name']);_0x3fbea1['set'](_0x5b4920,_0xdccbec),_0xfaf4dd['set'](_0x5b4920,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3fbea1,[],_0xfaf4dd);}['getData'](_0x11238e,_0x473c08){if(this['_lastFrom']===_0x11238e&&this['_lastTo']<=_0x473c08)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x473c08,!0x0);else{if(!this['_savedMetaData']['has'](_0x11238e)){const _0x5272e3=this['_getPreviousFrom'](_0x11238e);this['_calculateMetaData'](_0x5272e3,_0x11238e,!0x1);}this['_calculateMetaData'](_0x11238e,_0x473c08,!0x0);}return this['_lastFrom']=_0x11238e,this['_lastTo']=_0x473c08,this['_getState']();}['loadState'](_0xe11def){if(!this['_savedMetaData']['has'](_0xe11def['fromVersion'])){const _0x50abc7=this['_getPreviousFrom'](_0xe11def['fromVersion']);this['_calculateMetaData'](_0x50abc7,_0xe11def['fromVersion'],!0x1);}this['_calculateMetaData'](_0xe11def['fromVersion'],_0xe11def['toVersion'],!0x1);const _0x1545ec=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0xe11def['fromVersion'],this['_lastTo']=_0xe11def['toVersion'];for(const _0x49ab40 in _0xe11def['diffData']){const _0x3c9f58=_0xe11def['diffData'][_0x49ab40]['attachChange'],_0x513db6=_0x80fe75(_0xe11def['diffData'][_0x49ab40]['attributesBefore'])||{},_0x1c053f=_0xe11def['diffData'][_0x49ab40],_0x50e2e6=_0x1545ec['_makeModelFromViewString'](_0x1c053f['deletions'],_0x1c053f['rootElementName']||'$root');_0x50e2e6['rootName']=_0x49ab40,_0x50e2e6['_isAttached']=!_0x3c9f58||!_0x3c9f58['isAttached'],_0x50e2e6['isAttached']=()=>_0x50e2e6['_isAttached'],this['_baseRoots']['set'](_0x49ab40,_0x50e2e6),this['_baseRootsAttributes']['set'](_0x49ab40,_0x513db6),_0x3c9f58&&this['_touchedRoots']['set'](_0x49ab40,_0x3c9f58);const _0x7d4f11=this['_makeIdsRoot'](_0x50e2e6);this['_baseIdsRoots']['set'](_0x49ab40,_0x7d4f11);for(const [_0x1ac9ec,_0x4996cc]of _0x50e2e6['markers']){if(!_0x1ac9ec['startsWith']('revision:'))continue;const _0x9184c9=_0x1ac9ec['split'](':')[0x2];for(const _0x4d24e2 of _0x4996cc['getWalker']({'singleCharacters':!0x0})){const _0xfa04b7=this['_getVidAttributeName'](_0x4d24e2),_0x6526f0='elementEnd'==_0x4d24e2['type']?_0x4d24e2['previousPosition']['path']['slice'](0x0,-0x1):_0x4d24e2['previousPosition']['path'],_0x28c551=_0x7d4f11['getNodeByPath'](_0x6526f0)['getAttribute'](_0xfa04b7);this['_touched']['set'](_0x28c551,{'userId':_0x9184c9});}_0x50e2e6['markers']['delete'](_0x1ac9ec);}}this['_startingRevisionId']=this['_revisionId'];const _0x34196c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5f1c8c=>!this['_touched']['has'](_0x5f1c8c));let _0x458990=0x0;const _0x1851f8=new Map();for(const _0x50cd06 in _0xe11def['diffData']){const _0x39339d=_0xe11def['diffData'][_0x50cd06]['attachChange'],_0x24099d=_0x80fe75(_0xe11def['diffData'][_0x50cd06]['attributesAfter'])||{},_0x14e817=_0xe11def['diffData'][_0x50cd06],_0x180abd=_0x1545ec['_makeModelFromViewString'](_0x14e817['insertions'],_0x14e817['rootElementName']||'$root');_0x180abd['rootName']=_0x50cd06,_0x180abd['_isAttached']=!_0x39339d||_0x39339d['isAttached'],_0x180abd['isAttached']=()=>_0x180abd['_isAttached'],this['_diffRoots']['set'](_0x50cd06,_0x180abd),this['_diffRootsAttributes']['set'](_0x50cd06,_0x24099d);const _0x31c706=this['_makeIdsRoot'](_0x180abd,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x50cd06,_0x31c706),_0x1851f8['set'](_0x50cd06,_0x180abd['isAttached']()?_0x24099d:{});for(const [_0x21e0cd,_0x29c0ad]of _0x180abd['markers']){if(!_0x21e0cd['startsWith']('revision:'))continue;const _0x43f03b=_0x21e0cd['split'](':')[0x2];for(const _0x221ad4 of _0x29c0ad['getWalker']({'singleCharacters':!0x0})){const _0x3f2bba=this['_getVidAttributeName'](_0x221ad4),_0x417099=this['_revisionId']++,_0x59df53='elementEnd'==_0x221ad4['type']?_0x221ad4['previousPosition']['path']['slice'](0x0,-0x1):_0x221ad4['previousPosition']['path'];_0x31c706['getNodeByPath'](_0x59df53)['_setAttribute'](_0x3f2bba,_0x417099),this['_touched']['set'](_0x417099,{'userId':_0x43f03b});}_0x180abd['markers']['delete'](_0x21e0cd);}for(const _0x42c0ce of this['editor']['model']['createRangeIn'](_0x180abd)['getWalker']({'singleCharacters':!0x0})){const _0x1d20d3=this['_getVidAttributeName'](_0x42c0ce),_0x5086f0='elementEnd'==_0x42c0ce['type']?_0x42c0ce['previousPosition']['path']['slice'](0x0,-0x1):_0x42c0ce['previousPosition']['path'],_0x5033ab=_0x31c706['getNodeByPath'](_0x5086f0);_0x5033ab['getAttribute'](_0x1d20d3)>0x0||_0x5033ab['_setAttribute'](_0x1d20d3,_0x34196c[_0x458990++]);}for(const [_0x172139,_0x2da2ae]of _0x180abd['markers'])_0x172139['startsWith']('revision:')||this['_markers']['set'](_0x172139,_0x2da2ae);}const {roots:_0x1565bb}=this['_savedMetaData']['get'](_0xe11def['fromVersion']),{roots:_0x4037d9}=this['_savedMetaData']['get'](_0xe11def['toVersion']),_0xf743ee=gt(_0x1565bb['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xf743ee),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xf743ee,Number['NEGATIVE_INFINITY']));const _0x2927a6=gt(_0x4037d9['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2927a6),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2927a6));const _0x39b176=Array['from'](this['_diffRoots'])['map'](([_0x105c0e,_0x3e77c5])=>[_0x105c0e,gt(_0x3e77c5)]);this['_saveMetaData'](this['_lastTo'],_0x39b176,this['_markers'],_0x1851f8);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x30e7c8,_0xad9b11,_0x4f1277,_0x1ef7df){const _0x24ea74=new Map(_0xad9b11),_0x17363c=new Map(_0x80fe75(_0x1ef7df)),_0x4ef6af=new Map();for(const [_0xa80718,_0x4d0ff5]of _0x4f1277)_0x4ef6af['set'](_0xa80718,{'start':_0x4d0ff5['start']['clone'](),'end':_0x4d0ff5['end']['clone'](),'rootName':_0x4d0ff5['root']['rootName']});this['_savedMetaData']['set'](_0x30e7c8,{'roots':_0x24ea74,'markers':_0x4ef6af,'rootsAttributes':_0x17363c});}['_removeMetaData'](_0x38511b){this['_savedMetaData']['delete'](_0x38511b);}['_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'](_0x1d7239,_0x2996bf=null){let _0x3b0415=null;_0x1d7239['is']('documentFragment')||(_0x3b0415=new _0x3afe29(_0x1d7239['name'],{'vid_start':null===_0x2996bf?this['_revisionId']++:_0x2996bf++}));const _0x275302=[];for(const _0x18eef9 of _0x1d7239['getChildren']())if(_0x18eef9['is']('element')){_0x275302['push'](this['_makeIdsRoot'](_0x18eef9,_0x2996bf));const _0x1b6cbc=_0x275302[_0x275302['length']-0x1];null!==_0x2996bf&&(_0x2996bf=_0x1b6cbc['is']('element','$text')?_0x1b6cbc['getAttribute']('vid')+0x1:_0x1b6cbc['getAttribute']('vid_end')+0x1);}else{for(let _0x9ff7c2=0x0;_0x9ff7c2<_0x18eef9['offsetSize'];_0x9ff7c2++)_0x275302['push'](new _0x3afe29('$text',{'vid':null===_0x2996bf?this['_revisionId']++:_0x2996bf++}));}if(_0x1d7239['is']('documentFragment')){const _0x142406=wt(_0x1d7239['rootName'],_0x1d7239['name']);return _0x142406['_insertChild'](0x0,_0x275302),_0x142406;}return _0x3b0415['_setAttribute']('vid_end',null===_0x2996bf?this['_revisionId']++:_0x2996bf++),_0x3b0415['_insertChild'](0x0,_0x275302),_0x3b0415;}['_calculateMetaData'](_0x2255e2,_0x1e3170,_0x5aea2e){this['_reset']();const {roots:_0x599605,markers:_0x11790f,rootsAttributes:_0x544ca4}=this['_savedMetaData']['get'](_0x2255e2);this['_baseRoots']=new Map(_0x599605),this['_baseRootsAttributes']=new Map(_0x80fe75(_0x544ca4));for(const [_0x3b7f66,_0x2da3c4]of this['_baseRoots'])if('$graveyard'!==_0x3b7f66&&(this['_diffRoots']['set'](_0x3b7f66,gt(_0x2da3c4)),this['_diffRootsAttributes']=new Map(_0x80fe75(_0x544ca4)),_0x5aea2e)){const _0x23f88a=this['_revisionId'];this['_idsRoots']['set'](_0x3b7f66,this['_makeIdsRoot'](_0x2da3c4)),this['_baseIdsRoots']['set'](_0x3b7f66,this['_makeIdsRoot'](_0x2da3c4,_0x23f88a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x5aea2e&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x340ea9,_0x37d0d8]of _0x11790f){const _0x225252=this['_baseRoots']['get'](_0x37d0d8['rootName']),_0x3723dc=this['_diffRoots']['get'](_0x37d0d8['rootName']),_0x22e5f1=new _0x303fe7(this['_fixPosition'](_0x37d0d8['start'],_0x225252),this['_fixPosition'](_0x37d0d8['end'],_0x225252)),_0x533c6a=this['_fixRange'](_0x22e5f1,_0x3723dc);_0x225252['markers']['set'](_0x340ea9,_0x22e5f1),this['_markers']['set'](_0x340ea9,_0x533c6a);}this['_applyOperations'](_0x2255e2,_0x1e3170,_0x5aea2e);}['_applyOperations'](_0x46eed8,_0x3392b4,_0x2da813){for(const _0x4f25d0 of this['source']['getOperations'](_0x46eed8,_0x3392b4))this['_handleOperation'](_0x4f25d0,_0x2da813);for(const _0x195c27 of this['_diffRoots']['values']())_0x195c27['markers']['clear']();for(const [_0x23496c,_0x52c438]of this['_markers']){this['_diffRoots']['get'](_0x52c438['root']['rootName'])['markers']['set'](_0x23496c,_0x52c438['clone']());}const _0x2a88a1=new Map(),_0x599530=new Map();for(const [_0x25036a,_0x2daf71]of this['_diffRoots'])_0x2a88a1['set'](_0x25036a,gt(_0x2daf71)),_0x599530['set'](_0x25036a,this['_diffRootsAttributes']['get'](_0x25036a));this['_saveMetaData'](_0x3392b4,_0x2a88a1,this['_markers'],_0x599530);}['_getPreviousFrom'](_0x2e72a0){const _0x411252=Array['from'](this['_savedMetaData']['keys']());_0x411252['sort']((_0xd2fc94,_0x1083f5)=>_0xd2fc94-_0x1083f5),_0x411252['reverse']();for(const _0xdc8c36 of _0x411252)if(_0xdc8c36<_0x2e72a0)return _0xdc8c36;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x32477e,_0xe1b814){const _0xd1a3a0=Array['from'](_0xe1b814['markers'])['map'](([_0x34e215,_0x861d07])=>[_0x34e215,this['_fixRange'](_0x861d07,_0x32477e)]);_0x32477e['markers']=new Map(_0xd1a3a0);}['_transformMarkers'](_0xd95faf){for(const _0x13d380 of this['_markers']['values']()){const _0x4e3e85=_0x13d380['getTransformedByOperation'](_0xd95faf),_0x222c4c=_0x303fe7['_createFromRanges'](_0x4e3e85);_0x13d380['start']=_0x222c4c['start'],_0x13d380['end']=_0x222c4c['end'];}}['_handleOperation'](_0x53cef8,_0x30e020){if('addRoot'!=_0x53cef8['type']&&'detachRoot'!=_0x53cef8['type']){if('insert'==_0x53cef8['type']){const _0x2cbaca=_0x53cef8['position']['root'],_0x256678=_0x2cbaca['rootName'],_0x33de09=_0x2cbaca['name'];this['_diffRoots']['has'](_0x256678)||(this['_diffRoots']['set'](_0x256678,wt(_0x256678,_0x33de09,!0x0)),this['_diffRootsAttributes']['set'](_0x256678,{}),_0x30e020&&this['_idsRoots']['set'](_0x256678,wt(_0x256678,_0x33de09,!0x0)));}else{if('addRootAttribute'==_0x53cef8['type']||'removeRootAttribute'==_0x53cef8['type']||'changeRootAttribute'==_0x53cef8['type'])return void this['_handleRootAttributeOperation'](_0x53cef8);'marker'==_0x53cef8['type']&&this['_handleMarkerOperation'](_0x53cef8);}if('marker'!==_0x53cef8['type']){const _0x2fedde=this['_cloneOperation'](_0x53cef8,this['_diffRoots']);_0x2fedde['_execute'](),this['_transformMarkers'](_0x2fedde);}if(_0x30e020)switch(_0x53cef8['type']){case'insert':this['_handleInsertOperation'](_0x53cef8);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x53cef8);break;case'merge':this['_handleMergeOperation'](_0x53cef8);break;case'split':this['_handleSplitOperation'](_0x53cef8);}}else this['_handleRootOperation'](_0x53cef8,_0x30e020);}['_cloneOperation'](_0x28d146,_0x2efa29){const _0x324a3b=_0x28d146['clone']();return _0x324a3b['_authorId']=_0x28d146['_authorId'],this['_fixOperation'](_0x324a3b,_0x2efa29),_0x324a3b;}['_getBaseVids'](_0x5b725a){return _0x5b725a['map'](_0xc639b6=>{const _0x490a18=this['_getVidAttributeName'](_0xc639b6);return Number(_0xc639b6['item']['getAttribute'](_0x490a18));});}['_generateTape'](_0x5313d9,_0x4e84d5){if(_0x5313d9['is']('element','$text'))_0x4e84d5['push']({'item':_0x5313d9,'type':'text'});else{_0x5313d9['is']('element')&&_0x4e84d5['push']({'item':_0x5313d9,'type':'elementStart'});for(const _0x4e8224 of _0x5313d9['getChildren']())this['_generateTape'](_0x4e8224,_0x4e84d5);_0x5313d9['is']('element')&&_0x4e84d5['push']({'item':_0x5313d9,'type':'elementEnd'});}return _0x4e84d5;}['_getState'](){const _0x579490=new Map(this['_touched']),_0x327991=new Map(_0x579490),_0x261489=new Map(),_0xfdf6e1={'insertions':{},'deletions':{}},_0x409949={'insertions':{},'deletions':{}},_0xbf2827=new Map(),_0x530223=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1f6fa8=new Map();_0x530223['delete']('$graveyard');for(const _0x4d9bf0 of _0x530223){const _0x17101f=(this['_diffRoots']['get'](_0x4d9bf0)??this['_baseRoots']['get'](_0x4d9bf0))['name'],_0x344064=this['_diffRoots']['get'](_0x4d9bf0)||wt(_0x4d9bf0,_0x17101f,!0x1),_0x369dbf=this['_baseRoots']['get'](_0x4d9bf0)||wt(_0x4d9bf0,_0x17101f,!0x1);_0x344064['isAttached']()||_0x369dbf['isAttached']()?(_0x1f6fa8['set'](_0x4d9bf0,_0x17101f),_0xfdf6e1['insertions'][_0x4d9bf0]=gt(_0x344064),_0xfdf6e1['deletions'][_0x4d9bf0]=gt(_0x369dbf),this['_copyMarkers'](_0xfdf6e1['deletions'][_0x4d9bf0],_0x369dbf),this['_copyMarkers'](_0xfdf6e1['insertions'][_0x4d9bf0],_0x344064),_0x409949['insertions'][_0x4d9bf0]=this['_generateTape'](this['_idsRoots']['get'](_0x4d9bf0),[]),_0x409949['deletions'][_0x4d9bf0]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x4d9bf0)||wt(_0x4d9bf0,_0x17101f,!0x1),[])):_0x530223['delete'](_0x4d9bf0);}for(const _0x3bbbf0 of _0x530223){const _0x27b79f=_0x409949['insertions'][_0x3bbbf0];for(const _0x51c5ad of _0x27b79f){const _0x3ac59f=this['_getVidAttributeName'](_0x51c5ad),_0x1f97fc=_0x51c5ad['item']['getAttribute'](_0x3ac59f);_0x327991['delete'](_0x1f97fc),_0x1f97fc>=this['_startingRevisionId']&&_0x261489['set'](_0x1f97fc,_0x579490['get'](_0x1f97fc));}}for(const _0x452db9 of _0x530223){const _0x2b933c=_0x409949['insertions'][_0x452db9],_0x56858d=this['_getBaseVids'](_0x409949['deletions'][_0x452db9]);let _0x5269ef=0x0;for(const _0x144968 of _0x2b933c){const _0x2571e7=this['_getVidAttributeName'](_0x144968),_0x1b1f8a=_0x144968['item']['getAttribute'](_0x2571e7);if(!_0x261489['has'](_0x1b1f8a)&&!_0xbf2827['has'](_0x1b1f8a)){if(_0x327991['has'](_0x1b1f8a))_0x5269ef++;else{if(_0x1b1f8a!=_0x56858d[_0x5269ef]){const _0x31c48e=_0x579490['get'](_0x1b1f8a)||_0x579490['get'](_0x56858d[_0x5269ef]);for(;_0x1b1f8a!=_0x56858d[_0x5269ef];)_0x327991['has'](_0x56858d[_0x5269ef])||(_0xbf2827['set'](_0x56858d[_0x5269ef],_0x31c48e),_0x579490['set'](_0x56858d[_0x5269ef],_0x31c48e)),_0x5269ef++;}_0x5269ef++;}}}}for(const _0x5a2787 of _0x530223){const _0x232cba=_0x409949['insertions'][_0x5a2787];for(const _0x5693f0 of _0x232cba){const _0x29c42d=this['_getVidAttributeName'](_0x5693f0),_0x35f0fe=_0x5693f0['item']['getAttribute'](_0x29c42d);if(_0xbf2827['has'](_0x35f0fe)){const _0x5c48b0=_0xbf2827['get'](_0x35f0fe);_0x327991['has'](_0x35f0fe)||_0x327991['set'](_0x35f0fe,{..._0x5c48b0}),_0x261489['set'](_0x35f0fe,{..._0x5c48b0});}}}for(const _0x231a05 of _0x327991['keys']())_0x231a05>=this['_startingRevisionId']&&_0x327991['delete'](_0x231a05);const _0x2f602a=new Map();for(const _0x1b4647 of _0x530223){let _0x5833f1=_0x409949['insertions'][_0x1b4647];for(const _0x3ab83c of _0x5833f1)if(_0x3ab83c['item']['is']('element','tableCell')){const _0x2e871e=this['_getVidAttributeName'](_0x3ab83c),_0x3585a5=_0x3ab83c['item']['getAttribute'](_0x2e871e);if(_0x261489['has'](_0x3585a5)){const _0x445914=_0x3ab83c['item']['parent']['parent']['getAttribute']('vid_start'),_0x487a28=_0x2f602a['get'](_0x445914)||new Set();_0x487a28['add'](_0x261489['get'](_0x3585a5)['userId']),_0x2f602a['set'](_0x445914,_0x487a28);}}_0x5833f1=_0x409949['deletions'][_0x1b4647];for(const _0x2a0b3d of _0x5833f1)if(_0x2a0b3d['item']['is']('element','tableCell')){const _0x4bbcd0=this['_getVidAttributeName'](_0x2a0b3d),_0x52cf53=_0x2a0b3d['item']['getAttribute'](_0x4bbcd0);if(_0x327991['has'](_0x52cf53)){const _0x1cd093=_0x2a0b3d['item']['parent']['parent']['getAttribute']('vid_start'),_0x4184d1=_0x2f602a['get'](_0x1cd093)||new Set();_0x4184d1['add'](_0x327991['get'](_0x52cf53)['userId']),_0x2f602a['set'](_0x1cd093,_0x4184d1);}}for(const _0x3426cb of _0x2f602a['keys']())(_0x261489['has'](_0x3426cb)||_0x327991['has'](_0x3426cb))&&_0x2f602a['delete'](_0x3426cb);}for(const _0x4d73c4 of _0x530223){const _0x1e95b3=_0x409949['insertions'][_0x4d73c4];let _0x8da23c=null,_0x3a14d8=null;for(const _0x53fcee of _0x1e95b3){const _0x5aa40e=this['_getVidAttributeName'](_0x53fcee),_0x105c97=_0x53fcee['item']['getAttribute'](_0x5aa40e),_0x77d0d2=_0x2f602a['get'](_0x105c97);_0x77d0d2&&'elementStart'==_0x53fcee['type']&&(_0x8da23c=Array['from'](_0x77d0d2)[0x0],_0x3a14d8=_0x53fcee['item']['getAttribute']('vid_end')),_0x8da23c&&(_0x327991['set'](_0x105c97,{'userId':_0x8da23c}),_0x261489['set'](_0x105c97,{'userId':_0x8da23c})),_0x105c97==_0x3a14d8&&(_0x8da23c=null,_0x3a14d8=null);}}const _0x309b72={},_0x5fb9f8=new Set();for(const _0x1d9353 of _0x530223){const _0x3b14da=_0xfdf6e1['deletions'][_0x1d9353],_0x4a6872=_0xfdf6e1['insertions'][_0x1d9353];for(const {userId:_0x35b520}of this['_touchedMarkers']['values']())null!==_0x35b520&&_0x5fb9f8['add'](_0x35b520);for(const {userId:_0x461049}of this['_touchedRoots']['values']())null!==_0x461049&&_0x5fb9f8['add'](_0x461049);this['_markChanges'](_0x4a6872,_0x409949['insertions'][_0x1d9353],_0x261489,'insertion',_0x5fb9f8),this['_markChanges'](_0x3b14da,_0x409949['deletions'][_0x1d9353],_0x327991,'deletion',_0x5fb9f8),_0x309b72[_0x1d9353]={'insertions':this['_prepareViewToSave'](_0x4a6872),'deletions':this['_prepareViewToSave'](_0x3b14da),'attachChange':this['_touchedRoots']['get'](_0x1d9353)||null,'attributesBefore':_0x80fe75(this['_baseRootsAttributes']['get'](_0x1d9353))||{},'attributesAfter':_0x80fe75(this['_diffRootsAttributes']['get'](_0x1d9353)),'rootElementName':_0x1f6fa8['get'](_0x1d9353)};}return{'diffData':_0x309b72,'authorsIds':Array['from'](_0x5fb9f8)};}['_processRootBeforeSave'](_0x235a42){for(const [,_0x16dd4d]of _0x235a42['markers']){const _0x366c21=_0x16dd4d['start']['getAncestors']()['filter'](_0x1f5c8a=>'tableCell'==_0x1f5c8a['name']);for(const _0x16217c of _0x366c21)0x1==_0x16217c['childCount']&&_0x16217c['getChild'](0x0)['is']('element','paragraph')&&_0x16217c['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1da7fa){this['_processRootBeforeSave'](_0x1da7fa);const _0x258fbf=this['editor']['data']['toView'](_0x1da7fa,{}),_0x3c63f8=Array['from'](_0x258fbf['getChildren']())['map'](_0x386147=>this['_getViewJson'](_0x386147));return JSON['stringify'](_0x3c63f8);}['_getViewJson'](_0x2cc8eb){if(_0x2cc8eb['is']('$text'))return _0x2cc8eb['data'];{const _0x4ee344=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x48e813=_0x2cc8eb,_0x4bd42c=this['editor']['data']['htmlProcessor']['domConverter'],_0xc71773={'type':_0x4ee344['_getTypeCharForViewElement'](_0x48e813),'name':_0x48e813['name'],'attributes':Array['from'](_0x48e813['getAttributes']()),'children':Array['from'](_0x48e813['getChildren']())['map'](_0x21540b=>this['_getViewJson'](_0x21540b))};if(_0x2cc8eb['is']('uiElement')&&'$comment'!=_0x2cc8eb['name']){const _0x4efc36=_0x2cc8eb['render'](_0x4bd42c['domDocument'],_0x4bd42c);_0xc71773['children']['push'](_0x4efc36['outerHTML']);}else{if(_0x2cc8eb['is']('rawElement')){const _0x238e50=_0x4bd42c['domDocument']['createElement'](_0x48e813['name']);_0x2cc8eb['render'](_0x238e50,_0x4bd42c),_0xc71773['children']['push'](_0x238e50['innerHTML']);}}const _0x14cad5=Array['from'](_0x48e813['getCustomProperties']());_0x14cad5['length']>0x0&&(_0xc71773['customProperties']=_0x14cad5);const _0x24559a=_0x48e813['getFillerOffset']();return null!==_0x24559a&&(_0xc71773['fillerOffset']=_0x24559a),_0xc71773;}}['_markChanges'](_0x2c254d,_0x3abb0d,_0x53037d,_0x24de3e,_0x2f9f59){let _0x5d6bee=null,_0x191ab8=null,_0x3d487f=0x0;const _0x353f13=this['editor']['model'];for(let _0xb5867b=0x0;_0xb5867b<_0x3abb0d['length'];_0xb5867b++){const _0x235fd1=this['_getVidAttributeName'](_0x3abb0d[_0xb5867b]),_0x5b8ecd=_0x3abb0d[_0xb5867b]['item']['getAttribute'](_0x235fd1),_0x34cc09=_0x53037d['get'](_0x5b8ecd),_0x295d06=_0xb5867b==_0x3abb0d['length']-0x1;(!_0x5d6bee&&_0x34cc09&&(_0x5d6bee=_0x34cc09,_0x191ab8=_0x3abb0d[_0xb5867b]),_0x5d6bee&&(!_0x34cc09||_0x34cc09['userId']!=_0x5d6bee['userId']))&&(_0x50a819(_0x34cc09,mt(_0x191ab8,_0x2c254d,_0x353f13),mt(_0x3abb0d[_0xb5867b],_0x2c254d,_0x353f13)),_0x5d6bee=_0x34cc09||null,_0x191ab8=_0x34cc09?_0x3abb0d[_0xb5867b]:null),_0x5d6bee&&_0x295d06&&_0x50a819(_0x34cc09,mt(_0x191ab8,_0x2c254d,_0x353f13),pt(_0x3abb0d[_0xb5867b],_0x2c254d,_0x353f13));}function _0x50a819(_0x2835ae,_0x355abb,_0x40f18b){const _0x3b773c=_0x5d6bee['userId'],_0x5ee31b='revision:'+_0x24de3e+':'+_0x3b773c+':'+_0x3d487f++,_0x117bc4=_0x353f13['createRange'](_0x355abb,_0x40f18b);_0x2c254d['markers']['set'](_0x5ee31b,_0x117bc4),null!==_0x3b773c&&_0x2f9f59['add'](_0x3b773c);}}['_getVidAttributeName'](_0x587c1e){switch(_0x587c1e['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0xcb3ce8,_0x2acb0){_0xcb3ce8['baseVersion']=null;for(const _0x4d8f2d in _0xcb3ce8){const _0x29f54b=_0xcb3ce8[_0x4d8f2d];if(_0x29f54b instanceof _0x33bdb0){const _0x340133=_0x2acb0['get'](_0x29f54b['root']['rootName']);_0xcb3ce8[_0x4d8f2d]=this['_fixPosition'](_0x29f54b,_0x340133);}if(_0x29f54b instanceof _0x303fe7){const _0x1d8ff1=_0x2acb0['get'](_0x29f54b['root']['rootName']);_0xcb3ce8[_0x4d8f2d]=this['_fixRange'](_0x29f54b,_0x1d8ff1);}'root'===_0x4d8f2d&&(_0xcb3ce8['root']=_0x2acb0['get'](_0xcb3ce8['root']['rootName']));}}['_fixRange'](_0x34bbc1,_0x20ceec){return this['editor']['model']['createRange'](this['_fixPosition'](_0x34bbc1['start'],_0x20ceec),this['_fixPosition'](_0x34bbc1['end'],_0x20ceec));}['_fixPosition'](_0x480d0e,_0x27e9e0){return this['editor']['model']['createPositionFromPath'](_0x27e9e0,_0x480d0e['path'],_0x480d0e['stickiness']);}['_handleInsertOperation'](_0x176cbf){const _0x124d01=this['_idsRoots']['get'](_0x176cbf['position']['root']['rootName']),_0x2644b1=this['_fixPosition'](_0x176cbf['position'],_0x124d01),_0x20ba23=null===_0x176cbf['_authorId']?null:_0x176cbf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1338a9=_0x2644b1['parent'],_0x10dd92=this['_revisionId'],_0x28343f=[];for(const _0x2ce820 of _0x176cbf['nodes'])if(_0x2ce820['is']('element'))_0x28343f['push'](this['_makeIdsRoot'](_0x2ce820));else{for(let _0x17a263=0x0;_0x17a263<_0x2ce820['offsetSize'];_0x17a263++)_0x28343f['push'](new _0x3afe29('$text',{'vid':this['_revisionId']++}));}const _0xb5031b=this['_revisionId'];for(let _0x5115cc=_0x10dd92;_0x5115cc<_0xb5031b;_0x5115cc++)this['_touched']['set'](_0x5115cc,{'userId':_0x20ba23});_0x1338a9['_insertChild'](_0x2644b1['offset'],_0x28343f);}['_handleMoveOperation'](_0x29a52a){(_0x29a52a=this['_cloneOperation'](_0x29a52a,this['_idsRoots']))['_execute']();const _0x3dfa64=null===_0x29a52a['_authorId']?null:_0x29a52a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40190f=_0x29a52a['getMovedRangeStart'](),_0x32d288=_0x40190f['parent'],_0x99d994=_0x40190f['offset'];!function _0x104f1f(_0x1acf32,_0x341e5c,_0x5553cb,_0x2d84f7){for(let _0x2c5fa1=_0x5553cb;_0x2c5fa1<_0x2d84f7;_0x2c5fa1++){const _0x5b538e=_0x341e5c['getChild'](_0x2c5fa1);_0x5b538e['is']('element','$text')?_0x1acf32['set'](_0x5b538e['getAttribute']('vid'),{'userId':_0x3dfa64}):(_0x1acf32['set'](_0x5b538e['getAttribute']('vid_start'),{'userId':_0x3dfa64}),_0x104f1f(_0x1acf32,_0x5b538e,0x0,_0x5b538e['childCount']),_0x1acf32['set'](_0x5b538e['getAttribute']('vid_end'),{'userId':_0x3dfa64}));}}(this['_touched'],_0x32d288,_0x99d994,_0x99d994+_0x29a52a['howMany']);}['_handleMergeOperation'](_0x355d00){const _0x19e5a0=null===(_0x355d00=this['_cloneOperation'](_0x355d00,this['_idsRoots']))['_authorId']?null:_0x355d00['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3bf1a7=_0x355d00['targetPosition']['parent'],_0x44d403=_0x355d00['sourcePosition']['parent'],_0x41b296=_0x3bf1a7['getAttribute']('vid_end'),_0x5648c5=_0x44d403['getAttribute']('vid_start');_0x3bf1a7['_setAttribute']('vid_end',_0x44d403['getAttribute']('vid_end')),_0x44d403['_setAttribute']('vid_end',_0x41b296),this['_touched']['set'](_0x5648c5,{'userId':_0x19e5a0}),this['_touched']['set'](_0x41b296,{'userId':_0x19e5a0}),_0x355d00['_execute']();}['_handleSplitOperation'](_0x4fd9bf){const _0x2144e5=null===(_0x4fd9bf=this['_cloneOperation'](_0x4fd9bf,this['_idsRoots']))['_authorId']?null:_0x4fd9bf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cb7f3=_0x4fd9bf['graveyardPosition'],_0x45b993=_0x4fd9bf['splitPosition']['parent'];_0x4fd9bf['_execute']();const _0x29b850=_0x45b993['getAttribute']('vid_end'),_0x1c109f=_0x4fd9bf['insertionPosition']['nodeAfter'];if(_0x1cb7f3){const _0x46f5fb=_0x1c109f['getAttribute']('vid_end'),_0x4de35c=_0x45b993['getAttribute']('vid_end');_0x45b993['_setAttribute']('vid_end',_0x46f5fb),_0x1c109f['_setAttribute']('vid_end',_0x4de35c),this['_touched']['set'](_0x45b993['getAttribute']('vid_end'),{'userId':_0x2144e5}),this['_touched']['set'](_0x1c109f['getAttribute']('vid_start'),{'userId':_0x2144e5});}else{const _0x18db28=this['_revisionId']++,_0x2f6d72=this['_revisionId']++;_0x45b993['_setAttribute']('vid_end',_0x18db28),_0x1c109f['_setAttribute']('vid_start',_0x2f6d72),_0x1c109f['_setAttribute']('vid_end',_0x29b850),this['_touched']['set'](_0x18db28,{'userId':_0x2144e5}),this['_touched']['set'](_0x2f6d72,{'userId':_0x2144e5});}}['_handleMarkerOperation'](_0x52e4c5){if(!_0x52e4c5['affectsData'])return;const _0x44e1cf=(_0x52e4c5=this['_cloneOperation'](_0x52e4c5,this['_diffRoots']))['oldRange']?_0x52e4c5['oldRange']['root']:null,_0xaf2ca2=_0x52e4c5['newRange']?_0x52e4c5['newRange']['root']:null;_0x44e1cf&&this['_markers']['delete'](_0x52e4c5['name']),_0xaf2ca2&&this['_markers']['set'](_0x52e4c5['name'],_0x52e4c5['newRange']['clone']());const _0x5bdfbf=null===_0x52e4c5['_authorId']?null:_0x52e4c5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x343089=_0x52e4c5['name'];if(!this['_touchedMarkers']['has'](_0x343089))return void this['_touchedMarkers']['set'](_0x343089,{'range':_0x52e4c5['oldRange'],'userId':_0x5bdfbf});const _0x48ebfe=this['_touchedMarkers']['get'](_0x343089),_0xc06f58=_0x48ebfe['range'],_0x32f8a0=_0x52e4c5['newRange'];null==_0xc06f58&&null==_0x32f8a0||_0xc06f58&&_0x32f8a0&&_0xc06f58['isEqual'](_0x32f8a0)?this['_touchedMarkers']['delete'](_0x52e4c5['name']):_0x48ebfe['userId']=_0x5bdfbf;}['_handleRootOperation'](_0x464aa,_0x3f9a7d){this['_diffRoots']['has'](_0x464aa['rootName'])?this['_diffRoots']['get'](_0x464aa['rootName'])['_isAttached']=_0x464aa['isAdd']:(this['_diffRoots']['set'](_0x464aa['rootName'],wt(_0x464aa['rootName'],_0x464aa['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x464aa['rootName'],{}),_0x3f9a7d&&this['_idsRoots']['set'](_0x464aa['rootName'],wt(_0x464aa['rootName'],_0x464aa['elementName'],!0x0)));const _0x407931=null===_0x464aa['_authorId']?null:_0x464aa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5d0f19=this['_touchedRoots']['get'](_0x464aa['rootName']);_0x5d0f19&&_0x5d0f19['userId']===_0x407931?this['_touchedRoots']['delete'](_0x464aa['rootName']):this['_touchedRoots']['set'](_0x464aa['rootName'],{'userId':_0x407931,'isAttached':_0x464aa['isAdd']});}['_handleRootAttributeOperation'](_0x547fd3){const _0x10e947=this['_diffRootsAttributes']['get'](_0x547fd3['root']['rootName']);null===_0x547fd3['newValue']?delete _0x10e947[_0x547fd3['key']]:_0x10e947[_0x547fd3['key']]=_0x547fd3['newValue'];}}function gt(_0x28df75){const _0x46007b=wt(_0x28df75['rootName'],_0x28df75['name'],_0x28df75['isAttached']());for(const _0x230e32 of _0x28df75['getChildren']()){const _0xd92853=_0x230e32['_clone'](!0x0);_0x46007b['_appendChild'](_0xd92853);}return _0x46007b;}function wt(_0xfa3ff0,_0x116ffe,_0x3be68d=!0x0){const _0x493bd5=new _0x479b0a();return _0x493bd5['rootName']=_0xfa3ff0,_0x493bd5['name']=_0x116ffe,_0x493bd5['_isAttached']=_0x3be68d,_0x493bd5['isAttached']=()=>_0x493bd5['_isAttached'],_0x493bd5;}function mt(_0xec1e97,_0x154404,_0x22bb0c){const _0x2fac91='elementEnd'==_0xec1e97['type']?_0x22bb0c['createPositionAt'](_0xec1e97['item'],'end'):_0x22bb0c['createPositionBefore'](_0xec1e97['item']);return _0x22bb0c['createPositionFromPath'](_0x154404,_0x2fac91['path'],_0x2fac91['stickiness']);}function pt(_0x3cd21f,_0x125449,_0x5c17ba){const _0x3613b1='elementStart'==_0x3cd21f['type']?_0x5c17ba['createPositionAt'](_0x3cd21f['item'],0x0):_0x5c17ba['createPositionAfter'](_0x3cd21f['item']);return _0x5c17ba['createPositionFromPath'](_0x125449,_0x3613b1['path'],_0x3613b1['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
25
- _0x3babf8(_0x1d5c9d){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x486430,_0x2339cc){super(_0x486430),this['focusTracker']=new _0x3faa7f(),this['keystrokes']=new _0x4dc357(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2339cc),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x4990f0({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x28f19f=_0x4ca96a=>_0x4ca96a['stopPropagation']();this['keystrokes']['set']('arrowright',_0x28f19f),this['keystrokes']['set']('arrowleft',_0x28f19f),this['keystrokes']['set']('arrowup',_0x28f19f),this['keystrokes']['set']('arrowdown',_0x28f19f);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xbfc2ad){this['revisionNameInputView']['fieldView']['element']['value']=_0xbfc2ad['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x1784e3){const _0x3f1d72=new _0x5b487d(this['locale'],_0x58f4b5),_0x2f1c09=_0x3f1d72['fieldView'];_0x2f1c09['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x403bd0=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x1784e3&&(_0x403bd0+='\x20('+ft(this['locale'],'optional')+')'),(_0x3f1d72['label']=_0x403bd0,_0x2f1c09['on']('input',()=>{this['revisionNameInputValue']=_0x2f1c09['element']['value']['trim']();}),_0x3f1d72);}}class RevisionHistoryUI extends _0x41f403{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x59e6dd=this['editor'],_0x28aa0b=_0x59e6dd['plugins']['get']('RevisionTracker');_0x59e6dd['ui']['componentFactory']['add']('revisionHistory',_0x289273=>{const _0x3a083a=_0x47df31(_0x289273),_0x4c5544=_0x3a083a['panelView']['children'],_0x37de29=new _0x44e5cd(_0x289273),_0x3f0fd4=new _0x504708(_0x289273),_0x94151d=this['_createSaveRevisionButton'](_0x4e9658),_0x433464=new _0x504708(_0x289273),_0x5928bc=this['_createOpenRevisionButton'](_0x4e9658);return _0x3a083a['bind']('isEnabled')['to'](_0x28aa0b,'isReady',_0x28aa0b,'isEnabled',_0x59e6dd,'isReadOnly',(_0x4239a3,_0x222368,_0x57a6c6)=>_0x4239a3&&_0x222368&&!_0x57a6c6),_0x3a083a['buttonView']['set']({'icon':_0x4718bb,'label':ft(_0x289273,'Revision\x20history'),'tooltip':!0x0}),_0x94151d['set']({'withText':!0x0,'role':'menuitem'}),_0x5928bc['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x5928bc,'execute',()=>{_0x3a083a['isOpen']=!0x1,_0x59e6dd['editing']['view']['focus']();},{'priority':'low'}),_0x3f0fd4['children']['add'](_0x94151d),_0x433464['children']['add'](_0x5928bc),_0x37de29['role']='menu',_0x37de29['items']['addMany']([_0x3f0fd4,_0x433464]),_0x4c5544['add'](_0x37de29),_0x3a083a;}),_0x59e6dd['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x81ece1=this['editor'],_0x529d3f=_0x81ece1['locale'],_0x1d6323=_0x81ece1['plugins']['get']('RevisionTracker'),_0x1f88d8=new _0x30a116(_0x529d3f),_0x3e7860=new _0x559a0c(_0x529d3f);_0x1f88d8['bind']('isEnabled')['to'](_0x1d6323,'isReady',_0x1d6323,'isEnabled',_0x81ece1,'isReadOnly',(_0xfa2517,_0x2d5501,_0x351ae2)=>_0xfa2517&&_0x2d5501&&!_0x351ae2),_0x1f88d8['buttonView']['set']({'icon':_0x4718bb,'label':ft(_0x529d3f,'Revision\x20history')});const _0x37c9b5=new tt(_0x529d3f,_0x1f88d8),_0x9a24e9=this['_createSaveRevisionButton'](it);_0x9a24e9['delegate']('execute')['to'](_0x1f88d8),_0x37c9b5['children']['add'](_0x9a24e9),_0x3e7860['items']['add'](_0x37c9b5);const _0x5bc49c=new tt(_0x529d3f,_0x1f88d8),_0x378285=this['_createOpenRevisionButton'](it);return _0x378285['delegate']('execute')['to'](_0x1f88d8),_0x5bc49c['children']['add'](_0x378285),_0x3e7860['items']['add'](_0x5bc49c),_0x1f88d8['panelView']['children']['add'](_0x3e7860),_0x1f88d8;}['_createSaveRevisionButton'](_0x7e07a){const _0x302627=this['editor'],_0x395a6e=_0x302627['plugins']['get']('RevisionTracker'),_0x278760=new _0x7e07a(_0x302627['locale']);return _0x278760['set']({'label':ft(_0x302627['locale'],'Save\x20current\x20revision')}),_0x278760['bind']('isEnabled')['to'](_0x395a6e,'isReady',_0x395a6e,'isEnabled',_0x302627,'isReadOnly',(_0x410378,_0xade205,_0x4e3b7d)=>_0x410378&&_0xade205&&!_0x4e3b7d),this['listenTo'](_0x278760,'execute',()=>{this['_showDialog']();}),_0x278760;}['_createOpenRevisionButton'](_0x43bb9b){const _0x208b76=this['editor'],_0x2eb974=_0x208b76['plugins']['get']('RevisionTracker'),_0xff08f0=new _0x43bb9b(_0x208b76['locale']);return _0xff08f0['set']({'label':ft(_0x208b76['locale'],'Open\x20revision\x20history')}),_0xff08f0['bind']('isEnabled')['to'](_0x2eb974,'isReady',_0x208b76,'isReadOnly',(_0xfa7c8c,_0x4a225a)=>_0xfa7c8c&&!_0x4a225a),this['listenTo'](_0xff08f0,'execute',()=>{_0x208b76['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0xff08f0;}['_showDialog'](){const _0x2d7cb6=this['editor'],_0xd23138=_0x2d7cb6['locale'],_0x3518fc=_0x2d7cb6['plugins']['get']('Dialog'),_0x5a7ad7=_0x2d7cb6['plugins']['get']('RevisionTracker');function _0x262ec3(_0x4fdc3b){_0x2d7cb6['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4fdc3b['revisionName']?_0x4fdc3b['revisionNameInputView']['errorText']=ft(_0xd23138,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2d7cb6['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x4fdc3b['revisionName']}),_0x3518fc['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x262ec3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3518fc['show']({'id':'revisionSave','title':ft(_0xd23138,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x2d7cb6['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3518fc['hide']()},{'label':ft(_0x2d7cb6['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x142ea6){_0x142ea6['bind']('isEnabled')['to'](_0x5a7ad7,'isReady',_0x5a7ad7,'isEnabled',_0x2d7cb6,'isReadOnly',(_0x2b0747,_0x4fd49e,_0x1f225b)=>_0x2b0747&&_0x4fd49e&&!_0x1f225b);},'onExecute':()=>_0x262ec3(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2aa3d0=this['editor'],_0x19144a=_0x2aa3d0['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x19144a,_0x2aa3d0['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x1d5c9d{['changeId'];['_model'];constructor(_0x5c866c,_0x51e7fc){super(_0x5c866c),this['_model']=_0x51e7fc,this['changeId']=_0x51e7fc['id'];const _0x35a466=this['bindTemplate'],_0x401161=ft(_0x5c866c,_0x51e7fc['data']['isSuggestion']?'Suggested\x20by':'add'==_0x51e7fc['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x51e7fc['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x35a466['to']('type',_0x51540f=>'ck-revision-change__'+_0x51540f)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x401161}]},{'text':'\x20'+_0x51e7fc['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
26
- _0x4cc566(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x255694){super(),this['id']=_0x255694['id']||_0x39af30(),this['author']=_0x255694['author'],this['type']=_0x255694['type'],this['data']=_0x255694['data']||{},this['rootName']=_0x255694['rootName'],this['set']('createdAt',_0x255694['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x55e5d7,_0x33ee6e){this['newRevisionId']=_0x55e5d7,this['oldRevisionId']=_0x33ee6e,this['changes']=new _0x4ec909();}['_setChanges'](_0x1c13bf){for(const _0x15f127 of _0x1c13bf)this['changes']['add'](_0x15f127);}}class RevisionViewer extends _0x41f403{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5445fe,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x3880a7){super(_0x3880a7),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x4fe094,_0x2fa85f,_0x18038b)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0xf7805f=>{for(const _0xdb636e of this['editor']['editing']['view']['document']['roots'])_0x18038b?_0xf7805f['removeClass']('ck-editor__editable__overlay',_0xdb636e):_0xf7805f['addClass']('ck-editor__editable__overlay',_0xdb636e);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2582ba=>null!==_0x2582ba),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x137033,_0x1e3c38,_0x20dc1f)=>_0x137033&&_0x20dc1f?_0x1e3c38['changes']['getIndex'](_0x20dc1f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3843c4,_0x3b2bac)=>_0x3843c4?_0x3b2bac['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x47fe8a=this['editor'],_0x3d067f=new ShowChangeCommand(_0x47fe8a,{'direction':'backward'}),_0x1a22f4=new ShowChangeCommand(_0x47fe8a,{'direction':'forward'});(_0x47fe8a['commands']['add']('showPreviousChange',_0x3d067f),_0x47fe8a['commands']['add']('showNextChange',_0x1a22f4),_0x47fe8a['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x47fe8a)),this['on']('change:numberOfChanges',()=>{_0x3d067f['refresh'](),_0x1a22f4['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x47fe8a['enableReadOnlyMode']('revision-viewer'),_0x47fe8a['plugins']['has']('WidgetToolbarRepository'))&&_0x47fe8a['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x36d758){return await this['_utils']['loadRevisionData'](_0x36d758,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x36d758);}async['getRevisionRootsAttributes'](_0x1e1030){return await this['_utils']['loadRevisionData'](_0x1e1030,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1e1030);}async['compare'](_0x325a7c,_0x1389fd,_0x240774=!0x1){if(!this['isEnabled'])return;const _0x53244d=this['diff'],_0x4fe332=this['repository'],_0x3623ac='string'==typeof _0x325a7c?_0x4fe332['getRevision'](_0x325a7c):_0x325a7c,_0xa2b3f='string'==typeof _0x1389fd?_0x4fe332['getRevision'](_0x1389fd):_0x1389fd,_0x5b6336=_0x3623ac['id'],_0x57679d=_0xa2b3f?_0xa2b3f['id']:null;if(!_0x240774&&this['diff']&&this['diff']['newRevisionId']===_0x5b6336&&this['diff']['oldRevisionId']===_0x57679d)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x5b6336,_0x57679d);const _0x20463b=this['_getRevisionsRange'](_0x3623ac,_0xa2b3f,!0x0)['map'](_0x9d8059=>this['_utils']['loadRevisionData'](_0x9d8059,this['adapter']));return _0x20463b['push'](new Promise(_0x5dd02b=>{setTimeout(_0x5dd02b,0x14);})),Promise['all'](_0x20463b)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x252f25=this['_getDiff'](_0x5b6336,_0x57679d);for(const _0x53edfd of _0x252f25['changes'])this['_changeIdToChange']['set'](_0x53edfd['id'],_0x53edfd);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x33b750=>{for(const _0x457e8b of this['editor']['model']['document']['getRootNames']())_0x33b750['detachRoot'](_0x457e8b);for(const _0xd4814a of Object['keys'](_0x252f25['model'])){const _0x59964f=_0x252f25['model'][_0xd4814a]['name'],_0x23b942=_0x33b750['addRoot'](_0xd4814a,_0x59964f);for(const _0x3c430f of Object['keys'](_0x252f25['attributes'][_0xd4814a]))_0x33b750['setAttribute'](_0x3c430f,_0x252f25['attributes'][_0xd4814a][_0x3c430f],_0x23b942);_0x33b750['insert'](_0x252f25['model'][_0xd4814a],_0x23b942,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x252f25['changes'])),this['isReady']=!0x0;})['catch'](_0x7c2596=>{console['error'](_0x7c2596),this['_cleanUp'](),_0x53244d&&(this['diff']=_0x53244d),this['isReady']=!0x0;});}['addRevisionData'](_0x5d5a23,_0x42d081){const _0xe9cf29=this['repository']['createRevision'](_0x5d5a23);return _0xe9cf29['on']('_update',(_0x159a08,_0x592c5f,_0x2cc53b)=>_0x42d081(_0x592c5f,_0x2cc53b,_0xe9cf29)),this['repository']['addRevision'](_0xe9cf29),_0xe9cf29;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5abcec=>{for(const _0x2afea4 of this['editor']['model']['document']['getRootNames']())_0x5abcec['detachRoot'](_0x2afea4);});}['_sortAndFilterDiffChanges'](_0x47749c){const _0x299430=[],_0x15f663=new Map();for(const _0x6dd381 of this['editor']['model']['document']['getRootNames']()){const _0x4ee856=this['editor']['editing']['view']['getDomRoot'](_0x6dd381);if(!_0x4ee856)continue;const _0x1f965b=_0x4ee856['getClientRects']()['item'](0x0);_0x1f965b&&(_0x299430['push'](_0x6dd381),_0x15f663['set'](_0x6dd381,_0x1f965b));}return _0x299430['sort']((_0x41aa0d,_0xf3b7c7)=>{const _0xeed970=_0x15f663['get'](_0x41aa0d),_0x543cef=_0x15f663['get'](_0xf3b7c7);return _0xeed970['y']-_0x543cef['y']||_0xeed970['x']-_0x543cef['x'];}),(_0x47749c=_0x47749c['filter'](_0x3ebaea=>_0x299430['includes'](_0x3ebaea['rootName'])))['sort']((_0x24ebf0,_0x31fa36)=>_0x299430['indexOf'](_0x24ebf0['rootName'])-_0x299430['indexOf'](_0x31fa36['rootName'])),_0x47749c;}['_makeTape'](_0x2cc02f){const _0x10d165=Array['from'](_0x2cc02f['markers'])['filter'](([_0x105698,_0x55ae45])=>_0x105698['startsWith']('revision:')&&!_0x55ae45['isCollapsed']),_0x2f57ce=Array['from'](this['editor']['model']['createRangeIn'](_0x2cc02f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x10d165['length'])for(const _0x5c69f2 of _0x2f57ce){const [_0x1ff761,_0x2265f7]=_0x10d165[0x0],[,_0x3cc8fd,_0x3a636a]=_0x1ff761['split'](':');if(_0x2265f7['end']['isEqual'](_0x5c69f2['nextPosition'])&&_0x10d165['shift'](),(_0x5c69f2['previousPosition']['isEqual'](_0x2265f7['start'])||_0x5c69f2['previousPosition']['isAfter'](_0x2265f7['start']))&&('insertion'==_0x3cc8fd?_0x5c69f2['isAdded']={'userId':_0x3a636a}:'deletion'==_0x3cc8fd&&(_0x5c69f2['isRemoved']={'userId':_0x3a636a})),0x0==_0x10d165['length'])break;}return _0x2f57ce;}['_refreshStartEndIndex'](_0x5b405f){const _0x22e009=new Map();for(let _0x387999=0x0;_0x387999<_0x5b405f['length'];_0x387999++)'text'===_0x5b405f[_0x387999]['type']?(_0x5b405f[_0x387999]['item']['startIndex']=_0x387999,_0x5b405f[_0x387999]['item']['endIndex']=_0x387999):('elementStart'===_0x5b405f[_0x387999]['type']?_0x5b405f[_0x387999]['item']['startIndex']=_0x387999:'elementEnd'===_0x5b405f[_0x387999]['type']&&(_0x5b405f[_0x387999]['item']['endIndex']=_0x387999),_0x22e009['set'](_0x5b405f[_0x387999]['id'],_0x387999));for(const _0x4643ed of _0x22e009['values']())'elementStart'===_0x5b405f[_0x4643ed]['type']?_0x5b405f[_0x4643ed]['item']['endIndex']=_0x22e009['get'](_0x5b405f[_0x4643ed]['pairId']):'elementEnd'===_0x5b405f[_0x4643ed]['type']&&(_0x5b405f[_0x4643ed]['item']['startIndex']=_0x22e009['get'](_0x5b405f[_0x4643ed]['pairId']));}['_processTape'](_0x3ab99d){for(let _0x113729=0x0;_0x113729<_0x3ab99d['length'];_0x113729++){if('elementStart'===_0x3ab99d[_0x113729]['type'])_0x3ab99d[_0x113729]['item']['startIndex']=_0x113729;else{if('elementEnd'===_0x3ab99d[_0x113729]['type']){_0x3ab99d[_0x113729]['item']['endIndex']=_0x113729;const _0x33a4d9=_0x3ab99d[_0x113729]['item']['startIndex'];_0x3ab99d[_0x33a4d9]['pairId']=_0x3ab99d[_0x113729]['id'],_0x3ab99d[_0x113729]['pairId']=_0x3ab99d[_0x33a4d9]['id'];}else _0x3ab99d[_0x113729]['item']['startIndex']=_0x113729,_0x3ab99d[_0x113729]['item']['endIndex']=_0x113729,_0x3ab99d[_0x113729]['pairId']=null;}_0x3ab99d[_0x113729]['markersStart']||(_0x3ab99d[_0x113729]['markersStart']=[],_0x3ab99d[_0x113729]['markersEnd']=[]);}}['_markInsertions'](_0xe435e7,_0x1c20b9){const _0x28f050=_0xe435e7['filter'](_0x3cc738=>!_0x3cc738['isAdded']);for(let _0x569bc2=0x0;_0x569bc2<_0x1c20b9['length'];_0x569bc2++)_0x1c20b9[_0x569bc2]['isAdded']&&(_0x28f050[_0x569bc2]['isAdded']=_0x1c20b9[_0x569bc2]['isAdded']);}['_getDiff'](_0x20f493,_0xca9ae4=null){const _0x426bca=this['repository']['getRevision'](_0x20f493),_0x5e22a9=_0xca9ae4?this['repository']['getRevision'](_0xca9ae4):null,_0x135c4f=this['_getRevisionsRange'](_0x426bca,_0x5e22a9),_0x14d8c0=_0x135c4f[_0x135c4f['length']-0x1],_0x592855=new Map(),_0x2b88d9={'model':{},'attributes':{},'changes':[]},_0x35de04=new Set(),_0x666f74=new Map();for(let _0x132a90=_0x135c4f['length']-0x1;_0x132a90>=0x0;_0x132a90--){const _0x55c6cc=_0x135c4f[_0x132a90];for(const _0x9cf711 of Object['keys'](_0x55c6cc['diffData']))if(_0x55c6cc['diffData'][_0x9cf711]['attachChange']){const _0x4a3e60=_0x55c6cc['diffData'][_0x9cf711]['attachChange'];_0x4a3e60['isAttached']?(_0x35de04['add'](_0x9cf711),_0x666f74['has'](_0x9cf711)&&_0x666f74['get'](_0x9cf711)['userId']==_0x4a3e60['userId']?_0x666f74['delete'](_0x9cf711):_0x666f74['set'](_0x9cf711,_0x4a3e60)):_0x666f74['has'](_0x9cf711)?(_0x35de04['delete'](_0x9cf711),_0x666f74['delete'](_0x9cf711)):(_0x35de04['add'](_0x9cf711),_0x666f74['set'](_0x9cf711,_0x4a3e60));}else _0x35de04['add'](_0x9cf711);}for(const _0x4fff73 of _0x35de04){const _0x4313b8=_0x666f74['has'](_0x4fff73)&&!_0x666f74['get'](_0x4fff73)['isAttached'];let _0x4490dc=_0x4313b8?_0x135c4f['length']-0x1:0x0;const _0x1bb959=_0x4313b8?-0x1:0x1;for(;_0x135c4f[_0x4490dc];){const _0x8c4cf0=_0x135c4f[_0x4490dc];if(_0x8c4cf0['diffData'][_0x4fff73]){const _0x4f0225=_0x4313b8?_0x8c4cf0['diffData'][_0x4fff73]['attributesBefore']:_0x8c4cf0['diffData'][_0x4fff73]['attributesAfter'];_0x2b88d9['attributes'][_0x4fff73]=_0x4f0225?_0x80fe75(_0x4f0225):{};break;}_0x4490dc+=_0x1bb959;}}for(const _0x453af8 of _0x135c4f){_0x453af8['model']={};for(const _0x57a719 of _0x453af8['authors'])_0x592855['set'](_0x57a719['id'],_0x57a719);for(const _0x330fc9 of _0x35de04){const _0x3edb72=_0x453af8['diffData'][_0x330fc9]?_0x453af8['diffData'][_0x330fc9]['insertions']:'[]',_0x10a097=_0x453af8['diffData'][_0x330fc9]?_0x453af8['diffData'][_0x330fc9]['deletions']:'[]',_0x372286=_0x453af8['diffData'][_0x330fc9]?.['rootElementName']||'$root';_0x453af8['model'][_0x330fc9]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3edb72,_0x372286),'deletions':this['_utils']['_makeModelFromViewString'](_0x10a097,_0x372286)};}}for(const _0x49cd56 of _0x35de04){let _0x3d8871=null,_0x141147=0x0;const _0x10fc80=_0x135c4f['map'](_0x18c66c=>_0x18c66c['diffData'][_0x49cd56]?.['rootElementName'])['find'](_0x5c49e9=>void 0x0!==_0x5c49e9)||'$root',_0x4627a2=new Map(Array['from'](_0x426bca['model'][_0x49cd56]['insertions']['markers'])['filter'](([_0x1f56a7])=>!_0x1f56a7['startsWith']('revision:')));let _0x229c5a=0x0;for(const _0x3883d5 of _0x135c4f){const _0x4182e8=this['_makeTape'](_0x3883d5['model'][_0x49cd56]['insertions']);_0x3883d5==_0x426bca?(_0x3d8871=_0x4182e8,_0x141147=_0x3d8871['length'],_0x3d8871['forEach'](_0xaf6daa=>{_0xaf6daa['id']=_0x229c5a++;}),this['_processTape'](_0x3d8871)):this['_markInsertions'](_0x3d8871,_0x4182e8);const _0x1ecdaf=_0x3d8871['filter'](_0x77becf=>!_0x77becf['isAdded'])['map'](_0x2db882=>_0x2db882['id']);let _0x222ff=0x0;const _0x1ba1a9=this['_makeTape'](_0x3883d5['model'][_0x49cd56]['deletions']);_0x1ba1a9['forEach'](_0x1717a9=>{_0x1717a9['isRemoved']?_0x1717a9['id']=_0x141147++:_0x1717a9['id']=_0x1ecdaf[_0x222ff++];}),this['_processTape'](_0x1ba1a9),this['_setDistance'](_0x3d8871,'isAdded'),this['_setDistance'](_0x1ba1a9,'isRemoved'),_0x3883d5==_0x426bca&&this['_markMarkers'](_0x3d8871,_0x4627a2),_0x3d8871=this['_joinTapes'](_0x3d8871,_0x1ba1a9),this['_refreshStartEndIndex'](_0x3d8871),this['_setDistance'](_0x3d8871,'isRemoved');}_0x3d8871=_0x3d8871['filter'](_0x143b68=>!(_0x143b68['isAdded']&&_0x143b68['isRemoved']));const _0x2d486b=new Map(_0x14d8c0['model'][_0x49cd56]['deletions']['markers']),_0x3a3d35=new Set(_0x4627a2['keys']());for(const _0x5cad50 of _0x2d486b['keys']())_0x3a3d35['delete'](_0x5cad50);this['_markSuggestions'](_0x3d8871,_0x3a3d35),this['_fixObsoleteTags'](_0x3d8871),_0x3d8871=this['_removeMissingPairs'](_0x3d8871),_0x3d8871=this['_markMismatchedRemovedTags'](_0x3d8871),_0x3d8871=this['_removeUnsupportedChanges'](_0x3d8871);const {root:_0x2e0260,changes:_0x4eb176}=this['_makeModelFromTape'](_0x3d8871,_0x592855,_0x49cd56,_0x10fc80);_0x2b88d9['model'][_0x49cd56]=_0x2e0260;const _0xa865a0=_0x666f74['get'](_0x49cd56);if(_0xa865a0){const _0x579347=_0x592855['get'](_0xa865a0['userId']),_0x34e583=new ChangeItem({'author':_0x579347,'type':_0xa865a0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x49cd56});_0x4eb176['unshift'](_0x34e583),_0x2b88d9['attributes'][_0x49cd56]['revisionHistoryAttachChange']=_0x34e583['id'];}_0x2b88d9['changes']=_0x2b88d9['changes']['concat'](_0x4eb176);}return _0x2b88d9;}['_markMarkers'](_0x37244b,_0x545e79){for(let _0x3513c4=0x0;_0x3513c4<_0x37244b['length'];_0x3513c4++)for(const [_0x10ea6a,_0x321a8d]of _0x545e79)!_0x321a8d['isCollapsed']&&_0x321a8d['start']['isEqual'](_0x37244b[_0x3513c4]['previousPosition'])&&_0x37244b[_0x3513c4]['markersStart']['push'](_0x10ea6a),_0x321a8d['end']['isEqual'](_0x37244b[_0x3513c4]['nextPosition'])&&_0x37244b[_0x3513c4]['markersEnd']['push'](_0x10ea6a);}['_joinTapes'](_0x286e6a,_0x201a87){let _0x1ce05b=[],_0x2de695=0x0,_0x213ff7=0x0;for(;_0x2de695<_0x286e6a['length']||_0x213ff7<_0x201a87['length'];){const _0x3b430c=_0x286e6a[_0x2de695]||{},_0x133cc1=_0x201a87[_0x213ff7]||{};if(_0x3b430c['id']==_0x133cc1['id'])_0x2de695++,_0x213ff7++,_0x1ce05b['push'](_0x3b430c);else{if(_0x133cc1['isRemoved']&&_0x3b430c['isAdded']){const {commonTape:_0x3cd83e,iEnd:_0x1f3e23,jEnd:_0x54fd70}=this['_threeWayMerge'](_0x286e6a,_0x2de695,_0x201a87,_0x213ff7);_0x1ce05b=_0x1ce05b['concat'](_0x3cd83e),_0x2de695=_0x1f3e23,_0x213ff7=_0x54fd70;}else _0x133cc1['isRemoved']?(_0x213ff7++,_0x1ce05b['push'](_0x133cc1)):(_0x2de695++,_0x1ce05b['push'](_0x3b430c));}}return _0x1ce05b;}['_markSuggestions'](_0x5baf6a,_0x349a84){const _0x5377ef=[];for(let _0x4fd71=0x0;_0x4fd71<_0x5baf6a['length'];_0x4fd71++){for(let _0x1ed228=0x0;_0x1ed228<_0x5baf6a[_0x4fd71]['markersStart']['length'];_0x1ed228++){const _0x28c14c=_0x5baf6a[_0x4fd71]['markersStart'][_0x1ed228];if(!_0x349a84['has'](_0x28c14c))continue;const {group:_0x558260,type:_0x41e85a,authorId:_0x5a1251}=_0x3c1299(_0x28c14c);'revision-suggestion'!=_0x558260||'insertion'!=_0x41e85a&&'deletion'!=_0x41e85a||(_0x5377ef['unshift']({'type':_0x41e85a,'name':_0x28c14c,'userId':_0x5a1251}),_0x5baf6a[_0x4fd71]['markersStart']['splice'](_0x1ed228,0x1),_0x1ed228--);}_0x215bdd(_0x5baf6a[_0x4fd71]);for(let _0x3d0014=0x0;_0x3d0014<_0x5baf6a[_0x4fd71]['markersEnd']['length'];_0x3d0014++){const _0x914264=_0x5baf6a[_0x4fd71]['markersEnd'][_0x3d0014];if(!_0x349a84['has'](_0x914264))continue;const {group:_0x404edc,type:_0x35434b}=_0x3c1299(_0x914264);if('revision-suggestion'!=_0x404edc||'insertion'!=_0x35434b&&'deletion'!=_0x35434b)continue;_0x5baf6a[_0x4fd71]['markersEnd']['splice'](_0x3d0014,0x1),_0x3d0014--;const _0x5f4500=_0x5377ef['findIndex'](_0x467a3c=>_0x467a3c['name']==_0x914264);_0x5f4500>-0x1&&_0x5377ef['splice'](_0x5f4500,0x1);}}function _0x3c1299(_0x40c4e0){const _0x5592bb=_0x40c4e0['split'](':');return{'group':_0x5592bb[0x0],'type':_0x5592bb[0x1],'subType':_0x5592bb['length']>=0x5?_0x5592bb[0x2]:null,'id':_0x5592bb['length']<0x5?_0x5592bb[0x2]:_0x5592bb[0x3],'authorId':_0x5592bb['length']<0x5?_0x5592bb[0x3]:_0x5592bb[0x4],'markerCount':0x6==_0x5592bb['length']?_0x5592bb[0x5]:null};}function _0x215bdd(_0x41228c){for(let _0x397ec2=0x0;_0x397ec2<_0x5377ef['length'];_0x397ec2++){if(_0x41228c['isAdded']&&'insertion'==_0x5377ef[_0x397ec2]['type']&&_0x41228c['isAdded']['userId']==_0x5377ef[_0x397ec2]['userId'])return _0x41228c['isAddSuggestion']=_0x5377ef[_0x397ec2],void delete _0x41228c['isAdded'];if(!_0x41228c['isAdded']&&!_0x41228c['isRemoved']&&'deletion'==_0x5377ef[_0x397ec2]['type'])return void(_0x41228c['isRemoveSuggestion']=_0x5377ef[_0x397ec2]);}}}['_setDistance'](_0x34c710,_0x3d8551){let _0x33cb20=0x0,_0x50319e=!0x1;const _0x568427=new Map();for(const _0x3d44c9 of _0x34c710)_0x3d44c9[_0x3d8551]?_0x50319e&&(_0x33cb20++,_0x50319e=!0x1):(_0x33cb20++,_0x50319e=!0x0),_0x568427['set'](_0x3d44c9['id'],_0x33cb20);for(let _0x1cecc9=0x0;_0x1cecc9<_0x34c710['length'];_0x1cecc9++){if('isRemoved'==_0x3d8551&&_0x34c710[_0x1cecc9]['isAdded']||'isAdded'==_0x3d8551&&_0x34c710[_0x1cecc9]['isRemoved'])continue;if('text'==_0x34c710[_0x1cecc9]['type']){_0x34c710[_0x1cecc9]['distance']=0x0;continue;}const _0x4c4afc=_0x568427['get'](_0x34c710[_0x1cecc9]['pairId']),_0x18c3aa=_0x568427['get'](_0x34c710[_0x1cecc9]['id']);_0x34c710[_0x1cecc9]['distance']=_0x4c4afc-_0x18c3aa;}}['_getRevisionsRange'](_0x4fc912,_0x3fccf2,_0x193ae1=!0x1){const _0xaf84e2=[];let _0xcd8b5=this['repository']['getIndex'](_0x4fc912),_0x3d169c=this['repository']['getIndex'](_0x3fccf2);for(-0x1==_0x3d169c&&(_0x3d169c=this['repository']['_revisions']['length'],_0x193ae1=!0x1);_0xcd8b5<_0x3d169c;)_0xaf84e2['push'](this['repository']['getRevision'](_0xcd8b5)),_0xcd8b5++;return _0x193ae1&&_0xaf84e2['push'](this['repository']['getRevision'](_0xcd8b5)),_0xaf84e2;}['_threeWayMerge'](_0x465719,_0xd5d405,_0x55e0b3,_0x153101){const _0x5147b0=this['editor']['model']['schema'];let _0x55b3d9=_0xd5d405;for(;_0x465719[_0x55b3d9]&&_0x465719[_0x55b3d9]['isAdded'];)_0x55b3d9++;let _0xa5c561=_0x153101;for(;_0x55e0b3[_0xa5c561]&&_0x55e0b3[_0xa5c561]['isRemoved'];)_0xa5c561++;_0x223ee6(_0x465719,_0xd5d405,_0x55b3d9),_0x223ee6(_0x55e0b3,_0x153101,_0xa5c561);const _0x10811c=_0x55e0b3['slice'](_0x153101,_0xa5c561)['concat'](_0x465719['slice'](_0xd5d405,_0x55b3d9));return _0x10811c['sort']((_0x4369de,_0x39635e)=>_0x4369de['side']!=_0x39635e['side']?_0x4369de['side']-_0x39635e['side']:_0x4369de['level']!=_0x39635e['level']?_0x4369de['level']-_0x39635e['level']:_0x4369de['distance']!=_0x39635e['distance']?_0x39635e['distance']-_0x4369de['distance']:!!_0x4369de['isAdded']!=!!_0x39635e['isAdded']?-0x1==_0x4369de['side']||0x0==_0x4369de['side']?_0x4369de['isAdded']?-0x1:0x1:_0x4369de['isAdded']?0x1:-0x1:_0x4369de['index']-_0x39635e['index']),{'commonTape':_0x10811c,'iEnd':_0x55b3d9,'jEnd':_0xa5c561};function _0x223ee6(_0x5589b2,_0x4ad39f,_0x5eb9f0){let _0x1473e1=-0x1,_0x24f10b=Number['POSITIVE_INFINITY'],_0x175404=!0x0;for(let _0x5bb264=_0x4ad39f;_0x5bb264<_0x5eb9f0;_0x5bb264++)if(_0x5147b0['isInline'](_0x5589b2[_0x5bb264]['item'])||(_0x175404=!0x1),_0x5589b2[_0x5bb264]['item']['startIndex']<_0x4ad39f&&(_0x1473e1=_0x5bb264),_0x5589b2[_0x5bb264]['item']['endIndex']>=_0x5eb9f0){_0x24f10b=_0x5bb264;break;}_0x175404&&(_0x1473e1=_0x5eb9f0-0x1);for(let _0x14c365=_0x4ad39f;_0x14c365<_0x5eb9f0;_0x14c365++)_0x5589b2[_0x14c365]['side']=_0x14c365<=_0x1473e1?-0x1:_0x14c365<_0x24f10b?0x0:0x1,_0x5589b2[_0x14c365]['index']=_0x14c365;let _0x21b75d=0x0;for(let _0x14f851=_0x4ad39f;_0x14f851<=_0x1473e1;_0x14f851++)0x0==_0x5589b2[_0x14f851]['distance']?_0x5589b2[_0x14f851]['level']=_0x21b75d:(_0x21b75d++,_0x5589b2[_0x14f851]['level']=_0x21b75d,_0x21b75d++);for(let _0x4c1403=_0x4ad39f;_0x4c1403<_0x5eb9f0;_0x4c1403++)0x0==_0x5589b2[_0x4c1403]['side']&&(_0x5589b2[_0x4c1403]['level']=_0x21b75d);_0x21b75d=0x0;for(let _0x4dd7f1=_0x5eb9f0-0x1;_0x4dd7f1>=_0x24f10b;_0x4dd7f1--)0x0==_0x5589b2[_0x4dd7f1]['distance']?_0x5589b2[_0x4dd7f1]['level']=_0x21b75d:(_0x21b75d--,_0x5589b2[_0x4dd7f1]['level']=_0x21b75d,_0x21b75d--);}}['_fixObsoleteTags'](_0x5c87a9){const _0x2e75c2=new Map(),_0x1860f8=this['editor']['model']['schema'];for(let _0x149b47=0x1;_0x149b47<_0x5c87a9['length'];_0x149b47++){let _0x4f9584,_0x5beaed,_0x41336a;const _0x2823b6=_0x5c87a9[_0x149b47],_0x34a3c8=_0x5c87a9[_0x149b47-0x1];if('text'==_0x2823b6['type'])continue;if(_0x2823b6['type']!=_0x34a3c8['type'])continue;if(!_0x1860f8['isBlock'](_0x34a3c8['item'])||_0x1860f8['isLimit'](_0x34a3c8['item']))continue;if(!_0x1860f8['isBlock'](_0x2823b6['item'])||_0x1860f8['isLimit'](_0x2823b6['item']))continue;if((_0x5c87a9[_0x149b47]['isAdded']||_0x5c87a9[_0x149b47]['isAddSuggestion'])&&_0x5c87a9[_0x149b47-0x1]['isRemoved'])_0x4f9584=_0x5c87a9[_0x149b47],_0x5beaed=_0x5c87a9[_0x149b47-0x1],_0x41336a=_0x149b47-0x1;else{if(!_0x5c87a9[_0x149b47]['isRemoved']||!_0x5c87a9[_0x149b47-0x1]['isAdded']&&!_0x5c87a9[_0x149b47-0x1]['isAddSuggestion'])continue;_0x4f9584=_0x5c87a9[_0x149b47-0x1],_0x5beaed=_0x5c87a9[_0x149b47],_0x41336a=_0x149b47;}const _0xd5d3db=_0x4f9584['level']==_0x5beaed['level'],_0x20f586=Math['abs'](_0x4f9584['level'])<Math['abs'](_0x5beaed['level'])&&0x0==_0x5beaed['distance'];(_0xd5d3db||_0x20f586)&&(_0x2e75c2['set'](_0x5beaed['id'],_0x4f9584['id']),_0x5c87a9['splice'](_0x41336a,0x1),_0x149b47--,_0x4f9584['isAdded']=!0x1);}for(let _0x16e9e1=0x0;_0x16e9e1<_0x5c87a9['length'];_0x16e9e1++)_0x2e75c2['has'](_0x5c87a9[_0x16e9e1]['pairId'])&&(_0x5c87a9[_0x16e9e1]['pairId']=_0x2e75c2['get'](_0x5c87a9[_0x16e9e1]['pairId']));}['_removeMissingPairs'](_0x1af801){const _0x39c98b=new Set(_0x1af801['map'](_0x5ce2d8=>_0x5ce2d8['id']));for(let _0x559f2e=0x0;_0x559f2e<_0x1af801['length'];_0x559f2e++)_0x39c98b['has'](_0x1af801[_0x559f2e]['pairId'])||0x0==_0x1af801[_0x559f2e]['distance']||(_0x1af801[_0x559f2e]['isIncorrect']=!0x0);return _0x1af801['filter'](_0x563e3b=>!_0x563e3b['isIncorrect']);}['_markMismatchedRemovedTags'](_0x503c1d){const _0x101e15=new Set();for(let _0x4e5510=0x0;_0x4e5510<_0x503c1d['length'];_0x4e5510++){if(_0x101e15['has'](_0x503c1d[_0x4e5510]['id'])&&_0x503c1d[_0x4e5510]['isRemoved']&&(_0x503c1d[_0x4e5510]['isIncorrect']=!0x0),_0x503c1d[_0x4e5510]['isIncorrect'])continue;if(0x0==_0x503c1d[_0x4e5510]['distance'])continue;if('elementStart'!=_0x503c1d[_0x4e5510]['type'])continue;if(null==_0x503c1d[_0x4e5510]['pairId'])continue;let _0x81a79f=_0x4e5510+0x1,_0x518195=0x0;for(;_0x503c1d[_0x81a79f]['id']!=_0x503c1d[_0x4e5510]['pairId'];)'elementStart'==_0x503c1d[_0x81a79f]['type']?_0x518195++:'elementEnd'==_0x503c1d[_0x81a79f]['type']&&_0x518195--,_0x81a79f++;if(0x0!=_0x518195){if(_0x503c1d[_0x4e5510]['isRemoved'])_0x503c1d[_0x4e5510]['isIncorrect']=!0x0;else{for(;_0x81a79f!=_0x4e5510;)_0x503c1d[_0x81a79f]['isRemoved']&&0x0!=_0x503c1d[_0x81a79f]['distance']&&(_0x503c1d[_0x81a79f]['isIncorrect']=!0x0,_0x101e15['add'](_0x503c1d[_0x81a79f]['pairId'])),_0x81a79f--;}}}return _0x503c1d['filter'](_0x3fba55=>!_0x3fba55['isIncorrect']);}['_removeUnsupportedChanges'](_0x2df116){const _0x8bbed6=this['editor']['model']['schema'];for(let _0x365c2a=0x0;_0x365c2a<_0x2df116['length'];_0x365c2a++){if(!(_0x2df116[_0x365c2a]['isAdded']||_0x2df116[_0x365c2a]['isAddSuggestion']||_0x2df116[_0x365c2a]['isRemoved']||_0x2df116[_0x365c2a]['isRemoveSuggestion']))continue;if(0x0==_0x2df116[_0x365c2a]['distance'])continue;const _0x48d2ad=_0x2df116[_0x365c2a]['item'];_0x8bbed6['isBlock'](_0x48d2ad)||_0x8bbed6['isLimit'](_0x48d2ad)||(_0x2df116[_0x365c2a]['isAdded']&&delete _0x2df116[_0x365c2a]['isAdded'],_0x2df116[_0x365c2a]['isAddSuggestion']&&delete _0x2df116[_0x365c2a]['isAddSuggestion'],_0x2df116[_0x365c2a]['isRemoveSuggestion']&&delete _0x2df116[_0x365c2a]['isRemoveSuggestion'],_0x2df116[_0x365c2a]['isRemoved']&&(_0x2df116[_0x365c2a]['isIncorrect']=!0x0));}return _0x2df116['filter'](_0x4f2673=>!_0x4f2673['isIncorrect']);}['_makeModelFromTape'](_0x34b281,_0xe1ef0e,_0xdcee0a,_0x285d9b){const _0x24cf1e=new _0x479b0a(),_0x4fb617=[],_0x504732=new Map(),_0x37d2f5=this['editor']['model'],_0xf761f8=_0x37d2f5['schema'],_0x2cb798=[_0x24cf1e],_0x448da7={},_0x1bd22b={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x24cf1e['name']=_0x285d9b;let _0x3aa019=null;const _0x8dac8e=[0x0];for(let _0x2663f6=0x0;_0x2663f6<_0x34b281['length'];_0x2663f6++)if('elementStart'===_0x34b281[_0x2663f6]['type']){_0x34b281[_0x2663f6]['previousPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e);const _0x338dc8=new _0x3afe29(_0x34b281[_0x2663f6]['item']['name'],_0x34b281[_0x2663f6]['item']['getAttributes']());_0x2cb798[0x0]['_appendChild'](_0x338dc8),_0x8dac8e['push'](0x0),_0x2cb798['unshift'](_0x338dc8),_0x34b281[_0x2663f6]['nextPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e);}else'elementEnd'===_0x34b281[_0x2663f6]['type']?(_0x2cb798['shift'](),_0x34b281[_0x2663f6]['previousPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e),_0x8dac8e['pop'](),_0x8dac8e[_0x8dac8e['length']-0x1]++,_0x34b281[_0x2663f6]['nextPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e)):(_0x34b281[_0x2663f6]['previousPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e),_0x3aa019?_0x3aa019['_data']+=_0x34b281[_0x2663f6]['item']['data']:_0x3aa019=new _0x5f2a14(_0x34b281[_0x2663f6]['item']['data'],_0x34b281[_0x2663f6]['item']['getAttributes']()),_0x34b281[_0x2663f6+0x1]&&'text'===_0x34b281[_0x2663f6+0x1]['type']&&_0x321234(_0x3aa019,_0x34b281[_0x2663f6+0x1]['item'])||(_0x2cb798[0x0]['_appendChild'](_0x3aa019),_0x3aa019=null),_0x8dac8e[_0x8dac8e['length']-0x1]+=_0x34b281[_0x2663f6]['item']['offsetSize'],_0x34b281[_0x2663f6]['nextPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e));for(let _0x6b81f0=0x0;_0x6b81f0<_0x34b281['length'];_0x6b81f0++){const _0x31c9d8=_0x34b281[_0x6b81f0]['previousPosition'],_0x5e6920=_0x34b281[_0x6b81f0]['nextPosition'];for(const _0x456b90 of _0x34b281[_0x6b81f0]['markersStart'])_0x504732['set'](_0x456b90,{'start':_0x31c9d8,'end':null});_0x52cdea('isRemoveSuggestion',_0x6b81f0,_0x31c9d8,_0x5e6920),_0x52cdea('isAddSuggestion',_0x6b81f0,_0x31c9d8,_0x5e6920),_0x52cdea('isRemoved',_0x6b81f0,_0x31c9d8,_0x5e6920),_0x52cdea('isAdded',_0x6b81f0,_0x31c9d8,_0x5e6920);for(const _0x325995 of _0x34b281[_0x6b81f0]['markersEnd']){const _0x313aec=_0x504732['get'](_0x325995);_0x313aec?_0x313aec['end']=_0x5e6920:_0x504732['set'](_0x325995,{'start':_0x5e6920,'end':_0x5e6920});}}for(const [_0x4f66cd,_0x21e53b]of _0x504732){const _0xb62b01=this['editor']['model']['createRange'](_0x21e53b['start'],_0x21e53b['end']);_0x24cf1e['markers']['set'](_0x4f66cd,_0xb62b01);}return _0x4fb617['sort']((_0x45fc17,_0xf1aae9)=>{const _0x38b1b7=_0x24cf1e['markers']['get']('revision:'+_0x45fc17['id']),_0x32844a=_0x24cf1e['markers']['get']('revision:'+_0xf1aae9['id']);return _0x38b1b7['start']['isBefore'](_0x32844a['start'])?-0x1:_0x38b1b7['start']['isAfter'](_0x32844a['start'])?0x1:_0x38b1b7['end']['isBefore'](_0x32844a['end'])?-0x1:_0x38b1b7['end']['isAfter'](_0x32844a['end'])?0x1:'add'===_0x45fc17['type']?-0x1:0x1;}),{'root':_0x24cf1e,'changes':_0x4fb617};function _0x52cdea(_0x17fe00,_0x10305f,_0x2b3690,_0x9d8aa3){const _0x4decfa=!!_0x34b281[_0x10305f][_0x17fe00],_0x5c37e9=_0x4decfa?_0x34b281[_0x10305f][_0x17fe00]['userId']:null,_0x2f0d22=_0x10305f===_0x34b281['length']-0x1,_0x40d2ce=_0x1bd22b[_0x17fe00][0x0],_0x27fb92=_0xf761f8['isObject'](_0x34b281[_0x10305f]['item']);!_0x448da7[_0x17fe00]&&_0x4decfa?_0x448da7[_0x17fe00]={'start':_0x2b3690,'tapeItem':_0x34b281[_0x10305f],'userId':_0x5c37e9,'type':_0x17fe00}:_0x448da7[_0x17fe00]&&!_0x4decfa?(_0x448da7[_0x17fe00]['end']=_0x2b3690,_0x2b068f(_0x448da7[_0x17fe00]),_0x448da7[_0x17fe00]=null):_0x448da7[_0x17fe00]&&_0x4decfa&&_0x448da7[_0x17fe00]['userId']!==_0x5c37e9&&(_0x448da7[_0x17fe00]['end']=_0x2b3690,_0x40d2ce&&_0x40d2ce['userId']===_0x448da7[_0x17fe00]['userId']||_0x2b068f(_0x448da7[_0x17fe00]),_0x448da7[_0x17fe00]={'start':_0x2b3690,'tapeItem':_0x34b281[_0x10305f],'userId':_0x5c37e9,'type':_0x17fe00}),_0x448da7[_0x17fe00]&&_0x27fb92&&('elementStart'!==_0x34b281[_0x10305f]['type']||_0x40d2ce&&_0x40d2ce['userId']===_0x5c37e9||_0x1bd22b[_0x17fe00]['unshift']({'userId':_0x5c37e9,'object':_0x34b281[_0x10305f]['item'],'change':_0x448da7[_0x17fe00]}),'elementEnd'===_0x34b281[_0x10305f]['type']&&_0x40d2ce&&_0x40d2ce['object']===_0x34b281[_0x10305f]['item']&&(_0x1bd22b[_0x17fe00]['shift'](),_0x448da7[_0x17fe00]=_0x40d2ce['change'])),_0x448da7[_0x17fe00]&&_0x2f0d22&&(_0x448da7[_0x17fe00]['end']=_0x9d8aa3,_0x2b068f(_0x448da7[_0x17fe00]),_0x448da7[_0x17fe00]=null);}function _0x2b068f({start:_0x5a30e7,end:_0x185c2e,tapeItem:_0x190def,userId:_0x4d7f73,type:_0x22c6c8}){const _0x32d157=_0x190def['item'],_0x2ab42b=_0x37d2f5['schema']['isBlock'](_0x32d157)&&!_0x37d2f5['schema']['isLimit'](_0x32d157),_0xa87689=_0x5a30e7['nodeAfter']==_0x185c2e['parent']&&_0x185c2e['isAtStart'];if(_0x2ab42b&&_0xa87689)return;const _0x59465d=_0x37d2f5['createRange'](_0x5a30e7,_0x185c2e),_0x5a3f38=_0xe1ef0e['get'](_0x4d7f73),_0x3d471b=new ChangeItem({'author':_0x5a3f38,'type':'isAdded'==_0x22c6c8||'isAddSuggestion'==_0x22c6c8?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x22c6c8||'isRemoveSuggestion'==_0x22c6c8},'createdAt':new Date(),'rootName':_0xdcee0a});_0x4fb617['push'](_0x3d471b),_0x24cf1e['markers']['set']('revision:'+_0x3d471b['id'],_0x59465d);}function _0x321234(_0x1d7451,_0x3927bf){const _0x55e7e2=_0x1d7451['getAttributes'](),_0x4e7922=_0x3927bf['getAttributes']();for(const _0x567874 of _0x55e7e2){if(_0x567874[0x1]!==_0x3927bf['getAttribute'](_0x567874[0x0]))return!0x1;_0x4e7922['next']();}return _0x4e7922['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5f8525=>{const _0x4d6b71=_0x5f8525['markerName']['split'](':')[0x1],_0x3a35d9=this['_getChangeFromId'](_0x4d6b71);if(!_0x3a35d9)return null;const _0x51f660='add'==_0x3a35d9['type']?'insertion':'deletion',_0x46e884=['ck-suggestion-marker','ck-suggestion-marker-'+_0x51f660];return _0x3a35d9['data']['isSuggestion']&&_0x46e884['push']('ck-suggestion-marker-'+_0x51f660+'-new'),this['activeChange']==_0x3a35d9&&_0x46e884['push']('ck-suggestion-marker--active'),{'classes':_0x46e884,'attributes':{'data-change-id':_0x4d6b71}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x364f93=>{_0x364f93['on']('element:pre',(_0x5d631f,_0x14e25a,_0x29f5bd)=>{const _0x487160=_0x14e25a['viewItem']['getChild'](0x0);if(!_0x487160||!_0x487160['is']('element','code'))return;if(!_0x29f5bd['consumable']['consume'](_0x487160,{'attributes':['vid_start','vid_end']}))return;const _0x3895da=_0x14e25a['modelRange']['start']['nodeAfter'];_0x29f5bd['writer']['setAttribute']('vid_start',_0x487160['getAttribute']('vid_start'),_0x3895da),_0x29f5bd['writer']['setAttribute']('vid_end',_0x487160['getAttribute']('vid_end'),_0x3895da);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0xa3469=>{_0xa3469['on']('element',(_0x5cf0d2,_0x32a563,_0x1919a7)=>{if(!_0x1919a7['consumable']['consume'](_0x32a563['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x32a563['modelRange']['isCollapsed'])return;const _0x51ab75=_0x32a563['modelRange']['start']['nodeAfter'];_0x51ab75['hasAttribute']('vid_start')||_0x51ab75['hasAttribute']('vid')||(_0x1919a7['writer']['setAttribute']('vid_start',_0x32a563['viewItem']['getAttribute']('vid_start'),_0x51ab75),_0x1919a7['writer']['setAttribute']('vid_end',_0x32a563['viewItem']['getAttribute']('vid_end'),_0x51ab75));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x154713=>_0x154713['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x55bb7f,[,_0x27048a])=>{['vid_start','vid_end','vid']['includes'](_0x27048a)&&(_0x55bb7f['return']=!0x0,_0x55bb7f['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x147873=>{_0x147873['on']('attribute:vid',(_0x348b46,_0x55df4e,_0x530174)=>{if('\x20'!=_0x55df4e['item']['data']||_0x55df4e['item']['parent']['maxOffset']>0x1)return;if(!_0x530174['consumable']['consume'](_0x55df4e['item'],_0x348b46['name']))return;const _0x4819f5=_0x530174['writer'],_0x2d7151=_0x530174['mapper']['toViewRange'](_0x55df4e['range']);_0x4819f5['wrap'](_0x2d7151,_0x4819f5['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4ef685){const _0x4c5e21=_0x4ef685['plugins']['get']('RevisionViewer');return(_0x3b5f2f,_0x13481b,_0x201c74)=>{const _0x26af71=_0x13481b['markerName']['split'](':')[0x1],_0x5caf8e=_0x4c5e21['_getChangeFromId'](_0x26af71);if(!_0x5caf8e)return null;const _0x5fcb8a='add'==_0x5caf8e['type']?'split':'merge';if(!_0x201c74['consumable']['test'](_0x13481b['markerRange'],_0x3b5f2f['name']))return;const _0x1c4c35=_0x13481b['markerRange']['getWalker'](),_0x5e2c23=_0x13481b['markerRange']['start'],_0x418fd4=_0x4ef685['model']['schema'];let _0x464d6a=null,_0x54f27d=null,_0x3bffaf=!0x1,_0x51a99c=!0x1;for(const _0x65b454 of _0x1c4c35){const _0x3fbc09=_0x65b454['item'];_0x3bffaf=_0x3bffaf||_0x418fd4['isContent'](_0x3fbc09);const _0x17680f=_0x201c74['mapper']['toViewElement'](_0x3fbc09);if(_0x17680f&&_0x17680f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x65b454['type']&&(_0x418fd4['isBlock'](_0x3fbc09)&&!_0x418fd4['isLimit'](_0x3fbc09)&&(_0x3fbc09['nextSibling']||_0x5e2c23['isAtEnd']?_0x464d6a&&_0x464d6a['parent']==_0x3fbc09||(_0x464d6a=_0x3fbc09,_0x38c475(_0x65b454['previousPosition']),_0x51a99c=!0x0):_0x54f27d=_0x54f27d||_0x65b454['previousPosition']));}function _0x38c475(_0x1a486f){const _0x44c129=_0x201c74['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5fcb8a}),_0x361640=_0x201c74['mapper']['toViewPosition'](_0x1a486f);_0x5caf8e['data']['isSuggestion']&&_0x201c74['writer']['addClass']('ck-suggestion-marker-'+_0x5fcb8a+'-new',_0x44c129),_0x4c5e21['activeChange']==_0x5caf8e&&_0x201c74['writer']['addClass']('ck-suggestion-marker--active',_0x44c129),_0x201c74['writer']['insert'](_0x361640,_0x44c129),_0x201c74['mapper']['bindElementToMarker'](_0x44c129,_0x13481b['markerName']);}_0x3bffaf||_0x51a99c||!_0x54f27d||_0x38c475(_0x54f27d);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x233461,_0x354e18,_0x1412f4)=>{const _0x184303=_0x1412f4['mapper']['markerNameToElements'](_0x354e18['markerName']);if(_0x184303){for(const _0x5762ae of _0x184303)(_0x5762ae['hasClass']('ck-suggestion-marker-split')||_0x5762ae['hasClass']('ck-suggestion-marker-merge'))&&(_0x1412f4['mapper']['unbindElementFromMarkerName'](_0x5762ae,_0x354e18['markerName']),_0x1412f4['writer']['remove'](_0x5762ae));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4ddf7e,_0x2ddde9,_0x45ca80)=>{const _0xbe2a0e=_0x2ddde9['markerName']['split'](':')[0x1],_0x17ae49=this['_getChangeFromId'](_0xbe2a0e);if(!_0x17ae49)return null;const _0x405b84='add'==_0x17ae49['type']?'split':'merge';if(_0x45ca80['consumable']['test'](_0x2ddde9['markerRange'],_0x4ddf7e['name']))for(const _0x5802df of _0x2ddde9['markerRange']['getItems']()){if(!_0x5802df['is']('element','softBreak'))continue;const _0x3e643e=_0x45ca80['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x405b84}),_0x20f9bc=_0x45ca80['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5802df));_0x17ae49['data']['isSuggestion']&&_0x45ca80['writer']['addClass']('ck-suggestion-marker-'+_0x405b84+'-new',_0x3e643e),this['activeChange']==_0x17ae49&&_0x45ca80['writer']['addClass']('ck-suggestion-marker--active',_0x3e643e),_0x45ca80['writer']['insert'](_0x20f9bc,_0x3e643e),_0x45ca80['mapper']['bindElementToMarker'](_0x3e643e,_0x2ddde9['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4e6c9a=>{for(const _0x2f6cad of this['editor']['model']['document']['getRootNames']()){const _0x492795=this['editor']['model']['document']['getRoot'](_0x2f6cad),_0x1f7e81=this['editor']['editing']['view']['document']['getRoot'](_0x2f6cad);if(_0x1f7e81){const _0x32e86f=_0x492795['getAttribute']('revisionHistoryAttachChange');if(_0x4e6c9a['removeAttribute']('data-change-id',_0x1f7e81),_0x4e6c9a['removeClass']('ck-revision-history-root-add',_0x1f7e81),_0x4e6c9a['removeClass']('ck-revision-history-root-remove',_0x1f7e81),_0x4e6c9a['removeClass']('ck-revision-history-root--active',_0x1f7e81),_0x32e86f){const _0x1624dd=this['_getChangeFromId'](_0x32e86f);if(!_0x1624dd)return null;_0x4e6c9a['setAttribute']('data-change-id',_0x32e86f,_0x1f7e81),_0x4e6c9a['addClass']('ck-revision-history-root-'+_0x1624dd['type'],_0x1f7e81),this['activeChange']==_0x1624dd&&_0x4e6c9a['addClass']('ck-revision-history-root--active',_0x1f7e81);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x5a62e0=>'revision-comment:'+_0x5a62e0,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1c29d0=>'revision-suggestion:'+_0x1c29d0,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x17e8d4=>({'name':'suggestion:'+_0x17e8d4,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5e0a38=>{const _0x492f49=_0x5e0a38['markerName']['split'](':')[0x1];return'insertion'!=_0x492f49&&'deletion'!=_0x492f49?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x492f49]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x4f6569,_0x1c5607,_0x5a262e)=>{const _0x366ad9=_0x5a262e['mapper']['markerNameToElements'](_0x1c5607['markerName']);if(_0x366ad9){for(const _0x28161c of _0x366ad9)_0x28161c['is']('uiElement')&&(_0x5a262e['mapper']['unbindElementFromMarkerName'](_0x28161c,_0x1c5607['markerName']),_0x5a262e['writer']['remove'](_0x28161c));}},{'priority':'high'});}['_getChangeFromId'](_0x516bd6){return this['_changeIdToChange']['get'](_0x516bd6);}['_getViewForChange'](_0x1e224c){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x1e224c),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x3e9aa6,_0x2bbb65,_0x1a1c0f,_0x37fe40)=>{_0x37fe40&&this['_balloon']['remove'](_0x37fe40),_0x1a1c0f&&(this['_balloon']['add']({'view':_0x1a1c0f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x557df2=this['editor']['editing'],_0x55d994=this['_getChangeFromId'](_0x1a1c0f['changeId']);let _0x26d9ea;if(_0x55d994['data']['isOnRoot']){const _0x34ce03=_0x557df2['view']['getDomRoot'](_0x55d994['rootName']);_0x26d9ea=Array['from'](_0x34ce03['getClientRects']());}else{const _0x26ac99=this['editor']['model']['markers']['get']('revision:'+_0x1a1c0f['changeId']);_0x26d9ea=Array['from'](_0x557df2['mapper']['markerNameToElements'](_0x26ac99['name']))['map'](_0x1b7fae=>_0x557df2['view']['domConverter']['mapViewToDom'](_0x1b7fae))['map'](_0x20eb8b=>Array['from'](_0x20eb8b['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x26d9ea[0x0];return _0x26d9ea['find'](_0x6ee466=>_0x6ee466['top']-0x3<=this['_activeViewTarget']['y']&&_0x6ee466['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x6ee466['left']-0x3<=this['_activeViewTarget']['x']&&_0x6ee466['right']+0x3>=this['_activeViewTarget']['x'])||_0x26d9ea[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1096d0,_0x2c6d88,_0xbc8ac6,_0x2fc9ee)=>{this['activeView']=_0xbc8ac6?this['_getViewForChange'](_0xbc8ac6):null,this['editor']['model']['change'](()=>{const _0x2a2a6f=this['editor']['editing'];_0x2fc9ee&&(_0x2fc9ee['data']['isOnRoot']?_0x2a2a6f['view']['change'](_0x85714c=>{_0x85714c['removeClass']('ck-revision-history-root--active',_0x2a2a6f['view']['document']['getRoot'](_0x2fc9ee['rootName']));}):_0x2a2a6f['reconvertMarker']('revision:'+_0x2fc9ee['id'])),_0xbc8ac6&&(_0xbc8ac6['data']['isOnRoot']?_0x2a2a6f['view']['change'](_0x576f20=>{_0x576f20['addClass']('ck-revision-history-root--active',_0x2a2a6f['view']['document']['getRoot'](_0xbc8ac6['rootName']));}):_0x2a2a6f['reconvertMarker']('revision:'+_0xbc8ac6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x414585,_0x195d76)=>{if(this['activeChange'])return;const _0x330b32=this['_findChangeIdFromDomTarget'](_0x195d76['target']),_0x77f411=this['_changeIdToChange']['get'](_0x330b32);_0x77f411?(this['_activeViewTarget']={'x':_0x195d76['domEvent']['x'],'y':_0x195d76['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x77f411)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x151c33,_0x135dcf)=>{const _0x592ae0=this['_findChangeIdFromDomTarget'](_0x135dcf['target']),_0x4a7065=this['_changeIdToChange']['get'](_0x592ae0);_0x4a7065?(this['_activeViewTarget']={'x':_0x135dcf['domEvent']['x'],'y':_0x135dcf['domEvent']['y']},_0x4a7065===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x4a7065):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x51a42f){do{const _0x3b5358=_0x51a42f['getAttribute']('data-change-id');if(_0x3b5358)return _0x3b5358;_0x51a42f=_0x51a42f['parent'];}while(_0x51a42f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5a9b6a=>{for(const _0xf6eba2 of this['editor']['model']['markers'])_0x5a9b6a['removeMarker'](_0xf6eba2);});}}function _t(_0x33b276,_0x183f02){return(_0x154d12,_0x9c4f21,_0x5a839d)=>{if(!_0x5a839d['consumable']['test'](_0x9c4f21['markerRange'],_0x154d12['name']))return;const _0x2d2bab=_0x9c4f21['markerRange']['getWalker'](),_0x360a1c=_0x9c4f21['markerRange']['start'],_0x165a4a=_0x33b276['model']['schema'];let _0x3da140=null,_0x4d446a=null,_0x168d3e=!0x1,_0x2ba3eb=!0x1;for(const _0x3bac81 of _0x2d2bab){const _0x3eab76=_0x3bac81['item'];_0x168d3e=_0x168d3e||_0x165a4a['isContent'](_0x3eab76);const _0x1ec986=_0x5a839d['mapper']['toViewElement'](_0x3eab76);if(_0x1ec986&&_0x1ec986['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3bac81['type']&&(_0x165a4a['isBlock'](_0x3eab76)&&!_0x165a4a['isLimit'](_0x3eab76)&&(_0x3eab76['nextSibling']||_0x360a1c['isAtEnd']?_0x3da140&&_0x3da140['parent']==_0x3eab76||(_0x3da140=_0x3eab76,_0x14c8bf(_0x3bac81['previousPosition']),_0x2ba3eb=!0x0):_0x4d446a=_0x4d446a||_0x3bac81['previousPosition']));}function _0x14c8bf(_0x27b0a7){const _0xaa6158=_0x5a839d['mapper']['toViewPosition'](_0x27b0a7),_0x32c71e=_0x5a839d['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x183f02});_0x5a839d['writer']['insert'](_0xaa6158,_0x32c71e),_0x5a839d['mapper']['bindElementToMarker'](_0x32c71e,_0x9c4f21['markerName']);}_0x168d3e||_0x2ba3eb||!_0x4d446a||_0x14c8bf(_0x4d446a);};}class RestoreRevisionCommand extends _0x5bba97{constructor(_0x274e38){super(_0x274e38);const _0x1b1855=_0x274e38['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x1b1855,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1b1855,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5a3bc2=this['editor'],_0x15fd35=_0x5a3bc2['plugins']['get'](RevisionViewer),_0x3ceb8d=_0x15fd35['isReady']?_0x15fd35['diff']['newRevisionId']:null;_0x5a3bc2['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3ceb8d);}['refresh'](){const {isReady:_0x7bae4,isEnabled:_0xcaa085,repository:_0x464c79,diff:_0xbc3872}=this['editor']['plugins']['get'](RevisionViewer),_0x2915f0=_0xbc3872&&_0x464c79['getLaterVisibleRevision'](_0xbc3872['newRevisionId']);this['isEnabled']=_0x7bae4&&_0xcaa085&&Boolean(_0x2915f0);}}class ShowChangeCommand extends _0x5bba97{['_step'];constructor(_0xa5be2d,{direction:_0x44f5fb}){super(_0xa5be2d);const _0x1d5ef2=_0xa5be2d['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x44f5fb?0x1:-0x1,this['listenTo'](_0x1d5ef2,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d5ef2,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1d5ef2,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xcb0157=this['editor'],_0x336f82=_0xcb0157['plugins']['get'](RevisionViewer),{isNavigationMode:_0x8073a1,currentChangeNumber:_0x2f9fb9}=_0x336f82;let _0x113c35;if(_0x336f82['activeChange']=_0x8073a1?_0x336f82['diff']['changes']['get'](_0x2f9fb9+this['_step']):_0x336f82['diff']['changes']['first'],_0x336f82['activeChange']['data']['isOnRoot'])_0x113c35=_0xcb0157['editing']['view']['getDomRoot'](_0x336f82['activeChange']['rootName']);else{const _0x5eafa8=_0xcb0157['model']['markers']['get']('revision:'+_0x336f82['activeChange']['id']);_0x113c35=_0x1827f5(_0xcb0157['editing'],_0x5eafa8);}_0x1f3b6f({'target':_0x113c35,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x32a616,currentChangeNumber:_0x21bac1,numberOfChanges:_0x255db5,isReady:_0xbfe9ee,isEnabled:_0x27abb4}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x27abb4&&_0xbfe9ee&&_0x255db5)&&(!_0x32a616||(0x1===this['_step']?_0x21bac1<_0x255db5-0x1:_0x21bac1>0x0));}}class ChangesNavigationView extends _0x1d5c9d{constructor(_0x4b3c5c){super(_0x4b3c5c);const _0x4a6f3b=this['bindTemplate'],_0x481962=new _0x4e9658(_0x4b3c5c),_0x394ec5=new _0x4e9658(_0x4b3c5c);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',(_0x17b9b9,_0x20e8f0)=>_0x17b9b9&&_0x20e8f0>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1b014e,_0x18eb9e,_0x7fb9b0,_0x2ab323)=>{if(!_0x1b014e)return ft(_0x4b3c5c,'Loading...');if(!_0x7fb9b0)return ft(_0x4b3c5c,'No\x20changes');const _0x242b5c=ft(_0x4b3c5c,'NUMBER_OF_CHANGES',_0x7fb9b0);return _0x2ab323?ft(_0x4b3c5c,'X_OF_Y_CHANGES',[_0x18eb9e+0x1,_0x7fb9b0]):_0x242b5c;}),_0x481962['set']({'label':ft(_0x4b3c5c,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x284f98}),_0x394ec5['set']({'label':ft(_0x4b3c5c,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5976d2}),_0x481962['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x394ec5['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x481962['on']('execute',()=>this['fire']('execute','backward')),_0x394ec5['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',_0x4a6f3b['if']('_isStatusLabelVisible','ck-hidden',_0x39dc4b=>!_0x39dc4b)]},'children':[{'text':_0x4a6f3b['to']('isNavigationMode',_0x46b144=>_0x46b144?ft(_0x4b3c5c,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x4b3c5c,'Total')+':\x20')}]},{'text':_0x4a6f3b['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x481962,_0x394ec5]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x41f403{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1e163c=this['editor']['editing']['view'];_0x1e163c['change'](_0x4caa3d=>{for(const _0x35d92d of _0x1e163c['document']['roots'])_0x4caa3d['addClass'](yt,_0x35d92d);});}['hide'](){const _0x229e9a=this['editor']['editing']['view'];_0x229e9a['change'](_0x41bce0=>{for(const _0x32f22a of _0x229e9a['document']['roots'])_0x41bce0['removeClass'](yt,_0x32f22a);});}}class RevisionViewerUI extends _0x41f403{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x73fafd=this['editor'],_0x558857=_0x73fafd['plugins']['get'](RevisionViewer),_0x2ca01a=_0x73fafd['plugins']['get'](RevisionViewerLoadingOverlay);_0x73fafd['ui']['componentFactory']['add']('exitToEditing',_0x18ec09=>{const _0x49dfb1=new _0x4e9658(_0x18ec09);return _0x49dfb1['set']({'label':ft(_0x18ec09,'Back\x20to\x20editing'),'icon':_0x26b685,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x49dfb1,'execute',()=>{_0x73fafd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x49dfb1;}),_0x73fafd['ui']['componentFactory']['add']('restoreRevision',_0x1da2da=>{const _0x4cb3f6=new _0x4e9658(_0x1da2da);return _0x4cb3f6['set']({'label':ft(_0x1da2da,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4cb3f6['bind']('isEnabled')['to'](_0x73fafd['commands']['get']('restoreRevision')),this['listenTo'](_0x4cb3f6,'execute',()=>_0x73fafd['execute']('restoreRevision')),_0x4cb3f6;}),_0x73fafd['ui']['componentFactory']['add']('changesNavigation',_0x20a4a8=>{const _0x4120e7=new ChangesNavigationView(_0x20a4a8),_0x32a7c9=_0x73fafd['commands']['get']('showPreviousChange'),_0xf01be8=_0x73fafd['commands']['get']('showNextChange');return _0x4120e7['bind']('isBackwardNavigationEnabled')['to'](_0x32a7c9,'isEnabled'),_0x4120e7['bind']('isForwardNavigationEnabled')['to'](_0xf01be8,'isEnabled'),_0x4120e7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x558857),this['listenTo'](_0x4120e7,'execute',(_0x191622,_0x2a25c8)=>{_0x73fafd['execute']('forward'===_0x2a25c8?'showNextChange':'showPreviousChange');}),_0x4120e7;}),_0x2ca01a['show'](),_0x558857['on']('change:isReady',(_0x240162,_0x58bf85,_0xf3a652)=>{_0xf3a652?_0x2ca01a['hide']():_0x2ca01a['show']();});}}class RevisionNameView extends _0x5b487d{['_resizeObserver']=null;constructor(_0x554ab8,_0x2fa6d3){super(_0x554ab8,_0x2fa6d3);const _0x5ae292=this['bindTemplate'];this['set']({'label':ft(_0x554ab8,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x554ab8,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5ae292['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x938bc0(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x2a3480=this['fieldView']['element'];this['_tooltipString']=_0x2a3480['scrollWidth']>_0x2a3480['clientWidth']&&_0x2a3480['value']||'';}}class RevisionAuthorView extends _0x1d5c9d{constructor(_0xdaf5db,_0x4f672e,_0x86e4a8){super(_0xdaf5db);const _0x4accec=new nt();_0x4accec['set']({'content':_0x498d03,'viewBox':'0\x200\x2011\x2010'});const _0x5d1635=['ck','ck-revision-history-sidebar__revision-author'];_0x86e4a8&&_0x5d1635['push']('ck-revision-history-sidebar__revision-author_creator');const _0x136a74=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0xdaf5db,_0x86e4a8?'Revision\x20creator':'Revision\x20author')},'children':[_0x4accec,_0x4f672e['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x5d1635},'children':_0x136a74});}}function Rt(_0xb1e204,_0x5d07c2){const _0x381c5c=_0xb1e204['bindTemplate'],_0x5031ed=_0xb1e204['locale'],_0x4c98b6=_0x47df31(_0x5031ed);_0x4c98b6['panelPosition']='sw';const _0x383914=function(_0x271d4e,_0x566d07){const _0x3c927b=function(_0x4a5d74,_0x5b77ed){const _0x44bc24=_0x4a5d74['locale'],_0x25a58f={'Compare\x20against\x20selected':ft(_0x44bc24,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x44bc24,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x44bc24,'Restore\x20this\x20revision')};return _0x5b77ed['map'](_0x4d6c0f=>{const _0x2c9a49=_0x25a58f[_0x4d6c0f['name']];return _0x2c9a49&&_0x2c9a49!==_0x4d6c0f['name']&&(_0x4d6c0f['name']=_0x2c9a49),_0x4d6c0f;});}(_0x271d4e,_0x566d07),_0x5ab883=new _0x4ec909();for(const _0xf9ea67 of _0x3c927b){const _0x34e07e={'type':'button','model':new rt({'label':_0xf9ea67['name'],'class':_0xf9ea67['class'],'withText':!0x0,'role':'menuitem','_action':_0xf9ea67['action']})};_0x34e07e['model']['bind']('isEnabled')['to'](_0x271d4e,'isActionsDropdownOpen',_0x12abc2=>'function'!=typeof _0xf9ea67['isEnabled']||(!_0x12abc2||_0xf9ea67['isEnabled'](_0x271d4e))),_0x5ab883['add'](_0x34e07e);}return _0x5ab883;}(_0xb1e204,_0x5d07c2);return _0xb1e204['bind']('isActionsDropdownOpen')['to'](_0x4c98b6,'isOpen'),_0x4c98b6['buttonView']['set']({'label':ft(_0x5031ed,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x4836c2}),_0x4c98b6['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x381c5c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x381c5c['to'](_0x2ae93c=>_0x2ae93c['stopPropagation']())}}),_0x4c98b6['on']('execute',_0xebcf9c=>{_0xb1e204['isReady']&&'function'==typeof _0xebcf9c['source']['_action']&&_0xebcf9c['source']['_action'](_0xb1e204);}),ot(_0x4c98b6,_0x383914,{'role':'menu'}),_0x4c98b6['listenTo'](_0xb1e204,'change:isActionsDropdownOpen',(_0x45029e,_0x5c1694,_0xe6659f)=>{if(_0xe6659f)for(const _0x47b55c of _0x4c98b6['listView']['items']){const _0x130461=_0x47b55c['children']['first'],_0xca9476=_0x5d07c2['find'](_0x3831d6=>_0x3831d6['action']===_0x130461['_action'])['isVisible'];_0x47b55c['isVisible']=void 0x0===_0xca9476||_0xca9476(_0xb1e204);}}),_0x4c98b6;}class RevisionView extends/* #__PURE__ -- @preserve */
27
- _0x4def72(_0x1d5c9d){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1ebfce,_0x41f43a,_0x340af3,_0x20fc3e){super(_0x1ebfce);const _0xc57351=this['bindTemplate'],_0x706dbc=function(_0x445400,_0x44a851){const _0x1a6035=Array['from'](_0x44a851['authors'])['filter'](_0x68fe3e=>_0x68fe3e!=_0x44a851['creator']);return _0x44a851['creator']&&_0x1a6035['unshift'](_0x44a851['creator']),_0x1a6035['map'](_0x53aa64=>new RevisionAuthorView(_0x445400,_0x53aa64,_0x53aa64==_0x44a851['creator']));}(_0x1ebfce,_0x41f43a);this['id']=_0x41f43a['id'],this['_revision']=_0x41f43a,this['_requireRevisionName']=_0x20fc3e,this['bind']('name','createdAt')['to'](_0x41f43a),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x30d4cc=>{return _0x576009=_0x1ebfce['uiLanguage'],(_0x4b932a=_0x30d4cc)['toLocaleDateString'](_0x576009,{'month':'long','day':'numeric'})+',\x20'+_0x4b932a['toLocaleTimeString'](_0x576009,{'hour':'numeric','minute':'numeric'});var _0x576009,_0x4b932a;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x1ebfce,_0x58f4b5),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x305585=>_0x305585||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0xb4e3b0,_0xe1ff74)=>_0xb4e3b0&&_0xe1ff74),this['revisionActionsView']=_0x340af3&&_0x340af3['length']?Rt(this,_0x340af3):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xc57351['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xc57351['if']('isEnabled','ck-disabled',_0x1ff437=>!_0x1ff437),_0xc57351['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xc57351['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xc57351['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':_0xc57351['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':_0x706dbc}]},this['revisionActionsView']],'on':{'click':_0xc57351['to'](_0x212b59=>{_0x212b59['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x17abcc=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x17abcc,'change',()=>{this['_requireRevisionName']&&!_0x17abcc['value']||this['fire']('setName',{'id':this['id'],'name':_0x17abcc['value']}),_0x17abcc['value']||(_0x17abcc['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x19e6eb,_0x406889){const _0x5b5a3c=vt['fromJSDate'](_0x19e6eb)['setLocale'](_0x406889),_0x5f0100=vt['local'](),_0x469baf=_0x5f0100['minus']({'days':0x1})['startOf']('day');let _0x4e88f9,_0x5c0dbd;return _0x5b5a3c['hasSame'](_0x5f0100,'day')?(_0x4e88f9=_0x5b5a3c['startOf']('day')['toJSDate'](),_0x5c0dbd=_0x5b5a3c['toRelativeCalendar']()):_0x5b5a3c['hasSame'](_0x469baf,'day')?(_0x4e88f9=_0x469baf['toJSDate'](),_0x5c0dbd=_0x5b5a3c['toRelativeCalendar']()):_0x5b5a3c['hasSame'](_0x5f0100,'week')?(_0x4e88f9=_0x5b5a3c['startOf']('week')['toJSDate'](),_0x5c0dbd=_0x5b5a3c['weekdayLong']||''):_0x5b5a3c['hasSame'](_0x5f0100,'year')?(_0x4e88f9=_0x5b5a3c['startOf']('month')['toJSDate'](),_0x5c0dbd=_0x5b5a3c['monthLong']||''):(_0x4e88f9=_0x5b5a3c['startOf']('year')['toJSDate'](),_0x5c0dbd=String(_0x5b5a3c['year'])),{'startDate':_0x4e88f9,'localizedPeriodName':_0x5c0dbd};}class RevisionsSidebarTimePeriodView extends _0x1d5c9d{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x318ea5,_0x488c02,_0x1f516c,_0x28bf70){super(_0x318ea5);const _0x28bffe=bt(_0x488c02,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x488c02,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1f516c,this['_requireRevisionName']=_0x28bf70,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':_0x28bffe}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2dc1d3){const _0x1d6254=new RevisionView(this['locale'],_0x2dc1d3,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1d6254);}['removeRevision'](_0x122490){const _0x254f81=this['revisionViews']['find'](_0x4a06e5=>_0x4a06e5['id']===_0x122490['id']);this['revisionViews']['remove'](_0x254f81);}}class RevisionsSidebarHeaderView extends _0x1d5c9d{constructor(_0x4d6364){super(_0x4d6364);const _0x36026c=new nt();_0x36026c['content']=_0x4718bb,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x36026c,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x4d6364,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x1d5c9d{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x23298d,_0x1a1296,_0x18ca20,_0xae41d6){super(_0x23298d);const _0x163670=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1a1296,this['_revisionActions']=_0x18ca20,this['_requireRevisionName']=_0xae41d6,this['on']('select',(_0x2606e0,_0x4fd958)=>{this['fire']('revisionSelected',_0x4fd958);}),this['on']('setName',(_0xead834,_0x2856c2)=>{this['fire']('revisionSetName',_0x2856c2);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x23298d),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x163670['if']('isEnabled','ck-disabled',_0x4d62b2=>!_0x4d62b2)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x35a9bf of this['_revisions'])this['_addRevision'](_0x35a9bf);this['_revisions']['on']('add',(_0x32f5df,_0x1495bf)=>{this['_addRevision'](_0x1495bf);}),this['_revisions']['on']('remove',(_0x43a5ba,_0x3b1e91)=>{this['_removeRevision'](_0x3b1e91);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0xfbf8b3=>_0xfbf8b3['revisionViews']['map'](_0xa914ee=>_0xa914ee))['flat']();}['selectRevision'](_0x48f1fd){for(const _0x8d6e8e of this['revisionViews'])_0x48f1fd&&_0x48f1fd['id']===_0x8d6e8e['id']?_0x8d6e8e['select']():_0x8d6e8e['deselect']();}['highlightRevisions'](_0x5cb9c0){for(const _0x513749 of this['revisionViews'])_0x5cb9c0['some'](({id:_0x3b1632})=>_0x3b1632===_0x513749['id'])?_0x513749['highlight']():_0x513749['unhighlight']();}['_addRevision'](_0x2a3483){const _0x3406ad=bt(_0x2a3483['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5bd82b=this['_getTimePeriodViewByStartDate'](_0x3406ad);_0x5bd82b||(_0x5bd82b=new RevisionsSidebarTimePeriodView(this['locale'],_0x3406ad,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5bd82b)),_0x5bd82b['addRevision'](_0x2a3483);}['_removeRevision'](_0x163782){const _0x50dae9=bt(_0x163782['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x50dae9)['removeRevision'](_0x163782);}['_getTimePeriodViewByStartDate'](_0xcd4bd8){return this['timePeriodViews']['find'](_0x235f1d=>_0x235f1d['startDate']['getTime']()===_0xcd4bd8['getTime']());}}class RevisionsSidebar extends _0x41f403{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x4cbe68,uid as _0x55087c,Collection as _0x12a0e4,logWarning as _0x3748bd,FocusTracker as _0x22ee29,KeystrokeHandler as _0x2862f7,scrollViewportToShowTarget as _0x17cc9f,ResizeObserver as _0x122c77,ElementReplacer as _0x1af71a,CKEditorError as _0x1f5a5b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x527a66,set as _0x19e1e7,unset as _0x1fc4f8,isEqual as _0x3a917e}from'es-toolkit/compat';import{Plugin as _0x18ed42,PendingActions as _0x579023,Command as _0x25b174,ElementApiMixin as _0x443cf2,Editor as _0x2c191d}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x4c4887,getMarkerDomElement as _0x1d3e7d,ConfirmMixin as _0x34dc84,sanitizeEditorConfig as _0x554e49}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x27685d,ViewAttributeElement as _0x572198,ViewEmptyElement as _0x8b642d,ViewRawElement as _0x1845d7,ViewUIElement as _0x474da6,ViewDocumentFragment as _0x3e2908,ViewText as _0x1712b5,ViewElement as _0x19d66d,ModelElement as _0x45e0a6,ModelRange as _0x8a4273,ModelPosition as _0x4e4050,ModelDocumentFragment as _0x34f38e,ModelText as _0x541a0c}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x432461,IconChevronUp as _0x396732,IconChevronDown as _0x3e48c0,IconUndo as _0x54f965,IconUser as _0x580980,IconThreeVerticalDots as _0x131dec}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x469ec1,View as _0x39c569,submitHandler as _0x9ecd07,LabeledFieldView as _0x321730,createLabeledInputText as _0x212138,createDropdown as _0x38d1cc,ListView as _0x249276,ListItemView as _0x14e979,ButtonView as _0x3296a8,MenuBarMenuView as _0x3839a1,MenuBarMenuListView as _0x4a0a8e,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
24
+ _0x4cbe68(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x21f77e){super(),this['id']=_0x21f77e['id']||_0x55087c(),this['creator']=_0x21f77e['creator']||null,this['authors']=_0x21f77e['authors']||[],this['diffData']=_0x21f77e['diffData']||null,this['toVersion']=_0x21f77e['toVersion']||0x0,this['fromVersion']=_0x21f77e['fromVersion']||0x0,this['set']('name',_0x21f77e['name']||''),this['set']('createdAt',_0x21f77e['createdAt']||new Date()),this['set']('attributes',_0x21f77e['attributes']||{});}['setName'](_0x5c8e38){this['_update']({'name':_0x5c8e38});}['setAttribute'](_0x1d7f11,_0x40ae8d){const _0x55fa19=_0x527a66(this['attributes']);_0x19e1e7(_0x55fa19,_0x1d7f11,_0x40ae8d),this['_update']({'attributes':_0x55fa19});}['removeAttribute'](_0x430546){const _0x31cc29=_0x527a66(this['attributes']);_0x1fc4f8(_0x31cc29,_0x430546),this['_update']({'attributes':_0x31cc29});}['_update'](_0xa00809,_0x2906e5=!0x1){let _0x130b4b=!0x1;const _0x41efd5={'id':this['id']},_0x506259=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4bb097 of _0x506259){const _0x401272=_0xa00809[_0x4bb097];void 0x0!==_0x401272&&_0x401272!==this[_0x4bb097]&&(this[_0x4bb097]=_0x401272,_0x41efd5[_0x4bb097]=_0x401272,_0x130b4b=!0x0);}_0x130b4b&&(_0x41efd5['authors']&&(_0x41efd5['authorsIds']=_0x41efd5['authors']['map'](_0xcc67df=>_0xcc67df['id']),delete _0x41efd5['authors']),this['fire']('_update',_0x41efd5,_0x2906e5));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4b1968=>_0x4b1968['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x18ed42{['_revisions'];static get['requires'](){return[_0x4c4887];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x20b87b){super(_0x20b87b),this['_revisions']=new _0x12a0e4();}['afterInit'](){!async function(_0x5165bc){const _0x498677=_0x5d1c7d([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0xaca41c=0xeb829,_0x440da4=0x359e09b0,_0x481ac3=0x35998208^_0x440da4,_0x8bb4ad=window[_0x5d1c7d([0x44,0x61,0x74,0x65])][_0x5d1c7d([0x6e,0x6f,0x77])](),_0x43c3f7=_0x5165bc[_0x5d1c7d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2b70d4=new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x61a5da=>{_0x43c3f7[_0x5d1c7d([0x6f,0x6e,0x63,0x65])](_0x5d1c7d([0x72,0x65,0x61,0x64,0x79]),_0x61a5da);}),_0x497bae={[_0x5d1c7d([0x6b,0x74,0x79])]:_0x5d1c7d([0x45,0x43]),[_0x5d1c7d([0x75,0x73,0x65])]:_0x5d1c7d([0x73,0x69,0x67]),[_0x5d1c7d([0x63,0x72,0x76])]:_0x5d1c7d([0x50,0x2d,0x32,0x35,0x36]),[_0x5d1c7d([0x78])]:_0x5d1c7d([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]),[_0x5d1c7d([0x79])]:_0x5d1c7d([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]),[_0x5d1c7d([0x61,0x6c,0x67])]:_0x5d1c7d([0x45,0x53,0x32,0x35,0x36])},_0x2b73ae=_0x43c3f7[_0x5d1c7d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5d1c7d([0x67,0x65,0x74])](_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x11bf19(){let _0x548977,_0x2f5160=null,_0x2e1c4a=null;try{if(_0x2b73ae==_0x5d1c7d([0x47,0x50,0x4c]))return _0x5d1c7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x548977=_0x272516(),!_0x548977)return _0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x548977[_0x5d1c7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2e1c4a=_0x2c4678(_0x548977[_0x5d1c7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x548977[_0x5d1c7d([0x6a,0x74,0x69])])),await _0x1da2ea()?_0x3cb106()?_0xe45512()?_0x5d1c7d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5781a4()?(_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5d1c7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2f5160=_0x852988(_0x5d1c7d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x420fca()):_0x5d1c7d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5d1c7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xe45512(){const _0x5783f9=[_0x5d1c7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5d1c7d([0x74,0x72,0x69,0x61,0x6c])][_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x8bb4ad/0x3e8:0xe10*_0x481ac3;return _0x548977[_0x5d1c7d([0x65,0x78,0x70])]<_0x5783f9;}function _0x3cb106(){const _0x1aec8f=_0x548977[_0x5d1c7d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1aec8f)return!0x1;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x2a])))return!0x0;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x52,0x48])))return!0x0;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x52,0x52,0x48]))){if(_0x132679())return!0x0;if(_0x4cfeb2()||_0x3a4c3a())return!0x0;}return!0x1;}function _0x5781a4(){const _0x17740e=_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x17740e||0x0==_0x17740e[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x21fb9b}=new URL(window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x17740e[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x21fb9b))return!0x0;const _0x27ff75=_0x21fb9b[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e]));return _0x17740e[_0x5d1c7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12d628=>_0x12d628[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x2a])))[_0x5d1c7d([0x6d,0x61,0x70])](_0x5b3ca2=>_0x5b3ca2[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e])))[_0x5d1c7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fa4a9=>_0x1fa4a9[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x27ff75[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5d1c7d([0x6d,0x61,0x70])](_0xb70fe=>Array(_0x27ff75[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xb70fe[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5d1c7d([0x66,0x69,0x6c,0x6c])](_0xb70fe[0x0]===_0x5d1c7d([0x2a])?_0x5d1c7d([0x2a]):'')[_0x5d1c7d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xb70fe))[_0x5d1c7d([0x73,0x6f,0x6d,0x65])](_0x7694e9=>_0x27ff75[_0x5d1c7d([0x65,0x76,0x65,0x72,0x79])]((_0x3b0aa3,_0x1787b4)=>_0x7694e9[_0x1787b4]===_0x3b0aa3||_0x7694e9[_0x1787b4]===_0x5d1c7d([0x2a])));}function _0x420fca(){return _0x2f5160&&_0x2e1c4a?new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x45c921,_0x30aae9)=>{_0x2f5160[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x45c921,_0x30aae9),_0x2e1c4a[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x5ebf6e=>{_0x5ebf6e!=_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])&&_0x45c921(_0x5ebf6e);},_0x30aae9);}):_0x2f5160||_0x2e1c4a||_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2c4678(_0x8d0dfb,_0x4a76b7){return new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5bf62a=>{if(_0x2d485c())return _0x5bf62a(_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]));_0x396914(),_0x43c3f7[_0x5d1c7d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x244890=!0x1;const _0x363ddd=_0x55087c();function _0x4a789d(_0xfa7733){return!!_0xfa7733&&(typeof _0xfa7733===_0x5d1c7d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xfa7733===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xfa7733[_0x5d1c7d([0x74,0x68,0x65,0x6e])]===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xfa7733[_0x5d1c7d([0x63,0x61,0x74,0x63,0x68])]===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x439f3a(_0xdc9052){_0x2ae6ab(_0xdc9052)[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x4aa718=>{if(!_0x4aa718||_0x4aa718[_0x5d1c7d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5d1c7d([0x6f,0x6b]))return _0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x36dd10(_0x542649(_0x363ddd+_0x4a76b7))!=_0x4aa718[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]);})[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x442d2b=>(_0x3ea0d4(),_0x442d2b),()=>{const _0x3407f4=_0x57af19();return null==_0x3407f4?(_0x3ea0d4(),_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])):_0x5d1c7d(_0x8bb4ad-_0x3407f4>(0x11928db0^_0x440da4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x5bf62a)[_0x5d1c7d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4f8f6e=0x35a8e730^_0x440da4;function _0x3ea0d4(){const _0x34c8cb=_0x5d1c7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x36dd10(_0x542649(_0x8d0dfb)),_0x59ab01=_0x420fcb(_0x36dd10(window[_0x5d1c7d([0x4d,0x61,0x74,0x68])][_0x5d1c7d([0x63,0x65,0x69,0x6c])](_0x8bb4ad/_0x4f8f6e)));window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5d1c7d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x34c8cb,_0x59ab01);}function _0x57af19(){const _0x2bd889=_0x5d1c7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x36dd10(_0x542649(_0x8d0dfb)),_0x227ba6=window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5d1c7d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2bd889);return _0x227ba6?window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x420fcb(_0x227ba6),0x10)*_0x4f8f6e:null;}function _0x2ae6ab(_0x5e17f9){return new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x438199,_0x4d839e)=>{_0x5e17f9[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x438199,_0x4d839e),window[_0x5d1c7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4d839e,0x359fdd70^_0x440da4);});}}_0x43c3f7[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3f87db,_0x4f5780)=>{if(_0x4f5780[0x0]!=_0x8d0dfb)return _0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4f5780[0x1]={..._0x4f5780[0x1],[_0x5d1c7d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x363ddd};},{[_0x5d1c7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5d1c7d([0x68,0x69,0x67,0x68])}),_0x43c3f7[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58738e=>{_0x4a789d(_0x58738e[_0x5d1c7d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x244890=!0x0,_0x439f3a(_0x58738e[_0x5d1c7d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5d1c7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5d1c7d([0x6c,0x6f,0x77])}),_0x2b70d4[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>{_0x244890||_0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2d485c(){return _0x43c3f7[_0x5d1c7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d1c7d([0x76,0x69,0x65,0x77])][_0x5d1c7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5d1c7d([0x61,0x75,0x74,0x6f]);}function _0x396914(){_0x43c3f7[_0x5d1c7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d1c7d([0x76,0x69,0x65,0x77])][_0x5d1c7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5d1c7d([0x61,0x75,0x74,0x6f]);}}function _0x852988(_0x3eab18){const _0x24d2a2=[new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f7714=>setTimeout(_0x2f7714,0x3597377c^_0x440da4)),_0x2b70d4[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12af0d=>{const _0x765392=0x359e09b7^_0x440da4,_0x1aeb1a=_0x5165bc[_0x5d1c7d([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x20683c(){_0x1aeb1a[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x765392&&_0x12af0d();}_0x20683c(),_0x1aeb1a[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x61,0x64,0x64]),_0x20683c);})),new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x412aaf=>{function _0x49054a(){for(const _0x58f675 in window)if(window[_0x5d1c7d([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5d1c7d([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x58f675))&&window[_0x58f675]==_0xaca41c)return _0x412aaf();_0x43c3f7[_0x5d1c7d([0x73,0x74,0x61,0x74,0x65])]!=_0x5d1c7d([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5d1c7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x49054a,0x359e1a38^_0x440da4);}_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x49054a();})];return window[_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5d1c7d([0x72,0x61,0x63,0x65])](_0x24d2a2)[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>_0x3eab18);}async function _0x281f07(){if(await _0x2b70d4,_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x897501=_0x5165bc[_0x5d1c7d([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x453e79=_0x5165bc[_0x5d1c7d([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])](_0x897501[_0x5d1c7d([0x69,0x64])]),_0x5d1438=_0x15c307(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x5d1438[_0x5d1c7d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x897501['id'],_0x453e79?_0x453e79['id']:null,!0x0),_0x5d1438[_0x5d1c7d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5d1438[_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5d1438[_0x5d1c7d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3f4413,void(_0x5d1438[_0x5d1c7d([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3f4413);}if(_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x51125f=_0x15c307(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x51125f[_0x5d1c7d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x51125f[_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x51125f[_0x5d1c7d([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3f4413,_0x51125f[_0x5d1c7d([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3f4413;}_0x43c3f7[_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1c7d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3f4413,_0x43c3f7[_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1c7d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3f4413,_0x43c3f7[_0x5d1c7d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x132679(){return _0x1e2a84(_0x5d1c7d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x15c307(_0x5d1c7d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5d1c7d([0x73,0x74,0x61,0x74,0x65])]==_0x5d1c7d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4cfeb2(){return _0x1e2a84(_0x5d1c7d([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 _0x3a4c3a(){return _0x1e2a84(_0x5d1c7d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x217e6b(_0x4e7d0d){const _0x4fe9f1=_0x1f1b2f();_0x43c3f7[_0x4fe9f1]=_0x5d1c7d([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])+_0x4e7d0d,_0x4e7d0d[_0x5d1c7d([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5d1c7d([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x1f1b2f()]=_0xaca41c),_0x4e7d0d!=_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])&&_0x281f07();}function _0x1f1b2f(){const _0x40e340=window[_0x5d1c7d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5d1c7d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5d1c7d([0x6e,0x6f,0x77])]())[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5d1c7d([0x2e]),'');let _0x596b77=_0x5d1c7d([0x76]);for(let _0x3d1f13=0x0;_0x3d1f13<_0x40e340[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d1f13+=0x2){let _0x5cd666=window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x40e340[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d1f13,_0x3d1f13+0x2));_0x5cd666>=_0x498677[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5cd666-=_0x498677[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x596b77+=_0x498677[_0x5cd666];}return _0x596b77;}function _0x272516(){const _0x576d4c=_0x2b73ae[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e]));if(0x3!=_0x576d4c[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x23cd7a(_0x576d4c[0x1]);function _0x23cd7a(_0x178ea4){const _0xc3e90d=_0x4beae0(_0x178ea4);return _0xc3e90d&&_0x662e2e()?_0xc3e90d:null;function _0x662e2e(){const _0x1b4fca=_0xc3e90d[_0x5d1c7d([0x6a,0x74,0x69])],_0x10bf40=window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b4fca[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b4fca[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3c984c={..._0xc3e90d,[_0x5d1c7d([0x6a,0x74,0x69])]:_0x1b4fca[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b4fca[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3c984c[_0x5d1c7d([0x76,0x63])],_0x542649(_0x3c984c)==_0x10bf40;}}}async function _0x1da2ea(){let _0x2479ff=!0x0;try{const _0x2e074e=_0x2b73ae[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e])),[_0x55bbbd,_0x4654d5,_0x79e3d5]=_0x2e074e;return _0x266f3d(_0x55bbbd),await _0x22a50d(_0x55bbbd,_0x4654d5,_0x79e3d5),_0x2479ff;}catch{return!0x1;}function _0x266f3d(_0x1c04fc){const _0x31bcbd=_0x4beae0(_0x1c04fc);_0x31bcbd&&_0x31bcbd[_0x5d1c7d([0x61,0x6c,0x67])]==_0x5d1c7d([0x45,0x53,0x32,0x35,0x36])||(_0x2479ff=!0x1);}async function _0x22a50d(_0x4aa730,_0x13777a,_0x152673){const _0x8a2474=window[_0x5d1c7d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5d1c7d([0x66,0x72,0x6f,0x6d])](_0x2776cb(_0x152673),_0x2a8947=>_0x2a8947[_0x5d1c7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3c228a=new window[(_0x5d1c7d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5d1c7d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4aa730+_0x5d1c7d([0x2e])+_0x13777a),_0x40bbe0=window[_0x5d1c7d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5d1c7d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x40bbe0)return;const _0x57a183=await _0x40bbe0[_0x5d1c7d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5d1c7d([0x6a,0x77,0x6b]),_0x497bae,{[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x45,0x43,0x44,0x53,0x41]),[_0x5d1c7d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5d1c7d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x40bbe0[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x45,0x43,0x44,0x53,0x41]),[_0x5d1c7d([0x68,0x61,0x73,0x68])]:{[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x57a183,_0x8a2474,_0x3c228a)||(_0x2479ff=!0x1);}}function _0x4beae0(_0x3e2b01){return _0x3e2b01[_0x5d1c7d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5d1c7d([0x65,0x79]))?JSON[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65])](_0x2776cb(_0x3e2b01)):null;}function _0x2776cb(_0x2aefb4){return window[_0x5d1c7d([0x61,0x74,0x6f,0x62])](_0x2aefb4[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5d1c7d([0x2b]))[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5d1c7d([0x2f])));}function _0x542649(_0x430b14){let _0x16832e=0x1505;function _0x2dcae5(_0x5bbe47){for(let _0x358c5f=0x0;_0x358c5f<_0x5bbe47[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x358c5f++){const _0x48a210=_0x5bbe47[_0x5d1c7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x358c5f);_0x16832e=(_0x16832e<<0x5)+_0x16832e+_0x48a210,_0x16832e&=_0x16832e;}}function _0x2b2396(_0xeab79f){Array[_0x5d1c7d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xeab79f)?_0xeab79f[_0x5d1c7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2b2396):_0xeab79f&&typeof _0xeab79f==_0x5d1c7d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5d1c7d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xeab79f)[_0x5d1c7d([0x73,0x6f,0x72,0x74])]()[_0x5d1c7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x241c7d,_0x2a2681])=>{_0x2dcae5(_0x241c7d),_0x2b2396(_0x2a2681);}):_0x2dcae5(window[_0x5d1c7d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xeab79f));}return _0x2b2396(_0x430b14),_0x16832e>>>0x0;}function _0x36dd10(_0x10ebab){return _0x10ebab[_0x5d1c7d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5d1c7d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5d1c7d([0x30]));}function _0x420fcb(_0x19307d){return _0x19307d[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5d1c7d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5d1c7d([0x6a,0x6f,0x69,0x6e])]('');}function _0x1e2a84(_0x1b01c4){return _0x43c3f7[_0x5d1c7d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5d1c7d([0x68,0x61,0x73])](_0x1b01c4);}function _0x15c307(_0x33213d){return _0x43c3f7[_0x5d1c7d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5d1c7d([0x67,0x65,0x74])](_0x33213d);}function _0x3f4413(){}function _0x5d1c7d(_0x52031b){return _0x52031b['map'](_0x145d4a=>String['fromCharCode'](_0x145d4a))['join']('');}_0x217e6b(await _0x11bf19());}(this);}['createRevision'](_0x3c99c6){const _0x4d6c25=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x3c99c6['id'],'name':_0x3c99c6['name'],'creator':_0x3c99c6['creatorId']?_0x4d6c25['getUser'](_0x3c99c6['creatorId']):null,'diffData':_0x3c99c6['diffData']||_0x3c99c6['data'],'authors':_0x3c99c6['authorsIds']['map'](_0x3e7402=>_0x4d6c25['getUser'](_0x3e7402)),'createdAt':new Date(_0x3c99c6['createdAt']),'attributes':_0x3c99c6['attributes'],'fromVersion':_0x3c99c6['fromVersion'],'toVersion':_0x3c99c6['toVersion']});}['addRevision'](_0x308681,_0x170a01=0x0){this['_revisions']['add'](_0x308681,_0x170a01);}['getRevision'](_0x2a816c){return this['_revisions']['get'](_0x2a816c);}['getRevisions'](_0x5f5881={'toJSON':!0x1}){const _0x35252b=Array['from'](this['_revisions']);return _0x35252b['reverse'](),_0x5f5881['toJSON']?_0x35252b['map'](_0x5a1a57=>_0x5a1a57['toJSON']()):_0x35252b;}['getIndex'](_0x12b781){return this['_revisions']['getIndex'](_0x12b781);}['getEarlierVisibleRevision'](_0x3398ed){const [,_0x1e2a81]=this['getRevisionsIterator'](_0x3398ed,{'direction':'earlier'});return _0x1e2a81;}['getLaterVisibleRevision'](_0x37e42f){const [,_0x3e8bfe]=this['getRevisionsIterator'](_0x37e42f,{'direction':'later'});return _0x3e8bfe;}['getRevisionsInDiff'](_0x289cc4){const _0x1ec40d=[];for(const _0x2fe842 of this['getRevisionsIterator'](_0x289cc4['newRevisionId']))if(_0x1ec40d['push'](_0x2fe842),_0x2fe842['id']===_0x289cc4['oldRevisionId'])break;return _0x1ec40d;}*['getRevisionsIterator'](_0x39e6da,{direction:_0x5aa69d='earlier',filter:_0xfc6bb4=()=>!0x0}={}){const _0x11765c='earlier'===_0x5aa69d?0x1:-0x1;let _0x358374=this['_revisions']['get'](_0x39e6da),_0x46a8b8=this['getIndex'](_0x358374);for(yield _0x358374;_0x358374;){if(_0x46a8b8+=_0x11765c,_0x358374=this['getRevision'](_0x46a8b8),!_0x358374)return;_0xfc6bb4(_0x358374)&&(yield _0x358374);}}}class RevisionHistoryUtils extends _0x18ed42{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x27685d,'c'],[_0x572198,'a'],[_0x8b642d,'e'],[_0x1845d7,'r'],[_0x474da6,'u']]);['_typeCharToViewClass']=new Map([['c',_0x27685d],['a',_0x572198],['e',_0x8b642d],['r',_0x1845d7],['u',_0x474da6]]);async['loadRevisionData'](_0x157b09,_0x460831){if(_0x157b09['diffData']||!_0x460831)return;const _0x5e84a7=this['editor']['config']['get']('collaboration.channelId'),_0x395c5e=await _0x460831['getRevision']({'channelId':_0x5e84a7,'revisionId':_0x157b09['id']});_0x157b09['diffData']=_0x395c5e['diffData'];}['getRevisionDocumentData'](_0x41234e){const _0x45abd1={};for(const _0x3e2c13 in _0x41234e['diffData']){if(_0x41234e['diffData'][_0x3e2c13]['attachChange']&&!_0x41234e['diffData'][_0x3e2c13]['attachChange']['isAttached'])continue;const _0x13ccbb=this['_removeRevisionMarkers'](JSON['parse'](_0x41234e['diffData'][_0x3e2c13]['insertions'])),_0x3cee7c=this['editor']['editing']['view']['document'],_0x4600c2=new _0x3e2908(_0x3cee7c,_0x13ccbb['map'](_0x254663=>this['_getViewFromDiffObj'](_0x254663,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x45abd1[_0x3e2c13]=this['editor']['data']['processor']['toData'](_0x4600c2),this['editor']['data']['processor']['useFillerType']('default');}return _0x45abd1;}['getRevisionRootsAttributes'](_0x5a2bbb){const _0x3b6a3e={};for(const _0x4f6d43 in _0x5a2bbb['diffData'])_0x5a2bbb['diffData'][_0x4f6d43]['attachChange']&&!_0x5a2bbb['diffData'][_0x4f6d43]['attachChange']['isAttached']||(_0x3b6a3e[_0x4f6d43]=_0x5a2bbb['diffData'][_0x4f6d43]['attributesAfter']||{});return _0x3b6a3e;}['getRevisionRootsModelElements'](_0xd332a5){const _0x26959a={};for(const _0x148b92 in _0xd332a5['diffData']){if(_0xd332a5['diffData'][_0x148b92]['attachChange']&&!_0xd332a5['diffData'][_0x148b92]['attachChange']['isAttached'])continue;const _0x32056e=_0xd332a5['diffData'][_0x148b92]['rootElementName'];_0x32056e&&(_0x26959a[_0x148b92]=_0x32056e);}return _0x26959a;}['_getTypeCharForViewElement'](_0xd3b23d){return this['_viewClassToTypeChar']['get'](_0xd3b23d['constructor']);}['_getViewFromDiffObj'](_0x3de900,_0x257172){const _0x16d25b=this['editor']['editing']['view']['document'];if('string'==typeof _0x3de900)return new _0x1712b5(_0x16d25b,_0x3de900);{let _0x3374bf,_0x22df00;_0x22df00='u'==_0x3de900['type']||'r'==_0x3de900['type']?[]:_0x3de900['children']['map'](_0x3fd60a=>this['_getViewFromDiffObj'](_0x3fd60a,_0x257172));const _0x3876fc=this['_typeCharToViewClass']['get'](_0x3de900['type'])||_0x19d66d,_0x26773b=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x3374bf=new _0x3876fc(_0x16d25b,_0x3de900['name'],_0x3de900['attributes'],_0x22df00),'u'==_0x3de900['type']&&_0x3de900['children'][0x0]){const _0x185519=_0x3de900['children'][0x0];if(_0x3374bf['render']=function(_0x3f9418){const _0x20c5e7=_0x3f9418['createElement']('div');return _0x20c5e7['innerHTML']=_0x185519,_0x20c5e7['childNodes'][0x0];},_0x257172){const _0x2ecb0a=new _0x3e2908(_0x16d25b);_0x2ecb0a['_appendChild'](_0x3374bf);const _0x4a9942=Array['from'](_0x26773b['viewChildrenToDom'](_0x2ecb0a,{'bind':!0x1})),_0x2c6b16=_0x26773b['domDocument']['createElement']('div');_0x2c6b16['append'](..._0x4a9942),_0x3374bf=Array['from'](_0x26773b['domChildrenToView'](_0x2c6b16))[0x0];}}else{if('r'==_0x3de900['type']&&_0x3de900['children'][0x0]){const _0x3d86df=_0x3de900['children'][0x0];if(_0x3374bf['render']=function(_0x363998){_0x363998['innerHTML']=_0x3d86df;},_0x257172){const _0x20e7a8=new _0x3e2908(_0x16d25b);_0x20e7a8['_appendChild'](_0x3374bf);const _0x1bdd0d=Array['from'](_0x26773b['viewChildrenToDom'](_0x20e7a8,{'bind':!0x1})),_0x42e570=_0x26773b['domDocument']['createElement']('div');_0x42e570['append'](..._0x1bdd0d);const _0x2186d2=Array['from'](_0x26773b['domChildrenToView'](_0x42e570));_0x2186d2['length']>0x1?_0x3374bf['_appendChild'](_0x2186d2):_0x3374bf=_0x2186d2[0x0];}}}if(_0x3de900['customProperties']){for(const [_0x2d36fa,_0x3188ad]of _0x3de900['customProperties'])_0x3374bf['_setCustomProperty'](_0x2d36fa,_0x3188ad);}const _0x570b94=void 0x0===_0x3de900['fillerOffset']?null:_0x3de900['fillerOffset'];return null!==_0x570b94&&(_0x3374bf['getFillerOffset']=()=>_0x570b94),_0x3374bf;}}['_makeModelFromViewString'](_0x5cff82,_0x30d1fa){const _0x44bbd3=JSON['parse'](_0x5cff82),_0x39a170=this['editor']['editing']['view']['document'],_0x370ccb=new _0x3e2908(_0x39a170,_0x44bbd3['map'](_0x219a6f=>this['_getViewFromDiffObj'](_0x219a6f,!0x0))),_0x311715=this['editor']['data']['toModel'](_0x370ccb,_0x30d1fa);return _0x311715['name']=_0x30d1fa,_0x311715;}['_removeRevisionMarkers'](_0x53712b){return(_0x53712b=_0x53712b['filter'](_0x888bdd=>!_0x888bdd['name']||'revision-start'!==_0x888bdd['name']&&'revision-end'!==_0x888bdd['name']))['forEach'](_0x179fe6=>{'string'!=typeof _0x179fe6&&(_0x179fe6['children']=this['_removeRevisionMarkers'](_0x179fe6['children']),_0x179fe6['attributes']=_0x179fe6['attributes']['filter'](_0x2fe1a6=>!_0x2fe1a6[0x0]['startsWith']('data-revision-')));}),_0x53712b;}}function ft(_0x709d34,_0x2cc4f7,_0x3efdfa){const t=_0x709d34['t'];switch(_0x2cc4f7){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'},_0x3efdfa);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3efdfa);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x18ed42{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x4c4887,RevisionsRepository,RevisionHistoryUtils,_0x579023];}constructor(_0x3a32dc){super(_0x3a32dc),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x15fb1f=_0x55087c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x15fb1f},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x30c29a=this['repository']['getRevision'](0x0),_0x2ef144=_0x30c29a&&null===_0x30c29a['creator']?_0x30c29a:null;if(this['_continueCurrentRevision']=!!_0x2ef144&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x39f55c=this['_source']['getCurrentRevisionId'](),_0x2e9970=this['repository']['getRevision'](_0x39f55c);if(_0x2e9970)this['_startingVersion']=_0x2e9970['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x10d104=this['_source']['history']['_operations']['find'](_0x4cffb9=>!_0x4cffb9['_isInit']),_0x150c5b=_0x10d104?_0x10d104['baseVersion']:this['_source']['history']['version'];_0x30c29a?(_0x30c29a['toVersion']<_0x150c5b&&_0x30c29a['_update']({'toVersion':_0x150c5b}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id'],this['_startingVersion']=_0x2ef144['fromVersion']):(this['_startingVersion']=_0x30c29a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x150c5b,this['_continueCurrentRevision']=!0x1);}}else _0x2ef144&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2ef144['toVersion'],this['editor']['model']['document']['history']['version']),_0x2ef144['fromVersion']===_0x2ef144['toVersion']?(0x0!==_0x2ef144['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id'],this['_startingVersion']=_0x2ef144['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',_0x51a819=>!_0x51a819),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2d91b9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xdfbfcc;for(const _0x1f5950 in _0x2d91b9){const _0x40d39c=_0x1f5950,_0x4500c8=_0x2d91b9[_0x40d39c];if('revisionHistoryLicenseKeyValid'==_0x4500c8||'revisionHistoryLicenseKeyInvalid'==_0x4500c8||'revisionHistoryLicenseKeyExpired'==_0x4500c8||'revisionHistoryLicenseKeyDomainLimit'==_0x4500c8||'revisionHistoryLicenseKeyNotAllowed'==_0x4500c8||'revisionHistoryLicenseKeyEvaluationLimit'==_0x4500c8||'revisionHistoryLicenseKeyUsageLimit'==_0x4500c8){delete _0x2d91b9[_0x40d39c],_0xdfbfcc=_0x4500c8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x152db5=this['repository']['getRevision'](0x0),_0xc1236c=await this['getRevisionDocumentData'](_0x152db5),_0x35654e=await this['getRevisionRootsAttributes'](_0x152db5),_0x28e4f7=this['_utils']['getRevisionRootsModelElements'](_0x152db5);this['_replaceEditorDataWithRevisionData'](_0xc1236c,_0x35654e,_0x28e4f7);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2cbc94){this['_source']=_0x2cbc94;}async['update'](){const _0x4a9d85=await this['_source']['getLatestVersion']();if(_0x4a9d85>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1f5138=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4a9d85});_0x1f5138['authors']=_0x1f5138['authorsIds']['map'](_0x5e423=>this['editor']['plugins']['get']('Users')['getUser'](_0x5e423)),this['currentRevision']['_update'](_0x1f5138);}}async['saveRevision'](_0x552fc4={},_0x533394=null){const _0x5c0595=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x533394>this['currentRevision']['toVersion']&&(_0x533394=null),null===_0x533394&&(_0x533394=await this['_source']['getLatestVersion']());const _0x96e1b8=this['_getFromVersion'](_0x533394),_0xf0041d=this['buildRevisionData']({'from':_0x96e1b8,'to':_0x533394});if(this['currentRevision']['toVersion']<_0x533394){const _0x3216aa=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x533394,'to':_0x533394});_0x3216aa['authors']=[],_0x3216aa['authorsIds']=[],_0x3216aa['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3216aa,!0x0),delete _0x3216aa['authors'],_0x5c0595['push'](_0x3216aa);}_0x552fc4['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x552fc4['name']=_0x552fc4['name']||null,_0x552fc4['id']=_0x552fc4['id']||_0x55087c(),_0x552fc4={..._0x552fc4,..._0xf0041d};const _0x25d40c=this['addRevisionData'](_0x552fc4);_0x5c0595['push'](_0x552fc4);const _0x5a5678=this['repository']['getIndex'](_0x25d40c);if(0x0!==_0x5a5678){const _0x617128=this['repository']['getRevision'](_0x5a5678-0x1);if(_0x617128['fromVersion']!==_0x533394){const _0x15b1be=this['_revisionDataBuilder']['getData'](_0x533394,_0x617128['toVersion']),_0x2087a5={'id':_0x617128['id'],'diffData':_0x15b1be['diffData'],'authorsIds':_0x15b1be['authorsIds'],'authors':_0x15b1be['authorsIds']['map'](_0x1205ab=>this['editor']['plugins']['get']('Users')['getUser'](_0x1205ab)),'fromVersion':_0x533394};_0x617128===this['currentRevision']&&(_0x2087a5['createdAt']=new Date(_0x552fc4['createdAt']['getTime']()+0xa)),_0x617128['_update'](_0x2087a5,!0x0),delete _0x2087a5['authors'],_0x5c0595['push'](_0x2087a5);}}if(this['adapter']){for(const _0x4d6fb1 of _0x5c0595)this['_bufferUpdate'](_0x4d6fb1['id'],_0x4d6fb1,!0x0);this['sendBufferedUpdates']();}return _0x25d40c;}['addRevisionData'](_0x48737e){const _0x339849=this['repository']['createRevision'](_0x48737e);return this['adapter']&&_0x339849['on']('_update',(_0x1e0d86,_0x39f58e,_0x13c4b5)=>{_0x13c4b5||(this['_bufferUpdate'](_0x39f58e['id'],_0x39f58e,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x339849,this['_findInsertionIndex'](_0x339849)),_0x339849;}async['getRevisionDocumentData'](_0x532ee1){return await this['_utils']['loadRevisionData'](_0x532ee1,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x532ee1);}async['getRevisionRootsAttributes'](_0x309e4b){return await this['_utils']['loadRevisionData'](_0x309e4b,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x309e4b);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x15b574=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3895d8=0x0;_0x3895d8<_0x15b574['length'];_0x3895d8++){const _0x4db0b1=_0x15b574[_0x3895d8];let _0x17d22b=!0x1;for(const _0x4ce1da of Object['keys'](_0x4db0b1))void 0x0===_0x4db0b1[_0x4ce1da]?delete _0x4db0b1[_0x4ce1da]:'id'!==_0x4ce1da&&(_0x17d22b=!0x0);_0x17d22b||(_0x15b574[_0x3895d8]=null);}if(_0x15b574=_0x15b574['filter'](_0x54374a=>null!==_0x54374a),!_0x15b574['length'])return;for(let _0x1ab2ef=0x0;_0x1ab2ef<_0x15b574['length'];_0x1ab2ef++){const _0x13126f=_0x15b574[_0x1ab2ef];void 0x0!==_0x13126f['fromVersion']&&void 0x0===_0x13126f['toVersion']&&(_0x13126f['toVersion']=this['repository']['getRevision'](_0x13126f['id'])['toVersion']),void 0x0!==_0x13126f['toVersion']&&void 0x0===_0x13126f['fromVersion']&&(_0x13126f['fromVersion']=this['repository']['getRevision'](_0x13126f['id'])['fromVersion']);}const _0x465b00=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x15b574,_0x465b00)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x538f56=>{if(_0x538f56){for(const _0x3a64ee of _0x538f56)this['setRevisionData']({'id':_0x3a64ee['id'],'createdAt':_0x3a64ee['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x135d2a=null,from:_0x107130=null,to:_0x2220b8=null}){_0x107130=null!==_0x107130?_0x107130:_0x135d2a['fromVersion'],_0x2220b8=null!==_0x2220b8?_0x2220b8:_0x135d2a['toVersion'];const _0x3efb14=this['_revisionDataBuilder']['getData'](_0x107130,_0x2220b8),_0x250431={'diffData':_0x3efb14['diffData'],'authorsIds':_0x3efb14['authorsIds'],'fromVersion':_0x107130,'toVersion':_0x2220b8};if(!_0x135d2a||_0x2220b8!==_0x135d2a['toVersion']){const _0x118919=_0x2220b8-0x1,_0x386725=this['_source']['history']['getOperation'](_0x118919);_0x250431['createdAt']=_0x386725&&_0x386725['createdAt']||new Date();}if(this['_loadedStateData']&&_0x107130===this['_loadedStateData']['fromVersion']){for(const _0x27a731 of this['_loadedStateData']['authors'])_0x250431['authorsIds']['includes'](_0x27a731['id'])||_0x250431['authorsIds']['push'](_0x27a731['id']);}return _0x250431;}['_bufferUpdate'](_0x1a16b4,_0x20df9b,_0x50d1e3){if(this['_bufferedUpdates']['has'](_0x1a16b4)){const _0x10e6a1=this['_bufferedUpdates']['get'](_0x1a16b4);_0x20df9b=_0x50d1e3?{..._0x10e6a1,..._0x20df9b}:{..._0x20df9b,..._0x10e6a1};}this['_bufferedUpdates']['set'](_0x1a16b4,_0x20df9b);}['setRevisionData'](_0x3b70cc){const _0x52398b=this['repository']['getRevision'](_0x3b70cc['id']);if(_0x3b70cc['createdAt']&&(_0x3b70cc['createdAt']=new Date(_0x3b70cc['createdAt'])),_0x3b70cc['authorsIds']){const _0x1b557b=this['editor']['plugins']['get']('Users');_0x3b70cc['authors']=_0x3b70cc['authorsIds']['map'](_0x112338=>_0x1b557b['getUser'](_0x112338));}_0x52398b['_update'](_0x3b70cc,!0x0);}['_createInitialRevision'](_0x34218e){const _0x25603b=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x25603b)this['_initialRevisionId']=_0x25603b['id'];else{const _0x18431d=!this['editor']['model']['document']['roots']['find'](_0x54c31f=>this['editor']['model']['hasContent'](_0x54c31f)),_0x2b1c20=this['editor']['plugins']['get']('Users')['me']['id'],_0x42c5cf=ft(this['editor']['locale'],_0x18431d?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x34218e,'to':_0x34218e,'id':this['_initialRevisionId'],'name':_0x42c5cf,'creatorId':_0x2b1c20});}}['_createCurrentRevision'](_0x11efc5){const _0x378d70=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x378d70),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x11efc5,'to':_0x11efc5,'id':_0x378d70,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x10689b,_0x7ebf26,_0x1b569d){const _0x318fae={},_0x478e24={},_0x2ecb8c={},_0x2dc060=this['editor']['config']['get']('roots')||{};for(const [_0x4a460a,_0xb27904]of Object['entries'](_0x2dc060))_0xb27904['lazyLoad']||(_0x318fae[_0x4a460a]=_0xb27904['initialData']??'',_0x478e24[_0x4a460a]=_0xb27904['modelAttributes']||{},_0xb27904['modelElement']&&(_0x2ecb8c[_0x4a460a]=_0xb27904['modelElement']));for(const _0x14aa31 of this['editor']['model']['document']['getRootNames']())_0x318fae[_0x14aa31]??='',_0x478e24[_0x14aa31]??={};let _0x12b2da=!0x1;const _0x3f5c4e=Object['keys'](_0x318fae),_0x39b958=Object['keys'](_0x10689b);for(const _0x98a1cc of _0x3f5c4e){if(_0x318fae[_0x98a1cc]!==_0x10689b[_0x98a1cc]&&''!==_0x318fae[_0x98a1cc]['trim']()){_0x12b2da=!0x0;break;}if(!_0x3a917e(_0x478e24[_0x98a1cc],_0x7ebf26[_0x98a1cc])&&Object['keys'](_0x478e24[_0x98a1cc])['length']>0x0){_0x12b2da=!0x0;break;}const _0x583978=_0x2ecb8c[_0x98a1cc],_0x13fa25=_0x1b569d[_0x98a1cc];if(_0x583978&&_0x13fa25&&_0x583978!==_0x13fa25){_0x12b2da=!0x0;break;}}_0x12b2da||(_0x12b2da=_0x39b958['some'](_0xfaf16a=>!this['editor']['model']['document']['getRoot'](_0xfaf16a))),_0x12b2da&&_0x3748bd('editor-initial-data-replaced-with-revision-data',{'editorData':_0x318fae,'editorRootsAttributes':_0x478e24,'editorRootsModelElements':_0x2ecb8c,'revisionData':_0x10689b,'revisionRootsAttributes':_0x7ebf26,'revisionRootsModelElements':_0x1b569d});for(const [_0x57c6f4,_0xd9b48b]of Object['entries'](_0x10689b))this['editor']['config']['set']('roots.'+_0x57c6f4+'.initialData',_0xd9b48b);for(const [_0xf454db,_0x16d05e]of Object['entries'](_0x7ebf26))this['editor']['config']['set']('roots.'+_0xf454db+'.modelAttributes',_0x16d05e);const _0x35d009=this['editor']['model']['document'];for(const [_0x267a65,_0x2ecc01]of Object['entries'](_0x1b569d)){this['editor']['config']['set']('roots.'+_0x267a65+'.modelElement',_0x2ecc01);const _0x553ef4=_0x35d009['getRoot'](_0x267a65);_0x553ef4&&_0x553ef4['name']!==_0x2ecc01&&(_0x35d009['roots']['remove'](_0x267a65),_0x35d009['createRoot'](_0x2ecc01,_0x267a65));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1685e8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1685e8['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x30243a){const _0x2d2dc0=this['repository']['getRevisions']();_0x2d2dc0['reverse']();let _0x839a8c=0x0;for(;_0x839a8c<_0x2d2dc0['length'];){const _0x2f2ce3=_0x2d2dc0[_0x839a8c];if(_0x2f2ce3===this['currentRevision']){_0x839a8c++;continue;}if(_0x2f2ce3['id']===this['_initialRevisionId'])break;const _0xe1b7d9=_0x30243a['toVersion']-_0x2f2ce3['toVersion']||_0x30243a['fromVersion']-_0x2f2ce3['fromVersion'];if(_0xe1b7d9>0x0)break;if(_0xe1b7d9<0x0)_0x839a8c++;else{if(!_0x30243a['creator']&&_0x2f2ce3['creator'])break;if(_0x2f2ce3['creator']||!_0x30243a['creator']){if(_0x30243a['createdAt']>_0x2f2ce3['createdAt'])break;_0x839a8c++;}else _0x839a8c++;}}return _0x839a8c;}['_getFromVersion'](_0x2446af){const _0x32fdad=this['repository']['getRevisions']();_0x32fdad['reverse'](),_0x32fdad['shift']();const _0x2e32e6=_0x32fdad['find'](_0x2a0719=>_0x2a0719['toVersion']<=_0x2446af)['toVersion'];return _0x2e32e6<this['_startingVersion']?this['_startingVersion']:_0x2e32e6;}['_makeRevision']({name:_0x59410c,from:_0x5a6f52,to:_0x4a5605,creatorId:_0x32799a,id:_0x3beaeb}){const _0x540c35=this['buildRevisionData']({'from':_0x5a6f52,'to':_0x4a5605});_0x540c35['name']=_0x59410c,_0x540c35['creatorId']=_0x32799a,_0x540c35['id']=_0x3beaeb;const _0x3dde7f=this['addRevisionData'](_0x540c35);return this['adapter']&&this['_bufferUpdate'](_0x540c35['id'],_0x540c35,!0x0),_0x3dde7f;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1380ab){this['editor']=_0x1380ab,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'](_0x38f8ef){this['source']=_0x38f8ef;const _0xaf0038=new Map(),_0x33fc49=new Map(),_0x34c179=this['editor']['model']['document']['roots']['map'](_0x3d2345=>_0x3d2345['rootName']);for(const _0x3e10f0 of _0x34c179){const _0x196210=this['editor']['model']['document']['getRoot'](_0x3e10f0),_0x321bda=gt(_0x196210);_0xaf0038['set'](_0x3e10f0,_0x321bda),_0x33fc49['set'](_0x3e10f0,Object['fromEntries'](_0x196210['getAttributes']()));}const _0x5b467e=Array['from'](this['editor']['model']['markers'])['map'](_0x542721=>[_0x542721['name'],_0x542721['getRange']()]),_0x5499d5=this['source']['version'];this['_saveMetaData'](_0x5499d5,_0xaf0038,_0x5b467e,_0x33fc49),this['_startingRevisionId']=this['_revisionId'];const _0x4e38f1=new Map(),_0x546646=new Map();for(const _0x1cf9ee of _0x34c179){const _0x404320=wt(_0x1cf9ee,this['editor']['model']['document']['getRoot'](_0x1cf9ee)['name']);_0x4e38f1['set'](_0x1cf9ee,_0x404320),_0x546646['set'](_0x1cf9ee,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4e38f1,[],_0x546646);}['getData'](_0x129d90,_0x3cdd4){if(this['_lastFrom']===_0x129d90&&this['_lastTo']<=_0x3cdd4)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3cdd4,!0x0);else{if(!this['_savedMetaData']['has'](_0x129d90)){const _0x372ccd=this['_getPreviousFrom'](_0x129d90);this['_calculateMetaData'](_0x372ccd,_0x129d90,!0x1);}this['_calculateMetaData'](_0x129d90,_0x3cdd4,!0x0);}return this['_lastFrom']=_0x129d90,this['_lastTo']=_0x3cdd4,this['_getState']();}['loadState'](_0x938534){if(!this['_savedMetaData']['has'](_0x938534['fromVersion'])){const _0x5b9950=this['_getPreviousFrom'](_0x938534['fromVersion']);this['_calculateMetaData'](_0x5b9950,_0x938534['fromVersion'],!0x1);}this['_calculateMetaData'](_0x938534['fromVersion'],_0x938534['toVersion'],!0x1);const _0x252bab=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x938534['fromVersion'],this['_lastTo']=_0x938534['toVersion'];for(const _0x120965 in _0x938534['diffData']){const _0x4c68eb=_0x938534['diffData'][_0x120965]['attachChange'],_0x21a77a=_0x527a66(_0x938534['diffData'][_0x120965]['attributesBefore'])||{},_0x53fe3f=_0x938534['diffData'][_0x120965],_0x5a8490=_0x252bab['_makeModelFromViewString'](_0x53fe3f['deletions'],_0x53fe3f['rootElementName']||'$root');_0x5a8490['rootName']=_0x120965,_0x5a8490['_isAttached']=!_0x4c68eb||!_0x4c68eb['isAttached'],_0x5a8490['isAttached']=()=>_0x5a8490['_isAttached'],this['_baseRoots']['set'](_0x120965,_0x5a8490),this['_baseRootsAttributes']['set'](_0x120965,_0x21a77a),_0x4c68eb&&this['_touchedRoots']['set'](_0x120965,_0x4c68eb);const _0x3ebcde=this['_makeIdsRoot'](_0x5a8490);this['_baseIdsRoots']['set'](_0x120965,_0x3ebcde);for(const [_0x3e7577,_0x1dde51]of _0x5a8490['markers']){if(!_0x3e7577['startsWith']('revision:'))continue;const _0x2c3dbc=_0x3e7577['split'](':')[0x2];for(const _0x564a19 of _0x1dde51['getWalker']({'singleCharacters':!0x0})){const _0x3c5a4e=this['_getVidAttributeName'](_0x564a19),_0x3439d8='elementEnd'==_0x564a19['type']?_0x564a19['previousPosition']['path']['slice'](0x0,-0x1):_0x564a19['previousPosition']['path'],_0x34d62a=_0x3ebcde['getNodeByPath'](_0x3439d8)['getAttribute'](_0x3c5a4e);this['_touched']['set'](_0x34d62a,{'userId':_0x2c3dbc});}_0x5a8490['markers']['delete'](_0x3e7577);}}this['_startingRevisionId']=this['_revisionId'];const _0x798e06=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x30650b=>!this['_touched']['has'](_0x30650b));let _0x17890f=0x0;const _0x409067=new Map();for(const _0x2c8265 in _0x938534['diffData']){const _0x4c683d=_0x938534['diffData'][_0x2c8265]['attachChange'],_0x46743b=_0x527a66(_0x938534['diffData'][_0x2c8265]['attributesAfter'])||{},_0x165430=_0x938534['diffData'][_0x2c8265],_0x215b84=_0x252bab['_makeModelFromViewString'](_0x165430['insertions'],_0x165430['rootElementName']||'$root');_0x215b84['rootName']=_0x2c8265,_0x215b84['_isAttached']=!_0x4c683d||_0x4c683d['isAttached'],_0x215b84['isAttached']=()=>_0x215b84['_isAttached'],this['_diffRoots']['set'](_0x2c8265,_0x215b84),this['_diffRootsAttributes']['set'](_0x2c8265,_0x46743b);const _0x5bfd6e=this['_makeIdsRoot'](_0x215b84,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2c8265,_0x5bfd6e),_0x409067['set'](_0x2c8265,_0x215b84['isAttached']()?_0x46743b:{});for(const [_0x5bebd2,_0x2c6c00]of _0x215b84['markers']){if(!_0x5bebd2['startsWith']('revision:'))continue;const _0x3f8ed2=_0x5bebd2['split'](':')[0x2];for(const _0x920456 of _0x2c6c00['getWalker']({'singleCharacters':!0x0})){const _0x1c402a=this['_getVidAttributeName'](_0x920456),_0x41d4fe=this['_revisionId']++,_0x48743f='elementEnd'==_0x920456['type']?_0x920456['previousPosition']['path']['slice'](0x0,-0x1):_0x920456['previousPosition']['path'];_0x5bfd6e['getNodeByPath'](_0x48743f)['_setAttribute'](_0x1c402a,_0x41d4fe),this['_touched']['set'](_0x41d4fe,{'userId':_0x3f8ed2});}_0x215b84['markers']['delete'](_0x5bebd2);}for(const _0x323c20 of this['editor']['model']['createRangeIn'](_0x215b84)['getWalker']({'singleCharacters':!0x0})){const _0x3199e7=this['_getVidAttributeName'](_0x323c20),_0xc8a834='elementEnd'==_0x323c20['type']?_0x323c20['previousPosition']['path']['slice'](0x0,-0x1):_0x323c20['previousPosition']['path'],_0x6d4311=_0x5bfd6e['getNodeByPath'](_0xc8a834);_0x6d4311['getAttribute'](_0x3199e7)>0x0||_0x6d4311['_setAttribute'](_0x3199e7,_0x798e06[_0x17890f++]);}for(const [_0x456871,_0x46d48e]of _0x215b84['markers'])_0x456871['startsWith']('revision:')||this['_markers']['set'](_0x456871,_0x46d48e);}const {roots:_0x2e255f}=this['_savedMetaData']['get'](_0x938534['fromVersion']),{roots:_0x4ac911}=this['_savedMetaData']['get'](_0x938534['toVersion']),_0x5c90f1=gt(_0x2e255f['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x5c90f1),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5c90f1,Number['NEGATIVE_INFINITY']));const _0x33cc98=gt(_0x4ac911['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x33cc98),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x33cc98));const _0x352d3b=Array['from'](this['_diffRoots'])['map'](([_0x48f8dc,_0x596696])=>[_0x48f8dc,gt(_0x596696)]);this['_saveMetaData'](this['_lastTo'],_0x352d3b,this['_markers'],_0x409067);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0xb01b6a,_0x1f6d13,_0x3c4918,_0x4cacde){const _0x4d5a8c=new Map(_0x1f6d13),_0x54c9c2=new Map(_0x527a66(_0x4cacde)),_0x48bd4b=new Map();for(const [_0x1eb782,_0x89db60]of _0x3c4918)_0x48bd4b['set'](_0x1eb782,{'start':_0x89db60['start']['clone'](),'end':_0x89db60['end']['clone'](),'rootName':_0x89db60['root']['rootName']});this['_savedMetaData']['set'](_0xb01b6a,{'roots':_0x4d5a8c,'markers':_0x48bd4b,'rootsAttributes':_0x54c9c2});}['_removeMetaData'](_0x1a07e7){this['_savedMetaData']['delete'](_0x1a07e7);}['_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'](_0x4930fd,_0x4304b0=null){let _0x1cdd8e=null;_0x4930fd['is']('documentFragment')||(_0x1cdd8e=new _0x45e0a6(_0x4930fd['name'],{'vid_start':null===_0x4304b0?this['_revisionId']++:_0x4304b0++}));const _0x51ba4d=[];for(const _0x137e93 of _0x4930fd['getChildren']())if(_0x137e93['is']('element')){_0x51ba4d['push'](this['_makeIdsRoot'](_0x137e93,_0x4304b0));const _0x5511c8=_0x51ba4d[_0x51ba4d['length']-0x1];null!==_0x4304b0&&(_0x4304b0=_0x5511c8['is']('element','$text')?_0x5511c8['getAttribute']('vid')+0x1:_0x5511c8['getAttribute']('vid_end')+0x1);}else{for(let _0x389795=0x0;_0x389795<_0x137e93['offsetSize'];_0x389795++)_0x51ba4d['push'](new _0x45e0a6('$text',{'vid':null===_0x4304b0?this['_revisionId']++:_0x4304b0++}));}if(_0x4930fd['is']('documentFragment')){const _0x505297=wt(_0x4930fd['rootName'],_0x4930fd['name']);return _0x505297['_insertChild'](0x0,_0x51ba4d),_0x505297;}return _0x1cdd8e['_setAttribute']('vid_end',null===_0x4304b0?this['_revisionId']++:_0x4304b0++),_0x1cdd8e['_insertChild'](0x0,_0x51ba4d),_0x1cdd8e;}['_calculateMetaData'](_0x2c4dc9,_0xd529ae,_0x11b997){this['_reset']();const {roots:_0x2f18e3,markers:_0x383916,rootsAttributes:_0x285881}=this['_savedMetaData']['get'](_0x2c4dc9);this['_baseRoots']=new Map(_0x2f18e3),this['_baseRootsAttributes']=new Map(_0x527a66(_0x285881));for(const [_0x360653,_0x2b85c3]of this['_baseRoots'])if('$graveyard'!==_0x360653&&(this['_diffRoots']['set'](_0x360653,gt(_0x2b85c3)),this['_diffRootsAttributes']=new Map(_0x527a66(_0x285881)),_0x11b997)){const _0x172a04=this['_revisionId'];this['_idsRoots']['set'](_0x360653,this['_makeIdsRoot'](_0x2b85c3)),this['_baseIdsRoots']['set'](_0x360653,this['_makeIdsRoot'](_0x2b85c3,_0x172a04));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x11b997&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x110e59,_0x58ae7b]of _0x383916){const _0x227f46=this['_baseRoots']['get'](_0x58ae7b['rootName']),_0x1c32be=this['_diffRoots']['get'](_0x58ae7b['rootName']),_0x192ce7=new _0x8a4273(this['_fixPosition'](_0x58ae7b['start'],_0x227f46),this['_fixPosition'](_0x58ae7b['end'],_0x227f46)),_0x15f9d9=this['_fixRange'](_0x192ce7,_0x1c32be);_0x227f46['markers']['set'](_0x110e59,_0x192ce7),this['_markers']['set'](_0x110e59,_0x15f9d9);}this['_applyOperations'](_0x2c4dc9,_0xd529ae,_0x11b997);}['_applyOperations'](_0x7cf3c4,_0x402681,_0x36dd35){for(const _0x1d01dd of this['source']['getOperations'](_0x7cf3c4,_0x402681))this['_handleOperation'](_0x1d01dd,_0x36dd35);for(const _0xd14497 of this['_diffRoots']['values']())_0xd14497['markers']['clear']();for(const [_0x270a09,_0x1eaaec]of this['_markers']){this['_diffRoots']['get'](_0x1eaaec['root']['rootName'])['markers']['set'](_0x270a09,_0x1eaaec['clone']());}const _0x5b8bcb=new Map(),_0x93288f=new Map();for(const [_0x8eb0ff,_0x110e5e]of this['_diffRoots'])_0x5b8bcb['set'](_0x8eb0ff,gt(_0x110e5e)),_0x93288f['set'](_0x8eb0ff,this['_diffRootsAttributes']['get'](_0x8eb0ff));this['_saveMetaData'](_0x402681,_0x5b8bcb,this['_markers'],_0x93288f);}['_getPreviousFrom'](_0xd344a7){const _0x361168=Array['from'](this['_savedMetaData']['keys']());_0x361168['sort']((_0x2e9e0e,_0x566927)=>_0x2e9e0e-_0x566927),_0x361168['reverse']();for(const _0x54505b of _0x361168)if(_0x54505b<_0xd344a7)return _0x54505b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2bf574,_0x3d760f){const _0x53b93c=Array['from'](_0x3d760f['markers'])['map'](([_0x287eb4,_0x4bf17d])=>[_0x287eb4,this['_fixRange'](_0x4bf17d,_0x2bf574)]);_0x2bf574['markers']=new Map(_0x53b93c);}['_transformMarkers'](_0x4351b7){for(const _0x5395a6 of this['_markers']['values']()){const _0x180135=_0x5395a6['getTransformedByOperation'](_0x4351b7),_0x554f19=_0x8a4273['_createFromRanges'](_0x180135);_0x5395a6['start']=_0x554f19['start'],_0x5395a6['end']=_0x554f19['end'];}}['_handleOperation'](_0x243d16,_0x2fd70e){if('addRoot'!=_0x243d16['type']&&'detachRoot'!=_0x243d16['type']){if('insert'==_0x243d16['type']){const _0x364773=_0x243d16['position']['root'],_0x3bb257=_0x364773['rootName'],_0x367422=_0x364773['name'];this['_diffRoots']['has'](_0x3bb257)||(this['_diffRoots']['set'](_0x3bb257,wt(_0x3bb257,_0x367422,!0x0)),this['_diffRootsAttributes']['set'](_0x3bb257,{}),_0x2fd70e&&this['_idsRoots']['set'](_0x3bb257,wt(_0x3bb257,_0x367422,!0x0)));}else{if('addRootAttribute'==_0x243d16['type']||'removeRootAttribute'==_0x243d16['type']||'changeRootAttribute'==_0x243d16['type'])return void this['_handleRootAttributeOperation'](_0x243d16);'marker'==_0x243d16['type']&&this['_handleMarkerOperation'](_0x243d16);}if('marker'!==_0x243d16['type']){const _0x5094fe=this['_cloneOperation'](_0x243d16,this['_diffRoots']);_0x5094fe['_execute'](),this['_transformMarkers'](_0x5094fe);}if(_0x2fd70e)switch(_0x243d16['type']){case'insert':this['_handleInsertOperation'](_0x243d16);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x243d16);break;case'merge':this['_handleMergeOperation'](_0x243d16);break;case'split':this['_handleSplitOperation'](_0x243d16);}}else this['_handleRootOperation'](_0x243d16,_0x2fd70e);}['_cloneOperation'](_0x4339ab,_0x15d241){const _0x1f60c3=_0x4339ab['clone']();return _0x1f60c3['_authorId']=_0x4339ab['_authorId'],this['_fixOperation'](_0x1f60c3,_0x15d241),_0x1f60c3;}['_getBaseVids'](_0x302022){return _0x302022['map'](_0x3c82b5=>{const _0x4252e5=this['_getVidAttributeName'](_0x3c82b5);return Number(_0x3c82b5['item']['getAttribute'](_0x4252e5));});}['_generateTape'](_0x467bbd,_0x4e7ec1){if(_0x467bbd['is']('element','$text'))_0x4e7ec1['push']({'item':_0x467bbd,'type':'text'});else{_0x467bbd['is']('element')&&_0x4e7ec1['push']({'item':_0x467bbd,'type':'elementStart'});for(const _0x1988cf of _0x467bbd['getChildren']())this['_generateTape'](_0x1988cf,_0x4e7ec1);_0x467bbd['is']('element')&&_0x4e7ec1['push']({'item':_0x467bbd,'type':'elementEnd'});}return _0x4e7ec1;}['_getState'](){const _0x582e9f=new Map(this['_touched']),_0x18d2a5=new Map(_0x582e9f),_0x4d0019=new Map(),_0x4c4877={'insertions':{},'deletions':{}},_0x2c761f={'insertions':{},'deletions':{}},_0x78b328=new Map(),_0x4a70ad=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x3fce47=new Map();_0x4a70ad['delete']('$graveyard');for(const _0x47beab of _0x4a70ad){const _0x4b7fe1=(this['_diffRoots']['get'](_0x47beab)??this['_baseRoots']['get'](_0x47beab))['name'],_0x47f8bf=this['_diffRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1),_0x26929f=this['_baseRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1);_0x47f8bf['isAttached']()||_0x26929f['isAttached']()?(_0x3fce47['set'](_0x47beab,_0x4b7fe1),_0x4c4877['insertions'][_0x47beab]=gt(_0x47f8bf),_0x4c4877['deletions'][_0x47beab]=gt(_0x26929f),this['_copyMarkers'](_0x4c4877['deletions'][_0x47beab],_0x26929f),this['_copyMarkers'](_0x4c4877['insertions'][_0x47beab],_0x47f8bf),_0x2c761f['insertions'][_0x47beab]=this['_generateTape'](this['_idsRoots']['get'](_0x47beab),[]),_0x2c761f['deletions'][_0x47beab]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1),[])):_0x4a70ad['delete'](_0x47beab);}for(const _0x29760d of _0x4a70ad){const _0x539f87=_0x2c761f['insertions'][_0x29760d];for(const _0x5d5605 of _0x539f87){const _0x4089e0=this['_getVidAttributeName'](_0x5d5605),_0x51c4cb=_0x5d5605['item']['getAttribute'](_0x4089e0);_0x18d2a5['delete'](_0x51c4cb),_0x51c4cb>=this['_startingRevisionId']&&_0x4d0019['set'](_0x51c4cb,_0x582e9f['get'](_0x51c4cb));}}for(const _0x5093bd of _0x4a70ad){const _0x557344=_0x2c761f['insertions'][_0x5093bd],_0x5c5a3c=this['_getBaseVids'](_0x2c761f['deletions'][_0x5093bd]);let _0x184f6d=0x0;for(const _0x147128 of _0x557344){const _0x47c5fe=this['_getVidAttributeName'](_0x147128),_0x5c69c9=_0x147128['item']['getAttribute'](_0x47c5fe);if(!_0x4d0019['has'](_0x5c69c9)&&!_0x78b328['has'](_0x5c69c9)){if(_0x18d2a5['has'](_0x5c69c9))_0x184f6d++;else{if(_0x5c69c9!=_0x5c5a3c[_0x184f6d]){const _0x2b4b4b=_0x582e9f['get'](_0x5c69c9)||_0x582e9f['get'](_0x5c5a3c[_0x184f6d]);for(;_0x5c69c9!=_0x5c5a3c[_0x184f6d];)_0x18d2a5['has'](_0x5c5a3c[_0x184f6d])||(_0x78b328['set'](_0x5c5a3c[_0x184f6d],_0x2b4b4b),_0x582e9f['set'](_0x5c5a3c[_0x184f6d],_0x2b4b4b)),_0x184f6d++;}_0x184f6d++;}}}}for(const _0x48b27a of _0x4a70ad){const _0x5d7d3f=_0x2c761f['insertions'][_0x48b27a];for(const _0x36c69 of _0x5d7d3f){const _0x308b2d=this['_getVidAttributeName'](_0x36c69),_0xcc80c4=_0x36c69['item']['getAttribute'](_0x308b2d);if(_0x78b328['has'](_0xcc80c4)){const _0x305a37=_0x78b328['get'](_0xcc80c4);_0x18d2a5['has'](_0xcc80c4)||_0x18d2a5['set'](_0xcc80c4,{..._0x305a37}),_0x4d0019['set'](_0xcc80c4,{..._0x305a37});}}}for(const _0x3876b6 of _0x18d2a5['keys']())_0x3876b6>=this['_startingRevisionId']&&_0x18d2a5['delete'](_0x3876b6);const _0x212b13=new Map();for(const _0x566a1c of _0x4a70ad){let _0x577883=_0x2c761f['insertions'][_0x566a1c];for(const _0x5d3b0b of _0x577883)if(_0x5d3b0b['item']['is']('element','tableCell')){const _0x48f2b=this['_getVidAttributeName'](_0x5d3b0b),_0x1a32e5=_0x5d3b0b['item']['getAttribute'](_0x48f2b);if(_0x4d0019['has'](_0x1a32e5)){const _0x5c039c=_0x5d3b0b['item']['parent']['parent']['getAttribute']('vid_start'),_0x2ffbb3=_0x212b13['get'](_0x5c039c)||new Set();_0x2ffbb3['add'](_0x4d0019['get'](_0x1a32e5)['userId']),_0x212b13['set'](_0x5c039c,_0x2ffbb3);}}_0x577883=_0x2c761f['deletions'][_0x566a1c];for(const _0x625a43 of _0x577883)if(_0x625a43['item']['is']('element','tableCell')){const _0x340269=this['_getVidAttributeName'](_0x625a43),_0x494970=_0x625a43['item']['getAttribute'](_0x340269);if(_0x18d2a5['has'](_0x494970)){const _0xd4dd0=_0x625a43['item']['parent']['parent']['getAttribute']('vid_start'),_0x4f1022=_0x212b13['get'](_0xd4dd0)||new Set();_0x4f1022['add'](_0x18d2a5['get'](_0x494970)['userId']),_0x212b13['set'](_0xd4dd0,_0x4f1022);}}for(const _0x5829c7 of _0x212b13['keys']())(_0x4d0019['has'](_0x5829c7)||_0x18d2a5['has'](_0x5829c7))&&_0x212b13['delete'](_0x5829c7);}for(const _0x372ef5 of _0x4a70ad){const _0x539b83=_0x2c761f['insertions'][_0x372ef5];let _0x44534f=null,_0x3c387b=null;for(const _0x43800b of _0x539b83){const _0x22987b=this['_getVidAttributeName'](_0x43800b),_0x525bdc=_0x43800b['item']['getAttribute'](_0x22987b),_0x4e22fa=_0x212b13['get'](_0x525bdc);_0x4e22fa&&'elementStart'==_0x43800b['type']&&(_0x44534f=Array['from'](_0x4e22fa)[0x0],_0x3c387b=_0x43800b['item']['getAttribute']('vid_end')),_0x44534f&&(_0x18d2a5['set'](_0x525bdc,{'userId':_0x44534f}),_0x4d0019['set'](_0x525bdc,{'userId':_0x44534f})),_0x525bdc==_0x3c387b&&(_0x44534f=null,_0x3c387b=null);}}const _0x53aab7={},_0x1da416=new Set();for(const _0x116de1 of _0x4a70ad){const _0x38f953=_0x4c4877['deletions'][_0x116de1],_0x156f70=_0x4c4877['insertions'][_0x116de1];for(const {userId:_0x1b48cc}of this['_touchedMarkers']['values']())null!==_0x1b48cc&&_0x1da416['add'](_0x1b48cc);for(const {userId:_0x21f0fb}of this['_touchedRoots']['values']())null!==_0x21f0fb&&_0x1da416['add'](_0x21f0fb);this['_markChanges'](_0x156f70,_0x2c761f['insertions'][_0x116de1],_0x4d0019,'insertion',_0x1da416),this['_markChanges'](_0x38f953,_0x2c761f['deletions'][_0x116de1],_0x18d2a5,'deletion',_0x1da416),_0x53aab7[_0x116de1]={'insertions':this['_prepareViewToSave'](_0x156f70),'deletions':this['_prepareViewToSave'](_0x38f953),'attachChange':this['_touchedRoots']['get'](_0x116de1)||null,'attributesBefore':_0x527a66(this['_baseRootsAttributes']['get'](_0x116de1))||{},'attributesAfter':_0x527a66(this['_diffRootsAttributes']['get'](_0x116de1)),'rootElementName':_0x3fce47['get'](_0x116de1)};}return{'diffData':_0x53aab7,'authorsIds':Array['from'](_0x1da416)};}['_processRootBeforeSave'](_0x2a642a){for(const [,_0x728619]of _0x2a642a['markers']){const _0x385465=_0x728619['start']['getAncestors']()['filter'](_0x2e7b94=>'tableCell'==_0x2e7b94['name']);for(const _0x21a974 of _0x385465)0x1==_0x21a974['childCount']&&_0x21a974['getChild'](0x0)['is']('element','paragraph')&&_0x21a974['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4801ec){this['_processRootBeforeSave'](_0x4801ec);const _0x2a7698=this['editor']['data']['toView'](_0x4801ec,{}),_0x1385da=Array['from'](_0x2a7698['getChildren']())['map'](_0x150b41=>this['_getViewJson'](_0x150b41));return JSON['stringify'](_0x1385da);}['_getViewJson'](_0x412e35){if(_0x412e35['is']('$text'))return _0x412e35['data'];{const _0x44e188=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x29948c=_0x412e35,_0x2bf472=this['editor']['data']['htmlProcessor']['domConverter'],_0x4d05d9={'type':_0x44e188['_getTypeCharForViewElement'](_0x29948c),'name':_0x29948c['name'],'attributes':Array['from'](_0x29948c['getAttributes']()),'children':Array['from'](_0x29948c['getChildren']())['map'](_0x2a01ce=>this['_getViewJson'](_0x2a01ce))};if(_0x412e35['is']('uiElement')&&'$comment'!=_0x412e35['name']){const _0x283328=_0x412e35['render'](_0x2bf472['domDocument'],_0x2bf472);_0x4d05d9['children']['push'](_0x283328['outerHTML']);}else{if(_0x412e35['is']('rawElement')){const _0x3fce58=_0x2bf472['domDocument']['createElement'](_0x29948c['name']);_0x412e35['render'](_0x3fce58,_0x2bf472),_0x4d05d9['children']['push'](_0x3fce58['innerHTML']);}}const _0x3add92=Array['from'](_0x29948c['getCustomProperties']());_0x3add92['length']>0x0&&(_0x4d05d9['customProperties']=_0x3add92);const _0x2104a9=_0x29948c['getFillerOffset']();return null!==_0x2104a9&&(_0x4d05d9['fillerOffset']=_0x2104a9),_0x4d05d9;}}['_markChanges'](_0x2a9d9f,_0x2ee381,_0x487c8c,_0x4d5b7f,_0x15c798){let _0x5bae4a=null,_0xdcff70=null,_0x29f301=0x0;const _0x1aef4c=this['editor']['model'];for(let _0x31bb21=0x0;_0x31bb21<_0x2ee381['length'];_0x31bb21++){const _0x43505f=this['_getVidAttributeName'](_0x2ee381[_0x31bb21]),_0x26da79=_0x2ee381[_0x31bb21]['item']['getAttribute'](_0x43505f),_0x1fa828=_0x487c8c['get'](_0x26da79),_0x477a67=_0x31bb21==_0x2ee381['length']-0x1;(!_0x5bae4a&&_0x1fa828&&(_0x5bae4a=_0x1fa828,_0xdcff70=_0x2ee381[_0x31bb21]),_0x5bae4a&&(!_0x1fa828||_0x1fa828['userId']!=_0x5bae4a['userId']))&&(_0x53b7e6(_0x1fa828,mt(_0xdcff70,_0x2a9d9f,_0x1aef4c),mt(_0x2ee381[_0x31bb21],_0x2a9d9f,_0x1aef4c)),_0x5bae4a=_0x1fa828||null,_0xdcff70=_0x1fa828?_0x2ee381[_0x31bb21]:null),_0x5bae4a&&_0x477a67&&_0x53b7e6(_0x1fa828,mt(_0xdcff70,_0x2a9d9f,_0x1aef4c),pt(_0x2ee381[_0x31bb21],_0x2a9d9f,_0x1aef4c));}function _0x53b7e6(_0x47cb45,_0xe41271,_0x4add29){const _0x530d5d=_0x5bae4a['userId'],_0x1cd03b='revision:'+_0x4d5b7f+':'+_0x530d5d+':'+_0x29f301++,_0x3a7f50=_0x1aef4c['createRange'](_0xe41271,_0x4add29);_0x2a9d9f['markers']['set'](_0x1cd03b,_0x3a7f50),null!==_0x530d5d&&_0x15c798['add'](_0x530d5d);}}['_getVidAttributeName'](_0x250870){switch(_0x250870['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1204cb,_0xa1057){_0x1204cb['baseVersion']=null;for(const _0xcb2a10 in _0x1204cb){const _0x5b328c=_0x1204cb[_0xcb2a10];if(_0x5b328c instanceof _0x4e4050){const _0x19e648=_0xa1057['get'](_0x5b328c['root']['rootName']);_0x1204cb[_0xcb2a10]=this['_fixPosition'](_0x5b328c,_0x19e648);}if(_0x5b328c instanceof _0x8a4273){const _0x2882b2=_0xa1057['get'](_0x5b328c['root']['rootName']);_0x1204cb[_0xcb2a10]=this['_fixRange'](_0x5b328c,_0x2882b2);}'root'===_0xcb2a10&&(_0x1204cb['root']=_0xa1057['get'](_0x1204cb['root']['rootName']));}}['_fixRange'](_0x2aa2a9,_0x347f19){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2aa2a9['start'],_0x347f19),this['_fixPosition'](_0x2aa2a9['end'],_0x347f19));}['_fixPosition'](_0x1fd7d6,_0x389750){return this['editor']['model']['createPositionFromPath'](_0x389750,_0x1fd7d6['path'],_0x1fd7d6['stickiness']);}['_handleInsertOperation'](_0x31f0f8){const _0x49eed7=this['_idsRoots']['get'](_0x31f0f8['position']['root']['rootName']),_0x60c8=this['_fixPosition'](_0x31f0f8['position'],_0x49eed7),_0x534837=null===_0x31f0f8['_authorId']?null:_0x31f0f8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5bcd4b=_0x60c8['parent'],_0xc81e35=this['_revisionId'],_0x256e5d=[];for(const _0x3e060f of _0x31f0f8['nodes'])if(_0x3e060f['is']('element'))_0x256e5d['push'](this['_makeIdsRoot'](_0x3e060f));else{for(let _0x43d16f=0x0;_0x43d16f<_0x3e060f['offsetSize'];_0x43d16f++)_0x256e5d['push'](new _0x45e0a6('$text',{'vid':this['_revisionId']++}));}const _0x3f71bc=this['_revisionId'];for(let _0x15e88f=_0xc81e35;_0x15e88f<_0x3f71bc;_0x15e88f++)this['_touched']['set'](_0x15e88f,{'userId':_0x534837});_0x5bcd4b['_insertChild'](_0x60c8['offset'],_0x256e5d);}['_handleMoveOperation'](_0x242bb9){(_0x242bb9=this['_cloneOperation'](_0x242bb9,this['_idsRoots']))['_execute']();const _0x15b857=null===_0x242bb9['_authorId']?null:_0x242bb9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3615d4=_0x242bb9['getMovedRangeStart'](),_0x4c2c80=_0x3615d4['parent'],_0x1bf0be=_0x3615d4['offset'];!function _0xedab9b(_0x3414dc,_0x563f86,_0xacb70c,_0x591466){for(let _0x2b9e3d=_0xacb70c;_0x2b9e3d<_0x591466;_0x2b9e3d++){const _0x135519=_0x563f86['getChild'](_0x2b9e3d);_0x135519['is']('element','$text')?_0x3414dc['set'](_0x135519['getAttribute']('vid'),{'userId':_0x15b857}):(_0x3414dc['set'](_0x135519['getAttribute']('vid_start'),{'userId':_0x15b857}),_0xedab9b(_0x3414dc,_0x135519,0x0,_0x135519['childCount']),_0x3414dc['set'](_0x135519['getAttribute']('vid_end'),{'userId':_0x15b857}));}}(this['_touched'],_0x4c2c80,_0x1bf0be,_0x1bf0be+_0x242bb9['howMany']);}['_handleMergeOperation'](_0x36c6b8){const _0x38b1d0=null===(_0x36c6b8=this['_cloneOperation'](_0x36c6b8,this['_idsRoots']))['_authorId']?null:_0x36c6b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31e67b=_0x36c6b8['targetPosition']['parent'],_0x5b3055=_0x36c6b8['sourcePosition']['parent'],_0x48341a=_0x31e67b['getAttribute']('vid_end'),_0x119b9e=_0x5b3055['getAttribute']('vid_start');_0x31e67b['_setAttribute']('vid_end',_0x5b3055['getAttribute']('vid_end')),_0x5b3055['_setAttribute']('vid_end',_0x48341a),this['_touched']['set'](_0x119b9e,{'userId':_0x38b1d0}),this['_touched']['set'](_0x48341a,{'userId':_0x38b1d0}),_0x36c6b8['_execute']();}['_handleSplitOperation'](_0x15c3cf){const _0x2a604b=null===(_0x15c3cf=this['_cloneOperation'](_0x15c3cf,this['_idsRoots']))['_authorId']?null:_0x15c3cf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c14c3=_0x15c3cf['graveyardPosition'],_0x1aae14=_0x15c3cf['splitPosition']['parent'];_0x15c3cf['_execute']();const _0x5c6e8c=_0x1aae14['getAttribute']('vid_end'),_0x3c7e9d=_0x15c3cf['insertionPosition']['nodeAfter'];if(_0x4c14c3){const _0x4da43c=_0x3c7e9d['getAttribute']('vid_end'),_0x123f0a=_0x1aae14['getAttribute']('vid_end');_0x1aae14['_setAttribute']('vid_end',_0x4da43c),_0x3c7e9d['_setAttribute']('vid_end',_0x123f0a),this['_touched']['set'](_0x1aae14['getAttribute']('vid_end'),{'userId':_0x2a604b}),this['_touched']['set'](_0x3c7e9d['getAttribute']('vid_start'),{'userId':_0x2a604b});}else{const _0x1423da=this['_revisionId']++,_0x297578=this['_revisionId']++;_0x1aae14['_setAttribute']('vid_end',_0x1423da),_0x3c7e9d['_setAttribute']('vid_start',_0x297578),_0x3c7e9d['_setAttribute']('vid_end',_0x5c6e8c),this['_touched']['set'](_0x1423da,{'userId':_0x2a604b}),this['_touched']['set'](_0x297578,{'userId':_0x2a604b});}}['_handleMarkerOperation'](_0x8c03ff){if(!_0x8c03ff['affectsData'])return;const _0x4ac037=(_0x8c03ff=this['_cloneOperation'](_0x8c03ff,this['_diffRoots']))['oldRange']?_0x8c03ff['oldRange']['root']:null,_0x6e7abc=_0x8c03ff['newRange']?_0x8c03ff['newRange']['root']:null;_0x4ac037&&this['_markers']['delete'](_0x8c03ff['name']),_0x6e7abc&&this['_markers']['set'](_0x8c03ff['name'],_0x8c03ff['newRange']['clone']());const _0x18c6f3=null===_0x8c03ff['_authorId']?null:_0x8c03ff['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a43e7=_0x8c03ff['name'];if(!this['_touchedMarkers']['has'](_0x1a43e7))return void this['_touchedMarkers']['set'](_0x1a43e7,{'range':_0x8c03ff['oldRange'],'userId':_0x18c6f3});const _0x43c91d=this['_touchedMarkers']['get'](_0x1a43e7),_0xd59a3=_0x43c91d['range'],_0x5af699=_0x8c03ff['newRange'];null==_0xd59a3&&null==_0x5af699||_0xd59a3&&_0x5af699&&_0xd59a3['isEqual'](_0x5af699)?this['_touchedMarkers']['delete'](_0x8c03ff['name']):_0x43c91d['userId']=_0x18c6f3;}['_handleRootOperation'](_0x29cdee,_0x18b559){this['_diffRoots']['has'](_0x29cdee['rootName'])?this['_diffRoots']['get'](_0x29cdee['rootName'])['_isAttached']=_0x29cdee['isAdd']:(this['_diffRoots']['set'](_0x29cdee['rootName'],wt(_0x29cdee['rootName'],_0x29cdee['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x29cdee['rootName'],{}),_0x18b559&&this['_idsRoots']['set'](_0x29cdee['rootName'],wt(_0x29cdee['rootName'],_0x29cdee['elementName'],!0x0)));const _0x1d36aa=null===_0x29cdee['_authorId']?null:_0x29cdee['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a3e3d=this['_touchedRoots']['get'](_0x29cdee['rootName']);_0x1a3e3d&&_0x1a3e3d['userId']===_0x1d36aa?this['_touchedRoots']['delete'](_0x29cdee['rootName']):this['_touchedRoots']['set'](_0x29cdee['rootName'],{'userId':_0x1d36aa,'isAttached':_0x29cdee['isAdd']});}['_handleRootAttributeOperation'](_0x5f1d03){const _0xc542cf=this['_diffRootsAttributes']['get'](_0x5f1d03['root']['rootName']);null===_0x5f1d03['newValue']?delete _0xc542cf[_0x5f1d03['key']]:_0xc542cf[_0x5f1d03['key']]=_0x5f1d03['newValue'];}}function gt(_0x13bf35){const _0xf71434=wt(_0x13bf35['rootName'],_0x13bf35['name'],_0x13bf35['isAttached']());for(const _0x5a8f89 of _0x13bf35['getChildren']()){const _0x5c7310=_0x5a8f89['_clone'](!0x0);_0xf71434['_appendChild'](_0x5c7310);}return _0xf71434;}function wt(_0x5d15f2,_0x14bca7,_0x24b769=!0x0){const _0x50e9de=new _0x34f38e();return _0x50e9de['rootName']=_0x5d15f2,_0x50e9de['name']=_0x14bca7,_0x50e9de['_isAttached']=_0x24b769,_0x50e9de['isAttached']=()=>_0x50e9de['_isAttached'],_0x50e9de;}function mt(_0x541755,_0x54747f,_0x3c1589){const _0x395271='elementEnd'==_0x541755['type']?_0x3c1589['createPositionAt'](_0x541755['item'],'end'):_0x3c1589['createPositionBefore'](_0x541755['item']);return _0x3c1589['createPositionFromPath'](_0x54747f,_0x395271['path'],_0x395271['stickiness']);}function pt(_0x48c8dd,_0x2e1a7a,_0x12de6a){const _0x57e8b0='elementStart'==_0x48c8dd['type']?_0x12de6a['createPositionAt'](_0x48c8dd['item'],0x0):_0x12de6a['createPositionAfter'](_0x48c8dd['item']);return _0x12de6a['createPositionFromPath'](_0x2e1a7a,_0x57e8b0['path'],_0x57e8b0['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
25
+ _0x469ec1(_0x39c569){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4a8c30,_0x78949c){super(_0x4a8c30),this['focusTracker']=new _0x22ee29(),this['keystrokes']=new _0x2862f7(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x78949c),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x9ecd07({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5170d1=_0x351e5b=>_0x351e5b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5170d1),this['keystrokes']['set']('arrowleft',_0x5170d1),this['keystrokes']['set']('arrowup',_0x5170d1),this['keystrokes']['set']('arrowdown',_0x5170d1);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x17b76d){this['revisionNameInputView']['fieldView']['element']['value']=_0x17b76d['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x3ddd0e){const _0x5aaf88=new _0x321730(this['locale'],_0x212138),_0x410f65=_0x5aaf88['fieldView'];_0x410f65['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x57c719=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x3ddd0e&&(_0x57c719+='\x20('+ft(this['locale'],'optional')+')'),(_0x5aaf88['label']=_0x57c719,_0x410f65['on']('input',()=>{this['revisionNameInputValue']=_0x410f65['element']['value']['trim']();}),_0x5aaf88);}}class RevisionHistoryUI extends _0x18ed42{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x5482cd=this['editor'],_0x4b1927=_0x5482cd['plugins']['get']('RevisionTracker');_0x5482cd['ui']['componentFactory']['add']('revisionHistory',_0x75b9f6=>{const _0x359e70=_0x38d1cc(_0x75b9f6),_0x212c2b=_0x359e70['panelView']['children'],_0x877125=new _0x249276(_0x75b9f6),_0x513c7f=new _0x14e979(_0x75b9f6),_0x7810cf=this['_createSaveRevisionButton'](_0x3296a8),_0x749d18=new _0x14e979(_0x75b9f6),_0x13c1b1=this['_createOpenRevisionButton'](_0x3296a8);return _0x359e70['bind']('isEnabled')['to'](_0x4b1927,'isReady',_0x4b1927,'isEnabled',_0x5482cd,'isReadOnly',(_0x389499,_0x4214f9,_0x214e95)=>_0x389499&&_0x4214f9&&!_0x214e95),_0x359e70['buttonView']['set']({'icon':_0x432461,'label':ft(_0x75b9f6,'Revision\x20history'),'tooltip':!0x0}),_0x7810cf['set']({'withText':!0x0,'role':'menuitem'}),_0x13c1b1['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x13c1b1,'execute',()=>{_0x359e70['isOpen']=!0x1,_0x5482cd['editing']['view']['focus']();},{'priority':'low'}),_0x513c7f['children']['add'](_0x7810cf),_0x749d18['children']['add'](_0x13c1b1),_0x877125['role']='menu',_0x877125['items']['addMany']([_0x513c7f,_0x749d18]),_0x212c2b['add'](_0x877125),_0x359e70;}),_0x5482cd['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1b80b6=this['editor'],_0x5b88c0=_0x1b80b6['locale'],_0xce352b=_0x1b80b6['plugins']['get']('RevisionTracker'),_0x547270=new _0x3839a1(_0x5b88c0),_0x118c87=new _0x4a0a8e(_0x5b88c0);_0x547270['bind']('isEnabled')['to'](_0xce352b,'isReady',_0xce352b,'isEnabled',_0x1b80b6,'isReadOnly',(_0x189809,_0x493ad0,_0x25b3ea)=>_0x189809&&_0x493ad0&&!_0x25b3ea),_0x547270['buttonView']['set']({'icon':_0x432461,'label':ft(_0x5b88c0,'Revision\x20history')});const _0x591974=new tt(_0x5b88c0,_0x547270),_0x431e3a=this['_createSaveRevisionButton'](it);_0x431e3a['delegate']('execute')['to'](_0x547270),_0x591974['children']['add'](_0x431e3a),_0x118c87['items']['add'](_0x591974);const _0x545446=new tt(_0x5b88c0,_0x547270),_0x21e72b=this['_createOpenRevisionButton'](it);return _0x21e72b['delegate']('execute')['to'](_0x547270),_0x545446['children']['add'](_0x21e72b),_0x118c87['items']['add'](_0x545446),_0x547270['panelView']['children']['add'](_0x118c87),_0x547270;}['_createSaveRevisionButton'](_0x3d5ea1){const _0x409925=this['editor'],_0x3ce679=_0x409925['plugins']['get']('RevisionTracker'),_0x49e2a9=new _0x3d5ea1(_0x409925['locale']);return _0x49e2a9['set']({'label':ft(_0x409925['locale'],'Save\x20current\x20revision')}),_0x49e2a9['bind']('isEnabled')['to'](_0x3ce679,'isReady',_0x3ce679,'isEnabled',_0x409925,'isReadOnly',(_0x378405,_0x235490,_0x42ead4)=>_0x378405&&_0x235490&&!_0x42ead4),this['listenTo'](_0x49e2a9,'execute',()=>{this['_showDialog']();}),_0x49e2a9;}['_createOpenRevisionButton'](_0x190020){const _0x1c2de2=this['editor'],_0x235131=_0x1c2de2['plugins']['get']('RevisionTracker'),_0x1f4f6f=new _0x190020(_0x1c2de2['locale']);return _0x1f4f6f['set']({'label':ft(_0x1c2de2['locale'],'Open\x20revision\x20history')}),_0x1f4f6f['bind']('isEnabled')['to'](_0x235131,'isReady',_0x1c2de2,'isReadOnly',(_0x258c8f,_0x16ff2c)=>_0x258c8f&&!_0x16ff2c),this['listenTo'](_0x1f4f6f,'execute',()=>{_0x1c2de2['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1f4f6f;}['_showDialog'](){const _0x3d96d9=this['editor'],_0xde33d9=_0x3d96d9['locale'],_0x56a2d=_0x3d96d9['plugins']['get']('Dialog'),_0x4e3d0c=_0x3d96d9['plugins']['get']('RevisionTracker');function _0xef615(_0x299c7c){_0x3d96d9['config']['get']('revisionHistory.requireRevisionName')&&''===_0x299c7c['revisionName']?_0x299c7c['revisionNameInputView']['errorText']=ft(_0xde33d9,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x3d96d9['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x299c7c['revisionName']}),_0x56a2d['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xef615(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x56a2d['show']({'id':'revisionSave','title':ft(_0xde33d9,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x3d96d9['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x56a2d['hide']()},{'label':ft(_0x3d96d9['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x15d173){_0x15d173['bind']('isEnabled')['to'](_0x4e3d0c,'isReady',_0x4e3d0c,'isEnabled',_0x3d96d9,'isReadOnly',(_0x34465a,_0x1ac6d2,_0x50f33e)=>_0x34465a&&_0x1ac6d2&&!_0x50f33e);},'onExecute':()=>_0xef615(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x401387=this['editor'],_0x19bcdf=_0x401387['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x19bcdf,_0x401387['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x39c569{['changeId'];['_model'];constructor(_0x22ca55,_0x2969ff){super(_0x22ca55),this['_model']=_0x2969ff,this['changeId']=_0x2969ff['id'];const _0x325ed4=this['bindTemplate'],_0x1602f6=ft(_0x22ca55,_0x2969ff['data']['isSuggestion']?'Suggested\x20by':'add'==_0x2969ff['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x2969ff['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x325ed4['to']('type',_0x5370b6=>'ck-revision-change__'+_0x5370b6)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x1602f6}]},{'text':'\x20'+_0x2969ff['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
26
+ _0x4cbe68(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x27517c){super(),this['id']=_0x27517c['id']||_0x55087c(),this['author']=_0x27517c['author'],this['type']=_0x27517c['type'],this['data']=_0x27517c['data']||{},this['rootName']=_0x27517c['rootName'],this['set']('createdAt',_0x27517c['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x485069,_0x18ebbf){this['newRevisionId']=_0x485069,this['oldRevisionId']=_0x18ebbf,this['changes']=new _0x12a0e4();}['_setChanges'](_0x48334f){for(const _0x2b3df1 of _0x48334f)this['changes']['add'](_0x2b3df1);}}class RevisionViewer extends _0x18ed42{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x4c4887,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x494fe6){super(_0x494fe6),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x3af280,_0x9a3c50,_0x5e6ced)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5215b1=>{for(const _0x443183 of this['editor']['editing']['view']['document']['roots'])_0x5e6ced?_0x5215b1['removeClass']('ck-editor__editable__overlay',_0x443183):_0x5215b1['addClass']('ck-editor__editable__overlay',_0x443183);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2a2360=>null!==_0x2a2360),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3febfd,_0x2daccb,_0x382524)=>_0x3febfd&&_0x382524?_0x2daccb['changes']['getIndex'](_0x382524):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x364e72,_0x2b9c2d)=>_0x364e72?_0x2b9c2d['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x1657ed=this['editor'],_0x2936c7=new ShowChangeCommand(_0x1657ed,{'direction':'backward'}),_0x135f67=new ShowChangeCommand(_0x1657ed,{'direction':'forward'});(_0x1657ed['commands']['add']('showPreviousChange',_0x2936c7),_0x1657ed['commands']['add']('showNextChange',_0x135f67),_0x1657ed['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x1657ed)),this['on']('change:numberOfChanges',()=>{_0x2936c7['refresh'](),_0x135f67['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1657ed['enableReadOnlyMode']('revision-viewer'),_0x1657ed['plugins']['has']('WidgetToolbarRepository'))&&_0x1657ed['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x155073){return await this['_utils']['loadRevisionData'](_0x155073,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x155073);}async['getRevisionRootsAttributes'](_0x1ef00d){return await this['_utils']['loadRevisionData'](_0x1ef00d,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1ef00d);}async['compare'](_0x1540ae,_0x3627aa,_0x18e22b=!0x1){if(!this['isEnabled'])return;const _0x5e7bf8=this['diff'],_0x106a1a=this['repository'],_0xa5d484='string'==typeof _0x1540ae?_0x106a1a['getRevision'](_0x1540ae):_0x1540ae,_0x252dc0='string'==typeof _0x3627aa?_0x106a1a['getRevision'](_0x3627aa):_0x3627aa,_0xd75a43=_0xa5d484['id'],_0x1bb20d=_0x252dc0?_0x252dc0['id']:null;if(!_0x18e22b&&this['diff']&&this['diff']['newRevisionId']===_0xd75a43&&this['diff']['oldRevisionId']===_0x1bb20d)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0xd75a43,_0x1bb20d);const _0x1da27a=this['_getRevisionsRange'](_0xa5d484,_0x252dc0,!0x0)['map'](_0x87c518=>this['_utils']['loadRevisionData'](_0x87c518,this['adapter']));return _0x1da27a['push'](new Promise(_0x116068=>{setTimeout(_0x116068,0x14);})),Promise['all'](_0x1da27a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x39ec9d=this['_getDiff'](_0xd75a43,_0x1bb20d);for(const _0x232ed8 of _0x39ec9d['changes'])this['_changeIdToChange']['set'](_0x232ed8['id'],_0x232ed8);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5364f9=>{for(const _0x4ba985 of this['editor']['model']['document']['getRootNames']())_0x5364f9['detachRoot'](_0x4ba985);for(const _0x17da1a of Object['keys'](_0x39ec9d['model'])){const _0x1aa0f=_0x39ec9d['model'][_0x17da1a]['name'],_0x40ae6f=_0x5364f9['addRoot'](_0x17da1a,_0x1aa0f);for(const _0x563cae of Object['keys'](_0x39ec9d['attributes'][_0x17da1a]))_0x5364f9['setAttribute'](_0x563cae,_0x39ec9d['attributes'][_0x17da1a][_0x563cae],_0x40ae6f);_0x5364f9['insert'](_0x39ec9d['model'][_0x17da1a],_0x40ae6f,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x39ec9d['changes'])),this['isReady']=!0x0;})['catch'](_0x257782=>{console['error'](_0x257782),this['_cleanUp'](),_0x5e7bf8&&(this['diff']=_0x5e7bf8),this['isReady']=!0x0;});}['addRevisionData'](_0xa0c232,_0x96f41e){const _0x168c9a=this['repository']['createRevision'](_0xa0c232);return _0x168c9a['on']('_update',(_0x32cf49,_0x3a9a12,_0xa9dcbf)=>_0x96f41e(_0x3a9a12,_0xa9dcbf,_0x168c9a)),this['repository']['addRevision'](_0x168c9a),_0x168c9a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1da53b=>{for(const _0x3286bb of this['editor']['model']['document']['getRootNames']())_0x1da53b['detachRoot'](_0x3286bb);});}['_sortAndFilterDiffChanges'](_0x1a7083){const _0x145f33=[],_0x40d99f=new Map();for(const _0xeb6333 of this['editor']['model']['document']['getRootNames']()){const _0x50d858=this['editor']['editing']['view']['getDomRoot'](_0xeb6333);if(!_0x50d858)continue;const _0x5905cf=_0x50d858['getClientRects']()['item'](0x0);_0x5905cf&&(_0x145f33['push'](_0xeb6333),_0x40d99f['set'](_0xeb6333,_0x5905cf));}return _0x145f33['sort']((_0x5b6681,_0x83971)=>{const _0x2145e8=_0x40d99f['get'](_0x5b6681),_0x473752=_0x40d99f['get'](_0x83971);return _0x2145e8['y']-_0x473752['y']||_0x2145e8['x']-_0x473752['x'];}),(_0x1a7083=_0x1a7083['filter'](_0x11b208=>_0x145f33['includes'](_0x11b208['rootName'])))['sort']((_0x537813,_0x43d062)=>_0x145f33['indexOf'](_0x537813['rootName'])-_0x145f33['indexOf'](_0x43d062['rootName'])),_0x1a7083;}['_makeTape'](_0x2baae6){const _0x4083d5=Array['from'](_0x2baae6['markers'])['filter'](([_0x4a030f,_0xd05172])=>_0x4a030f['startsWith']('revision:')&&!_0xd05172['isCollapsed']),_0x2119a8=Array['from'](this['editor']['model']['createRangeIn'](_0x2baae6)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x4083d5['length'])for(const _0x55e963 of _0x2119a8){const [_0x1a5621,_0x31d26b]=_0x4083d5[0x0],[,_0x399490,_0x2c8c20]=_0x1a5621['split'](':');if(_0x31d26b['end']['isEqual'](_0x55e963['nextPosition'])&&_0x4083d5['shift'](),(_0x55e963['previousPosition']['isEqual'](_0x31d26b['start'])||_0x55e963['previousPosition']['isAfter'](_0x31d26b['start']))&&('insertion'==_0x399490?_0x55e963['isAdded']={'userId':_0x2c8c20}:'deletion'==_0x399490&&(_0x55e963['isRemoved']={'userId':_0x2c8c20})),0x0==_0x4083d5['length'])break;}return _0x2119a8;}['_refreshStartEndIndex'](_0x44facd){const _0xf342e6=new Map();for(let _0x5f0cd3=0x0;_0x5f0cd3<_0x44facd['length'];_0x5f0cd3++)'text'===_0x44facd[_0x5f0cd3]['type']?(_0x44facd[_0x5f0cd3]['item']['startIndex']=_0x5f0cd3,_0x44facd[_0x5f0cd3]['item']['endIndex']=_0x5f0cd3):('elementStart'===_0x44facd[_0x5f0cd3]['type']?_0x44facd[_0x5f0cd3]['item']['startIndex']=_0x5f0cd3:'elementEnd'===_0x44facd[_0x5f0cd3]['type']&&(_0x44facd[_0x5f0cd3]['item']['endIndex']=_0x5f0cd3),_0xf342e6['set'](_0x44facd[_0x5f0cd3]['id'],_0x5f0cd3));for(const _0x41513d of _0xf342e6['values']())'elementStart'===_0x44facd[_0x41513d]['type']?_0x44facd[_0x41513d]['item']['endIndex']=_0xf342e6['get'](_0x44facd[_0x41513d]['pairId']):'elementEnd'===_0x44facd[_0x41513d]['type']&&(_0x44facd[_0x41513d]['item']['startIndex']=_0xf342e6['get'](_0x44facd[_0x41513d]['pairId']));}['_processTape'](_0x774158){for(let _0x1a2458=0x0;_0x1a2458<_0x774158['length'];_0x1a2458++){if('elementStart'===_0x774158[_0x1a2458]['type'])_0x774158[_0x1a2458]['item']['startIndex']=_0x1a2458;else{if('elementEnd'===_0x774158[_0x1a2458]['type']){_0x774158[_0x1a2458]['item']['endIndex']=_0x1a2458;const _0x308e72=_0x774158[_0x1a2458]['item']['startIndex'];_0x774158[_0x308e72]['pairId']=_0x774158[_0x1a2458]['id'],_0x774158[_0x1a2458]['pairId']=_0x774158[_0x308e72]['id'];}else _0x774158[_0x1a2458]['item']['startIndex']=_0x1a2458,_0x774158[_0x1a2458]['item']['endIndex']=_0x1a2458,_0x774158[_0x1a2458]['pairId']=null;}_0x774158[_0x1a2458]['markersStart']||(_0x774158[_0x1a2458]['markersStart']=[],_0x774158[_0x1a2458]['markersEnd']=[]);}}['_markInsertions'](_0x58db94,_0x2af9a1){const _0x2b95c4=_0x58db94['filter'](_0x2b3f3c=>!_0x2b3f3c['isAdded']);for(let _0x5160d9=0x0;_0x5160d9<_0x2af9a1['length'];_0x5160d9++)_0x2af9a1[_0x5160d9]['isAdded']&&(_0x2b95c4[_0x5160d9]['isAdded']=_0x2af9a1[_0x5160d9]['isAdded']);}['_getDiff'](_0x4f50dc,_0x318459=null){const _0x900e4f=this['repository']['getRevision'](_0x4f50dc),_0x341385=_0x318459?this['repository']['getRevision'](_0x318459):null,_0x1fcf16=this['_getRevisionsRange'](_0x900e4f,_0x341385),_0x132144=_0x1fcf16[_0x1fcf16['length']-0x1],_0xe017b9=new Map(),_0x3f8873={'model':{},'attributes':{},'changes':[]},_0x4c122b=new Set(),_0x483f79=new Map();for(let _0x64ee4=_0x1fcf16['length']-0x1;_0x64ee4>=0x0;_0x64ee4--){const _0x3118b4=_0x1fcf16[_0x64ee4];for(const _0xe702ec of Object['keys'](_0x3118b4['diffData']))if(_0x3118b4['diffData'][_0xe702ec]['attachChange']){const _0x21ece3=_0x3118b4['diffData'][_0xe702ec]['attachChange'];_0x21ece3['isAttached']?(_0x4c122b['add'](_0xe702ec),_0x483f79['has'](_0xe702ec)&&_0x483f79['get'](_0xe702ec)['userId']==_0x21ece3['userId']?_0x483f79['delete'](_0xe702ec):_0x483f79['set'](_0xe702ec,_0x21ece3)):_0x483f79['has'](_0xe702ec)?(_0x4c122b['delete'](_0xe702ec),_0x483f79['delete'](_0xe702ec)):(_0x4c122b['add'](_0xe702ec),_0x483f79['set'](_0xe702ec,_0x21ece3));}else _0x4c122b['add'](_0xe702ec);}for(const _0xb78017 of _0x4c122b){const _0x3e067d=_0x483f79['has'](_0xb78017)&&!_0x483f79['get'](_0xb78017)['isAttached'];let _0x14d78a=_0x3e067d?_0x1fcf16['length']-0x1:0x0;const _0x54b575=_0x3e067d?-0x1:0x1;for(;_0x1fcf16[_0x14d78a];){const _0x31a01e=_0x1fcf16[_0x14d78a];if(_0x31a01e['diffData'][_0xb78017]){const _0xf72002=_0x3e067d?_0x31a01e['diffData'][_0xb78017]['attributesBefore']:_0x31a01e['diffData'][_0xb78017]['attributesAfter'];_0x3f8873['attributes'][_0xb78017]=_0xf72002?_0x527a66(_0xf72002):{};break;}_0x14d78a+=_0x54b575;}}for(const _0xb173d of _0x1fcf16){_0xb173d['model']={};for(const _0x3d878c of _0xb173d['authors'])_0xe017b9['set'](_0x3d878c['id'],_0x3d878c);for(const _0x33ec15 of _0x4c122b){const _0x4bbd86=_0xb173d['diffData'][_0x33ec15]?_0xb173d['diffData'][_0x33ec15]['insertions']:'[]',_0x2199c9=_0xb173d['diffData'][_0x33ec15]?_0xb173d['diffData'][_0x33ec15]['deletions']:'[]',_0x599d92=_0xb173d['diffData'][_0x33ec15]?.['rootElementName']||'$root';_0xb173d['model'][_0x33ec15]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4bbd86,_0x599d92),'deletions':this['_utils']['_makeModelFromViewString'](_0x2199c9,_0x599d92)};}}for(const _0x365a3d of _0x4c122b){let _0x4c41b3=null,_0x52df91=0x0;const _0x4d6ec5=_0x1fcf16['map'](_0x4dbd55=>_0x4dbd55['diffData'][_0x365a3d]?.['rootElementName'])['find'](_0x252e6e=>void 0x0!==_0x252e6e)||'$root',_0x22a3c1=new Map(Array['from'](_0x900e4f['model'][_0x365a3d]['insertions']['markers'])['filter'](([_0xaac474])=>!_0xaac474['startsWith']('revision:')));let _0x419500=0x0;for(const _0x21470f of _0x1fcf16){const _0x4a261d=this['_makeTape'](_0x21470f['model'][_0x365a3d]['insertions']);_0x21470f==_0x900e4f?(_0x4c41b3=_0x4a261d,_0x52df91=_0x4c41b3['length'],_0x4c41b3['forEach'](_0x4d92c0=>{_0x4d92c0['id']=_0x419500++;}),this['_processTape'](_0x4c41b3)):this['_markInsertions'](_0x4c41b3,_0x4a261d);const _0x11d726=_0x4c41b3['filter'](_0x51806a=>!_0x51806a['isAdded'])['map'](_0x315351=>_0x315351['id']);let _0x4412ac=0x0;const _0x53ea00=this['_makeTape'](_0x21470f['model'][_0x365a3d]['deletions']);_0x53ea00['forEach'](_0x281801=>{_0x281801['isRemoved']?_0x281801['id']=_0x52df91++:_0x281801['id']=_0x11d726[_0x4412ac++];}),this['_processTape'](_0x53ea00),this['_setDistance'](_0x4c41b3,'isAdded'),this['_setDistance'](_0x53ea00,'isRemoved'),_0x21470f==_0x900e4f&&this['_markMarkers'](_0x4c41b3,_0x22a3c1),_0x4c41b3=this['_joinTapes'](_0x4c41b3,_0x53ea00),this['_refreshStartEndIndex'](_0x4c41b3),this['_setDistance'](_0x4c41b3,'isRemoved');}_0x4c41b3=_0x4c41b3['filter'](_0x2527b8=>!(_0x2527b8['isAdded']&&_0x2527b8['isRemoved']));const _0x63a536=new Map(_0x132144['model'][_0x365a3d]['deletions']['markers']),_0x47308f=new Set(_0x22a3c1['keys']());for(const _0x1e0fb6 of _0x63a536['keys']())_0x47308f['delete'](_0x1e0fb6);this['_markSuggestions'](_0x4c41b3,_0x47308f),this['_fixObsoleteTags'](_0x4c41b3),_0x4c41b3=this['_removeMissingPairs'](_0x4c41b3),_0x4c41b3=this['_markMismatchedRemovedTags'](_0x4c41b3),_0x4c41b3=this['_removeUnsupportedChanges'](_0x4c41b3);const {root:_0x5bb5d4,changes:_0x231308}=this['_makeModelFromTape'](_0x4c41b3,_0xe017b9,_0x365a3d,_0x4d6ec5);_0x3f8873['model'][_0x365a3d]=_0x5bb5d4;const _0xcac542=_0x483f79['get'](_0x365a3d);if(_0xcac542){const _0x74e8a6=_0xe017b9['get'](_0xcac542['userId']),_0x153469=new ChangeItem({'author':_0x74e8a6,'type':_0xcac542['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x365a3d});_0x231308['unshift'](_0x153469),_0x3f8873['attributes'][_0x365a3d]['revisionHistoryAttachChange']=_0x153469['id'];}_0x3f8873['changes']=_0x3f8873['changes']['concat'](_0x231308);}return _0x3f8873;}['_markMarkers'](_0x2479ed,_0x12ee00){for(let _0x579a7e=0x0;_0x579a7e<_0x2479ed['length'];_0x579a7e++)for(const [_0x54b306,_0x123917]of _0x12ee00)!_0x123917['isCollapsed']&&_0x123917['start']['isEqual'](_0x2479ed[_0x579a7e]['previousPosition'])&&_0x2479ed[_0x579a7e]['markersStart']['push'](_0x54b306),_0x123917['end']['isEqual'](_0x2479ed[_0x579a7e]['nextPosition'])&&_0x2479ed[_0x579a7e]['markersEnd']['push'](_0x54b306);}['_joinTapes'](_0x5c26d7,_0x3b4ff9){let _0x1f8959=[],_0x4d0f9f=0x0,_0x7b261a=0x0;for(;_0x4d0f9f<_0x5c26d7['length']||_0x7b261a<_0x3b4ff9['length'];){const _0x39efc1=_0x5c26d7[_0x4d0f9f]||{},_0x28ca59=_0x3b4ff9[_0x7b261a]||{};if(_0x39efc1['id']==_0x28ca59['id'])_0x4d0f9f++,_0x7b261a++,_0x1f8959['push'](_0x39efc1);else{if(_0x28ca59['isRemoved']&&_0x39efc1['isAdded']){const {commonTape:_0x13bbf5,iEnd:_0x45ca9c,jEnd:_0x1357c4}=this['_threeWayMerge'](_0x5c26d7,_0x4d0f9f,_0x3b4ff9,_0x7b261a);_0x1f8959=_0x1f8959['concat'](_0x13bbf5),_0x4d0f9f=_0x45ca9c,_0x7b261a=_0x1357c4;}else _0x28ca59['isRemoved']?(_0x7b261a++,_0x1f8959['push'](_0x28ca59)):(_0x4d0f9f++,_0x1f8959['push'](_0x39efc1));}}return _0x1f8959;}['_markSuggestions'](_0x1b5a15,_0x584bf1){const _0x4bc3a2=[];for(let _0x3740f7=0x0;_0x3740f7<_0x1b5a15['length'];_0x3740f7++){for(let _0x10588c=0x0;_0x10588c<_0x1b5a15[_0x3740f7]['markersStart']['length'];_0x10588c++){const _0x22c367=_0x1b5a15[_0x3740f7]['markersStart'][_0x10588c];if(!_0x584bf1['has'](_0x22c367))continue;const {group:_0x4e55fe,type:_0x3ebcce,authorId:_0x4db3a2}=_0x20c608(_0x22c367);'revision-suggestion'!=_0x4e55fe||'insertion'!=_0x3ebcce&&'deletion'!=_0x3ebcce||(_0x4bc3a2['unshift']({'type':_0x3ebcce,'name':_0x22c367,'userId':_0x4db3a2}),_0x1b5a15[_0x3740f7]['markersStart']['splice'](_0x10588c,0x1),_0x10588c--);}_0x1a717b(_0x1b5a15[_0x3740f7]);for(let _0x3fe000=0x0;_0x3fe000<_0x1b5a15[_0x3740f7]['markersEnd']['length'];_0x3fe000++){const _0x577538=_0x1b5a15[_0x3740f7]['markersEnd'][_0x3fe000];if(!_0x584bf1['has'](_0x577538))continue;const {group:_0x493a34,type:_0x503c07}=_0x20c608(_0x577538);if('revision-suggestion'!=_0x493a34||'insertion'!=_0x503c07&&'deletion'!=_0x503c07)continue;_0x1b5a15[_0x3740f7]['markersEnd']['splice'](_0x3fe000,0x1),_0x3fe000--;const _0x54bd8a=_0x4bc3a2['findIndex'](_0x4afdfb=>_0x4afdfb['name']==_0x577538);_0x54bd8a>-0x1&&_0x4bc3a2['splice'](_0x54bd8a,0x1);}}function _0x20c608(_0x364175){const _0x5865e9=_0x364175['split'](':');return{'group':_0x5865e9[0x0],'type':_0x5865e9[0x1],'subType':_0x5865e9['length']>=0x5?_0x5865e9[0x2]:null,'id':_0x5865e9['length']<0x5?_0x5865e9[0x2]:_0x5865e9[0x3],'authorId':_0x5865e9['length']<0x5?_0x5865e9[0x3]:_0x5865e9[0x4],'markerCount':0x6==_0x5865e9['length']?_0x5865e9[0x5]:null};}function _0x1a717b(_0xb3bd3d){for(let _0x1702f1=0x0;_0x1702f1<_0x4bc3a2['length'];_0x1702f1++){if(_0xb3bd3d['isAdded']&&'insertion'==_0x4bc3a2[_0x1702f1]['type']&&_0xb3bd3d['isAdded']['userId']==_0x4bc3a2[_0x1702f1]['userId'])return _0xb3bd3d['isAddSuggestion']=_0x4bc3a2[_0x1702f1],void delete _0xb3bd3d['isAdded'];if(!_0xb3bd3d['isAdded']&&!_0xb3bd3d['isRemoved']&&'deletion'==_0x4bc3a2[_0x1702f1]['type'])return void(_0xb3bd3d['isRemoveSuggestion']=_0x4bc3a2[_0x1702f1]);}}}['_setDistance'](_0x13144c,_0x52eeb3){let _0x329984=0x0,_0x220d63=!0x1;const _0x7c9bc3=new Map();for(const _0x5099ed of _0x13144c)_0x5099ed[_0x52eeb3]?_0x220d63&&(_0x329984++,_0x220d63=!0x1):(_0x329984++,_0x220d63=!0x0),_0x7c9bc3['set'](_0x5099ed['id'],_0x329984);for(let _0x594227=0x0;_0x594227<_0x13144c['length'];_0x594227++){if('isRemoved'==_0x52eeb3&&_0x13144c[_0x594227]['isAdded']||'isAdded'==_0x52eeb3&&_0x13144c[_0x594227]['isRemoved'])continue;if('text'==_0x13144c[_0x594227]['type']){_0x13144c[_0x594227]['distance']=0x0;continue;}const _0x4146f5=_0x7c9bc3['get'](_0x13144c[_0x594227]['pairId']),_0x197f33=_0x7c9bc3['get'](_0x13144c[_0x594227]['id']);_0x13144c[_0x594227]['distance']=_0x4146f5-_0x197f33;}}['_getRevisionsRange'](_0x3c9808,_0x3daf23,_0x2fef34=!0x1){const _0x1bbf4a=[];let _0x2662be=this['repository']['getIndex'](_0x3c9808),_0x533ce0=this['repository']['getIndex'](_0x3daf23);for(-0x1==_0x533ce0&&(_0x533ce0=this['repository']['_revisions']['length'],_0x2fef34=!0x1);_0x2662be<_0x533ce0;)_0x1bbf4a['push'](this['repository']['getRevision'](_0x2662be)),_0x2662be++;return _0x2fef34&&_0x1bbf4a['push'](this['repository']['getRevision'](_0x2662be)),_0x1bbf4a;}['_threeWayMerge'](_0x57cedd,_0x19fc15,_0x1fcfaa,_0xdd63e9){const _0x438a21=this['editor']['model']['schema'];let _0x28021a=_0x19fc15;for(;_0x57cedd[_0x28021a]&&_0x57cedd[_0x28021a]['isAdded'];)_0x28021a++;let _0x123b78=_0xdd63e9;for(;_0x1fcfaa[_0x123b78]&&_0x1fcfaa[_0x123b78]['isRemoved'];)_0x123b78++;_0x2b1282(_0x57cedd,_0x19fc15,_0x28021a),_0x2b1282(_0x1fcfaa,_0xdd63e9,_0x123b78);const _0x5c2ddd=_0x1fcfaa['slice'](_0xdd63e9,_0x123b78)['concat'](_0x57cedd['slice'](_0x19fc15,_0x28021a));return _0x5c2ddd['sort']((_0x4d2dd5,_0x24e3ae)=>_0x4d2dd5['side']!=_0x24e3ae['side']?_0x4d2dd5['side']-_0x24e3ae['side']:_0x4d2dd5['level']!=_0x24e3ae['level']?_0x4d2dd5['level']-_0x24e3ae['level']:_0x4d2dd5['distance']!=_0x24e3ae['distance']?_0x24e3ae['distance']-_0x4d2dd5['distance']:!!_0x4d2dd5['isAdded']!=!!_0x24e3ae['isAdded']?-0x1==_0x4d2dd5['side']||0x0==_0x4d2dd5['side']?_0x4d2dd5['isAdded']?-0x1:0x1:_0x4d2dd5['isAdded']?0x1:-0x1:_0x4d2dd5['index']-_0x24e3ae['index']),{'commonTape':_0x5c2ddd,'iEnd':_0x28021a,'jEnd':_0x123b78};function _0x2b1282(_0x658418,_0x1d71ce,_0x3dfc91){let _0x360aaa=-0x1,_0x3d7938=Number['POSITIVE_INFINITY'],_0x3ef597=!0x0;for(let _0x3591b5=_0x1d71ce;_0x3591b5<_0x3dfc91;_0x3591b5++)if(_0x438a21['isInline'](_0x658418[_0x3591b5]['item'])||(_0x3ef597=!0x1),_0x658418[_0x3591b5]['item']['startIndex']<_0x1d71ce&&(_0x360aaa=_0x3591b5),_0x658418[_0x3591b5]['item']['endIndex']>=_0x3dfc91){_0x3d7938=_0x3591b5;break;}_0x3ef597&&(_0x360aaa=_0x3dfc91-0x1);for(let _0x1929c3=_0x1d71ce;_0x1929c3<_0x3dfc91;_0x1929c3++)_0x658418[_0x1929c3]['side']=_0x1929c3<=_0x360aaa?-0x1:_0x1929c3<_0x3d7938?0x0:0x1,_0x658418[_0x1929c3]['index']=_0x1929c3;let _0x37463a=0x0;for(let _0x1a3d49=_0x1d71ce;_0x1a3d49<=_0x360aaa;_0x1a3d49++)0x0==_0x658418[_0x1a3d49]['distance']?_0x658418[_0x1a3d49]['level']=_0x37463a:(_0x37463a++,_0x658418[_0x1a3d49]['level']=_0x37463a,_0x37463a++);for(let _0x40d79b=_0x1d71ce;_0x40d79b<_0x3dfc91;_0x40d79b++)0x0==_0x658418[_0x40d79b]['side']&&(_0x658418[_0x40d79b]['level']=_0x37463a);_0x37463a=0x0;for(let _0x37b204=_0x3dfc91-0x1;_0x37b204>=_0x3d7938;_0x37b204--)0x0==_0x658418[_0x37b204]['distance']?_0x658418[_0x37b204]['level']=_0x37463a:(_0x37463a--,_0x658418[_0x37b204]['level']=_0x37463a,_0x37463a--);}}['_fixObsoleteTags'](_0x4c0d5f){const _0x29af8e=new Map(),_0x2a2921=this['editor']['model']['schema'];for(let _0x5eb623=0x1;_0x5eb623<_0x4c0d5f['length'];_0x5eb623++){let _0x11b39f,_0x3e1334,_0x2de003;const _0x370038=_0x4c0d5f[_0x5eb623],_0x32865f=_0x4c0d5f[_0x5eb623-0x1];if('text'==_0x370038['type'])continue;if(_0x370038['type']!=_0x32865f['type'])continue;if(!_0x2a2921['isBlock'](_0x32865f['item'])||_0x2a2921['isLimit'](_0x32865f['item']))continue;if(!_0x2a2921['isBlock'](_0x370038['item'])||_0x2a2921['isLimit'](_0x370038['item']))continue;if((_0x4c0d5f[_0x5eb623]['isAdded']||_0x4c0d5f[_0x5eb623]['isAddSuggestion'])&&_0x4c0d5f[_0x5eb623-0x1]['isRemoved'])_0x11b39f=_0x4c0d5f[_0x5eb623],_0x3e1334=_0x4c0d5f[_0x5eb623-0x1],_0x2de003=_0x5eb623-0x1;else{if(!_0x4c0d5f[_0x5eb623]['isRemoved']||!_0x4c0d5f[_0x5eb623-0x1]['isAdded']&&!_0x4c0d5f[_0x5eb623-0x1]['isAddSuggestion'])continue;_0x11b39f=_0x4c0d5f[_0x5eb623-0x1],_0x3e1334=_0x4c0d5f[_0x5eb623],_0x2de003=_0x5eb623;}const _0x4d3298=_0x11b39f['level']==_0x3e1334['level'],_0x249368=Math['abs'](_0x11b39f['level'])<Math['abs'](_0x3e1334['level'])&&0x0==_0x3e1334['distance'];(_0x4d3298||_0x249368)&&(_0x29af8e['set'](_0x3e1334['id'],_0x11b39f['id']),_0x4c0d5f['splice'](_0x2de003,0x1),_0x5eb623--,_0x11b39f['isAdded']=!0x1);}for(let _0x2da6f0=0x0;_0x2da6f0<_0x4c0d5f['length'];_0x2da6f0++)_0x29af8e['has'](_0x4c0d5f[_0x2da6f0]['pairId'])&&(_0x4c0d5f[_0x2da6f0]['pairId']=_0x29af8e['get'](_0x4c0d5f[_0x2da6f0]['pairId']));}['_removeMissingPairs'](_0x32493b){const _0x63ebd0=new Set(_0x32493b['map'](_0x3b6601=>_0x3b6601['id']));for(let _0x15523e=0x0;_0x15523e<_0x32493b['length'];_0x15523e++)_0x63ebd0['has'](_0x32493b[_0x15523e]['pairId'])||0x0==_0x32493b[_0x15523e]['distance']||(_0x32493b[_0x15523e]['isIncorrect']=!0x0);return _0x32493b['filter'](_0x49f429=>!_0x49f429['isIncorrect']);}['_markMismatchedRemovedTags'](_0x54b50e){const _0x263e55=new Set();for(let _0x51532a=0x0;_0x51532a<_0x54b50e['length'];_0x51532a++){if(_0x263e55['has'](_0x54b50e[_0x51532a]['id'])&&_0x54b50e[_0x51532a]['isRemoved']&&(_0x54b50e[_0x51532a]['isIncorrect']=!0x0),_0x54b50e[_0x51532a]['isIncorrect'])continue;if(0x0==_0x54b50e[_0x51532a]['distance'])continue;if('elementStart'!=_0x54b50e[_0x51532a]['type'])continue;if(null==_0x54b50e[_0x51532a]['pairId'])continue;let _0x89fe9b=_0x51532a+0x1,_0x5dab21=0x0;for(;_0x54b50e[_0x89fe9b]['id']!=_0x54b50e[_0x51532a]['pairId'];)'elementStart'==_0x54b50e[_0x89fe9b]['type']?_0x5dab21++:'elementEnd'==_0x54b50e[_0x89fe9b]['type']&&_0x5dab21--,_0x89fe9b++;if(0x0!=_0x5dab21){if(_0x54b50e[_0x51532a]['isRemoved'])_0x54b50e[_0x51532a]['isIncorrect']=!0x0;else{for(;_0x89fe9b!=_0x51532a;)_0x54b50e[_0x89fe9b]['isRemoved']&&0x0!=_0x54b50e[_0x89fe9b]['distance']&&(_0x54b50e[_0x89fe9b]['isIncorrect']=!0x0,_0x263e55['add'](_0x54b50e[_0x89fe9b]['pairId'])),_0x89fe9b--;}}}return _0x54b50e['filter'](_0x1acaac=>!_0x1acaac['isIncorrect']);}['_removeUnsupportedChanges'](_0x1054c4){const _0x56e100=this['editor']['model']['schema'];for(let _0x4fdd1b=0x0;_0x4fdd1b<_0x1054c4['length'];_0x4fdd1b++){if(!(_0x1054c4[_0x4fdd1b]['isAdded']||_0x1054c4[_0x4fdd1b]['isAddSuggestion']||_0x1054c4[_0x4fdd1b]['isRemoved']||_0x1054c4[_0x4fdd1b]['isRemoveSuggestion']))continue;if(0x0==_0x1054c4[_0x4fdd1b]['distance'])continue;const _0x2e23b4=_0x1054c4[_0x4fdd1b]['item'];_0x56e100['isBlock'](_0x2e23b4)||_0x56e100['isLimit'](_0x2e23b4)||(_0x1054c4[_0x4fdd1b]['isAdded']&&delete _0x1054c4[_0x4fdd1b]['isAdded'],_0x1054c4[_0x4fdd1b]['isAddSuggestion']&&delete _0x1054c4[_0x4fdd1b]['isAddSuggestion'],_0x1054c4[_0x4fdd1b]['isRemoveSuggestion']&&delete _0x1054c4[_0x4fdd1b]['isRemoveSuggestion'],_0x1054c4[_0x4fdd1b]['isRemoved']&&(_0x1054c4[_0x4fdd1b]['isIncorrect']=!0x0));}return _0x1054c4['filter'](_0x26a9cf=>!_0x26a9cf['isIncorrect']);}['_makeModelFromTape'](_0x5cf989,_0x10dbc6,_0xb82977,_0x7bf851){const _0x3a642f=new _0x34f38e(),_0x22dbc1=[],_0x55db90=new Map(),_0x2fe856=this['editor']['model'],_0x5bc52a=_0x2fe856['schema'],_0x35e7ee=[_0x3a642f],_0x42c861={},_0x51f6ca={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x3a642f['name']=_0x7bf851;let _0x41afa0=null;const _0x18202b=[0x0];for(let _0x613e8e=0x0;_0x613e8e<_0x5cf989['length'];_0x613e8e++)if('elementStart'===_0x5cf989[_0x613e8e]['type']){_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b);const _0x3f68b7=new _0x45e0a6(_0x5cf989[_0x613e8e]['item']['name'],_0x5cf989[_0x613e8e]['item']['getAttributes']());_0x35e7ee[0x0]['_appendChild'](_0x3f68b7),_0x18202b['push'](0x0),_0x35e7ee['unshift'](_0x3f68b7),_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b);}else'elementEnd'===_0x5cf989[_0x613e8e]['type']?(_0x35e7ee['shift'](),_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b),_0x18202b['pop'](),_0x18202b[_0x18202b['length']-0x1]++,_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b)):(_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b),_0x41afa0?_0x41afa0['_data']+=_0x5cf989[_0x613e8e]['item']['data']:_0x41afa0=new _0x541a0c(_0x5cf989[_0x613e8e]['item']['data'],_0x5cf989[_0x613e8e]['item']['getAttributes']()),_0x5cf989[_0x613e8e+0x1]&&'text'===_0x5cf989[_0x613e8e+0x1]['type']&&_0xa4322f(_0x41afa0,_0x5cf989[_0x613e8e+0x1]['item'])||(_0x35e7ee[0x0]['_appendChild'](_0x41afa0),_0x41afa0=null),_0x18202b[_0x18202b['length']-0x1]+=_0x5cf989[_0x613e8e]['item']['offsetSize'],_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b));for(let _0x1d83a7=0x0;_0x1d83a7<_0x5cf989['length'];_0x1d83a7++){const _0x5b1720=_0x5cf989[_0x1d83a7]['previousPosition'],_0x14e620=_0x5cf989[_0x1d83a7]['nextPosition'];for(const _0x3a91a5 of _0x5cf989[_0x1d83a7]['markersStart'])_0x55db90['set'](_0x3a91a5,{'start':_0x5b1720,'end':null});_0x428baf('isRemoveSuggestion',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isAddSuggestion',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isRemoved',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isAdded',_0x1d83a7,_0x5b1720,_0x14e620);for(const _0x5ae9bd of _0x5cf989[_0x1d83a7]['markersEnd']){const _0x1518d6=_0x55db90['get'](_0x5ae9bd);_0x1518d6?_0x1518d6['end']=_0x14e620:_0x55db90['set'](_0x5ae9bd,{'start':_0x14e620,'end':_0x14e620});}}for(const [_0x1e06e0,_0x3007a2]of _0x55db90){const _0x368f59=this['editor']['model']['createRange'](_0x3007a2['start'],_0x3007a2['end']);_0x3a642f['markers']['set'](_0x1e06e0,_0x368f59);}return _0x22dbc1['sort']((_0x22fc17,_0x11fbdf)=>{const _0x5c0529=_0x3a642f['markers']['get']('revision:'+_0x22fc17['id']),_0x56ca2d=_0x3a642f['markers']['get']('revision:'+_0x11fbdf['id']);return _0x5c0529['start']['isBefore'](_0x56ca2d['start'])?-0x1:_0x5c0529['start']['isAfter'](_0x56ca2d['start'])?0x1:_0x5c0529['end']['isBefore'](_0x56ca2d['end'])?-0x1:_0x5c0529['end']['isAfter'](_0x56ca2d['end'])?0x1:'add'===_0x22fc17['type']?-0x1:0x1;}),{'root':_0x3a642f,'changes':_0x22dbc1};function _0x428baf(_0x394085,_0x289711,_0x89fd71,_0x15f296){const _0x1e9d2b=!!_0x5cf989[_0x289711][_0x394085],_0x305eb0=_0x1e9d2b?_0x5cf989[_0x289711][_0x394085]['userId']:null,_0x9e678a=_0x289711===_0x5cf989['length']-0x1,_0x771ef3=_0x51f6ca[_0x394085][0x0],_0x563f2a=_0x5bc52a['isObject'](_0x5cf989[_0x289711]['item']);!_0x42c861[_0x394085]&&_0x1e9d2b?_0x42c861[_0x394085]={'start':_0x89fd71,'tapeItem':_0x5cf989[_0x289711],'userId':_0x305eb0,'type':_0x394085}:_0x42c861[_0x394085]&&!_0x1e9d2b?(_0x42c861[_0x394085]['end']=_0x89fd71,_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]=null):_0x42c861[_0x394085]&&_0x1e9d2b&&_0x42c861[_0x394085]['userId']!==_0x305eb0&&(_0x42c861[_0x394085]['end']=_0x89fd71,_0x771ef3&&_0x771ef3['userId']===_0x42c861[_0x394085]['userId']||_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]={'start':_0x89fd71,'tapeItem':_0x5cf989[_0x289711],'userId':_0x305eb0,'type':_0x394085}),_0x42c861[_0x394085]&&_0x563f2a&&('elementStart'!==_0x5cf989[_0x289711]['type']||_0x771ef3&&_0x771ef3['userId']===_0x305eb0||_0x51f6ca[_0x394085]['unshift']({'userId':_0x305eb0,'object':_0x5cf989[_0x289711]['item'],'change':_0x42c861[_0x394085]}),'elementEnd'===_0x5cf989[_0x289711]['type']&&_0x771ef3&&_0x771ef3['object']===_0x5cf989[_0x289711]['item']&&(_0x51f6ca[_0x394085]['shift'](),_0x42c861[_0x394085]=_0x771ef3['change'])),_0x42c861[_0x394085]&&_0x9e678a&&(_0x42c861[_0x394085]['end']=_0x15f296,_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]=null);}function _0x11004e({start:_0x291db8,end:_0x3d1855,tapeItem:_0x4738bf,userId:_0xbd3e81,type:_0x2462f4}){const _0x22a9e6=_0x4738bf['item'],_0x152e0a=_0x2fe856['schema']['isBlock'](_0x22a9e6)&&!_0x2fe856['schema']['isLimit'](_0x22a9e6),_0x5eaff3=_0x291db8['nodeAfter']==_0x3d1855['parent']&&_0x3d1855['isAtStart'];if(_0x152e0a&&_0x5eaff3)return;const _0x4665cc=_0x2fe856['createRange'](_0x291db8,_0x3d1855),_0x3eafdf=_0x10dbc6['get'](_0xbd3e81),_0x21eb71=new ChangeItem({'author':_0x3eafdf,'type':'isAdded'==_0x2462f4||'isAddSuggestion'==_0x2462f4?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2462f4||'isRemoveSuggestion'==_0x2462f4},'createdAt':new Date(),'rootName':_0xb82977});_0x22dbc1['push'](_0x21eb71),_0x3a642f['markers']['set']('revision:'+_0x21eb71['id'],_0x4665cc);}function _0xa4322f(_0x34ae19,_0x5c8fbc){const _0x49cab5=_0x34ae19['getAttributes'](),_0x5bf926=_0x5c8fbc['getAttributes']();for(const _0x4ea65b of _0x49cab5){if(_0x4ea65b[0x1]!==_0x5c8fbc['getAttribute'](_0x4ea65b[0x0]))return!0x1;_0x5bf926['next']();}return _0x5bf926['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1df0c2=>{const _0x2da276=_0x1df0c2['markerName']['split'](':')[0x1],_0x500234=this['_getChangeFromId'](_0x2da276);if(!_0x500234)return null;const _0x2c12dd='add'==_0x500234['type']?'insertion':'deletion',_0x1c031b=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2c12dd];return _0x500234['data']['isSuggestion']&&_0x1c031b['push']('ck-suggestion-marker-'+_0x2c12dd+'-new'),this['activeChange']==_0x500234&&_0x1c031b['push']('ck-suggestion-marker--active'),{'classes':_0x1c031b,'attributes':{'data-change-id':_0x2da276}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5db322=>{_0x5db322['on']('element:pre',(_0x293a01,_0x512aff,_0x2795c4)=>{const _0x56964c=_0x512aff['viewItem']['getChild'](0x0);if(!_0x56964c||!_0x56964c['is']('element','code'))return;if(!_0x2795c4['consumable']['consume'](_0x56964c,{'attributes':['vid_start','vid_end']}))return;const _0x2dba06=_0x512aff['modelRange']['start']['nodeAfter'];_0x2795c4['writer']['setAttribute']('vid_start',_0x56964c['getAttribute']('vid_start'),_0x2dba06),_0x2795c4['writer']['setAttribute']('vid_end',_0x56964c['getAttribute']('vid_end'),_0x2dba06);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x56fab3=>{_0x56fab3['on']('element',(_0x4d6bbd,_0x36d41b,_0xe7c806)=>{if(!_0xe7c806['consumable']['consume'](_0x36d41b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x36d41b['modelRange']['isCollapsed'])return;const _0x53b46f=_0x36d41b['modelRange']['start']['nodeAfter'];_0x53b46f['hasAttribute']('vid_start')||_0x53b46f['hasAttribute']('vid')||(_0xe7c806['writer']['setAttribute']('vid_start',_0x36d41b['viewItem']['getAttribute']('vid_start'),_0x53b46f),_0xe7c806['writer']['setAttribute']('vid_end',_0x36d41b['viewItem']['getAttribute']('vid_end'),_0x53b46f));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x450c69=>_0x450c69['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x33d2db,[,_0x468f3f])=>{['vid_start','vid_end','vid']['includes'](_0x468f3f)&&(_0x33d2db['return']=!0x0,_0x33d2db['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x46aa7b=>{_0x46aa7b['on']('attribute:vid',(_0x17ab2f,_0x1cf3a,_0x1c6542)=>{if('\x20'!=_0x1cf3a['item']['data']||_0x1cf3a['item']['parent']['maxOffset']>0x1)return;if(!_0x1c6542['consumable']['consume'](_0x1cf3a['item'],_0x17ab2f['name']))return;const _0x49c293=_0x1c6542['writer'],_0x18728a=_0x1c6542['mapper']['toViewRange'](_0x1cf3a['range']);_0x49c293['wrap'](_0x18728a,_0x49c293['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x350473){const _0x355d02=_0x350473['plugins']['get']('RevisionViewer');return(_0x47fb47,_0x49d8c2,_0x5e026d)=>{const _0x312bee=_0x49d8c2['markerName']['split'](':')[0x1],_0x459b29=_0x355d02['_getChangeFromId'](_0x312bee);if(!_0x459b29)return null;const _0x4044e9='add'==_0x459b29['type']?'split':'merge';if(!_0x5e026d['consumable']['test'](_0x49d8c2['markerRange'],_0x47fb47['name']))return;const _0x2a373f=_0x49d8c2['markerRange']['getWalker'](),_0x384a4f=_0x49d8c2['markerRange']['start'],_0x29144a=_0x350473['model']['schema'];let _0x2fabdb=null,_0x532d26=null,_0x39aac5=!0x1,_0x29f8a0=!0x1;for(const _0x5c8334 of _0x2a373f){const _0x3de85b=_0x5c8334['item'];_0x39aac5=_0x39aac5||_0x29144a['isContent'](_0x3de85b);const _0x25ea8c=_0x5e026d['mapper']['toViewElement'](_0x3de85b);if(_0x25ea8c&&_0x25ea8c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5c8334['type']&&(_0x29144a['isBlock'](_0x3de85b)&&!_0x29144a['isLimit'](_0x3de85b)&&(_0x3de85b['nextSibling']||_0x384a4f['isAtEnd']?_0x2fabdb&&_0x2fabdb['parent']==_0x3de85b||(_0x2fabdb=_0x3de85b,_0x296dbf(_0x5c8334['previousPosition']),_0x29f8a0=!0x0):_0x532d26=_0x532d26||_0x5c8334['previousPosition']));}function _0x296dbf(_0x176ca7){const _0x30f73d=_0x5e026d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4044e9}),_0x37f051=_0x5e026d['mapper']['toViewPosition'](_0x176ca7);_0x459b29['data']['isSuggestion']&&_0x5e026d['writer']['addClass']('ck-suggestion-marker-'+_0x4044e9+'-new',_0x30f73d),_0x355d02['activeChange']==_0x459b29&&_0x5e026d['writer']['addClass']('ck-suggestion-marker--active',_0x30f73d),_0x5e026d['writer']['insert'](_0x37f051,_0x30f73d),_0x5e026d['mapper']['bindElementToMarker'](_0x30f73d,_0x49d8c2['markerName']);}_0x39aac5||_0x29f8a0||!_0x532d26||_0x296dbf(_0x532d26);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x195c72,_0xbec0cd,_0xa37980)=>{const _0x2ef848=_0xa37980['mapper']['markerNameToElements'](_0xbec0cd['markerName']);if(_0x2ef848){for(const _0x583791 of _0x2ef848)(_0x583791['hasClass']('ck-suggestion-marker-split')||_0x583791['hasClass']('ck-suggestion-marker-merge'))&&(_0xa37980['mapper']['unbindElementFromMarkerName'](_0x583791,_0xbec0cd['markerName']),_0xa37980['writer']['remove'](_0x583791));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4c3bdd,_0x209e19,_0x28452b)=>{const _0x1f8c51=_0x209e19['markerName']['split'](':')[0x1],_0x10f390=this['_getChangeFromId'](_0x1f8c51);if(!_0x10f390)return null;const _0x38f89f='add'==_0x10f390['type']?'split':'merge';if(_0x28452b['consumable']['test'](_0x209e19['markerRange'],_0x4c3bdd['name']))for(const _0x84ef9d of _0x209e19['markerRange']['getItems']()){if(!_0x84ef9d['is']('element','softBreak'))continue;const _0x4e8f98=_0x28452b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x38f89f}),_0x1f068a=_0x28452b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x84ef9d));_0x10f390['data']['isSuggestion']&&_0x28452b['writer']['addClass']('ck-suggestion-marker-'+_0x38f89f+'-new',_0x4e8f98),this['activeChange']==_0x10f390&&_0x28452b['writer']['addClass']('ck-suggestion-marker--active',_0x4e8f98),_0x28452b['writer']['insert'](_0x1f068a,_0x4e8f98),_0x28452b['mapper']['bindElementToMarker'](_0x4e8f98,_0x209e19['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3daa09=>{for(const _0x26fc04 of this['editor']['model']['document']['getRootNames']()){const _0x49c852=this['editor']['model']['document']['getRoot'](_0x26fc04),_0x427526=this['editor']['editing']['view']['document']['getRoot'](_0x26fc04);if(_0x427526){const _0x1cce40=_0x49c852['getAttribute']('revisionHistoryAttachChange');if(_0x3daa09['removeAttribute']('data-change-id',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root-add',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root-remove',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root--active',_0x427526),_0x1cce40){const _0x194987=this['_getChangeFromId'](_0x1cce40);if(!_0x194987)return null;_0x3daa09['setAttribute']('data-change-id',_0x1cce40,_0x427526),_0x3daa09['addClass']('ck-revision-history-root-'+_0x194987['type'],_0x427526),this['activeChange']==_0x194987&&_0x3daa09['addClass']('ck-revision-history-root--active',_0x427526);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x44f1d0=>'revision-comment:'+_0x44f1d0,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1e6cee=>'revision-suggestion:'+_0x1e6cee,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5de848=>({'name':'suggestion:'+_0x5de848,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3f4b5e=>{const _0x24fe3c=_0x3f4b5e['markerName']['split'](':')[0x1];return'insertion'!=_0x24fe3c&&'deletion'!=_0x24fe3c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x24fe3c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x539f5f,_0xeee255,_0x2f1ab3)=>{const _0x22e44=_0x2f1ab3['mapper']['markerNameToElements'](_0xeee255['markerName']);if(_0x22e44){for(const _0x4826a4 of _0x22e44)_0x4826a4['is']('uiElement')&&(_0x2f1ab3['mapper']['unbindElementFromMarkerName'](_0x4826a4,_0xeee255['markerName']),_0x2f1ab3['writer']['remove'](_0x4826a4));}},{'priority':'high'});}['_getChangeFromId'](_0x49337d){return this['_changeIdToChange']['get'](_0x49337d);}['_getViewForChange'](_0x2e3748){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x2e3748),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x25c0e7,_0x2c294c,_0x2d1153,_0x3fed35)=>{_0x3fed35&&this['_balloon']['remove'](_0x3fed35),_0x2d1153&&(this['_balloon']['add']({'view':_0x2d1153,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x517c89=this['editor']['editing'],_0x2bc9bf=this['_getChangeFromId'](_0x2d1153['changeId']);let _0x1bbcc5;if(_0x2bc9bf['data']['isOnRoot']){const _0x1b9559=_0x517c89['view']['getDomRoot'](_0x2bc9bf['rootName']);_0x1bbcc5=Array['from'](_0x1b9559['getClientRects']());}else{const _0x8320a=this['editor']['model']['markers']['get']('revision:'+_0x2d1153['changeId']);_0x1bbcc5=Array['from'](_0x517c89['mapper']['markerNameToElements'](_0x8320a['name']))['map'](_0x5f1005=>_0x517c89['view']['domConverter']['mapViewToDom'](_0x5f1005))['map'](_0x2361aa=>Array['from'](_0x2361aa['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1bbcc5[0x0];return _0x1bbcc5['find'](_0x1b17be=>_0x1b17be['top']-0x3<=this['_activeViewTarget']['y']&&_0x1b17be['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1b17be['left']-0x3<=this['_activeViewTarget']['x']&&_0x1b17be['right']+0x3>=this['_activeViewTarget']['x'])||_0x1bbcc5[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x49ca26,_0x9b92ee,_0x1c0f55,_0x4f5920)=>{this['activeView']=_0x1c0f55?this['_getViewForChange'](_0x1c0f55):null,this['editor']['model']['change'](()=>{const _0x27ec47=this['editor']['editing'];_0x4f5920&&(_0x4f5920['data']['isOnRoot']?_0x27ec47['view']['change'](_0x219414=>{_0x219414['removeClass']('ck-revision-history-root--active',_0x27ec47['view']['document']['getRoot'](_0x4f5920['rootName']));}):_0x27ec47['reconvertMarker']('revision:'+_0x4f5920['id'])),_0x1c0f55&&(_0x1c0f55['data']['isOnRoot']?_0x27ec47['view']['change'](_0x3b0d27=>{_0x3b0d27['addClass']('ck-revision-history-root--active',_0x27ec47['view']['document']['getRoot'](_0x1c0f55['rootName']));}):_0x27ec47['reconvertMarker']('revision:'+_0x1c0f55['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x13e2b1,_0x594ecd)=>{if(this['activeChange'])return;const _0x3a9d1c=this['_findChangeIdFromDomTarget'](_0x594ecd['target']),_0x533a79=this['_changeIdToChange']['get'](_0x3a9d1c);_0x533a79?(this['_activeViewTarget']={'x':_0x594ecd['domEvent']['x'],'y':_0x594ecd['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x533a79)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x34ae5a,_0x24159b)=>{const _0x90d49c=this['_findChangeIdFromDomTarget'](_0x24159b['target']),_0x309ce0=this['_changeIdToChange']['get'](_0x90d49c);_0x309ce0?(this['_activeViewTarget']={'x':_0x24159b['domEvent']['x'],'y':_0x24159b['domEvent']['y']},_0x309ce0===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x309ce0):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x44f9e1){do{const _0x3232fb=_0x44f9e1['getAttribute']('data-change-id');if(_0x3232fb)return _0x3232fb;_0x44f9e1=_0x44f9e1['parent'];}while(_0x44f9e1);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5d46ea=>{for(const _0x266c2e of this['editor']['model']['markers'])_0x5d46ea['removeMarker'](_0x266c2e);});}}function _t(_0x20f379,_0x49fb84){return(_0x2a0cc8,_0x45e825,_0x147be9)=>{if(!_0x147be9['consumable']['test'](_0x45e825['markerRange'],_0x2a0cc8['name']))return;const _0xb1e4c0=_0x45e825['markerRange']['getWalker'](),_0x4af739=_0x45e825['markerRange']['start'],_0x202cee=_0x20f379['model']['schema'];let _0x31c0a0=null,_0x4331f9=null,_0x3f36d5=!0x1,_0x5a695f=!0x1;for(const _0x6ad58c of _0xb1e4c0){const _0x37dafa=_0x6ad58c['item'];_0x3f36d5=_0x3f36d5||_0x202cee['isContent'](_0x37dafa);const _0x4b993e=_0x147be9['mapper']['toViewElement'](_0x37dafa);if(_0x4b993e&&_0x4b993e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x6ad58c['type']&&(_0x202cee['isBlock'](_0x37dafa)&&!_0x202cee['isLimit'](_0x37dafa)&&(_0x37dafa['nextSibling']||_0x4af739['isAtEnd']?_0x31c0a0&&_0x31c0a0['parent']==_0x37dafa||(_0x31c0a0=_0x37dafa,_0x94cf98(_0x6ad58c['previousPosition']),_0x5a695f=!0x0):_0x4331f9=_0x4331f9||_0x6ad58c['previousPosition']));}function _0x94cf98(_0xf7ea09){const _0x16ccf7=_0x147be9['mapper']['toViewPosition'](_0xf7ea09),_0xe74a0e=_0x147be9['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x49fb84});_0x147be9['writer']['insert'](_0x16ccf7,_0xe74a0e),_0x147be9['mapper']['bindElementToMarker'](_0xe74a0e,_0x45e825['markerName']);}_0x3f36d5||_0x5a695f||!_0x4331f9||_0x94cf98(_0x4331f9);};}class RestoreRevisionCommand extends _0x25b174{constructor(_0x2ceef1){super(_0x2ceef1);const _0x5042f3=_0x2ceef1['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x5042f3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5042f3,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3c14eb=this['editor'],_0x3042ca=_0x3c14eb['plugins']['get'](RevisionViewer),_0x3c0f47=_0x3042ca['isReady']?_0x3042ca['diff']['newRevisionId']:null;_0x3c14eb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3c0f47);}['refresh'](){const {isReady:_0x54f185,isEnabled:_0x335832,repository:_0x169616,diff:_0x349c49}=this['editor']['plugins']['get'](RevisionViewer),_0x3714d6=_0x349c49&&_0x169616['getLaterVisibleRevision'](_0x349c49['newRevisionId']);this['isEnabled']=_0x54f185&&_0x335832&&Boolean(_0x3714d6);}}class ShowChangeCommand extends _0x25b174{['_step'];constructor(_0x3af8c5,{direction:_0x33af63}){super(_0x3af8c5);const _0x32e421=_0x3af8c5['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x33af63?0x1:-0x1,this['listenTo'](_0x32e421,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x32e421,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x32e421,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xd0f723=this['editor'],_0xfd4d1d=_0xd0f723['plugins']['get'](RevisionViewer),{isNavigationMode:_0x52a1e2,currentChangeNumber:_0x2bebaf}=_0xfd4d1d;let _0x4d58f5;if(_0xfd4d1d['activeChange']=_0x52a1e2?_0xfd4d1d['diff']['changes']['get'](_0x2bebaf+this['_step']):_0xfd4d1d['diff']['changes']['first'],_0xfd4d1d['activeChange']['data']['isOnRoot'])_0x4d58f5=_0xd0f723['editing']['view']['getDomRoot'](_0xfd4d1d['activeChange']['rootName']);else{const _0x4901d4=_0xd0f723['model']['markers']['get']('revision:'+_0xfd4d1d['activeChange']['id']);_0x4d58f5=_0x1d3e7d(_0xd0f723['editing'],_0x4901d4);}_0x17cc9f({'target':_0x4d58f5,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2a5277,currentChangeNumber:_0xaacaba,numberOfChanges:_0x5ed73a,isReady:_0xeee4da,isEnabled:_0x589d54}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x589d54&&_0xeee4da&&_0x5ed73a)&&(!_0x2a5277||(0x1===this['_step']?_0xaacaba<_0x5ed73a-0x1:_0xaacaba>0x0));}}class ChangesNavigationView extends _0x39c569{constructor(_0x41985a){super(_0x41985a);const _0x10493d=this['bindTemplate'],_0x676904=new _0x3296a8(_0x41985a),_0x4628ea=new _0x3296a8(_0x41985a);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',(_0x1178b8,_0x33f0f7)=>_0x1178b8&&_0x33f0f7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x23aedf,_0x2190f9,_0x4ce21,_0x1282e6)=>{if(!_0x23aedf)return ft(_0x41985a,'Loading...');if(!_0x4ce21)return ft(_0x41985a,'No\x20changes');const _0x485767=ft(_0x41985a,'NUMBER_OF_CHANGES',_0x4ce21);return _0x1282e6?ft(_0x41985a,'X_OF_Y_CHANGES',[_0x2190f9+0x1,_0x4ce21]):_0x485767;}),_0x676904['set']({'label':ft(_0x41985a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x396732}),_0x4628ea['set']({'label':ft(_0x41985a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3e48c0}),_0x676904['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4628ea['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x676904['on']('execute',()=>this['fire']('execute','backward')),_0x4628ea['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',_0x10493d['if']('_isStatusLabelVisible','ck-hidden',_0x11a2f4=>!_0x11a2f4)]},'children':[{'text':_0x10493d['to']('isNavigationMode',_0x59125b=>_0x59125b?ft(_0x41985a,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x41985a,'Total')+':\x20')}]},{'text':_0x10493d['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x676904,_0x4628ea]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x18ed42{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x7b27b2=this['editor']['editing']['view'];_0x7b27b2['change'](_0x2a22c3=>{for(const _0x335436 of _0x7b27b2['document']['roots'])_0x2a22c3['addClass'](yt,_0x335436);});}['hide'](){const _0x2c73be=this['editor']['editing']['view'];_0x2c73be['change'](_0x34fe94=>{for(const _0x909e70 of _0x2c73be['document']['roots'])_0x34fe94['removeClass'](yt,_0x909e70);});}}class RevisionViewerUI extends _0x18ed42{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x5359e4=this['editor'],_0xbcbed4=_0x5359e4['plugins']['get'](RevisionViewer),_0x4ab7f7=_0x5359e4['plugins']['get'](RevisionViewerLoadingOverlay);_0x5359e4['ui']['componentFactory']['add']('exitToEditing',_0x5be2cc=>{const _0x3c5469=new _0x3296a8(_0x5be2cc);return _0x3c5469['set']({'label':ft(_0x5be2cc,'Back\x20to\x20editing'),'icon':_0x54f965,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3c5469,'execute',()=>{_0x5359e4['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3c5469;}),_0x5359e4['ui']['componentFactory']['add']('restoreRevision',_0x8168d8=>{const _0x200fc5=new _0x3296a8(_0x8168d8);return _0x200fc5['set']({'label':ft(_0x8168d8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x200fc5['bind']('isEnabled')['to'](_0x5359e4['commands']['get']('restoreRevision')),this['listenTo'](_0x200fc5,'execute',()=>_0x5359e4['execute']('restoreRevision')),_0x200fc5;}),_0x5359e4['ui']['componentFactory']['add']('changesNavigation',_0x3af795=>{const _0x397e0e=new ChangesNavigationView(_0x3af795),_0x29cdc8=_0x5359e4['commands']['get']('showPreviousChange'),_0x469fd8=_0x5359e4['commands']['get']('showNextChange');return _0x397e0e['bind']('isBackwardNavigationEnabled')['to'](_0x29cdc8,'isEnabled'),_0x397e0e['bind']('isForwardNavigationEnabled')['to'](_0x469fd8,'isEnabled'),_0x397e0e['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xbcbed4),this['listenTo'](_0x397e0e,'execute',(_0xb39fff,_0x436b09)=>{_0x5359e4['execute']('forward'===_0x436b09?'showNextChange':'showPreviousChange');}),_0x397e0e;}),_0x4ab7f7['show'](),_0xbcbed4['on']('change:isReady',(_0x405a94,_0x42b432,_0xa1548f)=>{_0xa1548f?_0x4ab7f7['hide']():_0x4ab7f7['show']();});}}class RevisionNameView extends _0x321730{['_resizeObserver']=null;constructor(_0x3fb0b6,_0x183fd3){super(_0x3fb0b6,_0x183fd3);const _0x11a72b=this['bindTemplate'];this['set']({'label':ft(_0x3fb0b6,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x3fb0b6,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x11a72b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x122c77(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4aa743=this['fieldView']['element'];this['_tooltipString']=_0x4aa743['scrollWidth']>_0x4aa743['clientWidth']&&_0x4aa743['value']||'';}}class RevisionAuthorView extends _0x39c569{constructor(_0x2adec2,_0x1f92d0,_0x16f381){super(_0x2adec2);const _0x504b35=new nt();_0x504b35['set']({'content':_0x580980,'viewBox':'0\x200\x2011\x2010'});const _0x67855b=['ck','ck-revision-history-sidebar__revision-author'];_0x16f381&&_0x67855b['push']('ck-revision-history-sidebar__revision-author_creator');const _0x37e601=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x2adec2,_0x16f381?'Revision\x20creator':'Revision\x20author')},'children':[_0x504b35,_0x1f92d0['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x67855b},'children':_0x37e601});}}function Rt(_0x3d0644,_0x504ce0){const _0x1575ee=_0x3d0644['bindTemplate'],_0x579887=_0x3d0644['locale'],_0x5c70de=_0x38d1cc(_0x579887);_0x5c70de['panelPosition']='sw';const _0x1c7dbf=function(_0x4f8f7f,_0x327cb2){const _0x1614c5=function(_0x25e52a,_0x4eab0f){const _0x37432e=_0x25e52a['locale'],_0x3a5851={'Compare\x20against\x20selected':ft(_0x37432e,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x37432e,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x37432e,'Restore\x20this\x20revision')};return _0x4eab0f['map'](_0x5a5cb0=>{const _0x327f06=_0x3a5851[_0x5a5cb0['name']];return _0x327f06&&_0x327f06!==_0x5a5cb0['name']&&(_0x5a5cb0['name']=_0x327f06),_0x5a5cb0;});}(_0x4f8f7f,_0x327cb2),_0x395fdd=new _0x12a0e4();for(const _0x2c4ca4 of _0x1614c5){const _0x444e09={'type':'button','model':new rt({'label':_0x2c4ca4['name'],'class':_0x2c4ca4['class'],'withText':!0x0,'role':'menuitem','_action':_0x2c4ca4['action']})};_0x444e09['model']['bind']('isEnabled')['to'](_0x4f8f7f,'isActionsDropdownOpen',_0x1011cc=>'function'!=typeof _0x2c4ca4['isEnabled']||(!_0x1011cc||_0x2c4ca4['isEnabled'](_0x4f8f7f))),_0x395fdd['add'](_0x444e09);}return _0x395fdd;}(_0x3d0644,_0x504ce0);return _0x3d0644['bind']('isActionsDropdownOpen')['to'](_0x5c70de,'isOpen'),_0x5c70de['buttonView']['set']({'label':ft(_0x579887,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x131dec}),_0x5c70de['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1575ee['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1575ee['to'](_0x3486c1=>_0x3486c1['stopPropagation']())}}),_0x5c70de['on']('execute',_0x54b071=>{_0x3d0644['isReady']&&'function'==typeof _0x54b071['source']['_action']&&_0x54b071['source']['_action'](_0x3d0644);}),ot(_0x5c70de,_0x1c7dbf,{'role':'menu'}),_0x5c70de['listenTo'](_0x3d0644,'change:isActionsDropdownOpen',(_0x256db9,_0x295fbd,_0x41ab84)=>{if(_0x41ab84)for(const _0x4f15e5 of _0x5c70de['listView']['items']){const _0x40f0c3=_0x4f15e5['children']['first'],_0x573e8c=_0x504ce0['find'](_0x35d6ac=>_0x35d6ac['action']===_0x40f0c3['_action'])['isVisible'];_0x4f15e5['isVisible']=void 0x0===_0x573e8c||_0x573e8c(_0x3d0644);}}),_0x5c70de;}class RevisionView extends/* #__PURE__ -- @preserve */
27
+ _0x34dc84(_0x39c569){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x541550,_0x561c1d,_0x3971cc,_0x193a43){super(_0x541550);const _0x9c5f05=this['bindTemplate'],_0x1bbe5f=function(_0x151d19,_0x146dcb){const _0x59fd7a=Array['from'](_0x146dcb['authors'])['filter'](_0x22ab29=>_0x22ab29!=_0x146dcb['creator']);return _0x146dcb['creator']&&_0x59fd7a['unshift'](_0x146dcb['creator']),_0x59fd7a['map'](_0x5da99f=>new RevisionAuthorView(_0x151d19,_0x5da99f,_0x5da99f==_0x146dcb['creator']));}(_0x541550,_0x561c1d);this['id']=_0x561c1d['id'],this['_revision']=_0x561c1d,this['_requireRevisionName']=_0x193a43,this['bind']('name','createdAt')['to'](_0x561c1d),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x320f3f=>{return _0x4fac3b=_0x541550['uiLanguage'],(_0x232fb4=_0x320f3f)['toLocaleDateString'](_0x4fac3b,{'month':'long','day':'numeric'})+',\x20'+_0x232fb4['toLocaleTimeString'](_0x4fac3b,{'hour':'numeric','minute':'numeric'});var _0x4fac3b,_0x232fb4;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x541550,_0x212138),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x1dea84=>_0x1dea84||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x17522e,_0x58e22e)=>_0x17522e&&_0x58e22e),this['revisionActionsView']=_0x3971cc&&_0x3971cc['length']?Rt(this,_0x3971cc):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x9c5f05['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x9c5f05['if']('isEnabled','ck-disabled',_0x1fea33=>!_0x1fea33),_0x9c5f05['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x9c5f05['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x9c5f05['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':_0x9c5f05['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':_0x1bbe5f}]},this['revisionActionsView']],'on':{'click':_0x9c5f05['to'](_0x4431b8=>{_0x4431b8['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x2f9d2e=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x2f9d2e,'change',()=>{this['_requireRevisionName']&&!_0x2f9d2e['value']||this['fire']('setName',{'id':this['id'],'name':_0x2f9d2e['value']}),_0x2f9d2e['value']||(_0x2f9d2e['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x3db99a,_0x492e75){const _0x76ad77=vt['fromJSDate'](_0x3db99a)['setLocale'](_0x492e75),_0x4c66b8=vt['local'](),_0x3219c8=_0x4c66b8['minus']({'days':0x1})['startOf']('day');let _0x4f4368,_0x40fa6a;return _0x76ad77['hasSame'](_0x4c66b8,'day')?(_0x4f4368=_0x76ad77['startOf']('day')['toJSDate'](),_0x40fa6a=_0x76ad77['toRelativeCalendar']()):_0x76ad77['hasSame'](_0x3219c8,'day')?(_0x4f4368=_0x3219c8['toJSDate'](),_0x40fa6a=_0x76ad77['toRelativeCalendar']()):_0x76ad77['hasSame'](_0x4c66b8,'week')?(_0x4f4368=_0x76ad77['startOf']('week')['toJSDate'](),_0x40fa6a=_0x76ad77['weekdayLong']||''):_0x76ad77['hasSame'](_0x4c66b8,'year')?(_0x4f4368=_0x76ad77['startOf']('month')['toJSDate'](),_0x40fa6a=_0x76ad77['monthLong']||''):(_0x4f4368=_0x76ad77['startOf']('year')['toJSDate'](),_0x40fa6a=String(_0x76ad77['year'])),{'startDate':_0x4f4368,'localizedPeriodName':_0x40fa6a};}class RevisionsSidebarTimePeriodView extends _0x39c569{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x43ab2d,_0x1d6a02,_0x21ca3c,_0x1cab66){super(_0x43ab2d);const _0xdc75b2=bt(_0x1d6a02,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x1d6a02,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x21ca3c,this['_requireRevisionName']=_0x1cab66,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':_0xdc75b2}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2444fa){const _0x2a2a82=new RevisionView(this['locale'],_0x2444fa,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2a2a82);}['removeRevision'](_0x125f29){const _0x16389d=this['revisionViews']['find'](_0x3358d4=>_0x3358d4['id']===_0x125f29['id']);this['revisionViews']['remove'](_0x16389d);}}class RevisionsSidebarHeaderView extends _0x39c569{constructor(_0x53221a){super(_0x53221a);const _0x538184=new nt();_0x538184['content']=_0x432461,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x538184,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x53221a,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x39c569{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2df669,_0x19083b,_0x56569c,_0xd858f1){super(_0x2df669);const _0x4c4f74=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x19083b,this['_revisionActions']=_0x56569c,this['_requireRevisionName']=_0xd858f1,this['on']('select',(_0xafd71,_0x539da4)=>{this['fire']('revisionSelected',_0x539da4);}),this['on']('setName',(_0x5e8b72,_0x56e324)=>{this['fire']('revisionSetName',_0x56e324);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x2df669),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4c4f74['if']('isEnabled','ck-disabled',_0x3ac4fa=>!_0x3ac4fa)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3f4616 of this['_revisions'])this['_addRevision'](_0x3f4616);this['_revisions']['on']('add',(_0x44c2c6,_0x40085a)=>{this['_addRevision'](_0x40085a);}),this['_revisions']['on']('remove',(_0x44dfd8,_0x3d0016)=>{this['_removeRevision'](_0x3d0016);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x5650cd=>_0x5650cd['revisionViews']['map'](_0x5c80cf=>_0x5c80cf))['flat']();}['selectRevision'](_0xb6f19d){for(const _0x41cd92 of this['revisionViews'])_0xb6f19d&&_0xb6f19d['id']===_0x41cd92['id']?_0x41cd92['select']():_0x41cd92['deselect']();}['highlightRevisions'](_0x1357d0){for(const _0x2d1407 of this['revisionViews'])_0x1357d0['some'](({id:_0x368f33})=>_0x368f33===_0x2d1407['id'])?_0x2d1407['highlight']():_0x2d1407['unhighlight']();}['_addRevision'](_0x521586){const _0x1f17b6=bt(_0x521586['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x351422=this['_getTimePeriodViewByStartDate'](_0x1f17b6);_0x351422||(_0x351422=new RevisionsSidebarTimePeriodView(this['locale'],_0x1f17b6,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x351422)),_0x351422['addRevision'](_0x521586);}['_removeRevision'](_0x270e56){const _0x4885f2=bt(_0x270e56['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4885f2)['removeRevision'](_0x270e56);}['_getTimePeriodViewByStartDate'](_0x21681e){return this['timePeriodViews']['find'](_0x2a5e93=>_0x2a5e93['startDate']['getTime']()===_0x21681e['getTime']());}}class RevisionsSidebar extends _0x18ed42{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x5e1eac){super(_0x5e1eac),this['_revisionViewer']=_0x5e1eac['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x3d089e=this['_revisionsRepository']['_revisions'],_0x1a1bbe=this['_createRevisionActions'](),_0x406b32=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x3d089e,_0x1a1bbe,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',(_0x6fda4a,_0x5adc23)=>{_0x5adc23['revisionViews']['on']('add',(_0x37ac87,_0x35cbc6)=>{_0x35cbc6['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)),_0x406b32['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x158422=this['_revisionsRepository']['getRevision'](0x0);if(_0x158422){const _0x292e47=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x158422['id']);this['_revisionViewer']['compare'](_0x158422,_0x292e47);}}['_handleRevisionSelected'](_0x6d6da1,_0xdd258e){const _0x3e4b85=this['_revisionsRepository']['getRevision'](_0xdd258e['id']),_0xaa8dfe=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3e4b85['id']);this['_revisionViewer']['compare'](_0x3e4b85,_0xaa8dfe);}['_handleRevisionSetName'](_0x278688,_0x54f927){this['_revisionsRepository']['getRevision'](_0x54f927['id'])['setName'](_0x54f927['name']);}['_handleDiffChange'](_0x40d8f5,_0x27c212,_0x1a0ba3){const _0x539e3e=this['_revisionsRepository']['getRevisionsInDiff'](_0x1a0ba3);_0x539e3e['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x539e3e),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x539e3e[0x0]));}['_createRevisionActions'](){const _0x1a8fee=this['editor'],_0x3fd00c=RevisionsSidebar['availableRevisionActions'],_0x49c0ea=_0x1a8fee['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x49c0ea['length'])return _0x49c0ea['map'](_0x18374e=>{const _0x46b5aa='string'==typeof _0x18374e?Object['assign']({},_0x3fd00c[_0x18374e]):_0x18374e;return _0x46b5aa['action']=_0x46b5aa['action']['bind'](this,_0x1a8fee),_0x46b5aa['isVisible']&&(_0x46b5aa['isVisible']=_0x46b5aa['isVisible']['bind'](this,_0x1a8fee)),_0x46b5aa;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x50d21b},_0x2c8ca6)=>{const _0x219c5f=_0x50d21b['get'](RevisionViewer),_0x2f0ef4=_0x219c5f['repository'];let _0x469fc9=_0x219c5f['diff']['newRevisionId'],_0x5c52da=_0x2c8ca6['id'];_0x2f0ef4['getIndex'](_0x469fc9)>_0x2f0ef4['getIndex'](_0x5c52da)&&([_0x469fc9,_0x5c52da]=[_0x5c52da,_0x469fc9]),_0x219c5f['compare'](_0x469fc9,_0x5c52da);},'isVisible':({plugins:_0x4a0a95},_0x1f21e3)=>{const _0x3ba426=_0x4a0a95['get'](RevisionViewer);return!(_0x3ba426['repository']['getRevisionsInDiff'](_0x3ba426['diff'])['length']>0x2)&&!_0x1f21e3['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x36ddb1,{id:_0x4878ff})=>{_0x36ddb1['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4878ff);},'isVisible':({plugins:_0x42e534},_0x49b071)=>!!_0x42e534['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x49b071['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x387f9b},{id:_0x4b57f0,revisionNameView:_0x549742})=>{const _0x2c282f=_0x387f9b['get'](RevisionViewer),_0x27936a=_0x2c282f['repository']['getEarlierVisibleRevision'](_0x4b57f0);_0x2c282f['compare'](_0x4b57f0,_0x27936a),_0x549742['focus'](),_0x549742['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4a2f37,_0x5a726d){super(_0x4a2f37),this['_view']=_0x5a726d,this['_toolbarConfig']=ht(_0x4a2f37['config']['get']('toolbar')),this['_elementReplacer']=new _0xf2e4c6();}get['element'](){return this['view']['element'];}['init'](_0x3367a3){const _0x560b9c=this['editor'],_0x2f17e7=this['view'],_0x1ae77a=_0x560b9c['editing']['view'],_0x498a5c=_0x2f17e7['editable'],_0x4108be=_0x1ae77a['document']['getRoot']();_0x498a5c['name']=_0x4108be['rootName'],_0x2f17e7['render']();const _0x58c219=_0x498a5c['element'];this['setEditableElement'](_0x498a5c['name'],_0x58c219),_0x2f17e7['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1ae77a['attachDomRoot'](_0x58c219),this['_elementReplacer']['replace'](_0x3367a3,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x18d519=this['view'],_0x41eb6c=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x41eb6c['detachDomRoot'](_0x18d519['editable']['name']),_0x18d519['destroy']();}['_initToolbar'](){const _0x320e34=this['view'];_0x320e34['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x320e34['stickyPanel']['limiterElement']=_0x320e34['element'],_0x320e34['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x32e7d0})=>_0x32e7d0),_0x320e34['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x320e34['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x53c566,_0x3cddcb,_0x298273={}){super(_0x53c566),this['stickyPanel']=new lt(_0x53c566),this['toolbar']=new ut(_0x53c566,{'shouldGroupWhenFull':_0x298273['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x53c566,_0x3cddcb);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
30
- _0x47b989(_0x5909ee){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x300a83,_0xd7b820){super(_0xd7b820),this['sourceElement']=_0x300a83,this['model']['document']['createRoot']();const _0x46870e=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x46870e);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4ca788,_0x1c1ec8){const _0x5c4a80=new this(_0x4ca788,_0x1c1ec8);return await _0x5c4a80['initPlugins'](),await _0x5c4a80['ui']['init'](_0x4ca788),await _0x5c4a80['data']['init'](_0x5c4a80['config']['get']('initialData')||''),_0x5c4a80['fire']('ready'),_0x5c4a80;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x41f403{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f8dd2){function _0x85e897(_0x54c161){return _0x54c161['map'](_0x15ce16=>String['fromCharCode'](_0x15ce16))['join']('');}super(_0x4f8dd2),this['result']='end',_0x4f8dd2[_0x85e897([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x85e897([0x76,0x69,0x65,0x77])][_0x85e897([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x85e897([0x61,0x75,0x74,0x6f]),_0x4f8dd2[_0x85e897([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x85e897([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x85e897([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x85e897([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x85e897([0x6f,0x6b])});}}class RevisionHistory extends _0x41f403{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x200554){if(super(_0x200554),!this['editor']['config']['get']('revisionHistory'))throw new _0x37ae31('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3a957b=>this['_showRevisionViewer']({..._0x3a957b,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4e91f1=>this['_closeRevisionViewer'](_0x4e91f1)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x6c94d7=>this['_restoreRevision'](_0x6c94d7)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2f7429){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2f7429;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x29bacd){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x29bacd);}['getRevision'](_0x25d1d1){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x25d1d1);}['getRevisions'](_0x14aafd){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x14aafd||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x3bb264=this['editor'],_0x2f7414=_0xee47a9(_0x3bb264,It),_0xa49dd0=_0x3bb264['plugins']['get']('RevisionTracker'),_0x28c0f3=_0x3bb264['plugins']['get'](_0x5445fe)['users'];return _0x2f7414['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2f7414['lazyRoots'],(_0x2f7414['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x41f403{static get['requires'](){return[RevisionViewer,_0x5445fe];}['init'](){const _0xf1409d=this['editor']['plugins']['get'](_0x5445fe);for(const _0x23d76e of _0x28c0f3)_0x23d76e['isAnonymous']||_0xf1409d['getUser'](_0x23d76e['id'])||_0xf1409d['addUser'](_0x23d76e);const _0x7b1005=_0xa49dd0['repository']['getRevisions']();let _0x364ecc=null;const _0x1e45f2=this['editor']['plugins']['get']('RevisionViewer');_0x1e45f2['adapter']=_0xa49dd0['adapter'],_0x1e45f2['bind']('isEnabled')['to'](_0xa49dd0),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x3bb264,'isReadOnly',_0x5b4914=>!_0x5b4914);for(const _0x3ac34b of _0x7b1005){const _0x129016=null===_0x3ac34b['creator'];if(_0x129016&&_0x3ac34b['toVersion']===_0x3ac34b['fromVersion'])continue;const _0x516f15=_0x3ac34b['toJSON']();_0x1e45f2['addRevisionData'](_0x516f15,(_0x19a491,_0x18e431,_0x249bfe)=>{if(_0x129016){if(_0x364ecc)_0x364ecc['_update'](_0x19a491,_0x18e431);else{if(!_0x18e431){const _0x510277=_0x249bfe['toJSON']();_0x510277['id']=_0x39af30(),_0xa49dd0['saveRevision'](_0x510277,_0x249bfe['toVersion'])['then'](_0x18820e=>{_0x364ecc=_0x18820e;});}}}else _0x3ac34b['_update'](_0x19a491,_0x18e431);});}}},RevisionsSidebar),_0x2f7414);}['_enhanceShowRevisionViewerCallback'](){const _0x36118e=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x5a3a5c=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0xc0c909=this['editor']['plugins']['get']('Autosave');await _0xc0c909['save']();}else await _0x5a3a5c['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xb2cec4=this['editor']['plugins']['get']('Dialog');_0xb2cec4['isOpen']&&_0xb2cec4['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x590236=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xd5ef21 of _0x590236)_0xd5ef21['class']=_0xd5ef21['class']?_0xd5ef21['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x19328e=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x19328e&&_0x19328e['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x43cc74=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x43cc74&&_0x43cc74['setAttribute']('tabindex','-1');}}const _0xc758ed=this['_getRevisionViewerEditorConfig']();return _0x36118e(_0xc758ed)['then'](_0x3750fd=>{return(this['_viewerEditor']=_0x3750fd,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x3750fd);})['catch'](_0x362168=>(console['error'](_0x362168),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4f0cb9=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0xe0ebd3=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1aa7ac of _0xe0ebd3)_0x1aa7ac['class']='ck-tab-panel_disabled'===_0x1aa7ac['class']?'':_0x1aa7ac['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x23b941=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x23b941&&_0x23b941['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x34c2bf=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x34c2bf&&_0x34c2bf['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4f0cb9(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2a2935=this['editor']['plugins']['get']('Annotations');_0x2a2935['refreshVisibility'](),_0x2a2935['refreshPositioning']();}});});}['_showRevisionViewer'](_0x142e91){const _0x1b5647=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4d1c9f=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x38c5c2=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x38c5c2,_0x142e91)['then'](_0x2321f5=>(_0x4d1c9f['style']['display']='block',_0x1b5647['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2321f5));}['_closeRevisionViewer'](_0x276bb7){const _0x5f9c84=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5f9c84['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x276bb7['destroy']();}async['_restoreRevision'](_0x1a480f){const _0x13a44b=this['editor'],_0x52f8cd=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x31b764=_0x13a44b['plugins']['get']('RevisionTracker'),_0xe0922f=_0x13a44b['plugins']['get']('RevisionHistoryUtils'),_0x52968a=_0x52f8cd['repository']['getRevision'](_0x1a480f);let _0x5c3b29,_0x738519,_0x42d3bc;try{await _0xe0922f['loadRevisionData'](_0x52968a,this['adapter']),_0x5c3b29=_0xe0922f['getRevisionDocumentData'](_0x52968a),_0x738519=_0xe0922f['getRevisionRootsAttributes'](_0x52968a);}catch(_0x3d757d){return void console['error'](_0x3d757d);}_0x13a44b['model']['change'](_0x40416c=>{for(const _0xe79c00 of Array['from'](_0x13a44b['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x40416c['removeMarker'](_0xe79c00);}),_0x52f8cd['isReady']=!0x1,_0x13a44b['model']['enqueueChange'](_0x4f8dc0=>{_0x4f8dc0['setSelection'](null),_0x4f8dc0['removeSelectionAttribute'](_0x13a44b['model']['document']['selection']['getAttributeKeys']());const _0x43edf7=Object['keys'](_0x5c3b29);for(const _0x1ef2e5 of _0x13a44b['model']['document']['roots'])'$graveyard'!=_0x1ef2e5['rootName']&&_0x1ef2e5['isAttached']()&&!_0x43edf7['includes'](_0x1ef2e5['rootName'])&&_0x4f8dc0['detachRoot'](_0x1ef2e5);for(const _0x3fdf9c of _0x43edf7){let _0x16060d=_0x13a44b['model']['document']['getRoot'](_0x3fdf9c);if(!_0x16060d||!_0x16060d['isAttached']()){const _0x43768a=_0x52968a['diffData']?.[_0x3fdf9c]?.['rootElementName']||'$root';_0x16060d=_0x4f8dc0['addRoot'](_0x3fdf9c,_0x43768a);}const _0x3ab28e=_0x738519[_0x3fdf9c],_0x58cfbe=Object['keys'](_0x3ab28e),_0x391397=_0x5c3b29[_0x3fdf9c];for(const _0x22b1f2 of _0x16060d['getAttributeKeys']())_0x58cfbe['includes'](_0x22b1f2)||_0x4f8dc0['removeAttribute'](_0x22b1f2,_0x16060d);for(const _0x5b0587 of _0x58cfbe)_0x4f8dc0['setAttribute'](_0x5b0587,_0x738519[_0x3fdf9c][_0x5b0587],_0x16060d);_0x4f8dc0['remove'](_0x4f8dc0['createRangeIn'](_0x16060d)),_0x4f8dc0['insert'](_0x13a44b['data']['parse'](_0x391397,_0x16060d),_0x16060d,0x0);}});const _0x2f31b6=ft(_0x13a44b['locale'],'Restored');if(_0x52968a['name'])_0x42d3bc=-0x1==_0x52968a['name']['indexOf'](_0x2f31b6)?_0x2f31b6+':\x20'+_0x52968a['name']:_0x52968a['name'];else _0x42d3bc=_0x2f31b6+':\x20'+(_0x52968a['createdAt']['toLocaleDateString'](_0x13a44b['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x52968a['createdAt']['toLocaleTimeString'](_0x13a44b['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x31b764['saveRevision']({'name':_0x42d3bc}),_0x52f8cd['isReady']=!0x0,_0x13a44b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
29
+ kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x369e50){super(_0x369e50),this['_revisionViewer']=_0x369e50['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x4e00da=this['_revisionsRepository']['_revisions'],_0x12eefb=this['_createRevisionActions'](),_0x540dfd=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x4e00da,_0x12eefb,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',(_0x325b9d,_0xe74fb5)=>{_0xe74fb5['revisionViews']['on']('add',(_0x2a647f,_0x15dc23)=>{_0x15dc23['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)),_0x540dfd['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x3e0a3a=this['_revisionsRepository']['getRevision'](0x0);if(_0x3e0a3a){const _0x3e2a16=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3e0a3a['id']);this['_revisionViewer']['compare'](_0x3e0a3a,_0x3e2a16);}}['_handleRevisionSelected'](_0x293d61,_0x53dc50){const _0x14724e=this['_revisionsRepository']['getRevision'](_0x53dc50['id']),_0x3d9efe=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x14724e['id']);this['_revisionViewer']['compare'](_0x14724e,_0x3d9efe);}['_handleRevisionSetName'](_0x579e41,_0x5d73f8){this['_revisionsRepository']['getRevision'](_0x5d73f8['id'])['setName'](_0x5d73f8['name']);}['_handleDiffChange'](_0x2df8ff,_0x516935,_0x254d59){const _0x2bca80=this['_revisionsRepository']['getRevisionsInDiff'](_0x254d59);_0x2bca80['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x2bca80),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x2bca80[0x0]));}['_createRevisionActions'](){const _0x119d9c=this['editor'],_0x429109=RevisionsSidebar['availableRevisionActions'],_0x47e189=_0x119d9c['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x47e189['length'])return _0x47e189['map'](_0x52eec1=>{const _0x5d3810='string'==typeof _0x52eec1?Object['assign']({},_0x429109[_0x52eec1]):_0x52eec1;return _0x5d3810['action']=_0x5d3810['action']['bind'](this,_0x119d9c),_0x5d3810['isVisible']&&(_0x5d3810['isVisible']=_0x5d3810['isVisible']['bind'](this,_0x119d9c)),_0x5d3810;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x412fb3},_0x1cf93d)=>{const _0x2b8f44=_0x412fb3['get'](RevisionViewer),_0x2725fc=_0x2b8f44['repository'];let _0x1197ec=_0x2b8f44['diff']['newRevisionId'],_0x19bc24=_0x1cf93d['id'];_0x2725fc['getIndex'](_0x1197ec)>_0x2725fc['getIndex'](_0x19bc24)&&([_0x1197ec,_0x19bc24]=[_0x19bc24,_0x1197ec]),_0x2b8f44['compare'](_0x1197ec,_0x19bc24);},'isVisible':({plugins:_0xae3375},_0x7b19ac)=>{const _0x556177=_0xae3375['get'](RevisionViewer);return!(_0x556177['repository']['getRevisionsInDiff'](_0x556177['diff'])['length']>0x2)&&!_0x7b19ac['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1b0a7f,{id:_0x346a4c})=>{_0x1b0a7f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x346a4c);},'isVisible':({plugins:_0x44f764},_0x1f7b2d)=>!!_0x44f764['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x1f7b2d['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x115028},{id:_0x5cd67a,revisionNameView:_0x4a93a3})=>{const _0x311d44=_0x115028['get'](RevisionViewer),_0x2459a0=_0x311d44['repository']['getEarlierVisibleRevision'](_0x5cd67a);_0x311d44['compare'](_0x5cd67a,_0x2459a0),_0x4a93a3['focus'](),_0x4a93a3['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x41eba7,_0x2ae504){super(_0x41eba7),this['_view']=_0x2ae504,this['_toolbarConfig']=ht(_0x41eba7['config']['get']('toolbar')),this['_elementReplacer']=new _0x1af71a();}get['element'](){return this['view']['element'];}['init'](_0x110a3f){const _0x1fff98=this['editor'],_0x174094=this['view'],_0x57c5bf=_0x1fff98['editing']['view'],_0x235f76=_0x174094['editable'],_0xd1bbce=_0x57c5bf['document']['getRoot']();_0x235f76['name']=_0xd1bbce['rootName'],_0x174094['render']();const _0x23063b=_0x235f76['element'];this['setEditableElement'](_0x235f76['name'],_0x23063b),_0x174094['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x57c5bf['attachDomRoot'](_0x23063b),this['_elementReplacer']['replace'](_0x110a3f,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x470acc=this['view'],_0x2921d5=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x2921d5['detachDomRoot'](_0x470acc['editable']['name']),_0x470acc['destroy']();}['_initToolbar'](){const _0x1d0b76=this['view'];_0x1d0b76['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1d0b76['stickyPanel']['limiterElement']=_0x1d0b76['element'],_0x1d0b76['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x466e10})=>_0x466e10),_0x1d0b76['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1d0b76['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x535ffc,_0x4ebcbe,_0x203459={}){super(_0x535ffc),this['stickyPanel']=new lt(_0x535ffc),this['toolbar']=new ut(_0x535ffc,{'shouldGroupWhenFull':_0x203459['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x535ffc,_0x4ebcbe);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
30
+ _0x443cf2(_0x2c191d){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3c75d0,_0x3b04c4){super(_0x3b04c4),this['sourceElement']=_0x3c75d0,this['model']['document']['createRoot']();const _0x2c1442=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x2c1442);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x2707a3,_0x2926c4){const _0x1cf995=new this(_0x2707a3,_0x2926c4);return await _0x1cf995['initPlugins'](),await _0x1cf995['ui']['init'](_0x2707a3),await _0x1cf995['data']['init'](_0x1cf995['config']['get']('initialData')||''),_0x1cf995['fire']('ready'),_0x1cf995;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x18ed42{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x45366e){function _0x33097e(_0x55c7ed){return _0x55c7ed['map'](_0x5dcbdb=>String['fromCharCode'](_0x5dcbdb))['join']('');}super(_0x45366e),this['result']='end',_0x45366e[_0x33097e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33097e([0x76,0x69,0x65,0x77])][_0x33097e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x33097e([0x61,0x75,0x74,0x6f]),_0x45366e[_0x33097e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x33097e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x33097e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x33097e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x33097e([0x6f,0x6b])});}}class RevisionHistory extends _0x18ed42{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x118676){if(super(_0x118676),!this['editor']['config']['get']('revisionHistory'))throw new _0x1f5a5b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xc3c8a5=>this['_showRevisionViewer']({..._0xc3c8a5,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x15aabe=>this['_closeRevisionViewer'](_0x15aabe)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x53aaef=>this['_restoreRevision'](_0x53aaef)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x423d8d){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x423d8d;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x56b804){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x56b804);}['getRevision'](_0x661238){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x661238);}['getRevisions'](_0x416205){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x416205||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x42a0c5=this['editor'],_0x1ff72f=_0x554e49(_0x42a0c5,It),_0x4402ff=_0x42a0c5['plugins']['get']('RevisionTracker'),_0x3c2bd3=_0x42a0c5['plugins']['get'](_0x4c4887)['users'];return _0x1ff72f['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1ff72f['lazyRoots'],(_0x1ff72f['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x18ed42{static get['requires'](){return[RevisionViewer,_0x4c4887];}['init'](){const _0x44f1ff=this['editor']['plugins']['get'](_0x4c4887);for(const _0x2bc809 of _0x3c2bd3)_0x2bc809['isAnonymous']||_0x44f1ff['getUser'](_0x2bc809['id'])||_0x44f1ff['addUser'](_0x2bc809);const _0x33be09=_0x4402ff['repository']['getRevisions']();let _0x1daa02=null;const _0x165344=this['editor']['plugins']['get']('RevisionViewer');_0x165344['adapter']=_0x4402ff['adapter'],_0x165344['bind']('isEnabled')['to'](_0x4402ff),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x42a0c5,'isReadOnly',_0x3ff5d7=>!_0x3ff5d7);for(const _0x26d11f of _0x33be09){const _0x273944=null===_0x26d11f['creator'];if(_0x273944&&_0x26d11f['toVersion']===_0x26d11f['fromVersion'])continue;const _0x49a8d1=_0x26d11f['toJSON']();_0x165344['addRevisionData'](_0x49a8d1,(_0x3886c6,_0x46fad3,_0x31d52c)=>{if(_0x273944){if(_0x1daa02)_0x1daa02['_update'](_0x3886c6,_0x46fad3);else{if(!_0x46fad3){const _0x3f500d=_0x31d52c['toJSON']();_0x3f500d['id']=_0x55087c(),_0x4402ff['saveRevision'](_0x3f500d,_0x31d52c['toVersion'])['then'](_0x41115c=>{_0x1daa02=_0x41115c;});}}}else _0x26d11f['_update'](_0x3886c6,_0x46fad3);});}}},RevisionsSidebar),_0x1ff72f);}['_enhanceShowRevisionViewerCallback'](){const _0xf28c12=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3fd3c1=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x447f07=this['editor']['plugins']['get']('Autosave');await _0x447f07['save']();}else await _0x3fd3c1['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5d268d=this['editor']['plugins']['get']('Dialog');_0x5d268d['isOpen']&&_0x5d268d['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x3587aa=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4b4676 of _0x3587aa)_0x4b4676['class']=_0x4b4676['class']?_0x4b4676['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x11b976=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x11b976&&_0x11b976['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xcd86ab=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xcd86ab&&_0xcd86ab['setAttribute']('tabindex','-1');}}const _0x38aa35=this['_getRevisionViewerEditorConfig']();return _0xf28c12(_0x38aa35)['then'](_0x281268=>{return(this['_viewerEditor']=_0x281268,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x281268);})['catch'](_0x320d6c=>(console['error'](_0x320d6c),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3be552=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x21ec5e=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x197d52 of _0x21ec5e)_0x197d52['class']='ck-tab-panel_disabled'===_0x197d52['class']?'':_0x197d52['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x1ae869=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1ae869&&_0x1ae869['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x425dd1=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x425dd1&&_0x425dd1['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3be552(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x177062=this['editor']['plugins']['get']('Annotations');_0x177062['refreshVisibility'](),_0x177062['refreshPositioning']();}});});}['_showRevisionViewer'](_0x7ebf95){const _0x595a90=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x581840=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x455657=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x455657,_0x7ebf95)['then'](_0x1e793f=>(_0x581840['style']['display']='block',_0x595a90['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1e793f));}['_closeRevisionViewer'](_0x497eae){const _0x40ec84=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x40ec84['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x497eae['destroy']();}async['_restoreRevision'](_0x11dd94){const _0x48ad1e=this['editor'],_0x2eba80=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xf1e945=_0x48ad1e['plugins']['get']('RevisionTracker'),_0xabc710=_0x48ad1e['plugins']['get']('RevisionHistoryUtils'),_0x8ded6b=_0x2eba80['repository']['getRevision'](_0x11dd94);let _0x1d598c,_0x180891,_0x550707;try{await _0xabc710['loadRevisionData'](_0x8ded6b,this['adapter']),_0x1d598c=_0xabc710['getRevisionDocumentData'](_0x8ded6b),_0x180891=_0xabc710['getRevisionRootsAttributes'](_0x8ded6b);}catch(_0x25def1){return void console['error'](_0x25def1);}_0x48ad1e['model']['change'](_0x5aed60=>{for(const _0x4ae39d of Array['from'](_0x48ad1e['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5aed60['removeMarker'](_0x4ae39d);}),_0x2eba80['isReady']=!0x1,_0x48ad1e['model']['enqueueChange'](_0x147cc1=>{_0x147cc1['setSelection'](null),_0x147cc1['removeSelectionAttribute'](_0x48ad1e['model']['document']['selection']['getAttributeKeys']());const _0x578b00=Object['keys'](_0x1d598c);for(const _0x67aa00 of _0x48ad1e['model']['document']['roots'])'$graveyard'!=_0x67aa00['rootName']&&_0x67aa00['isAttached']()&&!_0x578b00['includes'](_0x67aa00['rootName'])&&_0x147cc1['detachRoot'](_0x67aa00);for(const _0xad344e of _0x578b00){let _0x4f4afb=_0x48ad1e['model']['document']['getRoot'](_0xad344e);if(!_0x4f4afb||!_0x4f4afb['isAttached']()){const _0x3ca181=_0x8ded6b['diffData']?.[_0xad344e]?.['rootElementName']||'$root';_0x4f4afb=_0x147cc1['addRoot'](_0xad344e,_0x3ca181);}const _0x3fe02f=_0x180891[_0xad344e],_0x43cf0a=Object['keys'](_0x3fe02f),_0x21351d=_0x1d598c[_0xad344e];for(const _0xa1e2c3 of _0x4f4afb['getAttributeKeys']())_0x43cf0a['includes'](_0xa1e2c3)||_0x147cc1['removeAttribute'](_0xa1e2c3,_0x4f4afb);for(const _0x475ba0 of _0x43cf0a)_0x147cc1['setAttribute'](_0x475ba0,_0x180891[_0xad344e][_0x475ba0],_0x4f4afb);_0x147cc1['remove'](_0x147cc1['createRangeIn'](_0x4f4afb)),_0x147cc1['insert'](_0x48ad1e['data']['parse'](_0x21351d,_0x4f4afb),_0x4f4afb,0x0);}});const _0x4e0e41=ft(_0x48ad1e['locale'],'Restored');if(_0x8ded6b['name'])_0x550707=-0x1==_0x8ded6b['name']['indexOf'](_0x4e0e41)?_0x4e0e41+':\x20'+_0x8ded6b['name']:_0x8ded6b['name'];else _0x550707=_0x4e0e41+':\x20'+(_0x8ded6b['createdAt']['toLocaleDateString'](_0x48ad1e['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x8ded6b['createdAt']['toLocaleTimeString'](_0x48ad1e['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xf1e945['saveRevision']({'name':_0x550707}),_0x2eba80['isReady']=!0x0,_0x48ad1e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-revision-history",
3
- "version": "48.2.0-alpha.3",
3
+ "version": "48.2.0-alpha.5",
4
4
  "description": "Document revision history feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -34,15 +34,15 @@
34
34
  "./package.json": "./package.json"
35
35
  },
36
36
  "dependencies": {
37
- "@ckeditor/ckeditor5-autosave": "48.2.0-alpha.3",
38
- "@ckeditor/ckeditor5-collaboration-core": "48.2.0-alpha.3",
39
- "@ckeditor/ckeditor5-comments": "48.2.0-alpha.3",
40
- "@ckeditor/ckeditor5-core": "48.2.0-alpha.3",
41
- "@ckeditor/ckeditor5-engine": "48.2.0-alpha.3",
42
- "@ckeditor/ckeditor5-icons": "48.2.0-alpha.3",
43
- "@ckeditor/ckeditor5-ui": "48.2.0-alpha.3",
44
- "@ckeditor/ckeditor5-utils": "48.2.0-alpha.3",
45
- "@ckeditor/ckeditor5-widget": "48.2.0-alpha.3",
37
+ "@ckeditor/ckeditor5-autosave": "48.2.0-alpha.5",
38
+ "@ckeditor/ckeditor5-collaboration-core": "48.2.0-alpha.5",
39
+ "@ckeditor/ckeditor5-comments": "48.2.0-alpha.5",
40
+ "@ckeditor/ckeditor5-core": "48.2.0-alpha.5",
41
+ "@ckeditor/ckeditor5-engine": "48.2.0-alpha.5",
42
+ "@ckeditor/ckeditor5-icons": "48.2.0-alpha.5",
43
+ "@ckeditor/ckeditor5-ui": "48.2.0-alpha.5",
44
+ "@ckeditor/ckeditor5-utils": "48.2.0-alpha.5",
45
+ "@ckeditor/ckeditor5-widget": "48.2.0-alpha.5",
46
46
  "@types/luxon": "3.6.2",
47
47
  "es-toolkit": "1.45.1",
48
48
  "luxon": "3.6.1"