@ckeditor/ckeditor5-revision-history 47.4.0-alpha.3 → 47.4.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x113f03,uid as _0x532896,Collection as _0x504df2,logWarning as _0x47c187,FocusTracker as _0x30890a,KeystrokeHandler as _0x34a3da,scrollViewportToShowTarget as _0x3a5a7e,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x1d6810}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x83ca90,set as _0x4fdd88,unset as _0x48e3b0,isEqual as _0x3c0bf9}from'es-toolkit/compat';import{Plugin as _0xbe21c4,PendingActions as _0x71dee9,Command as _0x4856a5,ElementApiMixin as _0x28570d,Editor as _0x1dbeab}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x416e9c,getMarkerDomElement as _0x1f08bc,ConfirmMixin as _0x43b418,sanitizeEditorConfig as _0x45ed39}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x184b8e,ViewAttributeElement as _0x1205ba,ViewEmptyElement as _0x470df9,ViewRawElement as _0x510a8d,ViewUIElement as _0x4555eb,ViewDocumentFragment as _0x164cef,ViewText as _0x4e7f12,ViewElement as _0x451dcb,ModelElement as _0x36b445,ModelRange as _0xb3cd0f,ModelPosition as _0x517828,ModelDocumentFragment as _0x8c84c8,ModelText as _0x367598}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x672cd0,IconChevronUp as _0x4fea33,IconChevronDown as _0xaf50d4,IconUndo as _0x31592a,IconUser as _0x21d8a3,IconThreeVerticalDots as _0x3f675d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x5aa04a,View as _0x4eb8a3,submitHandler as _0xccd7c3,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x1e23a0,ListView as _0x4b2173,ListItemView as _0x55af41,ButtonView as _0x41a1a9,MenuBarMenuView as _0x22ce88,MenuBarMenuListView as _0x3b6094,MenuBarMenuListItemView as _0x360a69,MenuBarMenuListItemButtonView as _0x1b7074,ContextualBalloon as _0x3e3e3f,ToolbarSeparatorView as _0x4bb486,IconView as _0x517cab,addListToDropdown as _0x105741,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x20cce1,StickyPanelView as _0x82d6c7,ToolbarView as _0x392eb7,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x275244}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x113f03(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x122a79){super(),this['id']=_0x122a79['id']||_0x532896(),this['creator']=_0x122a79['creator']||null,this['authors']=_0x122a79['authors']||[],this['diffData']=_0x122a79['diffData']||null,this['toVersion']=_0x122a79['toVersion']||0x0,this['fromVersion']=_0x122a79['fromVersion']||0x0,this['set']('name',_0x122a79['name']||''),this['set']('createdAt',_0x122a79['createdAt']||new Date()),this['set']('attributes',_0x122a79['attributes']||{});}['setName'](_0xdfe461){this['_update']({'name':_0xdfe461});}['setAttribute'](_0x417e6a,_0x26cb13){const _0x1b5460=_0x83ca90(this['attributes']);_0x4fdd88(_0x1b5460,_0x417e6a,_0x26cb13),this['_update']({'attributes':_0x1b5460});}['removeAttribute'](_0x5c0ec4){const _0x35dc69=_0x83ca90(this['attributes']);_0x48e3b0(_0x35dc69,_0x5c0ec4),this['_update']({'attributes':_0x35dc69});}['_update'](_0x34a76,_0x40aebc=!0x1){let _0x4eb16e=!0x1;const _0x56fa11={'id':this['id']},_0xc15135=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x31f3a5 of _0xc15135){const _0x56b90f=_0x34a76[_0x31f3a5];void 0x0!==_0x56b90f&&_0x56b90f!==this[_0x31f3a5]&&(this[_0x31f3a5]=_0x56b90f,_0x56fa11[_0x31f3a5]=_0x56b90f,_0x4eb16e=!0x0);}_0x4eb16e&&(_0x56fa11['authors']&&(_0x56fa11['authorsIds']=_0x56fa11['authors']['map'](_0x1946de=>_0x1946de['id']),delete _0x56fa11['authors']),this['fire']('_update',_0x56fa11,_0x40aebc));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x32f8b8=>_0x32f8b8['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0xbe21c4{['_revisions'];static get['requires'](){return[_0x416e9c];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x167d67){super(_0x167d67),this['_revisions']=new _0x504df2();}['afterInit'](){!async function(_0x1be641){const _0xc6de19=_0x16bffc([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]),_0x1d691c=0xeb829,_0x4e350b=0x359e09b0,_0x7ee81c=0x35997730^_0x4e350b,_0x4df571=window[_0x16bffc([0x44,0x61,0x74,0x65])][_0x16bffc([0x6e,0x6f,0x77])](),_0x3df50e=_0x1be641[_0x16bffc([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a977f=new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xaee380=>{_0x3df50e[_0x16bffc([0x6f,0x6e,0x63,0x65])](_0x16bffc([0x72,0x65,0x61,0x64,0x79]),_0xaee380);}),_0x27555d={[_0x16bffc([0x6b,0x74,0x79])]:_0x16bffc([0x45,0x43]),[_0x16bffc([0x75,0x73,0x65])]:_0x16bffc([0x73,0x69,0x67]),[_0x16bffc([0x63,0x72,0x76])]:_0x16bffc([0x50,0x2d,0x32,0x35,0x36]),[_0x16bffc([0x78])]:_0x16bffc([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]),[_0x16bffc([0x79])]:_0x16bffc([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]),[_0x16bffc([0x61,0x6c,0x67])]:_0x16bffc([0x45,0x53,0x32,0x35,0x36])},_0x268ad2=_0x3df50e[_0x16bffc([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x16bffc([0x67,0x65,0x74])](_0x16bffc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4904d0(){let _0x346122,_0xa02b58=null,_0x2d2f4b=null;try{if(_0x268ad2==_0x16bffc([0x47,0x50,0x4c]))return _0x16bffc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x346122=_0x2b1b08(),!_0x346122)return _0x16bffc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x346122[_0x16bffc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2d2f4b=_0x44e40a(_0x346122[_0x16bffc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x346122[_0x16bffc([0x6a,0x74,0x69])])),await _0x10f76d()?_0x56ba78()?_0x239d44()?_0x16bffc([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x313799()?(_0x346122[_0x16bffc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x16bffc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xa02b58=_0x12a5c7(_0x16bffc([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x293170()):_0x16bffc([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x16bffc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x16bffc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x16bffc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x239d44(){const _0x1d19ee=[_0x16bffc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x16bffc([0x74,0x72,0x69,0x61,0x6c])][_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x346122[_0x16bffc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4df571/0x3e8:0xe10*_0x7ee81c;return _0x346122[_0x16bffc([0x65,0x78,0x70])]<_0x1d19ee;}function _0x56ba78(){const _0x2718e9=_0x346122[_0x16bffc([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2718e9)return!0x1;if(_0x2718e9[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16bffc([0x2a])))return!0x0;if(_0x2718e9[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16bffc([0x52,0x48])))return!0x0;if(_0x2718e9[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16bffc([0x52,0x52,0x48]))){if(_0x4da140())return!0x0;if(_0x57cec7()||_0x4a3e4c())return!0x0;}return!0x1;}function _0x313799(){const _0x26209f=_0x346122[_0x16bffc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x26209f||0x0==_0x26209f[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a5b33}=new URL(window[_0x16bffc([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x26209f[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a5b33))return!0x0;const _0x16ee4b=_0x1a5b33[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])](_0x16bffc([0x2e]));return _0x26209f[_0x16bffc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x49c42b=>_0x49c42b[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16bffc([0x2a])))[_0x16bffc([0x6d,0x61,0x70])](_0x2b60eb=>_0x2b60eb[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])](_0x16bffc([0x2e])))[_0x16bffc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x8813cd=>_0x8813cd[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x16ee4b[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x16bffc([0x6d,0x61,0x70])](_0x594487=>Array(_0x16ee4b[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x594487[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x16bffc([0x66,0x69,0x6c,0x6c])](_0x594487[0x0]===_0x16bffc([0x2a])?_0x16bffc([0x2a]):'')[_0x16bffc([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x594487))[_0x16bffc([0x73,0x6f,0x6d,0x65])](_0x231205=>_0x16ee4b[_0x16bffc([0x65,0x76,0x65,0x72,0x79])]((_0x2c2176,_0x5da9fd)=>_0x231205[_0x5da9fd]===_0x2c2176||_0x231205[_0x5da9fd]===_0x16bffc([0x2a])));}function _0x293170(){return _0xa02b58&&_0x2d2f4b?new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b9324,_0x244662)=>{_0xa02b58[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x4b9324,_0x244662),_0x2d2f4b[_0x16bffc([0x74,0x68,0x65,0x6e])](_0xe338fc=>{_0xe338fc!=_0x16bffc([0x56,0x61,0x6c,0x69,0x64])&&_0x4b9324(_0xe338fc);},_0x244662);}):_0xa02b58||_0x2d2f4b||_0x16bffc([0x56,0x61,0x6c,0x69,0x64]);}}function _0x44e40a(_0x2e8af7,_0x4b8a72){return new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x563948=>{if(_0xbb56d8())return _0x563948(_0x16bffc([0x56,0x61,0x6c,0x69,0x64]));_0x263a24(),_0x3df50e[_0x16bffc([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x16bffc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5336a6=!0x1;const _0x1b32c0=_0x532896();function _0x3369e1(_0x3dee3a){return!!_0x3dee3a&&(typeof _0x3dee3a===_0x16bffc([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3dee3a===_0x16bffc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3dee3a[_0x16bffc([0x74,0x68,0x65,0x6e])]===_0x16bffc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3dee3a[_0x16bffc([0x63,0x61,0x74,0x63,0x68])]===_0x16bffc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5ceafd(_0x203889){_0x3c554d(_0x203889)[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x327eae=>{if(!_0x327eae||_0x327eae[_0x16bffc([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x16bffc([0x6f,0x6b]))return _0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1ea563(_0x54756b(_0x1b32c0+_0x4b8a72))!=_0x327eae[_0x16bffc([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x16bffc([0x56,0x61,0x6c,0x69,0x64]);})[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x2b87b9=>(_0x50e41d(),_0x2b87b9),()=>{const _0x5c44c0=_0x5a73d8();return null==_0x5c44c0?(_0x50e41d(),_0x16bffc([0x56,0x61,0x6c,0x69,0x64])):_0x16bffc(_0x4df571-_0x5c44c0>(0x11928db0^_0x4e350b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x563948)[_0x16bffc([0x63,0x61,0x74,0x63,0x68])](()=>{_0x563948(_0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x27fa3c=0x35a8e730^_0x4e350b;function _0x50e41d(){const _0xe85ebc=_0x16bffc([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ea563(_0x54756b(_0x2e8af7)),_0x3537f4=_0x269398(_0x1ea563(window[_0x16bffc([0x4d,0x61,0x74,0x68])][_0x16bffc([0x63,0x65,0x69,0x6c])](_0x4df571/_0x27fa3c)));window[_0x16bffc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x16bffc([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xe85ebc,_0x3537f4);}function _0x5a73d8(){const _0x3ddbb0=_0x16bffc([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ea563(_0x54756b(_0x2e8af7)),_0x6da89a=window[_0x16bffc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x16bffc([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ddbb0);return _0x6da89a?window[_0x16bffc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x269398(_0x6da89a),0x10)*_0x27fa3c:null;}function _0x3c554d(_0x583d73){return new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x554530,_0x345818)=>{_0x583d73[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x554530,_0x345818),window[_0x16bffc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x345818,0x359fdd70^_0x4e350b);});}}_0x3df50e[_0x16bffc([0x6f,0x6e])](_0x16bffc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x205b7f,_0x4b7370)=>{if(_0x4b7370[0x0]!=_0x2e8af7)return _0x563948(_0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b7370[0x1]={..._0x4b7370[0x1],[_0x16bffc([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1b32c0};},{[_0x16bffc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x16bffc([0x68,0x69,0x67,0x68])}),_0x3df50e[_0x16bffc([0x6f,0x6e])](_0x16bffc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2bc05a=>{_0x3369e1(_0x2bc05a[_0x16bffc([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5336a6=!0x0,_0x5ceafd(_0x2bc05a[_0x16bffc([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x16bffc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x16bffc([0x6c,0x6f,0x77])}),_0x4a977f[_0x16bffc([0x74,0x68,0x65,0x6e])](()=>{_0x5336a6||_0x563948(_0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xbb56d8(){return _0x3df50e[_0x16bffc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16bffc([0x76,0x69,0x65,0x77])][_0x16bffc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x16bffc([0x61,0x75,0x74,0x6f]);}function _0x263a24(){_0x3df50e[_0x16bffc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16bffc([0x76,0x69,0x65,0x77])][_0x16bffc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x16bffc([0x61,0x75,0x74,0x6f]);}}function _0x12a5c7(_0x3f3cec){const _0x39b26a=[new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54cdf9=>setTimeout(_0x54cdf9,0x3597377c^_0x4e350b)),_0x4a977f[_0x16bffc([0x74,0x68,0x65,0x6e])](()=>new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x423ffc=>{const _0xac76c0=0x359e09b7^_0x4e350b,_0x20f67d=_0x1be641[_0x16bffc([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x5f5e41(){_0x20f67d[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xac76c0&&_0x423ffc();}_0x5f5e41(),_0x20f67d[_0x16bffc([0x6f,0x6e])](_0x16bffc([0x61,0x64,0x64]),_0x5f5e41);})),new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd3e923=>{function _0x94cbc8(){for(const _0x358ec1 in window)if(window[_0x16bffc([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x16bffc([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x358ec1))&&window[_0x358ec1]==_0x1d691c)return _0xd3e923();_0x3df50e[_0x16bffc([0x73,0x74,0x61,0x74,0x65])]!=_0x16bffc([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x16bffc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x94cbc8,0x359e1a38^_0x4e350b);}_0x3e5cbd(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x94cbc8();})];return window[_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x16bffc([0x72,0x61,0x63,0x65])](_0x39b26a)[_0x16bffc([0x74,0x68,0x65,0x6e])](()=>_0x3f3cec);}async function _0x40773d(){if(await _0x4a977f,_0x3e5cbd(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x38ee98=_0x1be641[_0x16bffc([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x393396=_0x1be641[_0x16bffc([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])](_0x38ee98[_0x16bffc([0x69,0x64])]),_0x3cf109=_0x526d1b(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3cf109[_0x16bffc([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x38ee98['id'],_0x393396?_0x393396['id']:null,!0x0),_0x3cf109[_0x16bffc([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x16bffc([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3cf109[_0x16bffc([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3cf109[_0x16bffc([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x2ddc71,void(_0x3cf109[_0x16bffc([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x2ddc71);}if(_0x3e5cbd(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4539a8=_0x526d1b(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4539a8[_0x16bffc([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x16bffc([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4539a8[_0x16bffc([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4539a8[_0x16bffc([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x2ddc71,_0x4539a8[_0x16bffc([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x2ddc71;}_0x3df50e[_0x16bffc([0x6d,0x6f,0x64,0x65,0x6c])][_0x16bffc([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2ddc71,_0x3df50e[_0x16bffc([0x6d,0x6f,0x64,0x65,0x6c])][_0x16bffc([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2ddc71,_0x3df50e[_0x16bffc([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x16bffc([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4da140(){return _0x3e5cbd(_0x16bffc([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x526d1b(_0x16bffc([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x16bffc([0x73,0x74,0x61,0x74,0x65])]==_0x16bffc([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x57cec7(){return _0x3e5cbd(_0x16bffc([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 _0x4a3e4c(){return _0x3e5cbd(_0x16bffc([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2cc5ad(_0x1634c1){const _0x303ee7=_0x357c0a();_0x3df50e[_0x303ee7]=_0x16bffc([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])+_0x1634c1,_0x1634c1[_0x16bffc([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x16bffc([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x357c0a()]=_0x1d691c),_0x1634c1!=_0x16bffc([0x56,0x61,0x6c,0x69,0x64])&&_0x40773d();}function _0x357c0a(){const _0x1e0942=window[_0x16bffc([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x16bffc([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x16bffc([0x6e,0x6f,0x77])]())[_0x16bffc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x16bffc([0x2e]),'');let _0x457de2=_0x16bffc([0x76]);for(let _0x52be66=0x0;_0x52be66<_0x1e0942[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x52be66+=0x2){let _0x3bbb3f=window[_0x16bffc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e0942[_0x16bffc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x52be66,_0x52be66+0x2));_0x3bbb3f>=_0xc6de19[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3bbb3f-=_0xc6de19[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x457de2+=_0xc6de19[_0x3bbb3f];}return _0x457de2;}function _0x2b1b08(){const _0x3b755f=_0x268ad2[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])](_0x16bffc([0x2e]));if(0x3!=_0x3b755f[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5c2210(_0x3b755f[0x1]);function _0x5c2210(_0x44a8c1){const _0x112d5a=_0x5bd43a(_0x44a8c1);return _0x112d5a&&_0x496faa()?_0x112d5a:null;function _0x496faa(){const _0x1d396f=_0x112d5a[_0x16bffc([0x6a,0x74,0x69])],_0x556a68=window[_0x16bffc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1d396f[_0x16bffc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1d396f[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x15d924={..._0x112d5a,[_0x16bffc([0x6a,0x74,0x69])]:_0x1d396f[_0x16bffc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1d396f[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x15d924[_0x16bffc([0x76,0x63])],_0x54756b(_0x15d924)==_0x556a68;}}}async function _0x10f76d(){let _0x216826=!0x0;try{const _0x2d056f=_0x268ad2[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])](_0x16bffc([0x2e])),[_0x5e5e89,_0x230645,_0x434ccb]=_0x2d056f;return _0x51d052(_0x5e5e89),await _0x54ef66(_0x5e5e89,_0x230645,_0x434ccb),_0x216826;}catch{return!0x1;}function _0x51d052(_0x54226f){const _0x3cbe75=_0x5bd43a(_0x54226f);_0x3cbe75&&_0x3cbe75[_0x16bffc([0x61,0x6c,0x67])]==_0x16bffc([0x45,0x53,0x32,0x35,0x36])||(_0x216826=!0x1);}async function _0x54ef66(_0x475bd6,_0x50590f,_0x5a2724){const _0x520217=window[_0x16bffc([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x16bffc([0x66,0x72,0x6f,0x6d])](_0x3de5a0(_0x5a2724),_0x32fd81=>_0x32fd81[_0x16bffc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x38a64f=new window[(_0x16bffc([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x16bffc([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x475bd6+_0x16bffc([0x2e])+_0x50590f),_0x145587=window[_0x16bffc([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x16bffc([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x145587)return;const _0x2597f0=await _0x145587[_0x16bffc([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x16bffc([0x6a,0x77,0x6b]),_0x27555d,{[_0x16bffc([0x6e,0x61,0x6d,0x65])]:_0x16bffc([0x45,0x43,0x44,0x53,0x41]),[_0x16bffc([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x16bffc([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x16bffc([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x145587[_0x16bffc([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x16bffc([0x6e,0x61,0x6d,0x65])]:_0x16bffc([0x45,0x43,0x44,0x53,0x41]),[_0x16bffc([0x68,0x61,0x73,0x68])]:{[_0x16bffc([0x6e,0x61,0x6d,0x65])]:_0x16bffc([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2597f0,_0x520217,_0x38a64f)||(_0x216826=!0x1);}}function _0x5bd43a(_0x104e5a){return _0x104e5a[_0x16bffc([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x16bffc([0x65,0x79]))?JSON[_0x16bffc([0x70,0x61,0x72,0x73,0x65])](_0x3de5a0(_0x104e5a)):null;}function _0x3de5a0(_0x346411){return window[_0x16bffc([0x61,0x74,0x6f,0x62])](_0x346411[_0x16bffc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x16bffc([0x2b]))[_0x16bffc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x16bffc([0x2f])));}function _0x54756b(_0x2c07db){let _0x21f488=0x1505;function _0x316a22(_0xdbdae){for(let _0x550cee=0x0;_0x550cee<_0xdbdae[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x550cee++){const _0x1d09b7=_0xdbdae[_0x16bffc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x550cee);_0x21f488=(_0x21f488<<0x5)+_0x21f488+_0x1d09b7,_0x21f488&=_0x21f488;}}function _0x4768e3(_0x18f046){Array[_0x16bffc([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x18f046)?_0x18f046[_0x16bffc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4768e3):_0x18f046&&typeof _0x18f046==_0x16bffc([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x16bffc([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x18f046)[_0x16bffc([0x73,0x6f,0x72,0x74])]()[_0x16bffc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x277389,_0x52b922])=>{_0x316a22(_0x277389),_0x4768e3(_0x52b922);}):_0x316a22(window[_0x16bffc([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x18f046));}return _0x4768e3(_0x2c07db),_0x21f488>>>0x0;}function _0x1ea563(_0x59a14d){return _0x59a14d[_0x16bffc([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x16bffc([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x16bffc([0x30]));}function _0x269398(_0x31b363){return _0x31b363[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])]('')[_0x16bffc([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x16bffc([0x6a,0x6f,0x69,0x6e])]('');}function _0x3e5cbd(_0x194e26){return _0x3df50e[_0x16bffc([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x16bffc([0x68,0x61,0x73])](_0x194e26);}function _0x526d1b(_0x50ae14){return _0x3df50e[_0x16bffc([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x16bffc([0x67,0x65,0x74])](_0x50ae14);}function _0x2ddc71(){}function _0x16bffc(_0x1067d3){return _0x1067d3['map'](_0x126e76=>String['fromCharCode'](_0x126e76))['join']('');}_0x2cc5ad(await _0x4904d0());}(this);}['createRevision'](_0xfd9879){const _0x1d7005=this['editor']['plugins']['get']('Users');return new I({'id':_0xfd9879['id'],'name':_0xfd9879['name'],'creator':_0xfd9879['creatorId']?_0x1d7005['getUser'](_0xfd9879['creatorId']):null,'diffData':_0xfd9879['diffData']||_0xfd9879['data'],'authors':_0xfd9879['authorsIds']['map'](_0x1f1af5=>_0x1d7005['getUser'](_0x1f1af5)),'createdAt':new Date(_0xfd9879['createdAt']),'attributes':_0xfd9879['attributes'],'fromVersion':_0xfd9879['fromVersion'],'toVersion':_0xfd9879['toVersion']});}['addRevision'](_0xc1c8af,_0x577ef0=0x0){this['_revisions']['add'](_0xc1c8af,_0x577ef0);}['getRevision'](_0xa05bcb){return this['_revisions']['get'](_0xa05bcb);}['getRevisions'](_0x37b8cd={'toJSON':!0x1}){const _0x3e72cd=Array['from'](this['_revisions']);return _0x3e72cd['reverse'](),_0x37b8cd['toJSON']?_0x3e72cd['map'](_0x4d0f9b=>_0x4d0f9b['toJSON']()):_0x3e72cd;}['getIndex'](_0x2eb159){return this['_revisions']['getIndex'](_0x2eb159);}['getEarlierVisibleRevision'](_0x141fab){const [,_0x30ca81]=this['getRevisionsIterator'](_0x141fab,{'direction':'earlier'});return _0x30ca81;}['getLaterVisibleRevision'](_0x5c0bdd){const [,_0x1dcd50]=this['getRevisionsIterator'](_0x5c0bdd,{'direction':'later'});return _0x1dcd50;}['getRevisionsInDiff'](_0x860894){const _0x39ffb8=[];for(const _0x162ac7 of this['getRevisionsIterator'](_0x860894['newRevisionId']))if(_0x39ffb8['push'](_0x162ac7),_0x162ac7['id']===_0x860894['oldRevisionId'])break;return _0x39ffb8;}*['getRevisionsIterator'](_0x5ec5ba,{direction:_0x11c4f1='earlier',filter:_0xb9a0f3=()=>!0x0}={}){const _0xd7fe22='earlier'===_0x11c4f1?0x1:-0x1;let _0x4599fb=this['_revisions']['get'](_0x5ec5ba),_0x145a82=this['getIndex'](_0x4599fb);for(yield _0x4599fb;_0x4599fb;){if(_0x145a82+=_0xd7fe22,_0x4599fb=this['getRevision'](_0x145a82),!_0x4599fb)return;_0xb9a0f3(_0x4599fb)&&(yield _0x4599fb);}}}class $ extends _0xbe21c4{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x184b8e,'c'],[_0x1205ba,'a'],[_0x470df9,'e'],[_0x510a8d,'r'],[_0x4555eb,'u']]);['_typeCharToViewClass']=new Map([['c',_0x184b8e],['a',_0x1205ba],['e',_0x470df9],['r',_0x510a8d],['u',_0x4555eb]]);async['loadRevisionData'](_0x120bae,_0x3ff57c){if(_0x120bae['diffData']||!_0x3ff57c)return;const _0x281afb=this['editor']['config']['get']('collaboration.channelId'),_0x3b9f96=await _0x3ff57c['getRevision']({'channelId':_0x281afb,'revisionId':_0x120bae['id']});_0x120bae['diffData']=_0x3b9f96['diffData'];}['getRevisionDocumentData'](_0x1ef2f0){const _0x4e9980={};for(const _0x516468 in _0x1ef2f0['diffData']){if(_0x1ef2f0['diffData'][_0x516468]['attachChange']&&!_0x1ef2f0['diffData'][_0x516468]['attachChange']['isAttached'])continue;const _0x3fe9d0=this['_removeRevisionMarkers'](JSON['parse'](_0x1ef2f0['diffData'][_0x516468]['insertions'])),_0x154c43=this['editor']['editing']['view']['document'],_0x50a4e4=new _0x164cef(_0x154c43,_0x3fe9d0['map'](_0x456637=>this['_getViewFromDiffObj'](_0x456637,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4e9980[_0x516468]=this['editor']['data']['processor']['toData'](_0x50a4e4),this['editor']['data']['processor']['useFillerType']('default');}return _0x4e9980;}['getRevisionRootsAttributes'](_0x35b480){const _0x29858a={};for(const _0x15566e in _0x35b480['diffData'])_0x35b480['diffData'][_0x15566e]['attachChange']&&!_0x35b480['diffData'][_0x15566e]['attachChange']['isAttached']||(_0x29858a[_0x15566e]=_0x35b480['diffData'][_0x15566e]['attributesAfter']||{});return _0x29858a;}['_getTypeCharForViewElement'](_0x49d350){return this['_viewClassToTypeChar']['get'](_0x49d350['constructor']);}['_getViewFromDiffObj'](_0x4fc9e7,_0x5614b3){const _0x4402d0=this['editor']['editing']['view']['document'];if('string'==typeof _0x4fc9e7)return new _0x4e7f12(_0x4402d0,_0x4fc9e7);{let _0x28e7d7,_0x10896e;_0x10896e='u'==_0x4fc9e7['type']||'r'==_0x4fc9e7['type']?[]:_0x4fc9e7['children']['map'](_0x470ab6=>this['_getViewFromDiffObj'](_0x470ab6,_0x5614b3));const _0x318e8e=this['_typeCharToViewClass']['get'](_0x4fc9e7['type'])||_0x451dcb,_0x2f0508=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x28e7d7=new _0x318e8e(_0x4402d0,_0x4fc9e7['name'],_0x4fc9e7['attributes'],_0x10896e),'u'==_0x4fc9e7['type']&&_0x4fc9e7['children'][0x0]){const _0x621f43=_0x4fc9e7['children'][0x0];if(_0x28e7d7['render']=function(_0x4814ad){const _0x579127=_0x4814ad['createElement']('div');return _0x579127['innerHTML']=_0x621f43,_0x579127['childNodes'][0x0];},_0x5614b3){const _0x3ac14b=new _0x164cef(_0x4402d0);_0x3ac14b['_appendChild'](_0x28e7d7);const _0x320d21=Array['from'](_0x2f0508['viewChildrenToDom'](_0x3ac14b,{'bind':!0x1})),_0x12bc04=_0x2f0508['domDocument']['createElement']('div');_0x12bc04['append'](..._0x320d21),_0x28e7d7=Array['from'](_0x2f0508['domChildrenToView'](_0x12bc04))[0x0];}}else{if('r'==_0x4fc9e7['type']&&_0x4fc9e7['children'][0x0]){const _0x3e4000=_0x4fc9e7['children'][0x0];if(_0x28e7d7['render']=function(_0x429c7c){_0x429c7c['innerHTML']=_0x3e4000;},_0x5614b3){const _0x2107df=new _0x164cef(_0x4402d0);_0x2107df['_appendChild'](_0x28e7d7);const _0x480c56=Array['from'](_0x2f0508['viewChildrenToDom'](_0x2107df,{'bind':!0x1})),_0x5b4e61=_0x2f0508['domDocument']['createElement']('div');_0x5b4e61['append'](..._0x480c56);const _0x2fb648=Array['from'](_0x2f0508['domChildrenToView'](_0x5b4e61));_0x2fb648['length']>0x1?_0x28e7d7['_appendChild'](_0x2fb648):_0x28e7d7=_0x2fb648[0x0];}}}if(_0x4fc9e7['customProperties']){for(const [_0x59ec91,_0x16c1d9]of _0x4fc9e7['customProperties'])_0x28e7d7['_setCustomProperty'](_0x59ec91,_0x16c1d9);}const _0x1f8c28=void 0x0===_0x4fc9e7['fillerOffset']?null:_0x4fc9e7['fillerOffset'];return null!==_0x1f8c28&&(_0x28e7d7['getFillerOffset']=()=>_0x1f8c28),_0x28e7d7;}}['_makeModelFromViewString'](_0xc43205){const _0x52d8b8=JSON['parse'](_0xc43205),_0x4cab25=this['editor']['editing']['view']['document'],_0x5694ca=new _0x164cef(_0x4cab25,_0x52d8b8['map'](_0x425ee4=>this['_getViewFromDiffObj'](_0x425ee4,!0x0)));return this['editor']['data']['toModel'](_0x5694ca);}['_removeRevisionMarkers'](_0x419569){return(_0x419569=_0x419569['filter'](_0x4899ba=>!_0x4899ba['name']||'revision-start'!==_0x4899ba['name']&&'revision-end'!==_0x4899ba['name']))['forEach'](_0x5d908d=>{'string'!=typeof _0x5d908d&&(_0x5d908d['children']=this['_removeRevisionMarkers'](_0x5d908d['children']),_0x5d908d['attributes']=_0x5d908d['attributes']['filter'](_0x5275e=>!_0x5275e[0x0]['startsWith']('data-revision-')));}),_0x419569;}}function m(_0x2ed78e,_0xd6e66e,_0x3f540b){const t=_0x2ed78e['t'];switch(_0xd6e66e){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'},_0x3f540b);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3f540b);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 h extends _0xbe21c4{['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[_0x416e9c,S,$,_0x71dee9];}constructor(_0x2db966){super(_0x2db966),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x18a338=_0x532896();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x18a338},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 _0x4267c8=this['repository']['getRevision'](0x0),_0xe3cc48=_0x4267c8&&null===_0x4267c8['creator']?_0x4267c8:null;if(this['_continueCurrentRevision']=!!_0xe3cc48&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x30594b=this['_source']['getCurrentRevisionId'](),_0x46b8d0=this['repository']['getRevision'](_0x30594b);if(_0x46b8d0)this['_startingVersion']=_0x46b8d0['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x373bd1=this['_source']['history']['_operations']['find'](_0x29ce7a=>!_0x29ce7a['_isInit']),_0x520955=_0x373bd1?_0x373bd1['baseVersion']:this['_source']['history']['version'];_0x4267c8?(_0x4267c8['toVersion']<_0x520955&&_0x4267c8['_update']({'toVersion':_0x520955}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xe3cc48['id'],this['_startingVersion']=_0xe3cc48['fromVersion']):(this['_startingVersion']=_0x4267c8['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x520955,this['_continueCurrentRevision']=!0x1);}}else _0xe3cc48&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xe3cc48['toVersion'],this['editor']['model']['document']['history']['version']),_0xe3cc48['fromVersion']===_0xe3cc48['toVersion']?(0x0!==_0xe3cc48['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xe3cc48['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xe3cc48['id'],this['_startingVersion']=_0xe3cc48['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',_0x8f0c33=>!_0x8f0c33),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x23b94e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5377d9;for(const _0x2effed in _0x23b94e){const _0x40ed74=_0x2effed,_0x41a530=_0x23b94e[_0x40ed74];if('revisionHistoryLicenseKeyValid'==_0x41a530||'revisionHistoryLicenseKeyInvalid'==_0x41a530||'revisionHistoryLicenseKeyExpired'==_0x41a530||'revisionHistoryLicenseKeyDomainLimit'==_0x41a530||'revisionHistoryLicenseKeyNotAllowed'==_0x41a530||'revisionHistoryLicenseKeyEvaluationLimit'==_0x41a530||'revisionHistoryLicenseKeyUsageLimit'==_0x41a530){delete _0x23b94e[_0x40ed74],_0x5377d9=_0x41a530,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5377d9&&_0x23b94e['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5377d9&&_0x23b94e['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5377d9&&_0x23b94e['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5377d9&&_0x23b94e['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5377d9&&_0x23b94e['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5377d9&&_0x23b94e['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x3e7bfc=this['repository']['getRevision'](0x0),_0x40414a=await this['getRevisionDocumentData'](_0x3e7bfc),_0x5b293f=await this['getRevisionRootsAttributes'](_0x3e7bfc);this['_replaceEditorDataWithRevisionData'](_0x40414a,_0x5b293f);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2a9a04){this['_source']=_0x2a9a04;}async['update'](){const _0x5e39b6=await this['_source']['getLatestVersion']();if(_0x5e39b6>this['currentRevision']['toVersion']){await this['_loadState']();const _0x38fe5f=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5e39b6});_0x38fe5f['authors']=_0x38fe5f['authorsIds']['map'](_0x416864=>this['editor']['plugins']['get']('Users')['getUser'](_0x416864)),this['currentRevision']['_update'](_0x38fe5f);}}async['saveRevision'](_0x5dae2d={},_0x3847fe=null){const _0x3d3bbe=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3847fe>this['currentRevision']['toVersion']&&(_0x3847fe=null),null===_0x3847fe&&(_0x3847fe=await this['_source']['getLatestVersion']());const _0x42894b=this['_getFromVersion'](_0x3847fe),_0x553eb8=this['buildRevisionData']({'from':_0x42894b,'to':_0x3847fe});if(this['currentRevision']['toVersion']<_0x3847fe){const _0x101f12=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3847fe,'to':_0x3847fe});_0x101f12['authors']=[],_0x101f12['authorsIds']=[],_0x101f12['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x101f12,!0x0),delete _0x101f12['authors'],_0x3d3bbe['push'](_0x101f12);}_0x5dae2d['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5dae2d['name']=_0x5dae2d['name']||null,_0x5dae2d['id']=_0x5dae2d['id']||_0x532896(),_0x5dae2d={..._0x5dae2d,..._0x553eb8};const _0x1d5cfa=this['addRevisionData'](_0x5dae2d);_0x3d3bbe['push'](_0x5dae2d);const _0x5771b4=this['repository']['getIndex'](_0x1d5cfa);if(0x0!==_0x5771b4){const _0x8b211f=this['repository']['getRevision'](_0x5771b4-0x1);if(_0x8b211f['fromVersion']!==_0x3847fe){const _0x4c8470=this['_revisionDataBuilder']['getData'](_0x3847fe,_0x8b211f['toVersion']),_0x53ea99={'id':_0x8b211f['id'],'diffData':_0x4c8470['diffData'],'authorsIds':_0x4c8470['authorsIds'],'authors':_0x4c8470['authorsIds']['map'](_0x5d7641=>this['editor']['plugins']['get']('Users')['getUser'](_0x5d7641)),'fromVersion':_0x3847fe};_0x8b211f===this['currentRevision']&&(_0x53ea99['createdAt']=new Date(_0x5dae2d['createdAt']['getTime']()+0xa)),_0x8b211f['_update'](_0x53ea99,!0x0),delete _0x53ea99['authors'],_0x3d3bbe['push'](_0x53ea99);}}if(this['adapter']){for(const _0x551639 of _0x3d3bbe)this['_bufferUpdate'](_0x551639['id'],_0x551639,!0x0);this['sendBufferedUpdates']();}return _0x1d5cfa;}['addRevisionData'](_0x2e80a6){const _0x202d48=this['repository']['createRevision'](_0x2e80a6);return this['adapter']&&_0x202d48['on']('_update',(_0x3688bc,_0xdbd41c,_0x1d7fec)=>{_0x1d7fec||(this['_bufferUpdate'](_0xdbd41c['id'],_0xdbd41c,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x202d48,this['_findInsertionIndex'](_0x202d48)),_0x202d48;}async['getRevisionDocumentData'](_0x350a1d){return await this['_utils']['loadRevisionData'](_0x350a1d,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x350a1d);}async['getRevisionRootsAttributes'](_0x23bd45){return await this['_utils']['loadRevisionData'](_0x23bd45,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x23bd45);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2702ff=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x540516=0x0;_0x540516<_0x2702ff['length'];_0x540516++){const _0x130b93=_0x2702ff[_0x540516];let _0x52b01c=!0x1;for(const _0x1c33f7 of Object['keys'](_0x130b93))void 0x0===_0x130b93[_0x1c33f7]?delete _0x130b93[_0x1c33f7]:'id'!==_0x1c33f7&&(_0x52b01c=!0x0);_0x52b01c||(_0x2702ff[_0x540516]=null);}if(_0x2702ff=_0x2702ff['filter'](_0x2bfcb7=>null!==_0x2bfcb7),!_0x2702ff['length'])return;for(let _0x4592b2=0x0;_0x4592b2<_0x2702ff['length'];_0x4592b2++){const _0x1748c1=_0x2702ff[_0x4592b2];void 0x0!==_0x1748c1['fromVersion']&&void 0x0===_0x1748c1['toVersion']&&(_0x1748c1['toVersion']=this['repository']['getRevision'](_0x1748c1['id'])['toVersion']),void 0x0!==_0x1748c1['toVersion']&&void 0x0===_0x1748c1['fromVersion']&&(_0x1748c1['fromVersion']=this['repository']['getRevision'](_0x1748c1['id'])['fromVersion']);}const _0x36b8af=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2702ff,_0x36b8af)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x5d372d=>{if(_0x5d372d){for(const _0x15497f of _0x5d372d)this['setRevisionData']({'id':_0x15497f['id'],'createdAt':_0x15497f['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x1cdf43=null,from:_0x21385a=null,to:_0x438429=null}){_0x21385a=null!==_0x21385a?_0x21385a:_0x1cdf43['fromVersion'],_0x438429=null!==_0x438429?_0x438429:_0x1cdf43['toVersion'];const _0x2d843c=this['_revisionDataBuilder']['getData'](_0x21385a,_0x438429),_0x28cc6e={'diffData':_0x2d843c['diffData'],'authorsIds':_0x2d843c['authorsIds'],'fromVersion':_0x21385a,'toVersion':_0x438429};if(!_0x1cdf43||_0x438429!==_0x1cdf43['toVersion']){const _0x58ce99=_0x438429-0x1,_0x5e13d7=this['_source']['history']['getOperation'](_0x58ce99);_0x28cc6e['createdAt']=_0x5e13d7&&_0x5e13d7['createdAt']||new Date();}if(this['_loadedStateData']&&_0x21385a===this['_loadedStateData']['fromVersion']){for(const _0x2c6c46 of this['_loadedStateData']['authors'])_0x28cc6e['authorsIds']['includes'](_0x2c6c46['id'])||_0x28cc6e['authorsIds']['push'](_0x2c6c46['id']);}return _0x28cc6e;}['_bufferUpdate'](_0x53f216,_0x1b6827,_0x2b95c6){if(this['_bufferedUpdates']['has'](_0x53f216)){const _0x541a2a=this['_bufferedUpdates']['get'](_0x53f216);_0x1b6827=_0x2b95c6?{..._0x541a2a,..._0x1b6827}:{..._0x1b6827,..._0x541a2a};}this['_bufferedUpdates']['set'](_0x53f216,_0x1b6827);}['setRevisionData'](_0x724595){const _0x503256=this['repository']['getRevision'](_0x724595['id']);if(_0x724595['createdAt']&&(_0x724595['createdAt']=new Date(_0x724595['createdAt'])),_0x724595['authorsIds']){const _0x382d9c=this['editor']['plugins']['get']('Users');_0x724595['authors']=_0x724595['authorsIds']['map'](_0x11cea2=>_0x382d9c['getUser'](_0x11cea2));}_0x503256['_update'](_0x724595,!0x0);}['_createInitialRevision'](_0x5bc260){const _0x4aab5f=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4aab5f)this['_initialRevisionId']=_0x4aab5f['id'];else{const _0x120adb=!this['editor']['model']['document']['roots']['find'](_0x1aa0e3=>this['editor']['model']['hasContent'](_0x1aa0e3)),_0x5af50c=this['editor']['plugins']['get']('Users')['me']['id'],_0x534fd6=m(this['editor']['locale'],_0x120adb?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5bc260,'to':_0x5bc260,'id':this['_initialRevisionId'],'name':_0x534fd6,'creatorId':_0x5af50c});}}['_createCurrentRevision'](_0x4b6530){const _0x3eef85=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x3eef85),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4b6530,'to':_0x4b6530,'id':_0x3eef85,'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'](_0x51c113,_0x291039){let _0x56fdf0=this['editor']['config']['get']('initialData'),_0x57f866=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x56fdf0){_0x56fdf0={};for(const _0x256f15 of this['editor']['model']['document']['getRootNames']())_0x56fdf0[_0x256f15]='';}if('string'==typeof _0x56fdf0&&(_0x56fdf0={'main':_0x56fdf0}),void 0x0===_0x57f866){_0x57f866={};for(const _0x19e0f6 of this['editor']['model']['document']['getRootNames']())_0x57f866[_0x19e0f6]={};}let _0x52e77a=!0x1;const _0x24a0cb=Object['keys'](_0x56fdf0),_0x5182f0=Object['keys'](_0x51c113);for(const _0x3d426e of _0x24a0cb){if(_0x56fdf0[_0x3d426e]!==_0x51c113[_0x3d426e]&&''!==_0x56fdf0[_0x3d426e]['trim']()){_0x52e77a=!0x0;break;}if(!_0x3c0bf9(_0x57f866[_0x3d426e],_0x291039[_0x3d426e])&&Object['keys'](_0x57f866[_0x3d426e])['length']>0x0){_0x52e77a=!0x0;break;}}_0x52e77a||(_0x52e77a=_0x5182f0['some'](_0x2342a2=>!this['editor']['model']['document']['getRoot'](_0x2342a2))),_0x52e77a&&_0x47c187('editor-initial-data-replaced-with-revision-data',{'editorData':_0x56fdf0,'editorRootsAttributes':_0x57f866,'revisionData':_0x51c113,'revisionRootsAttributes':_0x291039}),this['editor']['config']['set']('initialData',_0x51c113),this['editor']['config']['set']('rootsAttributes',_0x291039);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x58ed7e=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x58ed7e['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4ff9a7){const _0x56411c=this['repository']['getRevisions']();_0x56411c['reverse']();let _0x43b13e=0x0;for(;_0x43b13e<_0x56411c['length'];){const _0x574fb9=_0x56411c[_0x43b13e];if(_0x574fb9===this['currentRevision']){_0x43b13e++;continue;}if(_0x574fb9['id']===this['_initialRevisionId'])break;const _0x1644d4=_0x4ff9a7['toVersion']-_0x574fb9['toVersion']||_0x4ff9a7['fromVersion']-_0x574fb9['fromVersion'];if(_0x1644d4>0x0)break;if(_0x1644d4<0x0)_0x43b13e++;else{if(!_0x4ff9a7['creator']&&_0x574fb9['creator'])break;if(_0x574fb9['creator']||!_0x4ff9a7['creator']){if(_0x4ff9a7['createdAt']>_0x574fb9['createdAt'])break;_0x43b13e++;}else _0x43b13e++;}}return _0x43b13e;}['_getFromVersion'](_0x1318ac){const _0x3192c2=this['repository']['getRevisions']();_0x3192c2['reverse'](),_0x3192c2['shift']();const _0x3fffeb=_0x3192c2['find'](_0x389d38=>_0x389d38['toVersion']<=_0x1318ac)['toVersion'];return _0x3fffeb<this['_startingVersion']?this['_startingVersion']:_0x3fffeb;}['_makeRevision']({name:_0x54b5b4,from:_0x32ca53,to:_0x2c619e,creatorId:_0x5b6155,id:_0x791788}){const _0x1b9ce6=this['buildRevisionData']({'from':_0x32ca53,'to':_0x2c619e});_0x1b9ce6['name']=_0x54b5b4,_0x1b9ce6['creatorId']=_0x5b6155,_0x1b9ce6['id']=_0x791788;const _0x5ecb93=this['addRevisionData'](_0x1b9ce6);return this['adapter']&&this['_bufferUpdate'](_0x1b9ce6['id'],_0x1b9ce6,!0x0),_0x5ecb93;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x455bf9){this['editor']=_0x455bf9,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'](_0x23359e){this['source']=_0x23359e;const _0x369ab4=new Map(),_0x5197f2=new Map(),_0x13c9bc=this['editor']['model']['document']['roots']['map'](_0x2dc1d7=>_0x2dc1d7['rootName']);for(const _0x15be98 of _0x13c9bc){const _0x48cca6=this['editor']['model']['document']['getRoot'](_0x15be98),_0x1ee668=K(_0x48cca6);_0x369ab4['set'](_0x15be98,_0x1ee668),_0x5197f2['set'](_0x15be98,Object['fromEntries'](_0x48cca6['getAttributes']()));}const _0x4b1a57=Array['from'](this['editor']['model']['markers'])['map'](_0x5b9ac3=>[_0x5b9ac3['name'],_0x5b9ac3['getRange']()]),_0x2eed4b=this['source']['version'];this['_saveMetaData'](_0x2eed4b,_0x369ab4,_0x4b1a57,_0x5197f2),this['_startingRevisionId']=this['_revisionId'];const _0x14fff3=new Map(),_0x293d4e=new Map();for(const _0x145b88 of _0x13c9bc){const _0x304249=N(_0x145b88);_0x14fff3['set'](_0x145b88,_0x304249),_0x293d4e['set'](_0x145b88,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x14fff3,[],_0x293d4e);}['getData'](_0x2442fd,_0x1678c6){if(this['_lastFrom']===_0x2442fd&&this['_lastTo']<=_0x1678c6)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1678c6,!0x0);else{if(!this['_savedMetaData']['has'](_0x2442fd)){const _0x2734ff=this['_getPreviousFrom'](_0x2442fd);this['_calculateMetaData'](_0x2734ff,_0x2442fd,!0x1);}this['_calculateMetaData'](_0x2442fd,_0x1678c6,!0x0);}return this['_lastFrom']=_0x2442fd,this['_lastTo']=_0x1678c6,this['_getState']();}['loadState'](_0x3ef080){if(!this['_savedMetaData']['has'](_0x3ef080['fromVersion'])){const _0x265897=this['_getPreviousFrom'](_0x3ef080['fromVersion']);this['_calculateMetaData'](_0x265897,_0x3ef080['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3ef080['fromVersion'],_0x3ef080['toVersion'],!0x1);const _0x225578=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3ef080['fromVersion'],this['_lastTo']=_0x3ef080['toVersion'];for(const _0x3527dd in _0x3ef080['diffData']){const _0x583e71=_0x3ef080['diffData'][_0x3527dd]['attachChange'],_0x6d5933=_0x83ca90(_0x3ef080['diffData'][_0x3527dd]['attributesBefore'])||{},_0x515379=_0x225578['_makeModelFromViewString'](_0x3ef080['diffData'][_0x3527dd]['deletions']);_0x515379['rootName']=_0x3527dd,_0x515379['_isAttached']=!_0x583e71||!_0x583e71['isAttached'],_0x515379['isAttached']=()=>_0x515379['_isAttached'],this['_baseRoots']['set'](_0x3527dd,_0x515379),this['_baseRootsAttributes']['set'](_0x3527dd,_0x6d5933),_0x583e71&&this['_touchedRoots']['set'](_0x3527dd,_0x583e71);const _0x58e1eb=this['_makeIdsRoot'](_0x515379);this['_baseIdsRoots']['set'](_0x3527dd,_0x58e1eb);for(const [_0x26707d,_0x170f6b]of _0x515379['markers']){if(!_0x26707d['startsWith']('revision:'))continue;const _0xe352e2=_0x26707d['split'](':')[0x2];for(const _0x5c6971 of _0x170f6b['getWalker']({'singleCharacters':!0x0})){const _0x34822a=this['_getVidAttributeName'](_0x5c6971),_0x34add7='elementEnd'==_0x5c6971['type']?_0x5c6971['previousPosition']['path']['slice'](0x0,-0x1):_0x5c6971['previousPosition']['path'],_0xa40361=_0x58e1eb['getNodeByPath'](_0x34add7)['getAttribute'](_0x34822a);this['_touched']['set'](_0xa40361,{'userId':_0xe352e2});}_0x515379['markers']['delete'](_0x26707d);}}this['_startingRevisionId']=this['_revisionId'];const _0x5e3883=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x23e068=>!this['_touched']['has'](_0x23e068));let _0xfa8a6b=0x0;const _0x5b12bb=new Map();for(const _0x4e1b1a in _0x3ef080['diffData']){const _0x537891=_0x3ef080['diffData'][_0x4e1b1a]['attachChange'],_0x384aa5=_0x83ca90(_0x3ef080['diffData'][_0x4e1b1a]['attributesAfter'])||{},_0x563285=_0x225578['_makeModelFromViewString'](_0x3ef080['diffData'][_0x4e1b1a]['insertions']);_0x563285['rootName']=_0x4e1b1a,_0x563285['_isAttached']=!_0x537891||_0x537891['isAttached'],_0x563285['isAttached']=()=>_0x563285['_isAttached'],this['_diffRoots']['set'](_0x4e1b1a,_0x563285),this['_diffRootsAttributes']['set'](_0x4e1b1a,_0x384aa5);const _0x2e93dd=this['_makeIdsRoot'](_0x563285,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4e1b1a,_0x2e93dd),_0x5b12bb['set'](_0x4e1b1a,_0x563285['isAttached']()?_0x384aa5:{});for(const [_0x3d32df,_0x38c07d]of _0x563285['markers']){if(!_0x3d32df['startsWith']('revision:'))continue;const _0x3dd72f=_0x3d32df['split'](':')[0x2];for(const _0x2f1880 of _0x38c07d['getWalker']({'singleCharacters':!0x0})){const _0x3d131d=this['_getVidAttributeName'](_0x2f1880),_0x476b53=this['_revisionId']++,_0x188fc2='elementEnd'==_0x2f1880['type']?_0x2f1880['previousPosition']['path']['slice'](0x0,-0x1):_0x2f1880['previousPosition']['path'];_0x2e93dd['getNodeByPath'](_0x188fc2)['_setAttribute'](_0x3d131d,_0x476b53),this['_touched']['set'](_0x476b53,{'userId':_0x3dd72f});}_0x563285['markers']['delete'](_0x3d32df);}for(const _0x1d6593 of this['editor']['model']['createRangeIn'](_0x563285)['getWalker']({'singleCharacters':!0x0})){const _0x534ee3=this['_getVidAttributeName'](_0x1d6593),_0x1b4013='elementEnd'==_0x1d6593['type']?_0x1d6593['previousPosition']['path']['slice'](0x0,-0x1):_0x1d6593['previousPosition']['path'],_0x136197=_0x2e93dd['getNodeByPath'](_0x1b4013);_0x136197['getAttribute'](_0x534ee3)>0x0||_0x136197['_setAttribute'](_0x534ee3,_0x5e3883[_0xfa8a6b++]);}for(const [_0x1e9498,_0x182c4f]of _0x563285['markers'])_0x1e9498['startsWith']('revision:')||this['_markers']['set'](_0x1e9498,_0x182c4f);}const {roots:_0x5e87bd}=this['_savedMetaData']['get'](_0x3ef080['fromVersion']),{roots:_0x4ff668}=this['_savedMetaData']['get'](_0x3ef080['toVersion']),_0x4f3ef2=K(_0x5e87bd['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4f3ef2),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4f3ef2,Number['NEGATIVE_INFINITY']));const _0x550458=K(_0x4ff668['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x550458),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x550458));const _0x3e171a=Array['from'](this['_diffRoots'])['map'](([_0x4c1a62,_0x1017de])=>[_0x4c1a62,K(_0x1017de)]);this['_saveMetaData'](this['_lastTo'],_0x3e171a,this['_markers'],_0x5b12bb);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x51437d,_0x225239,_0x3eeff0,_0x59422d){const _0x4621a9=new Map(_0x225239),_0x51a746=new Map(_0x83ca90(_0x59422d)),_0xb7266f=new Map();for(const [_0x13f2a4,_0x1da3da]of _0x3eeff0)_0xb7266f['set'](_0x13f2a4,{'start':_0x1da3da['start']['clone'](),'end':_0x1da3da['end']['clone'](),'rootName':_0x1da3da['root']['rootName']});this['_savedMetaData']['set'](_0x51437d,{'roots':_0x4621a9,'markers':_0xb7266f,'rootsAttributes':_0x51a746});}['_removeMetaData'](_0x254c16){this['_savedMetaData']['delete'](_0x254c16);}['_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'](_0x2869b5,_0xe4cc53=null){let _0x1bf7a3=null;_0x2869b5['is']('documentFragment')||(_0x1bf7a3=new _0x36b445(_0x2869b5['name'],{'vid_start':null===_0xe4cc53?this['_revisionId']++:_0xe4cc53++}));const _0x25e7c7=[];for(const _0x1ab04b of _0x2869b5['getChildren']())if(_0x1ab04b['is']('element')){_0x25e7c7['push'](this['_makeIdsRoot'](_0x1ab04b,_0xe4cc53));const _0x280ffb=_0x25e7c7[_0x25e7c7['length']-0x1];null!==_0xe4cc53&&(_0xe4cc53=_0x280ffb['is']('element','$text')?_0x280ffb['getAttribute']('vid')+0x1:_0x280ffb['getAttribute']('vid_end')+0x1);}else{for(let _0x54a2eb=0x0;_0x54a2eb<_0x1ab04b['offsetSize'];_0x54a2eb++)_0x25e7c7['push'](new _0x36b445('$text',{'vid':null===_0xe4cc53?this['_revisionId']++:_0xe4cc53++}));}if(_0x2869b5['is']('documentFragment')){const _0x59bf46=N(_0x2869b5['rootName']);return _0x59bf46['_insertChild'](0x0,_0x25e7c7),_0x59bf46;}return _0x1bf7a3['_setAttribute']('vid_end',null===_0xe4cc53?this['_revisionId']++:_0xe4cc53++),_0x1bf7a3['_insertChild'](0x0,_0x25e7c7),_0x1bf7a3;}['_calculateMetaData'](_0x2233f2,_0x5b0fdc,_0x18c2a3){this['_reset']();const {roots:_0x151a9e,markers:_0x231aa2,rootsAttributes:_0x2f5d8b}=this['_savedMetaData']['get'](_0x2233f2);this['_baseRoots']=new Map(_0x151a9e),this['_baseRootsAttributes']=new Map(_0x83ca90(_0x2f5d8b));for(const [_0x27ea13,_0x5dc5d2]of this['_baseRoots'])if('$graveyard'!==_0x27ea13&&(this['_diffRoots']['set'](_0x27ea13,K(_0x5dc5d2)),this['_diffRootsAttributes']=new Map(_0x83ca90(_0x2f5d8b)),_0x18c2a3)){const _0x55a298=this['_revisionId'];this['_idsRoots']['set'](_0x27ea13,this['_makeIdsRoot'](_0x5dc5d2)),this['_baseIdsRoots']['set'](_0x27ea13,this['_makeIdsRoot'](_0x5dc5d2,_0x55a298));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',K(this['_baseRoots']['get']('$graveyard'))),_0x18c2a3&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4f8b0e,_0x1fe864]of _0x231aa2){const _0x369834=this['_baseRoots']['get'](_0x1fe864['rootName']),_0xcb6465=this['_diffRoots']['get'](_0x1fe864['rootName']),_0x54fa77=new _0xb3cd0f(this['_fixPosition'](_0x1fe864['start'],_0x369834),this['_fixPosition'](_0x1fe864['end'],_0x369834)),_0x1e1c95=this['_fixRange'](_0x54fa77,_0xcb6465);_0x369834['markers']['set'](_0x4f8b0e,_0x54fa77),this['_markers']['set'](_0x4f8b0e,_0x1e1c95);}this['_applyOperations'](_0x2233f2,_0x5b0fdc,_0x18c2a3);}['_applyOperations'](_0x254d82,_0x16d251,_0x244468){for(const _0x44d1ba of this['source']['getOperations'](_0x254d82,_0x16d251))this['_handleOperation'](_0x44d1ba,_0x244468);for(const _0x322f96 of this['_diffRoots']['values']())_0x322f96['markers']['clear']();for(const [_0x275bfe,_0x2b5b5d]of this['_markers']){this['_diffRoots']['get'](_0x2b5b5d['root']['rootName'])['markers']['set'](_0x275bfe,_0x2b5b5d['clone']());}const _0x143413=new Map(),_0x36e317=new Map();for(const [_0x177330,_0x1df78e]of this['_diffRoots'])_0x143413['set'](_0x177330,K(_0x1df78e)),_0x36e317['set'](_0x177330,this['_diffRootsAttributes']['get'](_0x177330));this['_saveMetaData'](_0x16d251,_0x143413,this['_markers'],_0x36e317);}['_getPreviousFrom'](_0xf89bb3){const _0x1cc276=Array['from'](this['_savedMetaData']['keys']());_0x1cc276['sort']((_0x7cf7,_0x569cf2)=>_0x7cf7-_0x569cf2),_0x1cc276['reverse']();for(const _0x5027d5 of _0x1cc276)if(_0x5027d5<_0xf89bb3)return _0x5027d5;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x450716,_0x28bb56){const _0x2e89a8=Array['from'](_0x28bb56['markers'])['map'](([_0x233fe8,_0x2a6d36])=>[_0x233fe8,this['_fixRange'](_0x2a6d36,_0x450716)]);_0x450716['markers']=new Map(_0x2e89a8);}['_transformMarkers'](_0x3d69b6){for(const _0xde39d8 of this['_markers']['values']()){const _0x146838=_0xde39d8['getTransformedByOperation'](_0x3d69b6),_0x2d0eb2=_0xb3cd0f['_createFromRanges'](_0x146838);_0xde39d8['start']=_0x2d0eb2['start'],_0xde39d8['end']=_0x2d0eb2['end'];}}['_handleOperation'](_0x11269e,_0x21d0bb){if('addRoot'!=_0x11269e['type']&&'detachRoot'!=_0x11269e['type']){if('insert'==_0x11269e['type']){const _0x2e2502=_0x11269e['position']['root']['rootName'];this['_diffRoots']['has'](_0x2e2502)||(this['_diffRoots']['set'](_0x2e2502,N(_0x2e2502,!0x0)),this['_diffRootsAttributes']['set'](_0x2e2502,{}),_0x21d0bb&&this['_idsRoots']['set'](_0x2e2502,N(_0x2e2502,!0x0)));}else{if('addRootAttribute'==_0x11269e['type']||'removeRootAttribute'==_0x11269e['type']||'changeRootAttribute'==_0x11269e['type'])return void this['_handleRootAttributeOperation'](_0x11269e);'marker'==_0x11269e['type']&&this['_handleMarkerOperation'](_0x11269e);}if('marker'!==_0x11269e['type']){const _0x2269fe=this['_cloneOperation'](_0x11269e,this['_diffRoots']);_0x2269fe['_execute'](),this['_transformMarkers'](_0x2269fe);}if(_0x21d0bb)switch(_0x11269e['type']){case'insert':this['_handleInsertOperation'](_0x11269e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x11269e);break;case'merge':this['_handleMergeOperation'](_0x11269e);break;case'split':this['_handleSplitOperation'](_0x11269e);}}else this['_handleRootOperation'](_0x11269e,_0x21d0bb);}['_cloneOperation'](_0x1d91bf,_0x217bbf){const _0x5b4b5e=_0x1d91bf['clone']();return _0x5b4b5e['_authorId']=_0x1d91bf['_authorId'],this['_fixOperation'](_0x5b4b5e,_0x217bbf),_0x5b4b5e;}['_getBaseVids'](_0x4d49ad){return _0x4d49ad['map'](_0x1339d1=>{const _0x379be9=this['_getVidAttributeName'](_0x1339d1);return Number(_0x1339d1['item']['getAttribute'](_0x379be9));});}['_generateTape'](_0x13485,_0x2156c2){if(_0x13485['is']('element','$text'))_0x2156c2['push']({'item':_0x13485,'type':'text'});else{_0x13485['is']('element')&&_0x2156c2['push']({'item':_0x13485,'type':'elementStart'});for(const _0x1830d7 of _0x13485['getChildren']())this['_generateTape'](_0x1830d7,_0x2156c2);_0x13485['is']('element')&&_0x2156c2['push']({'item':_0x13485,'type':'elementEnd'});}return _0x2156c2;}['_getState'](){const _0x48c365=new Map(this['_touched']),_0x43767a=new Map(_0x48c365),_0x29cb9a=new Map(),_0x36c9bb={'insertions':{},'deletions':{}},_0x37d1d4={'insertions':{},'deletions':{}},_0x38424f=new Map(),_0x33bab5=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x33bab5['delete']('$graveyard');for(const _0x23630e of _0x33bab5){const _0x45bb33=this['_diffRoots']['get'](_0x23630e)||N(_0x23630e,!0x1),_0x42de8a=this['_baseRoots']['get'](_0x23630e)||N(_0x23630e,!0x1);_0x45bb33['isAttached']()||_0x42de8a['isAttached']()?(_0x36c9bb['insertions'][_0x23630e]=K(_0x45bb33),_0x36c9bb['deletions'][_0x23630e]=K(_0x42de8a),this['_copyMarkers'](_0x36c9bb['deletions'][_0x23630e],_0x42de8a),this['_copyMarkers'](_0x36c9bb['insertions'][_0x23630e],_0x45bb33),_0x37d1d4['insertions'][_0x23630e]=this['_generateTape'](this['_idsRoots']['get'](_0x23630e),[]),_0x37d1d4['deletions'][_0x23630e]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x23630e)||N(_0x23630e,!0x1),[])):_0x33bab5['delete'](_0x23630e);}for(const _0x349884 of _0x33bab5){const _0x53cc23=_0x37d1d4['insertions'][_0x349884];for(const _0x3fa61d of _0x53cc23){const _0x1b103b=this['_getVidAttributeName'](_0x3fa61d),_0xbcb78a=_0x3fa61d['item']['getAttribute'](_0x1b103b);_0x43767a['delete'](_0xbcb78a),_0xbcb78a>=this['_startingRevisionId']&&_0x29cb9a['set'](_0xbcb78a,_0x48c365['get'](_0xbcb78a));}}for(const _0x1757b3 of _0x33bab5){const _0x32db57=_0x37d1d4['insertions'][_0x1757b3],_0x507775=this['_getBaseVids'](_0x37d1d4['deletions'][_0x1757b3]);let _0x4893b0=0x0;for(const _0x2bbd4c of _0x32db57){const _0x3d1886=this['_getVidAttributeName'](_0x2bbd4c),_0xa8a885=_0x2bbd4c['item']['getAttribute'](_0x3d1886);if(!_0x29cb9a['has'](_0xa8a885)&&!_0x38424f['has'](_0xa8a885)){if(_0x43767a['has'](_0xa8a885))_0x4893b0++;else{if(_0xa8a885!=_0x507775[_0x4893b0]){const _0x5b9d03=_0x48c365['get'](_0xa8a885)||_0x48c365['get'](_0x507775[_0x4893b0]);for(;_0xa8a885!=_0x507775[_0x4893b0];)_0x43767a['has'](_0x507775[_0x4893b0])||(_0x38424f['set'](_0x507775[_0x4893b0],_0x5b9d03),_0x48c365['set'](_0x507775[_0x4893b0],_0x5b9d03)),_0x4893b0++;}_0x4893b0++;}}}}for(const _0x37bd66 of _0x33bab5){const _0x26da32=_0x37d1d4['insertions'][_0x37bd66];for(const _0x2b5502 of _0x26da32){const _0xc5c5ef=this['_getVidAttributeName'](_0x2b5502),_0x449b9c=_0x2b5502['item']['getAttribute'](_0xc5c5ef);if(_0x38424f['has'](_0x449b9c)){const _0x320267=_0x38424f['get'](_0x449b9c);_0x43767a['has'](_0x449b9c)||_0x43767a['set'](_0x449b9c,{..._0x320267}),_0x29cb9a['set'](_0x449b9c,{..._0x320267});}}}for(const _0x45f9f6 of _0x43767a['keys']())_0x45f9f6>=this['_startingRevisionId']&&_0x43767a['delete'](_0x45f9f6);const _0x146735=new Map();for(const _0x114d40 of _0x33bab5){let _0x42b8c1=_0x37d1d4['insertions'][_0x114d40];for(const _0xf561b0 of _0x42b8c1)if(_0xf561b0['item']['is']('element','tableCell')){const _0x30a3b0=this['_getVidAttributeName'](_0xf561b0),_0xf11172=_0xf561b0['item']['getAttribute'](_0x30a3b0);if(_0x29cb9a['has'](_0xf11172)){const _0xb2905d=_0xf561b0['item']['parent']['parent']['getAttribute']('vid_start'),_0x203314=_0x146735['get'](_0xb2905d)||new Set();_0x203314['add'](_0x29cb9a['get'](_0xf11172)['userId']),_0x146735['set'](_0xb2905d,_0x203314);}}_0x42b8c1=_0x37d1d4['deletions'][_0x114d40];for(const _0x1dc351 of _0x42b8c1)if(_0x1dc351['item']['is']('element','tableCell')){const _0x239fb7=this['_getVidAttributeName'](_0x1dc351),_0x5410e3=_0x1dc351['item']['getAttribute'](_0x239fb7);if(_0x43767a['has'](_0x5410e3)){const _0x58d5a3=_0x1dc351['item']['parent']['parent']['getAttribute']('vid_start'),_0x333f25=_0x146735['get'](_0x58d5a3)||new Set();_0x333f25['add'](_0x43767a['get'](_0x5410e3)['userId']),_0x146735['set'](_0x58d5a3,_0x333f25);}}for(const _0x24b095 of _0x146735['keys']())(_0x29cb9a['has'](_0x24b095)||_0x43767a['has'](_0x24b095))&&_0x146735['delete'](_0x24b095);}for(const _0xd3c3f6 of _0x33bab5){const _0x3a141c=_0x37d1d4['insertions'][_0xd3c3f6];let _0x2e16c3=null,_0x27723c=null;for(const _0x4327ed of _0x3a141c){const _0x26e106=this['_getVidAttributeName'](_0x4327ed),_0x1824d2=_0x4327ed['item']['getAttribute'](_0x26e106),_0x3e44b8=_0x146735['get'](_0x1824d2);_0x3e44b8&&'elementStart'==_0x4327ed['type']&&(_0x2e16c3=Array['from'](_0x3e44b8)[0x0],_0x27723c=_0x4327ed['item']['getAttribute']('vid_end')),_0x2e16c3&&(_0x43767a['set'](_0x1824d2,{'userId':_0x2e16c3}),_0x29cb9a['set'](_0x1824d2,{'userId':_0x2e16c3})),_0x1824d2==_0x27723c&&(_0x2e16c3=null,_0x27723c=null);}}const _0x567751={},_0x321465=new Set();for(const _0x1dabdb of _0x33bab5){const _0x423266=_0x36c9bb['deletions'][_0x1dabdb],_0x28bea9=_0x36c9bb['insertions'][_0x1dabdb];for(const {userId:_0x1ba1a1}of this['_touchedMarkers']['values']())null!==_0x1ba1a1&&_0x321465['add'](_0x1ba1a1);for(const {userId:_0x215bec}of this['_touchedRoots']['values']())null!==_0x215bec&&_0x321465['add'](_0x215bec);this['_markChanges'](_0x28bea9,_0x37d1d4['insertions'][_0x1dabdb],_0x29cb9a,'insertion',_0x321465),this['_markChanges'](_0x423266,_0x37d1d4['deletions'][_0x1dabdb],_0x43767a,'deletion',_0x321465),_0x567751[_0x1dabdb]={'insertions':this['_prepareViewToSave'](_0x28bea9),'deletions':this['_prepareViewToSave'](_0x423266),'attachChange':this['_touchedRoots']['get'](_0x1dabdb)||null,'attributesBefore':_0x83ca90(this['_baseRootsAttributes']['get'](_0x1dabdb))||{},'attributesAfter':_0x83ca90(this['_diffRootsAttributes']['get'](_0x1dabdb))};}return{'diffData':_0x567751,'authorsIds':Array['from'](_0x321465)};}['_processRootBeforeSave'](_0x14530f){for(const [,_0x431705]of _0x14530f['markers']){const _0x577e83=_0x431705['start']['getAncestors']()['filter'](_0x49f7b1=>'tableCell'==_0x49f7b1['name']);for(const _0x450a98 of _0x577e83)0x1==_0x450a98['childCount']&&_0x450a98['getChild'](0x0)['is']('element','paragraph')&&_0x450a98['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x11c429){this['_processRootBeforeSave'](_0x11c429);const _0x59d0b2=this['editor']['data']['toView'](_0x11c429,{}),_0x226ed6=Array['from'](_0x59d0b2['getChildren']())['map'](_0x5cbef2=>this['_getViewJson'](_0x5cbef2));return JSON['stringify'](_0x226ed6);}['_getViewJson'](_0x519ebc){if(_0x519ebc['is']('$text'))return _0x519ebc['data'];{const _0x544f62=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x34b89b=_0x519ebc,_0x1d6b90=this['editor']['data']['htmlProcessor']['domConverter'],_0x4eb9ca={'type':_0x544f62['_getTypeCharForViewElement'](_0x34b89b),'name':_0x34b89b['name'],'attributes':Array['from'](_0x34b89b['getAttributes']()),'children':Array['from'](_0x34b89b['getChildren']())['map'](_0x30b9c9=>this['_getViewJson'](_0x30b9c9))};if(_0x519ebc['is']('uiElement')&&'$comment'!=_0x519ebc['name']){const _0x1f6b23=_0x519ebc['render'](_0x1d6b90['domDocument'],_0x1d6b90);_0x4eb9ca['children']['push'](_0x1f6b23['outerHTML']);}else{if(_0x519ebc['is']('rawElement')){const _0x31314a=_0x1d6b90['domDocument']['createElement'](_0x34b89b['name']);_0x519ebc['render'](_0x31314a,_0x1d6b90),_0x4eb9ca['children']['push'](_0x31314a['innerHTML']);}}const _0x4350b3=Array['from'](_0x34b89b['getCustomProperties']());_0x4350b3['length']>0x0&&(_0x4eb9ca['customProperties']=_0x4350b3);const _0x279f30=_0x34b89b['getFillerOffset']();return null!==_0x279f30&&(_0x4eb9ca['fillerOffset']=_0x279f30),_0x4eb9ca;}}['_markChanges'](_0xb9e136,_0x518b55,_0x359d2c,_0x396d10,_0x39705b){let _0x59ce78=null,_0x2bc6f7=null,_0x4b9bae=0x0;const _0x43481a=this['editor']['model'];for(let _0xcfe135=0x0;_0xcfe135<_0x518b55['length'];_0xcfe135++){const _0x4f3648=this['_getVidAttributeName'](_0x518b55[_0xcfe135]),_0x1ecd27=_0x518b55[_0xcfe135]['item']['getAttribute'](_0x4f3648),_0x2541b7=_0x359d2c['get'](_0x1ecd27),_0x1fd5e0=_0xcfe135==_0x518b55['length']-0x1;(!_0x59ce78&&_0x2541b7&&(_0x59ce78=_0x2541b7,_0x2bc6f7=_0x518b55[_0xcfe135]),_0x59ce78&&(!_0x2541b7||_0x2541b7['userId']!=_0x59ce78['userId']))&&(_0x917453(_0x2541b7,P(_0x2bc6f7,_0xb9e136,_0x43481a),P(_0x518b55[_0xcfe135],_0xb9e136,_0x43481a)),_0x59ce78=_0x2541b7||null,_0x2bc6f7=_0x2541b7?_0x518b55[_0xcfe135]:null),_0x59ce78&&_0x1fd5e0&&_0x917453(_0x2541b7,P(_0x2bc6f7,_0xb9e136,_0x43481a),V(_0x518b55[_0xcfe135],_0xb9e136,_0x43481a));}function _0x917453(_0x50c3b5,_0x2adedc,_0x5724db){const _0x448be5=_0x59ce78['userId'],_0x1791c8='revision:'+_0x396d10+':'+_0x448be5+':'+_0x4b9bae++,_0x32f692=_0x43481a['createRange'](_0x2adedc,_0x5724db);_0xb9e136['markers']['set'](_0x1791c8,_0x32f692),null!==_0x448be5&&_0x39705b['add'](_0x448be5);}}['_getVidAttributeName'](_0x59cba4){switch(_0x59cba4['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x487c1f,_0x206f9f){_0x487c1f['baseVersion']=null;for(const _0x46a900 in _0x487c1f){const _0x2dbb13=_0x487c1f[_0x46a900];if(_0x2dbb13 instanceof _0x517828){const _0x4a9100=_0x206f9f['get'](_0x2dbb13['root']['rootName']);_0x487c1f[_0x46a900]=this['_fixPosition'](_0x2dbb13,_0x4a9100);}if(_0x2dbb13 instanceof _0xb3cd0f){const _0xaf12b3=_0x206f9f['get'](_0x2dbb13['root']['rootName']);_0x487c1f[_0x46a900]=this['_fixRange'](_0x2dbb13,_0xaf12b3);}'root'===_0x46a900&&(_0x487c1f['root']=_0x206f9f['get'](_0x487c1f['root']['rootName']));}}['_fixRange'](_0x515121,_0x539921){return this['editor']['model']['createRange'](this['_fixPosition'](_0x515121['start'],_0x539921),this['_fixPosition'](_0x515121['end'],_0x539921));}['_fixPosition'](_0x4254d1,_0x3d717c){return this['editor']['model']['createPositionFromPath'](_0x3d717c,_0x4254d1['path'],_0x4254d1['stickiness']);}['_handleInsertOperation'](_0x3bab9e){const _0x5eaaae=this['_idsRoots']['get'](_0x3bab9e['position']['root']['rootName']),_0x435620=this['_fixPosition'](_0x3bab9e['position'],_0x5eaaae),_0x27ee77=null===_0x3bab9e['_authorId']?null:_0x3bab9e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b53e7=_0x435620['parent'],_0x4b9c92=this['_revisionId'],_0x3639d7=[];for(const _0x2a1655 of _0x3bab9e['nodes'])if(_0x2a1655['is']('element'))_0x3639d7['push'](this['_makeIdsRoot'](_0x2a1655));else{for(let _0x1b6d6e=0x0;_0x1b6d6e<_0x2a1655['offsetSize'];_0x1b6d6e++)_0x3639d7['push'](new _0x36b445('$text',{'vid':this['_revisionId']++}));}const _0x90ff4e=this['_revisionId'];for(let _0x3a08e3=_0x4b9c92;_0x3a08e3<_0x90ff4e;_0x3a08e3++)this['_touched']['set'](_0x3a08e3,{'userId':_0x27ee77});_0x1b53e7['_insertChild'](_0x435620['offset'],_0x3639d7);}['_handleMoveOperation'](_0x2d30c5){(_0x2d30c5=this['_cloneOperation'](_0x2d30c5,this['_idsRoots']))['_execute']();const _0xa1ca57=null===_0x2d30c5['_authorId']?null:_0x2d30c5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4e52fd=_0x2d30c5['getMovedRangeStart'](),_0x5dfb93=_0x4e52fd['parent'],_0x3dba44=_0x4e52fd['offset'];!function _0x28aaed(_0x47af67,_0x5206e2,_0x304373,_0x2e7c96){for(let _0x1fe3e2=_0x304373;_0x1fe3e2<_0x2e7c96;_0x1fe3e2++){const _0x251219=_0x5206e2['getChild'](_0x1fe3e2);_0x251219['is']('element','$text')?_0x47af67['set'](_0x251219['getAttribute']('vid'),{'userId':_0xa1ca57}):(_0x47af67['set'](_0x251219['getAttribute']('vid_start'),{'userId':_0xa1ca57}),_0x28aaed(_0x47af67,_0x251219,0x0,_0x251219['childCount']),_0x47af67['set'](_0x251219['getAttribute']('vid_end'),{'userId':_0xa1ca57}));}}(this['_touched'],_0x5dfb93,_0x3dba44,_0x3dba44+_0x2d30c5['howMany']);}['_handleMergeOperation'](_0x5c5d48){const _0x1bca2e=null===(_0x5c5d48=this['_cloneOperation'](_0x5c5d48,this['_idsRoots']))['_authorId']?null:_0x5c5d48['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x169f14=_0x5c5d48['targetPosition']['parent'],_0x5a6381=_0x5c5d48['sourcePosition']['parent'],_0x48c88a=_0x169f14['getAttribute']('vid_end'),_0x415fe3=_0x5a6381['getAttribute']('vid_start');_0x169f14['_setAttribute']('vid_end',_0x5a6381['getAttribute']('vid_end')),_0x5a6381['_setAttribute']('vid_end',_0x48c88a),this['_touched']['set'](_0x415fe3,{'userId':_0x1bca2e}),this['_touched']['set'](_0x48c88a,{'userId':_0x1bca2e}),_0x5c5d48['_execute']();}['_handleSplitOperation'](_0x34f335){const _0x39035f=null===(_0x34f335=this['_cloneOperation'](_0x34f335,this['_idsRoots']))['_authorId']?null:_0x34f335['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b5368=_0x34f335['graveyardPosition'],_0xeab941=_0x34f335['splitPosition']['parent'];_0x34f335['_execute']();const _0x13ccac=_0xeab941['getAttribute']('vid_end'),_0x3cd0d4=_0x34f335['insertionPosition']['nodeAfter'];if(_0x1b5368){const _0x137eb3=_0x3cd0d4['getAttribute']('vid_end'),_0x24febe=_0xeab941['getAttribute']('vid_end');_0xeab941['_setAttribute']('vid_end',_0x137eb3),_0x3cd0d4['_setAttribute']('vid_end',_0x24febe),this['_touched']['set'](_0xeab941['getAttribute']('vid_end'),{'userId':_0x39035f}),this['_touched']['set'](_0x3cd0d4['getAttribute']('vid_start'),{'userId':_0x39035f});}else{const _0x384d79=this['_revisionId']++,_0x3d08e0=this['_revisionId']++;_0xeab941['_setAttribute']('vid_end',_0x384d79),_0x3cd0d4['_setAttribute']('vid_start',_0x3d08e0),_0x3cd0d4['_setAttribute']('vid_end',_0x13ccac),this['_touched']['set'](_0x384d79,{'userId':_0x39035f}),this['_touched']['set'](_0x3d08e0,{'userId':_0x39035f});}}['_handleMarkerOperation'](_0x49e574){if(!_0x49e574['affectsData'])return;const _0x4508e0=(_0x49e574=this['_cloneOperation'](_0x49e574,this['_diffRoots']))['oldRange']?_0x49e574['oldRange']['root']:null,_0x4410da=_0x49e574['newRange']?_0x49e574['newRange']['root']:null;_0x4508e0&&this['_markers']['delete'](_0x49e574['name']),_0x4410da&&this['_markers']['set'](_0x49e574['name'],_0x49e574['newRange']['clone']());const _0x305c63=null===_0x49e574['_authorId']?null:_0x49e574['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x44600f=_0x49e574['name'];if(!this['_touchedMarkers']['has'](_0x44600f))return void this['_touchedMarkers']['set'](_0x44600f,{'range':_0x49e574['oldRange'],'userId':_0x305c63});const _0xc1c0a9=this['_touchedMarkers']['get'](_0x44600f),_0x13aa3c=_0xc1c0a9['range'],_0x23a68b=_0x49e574['newRange'];null==_0x13aa3c&&null==_0x23a68b||_0x13aa3c&&_0x23a68b&&_0x13aa3c['isEqual'](_0x23a68b)?this['_touchedMarkers']['delete'](_0x49e574['name']):_0xc1c0a9['userId']=_0x305c63;}['_handleRootOperation'](_0x283731,_0x4c7f7c){this['_diffRoots']['has'](_0x283731['rootName'])?this['_diffRoots']['get'](_0x283731['rootName'])['_isAttached']=_0x283731['isAdd']:(this['_diffRoots']['set'](_0x283731['rootName'],N(_0x283731['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x283731['rootName'],{}),_0x4c7f7c&&this['_idsRoots']['set'](_0x283731['rootName'],N(_0x283731['rootName'],!0x0)));const _0x487d06=null===_0x283731['_authorId']?null:_0x283731['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xa36e37=this['_touchedRoots']['get'](_0x283731['rootName']);_0xa36e37&&_0xa36e37['userId']===_0x487d06?this['_touchedRoots']['delete'](_0x283731['rootName']):this['_touchedRoots']['set'](_0x283731['rootName'],{'userId':_0x487d06,'isAttached':_0x283731['isAdd']});}['_handleRootAttributeOperation'](_0x37c385){const _0x261190=this['_diffRootsAttributes']['get'](_0x37c385['root']['rootName']);null===_0x37c385['newValue']?delete _0x261190[_0x37c385['key']]:_0x261190[_0x37c385['key']]=_0x37c385['newValue'];}}function K(_0x2b08cd){const _0x5943c6=N(_0x2b08cd['rootName'],_0x2b08cd['isAttached']());for(const _0xdf00bf of _0x2b08cd['getChildren']()){const _0x3024b9=_0xdf00bf['_clone'](!0x0);_0x5943c6['_appendChild'](_0x3024b9);}return _0x5943c6;}function N(_0x5bccbb,_0xc48329=!0x0){const _0x43ac14=new _0x8c84c8();return _0x43ac14['rootName']=_0x5bccbb,_0x43ac14['_isAttached']=_0xc48329,_0x43ac14['isAttached']=()=>_0x43ac14['_isAttached'],_0x43ac14;}function P(_0x78770d,_0x2c5c2f,_0x4214ad){const _0x3b2d4f='elementEnd'==_0x78770d['type']?_0x4214ad['createPositionAt'](_0x78770d['item'],'end'):_0x4214ad['createPositionBefore'](_0x78770d['item']);return _0x4214ad['createPositionFromPath'](_0x2c5c2f,_0x3b2d4f['path'],_0x3b2d4f['stickiness']);}function V(_0xa157f1,_0x2de73b,_0x10407c){const _0x3b4fed='elementStart'==_0xa157f1['type']?_0x10407c['createPositionAt'](_0xa157f1['item'],0x0):_0x10407c['createPositionAfter'](_0xa157f1['item']);return _0x10407c['createPositionFromPath'](_0x2de73b,_0x3b4fed['path'],_0x3b4fed['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
- _0x5aa04a(_0x4eb8a3){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4244cf,_0x1c5f1c){super(_0x4244cf),this['focusTracker']=new _0x30890a(),this['keystrokes']=new _0x34a3da(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1c5f1c),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'](),_0xccd7c3({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x2c5de2=_0x50a2b5=>_0x50a2b5['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2c5de2),this['keystrokes']['set']('arrowleft',_0x2c5de2),this['keystrokes']['set']('arrowup',_0x2c5de2),this['keystrokes']['set']('arrowdown',_0x2c5de2);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x14abd6){this['revisionNameInputView']['fieldView']['element']['value']=_0x14abd6['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x222267){const _0x2d412b=new et(this['locale'],ti),_0xcbfc1e=_0x2d412b['fieldView'];_0xcbfc1e['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4b9df7=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x222267&&(_0x4b9df7+='\x20('+m(this['locale'],'optional')+')'),(_0x2d412b['label']=_0x4b9df7,_0xcbfc1e['on']('input',()=>{this['revisionNameInputValue']=_0xcbfc1e['element']['value']['trim']();}),_0x2d412b);}}class l extends _0xbe21c4{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x2f3c18=this['editor'],_0x23c3d0=_0x2f3c18['plugins']['get']('RevisionTracker');_0x2f3c18['ui']['componentFactory']['add']('revisionHistory',_0x5c8f0e=>{const _0x41e46c=_0x1e23a0(_0x5c8f0e),_0x1b9334=_0x41e46c['panelView']['children'],_0x7ce969=new _0x4b2173(_0x5c8f0e),_0x11d5f0=new _0x55af41(_0x5c8f0e),_0x24eebd=this['_createSaveRevisionButton'](_0x41a1a9),_0x5a60b4=new _0x55af41(_0x5c8f0e),_0x456a66=this['_createOpenRevisionButton'](_0x41a1a9);return _0x41e46c['bind']('isEnabled')['to'](_0x23c3d0,'isReady',_0x23c3d0,'isEnabled',_0x2f3c18,'isReadOnly',(_0x5efc6e,_0x2df569,_0x458ec1)=>_0x5efc6e&&_0x2df569&&!_0x458ec1),_0x41e46c['buttonView']['set']({'icon':_0x672cd0,'label':m(_0x5c8f0e,'Revision\x20history'),'tooltip':!0x0}),_0x24eebd['set']({'withText':!0x0,'role':'menuitem'}),_0x456a66['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x456a66,'execute',()=>{_0x41e46c['isOpen']=!0x1,_0x2f3c18['editing']['view']['focus']();},{'priority':'low'}),_0x11d5f0['children']['add'](_0x24eebd),_0x5a60b4['children']['add'](_0x456a66),_0x7ce969['role']='menu',_0x7ce969['items']['addMany']([_0x11d5f0,_0x5a60b4]),_0x1b9334['add'](_0x7ce969),_0x41e46c;}),_0x2f3c18['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0xe7dc57=this['editor'],_0x9f75aa=_0xe7dc57['locale'],_0x587f28=_0xe7dc57['plugins']['get']('RevisionTracker'),_0x55d4fc=new _0x22ce88(_0x9f75aa),_0xee4282=new _0x3b6094(_0x9f75aa);_0x55d4fc['bind']('isEnabled')['to'](_0x587f28,'isReady',_0x587f28,'isEnabled',_0xe7dc57,'isReadOnly',(_0x13875c,_0x498b33,_0x230f7a)=>_0x13875c&&_0x498b33&&!_0x230f7a),_0x55d4fc['buttonView']['set']({'icon':_0x672cd0,'label':m(_0x9f75aa,'Revision\x20history')});const _0x353c1a=new _0x360a69(_0x9f75aa,_0x55d4fc),_0x546900=this['_createSaveRevisionButton'](_0x1b7074);_0x546900['delegate']('execute')['to'](_0x55d4fc),_0x353c1a['children']['add'](_0x546900),_0xee4282['items']['add'](_0x353c1a);const _0x1fe6f2=new _0x360a69(_0x9f75aa,_0x55d4fc),_0x12bb31=this['_createOpenRevisionButton'](_0x1b7074);return _0x12bb31['delegate']('execute')['to'](_0x55d4fc),_0x1fe6f2['children']['add'](_0x12bb31),_0xee4282['items']['add'](_0x1fe6f2),_0x55d4fc['panelView']['children']['add'](_0xee4282),_0x55d4fc;}['_createSaveRevisionButton'](_0x548efa){const _0x418e19=this['editor'],_0xa1f81c=_0x418e19['plugins']['get']('RevisionTracker'),_0x4ec41e=new _0x548efa(_0x418e19['locale']);return _0x4ec41e['set']({'label':m(_0x418e19['locale'],'Save\x20current\x20revision')}),_0x4ec41e['bind']('isEnabled')['to'](_0xa1f81c,'isReady',_0xa1f81c,'isEnabled',_0x418e19,'isReadOnly',(_0x23bcf6,_0x1347ab,_0x466ca2)=>_0x23bcf6&&_0x1347ab&&!_0x466ca2),this['listenTo'](_0x4ec41e,'execute',()=>{this['_showDialog']();}),_0x4ec41e;}['_createOpenRevisionButton'](_0x3e7d97){const _0x4a6b04=this['editor'],_0xc789d9=_0x4a6b04['plugins']['get']('RevisionTracker'),_0x29b565=new _0x3e7d97(_0x4a6b04['locale']);return _0x29b565['set']({'label':m(_0x4a6b04['locale'],'Open\x20revision\x20history')}),_0x29b565['bind']('isEnabled')['to'](_0xc789d9,'isReady',_0x4a6b04,'isReadOnly',(_0x8f3dd3,_0x203346)=>_0x8f3dd3&&!_0x203346),this['listenTo'](_0x29b565,'execute',()=>{_0x4a6b04['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x29b565;}['_showDialog'](){const _0x2035fc=this['editor'],_0x162edc=_0x2035fc['locale'],_0x1b075e=_0x2035fc['plugins']['get']('Dialog'),_0x43bbb9=_0x2035fc['plugins']['get']('RevisionTracker');function _0xf6c3d8(_0x22a39a){_0x2035fc['config']['get']('revisionHistory.requireRevisionName')&&''===_0x22a39a['revisionName']?_0x22a39a['revisionNameInputView']['errorText']=m(_0x162edc,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2035fc['plugins']['get'](h)['saveRevision']({'name':_0x22a39a['revisionName']}),_0x1b075e['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xf6c3d8(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x1b075e['show']({'id':'revisionSave','title':m(_0x162edc,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x2035fc['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x1b075e['hide']()},{'label':m(_0x2035fc['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x234a24){_0x234a24['bind']('isEnabled')['to'](_0x43bbb9,'isReady',_0x43bbb9,'isEnabled',_0x2035fc,'isReadOnly',(_0x172116,_0xbfc1ba,_0x5d0468)=>_0x172116&&_0xbfc1ba&&!_0x5d0468);},'onExecute':()=>_0xf6c3d8(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x4b9b04=this['editor'],_0x1d5ba5=_0x4b9b04['locale'];this['_saveRevisionFormView']=new he(_0x1d5ba5,_0x4b9b04['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x4eb8a3{['changeId'];['_model'];constructor(_0x1b5a14,_0x35544b){super(_0x1b5a14),this['_model']=_0x35544b,this['changeId']=_0x35544b['id'];const _0x84d038=this['bindTemplate'],_0x14590f=m(_0x1b5a14,_0x35544b['data']['isSuggestion']?'Suggested\x20by':'add'==_0x35544b['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x35544b['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x84d038['to']('type',_0x3bf403=>'ck-revision-change__'+_0x3bf403)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x14590f}]},{'text':'\x20'+_0x35544b['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x113f03(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x36dc02){super(),this['id']=_0x36dc02['id']||_0x532896(),this['author']=_0x36dc02['author'],this['type']=_0x36dc02['type'],this['data']=_0x36dc02['data']||{},this['rootName']=_0x36dc02['rootName'],this['set']('createdAt',_0x36dc02['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x38d6e3,_0x1e926e){this['newRevisionId']=_0x38d6e3,this['oldRevisionId']=_0x1e926e,this['changes']=new _0x504df2();}['_setChanges'](_0x50a448){for(const _0x192f61 of _0x50a448)this['changes']['add'](_0x192f61);}}class u extends _0xbe21c4{['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[_0x416e9c,_0x3e3e3f,S,$];}constructor(_0x42dc1b){super(_0x42dc1b),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',(_0x3d4002,_0x4860c0,_0x256624)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x566a16=>{for(const _0x3fbb41 of this['editor']['editing']['view']['document']['roots'])_0x256624?_0x566a16['removeClass']('ck-editor__editable__overlay',_0x3fbb41):_0x566a16['addClass']('ck-editor__editable__overlay',_0x3fbb41);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5e724f=>null!==_0x5e724f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5b2d33,_0x5844de,_0x470c5c)=>_0x5b2d33&&_0x470c5c?_0x5844de['changes']['getIndex'](_0x470c5c):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x56ccfa,_0x547445)=>_0x56ccfa?_0x547445['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3e3e3f);}['init'](){const _0xb24340=this['editor'],_0x340fff=new rt(_0xb24340,{'direction':'backward'}),_0xf509f6=new rt(_0xb24340,{'direction':'forward'});(_0xb24340['commands']['add']('showPreviousChange',_0x340fff),_0xb24340['commands']['add']('showNextChange',_0xf509f6),_0xb24340['commands']['add']('restoreRevision',new nt(_0xb24340)),this['on']('change:numberOfChanges',()=>{_0x340fff['refresh'](),_0xf509f6['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0xb24340['enableReadOnlyMode']('revision-viewer'),_0xb24340['plugins']['has']('WidgetToolbarRepository'))&&_0xb24340['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x3e3c02){return await this['_utils']['loadRevisionData'](_0x3e3c02,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3e3c02);}async['getRevisionRootsAttributes'](_0x3104df){return await this['_utils']['loadRevisionData'](_0x3104df,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3104df);}async['compare'](_0x447d7a,_0x452dbd,_0x44d824=!0x1){if(!this['isEnabled'])return;const _0x546dec=this['diff'],_0x45a055=this['repository'],_0x10841e='string'==typeof _0x447d7a?_0x45a055['getRevision'](_0x447d7a):_0x447d7a,_0x7967ed='string'==typeof _0x452dbd?_0x45a055['getRevision'](_0x452dbd):_0x452dbd,_0x277450=_0x10841e['id'],_0x358404=_0x7967ed?_0x7967ed['id']:null;if(!_0x44d824&&this['diff']&&this['diff']['newRevisionId']===_0x277450&&this['diff']['oldRevisionId']===_0x358404)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x277450,_0x358404);const _0x1d280a=this['_getRevisionsRange'](_0x10841e,_0x7967ed,!0x0)['map'](_0x5b4f82=>this['_utils']['loadRevisionData'](_0x5b4f82,this['adapter']));return _0x1d280a['push'](new Promise(_0x317a70=>{setTimeout(_0x317a70,0x14);})),Promise['all'](_0x1d280a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x551b65=this['_getDiff'](_0x277450,_0x358404);for(const _0x4f94df of _0x551b65['changes'])this['_changeIdToChange']['set'](_0x4f94df['id'],_0x4f94df);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3e9ccf=>{for(const _0x5b0982 of this['editor']['model']['document']['getRootNames']())_0x3e9ccf['detachRoot'](_0x5b0982);for(const _0x22f309 of Object['keys'](_0x551b65['model'])){const _0x278d1a=_0x3e9ccf['addRoot'](_0x22f309);for(const _0x4decca of Object['keys'](_0x551b65['attributes'][_0x22f309]))_0x3e9ccf['setAttribute'](_0x4decca,_0x551b65['attributes'][_0x22f309][_0x4decca],_0x278d1a);_0x3e9ccf['insert'](_0x551b65['model'][_0x22f309],_0x278d1a,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x551b65['changes'])),this['isReady']=!0x0;})['catch'](_0x422a0a=>{console['error'](_0x422a0a),this['_cleanUp'](),_0x546dec&&(this['diff']=_0x546dec),this['isReady']=!0x0;});}['addRevisionData'](_0x5e0f84,_0x5b9619){const _0x5ec505=this['repository']['createRevision'](_0x5e0f84);return _0x5ec505['on']('_update',(_0x4a7fe6,_0x1d0517,_0x3ce82c)=>_0x5b9619(_0x1d0517,_0x3ce82c,_0x5ec505)),this['repository']['addRevision'](_0x5ec505),_0x5ec505;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4b1596=>{for(const _0x5e926f of this['editor']['model']['document']['getRootNames']())_0x4b1596['detachRoot'](_0x5e926f);});}['_sortAndFilterDiffChanges'](_0x2e4e85){const _0x19b937=[],_0x51f1c8=new Map();for(const _0x467291 of this['editor']['model']['document']['getRootNames']()){const _0x1051e1=this['editor']['editing']['view']['getDomRoot'](_0x467291);if(!_0x1051e1)continue;const _0x1f64ec=_0x1051e1['getClientRects']()['item'](0x0);_0x1f64ec&&(_0x19b937['push'](_0x467291),_0x51f1c8['set'](_0x467291,_0x1f64ec));}return _0x19b937['sort']((_0x5a14c9,_0x4b3419)=>{const _0x30a2ce=_0x51f1c8['get'](_0x5a14c9),_0x3b6503=_0x51f1c8['get'](_0x4b3419);return _0x30a2ce['y']-_0x3b6503['y']||_0x30a2ce['x']-_0x3b6503['x'];}),(_0x2e4e85=_0x2e4e85['filter'](_0x4f77fd=>_0x19b937['includes'](_0x4f77fd['rootName'])))['sort']((_0x45bde8,_0x4a3386)=>_0x19b937['indexOf'](_0x45bde8['rootName'])-_0x19b937['indexOf'](_0x4a3386['rootName'])),_0x2e4e85;}['_makeTape'](_0x232772){const _0x40b918=Array['from'](_0x232772['markers'])['filter'](([_0x11c4bf,_0x3a5370])=>_0x11c4bf['startsWith']('revision:')&&!_0x3a5370['isCollapsed']),_0x4435e2=Array['from'](this['editor']['model']['createRangeIn'](_0x232772)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x40b918['length'])for(const _0x2e68ff of _0x4435e2){const [_0x36e547,_0x511590]=_0x40b918[0x0],[,_0x4889f3,_0x41622f]=_0x36e547['split'](':');if(_0x511590['end']['isEqual'](_0x2e68ff['nextPosition'])&&_0x40b918['shift'](),(_0x2e68ff['previousPosition']['isEqual'](_0x511590['start'])||_0x2e68ff['previousPosition']['isAfter'](_0x511590['start']))&&('insertion'==_0x4889f3?_0x2e68ff['isAdded']={'userId':_0x41622f}:'deletion'==_0x4889f3&&(_0x2e68ff['isRemoved']={'userId':_0x41622f})),0x0==_0x40b918['length'])break;}return _0x4435e2;}['_refreshStartEndIndex'](_0x235f84){const _0x1bf2f8=new Map();for(let _0x2d2217=0x0;_0x2d2217<_0x235f84['length'];_0x2d2217++)'text'===_0x235f84[_0x2d2217]['type']?(_0x235f84[_0x2d2217]['item']['startIndex']=_0x2d2217,_0x235f84[_0x2d2217]['item']['endIndex']=_0x2d2217):('elementStart'===_0x235f84[_0x2d2217]['type']?_0x235f84[_0x2d2217]['item']['startIndex']=_0x2d2217:'elementEnd'===_0x235f84[_0x2d2217]['type']&&(_0x235f84[_0x2d2217]['item']['endIndex']=_0x2d2217),_0x1bf2f8['set'](_0x235f84[_0x2d2217]['id'],_0x2d2217));for(const _0x39fc6c of _0x1bf2f8['values']())'elementStart'===_0x235f84[_0x39fc6c]['type']?_0x235f84[_0x39fc6c]['item']['endIndex']=_0x1bf2f8['get'](_0x235f84[_0x39fc6c]['pairId']):'elementEnd'===_0x235f84[_0x39fc6c]['type']&&(_0x235f84[_0x39fc6c]['item']['startIndex']=_0x1bf2f8['get'](_0x235f84[_0x39fc6c]['pairId']));}['_processTape'](_0xea2618){for(let _0x1e618e=0x0;_0x1e618e<_0xea2618['length'];_0x1e618e++){if('elementStart'===_0xea2618[_0x1e618e]['type'])_0xea2618[_0x1e618e]['item']['startIndex']=_0x1e618e;else{if('elementEnd'===_0xea2618[_0x1e618e]['type']){_0xea2618[_0x1e618e]['item']['endIndex']=_0x1e618e;const _0x2451b1=_0xea2618[_0x1e618e]['item']['startIndex'];_0xea2618[_0x2451b1]['pairId']=_0xea2618[_0x1e618e]['id'],_0xea2618[_0x1e618e]['pairId']=_0xea2618[_0x2451b1]['id'];}else _0xea2618[_0x1e618e]['item']['startIndex']=_0x1e618e,_0xea2618[_0x1e618e]['item']['endIndex']=_0x1e618e,_0xea2618[_0x1e618e]['pairId']=null;}_0xea2618[_0x1e618e]['markersStart']||(_0xea2618[_0x1e618e]['markersStart']=[],_0xea2618[_0x1e618e]['markersEnd']=[]);}}['_markInsertions'](_0x1461f7,_0x4a2d2c){const _0x4bc7b7=_0x1461f7['filter'](_0x51f5eb=>!_0x51f5eb['isAdded']);for(let _0x649d0e=0x0;_0x649d0e<_0x4a2d2c['length'];_0x649d0e++)_0x4a2d2c[_0x649d0e]['isAdded']&&(_0x4bc7b7[_0x649d0e]['isAdded']=_0x4a2d2c[_0x649d0e]['isAdded']);}['_getDiff'](_0x48cc3a,_0x4b4d00=null){const _0xaa364c=this['repository']['getRevision'](_0x48cc3a),_0x47f869=_0x4b4d00?this['repository']['getRevision'](_0x4b4d00):null,_0x3e68b2=this['_getRevisionsRange'](_0xaa364c,_0x47f869),_0x19616e=_0x3e68b2[_0x3e68b2['length']-0x1],_0xf21a58=new Map(),_0x5e0650={'model':{},'attributes':{},'changes':[]},_0x209d07=new Set(),_0x52f2b6=new Map();for(let _0x4c4270=_0x3e68b2['length']-0x1;_0x4c4270>=0x0;_0x4c4270--){const _0x15c685=_0x3e68b2[_0x4c4270];for(const _0x268447 of Object['keys'](_0x15c685['diffData']))if(_0x15c685['diffData'][_0x268447]['attachChange']){const _0x271210=_0x15c685['diffData'][_0x268447]['attachChange'];_0x271210['isAttached']?(_0x209d07['add'](_0x268447),_0x52f2b6['has'](_0x268447)&&_0x52f2b6['get'](_0x268447)['userId']==_0x271210['userId']?_0x52f2b6['delete'](_0x268447):_0x52f2b6['set'](_0x268447,_0x271210)):_0x52f2b6['has'](_0x268447)?(_0x209d07['delete'](_0x268447),_0x52f2b6['delete'](_0x268447)):(_0x209d07['add'](_0x268447),_0x52f2b6['set'](_0x268447,_0x271210));}else _0x209d07['add'](_0x268447);}for(const _0x5789d1 of _0x209d07){const _0x16c971=_0x52f2b6['has'](_0x5789d1)&&!_0x52f2b6['get'](_0x5789d1)['isAttached'];let _0x3f497c=_0x16c971?_0x3e68b2['length']-0x1:0x0;const _0x21d77d=_0x16c971?-0x1:0x1;for(;_0x3e68b2[_0x3f497c];){const _0x489e7d=_0x3e68b2[_0x3f497c];if(_0x489e7d['diffData'][_0x5789d1]){const _0x2fc44f=_0x16c971?_0x489e7d['diffData'][_0x5789d1]['attributesBefore']:_0x489e7d['diffData'][_0x5789d1]['attributesAfter'];_0x5e0650['attributes'][_0x5789d1]=_0x2fc44f?_0x83ca90(_0x2fc44f):{};break;}_0x3f497c+=_0x21d77d;}}for(const _0x5ea4bc of _0x3e68b2){_0x5ea4bc['model']={};for(const _0x20f631 of _0x5ea4bc['authors'])_0xf21a58['set'](_0x20f631['id'],_0x20f631);for(const _0x5746c4 of _0x209d07){const _0x37de87=_0x5ea4bc['diffData'][_0x5746c4]?_0x5ea4bc['diffData'][_0x5746c4]['insertions']:'[]',_0x4a150f=_0x5ea4bc['diffData'][_0x5746c4]?_0x5ea4bc['diffData'][_0x5746c4]['deletions']:'[]';_0x5ea4bc['model'][_0x5746c4]={'insertions':this['_utils']['_makeModelFromViewString'](_0x37de87),'deletions':this['_utils']['_makeModelFromViewString'](_0x4a150f)};}}for(const _0x5d3150 of _0x209d07){let _0x5d1042=null,_0x316e87=0x0;const _0xb7bbab=new Map(Array['from'](_0xaa364c['model'][_0x5d3150]['insertions']['markers'])['filter'](([_0x412a57])=>!_0x412a57['startsWith']('revision:')));let _0x2782a3=0x0;for(const _0x190117 of _0x3e68b2){const _0x350cf1=this['_makeTape'](_0x190117['model'][_0x5d3150]['insertions']);_0x190117==_0xaa364c?(_0x5d1042=_0x350cf1,_0x316e87=_0x5d1042['length'],_0x5d1042['forEach'](_0x2cd237=>{_0x2cd237['id']=_0x2782a3++;}),this['_processTape'](_0x5d1042)):this['_markInsertions'](_0x5d1042,_0x350cf1);const _0x2e62e5=_0x5d1042['filter'](_0x1c70be=>!_0x1c70be['isAdded'])['map'](_0xd5d499=>_0xd5d499['id']);let _0x3e5cac=0x0;const _0x464ab1=this['_makeTape'](_0x190117['model'][_0x5d3150]['deletions']);_0x464ab1['forEach'](_0x3afe80=>{_0x3afe80['isRemoved']?_0x3afe80['id']=_0x316e87++:_0x3afe80['id']=_0x2e62e5[_0x3e5cac++];}),this['_processTape'](_0x464ab1),this['_setDistance'](_0x5d1042,'isAdded'),this['_setDistance'](_0x464ab1,'isRemoved'),_0x190117==_0xaa364c&&this['_markMarkers'](_0x5d1042,_0xb7bbab),_0x5d1042=this['_joinTapes'](_0x5d1042,_0x464ab1),this['_refreshStartEndIndex'](_0x5d1042),this['_setDistance'](_0x5d1042,'isRemoved');}_0x5d1042=_0x5d1042['filter'](_0x16efe8=>!(_0x16efe8['isAdded']&&_0x16efe8['isRemoved']));const _0x3ca3c2=new Map(_0x19616e['model'][_0x5d3150]['deletions']['markers']),_0x1163e4=new Set(_0xb7bbab['keys']());for(const _0x3b92f3 of _0x3ca3c2['keys']())_0x1163e4['delete'](_0x3b92f3);this['_markSuggestions'](_0x5d1042,_0x1163e4),this['_fixObsoleteTags'](_0x5d1042),_0x5d1042=this['_removeMissingPairs'](_0x5d1042),_0x5d1042=this['_markMismatchedRemovedTags'](_0x5d1042),_0x5d1042=this['_removeUnsupportedChanges'](_0x5d1042);const {root:_0x5c7105,changes:_0x49a6bd}=this['_makeModelFromTape'](_0x5d1042,_0xf21a58,_0x5d3150);_0x5e0650['model'][_0x5d3150]=_0x5c7105;const _0x1f32d4=_0x52f2b6['get'](_0x5d3150);if(_0x1f32d4){const _0x5698ad=_0xf21a58['get'](_0x1f32d4['userId']),_0x9bb7ff=new G({'author':_0x5698ad,'type':_0x1f32d4['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5d3150});_0x49a6bd['unshift'](_0x9bb7ff),_0x5e0650['attributes'][_0x5d3150]['revisionHistoryAttachChange']=_0x9bb7ff['id'];}_0x5e0650['changes']=_0x5e0650['changes']['concat'](_0x49a6bd);}return _0x5e0650;}['_markMarkers'](_0x585f5e,_0x461ff3){for(let _0x2fe530=0x0;_0x2fe530<_0x585f5e['length'];_0x2fe530++)for(const [_0x4c4b29,_0x460f58]of _0x461ff3)!_0x460f58['isCollapsed']&&_0x460f58['start']['isEqual'](_0x585f5e[_0x2fe530]['previousPosition'])&&_0x585f5e[_0x2fe530]['markersStart']['push'](_0x4c4b29),_0x460f58['end']['isEqual'](_0x585f5e[_0x2fe530]['nextPosition'])&&_0x585f5e[_0x2fe530]['markersEnd']['push'](_0x4c4b29);}['_joinTapes'](_0x2431ce,_0xfc2934){let _0x50e7b1=[],_0x4db0e7=0x0,_0x3302e2=0x0;for(;_0x4db0e7<_0x2431ce['length']||_0x3302e2<_0xfc2934['length'];){const _0x59a21e=_0x2431ce[_0x4db0e7]||{},_0x2e767d=_0xfc2934[_0x3302e2]||{};if(_0x59a21e['id']==_0x2e767d['id'])_0x4db0e7++,_0x3302e2++,_0x50e7b1['push'](_0x59a21e);else{if(_0x2e767d['isRemoved']&&_0x59a21e['isAdded']){const {commonTape:_0x520cf6,iEnd:_0x21f42f,jEnd:_0xdf697b}=this['_threeWayMerge'](_0x2431ce,_0x4db0e7,_0xfc2934,_0x3302e2);_0x50e7b1=_0x50e7b1['concat'](_0x520cf6),_0x4db0e7=_0x21f42f,_0x3302e2=_0xdf697b;}else _0x2e767d['isRemoved']?(_0x3302e2++,_0x50e7b1['push'](_0x2e767d)):(_0x4db0e7++,_0x50e7b1['push'](_0x59a21e));}}return _0x50e7b1;}['_markSuggestions'](_0x207a93,_0x4e243a){const _0x52e946=[];for(let _0x40cb7c=0x0;_0x40cb7c<_0x207a93['length'];_0x40cb7c++){for(let _0x868842=0x0;_0x868842<_0x207a93[_0x40cb7c]['markersStart']['length'];_0x868842++){const _0x217480=_0x207a93[_0x40cb7c]['markersStart'][_0x868842];if(!_0x4e243a['has'](_0x217480))continue;const {group:_0x4447fa,type:_0x3ac6c7,authorId:_0x44b987}=_0x4fd0e4(_0x217480);'revision-suggestion'!=_0x4447fa||'insertion'!=_0x3ac6c7&&'deletion'!=_0x3ac6c7||(_0x52e946['unshift']({'type':_0x3ac6c7,'name':_0x217480,'userId':_0x44b987}),_0x207a93[_0x40cb7c]['markersStart']['splice'](_0x868842,0x1),_0x868842--);}_0x3b7615(_0x207a93[_0x40cb7c]);for(let _0x419152=0x0;_0x419152<_0x207a93[_0x40cb7c]['markersEnd']['length'];_0x419152++){const _0x1e0f81=_0x207a93[_0x40cb7c]['markersEnd'][_0x419152];if(!_0x4e243a['has'](_0x1e0f81))continue;const {group:_0x2ead52,type:_0x17cdb6}=_0x4fd0e4(_0x1e0f81);if('revision-suggestion'!=_0x2ead52||'insertion'!=_0x17cdb6&&'deletion'!=_0x17cdb6)continue;_0x207a93[_0x40cb7c]['markersEnd']['splice'](_0x419152,0x1),_0x419152--;const _0x3613b6=_0x52e946['findIndex'](_0x27a88b=>_0x27a88b['name']==_0x1e0f81);_0x3613b6>-0x1&&_0x52e946['splice'](_0x3613b6,0x1);}}function _0x4fd0e4(_0x3b419f){const _0x5d0cc4=_0x3b419f['split'](':');return{'group':_0x5d0cc4[0x0],'type':_0x5d0cc4[0x1],'subType':_0x5d0cc4['length']>=0x5?_0x5d0cc4[0x2]:null,'id':_0x5d0cc4['length']<0x5?_0x5d0cc4[0x2]:_0x5d0cc4[0x3],'authorId':_0x5d0cc4['length']<0x5?_0x5d0cc4[0x3]:_0x5d0cc4[0x4],'markerCount':0x6==_0x5d0cc4['length']?_0x5d0cc4[0x5]:null};}function _0x3b7615(_0x2739fc){for(let _0x2beb9e=0x0;_0x2beb9e<_0x52e946['length'];_0x2beb9e++){if(_0x2739fc['isAdded']&&'insertion'==_0x52e946[_0x2beb9e]['type']&&_0x2739fc['isAdded']['userId']==_0x52e946[_0x2beb9e]['userId'])return _0x2739fc['isAddSuggestion']=_0x52e946[_0x2beb9e],void delete _0x2739fc['isAdded'];if(!_0x2739fc['isAdded']&&!_0x2739fc['isRemoved']&&'deletion'==_0x52e946[_0x2beb9e]['type'])return void(_0x2739fc['isRemoveSuggestion']=_0x52e946[_0x2beb9e]);}}}['_setDistance'](_0x53d07c,_0x11fa35){let _0x2ce6ac=0x0,_0x1be4a4=!0x1;const _0x16fcfa=new Map();for(const _0x52f2a3 of _0x53d07c)_0x52f2a3[_0x11fa35]?_0x1be4a4&&(_0x2ce6ac++,_0x1be4a4=!0x1):(_0x2ce6ac++,_0x1be4a4=!0x0),_0x16fcfa['set'](_0x52f2a3['id'],_0x2ce6ac);for(let _0x1e8814=0x0;_0x1e8814<_0x53d07c['length'];_0x1e8814++){if('isRemoved'==_0x11fa35&&_0x53d07c[_0x1e8814]['isAdded']||'isAdded'==_0x11fa35&&_0x53d07c[_0x1e8814]['isRemoved'])continue;if('text'==_0x53d07c[_0x1e8814]['type']){_0x53d07c[_0x1e8814]['distance']=0x0;continue;}const _0x6e4e20=_0x16fcfa['get'](_0x53d07c[_0x1e8814]['pairId']),_0x3c6ec7=_0x16fcfa['get'](_0x53d07c[_0x1e8814]['id']);_0x53d07c[_0x1e8814]['distance']=_0x6e4e20-_0x3c6ec7;}}['_getRevisionsRange'](_0x1e9c99,_0x30d1d7,_0x11dd07=!0x1){const _0x48e332=[];let _0x3d7c95=this['repository']['getIndex'](_0x1e9c99),_0x310e96=this['repository']['getIndex'](_0x30d1d7);for(-0x1==_0x310e96&&(_0x310e96=this['repository']['_revisions']['length'],_0x11dd07=!0x1);_0x3d7c95<_0x310e96;)_0x48e332['push'](this['repository']['getRevision'](_0x3d7c95)),_0x3d7c95++;return _0x11dd07&&_0x48e332['push'](this['repository']['getRevision'](_0x3d7c95)),_0x48e332;}['_threeWayMerge'](_0x71854b,_0x4fc031,_0x1d8416,_0x223a6f){const _0x3b0c30=this['editor']['model']['schema'];let _0x5f1710=_0x4fc031;for(;_0x71854b[_0x5f1710]&&_0x71854b[_0x5f1710]['isAdded'];)_0x5f1710++;let _0x2a6e3a=_0x223a6f;for(;_0x1d8416[_0x2a6e3a]&&_0x1d8416[_0x2a6e3a]['isRemoved'];)_0x2a6e3a++;_0x57a686(_0x71854b,_0x4fc031,_0x5f1710),_0x57a686(_0x1d8416,_0x223a6f,_0x2a6e3a);const _0x38cc87=_0x1d8416['slice'](_0x223a6f,_0x2a6e3a)['concat'](_0x71854b['slice'](_0x4fc031,_0x5f1710));return _0x38cc87['sort']((_0x45d5b3,_0x2659bd)=>_0x45d5b3['side']!=_0x2659bd['side']?_0x45d5b3['side']-_0x2659bd['side']:_0x45d5b3['level']!=_0x2659bd['level']?_0x45d5b3['level']-_0x2659bd['level']:_0x45d5b3['distance']!=_0x2659bd['distance']?_0x2659bd['distance']-_0x45d5b3['distance']:!!_0x45d5b3['isAdded']!=!!_0x2659bd['isAdded']?-0x1==_0x45d5b3['side']||0x0==_0x45d5b3['side']?_0x45d5b3['isAdded']?-0x1:0x1:_0x45d5b3['isAdded']?0x1:-0x1:_0x45d5b3['index']-_0x2659bd['index']),{'commonTape':_0x38cc87,'iEnd':_0x5f1710,'jEnd':_0x2a6e3a};function _0x57a686(_0xcd567e,_0x5badae,_0x3fa5de){let _0x187e8d=-0x1,_0x476670=Number['POSITIVE_INFINITY'],_0x8b2185=!0x0;for(let _0x273f53=_0x5badae;_0x273f53<_0x3fa5de;_0x273f53++)if(_0x3b0c30['isInline'](_0xcd567e[_0x273f53]['item'])||(_0x8b2185=!0x1),_0xcd567e[_0x273f53]['item']['startIndex']<_0x5badae&&(_0x187e8d=_0x273f53),_0xcd567e[_0x273f53]['item']['endIndex']>=_0x3fa5de){_0x476670=_0x273f53;break;}_0x8b2185&&(_0x187e8d=_0x3fa5de-0x1);for(let _0x43d0f7=_0x5badae;_0x43d0f7<_0x3fa5de;_0x43d0f7++)_0xcd567e[_0x43d0f7]['side']=_0x43d0f7<=_0x187e8d?-0x1:_0x43d0f7<_0x476670?0x0:0x1,_0xcd567e[_0x43d0f7]['index']=_0x43d0f7;let _0x5a1d88=0x0;for(let _0x7505c=_0x5badae;_0x7505c<=_0x187e8d;_0x7505c++)0x0==_0xcd567e[_0x7505c]['distance']?_0xcd567e[_0x7505c]['level']=_0x5a1d88:(_0x5a1d88++,_0xcd567e[_0x7505c]['level']=_0x5a1d88,_0x5a1d88++);for(let _0x9f02df=_0x5badae;_0x9f02df<_0x3fa5de;_0x9f02df++)0x0==_0xcd567e[_0x9f02df]['side']&&(_0xcd567e[_0x9f02df]['level']=_0x5a1d88);_0x5a1d88=0x0;for(let _0x257562=_0x3fa5de-0x1;_0x257562>=_0x476670;_0x257562--)0x0==_0xcd567e[_0x257562]['distance']?_0xcd567e[_0x257562]['level']=_0x5a1d88:(_0x5a1d88--,_0xcd567e[_0x257562]['level']=_0x5a1d88,_0x5a1d88--);}}['_fixObsoleteTags'](_0x480dae){const _0x29f12c=new Map(),_0x19b692=this['editor']['model']['schema'];for(let _0x3528d9=0x1;_0x3528d9<_0x480dae['length'];_0x3528d9++){let _0x40303a,_0x3541c2,_0x9d0b21;const _0x17dde3=_0x480dae[_0x3528d9],_0x11fed8=_0x480dae[_0x3528d9-0x1];if('text'==_0x17dde3['type'])continue;if(_0x17dde3['type']!=_0x11fed8['type'])continue;if(!_0x19b692['isBlock'](_0x11fed8['item'])||_0x19b692['isLimit'](_0x11fed8['item']))continue;if(!_0x19b692['isBlock'](_0x17dde3['item'])||_0x19b692['isLimit'](_0x17dde3['item']))continue;if((_0x480dae[_0x3528d9]['isAdded']||_0x480dae[_0x3528d9]['isAddSuggestion'])&&_0x480dae[_0x3528d9-0x1]['isRemoved'])_0x40303a=_0x480dae[_0x3528d9],_0x3541c2=_0x480dae[_0x3528d9-0x1],_0x9d0b21=_0x3528d9-0x1;else{if(!_0x480dae[_0x3528d9]['isRemoved']||!_0x480dae[_0x3528d9-0x1]['isAdded']&&!_0x480dae[_0x3528d9-0x1]['isAddSuggestion'])continue;_0x40303a=_0x480dae[_0x3528d9-0x1],_0x3541c2=_0x480dae[_0x3528d9],_0x9d0b21=_0x3528d9;}const _0x50157e=_0x40303a['level']==_0x3541c2['level'],_0x4433fc=Math['abs'](_0x40303a['level'])<Math['abs'](_0x3541c2['level'])&&0x0==_0x3541c2['distance'];(_0x50157e||_0x4433fc)&&(_0x29f12c['set'](_0x3541c2['id'],_0x40303a['id']),_0x480dae['splice'](_0x9d0b21,0x1),_0x3528d9--,_0x40303a['isAdded']=!0x1);}for(let _0x59d72c=0x0;_0x59d72c<_0x480dae['length'];_0x59d72c++)_0x29f12c['has'](_0x480dae[_0x59d72c]['pairId'])&&(_0x480dae[_0x59d72c]['pairId']=_0x29f12c['get'](_0x480dae[_0x59d72c]['pairId']));}['_removeMissingPairs'](_0x314b93){const _0x3e7624=new Set(_0x314b93['map'](_0x4db8c9=>_0x4db8c9['id']));for(let _0x4ce20c=0x0;_0x4ce20c<_0x314b93['length'];_0x4ce20c++)_0x3e7624['has'](_0x314b93[_0x4ce20c]['pairId'])||0x0==_0x314b93[_0x4ce20c]['distance']||(_0x314b93[_0x4ce20c]['isIncorrect']=!0x0);return _0x314b93['filter'](_0x646294=>!_0x646294['isIncorrect']);}['_markMismatchedRemovedTags'](_0x36827c){const _0x44ba71=new Set();for(let _0x75294b=0x0;_0x75294b<_0x36827c['length'];_0x75294b++){if(_0x44ba71['has'](_0x36827c[_0x75294b]['id'])&&_0x36827c[_0x75294b]['isRemoved']&&(_0x36827c[_0x75294b]['isIncorrect']=!0x0),_0x36827c[_0x75294b]['isIncorrect'])continue;if(0x0==_0x36827c[_0x75294b]['distance'])continue;if('elementStart'!=_0x36827c[_0x75294b]['type'])continue;if(null==_0x36827c[_0x75294b]['pairId'])continue;let _0x5c1208=_0x75294b+0x1,_0x171e3c=0x0;for(;_0x36827c[_0x5c1208]['id']!=_0x36827c[_0x75294b]['pairId'];)'elementStart'==_0x36827c[_0x5c1208]['type']?_0x171e3c++:'elementEnd'==_0x36827c[_0x5c1208]['type']&&_0x171e3c--,_0x5c1208++;if(0x0!=_0x171e3c){if(_0x36827c[_0x75294b]['isRemoved'])_0x36827c[_0x75294b]['isIncorrect']=!0x0;else{for(;_0x5c1208!=_0x75294b;)_0x36827c[_0x5c1208]['isRemoved']&&0x0!=_0x36827c[_0x5c1208]['distance']&&(_0x36827c[_0x5c1208]['isIncorrect']=!0x0,_0x44ba71['add'](_0x36827c[_0x5c1208]['pairId'])),_0x5c1208--;}}}return _0x36827c['filter'](_0x178d6d=>!_0x178d6d['isIncorrect']);}['_removeUnsupportedChanges'](_0x5c96d5){const _0x4225e8=this['editor']['model']['schema'];for(let _0x4d5cf4=0x0;_0x4d5cf4<_0x5c96d5['length'];_0x4d5cf4++){if(!(_0x5c96d5[_0x4d5cf4]['isAdded']||_0x5c96d5[_0x4d5cf4]['isAddSuggestion']||_0x5c96d5[_0x4d5cf4]['isRemoved']||_0x5c96d5[_0x4d5cf4]['isRemoveSuggestion']))continue;if(0x0==_0x5c96d5[_0x4d5cf4]['distance'])continue;const _0x2ef8a7=_0x5c96d5[_0x4d5cf4]['item'];_0x4225e8['isBlock'](_0x2ef8a7)||_0x4225e8['isLimit'](_0x2ef8a7)||(_0x5c96d5[_0x4d5cf4]['isAdded']&&delete _0x5c96d5[_0x4d5cf4]['isAdded'],_0x5c96d5[_0x4d5cf4]['isAddSuggestion']&&delete _0x5c96d5[_0x4d5cf4]['isAddSuggestion'],_0x5c96d5[_0x4d5cf4]['isRemoveSuggestion']&&delete _0x5c96d5[_0x4d5cf4]['isRemoveSuggestion'],_0x5c96d5[_0x4d5cf4]['isRemoved']&&(_0x5c96d5[_0x4d5cf4]['isIncorrect']=!0x0));}return _0x5c96d5['filter'](_0x1efbc0=>!_0x1efbc0['isIncorrect']);}['_makeModelFromTape'](_0x2e8ccb,_0x8d7b0b,_0x5cc86a){const _0x242bca=new _0x8c84c8(),_0x58c932=[],_0x53ea10=new Map(),_0x32694c=this['editor']['model'],_0x5aaa67=_0x32694c['schema'],_0x57c8a8=[_0x242bca],_0x52f2ab={},_0x1782a7={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x58b069=null;const _0x1b408d=[0x0];for(let _0x317674=0x0;_0x317674<_0x2e8ccb['length'];_0x317674++)if('elementStart'===_0x2e8ccb[_0x317674]['type']){_0x2e8ccb[_0x317674]['previousPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d);const _0x4905da=new _0x36b445(_0x2e8ccb[_0x317674]['item']['name'],_0x2e8ccb[_0x317674]['item']['getAttributes']());_0x57c8a8[0x0]['_appendChild'](_0x4905da),_0x1b408d['push'](0x0),_0x57c8a8['unshift'](_0x4905da),_0x2e8ccb[_0x317674]['nextPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d);}else'elementEnd'===_0x2e8ccb[_0x317674]['type']?(_0x57c8a8['shift'](),_0x2e8ccb[_0x317674]['previousPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d),_0x1b408d['pop'](),_0x1b408d[_0x1b408d['length']-0x1]++,_0x2e8ccb[_0x317674]['nextPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d)):(_0x2e8ccb[_0x317674]['previousPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d),_0x58b069?_0x58b069['_data']+=_0x2e8ccb[_0x317674]['item']['data']:_0x58b069=new _0x367598(_0x2e8ccb[_0x317674]['item']['data'],_0x2e8ccb[_0x317674]['item']['getAttributes']()),_0x2e8ccb[_0x317674+0x1]&&'text'===_0x2e8ccb[_0x317674+0x1]['type']&&_0x252208(_0x58b069,_0x2e8ccb[_0x317674+0x1]['item'])||(_0x57c8a8[0x0]['_appendChild'](_0x58b069),_0x58b069=null),_0x1b408d[_0x1b408d['length']-0x1]+=_0x2e8ccb[_0x317674]['item']['offsetSize'],_0x2e8ccb[_0x317674]['nextPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d));for(let _0x5624b6=0x0;_0x5624b6<_0x2e8ccb['length'];_0x5624b6++){const _0x3a23f6=_0x2e8ccb[_0x5624b6]['previousPosition'],_0x1266d2=_0x2e8ccb[_0x5624b6]['nextPosition'];for(const _0x62e343 of _0x2e8ccb[_0x5624b6]['markersStart'])_0x53ea10['set'](_0x62e343,{'start':_0x3a23f6,'end':null});_0x178c3c('isRemoveSuggestion',_0x5624b6,_0x3a23f6,_0x1266d2),_0x178c3c('isAddSuggestion',_0x5624b6,_0x3a23f6,_0x1266d2),_0x178c3c('isRemoved',_0x5624b6,_0x3a23f6,_0x1266d2),_0x178c3c('isAdded',_0x5624b6,_0x3a23f6,_0x1266d2);for(const _0x18ec44 of _0x2e8ccb[_0x5624b6]['markersEnd']){const _0x320da4=_0x53ea10['get'](_0x18ec44);_0x320da4?_0x320da4['end']=_0x1266d2:_0x53ea10['set'](_0x18ec44,{'start':_0x1266d2,'end':_0x1266d2});}}for(const [_0x17730e,_0x2432d1]of _0x53ea10){const _0x790c5f=this['editor']['model']['createRange'](_0x2432d1['start'],_0x2432d1['end']);_0x242bca['markers']['set'](_0x17730e,_0x790c5f);}return _0x58c932['sort']((_0x3fc501,_0x21e4ed)=>{const _0x468630=_0x242bca['markers']['get']('revision:'+_0x3fc501['id']),_0x33221e=_0x242bca['markers']['get']('revision:'+_0x21e4ed['id']);return _0x468630['start']['isBefore'](_0x33221e['start'])?-0x1:_0x468630['start']['isAfter'](_0x33221e['start'])?0x1:_0x468630['end']['isBefore'](_0x33221e['end'])?-0x1:_0x468630['end']['isAfter'](_0x33221e['end'])?0x1:'add'===_0x3fc501['type']?-0x1:0x1;}),{'root':_0x242bca,'changes':_0x58c932};function _0x178c3c(_0x3d81aa,_0x5434c0,_0x2a497c,_0x59d5ca){const _0xb83d97=!!_0x2e8ccb[_0x5434c0][_0x3d81aa],_0x5f6cee=_0xb83d97?_0x2e8ccb[_0x5434c0][_0x3d81aa]['userId']:null,_0x27bfeb=_0x5434c0===_0x2e8ccb['length']-0x1,_0x5678a9=_0x1782a7[_0x3d81aa][0x0],_0x9e1cc=_0x5aaa67['isObject'](_0x2e8ccb[_0x5434c0]['item']);!_0x52f2ab[_0x3d81aa]&&_0xb83d97?_0x52f2ab[_0x3d81aa]={'start':_0x2a497c,'tapeItem':_0x2e8ccb[_0x5434c0],'userId':_0x5f6cee,'type':_0x3d81aa}:_0x52f2ab[_0x3d81aa]&&!_0xb83d97?(_0x52f2ab[_0x3d81aa]['end']=_0x2a497c,_0x438d1c(_0x52f2ab[_0x3d81aa]),_0x52f2ab[_0x3d81aa]=null):_0x52f2ab[_0x3d81aa]&&_0xb83d97&&_0x52f2ab[_0x3d81aa]['userId']!==_0x5f6cee&&(_0x52f2ab[_0x3d81aa]['end']=_0x2a497c,_0x5678a9&&_0x5678a9['userId']===_0x52f2ab[_0x3d81aa]['userId']||_0x438d1c(_0x52f2ab[_0x3d81aa]),_0x52f2ab[_0x3d81aa]={'start':_0x2a497c,'tapeItem':_0x2e8ccb[_0x5434c0],'userId':_0x5f6cee,'type':_0x3d81aa}),_0x52f2ab[_0x3d81aa]&&_0x9e1cc&&('elementStart'!==_0x2e8ccb[_0x5434c0]['type']||_0x5678a9&&_0x5678a9['userId']===_0x5f6cee||_0x1782a7[_0x3d81aa]['unshift']({'userId':_0x5f6cee,'object':_0x2e8ccb[_0x5434c0]['item'],'change':_0x52f2ab[_0x3d81aa]}),'elementEnd'===_0x2e8ccb[_0x5434c0]['type']&&_0x5678a9&&_0x5678a9['object']===_0x2e8ccb[_0x5434c0]['item']&&(_0x1782a7[_0x3d81aa]['shift'](),_0x52f2ab[_0x3d81aa]=_0x5678a9['change'])),_0x52f2ab[_0x3d81aa]&&_0x27bfeb&&(_0x52f2ab[_0x3d81aa]['end']=_0x59d5ca,_0x438d1c(_0x52f2ab[_0x3d81aa]),_0x52f2ab[_0x3d81aa]=null);}function _0x438d1c({start:_0x5b3cfc,end:_0x55475a,tapeItem:_0x1baeee,userId:_0x5e6ba1,type:_0x5c6f1d}){const _0x17076b=_0x1baeee['item'],_0x1d1e95=_0x32694c['schema']['isBlock'](_0x17076b)&&!_0x32694c['schema']['isLimit'](_0x17076b),_0x2c3f84=_0x5b3cfc['nodeAfter']==_0x55475a['parent']&&_0x55475a['isAtStart'];if(_0x1d1e95&&_0x2c3f84)return;const _0xb1ebe5=_0x32694c['createRange'](_0x5b3cfc,_0x55475a),_0x21bbb9=_0x8d7b0b['get'](_0x5e6ba1),_0x4306ec=new G({'author':_0x21bbb9,'type':'isAdded'==_0x5c6f1d||'isAddSuggestion'==_0x5c6f1d?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5c6f1d||'isRemoveSuggestion'==_0x5c6f1d},'createdAt':new Date(),'rootName':_0x5cc86a});_0x58c932['push'](_0x4306ec),_0x242bca['markers']['set']('revision:'+_0x4306ec['id'],_0xb1ebe5);}function _0x252208(_0x4ad7f4,_0x41aa8f){const _0xadb9e5=_0x4ad7f4['getAttributes'](),_0x43f893=_0x41aa8f['getAttributes']();for(const _0x4decf4 of _0xadb9e5){if(_0x4decf4[0x1]!==_0x41aa8f['getAttribute'](_0x4decf4[0x0]))return!0x1;_0x43f893['next']();}return _0x43f893['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3ca752=>{const _0x515370=_0x3ca752['markerName']['split'](':')[0x1],_0xf18685=this['_getChangeFromId'](_0x515370);if(!_0xf18685)return null;const _0x3719fc='add'==_0xf18685['type']?'insertion':'deletion',_0x2327b6=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3719fc];return _0xf18685['data']['isSuggestion']&&_0x2327b6['push']('ck-suggestion-marker-'+_0x3719fc+'-new'),this['activeChange']==_0xf18685&&_0x2327b6['push']('ck-suggestion-marker--active'),{'classes':_0x2327b6,'attributes':{'data-change-id':_0x515370}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xb60797=>{_0xb60797['on']('element:pre',(_0x5846ca,_0x1563f1,_0x594613)=>{const _0x1d509b=_0x1563f1['viewItem']['getChild'](0x0);if(!_0x1d509b||!_0x1d509b['is']('element','code'))return;if(!_0x594613['consumable']['consume'](_0x1d509b,{'attributes':['vid_start','vid_end']}))return;const _0x5b3714=_0x1563f1['modelRange']['start']['nodeAfter'];_0x594613['writer']['setAttribute']('vid_start',_0x1d509b['getAttribute']('vid_start'),_0x5b3714),_0x594613['writer']['setAttribute']('vid_end',_0x1d509b['getAttribute']('vid_end'),_0x5b3714);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x19ac0d=>{_0x19ac0d['on']('element',(_0x1bf9e6,_0x1db0d3,_0x154304)=>{if(!_0x154304['consumable']['consume'](_0x1db0d3['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1db0d3['modelRange']['isCollapsed'])return;const _0x285298=_0x1db0d3['modelRange']['start']['nodeAfter'];_0x285298['hasAttribute']('vid_start')||_0x285298['hasAttribute']('vid')||(_0x154304['writer']['setAttribute']('vid_start',_0x1db0d3['viewItem']['getAttribute']('vid_start'),_0x285298),_0x154304['writer']['setAttribute']('vid_end',_0x1db0d3['viewItem']['getAttribute']('vid_end'),_0x285298));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x323620=>_0x323620['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3acb4d,[,_0x386ea7])=>{['vid_start','vid_end','vid']['includes'](_0x386ea7)&&(_0x3acb4d['return']=!0x0,_0x3acb4d['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x30b250=>{_0x30b250['on']('attribute:vid',(_0x28e68a,_0x599c91,_0x56eac2)=>{if('\x20'!=_0x599c91['item']['data']||_0x599c91['item']['parent']['maxOffset']>0x1)return;if(!_0x56eac2['consumable']['consume'](_0x599c91['item'],_0x28e68a['name']))return;const _0x4d2df0=_0x56eac2['writer'],_0x574ae3=_0x56eac2['mapper']['toViewRange'](_0x599c91['range']);_0x4d2df0['wrap'](_0x574ae3,_0x4d2df0['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x399ccd){const _0x2d1cc5=_0x399ccd['plugins']['get']('RevisionViewer');return(_0x872862,_0x5143d3,_0x3cb4a9)=>{const _0x15246e=_0x5143d3['markerName']['split'](':')[0x1],_0xe12c9e=_0x2d1cc5['_getChangeFromId'](_0x15246e);if(!_0xe12c9e)return null;const _0x5934a='add'==_0xe12c9e['type']?'split':'merge';if(!_0x3cb4a9['consumable']['test'](_0x5143d3['markerRange'],_0x872862['name']))return;const _0xbdf84a=_0x5143d3['markerRange']['getWalker'](),_0x29e168=_0x5143d3['markerRange']['start'],_0x58fe55=_0x399ccd['model']['schema'];let _0x3fb43a=null,_0x141865=null,_0x2399a0=!0x1,_0x2d1a62=!0x1;for(const _0x5661a2 of _0xbdf84a){const _0xb00293=_0x5661a2['item'];_0x2399a0=_0x2399a0||_0x58fe55['isContent'](_0xb00293);const _0x470e68=_0x3cb4a9['mapper']['toViewElement'](_0xb00293);if(_0x470e68&&_0x470e68['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5661a2['type']&&(_0x58fe55['isBlock'](_0xb00293)&&!_0x58fe55['isLimit'](_0xb00293)&&(_0xb00293['nextSibling']||_0x29e168['isAtEnd']?_0x3fb43a&&_0x3fb43a['parent']==_0xb00293||(_0x3fb43a=_0xb00293,_0x3eecd5(_0x5661a2['previousPosition']),_0x2d1a62=!0x0):_0x141865=_0x141865||_0x5661a2['previousPosition']));}function _0x3eecd5(_0x5ebfd9){const _0xb022d9=_0x3cb4a9['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5934a}),_0x4bad47=_0x3cb4a9['mapper']['toViewPosition'](_0x5ebfd9);_0xe12c9e['data']['isSuggestion']&&_0x3cb4a9['writer']['addClass']('ck-suggestion-marker-'+_0x5934a+'-new',_0xb022d9),_0x2d1cc5['activeChange']==_0xe12c9e&&_0x3cb4a9['writer']['addClass']('ck-suggestion-marker--active',_0xb022d9),_0x3cb4a9['writer']['insert'](_0x4bad47,_0xb022d9),_0x3cb4a9['mapper']['bindElementToMarker'](_0xb022d9,_0x5143d3['markerName']);}_0x2399a0||_0x2d1a62||!_0x141865||_0x3eecd5(_0x141865);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x183929,_0x2b990a,_0x4f7066)=>{const _0x547f02=_0x4f7066['mapper']['markerNameToElements'](_0x2b990a['markerName']);if(_0x547f02){for(const _0x207779 of _0x547f02)(_0x207779['hasClass']('ck-suggestion-marker-split')||_0x207779['hasClass']('ck-suggestion-marker-merge'))&&(_0x4f7066['mapper']['unbindElementFromMarkerName'](_0x207779,_0x2b990a['markerName']),_0x4f7066['writer']['remove'](_0x207779));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x185518,_0x548ec4,_0x222d58)=>{const _0x5577a4=_0x548ec4['markerName']['split'](':')[0x1],_0x3c8e0e=this['_getChangeFromId'](_0x5577a4);if(!_0x3c8e0e)return null;const _0x2c8ad5='add'==_0x3c8e0e['type']?'split':'merge';if(_0x222d58['consumable']['test'](_0x548ec4['markerRange'],_0x185518['name']))for(const _0x410e76 of _0x548ec4['markerRange']['getItems']()){if(!_0x410e76['is']('element','softBreak'))continue;const _0x37213b=_0x222d58['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2c8ad5}),_0x27016b=_0x222d58['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x410e76));_0x3c8e0e['data']['isSuggestion']&&_0x222d58['writer']['addClass']('ck-suggestion-marker-'+_0x2c8ad5+'-new',_0x37213b),this['activeChange']==_0x3c8e0e&&_0x222d58['writer']['addClass']('ck-suggestion-marker--active',_0x37213b),_0x222d58['writer']['insert'](_0x27016b,_0x37213b),_0x222d58['mapper']['bindElementToMarker'](_0x37213b,_0x548ec4['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1fe74b=>{for(const _0x58301d of this['editor']['model']['document']['getRootNames']()){const _0x5d66f5=this['editor']['model']['document']['getRoot'](_0x58301d),_0x1aa0fc=this['editor']['editing']['view']['document']['getRoot'](_0x58301d);if(_0x1aa0fc){const _0x357bab=_0x5d66f5['getAttribute']('revisionHistoryAttachChange');if(_0x1fe74b['removeAttribute']('data-change-id',_0x1aa0fc),_0x1fe74b['removeClass']('ck-revision-history-root-add',_0x1aa0fc),_0x1fe74b['removeClass']('ck-revision-history-root-remove',_0x1aa0fc),_0x1fe74b['removeClass']('ck-revision-history-root--active',_0x1aa0fc),_0x357bab){const _0x379e1b=this['_getChangeFromId'](_0x357bab);if(!_0x379e1b)return null;_0x1fe74b['setAttribute']('data-change-id',_0x357bab,_0x1aa0fc),_0x1fe74b['addClass']('ck-revision-history-root-'+_0x379e1b['type'],_0x1aa0fc),this['activeChange']==_0x379e1b&&_0x1fe74b['addClass']('ck-revision-history-root--active',_0x1aa0fc);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2d0112=>'revision-comment:'+_0x2d0112,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x522cf0=>'revision-suggestion:'+_0x522cf0,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x20f2ef=>({'name':'suggestion:'+_0x20f2ef,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3dffae=>{const _0x5402b6=_0x3dffae['markerName']['split'](':')[0x1];return'insertion'!=_0x5402b6&&'deletion'!=_0x5402b6?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5402b6]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3a635d,_0x4f6660,_0x515f20)=>{const _0x51b963=_0x515f20['mapper']['markerNameToElements'](_0x4f6660['markerName']);if(_0x51b963){for(const _0xc45d2c of _0x51b963)_0xc45d2c['is']('uiElement')&&(_0x515f20['mapper']['unbindElementFromMarkerName'](_0xc45d2c,_0x4f6660['markerName']),_0x515f20['writer']['remove'](_0xc45d2c));}},{'priority':'high'});}['_getChangeFromId'](_0xe1d884){return this['_changeIdToChange']['get'](_0xe1d884);}['_getViewForChange'](_0x18239d){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x18239d),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4d78ea,_0xc4c29,_0x179e7a,_0x27805b)=>{_0x27805b&&this['_balloon']['remove'](_0x27805b),_0x179e7a&&(this['_balloon']['add']({'view':_0x179e7a,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1ccd8c=this['editor']['editing'],_0xbd6ce0=this['_getChangeFromId'](_0x179e7a['changeId']);let _0x38c267;if(_0xbd6ce0['data']['isOnRoot']){const _0x2280b4=_0x1ccd8c['view']['getDomRoot'](_0xbd6ce0['rootName']);_0x38c267=Array['from'](_0x2280b4['getClientRects']());}else{const _0x51b47c=this['editor']['model']['markers']['get']('revision:'+_0x179e7a['changeId']);_0x38c267=Array['from'](_0x1ccd8c['mapper']['markerNameToElements'](_0x51b47c['name']))['map'](_0x37d9a8=>_0x1ccd8c['view']['domConverter']['mapViewToDom'](_0x37d9a8))['map'](_0x31a09d=>Array['from'](_0x31a09d['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x38c267[0x0];return _0x38c267['find'](_0x351c2b=>_0x351c2b['top']-0x3<=this['_activeViewTarget']['y']&&_0x351c2b['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x351c2b['left']-0x3<=this['_activeViewTarget']['x']&&_0x351c2b['right']+0x3>=this['_activeViewTarget']['x'])||_0x38c267[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x54a2b5,_0x29ac9f,_0x405df6,_0x19f4e7)=>{this['activeView']=_0x405df6?this['_getViewForChange'](_0x405df6):null,this['editor']['model']['change'](()=>{const _0x41a091=this['editor']['editing'];_0x19f4e7&&(_0x19f4e7['data']['isOnRoot']?_0x41a091['view']['change'](_0x5a8929=>{_0x5a8929['removeClass']('ck-revision-history-root--active',_0x41a091['view']['document']['getRoot'](_0x19f4e7['rootName']));}):_0x41a091['reconvertMarker']('revision:'+_0x19f4e7['id'])),_0x405df6&&(_0x405df6['data']['isOnRoot']?_0x41a091['view']['change'](_0x4bc1cc=>{_0x4bc1cc['addClass']('ck-revision-history-root--active',_0x41a091['view']['document']['getRoot'](_0x405df6['rootName']));}):_0x41a091['reconvertMarker']('revision:'+_0x405df6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3a1c39,_0x3ccd40)=>{if(this['activeChange'])return;const _0x2a2581=this['_findChangeIdFromDomTarget'](_0x3ccd40['target']),_0xc968f0=this['_changeIdToChange']['get'](_0x2a2581);_0xc968f0?(this['_activeViewTarget']={'x':_0x3ccd40['domEvent']['x'],'y':_0x3ccd40['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0xc968f0)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x527deb,_0x1cd368)=>{const _0x25a75b=this['_findChangeIdFromDomTarget'](_0x1cd368['target']),_0x45bf4e=this['_changeIdToChange']['get'](_0x25a75b);_0x45bf4e?(this['_activeViewTarget']={'x':_0x1cd368['domEvent']['x'],'y':_0x1cd368['domEvent']['y']},_0x45bf4e===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x45bf4e):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x10b218){do{const _0x5a8e05=_0x10b218['getAttribute']('data-change-id');if(_0x5a8e05)return _0x5a8e05;_0x10b218=_0x10b218['parent'];}while(_0x10b218);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x453dd6=>{for(const _0x777f07 of this['editor']['model']['markers'])_0x453dd6['removeMarker'](_0x777f07);});}}function Q(_0x52ba96,_0x236b13){return(_0x15d129,_0x3c68b5,_0x5581f5)=>{if(!_0x5581f5['consumable']['test'](_0x3c68b5['markerRange'],_0x15d129['name']))return;const _0x4e2b24=_0x3c68b5['markerRange']['getWalker'](),_0x68fe75=_0x3c68b5['markerRange']['start'],_0x26882a=_0x52ba96['model']['schema'];let _0x50dcde=null,_0xe56afb=null,_0x5e3145=!0x1,_0x18f6f6=!0x1;for(const _0x1ff4d2 of _0x4e2b24){const _0x3b5a15=_0x1ff4d2['item'];_0x5e3145=_0x5e3145||_0x26882a['isContent'](_0x3b5a15);const _0x179d45=_0x5581f5['mapper']['toViewElement'](_0x3b5a15);if(_0x179d45&&_0x179d45['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1ff4d2['type']&&(_0x26882a['isBlock'](_0x3b5a15)&&!_0x26882a['isLimit'](_0x3b5a15)&&(_0x3b5a15['nextSibling']||_0x68fe75['isAtEnd']?_0x50dcde&&_0x50dcde['parent']==_0x3b5a15||(_0x50dcde=_0x3b5a15,_0x2c999a(_0x1ff4d2['previousPosition']),_0x18f6f6=!0x0):_0xe56afb=_0xe56afb||_0x1ff4d2['previousPosition']));}function _0x2c999a(_0x4e8fd9){const _0x1a88e6=_0x5581f5['mapper']['toViewPosition'](_0x4e8fd9),_0x41f318=_0x5581f5['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x236b13});_0x5581f5['writer']['insert'](_0x1a88e6,_0x41f318),_0x5581f5['mapper']['bindElementToMarker'](_0x41f318,_0x3c68b5['markerName']);}_0x5e3145||_0x18f6f6||!_0xe56afb||_0x2c999a(_0xe56afb);};}class nt extends _0x4856a5{constructor(_0xd479fc){super(_0xd479fc);const _0x1027a2=_0xd479fc['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x1027a2,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1027a2,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5daa20=this['editor'],_0x2d6715=_0x5daa20['plugins']['get'](u),_0x3f7f50=_0x2d6715['isReady']?_0x2d6715['diff']['newRevisionId']:null;_0x5daa20['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3f7f50);}['refresh'](){const {isReady:_0x415a69,isEnabled:_0x4da55a,repository:_0x45a023,diff:_0x19bc19}=this['editor']['plugins']['get'](u),_0x1c47da=_0x19bc19&&_0x45a023['getLaterVisibleRevision'](_0x19bc19['newRevisionId']);this['isEnabled']=_0x415a69&&_0x4da55a&&Boolean(_0x1c47da);}}class rt extends _0x4856a5{['_step'];constructor(_0x33233a,{direction:_0x23d726}){super(_0x33233a);const _0x3b9753=_0x33233a['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x23d726?0x1:-0x1,this['listenTo'](_0x3b9753,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3b9753,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3b9753,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4d2802=this['editor'],_0x4dd573=_0x4d2802['plugins']['get'](u),{isNavigationMode:_0x1dfc10,currentChangeNumber:_0x558584}=_0x4dd573;let _0x4f2fc0;if(_0x4dd573['activeChange']=_0x1dfc10?_0x4dd573['diff']['changes']['get'](_0x558584+this['_step']):_0x4dd573['diff']['changes']['first'],_0x4dd573['activeChange']['data']['isOnRoot'])_0x4f2fc0=_0x4d2802['editing']['view']['getDomRoot'](_0x4dd573['activeChange']['rootName']);else{const _0x5bd95f=_0x4d2802['model']['markers']['get']('revision:'+_0x4dd573['activeChange']['id']);_0x4f2fc0=_0x1f08bc(_0x4d2802['editing'],_0x5bd95f);}_0x3a5a7e({'target':_0x4f2fc0,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4d73fd,currentChangeNumber:_0xc345de,numberOfChanges:_0x23bd13,isReady:_0xcca12f,isEnabled:_0x2b3934}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x2b3934&&_0xcca12f&&_0x23bd13)&&(!_0x4d73fd||(0x1===this['_step']?_0xc345de<_0x23bd13-0x1:_0xc345de>0x0));}}class Ri extends _0x4eb8a3{constructor(_0x460c68){super(_0x460c68);const _0x515c83=this['bindTemplate'],_0x37329f=new _0x41a1a9(_0x460c68),_0x40a43e=new _0x41a1a9(_0x460c68);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',(_0x49761c,_0x4be9d6)=>_0x49761c&&_0x4be9d6>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2feee6,_0x67075a,_0x2e25ec,_0x11d09a)=>{if(!_0x2feee6)return m(_0x460c68,'Loading...');if(!_0x2e25ec)return m(_0x460c68,'No\x20changes');const _0x5a272d=m(_0x460c68,'NUMBER_OF_CHANGES',_0x2e25ec);return _0x11d09a?m(_0x460c68,'X_OF_Y_CHANGES',[_0x67075a+0x1,_0x2e25ec]):_0x5a272d;}),_0x37329f['set']({'label':m(_0x460c68,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x4fea33}),_0x40a43e['set']({'label':m(_0x460c68,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xaf50d4}),_0x37329f['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x40a43e['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x37329f['on']('execute',()=>this['fire']('execute','backward')),_0x40a43e['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',_0x515c83['if']('_isStatusLabelVisible','ck-hidden',_0x5218d2=>!_0x5218d2)]},'children':[{'text':_0x515c83['to']('isNavigationMode',_0x49ef1f=>_0x49ef1f?m(_0x460c68,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x460c68,'Total')+':\x20')}]},{'text':_0x515c83['to']('_statusText')}]},new _0x4bb486(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x37329f,_0x40a43e]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0xbe21c4{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x29c48c=this['editor']['editing']['view'];_0x29c48c['change'](_0x5382f2=>{for(const _0x1e0da5 of _0x29c48c['document']['roots'])_0x5382f2['addClass'](ge,_0x1e0da5);});}['hide'](){const _0x449639=this['editor']['editing']['view'];_0x449639['change'](_0x212952=>{for(const _0x433201 of _0x449639['document']['roots'])_0x212952['removeClass'](ge,_0x433201);});}}class v extends _0xbe21c4{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,ji];}['init'](){const _0x56a944=this['editor'],_0x2acc35=_0x56a944['plugins']['get'](u),_0x19b829=_0x56a944['plugins']['get'](ji);_0x56a944['ui']['componentFactory']['add']('exitToEditing',_0x45271f=>{const _0x579d13=new _0x41a1a9(_0x45271f);return _0x579d13['set']({'label':m(_0x45271f,'Back\x20to\x20editing'),'icon':_0x31592a,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x579d13,'execute',()=>{_0x56a944['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x579d13;}),_0x56a944['ui']['componentFactory']['add']('restoreRevision',_0x3b269a=>{const _0x332dd8=new _0x41a1a9(_0x3b269a);return _0x332dd8['set']({'label':m(_0x3b269a,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x332dd8['bind']('isEnabled')['to'](_0x56a944['commands']['get']('restoreRevision')),this['listenTo'](_0x332dd8,'execute',()=>_0x56a944['execute']('restoreRevision')),_0x332dd8;}),_0x56a944['ui']['componentFactory']['add']('changesNavigation',_0x39b333=>{const _0x44eebf=new Ri(_0x39b333),_0x174861=_0x56a944['commands']['get']('showPreviousChange'),_0x547a8c=_0x56a944['commands']['get']('showNextChange');return _0x44eebf['bind']('isBackwardNavigationEnabled')['to'](_0x174861,'isEnabled'),_0x44eebf['bind']('isForwardNavigationEnabled')['to'](_0x547a8c,'isEnabled'),_0x44eebf['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2acc35),this['listenTo'](_0x44eebf,'execute',(_0x141e24,_0x14415c)=>{_0x56a944['execute']('forward'===_0x14415c?'showNextChange':'showPreviousChange');}),_0x44eebf;}),_0x19b829['show'](),_0x2acc35['on']('change:isReady',(_0xf8b8f2,_0x3d69c0,_0x9bb713)=>{_0x9bb713?_0x19b829['hide']():_0x19b829['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x414a77,_0x4d7b57){super(_0x414a77,_0x4d7b57);const _0x29c568=this['bindTemplate'];this['set']({'label':m(_0x414a77,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x414a77,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x29c568['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x45d5e2=this['fieldView']['element'];this['_tooltipString']=_0x45d5e2['scrollWidth']>_0x45d5e2['clientWidth']&&_0x45d5e2['value']||'';}}class ni extends _0x4eb8a3{constructor(_0x4bd174,_0xda9fea,_0x3f11ee){super(_0x4bd174);const _0x5f5485=new _0x517cab();_0x5f5485['set']({'content':_0x21d8a3,'viewBox':'0\x200\x2011\x2010'});const _0xe4b36=['ck','ck-revision-history-sidebar__revision-author'];_0x3f11ee&&_0xe4b36['push']('ck-revision-history-sidebar__revision-author_creator');const _0x385da0=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x4bd174,_0x3f11ee?'Revision\x20creator':'Revision\x20author')},'children':[_0x5f5485,_0xda9fea['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xe4b36},'children':_0x385da0});}}function ai(_0x60784d,_0x3d95c5){const _0x1adb1f=_0x60784d['bindTemplate'],_0x35618a=_0x60784d['locale'],_0xe876a5=_0x1e23a0(_0x35618a);_0xe876a5['panelPosition']='sw';const _0x205617=function(_0x3df2cd,_0x5957d4){const _0x5f50f4=function(_0x3294e7,_0x22045c){const _0x5af13e=_0x3294e7['locale'],_0x17e885={'Compare\x20against\x20selected':m(_0x5af13e,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x5af13e,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x5af13e,'Restore\x20this\x20revision')};return _0x22045c['map'](_0x426ed8=>{const _0x508b45=_0x17e885[_0x426ed8['name']];return _0x508b45&&_0x508b45!==_0x426ed8['name']&&(_0x426ed8['name']=_0x508b45),_0x426ed8;});}(_0x3df2cd,_0x5957d4),_0x31ba26=new _0x504df2();for(const _0x40fea9 of _0x5f50f4){const _0x3fb40d={'type':'button','model':new to({'label':_0x40fea9['name'],'class':_0x40fea9['class'],'withText':!0x0,'role':'menuitem','_action':_0x40fea9['action']})};_0x3fb40d['model']['bind']('isEnabled')['to'](_0x3df2cd,'isActionsDropdownOpen',_0x1e462e=>'function'!=typeof _0x40fea9['isEnabled']||(!_0x1e462e||_0x40fea9['isEnabled'](_0x3df2cd))),_0x31ba26['add'](_0x3fb40d);}return _0x31ba26;}(_0x60784d,_0x3d95c5);return _0x60784d['bind']('isActionsDropdownOpen')['to'](_0xe876a5,'isOpen'),_0xe876a5['buttonView']['set']({'label':m(_0x35618a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3f675d}),_0xe876a5['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1adb1f['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1adb1f['to'](_0xa5d333=>_0xa5d333['stopPropagation']())}}),_0xe876a5['on']('execute',_0x4bfb7e=>{_0x60784d['isReady']&&'function'==typeof _0x4bfb7e['source']['_action']&&_0x4bfb7e['source']['_action'](_0x60784d);}),_0x105741(_0xe876a5,_0x205617,{'role':'menu'}),_0xe876a5['listenTo'](_0x60784d,'change:isActionsDropdownOpen',(_0x1b383a,_0x3da273,_0x12bdc7)=>{if(_0x12bdc7)for(const _0x21f683 of _0xe876a5['listView']['items']){const _0x5325a1=_0x21f683['children']['first'],_0xeafb9f=_0x3d95c5['find'](_0x2511a1=>_0x2511a1['action']===_0x5325a1['_action'])['isVisible'];_0x21f683['isVisible']=void 0x0===_0xeafb9f||_0xeafb9f(_0x60784d);}}),_0xe876a5;}class _i extends/* #__PURE__ -- @preserve */
27
- _0x43b418(_0x4eb8a3){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x5738c6,_0x5b97df,_0x4d84a6,_0xc41357){super(_0x5738c6);const _0x1e17f5=this['bindTemplate'],_0x13e4e2=function(_0x3a8e67,_0x56c60e){const _0x1cff2f=Array['from'](_0x56c60e['authors'])['filter'](_0x8d36a7=>_0x8d36a7!=_0x56c60e['creator']);return _0x56c60e['creator']&&_0x1cff2f['unshift'](_0x56c60e['creator']),_0x1cff2f['map'](_0x19f14f=>new ni(_0x3a8e67,_0x19f14f,_0x19f14f==_0x56c60e['creator']));}(_0x5738c6,_0x5b97df);this['id']=_0x5b97df['id'],this['_revision']=_0x5b97df,this['_requireRevisionName']=_0xc41357,this['bind']('name','createdAt')['to'](_0x5b97df),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x12c4c9=>{return _0x7a894a=_0x5738c6['uiLanguage'],(_0x33ccb7=_0x12c4c9)['toLocaleDateString'](_0x7a894a,{'month':'long','day':'numeric'})+',\x20'+_0x33ccb7['toLocaleTimeString'](_0x7a894a,{'hour':'numeric','minute':'numeric'});var _0x7a894a,_0x33ccb7;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x5738c6,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x12b581=>_0x12b581||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x27086c,_0x4633b6)=>_0x27086c&&_0x4633b6),this['revisionActionsView']=_0x4d84a6&&_0x4d84a6['length']?ai(this,_0x4d84a6):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1e17f5['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1e17f5['if']('isEnabled','ck-disabled',_0x4b7288=>!_0x4b7288),_0x1e17f5['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1e17f5['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1e17f5['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':_0x1e17f5['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':_0x13e4e2}]},this['revisionActionsView']],'on':{'click':_0x1e17f5['to'](_0x28f86e=>{_0x28f86e['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x13d4ec=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x13d4ec,'change',()=>{this['_requireRevisionName']&&!_0x13d4ec['value']||this['fire']('setName',{'id':this['id'],'name':_0x13d4ec['value']}),_0x13d4ec['value']||(_0x13d4ec['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0x18435a,_0x2b122d){const _0x367910=_0x275244['fromJSDate'](_0x18435a)['setLocale'](_0x2b122d),_0x14f443=_0x275244['local'](),_0x32045f=_0x14f443['minus']({'days':0x1})['startOf']('day');let _0x29eeaa,_0x569009;return _0x367910['hasSame'](_0x14f443,'day')?(_0x29eeaa=_0x367910['startOf']('day')['toJSDate'](),_0x569009=_0x367910['toRelativeCalendar']()):_0x367910['hasSame'](_0x32045f,'day')?(_0x29eeaa=_0x32045f['toJSDate'](),_0x569009=_0x367910['toRelativeCalendar']()):_0x367910['hasSame'](_0x14f443,'week')?(_0x29eeaa=_0x367910['startOf']('week')['toJSDate'](),_0x569009=_0x367910['weekdayLong']||''):_0x367910['hasSame'](_0x14f443,'year')?(_0x29eeaa=_0x367910['startOf']('month')['toJSDate'](),_0x569009=_0x367910['monthLong']||''):(_0x29eeaa=_0x367910['startOf']('year')['toJSDate'](),_0x569009=String(_0x367910['year'])),{'startDate':_0x29eeaa,'localizedPeriodName':_0x569009};}class bi extends _0x4eb8a3{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3059d7,_0xdeb8f9,_0x304654,_0x4f7d57){super(_0x3059d7);const _0x36f166=li(_0xdeb8f9,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0xdeb8f9,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x304654,this['_requireRevisionName']=_0x4f7d57,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':_0x36f166}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x344626){const _0x5c4019=new _i(this['locale'],_0x344626,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x5c4019);}['removeRevision'](_0x4efe99){const _0x3eae06=this['revisionViews']['find'](_0xaa8716=>_0xaa8716['id']===_0x4efe99['id']);this['revisionViews']['remove'](_0x3eae06);}}class fi extends _0x4eb8a3{constructor(_0x259d88){super(_0x259d88);const _0x3fc5c5=new _0x517cab();_0x3fc5c5['content']=_0x672cd0,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x3fc5c5,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x259d88,'Revision\x20history')]}]});}}class di extends _0x4eb8a3{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1dc235,_0x55de06,_0x312992,_0x2314cf){super(_0x1dc235);const _0x4ae934=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x55de06,this['_revisionActions']=_0x312992,this['_requireRevisionName']=_0x2314cf,this['on']('select',(_0x1b6688,_0x34db07)=>{this['fire']('revisionSelected',_0x34db07);}),this['on']('setName',(_0x317f7d,_0x45ea94)=>{this['fire']('revisionSetName',_0x45ea94);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x1dc235),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4ae934['if']('isEnabled','ck-disabled',_0x3e6253=>!_0x3e6253)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x383695 of this['_revisions'])this['_addRevision'](_0x383695);this['_revisions']['on']('add',(_0x89542c,_0x5baa9b)=>{this['_addRevision'](_0x5baa9b);}),this['_revisions']['on']('remove',(_0x2e7fdb,_0x43f4f4)=>{this['_removeRevision'](_0x43f4f4);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2b8f0d=>_0x2b8f0d['revisionViews']['map'](_0xdcc3f9=>_0xdcc3f9))['flat']();}['selectRevision'](_0x3fea49){for(const _0x37bd0a of this['revisionViews'])_0x3fea49&&_0x3fea49['id']===_0x37bd0a['id']?_0x37bd0a['select']():_0x37bd0a['deselect']();}['highlightRevisions'](_0x1f5965){for(const _0x4266e1 of this['revisionViews'])_0x1f5965['some'](({id:_0x331499})=>_0x331499===_0x4266e1['id'])?_0x4266e1['highlight']():_0x4266e1['unhighlight']();}['_addRevision'](_0x57916a){const _0x8d6df1=li(_0x57916a['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x2cbaff=this['timePeriodViews']['get'](0x0);_0x2cbaff&&_0x2cbaff['startDate']['getTime']()===_0x8d6df1['getTime']()||(_0x2cbaff=new bi(this['locale'],_0x8d6df1,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x2cbaff)),_0x2cbaff['addRevision'](_0x57916a);}['_removeRevision'](_0x2219da){const _0x1b873d=li(_0x2219da['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x1b873d)['removeRevision'](_0x2219da);}['_getTimePeriodViewByStartDate'](_0x1f3f6c){return this['timePeriodViews']['find'](_0x58756f=>_0x58756f['startDate']['getTime']()===_0x1f3f6c['getTime']());}}class d extends _0xbe21c4{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x4526a4,uid as _0x7da10a,Collection as _0x5c2418,logWarning as _0x50cc7e,FocusTracker as _0x5e371b,KeystrokeHandler as _0x1758ab,scrollViewportToShowTarget as _0x511ff8,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x307a19}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x37c447,set as _0x3e45f0,unset as _0x3bfaf3,isEqual as _0x218d59}from'es-toolkit/compat';import{Plugin as _0x5d9b40,PendingActions as _0x524b99,Command as _0x170f10,ElementApiMixin as _0x5a628a,Editor as _0x527c10}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x48917f,getMarkerDomElement as _0x4cd219,ConfirmMixin as _0x501c59,sanitizeEditorConfig as _0x214800}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0xa5fb42,ViewAttributeElement as _0xb7ce6e,ViewEmptyElement as _0x38066c,ViewRawElement as _0x5a91d4,ViewUIElement as _0x30fb5,ViewDocumentFragment as _0x436c2b,ViewText as _0x203872,ViewElement as _0x34185c,ModelElement as _0x5e7691,ModelRange as _0x209563,ModelPosition as _0x2d3910,ModelDocumentFragment as _0x1eaa31,ModelText as _0x125fca}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x23a599,IconChevronUp as _0x17ec06,IconChevronDown as _0x395705,IconUndo as _0x2e404c,IconUser as _0x3ea8ae,IconThreeVerticalDots as _0x5ab55c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x4086f9,View as _0x23ebf3,submitHandler as _0x58385d,LabeledFieldView as ti,createLabeledInputText as _0x5dd4bb,createDropdown as _0x1f2a8d,ListView as _0x175cc8,ListItemView as _0x4f78bd,ButtonView as _0x25e13b,MenuBarMenuView as _0x3be7f4,MenuBarMenuListView as _0x30e8c5,MenuBarMenuListItemView as _0x4f5764,MenuBarMenuListItemButtonView as _0x546e60,ContextualBalloon as _0x3e5dc6,ToolbarSeparatorView as _0x48fedf,IconView as _0x212a7e,addListToDropdown as _0x249ef5,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x24a91a,StickyPanelView as _0x23ce19,ToolbarView as _0x29b212,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x4a7254}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x4526a4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x22b6ef){super(),this['id']=_0x22b6ef['id']||_0x7da10a(),this['creator']=_0x22b6ef['creator']||null,this['authors']=_0x22b6ef['authors']||[],this['diffData']=_0x22b6ef['diffData']||null,this['toVersion']=_0x22b6ef['toVersion']||0x0,this['fromVersion']=_0x22b6ef['fromVersion']||0x0,this['set']('name',_0x22b6ef['name']||''),this['set']('createdAt',_0x22b6ef['createdAt']||new Date()),this['set']('attributes',_0x22b6ef['attributes']||{});}['setName'](_0x5e63a7){this['_update']({'name':_0x5e63a7});}['setAttribute'](_0x14cd97,_0x10b4ce){const _0x5c944b=_0x37c447(this['attributes']);_0x3e45f0(_0x5c944b,_0x14cd97,_0x10b4ce),this['_update']({'attributes':_0x5c944b});}['removeAttribute'](_0x3976ae){const _0xda50cd=_0x37c447(this['attributes']);_0x3bfaf3(_0xda50cd,_0x3976ae),this['_update']({'attributes':_0xda50cd});}['_update'](_0x51cde1,_0x5a9d75=!0x1){let _0x4762ab=!0x1;const _0x342cde={'id':this['id']},_0x49cd08=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x514335 of _0x49cd08){const _0x537625=_0x51cde1[_0x514335];void 0x0!==_0x537625&&_0x537625!==this[_0x514335]&&(this[_0x514335]=_0x537625,_0x342cde[_0x514335]=_0x537625,_0x4762ab=!0x0);}_0x4762ab&&(_0x342cde['authors']&&(_0x342cde['authorsIds']=_0x342cde['authors']['map'](_0x4052f9=>_0x4052f9['id']),delete _0x342cde['authors']),this['fire']('_update',_0x342cde,_0x5a9d75));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1beacd=>_0x1beacd['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x5d9b40{['_revisions'];static get['requires'](){return[_0x48917f];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1e42cf){super(_0x1e42cf),this['_revisions']=new _0x5c2418();}['afterInit'](){!async function(_0x499114){const _0x28a5d6=_0x4503fe([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]),_0x13f85c=0xeb829,_0x314131=0x359e09b0,_0x20564c=0x35997728^_0x314131,_0xc89be8=window[_0x4503fe([0x44,0x61,0x74,0x65])][_0x4503fe([0x6e,0x6f,0x77])](),_0x3fbd10=_0x499114[_0x4503fe([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4bf02b=new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d41e4=>{_0x3fbd10[_0x4503fe([0x6f,0x6e,0x63,0x65])](_0x4503fe([0x72,0x65,0x61,0x64,0x79]),_0x2d41e4);}),_0x12b875={[_0x4503fe([0x6b,0x74,0x79])]:_0x4503fe([0x45,0x43]),[_0x4503fe([0x75,0x73,0x65])]:_0x4503fe([0x73,0x69,0x67]),[_0x4503fe([0x63,0x72,0x76])]:_0x4503fe([0x50,0x2d,0x32,0x35,0x36]),[_0x4503fe([0x78])]:_0x4503fe([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]),[_0x4503fe([0x79])]:_0x4503fe([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]),[_0x4503fe([0x61,0x6c,0x67])]:_0x4503fe([0x45,0x53,0x32,0x35,0x36])},_0x48c14c=_0x3fbd10[_0x4503fe([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4503fe([0x67,0x65,0x74])](_0x4503fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x22d863(){let _0x3a9870,_0x4d1da1=null,_0x5d69e9=null;try{if(_0x48c14c==_0x4503fe([0x47,0x50,0x4c]))return _0x4503fe([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3a9870=_0x21863c(),!_0x3a9870)return _0x4503fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3a9870[_0x4503fe([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5d69e9=_0x290c18(_0x3a9870[_0x4503fe([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3a9870[_0x4503fe([0x6a,0x74,0x69])])),await _0x374a4d()?_0xa8906e()?_0x1b864b()?_0x4503fe([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e4b4f()?(_0x3a9870[_0x4503fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4503fe([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4d1da1=_0x131339(_0x4503fe([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x438d7f()):_0x4503fe([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4503fe([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4503fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4503fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b864b(){const _0x219761=[_0x4503fe([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4503fe([0x74,0x72,0x69,0x61,0x6c])][_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a9870[_0x4503fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xc89be8/0x3e8:0xe10*_0x20564c;return _0x3a9870[_0x4503fe([0x65,0x78,0x70])]<_0x219761;}function _0xa8906e(){const _0x378172=_0x3a9870[_0x4503fe([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x378172)return!0x1;if(_0x378172[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4503fe([0x2a])))return!0x0;if(_0x378172[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4503fe([0x52,0x48])))return!0x0;if(_0x378172[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4503fe([0x52,0x52,0x48]))){if(_0x1fb019())return!0x0;if(_0x1d3d96()||_0x225dff())return!0x0;}return!0x1;}function _0x1e4b4f(){const _0x5ddae3=_0x3a9870[_0x4503fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5ddae3||0x0==_0x5ddae3[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x423ec2}=new URL(window[_0x4503fe([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5ddae3[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x423ec2))return!0x0;const _0x1fe960=_0x423ec2[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])](_0x4503fe([0x2e]));return _0x5ddae3[_0x4503fe([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3312ba=>_0x3312ba[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4503fe([0x2a])))[_0x4503fe([0x6d,0x61,0x70])](_0x361c7a=>_0x361c7a[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])](_0x4503fe([0x2e])))[_0x4503fe([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a777c=>_0x5a777c[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1fe960[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4503fe([0x6d,0x61,0x70])](_0x26ea98=>Array(_0x1fe960[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x26ea98[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4503fe([0x66,0x69,0x6c,0x6c])](_0x26ea98[0x0]===_0x4503fe([0x2a])?_0x4503fe([0x2a]):'')[_0x4503fe([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x26ea98))[_0x4503fe([0x73,0x6f,0x6d,0x65])](_0x334ee2=>_0x1fe960[_0x4503fe([0x65,0x76,0x65,0x72,0x79])]((_0x1a61e0,_0x44b496)=>_0x334ee2[_0x44b496]===_0x1a61e0||_0x334ee2[_0x44b496]===_0x4503fe([0x2a])));}function _0x438d7f(){return _0x4d1da1&&_0x5d69e9?new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d6e16,_0x1742a9)=>{_0x4d1da1[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x2d6e16,_0x1742a9),_0x5d69e9[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x228b1b=>{_0x228b1b!=_0x4503fe([0x56,0x61,0x6c,0x69,0x64])&&_0x2d6e16(_0x228b1b);},_0x1742a9);}):_0x4d1da1||_0x5d69e9||_0x4503fe([0x56,0x61,0x6c,0x69,0x64]);}}function _0x290c18(_0x3529b2,_0x28dff2){return new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x313b47=>{if(_0x3881a3())return _0x313b47(_0x4503fe([0x56,0x61,0x6c,0x69,0x64]));_0x5a27e6(),_0x3fbd10[_0x4503fe([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4503fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x42c772=!0x1;const _0x1c95f7=_0x7da10a();function _0xdc049b(_0x248612){return!!_0x248612&&(typeof _0x248612===_0x4503fe([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x248612===_0x4503fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x248612[_0x4503fe([0x74,0x68,0x65,0x6e])]===_0x4503fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x248612[_0x4503fe([0x63,0x61,0x74,0x63,0x68])]===_0x4503fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x300e6c(_0x2fc0c7){_0x9c3d52(_0x2fc0c7)[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x3e94f2=>{if(!_0x3e94f2||_0x3e94f2[_0x4503fe([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4503fe([0x6f,0x6b]))return _0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3fb4b6(_0x2dc06f(_0x1c95f7+_0x28dff2))!=_0x3e94f2[_0x4503fe([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4503fe([0x56,0x61,0x6c,0x69,0x64]);})[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x2c3a20=>(_0x30f7d6(),_0x2c3a20),()=>{const _0x51e5ad=_0x3fa48f();return null==_0x51e5ad?(_0x30f7d6(),_0x4503fe([0x56,0x61,0x6c,0x69,0x64])):_0x4503fe(_0xc89be8-_0x51e5ad>(0x11928db0^_0x314131)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x313b47)[_0x4503fe([0x63,0x61,0x74,0x63,0x68])](()=>{_0x313b47(_0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2cc537=0x35a8e730^_0x314131;function _0x30f7d6(){const _0x1f538a=_0x4503fe([0x6c,0x6c,0x63,0x74,0x2d])+_0x3fb4b6(_0x2dc06f(_0x3529b2)),_0x367d45=_0x59fdf7(_0x3fb4b6(window[_0x4503fe([0x4d,0x61,0x74,0x68])][_0x4503fe([0x63,0x65,0x69,0x6c])](_0xc89be8/_0x2cc537)));window[_0x4503fe([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4503fe([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1f538a,_0x367d45);}function _0x3fa48f(){const _0x5bb193=_0x4503fe([0x6c,0x6c,0x63,0x74,0x2d])+_0x3fb4b6(_0x2dc06f(_0x3529b2)),_0x5eeb22=window[_0x4503fe([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4503fe([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5bb193);return _0x5eeb22?window[_0x4503fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59fdf7(_0x5eeb22),0x10)*_0x2cc537:null;}function _0x9c3d52(_0x245ea4){return new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xfd4972,_0x8967ab)=>{_0x245ea4[_0x4503fe([0x74,0x68,0x65,0x6e])](_0xfd4972,_0x8967ab),window[_0x4503fe([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x8967ab,0x359fdd70^_0x314131);});}}_0x3fbd10[_0x4503fe([0x6f,0x6e])](_0x4503fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4c89f4,_0xa06da6)=>{if(_0xa06da6[0x0]!=_0x3529b2)return _0x313b47(_0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xa06da6[0x1]={..._0xa06da6[0x1],[_0x4503fe([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1c95f7};},{[_0x4503fe([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4503fe([0x68,0x69,0x67,0x68])}),_0x3fbd10[_0x4503fe([0x6f,0x6e])](_0x4503fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x148a7b=>{_0xdc049b(_0x148a7b[_0x4503fe([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x42c772=!0x0,_0x300e6c(_0x148a7b[_0x4503fe([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4503fe([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4503fe([0x6c,0x6f,0x77])}),_0x4bf02b[_0x4503fe([0x74,0x68,0x65,0x6e])](()=>{_0x42c772||_0x313b47(_0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3881a3(){return _0x3fbd10[_0x4503fe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4503fe([0x76,0x69,0x65,0x77])][_0x4503fe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4503fe([0x61,0x75,0x74,0x6f]);}function _0x5a27e6(){_0x3fbd10[_0x4503fe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4503fe([0x76,0x69,0x65,0x77])][_0x4503fe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4503fe([0x61,0x75,0x74,0x6f]);}}function _0x131339(_0x1623a6){const _0x4d4d81=[new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x121a68=>setTimeout(_0x121a68,0x3597377c^_0x314131)),_0x4bf02b[_0x4503fe([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bf93d=>{const _0x1b67de=0x359e09b7^_0x314131,_0x385e97=_0x499114[_0x4503fe([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x52ffcc(){_0x385e97[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x1b67de&&_0x3bf93d();}_0x52ffcc(),_0x385e97[_0x4503fe([0x6f,0x6e])](_0x4503fe([0x61,0x64,0x64]),_0x52ffcc);})),new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x356912=>{function _0x35e23d(){for(const _0x1fb7b4 in window)if(window[_0x4503fe([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4503fe([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1fb7b4))&&window[_0x1fb7b4]==_0x13f85c)return _0x356912();_0x3fbd10[_0x4503fe([0x73,0x74,0x61,0x74,0x65])]!=_0x4503fe([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4503fe([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x35e23d,0x359e1a38^_0x314131);}_0x4d1355(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x35e23d();})];return window[_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4503fe([0x72,0x61,0x63,0x65])](_0x4d4d81)[_0x4503fe([0x74,0x68,0x65,0x6e])](()=>_0x1623a6);}async function _0x332638(){if(await _0x4bf02b,_0x4d1355(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x39c9f5=_0x499114[_0x4503fe([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0xa0cb05=_0x499114[_0x4503fe([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])](_0x39c9f5[_0x4503fe([0x69,0x64])]),_0x5b8c92=_0x30870a(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x5b8c92[_0x4503fe([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x39c9f5['id'],_0xa0cb05?_0xa0cb05['id']:null,!0x0),_0x5b8c92[_0x4503fe([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4503fe([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5b8c92[_0x4503fe([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5b8c92[_0x4503fe([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x196f7a,void(_0x5b8c92[_0x4503fe([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x196f7a);}if(_0x4d1355(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x331c79=_0x30870a(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x331c79[_0x4503fe([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4503fe([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x331c79[_0x4503fe([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x331c79[_0x4503fe([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x196f7a,_0x331c79[_0x4503fe([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x196f7a;}_0x3fbd10[_0x4503fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x4503fe([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x196f7a,_0x3fbd10[_0x4503fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x4503fe([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x196f7a,_0x3fbd10[_0x4503fe([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4503fe([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1fb019(){return _0x4d1355(_0x4503fe([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x30870a(_0x4503fe([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4503fe([0x73,0x74,0x61,0x74,0x65])]==_0x4503fe([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1d3d96(){return _0x4d1355(_0x4503fe([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 _0x225dff(){return _0x4d1355(_0x4503fe([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x57bedb(_0x189806){const _0x5f349a=_0x10e4a1();_0x3fbd10[_0x5f349a]=_0x4503fe([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])+_0x189806,_0x189806[_0x4503fe([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4503fe([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x10e4a1()]=_0x13f85c),_0x189806!=_0x4503fe([0x56,0x61,0x6c,0x69,0x64])&&_0x332638();}function _0x10e4a1(){const _0x1382a5=window[_0x4503fe([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4503fe([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4503fe([0x6e,0x6f,0x77])]())[_0x4503fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4503fe([0x2e]),'');let _0xe43f08=_0x4503fe([0x76]);for(let _0x401b7b=0x0;_0x401b7b<_0x1382a5[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x401b7b+=0x2){let _0x45424e=window[_0x4503fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1382a5[_0x4503fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x401b7b,_0x401b7b+0x2));_0x45424e>=_0x28a5d6[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x45424e-=_0x28a5d6[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xe43f08+=_0x28a5d6[_0x45424e];}return _0xe43f08;}function _0x21863c(){const _0x1bf142=_0x48c14c[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])](_0x4503fe([0x2e]));if(0x3!=_0x1bf142[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1ef0fa(_0x1bf142[0x1]);function _0x1ef0fa(_0x5bec68){const _0x562ca6=_0xd11c26(_0x5bec68);return _0x562ca6&&_0x68cbde()?_0x562ca6:null;function _0x68cbde(){const _0x4f360f=_0x562ca6[_0x4503fe([0x6a,0x74,0x69])],_0x5af0d2=window[_0x4503fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f360f[_0x4503fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f360f[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5796b3={..._0x562ca6,[_0x4503fe([0x6a,0x74,0x69])]:_0x4f360f[_0x4503fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f360f[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5796b3[_0x4503fe([0x76,0x63])],_0x2dc06f(_0x5796b3)==_0x5af0d2;}}}async function _0x374a4d(){let _0x30421d=!0x0;try{const _0x1b249b=_0x48c14c[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])](_0x4503fe([0x2e])),[_0xbd9af9,_0x49f27c,_0x385f69]=_0x1b249b;return _0x5e0555(_0xbd9af9),await _0x368563(_0xbd9af9,_0x49f27c,_0x385f69),_0x30421d;}catch{return!0x1;}function _0x5e0555(_0xba95c7){const _0x23366a=_0xd11c26(_0xba95c7);_0x23366a&&_0x23366a[_0x4503fe([0x61,0x6c,0x67])]==_0x4503fe([0x45,0x53,0x32,0x35,0x36])||(_0x30421d=!0x1);}async function _0x368563(_0x64d0b1,_0x2ba3cd,_0x2d03e3){const _0x28ad8e=window[_0x4503fe([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4503fe([0x66,0x72,0x6f,0x6d])](_0x3dc04a(_0x2d03e3),_0x1e9bdd=>_0x1e9bdd[_0x4503fe([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xba5af5=new window[(_0x4503fe([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4503fe([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x64d0b1+_0x4503fe([0x2e])+_0x2ba3cd),_0x3de630=window[_0x4503fe([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4503fe([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3de630)return;const _0x14a6c3=await _0x3de630[_0x4503fe([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4503fe([0x6a,0x77,0x6b]),_0x12b875,{[_0x4503fe([0x6e,0x61,0x6d,0x65])]:_0x4503fe([0x45,0x43,0x44,0x53,0x41]),[_0x4503fe([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4503fe([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4503fe([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3de630[_0x4503fe([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4503fe([0x6e,0x61,0x6d,0x65])]:_0x4503fe([0x45,0x43,0x44,0x53,0x41]),[_0x4503fe([0x68,0x61,0x73,0x68])]:{[_0x4503fe([0x6e,0x61,0x6d,0x65])]:_0x4503fe([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x14a6c3,_0x28ad8e,_0xba5af5)||(_0x30421d=!0x1);}}function _0xd11c26(_0x5634c2){return _0x5634c2[_0x4503fe([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4503fe([0x65,0x79]))?JSON[_0x4503fe([0x70,0x61,0x72,0x73,0x65])](_0x3dc04a(_0x5634c2)):null;}function _0x3dc04a(_0xee41c6){return window[_0x4503fe([0x61,0x74,0x6f,0x62])](_0xee41c6[_0x4503fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4503fe([0x2b]))[_0x4503fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4503fe([0x2f])));}function _0x2dc06f(_0x5c745b){let _0x2a154a=0x1505;function _0x405ac3(_0x2193d4){for(let _0x425cf2=0x0;_0x425cf2<_0x2193d4[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x425cf2++){const _0x7a898c=_0x2193d4[_0x4503fe([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x425cf2);_0x2a154a=(_0x2a154a<<0x5)+_0x2a154a+_0x7a898c,_0x2a154a&=_0x2a154a;}}function _0x423a8a(_0x5b7a21){Array[_0x4503fe([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b7a21)?_0x5b7a21[_0x4503fe([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x423a8a):_0x5b7a21&&typeof _0x5b7a21==_0x4503fe([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4503fe([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b7a21)[_0x4503fe([0x73,0x6f,0x72,0x74])]()[_0x4503fe([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x19b08a,_0x308615])=>{_0x405ac3(_0x19b08a),_0x423a8a(_0x308615);}):_0x405ac3(window[_0x4503fe([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b7a21));}return _0x423a8a(_0x5c745b),_0x2a154a>>>0x0;}function _0x3fb4b6(_0x3f5caa){return _0x3f5caa[_0x4503fe([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4503fe([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4503fe([0x30]));}function _0x59fdf7(_0x4db254){return _0x4db254[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4503fe([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4503fe([0x6a,0x6f,0x69,0x6e])]('');}function _0x4d1355(_0x9cb1f6){return _0x3fbd10[_0x4503fe([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4503fe([0x68,0x61,0x73])](_0x9cb1f6);}function _0x30870a(_0x1001a9){return _0x3fbd10[_0x4503fe([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4503fe([0x67,0x65,0x74])](_0x1001a9);}function _0x196f7a(){}function _0x4503fe(_0x3230bc){return _0x3230bc['map'](_0x3b1764=>String['fromCharCode'](_0x3b1764))['join']('');}_0x57bedb(await _0x22d863());}(this);}['createRevision'](_0x2a41a3){const _0x225cc0=this['editor']['plugins']['get']('Users');return new I({'id':_0x2a41a3['id'],'name':_0x2a41a3['name'],'creator':_0x2a41a3['creatorId']?_0x225cc0['getUser'](_0x2a41a3['creatorId']):null,'diffData':_0x2a41a3['diffData']||_0x2a41a3['data'],'authors':_0x2a41a3['authorsIds']['map'](_0x26338d=>_0x225cc0['getUser'](_0x26338d)),'createdAt':new Date(_0x2a41a3['createdAt']),'attributes':_0x2a41a3['attributes'],'fromVersion':_0x2a41a3['fromVersion'],'toVersion':_0x2a41a3['toVersion']});}['addRevision'](_0x624356,_0x5d0e4b=0x0){this['_revisions']['add'](_0x624356,_0x5d0e4b);}['getRevision'](_0x416bd8){return this['_revisions']['get'](_0x416bd8);}['getRevisions'](_0x239a40={'toJSON':!0x1}){const _0x476e12=Array['from'](this['_revisions']);return _0x476e12['reverse'](),_0x239a40['toJSON']?_0x476e12['map'](_0x5d028e=>_0x5d028e['toJSON']()):_0x476e12;}['getIndex'](_0x53a7da){return this['_revisions']['getIndex'](_0x53a7da);}['getEarlierVisibleRevision'](_0x48354a){const [,_0x1ad509]=this['getRevisionsIterator'](_0x48354a,{'direction':'earlier'});return _0x1ad509;}['getLaterVisibleRevision'](_0x5984b2){const [,_0x3aefa2]=this['getRevisionsIterator'](_0x5984b2,{'direction':'later'});return _0x3aefa2;}['getRevisionsInDiff'](_0x42eb9a){const _0x286f10=[];for(const _0x52b6e2 of this['getRevisionsIterator'](_0x42eb9a['newRevisionId']))if(_0x286f10['push'](_0x52b6e2),_0x52b6e2['id']===_0x42eb9a['oldRevisionId'])break;return _0x286f10;}*['getRevisionsIterator'](_0x3ddce0,{direction:_0x42ccf6='earlier',filter:_0x2b2dd9=()=>!0x0}={}){const _0x10e715='earlier'===_0x42ccf6?0x1:-0x1;let _0xa07f9e=this['_revisions']['get'](_0x3ddce0),_0x182634=this['getIndex'](_0xa07f9e);for(yield _0xa07f9e;_0xa07f9e;){if(_0x182634+=_0x10e715,_0xa07f9e=this['getRevision'](_0x182634),!_0xa07f9e)return;_0x2b2dd9(_0xa07f9e)&&(yield _0xa07f9e);}}}class $ extends _0x5d9b40{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0xa5fb42,'c'],[_0xb7ce6e,'a'],[_0x38066c,'e'],[_0x5a91d4,'r'],[_0x30fb5,'u']]);['_typeCharToViewClass']=new Map([['c',_0xa5fb42],['a',_0xb7ce6e],['e',_0x38066c],['r',_0x5a91d4],['u',_0x30fb5]]);async['loadRevisionData'](_0x2a58a0,_0x3d6a74){if(_0x2a58a0['diffData']||!_0x3d6a74)return;const _0x3a3313=this['editor']['config']['get']('collaboration.channelId'),_0x5dc23e=await _0x3d6a74['getRevision']({'channelId':_0x3a3313,'revisionId':_0x2a58a0['id']});_0x2a58a0['diffData']=_0x5dc23e['diffData'];}['getRevisionDocumentData'](_0xdbfadc){const _0x5b8e9d={};for(const _0x5ddb7c in _0xdbfadc['diffData']){if(_0xdbfadc['diffData'][_0x5ddb7c]['attachChange']&&!_0xdbfadc['diffData'][_0x5ddb7c]['attachChange']['isAttached'])continue;const _0x42075d=this['_removeRevisionMarkers'](JSON['parse'](_0xdbfadc['diffData'][_0x5ddb7c]['insertions'])),_0x179a4a=this['editor']['editing']['view']['document'],_0xa28929=new _0x436c2b(_0x179a4a,_0x42075d['map'](_0x3da9e6=>this['_getViewFromDiffObj'](_0x3da9e6,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5b8e9d[_0x5ddb7c]=this['editor']['data']['processor']['toData'](_0xa28929),this['editor']['data']['processor']['useFillerType']('default');}return _0x5b8e9d;}['getRevisionRootsAttributes'](_0x15ff89){const _0x3abec8={};for(const _0x3fe873 in _0x15ff89['diffData'])_0x15ff89['diffData'][_0x3fe873]['attachChange']&&!_0x15ff89['diffData'][_0x3fe873]['attachChange']['isAttached']||(_0x3abec8[_0x3fe873]=_0x15ff89['diffData'][_0x3fe873]['attributesAfter']||{});return _0x3abec8;}['_getTypeCharForViewElement'](_0x3c8c20){return this['_viewClassToTypeChar']['get'](_0x3c8c20['constructor']);}['_getViewFromDiffObj'](_0x27de18,_0x46315d){const _0x4422e6=this['editor']['editing']['view']['document'];if('string'==typeof _0x27de18)return new _0x203872(_0x4422e6,_0x27de18);{let _0x22c770,_0x76dde4;_0x76dde4='u'==_0x27de18['type']||'r'==_0x27de18['type']?[]:_0x27de18['children']['map'](_0x3e3b0f=>this['_getViewFromDiffObj'](_0x3e3b0f,_0x46315d));const _0x2ee8aa=this['_typeCharToViewClass']['get'](_0x27de18['type'])||_0x34185c,_0x1a0ee1=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x22c770=new _0x2ee8aa(_0x4422e6,_0x27de18['name'],_0x27de18['attributes'],_0x76dde4),'u'==_0x27de18['type']&&_0x27de18['children'][0x0]){const _0xf9f9b0=_0x27de18['children'][0x0];if(_0x22c770['render']=function(_0x145903){const _0x128c94=_0x145903['createElement']('div');return _0x128c94['innerHTML']=_0xf9f9b0,_0x128c94['childNodes'][0x0];},_0x46315d){const _0x3664fa=new _0x436c2b(_0x4422e6);_0x3664fa['_appendChild'](_0x22c770);const _0x47deea=Array['from'](_0x1a0ee1['viewChildrenToDom'](_0x3664fa,{'bind':!0x1})),_0x38692c=_0x1a0ee1['domDocument']['createElement']('div');_0x38692c['append'](..._0x47deea),_0x22c770=Array['from'](_0x1a0ee1['domChildrenToView'](_0x38692c))[0x0];}}else{if('r'==_0x27de18['type']&&_0x27de18['children'][0x0]){const _0x2f7684=_0x27de18['children'][0x0];if(_0x22c770['render']=function(_0x988cc7){_0x988cc7['innerHTML']=_0x2f7684;},_0x46315d){const _0x2f9abc=new _0x436c2b(_0x4422e6);_0x2f9abc['_appendChild'](_0x22c770);const _0xcfef8b=Array['from'](_0x1a0ee1['viewChildrenToDom'](_0x2f9abc,{'bind':!0x1})),_0x40cbc6=_0x1a0ee1['domDocument']['createElement']('div');_0x40cbc6['append'](..._0xcfef8b);const _0x2f615b=Array['from'](_0x1a0ee1['domChildrenToView'](_0x40cbc6));_0x2f615b['length']>0x1?_0x22c770['_appendChild'](_0x2f615b):_0x22c770=_0x2f615b[0x0];}}}if(_0x27de18['customProperties']){for(const [_0x25bde0,_0x5653c5]of _0x27de18['customProperties'])_0x22c770['_setCustomProperty'](_0x25bde0,_0x5653c5);}const _0x3b3d36=void 0x0===_0x27de18['fillerOffset']?null:_0x27de18['fillerOffset'];return null!==_0x3b3d36&&(_0x22c770['getFillerOffset']=()=>_0x3b3d36),_0x22c770;}}['_makeModelFromViewString'](_0x551a40){const _0x10b9bb=JSON['parse'](_0x551a40),_0x20c151=this['editor']['editing']['view']['document'],_0x52b008=new _0x436c2b(_0x20c151,_0x10b9bb['map'](_0xa3ec5e=>this['_getViewFromDiffObj'](_0xa3ec5e,!0x0)));return this['editor']['data']['toModel'](_0x52b008);}['_removeRevisionMarkers'](_0x1e5bec){return(_0x1e5bec=_0x1e5bec['filter'](_0x4b2c66=>!_0x4b2c66['name']||'revision-start'!==_0x4b2c66['name']&&'revision-end'!==_0x4b2c66['name']))['forEach'](_0x2660a4=>{'string'!=typeof _0x2660a4&&(_0x2660a4['children']=this['_removeRevisionMarkers'](_0x2660a4['children']),_0x2660a4['attributes']=_0x2660a4['attributes']['filter'](_0x3f2804=>!_0x3f2804[0x0]['startsWith']('data-revision-')));}),_0x1e5bec;}}function m(_0x1f2601,_0xad9158,_0xf41987){const t=_0x1f2601['t'];switch(_0xad9158){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'},_0xf41987);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xf41987);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 h extends _0x5d9b40{['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[_0x48917f,S,$,_0x524b99];}constructor(_0x32a560){super(_0x32a560),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2fd593=_0x7da10a();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2fd593},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 _0xf6a489=this['repository']['getRevision'](0x0),_0x263d29=_0xf6a489&&null===_0xf6a489['creator']?_0xf6a489:null;if(this['_continueCurrentRevision']=!!_0x263d29&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x565b86=this['_source']['getCurrentRevisionId'](),_0x4dc3fc=this['repository']['getRevision'](_0x565b86);if(_0x4dc3fc)this['_startingVersion']=_0x4dc3fc['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x398000=this['_source']['history']['_operations']['find'](_0x59b0d9=>!_0x59b0d9['_isInit']),_0x5c66fc=_0x398000?_0x398000['baseVersion']:this['_source']['history']['version'];_0xf6a489?(_0xf6a489['toVersion']<_0x5c66fc&&_0xf6a489['_update']({'toVersion':_0x5c66fc}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x263d29['id'],this['_startingVersion']=_0x263d29['fromVersion']):(this['_startingVersion']=_0xf6a489['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x5c66fc,this['_continueCurrentRevision']=!0x1);}}else _0x263d29&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x263d29['toVersion'],this['editor']['model']['document']['history']['version']),_0x263d29['fromVersion']===_0x263d29['toVersion']?(0x0!==_0x263d29['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x263d29['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x263d29['id'],this['_startingVersion']=_0x263d29['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',_0x301a8e=>!_0x301a8e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x50277c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48f865;for(const _0x1b7206 in _0x50277c){const _0x45c51d=_0x1b7206,_0x5817c7=_0x50277c[_0x45c51d];if('revisionHistoryLicenseKeyValid'==_0x5817c7||'revisionHistoryLicenseKeyInvalid'==_0x5817c7||'revisionHistoryLicenseKeyExpired'==_0x5817c7||'revisionHistoryLicenseKeyDomainLimit'==_0x5817c7||'revisionHistoryLicenseKeyNotAllowed'==_0x5817c7||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5817c7||'revisionHistoryLicenseKeyUsageLimit'==_0x5817c7){delete _0x50277c[_0x45c51d],_0x48f865=_0x5817c7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x48f865&&_0x50277c['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x48f865&&_0x50277c['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x48f865&&_0x50277c['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x48f865&&_0x50277c['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x48f865&&_0x50277c['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x48f865&&_0x50277c['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x120868=this['repository']['getRevision'](0x0),_0x6a2602=await this['getRevisionDocumentData'](_0x120868),_0x244c9a=await this['getRevisionRootsAttributes'](_0x120868);this['_replaceEditorDataWithRevisionData'](_0x6a2602,_0x244c9a);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x51426c){this['_source']=_0x51426c;}async['update'](){const _0x35b6ad=await this['_source']['getLatestVersion']();if(_0x35b6ad>this['currentRevision']['toVersion']){await this['_loadState']();const _0x21134d=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x35b6ad});_0x21134d['authors']=_0x21134d['authorsIds']['map'](_0x3b527b=>this['editor']['plugins']['get']('Users')['getUser'](_0x3b527b)),this['currentRevision']['_update'](_0x21134d);}}async['saveRevision'](_0x424a5a={},_0x35f411=null){const _0x8b7426=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x35f411>this['currentRevision']['toVersion']&&(_0x35f411=null),null===_0x35f411&&(_0x35f411=await this['_source']['getLatestVersion']());const _0x3622ca=this['_getFromVersion'](_0x35f411),_0x52f9ba=this['buildRevisionData']({'from':_0x3622ca,'to':_0x35f411});if(this['currentRevision']['toVersion']<_0x35f411){const _0xc1288f=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x35f411,'to':_0x35f411});_0xc1288f['authors']=[],_0xc1288f['authorsIds']=[],_0xc1288f['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xc1288f,!0x0),delete _0xc1288f['authors'],_0x8b7426['push'](_0xc1288f);}_0x424a5a['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x424a5a['name']=_0x424a5a['name']||null,_0x424a5a['id']=_0x424a5a['id']||_0x7da10a(),_0x424a5a={..._0x424a5a,..._0x52f9ba};const _0x1d576c=this['addRevisionData'](_0x424a5a);_0x8b7426['push'](_0x424a5a);const _0x4094c5=this['repository']['getIndex'](_0x1d576c);if(0x0!==_0x4094c5){const _0x54f52b=this['repository']['getRevision'](_0x4094c5-0x1);if(_0x54f52b['fromVersion']!==_0x35f411){const _0x367b6c=this['_revisionDataBuilder']['getData'](_0x35f411,_0x54f52b['toVersion']),_0x3f88ef={'id':_0x54f52b['id'],'diffData':_0x367b6c['diffData'],'authorsIds':_0x367b6c['authorsIds'],'authors':_0x367b6c['authorsIds']['map'](_0x4597fd=>this['editor']['plugins']['get']('Users')['getUser'](_0x4597fd)),'fromVersion':_0x35f411};_0x54f52b===this['currentRevision']&&(_0x3f88ef['createdAt']=new Date(_0x424a5a['createdAt']['getTime']()+0xa)),_0x54f52b['_update'](_0x3f88ef,!0x0),delete _0x3f88ef['authors'],_0x8b7426['push'](_0x3f88ef);}}if(this['adapter']){for(const _0x4c225e of _0x8b7426)this['_bufferUpdate'](_0x4c225e['id'],_0x4c225e,!0x0);this['sendBufferedUpdates']();}return _0x1d576c;}['addRevisionData'](_0x4fa1c1){const _0x1da188=this['repository']['createRevision'](_0x4fa1c1);return this['adapter']&&_0x1da188['on']('_update',(_0x1d7e61,_0x26da2f,_0x3d35eb)=>{_0x3d35eb||(this['_bufferUpdate'](_0x26da2f['id'],_0x26da2f,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1da188,this['_findInsertionIndex'](_0x1da188)),_0x1da188;}async['getRevisionDocumentData'](_0x4c0709){return await this['_utils']['loadRevisionData'](_0x4c0709,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4c0709);}async['getRevisionRootsAttributes'](_0x57efe1){return await this['_utils']['loadRevisionData'](_0x57efe1,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x57efe1);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x54cd97=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x335336=0x0;_0x335336<_0x54cd97['length'];_0x335336++){const _0x4e3009=_0x54cd97[_0x335336];let _0x5c809f=!0x1;for(const _0x2c5d39 of Object['keys'](_0x4e3009))void 0x0===_0x4e3009[_0x2c5d39]?delete _0x4e3009[_0x2c5d39]:'id'!==_0x2c5d39&&(_0x5c809f=!0x0);_0x5c809f||(_0x54cd97[_0x335336]=null);}if(_0x54cd97=_0x54cd97['filter'](_0x5e984e=>null!==_0x5e984e),!_0x54cd97['length'])return;for(let _0x11a964=0x0;_0x11a964<_0x54cd97['length'];_0x11a964++){const _0xf26785=_0x54cd97[_0x11a964];void 0x0!==_0xf26785['fromVersion']&&void 0x0===_0xf26785['toVersion']&&(_0xf26785['toVersion']=this['repository']['getRevision'](_0xf26785['id'])['toVersion']),void 0x0!==_0xf26785['toVersion']&&void 0x0===_0xf26785['fromVersion']&&(_0xf26785['fromVersion']=this['repository']['getRevision'](_0xf26785['id'])['fromVersion']);}const _0x4e9510=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x54cd97,_0x4e9510)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4ab156=>{if(_0x4ab156){for(const _0x4432af of _0x4ab156)this['setRevisionData']({'id':_0x4432af['id'],'createdAt':_0x4432af['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x27c87a=null,from:_0x5b14b0=null,to:_0x4583f7=null}){_0x5b14b0=null!==_0x5b14b0?_0x5b14b0:_0x27c87a['fromVersion'],_0x4583f7=null!==_0x4583f7?_0x4583f7:_0x27c87a['toVersion'];const _0x11eb93=this['_revisionDataBuilder']['getData'](_0x5b14b0,_0x4583f7),_0xcc8a9b={'diffData':_0x11eb93['diffData'],'authorsIds':_0x11eb93['authorsIds'],'fromVersion':_0x5b14b0,'toVersion':_0x4583f7};if(!_0x27c87a||_0x4583f7!==_0x27c87a['toVersion']){const _0x3f808f=_0x4583f7-0x1,_0x599498=this['_source']['history']['getOperation'](_0x3f808f);_0xcc8a9b['createdAt']=_0x599498&&_0x599498['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5b14b0===this['_loadedStateData']['fromVersion']){for(const _0x221dd5 of this['_loadedStateData']['authors'])_0xcc8a9b['authorsIds']['includes'](_0x221dd5['id'])||_0xcc8a9b['authorsIds']['push'](_0x221dd5['id']);}return _0xcc8a9b;}['_bufferUpdate'](_0x1ed20b,_0x55c615,_0x2eeabd){if(this['_bufferedUpdates']['has'](_0x1ed20b)){const _0x4065f2=this['_bufferedUpdates']['get'](_0x1ed20b);_0x55c615=_0x2eeabd?{..._0x4065f2,..._0x55c615}:{..._0x55c615,..._0x4065f2};}this['_bufferedUpdates']['set'](_0x1ed20b,_0x55c615);}['setRevisionData'](_0x2dfe66){const _0x43e297=this['repository']['getRevision'](_0x2dfe66['id']);if(_0x2dfe66['createdAt']&&(_0x2dfe66['createdAt']=new Date(_0x2dfe66['createdAt'])),_0x2dfe66['authorsIds']){const _0x2cc8ef=this['editor']['plugins']['get']('Users');_0x2dfe66['authors']=_0x2dfe66['authorsIds']['map'](_0x2d959e=>_0x2cc8ef['getUser'](_0x2d959e));}_0x43e297['_update'](_0x2dfe66,!0x0);}['_createInitialRevision'](_0x33e557){const _0x5c7730=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5c7730)this['_initialRevisionId']=_0x5c7730['id'];else{const _0x2f60a1=!this['editor']['model']['document']['roots']['find'](_0x551c60=>this['editor']['model']['hasContent'](_0x551c60)),_0x1608d4=this['editor']['plugins']['get']('Users')['me']['id'],_0x3f8a46=m(this['editor']['locale'],_0x2f60a1?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x33e557,'to':_0x33e557,'id':this['_initialRevisionId'],'name':_0x3f8a46,'creatorId':_0x1608d4});}}['_createCurrentRevision'](_0xc5f865){const _0x2c5c25=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2c5c25),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xc5f865,'to':_0xc5f865,'id':_0x2c5c25,'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'](_0x362f05,_0x329880){let _0x9d844e=this['editor']['config']['get']('initialData'),_0x3b6902=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x9d844e){_0x9d844e={};for(const _0x5cf782 of this['editor']['model']['document']['getRootNames']())_0x9d844e[_0x5cf782]='';}if('string'==typeof _0x9d844e&&(_0x9d844e={'main':_0x9d844e}),void 0x0===_0x3b6902){_0x3b6902={};for(const _0x138fa0 of this['editor']['model']['document']['getRootNames']())_0x3b6902[_0x138fa0]={};}let _0x848f1e=!0x1;const _0x437268=Object['keys'](_0x9d844e),_0x42942c=Object['keys'](_0x362f05);for(const _0x161bde of _0x437268){if(_0x9d844e[_0x161bde]!==_0x362f05[_0x161bde]&&''!==_0x9d844e[_0x161bde]['trim']()){_0x848f1e=!0x0;break;}if(!_0x218d59(_0x3b6902[_0x161bde],_0x329880[_0x161bde])&&Object['keys'](_0x3b6902[_0x161bde])['length']>0x0){_0x848f1e=!0x0;break;}}_0x848f1e||(_0x848f1e=_0x42942c['some'](_0x4b1722=>!this['editor']['model']['document']['getRoot'](_0x4b1722))),_0x848f1e&&_0x50cc7e('editor-initial-data-replaced-with-revision-data',{'editorData':_0x9d844e,'editorRootsAttributes':_0x3b6902,'revisionData':_0x362f05,'revisionRootsAttributes':_0x329880}),this['editor']['config']['set']('initialData',_0x362f05),this['editor']['config']['set']('rootsAttributes',_0x329880);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2f6793=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2f6793['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x55f267){const _0x57b793=this['repository']['getRevisions']();_0x57b793['reverse']();let _0x27ba79=0x0;for(;_0x27ba79<_0x57b793['length'];){const _0x1e62ea=_0x57b793[_0x27ba79];if(_0x1e62ea===this['currentRevision']){_0x27ba79++;continue;}if(_0x1e62ea['id']===this['_initialRevisionId'])break;const _0x24cc71=_0x55f267['toVersion']-_0x1e62ea['toVersion']||_0x55f267['fromVersion']-_0x1e62ea['fromVersion'];if(_0x24cc71>0x0)break;if(_0x24cc71<0x0)_0x27ba79++;else{if(!_0x55f267['creator']&&_0x1e62ea['creator'])break;if(_0x1e62ea['creator']||!_0x55f267['creator']){if(_0x55f267['createdAt']>_0x1e62ea['createdAt'])break;_0x27ba79++;}else _0x27ba79++;}}return _0x27ba79;}['_getFromVersion'](_0x183b30){const _0x3ec630=this['repository']['getRevisions']();_0x3ec630['reverse'](),_0x3ec630['shift']();const _0x1a2335=_0x3ec630['find'](_0x5da22a=>_0x5da22a['toVersion']<=_0x183b30)['toVersion'];return _0x1a2335<this['_startingVersion']?this['_startingVersion']:_0x1a2335;}['_makeRevision']({name:_0x24bd87,from:_0x86bdcc,to:_0x2fc28d,creatorId:_0x27e6f8,id:_0x400338}){const _0x5c7322=this['buildRevisionData']({'from':_0x86bdcc,'to':_0x2fc28d});_0x5c7322['name']=_0x24bd87,_0x5c7322['creatorId']=_0x27e6f8,_0x5c7322['id']=_0x400338;const _0x581958=this['addRevisionData'](_0x5c7322);return this['adapter']&&this['_bufferUpdate'](_0x5c7322['id'],_0x5c7322,!0x0),_0x581958;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5d3595){this['editor']=_0x5d3595,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'](_0x2b72fb){this['source']=_0x2b72fb;const _0x7f6d3f=new Map(),_0x2c66cc=new Map(),_0x126360=this['editor']['model']['document']['roots']['map'](_0x31741a=>_0x31741a['rootName']);for(const _0x464d25 of _0x126360){const _0x3f6148=this['editor']['model']['document']['getRoot'](_0x464d25),_0x4ab618=K(_0x3f6148);_0x7f6d3f['set'](_0x464d25,_0x4ab618),_0x2c66cc['set'](_0x464d25,Object['fromEntries'](_0x3f6148['getAttributes']()));}const _0x19e7aa=Array['from'](this['editor']['model']['markers'])['map'](_0x554f93=>[_0x554f93['name'],_0x554f93['getRange']()]),_0x3d66c=this['source']['version'];this['_saveMetaData'](_0x3d66c,_0x7f6d3f,_0x19e7aa,_0x2c66cc),this['_startingRevisionId']=this['_revisionId'];const _0x279a49=new Map(),_0x1cec15=new Map();for(const _0x32fee2 of _0x126360){const _0x14bbd6=N(_0x32fee2);_0x279a49['set'](_0x32fee2,_0x14bbd6),_0x1cec15['set'](_0x32fee2,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x279a49,[],_0x1cec15);}['getData'](_0x4d8a0c,_0x4bcddb){if(this['_lastFrom']===_0x4d8a0c&&this['_lastTo']<=_0x4bcddb)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4bcddb,!0x0);else{if(!this['_savedMetaData']['has'](_0x4d8a0c)){const _0x79cf21=this['_getPreviousFrom'](_0x4d8a0c);this['_calculateMetaData'](_0x79cf21,_0x4d8a0c,!0x1);}this['_calculateMetaData'](_0x4d8a0c,_0x4bcddb,!0x0);}return this['_lastFrom']=_0x4d8a0c,this['_lastTo']=_0x4bcddb,this['_getState']();}['loadState'](_0x3b97a8){if(!this['_savedMetaData']['has'](_0x3b97a8['fromVersion'])){const _0x3084b5=this['_getPreviousFrom'](_0x3b97a8['fromVersion']);this['_calculateMetaData'](_0x3084b5,_0x3b97a8['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3b97a8['fromVersion'],_0x3b97a8['toVersion'],!0x1);const _0x391568=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3b97a8['fromVersion'],this['_lastTo']=_0x3b97a8['toVersion'];for(const _0x1c2d2f in _0x3b97a8['diffData']){const _0x11cca6=_0x3b97a8['diffData'][_0x1c2d2f]['attachChange'],_0x807ec8=_0x37c447(_0x3b97a8['diffData'][_0x1c2d2f]['attributesBefore'])||{},_0x79831b=_0x391568['_makeModelFromViewString'](_0x3b97a8['diffData'][_0x1c2d2f]['deletions']);_0x79831b['rootName']=_0x1c2d2f,_0x79831b['_isAttached']=!_0x11cca6||!_0x11cca6['isAttached'],_0x79831b['isAttached']=()=>_0x79831b['_isAttached'],this['_baseRoots']['set'](_0x1c2d2f,_0x79831b),this['_baseRootsAttributes']['set'](_0x1c2d2f,_0x807ec8),_0x11cca6&&this['_touchedRoots']['set'](_0x1c2d2f,_0x11cca6);const _0x383426=this['_makeIdsRoot'](_0x79831b);this['_baseIdsRoots']['set'](_0x1c2d2f,_0x383426);for(const [_0x2b8d3d,_0x2e8b25]of _0x79831b['markers']){if(!_0x2b8d3d['startsWith']('revision:'))continue;const _0x1bc623=_0x2b8d3d['split'](':')[0x2];for(const _0x2de64a of _0x2e8b25['getWalker']({'singleCharacters':!0x0})){const _0x3f7d35=this['_getVidAttributeName'](_0x2de64a),_0x37b5d2='elementEnd'==_0x2de64a['type']?_0x2de64a['previousPosition']['path']['slice'](0x0,-0x1):_0x2de64a['previousPosition']['path'],_0x437bc1=_0x383426['getNodeByPath'](_0x37b5d2)['getAttribute'](_0x3f7d35);this['_touched']['set'](_0x437bc1,{'userId':_0x1bc623});}_0x79831b['markers']['delete'](_0x2b8d3d);}}this['_startingRevisionId']=this['_revisionId'];const _0x5d7fbf=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5bccb8=>!this['_touched']['has'](_0x5bccb8));let _0x3c3e84=0x0;const _0x545f08=new Map();for(const _0x4d5b04 in _0x3b97a8['diffData']){const _0x20c085=_0x3b97a8['diffData'][_0x4d5b04]['attachChange'],_0x4bbc85=_0x37c447(_0x3b97a8['diffData'][_0x4d5b04]['attributesAfter'])||{},_0x515ba9=_0x391568['_makeModelFromViewString'](_0x3b97a8['diffData'][_0x4d5b04]['insertions']);_0x515ba9['rootName']=_0x4d5b04,_0x515ba9['_isAttached']=!_0x20c085||_0x20c085['isAttached'],_0x515ba9['isAttached']=()=>_0x515ba9['_isAttached'],this['_diffRoots']['set'](_0x4d5b04,_0x515ba9),this['_diffRootsAttributes']['set'](_0x4d5b04,_0x4bbc85);const _0x2b81f5=this['_makeIdsRoot'](_0x515ba9,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4d5b04,_0x2b81f5),_0x545f08['set'](_0x4d5b04,_0x515ba9['isAttached']()?_0x4bbc85:{});for(const [_0x1621b8,_0x4f35bb]of _0x515ba9['markers']){if(!_0x1621b8['startsWith']('revision:'))continue;const _0x3dc2ce=_0x1621b8['split'](':')[0x2];for(const _0x56236c of _0x4f35bb['getWalker']({'singleCharacters':!0x0})){const _0x1331ef=this['_getVidAttributeName'](_0x56236c),_0x4927ed=this['_revisionId']++,_0x15a7be='elementEnd'==_0x56236c['type']?_0x56236c['previousPosition']['path']['slice'](0x0,-0x1):_0x56236c['previousPosition']['path'];_0x2b81f5['getNodeByPath'](_0x15a7be)['_setAttribute'](_0x1331ef,_0x4927ed),this['_touched']['set'](_0x4927ed,{'userId':_0x3dc2ce});}_0x515ba9['markers']['delete'](_0x1621b8);}for(const _0x4f819c of this['editor']['model']['createRangeIn'](_0x515ba9)['getWalker']({'singleCharacters':!0x0})){const _0x1f93f5=this['_getVidAttributeName'](_0x4f819c),_0x247a8b='elementEnd'==_0x4f819c['type']?_0x4f819c['previousPosition']['path']['slice'](0x0,-0x1):_0x4f819c['previousPosition']['path'],_0x56ede9=_0x2b81f5['getNodeByPath'](_0x247a8b);_0x56ede9['getAttribute'](_0x1f93f5)>0x0||_0x56ede9['_setAttribute'](_0x1f93f5,_0x5d7fbf[_0x3c3e84++]);}for(const [_0x18b589,_0x8fb676]of _0x515ba9['markers'])_0x18b589['startsWith']('revision:')||this['_markers']['set'](_0x18b589,_0x8fb676);}const {roots:_0x19081a}=this['_savedMetaData']['get'](_0x3b97a8['fromVersion']),{roots:_0x17d5e1}=this['_savedMetaData']['get'](_0x3b97a8['toVersion']),_0x8633ac=K(_0x19081a['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x8633ac),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x8633ac,Number['NEGATIVE_INFINITY']));const _0x2d13ca=K(_0x17d5e1['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2d13ca),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2d13ca));const _0x18802c=Array['from'](this['_diffRoots'])['map'](([_0x335028,_0x35c554])=>[_0x335028,K(_0x35c554)]);this['_saveMetaData'](this['_lastTo'],_0x18802c,this['_markers'],_0x545f08);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x510515,_0x4ede3c,_0x2807b6,_0x318846){const _0xcffea4=new Map(_0x4ede3c),_0x59b4e1=new Map(_0x37c447(_0x318846)),_0x4d8ac2=new Map();for(const [_0x1e24a2,_0x313844]of _0x2807b6)_0x4d8ac2['set'](_0x1e24a2,{'start':_0x313844['start']['clone'](),'end':_0x313844['end']['clone'](),'rootName':_0x313844['root']['rootName']});this['_savedMetaData']['set'](_0x510515,{'roots':_0xcffea4,'markers':_0x4d8ac2,'rootsAttributes':_0x59b4e1});}['_removeMetaData'](_0x1e60b7){this['_savedMetaData']['delete'](_0x1e60b7);}['_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'](_0x1b2baf,_0x1e20b6=null){let _0x557573=null;_0x1b2baf['is']('documentFragment')||(_0x557573=new _0x5e7691(_0x1b2baf['name'],{'vid_start':null===_0x1e20b6?this['_revisionId']++:_0x1e20b6++}));const _0xd09c56=[];for(const _0x183153 of _0x1b2baf['getChildren']())if(_0x183153['is']('element')){_0xd09c56['push'](this['_makeIdsRoot'](_0x183153,_0x1e20b6));const _0x561f1d=_0xd09c56[_0xd09c56['length']-0x1];null!==_0x1e20b6&&(_0x1e20b6=_0x561f1d['is']('element','$text')?_0x561f1d['getAttribute']('vid')+0x1:_0x561f1d['getAttribute']('vid_end')+0x1);}else{for(let _0x2468c2=0x0;_0x2468c2<_0x183153['offsetSize'];_0x2468c2++)_0xd09c56['push'](new _0x5e7691('$text',{'vid':null===_0x1e20b6?this['_revisionId']++:_0x1e20b6++}));}if(_0x1b2baf['is']('documentFragment')){const _0x27021c=N(_0x1b2baf['rootName']);return _0x27021c['_insertChild'](0x0,_0xd09c56),_0x27021c;}return _0x557573['_setAttribute']('vid_end',null===_0x1e20b6?this['_revisionId']++:_0x1e20b6++),_0x557573['_insertChild'](0x0,_0xd09c56),_0x557573;}['_calculateMetaData'](_0x28f501,_0x1fa0ce,_0x314f37){this['_reset']();const {roots:_0x269e9a,markers:_0x56f3f4,rootsAttributes:_0x36e196}=this['_savedMetaData']['get'](_0x28f501);this['_baseRoots']=new Map(_0x269e9a),this['_baseRootsAttributes']=new Map(_0x37c447(_0x36e196));for(const [_0x10f365,_0x1f1432]of this['_baseRoots'])if('$graveyard'!==_0x10f365&&(this['_diffRoots']['set'](_0x10f365,K(_0x1f1432)),this['_diffRootsAttributes']=new Map(_0x37c447(_0x36e196)),_0x314f37)){const _0x4e6aa8=this['_revisionId'];this['_idsRoots']['set'](_0x10f365,this['_makeIdsRoot'](_0x1f1432)),this['_baseIdsRoots']['set'](_0x10f365,this['_makeIdsRoot'](_0x1f1432,_0x4e6aa8));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',K(this['_baseRoots']['get']('$graveyard'))),_0x314f37&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4ab6c8,_0x37dedd]of _0x56f3f4){const _0xfcf401=this['_baseRoots']['get'](_0x37dedd['rootName']),_0xd16be4=this['_diffRoots']['get'](_0x37dedd['rootName']),_0xf8493b=new _0x209563(this['_fixPosition'](_0x37dedd['start'],_0xfcf401),this['_fixPosition'](_0x37dedd['end'],_0xfcf401)),_0x406626=this['_fixRange'](_0xf8493b,_0xd16be4);_0xfcf401['markers']['set'](_0x4ab6c8,_0xf8493b),this['_markers']['set'](_0x4ab6c8,_0x406626);}this['_applyOperations'](_0x28f501,_0x1fa0ce,_0x314f37);}['_applyOperations'](_0x4073df,_0x2230bb,_0x13626e){for(const _0x408318 of this['source']['getOperations'](_0x4073df,_0x2230bb))this['_handleOperation'](_0x408318,_0x13626e);for(const _0x5d0d22 of this['_diffRoots']['values']())_0x5d0d22['markers']['clear']();for(const [_0x447980,_0x19e780]of this['_markers']){this['_diffRoots']['get'](_0x19e780['root']['rootName'])['markers']['set'](_0x447980,_0x19e780['clone']());}const _0x380844=new Map(),_0x44ca83=new Map();for(const [_0x104244,_0x5ce1f1]of this['_diffRoots'])_0x380844['set'](_0x104244,K(_0x5ce1f1)),_0x44ca83['set'](_0x104244,this['_diffRootsAttributes']['get'](_0x104244));this['_saveMetaData'](_0x2230bb,_0x380844,this['_markers'],_0x44ca83);}['_getPreviousFrom'](_0x1651a4){const _0x45d342=Array['from'](this['_savedMetaData']['keys']());_0x45d342['sort']((_0x27d131,_0x4eaabd)=>_0x27d131-_0x4eaabd),_0x45d342['reverse']();for(const _0x2ea756 of _0x45d342)if(_0x2ea756<_0x1651a4)return _0x2ea756;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x202c95,_0x2cc592){const _0x3395a7=Array['from'](_0x2cc592['markers'])['map'](([_0x184521,_0x22705c])=>[_0x184521,this['_fixRange'](_0x22705c,_0x202c95)]);_0x202c95['markers']=new Map(_0x3395a7);}['_transformMarkers'](_0xc94f15){for(const _0xbab09d of this['_markers']['values']()){const _0x1ea036=_0xbab09d['getTransformedByOperation'](_0xc94f15),_0x4165b3=_0x209563['_createFromRanges'](_0x1ea036);_0xbab09d['start']=_0x4165b3['start'],_0xbab09d['end']=_0x4165b3['end'];}}['_handleOperation'](_0x59a8d8,_0x33c0ea){if('addRoot'!=_0x59a8d8['type']&&'detachRoot'!=_0x59a8d8['type']){if('insert'==_0x59a8d8['type']){const _0x5ec993=_0x59a8d8['position']['root']['rootName'];this['_diffRoots']['has'](_0x5ec993)||(this['_diffRoots']['set'](_0x5ec993,N(_0x5ec993,!0x0)),this['_diffRootsAttributes']['set'](_0x5ec993,{}),_0x33c0ea&&this['_idsRoots']['set'](_0x5ec993,N(_0x5ec993,!0x0)));}else{if('addRootAttribute'==_0x59a8d8['type']||'removeRootAttribute'==_0x59a8d8['type']||'changeRootAttribute'==_0x59a8d8['type'])return void this['_handleRootAttributeOperation'](_0x59a8d8);'marker'==_0x59a8d8['type']&&this['_handleMarkerOperation'](_0x59a8d8);}if('marker'!==_0x59a8d8['type']){const _0x3e4180=this['_cloneOperation'](_0x59a8d8,this['_diffRoots']);_0x3e4180['_execute'](),this['_transformMarkers'](_0x3e4180);}if(_0x33c0ea)switch(_0x59a8d8['type']){case'insert':this['_handleInsertOperation'](_0x59a8d8);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x59a8d8);break;case'merge':this['_handleMergeOperation'](_0x59a8d8);break;case'split':this['_handleSplitOperation'](_0x59a8d8);}}else this['_handleRootOperation'](_0x59a8d8,_0x33c0ea);}['_cloneOperation'](_0x10d508,_0x492696){const _0x149991=_0x10d508['clone']();return _0x149991['_authorId']=_0x10d508['_authorId'],this['_fixOperation'](_0x149991,_0x492696),_0x149991;}['_getBaseVids'](_0x3408da){return _0x3408da['map'](_0x2153ee=>{const _0x2f79a8=this['_getVidAttributeName'](_0x2153ee);return Number(_0x2153ee['item']['getAttribute'](_0x2f79a8));});}['_generateTape'](_0x19443c,_0x85b48f){if(_0x19443c['is']('element','$text'))_0x85b48f['push']({'item':_0x19443c,'type':'text'});else{_0x19443c['is']('element')&&_0x85b48f['push']({'item':_0x19443c,'type':'elementStart'});for(const _0x85adce of _0x19443c['getChildren']())this['_generateTape'](_0x85adce,_0x85b48f);_0x19443c['is']('element')&&_0x85b48f['push']({'item':_0x19443c,'type':'elementEnd'});}return _0x85b48f;}['_getState'](){const _0x4c0f0f=new Map(this['_touched']),_0x2ffba6=new Map(_0x4c0f0f),_0x4aa407=new Map(),_0x41d9a5={'insertions':{},'deletions':{}},_0x5868f8={'insertions':{},'deletions':{}},_0x1ebc8f=new Map(),_0x366923=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x366923['delete']('$graveyard');for(const _0x1b8573 of _0x366923){const _0xfeaf48=this['_diffRoots']['get'](_0x1b8573)||N(_0x1b8573,!0x1),_0x469d96=this['_baseRoots']['get'](_0x1b8573)||N(_0x1b8573,!0x1);_0xfeaf48['isAttached']()||_0x469d96['isAttached']()?(_0x41d9a5['insertions'][_0x1b8573]=K(_0xfeaf48),_0x41d9a5['deletions'][_0x1b8573]=K(_0x469d96),this['_copyMarkers'](_0x41d9a5['deletions'][_0x1b8573],_0x469d96),this['_copyMarkers'](_0x41d9a5['insertions'][_0x1b8573],_0xfeaf48),_0x5868f8['insertions'][_0x1b8573]=this['_generateTape'](this['_idsRoots']['get'](_0x1b8573),[]),_0x5868f8['deletions'][_0x1b8573]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1b8573)||N(_0x1b8573,!0x1),[])):_0x366923['delete'](_0x1b8573);}for(const _0x29906c of _0x366923){const _0x4c5454=_0x5868f8['insertions'][_0x29906c];for(const _0x1e9878 of _0x4c5454){const _0x505ca4=this['_getVidAttributeName'](_0x1e9878),_0x2c7a84=_0x1e9878['item']['getAttribute'](_0x505ca4);_0x2ffba6['delete'](_0x2c7a84),_0x2c7a84>=this['_startingRevisionId']&&_0x4aa407['set'](_0x2c7a84,_0x4c0f0f['get'](_0x2c7a84));}}for(const _0x2f726a of _0x366923){const _0x415200=_0x5868f8['insertions'][_0x2f726a],_0x22bceb=this['_getBaseVids'](_0x5868f8['deletions'][_0x2f726a]);let _0x9b9ee3=0x0;for(const _0x1d309d of _0x415200){const _0x510ca6=this['_getVidAttributeName'](_0x1d309d),_0x39e8d1=_0x1d309d['item']['getAttribute'](_0x510ca6);if(!_0x4aa407['has'](_0x39e8d1)&&!_0x1ebc8f['has'](_0x39e8d1)){if(_0x2ffba6['has'](_0x39e8d1))_0x9b9ee3++;else{if(_0x39e8d1!=_0x22bceb[_0x9b9ee3]){const _0x3c468b=_0x4c0f0f['get'](_0x39e8d1)||_0x4c0f0f['get'](_0x22bceb[_0x9b9ee3]);for(;_0x39e8d1!=_0x22bceb[_0x9b9ee3];)_0x2ffba6['has'](_0x22bceb[_0x9b9ee3])||(_0x1ebc8f['set'](_0x22bceb[_0x9b9ee3],_0x3c468b),_0x4c0f0f['set'](_0x22bceb[_0x9b9ee3],_0x3c468b)),_0x9b9ee3++;}_0x9b9ee3++;}}}}for(const _0x58aaec of _0x366923){const _0x159fb3=_0x5868f8['insertions'][_0x58aaec];for(const _0x46ba45 of _0x159fb3){const _0x4bf348=this['_getVidAttributeName'](_0x46ba45),_0x667b1b=_0x46ba45['item']['getAttribute'](_0x4bf348);if(_0x1ebc8f['has'](_0x667b1b)){const _0x81e9e4=_0x1ebc8f['get'](_0x667b1b);_0x2ffba6['has'](_0x667b1b)||_0x2ffba6['set'](_0x667b1b,{..._0x81e9e4}),_0x4aa407['set'](_0x667b1b,{..._0x81e9e4});}}}for(const _0x58b222 of _0x2ffba6['keys']())_0x58b222>=this['_startingRevisionId']&&_0x2ffba6['delete'](_0x58b222);const _0x439688=new Map();for(const _0x12ac55 of _0x366923){let _0x554229=_0x5868f8['insertions'][_0x12ac55];for(const _0x20b293 of _0x554229)if(_0x20b293['item']['is']('element','tableCell')){const _0x3df220=this['_getVidAttributeName'](_0x20b293),_0x1f87e0=_0x20b293['item']['getAttribute'](_0x3df220);if(_0x4aa407['has'](_0x1f87e0)){const _0xf55fdb=_0x20b293['item']['parent']['parent']['getAttribute']('vid_start'),_0x5ba45f=_0x439688['get'](_0xf55fdb)||new Set();_0x5ba45f['add'](_0x4aa407['get'](_0x1f87e0)['userId']),_0x439688['set'](_0xf55fdb,_0x5ba45f);}}_0x554229=_0x5868f8['deletions'][_0x12ac55];for(const _0x11e607 of _0x554229)if(_0x11e607['item']['is']('element','tableCell')){const _0x225c7b=this['_getVidAttributeName'](_0x11e607),_0x5b5cce=_0x11e607['item']['getAttribute'](_0x225c7b);if(_0x2ffba6['has'](_0x5b5cce)){const _0xad378c=_0x11e607['item']['parent']['parent']['getAttribute']('vid_start'),_0x4a172d=_0x439688['get'](_0xad378c)||new Set();_0x4a172d['add'](_0x2ffba6['get'](_0x5b5cce)['userId']),_0x439688['set'](_0xad378c,_0x4a172d);}}for(const _0x1c9fa1 of _0x439688['keys']())(_0x4aa407['has'](_0x1c9fa1)||_0x2ffba6['has'](_0x1c9fa1))&&_0x439688['delete'](_0x1c9fa1);}for(const _0x1a08b2 of _0x366923){const _0x616245=_0x5868f8['insertions'][_0x1a08b2];let _0x4e9462=null,_0x4064ee=null;for(const _0x3481b7 of _0x616245){const _0x214b17=this['_getVidAttributeName'](_0x3481b7),_0x5e7387=_0x3481b7['item']['getAttribute'](_0x214b17),_0x2b251e=_0x439688['get'](_0x5e7387);_0x2b251e&&'elementStart'==_0x3481b7['type']&&(_0x4e9462=Array['from'](_0x2b251e)[0x0],_0x4064ee=_0x3481b7['item']['getAttribute']('vid_end')),_0x4e9462&&(_0x2ffba6['set'](_0x5e7387,{'userId':_0x4e9462}),_0x4aa407['set'](_0x5e7387,{'userId':_0x4e9462})),_0x5e7387==_0x4064ee&&(_0x4e9462=null,_0x4064ee=null);}}const _0x471ea6={},_0x38f7d9=new Set();for(const _0x1a5937 of _0x366923){const _0x18bc7b=_0x41d9a5['deletions'][_0x1a5937],_0x487e8f=_0x41d9a5['insertions'][_0x1a5937];for(const {userId:_0x9f3c37}of this['_touchedMarkers']['values']())null!==_0x9f3c37&&_0x38f7d9['add'](_0x9f3c37);for(const {userId:_0x58e05f}of this['_touchedRoots']['values']())null!==_0x58e05f&&_0x38f7d9['add'](_0x58e05f);this['_markChanges'](_0x487e8f,_0x5868f8['insertions'][_0x1a5937],_0x4aa407,'insertion',_0x38f7d9),this['_markChanges'](_0x18bc7b,_0x5868f8['deletions'][_0x1a5937],_0x2ffba6,'deletion',_0x38f7d9),_0x471ea6[_0x1a5937]={'insertions':this['_prepareViewToSave'](_0x487e8f),'deletions':this['_prepareViewToSave'](_0x18bc7b),'attachChange':this['_touchedRoots']['get'](_0x1a5937)||null,'attributesBefore':_0x37c447(this['_baseRootsAttributes']['get'](_0x1a5937))||{},'attributesAfter':_0x37c447(this['_diffRootsAttributes']['get'](_0x1a5937))};}return{'diffData':_0x471ea6,'authorsIds':Array['from'](_0x38f7d9)};}['_processRootBeforeSave'](_0x639b1a){for(const [,_0x3381bc]of _0x639b1a['markers']){const _0x29bb12=_0x3381bc['start']['getAncestors']()['filter'](_0x378ba1=>'tableCell'==_0x378ba1['name']);for(const _0x7635f6 of _0x29bb12)0x1==_0x7635f6['childCount']&&_0x7635f6['getChild'](0x0)['is']('element','paragraph')&&_0x7635f6['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x544e43){this['_processRootBeforeSave'](_0x544e43);const _0x31bbe9=this['editor']['data']['toView'](_0x544e43,{}),_0x31ec37=Array['from'](_0x31bbe9['getChildren']())['map'](_0x719d99=>this['_getViewJson'](_0x719d99));return JSON['stringify'](_0x31ec37);}['_getViewJson'](_0x357ae3){if(_0x357ae3['is']('$text'))return _0x357ae3['data'];{const _0x2475bd=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4f8292=_0x357ae3,_0x147777=this['editor']['data']['htmlProcessor']['domConverter'],_0x48b5fe={'type':_0x2475bd['_getTypeCharForViewElement'](_0x4f8292),'name':_0x4f8292['name'],'attributes':Array['from'](_0x4f8292['getAttributes']()),'children':Array['from'](_0x4f8292['getChildren']())['map'](_0x1cac9f=>this['_getViewJson'](_0x1cac9f))};if(_0x357ae3['is']('uiElement')&&'$comment'!=_0x357ae3['name']){const _0x3ccda8=_0x357ae3['render'](_0x147777['domDocument'],_0x147777);_0x48b5fe['children']['push'](_0x3ccda8['outerHTML']);}else{if(_0x357ae3['is']('rawElement')){const _0x338f01=_0x147777['domDocument']['createElement'](_0x4f8292['name']);_0x357ae3['render'](_0x338f01,_0x147777),_0x48b5fe['children']['push'](_0x338f01['innerHTML']);}}const _0xeb87af=Array['from'](_0x4f8292['getCustomProperties']());_0xeb87af['length']>0x0&&(_0x48b5fe['customProperties']=_0xeb87af);const _0x4a1c2b=_0x4f8292['getFillerOffset']();return null!==_0x4a1c2b&&(_0x48b5fe['fillerOffset']=_0x4a1c2b),_0x48b5fe;}}['_markChanges'](_0x4cee3f,_0x5098cd,_0x1d2a03,_0x4b9f54,_0x4586ef){let _0x4f1e8b=null,_0x5cf614=null,_0xdddbfc=0x0;const _0x53e534=this['editor']['model'];for(let _0x1db509=0x0;_0x1db509<_0x5098cd['length'];_0x1db509++){const _0xa19c67=this['_getVidAttributeName'](_0x5098cd[_0x1db509]),_0x245609=_0x5098cd[_0x1db509]['item']['getAttribute'](_0xa19c67),_0x52e3b4=_0x1d2a03['get'](_0x245609),_0x59c459=_0x1db509==_0x5098cd['length']-0x1;(!_0x4f1e8b&&_0x52e3b4&&(_0x4f1e8b=_0x52e3b4,_0x5cf614=_0x5098cd[_0x1db509]),_0x4f1e8b&&(!_0x52e3b4||_0x52e3b4['userId']!=_0x4f1e8b['userId']))&&(_0x2b569a(_0x52e3b4,P(_0x5cf614,_0x4cee3f,_0x53e534),P(_0x5098cd[_0x1db509],_0x4cee3f,_0x53e534)),_0x4f1e8b=_0x52e3b4||null,_0x5cf614=_0x52e3b4?_0x5098cd[_0x1db509]:null),_0x4f1e8b&&_0x59c459&&_0x2b569a(_0x52e3b4,P(_0x5cf614,_0x4cee3f,_0x53e534),V(_0x5098cd[_0x1db509],_0x4cee3f,_0x53e534));}function _0x2b569a(_0x209549,_0x1dd739,_0x376ca4){const _0x163d13=_0x4f1e8b['userId'],_0x410653='revision:'+_0x4b9f54+':'+_0x163d13+':'+_0xdddbfc++,_0x3e2755=_0x53e534['createRange'](_0x1dd739,_0x376ca4);_0x4cee3f['markers']['set'](_0x410653,_0x3e2755),null!==_0x163d13&&_0x4586ef['add'](_0x163d13);}}['_getVidAttributeName'](_0x247c77){switch(_0x247c77['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x381b67,_0x399435){_0x381b67['baseVersion']=null;for(const _0x3a71b8 in _0x381b67){const _0x355c71=_0x381b67[_0x3a71b8];if(_0x355c71 instanceof _0x2d3910){const _0x366850=_0x399435['get'](_0x355c71['root']['rootName']);_0x381b67[_0x3a71b8]=this['_fixPosition'](_0x355c71,_0x366850);}if(_0x355c71 instanceof _0x209563){const _0x3737f1=_0x399435['get'](_0x355c71['root']['rootName']);_0x381b67[_0x3a71b8]=this['_fixRange'](_0x355c71,_0x3737f1);}'root'===_0x3a71b8&&(_0x381b67['root']=_0x399435['get'](_0x381b67['root']['rootName']));}}['_fixRange'](_0x98bba0,_0x48103e){return this['editor']['model']['createRange'](this['_fixPosition'](_0x98bba0['start'],_0x48103e),this['_fixPosition'](_0x98bba0['end'],_0x48103e));}['_fixPosition'](_0x31e677,_0x5e988b){return this['editor']['model']['createPositionFromPath'](_0x5e988b,_0x31e677['path'],_0x31e677['stickiness']);}['_handleInsertOperation'](_0x13b01d){const _0x39d256=this['_idsRoots']['get'](_0x13b01d['position']['root']['rootName']),_0x7e8a95=this['_fixPosition'](_0x13b01d['position'],_0x39d256),_0x3baaae=null===_0x13b01d['_authorId']?null:_0x13b01d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43b37c=_0x7e8a95['parent'],_0x3948db=this['_revisionId'],_0x60918c=[];for(const _0x21309e of _0x13b01d['nodes'])if(_0x21309e['is']('element'))_0x60918c['push'](this['_makeIdsRoot'](_0x21309e));else{for(let _0xb63e1f=0x0;_0xb63e1f<_0x21309e['offsetSize'];_0xb63e1f++)_0x60918c['push'](new _0x5e7691('$text',{'vid':this['_revisionId']++}));}const _0x117d20=this['_revisionId'];for(let _0x3930cc=_0x3948db;_0x3930cc<_0x117d20;_0x3930cc++)this['_touched']['set'](_0x3930cc,{'userId':_0x3baaae});_0x43b37c['_insertChild'](_0x7e8a95['offset'],_0x60918c);}['_handleMoveOperation'](_0x206139){(_0x206139=this['_cloneOperation'](_0x206139,this['_idsRoots']))['_execute']();const _0x5dab17=null===_0x206139['_authorId']?null:_0x206139['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37f8df=_0x206139['getMovedRangeStart'](),_0x461664=_0x37f8df['parent'],_0x52133c=_0x37f8df['offset'];!function _0x3d7fd2(_0x56fc63,_0x52cf31,_0x110568,_0x2647a1){for(let _0x5b4106=_0x110568;_0x5b4106<_0x2647a1;_0x5b4106++){const _0x3bc75a=_0x52cf31['getChild'](_0x5b4106);_0x3bc75a['is']('element','$text')?_0x56fc63['set'](_0x3bc75a['getAttribute']('vid'),{'userId':_0x5dab17}):(_0x56fc63['set'](_0x3bc75a['getAttribute']('vid_start'),{'userId':_0x5dab17}),_0x3d7fd2(_0x56fc63,_0x3bc75a,0x0,_0x3bc75a['childCount']),_0x56fc63['set'](_0x3bc75a['getAttribute']('vid_end'),{'userId':_0x5dab17}));}}(this['_touched'],_0x461664,_0x52133c,_0x52133c+_0x206139['howMany']);}['_handleMergeOperation'](_0x17c75f){const _0x2e3a32=null===(_0x17c75f=this['_cloneOperation'](_0x17c75f,this['_idsRoots']))['_authorId']?null:_0x17c75f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1388d5=_0x17c75f['targetPosition']['parent'],_0x293033=_0x17c75f['sourcePosition']['parent'],_0x1baad4=_0x1388d5['getAttribute']('vid_end'),_0x1253e9=_0x293033['getAttribute']('vid_start');_0x1388d5['_setAttribute']('vid_end',_0x293033['getAttribute']('vid_end')),_0x293033['_setAttribute']('vid_end',_0x1baad4),this['_touched']['set'](_0x1253e9,{'userId':_0x2e3a32}),this['_touched']['set'](_0x1baad4,{'userId':_0x2e3a32}),_0x17c75f['_execute']();}['_handleSplitOperation'](_0x397448){const _0x7e8ff8=null===(_0x397448=this['_cloneOperation'](_0x397448,this['_idsRoots']))['_authorId']?null:_0x397448['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x55333a=_0x397448['graveyardPosition'],_0x4792a2=_0x397448['splitPosition']['parent'];_0x397448['_execute']();const _0x191d7a=_0x4792a2['getAttribute']('vid_end'),_0x26efd7=_0x397448['insertionPosition']['nodeAfter'];if(_0x55333a){const _0x5009a0=_0x26efd7['getAttribute']('vid_end'),_0x5b02a8=_0x4792a2['getAttribute']('vid_end');_0x4792a2['_setAttribute']('vid_end',_0x5009a0),_0x26efd7['_setAttribute']('vid_end',_0x5b02a8),this['_touched']['set'](_0x4792a2['getAttribute']('vid_end'),{'userId':_0x7e8ff8}),this['_touched']['set'](_0x26efd7['getAttribute']('vid_start'),{'userId':_0x7e8ff8});}else{const _0x3a0e13=this['_revisionId']++,_0x453191=this['_revisionId']++;_0x4792a2['_setAttribute']('vid_end',_0x3a0e13),_0x26efd7['_setAttribute']('vid_start',_0x453191),_0x26efd7['_setAttribute']('vid_end',_0x191d7a),this['_touched']['set'](_0x3a0e13,{'userId':_0x7e8ff8}),this['_touched']['set'](_0x453191,{'userId':_0x7e8ff8});}}['_handleMarkerOperation'](_0x17a36b){if(!_0x17a36b['affectsData'])return;const _0x141e0f=(_0x17a36b=this['_cloneOperation'](_0x17a36b,this['_diffRoots']))['oldRange']?_0x17a36b['oldRange']['root']:null,_0x2978b3=_0x17a36b['newRange']?_0x17a36b['newRange']['root']:null;_0x141e0f&&this['_markers']['delete'](_0x17a36b['name']),_0x2978b3&&this['_markers']['set'](_0x17a36b['name'],_0x17a36b['newRange']['clone']());const _0x527bc3=null===_0x17a36b['_authorId']?null:_0x17a36b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x167434=_0x17a36b['name'];if(!this['_touchedMarkers']['has'](_0x167434))return void this['_touchedMarkers']['set'](_0x167434,{'range':_0x17a36b['oldRange'],'userId':_0x527bc3});const _0x12478d=this['_touchedMarkers']['get'](_0x167434),_0x17647f=_0x12478d['range'],_0x2a63ce=_0x17a36b['newRange'];null==_0x17647f&&null==_0x2a63ce||_0x17647f&&_0x2a63ce&&_0x17647f['isEqual'](_0x2a63ce)?this['_touchedMarkers']['delete'](_0x17a36b['name']):_0x12478d['userId']=_0x527bc3;}['_handleRootOperation'](_0x36b5d6,_0x5055f7){this['_diffRoots']['has'](_0x36b5d6['rootName'])?this['_diffRoots']['get'](_0x36b5d6['rootName'])['_isAttached']=_0x36b5d6['isAdd']:(this['_diffRoots']['set'](_0x36b5d6['rootName'],N(_0x36b5d6['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x36b5d6['rootName'],{}),_0x5055f7&&this['_idsRoots']['set'](_0x36b5d6['rootName'],N(_0x36b5d6['rootName'],!0x0)));const _0x2fe7cf=null===_0x36b5d6['_authorId']?null:_0x36b5d6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b12f7=this['_touchedRoots']['get'](_0x36b5d6['rootName']);_0x4b12f7&&_0x4b12f7['userId']===_0x2fe7cf?this['_touchedRoots']['delete'](_0x36b5d6['rootName']):this['_touchedRoots']['set'](_0x36b5d6['rootName'],{'userId':_0x2fe7cf,'isAttached':_0x36b5d6['isAdd']});}['_handleRootAttributeOperation'](_0x3a02b1){const _0x5079cd=this['_diffRootsAttributes']['get'](_0x3a02b1['root']['rootName']);null===_0x3a02b1['newValue']?delete _0x5079cd[_0x3a02b1['key']]:_0x5079cd[_0x3a02b1['key']]=_0x3a02b1['newValue'];}}function K(_0x456d21){const _0x43aaf2=N(_0x456d21['rootName'],_0x456d21['isAttached']());for(const _0x186b5b of _0x456d21['getChildren']()){const _0x4f0305=_0x186b5b['_clone'](!0x0);_0x43aaf2['_appendChild'](_0x4f0305);}return _0x43aaf2;}function N(_0x3154ba,_0x218356=!0x0){const _0x472b69=new _0x1eaa31();return _0x472b69['rootName']=_0x3154ba,_0x472b69['_isAttached']=_0x218356,_0x472b69['isAttached']=()=>_0x472b69['_isAttached'],_0x472b69;}function P(_0x290fdb,_0x1d1195,_0x2599d5){const _0x38342d='elementEnd'==_0x290fdb['type']?_0x2599d5['createPositionAt'](_0x290fdb['item'],'end'):_0x2599d5['createPositionBefore'](_0x290fdb['item']);return _0x2599d5['createPositionFromPath'](_0x1d1195,_0x38342d['path'],_0x38342d['stickiness']);}function V(_0xb84adf,_0x5b8c10,_0x225f7c){const _0x42c192='elementStart'==_0xb84adf['type']?_0x225f7c['createPositionAt'](_0xb84adf['item'],0x0):_0x225f7c['createPositionAfter'](_0xb84adf['item']);return _0x225f7c['createPositionFromPath'](_0x5b8c10,_0x42c192['path'],_0x42c192['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
+ _0x4086f9(_0x23ebf3){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0xece444,_0x3384a0){super(_0xece444),this['focusTracker']=new _0x5e371b(),this['keystrokes']=new _0x1758ab(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3384a0),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'](),_0x58385d({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x52d816=_0x50cbc6=>_0x50cbc6['stopPropagation']();this['keystrokes']['set']('arrowright',_0x52d816),this['keystrokes']['set']('arrowleft',_0x52d816),this['keystrokes']['set']('arrowup',_0x52d816),this['keystrokes']['set']('arrowdown',_0x52d816);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2eb39d){this['revisionNameInputView']['fieldView']['element']['value']=_0x2eb39d['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x1461ee){const _0x2bba3e=new ti(this['locale'],_0x5dd4bb),_0x1a4242=_0x2bba3e['fieldView'];_0x1a4242['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4fa914=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x1461ee&&(_0x4fa914+='\x20('+m(this['locale'],'optional')+')'),(_0x2bba3e['label']=_0x4fa914,_0x1a4242['on']('input',()=>{this['revisionNameInputValue']=_0x1a4242['element']['value']['trim']();}),_0x2bba3e);}}class l extends _0x5d9b40{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x424757=this['editor'],_0x2b98a4=_0x424757['plugins']['get']('RevisionTracker');_0x424757['ui']['componentFactory']['add']('revisionHistory',_0x2db61c=>{const _0x2688c5=_0x1f2a8d(_0x2db61c),_0x6763ee=_0x2688c5['panelView']['children'],_0x430c19=new _0x175cc8(_0x2db61c),_0x53b2bb=new _0x4f78bd(_0x2db61c),_0x49adf0=this['_createSaveRevisionButton'](_0x25e13b),_0x3cbb73=new _0x4f78bd(_0x2db61c),_0x54fbf9=this['_createOpenRevisionButton'](_0x25e13b);return _0x2688c5['bind']('isEnabled')['to'](_0x2b98a4,'isReady',_0x2b98a4,'isEnabled',_0x424757,'isReadOnly',(_0x1264e3,_0x20e37d,_0x1abe5f)=>_0x1264e3&&_0x20e37d&&!_0x1abe5f),_0x2688c5['buttonView']['set']({'icon':_0x23a599,'label':m(_0x2db61c,'Revision\x20history'),'tooltip':!0x0}),_0x49adf0['set']({'withText':!0x0,'role':'menuitem'}),_0x54fbf9['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x54fbf9,'execute',()=>{_0x2688c5['isOpen']=!0x1,_0x424757['editing']['view']['focus']();},{'priority':'low'}),_0x53b2bb['children']['add'](_0x49adf0),_0x3cbb73['children']['add'](_0x54fbf9),_0x430c19['role']='menu',_0x430c19['items']['addMany']([_0x53b2bb,_0x3cbb73]),_0x6763ee['add'](_0x430c19),_0x2688c5;}),_0x424757['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1e4721=this['editor'],_0x5ca3=_0x1e4721['locale'],_0x1162d5=_0x1e4721['plugins']['get']('RevisionTracker'),_0x17f148=new _0x3be7f4(_0x5ca3),_0x52bb85=new _0x30e8c5(_0x5ca3);_0x17f148['bind']('isEnabled')['to'](_0x1162d5,'isReady',_0x1162d5,'isEnabled',_0x1e4721,'isReadOnly',(_0x503ea,_0x4917c9,_0x9f6c01)=>_0x503ea&&_0x4917c9&&!_0x9f6c01),_0x17f148['buttonView']['set']({'icon':_0x23a599,'label':m(_0x5ca3,'Revision\x20history')});const _0x46719d=new _0x4f5764(_0x5ca3,_0x17f148),_0x21a9de=this['_createSaveRevisionButton'](_0x546e60);_0x21a9de['delegate']('execute')['to'](_0x17f148),_0x46719d['children']['add'](_0x21a9de),_0x52bb85['items']['add'](_0x46719d);const _0x1f7d83=new _0x4f5764(_0x5ca3,_0x17f148),_0x578b64=this['_createOpenRevisionButton'](_0x546e60);return _0x578b64['delegate']('execute')['to'](_0x17f148),_0x1f7d83['children']['add'](_0x578b64),_0x52bb85['items']['add'](_0x1f7d83),_0x17f148['panelView']['children']['add'](_0x52bb85),_0x17f148;}['_createSaveRevisionButton'](_0x1f59b2){const _0x259522=this['editor'],_0x3206f0=_0x259522['plugins']['get']('RevisionTracker'),_0x2e5ec5=new _0x1f59b2(_0x259522['locale']);return _0x2e5ec5['set']({'label':m(_0x259522['locale'],'Save\x20current\x20revision')}),_0x2e5ec5['bind']('isEnabled')['to'](_0x3206f0,'isReady',_0x3206f0,'isEnabled',_0x259522,'isReadOnly',(_0x388816,_0x1aa777,_0x241e2b)=>_0x388816&&_0x1aa777&&!_0x241e2b),this['listenTo'](_0x2e5ec5,'execute',()=>{this['_showDialog']();}),_0x2e5ec5;}['_createOpenRevisionButton'](_0x50e70c){const _0xbe88bb=this['editor'],_0x5e6797=_0xbe88bb['plugins']['get']('RevisionTracker'),_0x15a36e=new _0x50e70c(_0xbe88bb['locale']);return _0x15a36e['set']({'label':m(_0xbe88bb['locale'],'Open\x20revision\x20history')}),_0x15a36e['bind']('isEnabled')['to'](_0x5e6797,'isReady',_0xbe88bb,'isReadOnly',(_0x18734b,_0x49e296)=>_0x18734b&&!_0x49e296),this['listenTo'](_0x15a36e,'execute',()=>{_0xbe88bb['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x15a36e;}['_showDialog'](){const _0x119822=this['editor'],_0x5be0e0=_0x119822['locale'],_0x3a915a=_0x119822['plugins']['get']('Dialog'),_0x59e985=_0x119822['plugins']['get']('RevisionTracker');function _0x34311a(_0x3e84fe){_0x119822['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3e84fe['revisionName']?_0x3e84fe['revisionNameInputView']['errorText']=m(_0x5be0e0,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x119822['plugins']['get'](h)['saveRevision']({'name':_0x3e84fe['revisionName']}),_0x3a915a['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x34311a(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3a915a['show']({'id':'revisionSave','title':m(_0x5be0e0,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x119822['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3a915a['hide']()},{'label':m(_0x119822['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x335a4d){_0x335a4d['bind']('isEnabled')['to'](_0x59e985,'isReady',_0x59e985,'isEnabled',_0x119822,'isReadOnly',(_0x280dc7,_0x250520,_0x40a542)=>_0x280dc7&&_0x250520&&!_0x40a542);},'onExecute':()=>_0x34311a(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x389d1d=this['editor'],_0x3806ef=_0x389d1d['locale'];this['_saveRevisionFormView']=new me(_0x3806ef,_0x389d1d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x23ebf3{['changeId'];['_model'];constructor(_0x4a647d,_0x5e7ce4){super(_0x4a647d),this['_model']=_0x5e7ce4,this['changeId']=_0x5e7ce4['id'];const _0x1f3ee1=this['bindTemplate'],_0x5e397b=m(_0x4a647d,_0x5e7ce4['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5e7ce4['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5e7ce4['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1f3ee1['to']('type',_0x487f77=>'ck-revision-change__'+_0x487f77)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5e397b}]},{'text':'\x20'+_0x5e7ce4['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x4526a4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x595390){super(),this['id']=_0x595390['id']||_0x7da10a(),this['author']=_0x595390['author'],this['type']=_0x595390['type'],this['data']=_0x595390['data']||{},this['rootName']=_0x595390['rootName'],this['set']('createdAt',_0x595390['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x4c8181,_0x2817be){this['newRevisionId']=_0x4c8181,this['oldRevisionId']=_0x2817be,this['changes']=new _0x5c2418();}['_setChanges'](_0x4851ce){for(const _0x103246 of _0x4851ce)this['changes']['add'](_0x103246);}}class u extends _0x5d9b40{['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[_0x48917f,_0x3e5dc6,S,$];}constructor(_0x2b84d4){super(_0x2b84d4),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',(_0x1eec9a,_0x424de8,_0xd0b855)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2b105f=>{for(const _0x500f79 of this['editor']['editing']['view']['document']['roots'])_0xd0b855?_0x2b105f['removeClass']('ck-editor__editable__overlay',_0x500f79):_0x2b105f['addClass']('ck-editor__editable__overlay',_0x500f79);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x355684=>null!==_0x355684),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x358312,_0x1669ad,_0x1f6edc)=>_0x358312&&_0x1f6edc?_0x1669ad['changes']['getIndex'](_0x1f6edc):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x13e82a,_0x6e6d1a)=>_0x13e82a?_0x6e6d1a['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3e5dc6);}['init'](){const _0x2e85a9=this['editor'],_0x2ca386=new ot(_0x2e85a9,{'direction':'backward'}),_0x5badeb=new ot(_0x2e85a9,{'direction':'forward'});(_0x2e85a9['commands']['add']('showPreviousChange',_0x2ca386),_0x2e85a9['commands']['add']('showNextChange',_0x5badeb),_0x2e85a9['commands']['add']('restoreRevision',new nt(_0x2e85a9)),this['on']('change:numberOfChanges',()=>{_0x2ca386['refresh'](),_0x5badeb['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2e85a9['enableReadOnlyMode']('revision-viewer'),_0x2e85a9['plugins']['has']('WidgetToolbarRepository'))&&_0x2e85a9['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x57f441){return await this['_utils']['loadRevisionData'](_0x57f441,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x57f441);}async['getRevisionRootsAttributes'](_0x4d5384){return await this['_utils']['loadRevisionData'](_0x4d5384,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4d5384);}async['compare'](_0x5b73b8,_0x185d21,_0x34af52=!0x1){if(!this['isEnabled'])return;const _0x3652e8=this['diff'],_0x2da7b9=this['repository'],_0x3c4b51='string'==typeof _0x5b73b8?_0x2da7b9['getRevision'](_0x5b73b8):_0x5b73b8,_0x1a112a='string'==typeof _0x185d21?_0x2da7b9['getRevision'](_0x185d21):_0x185d21,_0x4f8a1d=_0x3c4b51['id'],_0x1ef8f7=_0x1a112a?_0x1a112a['id']:null;if(!_0x34af52&&this['diff']&&this['diff']['newRevisionId']===_0x4f8a1d&&this['diff']['oldRevisionId']===_0x1ef8f7)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x4f8a1d,_0x1ef8f7);const _0x314dd4=this['_getRevisionsRange'](_0x3c4b51,_0x1a112a,!0x0)['map'](_0x136802=>this['_utils']['loadRevisionData'](_0x136802,this['adapter']));return _0x314dd4['push'](new Promise(_0x2d54d6=>{setTimeout(_0x2d54d6,0x14);})),Promise['all'](_0x314dd4)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4cd8b4=this['_getDiff'](_0x4f8a1d,_0x1ef8f7);for(const _0x2a7262 of _0x4cd8b4['changes'])this['_changeIdToChange']['set'](_0x2a7262['id'],_0x2a7262);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x50b07a=>{for(const _0x290815 of this['editor']['model']['document']['getRootNames']())_0x50b07a['detachRoot'](_0x290815);for(const _0x8c7eec of Object['keys'](_0x4cd8b4['model'])){const _0x24245c=_0x50b07a['addRoot'](_0x8c7eec);for(const _0x515b10 of Object['keys'](_0x4cd8b4['attributes'][_0x8c7eec]))_0x50b07a['setAttribute'](_0x515b10,_0x4cd8b4['attributes'][_0x8c7eec][_0x515b10],_0x24245c);_0x50b07a['insert'](_0x4cd8b4['model'][_0x8c7eec],_0x24245c,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4cd8b4['changes'])),this['isReady']=!0x0;})['catch'](_0x3c3ab6=>{console['error'](_0x3c3ab6),this['_cleanUp'](),_0x3652e8&&(this['diff']=_0x3652e8),this['isReady']=!0x0;});}['addRevisionData'](_0x128d3,_0x239249){const _0x4d8d6b=this['repository']['createRevision'](_0x128d3);return _0x4d8d6b['on']('_update',(_0x375320,_0x5aa2d6,_0x5edd42)=>_0x239249(_0x5aa2d6,_0x5edd42,_0x4d8d6b)),this['repository']['addRevision'](_0x4d8d6b),_0x4d8d6b;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1ee409=>{for(const _0x331428 of this['editor']['model']['document']['getRootNames']())_0x1ee409['detachRoot'](_0x331428);});}['_sortAndFilterDiffChanges'](_0x13344a){const _0x21bfc9=[],_0x1cebcd=new Map();for(const _0x27cfe2 of this['editor']['model']['document']['getRootNames']()){const _0x3ea258=this['editor']['editing']['view']['getDomRoot'](_0x27cfe2);if(!_0x3ea258)continue;const _0x1bc45f=_0x3ea258['getClientRects']()['item'](0x0);_0x1bc45f&&(_0x21bfc9['push'](_0x27cfe2),_0x1cebcd['set'](_0x27cfe2,_0x1bc45f));}return _0x21bfc9['sort']((_0x27a5c2,_0x3c1501)=>{const _0x3d14c2=_0x1cebcd['get'](_0x27a5c2),_0x390edf=_0x1cebcd['get'](_0x3c1501);return _0x3d14c2['y']-_0x390edf['y']||_0x3d14c2['x']-_0x390edf['x'];}),(_0x13344a=_0x13344a['filter'](_0x858ad2=>_0x21bfc9['includes'](_0x858ad2['rootName'])))['sort']((_0x123d5e,_0x534daa)=>_0x21bfc9['indexOf'](_0x123d5e['rootName'])-_0x21bfc9['indexOf'](_0x534daa['rootName'])),_0x13344a;}['_makeTape'](_0x37e7a9){const _0x1d030c=Array['from'](_0x37e7a9['markers'])['filter'](([_0x1a7d51,_0x29f2df])=>_0x1a7d51['startsWith']('revision:')&&!_0x29f2df['isCollapsed']),_0x47db79=Array['from'](this['editor']['model']['createRangeIn'](_0x37e7a9)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1d030c['length'])for(const _0x48aa1e of _0x47db79){const [_0x29e023,_0xf604a3]=_0x1d030c[0x0],[,_0x518a07,_0x5670bd]=_0x29e023['split'](':');if(_0xf604a3['end']['isEqual'](_0x48aa1e['nextPosition'])&&_0x1d030c['shift'](),(_0x48aa1e['previousPosition']['isEqual'](_0xf604a3['start'])||_0x48aa1e['previousPosition']['isAfter'](_0xf604a3['start']))&&('insertion'==_0x518a07?_0x48aa1e['isAdded']={'userId':_0x5670bd}:'deletion'==_0x518a07&&(_0x48aa1e['isRemoved']={'userId':_0x5670bd})),0x0==_0x1d030c['length'])break;}return _0x47db79;}['_refreshStartEndIndex'](_0x451ee9){const _0x178e4b=new Map();for(let _0xeccc72=0x0;_0xeccc72<_0x451ee9['length'];_0xeccc72++)'text'===_0x451ee9[_0xeccc72]['type']?(_0x451ee9[_0xeccc72]['item']['startIndex']=_0xeccc72,_0x451ee9[_0xeccc72]['item']['endIndex']=_0xeccc72):('elementStart'===_0x451ee9[_0xeccc72]['type']?_0x451ee9[_0xeccc72]['item']['startIndex']=_0xeccc72:'elementEnd'===_0x451ee9[_0xeccc72]['type']&&(_0x451ee9[_0xeccc72]['item']['endIndex']=_0xeccc72),_0x178e4b['set'](_0x451ee9[_0xeccc72]['id'],_0xeccc72));for(const _0x29fbb5 of _0x178e4b['values']())'elementStart'===_0x451ee9[_0x29fbb5]['type']?_0x451ee9[_0x29fbb5]['item']['endIndex']=_0x178e4b['get'](_0x451ee9[_0x29fbb5]['pairId']):'elementEnd'===_0x451ee9[_0x29fbb5]['type']&&(_0x451ee9[_0x29fbb5]['item']['startIndex']=_0x178e4b['get'](_0x451ee9[_0x29fbb5]['pairId']));}['_processTape'](_0x11425e){for(let _0x237a57=0x0;_0x237a57<_0x11425e['length'];_0x237a57++){if('elementStart'===_0x11425e[_0x237a57]['type'])_0x11425e[_0x237a57]['item']['startIndex']=_0x237a57;else{if('elementEnd'===_0x11425e[_0x237a57]['type']){_0x11425e[_0x237a57]['item']['endIndex']=_0x237a57;const _0x36d24b=_0x11425e[_0x237a57]['item']['startIndex'];_0x11425e[_0x36d24b]['pairId']=_0x11425e[_0x237a57]['id'],_0x11425e[_0x237a57]['pairId']=_0x11425e[_0x36d24b]['id'];}else _0x11425e[_0x237a57]['item']['startIndex']=_0x237a57,_0x11425e[_0x237a57]['item']['endIndex']=_0x237a57,_0x11425e[_0x237a57]['pairId']=null;}_0x11425e[_0x237a57]['markersStart']||(_0x11425e[_0x237a57]['markersStart']=[],_0x11425e[_0x237a57]['markersEnd']=[]);}}['_markInsertions'](_0x5684d3,_0x4454c9){const _0x189cd7=_0x5684d3['filter'](_0x39d043=>!_0x39d043['isAdded']);for(let _0x582de9=0x0;_0x582de9<_0x4454c9['length'];_0x582de9++)_0x4454c9[_0x582de9]['isAdded']&&(_0x189cd7[_0x582de9]['isAdded']=_0x4454c9[_0x582de9]['isAdded']);}['_getDiff'](_0x2101b7,_0x477a4b=null){const _0x5344fa=this['repository']['getRevision'](_0x2101b7),_0xdf0ce9=_0x477a4b?this['repository']['getRevision'](_0x477a4b):null,_0x45d4bd=this['_getRevisionsRange'](_0x5344fa,_0xdf0ce9),_0x42c2fc=_0x45d4bd[_0x45d4bd['length']-0x1],_0xd09205=new Map(),_0x1aec56={'model':{},'attributes':{},'changes':[]},_0x4f4f6e=new Set(),_0x11e99b=new Map();for(let _0xac0b52=_0x45d4bd['length']-0x1;_0xac0b52>=0x0;_0xac0b52--){const _0x16baae=_0x45d4bd[_0xac0b52];for(const _0x603330 of Object['keys'](_0x16baae['diffData']))if(_0x16baae['diffData'][_0x603330]['attachChange']){const _0x1b1ad9=_0x16baae['diffData'][_0x603330]['attachChange'];_0x1b1ad9['isAttached']?(_0x4f4f6e['add'](_0x603330),_0x11e99b['has'](_0x603330)&&_0x11e99b['get'](_0x603330)['userId']==_0x1b1ad9['userId']?_0x11e99b['delete'](_0x603330):_0x11e99b['set'](_0x603330,_0x1b1ad9)):_0x11e99b['has'](_0x603330)?(_0x4f4f6e['delete'](_0x603330),_0x11e99b['delete'](_0x603330)):(_0x4f4f6e['add'](_0x603330),_0x11e99b['set'](_0x603330,_0x1b1ad9));}else _0x4f4f6e['add'](_0x603330);}for(const _0x4d0f4f of _0x4f4f6e){const _0x2c098f=_0x11e99b['has'](_0x4d0f4f)&&!_0x11e99b['get'](_0x4d0f4f)['isAttached'];let _0x21fe50=_0x2c098f?_0x45d4bd['length']-0x1:0x0;const _0x165836=_0x2c098f?-0x1:0x1;for(;_0x45d4bd[_0x21fe50];){const _0x1aa698=_0x45d4bd[_0x21fe50];if(_0x1aa698['diffData'][_0x4d0f4f]){const _0x54550c=_0x2c098f?_0x1aa698['diffData'][_0x4d0f4f]['attributesBefore']:_0x1aa698['diffData'][_0x4d0f4f]['attributesAfter'];_0x1aec56['attributes'][_0x4d0f4f]=_0x54550c?_0x37c447(_0x54550c):{};break;}_0x21fe50+=_0x165836;}}for(const _0x1c2e27 of _0x45d4bd){_0x1c2e27['model']={};for(const _0x5b1fee of _0x1c2e27['authors'])_0xd09205['set'](_0x5b1fee['id'],_0x5b1fee);for(const _0x2f1ad9 of _0x4f4f6e){const _0x1a49e9=_0x1c2e27['diffData'][_0x2f1ad9]?_0x1c2e27['diffData'][_0x2f1ad9]['insertions']:'[]',_0x4a5398=_0x1c2e27['diffData'][_0x2f1ad9]?_0x1c2e27['diffData'][_0x2f1ad9]['deletions']:'[]';_0x1c2e27['model'][_0x2f1ad9]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1a49e9),'deletions':this['_utils']['_makeModelFromViewString'](_0x4a5398)};}}for(const _0x38bf78 of _0x4f4f6e){let _0x1c30d8=null,_0x3af598=0x0;const _0x31dcfd=new Map(Array['from'](_0x5344fa['model'][_0x38bf78]['insertions']['markers'])['filter'](([_0x4a7e00])=>!_0x4a7e00['startsWith']('revision:')));let _0x4cd1c2=0x0;for(const _0x114627 of _0x45d4bd){const _0x4f9174=this['_makeTape'](_0x114627['model'][_0x38bf78]['insertions']);_0x114627==_0x5344fa?(_0x1c30d8=_0x4f9174,_0x3af598=_0x1c30d8['length'],_0x1c30d8['forEach'](_0x165027=>{_0x165027['id']=_0x4cd1c2++;}),this['_processTape'](_0x1c30d8)):this['_markInsertions'](_0x1c30d8,_0x4f9174);const _0x4afc94=_0x1c30d8['filter'](_0x4e37e3=>!_0x4e37e3['isAdded'])['map'](_0x4a8d19=>_0x4a8d19['id']);let _0x2dcba7=0x0;const _0x17fe63=this['_makeTape'](_0x114627['model'][_0x38bf78]['deletions']);_0x17fe63['forEach'](_0x39d27d=>{_0x39d27d['isRemoved']?_0x39d27d['id']=_0x3af598++:_0x39d27d['id']=_0x4afc94[_0x2dcba7++];}),this['_processTape'](_0x17fe63),this['_setDistance'](_0x1c30d8,'isAdded'),this['_setDistance'](_0x17fe63,'isRemoved'),_0x114627==_0x5344fa&&this['_markMarkers'](_0x1c30d8,_0x31dcfd),_0x1c30d8=this['_joinTapes'](_0x1c30d8,_0x17fe63),this['_refreshStartEndIndex'](_0x1c30d8),this['_setDistance'](_0x1c30d8,'isRemoved');}_0x1c30d8=_0x1c30d8['filter'](_0x1a125b=>!(_0x1a125b['isAdded']&&_0x1a125b['isRemoved']));const _0x5849de=new Map(_0x42c2fc['model'][_0x38bf78]['deletions']['markers']),_0x5d3852=new Set(_0x31dcfd['keys']());for(const _0x29db91 of _0x5849de['keys']())_0x5d3852['delete'](_0x29db91);this['_markSuggestions'](_0x1c30d8,_0x5d3852),this['_fixObsoleteTags'](_0x1c30d8),_0x1c30d8=this['_removeMissingPairs'](_0x1c30d8),_0x1c30d8=this['_markMismatchedRemovedTags'](_0x1c30d8),_0x1c30d8=this['_removeUnsupportedChanges'](_0x1c30d8);const {root:_0x2a16ad,changes:_0x3ccc34}=this['_makeModelFromTape'](_0x1c30d8,_0xd09205,_0x38bf78);_0x1aec56['model'][_0x38bf78]=_0x2a16ad;const _0x30ad45=_0x11e99b['get'](_0x38bf78);if(_0x30ad45){const _0x3decab=_0xd09205['get'](_0x30ad45['userId']),_0x3a1c60=new G({'author':_0x3decab,'type':_0x30ad45['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x38bf78});_0x3ccc34['unshift'](_0x3a1c60),_0x1aec56['attributes'][_0x38bf78]['revisionHistoryAttachChange']=_0x3a1c60['id'];}_0x1aec56['changes']=_0x1aec56['changes']['concat'](_0x3ccc34);}return _0x1aec56;}['_markMarkers'](_0x5c0ce2,_0x47fd8a){for(let _0x4a9d4e=0x0;_0x4a9d4e<_0x5c0ce2['length'];_0x4a9d4e++)for(const [_0x518419,_0x455641]of _0x47fd8a)!_0x455641['isCollapsed']&&_0x455641['start']['isEqual'](_0x5c0ce2[_0x4a9d4e]['previousPosition'])&&_0x5c0ce2[_0x4a9d4e]['markersStart']['push'](_0x518419),_0x455641['end']['isEqual'](_0x5c0ce2[_0x4a9d4e]['nextPosition'])&&_0x5c0ce2[_0x4a9d4e]['markersEnd']['push'](_0x518419);}['_joinTapes'](_0x33cc34,_0xd9d7d5){let _0x16bb34=[],_0x2d64a0=0x0,_0x27495f=0x0;for(;_0x2d64a0<_0x33cc34['length']||_0x27495f<_0xd9d7d5['length'];){const _0x485355=_0x33cc34[_0x2d64a0]||{},_0xb8be9b=_0xd9d7d5[_0x27495f]||{};if(_0x485355['id']==_0xb8be9b['id'])_0x2d64a0++,_0x27495f++,_0x16bb34['push'](_0x485355);else{if(_0xb8be9b['isRemoved']&&_0x485355['isAdded']){const {commonTape:_0x1c1dca,iEnd:_0x3a4810,jEnd:_0x31f4bb}=this['_threeWayMerge'](_0x33cc34,_0x2d64a0,_0xd9d7d5,_0x27495f);_0x16bb34=_0x16bb34['concat'](_0x1c1dca),_0x2d64a0=_0x3a4810,_0x27495f=_0x31f4bb;}else _0xb8be9b['isRemoved']?(_0x27495f++,_0x16bb34['push'](_0xb8be9b)):(_0x2d64a0++,_0x16bb34['push'](_0x485355));}}return _0x16bb34;}['_markSuggestions'](_0x1fca32,_0x513c43){const _0x502910=[];for(let _0x46b613=0x0;_0x46b613<_0x1fca32['length'];_0x46b613++){for(let _0x1bfcd2=0x0;_0x1bfcd2<_0x1fca32[_0x46b613]['markersStart']['length'];_0x1bfcd2++){const _0x74dfe9=_0x1fca32[_0x46b613]['markersStart'][_0x1bfcd2];if(!_0x513c43['has'](_0x74dfe9))continue;const {group:_0x12c810,type:_0x415c46,authorId:_0x49a81e}=_0x402910(_0x74dfe9);'revision-suggestion'!=_0x12c810||'insertion'!=_0x415c46&&'deletion'!=_0x415c46||(_0x502910['unshift']({'type':_0x415c46,'name':_0x74dfe9,'userId':_0x49a81e}),_0x1fca32[_0x46b613]['markersStart']['splice'](_0x1bfcd2,0x1),_0x1bfcd2--);}_0x530538(_0x1fca32[_0x46b613]);for(let _0x120fe7=0x0;_0x120fe7<_0x1fca32[_0x46b613]['markersEnd']['length'];_0x120fe7++){const _0x7da715=_0x1fca32[_0x46b613]['markersEnd'][_0x120fe7];if(!_0x513c43['has'](_0x7da715))continue;const {group:_0x3009d2,type:_0x471680}=_0x402910(_0x7da715);if('revision-suggestion'!=_0x3009d2||'insertion'!=_0x471680&&'deletion'!=_0x471680)continue;_0x1fca32[_0x46b613]['markersEnd']['splice'](_0x120fe7,0x1),_0x120fe7--;const _0x58ddf4=_0x502910['findIndex'](_0x51293=>_0x51293['name']==_0x7da715);_0x58ddf4>-0x1&&_0x502910['splice'](_0x58ddf4,0x1);}}function _0x402910(_0xa4273a){const _0x5d9d58=_0xa4273a['split'](':');return{'group':_0x5d9d58[0x0],'type':_0x5d9d58[0x1],'subType':_0x5d9d58['length']>=0x5?_0x5d9d58[0x2]:null,'id':_0x5d9d58['length']<0x5?_0x5d9d58[0x2]:_0x5d9d58[0x3],'authorId':_0x5d9d58['length']<0x5?_0x5d9d58[0x3]:_0x5d9d58[0x4],'markerCount':0x6==_0x5d9d58['length']?_0x5d9d58[0x5]:null};}function _0x530538(_0x563434){for(let _0x1d7fef=0x0;_0x1d7fef<_0x502910['length'];_0x1d7fef++){if(_0x563434['isAdded']&&'insertion'==_0x502910[_0x1d7fef]['type']&&_0x563434['isAdded']['userId']==_0x502910[_0x1d7fef]['userId'])return _0x563434['isAddSuggestion']=_0x502910[_0x1d7fef],void delete _0x563434['isAdded'];if(!_0x563434['isAdded']&&!_0x563434['isRemoved']&&'deletion'==_0x502910[_0x1d7fef]['type'])return void(_0x563434['isRemoveSuggestion']=_0x502910[_0x1d7fef]);}}}['_setDistance'](_0x3b8cba,_0x185fd3){let _0x27de9c=0x0,_0x24390f=!0x1;const _0x358b05=new Map();for(const _0xc6fad0 of _0x3b8cba)_0xc6fad0[_0x185fd3]?_0x24390f&&(_0x27de9c++,_0x24390f=!0x1):(_0x27de9c++,_0x24390f=!0x0),_0x358b05['set'](_0xc6fad0['id'],_0x27de9c);for(let _0x1c5d8d=0x0;_0x1c5d8d<_0x3b8cba['length'];_0x1c5d8d++){if('isRemoved'==_0x185fd3&&_0x3b8cba[_0x1c5d8d]['isAdded']||'isAdded'==_0x185fd3&&_0x3b8cba[_0x1c5d8d]['isRemoved'])continue;if('text'==_0x3b8cba[_0x1c5d8d]['type']){_0x3b8cba[_0x1c5d8d]['distance']=0x0;continue;}const _0x4bc87b=_0x358b05['get'](_0x3b8cba[_0x1c5d8d]['pairId']),_0x2f2f94=_0x358b05['get'](_0x3b8cba[_0x1c5d8d]['id']);_0x3b8cba[_0x1c5d8d]['distance']=_0x4bc87b-_0x2f2f94;}}['_getRevisionsRange'](_0x49d50c,_0x156e18,_0xd99beb=!0x1){const _0x2ab23a=[];let _0x1be0b7=this['repository']['getIndex'](_0x49d50c),_0x5ac359=this['repository']['getIndex'](_0x156e18);for(-0x1==_0x5ac359&&(_0x5ac359=this['repository']['_revisions']['length'],_0xd99beb=!0x1);_0x1be0b7<_0x5ac359;)_0x2ab23a['push'](this['repository']['getRevision'](_0x1be0b7)),_0x1be0b7++;return _0xd99beb&&_0x2ab23a['push'](this['repository']['getRevision'](_0x1be0b7)),_0x2ab23a;}['_threeWayMerge'](_0x40f608,_0x56c006,_0x3f0e26,_0x28914b){const _0x1a60c6=this['editor']['model']['schema'];let _0x47339f=_0x56c006;for(;_0x40f608[_0x47339f]&&_0x40f608[_0x47339f]['isAdded'];)_0x47339f++;let _0x5e9ba3=_0x28914b;for(;_0x3f0e26[_0x5e9ba3]&&_0x3f0e26[_0x5e9ba3]['isRemoved'];)_0x5e9ba3++;_0x224833(_0x40f608,_0x56c006,_0x47339f),_0x224833(_0x3f0e26,_0x28914b,_0x5e9ba3);const _0x579450=_0x3f0e26['slice'](_0x28914b,_0x5e9ba3)['concat'](_0x40f608['slice'](_0x56c006,_0x47339f));return _0x579450['sort']((_0x2faec8,_0x347815)=>_0x2faec8['side']!=_0x347815['side']?_0x2faec8['side']-_0x347815['side']:_0x2faec8['level']!=_0x347815['level']?_0x2faec8['level']-_0x347815['level']:_0x2faec8['distance']!=_0x347815['distance']?_0x347815['distance']-_0x2faec8['distance']:!!_0x2faec8['isAdded']!=!!_0x347815['isAdded']?-0x1==_0x2faec8['side']||0x0==_0x2faec8['side']?_0x2faec8['isAdded']?-0x1:0x1:_0x2faec8['isAdded']?0x1:-0x1:_0x2faec8['index']-_0x347815['index']),{'commonTape':_0x579450,'iEnd':_0x47339f,'jEnd':_0x5e9ba3};function _0x224833(_0xfc68b9,_0x57b62a,_0x4c33b4){let _0x5d0122=-0x1,_0x4991a4=Number['POSITIVE_INFINITY'],_0x2d7236=!0x0;for(let _0x24c872=_0x57b62a;_0x24c872<_0x4c33b4;_0x24c872++)if(_0x1a60c6['isInline'](_0xfc68b9[_0x24c872]['item'])||(_0x2d7236=!0x1),_0xfc68b9[_0x24c872]['item']['startIndex']<_0x57b62a&&(_0x5d0122=_0x24c872),_0xfc68b9[_0x24c872]['item']['endIndex']>=_0x4c33b4){_0x4991a4=_0x24c872;break;}_0x2d7236&&(_0x5d0122=_0x4c33b4-0x1);for(let _0x25327c=_0x57b62a;_0x25327c<_0x4c33b4;_0x25327c++)_0xfc68b9[_0x25327c]['side']=_0x25327c<=_0x5d0122?-0x1:_0x25327c<_0x4991a4?0x0:0x1,_0xfc68b9[_0x25327c]['index']=_0x25327c;let _0x1fada0=0x0;for(let _0x310b7c=_0x57b62a;_0x310b7c<=_0x5d0122;_0x310b7c++)0x0==_0xfc68b9[_0x310b7c]['distance']?_0xfc68b9[_0x310b7c]['level']=_0x1fada0:(_0x1fada0++,_0xfc68b9[_0x310b7c]['level']=_0x1fada0,_0x1fada0++);for(let _0x51690e=_0x57b62a;_0x51690e<_0x4c33b4;_0x51690e++)0x0==_0xfc68b9[_0x51690e]['side']&&(_0xfc68b9[_0x51690e]['level']=_0x1fada0);_0x1fada0=0x0;for(let _0x1739a7=_0x4c33b4-0x1;_0x1739a7>=_0x4991a4;_0x1739a7--)0x0==_0xfc68b9[_0x1739a7]['distance']?_0xfc68b9[_0x1739a7]['level']=_0x1fada0:(_0x1fada0--,_0xfc68b9[_0x1739a7]['level']=_0x1fada0,_0x1fada0--);}}['_fixObsoleteTags'](_0x2bdad1){const _0x346c66=new Map(),_0x226773=this['editor']['model']['schema'];for(let _0x34f1bf=0x1;_0x34f1bf<_0x2bdad1['length'];_0x34f1bf++){let _0x3808ab,_0x804c28,_0x497e0a;const _0x2aee2a=_0x2bdad1[_0x34f1bf],_0xdf4062=_0x2bdad1[_0x34f1bf-0x1];if('text'==_0x2aee2a['type'])continue;if(_0x2aee2a['type']!=_0xdf4062['type'])continue;if(!_0x226773['isBlock'](_0xdf4062['item'])||_0x226773['isLimit'](_0xdf4062['item']))continue;if(!_0x226773['isBlock'](_0x2aee2a['item'])||_0x226773['isLimit'](_0x2aee2a['item']))continue;if((_0x2bdad1[_0x34f1bf]['isAdded']||_0x2bdad1[_0x34f1bf]['isAddSuggestion'])&&_0x2bdad1[_0x34f1bf-0x1]['isRemoved'])_0x3808ab=_0x2bdad1[_0x34f1bf],_0x804c28=_0x2bdad1[_0x34f1bf-0x1],_0x497e0a=_0x34f1bf-0x1;else{if(!_0x2bdad1[_0x34f1bf]['isRemoved']||!_0x2bdad1[_0x34f1bf-0x1]['isAdded']&&!_0x2bdad1[_0x34f1bf-0x1]['isAddSuggestion'])continue;_0x3808ab=_0x2bdad1[_0x34f1bf-0x1],_0x804c28=_0x2bdad1[_0x34f1bf],_0x497e0a=_0x34f1bf;}const _0x150147=_0x3808ab['level']==_0x804c28['level'],_0x3826ca=Math['abs'](_0x3808ab['level'])<Math['abs'](_0x804c28['level'])&&0x0==_0x804c28['distance'];(_0x150147||_0x3826ca)&&(_0x346c66['set'](_0x804c28['id'],_0x3808ab['id']),_0x2bdad1['splice'](_0x497e0a,0x1),_0x34f1bf--,_0x3808ab['isAdded']=!0x1);}for(let _0x5ea761=0x0;_0x5ea761<_0x2bdad1['length'];_0x5ea761++)_0x346c66['has'](_0x2bdad1[_0x5ea761]['pairId'])&&(_0x2bdad1[_0x5ea761]['pairId']=_0x346c66['get'](_0x2bdad1[_0x5ea761]['pairId']));}['_removeMissingPairs'](_0x337e0a){const _0x560305=new Set(_0x337e0a['map'](_0x6dc7f1=>_0x6dc7f1['id']));for(let _0x26aa4d=0x0;_0x26aa4d<_0x337e0a['length'];_0x26aa4d++)_0x560305['has'](_0x337e0a[_0x26aa4d]['pairId'])||0x0==_0x337e0a[_0x26aa4d]['distance']||(_0x337e0a[_0x26aa4d]['isIncorrect']=!0x0);return _0x337e0a['filter'](_0x5e5dd6=>!_0x5e5dd6['isIncorrect']);}['_markMismatchedRemovedTags'](_0x40d3c9){const _0xb1c7d4=new Set();for(let _0x42d6ab=0x0;_0x42d6ab<_0x40d3c9['length'];_0x42d6ab++){if(_0xb1c7d4['has'](_0x40d3c9[_0x42d6ab]['id'])&&_0x40d3c9[_0x42d6ab]['isRemoved']&&(_0x40d3c9[_0x42d6ab]['isIncorrect']=!0x0),_0x40d3c9[_0x42d6ab]['isIncorrect'])continue;if(0x0==_0x40d3c9[_0x42d6ab]['distance'])continue;if('elementStart'!=_0x40d3c9[_0x42d6ab]['type'])continue;if(null==_0x40d3c9[_0x42d6ab]['pairId'])continue;let _0x1b321a=_0x42d6ab+0x1,_0x30db3f=0x0;for(;_0x40d3c9[_0x1b321a]['id']!=_0x40d3c9[_0x42d6ab]['pairId'];)'elementStart'==_0x40d3c9[_0x1b321a]['type']?_0x30db3f++:'elementEnd'==_0x40d3c9[_0x1b321a]['type']&&_0x30db3f--,_0x1b321a++;if(0x0!=_0x30db3f){if(_0x40d3c9[_0x42d6ab]['isRemoved'])_0x40d3c9[_0x42d6ab]['isIncorrect']=!0x0;else{for(;_0x1b321a!=_0x42d6ab;)_0x40d3c9[_0x1b321a]['isRemoved']&&0x0!=_0x40d3c9[_0x1b321a]['distance']&&(_0x40d3c9[_0x1b321a]['isIncorrect']=!0x0,_0xb1c7d4['add'](_0x40d3c9[_0x1b321a]['pairId'])),_0x1b321a--;}}}return _0x40d3c9['filter'](_0x2b9305=>!_0x2b9305['isIncorrect']);}['_removeUnsupportedChanges'](_0x371956){const _0x2cc526=this['editor']['model']['schema'];for(let _0x1908e4=0x0;_0x1908e4<_0x371956['length'];_0x1908e4++){if(!(_0x371956[_0x1908e4]['isAdded']||_0x371956[_0x1908e4]['isAddSuggestion']||_0x371956[_0x1908e4]['isRemoved']||_0x371956[_0x1908e4]['isRemoveSuggestion']))continue;if(0x0==_0x371956[_0x1908e4]['distance'])continue;const _0xfc4e3b=_0x371956[_0x1908e4]['item'];_0x2cc526['isBlock'](_0xfc4e3b)||_0x2cc526['isLimit'](_0xfc4e3b)||(_0x371956[_0x1908e4]['isAdded']&&delete _0x371956[_0x1908e4]['isAdded'],_0x371956[_0x1908e4]['isAddSuggestion']&&delete _0x371956[_0x1908e4]['isAddSuggestion'],_0x371956[_0x1908e4]['isRemoveSuggestion']&&delete _0x371956[_0x1908e4]['isRemoveSuggestion'],_0x371956[_0x1908e4]['isRemoved']&&(_0x371956[_0x1908e4]['isIncorrect']=!0x0));}return _0x371956['filter'](_0x506791=>!_0x506791['isIncorrect']);}['_makeModelFromTape'](_0x1e86a7,_0xdfa3dc,_0x4d5161){const _0x506df4=new _0x1eaa31(),_0x5598e6=[],_0x3a7f5c=new Map(),_0x35a0bc=this['editor']['model'],_0x54eaee=_0x35a0bc['schema'],_0x3a753b=[_0x506df4],_0x44bc90={},_0x222d27={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x15222a=null;const _0x8c0f33=[0x0];for(let _0x263260=0x0;_0x263260<_0x1e86a7['length'];_0x263260++)if('elementStart'===_0x1e86a7[_0x263260]['type']){_0x1e86a7[_0x263260]['previousPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33);const _0x420e07=new _0x5e7691(_0x1e86a7[_0x263260]['item']['name'],_0x1e86a7[_0x263260]['item']['getAttributes']());_0x3a753b[0x0]['_appendChild'](_0x420e07),_0x8c0f33['push'](0x0),_0x3a753b['unshift'](_0x420e07),_0x1e86a7[_0x263260]['nextPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33);}else'elementEnd'===_0x1e86a7[_0x263260]['type']?(_0x3a753b['shift'](),_0x1e86a7[_0x263260]['previousPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33),_0x8c0f33['pop'](),_0x8c0f33[_0x8c0f33['length']-0x1]++,_0x1e86a7[_0x263260]['nextPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33)):(_0x1e86a7[_0x263260]['previousPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33),_0x15222a?_0x15222a['_data']+=_0x1e86a7[_0x263260]['item']['data']:_0x15222a=new _0x125fca(_0x1e86a7[_0x263260]['item']['data'],_0x1e86a7[_0x263260]['item']['getAttributes']()),_0x1e86a7[_0x263260+0x1]&&'text'===_0x1e86a7[_0x263260+0x1]['type']&&_0x9dcbe(_0x15222a,_0x1e86a7[_0x263260+0x1]['item'])||(_0x3a753b[0x0]['_appendChild'](_0x15222a),_0x15222a=null),_0x8c0f33[_0x8c0f33['length']-0x1]+=_0x1e86a7[_0x263260]['item']['offsetSize'],_0x1e86a7[_0x263260]['nextPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33));for(let _0x27b45f=0x0;_0x27b45f<_0x1e86a7['length'];_0x27b45f++){const _0xac664e=_0x1e86a7[_0x27b45f]['previousPosition'],_0x2ec465=_0x1e86a7[_0x27b45f]['nextPosition'];for(const _0x175514 of _0x1e86a7[_0x27b45f]['markersStart'])_0x3a7f5c['set'](_0x175514,{'start':_0xac664e,'end':null});_0xdabc29('isRemoveSuggestion',_0x27b45f,_0xac664e,_0x2ec465),_0xdabc29('isAddSuggestion',_0x27b45f,_0xac664e,_0x2ec465),_0xdabc29('isRemoved',_0x27b45f,_0xac664e,_0x2ec465),_0xdabc29('isAdded',_0x27b45f,_0xac664e,_0x2ec465);for(const _0x1d3f03 of _0x1e86a7[_0x27b45f]['markersEnd']){const _0x4e461d=_0x3a7f5c['get'](_0x1d3f03);_0x4e461d?_0x4e461d['end']=_0x2ec465:_0x3a7f5c['set'](_0x1d3f03,{'start':_0x2ec465,'end':_0x2ec465});}}for(const [_0x34f09e,_0x1c4c08]of _0x3a7f5c){const _0x573077=this['editor']['model']['createRange'](_0x1c4c08['start'],_0x1c4c08['end']);_0x506df4['markers']['set'](_0x34f09e,_0x573077);}return _0x5598e6['sort']((_0x375063,_0x44905d)=>{const _0x42b06c=_0x506df4['markers']['get']('revision:'+_0x375063['id']),_0x5de2be=_0x506df4['markers']['get']('revision:'+_0x44905d['id']);return _0x42b06c['start']['isBefore'](_0x5de2be['start'])?-0x1:_0x42b06c['start']['isAfter'](_0x5de2be['start'])?0x1:_0x42b06c['end']['isBefore'](_0x5de2be['end'])?-0x1:_0x42b06c['end']['isAfter'](_0x5de2be['end'])?0x1:'add'===_0x375063['type']?-0x1:0x1;}),{'root':_0x506df4,'changes':_0x5598e6};function _0xdabc29(_0xdc4e8d,_0x5ed847,_0x22a2e4,_0x411b63){const _0x40c143=!!_0x1e86a7[_0x5ed847][_0xdc4e8d],_0x3cfe51=_0x40c143?_0x1e86a7[_0x5ed847][_0xdc4e8d]['userId']:null,_0x2074fa=_0x5ed847===_0x1e86a7['length']-0x1,_0x493a80=_0x222d27[_0xdc4e8d][0x0],_0x42701d=_0x54eaee['isObject'](_0x1e86a7[_0x5ed847]['item']);!_0x44bc90[_0xdc4e8d]&&_0x40c143?_0x44bc90[_0xdc4e8d]={'start':_0x22a2e4,'tapeItem':_0x1e86a7[_0x5ed847],'userId':_0x3cfe51,'type':_0xdc4e8d}:_0x44bc90[_0xdc4e8d]&&!_0x40c143?(_0x44bc90[_0xdc4e8d]['end']=_0x22a2e4,_0xc99c2e(_0x44bc90[_0xdc4e8d]),_0x44bc90[_0xdc4e8d]=null):_0x44bc90[_0xdc4e8d]&&_0x40c143&&_0x44bc90[_0xdc4e8d]['userId']!==_0x3cfe51&&(_0x44bc90[_0xdc4e8d]['end']=_0x22a2e4,_0x493a80&&_0x493a80['userId']===_0x44bc90[_0xdc4e8d]['userId']||_0xc99c2e(_0x44bc90[_0xdc4e8d]),_0x44bc90[_0xdc4e8d]={'start':_0x22a2e4,'tapeItem':_0x1e86a7[_0x5ed847],'userId':_0x3cfe51,'type':_0xdc4e8d}),_0x44bc90[_0xdc4e8d]&&_0x42701d&&('elementStart'!==_0x1e86a7[_0x5ed847]['type']||_0x493a80&&_0x493a80['userId']===_0x3cfe51||_0x222d27[_0xdc4e8d]['unshift']({'userId':_0x3cfe51,'object':_0x1e86a7[_0x5ed847]['item'],'change':_0x44bc90[_0xdc4e8d]}),'elementEnd'===_0x1e86a7[_0x5ed847]['type']&&_0x493a80&&_0x493a80['object']===_0x1e86a7[_0x5ed847]['item']&&(_0x222d27[_0xdc4e8d]['shift'](),_0x44bc90[_0xdc4e8d]=_0x493a80['change'])),_0x44bc90[_0xdc4e8d]&&_0x2074fa&&(_0x44bc90[_0xdc4e8d]['end']=_0x411b63,_0xc99c2e(_0x44bc90[_0xdc4e8d]),_0x44bc90[_0xdc4e8d]=null);}function _0xc99c2e({start:_0x3bd8a9,end:_0x4c3d45,tapeItem:_0x37cb6c,userId:_0x59c0e9,type:_0x4971e1}){const _0x4340ce=_0x37cb6c['item'],_0x422545=_0x35a0bc['schema']['isBlock'](_0x4340ce)&&!_0x35a0bc['schema']['isLimit'](_0x4340ce),_0x1d754d=_0x3bd8a9['nodeAfter']==_0x4c3d45['parent']&&_0x4c3d45['isAtStart'];if(_0x422545&&_0x1d754d)return;const _0x5c5c6f=_0x35a0bc['createRange'](_0x3bd8a9,_0x4c3d45),_0x421604=_0xdfa3dc['get'](_0x59c0e9),_0x126de3=new G({'author':_0x421604,'type':'isAdded'==_0x4971e1||'isAddSuggestion'==_0x4971e1?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4971e1||'isRemoveSuggestion'==_0x4971e1},'createdAt':new Date(),'rootName':_0x4d5161});_0x5598e6['push'](_0x126de3),_0x506df4['markers']['set']('revision:'+_0x126de3['id'],_0x5c5c6f);}function _0x9dcbe(_0xad2516,_0x128b5b){const _0x5114c0=_0xad2516['getAttributes'](),_0x451674=_0x128b5b['getAttributes']();for(const _0xeee353 of _0x5114c0){if(_0xeee353[0x1]!==_0x128b5b['getAttribute'](_0xeee353[0x0]))return!0x1;_0x451674['next']();}return _0x451674['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x35b24a=>{const _0x1d8775=_0x35b24a['markerName']['split'](':')[0x1],_0x64e091=this['_getChangeFromId'](_0x1d8775);if(!_0x64e091)return null;const _0x452a3b='add'==_0x64e091['type']?'insertion':'deletion',_0x2da98e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x452a3b];return _0x64e091['data']['isSuggestion']&&_0x2da98e['push']('ck-suggestion-marker-'+_0x452a3b+'-new'),this['activeChange']==_0x64e091&&_0x2da98e['push']('ck-suggestion-marker--active'),{'classes':_0x2da98e,'attributes':{'data-change-id':_0x1d8775}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x34e00f=>{_0x34e00f['on']('element:pre',(_0x19db38,_0x28c9c8,_0x5b3ff0)=>{const _0x3f36d3=_0x28c9c8['viewItem']['getChild'](0x0);if(!_0x3f36d3||!_0x3f36d3['is']('element','code'))return;if(!_0x5b3ff0['consumable']['consume'](_0x3f36d3,{'attributes':['vid_start','vid_end']}))return;const _0x1121ef=_0x28c9c8['modelRange']['start']['nodeAfter'];_0x5b3ff0['writer']['setAttribute']('vid_start',_0x3f36d3['getAttribute']('vid_start'),_0x1121ef),_0x5b3ff0['writer']['setAttribute']('vid_end',_0x3f36d3['getAttribute']('vid_end'),_0x1121ef);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x19f2b6=>{_0x19f2b6['on']('element',(_0x519dfa,_0x4dec3f,_0xcc3bc7)=>{if(!_0xcc3bc7['consumable']['consume'](_0x4dec3f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4dec3f['modelRange']['isCollapsed'])return;const _0x360ebf=_0x4dec3f['modelRange']['start']['nodeAfter'];_0x360ebf['hasAttribute']('vid_start')||_0x360ebf['hasAttribute']('vid')||(_0xcc3bc7['writer']['setAttribute']('vid_start',_0x4dec3f['viewItem']['getAttribute']('vid_start'),_0x360ebf),_0xcc3bc7['writer']['setAttribute']('vid_end',_0x4dec3f['viewItem']['getAttribute']('vid_end'),_0x360ebf));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x375ca1=>_0x375ca1['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x213a60,[,_0x2000bf])=>{['vid_start','vid_end','vid']['includes'](_0x2000bf)&&(_0x213a60['return']=!0x0,_0x213a60['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x30315c=>{_0x30315c['on']('attribute:vid',(_0x1ef825,_0x3c268d,_0x3c8e6e)=>{if('\x20'!=_0x3c268d['item']['data']||_0x3c268d['item']['parent']['maxOffset']>0x1)return;if(!_0x3c8e6e['consumable']['consume'](_0x3c268d['item'],_0x1ef825['name']))return;const _0x4ce2a1=_0x3c8e6e['writer'],_0xacc17f=_0x3c8e6e['mapper']['toViewRange'](_0x3c268d['range']);_0x4ce2a1['wrap'](_0xacc17f,_0x4ce2a1['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4dbed2){const _0x1ae898=_0x4dbed2['plugins']['get']('RevisionViewer');return(_0x14c777,_0x25e263,_0x2ea72e)=>{const _0x549d50=_0x25e263['markerName']['split'](':')[0x1],_0x3ce8e0=_0x1ae898['_getChangeFromId'](_0x549d50);if(!_0x3ce8e0)return null;const _0x10f609='add'==_0x3ce8e0['type']?'split':'merge';if(!_0x2ea72e['consumable']['test'](_0x25e263['markerRange'],_0x14c777['name']))return;const _0x525c0c=_0x25e263['markerRange']['getWalker'](),_0x3f285f=_0x25e263['markerRange']['start'],_0x5cdea5=_0x4dbed2['model']['schema'];let _0x70f374=null,_0xd1d9be=null,_0x1bf192=!0x1,_0xb3f4c7=!0x1;for(const _0x381e05 of _0x525c0c){const _0x4bec0e=_0x381e05['item'];_0x1bf192=_0x1bf192||_0x5cdea5['isContent'](_0x4bec0e);const _0x3a49ac=_0x2ea72e['mapper']['toViewElement'](_0x4bec0e);if(_0x3a49ac&&_0x3a49ac['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x381e05['type']&&(_0x5cdea5['isBlock'](_0x4bec0e)&&!_0x5cdea5['isLimit'](_0x4bec0e)&&(_0x4bec0e['nextSibling']||_0x3f285f['isAtEnd']?_0x70f374&&_0x70f374['parent']==_0x4bec0e||(_0x70f374=_0x4bec0e,_0x5e7a5b(_0x381e05['previousPosition']),_0xb3f4c7=!0x0):_0xd1d9be=_0xd1d9be||_0x381e05['previousPosition']));}function _0x5e7a5b(_0xacfa56){const _0x1ffea1=_0x2ea72e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x10f609}),_0x354306=_0x2ea72e['mapper']['toViewPosition'](_0xacfa56);_0x3ce8e0['data']['isSuggestion']&&_0x2ea72e['writer']['addClass']('ck-suggestion-marker-'+_0x10f609+'-new',_0x1ffea1),_0x1ae898['activeChange']==_0x3ce8e0&&_0x2ea72e['writer']['addClass']('ck-suggestion-marker--active',_0x1ffea1),_0x2ea72e['writer']['insert'](_0x354306,_0x1ffea1),_0x2ea72e['mapper']['bindElementToMarker'](_0x1ffea1,_0x25e263['markerName']);}_0x1bf192||_0xb3f4c7||!_0xd1d9be||_0x5e7a5b(_0xd1d9be);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x281433,_0x53f5f0,_0x3fc612)=>{const _0x3688f4=_0x3fc612['mapper']['markerNameToElements'](_0x53f5f0['markerName']);if(_0x3688f4){for(const _0x15c076 of _0x3688f4)(_0x15c076['hasClass']('ck-suggestion-marker-split')||_0x15c076['hasClass']('ck-suggestion-marker-merge'))&&(_0x3fc612['mapper']['unbindElementFromMarkerName'](_0x15c076,_0x53f5f0['markerName']),_0x3fc612['writer']['remove'](_0x15c076));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4b6e55,_0x30131e,_0x3b4fd3)=>{const _0x844903=_0x30131e['markerName']['split'](':')[0x1],_0xfc384f=this['_getChangeFromId'](_0x844903);if(!_0xfc384f)return null;const _0x3fd856='add'==_0xfc384f['type']?'split':'merge';if(_0x3b4fd3['consumable']['test'](_0x30131e['markerRange'],_0x4b6e55['name']))for(const _0x3537b1 of _0x30131e['markerRange']['getItems']()){if(!_0x3537b1['is']('element','softBreak'))continue;const _0x33699a=_0x3b4fd3['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3fd856}),_0x474891=_0x3b4fd3['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3537b1));_0xfc384f['data']['isSuggestion']&&_0x3b4fd3['writer']['addClass']('ck-suggestion-marker-'+_0x3fd856+'-new',_0x33699a),this['activeChange']==_0xfc384f&&_0x3b4fd3['writer']['addClass']('ck-suggestion-marker--active',_0x33699a),_0x3b4fd3['writer']['insert'](_0x474891,_0x33699a),_0x3b4fd3['mapper']['bindElementToMarker'](_0x33699a,_0x30131e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2e5cea=>{for(const _0x58df03 of this['editor']['model']['document']['getRootNames']()){const _0x388f12=this['editor']['model']['document']['getRoot'](_0x58df03),_0x37c1d6=this['editor']['editing']['view']['document']['getRoot'](_0x58df03);if(_0x37c1d6){const _0xef9f33=_0x388f12['getAttribute']('revisionHistoryAttachChange');if(_0x2e5cea['removeAttribute']('data-change-id',_0x37c1d6),_0x2e5cea['removeClass']('ck-revision-history-root-add',_0x37c1d6),_0x2e5cea['removeClass']('ck-revision-history-root-remove',_0x37c1d6),_0x2e5cea['removeClass']('ck-revision-history-root--active',_0x37c1d6),_0xef9f33){const _0x583908=this['_getChangeFromId'](_0xef9f33);if(!_0x583908)return null;_0x2e5cea['setAttribute']('data-change-id',_0xef9f33,_0x37c1d6),_0x2e5cea['addClass']('ck-revision-history-root-'+_0x583908['type'],_0x37c1d6),this['activeChange']==_0x583908&&_0x2e5cea['addClass']('ck-revision-history-root--active',_0x37c1d6);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x12eba8=>'revision-comment:'+_0x12eba8,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xa973b0=>'revision-suggestion:'+_0xa973b0,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x921227=>({'name':'suggestion:'+_0x921227,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3919c8=>{const _0xeb5a99=_0x3919c8['markerName']['split'](':')[0x1];return'insertion'!=_0xeb5a99&&'deletion'!=_0xeb5a99?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0xeb5a99]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x563e6e,_0x5b6167,_0x1bb87b)=>{const _0x5a2a04=_0x1bb87b['mapper']['markerNameToElements'](_0x5b6167['markerName']);if(_0x5a2a04){for(const _0x4f44f5 of _0x5a2a04)_0x4f44f5['is']('uiElement')&&(_0x1bb87b['mapper']['unbindElementFromMarkerName'](_0x4f44f5,_0x5b6167['markerName']),_0x1bb87b['writer']['remove'](_0x4f44f5));}},{'priority':'high'});}['_getChangeFromId'](_0x2ea6bd){return this['_changeIdToChange']['get'](_0x2ea6bd);}['_getViewForChange'](_0x3ec936){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x3ec936),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x539da4,_0x496c9a,_0x3dedbe,_0x1be0c2)=>{_0x1be0c2&&this['_balloon']['remove'](_0x1be0c2),_0x3dedbe&&(this['_balloon']['add']({'view':_0x3dedbe,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2618f1=this['editor']['editing'],_0x1eaf92=this['_getChangeFromId'](_0x3dedbe['changeId']);let _0x57cd20;if(_0x1eaf92['data']['isOnRoot']){const _0x1ec134=_0x2618f1['view']['getDomRoot'](_0x1eaf92['rootName']);_0x57cd20=Array['from'](_0x1ec134['getClientRects']());}else{const _0x724a5a=this['editor']['model']['markers']['get']('revision:'+_0x3dedbe['changeId']);_0x57cd20=Array['from'](_0x2618f1['mapper']['markerNameToElements'](_0x724a5a['name']))['map'](_0x5c92be=>_0x2618f1['view']['domConverter']['mapViewToDom'](_0x5c92be))['map'](_0x47c402=>Array['from'](_0x47c402['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x57cd20[0x0];return _0x57cd20['find'](_0x4a27de=>_0x4a27de['top']-0x3<=this['_activeViewTarget']['y']&&_0x4a27de['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4a27de['left']-0x3<=this['_activeViewTarget']['x']&&_0x4a27de['right']+0x3>=this['_activeViewTarget']['x'])||_0x57cd20[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5c3719,_0x5aa178,_0x35589d,_0x20022a)=>{this['activeView']=_0x35589d?this['_getViewForChange'](_0x35589d):null,this['editor']['model']['change'](()=>{const _0xfd4024=this['editor']['editing'];_0x20022a&&(_0x20022a['data']['isOnRoot']?_0xfd4024['view']['change'](_0xd589c4=>{_0xd589c4['removeClass']('ck-revision-history-root--active',_0xfd4024['view']['document']['getRoot'](_0x20022a['rootName']));}):_0xfd4024['reconvertMarker']('revision:'+_0x20022a['id'])),_0x35589d&&(_0x35589d['data']['isOnRoot']?_0xfd4024['view']['change'](_0x15f52f=>{_0x15f52f['addClass']('ck-revision-history-root--active',_0xfd4024['view']['document']['getRoot'](_0x35589d['rootName']));}):_0xfd4024['reconvertMarker']('revision:'+_0x35589d['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3d6ba1,_0x12bff4)=>{if(this['activeChange'])return;const _0x4451d6=this['_findChangeIdFromDomTarget'](_0x12bff4['target']),_0x51825a=this['_changeIdToChange']['get'](_0x4451d6);_0x51825a?(this['_activeViewTarget']={'x':_0x12bff4['domEvent']['x'],'y':_0x12bff4['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x51825a)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3aa284,_0xf4a803)=>{const _0x5d409c=this['_findChangeIdFromDomTarget'](_0xf4a803['target']),_0x502ef3=this['_changeIdToChange']['get'](_0x5d409c);_0x502ef3?(this['_activeViewTarget']={'x':_0xf4a803['domEvent']['x'],'y':_0xf4a803['domEvent']['y']},_0x502ef3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x502ef3):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x42aad3){do{const _0x81dc89=_0x42aad3['getAttribute']('data-change-id');if(_0x81dc89)return _0x81dc89;_0x42aad3=_0x42aad3['parent'];}while(_0x42aad3);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x502fe4=>{for(const _0x286db5 of this['editor']['model']['markers'])_0x502fe4['removeMarker'](_0x286db5);});}}function Q(_0x274191,_0x1d0e7c){return(_0x183f5f,_0x3bcdae,_0x3c816c)=>{if(!_0x3c816c['consumable']['test'](_0x3bcdae['markerRange'],_0x183f5f['name']))return;const _0x5f1d1b=_0x3bcdae['markerRange']['getWalker'](),_0x3db5e1=_0x3bcdae['markerRange']['start'],_0x21bd27=_0x274191['model']['schema'];let _0x3091d7=null,_0x4f2995=null,_0x52ae6d=!0x1,_0x252ad0=!0x1;for(const _0x2616dc of _0x5f1d1b){const _0x294e87=_0x2616dc['item'];_0x52ae6d=_0x52ae6d||_0x21bd27['isContent'](_0x294e87);const _0x6404e1=_0x3c816c['mapper']['toViewElement'](_0x294e87);if(_0x6404e1&&_0x6404e1['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2616dc['type']&&(_0x21bd27['isBlock'](_0x294e87)&&!_0x21bd27['isLimit'](_0x294e87)&&(_0x294e87['nextSibling']||_0x3db5e1['isAtEnd']?_0x3091d7&&_0x3091d7['parent']==_0x294e87||(_0x3091d7=_0x294e87,_0x3184d9(_0x2616dc['previousPosition']),_0x252ad0=!0x0):_0x4f2995=_0x4f2995||_0x2616dc['previousPosition']));}function _0x3184d9(_0x31fd0b){const _0x28e93c=_0x3c816c['mapper']['toViewPosition'](_0x31fd0b),_0xf2855a=_0x3c816c['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1d0e7c});_0x3c816c['writer']['insert'](_0x28e93c,_0xf2855a),_0x3c816c['mapper']['bindElementToMarker'](_0xf2855a,_0x3bcdae['markerName']);}_0x52ae6d||_0x252ad0||!_0x4f2995||_0x3184d9(_0x4f2995);};}class nt extends _0x170f10{constructor(_0xb7f38e){super(_0xb7f38e);const _0x2d2360=_0xb7f38e['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x2d2360,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2d2360,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x1396da=this['editor'],_0x1f62a1=_0x1396da['plugins']['get'](u),_0x29fead=_0x1f62a1['isReady']?_0x1f62a1['diff']['newRevisionId']:null;_0x1396da['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x29fead);}['refresh'](){const {isReady:_0x16341e,isEnabled:_0x324f9f,repository:_0x18d7a4,diff:_0x1fb01c}=this['editor']['plugins']['get'](u),_0xfe8ab5=_0x1fb01c&&_0x18d7a4['getLaterVisibleRevision'](_0x1fb01c['newRevisionId']);this['isEnabled']=_0x16341e&&_0x324f9f&&Boolean(_0xfe8ab5);}}class ot extends _0x170f10{['_step'];constructor(_0x466cd6,{direction:_0x2ea7eb}){super(_0x466cd6);const _0x2b7322=_0x466cd6['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x2ea7eb?0x1:-0x1,this['listenTo'](_0x2b7322,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2b7322,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2b7322,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3f5c65=this['editor'],_0x21c4f6=_0x3f5c65['plugins']['get'](u),{isNavigationMode:_0x330ef5,currentChangeNumber:_0x4cfb6d}=_0x21c4f6;let _0x2eccc3;if(_0x21c4f6['activeChange']=_0x330ef5?_0x21c4f6['diff']['changes']['get'](_0x4cfb6d+this['_step']):_0x21c4f6['diff']['changes']['first'],_0x21c4f6['activeChange']['data']['isOnRoot'])_0x2eccc3=_0x3f5c65['editing']['view']['getDomRoot'](_0x21c4f6['activeChange']['rootName']);else{const _0x10e802=_0x3f5c65['model']['markers']['get']('revision:'+_0x21c4f6['activeChange']['id']);_0x2eccc3=_0x4cd219(_0x3f5c65['editing'],_0x10e802);}_0x511ff8({'target':_0x2eccc3,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x1aaeac,currentChangeNumber:_0x2ce680,numberOfChanges:_0x4b591a,isReady:_0x96ffeb,isEnabled:_0x57d4a6}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x57d4a6&&_0x96ffeb&&_0x4b591a)&&(!_0x1aaeac||(0x1===this['_step']?_0x2ce680<_0x4b591a-0x1:_0x2ce680>0x0));}}class xi extends _0x23ebf3{constructor(_0x1eaff9){super(_0x1eaff9);const _0x54b42a=this['bindTemplate'],_0x21fa7a=new _0x25e13b(_0x1eaff9),_0x4619b2=new _0x25e13b(_0x1eaff9);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',(_0x3f54c5,_0x4c7987)=>_0x3f54c5&&_0x4c7987>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x183373,_0x245f24,_0x2f11ac,_0x148e17)=>{if(!_0x183373)return m(_0x1eaff9,'Loading...');if(!_0x2f11ac)return m(_0x1eaff9,'No\x20changes');const _0x586beb=m(_0x1eaff9,'NUMBER_OF_CHANGES',_0x2f11ac);return _0x148e17?m(_0x1eaff9,'X_OF_Y_CHANGES',[_0x245f24+0x1,_0x2f11ac]):_0x586beb;}),_0x21fa7a['set']({'label':m(_0x1eaff9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x17ec06}),_0x4619b2['set']({'label':m(_0x1eaff9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x395705}),_0x21fa7a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4619b2['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x21fa7a['on']('execute',()=>this['fire']('execute','backward')),_0x4619b2['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',_0x54b42a['if']('_isStatusLabelVisible','ck-hidden',_0x534052=>!_0x534052)]},'children':[{'text':_0x54b42a['to']('isNavigationMode',_0x324aa8=>_0x324aa8?m(_0x1eaff9,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x1eaff9,'Total')+':\x20')}]},{'text':_0x54b42a['to']('_statusText')}]},new _0x48fedf(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x21fa7a,_0x4619b2]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0x5d9b40{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x376faa=this['editor']['editing']['view'];_0x376faa['change'](_0x14a8a8=>{for(const _0x23b24a of _0x376faa['document']['roots'])_0x14a8a8['addClass'](ge,_0x23b24a);});}['hide'](){const _0x2a082c=this['editor']['editing']['view'];_0x2a082c['change'](_0x321666=>{for(const _0x35516d of _0x2a082c['document']['roots'])_0x321666['removeClass'](ge,_0x35516d);});}}class v extends _0x5d9b40{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,Ri];}['init'](){const _0x27812b=this['editor'],_0x391919=_0x27812b['plugins']['get'](u),_0x2d8770=_0x27812b['plugins']['get'](Ri);_0x27812b['ui']['componentFactory']['add']('exitToEditing',_0x756244=>{const _0x4ae77a=new _0x25e13b(_0x756244);return _0x4ae77a['set']({'label':m(_0x756244,'Back\x20to\x20editing'),'icon':_0x2e404c,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x4ae77a,'execute',()=>{_0x27812b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x4ae77a;}),_0x27812b['ui']['componentFactory']['add']('restoreRevision',_0x980f4c=>{const _0x1a76af=new _0x25e13b(_0x980f4c);return _0x1a76af['set']({'label':m(_0x980f4c,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1a76af['bind']('isEnabled')['to'](_0x27812b['commands']['get']('restoreRevision')),this['listenTo'](_0x1a76af,'execute',()=>_0x27812b['execute']('restoreRevision')),_0x1a76af;}),_0x27812b['ui']['componentFactory']['add']('changesNavigation',_0x2dcd33=>{const _0x3f287e=new xi(_0x2dcd33),_0x140053=_0x27812b['commands']['get']('showPreviousChange'),_0x123fe4=_0x27812b['commands']['get']('showNextChange');return _0x3f287e['bind']('isBackwardNavigationEnabled')['to'](_0x140053,'isEnabled'),_0x3f287e['bind']('isForwardNavigationEnabled')['to'](_0x123fe4,'isEnabled'),_0x3f287e['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x391919),this['listenTo'](_0x3f287e,'execute',(_0x105a8d,_0x149b11)=>{_0x27812b['execute']('forward'===_0x149b11?'showNextChange':'showPreviousChange');}),_0x3f287e;}),_0x2d8770['show'](),_0x391919['on']('change:isReady',(_0x3daae8,_0xae823d,_0x34ade4)=>{_0x34ade4?_0x2d8770['hide']():_0x2d8770['show']();});}}class _i extends ti{['_resizeObserver']=null;constructor(_0x3c56dc,_0x2d7578){super(_0x3c56dc,_0x2d7578);const _0x2c2070=this['bindTemplate'];this['set']({'label':m(_0x3c56dc,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x3c56dc,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x2c2070['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new et(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4c015e=this['fieldView']['element'];this['_tooltipString']=_0x4c015e['scrollWidth']>_0x4c015e['clientWidth']&&_0x4c015e['value']||'';}}class bi extends _0x23ebf3{constructor(_0xa0a00e,_0x3fd324,_0xb5e7e5){super(_0xa0a00e);const _0x25b37c=new _0x212a7e();_0x25b37c['set']({'content':_0x3ea8ae,'viewBox':'0\x200\x2011\x2010'});const _0x4814f1=['ck','ck-revision-history-sidebar__revision-author'];_0xb5e7e5&&_0x4814f1['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3ca4ad=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0xa0a00e,_0xb5e7e5?'Revision\x20creator':'Revision\x20author')},'children':[_0x25b37c,_0x3fd324['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4814f1},'children':_0x3ca4ad});}}function ki(_0x45cd01,_0x14fb30){const _0x5c9ad7=_0x45cd01['bindTemplate'],_0x4a198a=_0x45cd01['locale'],_0x2e3dfb=_0x1f2a8d(_0x4a198a);_0x2e3dfb['panelPosition']='sw';const _0x1af1c9=function(_0x5c6afd,_0x52c22f){const _0x8699b0=function(_0x1399dc,_0xe3d31f){const _0x578524=_0x1399dc['locale'],_0x321e67={'Compare\x20against\x20selected':m(_0x578524,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x578524,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x578524,'Restore\x20this\x20revision')};return _0xe3d31f['map'](_0x2313e7=>{const _0x47a387=_0x321e67[_0x2313e7['name']];return _0x47a387&&_0x47a387!==_0x2313e7['name']&&(_0x2313e7['name']=_0x47a387),_0x2313e7;});}(_0x5c6afd,_0x52c22f),_0x31c12d=new _0x5c2418();for(const _0x4bb3b8 of _0x8699b0){const _0x49e7ac={'type':'button','model':new to({'label':_0x4bb3b8['name'],'class':_0x4bb3b8['class'],'withText':!0x0,'role':'menuitem','_action':_0x4bb3b8['action']})};_0x49e7ac['model']['bind']('isEnabled')['to'](_0x5c6afd,'isActionsDropdownOpen',_0x356425=>'function'!=typeof _0x4bb3b8['isEnabled']||(!_0x356425||_0x4bb3b8['isEnabled'](_0x5c6afd))),_0x31c12d['add'](_0x49e7ac);}return _0x31c12d;}(_0x45cd01,_0x14fb30);return _0x45cd01['bind']('isActionsDropdownOpen')['to'](_0x2e3dfb,'isOpen'),_0x2e3dfb['buttonView']['set']({'label':m(_0x4a198a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x5ab55c}),_0x2e3dfb['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5c9ad7['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5c9ad7['to'](_0x333603=>_0x333603['stopPropagation']())}}),_0x2e3dfb['on']('execute',_0x5d5cde=>{_0x45cd01['isReady']&&'function'==typeof _0x5d5cde['source']['_action']&&_0x5d5cde['source']['_action'](_0x45cd01);}),_0x249ef5(_0x2e3dfb,_0x1af1c9,{'role':'menu'}),_0x2e3dfb['listenTo'](_0x45cd01,'change:isActionsDropdownOpen',(_0x26a564,_0x2facb0,_0x2936bc)=>{if(_0x2936bc)for(const _0x3847a1 of _0x2e3dfb['listView']['items']){const _0x306af3=_0x3847a1['children']['first'],_0x18722b=_0x14fb30['find'](_0x3852d8=>_0x3852d8['action']===_0x306af3['_action'])['isVisible'];_0x3847a1['isVisible']=void 0x0===_0x18722b||_0x18722b(_0x45cd01);}}),_0x2e3dfb;}class ci extends/* #__PURE__ -- @preserve */
27
+ _0x501c59(_0x23ebf3){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x3f55ef,_0x30e5e1,_0x5eba08,_0x44201f){super(_0x3f55ef);const _0x1a4383=this['bindTemplate'],_0x4becb6=function(_0x542d18,_0x4799e4){const _0x386815=Array['from'](_0x4799e4['authors'])['filter'](_0x22c624=>_0x22c624!=_0x4799e4['creator']);return _0x4799e4['creator']&&_0x386815['unshift'](_0x4799e4['creator']),_0x386815['map'](_0x5bb853=>new bi(_0x542d18,_0x5bb853,_0x5bb853==_0x4799e4['creator']));}(_0x3f55ef,_0x30e5e1);this['id']=_0x30e5e1['id'],this['_revision']=_0x30e5e1,this['_requireRevisionName']=_0x44201f,this['bind']('name','createdAt')['to'](_0x30e5e1),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1b8fd4=>{return _0x365c30=_0x3f55ef['uiLanguage'],(_0x5939a0=_0x1b8fd4)['toLocaleDateString'](_0x365c30,{'month':'long','day':'numeric'})+',\x20'+_0x5939a0['toLocaleTimeString'](_0x365c30,{'hour':'numeric','minute':'numeric'});var _0x365c30,_0x5939a0;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new _i(_0x3f55ef,_0x5dd4bb),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x33aa33=>_0x33aa33||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x565dc7,_0x41e3d7)=>_0x565dc7&&_0x41e3d7),this['revisionActionsView']=_0x5eba08&&_0x5eba08['length']?ki(this,_0x5eba08):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1a4383['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1a4383['if']('isEnabled','ck-disabled',_0x9528be=>!_0x9528be),_0x1a4383['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1a4383['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1a4383['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':_0x1a4383['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':_0x4becb6}]},this['revisionActionsView']],'on':{'click':_0x1a4383['to'](_0x4ed989=>{_0x4ed989['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x15fb01=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x15fb01,'change',()=>{this['_requireRevisionName']&&!_0x15fb01['value']||this['fire']('setName',{'id':this['id'],'name':_0x15fb01['value']}),_0x15fb01['value']||(_0x15fb01['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function di(_0x299e67,_0x175ab9){const _0x59ad9b=_0x4a7254['fromJSDate'](_0x299e67)['setLocale'](_0x175ab9),_0x301d19=_0x4a7254['local'](),_0x421961=_0x301d19['minus']({'days':0x1})['startOf']('day');let _0x3b8c29,_0x5c37a5;return _0x59ad9b['hasSame'](_0x301d19,'day')?(_0x3b8c29=_0x59ad9b['startOf']('day')['toJSDate'](),_0x5c37a5=_0x59ad9b['toRelativeCalendar']()):_0x59ad9b['hasSame'](_0x421961,'day')?(_0x3b8c29=_0x421961['toJSDate'](),_0x5c37a5=_0x59ad9b['toRelativeCalendar']()):_0x59ad9b['hasSame'](_0x301d19,'week')?(_0x3b8c29=_0x59ad9b['startOf']('week')['toJSDate'](),_0x5c37a5=_0x59ad9b['weekdayLong']||''):_0x59ad9b['hasSame'](_0x301d19,'year')?(_0x3b8c29=_0x59ad9b['startOf']('month')['toJSDate'](),_0x5c37a5=_0x59ad9b['monthLong']||''):(_0x3b8c29=_0x59ad9b['startOf']('year')['toJSDate'](),_0x5c37a5=String(_0x59ad9b['year'])),{'startDate':_0x3b8c29,'localizedPeriodName':_0x5c37a5};}class vi extends _0x23ebf3{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x591271,_0x40b048,_0x4f8f14,_0xb5fed9){super(_0x591271);const _0x53fddd=di(_0x40b048,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x40b048,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4f8f14,this['_requireRevisionName']=_0xb5fed9,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':_0x53fddd}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x5f4ae6){const _0x1617c3=new ci(this['locale'],_0x5f4ae6,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1617c3);}['removeRevision'](_0x5e8763){const _0x1c785f=this['revisionViews']['find'](_0x5dcf7d=>_0x5dcf7d['id']===_0x5e8763['id']);this['revisionViews']['remove'](_0x1c785f);}}class mi extends _0x23ebf3{constructor(_0x4560ad){super(_0x4560ad);const _0x215dc0=new _0x212a7e();_0x215dc0['content']=_0x23a599,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x215dc0,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x4560ad,'Revision\x20history')]}]});}}class ai extends _0x23ebf3{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0xac0930,_0x575404,_0x4d36be,_0x3aabe7){super(_0xac0930);const _0x497a20=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x575404,this['_revisionActions']=_0x4d36be,this['_requireRevisionName']=_0x3aabe7,this['on']('select',(_0x335d10,_0xc134ce)=>{this['fire']('revisionSelected',_0xc134ce);}),this['on']('setName',(_0x3b526e,_0x35cf52)=>{this['fire']('revisionSetName',_0x35cf52);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new mi(_0xac0930),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x497a20['if']('isEnabled','ck-disabled',_0x150460=>!_0x150460)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x5cadd3 of this['_revisions'])this['_addRevision'](_0x5cadd3);this['_revisions']['on']('add',(_0x4b87b4,_0x5df199)=>{this['_addRevision'](_0x5df199);}),this['_revisions']['on']('remove',(_0x447ae7,_0x4b998b)=>{this['_removeRevision'](_0x4b998b);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x40adb6=>_0x40adb6['revisionViews']['map'](_0x41598d=>_0x41598d))['flat']();}['selectRevision'](_0x48ab60){for(const _0x1e57a7 of this['revisionViews'])_0x48ab60&&_0x48ab60['id']===_0x1e57a7['id']?_0x1e57a7['select']():_0x1e57a7['deselect']();}['highlightRevisions'](_0x1013ab){for(const _0x5b0e77 of this['revisionViews'])_0x1013ab['some'](({id:_0x3c73a4})=>_0x3c73a4===_0x5b0e77['id'])?_0x5b0e77['highlight']():_0x5b0e77['unhighlight']();}['_addRevision'](_0xbb9937){const _0x355dc8=di(_0xbb9937['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xb649f0=this['timePeriodViews']['get'](0x0);_0xb649f0&&_0xb649f0['startDate']['getTime']()===_0x355dc8['getTime']()||(_0xb649f0=new vi(this['locale'],_0x355dc8,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0xb649f0)),_0xb649f0['addRevision'](_0xbb9937);}['_removeRevision'](_0x397215){const _0x24e2b1=di(_0x397215['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x24e2b1)['removeRevision'](_0x397215);}['_getTimePeriodViewByStartDate'](_0x1728ee){return this['timePeriodViews']['find'](_0x399754=>_0x399754['startDate']['getTime']()===_0x1728ee['getTime']());}}class d extends _0x5d9b40{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x2267a3){super(_0x2267a3),this['_revisionViewer']=_0x2267a3['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x168338=this['_revisionsRepository']['_revisions'],_0x542329=this['_createRevisionActions'](),_0x5d4d33=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x168338,_0x542329,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',(_0x7bc7df,_0x1da32e)=>{_0x1da32e['revisionViews']['on']('add',(_0x30c471,_0x1c4069)=>{_0x1c4069['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)),_0x5d4d33['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x1ccf28=this['_revisionsRepository']['getRevision'](0x0);if(_0x1ccf28){const _0x44c85c=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1ccf28['id']);this['_revisionViewer']['compare'](_0x1ccf28,_0x44c85c);}}['_handleRevisionSelected'](_0x2b6440,_0x109022){const _0x36851d=this['_revisionsRepository']['getRevision'](_0x109022['id']),_0x474575=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x36851d['id']);this['_revisionViewer']['compare'](_0x36851d,_0x474575);}['_handleRevisionSetName'](_0x144eb4,_0x324fa8){this['_revisionsRepository']['getRevision'](_0x324fa8['id'])['setName'](_0x324fa8['name']);}['_handleDiffChange'](_0x3da5b4,_0x12f878,_0x334a98){const _0x12ea71=this['_revisionsRepository']['getRevisionsInDiff'](_0x334a98);_0x12ea71['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x12ea71),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x12ea71[0x0]));}['_createRevisionActions'](){const _0x3e9f5a=this['editor'],_0x423ac3=d['availableRevisionActions'],_0x3ed7f9=_0x3e9f5a['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x3ed7f9['length'])return _0x3ed7f9['map'](_0x3b34cd=>{const _0x26f724='string'==typeof _0x3b34cd?Object['assign']({},_0x423ac3[_0x3b34cd]):_0x3b34cd;return _0x26f724['action']=_0x26f724['action']['bind'](this,_0x3e9f5a),_0x26f724['isVisible']&&(_0x26f724['isVisible']=_0x26f724['isVisible']['bind'](this,_0x3e9f5a)),_0x26f724;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x255071},_0x1ae674)=>{const _0x368d20=_0x255071['get'](u),_0x13fa56=_0x368d20['repository'];let _0x5c9aee=_0x368d20['diff']['newRevisionId'],_0x4c6260=_0x1ae674['id'];_0x13fa56['getIndex'](_0x5c9aee)>_0x13fa56['getIndex'](_0x4c6260)&&([_0x5c9aee,_0x4c6260]=[_0x4c6260,_0x5c9aee]),_0x368d20['compare'](_0x5c9aee,_0x4c6260);},'isVisible':({plugins:_0x4c41ed},_0x15069a)=>{const _0x272c57=_0x4c41ed['get'](u);return!(_0x272c57['repository']['getRevisionsInDiff'](_0x272c57['diff'])['length']>0x2)&&!_0x15069a['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x77e712,{id:_0x48e0e1})=>{_0x77e712['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x48e0e1);},'isVisible':({plugins:_0x529462},_0x45ca07)=>!!_0x529462['get'](u)['repository']['getLaterVisibleRevision'](_0x45ca07['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4a2888},{id:_0x53f0f4,revisionNameView:_0x1b5a00})=>{const _0x5436b2=_0x4a2888['get'](u),_0x4bc70f=_0x5436b2['repository']['getEarlierVisibleRevision'](_0x53f0f4);_0x5436b2['compare'](_0x53f0f4,_0x4bc70f),_0x1b5a00['focus'](),_0x1b5a00['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x8ecdf2,_0x44732b){super(_0x8ecdf2),this['_view']=_0x44732b,this['_toolbarConfig']=st(_0x8ecdf2['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x40ba78){const _0x5c7713=this['editor'],_0xe396d3=this['view'],_0x5dc76c=_0x5c7713['editing']['view'],_0x299ba9=_0xe396d3['editable'],_0x31599d=_0x5dc76c['document']['getRoot']();_0x299ba9['name']=_0x31599d['rootName'],_0xe396d3['render']();const _0x5df5ae=_0x299ba9['element'];this['setEditableElement'](_0x299ba9['name'],_0x5df5ae),_0xe396d3['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5dc76c['attachDomRoot'](_0x5df5ae),this['_elementReplacer']['replace'](_0x40ba78,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1bd4cd=this['view'],_0x31c0d8=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x31c0d8['detachDomRoot'](_0x1bd4cd['editable']['name']),_0x1bd4cd['destroy']();}['_initToolbar'](){const _0xfb7ad0=this['view'];_0xfb7ad0['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0xfb7ad0['stickyPanel']['limiterElement']=_0xfb7ad0['element'],_0xfb7ad0['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x20cf39})=>_0x20cf39),_0xfb7ad0['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0xfb7ad0['toolbar']);}}class ii extends _0x20cce1{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x4fc2e0,_0x4c47eb,_0xcbe9b={}){super(_0x4fc2e0),this['stickyPanel']=new _0x82d6c7(_0x4fc2e0),this['toolbar']=new _0x392eb7(_0x4fc2e0,{'shouldGroupWhenFull':_0xcbe9b['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x4fc2e0,_0x4c47eb);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
- _0x28570d(_0x1dbeab){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1c2cf6,_0x627cc3){super(_0x627cc3),this['sourceElement']=_0x1c2cf6,this['model']['document']['createRoot']();const _0x562f10=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x562f10);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5d29c2,_0x241194){const _0x4a8436=new this(_0x5d29c2,_0x241194);return await _0x4a8436['initPlugins'](),await _0x4a8436['ui']['init'](_0x5d29c2),await _0x4a8436['data']['init'](_0x4a8436['config']['get']('initialData')||''),_0x4a8436['fire']('ready'),_0x4a8436;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0xbe21c4{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5148ce){function _0x36d76a(_0x50c02f){return _0x50c02f['map'](_0x53b80b=>String['fromCharCode'](_0x53b80b))['join']('');}super(_0x5148ce),this['result']='end',_0x5148ce[_0x36d76a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36d76a([0x76,0x69,0x65,0x77])][_0x36d76a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36d76a([0x61,0x75,0x74,0x6f]),_0x5148ce[_0x36d76a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x36d76a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36d76a([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x36d76a([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x36d76a([0x6f,0x6b])});}}class ct extends _0xbe21c4{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x13869e){if(super(_0x13869e),!this['editor']['config']['get']('revisionHistory'))throw new _0x1d6810('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xa1b671=>this['_showRevisionViewer']({..._0xa1b671,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2b8422=>this['_closeRevisionViewer'](_0x2b8422)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x204016=>this['_restoreRevision'](_0x204016)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x52c9a9){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x52c9a9;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x379ad1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x379ad1);}['getRevision'](_0xa2ebb3){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xa2ebb3);}['getRevisions'](_0x39eafb){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x39eafb||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x484705=this['editor'],_0x21d22c=_0x45ed39(_0x484705,p),_0x559d7f=_0x484705['plugins']['get']('RevisionTracker'),_0x5f4089=_0x484705['plugins']['get']('Users')['users'];return _0x21d22c['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x21d22c['lazyRoots'],(_0x21d22c['plugins']['push'](ht,u,v,class extends _0xbe21c4{static get['requires'](){return[u,'Users'];}['init'](){const _0x35816d=this['editor']['plugins']['get']('Users');for(const _0xf53218 of _0x5f4089)_0xf53218['isAnonymous']||_0x35816d['getUser'](_0xf53218['id'])||_0x35816d['addUser'](_0xf53218);const _0xc84228=_0x559d7f['repository']['getRevisions']();let _0x46bb10=null;const _0x5ad9f3=this['editor']['plugins']['get']('RevisionViewer');_0x5ad9f3['adapter']=_0x559d7f['adapter'],_0x5ad9f3['bind']('isEnabled')['to'](_0x559d7f),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x484705,'isReadOnly',_0x272815=>!_0x272815);for(const _0x4f97a5 of _0xc84228){const _0x227662=null===_0x4f97a5['creator'];if(_0x227662&&_0x4f97a5['toVersion']===_0x4f97a5['fromVersion'])continue;const _0x589586=_0x4f97a5['toJSON']();_0x5ad9f3['addRevisionData'](_0x589586,(_0x193a44,_0x10f71a,_0x1c637d)=>{if(_0x227662){if(_0x46bb10)_0x46bb10['_update'](_0x193a44,_0x10f71a);else{if(!_0x10f71a){const _0x2aaef3=_0x1c637d['toJSON']();_0x2aaef3['id']=_0x532896(),_0x559d7f['saveRevision'](_0x2aaef3,_0x1c637d['toVersion'])['then'](_0x31a9a2=>{_0x46bb10=_0x31a9a2;});}}}else _0x4f97a5['_update'](_0x193a44,_0x10f71a);});}}},d),_0x21d22c);}['_enhanceShowRevisionViewerCallback'](){const _0x2f6936=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x38da09=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x459461=this['editor']['plugins']['get']('Autosave');await _0x459461['save']();}else await _0x38da09['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x48bcfa=this['editor']['plugins']['get']('Dialog');_0x48bcfa['isOpen']&&_0x48bcfa['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5d2367=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3dde0e of _0x5d2367)_0x3dde0e['class']=_0x3dde0e['class']?_0x3dde0e['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x424946=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x424946&&_0x424946['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3a19ab=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3a19ab&&_0x3a19ab['setAttribute']('tabindex','-1');}}const _0x4a710f=this['_getRevisionViewerEditorConfig']();return _0x2f6936(_0x4a710f)['then'](_0x4d2c7a=>{return(this['_viewerEditor']=_0x4d2c7a,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'),_0x4d2c7a);})['catch'](_0x3c37e8=>(console['error'](_0x3c37e8),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x35a9df=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 _0x1d2171=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1b22ee of _0x1d2171)_0x1b22ee['class']='ck-tab-panel_disabled'===_0x1b22ee['class']?'':_0x1b22ee['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x90fd37=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x90fd37&&_0x90fd37['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x22f6ba=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x22f6ba&&_0x22f6ba['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x35a9df(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3cc76d=this['editor']['plugins']['get']('Annotations');_0x3cc76d['refreshVisibility'](),_0x3cc76d['refreshPositioning']();}});});}['_showRevisionViewer'](_0x12dbd7){const _0x1ec0a5=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x23c032=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1a0798=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x1a0798,_0x12dbd7)['then'](_0x3aac38=>(_0x23c032['style']['display']='block',_0x1ec0a5['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3aac38));}['_closeRevisionViewer'](_0xfd6539){const _0x175ce3=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x175ce3['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xfd6539['destroy']();}async['_restoreRevision'](_0x2e4545){const _0x237011=this['editor'],_0x3a0657=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2e460b=_0x237011['plugins']['get']('RevisionTracker'),_0x11fca4=_0x237011['plugins']['get']('RevisionHistoryUtils'),_0x45c50f=_0x3a0657['repository']['getRevision'](_0x2e4545);let _0x58a0b2,_0x624875,_0x5f455a;try{await _0x11fca4['loadRevisionData'](_0x45c50f,this['adapter']),_0x58a0b2=_0x11fca4['getRevisionDocumentData'](_0x45c50f),_0x624875=_0x11fca4['getRevisionRootsAttributes'](_0x45c50f);}catch(_0x3a663){return void console['error'](_0x3a663);}_0x237011['model']['change'](_0x1e8174=>{for(const _0x1d49ea of Array['from'](_0x237011['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1e8174['removeMarker'](_0x1d49ea);}),_0x3a0657['isReady']=!0x1,_0x237011['model']['enqueueChange'](_0x957351=>{_0x957351['setSelection'](null),_0x957351['removeSelectionAttribute'](_0x237011['model']['document']['selection']['getAttributeKeys']());const _0xeece7c=Object['keys'](_0x58a0b2);for(const _0x1c1c51 of _0x237011['model']['document']['roots'])'$graveyard'!=_0x1c1c51['rootName']&&_0x1c1c51['isAttached']()&&!_0xeece7c['includes'](_0x1c1c51['rootName'])&&_0x957351['detachRoot'](_0x1c1c51);for(const _0x202c96 of _0xeece7c){let _0x20161a=_0x237011['model']['document']['getRoot'](_0x202c96);_0x20161a&&_0x20161a['isAttached']()||(_0x20161a=_0x957351['addRoot'](_0x202c96));const _0x2d1e97=_0x624875[_0x202c96],_0x331296=Object['keys'](_0x2d1e97),_0x3d3300=_0x58a0b2[_0x202c96];for(const _0x443159 of _0x20161a['getAttributeKeys']())_0x331296['includes'](_0x443159)||_0x957351['removeAttribute'](_0x443159,_0x20161a);for(const _0x569b16 of _0x331296)_0x957351['setAttribute'](_0x569b16,_0x624875[_0x202c96][_0x569b16],_0x20161a);_0x957351['remove'](_0x957351['createRangeIn'](_0x20161a)),_0x957351['insert'](_0x237011['data']['parse'](_0x3d3300,_0x20161a),_0x20161a,0x0);}});const _0x3ceeb8=m(_0x237011['locale'],'Restored');if(_0x45c50f['name'])_0x5f455a=-0x1==_0x45c50f['name']['indexOf'](_0x3ceeb8)?_0x3ceeb8+':\x20'+_0x45c50f['name']:_0x45c50f['name'];else _0x5f455a=_0x3ceeb8+':\x20'+(_0x45c50f['createdAt']['toLocaleDateString'](_0x237011['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x45c50f['createdAt']['toLocaleTimeString'](_0x237011['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2e460b['saveRevision']({'name':_0x5f455a}),_0x3a0657['isReady']=!0x0,_0x237011['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,ht as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};
29
+ rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x2efda4){super(_0x2efda4),this['_revisionViewer']=_0x2efda4['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x4e058f=this['_revisionsRepository']['_revisions'],_0x5eee02=this['_createRevisionActions'](),_0x574f84=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ai(this['editor']['locale'],_0x4e058f,_0x5eee02,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',(_0x34f4f7,_0x70a9ca)=>{_0x70a9ca['revisionViews']['on']('add',(_0x3bcf74,_0x5d0682)=>{_0x5d0682['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)),_0x574f84['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x187c67=this['_revisionsRepository']['getRevision'](0x0);if(_0x187c67){const _0xe5de63=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x187c67['id']);this['_revisionViewer']['compare'](_0x187c67,_0xe5de63);}}['_handleRevisionSelected'](_0x2a94b5,_0x526ebb){const _0x530864=this['_revisionsRepository']['getRevision'](_0x526ebb['id']),_0x55f444=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x530864['id']);this['_revisionViewer']['compare'](_0x530864,_0x55f444);}['_handleRevisionSetName'](_0x372520,_0x40e7be){this['_revisionsRepository']['getRevision'](_0x40e7be['id'])['setName'](_0x40e7be['name']);}['_handleDiffChange'](_0x1ff716,_0x959cf1,_0x40da78){const _0x1656d0=this['_revisionsRepository']['getRevisionsInDiff'](_0x40da78);_0x1656d0['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x1656d0),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x1656d0[0x0]));}['_createRevisionActions'](){const _0x5315ae=this['editor'],_0x4b8461=d['availableRevisionActions'],_0x72993=_0x5315ae['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x72993['length'])return _0x72993['map'](_0x9baa8f=>{const _0x21a531='string'==typeof _0x9baa8f?Object['assign']({},_0x4b8461[_0x9baa8f]):_0x9baa8f;return _0x21a531['action']=_0x21a531['action']['bind'](this,_0x5315ae),_0x21a531['isVisible']&&(_0x21a531['isVisible']=_0x21a531['isVisible']['bind'](this,_0x5315ae)),_0x21a531;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4c7127},_0x1c49cf)=>{const _0x5acced=_0x4c7127['get'](u),_0x47dea6=_0x5acced['repository'];let _0x11d3d4=_0x5acced['diff']['newRevisionId'],_0x4feaf2=_0x1c49cf['id'];_0x47dea6['getIndex'](_0x11d3d4)>_0x47dea6['getIndex'](_0x4feaf2)&&([_0x11d3d4,_0x4feaf2]=[_0x4feaf2,_0x11d3d4]),_0x5acced['compare'](_0x11d3d4,_0x4feaf2);},'isVisible':({plugins:_0x5d87ca},_0xf1a2f2)=>{const _0xffc1ce=_0x5d87ca['get'](u);return!(_0xffc1ce['repository']['getRevisionsInDiff'](_0xffc1ce['diff'])['length']>0x2)&&!_0xf1a2f2['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x12c46d,{id:_0x294bac})=>{_0x12c46d['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x294bac);},'isVisible':({plugins:_0x19c00e},_0x1ba0ff)=>!!_0x19c00e['get'](u)['repository']['getLaterVisibleRevision'](_0x1ba0ff['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x350eaf},{id:_0x3bcc9a,revisionNameView:_0x576858})=>{const _0xa2b214=_0x350eaf['get'](u),_0x1c51c3=_0xa2b214['repository']['getEarlierVisibleRevision'](_0x3bcc9a);_0xa2b214['compare'](_0x3bcc9a,_0x1c51c3),_0x576858['focus'](),_0x576858['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x23e064,_0x25829e){super(_0x23e064),this['_view']=_0x25829e,this['_toolbarConfig']=st(_0x23e064['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x24e657){const _0x308789=this['editor'],_0x3e829b=this['view'],_0x185bed=_0x308789['editing']['view'],_0x1f4791=_0x3e829b['editable'],_0x19f0e0=_0x185bed['document']['getRoot']();_0x1f4791['name']=_0x19f0e0['rootName'],_0x3e829b['render']();const _0x2846a7=_0x1f4791['element'];this['setEditableElement'](_0x1f4791['name'],_0x2846a7),_0x3e829b['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x185bed['attachDomRoot'](_0x2846a7),this['_elementReplacer']['replace'](_0x24e657,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x511026=this['view'],_0x1689ac=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x1689ac['detachDomRoot'](_0x511026['editable']['name']),_0x511026['destroy']();}['_initToolbar'](){const _0x4d9fd0=this['view'];_0x4d9fd0['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4d9fd0['stickyPanel']['limiterElement']=_0x4d9fd0['element'],_0x4d9fd0['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x4f11ed})=>_0x4f11ed),_0x4d9fd0['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4d9fd0['toolbar']);}}class ii extends _0x24a91a{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x50465b,_0x2726a4,_0x129d45={}){super(_0x50465b),this['stickyPanel']=new _0x23ce19(_0x50465b),this['toolbar']=new _0x29b212(_0x50465b,{'shouldGroupWhenFull':_0x129d45['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x50465b,_0x2726a4);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
+ _0x5a628a(_0x527c10){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x420f85,_0x27df6d){super(_0x27df6d),this['sourceElement']=_0x420f85,this['model']['document']['createRoot']();const _0x2d1d1f=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x2d1d1f);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x3855e1,_0x595b0f){const _0x1efd3f=new this(_0x3855e1,_0x595b0f);return await _0x1efd3f['initPlugins'](),await _0x1efd3f['ui']['init'](_0x3855e1),await _0x1efd3f['data']['init'](_0x1efd3f['config']['get']('initialData')||''),_0x1efd3f['fire']('ready'),_0x1efd3f;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class at extends _0x5d9b40{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1af078){function _0x3e6bfe(_0x2f6c83){return _0x2f6c83['map'](_0x491afc=>String['fromCharCode'](_0x491afc))['join']('');}super(_0x1af078),this['result']='end',_0x1af078[_0x3e6bfe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3e6bfe([0x76,0x69,0x65,0x77])][_0x3e6bfe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3e6bfe([0x61,0x75,0x74,0x6f]),_0x1af078[_0x3e6bfe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3e6bfe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3e6bfe([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3e6bfe([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3e6bfe([0x6f,0x6b])});}}class ht extends _0x5d9b40{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x49714e){if(super(_0x49714e),!this['editor']['config']['get']('revisionHistory'))throw new _0x307a19('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x256d64=>this['_showRevisionViewer']({..._0x256d64,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x45a00c=>this['_closeRevisionViewer'](_0x45a00c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x574a11=>this['_restoreRevision'](_0x574a11)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3ed087){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3ed087;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x5d5f58){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x5d5f58);}['getRevision'](_0x33c590){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x33c590);}['getRevisions'](_0x406845){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x406845||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xe7e454=this['editor'],_0x1fcd42=_0x214800(_0xe7e454,p),_0x33dc6a=_0xe7e454['plugins']['get']('RevisionTracker'),_0x49dd6a=_0xe7e454['plugins']['get']('Users')['users'];return _0x1fcd42['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1fcd42['lazyRoots'],(_0x1fcd42['plugins']['push'](at,u,v,class extends _0x5d9b40{static get['requires'](){return[u,'Users'];}['init'](){const _0x537c80=this['editor']['plugins']['get']('Users');for(const _0x1324af of _0x49dd6a)_0x1324af['isAnonymous']||_0x537c80['getUser'](_0x1324af['id'])||_0x537c80['addUser'](_0x1324af);const _0x458158=_0x33dc6a['repository']['getRevisions']();let _0x113aca=null;const _0x2085a1=this['editor']['plugins']['get']('RevisionViewer');_0x2085a1['adapter']=_0x33dc6a['adapter'],_0x2085a1['bind']('isEnabled')['to'](_0x33dc6a),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xe7e454,'isReadOnly',_0x3c4778=>!_0x3c4778);for(const _0xb1656c of _0x458158){const _0x8a6966=null===_0xb1656c['creator'];if(_0x8a6966&&_0xb1656c['toVersion']===_0xb1656c['fromVersion'])continue;const _0x3f64d8=_0xb1656c['toJSON']();_0x2085a1['addRevisionData'](_0x3f64d8,(_0x27e506,_0x5ef2dc,_0x2dd921)=>{if(_0x8a6966){if(_0x113aca)_0x113aca['_update'](_0x27e506,_0x5ef2dc);else{if(!_0x5ef2dc){const _0x58fc9a=_0x2dd921['toJSON']();_0x58fc9a['id']=_0x7da10a(),_0x33dc6a['saveRevision'](_0x58fc9a,_0x2dd921['toVersion'])['then'](_0x123564=>{_0x113aca=_0x123564;});}}}else _0xb1656c['_update'](_0x27e506,_0x5ef2dc);});}}},d),_0x1fcd42);}['_enhanceShowRevisionViewerCallback'](){const _0x4ff64d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x293732=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x63c759=this['editor']['plugins']['get']('Autosave');await _0x63c759['save']();}else await _0x293732['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x452d60=this['editor']['plugins']['get']('Dialog');_0x452d60['isOpen']&&_0x452d60['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x2af390=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x209ea1 of _0x2af390)_0x209ea1['class']=_0x209ea1['class']?_0x209ea1['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x43bede=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x43bede&&_0x43bede['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1a5205=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1a5205&&_0x1a5205['setAttribute']('tabindex','-1');}}const _0x34f75b=this['_getRevisionViewerEditorConfig']();return _0x4ff64d(_0x34f75b)['then'](_0x9b8974=>{return(this['_viewerEditor']=_0x9b8974,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'),_0x9b8974);})['catch'](_0xdbe9c9=>(console['error'](_0xdbe9c9),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x15694e=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 _0xe06781=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x572d02 of _0xe06781)_0x572d02['class']='ck-tab-panel_disabled'===_0x572d02['class']?'':_0x572d02['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x2a239c=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2a239c&&_0x2a239c['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5c0124=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5c0124&&_0x5c0124['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x15694e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3293f9=this['editor']['plugins']['get']('Annotations');_0x3293f9['refreshVisibility'](),_0x3293f9['refreshPositioning']();}});});}['_showRevisionViewer'](_0x797300){const _0x59e046=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xdbcc24=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4c6df3=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x4c6df3,_0x797300)['then'](_0x3324a1=>(_0xdbcc24['style']['display']='block',_0x59e046['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3324a1));}['_closeRevisionViewer'](_0x25837e){const _0x3cff74=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3cff74['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x25837e['destroy']();}async['_restoreRevision'](_0x103e87){const _0x3e1e04=this['editor'],_0xdcf79d=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x520d2b=_0x3e1e04['plugins']['get']('RevisionTracker'),_0x42ecd1=_0x3e1e04['plugins']['get']('RevisionHistoryUtils'),_0x48e3ad=_0xdcf79d['repository']['getRevision'](_0x103e87);let _0x498fae,_0x54f6a6,_0x2ef7f;try{await _0x42ecd1['loadRevisionData'](_0x48e3ad,this['adapter']),_0x498fae=_0x42ecd1['getRevisionDocumentData'](_0x48e3ad),_0x54f6a6=_0x42ecd1['getRevisionRootsAttributes'](_0x48e3ad);}catch(_0x59ac9c){return void console['error'](_0x59ac9c);}_0x3e1e04['model']['change'](_0xc8ad1d=>{for(const _0x3eeeff of Array['from'](_0x3e1e04['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xc8ad1d['removeMarker'](_0x3eeeff);}),_0xdcf79d['isReady']=!0x1,_0x3e1e04['model']['enqueueChange'](_0x5056a5=>{_0x5056a5['setSelection'](null),_0x5056a5['removeSelectionAttribute'](_0x3e1e04['model']['document']['selection']['getAttributeKeys']());const _0xb3347d=Object['keys'](_0x498fae);for(const _0x46abd9 of _0x3e1e04['model']['document']['roots'])'$graveyard'!=_0x46abd9['rootName']&&_0x46abd9['isAttached']()&&!_0xb3347d['includes'](_0x46abd9['rootName'])&&_0x5056a5['detachRoot'](_0x46abd9);for(const _0x48be33 of _0xb3347d){let _0x4ee2a5=_0x3e1e04['model']['document']['getRoot'](_0x48be33);_0x4ee2a5&&_0x4ee2a5['isAttached']()||(_0x4ee2a5=_0x5056a5['addRoot'](_0x48be33));const _0x18597e=_0x54f6a6[_0x48be33],_0x1d4c79=Object['keys'](_0x18597e),_0x544503=_0x498fae[_0x48be33];for(const _0x1b5e94 of _0x4ee2a5['getAttributeKeys']())_0x1d4c79['includes'](_0x1b5e94)||_0x5056a5['removeAttribute'](_0x1b5e94,_0x4ee2a5);for(const _0x2bcf5f of _0x1d4c79)_0x5056a5['setAttribute'](_0x2bcf5f,_0x54f6a6[_0x48be33][_0x2bcf5f],_0x4ee2a5);_0x5056a5['remove'](_0x5056a5['createRangeIn'](_0x4ee2a5)),_0x5056a5['insert'](_0x3e1e04['data']['parse'](_0x544503,_0x4ee2a5),_0x4ee2a5,0x0);}});const _0x4305c6=m(_0x3e1e04['locale'],'Restored');if(_0x48e3ad['name'])_0x2ef7f=-0x1==_0x48e3ad['name']['indexOf'](_0x4305c6)?_0x4305c6+':\x20'+_0x48e3ad['name']:_0x48e3ad['name'];else _0x2ef7f=_0x4305c6+':\x20'+(_0x48e3ad['createdAt']['toLocaleDateString'](_0x3e1e04['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x48e3ad['createdAt']['toLocaleTimeString'](_0x3e1e04['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x520d2b['saveRevision']({'name':_0x2ef7f}),_0xdcf79d['isReady']=!0x0,_0x3e1e04['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,at as RevisionViewerIntegration,Ri as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ot as ShowChangeCommand};