@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250322.0 → 0.0.0-nightly-20250323.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,10 +20,10 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x1ff634,uid as _0x51a0e0,Collection as _0x1056b3,logWarning as _0x538e24,FocusTracker as _0x5732ff,KeystrokeHandler as _0x538a05,scrollViewportToShowTarget as _0x42da1f,ResizeObserver as pt,ElementReplacer as ht,CKEditorError as _0x1a961b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2cf058,set as _0x2b3d38,unset as _0xa852ed,isEqual as _0x45b9b0}from'es-toolkit/compat';import{Plugin as _0x5aa884,PendingActions as _0x24dc87,Command as _0x474bc6,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x500ee0,getMarkerDomElement as _0x26f880,ConfirmMixin as _0x256f9d,sanitizeEditorConfig as _0x4398d8}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x39dd63,Element as ut,Range as ft,ViewUIElement as _0x1231a7,ViewRawElement as _0x1c2455,ViewEmptyElement as _0x48d005,ViewAttributeElement as _0x5dcd99,ViewContainerElement as _0x364db7,Position as vt,ViewText as _0xbf05a4,ViewElement as _0x34efa8,DocumentFragment as gt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5b5e2c,IconChevronUp as _0x47c9dd,IconChevronDown as _0x35bc15,IconUndo as _0x49f4f5,IconUser as _0x200d00,IconThreeVerticalDots as _0x2aa713}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x377738,injectCssTransitionDisabler as ts,submitHandler as _0x16b26b,LabeledFieldView as at,createLabeledInputText as ti,createDropdown as _0x28f4b1,ListView as _0x122e03,ListItemView as te,ButtonView as _0x4cea6e,MenuBarMenuView as _0x33eb46,MenuBarMenuListView as _0x4867ec,MenuBarMenuListItemView as _0x5e8df2,MenuBarMenuListItemButtonView as _0x15ddd2,ContextualBalloon as _0x5b7085,ToolbarSeparatorView as _0x36a155,IconView as _0x2b341d,addListToDropdown as _0x27322b,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x371ddf}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
- _0x1ff634(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0xe88f24){super(),this['id']=_0xe88f24['id']||_0x51a0e0(),this['creator']=_0xe88f24['creator']||null,this['authors']=_0xe88f24['authors']||[],this['diffData']=_0xe88f24['diffData']||null,this['toVersion']=_0xe88f24['toVersion']||0x0,this['fromVersion']=_0xe88f24['fromVersion']||0x0,this['set']('name',_0xe88f24['name']||''),this['set']('createdAt',_0xe88f24['createdAt']||new Date()),this['set']('attributes',_0xe88f24['attributes']||{});}['setName'](_0x5b3781){this['_update']({'name':_0x5b3781});}['setAttribute'](_0x4937d7,_0x3bb9e8){const _0x45dc13=_0x2cf058(this['attributes']);_0x2b3d38(_0x45dc13,_0x4937d7,_0x3bb9e8),this['_update']({'attributes':_0x45dc13});}['removeAttribute'](_0x17e584){const _0x130234=_0x2cf058(this['attributes']);_0xa852ed(_0x130234,_0x17e584),this['_update']({'attributes':_0x130234});}['_update'](_0x334bdc,_0x342e05=!0x1){let _0x24761b=!0x1;const _0x574cd5={'id':this['id']},_0xae9f9e=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x3b9898 of _0xae9f9e){const _0xcb6cbd=_0x334bdc[_0x3b9898];void 0x0!==_0xcb6cbd&&_0xcb6cbd!==this[_0x3b9898]&&(this[_0x3b9898]=_0xcb6cbd,_0x574cd5[_0x3b9898]=_0xcb6cbd,_0x24761b=!0x0);}_0x24761b&&(_0x574cd5['authors']&&(_0x574cd5['authorsIds']=_0x574cd5['authors']['map'](_0x511869=>_0x511869['id']),delete _0x574cd5['authors']),this['fire']('_update',_0x574cd5,_0x342e05));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0xf19686=>_0xf19686['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x5aa884{['_revisions'];static get['requires'](){return[_0x500ee0];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1e28a7){super(_0x1e28a7),this['_revisions']=new _0x1056b3();}['afterInit'](){!async function(_0x22d16a){const _0x17e316=_0x52f9fd([0x4a,0x6f,0x6b,0x72,0x4d,0x67,0x31,0x39,0x58,0x68,0x73,0x55,0x76,0x50,0x6e,0x38,0x64,0x63,0x51,0x75,0x70,0x5a,0x44,0x4c,0x41,0x32,0x61,0x52,0x4f,0x65,0x6a,0x66,0x79,0x69,0x46,0x48,0x54,0x4e,0x7a,0x6c,0x43,0x78,0x53,0x74,0x57,0x71,0x30,0x33,0x47,0x59,0x56,0x36,0x42,0x49,0x45,0x34,0x62,0x35,0x4b,0x6d,0x77,0x37]),_0x124587=0xeb829,_0x578637=0x701be8f1,_0x12c311=0x701c8a29^_0x578637,_0x1092d8=window[_0x52f9fd([0x44,0x61,0x74,0x65])][_0x52f9fd([0x6e,0x6f,0x77])](),_0x25a3ba=_0x22d16a[_0x52f9fd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3f9962=new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x41b134=>{_0x25a3ba[_0x52f9fd([0x6f,0x6e,0x63,0x65])](_0x52f9fd([0x72,0x65,0x61,0x64,0x79]),_0x41b134);}),_0x6693a9={[_0x52f9fd([0x6b,0x74,0x79])]:_0x52f9fd([0x45,0x43]),[_0x52f9fd([0x75,0x73,0x65])]:_0x52f9fd([0x73,0x69,0x67]),[_0x52f9fd([0x63,0x72,0x76])]:_0x52f9fd([0x50,0x2d,0x32,0x35,0x36]),[_0x52f9fd([0x78])]:_0x52f9fd([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]),[_0x52f9fd([0x79])]:_0x52f9fd([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]),[_0x52f9fd([0x61,0x6c,0x67])]:_0x52f9fd([0x45,0x53,0x32,0x35,0x36])},_0x46723d=_0x25a3ba[_0x52f9fd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x52f9fd([0x67,0x65,0x74])](_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x23e16b(){let _0x4049a5,_0x342aff=null,_0x465dca=null;try{if(_0x46723d==_0x52f9fd([0x47,0x50,0x4c]))return _0x52f9fd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4049a5=_0x128a51(),!_0x4049a5)return _0x52f9fd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4049a5[_0x52f9fd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x465dca=_0x2b9e23(_0x4049a5[_0x52f9fd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4049a5[_0x52f9fd([0x6a,0x74,0x69])])),await _0x4a0085()?_0x29cdb5()?_0x3aede3()?_0x52f9fd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4590b9()?(_0x4049a5[_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52f9fd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x342aff=_0x2dc0e7(_0x52f9fd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4049a5[_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52f9fd([0x74,0x72,0x69,0x61,0x6c])&&(_0x342aff=_0x2dc0e7(_0x52f9fd([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x383822()):_0x52f9fd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x52f9fd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x52f9fd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x1d19fc){return _0x52f9fd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3aede3(){const _0x11367c=[_0x52f9fd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x52f9fd([0x74,0x72,0x69,0x61,0x6c])][_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4049a5[_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1092d8/0x3e8:0xe10*_0x12c311;return _0x4049a5[_0x52f9fd([0x65,0x78,0x70])]<_0x11367c;}function _0x29cdb5(){const _0x395a96=_0x4049a5[_0x52f9fd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x395a96)return!0x1;if(_0x395a96[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f9fd([0x2a])))return!0x0;if(_0x395a96[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f9fd([0x52,0x48])))return!0x0;if(_0x395a96[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f9fd([0x52,0x52,0x48]))){if(_0x19793f())return!0x0;if(_0x104914()||_0x5a270b())return!0x0;}return!0x1;}function _0x4590b9(){const _0x3a1f1e=_0x4049a5[_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a1f1e||0x0==_0x3a1f1e[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x53f9ef}=new URL(window[_0x52f9fd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3a1f1e[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53f9ef))return!0x0;const _0x17e16f=_0x53f9ef[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])](_0x52f9fd([0x2e]));return _0x3a1f1e[_0x52f9fd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12b202=>_0x12b202[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f9fd([0x2a])))[_0x52f9fd([0x6d,0x61,0x70])](_0x4ac662=>_0x4ac662[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])](_0x52f9fd([0x2e])))[_0x52f9fd([0x73,0x6f,0x6d,0x65])](_0x4cf8b8=>_0x17e16f[_0x52f9fd([0x65,0x76,0x65,0x72,0x79])]((_0x1f4ea9,_0x294444)=>_0x4cf8b8[_0x294444]===_0x1f4ea9||_0x4cf8b8[_0x294444]===_0x52f9fd([0x2a])));}function _0x383822(){return _0x342aff&&_0x465dca?new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2c896b,_0x2552ff)=>{_0x342aff[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x2c896b,_0x2552ff),_0x465dca[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x58e00e=>{_0x58e00e!=_0x52f9fd([0x56,0x61,0x6c,0x69,0x64])&&_0x2c896b(_0x58e00e);},_0x2552ff);}):_0x342aff||_0x465dca||_0x52f9fd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2b9e23(_0x4e100b,_0x1d3f7c){return new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x588d76=>{if(_0x4b7f53())return _0x588d76(_0x52f9fd([0x56,0x61,0x6c,0x69,0x64]));_0x2a76ab(),_0x25a3ba[_0x52f9fd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x52f9fd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3611be=!0x1;const _0x537d3e=_0x51a0e0();function _0x2cd7f9(_0x279efc){return!!_0x279efc&&(typeof _0x279efc===_0x52f9fd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x279efc===_0x52f9fd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x279efc[_0x52f9fd([0x74,0x68,0x65,0x6e])]===_0x52f9fd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x279efc[_0x52f9fd([0x63,0x61,0x74,0x63,0x68])]===_0x52f9fd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1a95b4(_0x67d336){_0x4c5bd4(_0x67d336)[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x4aca46=>{if(!_0x4aca46||_0x4aca46[_0x52f9fd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x52f9fd([0x6f,0x6b]))return _0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x31258d(_0x2603b5(_0x537d3e+_0x1d3f7c))!=_0x4aca46[_0x52f9fd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x52f9fd([0x56,0x61,0x6c,0x69,0x64]);})[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x22b089=>(_0x1b00e2(),_0x22b089),()=>{const _0x403871=_0x3288ba();return null==_0x403871?(_0x1b00e2(),_0x52f9fd([0x56,0x61,0x6c,0x69,0x64])):_0x52f9fd(_0x1092d8-_0x403871>(0x54176cf1^_0x578637)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x588d76)[_0x52f9fd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x588d76(_0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4133d3=0x702d0671^_0x578637;function _0x1b00e2(){const _0x516cb9=_0x52f9fd([0x6c,0x6c,0x63,0x74,0x2d])+_0x31258d(_0x2603b5(_0x4e100b)),_0x53c13e=_0x36986a(_0x31258d(window[_0x52f9fd([0x4d,0x61,0x74,0x68])][_0x52f9fd([0x63,0x65,0x69,0x6c])](_0x1092d8/_0x4133d3)));window[_0x52f9fd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52f9fd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x516cb9,_0x53c13e);}function _0x3288ba(){const _0x211091=_0x52f9fd([0x6c,0x6c,0x63,0x74,0x2d])+_0x31258d(_0x2603b5(_0x4e100b)),_0x1a4db2=window[_0x52f9fd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52f9fd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x211091);return _0x1a4db2?window[_0x52f9fd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36986a(_0x1a4db2),0x10)*_0x4133d3:null;}function _0x4c5bd4(_0x513fdc){return new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x405af8,_0x31b457)=>{_0x513fdc[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x405af8,_0x31b457),window[_0x52f9fd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x31b457,0x701a3c31^_0x578637);});}}_0x25a3ba[_0x52f9fd([0x6f,0x6e])](_0x52f9fd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x110cee,_0x2a9002)=>{if(_0x2a9002[0x0]!=_0x4e100b)return _0x588d76(_0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2a9002[0x1]={..._0x2a9002[0x1],[_0x52f9fd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x537d3e};},{[_0x52f9fd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52f9fd([0x68,0x69,0x67,0x68])}),_0x25a3ba[_0x52f9fd([0x6f,0x6e])](_0x52f9fd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x12312b=>{_0x2cd7f9(_0x12312b[_0x52f9fd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3611be=!0x0,_0x1a95b4(_0x12312b[_0x52f9fd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x52f9fd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52f9fd([0x6c,0x6f,0x77])}),_0x3f9962[_0x52f9fd([0x74,0x68,0x65,0x6e])](()=>{_0x3611be||_0x588d76(_0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4b7f53(){return _0x25a3ba[_0x52f9fd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52f9fd([0x76,0x69,0x65,0x77])][_0x52f9fd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x52f9fd([0x61,0x75,0x74,0x6f]);}function _0x2a76ab(){_0x25a3ba[_0x52f9fd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52f9fd([0x76,0x69,0x65,0x77])][_0x52f9fd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x52f9fd([0x61,0x75,0x74,0x6f]);}}function _0x2dc0e7(_0x237d90){const _0x3671fe=[new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54b5eb=>setTimeout(_0x54b5eb,0x7012d63d^_0x578637)),_0x3f9962[_0x52f9fd([0x74,0x68,0x65,0x6e])](()=>new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x522881=>{const _0x2950ae=0x701be8f6^_0x578637,_0x4751b1=_0x22d16a[_0x52f9fd([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x59a7ea(){_0x4751b1[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x2950ae&&_0x522881();}_0x59a7ea(),_0x4751b1[_0x52f9fd([0x6f,0x6e])](_0x52f9fd([0x61,0x64,0x64]),_0x59a7ea);})),new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x158cd8=>{function _0x1e58d1(){for(const _0x4c3992 in window)if(window[_0x52f9fd([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x52f9fd([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4c3992))&&window[_0x4c3992]==_0x124587)return _0x158cd8();_0x25a3ba[_0x52f9fd([0x73,0x74,0x61,0x74,0x65])]!=_0x52f9fd([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x52f9fd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1e58d1,0x701bfb79^_0x578637);}_0x52a5d4(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1e58d1();})];return window[_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x52f9fd([0x72,0x61,0x63,0x65])](_0x3671fe)[_0x52f9fd([0x74,0x68,0x65,0x6e])](()=>_0x237d90);}async function _0x534a38(){if(await _0x3f9962,_0x52a5d4(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x1999e6=_0x22d16a[_0x52f9fd([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2d0ffe=_0x22d16a[_0x52f9fd([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])](_0x1999e6[_0x52f9fd([0x69,0x64])]),_0x1c3a22=_0x478c2a(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1c3a22[_0x52f9fd([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x1999e6['id'],_0x2d0ffe?_0x2d0ffe['id']:null,!0x0),_0x1c3a22[_0x52f9fd([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x52f9fd([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1c3a22[_0x52f9fd([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1c3a22[_0x52f9fd([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0xcbece1,void(_0x1c3a22[_0x52f9fd([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0xcbece1);}if(_0x52a5d4(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x5421d0=_0x478c2a(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x5421d0[_0x52f9fd([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x52f9fd([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5421d0[_0x52f9fd([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5421d0[_0x52f9fd([0x75,0x70,0x64,0x61,0x74,0x65])]=_0xcbece1,_0x5421d0[_0x52f9fd([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0xcbece1;}_0x25a3ba[_0x52f9fd([0x6d,0x6f,0x64,0x65,0x6c])][_0x52f9fd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xcbece1,_0x25a3ba[_0x52f9fd([0x6d,0x6f,0x64,0x65,0x6c])][_0x52f9fd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xcbece1,_0x25a3ba[_0x52f9fd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x52f9fd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x19793f(){return _0x52a5d4(_0x52f9fd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x478c2a(_0x52f9fd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x52f9fd([0x73,0x74,0x61,0x74,0x65])]==_0x52f9fd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x104914(){return _0x52a5d4(_0x52f9fd([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 _0x5a270b(){return _0x52a5d4(_0x52f9fd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2e83c7(_0x37eec3){const _0x164d70=_0x9301a3();_0x25a3ba[_0x164d70]=_0x52f9fd([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])+_0x37eec3,_0x37eec3[_0x52f9fd([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x52f9fd([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x9301a3()]=_0x124587),_0x37eec3!=_0x52f9fd([0x56,0x61,0x6c,0x69,0x64])&&_0x534a38();}function _0x9301a3(){const _0x15b32e=window[_0x52f9fd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x52f9fd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x52f9fd([0x6e,0x6f,0x77])]())[_0x52f9fd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x52f9fd([0x2e]),'');let _0x1be973=_0x52f9fd([0x4a]);for(let _0x389069=0x0;_0x389069<_0x15b32e[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x389069+=0x2){let _0x32d194=window[_0x52f9fd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15b32e[_0x52f9fd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x389069,_0x389069+0x2));_0x32d194>=_0x17e316[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x32d194-=_0x17e316[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1be973+=_0x17e316[_0x32d194];}return _0x1be973;}function _0x128a51(){const _0x5a353c=_0x46723d[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])](_0x52f9fd([0x2e]));if(0x3!=_0x5a353c[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x41d5ef(_0x5a353c[0x1]);function _0x41d5ef(_0x1e9021){const _0x843f35=_0x1e0df3(_0x1e9021);return _0x843f35&&_0x5ac6f2()?_0x843f35:null;function _0x5ac6f2(){const _0x365ff4=_0x843f35[_0x52f9fd([0x6a,0x74,0x69])],_0x31102b=window[_0x52f9fd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x365ff4[_0x52f9fd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x365ff4[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x16e295={..._0x843f35,[_0x52f9fd([0x6a,0x74,0x69])]:_0x365ff4[_0x52f9fd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x365ff4[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x16e295[_0x52f9fd([0x76,0x63])],_0x2603b5(_0x16e295)==_0x31102b;}}}async function _0x4a0085(){let _0x12c0a8=!0x0;try{const _0x360bd8=_0x46723d[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])](_0x52f9fd([0x2e])),[_0x53fa37,_0x1506d1,_0x16c226]=_0x360bd8;return _0x4fe406(_0x53fa37),await _0x2f1a42(_0x53fa37,_0x1506d1,_0x16c226),_0x12c0a8;}catch(_0x674e70){return!0x1;}function _0x4fe406(_0x146c32){const _0x5cd276=_0x1e0df3(_0x146c32);_0x5cd276&&_0x5cd276[_0x52f9fd([0x61,0x6c,0x67])]==_0x52f9fd([0x45,0x53,0x32,0x35,0x36])||(_0x12c0a8=!0x1);}async function _0x2f1a42(_0x2376a5,_0xf3afb9,_0x120b1a){const _0x56433b=window[_0x52f9fd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x52f9fd([0x66,0x72,0x6f,0x6d])](_0x59112c(_0x120b1a),_0x111f6b=>_0x111f6b[_0x52f9fd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36f8e5=new window[(_0x52f9fd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x52f9fd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2376a5+_0x52f9fd([0x2e])+_0xf3afb9),_0x5a013e=window[_0x52f9fd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x52f9fd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5a013e)return;const _0x4a60ed=await _0x5a013e[_0x52f9fd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x52f9fd([0x6a,0x77,0x6b]),_0x6693a9,{[_0x52f9fd([0x6e,0x61,0x6d,0x65])]:_0x52f9fd([0x45,0x43,0x44,0x53,0x41]),[_0x52f9fd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x52f9fd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x52f9fd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5a013e[_0x52f9fd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x52f9fd([0x6e,0x61,0x6d,0x65])]:_0x52f9fd([0x45,0x43,0x44,0x53,0x41]),[_0x52f9fd([0x68,0x61,0x73,0x68])]:{[_0x52f9fd([0x6e,0x61,0x6d,0x65])]:_0x52f9fd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4a60ed,_0x56433b,_0x36f8e5)||(_0x12c0a8=!0x1);}}function _0x1e0df3(_0x5aeac4){return _0x5aeac4[_0x52f9fd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x52f9fd([0x65,0x79]))?JSON[_0x52f9fd([0x70,0x61,0x72,0x73,0x65])](_0x59112c(_0x5aeac4)):null;}function _0x59112c(_0x266afc){return window[_0x52f9fd([0x61,0x74,0x6f,0x62])](_0x266afc[_0x52f9fd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x52f9fd([0x2b]))[_0x52f9fd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x52f9fd([0x2f])));}function _0x2603b5(_0x1e463e){let _0x3b4513=0x1505;function _0x227f2a(_0x25c622){for(let _0x90f5d0=0x0;_0x90f5d0<_0x25c622[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x90f5d0++){const _0x5c7aa2=_0x25c622[_0x52f9fd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x90f5d0);_0x3b4513=(_0x3b4513<<0x5)+_0x3b4513+_0x5c7aa2,_0x3b4513&=_0x3b4513;}}function _0x19986(_0x32c985){Array[_0x52f9fd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x32c985)?_0x32c985[_0x52f9fd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x19986):_0x32c985&&typeof _0x32c985==_0x52f9fd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x52f9fd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x32c985)[_0x52f9fd([0x73,0x6f,0x72,0x74])]()[_0x52f9fd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x48e61a,_0x53b5fd])=>{_0x227f2a(_0x48e61a),_0x19986(_0x53b5fd);}):_0x227f2a(window[_0x52f9fd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x32c985));}return _0x19986(_0x1e463e),_0x3b4513>>>0x0;}function _0x31258d(_0x5867a2){return _0x5867a2[_0x52f9fd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x52f9fd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x52f9fd([0x30]));}function _0x36986a(_0xd00e53){return _0xd00e53[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])]('')[_0x52f9fd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x52f9fd([0x6a,0x6f,0x69,0x6e])]('');}function _0x52a5d4(_0x438618){return _0x25a3ba[_0x52f9fd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x52f9fd([0x68,0x61,0x73])](_0x438618);}function _0x478c2a(_0x19adeb){return _0x25a3ba[_0x52f9fd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x52f9fd([0x67,0x65,0x74])](_0x19adeb);}function _0xcbece1(){}function _0x52f9fd(_0x203ed5){return _0x203ed5['map'](_0x3afd19=>String['fromCharCode'](_0x3afd19))['join']('');}_0x2e83c7(await _0x23e16b());}(this);}['createRevision'](_0x449032){const _0x2392b7=this['editor']['plugins']['get']('Users');return new h({'id':_0x449032['id'],'name':_0x449032['name'],'creator':_0x449032['creatorId']?_0x2392b7['getUser'](_0x449032['creatorId']):null,'diffData':_0x449032['diffData']||_0x449032['data'],'authors':_0x449032['authorsIds']['map'](_0x3e8db7=>_0x2392b7['getUser'](_0x3e8db7)),'createdAt':new Date(_0x449032['createdAt']),'attributes':_0x449032['attributes'],'fromVersion':_0x449032['fromVersion'],'toVersion':_0x449032['toVersion']});}['addRevision'](_0x3921dc,_0x423785=0x0){this['_revisions']['add'](_0x3921dc,_0x423785);}['getRevision'](_0xd99222){return this['_revisions']['get'](_0xd99222);}['getRevisions'](_0x518bdd={'toJSON':!0x1}){const _0x1c0427=Array['from'](this['_revisions']);return _0x1c0427['reverse'](),_0x518bdd['toJSON']?_0x1c0427['map'](_0x569832=>_0x569832['toJSON']()):_0x1c0427;}['getIndex'](_0x202330){return this['_revisions']['getIndex'](_0x202330);}['getEarlierVisibleRevision'](_0x2e3aeb){const [,_0x5a1447]=this['getRevisionsIterator'](_0x2e3aeb,{'direction':'earlier'});return _0x5a1447;}['getLaterVisibleRevision'](_0xf563b6){const [,_0x2bef6d]=this['getRevisionsIterator'](_0xf563b6,{'direction':'later'});return _0x2bef6d;}['getRevisionsInDiff'](_0x563555){const _0x29da8e=[];for(const _0x59b72e of this['getRevisionsIterator'](_0x563555['newRevisionId']))if(_0x29da8e['push'](_0x59b72e),_0x59b72e['id']===_0x563555['oldRevisionId'])break;return _0x29da8e;}*['getRevisionsIterator'](_0x3a71b4,{direction:_0x411e65='earlier',filter:_0x1f18b7=()=>!0x0}={}){const _0x55ecd7='earlier'===_0x411e65?0x1:-0x1;let _0x5b8f1e=this['_revisions']['get'](_0x3a71b4),_0x3d1bc5=this['getIndex'](_0x5b8f1e);for(yield _0x5b8f1e;_0x5b8f1e;){if(_0x3d1bc5+=_0x55ecd7,_0x5b8f1e=this['getRevision'](_0x3d1bc5),!_0x5b8f1e)return;_0x1f18b7(_0x5b8f1e)&&(yield _0x5b8f1e);}}}function m(_0x2f7244,_0xa58cfe,_0x5a0a9a){const t=_0x2f7244['t'];switch(_0xa58cfe){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'},_0x5a0a9a);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5a0a9a);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const E={'c':_0x364db7,'a':_0x5dcd99,'e':_0x48d005,'r':_0x1c2455,'u':_0x1231a7};class u extends _0x5aa884{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x500ee0,j,_0x24dc87];}constructor(_0x2ac5ca){super(_0x2ac5ca),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x52c132=_0x51a0e0();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x52c132},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x2facf6=this['repository']['getRevision'](0x0),_0x2572b5=_0x2facf6&&null===_0x2facf6['creator']?_0x2facf6:null;if(this['_continueCurrentRevision']=!!_0x2572b5&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x2bde6c=this['_source']['getCurrentRevisionId'](),_0x5b8cc2=this['repository']['getRevision'](_0x2bde6c);if(_0x5b8cc2)this['_startingVersion']=_0x5b8cc2['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x13f391=this['_source']['history']['_operations']['find'](_0x2652ac=>!_0x2652ac['_isInit']),_0x16a948=_0x13f391?_0x13f391['baseVersion']:this['_source']['history']['version'];_0x2facf6?(_0x2facf6['toVersion']<_0x16a948&&_0x2facf6['_update']({'toVersion':_0x16a948}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2572b5['id'],this['_startingVersion']=_0x2572b5['fromVersion']):(this['_startingVersion']=_0x2facf6['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x16a948,this['_continueCurrentRevision']=!0x1);}}else _0x2572b5&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2572b5['toVersion'],this['editor']['model']['document']['history']['version']),_0x2572b5['fromVersion']===_0x2572b5['toVersion']?(0x0!==_0x2572b5['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2572b5['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2572b5['id'],this['_startingVersion']=_0x2572b5['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',_0x27e924=>!_0x27e924),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x18005e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4a9abd;for(const _0x4b56ee in _0x18005e){const _0x11b696=_0x4b56ee,_0x496d53=_0x18005e[_0x11b696];if('revisionHistoryLicenseKeyValid'==_0x496d53||'revisionHistoryLicenseKeyInvalid'==_0x496d53||'revisionHistoryLicenseKeyExpired'==_0x496d53||'revisionHistoryLicenseKeyDomainLimit'==_0x496d53||'revisionHistoryLicenseKeyNotAllowed'==_0x496d53||'revisionHistoryLicenseKeyEvaluationLimit'==_0x496d53||'revisionHistoryLicenseKeyTrialLimit'==_0x496d53||'revisionHistoryLicenseKeyUsageLimit'==_0x496d53){delete _0x18005e[_0x11b696],_0x4a9abd=_0x496d53,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4a9abd&&_0x18005e['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4a9abd&&_0x18005e['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4a9abd&&_0x18005e['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4a9abd&&_0x18005e['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4a9abd&&_0x18005e['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x4a9abd&&_0x18005e['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4a9abd&&_0x18005e['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4c8100=this['repository']['getRevision'](0x0),_0x491876=await this['getRevisionDocumentData'](_0x4c8100),_0x1d8e5d=await this['getRevisionRootsAttributes'](_0x4c8100);this['_replaceEditorDataWithRevisionData'](_0x491876,_0x1d8e5d);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xede415){this['_source']=_0xede415;}async['update'](){const _0x4419b1=await this['_source']['getLatestVersion']();if(_0x4419b1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1401d5=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4419b1});_0x1401d5['authors']=_0x1401d5['authorsIds']['map'](_0x57f861=>this['editor']['plugins']['get']('Users')['getUser'](_0x57f861)),this['currentRevision']['_update'](_0x1401d5);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x23451b={},_0x24c363=null){const _0x31d112=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x24c363>this['currentRevision']['toVersion']&&(_0x24c363=null),null===_0x24c363&&(_0x24c363=await this['_source']['getLatestVersion']());const _0x4cfa5d=this['_getFromVersion'](_0x24c363),_0x6f3566=this['buildRevisionData']({'from':_0x4cfa5d,'to':_0x24c363});if(this['currentRevision']['toVersion']<_0x24c363){const _0x1049c4=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x24c363,'to':_0x24c363});_0x1049c4['authors']=[],_0x1049c4['authorsIds']=[],_0x1049c4['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1049c4,!0x0),delete _0x1049c4['authors'],_0x31d112['push'](_0x1049c4);}_0x23451b['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x23451b['name']=_0x23451b['name']||null,_0x23451b['id']=_0x23451b['id']||_0x51a0e0(),_0x23451b={..._0x23451b,..._0x6f3566};const _0x2c03aa=this['addRevisionData'](_0x23451b);_0x31d112['push'](_0x23451b);const _0x4a31d0=this['repository']['getIndex'](_0x2c03aa);if(0x0!==_0x4a31d0){const _0xa22b6d=this['repository']['getRevision'](_0x4a31d0-0x1);if(_0xa22b6d['fromVersion']!==_0x24c363){const _0x3bed94=this['_revisionDataBuilder']['getData'](_0x24c363,_0xa22b6d['toVersion']),_0x1369c1={'id':_0xa22b6d['id'],'diffData':_0x3bed94['diffData'],'authorsIds':_0x3bed94['authorsIds'],'authors':_0x3bed94['authorsIds']['map'](_0x314337=>this['editor']['plugins']['get']('Users')['getUser'](_0x314337)),'fromVersion':_0x24c363};_0xa22b6d===this['currentRevision']&&(_0x1369c1['createdAt']=new Date(_0x23451b['createdAt']['getTime']()+0xa)),_0xa22b6d['_update'](_0x1369c1,!0x0),delete _0x1369c1['authors'],_0x31d112['push'](_0x1369c1);}}if(this['adapter']){for(const _0x3d87f7 of _0x31d112)this['_bufferUpdate'](_0x3d87f7['id'],_0x3d87f7,!0x0);this['sendBufferedUpdates']();}return _0x2c03aa;}['addRevisionData'](_0x42f2bf){const _0x30128e=this['repository']['createRevision'](_0x42f2bf);return this['adapter']&&_0x30128e['on']('_update',(_0x45ef7a,_0x1dd58e,_0x3bd79f)=>{_0x3bd79f||(this['_bufferUpdate'](_0x1dd58e['id'],_0x1dd58e,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x30128e,this['_findInsertionIndex'](_0x30128e)),_0x30128e;}async['getRevisionDocumentData'](_0x5c04b3){await this['_loadRevisionData'](_0x5c04b3);const _0x35aeb7={};for(const _0x8400cc in _0x5c04b3['diffData']){if(_0x5c04b3['diffData'][_0x8400cc]['attachChange']&&!_0x5c04b3['diffData'][_0x8400cc]['attachChange']['isAttached'])continue;const _0x34f792=this['_removeRevisionMarkers'](JSON['parse'](_0x5c04b3['diffData'][_0x8400cc]['insertions'])),_0x239e4d=this['editor']['editing']['view']['document'],_0x5e3050=new _0x39dd63(_0x239e4d,_0x34f792['map'](_0x2ef518=>P(_0x2ef518,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x35aeb7[_0x8400cc]=this['editor']['data']['processor']['toData'](_0x5e3050),this['editor']['data']['processor']['useFillerType']('default');}return _0x35aeb7;}async['getRevisionRootsAttributes'](_0x1e90c9){await this['_loadRevisionData'](_0x1e90c9);const _0x5c8b13={};for(const _0x347a32 in _0x1e90c9['diffData'])_0x1e90c9['diffData'][_0x347a32]['attachChange']&&!_0x1e90c9['diffData'][_0x347a32]['attachChange']['isAttached']||(_0x5c8b13[_0x347a32]=_0x1e90c9['diffData'][_0x347a32]['attributesAfter']||{});return _0x5c8b13;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x221f1f=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x21dea0=0x0;_0x21dea0<_0x221f1f['length'];_0x21dea0++){const _0x354fff=_0x221f1f[_0x21dea0];let _0x4f730d=!0x1;for(const _0xb91c2d of Object['keys'](_0x354fff))void 0x0===_0x354fff[_0xb91c2d]?delete _0x354fff[_0xb91c2d]:'id'!==_0xb91c2d&&(_0x4f730d=!0x0);_0x4f730d||(_0x221f1f[_0x21dea0]=null);}if(_0x221f1f=_0x221f1f['filter'](_0x89335b=>null!==_0x89335b),!_0x221f1f['length'])return;for(let _0x21d58e=0x0;_0x21d58e<_0x221f1f['length'];_0x21d58e++){const _0x3aa974=_0x221f1f[_0x21d58e];void 0x0!==_0x3aa974['fromVersion']&&void 0x0===_0x3aa974['toVersion']&&(_0x3aa974['toVersion']=this['repository']['getRevision'](_0x3aa974['id'])['toVersion']),void 0x0!==_0x3aa974['toVersion']&&void 0x0===_0x3aa974['fromVersion']&&(_0x3aa974['fromVersion']=this['repository']['getRevision'](_0x3aa974['id'])['fromVersion']);}const _0x251bef=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x221f1f,_0x251bef)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4a2c4c=>{if(_0x4a2c4c){for(const _0x2ec59c of _0x4a2c4c)this['setRevisionData']({'id':_0x2ec59c['id'],'createdAt':_0x2ec59c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x1e982f,_0x4eff37){let _0x413028=this['editor']['config']['get']('initialData'),_0x885d08=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x413028){_0x413028={};for(const _0x4025fa of this['editor']['model']['document']['getRootNames']())_0x413028[_0x4025fa]='';}if('string'==typeof _0x413028&&(_0x413028={'main':_0x413028}),void 0x0===_0x885d08){_0x885d08={};for(const _0x3d01bf of this['editor']['model']['document']['getRootNames']())_0x885d08[_0x3d01bf]={};}let _0x2710ec=!0x1;const _0xe93167=Object['keys'](_0x413028),_0x5018a1=Object['keys'](_0x1e982f);for(const _0x506ebe of _0xe93167){if(_0x413028[_0x506ebe]!==_0x1e982f[_0x506ebe]&&''!==_0x413028[_0x506ebe]['trim']()){_0x2710ec=!0x0;break;}if(!_0x45b9b0(_0x885d08[_0x506ebe],_0x4eff37[_0x506ebe])&&Object['keys'](_0x885d08[_0x506ebe])['length']>0x0){_0x2710ec=!0x0;break;}}_0x2710ec||(_0x2710ec=_0x5018a1['some'](_0x2d9ee4=>!this['editor']['model']['document']['getRoot'](_0x2d9ee4))),_0x2710ec&&_0x538e24('editor-initial-data-replaced-with-revision-data',{'editorData':_0x413028,'editorRootsAttributes':_0x885d08,'revisionData':_0x1e982f,'revisionRootsAttributes':_0x4eff37}),this['editor']['config']['set']('initialData',_0x1e982f),this['editor']['config']['set']('rootsAttributes',_0x4eff37);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x543a37=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x543a37['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1e4108){const _0xbf8c67=this['repository']['getRevisions']();_0xbf8c67['reverse']();let _0x1b2359=0x0;for(;_0x1b2359<_0xbf8c67['length'];){const _0x9fd7d0=_0xbf8c67[_0x1b2359];if(_0x9fd7d0===this['currentRevision']){_0x1b2359++;continue;}if(_0x9fd7d0['id']===this['_initialRevisionId'])break;const _0x57c75b=_0x1e4108['toVersion']-_0x9fd7d0['toVersion']||_0x1e4108['fromVersion']-_0x9fd7d0['fromVersion'];if(_0x57c75b>0x0)break;if(_0x57c75b<0x0)_0x1b2359++;else{if(!_0x1e4108['creator']&&_0x9fd7d0['creator'])break;if(_0x9fd7d0['creator']||!_0x1e4108['creator']){if(_0x1e4108['createdAt']>_0x9fd7d0['createdAt'])break;_0x1b2359++;}else _0x1b2359++;}}return _0x1b2359;}['setRevisionData'](_0x4a0dbc){const _0x4c50f7=this['repository']['getRevision'](_0x4a0dbc['id']);if(_0x4a0dbc['createdAt']&&(_0x4a0dbc['createdAt']=new Date(_0x4a0dbc['createdAt'])),_0x4a0dbc['authorsIds']){const _0x408d49=this['editor']['plugins']['get']('Users');_0x4a0dbc['authors']=_0x4a0dbc['authorsIds']['map'](_0x22afa0=>_0x408d49['getUser'](_0x22afa0));}_0x4c50f7['_update'](_0x4a0dbc,!0x0);}['buildRevisionData']({revision:_0x156ca1=null,from:_0x57b08a=null,to:_0x2977b0=null}){_0x57b08a=null!==_0x57b08a?_0x57b08a:_0x156ca1['fromVersion'],_0x2977b0=null!==_0x2977b0?_0x2977b0:_0x156ca1['toVersion'];const _0x513d7e=this['_revisionDataBuilder']['getData'](_0x57b08a,_0x2977b0),_0x32a785={'diffData':_0x513d7e['diffData'],'authorsIds':_0x513d7e['authorsIds'],'fromVersion':_0x57b08a,'toVersion':_0x2977b0};if(!_0x156ca1||_0x2977b0!==_0x156ca1['toVersion']){const _0x33489b=_0x2977b0-0x1,_0x3958d8=this['_source']['history']['getOperation'](_0x33489b);_0x32a785['createdAt']=_0x3958d8&&_0x3958d8['createdAt']||new Date();}if(this['_loadedStateData']&&_0x57b08a===this['_loadedStateData']['fromVersion']){for(const _0x4d1c9b of this['_loadedStateData']['authors'])_0x32a785['authorsIds']['includes'](_0x4d1c9b['id'])||_0x32a785['authorsIds']['push'](_0x4d1c9b['id']);}return _0x32a785;}['_loadRevisionData'](_0x376f5d){if(!_0x376f5d||_0x376f5d['diffData'])return Promise['resolve']();{const _0x5c14ff=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x5c14ff,'revisionId':_0x376f5d['id']})['then'](_0x522cfb=>{_0x376f5d['diffData']=_0x522cfb['diffData'];});}}['_bufferUpdate'](_0x52ee3a,_0x1e9618,_0x2a4803){if(this['_bufferedUpdates']['has'](_0x52ee3a)){const _0x1404a7=this['_bufferedUpdates']['get'](_0x52ee3a);_0x1e9618=_0x2a4803?{..._0x1404a7,..._0x1e9618}:{..._0x1e9618,..._0x1404a7};}this['_bufferedUpdates']['set'](_0x52ee3a,_0x1e9618);}['_getFromVersion'](_0x27628b){const _0x113985=this['repository']['getRevisions']();_0x113985['reverse'](),_0x113985['shift']();const _0x10e955=_0x113985['find'](_0xed9ea1=>_0xed9ea1['toVersion']<=_0x27628b)['toVersion'];return _0x10e955<this['_startingVersion']?this['_startingVersion']:_0x10e955;}['_createInitialRevision'](_0x188918){const _0x213c58=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x213c58)this['_initialRevisionId']=_0x213c58['id'];else{const _0x31bffb=!this['editor']['model']['document']['roots']['find'](_0x3c404c=>this['editor']['model']['hasContent'](_0x3c404c)),_0x16e902=this['editor']['plugins']['get']('Users')['me']['id'],_0x1481d1=m(this['editor']['locale'],_0x31bffb?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x188918,'to':_0x188918,'id':this['_initialRevisionId'],'name':_0x1481d1,'creatorId':_0x16e902});}}['_createCurrentRevision'](_0x1ebf2e){const _0x4f73b3=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4f73b3),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1ebf2e,'to':_0x1ebf2e,'id':_0x4f73b3,'name':'','creatorId':null}));}['_makeRevision']({name:_0x339d48,from:_0x20afc5,to:_0x20dd66,creatorId:_0x27ccea,id:_0x2430ae}){const _0x2a73e8=this['buildRevisionData']({'from':_0x20afc5,'to':_0x20dd66});_0x2a73e8['name']=_0x339d48,_0x2a73e8['creatorId']=_0x27ccea,_0x2a73e8['id']=_0x2430ae;const _0x284c5f=this['addRevisionData'](_0x2a73e8);return this['adapter']&&this['_bufferUpdate'](_0x2a73e8['id'],_0x2a73e8,!0x0),_0x284c5f;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x32f498){return(_0x32f498=_0x32f498['filter'](_0x20eaa9=>!_0x20eaa9['name']||'revision-start'!==_0x20eaa9['name']&&'revision-end'!==_0x20eaa9['name']))['forEach'](_0x4498bd=>{'string'!=typeof _0x4498bd&&(_0x4498bd['children']=this['_removeRevisionMarkers'](_0x4498bd['children']),_0x4498bd['attributes']=_0x4498bd['attributes']['filter'](_0x548e2c=>!_0x548e2c[0x0]['startsWith']('data-revision-')));}),_0x32f498;}}function P(_0x45dbdf,_0x407bf1){const _0x157df1=_0x407bf1['editing']['view']['document'];if('string'==typeof _0x45dbdf)return new _0xbf05a4(_0x157df1,_0x45dbdf);{const _0x343daa=_0x45dbdf['children']['map'](_0x5bb798=>P(_0x5bb798,_0x407bf1));return new(E[_0x45dbdf['type']]||_0x34efa8)(_0x157df1,_0x45dbdf['name'],_0x45dbdf['attributes'],_0x343daa);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3300f6){this['editor']=_0x3300f6,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'](_0x300432){this['source']=_0x300432;const _0x53e7e6=new Map(),_0x4823d1=new Map(),_0x481dc0=this['editor']['model']['document']['roots']['map'](_0x3e0bb0=>_0x3e0bb0['rootName']);for(const _0x8c6caf of _0x481dc0){const _0x2ccbb5=this['editor']['model']['document']['getRoot'](_0x8c6caf),_0x340d00=T(_0x2ccbb5);_0x53e7e6['set'](_0x8c6caf,_0x340d00),_0x4823d1['set'](_0x8c6caf,Object['fromEntries'](_0x2ccbb5['getAttributes']()));}const _0x681562=Array['from'](this['editor']['model']['markers'])['map'](_0x3e4284=>[_0x3e4284['name'],_0x3e4284['getRange']()]),_0x26f108=this['source']['version'];this['_saveMetaData'](_0x26f108,_0x53e7e6,_0x681562,_0x4823d1),this['_startingRevisionId']=this['_revisionId'];const _0x29b4dc=new Map(),_0x5eb0fc=new Map();for(const _0x3301e2 of _0x481dc0){const _0xacaba2=F(_0x3301e2);_0x29b4dc['set'](_0x3301e2,_0xacaba2),_0x5eb0fc['set'](_0x3301e2,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x29b4dc,[],_0x5eb0fc);}['getData'](_0x588a2b,_0x5b5596){if(this['_lastFrom']===_0x588a2b&&this['_lastTo']<=_0x5b5596)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5b5596,!0x0);else{if(!this['_savedMetaData']['has'](_0x588a2b)){const _0xe80ab7=this['_getPreviousFrom'](_0x588a2b);this['_calculateMetaData'](_0xe80ab7,_0x588a2b,!0x1);}this['_calculateMetaData'](_0x588a2b,_0x5b5596,!0x0);}return this['_lastFrom']=_0x588a2b,this['_lastTo']=_0x5b5596,this['_getState']();}['loadState'](_0x1d7aa7){this['_reset'](),this['_lastFrom']=_0x1d7aa7['fromVersion'],this['_lastTo']=_0x1d7aa7['toVersion'];for(const _0x2cf754 in _0x1d7aa7['diffData']){const _0x1bee5a=_0x1d7aa7['diffData'][_0x2cf754]['attachChange'],_0x3df02e=_0x2cf058(_0x1d7aa7['diffData'][_0x2cf754]['attributesBefore'])||{},_0x70b7dd=this['_makeModelFromViewString'](_0x1d7aa7['diffData'][_0x2cf754]['deletions']);_0x70b7dd['rootName']=_0x2cf754,_0x70b7dd['_isAttached']=!_0x1bee5a||!_0x1bee5a['isAttached'],_0x70b7dd['isAttached']=()=>_0x70b7dd['_isAttached'],this['_baseRoots']['set'](_0x2cf754,_0x70b7dd),this['_baseRootsAttributes']['set'](_0x2cf754,_0x3df02e),_0x1bee5a&&this['_touchedRoots']['set'](_0x2cf754,_0x1bee5a);const _0x425ab8=this['_makeIdsRoot'](_0x70b7dd);this['_baseIdsRoots']['set'](_0x2cf754,_0x425ab8);for(const [_0x19fe8b,_0x2ffb19]of _0x70b7dd['markers']){if(!_0x19fe8b['startsWith']('revision:'))continue;const _0x1bb4a0=_0x19fe8b['split'](':')[0x2];for(const _0x55e44c of _0x2ffb19['getWalker']({'singleCharacters':!0x0})){const _0x22ac41=this['_getVidAttributeName'](_0x55e44c),_0x1573ca='elementEnd'==_0x55e44c['type']?_0x55e44c['previousPosition']['path']['slice'](0x0,-0x1):_0x55e44c['previousPosition']['path'],_0xa27d6e=_0x425ab8['getNodeByPath'](_0x1573ca)['getAttribute'](_0x22ac41);this['_touched']['set'](_0xa27d6e,{'userId':_0x1bb4a0});}}}this['_startingRevisionId']=this['_revisionId'];const _0x12b950=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x22fb58=>!this['_touched']['has'](_0x22fb58));let _0x47fb52=0x0;const _0x1bc0cd=new Map();for(const _0x5f03d4 in _0x1d7aa7['diffData']){const _0x47894a=_0x1d7aa7['diffData'][_0x5f03d4]['attachChange'],_0x114e09=_0x2cf058(_0x1d7aa7['diffData'][_0x5f03d4]['attributesAfter'])||{},_0x309b5f=this['_makeModelFromViewString'](_0x1d7aa7['diffData'][_0x5f03d4]['insertions']);_0x309b5f['rootName']=_0x5f03d4,_0x309b5f['_isAttached']=!_0x47894a||_0x47894a['isAttached'],_0x309b5f['isAttached']=()=>_0x309b5f['_isAttached'],this['_diffRoots']['set'](_0x5f03d4,_0x309b5f),this['_diffRootsAttributes']['set'](_0x5f03d4,_0x114e09);const _0x42bd20=this['_makeIdsRoot'](_0x309b5f,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5f03d4,_0x42bd20),_0x1bc0cd['set'](_0x5f03d4,_0x309b5f['isAttached']()?_0x114e09:{});for(const [_0x744106,_0x15f7d5]of _0x309b5f['markers']){if(!_0x744106['startsWith']('revision:'))continue;const _0x34b290=_0x744106['split'](':')[0x2];for(const _0x17d4fa of _0x15f7d5['getWalker']({'singleCharacters':!0x0})){const _0x4f28ad=this['_getVidAttributeName'](_0x17d4fa),_0x5bceb3=this['_revisionId']++,_0x36dffc='elementEnd'==_0x17d4fa['type']?_0x17d4fa['previousPosition']['path']['slice'](0x0,-0x1):_0x17d4fa['previousPosition']['path'];_0x42bd20['getNodeByPath'](_0x36dffc)['_setAttribute'](_0x4f28ad,_0x5bceb3),this['_touched']['set'](_0x5bceb3,{'userId':_0x34b290});}}for(const _0x1b9f8a of this['editor']['model']['createRangeIn'](_0x309b5f)['getWalker']({'singleCharacters':!0x0})){const _0x397c89=this['_getVidAttributeName'](_0x1b9f8a),_0x5cd38c='elementEnd'==_0x1b9f8a['type']?_0x1b9f8a['previousPosition']['path']['slice'](0x0,-0x1):_0x1b9f8a['previousPosition']['path'],_0x18ce7a=_0x42bd20['getNodeByPath'](_0x5cd38c);_0x18ce7a['getAttribute'](_0x397c89)>0x0||_0x18ce7a['_setAttribute'](_0x397c89,_0x12b950[_0x47fb52++]);}for(const [_0x266c0e,_0x52404e]of _0x309b5f['markers'])_0x266c0e['startsWith']('revision:')||this['_markers']['set'](_0x266c0e,_0x52404e);}const _0x4e564c=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x4e564c),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4e564c,0x1));const _0x2bb283=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2bb283),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2bb283,0x1));const _0x42fb26=Array['from'](this['_diffRoots'])['map'](([_0x2a64a7,_0x218c23])=>[_0x2a64a7,T(_0x218c23)]);this['_saveMetaData'](this['_lastTo'],_0x42fb26,this['_markers'],_0x1bc0cd);}['_makeModelFromViewString'](_0xf18614){const _0x776276=JSON['parse'](_0xf18614),_0x3e62c6=this['editor']['editing']['view']['document'],_0x573a33=new _0x39dd63(_0x3e62c6,_0x776276['map'](_0x5e9a5e=>P(_0x5e9a5e,this['editor'])));return this['editor']['data']['toModel'](_0x573a33);}['_saveMetaData'](_0x180b38,_0x286378,_0x4d424b,_0x5ec415){const _0x38d8db=new Map(_0x286378),_0x57f50c=new Map(_0x2cf058(_0x5ec415)),_0x236a36=new Map();for(const [_0xb04a48,_0x424cae]of _0x4d424b)_0x236a36['set'](_0xb04a48,{'start':_0x424cae['start']['clone'](),'end':_0x424cae['end']['clone'](),'rootName':_0x424cae['root']['rootName']});this['_savedMetaData']['set'](_0x180b38,{'roots':_0x38d8db,'markers':_0x236a36,'rootsAttributes':_0x57f50c});}['_removeMetaData'](_0x39a8e8){this['_savedMetaData']['delete'](_0x39a8e8);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x2e57ad,_0x313e06=null){let _0xcc4796=null;_0x2e57ad['is']('documentFragment')||(_0xcc4796=new ut(_0x2e57ad['name'],{'vid_start':null===_0x313e06?this['_revisionId']++:_0x313e06++}));const _0xe7f8cf=[];for(const _0x249a15 of _0x2e57ad['getChildren']())if(_0x249a15['is']('element')){_0xe7f8cf['push'](this['_makeIdsRoot'](_0x249a15,_0x313e06));const _0x174f19=_0xe7f8cf[_0xe7f8cf['length']-0x1];null!==_0x313e06&&(_0x313e06=_0x174f19['is']('element','$text')?_0x174f19['getAttribute']('vid')+0x1:_0x174f19['getAttribute']('vid_end')+0x1);}else{for(let _0x5411a9=0x0;_0x5411a9<_0x249a15['offsetSize'];_0x5411a9++)_0xe7f8cf['push'](new ut('$text',{'vid':null===_0x313e06?this['_revisionId']++:_0x313e06++}));}if(_0x2e57ad['is']('documentFragment')){const _0x5085cf=F(_0x2e57ad['rootName']);return _0x5085cf['_insertChild'](0x0,_0xe7f8cf),_0x5085cf;}return _0xcc4796['_setAttribute']('vid_end',null===_0x313e06?this['_revisionId']++:_0x313e06++),_0xcc4796['_insertChild'](0x0,_0xe7f8cf),_0xcc4796;}['_calculateMetaData'](_0x33b15b,_0x5bbcf8,_0x157399){this['_reset']();const {roots:_0x5e552a,markers:_0x537a10,rootsAttributes:_0x5db840}=this['_savedMetaData']['get'](_0x33b15b);this['_baseRoots']=new Map(_0x5e552a),this['_baseRootsAttributes']=new Map(_0x2cf058(_0x5db840));for(const [_0x3bbb2a,_0x57fa9b]of this['_baseRoots'])if('$graveyard'!==_0x3bbb2a&&(this['_diffRoots']['set'](_0x3bbb2a,T(_0x57fa9b)),this['_diffRootsAttributes']=new Map(_0x2cf058(_0x5db840)),_0x157399)){const _0x295a69=this['_revisionId'];this['_idsRoots']['set'](_0x3bbb2a,this['_makeIdsRoot'](_0x57fa9b)),this['_baseIdsRoots']['set'](_0x3bbb2a,this['_makeIdsRoot'](_0x57fa9b,_0x295a69));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x157399&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x16e950,_0x1c5d67]of _0x537a10){const _0x542cb7=this['_baseRoots']['get'](_0x1c5d67['rootName']),_0x15654f=this['_diffRoots']['get'](_0x1c5d67['rootName']),_0x562470=new ft(this['_fixPosition'](_0x1c5d67['start'],_0x542cb7),this['_fixPosition'](_0x1c5d67['end'],_0x542cb7)),_0x5e4a2c=this['_fixRange'](_0x562470,_0x15654f);_0x542cb7['markers']['set'](_0x16e950,_0x562470),this['_markers']['set'](_0x16e950,_0x5e4a2c);}this['_applyOperations'](_0x33b15b,_0x5bbcf8,_0x157399);}['_applyOperations'](_0x552707,_0x5109df,_0x1585ba){for(const _0x5090e3 of this['source']['getOperations'](_0x552707,_0x5109df))this['_handleOperation'](_0x5090e3,_0x1585ba);for(const _0x1b7fe2 of this['_diffRoots']['values']())_0x1b7fe2['markers']['clear']();for(const [_0x3fe9c0,_0x2191a7]of this['_markers']){this['_diffRoots']['get'](_0x2191a7['root']['rootName'])['markers']['set'](_0x3fe9c0,_0x2191a7['clone']());}const _0x36665d=new Map(),_0x4f0a89=new Map();for(const [_0x4be7ff,_0x4b022a]of this['_diffRoots'])_0x36665d['set'](_0x4be7ff,T(_0x4b022a)),_0x4f0a89['set'](_0x4be7ff,this['_diffRootsAttributes']['get'](_0x4be7ff));this['_saveMetaData'](_0x5109df,_0x36665d,this['_markers'],_0x4f0a89);}['_getPreviousFrom'](_0x34efa1){const _0x1ecd76=Array['from'](this['_savedMetaData']['keys']());_0x1ecd76['sort']((_0x4e2ea8,_0x50e741)=>_0x4e2ea8-_0x50e741),_0x1ecd76['reverse']();for(const _0x1643c0 of _0x1ecd76)if(_0x1643c0<_0x34efa1)return _0x1643c0;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x11408a,_0x3c5197){const _0x583592=Array['from'](_0x3c5197['markers'])['map'](([_0x313c8c,_0x43a4ff])=>[_0x313c8c,this['_fixRange'](_0x43a4ff,_0x11408a)]);_0x11408a['markers']=new Map(_0x583592);}['_transformMarkers'](_0x5bcbe2){for(const _0x2ddad1 of this['_markers']['values']()){const _0x2c7493=_0x2ddad1['getTransformedByOperation'](_0x5bcbe2),_0x462fe3=ft['_createFromRanges'](_0x2c7493);_0x2ddad1['start']=_0x462fe3['start'],_0x2ddad1['end']=_0x462fe3['end'];}}['_handleOperation'](_0x471737,_0x568b71){if('addRoot'!=_0x471737['type']&&'detachRoot'!=_0x471737['type']){if('insert'==_0x471737['type']){const _0x56f48c=_0x471737['position']['root']['rootName'];this['_diffRoots']['has'](_0x56f48c)||(this['_diffRoots']['set'](_0x56f48c,F(_0x56f48c,!0x0)),this['_diffRootsAttributes']['set'](_0x56f48c,{}),_0x568b71&&this['_idsRoots']['set'](_0x56f48c,F(_0x56f48c,!0x0)));}else{if('addRootAttribute'==_0x471737['type']||'removeRootAttribute'==_0x471737['type']||'changeRootAttribute'==_0x471737['type'])return void this['_handleRootAttributeOperation'](_0x471737);'marker'==_0x471737['type']&&this['_handleMarkerOperation'](_0x471737);}if('marker'!==_0x471737['type']){const _0x3c3b6b=this['_cloneOperation'](_0x471737,this['_diffRoots']);_0x3c3b6b['_execute'](),this['_transformMarkers'](_0x3c3b6b);}if(_0x568b71)switch(_0x471737['type']){case'insert':this['_handleInsertOperation'](_0x471737);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x471737);break;case'merge':this['_handleMergeOperation'](_0x471737);break;case'split':this['_handleSplitOperation'](_0x471737);}}else this['_handleRootOperation'](_0x471737,_0x568b71);}['_cloneOperation'](_0x1a19ab,_0x3f1837){const _0x9a2b8=_0x1a19ab['clone']();return _0x9a2b8['_authorId']=_0x1a19ab['_authorId'],this['_fixOperation'](_0x9a2b8,_0x3f1837),_0x9a2b8;}['_getBaseVids'](_0x4b6b87){return _0x4b6b87['map'](_0x325d17=>{const _0x4643d4=this['_getVidAttributeName'](_0x325d17);return Number(_0x325d17['item']['getAttribute'](_0x4643d4));});}['_generateTape'](_0x23712c,_0x36b865){if(_0x23712c['is']('element','$text'))_0x36b865['push']({'item':_0x23712c,'type':'text'});else{_0x23712c['is']('element')&&_0x36b865['push']({'item':_0x23712c,'type':'elementStart'});for(const _0x247aa8 of _0x23712c['getChildren']())this['_generateTape'](_0x247aa8,_0x36b865);_0x23712c['is']('element')&&_0x36b865['push']({'item':_0x23712c,'type':'elementEnd'});}return _0x36b865;}['_getState'](){const _0xa05f62=new Map(this['_touched']),_0x33b011=new Map(_0xa05f62),_0x1f6711=new Map(),_0x4dae94={'insertions':{},'deletions':{}},_0x1236e2={'insertions':{},'deletions':{}},_0x3284e1=new Map(),_0x329896=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x329896['delete']('$graveyard');for(const _0x639d3b of _0x329896){const _0x1fa268=this['_diffRoots']['get'](_0x639d3b)||F(_0x639d3b,!0x1),_0x355476=this['_baseRoots']['get'](_0x639d3b)||F(_0x639d3b,!0x1);_0x1fa268['isAttached']()||_0x355476['isAttached']()?(_0x4dae94['insertions'][_0x639d3b]=T(_0x1fa268),_0x4dae94['deletions'][_0x639d3b]=T(_0x355476),this['_copyMarkers'](_0x4dae94['deletions'][_0x639d3b],_0x355476),this['_copyMarkers'](_0x4dae94['insertions'][_0x639d3b],_0x1fa268),_0x1236e2['insertions'][_0x639d3b]=this['_generateTape'](this['_idsRoots']['get'](_0x639d3b),[]),_0x1236e2['deletions'][_0x639d3b]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x639d3b)||F(_0x639d3b,!0x1),[])):_0x329896['delete'](_0x639d3b);}for(const _0x4a1f34 of _0x329896){const _0x4a2f98=_0x1236e2['insertions'][_0x4a1f34];for(const _0x316c4a of _0x4a2f98){const _0x7ff7b5=this['_getVidAttributeName'](_0x316c4a),_0x222c7e=_0x316c4a['item']['getAttribute'](_0x7ff7b5);_0x33b011['delete'](_0x222c7e),_0x222c7e>=this['_startingRevisionId']&&_0x1f6711['set'](_0x222c7e,_0xa05f62['get'](_0x222c7e));}}for(const _0x53faa2 of _0x329896){const _0x3a7449=_0x1236e2['insertions'][_0x53faa2],_0x5aa3c0=this['_getBaseVids'](_0x1236e2['deletions'][_0x53faa2]);let _0x30ee47=0x0;for(const _0x5726aa of _0x3a7449){const _0x580237=this['_getVidAttributeName'](_0x5726aa),_0x2cab6e=_0x5726aa['item']['getAttribute'](_0x580237);if(!_0x1f6711['has'](_0x2cab6e)&&!_0x3284e1['has'](_0x2cab6e)){if(_0x33b011['has'](_0x2cab6e))_0x30ee47++;else{if(_0x2cab6e!=_0x5aa3c0[_0x30ee47]){const _0xc0f33d=_0xa05f62['get'](_0x2cab6e)||_0xa05f62['get'](_0x5aa3c0[_0x30ee47]);for(;_0x2cab6e!=_0x5aa3c0[_0x30ee47];)_0x33b011['has'](_0x5aa3c0[_0x30ee47])||(_0x3284e1['set'](_0x5aa3c0[_0x30ee47],_0xc0f33d),_0xa05f62['set'](_0x5aa3c0[_0x30ee47],_0xc0f33d)),_0x30ee47++;}_0x30ee47++;}}}}for(const _0x4c7aa6 of _0x329896){const _0x2c2733=_0x1236e2['insertions'][_0x4c7aa6];for(const _0x5e8a84 of _0x2c2733){const _0x9e27d8=this['_getVidAttributeName'](_0x5e8a84),_0xeb7f40=_0x5e8a84['item']['getAttribute'](_0x9e27d8);if(_0x3284e1['has'](_0xeb7f40)){const _0x44cf14=_0x3284e1['get'](_0xeb7f40);_0x33b011['has'](_0xeb7f40)||_0x33b011['set'](_0xeb7f40,{..._0x44cf14}),_0x1f6711['set'](_0xeb7f40,{..._0x44cf14});}}}for(const _0xe0d834 of _0x33b011['keys']())_0xe0d834>=this['_startingRevisionId']&&_0x33b011['delete'](_0xe0d834);const _0x3e353a=new Map();for(const _0x231429 of _0x329896){let _0x4a1401=_0x1236e2['insertions'][_0x231429];for(const _0x132222 of _0x4a1401)if(_0x132222['item']['is']('element','tableCell')){const _0x4a3481=this['_getVidAttributeName'](_0x132222),_0x17b623=_0x132222['item']['getAttribute'](_0x4a3481);if(_0x1f6711['has'](_0x17b623)){const _0x2eb1c5=_0x132222['item']['parent']['parent']['getAttribute']('vid_start'),_0x3e4cbe=_0x3e353a['get'](_0x2eb1c5)||new Set();_0x3e4cbe['add'](_0x1f6711['get'](_0x17b623)['userId']),_0x3e353a['set'](_0x2eb1c5,_0x3e4cbe);}}_0x4a1401=_0x1236e2['deletions'][_0x231429];for(const _0x37931e of _0x4a1401)if(_0x37931e['item']['is']('element','tableCell')){const _0x331e0c=this['_getVidAttributeName'](_0x37931e),_0x1936b6=_0x37931e['item']['getAttribute'](_0x331e0c);if(_0x33b011['has'](_0x1936b6)){const _0x1e4786=_0x37931e['item']['parent']['parent']['getAttribute']('vid_start'),_0x21a947=_0x3e353a['get'](_0x1e4786)||new Set();_0x21a947['add'](_0x33b011['get'](_0x1936b6)['userId']),_0x3e353a['set'](_0x1e4786,_0x21a947);}}for(const _0x52593d of _0x3e353a['keys']())(_0x1f6711['has'](_0x52593d)||_0x33b011['has'](_0x52593d))&&_0x3e353a['delete'](_0x52593d);}for(const _0x547c58 of _0x329896){const _0x3136e6=_0x1236e2['insertions'][_0x547c58];let _0x36dd18=null,_0x33f9b1=null;for(const _0x2293a5 of _0x3136e6){const _0x34ea45=this['_getVidAttributeName'](_0x2293a5),_0x1b7ab3=_0x2293a5['item']['getAttribute'](_0x34ea45),_0x5d0e6f=_0x3e353a['get'](_0x1b7ab3);_0x5d0e6f&&'elementStart'==_0x2293a5['type']&&(_0x36dd18=Array['from'](_0x5d0e6f)[0x0],_0x33f9b1=_0x2293a5['item']['getAttribute']('vid_end')),_0x36dd18&&(_0x33b011['set'](_0x1b7ab3,{'userId':_0x36dd18}),_0x1f6711['set'](_0x1b7ab3,{'userId':_0x36dd18})),_0x1b7ab3==_0x33f9b1&&(_0x36dd18=null,_0x33f9b1=null);}}const _0x5407fe={},_0x1696ed=new Set();for(const _0x591a28 of _0x329896){const _0x1e8f3c=_0x4dae94['deletions'][_0x591a28],_0x4b9436=_0x4dae94['insertions'][_0x591a28];for(const {userId:_0x1cf3aa}of this['_touchedMarkers']['values']())null!==_0x1cf3aa&&_0x1696ed['add'](_0x1cf3aa);for(const {userId:_0x1e9181}of this['_touchedRoots']['values']())null!==_0x1e9181&&_0x1696ed['add'](_0x1e9181);this['_markChanges'](_0x4b9436,_0x1236e2['insertions'][_0x591a28],_0x1f6711,'insertion',_0x1696ed),this['_markChanges'](_0x1e8f3c,_0x1236e2['deletions'][_0x591a28],_0x33b011,'deletion',_0x1696ed),_0x5407fe[_0x591a28]={'insertions':this['_prepareViewToSave'](_0x4b9436),'deletions':this['_prepareViewToSave'](_0x1e8f3c),'attachChange':this['_touchedRoots']['get'](_0x591a28)||null,'attributesBefore':_0x2cf058(this['_baseRootsAttributes']['get'](_0x591a28))||{},'attributesAfter':_0x2cf058(this['_diffRootsAttributes']['get'](_0x591a28))};}return{'diffData':_0x5407fe,'authorsIds':Array['from'](_0x1696ed)};}['_processRootBeforeSave'](_0x41d5a5){for(const [,_0x1c2e46]of _0x41d5a5['markers']){const _0x50dfe0=_0x1c2e46['start']['getAncestors']()['filter'](_0xc6d29c=>'tableCell'==_0xc6d29c['name']);for(const _0x59e6ea of _0x50dfe0)0x1==_0x59e6ea['childCount']&&_0x59e6ea['getChild'](0x0)['is']('element','paragraph')&&_0x59e6ea['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x379b17){this['_processRootBeforeSave'](_0x379b17);const _0x4e90d0=this['editor']['data']['toView'](_0x379b17,{}),_0x4454ed=Array['from'](_0x4e90d0['getChildren']())['map'](_0x36cd44=>this['_getViewJson'](_0x36cd44));return JSON['stringify'](_0x4454ed);}['_getViewJson'](_0x4c5ebd){if(_0x4c5ebd['is']('$text'))return _0x4c5ebd['data'];{const _0x1eb5b5=_0x4c5ebd;return{'type':Object['keys'](E)['find'](_0x4843f8=>_0x4c5ebd instanceof E[_0x4843f8]),'name':_0x1eb5b5['name'],'attributes':Array['from'](_0x1eb5b5['getAttributes']()),'children':Array['from'](_0x1eb5b5['getChildren']())['map'](_0x3f6d25=>this['_getViewJson'](_0x3f6d25))};}}['_markChanges'](_0x8db94f,_0x2dbbfb,_0x8bdce1,_0x54b2dd,_0x4097a5){let _0x59e04a=null,_0x5b17be=null,_0x444886=0x0;const _0x1c80d5=this['editor']['model'];for(let _0x588b59=0x0;_0x588b59<_0x2dbbfb['length'];_0x588b59++){const _0x499977=this['_getVidAttributeName'](_0x2dbbfb[_0x588b59]),_0x32f78b=_0x2dbbfb[_0x588b59]['item']['getAttribute'](_0x499977),_0x2df9f1=_0x8bdce1['get'](_0x32f78b),_0x31b55c=_0x588b59==_0x2dbbfb['length']-0x1;(!_0x59e04a&&_0x2df9f1&&(_0x59e04a=_0x2df9f1,_0x5b17be=_0x2dbbfb[_0x588b59]),_0x59e04a&&(!_0x2df9f1||_0x2df9f1['userId']!=_0x59e04a['userId']))&&(_0x4437aa(_0x2df9f1,B(_0x5b17be,_0x8db94f,_0x1c80d5),B(_0x2dbbfb[_0x588b59],_0x8db94f,_0x1c80d5)),_0x59e04a=_0x2df9f1||null,_0x5b17be=_0x2df9f1?_0x2dbbfb[_0x588b59]:null),_0x59e04a&&_0x31b55c&&_0x4437aa(_0x2df9f1,B(_0x5b17be,_0x8db94f,_0x1c80d5),J(_0x2dbbfb[_0x588b59],_0x8db94f,_0x1c80d5));}function _0x4437aa(_0x5a4c88,_0x36e730,_0x5c723f){const _0x15e732=_0x59e04a['userId'],_0x292f58='revision:'+_0x54b2dd+':'+_0x15e732+':'+_0x444886++,_0x3cba0c=_0x1c80d5['createRange'](_0x36e730,_0x5c723f);_0x8db94f['markers']['set'](_0x292f58,_0x3cba0c),null!==_0x15e732&&_0x4097a5['add'](_0x15e732);}}['_getVidAttributeName'](_0x92fe63){switch(_0x92fe63['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x582193,_0x559a12){_0x582193['baseVersion']=null;for(const _0x59ad59 in _0x582193){const _0x548f97=_0x582193[_0x59ad59];if(_0x548f97 instanceof vt){const _0x1693b6=_0x559a12['get'](_0x548f97['root']['rootName']);_0x582193[_0x59ad59]=this['_fixPosition'](_0x548f97,_0x1693b6);}if(_0x548f97 instanceof ft){const _0x2e6661=_0x559a12['get'](_0x548f97['root']['rootName']);_0x582193[_0x59ad59]=this['_fixRange'](_0x548f97,_0x2e6661);}'root'===_0x59ad59&&(_0x582193['root']=_0x559a12['get'](_0x582193['root']['rootName']));}}['_fixRange'](_0x5a26d4,_0x324f2f){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5a26d4['start'],_0x324f2f),this['_fixPosition'](_0x5a26d4['end'],_0x324f2f));}['_fixPosition'](_0x3708dc,_0x45f596){return this['editor']['model']['createPositionFromPath'](_0x45f596,_0x3708dc['path'],_0x3708dc['stickiness']);}['_handleInsertOperation'](_0x3ef2b8){const _0x1e9073=this['_idsRoots']['get'](_0x3ef2b8['position']['root']['rootName']),_0xb0b45d=this['_fixPosition'](_0x3ef2b8['position'],_0x1e9073),_0x2c8d8b=null===_0x3ef2b8['_authorId']?null:_0x3ef2b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x46df98=_0xb0b45d['parent'],_0x40b482=this['_revisionId'],_0x21a8e0=[];for(const _0x123b05 of _0x3ef2b8['nodes'])if(_0x123b05['is']('element'))_0x21a8e0['push'](this['_makeIdsRoot'](_0x123b05));else{for(let _0x124ad0=0x0;_0x124ad0<_0x123b05['offsetSize'];_0x124ad0++)_0x21a8e0['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x460e60=this['_revisionId'];for(let _0x2057e3=_0x40b482;_0x2057e3<_0x460e60;_0x2057e3++)this['_touched']['set'](_0x2057e3,{'userId':_0x2c8d8b});_0x46df98['_insertChild'](_0xb0b45d['offset'],_0x21a8e0);}['_handleMoveOperation'](_0x12dbc9){(_0x12dbc9=this['_cloneOperation'](_0x12dbc9,this['_idsRoots']))['_execute']();const _0x127867=null===_0x12dbc9['_authorId']?null:_0x12dbc9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x819964=_0x12dbc9['getMovedRangeStart'](),_0x239939=_0x819964['parent'],_0x459c6b=_0x819964['offset'];!function _0x3c8ac7(_0x550977,_0x4445c0,_0x299666,_0x3992db){for(let _0x571f6a=_0x299666;_0x571f6a<_0x3992db;_0x571f6a++){const _0x48beaf=_0x4445c0['getChild'](_0x571f6a);_0x48beaf['is']('element','$text')?_0x550977['set'](_0x48beaf['getAttribute']('vid'),{'userId':_0x127867}):(_0x550977['set'](_0x48beaf['getAttribute']('vid_start'),{'userId':_0x127867}),_0x3c8ac7(_0x550977,_0x48beaf,0x0,_0x48beaf['childCount']),_0x550977['set'](_0x48beaf['getAttribute']('vid_end'),{'userId':_0x127867}));}}(this['_touched'],_0x239939,_0x459c6b,_0x459c6b+_0x12dbc9['howMany']);}['_handleMergeOperation'](_0x41623b){const _0x1e2cba=null===(_0x41623b=this['_cloneOperation'](_0x41623b,this['_idsRoots']))['_authorId']?null:_0x41623b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cbfc7=_0x41623b['targetPosition']['parent'],_0x1982eb=_0x41623b['sourcePosition']['parent'],_0x9fce0a=_0x1cbfc7['getAttribute']('vid_end'),_0x171ac1=_0x1982eb['getAttribute']('vid_start');_0x1cbfc7['_setAttribute']('vid_end',_0x1982eb['getAttribute']('vid_end')),_0x1982eb['_setAttribute']('vid_end',_0x9fce0a),this['_touched']['set'](_0x171ac1,{'userId':_0x1e2cba}),this['_touched']['set'](_0x9fce0a,{'userId':_0x1e2cba}),_0x41623b['_execute']();}['_handleSplitOperation'](_0x3292b4){const _0x497ba9=null===(_0x3292b4=this['_cloneOperation'](_0x3292b4,this['_idsRoots']))['_authorId']?null:_0x3292b4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2c2282=_0x3292b4['graveyardPosition'],_0xe8a24f=_0x3292b4['splitPosition']['parent'];_0x3292b4['_execute']();const _0x1f3b56=_0xe8a24f['getAttribute']('vid_end'),_0xfb37b8=_0x3292b4['insertionPosition']['nodeAfter'];if(_0x2c2282){const _0x4aa85a=_0xfb37b8['getAttribute']('vid_end'),_0x1ea49f=_0xe8a24f['getAttribute']('vid_end');_0xe8a24f['_setAttribute']('vid_end',_0x4aa85a),_0xfb37b8['_setAttribute']('vid_end',_0x1ea49f),this['_touched']['set'](_0xe8a24f['getAttribute']('vid_end'),{'userId':_0x497ba9}),this['_touched']['set'](_0xfb37b8['getAttribute']('vid_start'),{'userId':_0x497ba9});}else{const _0x4add5f=this['_revisionId']++,_0x27abe6=this['_revisionId']++;_0xe8a24f['_setAttribute']('vid_end',_0x4add5f),_0xfb37b8['_setAttribute']('vid_start',_0x27abe6),_0xfb37b8['_setAttribute']('vid_end',_0x1f3b56),this['_touched']['set'](_0x4add5f,{'userId':_0x497ba9}),this['_touched']['set'](_0x27abe6,{'userId':_0x497ba9});}}['_handleMarkerOperation'](_0x16929b){if(!_0x16929b['affectsData'])return;const _0x470f89=(_0x16929b=this['_cloneOperation'](_0x16929b,this['_diffRoots']))['oldRange']?_0x16929b['oldRange']['root']:null,_0x5c7a92=_0x16929b['newRange']?_0x16929b['newRange']['root']:null;_0x470f89&&this['_markers']['delete'](_0x16929b['name']),_0x5c7a92&&this['_markers']['set'](_0x16929b['name'],_0x16929b['newRange']['clone']());const _0x566952=null===_0x16929b['_authorId']?null:_0x16929b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53d775=_0x16929b['name'];if(!this['_touchedMarkers']['has'](_0x53d775))return void this['_touchedMarkers']['set'](_0x53d775,{'range':_0x16929b['oldRange'],'userId':_0x566952});const _0x14d917=this['_touchedMarkers']['get'](_0x53d775),_0x1c52b1=_0x14d917['range'],_0x3eb00a=_0x16929b['newRange'];null==_0x1c52b1&&null==_0x3eb00a||_0x1c52b1&&_0x3eb00a&&_0x1c52b1['isEqual'](_0x3eb00a)?this['_touchedMarkers']['delete'](_0x16929b['name']):_0x14d917['userId']=_0x566952;}['_handleRootOperation'](_0xddec4e,_0x14e9ee){this['_diffRoots']['has'](_0xddec4e['rootName'])?this['_diffRoots']['get'](_0xddec4e['rootName'])['_isAttached']=_0xddec4e['isAdd']:(this['_diffRoots']['set'](_0xddec4e['rootName'],F(_0xddec4e['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0xddec4e['rootName'],{}),_0x14e9ee&&this['_idsRoots']['set'](_0xddec4e['rootName'],F(_0xddec4e['rootName'],!0x0)));const _0x313444=null===_0xddec4e['_authorId']?null:_0xddec4e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2d8320=this['_touchedRoots']['get'](_0xddec4e['rootName']);_0x2d8320&&_0x2d8320['userId']===_0x313444?this['_touchedRoots']['delete'](_0xddec4e['rootName']):this['_touchedRoots']['set'](_0xddec4e['rootName'],{'userId':_0x313444,'isAttached':_0xddec4e['isAdd']});}['_handleRootAttributeOperation'](_0x3c2b44){const _0x17fa07=this['_diffRootsAttributes']['get'](_0x3c2b44['root']['rootName']);null===_0x3c2b44['newValue']?delete _0x17fa07[_0x3c2b44['key']]:_0x17fa07[_0x3c2b44['key']]=_0x3c2b44['newValue'];}}function T(_0x315a4a){const _0x1eaf92=F(_0x315a4a['rootName'],_0x315a4a['isAttached']());for(const _0x1cc297 of _0x315a4a['getChildren']()){const _0x23b5a1=_0x1cc297['_clone'](!0x0);_0x1eaf92['_appendChild'](_0x23b5a1);}return _0x1eaf92;}function F(_0x3aa7cb,_0x57b251=!0x0){const _0x33542a=new gt();return _0x33542a['rootName']=_0x3aa7cb,_0x33542a['_isAttached']=_0x57b251,_0x33542a['isAttached']=()=>_0x33542a['_isAttached'],_0x33542a;}function B(_0x3b4534,_0x31ff67,_0x2349c5){const _0x508d70='elementEnd'==_0x3b4534['type']?_0x2349c5['createPositionAt'](_0x3b4534['item'],'end'):_0x2349c5['createPositionBefore'](_0x3b4534['item']);return _0x2349c5['createPositionFromPath'](_0x31ff67,_0x508d70['path'],_0x508d70['stickiness']);}function J(_0x2ca7f0,_0x5515d2,_0x975ebf){const _0xa53d43='elementStart'==_0x2ca7f0['type']?_0x975ebf['createPositionAt'](_0x2ca7f0['item'],0x0):_0x975ebf['createPositionAfter'](_0x2ca7f0['item']);return _0x975ebf['createPositionFromPath'](_0x5515d2,_0xa53d43['path'],_0xa53d43['stickiness']);}class os extends _0x377738{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x41d76a,_0x1b647f){super(_0x41d76a),this['focusTracker']=new _0x5732ff(),this['keystrokes']=new _0x538a05(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1b647f),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x16b26b({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x98405d=_0x5cf424=>_0x5cf424['stopPropagation']();this['keystrokes']['set']('arrowright',_0x98405d),this['keystrokes']['set']('arrowleft',_0x98405d),this['keystrokes']['set']('arrowup',_0x98405d),this['keystrokes']['set']('arrowdown',_0x98405d);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2c29f7){this['revisionNameInputView']['fieldView']['element']['value']=_0x2c29f7['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x3c3063){const _0x210f03=new at(this['locale'],ti),_0x69e178=_0x210f03['fieldView'];_0x69e178['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4a519f=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x3c3063&&(_0x4a519f+='\x20('+m(this['locale'],'optional')+')'),(_0x210f03['label']=_0x4a519f,_0x69e178['on']('input',()=>{this['revisionNameInputValue']=_0x69e178['element']['value']['trim']();}),_0x210f03);}}class f extends _0x5aa884{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x88039a=this['editor'],_0x1460ed=_0x88039a['plugins']['get']('RevisionTracker');_0x88039a['ui']['componentFactory']['add']('revisionHistory',_0x194994=>{const _0x528d81=_0x28f4b1(_0x194994),_0x1e5d8d=_0x528d81['panelView']['children'],_0x339373=new _0x122e03(_0x194994),_0x529448=new te(_0x194994),_0x73f8da=new _0x4cea6e(_0x194994),_0x29771a=new te(_0x194994),_0x7194af=new _0x4cea6e(_0x194994);return _0x528d81['bind']('isEnabled')['to'](_0x1460ed,'isReady',_0x1460ed,'isEnabled',_0x88039a,'isReadOnly',(_0x282a7d,_0x5433ae,_0x4eded4)=>_0x282a7d&&_0x5433ae&&!_0x4eded4),_0x528d81['buttonView']['set']({'icon':_0x5b5e2c,'label':m(_0x194994,'Revision\x20history'),'tooltip':!0x0}),_0x73f8da['set']({'label':m(_0x194994,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x73f8da['bind']('isEnabled')['to'](_0x1460ed,'isReady',_0x1460ed,'isEnabled',_0x88039a,'isReadOnly',(_0x116363,_0x5c9185,_0x466ab3)=>_0x116363&&_0x5c9185&&!_0x466ab3),_0x73f8da['on']('execute',()=>this['_showDialog']()),_0x7194af['set']({'label':m(_0x194994,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x7194af['bind']('isEnabled')['to'](_0x1460ed,'isReady',_0x88039a,'isReadOnly',(_0xd82124,_0x4a0c10)=>_0xd82124&&!_0x4a0c10),_0x7194af['on']('execute',()=>{_0x88039a['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x528d81['isOpen']=!0x1,_0x88039a['editing']['view']['focus']();}),_0x529448['children']['add'](_0x73f8da),_0x29771a['children']['add'](_0x7194af),_0x339373['role']='menu',_0x339373['items']['addMany']([_0x529448,_0x29771a]),_0x1e5d8d['add'](_0x339373),_0x528d81;}),_0x88039a['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x328434=this['editor'],_0x1a2d98=_0x328434['locale'],_0x51d330=new _0x33eb46(_0x1a2d98),_0x44312f=new _0x4867ec(_0x1a2d98);_0x51d330['buttonView']['set']({'icon':_0x5b5e2c,'label':m(_0x1a2d98,'Revision\x20history')});const _0x19901d=new _0x5e8df2(_0x1a2d98,_0x51d330),_0x2fdb54=new _0x15ddd2(_0x1a2d98);_0x2fdb54['set']({'label':m(_0x1a2d98,'Save\x20current\x20revision')}),_0x2fdb54['delegate']('execute')['to'](_0x51d330),_0x2fdb54['on']('execute',()=>{this['_showDialog']();}),_0x19901d['children']['add'](_0x2fdb54),_0x44312f['items']['add'](_0x19901d);const _0x4339a5=new _0x5e8df2(_0x1a2d98,_0x51d330),_0x5f1bed=new _0x15ddd2(_0x1a2d98);return _0x5f1bed['set']({'label':m(_0x1a2d98,'Open\x20revision\x20history')}),_0x5f1bed['delegate']('execute')['to'](_0x51d330),_0x5f1bed['on']('execute',()=>{_0x328434['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x4339a5['children']['add'](_0x5f1bed),_0x44312f['items']['add'](_0x4339a5),_0x51d330['panelView']['children']['add'](_0x44312f),_0x51d330;}['_showDialog'](){const _0x1042e7=this['editor'],_0x20d431=_0x1042e7['locale'],_0x472b93=_0x1042e7['plugins']['get']('Dialog'),_0x4d142e=_0x1042e7['plugins']['get']('RevisionTracker');function _0x118403(_0xf5c954){_0x1042e7['config']['get']('revisionHistory.requireRevisionName')&&''===_0xf5c954['revisionName']?_0xf5c954['revisionNameInputView']['errorText']=m(_0x20d431,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x1042e7['plugins']['get'](u)['saveRevision']({'name':_0xf5c954['revisionName']}),_0x472b93['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x118403(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x472b93['show']({'id':'revisionSave','title':m(_0x20d431,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x1042e7['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x472b93['hide']()},{'label':m(_0x1042e7['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4e3d38){_0x4e3d38['bind']('isEnabled')['to'](_0x4d142e,'isReady',_0x4d142e,'isEnabled',_0x1042e7,'isReadOnly',(_0x40af7a,_0x2633a0,_0x1b8d03)=>_0x40af7a&&_0x2633a0&&!_0x1b8d03);},'onExecute':()=>_0x118403(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x205e2b=this['editor'],_0x4d826f=_0x205e2b['locale'];this['_saveRevisionFormView']=new os(_0x4d826f,_0x205e2b['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x377738{['changeId'];['_model'];constructor(_0x2dad62,_0xfe3ca8){super(_0x2dad62),this['_model']=_0xfe3ca8,this['changeId']=_0xfe3ca8['id'];const _0x2e0c31=this['bindTemplate'],_0x5b4978=m(_0x2dad62,_0xfe3ca8['data']['isSuggestion']?'Suggested\x20by':'add'==_0xfe3ca8['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xfe3ca8['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x2e0c31['to']('type',_0x3af1aa=>'ck-revision-change__'+_0x3af1aa)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5b4978}]},{'text':'\x20'+_0xfe3ca8['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x1ff634(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x488758){super(),this['id']=_0x488758['id']||_0x51a0e0(),this['author']=_0x488758['author'],this['type']=_0x488758['type'],this['data']=_0x488758['data']||{},this['rootName']=_0x488758['rootName'],this['set']('createdAt',_0x488758['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x31beb8,_0x33c5a9){this['newRevisionId']=_0x31beb8,this['oldRevisionId']=_0x33c5a9,this['changes']=new _0x1056b3();}['_setChanges'](_0x11bae0){for(const _0x1b64b6 of _0x11bae0)this['changes']['add'](_0x1b64b6);}}const Y={'c':_0x364db7,'a':_0x5dcd99,'e':_0x48d005,'r':_0x1c2455,'u':_0x1231a7};class d extends _0x5aa884{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x500ee0,_0x5b7085,j];}constructor(_0x59c2b7){super(_0x59c2b7),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x3046ef,_0x9df8a8,_0x56bbb8)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x407ac6=>{for(const _0x505ba8 of this['editor']['editing']['view']['document']['roots'])_0x56bbb8?_0x407ac6['removeClass']('ck-editor__editable__overlay',_0x505ba8):_0x407ac6['addClass']('ck-editor__editable__overlay',_0x505ba8);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5dbf0f=>null!==_0x5dbf0f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x23bb56,_0x5e6308,_0x51d67e)=>_0x23bb56&&_0x51d67e?_0x5e6308['changes']['getIndex'](_0x51d67e):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2d6a1e,_0x4302bf)=>_0x2d6a1e?_0x4302bf['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x5b7085);}['init'](){const _0x5c10a0=this['editor'],_0x41b696=new yt(_0x5c10a0,{'direction':'backward'}),_0x56a795=new yt(_0x5c10a0,{'direction':'forward'});(_0x5c10a0['commands']['add']('showPreviousChange',_0x41b696),_0x5c10a0['commands']['add']('showNextChange',_0x56a795),_0x5c10a0['commands']['add']('restoreRevision',new _t(_0x5c10a0)),this['on']('change:numberOfChanges',()=>{_0x41b696['refresh'](),_0x56a795['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5c10a0['enableReadOnlyMode']('revision-viewer'),_0x5c10a0['plugins']['has']('WidgetToolbarRepository'))&&_0x5c10a0['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x42304a){await this['loadRevisionData'](_0x42304a);const _0x321361={};for(const _0x52cc09 in _0x42304a['diffData']){if(_0x42304a['diffData'][_0x52cc09]['attachChange']&&!_0x42304a['diffData'][_0x52cc09]['attachChange']['isAttached'])continue;const _0xd40eed=this['_removeRevisionMarkers'](JSON['parse'](_0x42304a['diffData'][_0x52cc09]['insertions'])),_0x3a0072=this['editor']['editing']['view']['document'],_0x1f5646=new _0x39dd63(_0x3a0072,_0xd40eed['map'](_0x128848=>this['_getViewObj'](_0x128848)));this['editor']['data']['processor']['useFillerType']('marked'),_0x321361[_0x52cc09]=this['editor']['data']['processor']['toData'](_0x1f5646),this['editor']['data']['processor']['useFillerType']('default');}return _0x321361;}async['getRevisionRootsAttributes'](_0x44814d){await this['loadRevisionData'](_0x44814d);const _0xb88c74={};for(const _0x5a8e4b in _0x44814d['diffData'])_0x44814d['diffData'][_0x5a8e4b]['attachChange']&&!_0x44814d['diffData'][_0x5a8e4b]['attachChange']['isAttached']||(_0xb88c74[_0x5a8e4b]=_0x44814d['diffData'][_0x5a8e4b]['attributesAfter']||{});return _0xb88c74;}['_removeRevisionMarkers'](_0x38c053){return(_0x38c053=_0x38c053['filter'](_0x1cae58=>!_0x1cae58['name']||'revision-start'!==_0x1cae58['name']&&'revision-end'!==_0x1cae58['name']))['forEach'](_0x4d0d93=>{'string'!=typeof _0x4d0d93&&(_0x4d0d93['children']=this['_removeRevisionMarkers'](_0x4d0d93['children']),_0x4d0d93['attributes']=_0x4d0d93['attributes']['filter'](_0x5e8f20=>!_0x5e8f20[0x0]['startsWith']('data-revision-')));}),_0x38c053;}async['compare'](_0x127a54,_0x372c38,_0x33e95a=!0x1){if(!this['isEnabled'])return;const _0x4f4c3d=this['diff'],_0x40ee37=this['repository'],_0xc3307b='string'==typeof _0x127a54?_0x40ee37['getRevision'](_0x127a54):_0x127a54,_0x3b4e80='string'==typeof _0x372c38?_0x40ee37['getRevision'](_0x372c38):_0x372c38,_0x5cd4eb=_0xc3307b['id'],_0x2e5a1a=_0x3b4e80?_0x3b4e80['id']:null;if(!_0x33e95a&&this['diff']&&this['diff']['newRevisionId']===_0x5cd4eb&&this['diff']['oldRevisionId']===_0x2e5a1a)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x5cd4eb,_0x2e5a1a);const _0x50e963=this['_getRevisionsRange'](_0xc3307b,_0x3b4e80,!0x0)['map'](_0x364f67=>this['loadRevisionData'](_0x364f67));return _0x50e963['push'](new Promise(_0x3efa8c=>{setTimeout(_0x3efa8c,0x14);})),Promise['all'](_0x50e963)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x10add6=this['_getDiff'](_0x5cd4eb,_0x2e5a1a);for(const _0x1b4e7c of _0x10add6['changes'])this['_changeIdToChange']['set'](_0x1b4e7c['id'],_0x1b4e7c);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xe9194c=>{for(const _0x1333f0 of this['editor']['model']['document']['getRootNames']())_0xe9194c['detachRoot'](_0x1333f0);for(const _0x3cb260 of Object['keys'](_0x10add6['model'])){const _0x4638fd=_0xe9194c['addRoot'](_0x3cb260);for(const _0x1616ca of Object['keys'](_0x10add6['attributes'][_0x3cb260]))_0xe9194c['setAttribute'](_0x1616ca,_0x10add6['attributes'][_0x3cb260][_0x1616ca],_0x4638fd);_0xe9194c['insert'](_0x10add6['model'][_0x3cb260],_0x4638fd,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x10add6['changes'])),this['isReady']=!0x0;})['catch'](_0x152d5a=>{console['error'](_0x152d5a),this['_cleanUp'](),_0x4f4c3d&&(this['diff']=_0x4f4c3d),this['isReady']=!0x0;});}['addRevisionData'](_0x3d918a,_0x33a4d2){const _0x1976cb=this['repository']['createRevision'](_0x3d918a);return _0x1976cb['on']('_update',(_0x28828a,_0x30bc7d,_0xdd5b6c)=>_0x33a4d2(_0x30bc7d,_0xdd5b6c,_0x1976cb)),this['repository']['addRevision'](_0x1976cb),_0x1976cb;}['loadRevisionData'](_0x5997d1){if(!_0x5997d1||_0x5997d1['diffData'])return Promise['resolve']();{const _0x4b8115=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x4b8115,'revisionId':_0x5997d1['id']})['then'](_0x200a24=>{_0x5997d1['_update']({'diffData':_0x200a24['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x38efc8=>{for(const _0x35e790 of this['editor']['model']['document']['getRootNames']())_0x38efc8['detachRoot'](_0x35e790);});}['_sortAndFilterDiffChanges'](_0x38cadb){const _0xb5e103=[],_0x43b730=new Map();for(const _0x349dfb of this['editor']['model']['document']['getRootNames']()){const _0x1c525c=this['editor']['editing']['view']['getDomRoot'](_0x349dfb);if(!_0x1c525c)continue;const _0x3a9807=_0x1c525c['getClientRects']()['item'](0x0);_0x3a9807&&(_0xb5e103['push'](_0x349dfb),_0x43b730['set'](_0x349dfb,_0x3a9807));}return _0xb5e103['sort']((_0x46265c,_0xc3ea10)=>{const _0x1bdc8a=_0x43b730['get'](_0x46265c),_0x1c2d6d=_0x43b730['get'](_0xc3ea10);return _0x1bdc8a['y']-_0x1c2d6d['y']||_0x1bdc8a['x']-_0x1c2d6d['x'];}),(_0x38cadb=_0x38cadb['filter'](_0xc71126=>_0xb5e103['includes'](_0xc71126['rootName'])))['sort']((_0x213a53,_0x30c61f)=>_0xb5e103['indexOf'](_0x213a53['rootName'])-_0xb5e103['indexOf'](_0x30c61f['rootName'])),_0x38cadb;}['_makeTape'](_0x340d78){const _0xd3f63f=Array['from'](_0x340d78['markers'])['filter'](([_0xd84d49,_0x3b5992])=>_0xd84d49['startsWith']('revision:')&&!_0x3b5992['isCollapsed']),_0x22fd7c=Array['from'](this['editor']['model']['createRangeIn'](_0x340d78)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0xd3f63f['length'])for(const _0x30d55b of _0x22fd7c){const [_0x5e7f59,_0x3e10d8]=_0xd3f63f[0x0],[,_0x430695,_0x196b99]=_0x5e7f59['split'](':');if(_0x3e10d8['end']['isEqual'](_0x30d55b['nextPosition'])&&_0xd3f63f['shift'](),(_0x30d55b['previousPosition']['isEqual'](_0x3e10d8['start'])||_0x30d55b['previousPosition']['isAfter'](_0x3e10d8['start']))&&('insertion'==_0x430695?_0x30d55b['isAdded']={'userId':_0x196b99}:'deletion'==_0x430695&&(_0x30d55b['isRemoved']={'userId':_0x196b99})),0x0==_0xd3f63f['length'])break;}return _0x22fd7c;}['_refreshStartEndIndex'](_0x54f7e6){const _0x5eaa71=new Map();for(let _0x114b19=0x0;_0x114b19<_0x54f7e6['length'];_0x114b19++)'text'===_0x54f7e6[_0x114b19]['type']?(_0x54f7e6[_0x114b19]['item']['startIndex']=_0x114b19,_0x54f7e6[_0x114b19]['item']['endIndex']=_0x114b19):('elementStart'===_0x54f7e6[_0x114b19]['type']?_0x54f7e6[_0x114b19]['item']['startIndex']=_0x114b19:'elementEnd'===_0x54f7e6[_0x114b19]['type']&&(_0x54f7e6[_0x114b19]['item']['endIndex']=_0x114b19),_0x5eaa71['set'](_0x54f7e6[_0x114b19]['id'],_0x114b19));for(const _0x324897 of _0x5eaa71['values']())'elementStart'===_0x54f7e6[_0x324897]['type']?_0x54f7e6[_0x324897]['item']['endIndex']=_0x5eaa71['get'](_0x54f7e6[_0x324897]['pairId']):'elementEnd'===_0x54f7e6[_0x324897]['type']&&(_0x54f7e6[_0x324897]['item']['startIndex']=_0x5eaa71['get'](_0x54f7e6[_0x324897]['pairId']));}['_processTape'](_0x23b5d9){for(let _0x514714=0x0;_0x514714<_0x23b5d9['length'];_0x514714++){if('elementStart'===_0x23b5d9[_0x514714]['type'])_0x23b5d9[_0x514714]['item']['startIndex']=_0x514714;else{if('elementEnd'===_0x23b5d9[_0x514714]['type']){_0x23b5d9[_0x514714]['item']['endIndex']=_0x514714;const _0x1e60bd=_0x23b5d9[_0x514714]['item']['startIndex'];_0x23b5d9[_0x1e60bd]['pairId']=_0x23b5d9[_0x514714]['id'],_0x23b5d9[_0x514714]['pairId']=_0x23b5d9[_0x1e60bd]['id'];}else _0x23b5d9[_0x514714]['item']['startIndex']=_0x514714,_0x23b5d9[_0x514714]['item']['endIndex']=_0x514714,_0x23b5d9[_0x514714]['pairId']=null;}_0x23b5d9[_0x514714]['markersStart']||(_0x23b5d9[_0x514714]['markersStart']=[],_0x23b5d9[_0x514714]['markersEnd']=[]);}}['_markInsertions'](_0x15d4a5,_0x18363e){const _0x345103=_0x15d4a5['filter'](_0x381802=>!_0x381802['isAdded']);for(let _0x29f6cb=0x0;_0x29f6cb<_0x18363e['length'];_0x29f6cb++)_0x18363e[_0x29f6cb]['isAdded']&&(_0x345103[_0x29f6cb]['isAdded']=_0x18363e[_0x29f6cb]['isAdded']);}['_makeModelFromViewString'](_0x4cf9af){const _0x4ef507=JSON['parse'](_0x4cf9af),_0x2440c1=this['editor']['editing']['view']['document'],_0x433139=new _0x39dd63(_0x2440c1,_0x4ef507['map'](_0x399e3c=>this['_getViewObj'](_0x399e3c)));return this['editor']['data']['toModel'](_0x433139);}['_getViewObj'](_0x2aee39){const _0x400450=this['editor']['editing']['view']['document'];if('string'==typeof _0x2aee39)return new _0xbf05a4(_0x400450,_0x2aee39);{const _0x35ffd5=_0x2aee39['children']['map'](_0x24a14a=>this['_getViewObj'](_0x24a14a));return new(Y[_0x2aee39['type']]||_0x34efa8)(_0x400450,_0x2aee39['name'],_0x2aee39['attributes'],_0x35ffd5);}}['_getDiff'](_0x3b020f,_0x2978af=null){const _0x1a8004=this['repository']['getRevision'](_0x3b020f),_0x3bc913=_0x2978af?this['repository']['getRevision'](_0x2978af):null,_0x134da9=this['_getRevisionsRange'](_0x1a8004,_0x3bc913),_0x37cb45=_0x134da9[_0x134da9['length']-0x1],_0x356d58=new Map(),_0x2a8acb={'model':{},'attributes':{},'changes':[]},_0x2be7bb=new Set(),_0x2c4173=new Map();for(let _0x44f743=_0x134da9['length']-0x1;_0x44f743>=0x0;_0x44f743--){const _0x1f657b=_0x134da9[_0x44f743];for(const _0x487df8 of Object['keys'](_0x1f657b['diffData']))if(_0x1f657b['diffData'][_0x487df8]['attachChange']){const _0x23a497=_0x1f657b['diffData'][_0x487df8]['attachChange'];_0x23a497['isAttached']?(_0x2be7bb['add'](_0x487df8),_0x2c4173['has'](_0x487df8)&&_0x2c4173['get'](_0x487df8)['userId']==_0x23a497['userId']?_0x2c4173['delete'](_0x487df8):_0x2c4173['set'](_0x487df8,_0x23a497)):_0x2c4173['has'](_0x487df8)?(_0x2be7bb['delete'](_0x487df8),_0x2c4173['delete'](_0x487df8)):(_0x2be7bb['add'](_0x487df8),_0x2c4173['set'](_0x487df8,_0x23a497));}else _0x2be7bb['add'](_0x487df8);}for(const _0x23d106 of _0x2be7bb){const _0x408739=_0x2c4173['has'](_0x23d106)&&!_0x2c4173['get'](_0x23d106)['isAttached'];let _0x5c46a0=_0x408739?_0x134da9['length']-0x1:0x0;const _0x5dd49e=_0x408739?-0x1:0x1;for(;_0x134da9[_0x5c46a0];){const _0x5e8577=_0x134da9[_0x5c46a0];if(_0x5e8577['diffData'][_0x23d106]){const _0x4fe66c=_0x408739?_0x5e8577['diffData'][_0x23d106]['attributesBefore']:_0x5e8577['diffData'][_0x23d106]['attributesAfter'];_0x2a8acb['attributes'][_0x23d106]=_0x4fe66c?_0x2cf058(_0x4fe66c):{};break;}_0x5c46a0+=_0x5dd49e;}}for(const _0x452cb7 of _0x134da9){_0x452cb7['model']={};for(const _0x1d562a of _0x452cb7['authors'])_0x356d58['set'](_0x1d562a['id'],_0x1d562a);for(const _0x2dd947 of _0x2be7bb){const _0x904cd6=_0x452cb7['diffData'][_0x2dd947]?_0x452cb7['diffData'][_0x2dd947]['insertions']:'[]',_0x595d25=_0x452cb7['diffData'][_0x2dd947]?_0x452cb7['diffData'][_0x2dd947]['deletions']:'[]';_0x452cb7['model'][_0x2dd947]={'insertions':this['_makeModelFromViewString'](_0x904cd6),'deletions':this['_makeModelFromViewString'](_0x595d25)};}}for(const _0x26c265 of _0x2be7bb){let _0x4ced88=null,_0x9b7b42=0x0;const _0x487876=new Map(Array['from'](_0x1a8004['model'][_0x26c265]['insertions']['markers'])['filter'](([_0x4f5c7d])=>!_0x4f5c7d['startsWith']('revision:')));let _0x39356c=0x0;for(const _0x1b5607 of _0x134da9){const _0x3c4767=this['_makeTape'](_0x1b5607['model'][_0x26c265]['insertions']);_0x1b5607==_0x1a8004?(_0x4ced88=_0x3c4767,_0x9b7b42=_0x4ced88['length'],_0x4ced88['forEach'](_0x41df90=>{_0x41df90['id']=_0x39356c++;}),this['_processTape'](_0x4ced88)):this['_markInsertions'](_0x4ced88,_0x3c4767);const _0x5b7b00=_0x4ced88['filter'](_0x5ee05e=>!_0x5ee05e['isAdded'])['map'](_0x217f53=>_0x217f53['id']);let _0x5fb01c=0x0;const _0x5964e9=this['_makeTape'](_0x1b5607['model'][_0x26c265]['deletions']);_0x5964e9['forEach'](_0x41b12f=>{_0x41b12f['isRemoved']?_0x41b12f['id']=_0x9b7b42++:_0x41b12f['id']=_0x5b7b00[_0x5fb01c++];}),this['_processTape'](_0x5964e9),this['_setDistance'](_0x4ced88,'isAdded'),this['_setDistance'](_0x5964e9,'isRemoved'),_0x1b5607==_0x1a8004&&this['_markMarkers'](_0x4ced88,_0x487876),_0x4ced88=this['_joinTapes'](_0x4ced88,_0x5964e9),this['_refreshStartEndIndex'](_0x4ced88),this['_setDistance'](_0x4ced88,'isRemoved');}_0x4ced88=_0x4ced88['filter'](_0x3b3ea8=>!(_0x3b3ea8['isAdded']&&_0x3b3ea8['isRemoved']));const _0x5d8e92=new Map(_0x37cb45['model'][_0x26c265]['deletions']['markers']),_0x35fd3d=new Set(_0x487876['keys']());for(const _0x482739 of _0x5d8e92['keys']())_0x35fd3d['delete'](_0x482739);this['_markSuggestions'](_0x4ced88,_0x35fd3d),this['_fixObsoleteTags'](_0x4ced88),_0x4ced88=this['_removeMissingPairs'](_0x4ced88),_0x4ced88=this['_markMismatchedRemovedTags'](_0x4ced88),_0x4ced88=this['_removeUnsupportedChanges'](_0x4ced88);const {root:_0x22dbf8,changes:_0x20ee27}=this['_makeModelFromTape'](_0x4ced88,_0x356d58,_0x26c265);_0x2a8acb['model'][_0x26c265]=_0x22dbf8;const _0x640827=_0x2c4173['get'](_0x26c265);if(_0x640827){const _0x6f5f16=_0x356d58['get'](_0x640827['userId']),_0x219366=new r({'author':_0x6f5f16,'type':_0x640827['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x26c265});_0x20ee27['unshift'](_0x219366),_0x2a8acb['attributes'][_0x26c265]['revisionHistoryAttachChange']=_0x219366['id'];}_0x2a8acb['changes']=_0x2a8acb['changes']['concat'](_0x20ee27);}return _0x2a8acb;}['_markMarkers'](_0x38670f,_0x3e57b2){for(let _0x33a0d0=0x0;_0x33a0d0<_0x38670f['length'];_0x33a0d0++)for(const [_0x5093cf,_0x316dbb]of _0x3e57b2)_0x316dbb['start']['isEqual'](_0x38670f[_0x33a0d0]['previousPosition'])&&_0x38670f[_0x33a0d0]['markersStart']['push'](_0x5093cf),_0x316dbb['end']['isEqual'](_0x38670f[_0x33a0d0]['nextPosition'])&&_0x38670f[_0x33a0d0]['markersEnd']['push'](_0x5093cf);}['_joinTapes'](_0xb6e284,_0x85379a){let _0x51f18d=[],_0x4061ea=0x0,_0x31dfbb=0x0;for(;_0x4061ea<_0xb6e284['length']||_0x31dfbb<_0x85379a['length'];){const _0x1a4f65=_0xb6e284[_0x4061ea]||{},_0x58b337=_0x85379a[_0x31dfbb]||{};if(_0x1a4f65['id']==_0x58b337['id'])_0x4061ea++,_0x31dfbb++,_0x51f18d['push'](_0x1a4f65);else{if(_0x58b337['isRemoved']&&_0x1a4f65['isAdded']){const {commonTape:_0x3a92f8,iEnd:_0x1ea902,jEnd:_0x679bbd}=this['_threeWayMerge'](_0xb6e284,_0x4061ea,_0x85379a,_0x31dfbb);_0x51f18d=_0x51f18d['concat'](_0x3a92f8),_0x4061ea=_0x1ea902,_0x31dfbb=_0x679bbd;}else _0x58b337['isRemoved']?(_0x31dfbb++,_0x51f18d['push'](_0x58b337)):(_0x4061ea++,_0x51f18d['push'](_0x1a4f65));}}return _0x51f18d;}['_markSuggestions'](_0x531dcf,_0x2e8209){const _0x2fae09=[];for(let _0x88ac1a=0x0;_0x88ac1a<_0x531dcf['length'];_0x88ac1a++){for(let _0x543cf8=0x0;_0x543cf8<_0x531dcf[_0x88ac1a]['markersStart']['length'];_0x543cf8++){const _0x5d8ace=_0x531dcf[_0x88ac1a]['markersStart'][_0x543cf8];if(!_0x2e8209['has'](_0x5d8ace))continue;const {group:_0x3d86ef,type:_0x5808a4,authorId:_0x879ad4}=_0x2e6a7a(_0x5d8ace);'revision-suggestion'!=_0x3d86ef||'insertion'!=_0x5808a4&&'deletion'!=_0x5808a4||(_0x2fae09['unshift']({'type':_0x5808a4,'name':_0x5d8ace,'userId':_0x879ad4}),_0x531dcf[_0x88ac1a]['markersStart']['splice'](_0x543cf8,0x1),_0x543cf8--);}_0x4ab79b(_0x531dcf[_0x88ac1a]);for(let _0x224b75=0x0;_0x224b75<_0x531dcf[_0x88ac1a]['markersEnd']['length'];_0x224b75++){const _0x5461db=_0x531dcf[_0x88ac1a]['markersEnd'][_0x224b75];if(!_0x2e8209['has'](_0x5461db))continue;const {group:_0x567c75,type:_0x53db09}=_0x2e6a7a(_0x5461db);if('revision-suggestion'!=_0x567c75||'insertion'!=_0x53db09&&'deletion'!=_0x53db09)continue;_0x531dcf[_0x88ac1a]['markersEnd']['splice'](_0x224b75,0x1),_0x224b75--;const _0x2309a8=_0x2fae09['findIndex'](_0x27cc8d=>_0x27cc8d['name']==_0x5461db);_0x2309a8>-0x1&&_0x2fae09['splice'](_0x2309a8,0x1);}}function _0x2e6a7a(_0x3b42a0){const _0x4e7845=_0x3b42a0['split'](':');return{'group':_0x4e7845[0x0],'type':_0x4e7845[0x1],'subType':_0x4e7845['length']>=0x5?_0x4e7845[0x2]:null,'id':_0x4e7845['length']<0x5?_0x4e7845[0x2]:_0x4e7845[0x3],'authorId':_0x4e7845['length']<0x5?_0x4e7845[0x3]:_0x4e7845[0x4],'markerCount':0x6==_0x4e7845['length']?_0x4e7845[0x5]:null};}function _0x4ab79b(_0x3887cd){for(let _0x380f1e=0x0;_0x380f1e<_0x2fae09['length'];_0x380f1e++){if(_0x3887cd['isAdded']&&'insertion'==_0x2fae09[_0x380f1e]['type'])return _0x3887cd['isAddSuggestion']=_0x2fae09[_0x380f1e],void delete _0x3887cd['isAdded'];if(!_0x3887cd['isAdded']&&!_0x3887cd['isRemoved']&&'deletion'==_0x2fae09[_0x380f1e]['type'])return void(_0x3887cd['isRemoveSuggestion']=_0x2fae09[_0x380f1e]);}}}['_setDistance'](_0x3a8574,_0xedbcf2){let _0x47d904=0x0,_0x47e1ae=!0x1;const _0x222f6b=new Map();for(const _0x3c568c of _0x3a8574)_0x3c568c[_0xedbcf2]?_0x47e1ae&&(_0x47d904++,_0x47e1ae=!0x1):(_0x47d904++,_0x47e1ae=!0x0),_0x222f6b['set'](_0x3c568c['id'],_0x47d904);for(let _0x195d48=0x0;_0x195d48<_0x3a8574['length'];_0x195d48++){if('isRemoved'==_0xedbcf2&&_0x3a8574[_0x195d48]['isAdded']||'isAdded'==_0xedbcf2&&_0x3a8574[_0x195d48]['isRemoved'])continue;if('text'==_0x3a8574[_0x195d48]['type']){_0x3a8574[_0x195d48]['distance']=0x0;continue;}const _0x40ed1b=_0x222f6b['get'](_0x3a8574[_0x195d48]['pairId']),_0x18227d=_0x222f6b['get'](_0x3a8574[_0x195d48]['id']);_0x3a8574[_0x195d48]['distance']=_0x40ed1b-_0x18227d;}}['_getRevisionsRange'](_0x14409f,_0x44fe48,_0x6e1080=!0x1){const _0x3cad8c=[];let _0x38bd69=this['repository']['getIndex'](_0x14409f),_0x33ace4=this['repository']['getIndex'](_0x44fe48);for(-0x1==_0x33ace4&&(_0x33ace4=this['repository']['_revisions']['length'],_0x6e1080=!0x1);_0x38bd69<_0x33ace4;)_0x3cad8c['push'](this['repository']['getRevision'](_0x38bd69)),_0x38bd69++;return _0x6e1080&&_0x3cad8c['push'](this['repository']['getRevision'](_0x38bd69)),_0x3cad8c;}['_threeWayMerge'](_0x262f74,_0x16e51e,_0x2d53d7,_0x4a2338){const _0x772091=this['editor']['model']['schema'];let _0x12296f=_0x16e51e;for(;_0x262f74[_0x12296f]&&_0x262f74[_0x12296f]['isAdded'];)_0x12296f++;let _0xec34d0=_0x4a2338;for(;_0x2d53d7[_0xec34d0]&&_0x2d53d7[_0xec34d0]['isRemoved'];)_0xec34d0++;_0x240cd9(_0x262f74,_0x16e51e,_0x12296f),_0x240cd9(_0x2d53d7,_0x4a2338,_0xec34d0);const _0x1f1f32=_0x2d53d7['slice'](_0x4a2338,_0xec34d0)['concat'](_0x262f74['slice'](_0x16e51e,_0x12296f));return _0x1f1f32['sort']((_0x340750,_0x1b5d34)=>_0x340750['side']!=_0x1b5d34['side']?_0x340750['side']-_0x1b5d34['side']:_0x340750['level']!=_0x1b5d34['level']?_0x340750['level']-_0x1b5d34['level']:_0x340750['distance']!=_0x1b5d34['distance']?_0x1b5d34['distance']-_0x340750['distance']:!!_0x340750['isAdded']!=!!_0x1b5d34['isAdded']?-0x1==_0x340750['side']||0x0==_0x340750['side']?_0x340750['isAdded']?-0x1:0x1:_0x340750['isAdded']?0x1:-0x1:_0x340750['index']-_0x1b5d34['index']),{'commonTape':_0x1f1f32,'iEnd':_0x12296f,'jEnd':_0xec34d0};function _0x240cd9(_0x1b292b,_0x3cb26e,_0x211cca){let _0x207bab=-0x1,_0x2bd570=Number['POSITIVE_INFINITY'],_0x2bc75f=!0x0;for(let _0x3f3d2b=_0x3cb26e;_0x3f3d2b<_0x211cca;_0x3f3d2b++)if(_0x772091['isInline'](_0x1b292b[_0x3f3d2b]['item'])||(_0x2bc75f=!0x1),_0x1b292b[_0x3f3d2b]['item']['startIndex']<_0x3cb26e&&(_0x207bab=_0x3f3d2b),_0x1b292b[_0x3f3d2b]['item']['endIndex']>=_0x211cca){_0x2bd570=_0x3f3d2b;break;}_0x2bc75f&&(_0x207bab=_0x211cca-0x1);for(let _0x495e48=_0x3cb26e;_0x495e48<_0x211cca;_0x495e48++)_0x1b292b[_0x495e48]['side']=_0x495e48<=_0x207bab?-0x1:_0x495e48<_0x2bd570?0x0:0x1,_0x1b292b[_0x495e48]['index']=_0x495e48;let _0x148f66=0x0;for(let _0x30b95f=_0x3cb26e;_0x30b95f<=_0x207bab;_0x30b95f++)0x0==_0x1b292b[_0x30b95f]['distance']?_0x1b292b[_0x30b95f]['level']=_0x148f66:(_0x148f66++,_0x1b292b[_0x30b95f]['level']=_0x148f66,_0x148f66++);for(let _0x112304=_0x3cb26e;_0x112304<_0x211cca;_0x112304++)0x0==_0x1b292b[_0x112304]['side']&&(_0x1b292b[_0x112304]['level']=_0x148f66);_0x148f66=0x0;for(let _0x5018bc=_0x211cca-0x1;_0x5018bc>=_0x2bd570;_0x5018bc--)0x0==_0x1b292b[_0x5018bc]['distance']?_0x1b292b[_0x5018bc]['level']=_0x148f66:(_0x148f66--,_0x1b292b[_0x5018bc]['level']=_0x148f66,_0x148f66--);}}['_fixObsoleteTags'](_0x2aabcd){const _0x570823=new Map(),_0x4125f7=this['editor']['model']['schema'];for(let _0x1c36ba=0x1;_0x1c36ba<_0x2aabcd['length'];_0x1c36ba++){let _0x218dda,_0x53dab6,_0x2013a9;const _0x14771a=_0x2aabcd[_0x1c36ba],_0x464c18=_0x2aabcd[_0x1c36ba-0x1];if('text'==_0x14771a['type'])continue;if(_0x14771a['type']!=_0x464c18['type'])continue;if(!_0x4125f7['isBlock'](_0x464c18['item'])||_0x4125f7['isLimit'](_0x464c18['item']))continue;if(!_0x4125f7['isBlock'](_0x14771a['item'])||_0x4125f7['isLimit'](_0x14771a['item']))continue;if((_0x2aabcd[_0x1c36ba]['isAdded']||_0x2aabcd[_0x1c36ba]['isAddSuggestion'])&&_0x2aabcd[_0x1c36ba-0x1]['isRemoved'])_0x218dda=_0x2aabcd[_0x1c36ba],_0x53dab6=_0x2aabcd[_0x1c36ba-0x1],_0x2013a9=_0x1c36ba-0x1;else{if(!_0x2aabcd[_0x1c36ba]['isRemoved']||!_0x2aabcd[_0x1c36ba-0x1]['isAdded']&&!_0x2aabcd[_0x1c36ba-0x1]['isAddSuggestion'])continue;_0x218dda=_0x2aabcd[_0x1c36ba-0x1],_0x53dab6=_0x2aabcd[_0x1c36ba],_0x2013a9=_0x1c36ba;}const _0x2abf49=_0x218dda['level']==_0x53dab6['level'],_0xe31fb9=Math['abs'](_0x218dda['level'])<Math['abs'](_0x53dab6['level'])&&0x0==_0x53dab6['distance'];(_0x2abf49||_0xe31fb9)&&(_0x570823['set'](_0x53dab6['id'],_0x218dda['id']),_0x2aabcd['splice'](_0x2013a9,0x1),_0x1c36ba--,_0x218dda['isAdded']=!0x1);}for(let _0x19df16=0x0;_0x19df16<_0x2aabcd['length'];_0x19df16++)_0x570823['has'](_0x2aabcd[_0x19df16]['pairId'])&&(_0x2aabcd[_0x19df16]['pairId']=_0x570823['get'](_0x2aabcd[_0x19df16]['pairId']));}['_removeMissingPairs'](_0x56da8f){const _0x905f90=new Set(_0x56da8f['map'](_0x20d8d4=>_0x20d8d4['id']));for(let _0xca60eb=0x0;_0xca60eb<_0x56da8f['length'];_0xca60eb++)_0x905f90['has'](_0x56da8f[_0xca60eb]['pairId'])||0x0==_0x56da8f[_0xca60eb]['distance']||(_0x56da8f[_0xca60eb]['isIncorrect']=!0x0);return _0x56da8f['filter'](_0x3eeaba=>!_0x3eeaba['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1a5492){const _0x5d61c5=new Set();for(let _0x429462=0x0;_0x429462<_0x1a5492['length'];_0x429462++){if(_0x5d61c5['has'](_0x1a5492[_0x429462]['id'])&&_0x1a5492[_0x429462]['isRemoved']&&(_0x1a5492[_0x429462]['isIncorrect']=!0x0),_0x1a5492[_0x429462]['isIncorrect'])continue;if(0x0==_0x1a5492[_0x429462]['distance'])continue;if('elementStart'!=_0x1a5492[_0x429462]['type'])continue;if(null==_0x1a5492[_0x429462]['pairId'])continue;let _0x2dc4dc=_0x429462+0x1,_0x58530c=0x0;for(;_0x1a5492[_0x2dc4dc]['id']!=_0x1a5492[_0x429462]['pairId'];)'elementStart'==_0x1a5492[_0x2dc4dc]['type']?_0x58530c++:'elementEnd'==_0x1a5492[_0x2dc4dc]['type']&&_0x58530c--,_0x2dc4dc++;if(0x0!=_0x58530c){if(_0x1a5492[_0x429462]['isRemoved'])_0x1a5492[_0x429462]['isIncorrect']=!0x0;else{for(;_0x2dc4dc!=_0x429462;)_0x1a5492[_0x2dc4dc]['isRemoved']&&0x0!=_0x1a5492[_0x2dc4dc]['distance']&&(_0x1a5492[_0x2dc4dc]['isIncorrect']=!0x0,_0x5d61c5['add'](_0x1a5492[_0x2dc4dc]['pairId'])),_0x2dc4dc--;}}}return _0x1a5492['filter'](_0x1aece9=>!_0x1aece9['isIncorrect']);}['_removeUnsupportedChanges'](_0x53922e){const _0x3d6fc2=this['editor']['model']['schema'];for(let _0x448aba=0x0;_0x448aba<_0x53922e['length'];_0x448aba++){if(!(_0x53922e[_0x448aba]['isAdded']||_0x53922e[_0x448aba]['isAddSuggestion']||_0x53922e[_0x448aba]['isRemoved']||_0x53922e[_0x448aba]['isRemoveSuggestion']))continue;if(0x0==_0x53922e[_0x448aba]['distance'])continue;const _0x3e6b53=_0x53922e[_0x448aba]['item'];_0x3d6fc2['isBlock'](_0x3e6b53)||_0x3d6fc2['isLimit'](_0x3e6b53)||(_0x53922e[_0x448aba]['isAdded']&&delete _0x53922e[_0x448aba]['isAdded'],_0x53922e[_0x448aba]['isAddSuggestion']&&delete _0x53922e[_0x448aba]['isAddSuggestion'],_0x53922e[_0x448aba]['isRemoveSuggestion']&&delete _0x53922e[_0x448aba]['isRemoveSuggestion'],_0x53922e[_0x448aba]['isRemoved']&&(_0x53922e[_0x448aba]['isIncorrect']=!0x0));}return _0x53922e['filter'](_0x12abaf=>!_0x12abaf['isIncorrect']);}['_makeModelFromTape'](_0x5f1e7b,_0x26bef3,_0x429c85){const _0x159847=new gt(),_0x4a02c4=[],_0x4038ae=new Map(),_0x4f36ff=this['editor']['model'],_0x247a84=_0x4f36ff['schema'],_0x5890aa=[_0x159847],_0x2fe9a2={},_0x28faa1={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x259ea1=null;const _0x1675a5=[0x0];for(let _0x2a25f9=0x0;_0x2a25f9<_0x5f1e7b['length'];_0x2a25f9++)if('elementStart'===_0x5f1e7b[_0x2a25f9]['type']){_0x5f1e7b[_0x2a25f9]['previousPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5);const _0x3487ab=new ut(_0x5f1e7b[_0x2a25f9]['item']['name'],_0x5f1e7b[_0x2a25f9]['item']['getAttributes']());_0x5890aa[0x0]['_appendChild'](_0x3487ab),_0x1675a5['push'](0x0),_0x5890aa['unshift'](_0x3487ab),_0x5f1e7b[_0x2a25f9]['nextPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5);}else'elementEnd'===_0x5f1e7b[_0x2a25f9]['type']?(_0x5890aa['shift'](),_0x5f1e7b[_0x2a25f9]['previousPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5),_0x1675a5['pop'](),_0x1675a5[_0x1675a5['length']-0x1]++,_0x5f1e7b[_0x2a25f9]['nextPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5)):(_0x5f1e7b[_0x2a25f9]['previousPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5),_0x259ea1?_0x259ea1['_data']+=_0x5f1e7b[_0x2a25f9]['item']['data']:_0x259ea1=new wt(_0x5f1e7b[_0x2a25f9]['item']['data'],_0x5f1e7b[_0x2a25f9]['item']['getAttributes']()),_0x5f1e7b[_0x2a25f9+0x1]&&'text'===_0x5f1e7b[_0x2a25f9+0x1]['type']&&_0x46b277(_0x259ea1,_0x5f1e7b[_0x2a25f9+0x1]['item'])||(_0x5890aa[0x0]['_appendChild'](_0x259ea1),_0x259ea1=null),_0x1675a5[_0x1675a5['length']-0x1]+=_0x5f1e7b[_0x2a25f9]['item']['offsetSize'],_0x5f1e7b[_0x2a25f9]['nextPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5));for(let _0x4daca8=0x0;_0x4daca8<_0x5f1e7b['length'];_0x4daca8++){const _0x553fe2=_0x5f1e7b[_0x4daca8]['previousPosition'],_0x14aa35=_0x5f1e7b[_0x4daca8]['nextPosition'];for(const _0x54cea3 of _0x5f1e7b[_0x4daca8]['markersStart'])_0x4038ae['set'](_0x54cea3,{'start':_0x553fe2,'end':null});_0x4c85cd('isRemoveSuggestion',_0x4daca8,_0x553fe2,_0x14aa35),_0x4c85cd('isAddSuggestion',_0x4daca8,_0x553fe2,_0x14aa35),_0x4c85cd('isRemoved',_0x4daca8,_0x553fe2,_0x14aa35),_0x4c85cd('isAdded',_0x4daca8,_0x553fe2,_0x14aa35);for(const _0x373e1b of _0x5f1e7b[_0x4daca8]['markersEnd']){_0x4038ae['get'](_0x373e1b)['end']=_0x14aa35;}}for(const [_0x318716,_0x314ef5]of _0x4038ae){const _0x3f2940=this['editor']['model']['createRange'](_0x314ef5['start'],_0x314ef5['end']);_0x159847['markers']['set'](_0x318716,_0x3f2940);}return _0x4a02c4['sort']((_0x420dc9,_0x7c8e1d)=>{const _0x22d99c=_0x159847['markers']['get']('revision:'+_0x420dc9['id']),_0x1c2640=_0x159847['markers']['get']('revision:'+_0x7c8e1d['id']);return _0x22d99c['start']['isBefore'](_0x1c2640['start'])?-0x1:_0x22d99c['start']['isAfter'](_0x1c2640['start'])?0x1:_0x22d99c['end']['isBefore'](_0x1c2640['end'])?-0x1:_0x22d99c['end']['isAfter'](_0x1c2640['end'])?0x1:'add'===_0x420dc9['type']?-0x1:0x1;}),{'root':_0x159847,'changes':_0x4a02c4};function _0x4c85cd(_0x18d241,_0x2a655f,_0x474fb6,_0x25cdbd){const _0x5b234b=!!_0x5f1e7b[_0x2a655f][_0x18d241],_0x4a8126=_0x5b234b?_0x5f1e7b[_0x2a655f][_0x18d241]['userId']:null,_0x32c7a5=_0x2a655f===_0x5f1e7b['length']-0x1,_0x8389b2=_0x28faa1[_0x18d241][0x0],_0x437a72=_0x247a84['isObject'](_0x5f1e7b[_0x2a655f]['item']);!_0x2fe9a2[_0x18d241]&&_0x5b234b?_0x2fe9a2[_0x18d241]={'start':_0x474fb6,'tapeItem':_0x5f1e7b[_0x2a655f],'userId':_0x4a8126,'type':_0x18d241}:_0x2fe9a2[_0x18d241]&&!_0x5b234b?(_0x2fe9a2[_0x18d241]['end']=_0x474fb6,_0x29aa09(_0x2fe9a2[_0x18d241]),_0x2fe9a2[_0x18d241]=null):_0x2fe9a2[_0x18d241]&&_0x5b234b&&_0x2fe9a2[_0x18d241]['userId']!==_0x4a8126&&(_0x2fe9a2[_0x18d241]['end']=_0x474fb6,_0x8389b2&&_0x8389b2['userId']===_0x2fe9a2[_0x18d241]['userId']||_0x29aa09(_0x2fe9a2[_0x18d241]),_0x2fe9a2[_0x18d241]={'start':_0x474fb6,'tapeItem':_0x5f1e7b[_0x2a655f],'userId':_0x4a8126,'type':_0x18d241}),_0x2fe9a2[_0x18d241]&&_0x437a72&&('elementStart'!==_0x5f1e7b[_0x2a655f]['type']||_0x8389b2&&_0x8389b2['userId']===_0x4a8126||_0x28faa1[_0x18d241]['unshift']({'userId':_0x4a8126,'object':_0x5f1e7b[_0x2a655f]['item'],'change':_0x2fe9a2[_0x18d241]}),'elementEnd'===_0x5f1e7b[_0x2a655f]['type']&&_0x8389b2&&_0x8389b2['object']===_0x5f1e7b[_0x2a655f]['item']&&(_0x28faa1[_0x18d241]['shift'](),_0x2fe9a2[_0x18d241]=_0x8389b2['change'])),_0x2fe9a2[_0x18d241]&&_0x32c7a5&&(_0x2fe9a2[_0x18d241]['end']=_0x25cdbd,_0x29aa09(_0x2fe9a2[_0x18d241]),_0x2fe9a2[_0x18d241]=null);}function _0x29aa09({start:_0x3eadbf,end:_0x45076b,tapeItem:_0x464176,userId:_0x25902e,type:_0xe5c666}){const _0xb37a8e=_0x464176['item'],_0x145d79=_0x4f36ff['schema']['isBlock'](_0xb37a8e)&&!_0x4f36ff['schema']['isLimit'](_0xb37a8e),_0x27819c=_0x3eadbf['nodeAfter']==_0x45076b['parent']&&_0x45076b['isAtStart'];if(_0x145d79&&_0x27819c)return;const _0x5f311b=_0x4f36ff['createRange'](_0x3eadbf,_0x45076b),_0xc095de=_0x26bef3['get'](_0x25902e),_0x5c150a=new r({'author':_0xc095de,'type':'isAdded'==_0xe5c666||'isAddSuggestion'==_0xe5c666?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xe5c666||'isRemoveSuggestion'==_0xe5c666},'createdAt':new Date(),'rootName':_0x429c85});_0x4a02c4['push'](_0x5c150a),_0x159847['markers']['set']('revision:'+_0x5c150a['id'],_0x5f311b);}function _0x46b277(_0x18318d,_0x47745f){const _0x51cb22=_0x18318d['getAttributes'](),_0x4fb279=_0x47745f['getAttributes']();for(const _0x754222 of _0x51cb22){if(_0x754222[0x1]!==_0x47745f['getAttribute'](_0x754222[0x0]))return!0x1;_0x4fb279['next']();}return _0x4fb279['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x52e890=>{const _0x480ee7=_0x52e890['markerName']['split'](':')[0x1],_0x513de4=this['_getChangeFromId'](_0x480ee7);if(!_0x513de4)return null;const _0x5215e1='add'==_0x513de4['type']?'insertion':'deletion',_0x1c118f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5215e1];return _0x513de4['data']['isSuggestion']&&_0x1c118f['push']('ck-suggestion-marker-'+_0x5215e1+'-new'),this['activeChange']==_0x513de4&&_0x1c118f['push']('ck-suggestion-marker--active'),{'classes':_0x1c118f,'attributes':{'data-change-id':_0x480ee7}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x464fb4=>{_0x464fb4['on']('element:pre',(_0x18700f,_0x43f014,_0x4777d0)=>{const _0x53b181=_0x43f014['viewItem']['getChild'](0x0);if(!_0x53b181||!_0x53b181['is']('element','code'))return;if(!_0x4777d0['consumable']['consume'](_0x53b181,{'attributes':['vid_start','vid_end']}))return;const _0x2fd153=_0x43f014['modelRange']['start']['nodeAfter'];_0x4777d0['writer']['setAttribute']('vid_start',_0x53b181['getAttribute']('vid_start'),_0x2fd153),_0x4777d0['writer']['setAttribute']('vid_end',_0x53b181['getAttribute']('vid_end'),_0x2fd153);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3ee968=>{_0x3ee968['on']('element',(_0x71eef,_0x2eeb3b,_0x4ed0bc)=>{if(!_0x4ed0bc['consumable']['consume'](_0x2eeb3b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2eeb3b['modelRange']['isCollapsed'])return;const _0x1e0a8f=_0x2eeb3b['modelRange']['start']['nodeAfter'];_0x1e0a8f['hasAttribute']('vid_start')||_0x1e0a8f['hasAttribute']('vid')||(_0x4ed0bc['writer']['setAttribute']('vid_start',_0x2eeb3b['viewItem']['getAttribute']('vid_start'),_0x1e0a8f),_0x4ed0bc['writer']['setAttribute']('vid_end',_0x2eeb3b['viewItem']['getAttribute']('vid_end'),_0x1e0a8f));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2833a9=>_0x2833a9['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x523e47,[,_0x46ad70])=>{['vid_start','vid_end','vid']['includes'](_0x46ad70)&&(_0x523e47['return']=!0x0,_0x523e47['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x17b594=>{_0x17b594['on']('attribute:vid',(_0x5853b6,_0x524747,_0x2ff261)=>{if('\x20'!=_0x524747['item']['data']||_0x524747['item']['parent']['maxOffset']>0x1)return;if(!_0x2ff261['consumable']['consume'](_0x524747['item'],_0x5853b6['name']))return;const _0x35e011=_0x2ff261['writer'],_0x2b6bcd=_0x2ff261['mapper']['toViewRange'](_0x524747['range']);_0x35e011['wrap'](_0x2b6bcd,_0x35e011['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x177ad5){const _0x1d07f0=_0x177ad5['plugins']['get']('RevisionViewer');return(_0x2743c5,_0x30c1da,_0x5c6b9a)=>{const _0x439252=_0x30c1da['markerName']['split'](':')[0x1],_0x302161=_0x1d07f0['_getChangeFromId'](_0x439252);if(!_0x302161)return null;const _0x35364f='add'==_0x302161['type']?'split':'merge';if(!_0x5c6b9a['consumable']['test'](_0x30c1da['markerRange'],_0x2743c5['name']))return;const _0x367729=_0x30c1da['markerRange']['getWalker'](),_0x5d9e43=_0x30c1da['markerRange']['start'],_0x516552=_0x177ad5['model']['schema'];let _0x372e6f=null,_0x3a824a=null,_0x32a119=!0x1,_0x27d35e=!0x1;for(const _0x5efd6f of _0x367729){const _0x3fcecc=_0x5efd6f['item'];_0x32a119=_0x32a119||_0x516552['isContent'](_0x3fcecc);const _0x5a7c1e=_0x5c6b9a['mapper']['toViewElement'](_0x3fcecc);if(_0x5a7c1e&&_0x5a7c1e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5efd6f['type']&&(_0x516552['isBlock'](_0x3fcecc)&&!_0x516552['isLimit'](_0x3fcecc)&&(_0x3fcecc['nextSibling']||_0x5d9e43['isAtEnd']?_0x372e6f&&_0x372e6f['parent']==_0x3fcecc||(_0x372e6f=_0x3fcecc,_0x20bde5(_0x5efd6f['previousPosition']),_0x27d35e=!0x0):_0x3a824a=_0x3a824a||_0x5efd6f['previousPosition']));}function _0x20bde5(_0x1bc634){const _0x4f6caa=_0x5c6b9a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x35364f}),_0xb25aea=_0x5c6b9a['mapper']['toViewPosition'](_0x1bc634);_0x302161['data']['isSuggestion']&&_0x5c6b9a['writer']['addClass']('ck-suggestion-marker-'+_0x35364f+'-new',_0x4f6caa),_0x1d07f0['activeChange']==_0x302161&&_0x5c6b9a['writer']['addClass']('ck-suggestion-marker--active',_0x4f6caa),_0x5c6b9a['writer']['insert'](_0xb25aea,_0x4f6caa),_0x5c6b9a['mapper']['bindElementToMarker'](_0x4f6caa,_0x30c1da['markerName']);}_0x32a119||_0x27d35e||!_0x3a824a||_0x20bde5(_0x3a824a);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x5be975,_0x3c82d0,_0x5e7103)=>{const _0x48bd33=_0x5e7103['mapper']['markerNameToElements'](_0x3c82d0['markerName']);if(_0x48bd33){for(const _0x3b7582 of _0x48bd33)(_0x3b7582['hasClass']('ck-suggestion-marker-split')||_0x3b7582['hasClass']('ck-suggestion-marker-merge'))&&(_0x5e7103['mapper']['unbindElementFromMarkerName'](_0x3b7582,_0x3c82d0['markerName']),_0x5e7103['writer']['remove'](_0x3b7582));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x38bae5,_0x835d12,_0x5d3794)=>{const _0x223e2d=_0x835d12['markerName']['split'](':')[0x1],_0x5e1a3a=this['_getChangeFromId'](_0x223e2d);if(!_0x5e1a3a)return null;const _0x4fe502='add'==_0x5e1a3a['type']?'split':'merge';if(_0x5d3794['consumable']['test'](_0x835d12['markerRange'],_0x38bae5['name']))for(const _0x23dedc of _0x835d12['markerRange']['getItems']()){if(!_0x23dedc['is']('element','softBreak'))continue;const _0x2b6586=_0x5d3794['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4fe502}),_0x4922ee=_0x5d3794['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x23dedc));_0x5e1a3a['data']['isSuggestion']&&_0x5d3794['writer']['addClass']('ck-suggestion-marker-'+_0x4fe502+'-new',_0x2b6586),this['activeChange']==_0x5e1a3a&&_0x5d3794['writer']['addClass']('ck-suggestion-marker--active',_0x2b6586),_0x5d3794['writer']['insert'](_0x4922ee,_0x2b6586),_0x5d3794['mapper']['bindElementToMarker'](_0x2b6586,_0x835d12['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3788f2=>{for(const _0x5eb240 of this['editor']['model']['document']['getRootNames']()){const _0x35f3fa=this['editor']['model']['document']['getRoot'](_0x5eb240),_0x2f4e97=this['editor']['editing']['view']['document']['getRoot'](_0x5eb240);if(_0x2f4e97){const _0x4526cb=_0x35f3fa['getAttribute']('revisionHistoryAttachChange');if(_0x3788f2['removeAttribute']('data-change-id',_0x2f4e97),_0x3788f2['removeClass']('ck-revision-history-root-add',_0x2f4e97),_0x3788f2['removeClass']('ck-revision-history-root-remove',_0x2f4e97),_0x3788f2['removeClass']('ck-revision-history-root--active',_0x2f4e97),_0x4526cb){const _0x20f37f=this['_getChangeFromId'](_0x4526cb);if(!_0x20f37f)return null;_0x3788f2['setAttribute']('data-change-id',_0x4526cb,_0x2f4e97),_0x3788f2['addClass']('ck-revision-history-root-'+_0x20f37f['type'],_0x2f4e97),this['activeChange']==_0x20f37f&&_0x3788f2['addClass']('ck-revision-history-root--active',_0x2f4e97);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x40811b=>'revision-comment:'+_0x40811b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x76e760=>'revision-suggestion:'+_0x76e760,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x403643=>({'name':'suggestion:'+_0x403643,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x32f34d=>{const _0x24ba1c=_0x32f34d['markerName']['split'](':')[0x1];return'insertion'!=_0x24ba1c&&'deletion'!=_0x24ba1c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x24ba1c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1738e2,_0x819112,_0x592962)=>{const _0x1e1c5b=_0x592962['mapper']['markerNameToElements'](_0x819112['markerName']);if(_0x1e1c5b){for(const _0x2c0f6e of _0x1e1c5b)_0x2c0f6e['is']('uiElement')&&(_0x592962['mapper']['unbindElementFromMarkerName'](_0x2c0f6e,_0x819112['markerName']),_0x592962['writer']['remove'](_0x2c0f6e));}},{'priority':'high'});}['_getChangeFromId'](_0x4a9e0d){return this['_changeIdToChange']['get'](_0x4a9e0d);}['_getViewForChange'](_0x1ca68e){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x1ca68e),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2883dd,_0x313a9c,_0x22eb32,_0x3e2ad3)=>{_0x3e2ad3&&this['_balloon']['remove'](_0x3e2ad3),_0x22eb32&&(this['_balloon']['add']({'view':_0x22eb32,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2a9566=this['editor']['editing'],_0x3dbb5f=this['_getChangeFromId'](_0x22eb32['changeId']);let _0x492f62;if(_0x3dbb5f['data']['isOnRoot']){const _0x39ec8b=_0x2a9566['view']['getDomRoot'](_0x3dbb5f['rootName']);_0x492f62=Array['from'](_0x39ec8b['getClientRects']());}else{const _0x5ac01d=this['editor']['model']['markers']['get']('revision:'+_0x22eb32['changeId']);_0x492f62=Array['from'](_0x2a9566['mapper']['markerNameToElements'](_0x5ac01d['name']))['map'](_0x452e00=>_0x2a9566['view']['domConverter']['mapViewToDom'](_0x452e00))['map'](_0x56b8f9=>Array['from'](_0x56b8f9['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x492f62[0x0];return _0x492f62['find'](_0x7a66d7=>_0x7a66d7['top']-0x3<=this['_activeViewTarget']['y']&&_0x7a66d7['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x7a66d7['left']-0x3<=this['_activeViewTarget']['x']&&_0x7a66d7['right']+0x3>=this['_activeViewTarget']['x'])||_0x492f62[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x55856b,_0x247348,_0x26e1bb,_0x240f79)=>{this['activeView']=_0x26e1bb?this['_getViewForChange'](_0x26e1bb):null,this['editor']['model']['change'](()=>{const _0x31b4e7=this['editor']['editing'];_0x240f79&&(_0x240f79['data']['isOnRoot']?_0x31b4e7['view']['change'](_0xe22413=>{_0xe22413['removeClass']('ck-revision-history-root--active',_0x31b4e7['view']['document']['getRoot'](_0x240f79['rootName']));}):_0x31b4e7['reconvertMarker']('revision:'+_0x240f79['id'])),_0x26e1bb&&(_0x26e1bb['data']['isOnRoot']?_0x31b4e7['view']['change'](_0x15f9db=>{_0x15f9db['addClass']('ck-revision-history-root--active',_0x31b4e7['view']['document']['getRoot'](_0x26e1bb['rootName']));}):_0x31b4e7['reconvertMarker']('revision:'+_0x26e1bb['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x50a1a4,_0x4daf6f)=>{if(this['activeChange'])return;const _0x616eae=this['_findChangeIdFromDomTarget'](_0x4daf6f['target']),_0x436273=this['_changeIdToChange']['get'](_0x616eae);_0x436273?(this['_activeViewTarget']={'x':_0x4daf6f['domEvent']['x'],'y':_0x4daf6f['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x436273)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3c4ccb,_0x28a200)=>{const _0x553b05=this['_findChangeIdFromDomTarget'](_0x28a200['target']),_0x417f39=this['_changeIdToChange']['get'](_0x553b05);_0x417f39?(this['_activeViewTarget']={'x':_0x28a200['domEvent']['x'],'y':_0x28a200['domEvent']['y']},_0x417f39===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x417f39):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x36cddd){do{const _0x17a82e=_0x36cddd['getAttribute']('data-change-id');if(_0x17a82e)return _0x17a82e;_0x36cddd=_0x36cddd['parent'];}while(_0x36cddd);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x21d83e=>{for(const _0xe42930 of this['editor']['model']['markers'])_0x21d83e['removeMarker'](_0xe42930);});}}function Z(_0x1acffd,_0x32350e){return(_0x5b5755,_0x5576f2,_0x462cec)=>{if(!_0x462cec['consumable']['test'](_0x5576f2['markerRange'],_0x5b5755['name']))return;const _0x1089a7=_0x5576f2['markerRange']['getWalker'](),_0x4d627b=_0x5576f2['markerRange']['start'],_0x348142=_0x1acffd['model']['schema'];let _0x50ad1c=null,_0x44c47b=null,_0x45c02e=!0x1,_0x13985d=!0x1;for(const _0x32785d of _0x1089a7){const _0x272259=_0x32785d['item'];_0x45c02e=_0x45c02e||_0x348142['isContent'](_0x272259);const _0x4cf3ff=_0x462cec['mapper']['toViewElement'](_0x272259);if(_0x4cf3ff&&_0x4cf3ff['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x32785d['type']&&(_0x348142['isBlock'](_0x272259)&&!_0x348142['isLimit'](_0x272259)&&(_0x272259['nextSibling']||_0x4d627b['isAtEnd']?_0x50ad1c&&_0x50ad1c['parent']==_0x272259||(_0x50ad1c=_0x272259,_0x29776c(_0x32785d['previousPosition']),_0x13985d=!0x0):_0x44c47b=_0x44c47b||_0x32785d['previousPosition']));}function _0x29776c(_0x133532){const _0xb62879=_0x462cec['mapper']['toViewPosition'](_0x133532),_0x17b3bd=_0x462cec['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x32350e});_0x462cec['writer']['insert'](_0xb62879,_0x17b3bd),_0x462cec['mapper']['bindElementToMarker'](_0x17b3bd,_0x5576f2['markerName']);}_0x45c02e||_0x13985d||!_0x44c47b||_0x29776c(_0x44c47b);};}class _t extends _0x474bc6{constructor(_0x90eaee){super(_0x90eaee);const _0x22953f=_0x90eaee['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x22953f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x22953f,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4408f6=this['editor'],_0x10ddee=_0x4408f6['plugins']['get'](d),_0x510847=_0x10ddee['isReady']?_0x10ddee['diff']['newRevisionId']:null;_0x4408f6['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x510847);}['refresh'](){const {isReady:_0x3811cb,isEnabled:_0x5a44f2,repository:_0x3c1fbd,diff:_0x46559a}=this['editor']['plugins']['get'](d),_0x2d2da3=_0x46559a&&_0x3c1fbd['getLaterVisibleRevision'](_0x46559a['newRevisionId']);this['isEnabled']=_0x3811cb&&_0x5a44f2&&Boolean(_0x2d2da3);}}class yt extends _0x474bc6{['_step'];constructor(_0x46a9a5,{direction:_0x243c19}){super(_0x46a9a5);const _0x94cccb=_0x46a9a5['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x243c19?0x1:-0x1,this['listenTo'](_0x94cccb,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x94cccb,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x94cccb,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x25886c=this['editor'],_0x25e932=_0x25886c['plugins']['get'](d),{isNavigationMode:_0x31fcd8,currentChangeNumber:_0x3c5f51}=_0x25e932;let _0x253bdb;if(_0x25e932['activeChange']=_0x31fcd8?_0x25e932['diff']['changes']['get'](_0x3c5f51+this['_step']):_0x25e932['diff']['changes']['first'],_0x25e932['activeChange']['data']['isOnRoot'])_0x253bdb=_0x25886c['editing']['view']['getDomRoot'](_0x25e932['activeChange']['rootName']);else{const _0x108ae5=_0x25886c['model']['markers']['get']('revision:'+_0x25e932['activeChange']['id']);_0x253bdb=_0x26f880(_0x25886c['editing'],_0x108ae5);}_0x42da1f({'target':_0x253bdb,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x26441a,currentChangeNumber:_0x241f99,numberOfChanges:_0x2d76df,isReady:_0x5d215c,isEnabled:_0x525ae8}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x525ae8&&_0x5d215c&&_0x2d76df)&&(!_0x26441a||(0x1===this['_step']?_0x241f99<_0x2d76df-0x1:_0x241f99>0x0));}}class _i extends _0x377738{constructor(_0x41611a){super(_0x41611a);const _0xd4a28e=this['bindTemplate'],_0x59d4f3=new _0x4cea6e(_0x41611a),_0x5d4660=new _0x4cea6e(_0x41611a);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',(_0x4e9b56,_0x31dd9d)=>_0x4e9b56&&_0x31dd9d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x282be3,_0x43eb86,_0x393f92,_0xa66011)=>{if(!_0x282be3)return m(_0x41611a,'Loading...');if(!_0x393f92)return m(_0x41611a,'No\x20changes');const _0x4db490=m(_0x41611a,'NUMBER_OF_CHANGES',_0x393f92);return _0xa66011?m(_0x41611a,'X_OF_Y_CHANGES',[_0x43eb86+0x1,_0x393f92]):_0x4db490;}),_0x59d4f3['set']({'label':m(_0x41611a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x47c9dd}),_0x5d4660['set']({'label':m(_0x41611a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x35bc15}),_0x59d4f3['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5d4660['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x59d4f3['on']('execute',()=>this['fire']('execute','backward')),_0x5d4660['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',_0xd4a28e['if']('_isStatusLabelVisible','ck-hidden',_0x435cde=>!_0x435cde)]},'children':[{'text':_0xd4a28e['to']('isNavigationMode',_0x133681=>_0x133681?m(_0x41611a,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x41611a,'Total')+':\x20')}]},{'text':_0xd4a28e['to']('_statusText')}]},new _0x36a155(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x59d4f3,_0x5d4660]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x5aa884{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x37d1ae=this['editor']['editing']['view'];_0x37d1ae['change'](_0x462691=>{for(const _0x100645 of _0x37d1ae['document']['roots'])_0x462691['addClass'](ce,_0x100645);});}['hide'](){const _0x53507a=this['editor']['editing']['view'];_0x53507a['change'](_0x2a9106=>{for(const _0x1f5363 of _0x53507a['document']['roots'])_0x2a9106['removeClass'](ce,_0x1f5363);});}}class w extends _0x5aa884{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x20ba26=this['editor'],_0x428b7=_0x20ba26['plugins']['get'](d),_0x1a8a77=_0x20ba26['plugins']['get'](le);_0x20ba26['ui']['componentFactory']['add']('exitToEditing',_0xa98aaf=>{const _0xd321e5=new _0x4cea6e(_0xa98aaf);return _0xd321e5['set']({'label':m(_0xa98aaf,'Back\x20to\x20editing'),'icon':_0x49f4f5,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xd321e5,'execute',()=>{_0x20ba26['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xd321e5;}),_0x20ba26['ui']['componentFactory']['add']('restoreRevision',_0x5704ae=>{const _0x24ad13=new _0x4cea6e(_0x5704ae);return _0x24ad13['set']({'label':m(_0x5704ae,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x24ad13['bind']('isEnabled')['to'](_0x20ba26['commands']['get']('restoreRevision')),this['listenTo'](_0x24ad13,'execute',()=>_0x20ba26['execute']('restoreRevision')),_0x24ad13;}),_0x20ba26['ui']['componentFactory']['add']('changesNavigation',_0x23bae6=>{const _0x596251=new _i(_0x23bae6),_0x226cb8=_0x20ba26['commands']['get']('showPreviousChange'),_0x5916a1=_0x20ba26['commands']['get']('showNextChange');return _0x596251['bind']('isBackwardNavigationEnabled')['to'](_0x226cb8,'isEnabled'),_0x596251['bind']('isForwardNavigationEnabled')['to'](_0x5916a1,'isEnabled'),_0x596251['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x428b7),this['listenTo'](_0x596251,'execute',(_0x555d52,_0x1c888c)=>{_0x20ba26['execute']('forward'===_0x1c888c?'showNextChange':'showPreviousChange');}),_0x596251;}),_0x1a8a77['show'](),_0x428b7['on']('change:isReady',(_0x4ecdb5,_0x4cf788,_0xbf015e)=>{_0xbf015e?_0x1a8a77['hide']():_0x1a8a77['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x3d25e6,_0x4bb233){super(_0x3d25e6,_0x4bb233);const _0x38fae1=this['bindTemplate'];this['set']({'label':m(_0x3d25e6,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x3d25e6,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x38fae1['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x52b6da=this['fieldView']['element'];this['_tooltipString']=_0x52b6da['scrollWidth']>_0x52b6da['clientWidth']&&_0x52b6da['value']||'';}}class oi extends _0x377738{constructor(_0x35d8f3,_0x5d02ac,_0x315b92){super(_0x35d8f3);const _0x4b1604=new _0x2b341d();_0x4b1604['set']({'content':_0x200d00,'viewBox':'0\x200\x2011\x2010'});const _0x370068=['ck','ck-revision-history-sidebar__revision-author'];_0x315b92&&_0x370068['push']('ck-revision-history-sidebar__revision-author_creator');const _0x42a3ec=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x35d8f3,_0x315b92?'Revision\x20creator':'Revision\x20author')},'children':[_0x4b1604,_0x5d02ac['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x370068},'children':_0x42a3ec});}}function ni(_0x53175c,_0x5405f2){const _0x1cf35d=_0x53175c['bindTemplate'],_0x5e70e7=_0x53175c['locale'],_0x6798bb=_0x28f4b1(_0x5e70e7);_0x6798bb['panelPosition']='sw';const _0x1a6669=function(_0x4bd209,_0x1b0867){const _0x4b4855=function(_0x12e48b,_0x21ae25){const _0x9d5f93=_0x12e48b['locale'],_0x30e9ad={'Compare\x20against\x20selected':m(_0x9d5f93,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x9d5f93,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x9d5f93,'Restore\x20this\x20revision')};return _0x21ae25['map'](_0x1cda99=>{const _0x9516bd=_0x30e9ad[_0x1cda99['name']];return _0x9516bd&&_0x9516bd!==_0x1cda99['name']&&(_0x1cda99['name']=_0x9516bd),_0x1cda99;});}(_0x4bd209,_0x1b0867),_0x47f561=new _0x1056b3();for(const _0x52ae30 of _0x4b4855){const _0x4e4f96={'type':'button','model':new to({'label':_0x52ae30['name'],'class':_0x52ae30['class'],'withText':!0x0,'role':'menuitem','_action':_0x52ae30['action']})};_0x4e4f96['model']['bind']('isEnabled')['to'](_0x4bd209,'isActionsDropdownOpen',_0x24bed2=>'function'!=typeof _0x52ae30['isEnabled']||(!_0x24bed2||_0x52ae30['isEnabled'](_0x4bd209))),_0x47f561['add'](_0x4e4f96);}return _0x47f561;}(_0x53175c,_0x5405f2);return _0x53175c['bind']('isActionsDropdownOpen')['to'](_0x6798bb,'isOpen'),_0x6798bb['buttonView']['set']({'label':m(_0x5e70e7,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2aa713}),_0x6798bb['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1cf35d['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1cf35d['to'](_0x576a41=>_0x576a41['stopPropagation']())}}),_0x6798bb['on']('execute',_0x5d6053=>{_0x53175c['isReady']&&'function'==typeof _0x5d6053['source']['_action']&&_0x5d6053['source']['_action'](_0x53175c);}),_0x27322b(_0x6798bb,_0x1a6669,{'role':'menu'}),_0x6798bb['listenTo'](_0x53175c,'change:isActionsDropdownOpen',(_0x3f5538,_0x1d3b13,_0x4ce8cb)=>{if(_0x4ce8cb)for(const _0x15def3 of _0x6798bb['listView']['items']){const _0x290c63=_0x15def3['children']['first'],_0x2d592a=_0x5405f2['find'](_0x499af3=>_0x499af3['action']===_0x290c63['_action'])['isVisible'];_0x15def3['isVisible']=void 0x0===_0x2d592a||_0x2d592a(_0x53175c);}}),_0x6798bb;}class ai extends/* #__PURE__ -- @preserve */
26
- _0x256f9d(_0x377738){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x51246f,_0x437cec,_0x135607,_0xade236){super(_0x51246f);const _0x1f0934=this['bindTemplate'],_0x35f93a=function(_0x27d79e,_0x11c592){const _0x54a153=Array['from'](_0x11c592['authors'])['filter'](_0x398b4b=>_0x398b4b!=_0x11c592['creator']);return _0x11c592['creator']&&_0x54a153['unshift'](_0x11c592['creator']),_0x54a153['map'](_0x374128=>new oi(_0x27d79e,_0x374128,_0x374128==_0x11c592['creator']));}(_0x51246f,_0x437cec);this['id']=_0x437cec['id'],this['_revision']=_0x437cec,this['_requireRevisionName']=_0xade236,this['bind']('name','createdAt')['to'](_0x437cec),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0xa16b94=>{return _0x4d42b1=_0x51246f['uiLanguage'],(_0x1d8e05=_0xa16b94)['toLocaleDateString'](_0x4d42b1,{'month':'long','day':'numeric'})+',\x20'+_0x1d8e05['toLocaleTimeString'](_0x4d42b1,{'hour':'numeric','minute':'numeric'});var _0x4d42b1,_0x1d8e05;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0x51246f,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4f395d=>_0x4f395d||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x43e683,_0x359b90)=>_0x43e683&&_0x359b90),this['revisionActionsView']=_0x135607&&_0x135607['length']?ni(this,_0x135607):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1f0934['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1f0934['if']('isEnabled','ck-disabled',_0x15c2cc=>!_0x15c2cc),_0x1f0934['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1f0934['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1f0934['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':_0x1f0934['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':_0x35f93a}]},this['revisionActionsView']],'on':{'click':_0x1f0934['to'](_0x1171fb=>{_0x1171fb['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x2aa71a=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x2aa71a,'change',()=>{this['_requireRevisionName']&&!_0x2aa71a['value']||this['fire']('setName',{'id':this['id'],'name':_0x2aa71a['value']}),_0x2aa71a['value']||(_0x2aa71a['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function vi(_0x22901a,_0x5c879e){const _0x47193b=_0x371ddf['fromJSDate'](_0x22901a)['setLocale'](_0x5c879e),_0x3e0d72=_0x371ddf['local'](),_0x3410df=_0x3e0d72['minus']({'days':0x1})['startOf']('day');let _0x526f71,_0x34f1eb;return _0x47193b['hasSame'](_0x3e0d72,'day')?(_0x526f71=_0x47193b['startOf']('day')['toJSDate'](),_0x34f1eb=_0x47193b['toRelativeCalendar']()):_0x47193b['hasSame'](_0x3410df,'day')?(_0x526f71=_0x3410df['toJSDate'](),_0x34f1eb=_0x47193b['toRelativeCalendar']()):_0x47193b['hasSame'](_0x3e0d72,'week')?(_0x526f71=_0x47193b['startOf']('week')['toJSDate'](),_0x34f1eb=_0x47193b['weekdayLong']||''):_0x47193b['hasSame'](_0x3e0d72,'year')?(_0x526f71=_0x47193b['startOf']('month')['toJSDate'](),_0x34f1eb=_0x47193b['monthLong']||''):(_0x526f71=_0x47193b['startOf']('year')['toJSDate'](),_0x34f1eb=String(_0x47193b['year'])),{'startDate':_0x526f71,'localizedPeriodName':_0x34f1eb};}class mi extends _0x377738{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x5a3979,_0x6ea9b7,_0x30b49c,_0x382e32){super(_0x5a3979);const _0x393f16=vi(_0x6ea9b7,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x6ea9b7,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x30b49c,this['_requireRevisionName']=_0x382e32,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':_0x393f16}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x48c529){const _0x3a8926=new ai(this['locale'],_0x48c529,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3a8926);}['removeRevision'](_0x120b97){const _0x7001e9=this['revisionViews']['find'](_0x4e600c=>_0x4e600c['id']===_0x120b97['id']);this['revisionViews']['remove'](_0x7001e9);}}class as extends _0x377738{constructor(_0x2fc54d){super(_0x2fc54d);const _0x1881dd=new _0x2b341d();_0x1881dd['content']=_0x5b5e2c,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1881dd,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x2fc54d,'Revision\x20history')]}]});}}class di extends _0x377738{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1c2c8a,_0x162cf3,_0x3f724c,_0x376f20){super(_0x1c2c8a);const _0x218bd0=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x162cf3,this['_revisionActions']=_0x3f724c,this['_requireRevisionName']=_0x376f20,this['on']('select',(_0x1ba821,_0x305f12)=>{this['fire']('revisionSelected',_0x305f12);}),this['on']('setName',(_0x80fcf,_0x193380)=>{this['fire']('revisionSetName',_0x193380);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x1c2c8a),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x218bd0['if']('isEnabled','ck-disabled',_0x1cb711=>!_0x1cb711)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x4ca237 of this['_revisions'])this['_addRevision'](_0x4ca237);this['_revisions']['on']('add',(_0x18eabb,_0x1fc009)=>{this['_addRevision'](_0x1fc009);}),this['_revisions']['on']('remove',(_0x5f3e30,_0x57b9bc)=>{this['_removeRevision'](_0x57b9bc);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x238a37=>_0x238a37['revisionViews']['map'](_0x46adb4=>_0x46adb4))['flat']();}['selectRevision'](_0x5bde22){for(const _0xa144fd of this['revisionViews'])_0x5bde22&&_0x5bde22['id']===_0xa144fd['id']?_0xa144fd['select']():_0xa144fd['deselect']();}['highlightRevisions'](_0x229c88){for(const _0x511cf8 of this['revisionViews'])_0x229c88['some'](({id:_0x418155})=>_0x418155===_0x511cf8['id'])?_0x511cf8['highlight']():_0x511cf8['unhighlight']();}['_addRevision'](_0x564fb8){const _0xde20ad=vi(_0x564fb8['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5065ca=this['timePeriodViews']['get'](0x0);_0x5065ca&&_0x5065ca['startDate']['getTime']()===_0xde20ad['getTime']()||(_0x5065ca=new mi(this['locale'],_0xde20ad,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5065ca)),_0x5065ca['addRevision'](_0x564fb8);}['_removeRevision'](_0x3382a6){const _0x1d7556=vi(_0x3382a6['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x1d7556)['removeRevision'](_0x3382a6);}['_getTimePeriodViewByStartDate'](_0x572623){return this['timePeriodViews']['find'](_0x26d6b7=>_0x26d6b7['startDate']['getTime']()===_0x572623['getTime']());}}class g extends _0x5aa884{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0xcb1cec,uid as _0x47cd61,Collection as _0xc0b39c,logWarning as _0x2dad38,FocusTracker as _0x56b250,KeystrokeHandler as _0xe5d47,scrollViewportToShowTarget as _0x38eeba,ResizeObserver as pt,ElementReplacer as ht,CKEditorError as _0x141381}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x17f390,set as _0x28fabf,unset as _0x9391bb,isEqual as _0x2ef2d0}from'es-toolkit/compat';import{Plugin as _0x26f450,PendingActions as _0x8cd40,Command as _0x573d0a,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0xbb1ed5,getMarkerDomElement as _0x1f8be4,ConfirmMixin as _0x3bf4fb,sanitizeEditorConfig as _0x21b855}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x53812f,Element as ut,Range as ft,ViewUIElement as _0x2af098,ViewRawElement as _0x45c87a,ViewEmptyElement as _0x5a2ecc,ViewAttributeElement as _0x122c61,ViewContainerElement as _0x3e4f10,Position as vt,ViewText as _0x2f79b6,ViewElement as _0x15bf3f,DocumentFragment as gt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5ce4fd,IconChevronUp as _0xaa3d7,IconChevronDown as _0x2feeab,IconUndo as _0x6af520,IconUser as _0x944b2,IconThreeVerticalDots as _0x19a42a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x525a1d,injectCssTransitionDisabler as ts,submitHandler as _0x124e02,LabeledFieldView as at,createLabeledInputText as ti,createDropdown as _0x290b2b,ListView as _0x148aee,ListItemView as te,ButtonView as _0x278200,MenuBarMenuView as _0x56f35c,MenuBarMenuListView as _0x5df39b,MenuBarMenuListItemView as _0x63b3db,MenuBarMenuListItemButtonView as _0x2550e0,ContextualBalloon as _0x4fc96b,ToolbarSeparatorView as _0x5c64c1,IconView as _0x35b78b,addListToDropdown as _0x19a37f,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x920f1c}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
+ _0xcb1cec(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x220107){super(),this['id']=_0x220107['id']||_0x47cd61(),this['creator']=_0x220107['creator']||null,this['authors']=_0x220107['authors']||[],this['diffData']=_0x220107['diffData']||null,this['toVersion']=_0x220107['toVersion']||0x0,this['fromVersion']=_0x220107['fromVersion']||0x0,this['set']('name',_0x220107['name']||''),this['set']('createdAt',_0x220107['createdAt']||new Date()),this['set']('attributes',_0x220107['attributes']||{});}['setName'](_0x3fb88d){this['_update']({'name':_0x3fb88d});}['setAttribute'](_0x4fb1ba,_0xbf552a){const _0x3e078c=_0x17f390(this['attributes']);_0x28fabf(_0x3e078c,_0x4fb1ba,_0xbf552a),this['_update']({'attributes':_0x3e078c});}['removeAttribute'](_0x1f130c){const _0x4213ca=_0x17f390(this['attributes']);_0x9391bb(_0x4213ca,_0x1f130c),this['_update']({'attributes':_0x4213ca});}['_update'](_0x34d464,_0x110de9=!0x1){let _0x37843d=!0x1;const _0xd6b3a8={'id':this['id']},_0x4f8866=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x2348d7 of _0x4f8866){const _0x2fb371=_0x34d464[_0x2348d7];void 0x0!==_0x2fb371&&_0x2fb371!==this[_0x2348d7]&&(this[_0x2348d7]=_0x2fb371,_0xd6b3a8[_0x2348d7]=_0x2fb371,_0x37843d=!0x0);}_0x37843d&&(_0xd6b3a8['authors']&&(_0xd6b3a8['authorsIds']=_0xd6b3a8['authors']['map'](_0x42131d=>_0x42131d['id']),delete _0xd6b3a8['authors']),this['fire']('_update',_0xd6b3a8,_0x110de9));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x211a0d=>_0x211a0d['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x26f450{['_revisions'];static get['requires'](){return[_0xbb1ed5];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x228e5e){super(_0x228e5e),this['_revisions']=new _0xc0b39c();}['afterInit'](){!async function(_0x4e29fc){const _0x316d08=_0x384eb4([0x59,0x6e,0x47,0x66,0x63,0x53,0x39,0x55,0x79,0x69,0x56,0x41,0x6b,0x73,0x35,0x78,0x43,0x52,0x46,0x50,0x57,0x64,0x4a,0x4e,0x48,0x4f,0x37,0x45,0x6c,0x6a,0x49,0x54,0x72,0x42,0x32,0x33,0x68,0x36,0x76,0x61,0x4b,0x71,0x4d,0x44,0x7a,0x5a,0x77,0x31,0x51,0x6f,0x65,0x58,0x74,0x75,0x4c,0x38,0x6d,0x30,0x70,0x62,0x34,0x67]),_0x56b126=0xeb829,_0x3c62cc=0x177d6f34,_0x1c6dee=0x177a0dc4^_0x3c62cc,_0xbe7b36=window[_0x384eb4([0x44,0x61,0x74,0x65])][_0x384eb4([0x6e,0x6f,0x77])](),_0x2435d7=_0x4e29fc[_0x384eb4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2ca75a=new window[(_0x384eb4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ccc74=>{_0x2435d7[_0x384eb4([0x6f,0x6e,0x63,0x65])](_0x384eb4([0x72,0x65,0x61,0x64,0x79]),_0x3ccc74);}),_0x344061={[_0x384eb4([0x6b,0x74,0x79])]:_0x384eb4([0x45,0x43]),[_0x384eb4([0x75,0x73,0x65])]:_0x384eb4([0x73,0x69,0x67]),[_0x384eb4([0x63,0x72,0x76])]:_0x384eb4([0x50,0x2d,0x32,0x35,0x36]),[_0x384eb4([0x78])]:_0x384eb4([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]),[_0x384eb4([0x79])]:_0x384eb4([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]),[_0x384eb4([0x61,0x6c,0x67])]:_0x384eb4([0x45,0x53,0x32,0x35,0x36])},_0x3993ae=_0x2435d7[_0x384eb4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x384eb4([0x67,0x65,0x74])](_0x384eb4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x56cad4(){let _0x41e236,_0x20173b=null,_0x3a1967=null;try{if(_0x3993ae==_0x384eb4([0x47,0x50,0x4c]))return _0x384eb4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x41e236=_0x4ec099(),!_0x41e236)return _0x384eb4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x41e236[_0x384eb4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3a1967=_0x4ba643(_0x41e236[_0x384eb4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x41e236[_0x384eb4([0x6a,0x74,0x69])])),await _0x36c63d()?_0x45e0b5()?_0x31719e()?_0x384eb4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x191f6d()?(_0x41e236[_0x384eb4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x384eb4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x20173b=_0x5bc099(_0x384eb4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x41e236[_0x384eb4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x384eb4([0x74,0x72,0x69,0x61,0x6c])&&(_0x20173b=_0x5bc099(_0x384eb4([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xa3298c()):_0x384eb4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x384eb4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x384eb4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x159f18){return _0x384eb4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x31719e(){const _0x6e34a5=[_0x384eb4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x384eb4([0x74,0x72,0x69,0x61,0x6c])][_0x384eb4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41e236[_0x384eb4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xbe7b36/0x3e8:0xe10*_0x1c6dee;return _0x41e236[_0x384eb4([0x65,0x78,0x70])]<_0x6e34a5;}function _0x45e0b5(){const _0x10145e=_0x41e236[_0x384eb4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x10145e)return!0x1;if(_0x10145e[_0x384eb4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x384eb4([0x2a])))return!0x0;if(_0x10145e[_0x384eb4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x384eb4([0x52,0x48])))return!0x0;if(_0x10145e[_0x384eb4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x384eb4([0x52,0x52,0x48]))){if(_0x180ace())return!0x0;if(_0x25ab56()||_0x1db989())return!0x0;}return!0x1;}function _0x191f6d(){const _0x5c8e36=_0x41e236[_0x384eb4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5c8e36||0x0==_0x5c8e36[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x49442c}=new URL(window[_0x384eb4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5c8e36[_0x384eb4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49442c))return!0x0;const _0xf8ab5e=_0x49442c[_0x384eb4([0x73,0x70,0x6c,0x69,0x74])](_0x384eb4([0x2e]));return _0x5c8e36[_0x384eb4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x170c98=>_0x170c98[_0x384eb4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x384eb4([0x2a])))[_0x384eb4([0x6d,0x61,0x70])](_0xd99933=>_0xd99933[_0x384eb4([0x73,0x70,0x6c,0x69,0x74])](_0x384eb4([0x2e])))[_0x384eb4([0x73,0x6f,0x6d,0x65])](_0x3817f9=>_0xf8ab5e[_0x384eb4([0x65,0x76,0x65,0x72,0x79])]((_0x23baf2,_0x556381)=>_0x3817f9[_0x556381]===_0x23baf2||_0x3817f9[_0x556381]===_0x384eb4([0x2a])));}function _0xa3298c(){return _0x20173b&&_0x3a1967?new window[(_0x384eb4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14d829,_0x4c33b8)=>{_0x20173b[_0x384eb4([0x74,0x68,0x65,0x6e])](_0x14d829,_0x4c33b8),_0x3a1967[_0x384eb4([0x74,0x68,0x65,0x6e])](_0x269517=>{_0x269517!=_0x384eb4([0x56,0x61,0x6c,0x69,0x64])&&_0x14d829(_0x269517);},_0x4c33b8);}):_0x20173b||_0x3a1967||_0x384eb4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4ba643(_0x1d7f45,_0x4acc5e){return new window[(_0x384eb4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47ee67=>{if(_0x7ce330())return _0x47ee67(_0x384eb4([0x56,0x61,0x6c,0x69,0x64]));_0x5b423b(),_0x2435d7[_0x384eb4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x384eb4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x132a00=!0x1;const _0x286d7e=_0x47cd61();function _0x1ce6a8(_0x9acd6e){return!!_0x9acd6e&&(typeof _0x9acd6e===_0x384eb4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x9acd6e===_0x384eb4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x9acd6e[_0x384eb4([0x74,0x68,0x65,0x6e])]===_0x384eb4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x9acd6e[_0x384eb4([0x63,0x61,0x74,0x63,0x68])]===_0x384eb4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x40dee1(_0x5837da){_0x459134(_0x5837da)[_0x384eb4([0x74,0x68,0x65,0x6e])](_0x3786d9=>{if(!_0x3786d9||_0x3786d9[_0x384eb4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x384eb4([0x6f,0x6b]))return _0x384eb4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x262fab(_0x43740a(_0x286d7e+_0x4acc5e))!=_0x3786d9[_0x384eb4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x384eb4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x384eb4([0x56,0x61,0x6c,0x69,0x64]);})[_0x384eb4([0x74,0x68,0x65,0x6e])](_0x500b44=>(_0x31482a(),_0x500b44),()=>{const _0x594999=_0x4fd242();return null==_0x594999?(_0x31482a(),_0x384eb4([0x56,0x61,0x6c,0x69,0x64])):_0x384eb4(_0xbe7b36-_0x594999>(0x3371eb34^_0x3c62cc)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x384eb4([0x74,0x68,0x65,0x6e])](_0x47ee67)[_0x384eb4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x47ee67(_0x384eb4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1d7d6f=0x174b81b4^_0x3c62cc;function _0x31482a(){const _0x67391f=_0x384eb4([0x6c,0x6c,0x63,0x74,0x2d])+_0x262fab(_0x43740a(_0x1d7f45)),_0x50b473=_0x28d281(_0x262fab(window[_0x384eb4([0x4d,0x61,0x74,0x68])][_0x384eb4([0x63,0x65,0x69,0x6c])](_0xbe7b36/_0x1d7d6f)));window[_0x384eb4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x384eb4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x67391f,_0x50b473);}function _0x4fd242(){const _0x54c835=_0x384eb4([0x6c,0x6c,0x63,0x74,0x2d])+_0x262fab(_0x43740a(_0x1d7f45)),_0x345692=window[_0x384eb4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x384eb4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x54c835);return _0x345692?window[_0x384eb4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x28d281(_0x345692),0x10)*_0x1d7d6f:null;}function _0x459134(_0x4567d1){return new window[(_0x384eb4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4d9acd,_0x15ed64)=>{_0x4567d1[_0x384eb4([0x74,0x68,0x65,0x6e])](_0x4d9acd,_0x15ed64),window[_0x384eb4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x15ed64,0x177cbbf4^_0x3c62cc);});}}_0x2435d7[_0x384eb4([0x6f,0x6e])](_0x384eb4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1ebd53,_0x36b8f0)=>{if(_0x36b8f0[0x0]!=_0x1d7f45)return _0x47ee67(_0x384eb4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x36b8f0[0x1]={..._0x36b8f0[0x1],[_0x384eb4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x286d7e};},{[_0x384eb4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x384eb4([0x68,0x69,0x67,0x68])}),_0x2435d7[_0x384eb4([0x6f,0x6e])](_0x384eb4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x497c5f=>{_0x1ce6a8(_0x497c5f[_0x384eb4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x132a00=!0x0,_0x40dee1(_0x497c5f[_0x384eb4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x384eb4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x384eb4([0x6c,0x6f,0x77])}),_0x2ca75a[_0x384eb4([0x74,0x68,0x65,0x6e])](()=>{_0x132a00||_0x47ee67(_0x384eb4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x7ce330(){return _0x2435d7[_0x384eb4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x384eb4([0x76,0x69,0x65,0x77])][_0x384eb4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x384eb4([0x61,0x75,0x74,0x6f]);}function _0x5b423b(){_0x2435d7[_0x384eb4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x384eb4([0x76,0x69,0x65,0x77])][_0x384eb4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x384eb4([0x61,0x75,0x74,0x6f]);}}function _0x5bc099(_0x4c2f6f){const _0x1f824b=[new window[(_0x384eb4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a9525=>setTimeout(_0x3a9525,0x177451f8^_0x3c62cc)),_0x2ca75a[_0x384eb4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x384eb4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x339a2c=>{const _0x342fab=0x177d6f33^_0x3c62cc,_0x462e6b=_0x4e29fc[_0x384eb4([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x5df65f(){_0x462e6b[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x342fab&&_0x339a2c();}_0x5df65f(),_0x462e6b[_0x384eb4([0x6f,0x6e])](_0x384eb4([0x61,0x64,0x64]),_0x5df65f);})),new window[(_0x384eb4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58a393=>{function _0x5257e0(){for(const _0x1fb34d in window)if(window[_0x384eb4([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x384eb4([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1fb34d))&&window[_0x1fb34d]==_0x56b126)return _0x58a393();_0x2435d7[_0x384eb4([0x73,0x74,0x61,0x74,0x65])]!=_0x384eb4([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x384eb4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5257e0,0x177d7cbc^_0x3c62cc);}_0x26bbed(_0x384eb4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x5257e0();})];return window[_0x384eb4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x384eb4([0x72,0x61,0x63,0x65])](_0x1f824b)[_0x384eb4([0x74,0x68,0x65,0x6e])](()=>_0x4c2f6f);}async function _0xbc8d5e(){if(await _0x2ca75a,_0x26bbed(_0x384eb4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4989a8=_0x4e29fc[_0x384eb4([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2a5397=_0x4e29fc[_0x384eb4([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])](_0x4989a8[_0x384eb4([0x69,0x64])]),_0x26213f=_0x1ccc9c(_0x384eb4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x26213f[_0x384eb4([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4989a8['id'],_0x2a5397?_0x2a5397['id']:null,!0x0),_0x26213f[_0x384eb4([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x384eb4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x26213f[_0x384eb4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x26213f[_0x384eb4([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0xbc97fa,void(_0x26213f[_0x384eb4([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0xbc97fa);}if(_0x26bbed(_0x384eb4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x5f94eb=_0x1ccc9c(_0x384eb4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x5f94eb[_0x384eb4([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x384eb4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5f94eb[_0x384eb4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5f94eb[_0x384eb4([0x75,0x70,0x64,0x61,0x74,0x65])]=_0xbc97fa,_0x5f94eb[_0x384eb4([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0xbc97fa;}_0x2435d7[_0x384eb4([0x6d,0x6f,0x64,0x65,0x6c])][_0x384eb4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xbc97fa,_0x2435d7[_0x384eb4([0x6d,0x6f,0x64,0x65,0x6c])][_0x384eb4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xbc97fa,_0x2435d7[_0x384eb4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x384eb4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x180ace(){return _0x26bbed(_0x384eb4([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1ccc9c(_0x384eb4([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x384eb4([0x73,0x74,0x61,0x74,0x65])]==_0x384eb4([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x25ab56(){return _0x26bbed(_0x384eb4([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 _0x1db989(){return _0x26bbed(_0x384eb4([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1f4ec8(_0x36df47){const _0x2bdfca=_0x3fa10c();_0x2435d7[_0x2bdfca]=_0x384eb4([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])+_0x36df47,_0x36df47[_0x384eb4([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x384eb4([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x3fa10c()]=_0x56b126),_0x36df47!=_0x384eb4([0x56,0x61,0x6c,0x69,0x64])&&_0xbc8d5e();}function _0x3fa10c(){const _0xdb6574=window[_0x384eb4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x384eb4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x384eb4([0x6e,0x6f,0x77])]())[_0x384eb4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x384eb4([0x2e]),'');let _0x11a25d=_0x384eb4([0x59]);for(let _0x240e07=0x0;_0x240e07<_0xdb6574[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x240e07+=0x2){let _0x336d19=window[_0x384eb4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xdb6574[_0x384eb4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x240e07,_0x240e07+0x2));_0x336d19>=_0x316d08[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x336d19-=_0x316d08[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x11a25d+=_0x316d08[_0x336d19];}return _0x11a25d;}function _0x4ec099(){const _0x235e94=_0x3993ae[_0x384eb4([0x73,0x70,0x6c,0x69,0x74])](_0x384eb4([0x2e]));if(0x3!=_0x235e94[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x50ffc1(_0x235e94[0x1]);function _0x50ffc1(_0x248e8c){const _0x59f28e=_0x15943b(_0x248e8c);return _0x59f28e&&_0xc539e7()?_0x59f28e:null;function _0xc539e7(){const _0x3f7504=_0x59f28e[_0x384eb4([0x6a,0x74,0x69])],_0x1d39a1=window[_0x384eb4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f7504[_0x384eb4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3f7504[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1885eb={..._0x59f28e,[_0x384eb4([0x6a,0x74,0x69])]:_0x3f7504[_0x384eb4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3f7504[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1885eb[_0x384eb4([0x76,0x63])],_0x43740a(_0x1885eb)==_0x1d39a1;}}}async function _0x36c63d(){let _0x54a563=!0x0;try{const _0x57b833=_0x3993ae[_0x384eb4([0x73,0x70,0x6c,0x69,0x74])](_0x384eb4([0x2e])),[_0x3e2edd,_0x1d3dbe,_0x3ea46f]=_0x57b833;return _0x440403(_0x3e2edd),await _0x3bf483(_0x3e2edd,_0x1d3dbe,_0x3ea46f),_0x54a563;}catch(_0x56a2e3){return!0x1;}function _0x440403(_0xdfc40c){const _0x18dd6a=_0x15943b(_0xdfc40c);_0x18dd6a&&_0x18dd6a[_0x384eb4([0x61,0x6c,0x67])]==_0x384eb4([0x45,0x53,0x32,0x35,0x36])||(_0x54a563=!0x1);}async function _0x3bf483(_0x2387f3,_0x5ef58c,_0x4424c7){const _0x40b98c=window[_0x384eb4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x384eb4([0x66,0x72,0x6f,0x6d])](_0x107f74(_0x4424c7),_0x510344=>_0x510344[_0x384eb4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5eb95b=new window[(_0x384eb4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x384eb4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2387f3+_0x384eb4([0x2e])+_0x5ef58c),_0x321e5f=window[_0x384eb4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x384eb4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x321e5f)return;const _0x4d9ffd=await _0x321e5f[_0x384eb4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x384eb4([0x6a,0x77,0x6b]),_0x344061,{[_0x384eb4([0x6e,0x61,0x6d,0x65])]:_0x384eb4([0x45,0x43,0x44,0x53,0x41]),[_0x384eb4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x384eb4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x384eb4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x321e5f[_0x384eb4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x384eb4([0x6e,0x61,0x6d,0x65])]:_0x384eb4([0x45,0x43,0x44,0x53,0x41]),[_0x384eb4([0x68,0x61,0x73,0x68])]:{[_0x384eb4([0x6e,0x61,0x6d,0x65])]:_0x384eb4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4d9ffd,_0x40b98c,_0x5eb95b)||(_0x54a563=!0x1);}}function _0x15943b(_0x9c09b){return _0x9c09b[_0x384eb4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x384eb4([0x65,0x79]))?JSON[_0x384eb4([0x70,0x61,0x72,0x73,0x65])](_0x107f74(_0x9c09b)):null;}function _0x107f74(_0x3ad873){return window[_0x384eb4([0x61,0x74,0x6f,0x62])](_0x3ad873[_0x384eb4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x384eb4([0x2b]))[_0x384eb4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x384eb4([0x2f])));}function _0x43740a(_0x2e92a6){let _0x2af770=0x1505;function _0x580caf(_0x2484ac){for(let _0x111c1f=0x0;_0x111c1f<_0x2484ac[_0x384eb4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x111c1f++){const _0x4ff7fa=_0x2484ac[_0x384eb4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x111c1f);_0x2af770=(_0x2af770<<0x5)+_0x2af770+_0x4ff7fa,_0x2af770&=_0x2af770;}}function _0xe7fc5b(_0x3325ef){Array[_0x384eb4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3325ef)?_0x3325ef[_0x384eb4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xe7fc5b):_0x3325ef&&typeof _0x3325ef==_0x384eb4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x384eb4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3325ef)[_0x384eb4([0x73,0x6f,0x72,0x74])]()[_0x384eb4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1ce1e0,_0x2e5bf8])=>{_0x580caf(_0x1ce1e0),_0xe7fc5b(_0x2e5bf8);}):_0x580caf(window[_0x384eb4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3325ef));}return _0xe7fc5b(_0x2e92a6),_0x2af770>>>0x0;}function _0x262fab(_0x3e821c){return _0x3e821c[_0x384eb4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x384eb4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x384eb4([0x30]));}function _0x28d281(_0x15500b){return _0x15500b[_0x384eb4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x384eb4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x384eb4([0x6a,0x6f,0x69,0x6e])]('');}function _0x26bbed(_0x43fcbf){return _0x2435d7[_0x384eb4([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x384eb4([0x68,0x61,0x73])](_0x43fcbf);}function _0x1ccc9c(_0x16766b){return _0x2435d7[_0x384eb4([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x384eb4([0x67,0x65,0x74])](_0x16766b);}function _0xbc97fa(){}function _0x384eb4(_0x1a6909){return _0x1a6909['map'](_0x1c4db2=>String['fromCharCode'](_0x1c4db2))['join']('');}_0x1f4ec8(await _0x56cad4());}(this);}['createRevision'](_0x447c51){const _0x4765ef=this['editor']['plugins']['get']('Users');return new h({'id':_0x447c51['id'],'name':_0x447c51['name'],'creator':_0x447c51['creatorId']?_0x4765ef['getUser'](_0x447c51['creatorId']):null,'diffData':_0x447c51['diffData']||_0x447c51['data'],'authors':_0x447c51['authorsIds']['map'](_0xc54c6e=>_0x4765ef['getUser'](_0xc54c6e)),'createdAt':new Date(_0x447c51['createdAt']),'attributes':_0x447c51['attributes'],'fromVersion':_0x447c51['fromVersion'],'toVersion':_0x447c51['toVersion']});}['addRevision'](_0x4c8d72,_0x363158=0x0){this['_revisions']['add'](_0x4c8d72,_0x363158);}['getRevision'](_0x1ebbde){return this['_revisions']['get'](_0x1ebbde);}['getRevisions'](_0x2dae8a={'toJSON':!0x1}){const _0x2a9034=Array['from'](this['_revisions']);return _0x2a9034['reverse'](),_0x2dae8a['toJSON']?_0x2a9034['map'](_0x450e31=>_0x450e31['toJSON']()):_0x2a9034;}['getIndex'](_0x290558){return this['_revisions']['getIndex'](_0x290558);}['getEarlierVisibleRevision'](_0x5d8396){const [,_0xb06396]=this['getRevisionsIterator'](_0x5d8396,{'direction':'earlier'});return _0xb06396;}['getLaterVisibleRevision'](_0x19564e){const [,_0x5da13e]=this['getRevisionsIterator'](_0x19564e,{'direction':'later'});return _0x5da13e;}['getRevisionsInDiff'](_0x4b21be){const _0x1d4604=[];for(const _0x3233a5 of this['getRevisionsIterator'](_0x4b21be['newRevisionId']))if(_0x1d4604['push'](_0x3233a5),_0x3233a5['id']===_0x4b21be['oldRevisionId'])break;return _0x1d4604;}*['getRevisionsIterator'](_0x2ac984,{direction:_0x3e9424='earlier',filter:_0x3380b3=()=>!0x0}={}){const _0x23e0ac='earlier'===_0x3e9424?0x1:-0x1;let _0x1073aa=this['_revisions']['get'](_0x2ac984),_0xf7940=this['getIndex'](_0x1073aa);for(yield _0x1073aa;_0x1073aa;){if(_0xf7940+=_0x23e0ac,_0x1073aa=this['getRevision'](_0xf7940),!_0x1073aa)return;_0x3380b3(_0x1073aa)&&(yield _0x1073aa);}}}function m(_0x15ae3c,_0x463fd4,_0x1a9ccd){const t=_0x15ae3c['t'];switch(_0x463fd4){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'},_0x1a9ccd);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1a9ccd);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const E={'c':_0x3e4f10,'a':_0x122c61,'e':_0x5a2ecc,'r':_0x45c87a,'u':_0x2af098};class u extends _0x26f450{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xbb1ed5,j,_0x8cd40];}constructor(_0x5a820c){super(_0x5a820c),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x26a844=_0x47cd61();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x26a844},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x50130c=this['repository']['getRevision'](0x0),_0x387252=_0x50130c&&null===_0x50130c['creator']?_0x50130c:null;if(this['_continueCurrentRevision']=!!_0x387252&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1bd2a2=this['_source']['getCurrentRevisionId'](),_0x29f37b=this['repository']['getRevision'](_0x1bd2a2);if(_0x29f37b)this['_startingVersion']=_0x29f37b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4edb08=this['_source']['history']['_operations']['find'](_0x3f115e=>!_0x3f115e['_isInit']),_0x335811=_0x4edb08?_0x4edb08['baseVersion']:this['_source']['history']['version'];_0x50130c?(_0x50130c['toVersion']<_0x335811&&_0x50130c['_update']({'toVersion':_0x335811}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x387252['id'],this['_startingVersion']=_0x387252['fromVersion']):(this['_startingVersion']=_0x50130c['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x335811,this['_continueCurrentRevision']=!0x1);}}else _0x387252&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x387252['toVersion'],this['editor']['model']['document']['history']['version']),_0x387252['fromVersion']===_0x387252['toVersion']?(0x0!==_0x387252['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x387252['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x387252['id'],this['_startingVersion']=_0x387252['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',_0x4ca49b=>!_0x4ca49b),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x439ba3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x282013;for(const _0x8a5c58 in _0x439ba3){const _0x3daf0a=_0x8a5c58,_0x5110da=_0x439ba3[_0x3daf0a];if('revisionHistoryLicenseKeyValid'==_0x5110da||'revisionHistoryLicenseKeyInvalid'==_0x5110da||'revisionHistoryLicenseKeyExpired'==_0x5110da||'revisionHistoryLicenseKeyDomainLimit'==_0x5110da||'revisionHistoryLicenseKeyNotAllowed'==_0x5110da||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5110da||'revisionHistoryLicenseKeyTrialLimit'==_0x5110da||'revisionHistoryLicenseKeyUsageLimit'==_0x5110da){delete _0x439ba3[_0x3daf0a],_0x282013=_0x5110da,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x282013&&_0x439ba3['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x282013&&_0x439ba3['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x282013&&_0x439ba3['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x282013&&_0x439ba3['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x282013&&_0x439ba3['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x282013&&_0x439ba3['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x282013&&_0x439ba3['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x2ca06b=this['repository']['getRevision'](0x0),_0x392fc6=await this['getRevisionDocumentData'](_0x2ca06b),_0x1e55bd=await this['getRevisionRootsAttributes'](_0x2ca06b);this['_replaceEditorDataWithRevisionData'](_0x392fc6,_0x1e55bd);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x330fc7){this['_source']=_0x330fc7;}async['update'](){const _0x11a9bc=await this['_source']['getLatestVersion']();if(_0x11a9bc>this['currentRevision']['toVersion']){await this['_loadState']();const _0x212686=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x11a9bc});_0x212686['authors']=_0x212686['authorsIds']['map'](_0x2d35cf=>this['editor']['plugins']['get']('Users')['getUser'](_0x2d35cf)),this['currentRevision']['_update'](_0x212686);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x35719c={},_0x3b925b=null){const _0x395c5d=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3b925b>this['currentRevision']['toVersion']&&(_0x3b925b=null),null===_0x3b925b&&(_0x3b925b=await this['_source']['getLatestVersion']());const _0x21a779=this['_getFromVersion'](_0x3b925b),_0x50d188=this['buildRevisionData']({'from':_0x21a779,'to':_0x3b925b});if(this['currentRevision']['toVersion']<_0x3b925b){const _0x2729db=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3b925b,'to':_0x3b925b});_0x2729db['authors']=[],_0x2729db['authorsIds']=[],_0x2729db['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2729db,!0x0),delete _0x2729db['authors'],_0x395c5d['push'](_0x2729db);}_0x35719c['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x35719c['name']=_0x35719c['name']||null,_0x35719c['id']=_0x35719c['id']||_0x47cd61(),_0x35719c={..._0x35719c,..._0x50d188};const _0x13f221=this['addRevisionData'](_0x35719c);_0x395c5d['push'](_0x35719c);const _0x12514b=this['repository']['getIndex'](_0x13f221);if(0x0!==_0x12514b){const _0x8e9b71=this['repository']['getRevision'](_0x12514b-0x1);if(_0x8e9b71['fromVersion']!==_0x3b925b){const _0x14b0ab=this['_revisionDataBuilder']['getData'](_0x3b925b,_0x8e9b71['toVersion']),_0x18a1cb={'id':_0x8e9b71['id'],'diffData':_0x14b0ab['diffData'],'authorsIds':_0x14b0ab['authorsIds'],'authors':_0x14b0ab['authorsIds']['map'](_0x473d26=>this['editor']['plugins']['get']('Users')['getUser'](_0x473d26)),'fromVersion':_0x3b925b};_0x8e9b71===this['currentRevision']&&(_0x18a1cb['createdAt']=new Date(_0x35719c['createdAt']['getTime']()+0xa)),_0x8e9b71['_update'](_0x18a1cb,!0x0),delete _0x18a1cb['authors'],_0x395c5d['push'](_0x18a1cb);}}if(this['adapter']){for(const _0x1bdf22 of _0x395c5d)this['_bufferUpdate'](_0x1bdf22['id'],_0x1bdf22,!0x0);this['sendBufferedUpdates']();}return _0x13f221;}['addRevisionData'](_0x3fe75f){const _0x23a772=this['repository']['createRevision'](_0x3fe75f);return this['adapter']&&_0x23a772['on']('_update',(_0x28e32e,_0x14a2bf,_0x1cfe6b)=>{_0x1cfe6b||(this['_bufferUpdate'](_0x14a2bf['id'],_0x14a2bf,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x23a772,this['_findInsertionIndex'](_0x23a772)),_0x23a772;}async['getRevisionDocumentData'](_0x1bfe43){await this['_loadRevisionData'](_0x1bfe43);const _0x359374={};for(const _0x2fbb3a in _0x1bfe43['diffData']){if(_0x1bfe43['diffData'][_0x2fbb3a]['attachChange']&&!_0x1bfe43['diffData'][_0x2fbb3a]['attachChange']['isAttached'])continue;const _0x180976=this['_removeRevisionMarkers'](JSON['parse'](_0x1bfe43['diffData'][_0x2fbb3a]['insertions'])),_0x33aba0=this['editor']['editing']['view']['document'],_0x2ea584=new _0x53812f(_0x33aba0,_0x180976['map'](_0x248e9f=>P(_0x248e9f,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x359374[_0x2fbb3a]=this['editor']['data']['processor']['toData'](_0x2ea584),this['editor']['data']['processor']['useFillerType']('default');}return _0x359374;}async['getRevisionRootsAttributes'](_0x1018eb){await this['_loadRevisionData'](_0x1018eb);const _0xe09025={};for(const _0x569c5f in _0x1018eb['diffData'])_0x1018eb['diffData'][_0x569c5f]['attachChange']&&!_0x1018eb['diffData'][_0x569c5f]['attachChange']['isAttached']||(_0xe09025[_0x569c5f]=_0x1018eb['diffData'][_0x569c5f]['attributesAfter']||{});return _0xe09025;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xa4ca67=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x35060a=0x0;_0x35060a<_0xa4ca67['length'];_0x35060a++){const _0x4715c2=_0xa4ca67[_0x35060a];let _0x4edee7=!0x1;for(const _0x36e672 of Object['keys'](_0x4715c2))void 0x0===_0x4715c2[_0x36e672]?delete _0x4715c2[_0x36e672]:'id'!==_0x36e672&&(_0x4edee7=!0x0);_0x4edee7||(_0xa4ca67[_0x35060a]=null);}if(_0xa4ca67=_0xa4ca67['filter'](_0x4cef03=>null!==_0x4cef03),!_0xa4ca67['length'])return;for(let _0x163aab=0x0;_0x163aab<_0xa4ca67['length'];_0x163aab++){const _0x12aee1=_0xa4ca67[_0x163aab];void 0x0!==_0x12aee1['fromVersion']&&void 0x0===_0x12aee1['toVersion']&&(_0x12aee1['toVersion']=this['repository']['getRevision'](_0x12aee1['id'])['toVersion']),void 0x0!==_0x12aee1['toVersion']&&void 0x0===_0x12aee1['fromVersion']&&(_0x12aee1['fromVersion']=this['repository']['getRevision'](_0x12aee1['id'])['fromVersion']);}const _0x1b43c4=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xa4ca67,_0x1b43c4)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1a4a32=>{if(_0x1a4a32){for(const _0x16fa7a of _0x1a4a32)this['setRevisionData']({'id':_0x16fa7a['id'],'createdAt':_0x16fa7a['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x2f70ab,_0x4e9e8d){let _0x1363c0=this['editor']['config']['get']('initialData'),_0x4a454b=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x1363c0){_0x1363c0={};for(const _0x280a2d of this['editor']['model']['document']['getRootNames']())_0x1363c0[_0x280a2d]='';}if('string'==typeof _0x1363c0&&(_0x1363c0={'main':_0x1363c0}),void 0x0===_0x4a454b){_0x4a454b={};for(const _0x30f458 of this['editor']['model']['document']['getRootNames']())_0x4a454b[_0x30f458]={};}let _0x372de1=!0x1;const _0x3882a4=Object['keys'](_0x1363c0),_0x3b86ad=Object['keys'](_0x2f70ab);for(const _0x577014 of _0x3882a4){if(_0x1363c0[_0x577014]!==_0x2f70ab[_0x577014]&&''!==_0x1363c0[_0x577014]['trim']()){_0x372de1=!0x0;break;}if(!_0x2ef2d0(_0x4a454b[_0x577014],_0x4e9e8d[_0x577014])&&Object['keys'](_0x4a454b[_0x577014])['length']>0x0){_0x372de1=!0x0;break;}}_0x372de1||(_0x372de1=_0x3b86ad['some'](_0x378d95=>!this['editor']['model']['document']['getRoot'](_0x378d95))),_0x372de1&&_0x2dad38('editor-initial-data-replaced-with-revision-data',{'editorData':_0x1363c0,'editorRootsAttributes':_0x4a454b,'revisionData':_0x2f70ab,'revisionRootsAttributes':_0x4e9e8d}),this['editor']['config']['set']('initialData',_0x2f70ab),this['editor']['config']['set']('rootsAttributes',_0x4e9e8d);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5f3adf=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5f3adf['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x206554){const _0x48ca7a=this['repository']['getRevisions']();_0x48ca7a['reverse']();let _0x127947=0x0;for(;_0x127947<_0x48ca7a['length'];){const _0xf48411=_0x48ca7a[_0x127947];if(_0xf48411===this['currentRevision']){_0x127947++;continue;}if(_0xf48411['id']===this['_initialRevisionId'])break;const _0x5d6362=_0x206554['toVersion']-_0xf48411['toVersion']||_0x206554['fromVersion']-_0xf48411['fromVersion'];if(_0x5d6362>0x0)break;if(_0x5d6362<0x0)_0x127947++;else{if(!_0x206554['creator']&&_0xf48411['creator'])break;if(_0xf48411['creator']||!_0x206554['creator']){if(_0x206554['createdAt']>_0xf48411['createdAt'])break;_0x127947++;}else _0x127947++;}}return _0x127947;}['setRevisionData'](_0x26841e){const _0x399da8=this['repository']['getRevision'](_0x26841e['id']);if(_0x26841e['createdAt']&&(_0x26841e['createdAt']=new Date(_0x26841e['createdAt'])),_0x26841e['authorsIds']){const _0x52a7b3=this['editor']['plugins']['get']('Users');_0x26841e['authors']=_0x26841e['authorsIds']['map'](_0xd14e57=>_0x52a7b3['getUser'](_0xd14e57));}_0x399da8['_update'](_0x26841e,!0x0);}['buildRevisionData']({revision:_0x5d38a5=null,from:_0x26a674=null,to:_0x209558=null}){_0x26a674=null!==_0x26a674?_0x26a674:_0x5d38a5['fromVersion'],_0x209558=null!==_0x209558?_0x209558:_0x5d38a5['toVersion'];const _0x483c06=this['_revisionDataBuilder']['getData'](_0x26a674,_0x209558),_0x4587e0={'diffData':_0x483c06['diffData'],'authorsIds':_0x483c06['authorsIds'],'fromVersion':_0x26a674,'toVersion':_0x209558};if(!_0x5d38a5||_0x209558!==_0x5d38a5['toVersion']){const _0x2ab235=_0x209558-0x1,_0x1ddfd=this['_source']['history']['getOperation'](_0x2ab235);_0x4587e0['createdAt']=_0x1ddfd&&_0x1ddfd['createdAt']||new Date();}if(this['_loadedStateData']&&_0x26a674===this['_loadedStateData']['fromVersion']){for(const _0x3a5c8b of this['_loadedStateData']['authors'])_0x4587e0['authorsIds']['includes'](_0x3a5c8b['id'])||_0x4587e0['authorsIds']['push'](_0x3a5c8b['id']);}return _0x4587e0;}['_loadRevisionData'](_0x27b0cf){if(!_0x27b0cf||_0x27b0cf['diffData'])return Promise['resolve']();{const _0x1acdc3=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x1acdc3,'revisionId':_0x27b0cf['id']})['then'](_0x3d6868=>{_0x27b0cf['diffData']=_0x3d6868['diffData'];});}}['_bufferUpdate'](_0x35884c,_0x4359db,_0x7881d6){if(this['_bufferedUpdates']['has'](_0x35884c)){const _0x1af94d=this['_bufferedUpdates']['get'](_0x35884c);_0x4359db=_0x7881d6?{..._0x1af94d,..._0x4359db}:{..._0x4359db,..._0x1af94d};}this['_bufferedUpdates']['set'](_0x35884c,_0x4359db);}['_getFromVersion'](_0x1c5f19){const _0x281646=this['repository']['getRevisions']();_0x281646['reverse'](),_0x281646['shift']();const _0x12a709=_0x281646['find'](_0x4791c2=>_0x4791c2['toVersion']<=_0x1c5f19)['toVersion'];return _0x12a709<this['_startingVersion']?this['_startingVersion']:_0x12a709;}['_createInitialRevision'](_0x4e18d2){const _0x26d9bc=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x26d9bc)this['_initialRevisionId']=_0x26d9bc['id'];else{const _0x4b4186=!this['editor']['model']['document']['roots']['find'](_0x3325ce=>this['editor']['model']['hasContent'](_0x3325ce)),_0x55fc29=this['editor']['plugins']['get']('Users')['me']['id'],_0x1182e3=m(this['editor']['locale'],_0x4b4186?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4e18d2,'to':_0x4e18d2,'id':this['_initialRevisionId'],'name':_0x1182e3,'creatorId':_0x55fc29});}}['_createCurrentRevision'](_0x5a2171){const _0x2d3c84=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2d3c84),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5a2171,'to':_0x5a2171,'id':_0x2d3c84,'name':'','creatorId':null}));}['_makeRevision']({name:_0xa29c3b,from:_0x214646,to:_0x11689c,creatorId:_0x3d6c96,id:_0x1304cf}){const _0x1b3587=this['buildRevisionData']({'from':_0x214646,'to':_0x11689c});_0x1b3587['name']=_0xa29c3b,_0x1b3587['creatorId']=_0x3d6c96,_0x1b3587['id']=_0x1304cf;const _0x40e027=this['addRevisionData'](_0x1b3587);return this['adapter']&&this['_bufferUpdate'](_0x1b3587['id'],_0x1b3587,!0x0),_0x40e027;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x149a74){return(_0x149a74=_0x149a74['filter'](_0x4e6399=>!_0x4e6399['name']||'revision-start'!==_0x4e6399['name']&&'revision-end'!==_0x4e6399['name']))['forEach'](_0x57fa93=>{'string'!=typeof _0x57fa93&&(_0x57fa93['children']=this['_removeRevisionMarkers'](_0x57fa93['children']),_0x57fa93['attributes']=_0x57fa93['attributes']['filter'](_0xe0383e=>!_0xe0383e[0x0]['startsWith']('data-revision-')));}),_0x149a74;}}function P(_0x958659,_0x40d7dd){const _0x4243c3=_0x40d7dd['editing']['view']['document'];if('string'==typeof _0x958659)return new _0x2f79b6(_0x4243c3,_0x958659);{const _0x507ac5=_0x958659['children']['map'](_0x2b2785=>P(_0x2b2785,_0x40d7dd));return new(E[_0x958659['type']]||_0x15bf3f)(_0x4243c3,_0x958659['name'],_0x958659['attributes'],_0x507ac5);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x320f2f){this['editor']=_0x320f2f,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'](_0x2e3a2e){this['source']=_0x2e3a2e;const _0x5a57d8=new Map(),_0x3b4c2f=new Map(),_0x648f86=this['editor']['model']['document']['roots']['map'](_0x3ac65c=>_0x3ac65c['rootName']);for(const _0x5d85db of _0x648f86){const _0x3b3e43=this['editor']['model']['document']['getRoot'](_0x5d85db),_0x1a8e72=T(_0x3b3e43);_0x5a57d8['set'](_0x5d85db,_0x1a8e72),_0x3b4c2f['set'](_0x5d85db,Object['fromEntries'](_0x3b3e43['getAttributes']()));}const _0xb32d31=Array['from'](this['editor']['model']['markers'])['map'](_0x421477=>[_0x421477['name'],_0x421477['getRange']()]),_0x144993=this['source']['version'];this['_saveMetaData'](_0x144993,_0x5a57d8,_0xb32d31,_0x3b4c2f),this['_startingRevisionId']=this['_revisionId'];const _0x2e30e9=new Map(),_0x4f9ac3=new Map();for(const _0x307322 of _0x648f86){const _0xa9224d=F(_0x307322);_0x2e30e9['set'](_0x307322,_0xa9224d),_0x4f9ac3['set'](_0x307322,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2e30e9,[],_0x4f9ac3);}['getData'](_0x434102,_0x147363){if(this['_lastFrom']===_0x434102&&this['_lastTo']<=_0x147363)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x147363,!0x0);else{if(!this['_savedMetaData']['has'](_0x434102)){const _0x2353a2=this['_getPreviousFrom'](_0x434102);this['_calculateMetaData'](_0x2353a2,_0x434102,!0x1);}this['_calculateMetaData'](_0x434102,_0x147363,!0x0);}return this['_lastFrom']=_0x434102,this['_lastTo']=_0x147363,this['_getState']();}['loadState'](_0x1644e3){this['_reset'](),this['_lastFrom']=_0x1644e3['fromVersion'],this['_lastTo']=_0x1644e3['toVersion'];for(const _0x145240 in _0x1644e3['diffData']){const _0x33c097=_0x1644e3['diffData'][_0x145240]['attachChange'],_0x2a499d=_0x17f390(_0x1644e3['diffData'][_0x145240]['attributesBefore'])||{},_0x2fb452=this['_makeModelFromViewString'](_0x1644e3['diffData'][_0x145240]['deletions']);_0x2fb452['rootName']=_0x145240,_0x2fb452['_isAttached']=!_0x33c097||!_0x33c097['isAttached'],_0x2fb452['isAttached']=()=>_0x2fb452['_isAttached'],this['_baseRoots']['set'](_0x145240,_0x2fb452),this['_baseRootsAttributes']['set'](_0x145240,_0x2a499d),_0x33c097&&this['_touchedRoots']['set'](_0x145240,_0x33c097);const _0x1fea0a=this['_makeIdsRoot'](_0x2fb452);this['_baseIdsRoots']['set'](_0x145240,_0x1fea0a);for(const [_0x16d33d,_0x8f500]of _0x2fb452['markers']){if(!_0x16d33d['startsWith']('revision:'))continue;const _0x210f7d=_0x16d33d['split'](':')[0x2];for(const _0x5e350a of _0x8f500['getWalker']({'singleCharacters':!0x0})){const _0x454088=this['_getVidAttributeName'](_0x5e350a),_0x281bed='elementEnd'==_0x5e350a['type']?_0x5e350a['previousPosition']['path']['slice'](0x0,-0x1):_0x5e350a['previousPosition']['path'],_0x3ea232=_0x1fea0a['getNodeByPath'](_0x281bed)['getAttribute'](_0x454088);this['_touched']['set'](_0x3ea232,{'userId':_0x210f7d});}}}this['_startingRevisionId']=this['_revisionId'];const _0x28e21e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x481695=>!this['_touched']['has'](_0x481695));let _0x3f3ba1=0x0;const _0xc5085e=new Map();for(const _0x1b62f7 in _0x1644e3['diffData']){const _0x8e6889=_0x1644e3['diffData'][_0x1b62f7]['attachChange'],_0x47b3f0=_0x17f390(_0x1644e3['diffData'][_0x1b62f7]['attributesAfter'])||{},_0x466d9c=this['_makeModelFromViewString'](_0x1644e3['diffData'][_0x1b62f7]['insertions']);_0x466d9c['rootName']=_0x1b62f7,_0x466d9c['_isAttached']=!_0x8e6889||_0x8e6889['isAttached'],_0x466d9c['isAttached']=()=>_0x466d9c['_isAttached'],this['_diffRoots']['set'](_0x1b62f7,_0x466d9c),this['_diffRootsAttributes']['set'](_0x1b62f7,_0x47b3f0);const _0x4915cc=this['_makeIdsRoot'](_0x466d9c,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1b62f7,_0x4915cc),_0xc5085e['set'](_0x1b62f7,_0x466d9c['isAttached']()?_0x47b3f0:{});for(const [_0x19a07b,_0x5b2846]of _0x466d9c['markers']){if(!_0x19a07b['startsWith']('revision:'))continue;const _0x415dab=_0x19a07b['split'](':')[0x2];for(const _0x6c2f7d of _0x5b2846['getWalker']({'singleCharacters':!0x0})){const _0x19335d=this['_getVidAttributeName'](_0x6c2f7d),_0x179fb0=this['_revisionId']++,_0x190351='elementEnd'==_0x6c2f7d['type']?_0x6c2f7d['previousPosition']['path']['slice'](0x0,-0x1):_0x6c2f7d['previousPosition']['path'];_0x4915cc['getNodeByPath'](_0x190351)['_setAttribute'](_0x19335d,_0x179fb0),this['_touched']['set'](_0x179fb0,{'userId':_0x415dab});}}for(const _0x362c54 of this['editor']['model']['createRangeIn'](_0x466d9c)['getWalker']({'singleCharacters':!0x0})){const _0x21eb02=this['_getVidAttributeName'](_0x362c54),_0x28a1e8='elementEnd'==_0x362c54['type']?_0x362c54['previousPosition']['path']['slice'](0x0,-0x1):_0x362c54['previousPosition']['path'],_0x2516ce=_0x4915cc['getNodeByPath'](_0x28a1e8);_0x2516ce['getAttribute'](_0x21eb02)>0x0||_0x2516ce['_setAttribute'](_0x21eb02,_0x28e21e[_0x3f3ba1++]);}for(const [_0x19f01e,_0x1fa8ba]of _0x466d9c['markers'])_0x19f01e['startsWith']('revision:')||this['_markers']['set'](_0x19f01e,_0x1fa8ba);}const _0x2fe1fe=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x2fe1fe),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2fe1fe,0x1));const _0x56b799=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x56b799),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x56b799,0x1));const _0x526ca6=Array['from'](this['_diffRoots'])['map'](([_0x5192c4,_0x42edee])=>[_0x5192c4,T(_0x42edee)]);this['_saveMetaData'](this['_lastTo'],_0x526ca6,this['_markers'],_0xc5085e);}['_makeModelFromViewString'](_0x383294){const _0x478292=JSON['parse'](_0x383294),_0x33241d=this['editor']['editing']['view']['document'],_0x440cf7=new _0x53812f(_0x33241d,_0x478292['map'](_0x52653a=>P(_0x52653a,this['editor'])));return this['editor']['data']['toModel'](_0x440cf7);}['_saveMetaData'](_0x5d7fda,_0x27aec3,_0x59c64b,_0x5eea77){const _0x3292ce=new Map(_0x27aec3),_0x3a598f=new Map(_0x17f390(_0x5eea77)),_0x2e20ed=new Map();for(const [_0x5aabea,_0x2cc045]of _0x59c64b)_0x2e20ed['set'](_0x5aabea,{'start':_0x2cc045['start']['clone'](),'end':_0x2cc045['end']['clone'](),'rootName':_0x2cc045['root']['rootName']});this['_savedMetaData']['set'](_0x5d7fda,{'roots':_0x3292ce,'markers':_0x2e20ed,'rootsAttributes':_0x3a598f});}['_removeMetaData'](_0x2c3eb4){this['_savedMetaData']['delete'](_0x2c3eb4);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x2e07f,_0x160a43=null){let _0x353259=null;_0x2e07f['is']('documentFragment')||(_0x353259=new ut(_0x2e07f['name'],{'vid_start':null===_0x160a43?this['_revisionId']++:_0x160a43++}));const _0x155f01=[];for(const _0x6e5f75 of _0x2e07f['getChildren']())if(_0x6e5f75['is']('element')){_0x155f01['push'](this['_makeIdsRoot'](_0x6e5f75,_0x160a43));const _0x4808e9=_0x155f01[_0x155f01['length']-0x1];null!==_0x160a43&&(_0x160a43=_0x4808e9['is']('element','$text')?_0x4808e9['getAttribute']('vid')+0x1:_0x4808e9['getAttribute']('vid_end')+0x1);}else{for(let _0x2cd9cc=0x0;_0x2cd9cc<_0x6e5f75['offsetSize'];_0x2cd9cc++)_0x155f01['push'](new ut('$text',{'vid':null===_0x160a43?this['_revisionId']++:_0x160a43++}));}if(_0x2e07f['is']('documentFragment')){const _0x3416f2=F(_0x2e07f['rootName']);return _0x3416f2['_insertChild'](0x0,_0x155f01),_0x3416f2;}return _0x353259['_setAttribute']('vid_end',null===_0x160a43?this['_revisionId']++:_0x160a43++),_0x353259['_insertChild'](0x0,_0x155f01),_0x353259;}['_calculateMetaData'](_0xbbeea0,_0x2941f7,_0x1a863a){this['_reset']();const {roots:_0x34a0cd,markers:_0x154827,rootsAttributes:_0x4b48b8}=this['_savedMetaData']['get'](_0xbbeea0);this['_baseRoots']=new Map(_0x34a0cd),this['_baseRootsAttributes']=new Map(_0x17f390(_0x4b48b8));for(const [_0x50ac86,_0x5ec35c]of this['_baseRoots'])if('$graveyard'!==_0x50ac86&&(this['_diffRoots']['set'](_0x50ac86,T(_0x5ec35c)),this['_diffRootsAttributes']=new Map(_0x17f390(_0x4b48b8)),_0x1a863a)){const _0x3083ef=this['_revisionId'];this['_idsRoots']['set'](_0x50ac86,this['_makeIdsRoot'](_0x5ec35c)),this['_baseIdsRoots']['set'](_0x50ac86,this['_makeIdsRoot'](_0x5ec35c,_0x3083ef));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x1a863a&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x5b976c,_0xf022db]of _0x154827){const _0x38794b=this['_baseRoots']['get'](_0xf022db['rootName']),_0x3b2b8b=this['_diffRoots']['get'](_0xf022db['rootName']),_0xa40611=new ft(this['_fixPosition'](_0xf022db['start'],_0x38794b),this['_fixPosition'](_0xf022db['end'],_0x38794b)),_0xbc4446=this['_fixRange'](_0xa40611,_0x3b2b8b);_0x38794b['markers']['set'](_0x5b976c,_0xa40611),this['_markers']['set'](_0x5b976c,_0xbc4446);}this['_applyOperations'](_0xbbeea0,_0x2941f7,_0x1a863a);}['_applyOperations'](_0x413f9d,_0x1ab411,_0x2a2741){for(const _0x312d44 of this['source']['getOperations'](_0x413f9d,_0x1ab411))this['_handleOperation'](_0x312d44,_0x2a2741);for(const _0x205bc3 of this['_diffRoots']['values']())_0x205bc3['markers']['clear']();for(const [_0x14e435,_0x54cde4]of this['_markers']){this['_diffRoots']['get'](_0x54cde4['root']['rootName'])['markers']['set'](_0x14e435,_0x54cde4['clone']());}const _0x27e6d8=new Map(),_0x598880=new Map();for(const [_0x59f271,_0x408c22]of this['_diffRoots'])_0x27e6d8['set'](_0x59f271,T(_0x408c22)),_0x598880['set'](_0x59f271,this['_diffRootsAttributes']['get'](_0x59f271));this['_saveMetaData'](_0x1ab411,_0x27e6d8,this['_markers'],_0x598880);}['_getPreviousFrom'](_0x3ec419){const _0x2985b4=Array['from'](this['_savedMetaData']['keys']());_0x2985b4['sort']((_0x3e1271,_0xe9eb4f)=>_0x3e1271-_0xe9eb4f),_0x2985b4['reverse']();for(const _0x415644 of _0x2985b4)if(_0x415644<_0x3ec419)return _0x415644;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x23704c,_0x5d743e){const _0x593076=Array['from'](_0x5d743e['markers'])['map'](([_0x3a7a28,_0x212433])=>[_0x3a7a28,this['_fixRange'](_0x212433,_0x23704c)]);_0x23704c['markers']=new Map(_0x593076);}['_transformMarkers'](_0x2f3e85){for(const _0x5480a3 of this['_markers']['values']()){const _0x277d5d=_0x5480a3['getTransformedByOperation'](_0x2f3e85),_0x2a91dc=ft['_createFromRanges'](_0x277d5d);_0x5480a3['start']=_0x2a91dc['start'],_0x5480a3['end']=_0x2a91dc['end'];}}['_handleOperation'](_0x2fb335,_0x4d8048){if('addRoot'!=_0x2fb335['type']&&'detachRoot'!=_0x2fb335['type']){if('insert'==_0x2fb335['type']){const _0x578285=_0x2fb335['position']['root']['rootName'];this['_diffRoots']['has'](_0x578285)||(this['_diffRoots']['set'](_0x578285,F(_0x578285,!0x0)),this['_diffRootsAttributes']['set'](_0x578285,{}),_0x4d8048&&this['_idsRoots']['set'](_0x578285,F(_0x578285,!0x0)));}else{if('addRootAttribute'==_0x2fb335['type']||'removeRootAttribute'==_0x2fb335['type']||'changeRootAttribute'==_0x2fb335['type'])return void this['_handleRootAttributeOperation'](_0x2fb335);'marker'==_0x2fb335['type']&&this['_handleMarkerOperation'](_0x2fb335);}if('marker'!==_0x2fb335['type']){const _0x3e1a8f=this['_cloneOperation'](_0x2fb335,this['_diffRoots']);_0x3e1a8f['_execute'](),this['_transformMarkers'](_0x3e1a8f);}if(_0x4d8048)switch(_0x2fb335['type']){case'insert':this['_handleInsertOperation'](_0x2fb335);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2fb335);break;case'merge':this['_handleMergeOperation'](_0x2fb335);break;case'split':this['_handleSplitOperation'](_0x2fb335);}}else this['_handleRootOperation'](_0x2fb335,_0x4d8048);}['_cloneOperation'](_0x1208a6,_0x567b62){const _0x3e11f9=_0x1208a6['clone']();return _0x3e11f9['_authorId']=_0x1208a6['_authorId'],this['_fixOperation'](_0x3e11f9,_0x567b62),_0x3e11f9;}['_getBaseVids'](_0x20f66a){return _0x20f66a['map'](_0x3bcdf3=>{const _0x3183ce=this['_getVidAttributeName'](_0x3bcdf3);return Number(_0x3bcdf3['item']['getAttribute'](_0x3183ce));});}['_generateTape'](_0x292713,_0x453307){if(_0x292713['is']('element','$text'))_0x453307['push']({'item':_0x292713,'type':'text'});else{_0x292713['is']('element')&&_0x453307['push']({'item':_0x292713,'type':'elementStart'});for(const _0x3dad3d of _0x292713['getChildren']())this['_generateTape'](_0x3dad3d,_0x453307);_0x292713['is']('element')&&_0x453307['push']({'item':_0x292713,'type':'elementEnd'});}return _0x453307;}['_getState'](){const _0x2fd277=new Map(this['_touched']),_0x424ff9=new Map(_0x2fd277),_0x171329=new Map(),_0x170ad1={'insertions':{},'deletions':{}},_0x17e320={'insertions':{},'deletions':{}},_0x29d4f0=new Map(),_0x48c366=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x48c366['delete']('$graveyard');for(const _0x5b1531 of _0x48c366){const _0x2a6dfe=this['_diffRoots']['get'](_0x5b1531)||F(_0x5b1531,!0x1),_0x510c22=this['_baseRoots']['get'](_0x5b1531)||F(_0x5b1531,!0x1);_0x2a6dfe['isAttached']()||_0x510c22['isAttached']()?(_0x170ad1['insertions'][_0x5b1531]=T(_0x2a6dfe),_0x170ad1['deletions'][_0x5b1531]=T(_0x510c22),this['_copyMarkers'](_0x170ad1['deletions'][_0x5b1531],_0x510c22),this['_copyMarkers'](_0x170ad1['insertions'][_0x5b1531],_0x2a6dfe),_0x17e320['insertions'][_0x5b1531]=this['_generateTape'](this['_idsRoots']['get'](_0x5b1531),[]),_0x17e320['deletions'][_0x5b1531]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x5b1531)||F(_0x5b1531,!0x1),[])):_0x48c366['delete'](_0x5b1531);}for(const _0xa475f of _0x48c366){const _0x3d6823=_0x17e320['insertions'][_0xa475f];for(const _0x528ada of _0x3d6823){const _0x315c65=this['_getVidAttributeName'](_0x528ada),_0x34ba7d=_0x528ada['item']['getAttribute'](_0x315c65);_0x424ff9['delete'](_0x34ba7d),_0x34ba7d>=this['_startingRevisionId']&&_0x171329['set'](_0x34ba7d,_0x2fd277['get'](_0x34ba7d));}}for(const _0x215fd4 of _0x48c366){const _0x3185c5=_0x17e320['insertions'][_0x215fd4],_0x8080a1=this['_getBaseVids'](_0x17e320['deletions'][_0x215fd4]);let _0x401d39=0x0;for(const _0x546d74 of _0x3185c5){const _0x427288=this['_getVidAttributeName'](_0x546d74),_0x37c659=_0x546d74['item']['getAttribute'](_0x427288);if(!_0x171329['has'](_0x37c659)&&!_0x29d4f0['has'](_0x37c659)){if(_0x424ff9['has'](_0x37c659))_0x401d39++;else{if(_0x37c659!=_0x8080a1[_0x401d39]){const _0x489b32=_0x2fd277['get'](_0x37c659)||_0x2fd277['get'](_0x8080a1[_0x401d39]);for(;_0x37c659!=_0x8080a1[_0x401d39];)_0x424ff9['has'](_0x8080a1[_0x401d39])||(_0x29d4f0['set'](_0x8080a1[_0x401d39],_0x489b32),_0x2fd277['set'](_0x8080a1[_0x401d39],_0x489b32)),_0x401d39++;}_0x401d39++;}}}}for(const _0x489a90 of _0x48c366){const _0x4bd62c=_0x17e320['insertions'][_0x489a90];for(const _0x119d25 of _0x4bd62c){const _0x9e5208=this['_getVidAttributeName'](_0x119d25),_0x48e93b=_0x119d25['item']['getAttribute'](_0x9e5208);if(_0x29d4f0['has'](_0x48e93b)){const _0x376397=_0x29d4f0['get'](_0x48e93b);_0x424ff9['has'](_0x48e93b)||_0x424ff9['set'](_0x48e93b,{..._0x376397}),_0x171329['set'](_0x48e93b,{..._0x376397});}}}for(const _0x26d09e of _0x424ff9['keys']())_0x26d09e>=this['_startingRevisionId']&&_0x424ff9['delete'](_0x26d09e);const _0x4c8649=new Map();for(const _0x27a186 of _0x48c366){let _0x5e17b1=_0x17e320['insertions'][_0x27a186];for(const _0x19f8ec of _0x5e17b1)if(_0x19f8ec['item']['is']('element','tableCell')){const _0x296109=this['_getVidAttributeName'](_0x19f8ec),_0x504291=_0x19f8ec['item']['getAttribute'](_0x296109);if(_0x171329['has'](_0x504291)){const _0x5c305f=_0x19f8ec['item']['parent']['parent']['getAttribute']('vid_start'),_0x2831b5=_0x4c8649['get'](_0x5c305f)||new Set();_0x2831b5['add'](_0x171329['get'](_0x504291)['userId']),_0x4c8649['set'](_0x5c305f,_0x2831b5);}}_0x5e17b1=_0x17e320['deletions'][_0x27a186];for(const _0x3d8e4e of _0x5e17b1)if(_0x3d8e4e['item']['is']('element','tableCell')){const _0x36771d=this['_getVidAttributeName'](_0x3d8e4e),_0x31e92c=_0x3d8e4e['item']['getAttribute'](_0x36771d);if(_0x424ff9['has'](_0x31e92c)){const _0x2912fd=_0x3d8e4e['item']['parent']['parent']['getAttribute']('vid_start'),_0x57f6cf=_0x4c8649['get'](_0x2912fd)||new Set();_0x57f6cf['add'](_0x424ff9['get'](_0x31e92c)['userId']),_0x4c8649['set'](_0x2912fd,_0x57f6cf);}}for(const _0x146df5 of _0x4c8649['keys']())(_0x171329['has'](_0x146df5)||_0x424ff9['has'](_0x146df5))&&_0x4c8649['delete'](_0x146df5);}for(const _0x3bd198 of _0x48c366){const _0x4abe8f=_0x17e320['insertions'][_0x3bd198];let _0x4a3706=null,_0x340afd=null;for(const _0x55f4fd of _0x4abe8f){const _0x317572=this['_getVidAttributeName'](_0x55f4fd),_0x223533=_0x55f4fd['item']['getAttribute'](_0x317572),_0xa184f3=_0x4c8649['get'](_0x223533);_0xa184f3&&'elementStart'==_0x55f4fd['type']&&(_0x4a3706=Array['from'](_0xa184f3)[0x0],_0x340afd=_0x55f4fd['item']['getAttribute']('vid_end')),_0x4a3706&&(_0x424ff9['set'](_0x223533,{'userId':_0x4a3706}),_0x171329['set'](_0x223533,{'userId':_0x4a3706})),_0x223533==_0x340afd&&(_0x4a3706=null,_0x340afd=null);}}const _0x2dea4f={},_0x5e27d8=new Set();for(const _0x4c6caf of _0x48c366){const _0x1f68db=_0x170ad1['deletions'][_0x4c6caf],_0x264e61=_0x170ad1['insertions'][_0x4c6caf];for(const {userId:_0x35124d}of this['_touchedMarkers']['values']())null!==_0x35124d&&_0x5e27d8['add'](_0x35124d);for(const {userId:_0x4f7534}of this['_touchedRoots']['values']())null!==_0x4f7534&&_0x5e27d8['add'](_0x4f7534);this['_markChanges'](_0x264e61,_0x17e320['insertions'][_0x4c6caf],_0x171329,'insertion',_0x5e27d8),this['_markChanges'](_0x1f68db,_0x17e320['deletions'][_0x4c6caf],_0x424ff9,'deletion',_0x5e27d8),_0x2dea4f[_0x4c6caf]={'insertions':this['_prepareViewToSave'](_0x264e61),'deletions':this['_prepareViewToSave'](_0x1f68db),'attachChange':this['_touchedRoots']['get'](_0x4c6caf)||null,'attributesBefore':_0x17f390(this['_baseRootsAttributes']['get'](_0x4c6caf))||{},'attributesAfter':_0x17f390(this['_diffRootsAttributes']['get'](_0x4c6caf))};}return{'diffData':_0x2dea4f,'authorsIds':Array['from'](_0x5e27d8)};}['_processRootBeforeSave'](_0x122d4f){for(const [,_0x5b1b92]of _0x122d4f['markers']){const _0x3e4a7c=_0x5b1b92['start']['getAncestors']()['filter'](_0x42ac20=>'tableCell'==_0x42ac20['name']);for(const _0x575d00 of _0x3e4a7c)0x1==_0x575d00['childCount']&&_0x575d00['getChild'](0x0)['is']('element','paragraph')&&_0x575d00['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4591d1){this['_processRootBeforeSave'](_0x4591d1);const _0x737871=this['editor']['data']['toView'](_0x4591d1,{}),_0x3d47bf=Array['from'](_0x737871['getChildren']())['map'](_0x4d6329=>this['_getViewJson'](_0x4d6329));return JSON['stringify'](_0x3d47bf);}['_getViewJson'](_0x1c613f){if(_0x1c613f['is']('$text'))return _0x1c613f['data'];{const _0x470e0e=_0x1c613f;return{'type':Object['keys'](E)['find'](_0x2e6529=>_0x1c613f instanceof E[_0x2e6529]),'name':_0x470e0e['name'],'attributes':Array['from'](_0x470e0e['getAttributes']()),'children':Array['from'](_0x470e0e['getChildren']())['map'](_0x2435a1=>this['_getViewJson'](_0x2435a1))};}}['_markChanges'](_0x3dd725,_0x189ef7,_0x478af6,_0x324de8,_0x2a3134){let _0x3f108f=null,_0x5af66c=null,_0x1766e2=0x0;const _0x46fe23=this['editor']['model'];for(let _0x17137d=0x0;_0x17137d<_0x189ef7['length'];_0x17137d++){const _0x2d8ca1=this['_getVidAttributeName'](_0x189ef7[_0x17137d]),_0x168b96=_0x189ef7[_0x17137d]['item']['getAttribute'](_0x2d8ca1),_0x47fdbd=_0x478af6['get'](_0x168b96),_0x327544=_0x17137d==_0x189ef7['length']-0x1;(!_0x3f108f&&_0x47fdbd&&(_0x3f108f=_0x47fdbd,_0x5af66c=_0x189ef7[_0x17137d]),_0x3f108f&&(!_0x47fdbd||_0x47fdbd['userId']!=_0x3f108f['userId']))&&(_0x16d450(_0x47fdbd,B(_0x5af66c,_0x3dd725,_0x46fe23),B(_0x189ef7[_0x17137d],_0x3dd725,_0x46fe23)),_0x3f108f=_0x47fdbd||null,_0x5af66c=_0x47fdbd?_0x189ef7[_0x17137d]:null),_0x3f108f&&_0x327544&&_0x16d450(_0x47fdbd,B(_0x5af66c,_0x3dd725,_0x46fe23),J(_0x189ef7[_0x17137d],_0x3dd725,_0x46fe23));}function _0x16d450(_0x42d5ab,_0x17be66,_0x368d3a){const _0x33c039=_0x3f108f['userId'],_0x5dbc1c='revision:'+_0x324de8+':'+_0x33c039+':'+_0x1766e2++,_0x13fc22=_0x46fe23['createRange'](_0x17be66,_0x368d3a);_0x3dd725['markers']['set'](_0x5dbc1c,_0x13fc22),null!==_0x33c039&&_0x2a3134['add'](_0x33c039);}}['_getVidAttributeName'](_0x3aad3d){switch(_0x3aad3d['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1afaa9,_0x4dc626){_0x1afaa9['baseVersion']=null;for(const _0x1bf8d5 in _0x1afaa9){const _0x30b124=_0x1afaa9[_0x1bf8d5];if(_0x30b124 instanceof vt){const _0x3dcf72=_0x4dc626['get'](_0x30b124['root']['rootName']);_0x1afaa9[_0x1bf8d5]=this['_fixPosition'](_0x30b124,_0x3dcf72);}if(_0x30b124 instanceof ft){const _0x694d2d=_0x4dc626['get'](_0x30b124['root']['rootName']);_0x1afaa9[_0x1bf8d5]=this['_fixRange'](_0x30b124,_0x694d2d);}'root'===_0x1bf8d5&&(_0x1afaa9['root']=_0x4dc626['get'](_0x1afaa9['root']['rootName']));}}['_fixRange'](_0x34f44f,_0x4b19a6){return this['editor']['model']['createRange'](this['_fixPosition'](_0x34f44f['start'],_0x4b19a6),this['_fixPosition'](_0x34f44f['end'],_0x4b19a6));}['_fixPosition'](_0x10a5fa,_0x3ffb5e){return this['editor']['model']['createPositionFromPath'](_0x3ffb5e,_0x10a5fa['path'],_0x10a5fa['stickiness']);}['_handleInsertOperation'](_0x5706da){const _0xd0de45=this['_idsRoots']['get'](_0x5706da['position']['root']['rootName']),_0x4a7417=this['_fixPosition'](_0x5706da['position'],_0xd0de45),_0xed6a91=null===_0x5706da['_authorId']?null:_0x5706da['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x36e286=_0x4a7417['parent'],_0x4f5fca=this['_revisionId'],_0x2381a7=[];for(const _0xeb1a2d of _0x5706da['nodes'])if(_0xeb1a2d['is']('element'))_0x2381a7['push'](this['_makeIdsRoot'](_0xeb1a2d));else{for(let _0x5be7ff=0x0;_0x5be7ff<_0xeb1a2d['offsetSize'];_0x5be7ff++)_0x2381a7['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x3a630f=this['_revisionId'];for(let _0x259a30=_0x4f5fca;_0x259a30<_0x3a630f;_0x259a30++)this['_touched']['set'](_0x259a30,{'userId':_0xed6a91});_0x36e286['_insertChild'](_0x4a7417['offset'],_0x2381a7);}['_handleMoveOperation'](_0x35b755){(_0x35b755=this['_cloneOperation'](_0x35b755,this['_idsRoots']))['_execute']();const _0x564f32=null===_0x35b755['_authorId']?null:_0x35b755['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x581172=_0x35b755['getMovedRangeStart'](),_0x1259c8=_0x581172['parent'],_0xb556f3=_0x581172['offset'];!function _0x3bda83(_0x28bef7,_0x19c76b,_0x23215b,_0x2921ec){for(let _0x33f43b=_0x23215b;_0x33f43b<_0x2921ec;_0x33f43b++){const _0x2782f5=_0x19c76b['getChild'](_0x33f43b);_0x2782f5['is']('element','$text')?_0x28bef7['set'](_0x2782f5['getAttribute']('vid'),{'userId':_0x564f32}):(_0x28bef7['set'](_0x2782f5['getAttribute']('vid_start'),{'userId':_0x564f32}),_0x3bda83(_0x28bef7,_0x2782f5,0x0,_0x2782f5['childCount']),_0x28bef7['set'](_0x2782f5['getAttribute']('vid_end'),{'userId':_0x564f32}));}}(this['_touched'],_0x1259c8,_0xb556f3,_0xb556f3+_0x35b755['howMany']);}['_handleMergeOperation'](_0xba0853){const _0x123217=null===(_0xba0853=this['_cloneOperation'](_0xba0853,this['_idsRoots']))['_authorId']?null:_0xba0853['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4493b9=_0xba0853['targetPosition']['parent'],_0x317007=_0xba0853['sourcePosition']['parent'],_0x36ae16=_0x4493b9['getAttribute']('vid_end'),_0x197a35=_0x317007['getAttribute']('vid_start');_0x4493b9['_setAttribute']('vid_end',_0x317007['getAttribute']('vid_end')),_0x317007['_setAttribute']('vid_end',_0x36ae16),this['_touched']['set'](_0x197a35,{'userId':_0x123217}),this['_touched']['set'](_0x36ae16,{'userId':_0x123217}),_0xba0853['_execute']();}['_handleSplitOperation'](_0x242564){const _0x56f7a4=null===(_0x242564=this['_cloneOperation'](_0x242564,this['_idsRoots']))['_authorId']?null:_0x242564['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x417ad2=_0x242564['graveyardPosition'],_0x21f862=_0x242564['splitPosition']['parent'];_0x242564['_execute']();const _0x87b7c4=_0x21f862['getAttribute']('vid_end'),_0x1c3d6a=_0x242564['insertionPosition']['nodeAfter'];if(_0x417ad2){const _0x248da8=_0x1c3d6a['getAttribute']('vid_end'),_0x42ba14=_0x21f862['getAttribute']('vid_end');_0x21f862['_setAttribute']('vid_end',_0x248da8),_0x1c3d6a['_setAttribute']('vid_end',_0x42ba14),this['_touched']['set'](_0x21f862['getAttribute']('vid_end'),{'userId':_0x56f7a4}),this['_touched']['set'](_0x1c3d6a['getAttribute']('vid_start'),{'userId':_0x56f7a4});}else{const _0x1af353=this['_revisionId']++,_0x9bb77b=this['_revisionId']++;_0x21f862['_setAttribute']('vid_end',_0x1af353),_0x1c3d6a['_setAttribute']('vid_start',_0x9bb77b),_0x1c3d6a['_setAttribute']('vid_end',_0x87b7c4),this['_touched']['set'](_0x1af353,{'userId':_0x56f7a4}),this['_touched']['set'](_0x9bb77b,{'userId':_0x56f7a4});}}['_handleMarkerOperation'](_0x18708e){if(!_0x18708e['affectsData'])return;const _0x2c10de=(_0x18708e=this['_cloneOperation'](_0x18708e,this['_diffRoots']))['oldRange']?_0x18708e['oldRange']['root']:null,_0x1b41cd=_0x18708e['newRange']?_0x18708e['newRange']['root']:null;_0x2c10de&&this['_markers']['delete'](_0x18708e['name']),_0x1b41cd&&this['_markers']['set'](_0x18708e['name'],_0x18708e['newRange']['clone']());const _0x4ba253=null===_0x18708e['_authorId']?null:_0x18708e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3c0e7f=_0x18708e['name'];if(!this['_touchedMarkers']['has'](_0x3c0e7f))return void this['_touchedMarkers']['set'](_0x3c0e7f,{'range':_0x18708e['oldRange'],'userId':_0x4ba253});const _0x6fa98d=this['_touchedMarkers']['get'](_0x3c0e7f),_0x66ee25=_0x6fa98d['range'],_0x5d217a=_0x18708e['newRange'];null==_0x66ee25&&null==_0x5d217a||_0x66ee25&&_0x5d217a&&_0x66ee25['isEqual'](_0x5d217a)?this['_touchedMarkers']['delete'](_0x18708e['name']):_0x6fa98d['userId']=_0x4ba253;}['_handleRootOperation'](_0x4e1cfd,_0x324151){this['_diffRoots']['has'](_0x4e1cfd['rootName'])?this['_diffRoots']['get'](_0x4e1cfd['rootName'])['_isAttached']=_0x4e1cfd['isAdd']:(this['_diffRoots']['set'](_0x4e1cfd['rootName'],F(_0x4e1cfd['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x4e1cfd['rootName'],{}),_0x324151&&this['_idsRoots']['set'](_0x4e1cfd['rootName'],F(_0x4e1cfd['rootName'],!0x0)));const _0x395163=null===_0x4e1cfd['_authorId']?null:_0x4e1cfd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x369dd2=this['_touchedRoots']['get'](_0x4e1cfd['rootName']);_0x369dd2&&_0x369dd2['userId']===_0x395163?this['_touchedRoots']['delete'](_0x4e1cfd['rootName']):this['_touchedRoots']['set'](_0x4e1cfd['rootName'],{'userId':_0x395163,'isAttached':_0x4e1cfd['isAdd']});}['_handleRootAttributeOperation'](_0x4efb6c){const _0x1879bc=this['_diffRootsAttributes']['get'](_0x4efb6c['root']['rootName']);null===_0x4efb6c['newValue']?delete _0x1879bc[_0x4efb6c['key']]:_0x1879bc[_0x4efb6c['key']]=_0x4efb6c['newValue'];}}function T(_0x4eede9){const _0x2597fc=F(_0x4eede9['rootName'],_0x4eede9['isAttached']());for(const _0x70ba97 of _0x4eede9['getChildren']()){const _0x20a710=_0x70ba97['_clone'](!0x0);_0x2597fc['_appendChild'](_0x20a710);}return _0x2597fc;}function F(_0x5c0391,_0x2e59aa=!0x0){const _0x45c6fe=new gt();return _0x45c6fe['rootName']=_0x5c0391,_0x45c6fe['_isAttached']=_0x2e59aa,_0x45c6fe['isAttached']=()=>_0x45c6fe['_isAttached'],_0x45c6fe;}function B(_0x440302,_0x5f2ebe,_0x52d3cf){const _0x58eb14='elementEnd'==_0x440302['type']?_0x52d3cf['createPositionAt'](_0x440302['item'],'end'):_0x52d3cf['createPositionBefore'](_0x440302['item']);return _0x52d3cf['createPositionFromPath'](_0x5f2ebe,_0x58eb14['path'],_0x58eb14['stickiness']);}function J(_0x51ef4f,_0x379bdd,_0x2827d2){const _0x5d00f9='elementStart'==_0x51ef4f['type']?_0x2827d2['createPositionAt'](_0x51ef4f['item'],0x0):_0x2827d2['createPositionAfter'](_0x51ef4f['item']);return _0x2827d2['createPositionFromPath'](_0x379bdd,_0x5d00f9['path'],_0x5d00f9['stickiness']);}class os extends _0x525a1d{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5812ae,_0x3f5bb3){super(_0x5812ae),this['focusTracker']=new _0x56b250(),this['keystrokes']=new _0xe5d47(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3f5bb3),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x124e02({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x21acbc=_0x42d694=>_0x42d694['stopPropagation']();this['keystrokes']['set']('arrowright',_0x21acbc),this['keystrokes']['set']('arrowleft',_0x21acbc),this['keystrokes']['set']('arrowup',_0x21acbc),this['keystrokes']['set']('arrowdown',_0x21acbc);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x46c0e4){this['revisionNameInputView']['fieldView']['element']['value']=_0x46c0e4['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x427ada){const _0x196554=new at(this['locale'],ti),_0x49a175=_0x196554['fieldView'];_0x49a175['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x581460=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x427ada&&(_0x581460+='\x20('+m(this['locale'],'optional')+')'),(_0x196554['label']=_0x581460,_0x49a175['on']('input',()=>{this['revisionNameInputValue']=_0x49a175['element']['value']['trim']();}),_0x196554);}}class f extends _0x26f450{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x4c73f5=this['editor'],_0x57fd56=_0x4c73f5['plugins']['get']('RevisionTracker');_0x4c73f5['ui']['componentFactory']['add']('revisionHistory',_0x608c0=>{const _0x3d971b=_0x290b2b(_0x608c0),_0x1f5083=_0x3d971b['panelView']['children'],_0x3c5790=new _0x148aee(_0x608c0),_0x2cfeea=new te(_0x608c0),_0x17d66d=new _0x278200(_0x608c0),_0x3b896f=new te(_0x608c0),_0x4076a0=new _0x278200(_0x608c0);return _0x3d971b['bind']('isEnabled')['to'](_0x57fd56,'isReady',_0x57fd56,'isEnabled',_0x4c73f5,'isReadOnly',(_0x4ca333,_0x47019b,_0x1662e6)=>_0x4ca333&&_0x47019b&&!_0x1662e6),_0x3d971b['buttonView']['set']({'icon':_0x5ce4fd,'label':m(_0x608c0,'Revision\x20history'),'tooltip':!0x0}),_0x17d66d['set']({'label':m(_0x608c0,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x17d66d['bind']('isEnabled')['to'](_0x57fd56,'isReady',_0x57fd56,'isEnabled',_0x4c73f5,'isReadOnly',(_0x3474a9,_0x29cd55,_0x121e42)=>_0x3474a9&&_0x29cd55&&!_0x121e42),_0x17d66d['on']('execute',()=>this['_showDialog']()),_0x4076a0['set']({'label':m(_0x608c0,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x4076a0['bind']('isEnabled')['to'](_0x57fd56,'isReady',_0x4c73f5,'isReadOnly',(_0x26864b,_0x4c3727)=>_0x26864b&&!_0x4c3727),_0x4076a0['on']('execute',()=>{_0x4c73f5['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x3d971b['isOpen']=!0x1,_0x4c73f5['editing']['view']['focus']();}),_0x2cfeea['children']['add'](_0x17d66d),_0x3b896f['children']['add'](_0x4076a0),_0x3c5790['role']='menu',_0x3c5790['items']['addMany']([_0x2cfeea,_0x3b896f]),_0x1f5083['add'](_0x3c5790),_0x3d971b;}),_0x4c73f5['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x17043d=this['editor'],_0x3895ee=_0x17043d['locale'],_0xb6acc1=new _0x56f35c(_0x3895ee),_0x2e7d61=new _0x5df39b(_0x3895ee);_0xb6acc1['buttonView']['set']({'icon':_0x5ce4fd,'label':m(_0x3895ee,'Revision\x20history')});const _0x55a512=new _0x63b3db(_0x3895ee,_0xb6acc1),_0x3f7b79=new _0x2550e0(_0x3895ee);_0x3f7b79['set']({'label':m(_0x3895ee,'Save\x20current\x20revision')}),_0x3f7b79['delegate']('execute')['to'](_0xb6acc1),_0x3f7b79['on']('execute',()=>{this['_showDialog']();}),_0x55a512['children']['add'](_0x3f7b79),_0x2e7d61['items']['add'](_0x55a512);const _0x1f9f27=new _0x63b3db(_0x3895ee,_0xb6acc1),_0x3fd528=new _0x2550e0(_0x3895ee);return _0x3fd528['set']({'label':m(_0x3895ee,'Open\x20revision\x20history')}),_0x3fd528['delegate']('execute')['to'](_0xb6acc1),_0x3fd528['on']('execute',()=>{_0x17043d['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1f9f27['children']['add'](_0x3fd528),_0x2e7d61['items']['add'](_0x1f9f27),_0xb6acc1['panelView']['children']['add'](_0x2e7d61),_0xb6acc1;}['_showDialog'](){const _0x206733=this['editor'],_0x39374d=_0x206733['locale'],_0x3c80c5=_0x206733['plugins']['get']('Dialog'),_0x5be687=_0x206733['plugins']['get']('RevisionTracker');function _0x47c77a(_0x5eb7d1){_0x206733['config']['get']('revisionHistory.requireRevisionName')&&''===_0x5eb7d1['revisionName']?_0x5eb7d1['revisionNameInputView']['errorText']=m(_0x39374d,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x206733['plugins']['get'](u)['saveRevision']({'name':_0x5eb7d1['revisionName']}),_0x3c80c5['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x47c77a(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3c80c5['show']({'id':'revisionSave','title':m(_0x39374d,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x206733['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3c80c5['hide']()},{'label':m(_0x206733['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x11a75f){_0x11a75f['bind']('isEnabled')['to'](_0x5be687,'isReady',_0x5be687,'isEnabled',_0x206733,'isReadOnly',(_0x38297c,_0x27efa8,_0x210250)=>_0x38297c&&_0x27efa8&&!_0x210250);},'onExecute':()=>_0x47c77a(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x3e94b3=this['editor'],_0x379231=_0x3e94b3['locale'];this['_saveRevisionFormView']=new os(_0x379231,_0x3e94b3['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x525a1d{['changeId'];['_model'];constructor(_0x34621a,_0xa16f6c){super(_0x34621a),this['_model']=_0xa16f6c,this['changeId']=_0xa16f6c['id'];const _0x262bd8=this['bindTemplate'],_0x369ac6=m(_0x34621a,_0xa16f6c['data']['isSuggestion']?'Suggested\x20by':'add'==_0xa16f6c['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xa16f6c['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x262bd8['to']('type',_0x1da274=>'ck-revision-change__'+_0x1da274)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x369ac6}]},{'text':'\x20'+_0xa16f6c['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0xcb1cec(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x571764){super(),this['id']=_0x571764['id']||_0x47cd61(),this['author']=_0x571764['author'],this['type']=_0x571764['type'],this['data']=_0x571764['data']||{},this['rootName']=_0x571764['rootName'],this['set']('createdAt',_0x571764['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xab5fe3,_0x2e6b25){this['newRevisionId']=_0xab5fe3,this['oldRevisionId']=_0x2e6b25,this['changes']=new _0xc0b39c();}['_setChanges'](_0x26c65d){for(const _0x8b608a of _0x26c65d)this['changes']['add'](_0x8b608a);}}const Y={'c':_0x3e4f10,'a':_0x122c61,'e':_0x5a2ecc,'r':_0x45c87a,'u':_0x2af098};class d extends _0x26f450{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xbb1ed5,_0x4fc96b,j];}constructor(_0x2b2a44){super(_0x2b2a44),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0xa3a052,_0x2bd4ce,_0xcb287f)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5b9d4b=>{for(const _0x1e647c of this['editor']['editing']['view']['document']['roots'])_0xcb287f?_0x5b9d4b['removeClass']('ck-editor__editable__overlay',_0x1e647c):_0x5b9d4b['addClass']('ck-editor__editable__overlay',_0x1e647c);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x447979=>null!==_0x447979),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3c58a8,_0x1c6e5a,_0x12d7f5)=>_0x3c58a8&&_0x12d7f5?_0x1c6e5a['changes']['getIndex'](_0x12d7f5):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3b3f95,_0x261b79)=>_0x3b3f95?_0x261b79['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x4fc96b);}['init'](){const _0x1406e3=this['editor'],_0x4aaf62=new yt(_0x1406e3,{'direction':'backward'}),_0x5b5544=new yt(_0x1406e3,{'direction':'forward'});(_0x1406e3['commands']['add']('showPreviousChange',_0x4aaf62),_0x1406e3['commands']['add']('showNextChange',_0x5b5544),_0x1406e3['commands']['add']('restoreRevision',new _t(_0x1406e3)),this['on']('change:numberOfChanges',()=>{_0x4aaf62['refresh'](),_0x5b5544['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1406e3['enableReadOnlyMode']('revision-viewer'),_0x1406e3['plugins']['has']('WidgetToolbarRepository'))&&_0x1406e3['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x29e4fe){await this['loadRevisionData'](_0x29e4fe);const _0x47b552={};for(const _0x5c8a36 in _0x29e4fe['diffData']){if(_0x29e4fe['diffData'][_0x5c8a36]['attachChange']&&!_0x29e4fe['diffData'][_0x5c8a36]['attachChange']['isAttached'])continue;const _0x4b99d5=this['_removeRevisionMarkers'](JSON['parse'](_0x29e4fe['diffData'][_0x5c8a36]['insertions'])),_0x515674=this['editor']['editing']['view']['document'],_0x2e3de6=new _0x53812f(_0x515674,_0x4b99d5['map'](_0x438901=>this['_getViewObj'](_0x438901)));this['editor']['data']['processor']['useFillerType']('marked'),_0x47b552[_0x5c8a36]=this['editor']['data']['processor']['toData'](_0x2e3de6),this['editor']['data']['processor']['useFillerType']('default');}return _0x47b552;}async['getRevisionRootsAttributes'](_0x168f34){await this['loadRevisionData'](_0x168f34);const _0x415c9e={};for(const _0x2bce3c in _0x168f34['diffData'])_0x168f34['diffData'][_0x2bce3c]['attachChange']&&!_0x168f34['diffData'][_0x2bce3c]['attachChange']['isAttached']||(_0x415c9e[_0x2bce3c]=_0x168f34['diffData'][_0x2bce3c]['attributesAfter']||{});return _0x415c9e;}['_removeRevisionMarkers'](_0x246c12){return(_0x246c12=_0x246c12['filter'](_0x136315=>!_0x136315['name']||'revision-start'!==_0x136315['name']&&'revision-end'!==_0x136315['name']))['forEach'](_0x3f9a06=>{'string'!=typeof _0x3f9a06&&(_0x3f9a06['children']=this['_removeRevisionMarkers'](_0x3f9a06['children']),_0x3f9a06['attributes']=_0x3f9a06['attributes']['filter'](_0x14744e=>!_0x14744e[0x0]['startsWith']('data-revision-')));}),_0x246c12;}async['compare'](_0xd3c0ed,_0x5ba0c3,_0x172515=!0x1){if(!this['isEnabled'])return;const _0x162b1d=this['diff'],_0x2bb9e9=this['repository'],_0x1fee5d='string'==typeof _0xd3c0ed?_0x2bb9e9['getRevision'](_0xd3c0ed):_0xd3c0ed,_0x13bf17='string'==typeof _0x5ba0c3?_0x2bb9e9['getRevision'](_0x5ba0c3):_0x5ba0c3,_0x1003ff=_0x1fee5d['id'],_0x74ef86=_0x13bf17?_0x13bf17['id']:null;if(!_0x172515&&this['diff']&&this['diff']['newRevisionId']===_0x1003ff&&this['diff']['oldRevisionId']===_0x74ef86)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x1003ff,_0x74ef86);const _0x1ad084=this['_getRevisionsRange'](_0x1fee5d,_0x13bf17,!0x0)['map'](_0x10ffa4=>this['loadRevisionData'](_0x10ffa4));return _0x1ad084['push'](new Promise(_0x36a784=>{setTimeout(_0x36a784,0x14);})),Promise['all'](_0x1ad084)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0xf11628=this['_getDiff'](_0x1003ff,_0x74ef86);for(const _0x38b9d3 of _0xf11628['changes'])this['_changeIdToChange']['set'](_0x38b9d3['id'],_0x38b9d3);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1669d2=>{for(const _0x3ad5d9 of this['editor']['model']['document']['getRootNames']())_0x1669d2['detachRoot'](_0x3ad5d9);for(const _0x11abc2 of Object['keys'](_0xf11628['model'])){const _0x2b9a6e=_0x1669d2['addRoot'](_0x11abc2);for(const _0x1e5399 of Object['keys'](_0xf11628['attributes'][_0x11abc2]))_0x1669d2['setAttribute'](_0x1e5399,_0xf11628['attributes'][_0x11abc2][_0x1e5399],_0x2b9a6e);_0x1669d2['insert'](_0xf11628['model'][_0x11abc2],_0x2b9a6e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0xf11628['changes'])),this['isReady']=!0x0;})['catch'](_0x166126=>{console['error'](_0x166126),this['_cleanUp'](),_0x162b1d&&(this['diff']=_0x162b1d),this['isReady']=!0x0;});}['addRevisionData'](_0xb5e662,_0x7cb3eb){const _0x229671=this['repository']['createRevision'](_0xb5e662);return _0x229671['on']('_update',(_0x246fb8,_0x41aed8,_0x3ba44d)=>_0x7cb3eb(_0x41aed8,_0x3ba44d,_0x229671)),this['repository']['addRevision'](_0x229671),_0x229671;}['loadRevisionData'](_0x1b4fb2){if(!_0x1b4fb2||_0x1b4fb2['diffData'])return Promise['resolve']();{const _0x4d1a1b=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x4d1a1b,'revisionId':_0x1b4fb2['id']})['then'](_0x3d0973=>{_0x1b4fb2['_update']({'diffData':_0x3d0973['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4bb116=>{for(const _0x291b17 of this['editor']['model']['document']['getRootNames']())_0x4bb116['detachRoot'](_0x291b17);});}['_sortAndFilterDiffChanges'](_0x3adf80){const _0x47b8f7=[],_0x5d2458=new Map();for(const _0xf6a2d of this['editor']['model']['document']['getRootNames']()){const _0x1fc3a8=this['editor']['editing']['view']['getDomRoot'](_0xf6a2d);if(!_0x1fc3a8)continue;const _0x294ec8=_0x1fc3a8['getClientRects']()['item'](0x0);_0x294ec8&&(_0x47b8f7['push'](_0xf6a2d),_0x5d2458['set'](_0xf6a2d,_0x294ec8));}return _0x47b8f7['sort']((_0x4e9969,_0x2e0326)=>{const _0x520abe=_0x5d2458['get'](_0x4e9969),_0x4e4846=_0x5d2458['get'](_0x2e0326);return _0x520abe['y']-_0x4e4846['y']||_0x520abe['x']-_0x4e4846['x'];}),(_0x3adf80=_0x3adf80['filter'](_0x5505b5=>_0x47b8f7['includes'](_0x5505b5['rootName'])))['sort']((_0x3ec9d9,_0x3aa25b)=>_0x47b8f7['indexOf'](_0x3ec9d9['rootName'])-_0x47b8f7['indexOf'](_0x3aa25b['rootName'])),_0x3adf80;}['_makeTape'](_0xb590a8){const _0x281098=Array['from'](_0xb590a8['markers'])['filter'](([_0x2fc87b,_0x5cad02])=>_0x2fc87b['startsWith']('revision:')&&!_0x5cad02['isCollapsed']),_0x13a1c0=Array['from'](this['editor']['model']['createRangeIn'](_0xb590a8)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x281098['length'])for(const _0x360870 of _0x13a1c0){const [_0xb615af,_0x1ee9a5]=_0x281098[0x0],[,_0x4ac5cc,_0x3527f1]=_0xb615af['split'](':');if(_0x1ee9a5['end']['isEqual'](_0x360870['nextPosition'])&&_0x281098['shift'](),(_0x360870['previousPosition']['isEqual'](_0x1ee9a5['start'])||_0x360870['previousPosition']['isAfter'](_0x1ee9a5['start']))&&('insertion'==_0x4ac5cc?_0x360870['isAdded']={'userId':_0x3527f1}:'deletion'==_0x4ac5cc&&(_0x360870['isRemoved']={'userId':_0x3527f1})),0x0==_0x281098['length'])break;}return _0x13a1c0;}['_refreshStartEndIndex'](_0x54aae6){const _0x31b2ff=new Map();for(let _0x2b9410=0x0;_0x2b9410<_0x54aae6['length'];_0x2b9410++)'text'===_0x54aae6[_0x2b9410]['type']?(_0x54aae6[_0x2b9410]['item']['startIndex']=_0x2b9410,_0x54aae6[_0x2b9410]['item']['endIndex']=_0x2b9410):('elementStart'===_0x54aae6[_0x2b9410]['type']?_0x54aae6[_0x2b9410]['item']['startIndex']=_0x2b9410:'elementEnd'===_0x54aae6[_0x2b9410]['type']&&(_0x54aae6[_0x2b9410]['item']['endIndex']=_0x2b9410),_0x31b2ff['set'](_0x54aae6[_0x2b9410]['id'],_0x2b9410));for(const _0x1ed985 of _0x31b2ff['values']())'elementStart'===_0x54aae6[_0x1ed985]['type']?_0x54aae6[_0x1ed985]['item']['endIndex']=_0x31b2ff['get'](_0x54aae6[_0x1ed985]['pairId']):'elementEnd'===_0x54aae6[_0x1ed985]['type']&&(_0x54aae6[_0x1ed985]['item']['startIndex']=_0x31b2ff['get'](_0x54aae6[_0x1ed985]['pairId']));}['_processTape'](_0x103e26){for(let _0x289d24=0x0;_0x289d24<_0x103e26['length'];_0x289d24++){if('elementStart'===_0x103e26[_0x289d24]['type'])_0x103e26[_0x289d24]['item']['startIndex']=_0x289d24;else{if('elementEnd'===_0x103e26[_0x289d24]['type']){_0x103e26[_0x289d24]['item']['endIndex']=_0x289d24;const _0x4e5791=_0x103e26[_0x289d24]['item']['startIndex'];_0x103e26[_0x4e5791]['pairId']=_0x103e26[_0x289d24]['id'],_0x103e26[_0x289d24]['pairId']=_0x103e26[_0x4e5791]['id'];}else _0x103e26[_0x289d24]['item']['startIndex']=_0x289d24,_0x103e26[_0x289d24]['item']['endIndex']=_0x289d24,_0x103e26[_0x289d24]['pairId']=null;}_0x103e26[_0x289d24]['markersStart']||(_0x103e26[_0x289d24]['markersStart']=[],_0x103e26[_0x289d24]['markersEnd']=[]);}}['_markInsertions'](_0x4a485a,_0x5c10a3){const _0x396c65=_0x4a485a['filter'](_0x4df94c=>!_0x4df94c['isAdded']);for(let _0x2c7753=0x0;_0x2c7753<_0x5c10a3['length'];_0x2c7753++)_0x5c10a3[_0x2c7753]['isAdded']&&(_0x396c65[_0x2c7753]['isAdded']=_0x5c10a3[_0x2c7753]['isAdded']);}['_makeModelFromViewString'](_0x4a859c){const _0x4e6c1f=JSON['parse'](_0x4a859c),_0x326e47=this['editor']['editing']['view']['document'],_0x333c76=new _0x53812f(_0x326e47,_0x4e6c1f['map'](_0x54bf6f=>this['_getViewObj'](_0x54bf6f)));return this['editor']['data']['toModel'](_0x333c76);}['_getViewObj'](_0x5a1706){const _0x13dc9b=this['editor']['editing']['view']['document'];if('string'==typeof _0x5a1706)return new _0x2f79b6(_0x13dc9b,_0x5a1706);{const _0x316927=_0x5a1706['children']['map'](_0x5f0bac=>this['_getViewObj'](_0x5f0bac));return new(Y[_0x5a1706['type']]||_0x15bf3f)(_0x13dc9b,_0x5a1706['name'],_0x5a1706['attributes'],_0x316927);}}['_getDiff'](_0x4dacb8,_0x222d5d=null){const _0x113e92=this['repository']['getRevision'](_0x4dacb8),_0x27929d=_0x222d5d?this['repository']['getRevision'](_0x222d5d):null,_0x29269c=this['_getRevisionsRange'](_0x113e92,_0x27929d),_0x475673=_0x29269c[_0x29269c['length']-0x1],_0x322401=new Map(),_0x24eba4={'model':{},'attributes':{},'changes':[]},_0x348d0f=new Set(),_0x5ce9f4=new Map();for(let _0x5c772c=_0x29269c['length']-0x1;_0x5c772c>=0x0;_0x5c772c--){const _0x218e7d=_0x29269c[_0x5c772c];for(const _0x41e79e of Object['keys'](_0x218e7d['diffData']))if(_0x218e7d['diffData'][_0x41e79e]['attachChange']){const _0x348b87=_0x218e7d['diffData'][_0x41e79e]['attachChange'];_0x348b87['isAttached']?(_0x348d0f['add'](_0x41e79e),_0x5ce9f4['has'](_0x41e79e)&&_0x5ce9f4['get'](_0x41e79e)['userId']==_0x348b87['userId']?_0x5ce9f4['delete'](_0x41e79e):_0x5ce9f4['set'](_0x41e79e,_0x348b87)):_0x5ce9f4['has'](_0x41e79e)?(_0x348d0f['delete'](_0x41e79e),_0x5ce9f4['delete'](_0x41e79e)):(_0x348d0f['add'](_0x41e79e),_0x5ce9f4['set'](_0x41e79e,_0x348b87));}else _0x348d0f['add'](_0x41e79e);}for(const _0xb98505 of _0x348d0f){const _0x4d7471=_0x5ce9f4['has'](_0xb98505)&&!_0x5ce9f4['get'](_0xb98505)['isAttached'];let _0x10ab49=_0x4d7471?_0x29269c['length']-0x1:0x0;const _0x2d366e=_0x4d7471?-0x1:0x1;for(;_0x29269c[_0x10ab49];){const _0x57e7b7=_0x29269c[_0x10ab49];if(_0x57e7b7['diffData'][_0xb98505]){const _0x202654=_0x4d7471?_0x57e7b7['diffData'][_0xb98505]['attributesBefore']:_0x57e7b7['diffData'][_0xb98505]['attributesAfter'];_0x24eba4['attributes'][_0xb98505]=_0x202654?_0x17f390(_0x202654):{};break;}_0x10ab49+=_0x2d366e;}}for(const _0x3f114a of _0x29269c){_0x3f114a['model']={};for(const _0x5e4711 of _0x3f114a['authors'])_0x322401['set'](_0x5e4711['id'],_0x5e4711);for(const _0xcf5cf9 of _0x348d0f){const _0x5c3c71=_0x3f114a['diffData'][_0xcf5cf9]?_0x3f114a['diffData'][_0xcf5cf9]['insertions']:'[]',_0x7f8c18=_0x3f114a['diffData'][_0xcf5cf9]?_0x3f114a['diffData'][_0xcf5cf9]['deletions']:'[]';_0x3f114a['model'][_0xcf5cf9]={'insertions':this['_makeModelFromViewString'](_0x5c3c71),'deletions':this['_makeModelFromViewString'](_0x7f8c18)};}}for(const _0x525db7 of _0x348d0f){let _0xad248e=null,_0x97e422=0x0;const _0x2c6d9a=new Map(Array['from'](_0x113e92['model'][_0x525db7]['insertions']['markers'])['filter'](([_0x1f8fb7])=>!_0x1f8fb7['startsWith']('revision:')));let _0xe109c5=0x0;for(const _0x1fbd6d of _0x29269c){const _0x2f345c=this['_makeTape'](_0x1fbd6d['model'][_0x525db7]['insertions']);_0x1fbd6d==_0x113e92?(_0xad248e=_0x2f345c,_0x97e422=_0xad248e['length'],_0xad248e['forEach'](_0x31d053=>{_0x31d053['id']=_0xe109c5++;}),this['_processTape'](_0xad248e)):this['_markInsertions'](_0xad248e,_0x2f345c);const _0x174c41=_0xad248e['filter'](_0x1d5d2b=>!_0x1d5d2b['isAdded'])['map'](_0x217c06=>_0x217c06['id']);let _0x4b4057=0x0;const _0x84c3db=this['_makeTape'](_0x1fbd6d['model'][_0x525db7]['deletions']);_0x84c3db['forEach'](_0x904dfe=>{_0x904dfe['isRemoved']?_0x904dfe['id']=_0x97e422++:_0x904dfe['id']=_0x174c41[_0x4b4057++];}),this['_processTape'](_0x84c3db),this['_setDistance'](_0xad248e,'isAdded'),this['_setDistance'](_0x84c3db,'isRemoved'),_0x1fbd6d==_0x113e92&&this['_markMarkers'](_0xad248e,_0x2c6d9a),_0xad248e=this['_joinTapes'](_0xad248e,_0x84c3db),this['_refreshStartEndIndex'](_0xad248e),this['_setDistance'](_0xad248e,'isRemoved');}_0xad248e=_0xad248e['filter'](_0x53ced4=>!(_0x53ced4['isAdded']&&_0x53ced4['isRemoved']));const _0x24a684=new Map(_0x475673['model'][_0x525db7]['deletions']['markers']),_0x243ab4=new Set(_0x2c6d9a['keys']());for(const _0x3627cd of _0x24a684['keys']())_0x243ab4['delete'](_0x3627cd);this['_markSuggestions'](_0xad248e,_0x243ab4),this['_fixObsoleteTags'](_0xad248e),_0xad248e=this['_removeMissingPairs'](_0xad248e),_0xad248e=this['_markMismatchedRemovedTags'](_0xad248e),_0xad248e=this['_removeUnsupportedChanges'](_0xad248e);const {root:_0xa5760c,changes:_0x169ba0}=this['_makeModelFromTape'](_0xad248e,_0x322401,_0x525db7);_0x24eba4['model'][_0x525db7]=_0xa5760c;const _0x3e22e2=_0x5ce9f4['get'](_0x525db7);if(_0x3e22e2){const _0x30c730=_0x322401['get'](_0x3e22e2['userId']),_0x127786=new r({'author':_0x30c730,'type':_0x3e22e2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x525db7});_0x169ba0['unshift'](_0x127786),_0x24eba4['attributes'][_0x525db7]['revisionHistoryAttachChange']=_0x127786['id'];}_0x24eba4['changes']=_0x24eba4['changes']['concat'](_0x169ba0);}return _0x24eba4;}['_markMarkers'](_0x215935,_0x33f17a){for(let _0x535d73=0x0;_0x535d73<_0x215935['length'];_0x535d73++)for(const [_0x54d875,_0x7150d1]of _0x33f17a)_0x7150d1['start']['isEqual'](_0x215935[_0x535d73]['previousPosition'])&&_0x215935[_0x535d73]['markersStart']['push'](_0x54d875),_0x7150d1['end']['isEqual'](_0x215935[_0x535d73]['nextPosition'])&&_0x215935[_0x535d73]['markersEnd']['push'](_0x54d875);}['_joinTapes'](_0x41b711,_0x4aa3ef){let _0x1232a9=[],_0x45797b=0x0,_0x43e4a5=0x0;for(;_0x45797b<_0x41b711['length']||_0x43e4a5<_0x4aa3ef['length'];){const _0x1f01af=_0x41b711[_0x45797b]||{},_0x83f780=_0x4aa3ef[_0x43e4a5]||{};if(_0x1f01af['id']==_0x83f780['id'])_0x45797b++,_0x43e4a5++,_0x1232a9['push'](_0x1f01af);else{if(_0x83f780['isRemoved']&&_0x1f01af['isAdded']){const {commonTape:_0x5af8c9,iEnd:_0x2d26aa,jEnd:_0x5ed5a0}=this['_threeWayMerge'](_0x41b711,_0x45797b,_0x4aa3ef,_0x43e4a5);_0x1232a9=_0x1232a9['concat'](_0x5af8c9),_0x45797b=_0x2d26aa,_0x43e4a5=_0x5ed5a0;}else _0x83f780['isRemoved']?(_0x43e4a5++,_0x1232a9['push'](_0x83f780)):(_0x45797b++,_0x1232a9['push'](_0x1f01af));}}return _0x1232a9;}['_markSuggestions'](_0x398bed,_0x3b23db){const _0x4754bf=[];for(let _0xce88e5=0x0;_0xce88e5<_0x398bed['length'];_0xce88e5++){for(let _0x3e73b2=0x0;_0x3e73b2<_0x398bed[_0xce88e5]['markersStart']['length'];_0x3e73b2++){const _0xe63d7d=_0x398bed[_0xce88e5]['markersStart'][_0x3e73b2];if(!_0x3b23db['has'](_0xe63d7d))continue;const {group:_0x1c11d3,type:_0x1d759b,authorId:_0x10c1a5}=_0x5924eb(_0xe63d7d);'revision-suggestion'!=_0x1c11d3||'insertion'!=_0x1d759b&&'deletion'!=_0x1d759b||(_0x4754bf['unshift']({'type':_0x1d759b,'name':_0xe63d7d,'userId':_0x10c1a5}),_0x398bed[_0xce88e5]['markersStart']['splice'](_0x3e73b2,0x1),_0x3e73b2--);}_0x5b0ace(_0x398bed[_0xce88e5]);for(let _0x54fbdb=0x0;_0x54fbdb<_0x398bed[_0xce88e5]['markersEnd']['length'];_0x54fbdb++){const _0x223b26=_0x398bed[_0xce88e5]['markersEnd'][_0x54fbdb];if(!_0x3b23db['has'](_0x223b26))continue;const {group:_0x33507e,type:_0x5b304c}=_0x5924eb(_0x223b26);if('revision-suggestion'!=_0x33507e||'insertion'!=_0x5b304c&&'deletion'!=_0x5b304c)continue;_0x398bed[_0xce88e5]['markersEnd']['splice'](_0x54fbdb,0x1),_0x54fbdb--;const _0x909cf5=_0x4754bf['findIndex'](_0x37742a=>_0x37742a['name']==_0x223b26);_0x909cf5>-0x1&&_0x4754bf['splice'](_0x909cf5,0x1);}}function _0x5924eb(_0x158365){const _0xa2ad01=_0x158365['split'](':');return{'group':_0xa2ad01[0x0],'type':_0xa2ad01[0x1],'subType':_0xa2ad01['length']>=0x5?_0xa2ad01[0x2]:null,'id':_0xa2ad01['length']<0x5?_0xa2ad01[0x2]:_0xa2ad01[0x3],'authorId':_0xa2ad01['length']<0x5?_0xa2ad01[0x3]:_0xa2ad01[0x4],'markerCount':0x6==_0xa2ad01['length']?_0xa2ad01[0x5]:null};}function _0x5b0ace(_0x44e185){for(let _0x30263f=0x0;_0x30263f<_0x4754bf['length'];_0x30263f++){if(_0x44e185['isAdded']&&'insertion'==_0x4754bf[_0x30263f]['type'])return _0x44e185['isAddSuggestion']=_0x4754bf[_0x30263f],void delete _0x44e185['isAdded'];if(!_0x44e185['isAdded']&&!_0x44e185['isRemoved']&&'deletion'==_0x4754bf[_0x30263f]['type'])return void(_0x44e185['isRemoveSuggestion']=_0x4754bf[_0x30263f]);}}}['_setDistance'](_0x3a1bf2,_0x4ce83b){let _0x33498e=0x0,_0x14b00c=!0x1;const _0x4bd63f=new Map();for(const _0x1c24b2 of _0x3a1bf2)_0x1c24b2[_0x4ce83b]?_0x14b00c&&(_0x33498e++,_0x14b00c=!0x1):(_0x33498e++,_0x14b00c=!0x0),_0x4bd63f['set'](_0x1c24b2['id'],_0x33498e);for(let _0x1bebc2=0x0;_0x1bebc2<_0x3a1bf2['length'];_0x1bebc2++){if('isRemoved'==_0x4ce83b&&_0x3a1bf2[_0x1bebc2]['isAdded']||'isAdded'==_0x4ce83b&&_0x3a1bf2[_0x1bebc2]['isRemoved'])continue;if('text'==_0x3a1bf2[_0x1bebc2]['type']){_0x3a1bf2[_0x1bebc2]['distance']=0x0;continue;}const _0x5dfe90=_0x4bd63f['get'](_0x3a1bf2[_0x1bebc2]['pairId']),_0x3fb7bd=_0x4bd63f['get'](_0x3a1bf2[_0x1bebc2]['id']);_0x3a1bf2[_0x1bebc2]['distance']=_0x5dfe90-_0x3fb7bd;}}['_getRevisionsRange'](_0x1d1bcb,_0x432dbd,_0x296291=!0x1){const _0x12e3da=[];let _0x4f641b=this['repository']['getIndex'](_0x1d1bcb),_0x729c92=this['repository']['getIndex'](_0x432dbd);for(-0x1==_0x729c92&&(_0x729c92=this['repository']['_revisions']['length'],_0x296291=!0x1);_0x4f641b<_0x729c92;)_0x12e3da['push'](this['repository']['getRevision'](_0x4f641b)),_0x4f641b++;return _0x296291&&_0x12e3da['push'](this['repository']['getRevision'](_0x4f641b)),_0x12e3da;}['_threeWayMerge'](_0x17d314,_0x4170d9,_0x51f96b,_0x345db6){const _0x558978=this['editor']['model']['schema'];let _0xeeb64b=_0x4170d9;for(;_0x17d314[_0xeeb64b]&&_0x17d314[_0xeeb64b]['isAdded'];)_0xeeb64b++;let _0x18f529=_0x345db6;for(;_0x51f96b[_0x18f529]&&_0x51f96b[_0x18f529]['isRemoved'];)_0x18f529++;_0x2225fb(_0x17d314,_0x4170d9,_0xeeb64b),_0x2225fb(_0x51f96b,_0x345db6,_0x18f529);const _0x484941=_0x51f96b['slice'](_0x345db6,_0x18f529)['concat'](_0x17d314['slice'](_0x4170d9,_0xeeb64b));return _0x484941['sort']((_0x217f58,_0x192670)=>_0x217f58['side']!=_0x192670['side']?_0x217f58['side']-_0x192670['side']:_0x217f58['level']!=_0x192670['level']?_0x217f58['level']-_0x192670['level']:_0x217f58['distance']!=_0x192670['distance']?_0x192670['distance']-_0x217f58['distance']:!!_0x217f58['isAdded']!=!!_0x192670['isAdded']?-0x1==_0x217f58['side']||0x0==_0x217f58['side']?_0x217f58['isAdded']?-0x1:0x1:_0x217f58['isAdded']?0x1:-0x1:_0x217f58['index']-_0x192670['index']),{'commonTape':_0x484941,'iEnd':_0xeeb64b,'jEnd':_0x18f529};function _0x2225fb(_0x176e21,_0xaad319,_0x3c9a8f){let _0x186eb8=-0x1,_0x423597=Number['POSITIVE_INFINITY'],_0x4429bb=!0x0;for(let _0x14f438=_0xaad319;_0x14f438<_0x3c9a8f;_0x14f438++)if(_0x558978['isInline'](_0x176e21[_0x14f438]['item'])||(_0x4429bb=!0x1),_0x176e21[_0x14f438]['item']['startIndex']<_0xaad319&&(_0x186eb8=_0x14f438),_0x176e21[_0x14f438]['item']['endIndex']>=_0x3c9a8f){_0x423597=_0x14f438;break;}_0x4429bb&&(_0x186eb8=_0x3c9a8f-0x1);for(let _0x520660=_0xaad319;_0x520660<_0x3c9a8f;_0x520660++)_0x176e21[_0x520660]['side']=_0x520660<=_0x186eb8?-0x1:_0x520660<_0x423597?0x0:0x1,_0x176e21[_0x520660]['index']=_0x520660;let _0x58e7eb=0x0;for(let _0x4bc9f1=_0xaad319;_0x4bc9f1<=_0x186eb8;_0x4bc9f1++)0x0==_0x176e21[_0x4bc9f1]['distance']?_0x176e21[_0x4bc9f1]['level']=_0x58e7eb:(_0x58e7eb++,_0x176e21[_0x4bc9f1]['level']=_0x58e7eb,_0x58e7eb++);for(let _0x1bc095=_0xaad319;_0x1bc095<_0x3c9a8f;_0x1bc095++)0x0==_0x176e21[_0x1bc095]['side']&&(_0x176e21[_0x1bc095]['level']=_0x58e7eb);_0x58e7eb=0x0;for(let _0xf009c0=_0x3c9a8f-0x1;_0xf009c0>=_0x423597;_0xf009c0--)0x0==_0x176e21[_0xf009c0]['distance']?_0x176e21[_0xf009c0]['level']=_0x58e7eb:(_0x58e7eb--,_0x176e21[_0xf009c0]['level']=_0x58e7eb,_0x58e7eb--);}}['_fixObsoleteTags'](_0x3677da){const _0x2273dd=new Map(),_0x1c1147=this['editor']['model']['schema'];for(let _0x3a2aca=0x1;_0x3a2aca<_0x3677da['length'];_0x3a2aca++){let _0x892017,_0x424721,_0x40ef40;const _0x1c2568=_0x3677da[_0x3a2aca],_0x1c7e5b=_0x3677da[_0x3a2aca-0x1];if('text'==_0x1c2568['type'])continue;if(_0x1c2568['type']!=_0x1c7e5b['type'])continue;if(!_0x1c1147['isBlock'](_0x1c7e5b['item'])||_0x1c1147['isLimit'](_0x1c7e5b['item']))continue;if(!_0x1c1147['isBlock'](_0x1c2568['item'])||_0x1c1147['isLimit'](_0x1c2568['item']))continue;if((_0x3677da[_0x3a2aca]['isAdded']||_0x3677da[_0x3a2aca]['isAddSuggestion'])&&_0x3677da[_0x3a2aca-0x1]['isRemoved'])_0x892017=_0x3677da[_0x3a2aca],_0x424721=_0x3677da[_0x3a2aca-0x1],_0x40ef40=_0x3a2aca-0x1;else{if(!_0x3677da[_0x3a2aca]['isRemoved']||!_0x3677da[_0x3a2aca-0x1]['isAdded']&&!_0x3677da[_0x3a2aca-0x1]['isAddSuggestion'])continue;_0x892017=_0x3677da[_0x3a2aca-0x1],_0x424721=_0x3677da[_0x3a2aca],_0x40ef40=_0x3a2aca;}const _0x356bbc=_0x892017['level']==_0x424721['level'],_0x2bac94=Math['abs'](_0x892017['level'])<Math['abs'](_0x424721['level'])&&0x0==_0x424721['distance'];(_0x356bbc||_0x2bac94)&&(_0x2273dd['set'](_0x424721['id'],_0x892017['id']),_0x3677da['splice'](_0x40ef40,0x1),_0x3a2aca--,_0x892017['isAdded']=!0x1);}for(let _0x52bdd5=0x0;_0x52bdd5<_0x3677da['length'];_0x52bdd5++)_0x2273dd['has'](_0x3677da[_0x52bdd5]['pairId'])&&(_0x3677da[_0x52bdd5]['pairId']=_0x2273dd['get'](_0x3677da[_0x52bdd5]['pairId']));}['_removeMissingPairs'](_0x2fe96c){const _0x1c1630=new Set(_0x2fe96c['map'](_0x497fb8=>_0x497fb8['id']));for(let _0x1aa338=0x0;_0x1aa338<_0x2fe96c['length'];_0x1aa338++)_0x1c1630['has'](_0x2fe96c[_0x1aa338]['pairId'])||0x0==_0x2fe96c[_0x1aa338]['distance']||(_0x2fe96c[_0x1aa338]['isIncorrect']=!0x0);return _0x2fe96c['filter'](_0x43e6c0=>!_0x43e6c0['isIncorrect']);}['_markMismatchedRemovedTags'](_0x309b3f){const _0x4b1a71=new Set();for(let _0x16d066=0x0;_0x16d066<_0x309b3f['length'];_0x16d066++){if(_0x4b1a71['has'](_0x309b3f[_0x16d066]['id'])&&_0x309b3f[_0x16d066]['isRemoved']&&(_0x309b3f[_0x16d066]['isIncorrect']=!0x0),_0x309b3f[_0x16d066]['isIncorrect'])continue;if(0x0==_0x309b3f[_0x16d066]['distance'])continue;if('elementStart'!=_0x309b3f[_0x16d066]['type'])continue;if(null==_0x309b3f[_0x16d066]['pairId'])continue;let _0x38ed8e=_0x16d066+0x1,_0x3f8df0=0x0;for(;_0x309b3f[_0x38ed8e]['id']!=_0x309b3f[_0x16d066]['pairId'];)'elementStart'==_0x309b3f[_0x38ed8e]['type']?_0x3f8df0++:'elementEnd'==_0x309b3f[_0x38ed8e]['type']&&_0x3f8df0--,_0x38ed8e++;if(0x0!=_0x3f8df0){if(_0x309b3f[_0x16d066]['isRemoved'])_0x309b3f[_0x16d066]['isIncorrect']=!0x0;else{for(;_0x38ed8e!=_0x16d066;)_0x309b3f[_0x38ed8e]['isRemoved']&&0x0!=_0x309b3f[_0x38ed8e]['distance']&&(_0x309b3f[_0x38ed8e]['isIncorrect']=!0x0,_0x4b1a71['add'](_0x309b3f[_0x38ed8e]['pairId'])),_0x38ed8e--;}}}return _0x309b3f['filter'](_0x4d2bc7=>!_0x4d2bc7['isIncorrect']);}['_removeUnsupportedChanges'](_0x5a1b00){const _0xaa0a14=this['editor']['model']['schema'];for(let _0x7da9ff=0x0;_0x7da9ff<_0x5a1b00['length'];_0x7da9ff++){if(!(_0x5a1b00[_0x7da9ff]['isAdded']||_0x5a1b00[_0x7da9ff]['isAddSuggestion']||_0x5a1b00[_0x7da9ff]['isRemoved']||_0x5a1b00[_0x7da9ff]['isRemoveSuggestion']))continue;if(0x0==_0x5a1b00[_0x7da9ff]['distance'])continue;const _0x1894cd=_0x5a1b00[_0x7da9ff]['item'];_0xaa0a14['isBlock'](_0x1894cd)||_0xaa0a14['isLimit'](_0x1894cd)||(_0x5a1b00[_0x7da9ff]['isAdded']&&delete _0x5a1b00[_0x7da9ff]['isAdded'],_0x5a1b00[_0x7da9ff]['isAddSuggestion']&&delete _0x5a1b00[_0x7da9ff]['isAddSuggestion'],_0x5a1b00[_0x7da9ff]['isRemoveSuggestion']&&delete _0x5a1b00[_0x7da9ff]['isRemoveSuggestion'],_0x5a1b00[_0x7da9ff]['isRemoved']&&(_0x5a1b00[_0x7da9ff]['isIncorrect']=!0x0));}return _0x5a1b00['filter'](_0x2b322a=>!_0x2b322a['isIncorrect']);}['_makeModelFromTape'](_0x4735d0,_0x380d33,_0x31d797){const _0x5129e9=new gt(),_0x2d5a8b=[],_0x1b6b26=new Map(),_0x34d27e=this['editor']['model'],_0x2893ee=_0x34d27e['schema'],_0x151368=[_0x5129e9],_0x5f3a4a={},_0x2b1b6f={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x18fbe9=null;const _0xbba077=[0x0];for(let _0x5a45da=0x0;_0x5a45da<_0x4735d0['length'];_0x5a45da++)if('elementStart'===_0x4735d0[_0x5a45da]['type']){_0x4735d0[_0x5a45da]['previousPosition']=_0x34d27e['createPositionFromPath'](_0x5129e9,_0xbba077);const _0xbb463f=new ut(_0x4735d0[_0x5a45da]['item']['name'],_0x4735d0[_0x5a45da]['item']['getAttributes']());_0x151368[0x0]['_appendChild'](_0xbb463f),_0xbba077['push'](0x0),_0x151368['unshift'](_0xbb463f),_0x4735d0[_0x5a45da]['nextPosition']=_0x34d27e['createPositionFromPath'](_0x5129e9,_0xbba077);}else'elementEnd'===_0x4735d0[_0x5a45da]['type']?(_0x151368['shift'](),_0x4735d0[_0x5a45da]['previousPosition']=_0x34d27e['createPositionFromPath'](_0x5129e9,_0xbba077),_0xbba077['pop'](),_0xbba077[_0xbba077['length']-0x1]++,_0x4735d0[_0x5a45da]['nextPosition']=_0x34d27e['createPositionFromPath'](_0x5129e9,_0xbba077)):(_0x4735d0[_0x5a45da]['previousPosition']=_0x34d27e['createPositionFromPath'](_0x5129e9,_0xbba077),_0x18fbe9?_0x18fbe9['_data']+=_0x4735d0[_0x5a45da]['item']['data']:_0x18fbe9=new wt(_0x4735d0[_0x5a45da]['item']['data'],_0x4735d0[_0x5a45da]['item']['getAttributes']()),_0x4735d0[_0x5a45da+0x1]&&'text'===_0x4735d0[_0x5a45da+0x1]['type']&&_0x539857(_0x18fbe9,_0x4735d0[_0x5a45da+0x1]['item'])||(_0x151368[0x0]['_appendChild'](_0x18fbe9),_0x18fbe9=null),_0xbba077[_0xbba077['length']-0x1]+=_0x4735d0[_0x5a45da]['item']['offsetSize'],_0x4735d0[_0x5a45da]['nextPosition']=_0x34d27e['createPositionFromPath'](_0x5129e9,_0xbba077));for(let _0xb1fcda=0x0;_0xb1fcda<_0x4735d0['length'];_0xb1fcda++){const _0x5b10b0=_0x4735d0[_0xb1fcda]['previousPosition'],_0x5ecf89=_0x4735d0[_0xb1fcda]['nextPosition'];for(const _0x201a12 of _0x4735d0[_0xb1fcda]['markersStart'])_0x1b6b26['set'](_0x201a12,{'start':_0x5b10b0,'end':null});_0x50c083('isRemoveSuggestion',_0xb1fcda,_0x5b10b0,_0x5ecf89),_0x50c083('isAddSuggestion',_0xb1fcda,_0x5b10b0,_0x5ecf89),_0x50c083('isRemoved',_0xb1fcda,_0x5b10b0,_0x5ecf89),_0x50c083('isAdded',_0xb1fcda,_0x5b10b0,_0x5ecf89);for(const _0x2cb018 of _0x4735d0[_0xb1fcda]['markersEnd']){_0x1b6b26['get'](_0x2cb018)['end']=_0x5ecf89;}}for(const [_0x26e7bd,_0x466f14]of _0x1b6b26){const _0x4bc1e7=this['editor']['model']['createRange'](_0x466f14['start'],_0x466f14['end']);_0x5129e9['markers']['set'](_0x26e7bd,_0x4bc1e7);}return _0x2d5a8b['sort']((_0x2716f6,_0x6c117a)=>{const _0x42e580=_0x5129e9['markers']['get']('revision:'+_0x2716f6['id']),_0x2d71ac=_0x5129e9['markers']['get']('revision:'+_0x6c117a['id']);return _0x42e580['start']['isBefore'](_0x2d71ac['start'])?-0x1:_0x42e580['start']['isAfter'](_0x2d71ac['start'])?0x1:_0x42e580['end']['isBefore'](_0x2d71ac['end'])?-0x1:_0x42e580['end']['isAfter'](_0x2d71ac['end'])?0x1:'add'===_0x2716f6['type']?-0x1:0x1;}),{'root':_0x5129e9,'changes':_0x2d5a8b};function _0x50c083(_0x84075,_0x337ea8,_0x455d60,_0x1d2c97){const _0x5763c7=!!_0x4735d0[_0x337ea8][_0x84075],_0xb5988c=_0x5763c7?_0x4735d0[_0x337ea8][_0x84075]['userId']:null,_0x1c8f99=_0x337ea8===_0x4735d0['length']-0x1,_0x4f644b=_0x2b1b6f[_0x84075][0x0],_0x46a1b5=_0x2893ee['isObject'](_0x4735d0[_0x337ea8]['item']);!_0x5f3a4a[_0x84075]&&_0x5763c7?_0x5f3a4a[_0x84075]={'start':_0x455d60,'tapeItem':_0x4735d0[_0x337ea8],'userId':_0xb5988c,'type':_0x84075}:_0x5f3a4a[_0x84075]&&!_0x5763c7?(_0x5f3a4a[_0x84075]['end']=_0x455d60,_0xe5b3(_0x5f3a4a[_0x84075]),_0x5f3a4a[_0x84075]=null):_0x5f3a4a[_0x84075]&&_0x5763c7&&_0x5f3a4a[_0x84075]['userId']!==_0xb5988c&&(_0x5f3a4a[_0x84075]['end']=_0x455d60,_0x4f644b&&_0x4f644b['userId']===_0x5f3a4a[_0x84075]['userId']||_0xe5b3(_0x5f3a4a[_0x84075]),_0x5f3a4a[_0x84075]={'start':_0x455d60,'tapeItem':_0x4735d0[_0x337ea8],'userId':_0xb5988c,'type':_0x84075}),_0x5f3a4a[_0x84075]&&_0x46a1b5&&('elementStart'!==_0x4735d0[_0x337ea8]['type']||_0x4f644b&&_0x4f644b['userId']===_0xb5988c||_0x2b1b6f[_0x84075]['unshift']({'userId':_0xb5988c,'object':_0x4735d0[_0x337ea8]['item'],'change':_0x5f3a4a[_0x84075]}),'elementEnd'===_0x4735d0[_0x337ea8]['type']&&_0x4f644b&&_0x4f644b['object']===_0x4735d0[_0x337ea8]['item']&&(_0x2b1b6f[_0x84075]['shift'](),_0x5f3a4a[_0x84075]=_0x4f644b['change'])),_0x5f3a4a[_0x84075]&&_0x1c8f99&&(_0x5f3a4a[_0x84075]['end']=_0x1d2c97,_0xe5b3(_0x5f3a4a[_0x84075]),_0x5f3a4a[_0x84075]=null);}function _0xe5b3({start:_0x51d97f,end:_0x339eda,tapeItem:_0x2e1d32,userId:_0x21ad92,type:_0x205975}){const _0x3092f3=_0x2e1d32['item'],_0x10caeb=_0x34d27e['schema']['isBlock'](_0x3092f3)&&!_0x34d27e['schema']['isLimit'](_0x3092f3),_0x1f20c4=_0x51d97f['nodeAfter']==_0x339eda['parent']&&_0x339eda['isAtStart'];if(_0x10caeb&&_0x1f20c4)return;const _0x494b0a=_0x34d27e['createRange'](_0x51d97f,_0x339eda),_0x941b38=_0x380d33['get'](_0x21ad92),_0x5ccc51=new r({'author':_0x941b38,'type':'isAdded'==_0x205975||'isAddSuggestion'==_0x205975?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x205975||'isRemoveSuggestion'==_0x205975},'createdAt':new Date(),'rootName':_0x31d797});_0x2d5a8b['push'](_0x5ccc51),_0x5129e9['markers']['set']('revision:'+_0x5ccc51['id'],_0x494b0a);}function _0x539857(_0x191cd3,_0x4af22d){const _0xfe8741=_0x191cd3['getAttributes'](),_0x18d69f=_0x4af22d['getAttributes']();for(const _0x4ae91a of _0xfe8741){if(_0x4ae91a[0x1]!==_0x4af22d['getAttribute'](_0x4ae91a[0x0]))return!0x1;_0x18d69f['next']();}return _0x18d69f['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x84a9e8=>{const _0x47772c=_0x84a9e8['markerName']['split'](':')[0x1],_0x1f6902=this['_getChangeFromId'](_0x47772c);if(!_0x1f6902)return null;const _0x5e18cb='add'==_0x1f6902['type']?'insertion':'deletion',_0x51a279=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5e18cb];return _0x1f6902['data']['isSuggestion']&&_0x51a279['push']('ck-suggestion-marker-'+_0x5e18cb+'-new'),this['activeChange']==_0x1f6902&&_0x51a279['push']('ck-suggestion-marker--active'),{'classes':_0x51a279,'attributes':{'data-change-id':_0x47772c}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3c17b7=>{_0x3c17b7['on']('element:pre',(_0x3b9ece,_0x3c91ed,_0x5c8169)=>{const _0x60d9cf=_0x3c91ed['viewItem']['getChild'](0x0);if(!_0x60d9cf||!_0x60d9cf['is']('element','code'))return;if(!_0x5c8169['consumable']['consume'](_0x60d9cf,{'attributes':['vid_start','vid_end']}))return;const _0x15708d=_0x3c91ed['modelRange']['start']['nodeAfter'];_0x5c8169['writer']['setAttribute']('vid_start',_0x60d9cf['getAttribute']('vid_start'),_0x15708d),_0x5c8169['writer']['setAttribute']('vid_end',_0x60d9cf['getAttribute']('vid_end'),_0x15708d);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x59a46e=>{_0x59a46e['on']('element',(_0x39fe6d,_0x507637,_0x1a4358)=>{if(!_0x1a4358['consumable']['consume'](_0x507637['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x507637['modelRange']['isCollapsed'])return;const _0x449c2e=_0x507637['modelRange']['start']['nodeAfter'];_0x449c2e['hasAttribute']('vid_start')||_0x449c2e['hasAttribute']('vid')||(_0x1a4358['writer']['setAttribute']('vid_start',_0x507637['viewItem']['getAttribute']('vid_start'),_0x449c2e),_0x1a4358['writer']['setAttribute']('vid_end',_0x507637['viewItem']['getAttribute']('vid_end'),_0x449c2e));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xe44636=>_0xe44636['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x7d2af8,[,_0x4d5015])=>{['vid_start','vid_end','vid']['includes'](_0x4d5015)&&(_0x7d2af8['return']=!0x0,_0x7d2af8['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x93eb25=>{_0x93eb25['on']('attribute:vid',(_0xba7343,_0x163edc,_0x1055b1)=>{if('\x20'!=_0x163edc['item']['data']||_0x163edc['item']['parent']['maxOffset']>0x1)return;if(!_0x1055b1['consumable']['consume'](_0x163edc['item'],_0xba7343['name']))return;const _0x5999ca=_0x1055b1['writer'],_0x34b5b6=_0x1055b1['mapper']['toViewRange'](_0x163edc['range']);_0x5999ca['wrap'](_0x34b5b6,_0x5999ca['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x93c68d){const _0x52fd=_0x93c68d['plugins']['get']('RevisionViewer');return(_0x57be7a,_0x354148,_0x240165)=>{const _0x41cd39=_0x354148['markerName']['split'](':')[0x1],_0x317718=_0x52fd['_getChangeFromId'](_0x41cd39);if(!_0x317718)return null;const _0x51d71a='add'==_0x317718['type']?'split':'merge';if(!_0x240165['consumable']['test'](_0x354148['markerRange'],_0x57be7a['name']))return;const _0xecb12e=_0x354148['markerRange']['getWalker'](),_0x248714=_0x354148['markerRange']['start'],_0x2ae284=_0x93c68d['model']['schema'];let _0x1c7d4c=null,_0x1b2587=null,_0x580f29=!0x1,_0x3a74c0=!0x1;for(const _0x175e5c of _0xecb12e){const _0x39fec8=_0x175e5c['item'];_0x580f29=_0x580f29||_0x2ae284['isContent'](_0x39fec8);const _0x1d089b=_0x240165['mapper']['toViewElement'](_0x39fec8);if(_0x1d089b&&_0x1d089b['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x175e5c['type']&&(_0x2ae284['isBlock'](_0x39fec8)&&!_0x2ae284['isLimit'](_0x39fec8)&&(_0x39fec8['nextSibling']||_0x248714['isAtEnd']?_0x1c7d4c&&_0x1c7d4c['parent']==_0x39fec8||(_0x1c7d4c=_0x39fec8,_0x228e1c(_0x175e5c['previousPosition']),_0x3a74c0=!0x0):_0x1b2587=_0x1b2587||_0x175e5c['previousPosition']));}function _0x228e1c(_0x299dbe){const _0xb0727=_0x240165['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x51d71a}),_0x78c524=_0x240165['mapper']['toViewPosition'](_0x299dbe);_0x317718['data']['isSuggestion']&&_0x240165['writer']['addClass']('ck-suggestion-marker-'+_0x51d71a+'-new',_0xb0727),_0x52fd['activeChange']==_0x317718&&_0x240165['writer']['addClass']('ck-suggestion-marker--active',_0xb0727),_0x240165['writer']['insert'](_0x78c524,_0xb0727),_0x240165['mapper']['bindElementToMarker'](_0xb0727,_0x354148['markerName']);}_0x580f29||_0x3a74c0||!_0x1b2587||_0x228e1c(_0x1b2587);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xc3c362,_0x254f4b,_0x298abb)=>{const _0x335aa6=_0x298abb['mapper']['markerNameToElements'](_0x254f4b['markerName']);if(_0x335aa6){for(const _0x4848cc of _0x335aa6)(_0x4848cc['hasClass']('ck-suggestion-marker-split')||_0x4848cc['hasClass']('ck-suggestion-marker-merge'))&&(_0x298abb['mapper']['unbindElementFromMarkerName'](_0x4848cc,_0x254f4b['markerName']),_0x298abb['writer']['remove'](_0x4848cc));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x2e51a8,_0x10c66a,_0x433e55)=>{const _0x368d2a=_0x10c66a['markerName']['split'](':')[0x1],_0x55c0fe=this['_getChangeFromId'](_0x368d2a);if(!_0x55c0fe)return null;const _0x2fb373='add'==_0x55c0fe['type']?'split':'merge';if(_0x433e55['consumable']['test'](_0x10c66a['markerRange'],_0x2e51a8['name']))for(const _0x56cfaf of _0x10c66a['markerRange']['getItems']()){if(!_0x56cfaf['is']('element','softBreak'))continue;const _0x2ee19e=_0x433e55['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2fb373}),_0x1f8807=_0x433e55['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x56cfaf));_0x55c0fe['data']['isSuggestion']&&_0x433e55['writer']['addClass']('ck-suggestion-marker-'+_0x2fb373+'-new',_0x2ee19e),this['activeChange']==_0x55c0fe&&_0x433e55['writer']['addClass']('ck-suggestion-marker--active',_0x2ee19e),_0x433e55['writer']['insert'](_0x1f8807,_0x2ee19e),_0x433e55['mapper']['bindElementToMarker'](_0x2ee19e,_0x10c66a['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x19ffb5=>{for(const _0x2ddeac of this['editor']['model']['document']['getRootNames']()){const _0x67d40a=this['editor']['model']['document']['getRoot'](_0x2ddeac),_0x379bac=this['editor']['editing']['view']['document']['getRoot'](_0x2ddeac);if(_0x379bac){const _0x2ff5b9=_0x67d40a['getAttribute']('revisionHistoryAttachChange');if(_0x19ffb5['removeAttribute']('data-change-id',_0x379bac),_0x19ffb5['removeClass']('ck-revision-history-root-add',_0x379bac),_0x19ffb5['removeClass']('ck-revision-history-root-remove',_0x379bac),_0x19ffb5['removeClass']('ck-revision-history-root--active',_0x379bac),_0x2ff5b9){const _0x5cf2c8=this['_getChangeFromId'](_0x2ff5b9);if(!_0x5cf2c8)return null;_0x19ffb5['setAttribute']('data-change-id',_0x2ff5b9,_0x379bac),_0x19ffb5['addClass']('ck-revision-history-root-'+_0x5cf2c8['type'],_0x379bac),this['activeChange']==_0x5cf2c8&&_0x19ffb5['addClass']('ck-revision-history-root--active',_0x379bac);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x42e226=>'revision-comment:'+_0x42e226,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x52b887=>'revision-suggestion:'+_0x52b887,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x47cfd6=>({'name':'suggestion:'+_0x47cfd6,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4f9503=>{const _0x2fb17f=_0x4f9503['markerName']['split'](':')[0x1];return'insertion'!=_0x2fb17f&&'deletion'!=_0x2fb17f?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2fb17f]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2040cc,_0x790ef4,_0x1eb0f8)=>{const _0x5a8220=_0x1eb0f8['mapper']['markerNameToElements'](_0x790ef4['markerName']);if(_0x5a8220){for(const _0x42e941 of _0x5a8220)_0x42e941['is']('uiElement')&&(_0x1eb0f8['mapper']['unbindElementFromMarkerName'](_0x42e941,_0x790ef4['markerName']),_0x1eb0f8['writer']['remove'](_0x42e941));}},{'priority':'high'});}['_getChangeFromId'](_0x4d9c82){return this['_changeIdToChange']['get'](_0x4d9c82);}['_getViewForChange'](_0x528f2a){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x528f2a),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x346acc,_0x3457da,_0xc2124f,_0x3c8c4a)=>{_0x3c8c4a&&this['_balloon']['remove'](_0x3c8c4a),_0xc2124f&&(this['_balloon']['add']({'view':_0xc2124f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0xec52c1=this['editor']['editing'],_0x48f145=this['_getChangeFromId'](_0xc2124f['changeId']);let _0x11a2a1;if(_0x48f145['data']['isOnRoot']){const _0x1b99ae=_0xec52c1['view']['getDomRoot'](_0x48f145['rootName']);_0x11a2a1=Array['from'](_0x1b99ae['getClientRects']());}else{const _0x5f49d9=this['editor']['model']['markers']['get']('revision:'+_0xc2124f['changeId']);_0x11a2a1=Array['from'](_0xec52c1['mapper']['markerNameToElements'](_0x5f49d9['name']))['map'](_0x40baab=>_0xec52c1['view']['domConverter']['mapViewToDom'](_0x40baab))['map'](_0x1df66f=>Array['from'](_0x1df66f['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x11a2a1[0x0];return _0x11a2a1['find'](_0x4dc1d6=>_0x4dc1d6['top']-0x3<=this['_activeViewTarget']['y']&&_0x4dc1d6['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4dc1d6['left']-0x3<=this['_activeViewTarget']['x']&&_0x4dc1d6['right']+0x3>=this['_activeViewTarget']['x'])||_0x11a2a1[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3b1ae8,_0x24849a,_0x2679d6,_0x19443d)=>{this['activeView']=_0x2679d6?this['_getViewForChange'](_0x2679d6):null,this['editor']['model']['change'](()=>{const _0x1564ff=this['editor']['editing'];_0x19443d&&(_0x19443d['data']['isOnRoot']?_0x1564ff['view']['change'](_0x424f2a=>{_0x424f2a['removeClass']('ck-revision-history-root--active',_0x1564ff['view']['document']['getRoot'](_0x19443d['rootName']));}):_0x1564ff['reconvertMarker']('revision:'+_0x19443d['id'])),_0x2679d6&&(_0x2679d6['data']['isOnRoot']?_0x1564ff['view']['change'](_0x2ba970=>{_0x2ba970['addClass']('ck-revision-history-root--active',_0x1564ff['view']['document']['getRoot'](_0x2679d6['rootName']));}):_0x1564ff['reconvertMarker']('revision:'+_0x2679d6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1ae0f8,_0x45922b)=>{if(this['activeChange'])return;const _0x13ca09=this['_findChangeIdFromDomTarget'](_0x45922b['target']),_0x590677=this['_changeIdToChange']['get'](_0x13ca09);_0x590677?(this['_activeViewTarget']={'x':_0x45922b['domEvent']['x'],'y':_0x45922b['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x590677)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4d78a1,_0x516784)=>{const _0x1c51b0=this['_findChangeIdFromDomTarget'](_0x516784['target']),_0x458131=this['_changeIdToChange']['get'](_0x1c51b0);_0x458131?(this['_activeViewTarget']={'x':_0x516784['domEvent']['x'],'y':_0x516784['domEvent']['y']},_0x458131===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x458131):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3deacd){do{const _0x2f2e47=_0x3deacd['getAttribute']('data-change-id');if(_0x2f2e47)return _0x2f2e47;_0x3deacd=_0x3deacd['parent'];}while(_0x3deacd);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x4be46d=>{for(const _0x4bf2f8 of this['editor']['model']['markers'])_0x4be46d['removeMarker'](_0x4bf2f8);});}}function Z(_0xb8b94e,_0xbc54e5){return(_0x4d4fd8,_0x16b6d3,_0x44ed50)=>{if(!_0x44ed50['consumable']['test'](_0x16b6d3['markerRange'],_0x4d4fd8['name']))return;const _0x22e6cb=_0x16b6d3['markerRange']['getWalker'](),_0x1d2602=_0x16b6d3['markerRange']['start'],_0x10b6d6=_0xb8b94e['model']['schema'];let _0x2caefb=null,_0x2b47d9=null,_0x340136=!0x1,_0x213bcc=!0x1;for(const _0x41505d of _0x22e6cb){const _0x44f4fe=_0x41505d['item'];_0x340136=_0x340136||_0x10b6d6['isContent'](_0x44f4fe);const _0x1b1b07=_0x44ed50['mapper']['toViewElement'](_0x44f4fe);if(_0x1b1b07&&_0x1b1b07['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x41505d['type']&&(_0x10b6d6['isBlock'](_0x44f4fe)&&!_0x10b6d6['isLimit'](_0x44f4fe)&&(_0x44f4fe['nextSibling']||_0x1d2602['isAtEnd']?_0x2caefb&&_0x2caefb['parent']==_0x44f4fe||(_0x2caefb=_0x44f4fe,_0x36d21e(_0x41505d['previousPosition']),_0x213bcc=!0x0):_0x2b47d9=_0x2b47d9||_0x41505d['previousPosition']));}function _0x36d21e(_0x4bca85){const _0x34c865=_0x44ed50['mapper']['toViewPosition'](_0x4bca85),_0x3d0d81=_0x44ed50['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xbc54e5});_0x44ed50['writer']['insert'](_0x34c865,_0x3d0d81),_0x44ed50['mapper']['bindElementToMarker'](_0x3d0d81,_0x16b6d3['markerName']);}_0x340136||_0x213bcc||!_0x2b47d9||_0x36d21e(_0x2b47d9);};}class _t extends _0x573d0a{constructor(_0x526256){super(_0x526256);const _0x45aaf7=_0x526256['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x45aaf7,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x45aaf7,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4eff0c=this['editor'],_0x3e1507=_0x4eff0c['plugins']['get'](d),_0x5d880f=_0x3e1507['isReady']?_0x3e1507['diff']['newRevisionId']:null;_0x4eff0c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5d880f);}['refresh'](){const {isReady:_0x4ec7f4,isEnabled:_0x155053,repository:_0x16057a,diff:_0x19ae91}=this['editor']['plugins']['get'](d),_0x2ca9eb=_0x19ae91&&_0x16057a['getLaterVisibleRevision'](_0x19ae91['newRevisionId']);this['isEnabled']=_0x4ec7f4&&_0x155053&&Boolean(_0x2ca9eb);}}class yt extends _0x573d0a{['_step'];constructor(_0x2356e4,{direction:_0x318211}){super(_0x2356e4);const _0xbd63e8=_0x2356e4['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x318211?0x1:-0x1,this['listenTo'](_0xbd63e8,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xbd63e8,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xbd63e8,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x36adb4=this['editor'],_0x2c802c=_0x36adb4['plugins']['get'](d),{isNavigationMode:_0xc0dafd,currentChangeNumber:_0x491111}=_0x2c802c;let _0x4a271d;if(_0x2c802c['activeChange']=_0xc0dafd?_0x2c802c['diff']['changes']['get'](_0x491111+this['_step']):_0x2c802c['diff']['changes']['first'],_0x2c802c['activeChange']['data']['isOnRoot'])_0x4a271d=_0x36adb4['editing']['view']['getDomRoot'](_0x2c802c['activeChange']['rootName']);else{const _0x44c0db=_0x36adb4['model']['markers']['get']('revision:'+_0x2c802c['activeChange']['id']);_0x4a271d=_0x1f8be4(_0x36adb4['editing'],_0x44c0db);}_0x38eeba({'target':_0x4a271d,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x58d7c0,currentChangeNumber:_0x1e2e4b,numberOfChanges:_0x15443f,isReady:_0xf9131b,isEnabled:_0x27aa4c}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x27aa4c&&_0xf9131b&&_0x15443f)&&(!_0x58d7c0||(0x1===this['_step']?_0x1e2e4b<_0x15443f-0x1:_0x1e2e4b>0x0));}}class li extends _0x525a1d{constructor(_0x18ce05){super(_0x18ce05);const _0xba596=this['bindTemplate'],_0x4561ae=new _0x278200(_0x18ce05),_0xe6f656=new _0x278200(_0x18ce05);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',(_0x130b42,_0x5ad731)=>_0x130b42&&_0x5ad731>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1bea49,_0x32bf2c,_0x2d477,_0x21cbc2)=>{if(!_0x1bea49)return m(_0x18ce05,'Loading...');if(!_0x2d477)return m(_0x18ce05,'No\x20changes');const _0x48ae5e=m(_0x18ce05,'NUMBER_OF_CHANGES',_0x2d477);return _0x21cbc2?m(_0x18ce05,'X_OF_Y_CHANGES',[_0x32bf2c+0x1,_0x2d477]):_0x48ae5e;}),_0x4561ae['set']({'label':m(_0x18ce05,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0xaa3d7}),_0xe6f656['set']({'label':m(_0x18ce05,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2feeab}),_0x4561ae['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0xe6f656['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4561ae['on']('execute',()=>this['fire']('execute','backward')),_0xe6f656['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',_0xba596['if']('_isStatusLabelVisible','ck-hidden',_0x5a47e0=>!_0x5a47e0)]},'children':[{'text':_0xba596['to']('isNavigationMode',_0x2c04e3=>_0x2c04e3?m(_0x18ce05,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x18ce05,'Total')+':\x20')}]},{'text':_0xba596['to']('_statusText')}]},new _0x5c64c1(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4561ae,_0xe6f656]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x26f450{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x153323=this['editor']['editing']['view'];_0x153323['change'](_0x5cbf43=>{for(const _0x2da05b of _0x153323['document']['roots'])_0x5cbf43['addClass'](ce,_0x2da05b);});}['hide'](){const _0x4ed26f=this['editor']['editing']['view'];_0x4ed26f['change'](_0x25d5ee=>{for(const _0x2475ca of _0x4ed26f['document']['roots'])_0x25d5ee['removeClass'](ce,_0x2475ca);});}}class w extends _0x26f450{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x4c22e8=this['editor'],_0x13918c=_0x4c22e8['plugins']['get'](d),_0x21b4e3=_0x4c22e8['plugins']['get'](le);_0x4c22e8['ui']['componentFactory']['add']('exitToEditing',_0x31879f=>{const _0x2233db=new _0x278200(_0x31879f);return _0x2233db['set']({'label':m(_0x31879f,'Back\x20to\x20editing'),'icon':_0x6af520,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2233db,'execute',()=>{_0x4c22e8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2233db;}),_0x4c22e8['ui']['componentFactory']['add']('restoreRevision',_0x5637d7=>{const _0x5b97db=new _0x278200(_0x5637d7);return _0x5b97db['set']({'label':m(_0x5637d7,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5b97db['bind']('isEnabled')['to'](_0x4c22e8['commands']['get']('restoreRevision')),this['listenTo'](_0x5b97db,'execute',()=>_0x4c22e8['execute']('restoreRevision')),_0x5b97db;}),_0x4c22e8['ui']['componentFactory']['add']('changesNavigation',_0x426e8b=>{const _0x120852=new li(_0x426e8b),_0x1d43e2=_0x4c22e8['commands']['get']('showPreviousChange'),_0x2a68a3=_0x4c22e8['commands']['get']('showNextChange');return _0x120852['bind']('isBackwardNavigationEnabled')['to'](_0x1d43e2,'isEnabled'),_0x120852['bind']('isForwardNavigationEnabled')['to'](_0x2a68a3,'isEnabled'),_0x120852['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x13918c),this['listenTo'](_0x120852,'execute',(_0x29efab,_0x3997e7)=>{_0x4c22e8['execute']('forward'===_0x3997e7?'showNextChange':'showPreviousChange');}),_0x120852;}),_0x21b4e3['show'](),_0x13918c['on']('change:isReady',(_0x14b0a6,_0x4e6f79,_0x23a514)=>{_0x23a514?_0x21b4e3['hide']():_0x21b4e3['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x445a0f,_0x29e19d){super(_0x445a0f,_0x29e19d);const _0x247557=this['bindTemplate'];this['set']({'label':m(_0x445a0f,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x445a0f,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x247557['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x2c49cf=this['fieldView']['element'];this['_tooltipString']=_0x2c49cf['scrollWidth']>_0x2c49cf['clientWidth']&&_0x2c49cf['value']||'';}}class oi extends _0x525a1d{constructor(_0x218221,_0x44c125,_0x1f82ea){super(_0x218221);const _0x496785=new _0x35b78b();_0x496785['set']({'content':_0x944b2,'viewBox':'0\x200\x2011\x2010'});const _0x6b8484=['ck','ck-revision-history-sidebar__revision-author'];_0x1f82ea&&_0x6b8484['push']('ck-revision-history-sidebar__revision-author_creator');const _0x185bb5=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x218221,_0x1f82ea?'Revision\x20creator':'Revision\x20author')},'children':[_0x496785,_0x44c125['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x6b8484},'children':_0x185bb5});}}function ni(_0x329f00,_0x2a1e47){const _0x1c4a1f=_0x329f00['bindTemplate'],_0x75fc30=_0x329f00['locale'],_0x6e5cd6=_0x290b2b(_0x75fc30);_0x6e5cd6['panelPosition']='sw';const _0x1fb774=function(_0x3ec983,_0x133fb8){const _0x3b52f3=function(_0x44a4fc,_0x527c27){const _0x2053de=_0x44a4fc['locale'],_0x46062a={'Compare\x20against\x20selected':m(_0x2053de,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x2053de,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x2053de,'Restore\x20this\x20revision')};return _0x527c27['map'](_0x5d3517=>{const _0x2e65ad=_0x46062a[_0x5d3517['name']];return _0x2e65ad&&_0x2e65ad!==_0x5d3517['name']&&(_0x5d3517['name']=_0x2e65ad),_0x5d3517;});}(_0x3ec983,_0x133fb8),_0x112100=new _0xc0b39c();for(const _0x2ee5c7 of _0x3b52f3){const _0x5794f4={'type':'button','model':new to({'label':_0x2ee5c7['name'],'class':_0x2ee5c7['class'],'withText':!0x0,'role':'menuitem','_action':_0x2ee5c7['action']})};_0x5794f4['model']['bind']('isEnabled')['to'](_0x3ec983,'isActionsDropdownOpen',_0x5999e4=>'function'!=typeof _0x2ee5c7['isEnabled']||(!_0x5999e4||_0x2ee5c7['isEnabled'](_0x3ec983))),_0x112100['add'](_0x5794f4);}return _0x112100;}(_0x329f00,_0x2a1e47);return _0x329f00['bind']('isActionsDropdownOpen')['to'](_0x6e5cd6,'isOpen'),_0x6e5cd6['buttonView']['set']({'label':m(_0x75fc30,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x19a42a}),_0x6e5cd6['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1c4a1f['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1c4a1f['to'](_0x2d4534=>_0x2d4534['stopPropagation']())}}),_0x6e5cd6['on']('execute',_0x20aef7=>{_0x329f00['isReady']&&'function'==typeof _0x20aef7['source']['_action']&&_0x20aef7['source']['_action'](_0x329f00);}),_0x19a37f(_0x6e5cd6,_0x1fb774,{'role':'menu'}),_0x6e5cd6['listenTo'](_0x329f00,'change:isActionsDropdownOpen',(_0x586dc5,_0x48b00a,_0x215e1b)=>{if(_0x215e1b)for(const _0x1df0c1 of _0x6e5cd6['listView']['items']){const _0x3a95ec=_0x1df0c1['children']['first'],_0x240e79=_0x2a1e47['find'](_0x4b7ee7=>_0x4b7ee7['action']===_0x3a95ec['_action'])['isVisible'];_0x1df0c1['isVisible']=void 0x0===_0x240e79||_0x240e79(_0x329f00);}}),_0x6e5cd6;}class ai extends/* #__PURE__ -- @preserve */
26
+ _0x3bf4fb(_0x525a1d){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x44dedd,_0x1da2d9,_0x2e3c52,_0x2c1746){super(_0x44dedd);const _0xe5803f=this['bindTemplate'],_0x1003ae=function(_0x1d77aa,_0x2fdad2){const _0x32ce6a=Array['from'](_0x2fdad2['authors'])['filter'](_0x36fb26=>_0x36fb26!=_0x2fdad2['creator']);return _0x2fdad2['creator']&&_0x32ce6a['unshift'](_0x2fdad2['creator']),_0x32ce6a['map'](_0x507e72=>new oi(_0x1d77aa,_0x507e72,_0x507e72==_0x2fdad2['creator']));}(_0x44dedd,_0x1da2d9);this['id']=_0x1da2d9['id'],this['_revision']=_0x1da2d9,this['_requireRevisionName']=_0x2c1746,this['bind']('name','createdAt')['to'](_0x1da2d9),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x50ef84=>{return _0x5c27c2=_0x44dedd['uiLanguage'],(_0x546fb7=_0x50ef84)['toLocaleDateString'](_0x5c27c2,{'month':'long','day':'numeric'})+',\x20'+_0x546fb7['toLocaleTimeString'](_0x5c27c2,{'hour':'numeric','minute':'numeric'});var _0x5c27c2,_0x546fb7;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0x44dedd,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x1648b7=>_0x1648b7||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5cad51,_0x3fb70a)=>_0x5cad51&&_0x3fb70a),this['revisionActionsView']=_0x2e3c52&&_0x2e3c52['length']?ni(this,_0x2e3c52):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xe5803f['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xe5803f['if']('isEnabled','ck-disabled',_0x5b7054=>!_0x5b7054),_0xe5803f['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xe5803f['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xe5803f['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':_0xe5803f['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':_0x1003ae}]},this['revisionActionsView']],'on':{'click':_0xe5803f['to'](_0xe314b7=>{_0xe314b7['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x282eb4=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x282eb4,'change',()=>{this['_requireRevisionName']&&!_0x282eb4['value']||this['fire']('setName',{'id':this['id'],'name':_0x282eb4['value']}),_0x282eb4['value']||(_0x282eb4['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function mi(_0x3e79e6,_0x373fb4){const _0x1f84f4=_0x920f1c['fromJSDate'](_0x3e79e6)['setLocale'](_0x373fb4),_0x7feb1e=_0x920f1c['local'](),_0x361e8b=_0x7feb1e['minus']({'days':0x1})['startOf']('day');let _0x1d50e4,_0x5643e5;return _0x1f84f4['hasSame'](_0x7feb1e,'day')?(_0x1d50e4=_0x1f84f4['startOf']('day')['toJSDate'](),_0x5643e5=_0x1f84f4['toRelativeCalendar']()):_0x1f84f4['hasSame'](_0x361e8b,'day')?(_0x1d50e4=_0x361e8b['toJSDate'](),_0x5643e5=_0x1f84f4['toRelativeCalendar']()):_0x1f84f4['hasSame'](_0x7feb1e,'week')?(_0x1d50e4=_0x1f84f4['startOf']('week')['toJSDate'](),_0x5643e5=_0x1f84f4['weekdayLong']||''):_0x1f84f4['hasSame'](_0x7feb1e,'year')?(_0x1d50e4=_0x1f84f4['startOf']('month')['toJSDate'](),_0x5643e5=_0x1f84f4['monthLong']||''):(_0x1d50e4=_0x1f84f4['startOf']('year')['toJSDate'](),_0x5643e5=String(_0x1f84f4['year'])),{'startDate':_0x1d50e4,'localizedPeriodName':_0x5643e5};}class _i extends _0x525a1d{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x14847a,_0x276431,_0x32a9a0,_0x16e8f4){super(_0x14847a);const _0x10a1dc=mi(_0x276431,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x276431,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x32a9a0,this['_requireRevisionName']=_0x16e8f4,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':_0x10a1dc}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x5a40b0){const _0x399f15=new ai(this['locale'],_0x5a40b0,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x399f15);}['removeRevision'](_0x409372){const _0x5d7cc7=this['revisionViews']['find'](_0xd003a8=>_0xd003a8['id']===_0x409372['id']);this['revisionViews']['remove'](_0x5d7cc7);}}class as extends _0x525a1d{constructor(_0x28d327){super(_0x28d327);const _0x310ff4=new _0x35b78b();_0x310ff4['content']=_0x5ce4fd,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x310ff4,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x28d327,'Revision\x20history')]}]});}}class vi extends _0x525a1d{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0xc8dd20,_0x2d0c14,_0x4056ac,_0x2c62d0){super(_0xc8dd20);const _0xf2bfe8=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x2d0c14,this['_revisionActions']=_0x4056ac,this['_requireRevisionName']=_0x2c62d0,this['on']('select',(_0xb0f62a,_0xf8790e)=>{this['fire']('revisionSelected',_0xf8790e);}),this['on']('setName',(_0x34560e,_0x405623)=>{this['fire']('revisionSetName',_0x405623);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0xc8dd20),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0xf2bfe8['if']('isEnabled','ck-disabled',_0x40e7a5=>!_0x40e7a5)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x799a61 of this['_revisions'])this['_addRevision'](_0x799a61);this['_revisions']['on']('add',(_0x45fe06,_0x256f50)=>{this['_addRevision'](_0x256f50);}),this['_revisions']['on']('remove',(_0x3e37f4,_0x34cf58)=>{this['_removeRevision'](_0x34cf58);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x5b57aa=>_0x5b57aa['revisionViews']['map'](_0xa9802d=>_0xa9802d))['flat']();}['selectRevision'](_0x5d1e87){for(const _0x36d0d7 of this['revisionViews'])_0x5d1e87&&_0x5d1e87['id']===_0x36d0d7['id']?_0x36d0d7['select']():_0x36d0d7['deselect']();}['highlightRevisions'](_0x5e13ee){for(const _0x748a50 of this['revisionViews'])_0x5e13ee['some'](({id:_0x5035af})=>_0x5035af===_0x748a50['id'])?_0x748a50['highlight']():_0x748a50['unhighlight']();}['_addRevision'](_0x3317e4){const _0x2213e8=mi(_0x3317e4['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x4c757d=this['timePeriodViews']['get'](0x0);_0x4c757d&&_0x4c757d['startDate']['getTime']()===_0x2213e8['getTime']()||(_0x4c757d=new _i(this['locale'],_0x2213e8,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x4c757d)),_0x4c757d['addRevision'](_0x3317e4);}['_removeRevision'](_0xa80ca6){const _0x5980c8=mi(_0xa80ca6['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x5980c8)['removeRevision'](_0xa80ca6);}['_getTimePeriodViewByStartDate'](_0x39f4aa){return this['timePeriodViews']['find'](_0xeea4e1=>_0xeea4e1['startDate']['getTime']()===_0x39f4aa['getTime']());}}class g extends _0x26f450{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
27
27
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
28
- bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x20ee79){super(_0x20ee79),this['_revisionViewer']=_0x20ee79['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2ba7c4=this['_revisionsRepository']['_revisions'],_0x33b1d9=this['_createRevisionActions'](),_0x255dea=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x2ba7c4,_0x33b1d9,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',(_0x229352,_0x53042d)=>{_0x53042d['revisionViews']['on']('add',(_0x39ecf0,_0x4ebf89)=>{_0x4ebf89['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)),_0x255dea['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x265442=this['_revisionsRepository']['getRevision'](0x0);if(_0x265442){const _0x56e7f6=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x265442['id']);this['_revisionViewer']['compare'](_0x265442,_0x56e7f6);}}['_handleRevisionSelected'](_0x3e83ae,_0x147c4a){const _0x5a3d61=this['_revisionsRepository']['getRevision'](_0x147c4a['id']),_0x1606e2=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5a3d61['id']);this['_revisionViewer']['compare'](_0x5a3d61,_0x1606e2);}['_handleRevisionSetName'](_0x59d993,_0x4781ed){this['_revisionsRepository']['getRevision'](_0x4781ed['id'])['setName'](_0x4781ed['name']);}['_handleDiffChange'](_0x30af4,_0x434a61,_0x5d8121){const _0x523126=this['_revisionsRepository']['getRevisionsInDiff'](_0x5d8121);_0x523126['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x523126),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x523126[0x0]));}['_createRevisionActions'](){const _0x227ded=this['editor'],_0x44560d=g['availableRevisionActions'],_0x547e28=_0x227ded['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x547e28['length'])return _0x547e28['map'](_0x17d935=>{const _0x9cc5d1='string'==typeof _0x17d935?Object['assign']({},_0x44560d[_0x17d935]):_0x17d935;return _0x9cc5d1['action']=_0x9cc5d1['action']['bind'](this,_0x227ded),_0x9cc5d1['isVisible']&&(_0x9cc5d1['isVisible']=_0x9cc5d1['isVisible']['bind'](this,_0x227ded)),_0x9cc5d1;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x305d1c},_0x152406)=>{const _0x324176=_0x305d1c['get'](d),_0x374268=_0x324176['repository'];let _0x5bdc1f=_0x324176['diff']['newRevisionId'],_0x171888=_0x152406['id'];_0x374268['getIndex'](_0x5bdc1f)>_0x374268['getIndex'](_0x171888)&&([_0x5bdc1f,_0x171888]=[_0x171888,_0x5bdc1f]),_0x324176['compare'](_0x5bdc1f,_0x171888);},'isVisible':({plugins:_0x43a305},_0x1fdcf5)=>{const _0x9efca=_0x43a305['get'](d);return!(_0x9efca['repository']['getRevisionsInDiff'](_0x9efca['diff'])['length']>0x2)&&!_0x1fdcf5['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x30d284,{id:_0x39f8c5})=>{_0x30d284['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x39f8c5);},'isVisible':({plugins:_0x48a983},_0x35e7dc)=>!!_0x48a983['get'](d)['repository']['getLaterVisibleRevision'](_0x35e7dc['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1cec80},{id:_0x225741,revisionNameView:_0x5ca01a})=>{const _0x43ddc3=_0x1cec80['get'](d),_0x11d6ab=_0x43ddc3['repository']['getEarlierVisibleRevision'](_0x225741);_0x43ddc3['compare'](_0x225741,_0x11d6ab),_0x5ca01a['focus'](),_0x5ca01a['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x508c56,_0x39b206){super(_0x508c56),this['_view']=_0x39b206,this['_toolbarConfig']=ot(_0x508c56['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x5d2744){const _0x2028da=this['editor'],_0x6409a6=this['view'],_0x2029f8=_0x2028da['editing']['view'],_0x3a19be=_0x6409a6['editable'],_0x29c0c8=_0x2029f8['document']['getRoot']();_0x3a19be['name']=_0x29c0c8['rootName'],_0x6409a6['render']();const _0x44e2c5=_0x3a19be['element'];this['setEditableElement'](_0x3a19be['name'],_0x44e2c5),_0x6409a6['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2029f8['attachDomRoot'](_0x44e2c5),this['_elementReplacer']['replace'](_0x5d2744,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x84d9db=this['view'],_0x4a77d5=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4a77d5['detachDomRoot'](_0x84d9db['editable']['name']),_0x84d9db['destroy']();}['_initToolbar'](){const _0x1e418c=this['view'];_0x1e418c['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1e418c['stickyPanel']['limiterElement']=_0x1e418c['element'],_0x1e418c['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xebd3c4})=>_0xebd3c4),_0x1e418c['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1e418c['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x1a2bdb,_0x508226,_0x3b5d46={}){super(_0x1a2bdb),this['stickyPanel']=new lt(_0x1a2bdb),this['toolbar']=new nt(_0x1a2bdb,{'shouldGroupWhenFull':_0x3b5d46['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x1a2bdb,_0x508226);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
29
- it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4f9e1d,_0x25208b){super(_0x25208b),this['sourceElement']=_0x4f9e1d,this['model']['document']['createRoot']();const _0xea9eed=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0xea9eed);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x339af3,_0x499ba0){const _0x32d210=new this(_0x339af3,_0x499ba0);return await _0x32d210['initPlugins'](),await _0x32d210['ui']['init'](_0x339af3),await _0x32d210['data']['init'](_0x32d210['config']['get']('initialData')||''),_0x32d210['fire']('ready'),_0x32d210;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x5aa884{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7db8d){function _0x209301(_0x52b71d){return _0x52b71d['map'](_0xabbc49=>String['fromCharCode'](_0xabbc49))['join']('');}super(_0x7db8d),this['result']='end',_0x7db8d[_0x209301([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x209301([0x76,0x69,0x65,0x77])][_0x209301([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x209301([0x61,0x75,0x74,0x6f]),_0x7db8d[_0x209301([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x209301([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x209301([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x209301([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x209301([0x6f,0x6b])});}}class k extends _0x5aa884{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x567caf){if(super(_0x567caf),!this['editor']['config']['get']('revisionHistory'))throw new _0x1a961b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xabc942=>this['_showRevisionViewer']({..._0xabc942,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2c7ea6=>this['_closeRevisionViewer'](_0x2c7ea6)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x430723=>this['_restoreRevision'](_0x430723)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x5e9f61){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x5e9f61;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3548de){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3548de);}['getRevision'](_0x27dbf7){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x27dbf7);}['getRevisions'](_0x3e9189){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3e9189||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x450092=this['editor'],_0x561899=_0x4398d8(_0x450092,p),_0x572cf3=_0x450092['plugins']['get']('RevisionTracker'),_0xdfc85c=_0x450092['plugins']['get']('Users')['users'];return _0x561899['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x561899['lazyRoots'],(_0x561899['plugins']['push'](Rt,d,w,class extends _0x5aa884{static get['requires'](){return[d,'Users'];}['init'](){const _0x3e4634=this['editor']['plugins']['get']('Users');for(const _0x5aaeba of _0xdfc85c)_0x5aaeba['isAnonymous']||_0x3e4634['getUser'](_0x5aaeba['id'])||_0x3e4634['addUser'](_0x5aaeba);const _0x3a7461=_0x572cf3['repository']['getRevisions']();let _0x4fbe19=null;const _0x3a1650=this['editor']['plugins']['get']('RevisionViewer');_0x3a1650['adapter']=_0x572cf3['adapter'],_0x3a1650['bind']('isEnabled')['to'](_0x572cf3),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x450092,'isReadOnly',_0xaade0b=>!_0xaade0b);for(const _0x228957 of _0x3a7461){const _0x4d604d=null===_0x228957['creator'];if(_0x4d604d&&_0x228957['toVersion']===_0x228957['fromVersion'])continue;const _0x4737fa=_0x228957['toJSON']();_0x3a1650['addRevisionData'](_0x4737fa,(_0x20a64d,_0x2cb1fa,_0x5dd295)=>{if(_0x4d604d){if(_0x4fbe19)_0x4fbe19['_update'](_0x20a64d,_0x2cb1fa);else{if(!_0x2cb1fa){const _0x231cd0=_0x5dd295['toJSON']();_0x231cd0['id']=_0x51a0e0(),_0x572cf3['saveRevision'](_0x231cd0,_0x5dd295['toVersion'])['then'](_0x24d97e=>{_0x4fbe19=_0x24d97e;});}}}else _0x228957['_update'](_0x20a64d,_0x2cb1fa);});}}},g),_0x561899);}['_enhanceShowRevisionViewerCallback'](){const _0x208522=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x109fee=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x276cb9=this['editor']['plugins']['get']('Autosave');await _0x276cb9['save']();}else await _0x109fee['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x153af8=this['editor']['plugins']['get']('Dialog');_0x153af8['isOpen']&&_0x153af8['hide']();}const _0x3fa7c7=this['_getRevisionViewerEditorConfig']();return _0x208522(_0x3fa7c7)['then'](_0x11e6f9=>{return(this['_viewerEditor']=_0x11e6f9,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x11e6f9;})['catch'](_0xb4f100=>(console['error'](_0xb4f100),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x15edf2=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x15edf2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x465e3d=this['editor']['plugins']['get']('Annotations');_0x465e3d['refreshVisibility'](),_0x465e3d['refreshPositioning']();}})));}['_showRevisionViewer'](_0x2afd8f){const _0x5d747c=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x297ea9=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x29655e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x29655e,_0x2afd8f)['then'](_0x31aba6=>(_0x297ea9['style']['display']='block',_0x5d747c['style']['display']='none',_0x31aba6));}['_closeRevisionViewer'](_0x187bb7){const _0x5bd91a=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5bd91a['style']['display']='',_0x187bb7['destroy']();}async['_restoreRevision'](_0x55cc7b){const _0x2cedc1=this['editor'],_0x2670e3=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x119161=_0x2cedc1['plugins']['get']('RevisionTracker'),_0x44fb29=_0x2670e3['repository']['getRevision'](_0x55cc7b);let _0x5a8515,_0x5dc588,_0xf7c678;try{_0x5a8515=await _0x2670e3['getRevisionData'](_0x44fb29),_0x5dc588=await _0x2670e3['getRevisionRootsAttributes'](_0x44fb29);}catch(_0x518478){return void console['error'](_0x518478);}_0x2cedc1['model']['change'](_0x2c50ee=>{for(const _0x7d030b of Array['from'](_0x2cedc1['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2c50ee['removeMarker'](_0x7d030b);}),_0x2670e3['isReady']=!0x1,_0x2cedc1['model']['enqueueChange'](_0x7986ca=>{_0x7986ca['setSelection'](null),_0x7986ca['removeSelectionAttribute'](_0x2cedc1['model']['document']['selection']['getAttributeKeys']());const _0x29bee6=Object['keys'](_0x5a8515);for(const _0x5700dd of _0x2cedc1['model']['document']['roots'])'$graveyard'!=_0x5700dd['rootName']&&_0x5700dd['isAttached']()&&!_0x29bee6['includes'](_0x5700dd['rootName'])&&_0x7986ca['detachRoot'](_0x5700dd);for(const _0x469884 of _0x29bee6){let _0x27bab8=_0x2cedc1['model']['document']['getRoot'](_0x469884);_0x27bab8&&_0x27bab8['isAttached']()||(_0x27bab8=_0x7986ca['addRoot'](_0x469884));const _0xc328d3=_0x5dc588[_0x469884],_0xf9ab41=Object['keys'](_0xc328d3),_0x232175=_0x5a8515[_0x469884];for(const _0x14348e of _0x27bab8['getAttributeKeys']())_0xf9ab41['includes'](_0x14348e)||_0x7986ca['removeAttribute'](_0x14348e,_0x27bab8);for(const _0x2c1353 of _0xf9ab41)_0x7986ca['setAttribute'](_0x2c1353,_0x5dc588[_0x469884][_0x2c1353],_0x27bab8);_0x7986ca['remove'](_0x7986ca['createRangeIn'](_0x27bab8)),_0x7986ca['insert'](_0x2cedc1['data']['parse'](_0x232175,_0x27bab8),_0x27bab8,0x0);}});const _0x1443c0=m(_0x2cedc1['locale'],'Restored');if(_0x44fb29['name'])_0xf7c678=-0x1==_0x44fb29['name']['indexOf'](_0x1443c0)?_0x1443c0+':\x20'+_0x44fb29['name']:_0x44fb29['name'];else _0xf7c678=_0x1443c0+':\x20'+(_0x44fb29['createdAt']['toLocaleDateString'](_0x2cedc1['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x44fb29['createdAt']['toLocaleTimeString'](_0x2cedc1['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x119161['saveRevision']({'name':_0xf7c678}),_0x2670e3['isReady']=!0x0,_0x2cedc1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
28
+ bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x3998d1){super(_0x3998d1),this['_revisionViewer']=_0x3998d1['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x33e181=this['_revisionsRepository']['_revisions'],_0x10bda2=this['_createRevisionActions'](),_0x33bfa8=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new vi(this['editor']['locale'],_0x33e181,_0x10bda2,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',(_0x104bba,_0x175369)=>{_0x175369['revisionViews']['on']('add',(_0x44e497,_0x30ab2d)=>{_0x30ab2d['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)),_0x33bfa8['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x331922=this['_revisionsRepository']['getRevision'](0x0);if(_0x331922){const _0x4e8dce=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x331922['id']);this['_revisionViewer']['compare'](_0x331922,_0x4e8dce);}}['_handleRevisionSelected'](_0xf0124c,_0x21fa82){const _0x2f9fee=this['_revisionsRepository']['getRevision'](_0x21fa82['id']),_0x1d574d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2f9fee['id']);this['_revisionViewer']['compare'](_0x2f9fee,_0x1d574d);}['_handleRevisionSetName'](_0x4cb018,_0x16781a){this['_revisionsRepository']['getRevision'](_0x16781a['id'])['setName'](_0x16781a['name']);}['_handleDiffChange'](_0x431eb1,_0x4cc6cf,_0x264ea3){const _0x135712=this['_revisionsRepository']['getRevisionsInDiff'](_0x264ea3);_0x135712['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x135712),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x135712[0x0]));}['_createRevisionActions'](){const _0x115fbc=this['editor'],_0x308d10=g['availableRevisionActions'],_0x390eae=_0x115fbc['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x390eae['length'])return _0x390eae['map'](_0x33e286=>{const _0x3d009f='string'==typeof _0x33e286?Object['assign']({},_0x308d10[_0x33e286]):_0x33e286;return _0x3d009f['action']=_0x3d009f['action']['bind'](this,_0x115fbc),_0x3d009f['isVisible']&&(_0x3d009f['isVisible']=_0x3d009f['isVisible']['bind'](this,_0x115fbc)),_0x3d009f;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x20cae0},_0x27bd8c)=>{const _0x283043=_0x20cae0['get'](d),_0x4737b7=_0x283043['repository'];let _0xc02d14=_0x283043['diff']['newRevisionId'],_0x56f095=_0x27bd8c['id'];_0x4737b7['getIndex'](_0xc02d14)>_0x4737b7['getIndex'](_0x56f095)&&([_0xc02d14,_0x56f095]=[_0x56f095,_0xc02d14]),_0x283043['compare'](_0xc02d14,_0x56f095);},'isVisible':({plugins:_0x1699ff},_0x372d96)=>{const _0xdfaf9f=_0x1699ff['get'](d);return!(_0xdfaf9f['repository']['getRevisionsInDiff'](_0xdfaf9f['diff'])['length']>0x2)&&!_0x372d96['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x447992,{id:_0x811e32})=>{_0x447992['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x811e32);},'isVisible':({plugins:_0x51806a},_0x30b3d5)=>!!_0x51806a['get'](d)['repository']['getLaterVisibleRevision'](_0x30b3d5['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x291b47},{id:_0x58c015,revisionNameView:_0x1b8a30})=>{const _0x4ea7b1=_0x291b47['get'](d),_0x48c539=_0x4ea7b1['repository']['getEarlierVisibleRevision'](_0x58c015);_0x4ea7b1['compare'](_0x58c015,_0x48c539),_0x1b8a30['focus'](),_0x1b8a30['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x23da17,_0x3788fc){super(_0x23da17),this['_view']=_0x3788fc,this['_toolbarConfig']=ot(_0x23da17['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x48b613){const _0x4efcc7=this['editor'],_0x5cddd3=this['view'],_0x2fd442=_0x4efcc7['editing']['view'],_0x54ce04=_0x5cddd3['editable'],_0x4ce088=_0x2fd442['document']['getRoot']();_0x54ce04['name']=_0x4ce088['rootName'],_0x5cddd3['render']();const _0x3685b=_0x54ce04['element'];this['setEditableElement'](_0x54ce04['name'],_0x3685b),_0x5cddd3['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2fd442['attachDomRoot'](_0x3685b),this['_elementReplacer']['replace'](_0x48b613,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x4a8990=this['view'],_0xa4fe1=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0xa4fe1['detachDomRoot'](_0x4a8990['editable']['name']),_0x4a8990['destroy']();}['_initToolbar'](){const _0x3136e1=this['view'];_0x3136e1['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3136e1['stickyPanel']['limiterElement']=_0x3136e1['element'],_0x3136e1['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1e0366})=>_0x1e0366),_0x3136e1['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3136e1['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x50091e,_0x25918e,_0x4f620c={}){super(_0x50091e),this['stickyPanel']=new lt(_0x50091e),this['toolbar']=new nt(_0x50091e,{'shouldGroupWhenFull':_0x4f620c['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x50091e,_0x25918e);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
29
+ it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0xb98dff,_0x14c3fc){super(_0x14c3fc),this['sourceElement']=_0xb98dff,this['model']['document']['createRoot']();const _0x1cec20=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x1cec20);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4f886d,_0x3655a7){const _0x3502ad=new this(_0x4f886d,_0x3655a7);return await _0x3502ad['initPlugins'](),await _0x3502ad['ui']['init'](_0x4f886d),await _0x3502ad['data']['init'](_0x3502ad['config']['get']('initialData')||''),_0x3502ad['fire']('ready'),_0x3502ad;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x26f450{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a3492){function _0x4871c6(_0x579192){return _0x579192['map'](_0xdffe97=>String['fromCharCode'](_0xdffe97))['join']('');}super(_0x4a3492),this['result']='end',_0x4a3492[_0x4871c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4871c6([0x76,0x69,0x65,0x77])][_0x4871c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4871c6([0x61,0x75,0x74,0x6f]),_0x4a3492[_0x4871c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4871c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4871c6([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4871c6([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4871c6([0x6f,0x6b])});}}class k extends _0x26f450{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x2f57ff){if(super(_0x2f57ff),!this['editor']['config']['get']('revisionHistory'))throw new _0x141381('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2205f8=>this['_showRevisionViewer']({..._0x2205f8,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x6bfd2f=>this['_closeRevisionViewer'](_0x6bfd2f)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x37bd9e=>this['_restoreRevision'](_0x37bd9e)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x10bff2){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x10bff2;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3e63e4){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3e63e4);}['getRevision'](_0x77f5a2){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x77f5a2);}['getRevisions'](_0x52251f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x52251f||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x432329=this['editor'],_0x34e9c0=_0x21b855(_0x432329,p),_0x1a13dd=_0x432329['plugins']['get']('RevisionTracker'),_0x4ad4ac=_0x432329['plugins']['get']('Users')['users'];return _0x34e9c0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x34e9c0['lazyRoots'],(_0x34e9c0['plugins']['push'](Rt,d,w,class extends _0x26f450{static get['requires'](){return[d,'Users'];}['init'](){const _0x799cad=this['editor']['plugins']['get']('Users');for(const _0x2a45cc of _0x4ad4ac)_0x2a45cc['isAnonymous']||_0x799cad['getUser'](_0x2a45cc['id'])||_0x799cad['addUser'](_0x2a45cc);const _0x2e30ce=_0x1a13dd['repository']['getRevisions']();let _0x2b59b0=null;const _0x19e05d=this['editor']['plugins']['get']('RevisionViewer');_0x19e05d['adapter']=_0x1a13dd['adapter'],_0x19e05d['bind']('isEnabled')['to'](_0x1a13dd),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x432329,'isReadOnly',_0x14bb38=>!_0x14bb38);for(const _0x1a6dd1 of _0x2e30ce){const _0x3905f2=null===_0x1a6dd1['creator'];if(_0x3905f2&&_0x1a6dd1['toVersion']===_0x1a6dd1['fromVersion'])continue;const _0x160b3b=_0x1a6dd1['toJSON']();_0x19e05d['addRevisionData'](_0x160b3b,(_0x492e5a,_0xbc3a4f,_0x236e76)=>{if(_0x3905f2){if(_0x2b59b0)_0x2b59b0['_update'](_0x492e5a,_0xbc3a4f);else{if(!_0xbc3a4f){const _0x24dd8b=_0x236e76['toJSON']();_0x24dd8b['id']=_0x47cd61(),_0x1a13dd['saveRevision'](_0x24dd8b,_0x236e76['toVersion'])['then'](_0x3f6cf1=>{_0x2b59b0=_0x3f6cf1;});}}}else _0x1a6dd1['_update'](_0x492e5a,_0xbc3a4f);});}}},g),_0x34e9c0);}['_enhanceShowRevisionViewerCallback'](){const _0x2a1800=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x51a89a=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x517dfd=this['editor']['plugins']['get']('Autosave');await _0x517dfd['save']();}else await _0x51a89a['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xf36f7f=this['editor']['plugins']['get']('Dialog');_0xf36f7f['isOpen']&&_0xf36f7f['hide']();}const _0x6d023c=this['_getRevisionViewerEditorConfig']();return _0x2a1800(_0x6d023c)['then'](_0x25cf73=>{return(this['_viewerEditor']=_0x25cf73,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x25cf73;})['catch'](_0x1bdbe3=>(console['error'](_0x1bdbe3),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x227752=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x227752(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4fa822=this['editor']['plugins']['get']('Annotations');_0x4fa822['refreshVisibility'](),_0x4fa822['refreshPositioning']();}})));}['_showRevisionViewer'](_0x163736){const _0x27e545=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x481286=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x243f31=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x243f31,_0x163736)['then'](_0x53a4b1=>(_0x481286['style']['display']='block',_0x27e545['style']['display']='none',_0x53a4b1));}['_closeRevisionViewer'](_0x2f9494){const _0x3c6f70=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3c6f70['style']['display']='',_0x2f9494['destroy']();}async['_restoreRevision'](_0x4fd35f){const _0x1dd1e6=this['editor'],_0x582289=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5790eb=_0x1dd1e6['plugins']['get']('RevisionTracker'),_0x134974=_0x582289['repository']['getRevision'](_0x4fd35f);let _0x4d76c8,_0x58a70d,_0x31c3b3;try{_0x4d76c8=await _0x582289['getRevisionData'](_0x134974),_0x58a70d=await _0x582289['getRevisionRootsAttributes'](_0x134974);}catch(_0x3a9ae8){return void console['error'](_0x3a9ae8);}_0x1dd1e6['model']['change'](_0x124fbd=>{for(const _0x5698a0 of Array['from'](_0x1dd1e6['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x124fbd['removeMarker'](_0x5698a0);}),_0x582289['isReady']=!0x1,_0x1dd1e6['model']['enqueueChange'](_0x3c1a6f=>{_0x3c1a6f['setSelection'](null),_0x3c1a6f['removeSelectionAttribute'](_0x1dd1e6['model']['document']['selection']['getAttributeKeys']());const _0x5a364a=Object['keys'](_0x4d76c8);for(const _0x2d9ac8 of _0x1dd1e6['model']['document']['roots'])'$graveyard'!=_0x2d9ac8['rootName']&&_0x2d9ac8['isAttached']()&&!_0x5a364a['includes'](_0x2d9ac8['rootName'])&&_0x3c1a6f['detachRoot'](_0x2d9ac8);for(const _0x280aa6 of _0x5a364a){let _0x47a448=_0x1dd1e6['model']['document']['getRoot'](_0x280aa6);_0x47a448&&_0x47a448['isAttached']()||(_0x47a448=_0x3c1a6f['addRoot'](_0x280aa6));const _0x61f891=_0x58a70d[_0x280aa6],_0x41713c=Object['keys'](_0x61f891),_0xdc4ee7=_0x4d76c8[_0x280aa6];for(const _0xe48e5b of _0x47a448['getAttributeKeys']())_0x41713c['includes'](_0xe48e5b)||_0x3c1a6f['removeAttribute'](_0xe48e5b,_0x47a448);for(const _0x403d55 of _0x41713c)_0x3c1a6f['setAttribute'](_0x403d55,_0x58a70d[_0x280aa6][_0x403d55],_0x47a448);_0x3c1a6f['remove'](_0x3c1a6f['createRangeIn'](_0x47a448)),_0x3c1a6f['insert'](_0x1dd1e6['data']['parse'](_0xdc4ee7,_0x47a448),_0x47a448,0x0);}});const _0x52c2e4=m(_0x1dd1e6['locale'],'Restored');if(_0x134974['name'])_0x31c3b3=-0x1==_0x134974['name']['indexOf'](_0x52c2e4)?_0x52c2e4+':\x20'+_0x134974['name']:_0x134974['name'];else _0x31c3b3=_0x52c2e4+':\x20'+(_0x134974['createdAt']['toLocaleDateString'](_0x1dd1e6['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x134974['createdAt']['toLocaleTimeString'](_0x1dd1e6['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5790eb['saveRevision']({'name':_0x31c3b3}),_0x582289['isReady']=!0x0,_0x1dd1e6['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};