@ckeditor/ckeditor5-revision-history 46.0.1-alpha.11 → 46.0.1-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x4a7306,uid as _0x8f1231,Collection as _0xcf03c8,logWarning as _0x489b48,FocusTracker as _0x41b0aa,KeystrokeHandler as _0x46ace8,scrollViewportToShowTarget as _0x41fd72,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x4b9c1b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3a3d07,set as _0x313999,unset as _0x22fec1,isEqual as _0x5dab1e}from'es-toolkit/compat';import{Plugin as _0x3146aa,PendingActions as _0x42d075,Command as _0x148061,ElementApiMixin as _0x161187,Editor as _0x3ce5e6}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x3cae5e,getMarkerDomElement as _0x7f1a49,ConfirmMixin as _0x55df8e,sanitizeEditorConfig as _0x4a7dc8}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x249ca1,ViewAttributeElement as _0x2d7823,ViewEmptyElement as _0x4899f2,ViewRawElement as _0x9c6e29,ViewUIElement as _0x16a43e,ViewDocumentFragment as _0x34c7c0,ViewText as _0x17b5a2,ViewElement as _0x4374d9,ModelElement as _0x11c009,ModelRange as _0x52c48,ModelPosition as _0x470371,ModelDocumentFragment as _0x483ce4,ModelText as _0x55ea04}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x1c1518,IconChevronUp as _0x5b4589,IconChevronDown as _0xeedd28,IconUndo as _0x3dc335,IconUser as _0x160d41,IconThreeVerticalDots as _0x1bffb2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x1a8e0c,View as _0x558a40,submitHandler as _0x1cb25e,LabeledFieldView as ti,createLabeledInputText as _0x44cca1,createDropdown as _0x4a7c72,ListView as _0x4ef17c,ListItemView as _0x59454a,ButtonView as _0x50c1a2,MenuBarMenuView as _0x227765,MenuBarMenuListView as _0x44a2ee,MenuBarMenuListItemView as _0x1e286f,MenuBarMenuListItemButtonView as _0x8bf3ac,ContextualBalloon as _0x3f2e8b,ToolbarSeparatorView as _0x3e7d4a,IconView as _0x4d5e11,addListToDropdown as _0xd1d65d,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0xf276e1,StickyPanelView as _0x3cf989,ToolbarView as _0x182998,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x78e786}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x4a7306(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2f9b64){super(),this['id']=_0x2f9b64['id']||_0x8f1231(),this['creator']=_0x2f9b64['creator']||null,this['authors']=_0x2f9b64['authors']||[],this['diffData']=_0x2f9b64['diffData']||null,this['toVersion']=_0x2f9b64['toVersion']||0x0,this['fromVersion']=_0x2f9b64['fromVersion']||0x0,this['set']('name',_0x2f9b64['name']||''),this['set']('createdAt',_0x2f9b64['createdAt']||new Date()),this['set']('attributes',_0x2f9b64['attributes']||{});}['setName'](_0x52c51d){this['_update']({'name':_0x52c51d});}['setAttribute'](_0x545123,_0x4f45ff){const _0x34109c=_0x3a3d07(this['attributes']);_0x313999(_0x34109c,_0x545123,_0x4f45ff),this['_update']({'attributes':_0x34109c});}['removeAttribute'](_0x4a4782){const _0x592e96=_0x3a3d07(this['attributes']);_0x22fec1(_0x592e96,_0x4a4782),this['_update']({'attributes':_0x592e96});}['_update'](_0xb9e598,_0x1480a5=!0x1){let _0x431819=!0x1;const _0x5d4090={'id':this['id']},_0x39f70a=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x570be9 of _0x39f70a){const _0x1bec6b=_0xb9e598[_0x570be9];void 0x0!==_0x1bec6b&&_0x1bec6b!==this[_0x570be9]&&(this[_0x570be9]=_0x1bec6b,_0x5d4090[_0x570be9]=_0x1bec6b,_0x431819=!0x0);}_0x431819&&(_0x5d4090['authors']&&(_0x5d4090['authorsIds']=_0x5d4090['authors']['map'](_0x35e606=>_0x35e606['id']),delete _0x5d4090['authors']),this['fire']('_update',_0x5d4090,_0x1480a5));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4d851e=>_0x4d851e['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x3146aa{['_revisions'];static get['requires'](){return[_0x3cae5e];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x24054a){super(_0x24054a),this['_revisions']=new _0xcf03c8();}['afterInit'](){!async function(_0x56fffa){const _0x5c9d82=_0x5b02d4([0x38,0x31,0x58,0x64,0x39,0x66,0x48,0x6f,0x49,0x37,0x72,0x6e,0x79,0x4f,0x76,0x69,0x62,0x57,0x56,0x59,0x32,0x70,0x33,0x78,0x67,0x6a,0x7a,0x77,0x65,0x74,0x4c,0x30,0x4a,0x55,0x51,0x6c,0x6d,0x42,0x6b,0x75,0x5a,0x35,0x46,0x50,0x44,0x36,0x4b,0x52,0x54,0x71,0x53,0x68,0x45,0x4e,0x4d,0x34,0x41,0x43,0x47,0x73,0x61,0x63]),_0x169173=0xeb829,_0x4f1518=0x58b840c3,_0x473a31=0x58bf2f23^_0x4f1518,_0x1e0040=window[_0x5b02d4([0x44,0x61,0x74,0x65])][_0x5b02d4([0x6e,0x6f,0x77])](),_0x554ce0=_0x56fffa[_0x5b02d4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x56888d=new window[(_0x5b02d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c9258=>{_0x554ce0[_0x5b02d4([0x6f,0x6e,0x63,0x65])](_0x5b02d4([0x72,0x65,0x61,0x64,0x79]),_0x5c9258);}),_0x4aecbb={[_0x5b02d4([0x6b,0x74,0x79])]:_0x5b02d4([0x45,0x43]),[_0x5b02d4([0x75,0x73,0x65])]:_0x5b02d4([0x73,0x69,0x67]),[_0x5b02d4([0x63,0x72,0x76])]:_0x5b02d4([0x50,0x2d,0x32,0x35,0x36]),[_0x5b02d4([0x78])]:_0x5b02d4([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]),[_0x5b02d4([0x79])]:_0x5b02d4([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]),[_0x5b02d4([0x61,0x6c,0x67])]:_0x5b02d4([0x45,0x53,0x32,0x35,0x36])},_0x2c1597=_0x554ce0[_0x5b02d4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5b02d4([0x67,0x65,0x74])](_0x5b02d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2d9b06(){let _0x2e29c8,_0x146b33=null,_0x1fabdb=null;try{if(_0x2c1597==_0x5b02d4([0x47,0x50,0x4c]))return _0x5b02d4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e29c8=_0x5cb854(),!_0x2e29c8)return _0x5b02d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e29c8[_0x5b02d4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1fabdb=_0x2cb359(_0x2e29c8[_0x5b02d4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e29c8[_0x5b02d4([0x6a,0x74,0x69])])),await _0x3788dd()?_0x341e72()?_0x3e389e()?_0x5b02d4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x53a307()?(_0x2e29c8[_0x5b02d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5b02d4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x146b33=_0x20b393(_0x5b02d4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2e29c8[_0x5b02d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5b02d4([0x74,0x72,0x69,0x61,0x6c])&&(_0x146b33=_0x20b393(_0x5b02d4([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x550030()):_0x5b02d4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5b02d4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5b02d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5b02d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3e389e(){const _0x28a45b=[_0x5b02d4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5b02d4([0x74,0x72,0x69,0x61,0x6c])][_0x5b02d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e29c8[_0x5b02d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1e0040/0x3e8:0xe10*_0x473a31;return _0x2e29c8[_0x5b02d4([0x65,0x78,0x70])]<_0x28a45b;}function _0x341e72(){const _0x1ed99c=_0x2e29c8[_0x5b02d4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1ed99c)return!0x1;if(_0x1ed99c[_0x5b02d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b02d4([0x2a])))return!0x0;if(_0x1ed99c[_0x5b02d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b02d4([0x52,0x48])))return!0x0;if(_0x1ed99c[_0x5b02d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b02d4([0x52,0x52,0x48]))){if(_0x1081e6())return!0x0;if(_0x149b53()||_0x3e072f())return!0x0;}return!0x1;}function _0x53a307(){const _0x403210=_0x2e29c8[_0x5b02d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x403210||0x0==_0x403210[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4bc328}=new URL(window[_0x5b02d4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x403210[_0x5b02d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bc328))return!0x0;const _0x6cf088=_0x4bc328[_0x5b02d4([0x73,0x70,0x6c,0x69,0x74])](_0x5b02d4([0x2e]));return _0x403210[_0x5b02d4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3b74c4=>_0x3b74c4[_0x5b02d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b02d4([0x2a])))[_0x5b02d4([0x6d,0x61,0x70])](_0xfa8b3d=>_0xfa8b3d[_0x5b02d4([0x73,0x70,0x6c,0x69,0x74])](_0x5b02d4([0x2e])))[_0x5b02d4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x196515=>_0x196515[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x6cf088[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5b02d4([0x6d,0x61,0x70])](_0x25b7fe=>Array(_0x6cf088[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x25b7fe[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5b02d4([0x66,0x69,0x6c,0x6c])](_0x25b7fe[0x0]===_0x5b02d4([0x2a])?_0x5b02d4([0x2a]):'')[_0x5b02d4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x25b7fe))[_0x5b02d4([0x73,0x6f,0x6d,0x65])](_0x30edae=>_0x6cf088[_0x5b02d4([0x65,0x76,0x65,0x72,0x79])]((_0x452667,_0x4cbbdd)=>_0x30edae[_0x4cbbdd]===_0x452667||_0x30edae[_0x4cbbdd]===_0x5b02d4([0x2a])));}function _0x550030(){return _0x146b33&&_0x1fabdb?new window[(_0x5b02d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x228e48,_0x454ed6)=>{_0x146b33[_0x5b02d4([0x74,0x68,0x65,0x6e])](_0x228e48,_0x454ed6),_0x1fabdb[_0x5b02d4([0x74,0x68,0x65,0x6e])](_0x59916a=>{_0x59916a!=_0x5b02d4([0x56,0x61,0x6c,0x69,0x64])&&_0x228e48(_0x59916a);},_0x454ed6);}):_0x146b33||_0x1fabdb||_0x5b02d4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2cb359(_0x1b731e,_0x3d2f26){return new window[(_0x5b02d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x253429=>{if(_0x33c041())return _0x253429(_0x5b02d4([0x56,0x61,0x6c,0x69,0x64]));_0x33f791(),_0x554ce0[_0x5b02d4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5b02d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3ace7e=!0x1;const _0xa746d9=_0x8f1231();function _0x469a3f(_0x300e70){return!!_0x300e70&&(typeof _0x300e70===_0x5b02d4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x300e70===_0x5b02d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x300e70[_0x5b02d4([0x74,0x68,0x65,0x6e])]===_0x5b02d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x300e70[_0x5b02d4([0x63,0x61,0x74,0x63,0x68])]===_0x5b02d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1dc76f(_0x50c99a){_0x4e1316(_0x50c99a)[_0x5b02d4([0x74,0x68,0x65,0x6e])](_0x417bc5=>{if(!_0x417bc5||_0x417bc5[_0x5b02d4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5b02d4([0x6f,0x6b]))return _0x5b02d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x189bd3(_0x1e73ad(_0xa746d9+_0x3d2f26))!=_0x417bc5[_0x5b02d4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5b02d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5b02d4([0x56,0x61,0x6c,0x69,0x64]);})[_0x5b02d4([0x74,0x68,0x65,0x6e])](_0x215e02=>(_0x5c1923(),_0x215e02),()=>{const _0x49c586=_0x2878e7();return null==_0x49c586?(_0x5c1923(),_0x5b02d4([0x56,0x61,0x6c,0x69,0x64])):_0x5b02d4(_0x1e0040-_0x49c586>(0x7cb4c4c3^_0x4f1518)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5b02d4([0x74,0x68,0x65,0x6e])](_0x253429)[_0x5b02d4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x253429(_0x5b02d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x7f7bf0=0x588eae43^_0x4f1518;function _0x5c1923(){const _0xeaec15=_0x5b02d4([0x6c,0x6c,0x63,0x74,0x2d])+_0x189bd3(_0x1e73ad(_0x1b731e)),_0x328cdd=_0x374554(_0x189bd3(window[_0x5b02d4([0x4d,0x61,0x74,0x68])][_0x5b02d4([0x63,0x65,0x69,0x6c])](_0x1e0040/_0x7f7bf0)));window[_0x5b02d4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b02d4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xeaec15,_0x328cdd);}function _0x2878e7(){const _0x46c5c4=_0x5b02d4([0x6c,0x6c,0x63,0x74,0x2d])+_0x189bd3(_0x1e73ad(_0x1b731e)),_0x5a4c45=window[_0x5b02d4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b02d4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46c5c4);return _0x5a4c45?window[_0x5b02d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x374554(_0x5a4c45),0x10)*_0x7f7bf0:null;}function _0x4e1316(_0x23d021){return new window[(_0x5b02d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d2881,_0x1b64dd)=>{_0x23d021[_0x5b02d4([0x74,0x68,0x65,0x6e])](_0x2d2881,_0x1b64dd),window[_0x5b02d4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1b64dd,0x58b99403^_0x4f1518);});}}_0x554ce0[_0x5b02d4([0x6f,0x6e])](_0x5b02d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x566e82,_0x1d6512)=>{if(_0x1d6512[0x0]!=_0x1b731e)return _0x253429(_0x5b02d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1d6512[0x1]={..._0x1d6512[0x1],[_0x5b02d4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xa746d9};},{[_0x5b02d4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b02d4([0x68,0x69,0x67,0x68])}),_0x554ce0[_0x5b02d4([0x6f,0x6e])](_0x5b02d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5be0b8=>{_0x469a3f(_0x5be0b8[_0x5b02d4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3ace7e=!0x0,_0x1dc76f(_0x5be0b8[_0x5b02d4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5b02d4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b02d4([0x6c,0x6f,0x77])}),_0x56888d[_0x5b02d4([0x74,0x68,0x65,0x6e])](()=>{_0x3ace7e||_0x253429(_0x5b02d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x33c041(){return _0x554ce0[_0x5b02d4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b02d4([0x76,0x69,0x65,0x77])][_0x5b02d4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5b02d4([0x61,0x75,0x74,0x6f]);}function _0x33f791(){_0x554ce0[_0x5b02d4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b02d4([0x76,0x69,0x65,0x77])][_0x5b02d4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5b02d4([0x61,0x75,0x74,0x6f]);}}function _0x20b393(_0xfb1dd6){const _0x17fafb=[new window[(_0x5b02d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b4080=>setTimeout(_0x4b4080,0x58b17e0f^_0x4f1518)),_0x56888d[_0x5b02d4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5b02d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ed140=>{const _0x467290=0x58b840c4^_0x4f1518,_0x50ec40=_0x56fffa[_0x5b02d4([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x531d14(){_0x50ec40[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x467290&&_0x2ed140();}_0x531d14(),_0x50ec40[_0x5b02d4([0x6f,0x6e])](_0x5b02d4([0x61,0x64,0x64]),_0x531d14);})),new window[(_0x5b02d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3925a2=>{function _0x5788cb(){for(const _0x1b2ddf in window)if(window[_0x5b02d4([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5b02d4([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1b2ddf))&&window[_0x1b2ddf]==_0x169173)return _0x3925a2();_0x554ce0[_0x5b02d4([0x73,0x74,0x61,0x74,0x65])]!=_0x5b02d4([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5b02d4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5788cb,0x58b8534b^_0x4f1518);}_0x2d3f91(_0x5b02d4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x5788cb();})];return window[_0x5b02d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5b02d4([0x72,0x61,0x63,0x65])](_0x17fafb)[_0x5b02d4([0x74,0x68,0x65,0x6e])](()=>_0xfb1dd6);}async function _0x287d4b(){if(await _0x56888d,_0x2d3f91(_0x5b02d4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4fadfa=_0x56fffa[_0x5b02d4([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x337429=_0x56fffa[_0x5b02d4([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])](_0x4fadfa[_0x5b02d4([0x69,0x64])]),_0x52979f=_0x3f21cc(_0x5b02d4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x52979f[_0x5b02d4([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4fadfa['id'],_0x337429?_0x337429['id']:null,!0x0),_0x52979f[_0x5b02d4([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5b02d4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x52979f[_0x5b02d4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x52979f[_0x5b02d4([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x239f60,void(_0x52979f[_0x5b02d4([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x239f60);}if(_0x2d3f91(_0x5b02d4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0xabaf59=_0x3f21cc(_0x5b02d4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0xabaf59[_0x5b02d4([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5b02d4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0xabaf59[_0x5b02d4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0xabaf59[_0x5b02d4([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x239f60,_0xabaf59[_0x5b02d4([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x239f60;}_0x554ce0[_0x5b02d4([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b02d4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x239f60,_0x554ce0[_0x5b02d4([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b02d4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x239f60,_0x554ce0[_0x5b02d4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5b02d4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1081e6(){return _0x2d3f91(_0x5b02d4([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3f21cc(_0x5b02d4([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5b02d4([0x73,0x74,0x61,0x74,0x65])]==_0x5b02d4([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x149b53(){return _0x2d3f91(_0x5b02d4([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 _0x3e072f(){return _0x2d3f91(_0x5b02d4([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x58b61b(_0x261779){const _0x25e02e=_0x175e3f();_0x554ce0[_0x25e02e]=_0x5b02d4([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])+_0x261779,_0x261779[_0x5b02d4([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5b02d4([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x175e3f()]=_0x169173),_0x261779!=_0x5b02d4([0x56,0x61,0x6c,0x69,0x64])&&_0x287d4b();}function _0x175e3f(){const _0x14b5d6=window[_0x5b02d4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5b02d4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5b02d4([0x6e,0x6f,0x77])]())[_0x5b02d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5b02d4([0x2e]),'');let _0x3066f3=_0x5b02d4([0x58]);for(let _0x555eed=0x0;_0x555eed<_0x14b5d6[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x555eed+=0x2){let _0x3d0151=window[_0x5b02d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x14b5d6[_0x5b02d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x555eed,_0x555eed+0x2));_0x3d0151>=_0x5c9d82[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3d0151-=_0x5c9d82[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3066f3+=_0x5c9d82[_0x3d0151];}return _0x3066f3;}function _0x5cb854(){const _0x5e5ffb=_0x2c1597[_0x5b02d4([0x73,0x70,0x6c,0x69,0x74])](_0x5b02d4([0x2e]));if(0x3!=_0x5e5ffb[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xcead93(_0x5e5ffb[0x1]);function _0xcead93(_0x3e177c){const _0x50c5b1=_0x2fecf6(_0x3e177c);return _0x50c5b1&&_0x1a118a()?_0x50c5b1:null;function _0x1a118a(){const _0x27fe31=_0x50c5b1[_0x5b02d4([0x6a,0x74,0x69])],_0x30da59=window[_0x5b02d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x27fe31[_0x5b02d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x27fe31[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3ac07a={..._0x50c5b1,[_0x5b02d4([0x6a,0x74,0x69])]:_0x27fe31[_0x5b02d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x27fe31[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3ac07a[_0x5b02d4([0x76,0x63])],_0x1e73ad(_0x3ac07a)==_0x30da59;}}}async function _0x3788dd(){let _0x4f5025=!0x0;try{const _0x51f53a=_0x2c1597[_0x5b02d4([0x73,0x70,0x6c,0x69,0x74])](_0x5b02d4([0x2e])),[_0xe88c3d,_0x157098,_0x1a7b50]=_0x51f53a;return _0x3910a0(_0xe88c3d),await _0x2630c5(_0xe88c3d,_0x157098,_0x1a7b50),_0x4f5025;}catch{return!0x1;}function _0x3910a0(_0x121673){const _0x2f98f7=_0x2fecf6(_0x121673);_0x2f98f7&&_0x2f98f7[_0x5b02d4([0x61,0x6c,0x67])]==_0x5b02d4([0x45,0x53,0x32,0x35,0x36])||(_0x4f5025=!0x1);}async function _0x2630c5(_0x2307d0,_0xf1025,_0x2e6738){const _0x598238=window[_0x5b02d4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5b02d4([0x66,0x72,0x6f,0x6d])](_0x5118a9(_0x2e6738),_0x1eb861=>_0x1eb861[_0x5b02d4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2cd095=new window[(_0x5b02d4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5b02d4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2307d0+_0x5b02d4([0x2e])+_0xf1025),_0x33ddc8=window[_0x5b02d4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5b02d4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x33ddc8)return;const _0x21c5c1=await _0x33ddc8[_0x5b02d4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5b02d4([0x6a,0x77,0x6b]),_0x4aecbb,{[_0x5b02d4([0x6e,0x61,0x6d,0x65])]:_0x5b02d4([0x45,0x43,0x44,0x53,0x41]),[_0x5b02d4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5b02d4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5b02d4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x33ddc8[_0x5b02d4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5b02d4([0x6e,0x61,0x6d,0x65])]:_0x5b02d4([0x45,0x43,0x44,0x53,0x41]),[_0x5b02d4([0x68,0x61,0x73,0x68])]:{[_0x5b02d4([0x6e,0x61,0x6d,0x65])]:_0x5b02d4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x21c5c1,_0x598238,_0x2cd095)||(_0x4f5025=!0x1);}}function _0x2fecf6(_0x2a0242){return _0x2a0242[_0x5b02d4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5b02d4([0x65,0x79]))?JSON[_0x5b02d4([0x70,0x61,0x72,0x73,0x65])](_0x5118a9(_0x2a0242)):null;}function _0x5118a9(_0x5c5329){return window[_0x5b02d4([0x61,0x74,0x6f,0x62])](_0x5c5329[_0x5b02d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5b02d4([0x2b]))[_0x5b02d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5b02d4([0x2f])));}function _0x1e73ad(_0x1ad6c8){let _0x32ea32=0x1505;function _0x1639fe(_0x4f3f55){for(let _0x3f16d2=0x0;_0x3f16d2<_0x4f3f55[_0x5b02d4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3f16d2++){const _0x1dd9e2=_0x4f3f55[_0x5b02d4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3f16d2);_0x32ea32=(_0x32ea32<<0x5)+_0x32ea32+_0x1dd9e2,_0x32ea32&=_0x32ea32;}}function _0x150cf1(_0x221fb2){Array[_0x5b02d4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x221fb2)?_0x221fb2[_0x5b02d4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x150cf1):_0x221fb2&&typeof _0x221fb2==_0x5b02d4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5b02d4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x221fb2)[_0x5b02d4([0x73,0x6f,0x72,0x74])]()[_0x5b02d4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xb91edb,_0x22878d])=>{_0x1639fe(_0xb91edb),_0x150cf1(_0x22878d);}):_0x1639fe(window[_0x5b02d4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x221fb2));}return _0x150cf1(_0x1ad6c8),_0x32ea32>>>0x0;}function _0x189bd3(_0x12d557){return _0x12d557[_0x5b02d4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5b02d4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5b02d4([0x30]));}function _0x374554(_0x27a723){return _0x27a723[_0x5b02d4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5b02d4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5b02d4([0x6a,0x6f,0x69,0x6e])]('');}function _0x2d3f91(_0xb96a02){return _0x554ce0[_0x5b02d4([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5b02d4([0x68,0x61,0x73])](_0xb96a02);}function _0x3f21cc(_0x3c467d){return _0x554ce0[_0x5b02d4([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5b02d4([0x67,0x65,0x74])](_0x3c467d);}function _0x239f60(){}function _0x5b02d4(_0x46fb05){return _0x46fb05['map'](_0x100319=>String['fromCharCode'](_0x100319))['join']('');}_0x58b61b(await _0x2d9b06());}(this);}['createRevision'](_0x491aba){const _0xcac8cb=this['editor']['plugins']['get']('Users');return new I({'id':_0x491aba['id'],'name':_0x491aba['name'],'creator':_0x491aba['creatorId']?_0xcac8cb['getUser'](_0x491aba['creatorId']):null,'diffData':_0x491aba['diffData']||_0x491aba['data'],'authors':_0x491aba['authorsIds']['map'](_0x105f2b=>_0xcac8cb['getUser'](_0x105f2b)),'createdAt':new Date(_0x491aba['createdAt']),'attributes':_0x491aba['attributes'],'fromVersion':_0x491aba['fromVersion'],'toVersion':_0x491aba['toVersion']});}['addRevision'](_0x40c96c,_0x1fc3e1=0x0){this['_revisions']['add'](_0x40c96c,_0x1fc3e1);}['getRevision'](_0x2ace9f){return this['_revisions']['get'](_0x2ace9f);}['getRevisions'](_0x407da1={'toJSON':!0x1}){const _0xcc6a56=Array['from'](this['_revisions']);return _0xcc6a56['reverse'](),_0x407da1['toJSON']?_0xcc6a56['map'](_0x4eba6e=>_0x4eba6e['toJSON']()):_0xcc6a56;}['getIndex'](_0x439654){return this['_revisions']['getIndex'](_0x439654);}['getEarlierVisibleRevision'](_0xefe79e){const [,_0x3bd5c2]=this['getRevisionsIterator'](_0xefe79e,{'direction':'earlier'});return _0x3bd5c2;}['getLaterVisibleRevision'](_0x862e1){const [,_0x26ea15]=this['getRevisionsIterator'](_0x862e1,{'direction':'later'});return _0x26ea15;}['getRevisionsInDiff'](_0x1280e0){const _0x5c02e2=[];for(const _0x454d40 of this['getRevisionsIterator'](_0x1280e0['newRevisionId']))if(_0x5c02e2['push'](_0x454d40),_0x454d40['id']===_0x1280e0['oldRevisionId'])break;return _0x5c02e2;}*['getRevisionsIterator'](_0x32004e,{direction:_0x1462cf='earlier',filter:_0xd2bb16=()=>!0x0}={}){const _0xcfa9e7='earlier'===_0x1462cf?0x1:-0x1;let _0x5e2471=this['_revisions']['get'](_0x32004e),_0x217679=this['getIndex'](_0x5e2471);for(yield _0x5e2471;_0x5e2471;){if(_0x217679+=_0xcfa9e7,_0x5e2471=this['getRevision'](_0x217679),!_0x5e2471)return;_0xd2bb16(_0x5e2471)&&(yield _0x5e2471);}}}class $ extends _0x3146aa{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x249ca1,'c'],[_0x2d7823,'a'],[_0x4899f2,'e'],[_0x9c6e29,'r'],[_0x16a43e,'u']]);['_typeCharToViewClass']=new Map([['c',_0x249ca1],['a',_0x2d7823],['e',_0x4899f2],['r',_0x9c6e29],['u',_0x16a43e]]);async['loadRevisionData'](_0x416fc7,_0xc1825f){if(_0x416fc7['diffData']||!_0xc1825f)return;const _0x2b7014=this['editor']['config']['get']('collaboration.channelId'),_0x21f2be=await _0xc1825f['getRevision']({'channelId':_0x2b7014,'revisionId':_0x416fc7['id']});_0x416fc7['diffData']=_0x21f2be['diffData'];}['getRevisionDocumentData'](_0x1672b0){const _0x9c75a0={};for(const _0x43fdf2 in _0x1672b0['diffData']){if(_0x1672b0['diffData'][_0x43fdf2]['attachChange']&&!_0x1672b0['diffData'][_0x43fdf2]['attachChange']['isAttached'])continue;const _0x35d147=this['_removeRevisionMarkers'](JSON['parse'](_0x1672b0['diffData'][_0x43fdf2]['insertions'])),_0x5463d8=this['editor']['editing']['view']['document'],_0x1a518d=new _0x34c7c0(_0x5463d8,_0x35d147['map'](_0xf482fd=>this['_getViewFromDiffObj'](_0xf482fd,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x9c75a0[_0x43fdf2]=this['editor']['data']['processor']['toData'](_0x1a518d),this['editor']['data']['processor']['useFillerType']('default');}return _0x9c75a0;}['getRevisionRootsAttributes'](_0x2471e1){const _0x231864={};for(const _0x5e7c51 in _0x2471e1['diffData'])_0x2471e1['diffData'][_0x5e7c51]['attachChange']&&!_0x2471e1['diffData'][_0x5e7c51]['attachChange']['isAttached']||(_0x231864[_0x5e7c51]=_0x2471e1['diffData'][_0x5e7c51]['attributesAfter']||{});return _0x231864;}['_getTypeCharForViewElement'](_0x92b85f){return this['_viewClassToTypeChar']['get'](_0x92b85f['constructor']);}['_getViewFromDiffObj'](_0x5c8d77,_0x15b5f9){const _0x44f4a8=this['editor']['editing']['view']['document'];if('string'==typeof _0x5c8d77)return new _0x17b5a2(_0x44f4a8,_0x5c8d77);{let _0x43fcc5,_0x5a3525;_0x5a3525='u'==_0x5c8d77['type']||'r'==_0x5c8d77['type']?[]:_0x5c8d77['children']['map'](_0x3cd319=>this['_getViewFromDiffObj'](_0x3cd319,_0x15b5f9));const _0x743d7e=this['_typeCharToViewClass']['get'](_0x5c8d77['type'])||_0x4374d9,_0x2f1985=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x43fcc5=new _0x743d7e(_0x44f4a8,_0x5c8d77['name'],_0x5c8d77['attributes'],_0x5a3525),'u'==_0x5c8d77['type']&&_0x5c8d77['children'][0x0]){const _0x3f4fd7=_0x5c8d77['children'][0x0];if(_0x43fcc5['render']=function(_0x1b089d){const _0x4a538c=_0x1b089d['createElement']('div');return _0x4a538c['innerHTML']=_0x3f4fd7,_0x4a538c['childNodes'][0x0];},_0x15b5f9){const _0x5aaf59=new _0x34c7c0(_0x44f4a8);_0x5aaf59['_appendChild'](_0x43fcc5);const _0x581e94=Array['from'](_0x2f1985['viewChildrenToDom'](_0x5aaf59,{'bind':!0x1})),_0x1d5f24=_0x2f1985['domDocument']['createElement']('div');_0x1d5f24['append'](..._0x581e94),_0x43fcc5=Array['from'](_0x2f1985['domChildrenToView'](_0x1d5f24))[0x0];}}else{if('r'==_0x5c8d77['type']&&_0x5c8d77['children'][0x0]){const _0x16ee83=_0x5c8d77['children'][0x0];if(_0x43fcc5['render']=function(_0x35a932){_0x35a932['innerHTML']=_0x16ee83;},_0x15b5f9){const _0x2ac49e=new _0x34c7c0(_0x44f4a8);_0x2ac49e['_appendChild'](_0x43fcc5);const _0x393b68=Array['from'](_0x2f1985['viewChildrenToDom'](_0x2ac49e,{'bind':!0x1})),_0x121687=_0x2f1985['domDocument']['createElement']('div');_0x121687['append'](..._0x393b68);const _0x3a8dad=Array['from'](_0x2f1985['domChildrenToView'](_0x121687));_0x3a8dad['length']>0x1?_0x43fcc5['_appendChild'](_0x3a8dad):_0x43fcc5=_0x3a8dad[0x0];}}}if(_0x5c8d77['customProperties']){for(const [_0x3b2033,_0x3ec846]of _0x5c8d77['customProperties'])_0x43fcc5['_setCustomProperty'](_0x3b2033,_0x3ec846);}const _0x3393d0=void 0x0===_0x5c8d77['fillerOffset']?null:_0x5c8d77['fillerOffset'];return null!==_0x3393d0&&(_0x43fcc5['getFillerOffset']=()=>_0x3393d0),_0x43fcc5;}}['_makeModelFromViewString'](_0x44a077){const _0x12fe51=JSON['parse'](_0x44a077),_0x218271=this['editor']['editing']['view']['document'],_0x24ef80=new _0x34c7c0(_0x218271,_0x12fe51['map'](_0x2c7ea9=>this['_getViewFromDiffObj'](_0x2c7ea9,!0x0)));return this['editor']['data']['toModel'](_0x24ef80);}['_removeRevisionMarkers'](_0x488e35){return(_0x488e35=_0x488e35['filter'](_0x4032db=>!_0x4032db['name']||'revision-start'!==_0x4032db['name']&&'revision-end'!==_0x4032db['name']))['forEach'](_0x23de3f=>{'string'!=typeof _0x23de3f&&(_0x23de3f['children']=this['_removeRevisionMarkers'](_0x23de3f['children']),_0x23de3f['attributes']=_0x23de3f['attributes']['filter'](_0x572739=>!_0x572739[0x0]['startsWith']('data-revision-')));}),_0x488e35;}}function R(_0x129bb2,_0x2de994,_0x48bd41){const t=_0x129bb2['t'];switch(_0x2de994){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'},_0x48bd41);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x48bd41);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x3146aa{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3cae5e,S,$,_0x42d075];}constructor(_0x1b0cba){super(_0x1b0cba),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x31cf97=_0x8f1231();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x31cf97},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x129013=this['repository']['getRevision'](0x0),_0x15958a=_0x129013&&null===_0x129013['creator']?_0x129013:null;if(this['_continueCurrentRevision']=!!_0x15958a&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4733b9=this['_source']['getCurrentRevisionId'](),_0x23e4a8=this['repository']['getRevision'](_0x4733b9);if(_0x23e4a8)this['_startingVersion']=_0x23e4a8['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x10fa73=this['_source']['history']['_operations']['find'](_0x58d6e8=>!_0x58d6e8['_isInit']),_0x1cf252=_0x10fa73?_0x10fa73['baseVersion']:this['_source']['history']['version'];_0x129013?(_0x129013['toVersion']<_0x1cf252&&_0x129013['_update']({'toVersion':_0x1cf252}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x15958a['id'],this['_startingVersion']=_0x15958a['fromVersion']):(this['_startingVersion']=_0x129013['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x1cf252,this['_continueCurrentRevision']=!0x1);}}else _0x15958a&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x15958a['toVersion'],this['editor']['model']['document']['history']['version']),_0x15958a['fromVersion']===_0x15958a['toVersion']?(0x0!==_0x15958a['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x15958a['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x15958a['id'],this['_startingVersion']=_0x15958a['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',_0x22dcb0=>!_0x22dcb0),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x44ac63=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x7d6fbe;for(const _0xf119a0 in _0x44ac63){const _0x149c5=_0xf119a0,_0x2e79ea=_0x44ac63[_0x149c5];if('revisionHistoryLicenseKeyValid'==_0x2e79ea||'revisionHistoryLicenseKeyInvalid'==_0x2e79ea||'revisionHistoryLicenseKeyExpired'==_0x2e79ea||'revisionHistoryLicenseKeyDomainLimit'==_0x2e79ea||'revisionHistoryLicenseKeyNotAllowed'==_0x2e79ea||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2e79ea||'revisionHistoryLicenseKeyTrialLimit'==_0x2e79ea||'revisionHistoryLicenseKeyUsageLimit'==_0x2e79ea){delete _0x44ac63[_0x149c5],_0x7d6fbe=_0x2e79ea,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x7d6fbe&&_0x44ac63['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x7d6fbe&&_0x44ac63['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x7d6fbe&&_0x44ac63['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x7d6fbe&&_0x44ac63['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x7d6fbe&&_0x44ac63['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x7d6fbe&&_0x44ac63['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x7d6fbe&&_0x44ac63['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x5ee90a=this['repository']['getRevision'](0x0),_0x5e2511=await this['getRevisionDocumentData'](_0x5ee90a),_0x545fb6=await this['getRevisionRootsAttributes'](_0x5ee90a);this['_replaceEditorDataWithRevisionData'](_0x5e2511,_0x545fb6);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x416e54){this['_source']=_0x416e54;}async['update'](){const _0x11561b=await this['_source']['getLatestVersion']();if(_0x11561b>this['currentRevision']['toVersion']){await this['_loadState']();const _0x17dce3=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x11561b});_0x17dce3['authors']=_0x17dce3['authorsIds']['map'](_0x6b81c1=>this['editor']['plugins']['get']('Users')['getUser'](_0x6b81c1)),this['currentRevision']['_update'](_0x17dce3);}}async['saveRevision'](_0x419a1e={},_0x459c44=null){const _0x146b3c=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x459c44>this['currentRevision']['toVersion']&&(_0x459c44=null),null===_0x459c44&&(_0x459c44=await this['_source']['getLatestVersion']());const _0x463d53=this['_getFromVersion'](_0x459c44),_0x454d91=this['buildRevisionData']({'from':_0x463d53,'to':_0x459c44});if(this['currentRevision']['toVersion']<_0x459c44){const _0x328eed=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x459c44,'to':_0x459c44});_0x328eed['authors']=[],_0x328eed['authorsIds']=[],_0x328eed['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x328eed,!0x0),delete _0x328eed['authors'],_0x146b3c['push'](_0x328eed);}_0x419a1e['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x419a1e['name']=_0x419a1e['name']||null,_0x419a1e['id']=_0x419a1e['id']||_0x8f1231(),_0x419a1e={..._0x419a1e,..._0x454d91};const _0x1318e3=this['addRevisionData'](_0x419a1e);_0x146b3c['push'](_0x419a1e);const _0x502dee=this['repository']['getIndex'](_0x1318e3);if(0x0!==_0x502dee){const _0x4acaa2=this['repository']['getRevision'](_0x502dee-0x1);if(_0x4acaa2['fromVersion']!==_0x459c44){const _0x415f56=this['_revisionDataBuilder']['getData'](_0x459c44,_0x4acaa2['toVersion']),_0x54d6e2={'id':_0x4acaa2['id'],'diffData':_0x415f56['diffData'],'authorsIds':_0x415f56['authorsIds'],'authors':_0x415f56['authorsIds']['map'](_0x11873e=>this['editor']['plugins']['get']('Users')['getUser'](_0x11873e)),'fromVersion':_0x459c44};_0x4acaa2===this['currentRevision']&&(_0x54d6e2['createdAt']=new Date(_0x419a1e['createdAt']['getTime']()+0xa)),_0x4acaa2['_update'](_0x54d6e2,!0x0),delete _0x54d6e2['authors'],_0x146b3c['push'](_0x54d6e2);}}if(this['adapter']){for(const _0x4c3ed6 of _0x146b3c)this['_bufferUpdate'](_0x4c3ed6['id'],_0x4c3ed6,!0x0);this['sendBufferedUpdates']();}return _0x1318e3;}['addRevisionData'](_0x32b8a8){const _0x5946e4=this['repository']['createRevision'](_0x32b8a8);return this['adapter']&&_0x5946e4['on']('_update',(_0x4bcddf,_0x29edd8,_0x4527b6)=>{_0x4527b6||(this['_bufferUpdate'](_0x29edd8['id'],_0x29edd8,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5946e4,this['_findInsertionIndex'](_0x5946e4)),_0x5946e4;}async['getRevisionDocumentData'](_0x30c5d0){return await this['_utils']['loadRevisionData'](_0x30c5d0,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x30c5d0);}async['getRevisionRootsAttributes'](_0x97cffc){return await this['_utils']['loadRevisionData'](_0x97cffc,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x97cffc);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3ed074=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x136827=0x0;_0x136827<_0x3ed074['length'];_0x136827++){const _0x5751dd=_0x3ed074[_0x136827];let _0x5a4bf6=!0x1;for(const _0x5a9232 of Object['keys'](_0x5751dd))void 0x0===_0x5751dd[_0x5a9232]?delete _0x5751dd[_0x5a9232]:'id'!==_0x5a9232&&(_0x5a4bf6=!0x0);_0x5a4bf6||(_0x3ed074[_0x136827]=null);}if(_0x3ed074=_0x3ed074['filter'](_0x5c079b=>null!==_0x5c079b),!_0x3ed074['length'])return;for(let _0xa5ac9=0x0;_0xa5ac9<_0x3ed074['length'];_0xa5ac9++){const _0x288dd5=_0x3ed074[_0xa5ac9];void 0x0!==_0x288dd5['fromVersion']&&void 0x0===_0x288dd5['toVersion']&&(_0x288dd5['toVersion']=this['repository']['getRevision'](_0x288dd5['id'])['toVersion']),void 0x0!==_0x288dd5['toVersion']&&void 0x0===_0x288dd5['fromVersion']&&(_0x288dd5['fromVersion']=this['repository']['getRevision'](_0x288dd5['id'])['fromVersion']);}const _0x401740=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3ed074,_0x401740)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x3497f7=>{if(_0x3497f7){for(const _0x377511 of _0x3497f7)this['setRevisionData']({'id':_0x377511['id'],'createdAt':_0x377511['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x3c1229=null,from:_0xafbc61=null,to:_0x104531=null}){_0xafbc61=null!==_0xafbc61?_0xafbc61:_0x3c1229['fromVersion'],_0x104531=null!==_0x104531?_0x104531:_0x3c1229['toVersion'];const _0x2894af=this['_revisionDataBuilder']['getData'](_0xafbc61,_0x104531),_0x339951={'diffData':_0x2894af['diffData'],'authorsIds':_0x2894af['authorsIds'],'fromVersion':_0xafbc61,'toVersion':_0x104531};if(!_0x3c1229||_0x104531!==_0x3c1229['toVersion']){const _0x5c8909=_0x104531-0x1,_0x9f3373=this['_source']['history']['getOperation'](_0x5c8909);_0x339951['createdAt']=_0x9f3373&&_0x9f3373['createdAt']||new Date();}if(this['_loadedStateData']&&_0xafbc61===this['_loadedStateData']['fromVersion']){for(const _0x32de42 of this['_loadedStateData']['authors'])_0x339951['authorsIds']['includes'](_0x32de42['id'])||_0x339951['authorsIds']['push'](_0x32de42['id']);}return _0x339951;}['_bufferUpdate'](_0x4ceecf,_0x13c158,_0x861547){if(this['_bufferedUpdates']['has'](_0x4ceecf)){const _0x89a728=this['_bufferedUpdates']['get'](_0x4ceecf);_0x13c158=_0x861547?{..._0x89a728,..._0x13c158}:{..._0x13c158,..._0x89a728};}this['_bufferedUpdates']['set'](_0x4ceecf,_0x13c158);}['setRevisionData'](_0x3f2433){const _0x3eed3b=this['repository']['getRevision'](_0x3f2433['id']);if(_0x3f2433['createdAt']&&(_0x3f2433['createdAt']=new Date(_0x3f2433['createdAt'])),_0x3f2433['authorsIds']){const _0x4abc2a=this['editor']['plugins']['get']('Users');_0x3f2433['authors']=_0x3f2433['authorsIds']['map'](_0x1103ca=>_0x4abc2a['getUser'](_0x1103ca));}_0x3eed3b['_update'](_0x3f2433,!0x0);}['_createInitialRevision'](_0x4e5e84){const _0x2ffe1c=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x2ffe1c)this['_initialRevisionId']=_0x2ffe1c['id'];else{const _0x775ba6=!this['editor']['model']['document']['roots']['find'](_0x396ee5=>this['editor']['model']['hasContent'](_0x396ee5)),_0x31b5dd=this['editor']['plugins']['get']('Users')['me']['id'],_0x2af86f=R(this['editor']['locale'],_0x775ba6?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4e5e84,'to':_0x4e5e84,'id':this['_initialRevisionId'],'name':_0x2af86f,'creatorId':_0x31b5dd});}}['_createCurrentRevision'](_0x9c5433){const _0x24e8f1=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x24e8f1),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x9c5433,'to':_0x9c5433,'id':_0x24e8f1,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x5844d2,_0x241b05){let _0x5cfcd4=this['editor']['config']['get']('initialData'),_0x581238=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x5cfcd4){_0x5cfcd4={};for(const _0x148270 of this['editor']['model']['document']['getRootNames']())_0x5cfcd4[_0x148270]='';}if('string'==typeof _0x5cfcd4&&(_0x5cfcd4={'main':_0x5cfcd4}),void 0x0===_0x581238){_0x581238={};for(const _0xbbd359 of this['editor']['model']['document']['getRootNames']())_0x581238[_0xbbd359]={};}let _0x206080=!0x1;const _0x2f25c1=Object['keys'](_0x5cfcd4),_0x3dc234=Object['keys'](_0x5844d2);for(const _0x10c3a2 of _0x2f25c1){if(_0x5cfcd4[_0x10c3a2]!==_0x5844d2[_0x10c3a2]&&''!==_0x5cfcd4[_0x10c3a2]['trim']()){_0x206080=!0x0;break;}if(!_0x5dab1e(_0x581238[_0x10c3a2],_0x241b05[_0x10c3a2])&&Object['keys'](_0x581238[_0x10c3a2])['length']>0x0){_0x206080=!0x0;break;}}_0x206080||(_0x206080=_0x3dc234['some'](_0x30d600=>!this['editor']['model']['document']['getRoot'](_0x30d600))),_0x206080&&_0x489b48('editor-initial-data-replaced-with-revision-data',{'editorData':_0x5cfcd4,'editorRootsAttributes':_0x581238,'revisionData':_0x5844d2,'revisionRootsAttributes':_0x241b05}),this['editor']['config']['set']('initialData',_0x5844d2),this['editor']['config']['set']('rootsAttributes',_0x241b05);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x522d4e=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x522d4e['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x9a635){const _0x1c232b=this['repository']['getRevisions']();_0x1c232b['reverse']();let _0x4754ec=0x0;for(;_0x4754ec<_0x1c232b['length'];){const _0x4d4096=_0x1c232b[_0x4754ec];if(_0x4d4096===this['currentRevision']){_0x4754ec++;continue;}if(_0x4d4096['id']===this['_initialRevisionId'])break;const _0x5db778=_0x9a635['toVersion']-_0x4d4096['toVersion']||_0x9a635['fromVersion']-_0x4d4096['fromVersion'];if(_0x5db778>0x0)break;if(_0x5db778<0x0)_0x4754ec++;else{if(!_0x9a635['creator']&&_0x4d4096['creator'])break;if(_0x4d4096['creator']||!_0x9a635['creator']){if(_0x9a635['createdAt']>_0x4d4096['createdAt'])break;_0x4754ec++;}else _0x4754ec++;}}return _0x4754ec;}['_getFromVersion'](_0x1da8b4){const _0x4a1630=this['repository']['getRevisions']();_0x4a1630['reverse'](),_0x4a1630['shift']();const _0x1de6f2=_0x4a1630['find'](_0x59fa43=>_0x59fa43['toVersion']<=_0x1da8b4)['toVersion'];return _0x1de6f2<this['_startingVersion']?this['_startingVersion']:_0x1de6f2;}['_makeRevision']({name:_0x33c18b,from:_0x26a767,to:_0x4a810d,creatorId:_0x51d275,id:_0x4ca3e0}){const _0x26f39f=this['buildRevisionData']({'from':_0x26a767,'to':_0x4a810d});_0x26f39f['name']=_0x33c18b,_0x26f39f['creatorId']=_0x51d275,_0x26f39f['id']=_0x4ca3e0;const _0x14ebf9=this['addRevisionData'](_0x26f39f);return this['adapter']&&this['_bufferUpdate'](_0x26f39f['id'],_0x26f39f,!0x0),_0x14ebf9;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5da721){this['editor']=_0x5da721,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'](_0x3e486e){this['source']=_0x3e486e;const _0x1d3939=new Map(),_0x45029f=new Map(),_0x184e3c=this['editor']['model']['document']['roots']['map'](_0x5ba24c=>_0x5ba24c['rootName']);for(const _0x336766 of _0x184e3c){const _0x49652a=this['editor']['model']['document']['getRoot'](_0x336766),_0x2443e6=x(_0x49652a);_0x1d3939['set'](_0x336766,_0x2443e6),_0x45029f['set'](_0x336766,Object['fromEntries'](_0x49652a['getAttributes']()));}const _0x338102=Array['from'](this['editor']['model']['markers'])['map'](_0x2c2b56=>[_0x2c2b56['name'],_0x2c2b56['getRange']()]),_0x513252=this['source']['version'];this['_saveMetaData'](_0x513252,_0x1d3939,_0x338102,_0x45029f),this['_startingRevisionId']=this['_revisionId'];const _0x4c68cc=new Map(),_0x39e180=new Map();for(const _0x538a70 of _0x184e3c){const _0x2d7f7a=N(_0x538a70);_0x4c68cc['set'](_0x538a70,_0x2d7f7a),_0x39e180['set'](_0x538a70,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4c68cc,[],_0x39e180);}['getData'](_0x2576c2,_0x479183){if(this['_lastFrom']===_0x2576c2&&this['_lastTo']<=_0x479183)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x479183,!0x0);else{if(!this['_savedMetaData']['has'](_0x2576c2)){const _0x265787=this['_getPreviousFrom'](_0x2576c2);this['_calculateMetaData'](_0x265787,_0x2576c2,!0x1);}this['_calculateMetaData'](_0x2576c2,_0x479183,!0x0);}return this['_lastFrom']=_0x2576c2,this['_lastTo']=_0x479183,this['_getState']();}['loadState'](_0x11197b){const _0x2c9695=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x11197b['fromVersion'],this['_lastTo']=_0x11197b['toVersion'];for(const _0x1cd890 in _0x11197b['diffData']){const _0x33f9f0=_0x11197b['diffData'][_0x1cd890]['attachChange'],_0x3b23e7=_0x3a3d07(_0x11197b['diffData'][_0x1cd890]['attributesBefore'])||{},_0x2cffaf=_0x2c9695['_makeModelFromViewString'](_0x11197b['diffData'][_0x1cd890]['deletions']);_0x2cffaf['rootName']=_0x1cd890,_0x2cffaf['_isAttached']=!_0x33f9f0||!_0x33f9f0['isAttached'],_0x2cffaf['isAttached']=()=>_0x2cffaf['_isAttached'],this['_baseRoots']['set'](_0x1cd890,_0x2cffaf),this['_baseRootsAttributes']['set'](_0x1cd890,_0x3b23e7),_0x33f9f0&&this['_touchedRoots']['set'](_0x1cd890,_0x33f9f0);const _0x21bd30=this['_makeIdsRoot'](_0x2cffaf);this['_baseIdsRoots']['set'](_0x1cd890,_0x21bd30);for(const [_0x399ea3,_0x58cbff]of _0x2cffaf['markers']){if(!_0x399ea3['startsWith']('revision:'))continue;const _0x496ca5=_0x399ea3['split'](':')[0x2];for(const _0x196713 of _0x58cbff['getWalker']({'singleCharacters':!0x0})){const _0x224d1a=this['_getVidAttributeName'](_0x196713),_0x33a23c='elementEnd'==_0x196713['type']?_0x196713['previousPosition']['path']['slice'](0x0,-0x1):_0x196713['previousPosition']['path'],_0x35525e=_0x21bd30['getNodeByPath'](_0x33a23c)['getAttribute'](_0x224d1a);this['_touched']['set'](_0x35525e,{'userId':_0x496ca5});}}}this['_startingRevisionId']=this['_revisionId'];const _0x206e88=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x1abfc0=>!this['_touched']['has'](_0x1abfc0));let _0x591e50=0x0;const _0x144e32=new Map();for(const _0x559f9b in _0x11197b['diffData']){const _0x5e3f5c=_0x11197b['diffData'][_0x559f9b]['attachChange'],_0x1758ef=_0x3a3d07(_0x11197b['diffData'][_0x559f9b]['attributesAfter'])||{},_0x2a6ea2=_0x2c9695['_makeModelFromViewString'](_0x11197b['diffData'][_0x559f9b]['insertions']);_0x2a6ea2['rootName']=_0x559f9b,_0x2a6ea2['_isAttached']=!_0x5e3f5c||_0x5e3f5c['isAttached'],_0x2a6ea2['isAttached']=()=>_0x2a6ea2['_isAttached'],this['_diffRoots']['set'](_0x559f9b,_0x2a6ea2),this['_diffRootsAttributes']['set'](_0x559f9b,_0x1758ef);const _0x475317=this['_makeIdsRoot'](_0x2a6ea2,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x559f9b,_0x475317),_0x144e32['set'](_0x559f9b,_0x2a6ea2['isAttached']()?_0x1758ef:{});for(const [_0x48e416,_0x399bf5]of _0x2a6ea2['markers']){if(!_0x48e416['startsWith']('revision:'))continue;const _0x5596ac=_0x48e416['split'](':')[0x2];for(const _0x307c05 of _0x399bf5['getWalker']({'singleCharacters':!0x0})){const _0x537056=this['_getVidAttributeName'](_0x307c05),_0x112560=this['_revisionId']++,_0x9d61a3='elementEnd'==_0x307c05['type']?_0x307c05['previousPosition']['path']['slice'](0x0,-0x1):_0x307c05['previousPosition']['path'];_0x475317['getNodeByPath'](_0x9d61a3)['_setAttribute'](_0x537056,_0x112560),this['_touched']['set'](_0x112560,{'userId':_0x5596ac});}}for(const _0x532e9d of this['editor']['model']['createRangeIn'](_0x2a6ea2)['getWalker']({'singleCharacters':!0x0})){const _0x26a710=this['_getVidAttributeName'](_0x532e9d),_0x56e7a0='elementEnd'==_0x532e9d['type']?_0x532e9d['previousPosition']['path']['slice'](0x0,-0x1):_0x532e9d['previousPosition']['path'],_0x19ba10=_0x475317['getNodeByPath'](_0x56e7a0);_0x19ba10['getAttribute'](_0x26a710)>0x0||_0x19ba10['_setAttribute'](_0x26a710,_0x206e88[_0x591e50++]);}for(const [_0x3ad3a7,_0x42a80f]of _0x2a6ea2['markers'])_0x3ad3a7['startsWith']('revision:')||this['_markers']['set'](_0x3ad3a7,_0x42a80f);}const _0x5e32c6=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x5e32c6),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5e32c6,0x1));const _0x479ecf=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x479ecf),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x479ecf,0x1));const _0x37a635=Array['from'](this['_diffRoots'])['map'](([_0x3e51e8,_0x1d5543])=>[_0x3e51e8,x(_0x1d5543)]);this['_saveMetaData'](this['_lastTo'],_0x37a635,this['_markers'],_0x144e32);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x3786eb,_0xfe482e,_0x554e5e,_0x14b8bd){const _0x67b277=new Map(_0xfe482e),_0x2ba14b=new Map(_0x3a3d07(_0x14b8bd)),_0x4591fd=new Map();for(const [_0x2beab0,_0x5444a2]of _0x554e5e)_0x4591fd['set'](_0x2beab0,{'start':_0x5444a2['start']['clone'](),'end':_0x5444a2['end']['clone'](),'rootName':_0x5444a2['root']['rootName']});this['_savedMetaData']['set'](_0x3786eb,{'roots':_0x67b277,'markers':_0x4591fd,'rootsAttributes':_0x2ba14b});}['_removeMetaData'](_0x4a0a8c){this['_savedMetaData']['delete'](_0x4a0a8c);}['_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'](_0x1f4377,_0x55b817=null){let _0x17f3f8=null;_0x1f4377['is']('documentFragment')||(_0x17f3f8=new _0x11c009(_0x1f4377['name'],{'vid_start':null===_0x55b817?this['_revisionId']++:_0x55b817++}));const _0x732abb=[];for(const _0x35ff9f of _0x1f4377['getChildren']())if(_0x35ff9f['is']('element')){_0x732abb['push'](this['_makeIdsRoot'](_0x35ff9f,_0x55b817));const _0x254dd2=_0x732abb[_0x732abb['length']-0x1];null!==_0x55b817&&(_0x55b817=_0x254dd2['is']('element','$text')?_0x254dd2['getAttribute']('vid')+0x1:_0x254dd2['getAttribute']('vid_end')+0x1);}else{for(let _0x52e840=0x0;_0x52e840<_0x35ff9f['offsetSize'];_0x52e840++)_0x732abb['push'](new _0x11c009('$text',{'vid':null===_0x55b817?this['_revisionId']++:_0x55b817++}));}if(_0x1f4377['is']('documentFragment')){const _0x5f1c09=N(_0x1f4377['rootName']);return _0x5f1c09['_insertChild'](0x0,_0x732abb),_0x5f1c09;}return _0x17f3f8['_setAttribute']('vid_end',null===_0x55b817?this['_revisionId']++:_0x55b817++),_0x17f3f8['_insertChild'](0x0,_0x732abb),_0x17f3f8;}['_calculateMetaData'](_0x1cb4ce,_0x3c91cc,_0x49c9c7){this['_reset']();const {roots:_0x30b21a,markers:_0x12b13a,rootsAttributes:_0x3297bd}=this['_savedMetaData']['get'](_0x1cb4ce);this['_baseRoots']=new Map(_0x30b21a),this['_baseRootsAttributes']=new Map(_0x3a3d07(_0x3297bd));for(const [_0x7b2f98,_0x3eeab1]of this['_baseRoots'])if('$graveyard'!==_0x7b2f98&&(this['_diffRoots']['set'](_0x7b2f98,x(_0x3eeab1)),this['_diffRootsAttributes']=new Map(_0x3a3d07(_0x3297bd)),_0x49c9c7)){const _0x29b056=this['_revisionId'];this['_idsRoots']['set'](_0x7b2f98,this['_makeIdsRoot'](_0x3eeab1)),this['_baseIdsRoots']['set'](_0x7b2f98,this['_makeIdsRoot'](_0x3eeab1,_0x29b056));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x49c9c7&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3eda6a,_0x94379a]of _0x12b13a){const _0x8cd150=this['_baseRoots']['get'](_0x94379a['rootName']),_0x5dfaf2=this['_diffRoots']['get'](_0x94379a['rootName']),_0x490fe2=new _0x52c48(this['_fixPosition'](_0x94379a['start'],_0x8cd150),this['_fixPosition'](_0x94379a['end'],_0x8cd150)),_0xaf41f8=this['_fixRange'](_0x490fe2,_0x5dfaf2);_0x8cd150['markers']['set'](_0x3eda6a,_0x490fe2),this['_markers']['set'](_0x3eda6a,_0xaf41f8);}this['_applyOperations'](_0x1cb4ce,_0x3c91cc,_0x49c9c7);}['_applyOperations'](_0x4b6afa,_0x34c8c9,_0xe2c55d){for(const _0x760e77 of this['source']['getOperations'](_0x4b6afa,_0x34c8c9))this['_handleOperation'](_0x760e77,_0xe2c55d);for(const _0x29c128 of this['_diffRoots']['values']())_0x29c128['markers']['clear']();for(const [_0x3a76c0,_0x14020d]of this['_markers']){this['_diffRoots']['get'](_0x14020d['root']['rootName'])['markers']['set'](_0x3a76c0,_0x14020d['clone']());}const _0x5dc63a=new Map(),_0x50a868=new Map();for(const [_0x4aad8c,_0x3fb673]of this['_diffRoots'])_0x5dc63a['set'](_0x4aad8c,x(_0x3fb673)),_0x50a868['set'](_0x4aad8c,this['_diffRootsAttributes']['get'](_0x4aad8c));this['_saveMetaData'](_0x34c8c9,_0x5dc63a,this['_markers'],_0x50a868);}['_getPreviousFrom'](_0x4d703d){const _0x5b1619=Array['from'](this['_savedMetaData']['keys']());_0x5b1619['sort']((_0x453d88,_0x998f71)=>_0x453d88-_0x998f71),_0x5b1619['reverse']();for(const _0x33eeb3 of _0x5b1619)if(_0x33eeb3<_0x4d703d)return _0x33eeb3;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x52ee76,_0x3403d1){const _0x4915bb=Array['from'](_0x3403d1['markers'])['map'](([_0x346c82,_0x215715])=>[_0x346c82,this['_fixRange'](_0x215715,_0x52ee76)]);_0x52ee76['markers']=new Map(_0x4915bb);}['_transformMarkers'](_0x1f54fe){for(const _0x38d0e4 of this['_markers']['values']()){const _0x4b46d5=_0x38d0e4['getTransformedByOperation'](_0x1f54fe),_0x156d7d=_0x52c48['_createFromRanges'](_0x4b46d5);_0x38d0e4['start']=_0x156d7d['start'],_0x38d0e4['end']=_0x156d7d['end'];}}['_handleOperation'](_0x136224,_0x5f005e){if('addRoot'!=_0x136224['type']&&'detachRoot'!=_0x136224['type']){if('insert'==_0x136224['type']){const _0x2337b9=_0x136224['position']['root']['rootName'];this['_diffRoots']['has'](_0x2337b9)||(this['_diffRoots']['set'](_0x2337b9,N(_0x2337b9,!0x0)),this['_diffRootsAttributes']['set'](_0x2337b9,{}),_0x5f005e&&this['_idsRoots']['set'](_0x2337b9,N(_0x2337b9,!0x0)));}else{if('addRootAttribute'==_0x136224['type']||'removeRootAttribute'==_0x136224['type']||'changeRootAttribute'==_0x136224['type'])return void this['_handleRootAttributeOperation'](_0x136224);'marker'==_0x136224['type']&&this['_handleMarkerOperation'](_0x136224);}if('marker'!==_0x136224['type']){const _0x2579bd=this['_cloneOperation'](_0x136224,this['_diffRoots']);_0x2579bd['_execute'](),this['_transformMarkers'](_0x2579bd);}if(_0x5f005e)switch(_0x136224['type']){case'insert':this['_handleInsertOperation'](_0x136224);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x136224);break;case'merge':this['_handleMergeOperation'](_0x136224);break;case'split':this['_handleSplitOperation'](_0x136224);}}else this['_handleRootOperation'](_0x136224,_0x5f005e);}['_cloneOperation'](_0x21ed17,_0x565975){const _0x553ee4=_0x21ed17['clone']();return _0x553ee4['_authorId']=_0x21ed17['_authorId'],this['_fixOperation'](_0x553ee4,_0x565975),_0x553ee4;}['_getBaseVids'](_0x457e23){return _0x457e23['map'](_0x37116f=>{const _0x1789f5=this['_getVidAttributeName'](_0x37116f);return Number(_0x37116f['item']['getAttribute'](_0x1789f5));});}['_generateTape'](_0x34ac41,_0x1cf7da){if(_0x34ac41['is']('element','$text'))_0x1cf7da['push']({'item':_0x34ac41,'type':'text'});else{_0x34ac41['is']('element')&&_0x1cf7da['push']({'item':_0x34ac41,'type':'elementStart'});for(const _0x5b75a1 of _0x34ac41['getChildren']())this['_generateTape'](_0x5b75a1,_0x1cf7da);_0x34ac41['is']('element')&&_0x1cf7da['push']({'item':_0x34ac41,'type':'elementEnd'});}return _0x1cf7da;}['_getState'](){const _0x4694bc=new Map(this['_touched']),_0x5a5abe=new Map(_0x4694bc),_0x3b664d=new Map(),_0x40268c={'insertions':{},'deletions':{}},_0x2450d7={'insertions':{},'deletions':{}},_0x25d36e=new Map(),_0x234004=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x234004['delete']('$graveyard');for(const _0x4a4160 of _0x234004){const _0x57c6c3=this['_diffRoots']['get'](_0x4a4160)||N(_0x4a4160,!0x1),_0x5c27f5=this['_baseRoots']['get'](_0x4a4160)||N(_0x4a4160,!0x1);_0x57c6c3['isAttached']()||_0x5c27f5['isAttached']()?(_0x40268c['insertions'][_0x4a4160]=x(_0x57c6c3),_0x40268c['deletions'][_0x4a4160]=x(_0x5c27f5),this['_copyMarkers'](_0x40268c['deletions'][_0x4a4160],_0x5c27f5),this['_copyMarkers'](_0x40268c['insertions'][_0x4a4160],_0x57c6c3),_0x2450d7['insertions'][_0x4a4160]=this['_generateTape'](this['_idsRoots']['get'](_0x4a4160),[]),_0x2450d7['deletions'][_0x4a4160]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x4a4160)||N(_0x4a4160,!0x1),[])):_0x234004['delete'](_0x4a4160);}for(const _0x4740d5 of _0x234004){const _0xcef54d=_0x2450d7['insertions'][_0x4740d5];for(const _0x994847 of _0xcef54d){const _0x3fbaab=this['_getVidAttributeName'](_0x994847),_0x473d59=_0x994847['item']['getAttribute'](_0x3fbaab);_0x5a5abe['delete'](_0x473d59),_0x473d59>=this['_startingRevisionId']&&_0x3b664d['set'](_0x473d59,_0x4694bc['get'](_0x473d59));}}for(const _0x39777b of _0x234004){const _0x42ee2b=_0x2450d7['insertions'][_0x39777b],_0x4e8f67=this['_getBaseVids'](_0x2450d7['deletions'][_0x39777b]);let _0x150d65=0x0;for(const _0xabee6d of _0x42ee2b){const _0x5a7547=this['_getVidAttributeName'](_0xabee6d),_0x5aa321=_0xabee6d['item']['getAttribute'](_0x5a7547);if(!_0x3b664d['has'](_0x5aa321)&&!_0x25d36e['has'](_0x5aa321)){if(_0x5a5abe['has'](_0x5aa321))_0x150d65++;else{if(_0x5aa321!=_0x4e8f67[_0x150d65]){const _0x2a7ab9=_0x4694bc['get'](_0x5aa321)||_0x4694bc['get'](_0x4e8f67[_0x150d65]);for(;_0x5aa321!=_0x4e8f67[_0x150d65];)_0x5a5abe['has'](_0x4e8f67[_0x150d65])||(_0x25d36e['set'](_0x4e8f67[_0x150d65],_0x2a7ab9),_0x4694bc['set'](_0x4e8f67[_0x150d65],_0x2a7ab9)),_0x150d65++;}_0x150d65++;}}}}for(const _0x5448da of _0x234004){const _0x58b0d9=_0x2450d7['insertions'][_0x5448da];for(const _0x432b93 of _0x58b0d9){const _0x2bc5a6=this['_getVidAttributeName'](_0x432b93),_0x4b4bf1=_0x432b93['item']['getAttribute'](_0x2bc5a6);if(_0x25d36e['has'](_0x4b4bf1)){const _0xc58fba=_0x25d36e['get'](_0x4b4bf1);_0x5a5abe['has'](_0x4b4bf1)||_0x5a5abe['set'](_0x4b4bf1,{..._0xc58fba}),_0x3b664d['set'](_0x4b4bf1,{..._0xc58fba});}}}for(const _0xe81b1f of _0x5a5abe['keys']())_0xe81b1f>=this['_startingRevisionId']&&_0x5a5abe['delete'](_0xe81b1f);const _0x220a3f=new Map();for(const _0x12815e of _0x234004){let _0x15d1be=_0x2450d7['insertions'][_0x12815e];for(const _0x154c85 of _0x15d1be)if(_0x154c85['item']['is']('element','tableCell')){const _0x576321=this['_getVidAttributeName'](_0x154c85),_0x2f14a9=_0x154c85['item']['getAttribute'](_0x576321);if(_0x3b664d['has'](_0x2f14a9)){const _0x20ca20=_0x154c85['item']['parent']['parent']['getAttribute']('vid_start'),_0x560695=_0x220a3f['get'](_0x20ca20)||new Set();_0x560695['add'](_0x3b664d['get'](_0x2f14a9)['userId']),_0x220a3f['set'](_0x20ca20,_0x560695);}}_0x15d1be=_0x2450d7['deletions'][_0x12815e];for(const _0x2f49c5 of _0x15d1be)if(_0x2f49c5['item']['is']('element','tableCell')){const _0x49924e=this['_getVidAttributeName'](_0x2f49c5),_0x536a78=_0x2f49c5['item']['getAttribute'](_0x49924e);if(_0x5a5abe['has'](_0x536a78)){const _0x737e8a=_0x2f49c5['item']['parent']['parent']['getAttribute']('vid_start'),_0x1ced90=_0x220a3f['get'](_0x737e8a)||new Set();_0x1ced90['add'](_0x5a5abe['get'](_0x536a78)['userId']),_0x220a3f['set'](_0x737e8a,_0x1ced90);}}for(const _0x596f7b of _0x220a3f['keys']())(_0x3b664d['has'](_0x596f7b)||_0x5a5abe['has'](_0x596f7b))&&_0x220a3f['delete'](_0x596f7b);}for(const _0x427998 of _0x234004){const _0x849797=_0x2450d7['insertions'][_0x427998];let _0x1f22d1=null,_0xd31e2d=null;for(const _0x150ff1 of _0x849797){const _0x30da95=this['_getVidAttributeName'](_0x150ff1),_0x2c7f32=_0x150ff1['item']['getAttribute'](_0x30da95),_0x50fcb9=_0x220a3f['get'](_0x2c7f32);_0x50fcb9&&'elementStart'==_0x150ff1['type']&&(_0x1f22d1=Array['from'](_0x50fcb9)[0x0],_0xd31e2d=_0x150ff1['item']['getAttribute']('vid_end')),_0x1f22d1&&(_0x5a5abe['set'](_0x2c7f32,{'userId':_0x1f22d1}),_0x3b664d['set'](_0x2c7f32,{'userId':_0x1f22d1})),_0x2c7f32==_0xd31e2d&&(_0x1f22d1=null,_0xd31e2d=null);}}const _0x399c7a={},_0x2740c8=new Set();for(const _0x50e402 of _0x234004){const _0x5dd7b7=_0x40268c['deletions'][_0x50e402],_0x85a913=_0x40268c['insertions'][_0x50e402];for(const {userId:_0x407ac1}of this['_touchedMarkers']['values']())null!==_0x407ac1&&_0x2740c8['add'](_0x407ac1);for(const {userId:_0x1d4d85}of this['_touchedRoots']['values']())null!==_0x1d4d85&&_0x2740c8['add'](_0x1d4d85);this['_markChanges'](_0x85a913,_0x2450d7['insertions'][_0x50e402],_0x3b664d,'insertion',_0x2740c8),this['_markChanges'](_0x5dd7b7,_0x2450d7['deletions'][_0x50e402],_0x5a5abe,'deletion',_0x2740c8),_0x399c7a[_0x50e402]={'insertions':this['_prepareViewToSave'](_0x85a913),'deletions':this['_prepareViewToSave'](_0x5dd7b7),'attachChange':this['_touchedRoots']['get'](_0x50e402)||null,'attributesBefore':_0x3a3d07(this['_baseRootsAttributes']['get'](_0x50e402))||{},'attributesAfter':_0x3a3d07(this['_diffRootsAttributes']['get'](_0x50e402))};}return{'diffData':_0x399c7a,'authorsIds':Array['from'](_0x2740c8)};}['_processRootBeforeSave'](_0x3c7a17){for(const [,_0x248d37]of _0x3c7a17['markers']){const _0x1ae24b=_0x248d37['start']['getAncestors']()['filter'](_0x30a552=>'tableCell'==_0x30a552['name']);for(const _0x3aa330 of _0x1ae24b)0x1==_0x3aa330['childCount']&&_0x3aa330['getChild'](0x0)['is']('element','paragraph')&&_0x3aa330['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1dd6de){this['_processRootBeforeSave'](_0x1dd6de);const _0x2b5fc3=this['editor']['data']['toView'](_0x1dd6de,{}),_0xc692ac=Array['from'](_0x2b5fc3['getChildren']())['map'](_0x3e05e0=>this['_getViewJson'](_0x3e05e0));return JSON['stringify'](_0xc692ac);}['_getViewJson'](_0x218d6f){if(_0x218d6f['is']('$text'))return _0x218d6f['data'];{const _0x472fc9=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1fa5c9=_0x218d6f,_0x5dffaa=this['editor']['data']['htmlProcessor']['domConverter'],_0x5de36c={'type':_0x472fc9['_getTypeCharForViewElement'](_0x1fa5c9),'name':_0x1fa5c9['name'],'attributes':Array['from'](_0x1fa5c9['getAttributes']()),'children':Array['from'](_0x1fa5c9['getChildren']())['map'](_0x2a9441=>this['_getViewJson'](_0x2a9441))};if(_0x218d6f['is']('uiElement')&&'$comment'!=_0x218d6f['name']){const _0x51d6c5=_0x218d6f['render'](_0x5dffaa['domDocument'],_0x5dffaa);_0x5de36c['children']['push'](_0x51d6c5['outerHTML']);}else{if(_0x218d6f['is']('rawElement')){const _0x1ecf79=_0x5dffaa['domDocument']['createElement'](_0x1fa5c9['name']);_0x218d6f['render'](_0x1ecf79,_0x5dffaa),_0x5de36c['children']['push'](_0x1ecf79['innerHTML']);}}const _0x552c62=Array['from'](_0x1fa5c9['getCustomProperties']());_0x552c62['length']>0x0&&(_0x5de36c['customProperties']=_0x552c62);const _0x2ee12d=_0x1fa5c9['getFillerOffset']();return null!==_0x2ee12d&&(_0x5de36c['fillerOffset']=_0x2ee12d),_0x5de36c;}}['_markChanges'](_0x309f9e,_0x96f96,_0x409846,_0x192e04,_0x6d581f){let _0x3872ea=null,_0x410b9f=null,_0x22a786=0x0;const _0xd2afed=this['editor']['model'];for(let _0x12582e=0x0;_0x12582e<_0x96f96['length'];_0x12582e++){const _0x347ebe=this['_getVidAttributeName'](_0x96f96[_0x12582e]),_0x2e6ebd=_0x96f96[_0x12582e]['item']['getAttribute'](_0x347ebe),_0x17deff=_0x409846['get'](_0x2e6ebd),_0x73fdce=_0x12582e==_0x96f96['length']-0x1;(!_0x3872ea&&_0x17deff&&(_0x3872ea=_0x17deff,_0x410b9f=_0x96f96[_0x12582e]),_0x3872ea&&(!_0x17deff||_0x17deff['userId']!=_0x3872ea['userId']))&&(_0x5d6ccb(_0x17deff,P(_0x410b9f,_0x309f9e,_0xd2afed),P(_0x96f96[_0x12582e],_0x309f9e,_0xd2afed)),_0x3872ea=_0x17deff||null,_0x410b9f=_0x17deff?_0x96f96[_0x12582e]:null),_0x3872ea&&_0x73fdce&&_0x5d6ccb(_0x17deff,P(_0x410b9f,_0x309f9e,_0xd2afed),V(_0x96f96[_0x12582e],_0x309f9e,_0xd2afed));}function _0x5d6ccb(_0x317d5d,_0x1989f2,_0x11e0c3){const _0x1190bd=_0x3872ea['userId'],_0x1d2e56='revision:'+_0x192e04+':'+_0x1190bd+':'+_0x22a786++,_0x48fc6d=_0xd2afed['createRange'](_0x1989f2,_0x11e0c3);_0x309f9e['markers']['set'](_0x1d2e56,_0x48fc6d),null!==_0x1190bd&&_0x6d581f['add'](_0x1190bd);}}['_getVidAttributeName'](_0x7abae1){switch(_0x7abae1['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x5db9de,_0x39781c){_0x5db9de['baseVersion']=null;for(const _0x1dcb96 in _0x5db9de){const _0x15fb52=_0x5db9de[_0x1dcb96];if(_0x15fb52 instanceof _0x470371){const _0x5ba69e=_0x39781c['get'](_0x15fb52['root']['rootName']);_0x5db9de[_0x1dcb96]=this['_fixPosition'](_0x15fb52,_0x5ba69e);}if(_0x15fb52 instanceof _0x52c48){const _0x2f2619=_0x39781c['get'](_0x15fb52['root']['rootName']);_0x5db9de[_0x1dcb96]=this['_fixRange'](_0x15fb52,_0x2f2619);}'root'===_0x1dcb96&&(_0x5db9de['root']=_0x39781c['get'](_0x5db9de['root']['rootName']));}}['_fixRange'](_0x5ccbf0,_0x548dbf){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5ccbf0['start'],_0x548dbf),this['_fixPosition'](_0x5ccbf0['end'],_0x548dbf));}['_fixPosition'](_0x389ceb,_0x79ed62){return this['editor']['model']['createPositionFromPath'](_0x79ed62,_0x389ceb['path'],_0x389ceb['stickiness']);}['_handleInsertOperation'](_0x56ae3b){const _0x3d9157=this['_idsRoots']['get'](_0x56ae3b['position']['root']['rootName']),_0x5422f1=this['_fixPosition'](_0x56ae3b['position'],_0x3d9157),_0x295f8c=null===_0x56ae3b['_authorId']?null:_0x56ae3b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x146099=_0x5422f1['parent'],_0x43f719=this['_revisionId'],_0x160e2c=[];for(const _0x1eee25 of _0x56ae3b['nodes'])if(_0x1eee25['is']('element'))_0x160e2c['push'](this['_makeIdsRoot'](_0x1eee25));else{for(let _0x5bfa0f=0x0;_0x5bfa0f<_0x1eee25['offsetSize'];_0x5bfa0f++)_0x160e2c['push'](new _0x11c009('$text',{'vid':this['_revisionId']++}));}const _0x495be5=this['_revisionId'];for(let _0x1135f9=_0x43f719;_0x1135f9<_0x495be5;_0x1135f9++)this['_touched']['set'](_0x1135f9,{'userId':_0x295f8c});_0x146099['_insertChild'](_0x5422f1['offset'],_0x160e2c);}['_handleMoveOperation'](_0x22610b){(_0x22610b=this['_cloneOperation'](_0x22610b,this['_idsRoots']))['_execute']();const _0x3a9147=null===_0x22610b['_authorId']?null:_0x22610b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x306ea=_0x22610b['getMovedRangeStart'](),_0x57a63f=_0x306ea['parent'],_0x21dcc9=_0x306ea['offset'];!function _0x11c93e(_0xb00901,_0xe75cb3,_0x52dea7,_0x114faf){for(let _0x24f4ea=_0x52dea7;_0x24f4ea<_0x114faf;_0x24f4ea++){const _0xad35e7=_0xe75cb3['getChild'](_0x24f4ea);_0xad35e7['is']('element','$text')?_0xb00901['set'](_0xad35e7['getAttribute']('vid'),{'userId':_0x3a9147}):(_0xb00901['set'](_0xad35e7['getAttribute']('vid_start'),{'userId':_0x3a9147}),_0x11c93e(_0xb00901,_0xad35e7,0x0,_0xad35e7['childCount']),_0xb00901['set'](_0xad35e7['getAttribute']('vid_end'),{'userId':_0x3a9147}));}}(this['_touched'],_0x57a63f,_0x21dcc9,_0x21dcc9+_0x22610b['howMany']);}['_handleMergeOperation'](_0x301025){const _0x54f58b=null===(_0x301025=this['_cloneOperation'](_0x301025,this['_idsRoots']))['_authorId']?null:_0x301025['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x22d36d=_0x301025['targetPosition']['parent'],_0x456c31=_0x301025['sourcePosition']['parent'],_0x28ff10=_0x22d36d['getAttribute']('vid_end'),_0x29d56c=_0x456c31['getAttribute']('vid_start');_0x22d36d['_setAttribute']('vid_end',_0x456c31['getAttribute']('vid_end')),_0x456c31['_setAttribute']('vid_end',_0x28ff10),this['_touched']['set'](_0x29d56c,{'userId':_0x54f58b}),this['_touched']['set'](_0x28ff10,{'userId':_0x54f58b}),_0x301025['_execute']();}['_handleSplitOperation'](_0xbca6fd){const _0x1937e9=null===(_0xbca6fd=this['_cloneOperation'](_0xbca6fd,this['_idsRoots']))['_authorId']?null:_0xbca6fd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x215843=_0xbca6fd['graveyardPosition'],_0x3b775e=_0xbca6fd['splitPosition']['parent'];_0xbca6fd['_execute']();const _0x430a85=_0x3b775e['getAttribute']('vid_end'),_0x39273b=_0xbca6fd['insertionPosition']['nodeAfter'];if(_0x215843){const _0x12f5cb=_0x39273b['getAttribute']('vid_end'),_0x5e7325=_0x3b775e['getAttribute']('vid_end');_0x3b775e['_setAttribute']('vid_end',_0x12f5cb),_0x39273b['_setAttribute']('vid_end',_0x5e7325),this['_touched']['set'](_0x3b775e['getAttribute']('vid_end'),{'userId':_0x1937e9}),this['_touched']['set'](_0x39273b['getAttribute']('vid_start'),{'userId':_0x1937e9});}else{const _0x2a2ade=this['_revisionId']++,_0x21bbe5=this['_revisionId']++;_0x3b775e['_setAttribute']('vid_end',_0x2a2ade),_0x39273b['_setAttribute']('vid_start',_0x21bbe5),_0x39273b['_setAttribute']('vid_end',_0x430a85),this['_touched']['set'](_0x2a2ade,{'userId':_0x1937e9}),this['_touched']['set'](_0x21bbe5,{'userId':_0x1937e9});}}['_handleMarkerOperation'](_0x45db1d){if(!_0x45db1d['affectsData'])return;const _0x4c0ccb=(_0x45db1d=this['_cloneOperation'](_0x45db1d,this['_diffRoots']))['oldRange']?_0x45db1d['oldRange']['root']:null,_0x557ea0=_0x45db1d['newRange']?_0x45db1d['newRange']['root']:null;_0x4c0ccb&&this['_markers']['delete'](_0x45db1d['name']),_0x557ea0&&this['_markers']['set'](_0x45db1d['name'],_0x45db1d['newRange']['clone']());const _0x10cb6b=null===_0x45db1d['_authorId']?null:_0x45db1d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x364e46=_0x45db1d['name'];if(!this['_touchedMarkers']['has'](_0x364e46))return void this['_touchedMarkers']['set'](_0x364e46,{'range':_0x45db1d['oldRange'],'userId':_0x10cb6b});const _0x9cb16d=this['_touchedMarkers']['get'](_0x364e46),_0x43daed=_0x9cb16d['range'],_0x5dedb3=_0x45db1d['newRange'];null==_0x43daed&&null==_0x5dedb3||_0x43daed&&_0x5dedb3&&_0x43daed['isEqual'](_0x5dedb3)?this['_touchedMarkers']['delete'](_0x45db1d['name']):_0x9cb16d['userId']=_0x10cb6b;}['_handleRootOperation'](_0x41ac7b,_0xae094a){this['_diffRoots']['has'](_0x41ac7b['rootName'])?this['_diffRoots']['get'](_0x41ac7b['rootName'])['_isAttached']=_0x41ac7b['isAdd']:(this['_diffRoots']['set'](_0x41ac7b['rootName'],N(_0x41ac7b['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x41ac7b['rootName'],{}),_0xae094a&&this['_idsRoots']['set'](_0x41ac7b['rootName'],N(_0x41ac7b['rootName'],!0x0)));const _0x304c18=null===_0x41ac7b['_authorId']?null:_0x41ac7b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x15b317=this['_touchedRoots']['get'](_0x41ac7b['rootName']);_0x15b317&&_0x15b317['userId']===_0x304c18?this['_touchedRoots']['delete'](_0x41ac7b['rootName']):this['_touchedRoots']['set'](_0x41ac7b['rootName'],{'userId':_0x304c18,'isAttached':_0x41ac7b['isAdd']});}['_handleRootAttributeOperation'](_0x5d9946){const _0x47e9e7=this['_diffRootsAttributes']['get'](_0x5d9946['root']['rootName']);null===_0x5d9946['newValue']?delete _0x47e9e7[_0x5d9946['key']]:_0x47e9e7[_0x5d9946['key']]=_0x5d9946['newValue'];}}function x(_0x5c0c47){const _0x3087ea=N(_0x5c0c47['rootName'],_0x5c0c47['isAttached']());for(const _0x349ca4 of _0x5c0c47['getChildren']()){const _0x2ec8cd=_0x349ca4['_clone'](!0x0);_0x3087ea['_appendChild'](_0x2ec8cd);}return _0x3087ea;}function N(_0x321861,_0x44af37=!0x0){const _0x2b9096=new _0x483ce4();return _0x2b9096['rootName']=_0x321861,_0x2b9096['_isAttached']=_0x44af37,_0x2b9096['isAttached']=()=>_0x2b9096['_isAttached'],_0x2b9096;}function P(_0x1fcfcd,_0x545f7e,_0x218005){const _0x5bd43e='elementEnd'==_0x1fcfcd['type']?_0x218005['createPositionAt'](_0x1fcfcd['item'],'end'):_0x218005['createPositionBefore'](_0x1fcfcd['item']);return _0x218005['createPositionFromPath'](_0x545f7e,_0x5bd43e['path'],_0x5bd43e['stickiness']);}function V(_0xf7f9cc,_0x34bca2,_0x364b10){const _0x2fd2bc='elementStart'==_0xf7f9cc['type']?_0x364b10['createPositionAt'](_0xf7f9cc['item'],0x0):_0x364b10['createPositionAfter'](_0xf7f9cc['item']);return _0x364b10['createPositionFromPath'](_0x34bca2,_0x2fd2bc['path'],_0x2fd2bc['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
- _0x1a8e0c(_0x558a40){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0xa2d628,_0x58d25e){super(_0xa2d628),this['focusTracker']=new _0x41b0aa(),this['keystrokes']=new _0x46ace8(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x58d25e),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x1cb25e({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x4838b4=_0x2d6531=>_0x2d6531['stopPropagation']();this['keystrokes']['set']('arrowright',_0x4838b4),this['keystrokes']['set']('arrowleft',_0x4838b4),this['keystrokes']['set']('arrowup',_0x4838b4),this['keystrokes']['set']('arrowdown',_0x4838b4);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x217b96){this['revisionNameInputView']['fieldView']['element']['value']=_0x217b96['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x4cc99d){const _0x3b7aad=new ti(this['locale'],_0x44cca1),_0x27c37d=_0x3b7aad['fieldView'];_0x27c37d['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x461044=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x4cc99d&&(_0x461044+='\x20('+R(this['locale'],'optional')+')'),(_0x3b7aad['label']=_0x461044,_0x27c37d['on']('input',()=>{this['revisionNameInputValue']=_0x27c37d['element']['value']['trim']();}),_0x3b7aad);}}class v extends _0x3146aa{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x11d4e8=this['editor'],_0x4bf4ad=_0x11d4e8['plugins']['get']('RevisionTracker');_0x11d4e8['ui']['componentFactory']['add']('revisionHistory',_0x21308c=>{const _0x226b83=_0x4a7c72(_0x21308c),_0x57b656=_0x226b83['panelView']['children'],_0x4362dd=new _0x4ef17c(_0x21308c),_0x23221a=new _0x59454a(_0x21308c),_0x374385=new _0x50c1a2(_0x21308c),_0x1ebf0b=new _0x59454a(_0x21308c),_0x3561d5=new _0x50c1a2(_0x21308c);return _0x226b83['bind']('isEnabled')['to'](_0x4bf4ad,'isReady',_0x4bf4ad,'isEnabled',_0x11d4e8,'isReadOnly',(_0xd1bf90,_0x1bd0b9,_0x44f85d)=>_0xd1bf90&&_0x1bd0b9&&!_0x44f85d),_0x226b83['buttonView']['set']({'icon':_0x1c1518,'label':R(_0x21308c,'Revision\x20history'),'tooltip':!0x0}),_0x374385['set']({'label':R(_0x21308c,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x374385['bind']('isEnabled')['to'](_0x4bf4ad,'isReady',_0x4bf4ad,'isEnabled',_0x11d4e8,'isReadOnly',(_0x2cc3b8,_0x1e1ab9,_0x159afa)=>_0x2cc3b8&&_0x1e1ab9&&!_0x159afa),_0x374385['on']('execute',()=>this['_showDialog']()),_0x3561d5['set']({'label':R(_0x21308c,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x3561d5['bind']('isEnabled')['to'](_0x4bf4ad,'isReady',_0x11d4e8,'isReadOnly',(_0x3c71f2,_0x33e8fb)=>_0x3c71f2&&!_0x33e8fb),_0x3561d5['on']('execute',()=>{_0x11d4e8['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x226b83['isOpen']=!0x1,_0x11d4e8['editing']['view']['focus']();}),_0x23221a['children']['add'](_0x374385),_0x1ebf0b['children']['add'](_0x3561d5),_0x4362dd['role']='menu',_0x4362dd['items']['addMany']([_0x23221a,_0x1ebf0b]),_0x57b656['add'](_0x4362dd),_0x226b83;}),_0x11d4e8['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x551499=this['editor'],_0x195af8=_0x551499['locale'],_0x290028=new _0x227765(_0x195af8),_0xb0b215=new _0x44a2ee(_0x195af8);_0x290028['buttonView']['set']({'icon':_0x1c1518,'label':R(_0x195af8,'Revision\x20history')});const _0x48a258=new _0x1e286f(_0x195af8,_0x290028),_0xf727e9=new _0x8bf3ac(_0x195af8);_0xf727e9['set']({'label':R(_0x195af8,'Save\x20current\x20revision')}),_0xf727e9['delegate']('execute')['to'](_0x290028),_0xf727e9['on']('execute',()=>{this['_showDialog']();}),_0x48a258['children']['add'](_0xf727e9),_0xb0b215['items']['add'](_0x48a258);const _0x8cc0a7=new _0x1e286f(_0x195af8,_0x290028),_0x1a598b=new _0x8bf3ac(_0x195af8);return _0x1a598b['set']({'label':R(_0x195af8,'Open\x20revision\x20history')}),_0x1a598b['delegate']('execute')['to'](_0x290028),_0x1a598b['on']('execute',()=>{_0x551499['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x8cc0a7['children']['add'](_0x1a598b),_0xb0b215['items']['add'](_0x8cc0a7),_0x290028['panelView']['children']['add'](_0xb0b215),_0x290028;}['_showDialog'](){const _0x329072=this['editor'],_0x151975=_0x329072['locale'],_0x3ccb0d=_0x329072['plugins']['get']('Dialog'),_0x31261a=_0x329072['plugins']['get']('RevisionTracker');function _0x449fb8(_0x4f664c){_0x329072['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4f664c['revisionName']?_0x4f664c['revisionNameInputView']['errorText']=R(_0x151975,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x329072['plugins']['get'](h)['saveRevision']({'name':_0x4f664c['revisionName']}),_0x3ccb0d['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x449fb8(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3ccb0d['show']({'id':'revisionSave','title':R(_0x151975,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x329072['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3ccb0d['hide']()},{'label':R(_0x329072['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x2353f7){_0x2353f7['bind']('isEnabled')['to'](_0x31261a,'isReady',_0x31261a,'isEnabled',_0x329072,'isReadOnly',(_0x4bf586,_0x19633d,_0x57dcc3)=>_0x4bf586&&_0x19633d&&!_0x57dcc3);},'onExecute':()=>_0x449fb8(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x286427=this['editor'],_0x245369=_0x286427['locale'];this['_saveRevisionFormView']=new he(_0x245369,_0x286427['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x558a40{['changeId'];['_model'];constructor(_0x367b3a,_0x5b2ec2){super(_0x367b3a),this['_model']=_0x5b2ec2,this['changeId']=_0x5b2ec2['id'];const _0x4853ad=this['bindTemplate'],_0x19224a=R(_0x367b3a,_0x5b2ec2['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5b2ec2['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5b2ec2['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4853ad['to']('type',_0x827928=>'ck-revision-change__'+_0x827928)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x19224a}]},{'text':'\x20'+_0x5b2ec2['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x4a7306(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x29caf5){super(),this['id']=_0x29caf5['id']||_0x8f1231(),this['author']=_0x29caf5['author'],this['type']=_0x29caf5['type'],this['data']=_0x29caf5['data']||{},this['rootName']=_0x29caf5['rootName'],this['set']('createdAt',_0x29caf5['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x54996b,_0x13a1c4){this['newRevisionId']=_0x54996b,this['oldRevisionId']=_0x13a1c4,this['changes']=new _0xcf03c8();}['_setChanges'](_0x5c6453){for(const _0x249831 of _0x5c6453)this['changes']['add'](_0x249831);}}class l extends _0x3146aa{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3cae5e,_0x3f2e8b,S,$];}constructor(_0x13ca84){super(_0x13ca84),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x49c015,_0x5d6bd6,_0x2f71b6)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3b5b3a=>{for(const _0xc60dfb of this['editor']['editing']['view']['document']['roots'])_0x2f71b6?_0x3b5b3a['removeClass']('ck-editor__editable__overlay',_0xc60dfb):_0x3b5b3a['addClass']('ck-editor__editable__overlay',_0xc60dfb);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x255127=>null!==_0x255127),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3d036c,_0x524549,_0x330306)=>_0x3d036c&&_0x330306?_0x524549['changes']['getIndex'](_0x330306):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x307a1a,_0x1b00bb)=>_0x307a1a?_0x1b00bb['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3f2e8b);}['init'](){const _0x208ddb=this['editor'],_0x3810be=new ot(_0x208ddb,{'direction':'backward'}),_0x46423f=new ot(_0x208ddb,{'direction':'forward'});(_0x208ddb['commands']['add']('showPreviousChange',_0x3810be),_0x208ddb['commands']['add']('showNextChange',_0x46423f),_0x208ddb['commands']['add']('restoreRevision',new nt(_0x208ddb)),this['on']('change:numberOfChanges',()=>{_0x3810be['refresh'](),_0x46423f['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x208ddb['enableReadOnlyMode']('revision-viewer'),_0x208ddb['plugins']['has']('WidgetToolbarRepository'))&&_0x208ddb['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x6e5f95){return await this['_utils']['loadRevisionData'](_0x6e5f95,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x6e5f95);}async['getRevisionRootsAttributes'](_0x3646b8){return await this['_utils']['loadRevisionData'](_0x3646b8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3646b8);}async['compare'](_0x39df76,_0x134faa,_0x4a4921=!0x1){if(!this['isEnabled'])return;const _0x138651=this['diff'],_0x1ef97c=this['repository'],_0x64c51a='string'==typeof _0x39df76?_0x1ef97c['getRevision'](_0x39df76):_0x39df76,_0x522050='string'==typeof _0x134faa?_0x1ef97c['getRevision'](_0x134faa):_0x134faa,_0x2de00f=_0x64c51a['id'],_0x96189b=_0x522050?_0x522050['id']:null;if(!_0x4a4921&&this['diff']&&this['diff']['newRevisionId']===_0x2de00f&&this['diff']['oldRevisionId']===_0x96189b)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x2de00f,_0x96189b);const _0x2e9c3c=this['_getRevisionsRange'](_0x64c51a,_0x522050,!0x0)['map'](_0x2dfe63=>this['_utils']['loadRevisionData'](_0x2dfe63,this['adapter']));return _0x2e9c3c['push'](new Promise(_0x5b7416=>{setTimeout(_0x5b7416,0x14);})),Promise['all'](_0x2e9c3c)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x461611=this['_getDiff'](_0x2de00f,_0x96189b);for(const _0x4cf279 of _0x461611['changes'])this['_changeIdToChange']['set'](_0x4cf279['id'],_0x4cf279);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x92d3c3=>{for(const _0x482503 of this['editor']['model']['document']['getRootNames']())_0x92d3c3['detachRoot'](_0x482503);for(const _0xa851dc of Object['keys'](_0x461611['model'])){const _0x2da501=_0x92d3c3['addRoot'](_0xa851dc);for(const _0x32702c of Object['keys'](_0x461611['attributes'][_0xa851dc]))_0x92d3c3['setAttribute'](_0x32702c,_0x461611['attributes'][_0xa851dc][_0x32702c],_0x2da501);_0x92d3c3['insert'](_0x461611['model'][_0xa851dc],_0x2da501,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x461611['changes'])),this['isReady']=!0x0;})['catch'](_0x2d2962=>{console['error'](_0x2d2962),this['_cleanUp'](),_0x138651&&(this['diff']=_0x138651),this['isReady']=!0x0;});}['addRevisionData'](_0x4931ce,_0x56af6c){const _0x2b1b7c=this['repository']['createRevision'](_0x4931ce);return _0x2b1b7c['on']('_update',(_0x1ee5b4,_0x564c8d,_0x306c08)=>_0x56af6c(_0x564c8d,_0x306c08,_0x2b1b7c)),this['repository']['addRevision'](_0x2b1b7c),_0x2b1b7c;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x57e17c=>{for(const _0x313297 of this['editor']['model']['document']['getRootNames']())_0x57e17c['detachRoot'](_0x313297);});}['_sortAndFilterDiffChanges'](_0xea39a){const _0x53d536=[],_0x3f0352=new Map();for(const _0x1bc934 of this['editor']['model']['document']['getRootNames']()){const _0x5039fb=this['editor']['editing']['view']['getDomRoot'](_0x1bc934);if(!_0x5039fb)continue;const _0xfec02=_0x5039fb['getClientRects']()['item'](0x0);_0xfec02&&(_0x53d536['push'](_0x1bc934),_0x3f0352['set'](_0x1bc934,_0xfec02));}return _0x53d536['sort']((_0x22f486,_0x594132)=>{const _0x33cf20=_0x3f0352['get'](_0x22f486),_0x4e706e=_0x3f0352['get'](_0x594132);return _0x33cf20['y']-_0x4e706e['y']||_0x33cf20['x']-_0x4e706e['x'];}),(_0xea39a=_0xea39a['filter'](_0x160b4e=>_0x53d536['includes'](_0x160b4e['rootName'])))['sort']((_0x1fb721,_0x136472)=>_0x53d536['indexOf'](_0x1fb721['rootName'])-_0x53d536['indexOf'](_0x136472['rootName'])),_0xea39a;}['_makeTape'](_0x219eca){const _0x136811=Array['from'](_0x219eca['markers'])['filter'](([_0x413284,_0x2b1f8e])=>_0x413284['startsWith']('revision:')&&!_0x2b1f8e['isCollapsed']),_0x13b88a=Array['from'](this['editor']['model']['createRangeIn'](_0x219eca)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x136811['length'])for(const _0x4d88a2 of _0x13b88a){const [_0x3292f0,_0x312e1d]=_0x136811[0x0],[,_0x10e409,_0x21d6be]=_0x3292f0['split'](':');if(_0x312e1d['end']['isEqual'](_0x4d88a2['nextPosition'])&&_0x136811['shift'](),(_0x4d88a2['previousPosition']['isEqual'](_0x312e1d['start'])||_0x4d88a2['previousPosition']['isAfter'](_0x312e1d['start']))&&('insertion'==_0x10e409?_0x4d88a2['isAdded']={'userId':_0x21d6be}:'deletion'==_0x10e409&&(_0x4d88a2['isRemoved']={'userId':_0x21d6be})),0x0==_0x136811['length'])break;}return _0x13b88a;}['_refreshStartEndIndex'](_0xa3b4a8){const _0x27f2c7=new Map();for(let _0x5574c4=0x0;_0x5574c4<_0xa3b4a8['length'];_0x5574c4++)'text'===_0xa3b4a8[_0x5574c4]['type']?(_0xa3b4a8[_0x5574c4]['item']['startIndex']=_0x5574c4,_0xa3b4a8[_0x5574c4]['item']['endIndex']=_0x5574c4):('elementStart'===_0xa3b4a8[_0x5574c4]['type']?_0xa3b4a8[_0x5574c4]['item']['startIndex']=_0x5574c4:'elementEnd'===_0xa3b4a8[_0x5574c4]['type']&&(_0xa3b4a8[_0x5574c4]['item']['endIndex']=_0x5574c4),_0x27f2c7['set'](_0xa3b4a8[_0x5574c4]['id'],_0x5574c4));for(const _0x31f5d9 of _0x27f2c7['values']())'elementStart'===_0xa3b4a8[_0x31f5d9]['type']?_0xa3b4a8[_0x31f5d9]['item']['endIndex']=_0x27f2c7['get'](_0xa3b4a8[_0x31f5d9]['pairId']):'elementEnd'===_0xa3b4a8[_0x31f5d9]['type']&&(_0xa3b4a8[_0x31f5d9]['item']['startIndex']=_0x27f2c7['get'](_0xa3b4a8[_0x31f5d9]['pairId']));}['_processTape'](_0x3f5186){for(let _0x40b164=0x0;_0x40b164<_0x3f5186['length'];_0x40b164++){if('elementStart'===_0x3f5186[_0x40b164]['type'])_0x3f5186[_0x40b164]['item']['startIndex']=_0x40b164;else{if('elementEnd'===_0x3f5186[_0x40b164]['type']){_0x3f5186[_0x40b164]['item']['endIndex']=_0x40b164;const _0x4bc608=_0x3f5186[_0x40b164]['item']['startIndex'];_0x3f5186[_0x4bc608]['pairId']=_0x3f5186[_0x40b164]['id'],_0x3f5186[_0x40b164]['pairId']=_0x3f5186[_0x4bc608]['id'];}else _0x3f5186[_0x40b164]['item']['startIndex']=_0x40b164,_0x3f5186[_0x40b164]['item']['endIndex']=_0x40b164,_0x3f5186[_0x40b164]['pairId']=null;}_0x3f5186[_0x40b164]['markersStart']||(_0x3f5186[_0x40b164]['markersStart']=[],_0x3f5186[_0x40b164]['markersEnd']=[]);}}['_markInsertions'](_0x265621,_0x28163f){const _0x432dcf=_0x265621['filter'](_0xf94ef8=>!_0xf94ef8['isAdded']);for(let _0x1dca2a=0x0;_0x1dca2a<_0x28163f['length'];_0x1dca2a++)_0x28163f[_0x1dca2a]['isAdded']&&(_0x432dcf[_0x1dca2a]['isAdded']=_0x28163f[_0x1dca2a]['isAdded']);}['_getDiff'](_0x2d7a70,_0x2e58b8=null){const _0xcb1c36=this['repository']['getRevision'](_0x2d7a70),_0x41769b=_0x2e58b8?this['repository']['getRevision'](_0x2e58b8):null,_0x447845=this['_getRevisionsRange'](_0xcb1c36,_0x41769b),_0xa69d8c=_0x447845[_0x447845['length']-0x1],_0x446458=new Map(),_0x3eb2e2={'model':{},'attributes':{},'changes':[]},_0x57d558=new Set(),_0x54a7fb=new Map();for(let _0x1a7b1e=_0x447845['length']-0x1;_0x1a7b1e>=0x0;_0x1a7b1e--){const _0x53d768=_0x447845[_0x1a7b1e];for(const _0x49d80a of Object['keys'](_0x53d768['diffData']))if(_0x53d768['diffData'][_0x49d80a]['attachChange']){const _0x1612be=_0x53d768['diffData'][_0x49d80a]['attachChange'];_0x1612be['isAttached']?(_0x57d558['add'](_0x49d80a),_0x54a7fb['has'](_0x49d80a)&&_0x54a7fb['get'](_0x49d80a)['userId']==_0x1612be['userId']?_0x54a7fb['delete'](_0x49d80a):_0x54a7fb['set'](_0x49d80a,_0x1612be)):_0x54a7fb['has'](_0x49d80a)?(_0x57d558['delete'](_0x49d80a),_0x54a7fb['delete'](_0x49d80a)):(_0x57d558['add'](_0x49d80a),_0x54a7fb['set'](_0x49d80a,_0x1612be));}else _0x57d558['add'](_0x49d80a);}for(const _0x46b21c of _0x57d558){const _0x10864c=_0x54a7fb['has'](_0x46b21c)&&!_0x54a7fb['get'](_0x46b21c)['isAttached'];let _0x35b735=_0x10864c?_0x447845['length']-0x1:0x0;const _0x168361=_0x10864c?-0x1:0x1;for(;_0x447845[_0x35b735];){const _0x3957a7=_0x447845[_0x35b735];if(_0x3957a7['diffData'][_0x46b21c]){const _0x123631=_0x10864c?_0x3957a7['diffData'][_0x46b21c]['attributesBefore']:_0x3957a7['diffData'][_0x46b21c]['attributesAfter'];_0x3eb2e2['attributes'][_0x46b21c]=_0x123631?_0x3a3d07(_0x123631):{};break;}_0x35b735+=_0x168361;}}for(const _0x466bdb of _0x447845){_0x466bdb['model']={};for(const _0x56755c of _0x466bdb['authors'])_0x446458['set'](_0x56755c['id'],_0x56755c);for(const _0x2deafe of _0x57d558){const _0x2d4aa4=_0x466bdb['diffData'][_0x2deafe]?_0x466bdb['diffData'][_0x2deafe]['insertions']:'[]',_0x156b6a=_0x466bdb['diffData'][_0x2deafe]?_0x466bdb['diffData'][_0x2deafe]['deletions']:'[]';_0x466bdb['model'][_0x2deafe]={'insertions':this['_utils']['_makeModelFromViewString'](_0x2d4aa4),'deletions':this['_utils']['_makeModelFromViewString'](_0x156b6a)};}}for(const _0x410a23 of _0x57d558){let _0x4d0bde=null,_0xcfc6c9=0x0;const _0x57a15c=new Map(Array['from'](_0xcb1c36['model'][_0x410a23]['insertions']['markers'])['filter'](([_0x123aa7])=>!_0x123aa7['startsWith']('revision:')));let _0x4cb50a=0x0;for(const _0x11f630 of _0x447845){const _0xbad5ac=this['_makeTape'](_0x11f630['model'][_0x410a23]['insertions']);_0x11f630==_0xcb1c36?(_0x4d0bde=_0xbad5ac,_0xcfc6c9=_0x4d0bde['length'],_0x4d0bde['forEach'](_0x52107b=>{_0x52107b['id']=_0x4cb50a++;}),this['_processTape'](_0x4d0bde)):this['_markInsertions'](_0x4d0bde,_0xbad5ac);const _0x1bc8c1=_0x4d0bde['filter'](_0x233fda=>!_0x233fda['isAdded'])['map'](_0x3d3526=>_0x3d3526['id']);let _0x1f5deb=0x0;const _0x5f1160=this['_makeTape'](_0x11f630['model'][_0x410a23]['deletions']);_0x5f1160['forEach'](_0x2c43cb=>{_0x2c43cb['isRemoved']?_0x2c43cb['id']=_0xcfc6c9++:_0x2c43cb['id']=_0x1bc8c1[_0x1f5deb++];}),this['_processTape'](_0x5f1160),this['_setDistance'](_0x4d0bde,'isAdded'),this['_setDistance'](_0x5f1160,'isRemoved'),_0x11f630==_0xcb1c36&&this['_markMarkers'](_0x4d0bde,_0x57a15c),_0x4d0bde=this['_joinTapes'](_0x4d0bde,_0x5f1160),this['_refreshStartEndIndex'](_0x4d0bde),this['_setDistance'](_0x4d0bde,'isRemoved');}_0x4d0bde=_0x4d0bde['filter'](_0xa8d58f=>!(_0xa8d58f['isAdded']&&_0xa8d58f['isRemoved']));const _0x223820=new Map(_0xa69d8c['model'][_0x410a23]['deletions']['markers']),_0x419223=new Set(_0x57a15c['keys']());for(const _0x5c6442 of _0x223820['keys']())_0x419223['delete'](_0x5c6442);this['_markSuggestions'](_0x4d0bde,_0x419223),this['_fixObsoleteTags'](_0x4d0bde),_0x4d0bde=this['_removeMissingPairs'](_0x4d0bde),_0x4d0bde=this['_markMismatchedRemovedTags'](_0x4d0bde),_0x4d0bde=this['_removeUnsupportedChanges'](_0x4d0bde);const {root:_0x58bba8,changes:_0x2cee36}=this['_makeModelFromTape'](_0x4d0bde,_0x446458,_0x410a23);_0x3eb2e2['model'][_0x410a23]=_0x58bba8;const _0x49ba45=_0x54a7fb['get'](_0x410a23);if(_0x49ba45){const _0x417f2a=_0x446458['get'](_0x49ba45['userId']),_0x5b235d=new G({'author':_0x417f2a,'type':_0x49ba45['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x410a23});_0x2cee36['unshift'](_0x5b235d),_0x3eb2e2['attributes'][_0x410a23]['revisionHistoryAttachChange']=_0x5b235d['id'];}_0x3eb2e2['changes']=_0x3eb2e2['changes']['concat'](_0x2cee36);}return _0x3eb2e2;}['_markMarkers'](_0x1f5e5f,_0x30110f){for(let _0x34a274=0x0;_0x34a274<_0x1f5e5f['length'];_0x34a274++)for(const [_0x2b9fbc,_0x3fa35b]of _0x30110f)!_0x3fa35b['isCollapsed']&&_0x3fa35b['start']['isEqual'](_0x1f5e5f[_0x34a274]['previousPosition'])&&_0x1f5e5f[_0x34a274]['markersStart']['push'](_0x2b9fbc),_0x3fa35b['end']['isEqual'](_0x1f5e5f[_0x34a274]['nextPosition'])&&_0x1f5e5f[_0x34a274]['markersEnd']['push'](_0x2b9fbc);}['_joinTapes'](_0x3ee631,_0x4f5cf5){let _0x1e18d9=[],_0x553dc6=0x0,_0x5856d9=0x0;for(;_0x553dc6<_0x3ee631['length']||_0x5856d9<_0x4f5cf5['length'];){const _0x4656b0=_0x3ee631[_0x553dc6]||{},_0x494103=_0x4f5cf5[_0x5856d9]||{};if(_0x4656b0['id']==_0x494103['id'])_0x553dc6++,_0x5856d9++,_0x1e18d9['push'](_0x4656b0);else{if(_0x494103['isRemoved']&&_0x4656b0['isAdded']){const {commonTape:_0x459b25,iEnd:_0x458516,jEnd:_0x4a3dc4}=this['_threeWayMerge'](_0x3ee631,_0x553dc6,_0x4f5cf5,_0x5856d9);_0x1e18d9=_0x1e18d9['concat'](_0x459b25),_0x553dc6=_0x458516,_0x5856d9=_0x4a3dc4;}else _0x494103['isRemoved']?(_0x5856d9++,_0x1e18d9['push'](_0x494103)):(_0x553dc6++,_0x1e18d9['push'](_0x4656b0));}}return _0x1e18d9;}['_markSuggestions'](_0x3a0ece,_0x3b5b24){const _0x364abc=[];for(let _0x101bc1=0x0;_0x101bc1<_0x3a0ece['length'];_0x101bc1++){for(let _0x2271e7=0x0;_0x2271e7<_0x3a0ece[_0x101bc1]['markersStart']['length'];_0x2271e7++){const _0x3a713d=_0x3a0ece[_0x101bc1]['markersStart'][_0x2271e7];if(!_0x3b5b24['has'](_0x3a713d))continue;const {group:_0x455923,type:_0x26419b,authorId:_0x5a528a}=_0x543a23(_0x3a713d);'revision-suggestion'!=_0x455923||'insertion'!=_0x26419b&&'deletion'!=_0x26419b||(_0x364abc['unshift']({'type':_0x26419b,'name':_0x3a713d,'userId':_0x5a528a}),_0x3a0ece[_0x101bc1]['markersStart']['splice'](_0x2271e7,0x1),_0x2271e7--);}_0x16caed(_0x3a0ece[_0x101bc1]);for(let _0x1d6f04=0x0;_0x1d6f04<_0x3a0ece[_0x101bc1]['markersEnd']['length'];_0x1d6f04++){const _0x247b9e=_0x3a0ece[_0x101bc1]['markersEnd'][_0x1d6f04];if(!_0x3b5b24['has'](_0x247b9e))continue;const {group:_0x2415fc,type:_0x54ef02}=_0x543a23(_0x247b9e);if('revision-suggestion'!=_0x2415fc||'insertion'!=_0x54ef02&&'deletion'!=_0x54ef02)continue;_0x3a0ece[_0x101bc1]['markersEnd']['splice'](_0x1d6f04,0x1),_0x1d6f04--;const _0x22d829=_0x364abc['findIndex'](_0x52dc41=>_0x52dc41['name']==_0x247b9e);_0x22d829>-0x1&&_0x364abc['splice'](_0x22d829,0x1);}}function _0x543a23(_0x5c794d){const _0x65acf0=_0x5c794d['split'](':');return{'group':_0x65acf0[0x0],'type':_0x65acf0[0x1],'subType':_0x65acf0['length']>=0x5?_0x65acf0[0x2]:null,'id':_0x65acf0['length']<0x5?_0x65acf0[0x2]:_0x65acf0[0x3],'authorId':_0x65acf0['length']<0x5?_0x65acf0[0x3]:_0x65acf0[0x4],'markerCount':0x6==_0x65acf0['length']?_0x65acf0[0x5]:null};}function _0x16caed(_0x5d3c58){for(let _0x2a9b78=0x0;_0x2a9b78<_0x364abc['length'];_0x2a9b78++){if(_0x5d3c58['isAdded']&&'insertion'==_0x364abc[_0x2a9b78]['type']&&_0x5d3c58['isAdded']['userId']==_0x364abc[_0x2a9b78]['userId'])return _0x5d3c58['isAddSuggestion']=_0x364abc[_0x2a9b78],void delete _0x5d3c58['isAdded'];if(!_0x5d3c58['isAdded']&&!_0x5d3c58['isRemoved']&&'deletion'==_0x364abc[_0x2a9b78]['type'])return void(_0x5d3c58['isRemoveSuggestion']=_0x364abc[_0x2a9b78]);}}}['_setDistance'](_0x3169ad,_0x43ecd8){let _0x5912f6=0x0,_0x146b8a=!0x1;const _0x4c76df=new Map();for(const _0xb9a4a9 of _0x3169ad)_0xb9a4a9[_0x43ecd8]?_0x146b8a&&(_0x5912f6++,_0x146b8a=!0x1):(_0x5912f6++,_0x146b8a=!0x0),_0x4c76df['set'](_0xb9a4a9['id'],_0x5912f6);for(let _0x5053e0=0x0;_0x5053e0<_0x3169ad['length'];_0x5053e0++){if('isRemoved'==_0x43ecd8&&_0x3169ad[_0x5053e0]['isAdded']||'isAdded'==_0x43ecd8&&_0x3169ad[_0x5053e0]['isRemoved'])continue;if('text'==_0x3169ad[_0x5053e0]['type']){_0x3169ad[_0x5053e0]['distance']=0x0;continue;}const _0xfc835f=_0x4c76df['get'](_0x3169ad[_0x5053e0]['pairId']),_0x3c7cc8=_0x4c76df['get'](_0x3169ad[_0x5053e0]['id']);_0x3169ad[_0x5053e0]['distance']=_0xfc835f-_0x3c7cc8;}}['_getRevisionsRange'](_0x464dc1,_0x426a33,_0xee79ff=!0x1){const _0x51376f=[];let _0x59e123=this['repository']['getIndex'](_0x464dc1),_0x26fdf1=this['repository']['getIndex'](_0x426a33);for(-0x1==_0x26fdf1&&(_0x26fdf1=this['repository']['_revisions']['length'],_0xee79ff=!0x1);_0x59e123<_0x26fdf1;)_0x51376f['push'](this['repository']['getRevision'](_0x59e123)),_0x59e123++;return _0xee79ff&&_0x51376f['push'](this['repository']['getRevision'](_0x59e123)),_0x51376f;}['_threeWayMerge'](_0x2fa7d4,_0x497b55,_0x5e35b8,_0x1f72da){const _0x12cf62=this['editor']['model']['schema'];let _0x4e99e8=_0x497b55;for(;_0x2fa7d4[_0x4e99e8]&&_0x2fa7d4[_0x4e99e8]['isAdded'];)_0x4e99e8++;let _0x883d36=_0x1f72da;for(;_0x5e35b8[_0x883d36]&&_0x5e35b8[_0x883d36]['isRemoved'];)_0x883d36++;_0x2fc5fd(_0x2fa7d4,_0x497b55,_0x4e99e8),_0x2fc5fd(_0x5e35b8,_0x1f72da,_0x883d36);const _0x49b5ed=_0x5e35b8['slice'](_0x1f72da,_0x883d36)['concat'](_0x2fa7d4['slice'](_0x497b55,_0x4e99e8));return _0x49b5ed['sort']((_0x455260,_0x2ead94)=>_0x455260['side']!=_0x2ead94['side']?_0x455260['side']-_0x2ead94['side']:_0x455260['level']!=_0x2ead94['level']?_0x455260['level']-_0x2ead94['level']:_0x455260['distance']!=_0x2ead94['distance']?_0x2ead94['distance']-_0x455260['distance']:!!_0x455260['isAdded']!=!!_0x2ead94['isAdded']?-0x1==_0x455260['side']||0x0==_0x455260['side']?_0x455260['isAdded']?-0x1:0x1:_0x455260['isAdded']?0x1:-0x1:_0x455260['index']-_0x2ead94['index']),{'commonTape':_0x49b5ed,'iEnd':_0x4e99e8,'jEnd':_0x883d36};function _0x2fc5fd(_0x139af9,_0x39e407,_0x501339){let _0x3d1ef0=-0x1,_0x4c5a00=Number['POSITIVE_INFINITY'],_0x4f68ac=!0x0;for(let _0x32574e=_0x39e407;_0x32574e<_0x501339;_0x32574e++)if(_0x12cf62['isInline'](_0x139af9[_0x32574e]['item'])||(_0x4f68ac=!0x1),_0x139af9[_0x32574e]['item']['startIndex']<_0x39e407&&(_0x3d1ef0=_0x32574e),_0x139af9[_0x32574e]['item']['endIndex']>=_0x501339){_0x4c5a00=_0x32574e;break;}_0x4f68ac&&(_0x3d1ef0=_0x501339-0x1);for(let _0x125720=_0x39e407;_0x125720<_0x501339;_0x125720++)_0x139af9[_0x125720]['side']=_0x125720<=_0x3d1ef0?-0x1:_0x125720<_0x4c5a00?0x0:0x1,_0x139af9[_0x125720]['index']=_0x125720;let _0x45ede5=0x0;for(let _0x15fc3d=_0x39e407;_0x15fc3d<=_0x3d1ef0;_0x15fc3d++)0x0==_0x139af9[_0x15fc3d]['distance']?_0x139af9[_0x15fc3d]['level']=_0x45ede5:(_0x45ede5++,_0x139af9[_0x15fc3d]['level']=_0x45ede5,_0x45ede5++);for(let _0x44c014=_0x39e407;_0x44c014<_0x501339;_0x44c014++)0x0==_0x139af9[_0x44c014]['side']&&(_0x139af9[_0x44c014]['level']=_0x45ede5);_0x45ede5=0x0;for(let _0x3932e8=_0x501339-0x1;_0x3932e8>=_0x4c5a00;_0x3932e8--)0x0==_0x139af9[_0x3932e8]['distance']?_0x139af9[_0x3932e8]['level']=_0x45ede5:(_0x45ede5--,_0x139af9[_0x3932e8]['level']=_0x45ede5,_0x45ede5--);}}['_fixObsoleteTags'](_0x1ccadd){const _0x575783=new Map(),_0x198369=this['editor']['model']['schema'];for(let _0x3e05e5=0x1;_0x3e05e5<_0x1ccadd['length'];_0x3e05e5++){let _0x2410f9,_0x2ebf43,_0x53552f;const _0x126fb0=_0x1ccadd[_0x3e05e5],_0x53accd=_0x1ccadd[_0x3e05e5-0x1];if('text'==_0x126fb0['type'])continue;if(_0x126fb0['type']!=_0x53accd['type'])continue;if(!_0x198369['isBlock'](_0x53accd['item'])||_0x198369['isLimit'](_0x53accd['item']))continue;if(!_0x198369['isBlock'](_0x126fb0['item'])||_0x198369['isLimit'](_0x126fb0['item']))continue;if((_0x1ccadd[_0x3e05e5]['isAdded']||_0x1ccadd[_0x3e05e5]['isAddSuggestion'])&&_0x1ccadd[_0x3e05e5-0x1]['isRemoved'])_0x2410f9=_0x1ccadd[_0x3e05e5],_0x2ebf43=_0x1ccadd[_0x3e05e5-0x1],_0x53552f=_0x3e05e5-0x1;else{if(!_0x1ccadd[_0x3e05e5]['isRemoved']||!_0x1ccadd[_0x3e05e5-0x1]['isAdded']&&!_0x1ccadd[_0x3e05e5-0x1]['isAddSuggestion'])continue;_0x2410f9=_0x1ccadd[_0x3e05e5-0x1],_0x2ebf43=_0x1ccadd[_0x3e05e5],_0x53552f=_0x3e05e5;}const _0x2a6eac=_0x2410f9['level']==_0x2ebf43['level'],_0x425124=Math['abs'](_0x2410f9['level'])<Math['abs'](_0x2ebf43['level'])&&0x0==_0x2ebf43['distance'];(_0x2a6eac||_0x425124)&&(_0x575783['set'](_0x2ebf43['id'],_0x2410f9['id']),_0x1ccadd['splice'](_0x53552f,0x1),_0x3e05e5--,_0x2410f9['isAdded']=!0x1);}for(let _0x1ba2d8=0x0;_0x1ba2d8<_0x1ccadd['length'];_0x1ba2d8++)_0x575783['has'](_0x1ccadd[_0x1ba2d8]['pairId'])&&(_0x1ccadd[_0x1ba2d8]['pairId']=_0x575783['get'](_0x1ccadd[_0x1ba2d8]['pairId']));}['_removeMissingPairs'](_0x131efc){const _0x3a14a4=new Set(_0x131efc['map'](_0xf4e975=>_0xf4e975['id']));for(let _0x59ed67=0x0;_0x59ed67<_0x131efc['length'];_0x59ed67++)_0x3a14a4['has'](_0x131efc[_0x59ed67]['pairId'])||0x0==_0x131efc[_0x59ed67]['distance']||(_0x131efc[_0x59ed67]['isIncorrect']=!0x0);return _0x131efc['filter'](_0x2c9d14=>!_0x2c9d14['isIncorrect']);}['_markMismatchedRemovedTags'](_0x211599){const _0x12a0df=new Set();for(let _0x1c98e2=0x0;_0x1c98e2<_0x211599['length'];_0x1c98e2++){if(_0x12a0df['has'](_0x211599[_0x1c98e2]['id'])&&_0x211599[_0x1c98e2]['isRemoved']&&(_0x211599[_0x1c98e2]['isIncorrect']=!0x0),_0x211599[_0x1c98e2]['isIncorrect'])continue;if(0x0==_0x211599[_0x1c98e2]['distance'])continue;if('elementStart'!=_0x211599[_0x1c98e2]['type'])continue;if(null==_0x211599[_0x1c98e2]['pairId'])continue;let _0x4488e2=_0x1c98e2+0x1,_0x36bd31=0x0;for(;_0x211599[_0x4488e2]['id']!=_0x211599[_0x1c98e2]['pairId'];)'elementStart'==_0x211599[_0x4488e2]['type']?_0x36bd31++:'elementEnd'==_0x211599[_0x4488e2]['type']&&_0x36bd31--,_0x4488e2++;if(0x0!=_0x36bd31){if(_0x211599[_0x1c98e2]['isRemoved'])_0x211599[_0x1c98e2]['isIncorrect']=!0x0;else{for(;_0x4488e2!=_0x1c98e2;)_0x211599[_0x4488e2]['isRemoved']&&0x0!=_0x211599[_0x4488e2]['distance']&&(_0x211599[_0x4488e2]['isIncorrect']=!0x0,_0x12a0df['add'](_0x211599[_0x4488e2]['pairId'])),_0x4488e2--;}}}return _0x211599['filter'](_0x11ad9b=>!_0x11ad9b['isIncorrect']);}['_removeUnsupportedChanges'](_0x535abd){const _0x254833=this['editor']['model']['schema'];for(let _0x20cf2b=0x0;_0x20cf2b<_0x535abd['length'];_0x20cf2b++){if(!(_0x535abd[_0x20cf2b]['isAdded']||_0x535abd[_0x20cf2b]['isAddSuggestion']||_0x535abd[_0x20cf2b]['isRemoved']||_0x535abd[_0x20cf2b]['isRemoveSuggestion']))continue;if(0x0==_0x535abd[_0x20cf2b]['distance'])continue;const _0x376e36=_0x535abd[_0x20cf2b]['item'];_0x254833['isBlock'](_0x376e36)||_0x254833['isLimit'](_0x376e36)||(_0x535abd[_0x20cf2b]['isAdded']&&delete _0x535abd[_0x20cf2b]['isAdded'],_0x535abd[_0x20cf2b]['isAddSuggestion']&&delete _0x535abd[_0x20cf2b]['isAddSuggestion'],_0x535abd[_0x20cf2b]['isRemoveSuggestion']&&delete _0x535abd[_0x20cf2b]['isRemoveSuggestion'],_0x535abd[_0x20cf2b]['isRemoved']&&(_0x535abd[_0x20cf2b]['isIncorrect']=!0x0));}return _0x535abd['filter'](_0x353c0f=>!_0x353c0f['isIncorrect']);}['_makeModelFromTape'](_0x1ce57d,_0x26a446,_0x3343c9){const _0x1c3416=new _0x483ce4(),_0x3bfd8d=[],_0x1a0e5b=new Map(),_0x3dbd0f=this['editor']['model'],_0x385112=_0x3dbd0f['schema'],_0x1a0331=[_0x1c3416],_0x111c1b={},_0x3246f6={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0xe8cada=null;const _0x6575d7=[0x0];for(let _0x1de2c2=0x0;_0x1de2c2<_0x1ce57d['length'];_0x1de2c2++)if('elementStart'===_0x1ce57d[_0x1de2c2]['type']){_0x1ce57d[_0x1de2c2]['previousPosition']=_0x3dbd0f['createPositionFromPath'](_0x1c3416,_0x6575d7);const _0x4d906c=new _0x11c009(_0x1ce57d[_0x1de2c2]['item']['name'],_0x1ce57d[_0x1de2c2]['item']['getAttributes']());_0x1a0331[0x0]['_appendChild'](_0x4d906c),_0x6575d7['push'](0x0),_0x1a0331['unshift'](_0x4d906c),_0x1ce57d[_0x1de2c2]['nextPosition']=_0x3dbd0f['createPositionFromPath'](_0x1c3416,_0x6575d7);}else'elementEnd'===_0x1ce57d[_0x1de2c2]['type']?(_0x1a0331['shift'](),_0x1ce57d[_0x1de2c2]['previousPosition']=_0x3dbd0f['createPositionFromPath'](_0x1c3416,_0x6575d7),_0x6575d7['pop'](),_0x6575d7[_0x6575d7['length']-0x1]++,_0x1ce57d[_0x1de2c2]['nextPosition']=_0x3dbd0f['createPositionFromPath'](_0x1c3416,_0x6575d7)):(_0x1ce57d[_0x1de2c2]['previousPosition']=_0x3dbd0f['createPositionFromPath'](_0x1c3416,_0x6575d7),_0xe8cada?_0xe8cada['_data']+=_0x1ce57d[_0x1de2c2]['item']['data']:_0xe8cada=new _0x55ea04(_0x1ce57d[_0x1de2c2]['item']['data'],_0x1ce57d[_0x1de2c2]['item']['getAttributes']()),_0x1ce57d[_0x1de2c2+0x1]&&'text'===_0x1ce57d[_0x1de2c2+0x1]['type']&&_0x1ff38a(_0xe8cada,_0x1ce57d[_0x1de2c2+0x1]['item'])||(_0x1a0331[0x0]['_appendChild'](_0xe8cada),_0xe8cada=null),_0x6575d7[_0x6575d7['length']-0x1]+=_0x1ce57d[_0x1de2c2]['item']['offsetSize'],_0x1ce57d[_0x1de2c2]['nextPosition']=_0x3dbd0f['createPositionFromPath'](_0x1c3416,_0x6575d7));for(let _0x489b49=0x0;_0x489b49<_0x1ce57d['length'];_0x489b49++){const _0x247f75=_0x1ce57d[_0x489b49]['previousPosition'],_0x2653aa=_0x1ce57d[_0x489b49]['nextPosition'];for(const _0x56cc7d of _0x1ce57d[_0x489b49]['markersStart'])_0x1a0e5b['set'](_0x56cc7d,{'start':_0x247f75,'end':null});_0x19dd45('isRemoveSuggestion',_0x489b49,_0x247f75,_0x2653aa),_0x19dd45('isAddSuggestion',_0x489b49,_0x247f75,_0x2653aa),_0x19dd45('isRemoved',_0x489b49,_0x247f75,_0x2653aa),_0x19dd45('isAdded',_0x489b49,_0x247f75,_0x2653aa);for(const _0x15b563 of _0x1ce57d[_0x489b49]['markersEnd']){const _0x53affc=_0x1a0e5b['get'](_0x15b563);_0x53affc?_0x53affc['end']=_0x2653aa:_0x1a0e5b['set'](_0x15b563,{'start':_0x2653aa,'end':_0x2653aa});}}for(const [_0x22c29c,_0x2c7269]of _0x1a0e5b){const _0x5e0d97=this['editor']['model']['createRange'](_0x2c7269['start'],_0x2c7269['end']);_0x1c3416['markers']['set'](_0x22c29c,_0x5e0d97);}return _0x3bfd8d['sort']((_0x367cda,_0x48ca64)=>{const _0x3c2fe7=_0x1c3416['markers']['get']('revision:'+_0x367cda['id']),_0x24f50f=_0x1c3416['markers']['get']('revision:'+_0x48ca64['id']);return _0x3c2fe7['start']['isBefore'](_0x24f50f['start'])?-0x1:_0x3c2fe7['start']['isAfter'](_0x24f50f['start'])?0x1:_0x3c2fe7['end']['isBefore'](_0x24f50f['end'])?-0x1:_0x3c2fe7['end']['isAfter'](_0x24f50f['end'])?0x1:'add'===_0x367cda['type']?-0x1:0x1;}),{'root':_0x1c3416,'changes':_0x3bfd8d};function _0x19dd45(_0x19120b,_0x5ba8e8,_0x276901,_0x470aba){const _0x47a4c2=!!_0x1ce57d[_0x5ba8e8][_0x19120b],_0x2249e1=_0x47a4c2?_0x1ce57d[_0x5ba8e8][_0x19120b]['userId']:null,_0x456d95=_0x5ba8e8===_0x1ce57d['length']-0x1,_0x3b9e35=_0x3246f6[_0x19120b][0x0],_0x296240=_0x385112['isObject'](_0x1ce57d[_0x5ba8e8]['item']);!_0x111c1b[_0x19120b]&&_0x47a4c2?_0x111c1b[_0x19120b]={'start':_0x276901,'tapeItem':_0x1ce57d[_0x5ba8e8],'userId':_0x2249e1,'type':_0x19120b}:_0x111c1b[_0x19120b]&&!_0x47a4c2?(_0x111c1b[_0x19120b]['end']=_0x276901,_0x4996ad(_0x111c1b[_0x19120b]),_0x111c1b[_0x19120b]=null):_0x111c1b[_0x19120b]&&_0x47a4c2&&_0x111c1b[_0x19120b]['userId']!==_0x2249e1&&(_0x111c1b[_0x19120b]['end']=_0x276901,_0x3b9e35&&_0x3b9e35['userId']===_0x111c1b[_0x19120b]['userId']||_0x4996ad(_0x111c1b[_0x19120b]),_0x111c1b[_0x19120b]={'start':_0x276901,'tapeItem':_0x1ce57d[_0x5ba8e8],'userId':_0x2249e1,'type':_0x19120b}),_0x111c1b[_0x19120b]&&_0x296240&&('elementStart'!==_0x1ce57d[_0x5ba8e8]['type']||_0x3b9e35&&_0x3b9e35['userId']===_0x2249e1||_0x3246f6[_0x19120b]['unshift']({'userId':_0x2249e1,'object':_0x1ce57d[_0x5ba8e8]['item'],'change':_0x111c1b[_0x19120b]}),'elementEnd'===_0x1ce57d[_0x5ba8e8]['type']&&_0x3b9e35&&_0x3b9e35['object']===_0x1ce57d[_0x5ba8e8]['item']&&(_0x3246f6[_0x19120b]['shift'](),_0x111c1b[_0x19120b]=_0x3b9e35['change'])),_0x111c1b[_0x19120b]&&_0x456d95&&(_0x111c1b[_0x19120b]['end']=_0x470aba,_0x4996ad(_0x111c1b[_0x19120b]),_0x111c1b[_0x19120b]=null);}function _0x4996ad({start:_0x51c84d,end:_0x5af776,tapeItem:_0x37c8a9,userId:_0x253804,type:_0x200649}){const _0x178e35=_0x37c8a9['item'],_0x6f2812=_0x3dbd0f['schema']['isBlock'](_0x178e35)&&!_0x3dbd0f['schema']['isLimit'](_0x178e35),_0x438a94=_0x51c84d['nodeAfter']==_0x5af776['parent']&&_0x5af776['isAtStart'];if(_0x6f2812&&_0x438a94)return;const _0x36b75d=_0x3dbd0f['createRange'](_0x51c84d,_0x5af776),_0x3de1c8=_0x26a446['get'](_0x253804),_0x539e22=new G({'author':_0x3de1c8,'type':'isAdded'==_0x200649||'isAddSuggestion'==_0x200649?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x200649||'isRemoveSuggestion'==_0x200649},'createdAt':new Date(),'rootName':_0x3343c9});_0x3bfd8d['push'](_0x539e22),_0x1c3416['markers']['set']('revision:'+_0x539e22['id'],_0x36b75d);}function _0x1ff38a(_0x5d4e84,_0x19c242){const _0x33182=_0x5d4e84['getAttributes'](),_0x245413=_0x19c242['getAttributes']();for(const _0x46a9a8 of _0x33182){if(_0x46a9a8[0x1]!==_0x19c242['getAttribute'](_0x46a9a8[0x0]))return!0x1;_0x245413['next']();}return _0x245413['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x541710=>{const _0x449205=_0x541710['markerName']['split'](':')[0x1],_0x579c16=this['_getChangeFromId'](_0x449205);if(!_0x579c16)return null;const _0xf1497f='add'==_0x579c16['type']?'insertion':'deletion',_0x2185a9=['ck-suggestion-marker','ck-suggestion-marker-'+_0xf1497f];return _0x579c16['data']['isSuggestion']&&_0x2185a9['push']('ck-suggestion-marker-'+_0xf1497f+'-new'),this['activeChange']==_0x579c16&&_0x2185a9['push']('ck-suggestion-marker--active'),{'classes':_0x2185a9,'attributes':{'data-change-id':_0x449205}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x226176=>{_0x226176['on']('element:pre',(_0x317498,_0x59285c,_0x54b994)=>{const _0x45d05f=_0x59285c['viewItem']['getChild'](0x0);if(!_0x45d05f||!_0x45d05f['is']('element','code'))return;if(!_0x54b994['consumable']['consume'](_0x45d05f,{'attributes':['vid_start','vid_end']}))return;const _0x40fe8f=_0x59285c['modelRange']['start']['nodeAfter'];_0x54b994['writer']['setAttribute']('vid_start',_0x45d05f['getAttribute']('vid_start'),_0x40fe8f),_0x54b994['writer']['setAttribute']('vid_end',_0x45d05f['getAttribute']('vid_end'),_0x40fe8f);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1dee42=>{_0x1dee42['on']('element',(_0x228573,_0x496c80,_0x22947d)=>{if(!_0x22947d['consumable']['consume'](_0x496c80['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x496c80['modelRange']['isCollapsed'])return;const _0x3d6fef=_0x496c80['modelRange']['start']['nodeAfter'];_0x3d6fef['hasAttribute']('vid_start')||_0x3d6fef['hasAttribute']('vid')||(_0x22947d['writer']['setAttribute']('vid_start',_0x496c80['viewItem']['getAttribute']('vid_start'),_0x3d6fef),_0x22947d['writer']['setAttribute']('vid_end',_0x496c80['viewItem']['getAttribute']('vid_end'),_0x3d6fef));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x8a92f6=>_0x8a92f6['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x214283,[,_0x21953b])=>{['vid_start','vid_end','vid']['includes'](_0x21953b)&&(_0x214283['return']=!0x0,_0x214283['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4706c2=>{_0x4706c2['on']('attribute:vid',(_0x1dc1d3,_0x1bc0ca,_0x35cf9f)=>{if('\x20'!=_0x1bc0ca['item']['data']||_0x1bc0ca['item']['parent']['maxOffset']>0x1)return;if(!_0x35cf9f['consumable']['consume'](_0x1bc0ca['item'],_0x1dc1d3['name']))return;const _0x359af0=_0x35cf9f['writer'],_0x5ab005=_0x35cf9f['mapper']['toViewRange'](_0x1bc0ca['range']);_0x359af0['wrap'](_0x5ab005,_0x359af0['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3df70f){const _0x4475ca=_0x3df70f['plugins']['get']('RevisionViewer');return(_0x11eca1,_0x14e5b5,_0x337a85)=>{const _0x502dc6=_0x14e5b5['markerName']['split'](':')[0x1],_0x55c864=_0x4475ca['_getChangeFromId'](_0x502dc6);if(!_0x55c864)return null;const _0x15d721='add'==_0x55c864['type']?'split':'merge';if(!_0x337a85['consumable']['test'](_0x14e5b5['markerRange'],_0x11eca1['name']))return;const _0x1d7823=_0x14e5b5['markerRange']['getWalker'](),_0x3b43d5=_0x14e5b5['markerRange']['start'],_0x10f795=_0x3df70f['model']['schema'];let _0x1b59a7=null,_0x36cbf4=null,_0x5b29ce=!0x1,_0x157552=!0x1;for(const _0x3b337f of _0x1d7823){const _0x340749=_0x3b337f['item'];_0x5b29ce=_0x5b29ce||_0x10f795['isContent'](_0x340749);const _0x25a88d=_0x337a85['mapper']['toViewElement'](_0x340749);if(_0x25a88d&&_0x25a88d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3b337f['type']&&(_0x10f795['isBlock'](_0x340749)&&!_0x10f795['isLimit'](_0x340749)&&(_0x340749['nextSibling']||_0x3b43d5['isAtEnd']?_0x1b59a7&&_0x1b59a7['parent']==_0x340749||(_0x1b59a7=_0x340749,_0x3f612b(_0x3b337f['previousPosition']),_0x157552=!0x0):_0x36cbf4=_0x36cbf4||_0x3b337f['previousPosition']));}function _0x3f612b(_0x108d50){const _0x23c3a0=_0x337a85['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x15d721}),_0x15473d=_0x337a85['mapper']['toViewPosition'](_0x108d50);_0x55c864['data']['isSuggestion']&&_0x337a85['writer']['addClass']('ck-suggestion-marker-'+_0x15d721+'-new',_0x23c3a0),_0x4475ca['activeChange']==_0x55c864&&_0x337a85['writer']['addClass']('ck-suggestion-marker--active',_0x23c3a0),_0x337a85['writer']['insert'](_0x15473d,_0x23c3a0),_0x337a85['mapper']['bindElementToMarker'](_0x23c3a0,_0x14e5b5['markerName']);}_0x5b29ce||_0x157552||!_0x36cbf4||_0x3f612b(_0x36cbf4);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x4d0a2f,_0xd5b0cc,_0x7d498c)=>{const _0x4830ec=_0x7d498c['mapper']['markerNameToElements'](_0xd5b0cc['markerName']);if(_0x4830ec){for(const _0x1bdb32 of _0x4830ec)(_0x1bdb32['hasClass']('ck-suggestion-marker-split')||_0x1bdb32['hasClass']('ck-suggestion-marker-merge'))&&(_0x7d498c['mapper']['unbindElementFromMarkerName'](_0x1bdb32,_0xd5b0cc['markerName']),_0x7d498c['writer']['remove'](_0x1bdb32));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x11eb7b,_0x2d3d45,_0xea2212)=>{const _0x14f349=_0x2d3d45['markerName']['split'](':')[0x1],_0x2c1143=this['_getChangeFromId'](_0x14f349);if(!_0x2c1143)return null;const _0x11b181='add'==_0x2c1143['type']?'split':'merge';if(_0xea2212['consumable']['test'](_0x2d3d45['markerRange'],_0x11eb7b['name']))for(const _0x1754fa of _0x2d3d45['markerRange']['getItems']()){if(!_0x1754fa['is']('element','softBreak'))continue;const _0x185bb7=_0xea2212['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x11b181}),_0x2557b3=_0xea2212['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1754fa));_0x2c1143['data']['isSuggestion']&&_0xea2212['writer']['addClass']('ck-suggestion-marker-'+_0x11b181+'-new',_0x185bb7),this['activeChange']==_0x2c1143&&_0xea2212['writer']['addClass']('ck-suggestion-marker--active',_0x185bb7),_0xea2212['writer']['insert'](_0x2557b3,_0x185bb7),_0xea2212['mapper']['bindElementToMarker'](_0x185bb7,_0x2d3d45['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1d6072=>{for(const _0x17f405 of this['editor']['model']['document']['getRootNames']()){const _0x3bb209=this['editor']['model']['document']['getRoot'](_0x17f405),_0x4fee66=this['editor']['editing']['view']['document']['getRoot'](_0x17f405);if(_0x4fee66){const _0x19643e=_0x3bb209['getAttribute']('revisionHistoryAttachChange');if(_0x1d6072['removeAttribute']('data-change-id',_0x4fee66),_0x1d6072['removeClass']('ck-revision-history-root-add',_0x4fee66),_0x1d6072['removeClass']('ck-revision-history-root-remove',_0x4fee66),_0x1d6072['removeClass']('ck-revision-history-root--active',_0x4fee66),_0x19643e){const _0x14073b=this['_getChangeFromId'](_0x19643e);if(!_0x14073b)return null;_0x1d6072['setAttribute']('data-change-id',_0x19643e,_0x4fee66),_0x1d6072['addClass']('ck-revision-history-root-'+_0x14073b['type'],_0x4fee66),this['activeChange']==_0x14073b&&_0x1d6072['addClass']('ck-revision-history-root--active',_0x4fee66);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1afdc7=>'revision-comment:'+_0x1afdc7,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5adb4f=>'revision-suggestion:'+_0x5adb4f,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4ab7fb=>({'name':'suggestion:'+_0x4ab7fb,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1a7ad9=>{const _0x4dcb3b=_0x1a7ad9['markerName']['split'](':')[0x1];return'insertion'!=_0x4dcb3b&&'deletion'!=_0x4dcb3b?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4dcb3b]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x48348a,_0x4d2ee9,_0x32adba)=>{const _0x37ac3c=_0x32adba['mapper']['markerNameToElements'](_0x4d2ee9['markerName']);if(_0x37ac3c){for(const _0x857d55 of _0x37ac3c)_0x857d55['is']('uiElement')&&(_0x32adba['mapper']['unbindElementFromMarkerName'](_0x857d55,_0x4d2ee9['markerName']),_0x32adba['writer']['remove'](_0x857d55));}},{'priority':'high'});}['_getChangeFromId'](_0xef7b40){return this['_changeIdToChange']['get'](_0xef7b40);}['_getViewForChange'](_0x250895){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x250895),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1c3b3b,_0x80d368,_0x476c12,_0x3f7659)=>{_0x3f7659&&this['_balloon']['remove'](_0x3f7659),_0x476c12&&(this['_balloon']['add']({'view':_0x476c12,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x25979f=this['editor']['editing'],_0x421146=this['_getChangeFromId'](_0x476c12['changeId']);let _0x33f595;if(_0x421146['data']['isOnRoot']){const _0x1c5661=_0x25979f['view']['getDomRoot'](_0x421146['rootName']);_0x33f595=Array['from'](_0x1c5661['getClientRects']());}else{const _0x23bf41=this['editor']['model']['markers']['get']('revision:'+_0x476c12['changeId']);_0x33f595=Array['from'](_0x25979f['mapper']['markerNameToElements'](_0x23bf41['name']))['map'](_0x2f648f=>_0x25979f['view']['domConverter']['mapViewToDom'](_0x2f648f))['map'](_0x1da4d8=>Array['from'](_0x1da4d8['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x33f595[0x0];return _0x33f595['find'](_0x5352ab=>_0x5352ab['top']-0x3<=this['_activeViewTarget']['y']&&_0x5352ab['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x5352ab['left']-0x3<=this['_activeViewTarget']['x']&&_0x5352ab['right']+0x3>=this['_activeViewTarget']['x'])||_0x33f595[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5de5b8,_0x2c40ee,_0x22d3cf,_0x10b365)=>{this['activeView']=_0x22d3cf?this['_getViewForChange'](_0x22d3cf):null,this['editor']['model']['change'](()=>{const _0x4166bb=this['editor']['editing'];_0x10b365&&(_0x10b365['data']['isOnRoot']?_0x4166bb['view']['change'](_0x192060=>{_0x192060['removeClass']('ck-revision-history-root--active',_0x4166bb['view']['document']['getRoot'](_0x10b365['rootName']));}):_0x4166bb['reconvertMarker']('revision:'+_0x10b365['id'])),_0x22d3cf&&(_0x22d3cf['data']['isOnRoot']?_0x4166bb['view']['change'](_0x494432=>{_0x494432['addClass']('ck-revision-history-root--active',_0x4166bb['view']['document']['getRoot'](_0x22d3cf['rootName']));}):_0x4166bb['reconvertMarker']('revision:'+_0x22d3cf['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x363bc7,_0x33c5c0)=>{if(this['activeChange'])return;const _0x142872=this['_findChangeIdFromDomTarget'](_0x33c5c0['target']),_0x8de0af=this['_changeIdToChange']['get'](_0x142872);_0x8de0af?(this['_activeViewTarget']={'x':_0x33c5c0['domEvent']['x'],'y':_0x33c5c0['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x8de0af)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2a7b31,_0xa1315d)=>{const _0x3e1b7d=this['_findChangeIdFromDomTarget'](_0xa1315d['target']),_0x1f8d27=this['_changeIdToChange']['get'](_0x3e1b7d);_0x1f8d27?(this['_activeViewTarget']={'x':_0xa1315d['domEvent']['x'],'y':_0xa1315d['domEvent']['y']},_0x1f8d27===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1f8d27):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x165201){do{const _0x57cbca=_0x165201['getAttribute']('data-change-id');if(_0x57cbca)return _0x57cbca;_0x165201=_0x165201['parent'];}while(_0x165201);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1d557c=>{for(const _0x5b0b9f of this['editor']['model']['markers'])_0x1d557c['removeMarker'](_0x5b0b9f);});}}function Q(_0x129f2a,_0x4ab91f){return(_0x3557a3,_0x4d663b,_0xf2d544)=>{if(!_0xf2d544['consumable']['test'](_0x4d663b['markerRange'],_0x3557a3['name']))return;const _0x2596c6=_0x4d663b['markerRange']['getWalker'](),_0xee0c34=_0x4d663b['markerRange']['start'],_0x1faf39=_0x129f2a['model']['schema'];let _0x5938e4=null,_0xca29c0=null,_0x210df4=!0x1,_0x1c04d3=!0x1;for(const _0xb5bf1b of _0x2596c6){const _0x23e29b=_0xb5bf1b['item'];_0x210df4=_0x210df4||_0x1faf39['isContent'](_0x23e29b);const _0x381fbd=_0xf2d544['mapper']['toViewElement'](_0x23e29b);if(_0x381fbd&&_0x381fbd['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xb5bf1b['type']&&(_0x1faf39['isBlock'](_0x23e29b)&&!_0x1faf39['isLimit'](_0x23e29b)&&(_0x23e29b['nextSibling']||_0xee0c34['isAtEnd']?_0x5938e4&&_0x5938e4['parent']==_0x23e29b||(_0x5938e4=_0x23e29b,_0x3cd747(_0xb5bf1b['previousPosition']),_0x1c04d3=!0x0):_0xca29c0=_0xca29c0||_0xb5bf1b['previousPosition']));}function _0x3cd747(_0x1b2be4){const _0x466096=_0xf2d544['mapper']['toViewPosition'](_0x1b2be4),_0x4824f7=_0xf2d544['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x4ab91f});_0xf2d544['writer']['insert'](_0x466096,_0x4824f7),_0xf2d544['mapper']['bindElementToMarker'](_0x4824f7,_0x4d663b['markerName']);}_0x210df4||_0x1c04d3||!_0xca29c0||_0x3cd747(_0xca29c0);};}class nt extends _0x148061{constructor(_0x469f74){super(_0x469f74);const _0xb9f45=_0x469f74['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0xb9f45,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xb9f45,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x1d8522=this['editor'],_0x283d07=_0x1d8522['plugins']['get'](l),_0x54789f=_0x283d07['isReady']?_0x283d07['diff']['newRevisionId']:null;_0x1d8522['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x54789f);}['refresh'](){const {isReady:_0x414bdd,isEnabled:_0x593d16,repository:_0x19bb7d,diff:_0x24d0ad}=this['editor']['plugins']['get'](l),_0x5beae3=_0x24d0ad&&_0x19bb7d['getLaterVisibleRevision'](_0x24d0ad['newRevisionId']);this['isEnabled']=_0x414bdd&&_0x593d16&&Boolean(_0x5beae3);}}class ot extends _0x148061{['_step'];constructor(_0x22a476,{direction:_0x4dc0ca}){super(_0x22a476);const _0x2b314a=_0x22a476['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x4dc0ca?0x1:-0x1,this['listenTo'](_0x2b314a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2b314a,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2b314a,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1ede94=this['editor'],_0x101ec9=_0x1ede94['plugins']['get'](l),{isNavigationMode:_0x1687a4,currentChangeNumber:_0x4e2d9d}=_0x101ec9;let _0x588599;if(_0x101ec9['activeChange']=_0x1687a4?_0x101ec9['diff']['changes']['get'](_0x4e2d9d+this['_step']):_0x101ec9['diff']['changes']['first'],_0x101ec9['activeChange']['data']['isOnRoot'])_0x588599=_0x1ede94['editing']['view']['getDomRoot'](_0x101ec9['activeChange']['rootName']);else{const _0x146897=_0x1ede94['model']['markers']['get']('revision:'+_0x101ec9['activeChange']['id']);_0x588599=_0x7f1a49(_0x1ede94['editing'],_0x146897);}_0x41fd72({'target':_0x588599,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x373204,currentChangeNumber:_0x5caec0,numberOfChanges:_0xfe142,isReady:_0x3629bd,isEnabled:_0x3cc368}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x3cc368&&_0x3629bd&&_0xfe142)&&(!_0x373204||(0x1===this['_step']?_0x5caec0<_0xfe142-0x1:_0x5caec0>0x0));}}class xi extends _0x558a40{constructor(_0x2006e9){super(_0x2006e9);const _0x3d7a76=this['bindTemplate'],_0x5994de=new _0x50c1a2(_0x2006e9),_0x1720fc=new _0x50c1a2(_0x2006e9);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',(_0x265cff,_0x4a1378)=>_0x265cff&&_0x4a1378>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x31b4f7,_0x6b8bf2,_0x2e1af9,_0x2e0b34)=>{if(!_0x31b4f7)return R(_0x2006e9,'Loading...');if(!_0x2e1af9)return R(_0x2006e9,'No\x20changes');const _0x4edf9a=R(_0x2006e9,'NUMBER_OF_CHANGES',_0x2e1af9);return _0x2e0b34?R(_0x2006e9,'X_OF_Y_CHANGES',[_0x6b8bf2+0x1,_0x2e1af9]):_0x4edf9a;}),_0x5994de['set']({'label':R(_0x2006e9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x5b4589}),_0x1720fc['set']({'label':R(_0x2006e9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xeedd28}),_0x5994de['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1720fc['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5994de['on']('execute',()=>this['fire']('execute','backward')),_0x1720fc['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',_0x3d7a76['if']('_isStatusLabelVisible','ck-hidden',_0xa24153=>!_0xa24153)]},'children':[{'text':_0x3d7a76['to']('isNavigationMode',_0x14b977=>_0x14b977?R(_0x2006e9,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x2006e9,'Total')+':\x20')}]},{'text':_0x3d7a76['to']('_statusText')}]},new _0x3e7d4a(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5994de,_0x1720fc]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0x3146aa{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4b73e8=this['editor']['editing']['view'];_0x4b73e8['change'](_0x77ae4c=>{for(const _0x1067b9 of _0x4b73e8['document']['roots'])_0x77ae4c['addClass'](ge,_0x1067b9);});}['hide'](){const _0x3f9119=this['editor']['editing']['view'];_0x3f9119['change'](_0x4dbc0d=>{for(const _0x11b48f of _0x3f9119['document']['roots'])_0x4dbc0d['removeClass'](ge,_0x11b48f);});}}class u extends _0x3146aa{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,Ri];}['init'](){const _0x2664df=this['editor'],_0x359aa3=_0x2664df['plugins']['get'](l),_0x33d21e=_0x2664df['plugins']['get'](Ri);_0x2664df['ui']['componentFactory']['add']('exitToEditing',_0x5c8892=>{const _0x279b25=new _0x50c1a2(_0x5c8892);return _0x279b25['set']({'label':R(_0x5c8892,'Back\x20to\x20editing'),'icon':_0x3dc335,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x279b25,'execute',()=>{_0x2664df['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x279b25;}),_0x2664df['ui']['componentFactory']['add']('restoreRevision',_0x503490=>{const _0x317050=new _0x50c1a2(_0x503490);return _0x317050['set']({'label':R(_0x503490,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x317050['bind']('isEnabled')['to'](_0x2664df['commands']['get']('restoreRevision')),this['listenTo'](_0x317050,'execute',()=>_0x2664df['execute']('restoreRevision')),_0x317050;}),_0x2664df['ui']['componentFactory']['add']('changesNavigation',_0x3cf3a9=>{const _0x211cc1=new xi(_0x3cf3a9),_0x40c5ef=_0x2664df['commands']['get']('showPreviousChange'),_0x25d28e=_0x2664df['commands']['get']('showNextChange');return _0x211cc1['bind']('isBackwardNavigationEnabled')['to'](_0x40c5ef,'isEnabled'),_0x211cc1['bind']('isForwardNavigationEnabled')['to'](_0x25d28e,'isEnabled'),_0x211cc1['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x359aa3),this['listenTo'](_0x211cc1,'execute',(_0x3501f0,_0x3ec76a)=>{_0x2664df['execute']('forward'===_0x3ec76a?'showNextChange':'showPreviousChange');}),_0x211cc1;}),_0x33d21e['show'](),_0x359aa3['on']('change:isReady',(_0x5d7143,_0x41c492,_0x21fb7a)=>{_0x21fb7a?_0x33d21e['hide']():_0x33d21e['show']();});}}class _i extends ti{['_resizeObserver']=null;constructor(_0x34b5f9,_0x7ab1be){super(_0x34b5f9,_0x7ab1be);const _0x318319=this['bindTemplate'];this['set']({'label':R(_0x34b5f9,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x34b5f9,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x318319['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new et(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x140b70=this['fieldView']['element'];this['_tooltipString']=_0x140b70['scrollWidth']>_0x140b70['clientWidth']&&_0x140b70['value']||'';}}class bi extends _0x558a40{constructor(_0x59a707,_0x20a1a1,_0xb0a676){super(_0x59a707);const _0x299728=new _0x4d5e11();_0x299728['set']({'content':_0x160d41,'viewBox':'0\x200\x2011\x2010'});const _0x4debd3=['ck','ck-revision-history-sidebar__revision-author'];_0xb0a676&&_0x4debd3['push']('ck-revision-history-sidebar__revision-author_creator');const _0x53e7d3=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x59a707,_0xb0a676?'Revision\x20creator':'Revision\x20author')},'children':[_0x299728,_0x20a1a1['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4debd3},'children':_0x53e7d3});}}function ki(_0x52c848,_0x587a70){const _0x2bf198=_0x52c848['bindTemplate'],_0x561793=_0x52c848['locale'],_0x22bda8=_0x4a7c72(_0x561793);_0x22bda8['panelPosition']='sw';const _0x8c71a0=function(_0x31675,_0xe58959){const _0x2ded7c=function(_0x30b2de,_0x1e0483){const _0x20b67a=_0x30b2de['locale'],_0x13bebd={'Compare\x20against\x20selected':R(_0x20b67a,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x20b67a,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x20b67a,'Restore\x20this\x20revision')};return _0x1e0483['map'](_0x4eccf0=>{const _0x39b2f9=_0x13bebd[_0x4eccf0['name']];return _0x39b2f9&&_0x39b2f9!==_0x4eccf0['name']&&(_0x4eccf0['name']=_0x39b2f9),_0x4eccf0;});}(_0x31675,_0xe58959),_0xc8348e=new _0xcf03c8();for(const _0x5d3b72 of _0x2ded7c){const _0xf7a1de={'type':'button','model':new to({'label':_0x5d3b72['name'],'class':_0x5d3b72['class'],'withText':!0x0,'role':'menuitem','_action':_0x5d3b72['action']})};_0xf7a1de['model']['bind']('isEnabled')['to'](_0x31675,'isActionsDropdownOpen',_0x2e2e4e=>'function'!=typeof _0x5d3b72['isEnabled']||(!_0x2e2e4e||_0x5d3b72['isEnabled'](_0x31675))),_0xc8348e['add'](_0xf7a1de);}return _0xc8348e;}(_0x52c848,_0x587a70);return _0x52c848['bind']('isActionsDropdownOpen')['to'](_0x22bda8,'isOpen'),_0x22bda8['buttonView']['set']({'label':R(_0x561793,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1bffb2}),_0x22bda8['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2bf198['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2bf198['to'](_0x493830=>_0x493830['stopPropagation']())}}),_0x22bda8['on']('execute',_0x912376=>{_0x52c848['isReady']&&'function'==typeof _0x912376['source']['_action']&&_0x912376['source']['_action'](_0x52c848);}),_0xd1d65d(_0x22bda8,_0x8c71a0,{'role':'menu'}),_0x22bda8['listenTo'](_0x52c848,'change:isActionsDropdownOpen',(_0x20e6bc,_0x5ac07f,_0x4bbb07)=>{if(_0x4bbb07)for(const _0x567344 of _0x22bda8['listView']['items']){const _0x2c3583=_0x567344['children']['first'],_0x58789b=_0x587a70['find'](_0x10b5ea=>_0x10b5ea['action']===_0x2c3583['_action'])['isVisible'];_0x567344['isVisible']=void 0x0===_0x58789b||_0x58789b(_0x52c848);}}),_0x22bda8;}class ci extends/* #__PURE__ -- @preserve */
27
- _0x55df8e(_0x558a40){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x136052,_0x28b8d5,_0x3ee38a,_0x37fa5e){super(_0x136052);const _0x46ff75=this['bindTemplate'],_0x7b438d=function(_0x3855e1,_0x2ebd57){const _0x5bd487=Array['from'](_0x2ebd57['authors'])['filter'](_0x171265=>_0x171265!=_0x2ebd57['creator']);return _0x2ebd57['creator']&&_0x5bd487['unshift'](_0x2ebd57['creator']),_0x5bd487['map'](_0x145c38=>new bi(_0x3855e1,_0x145c38,_0x145c38==_0x2ebd57['creator']));}(_0x136052,_0x28b8d5);this['id']=_0x28b8d5['id'],this['_revision']=_0x28b8d5,this['_requireRevisionName']=_0x37fa5e,this['bind']('name','createdAt')['to'](_0x28b8d5),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x34f117=>{return _0x262da4=_0x136052['uiLanguage'],(_0x2a42db=_0x34f117)['toLocaleDateString'](_0x262da4,{'month':'long','day':'numeric'})+',\x20'+_0x2a42db['toLocaleTimeString'](_0x262da4,{'hour':'numeric','minute':'numeric'});var _0x262da4,_0x2a42db;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new _i(_0x136052,_0x44cca1),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x35e6b2=>_0x35e6b2||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x42eaa7,_0xd0268d)=>_0x42eaa7&&_0xd0268d),this['revisionActionsView']=_0x3ee38a&&_0x3ee38a['length']?ki(this,_0x3ee38a):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x46ff75['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x46ff75['if']('isEnabled','ck-disabled',_0x4b1198=>!_0x4b1198),_0x46ff75['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x46ff75['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x46ff75['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':_0x46ff75['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':_0x7b438d}]},this['revisionActionsView']],'on':{'click':_0x46ff75['to'](_0x1317c5=>{_0x1317c5['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x20e645=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x20e645,'change',()=>{this['_requireRevisionName']&&!_0x20e645['value']||this['fire']('setName',{'id':this['id'],'name':_0x20e645['value']}),_0x20e645['value']||(_0x20e645['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function di(_0x48f980,_0x3d7491){const _0x281caf=_0x78e786['fromJSDate'](_0x48f980)['setLocale'](_0x3d7491),_0x391c3c=_0x78e786['local'](),_0x18ce77=_0x391c3c['minus']({'days':0x1})['startOf']('day');let _0x4f175d,_0x3cc553;return _0x281caf['hasSame'](_0x391c3c,'day')?(_0x4f175d=_0x281caf['startOf']('day')['toJSDate'](),_0x3cc553=_0x281caf['toRelativeCalendar']()):_0x281caf['hasSame'](_0x18ce77,'day')?(_0x4f175d=_0x18ce77['toJSDate'](),_0x3cc553=_0x281caf['toRelativeCalendar']()):_0x281caf['hasSame'](_0x391c3c,'week')?(_0x4f175d=_0x281caf['startOf']('week')['toJSDate'](),_0x3cc553=_0x281caf['weekdayLong']||''):_0x281caf['hasSame'](_0x391c3c,'year')?(_0x4f175d=_0x281caf['startOf']('month')['toJSDate'](),_0x3cc553=_0x281caf['monthLong']||''):(_0x4f175d=_0x281caf['startOf']('year')['toJSDate'](),_0x3cc553=String(_0x281caf['year'])),{'startDate':_0x4f175d,'localizedPeriodName':_0x3cc553};}class vi extends _0x558a40{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1afb8b,_0x4cc50d,_0x4ea62c,_0x1d00c6){super(_0x1afb8b);const _0x47efe9=di(_0x4cc50d,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4cc50d,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4ea62c,this['_requireRevisionName']=_0x1d00c6,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':_0x47efe9}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1f7f45){const _0x3a97f7=new ci(this['locale'],_0x1f7f45,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3a97f7);}['removeRevision'](_0x493417){const _0x5e3537=this['revisionViews']['find'](_0x542897=>_0x542897['id']===_0x493417['id']);this['revisionViews']['remove'](_0x5e3537);}}class mi extends _0x558a40{constructor(_0x119d0d){super(_0x119d0d);const _0x58dfee=new _0x4d5e11();_0x58dfee['content']=_0x1c1518,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x58dfee,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x119d0d,'Revision\x20history')]}]});}}class ai extends _0x558a40{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4cb66f,_0x414666,_0x3fae7a,_0x5a5084){super(_0x4cb66f);const _0xb12463=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x414666,this['_revisionActions']=_0x3fae7a,this['_requireRevisionName']=_0x5a5084,this['on']('select',(_0x30515b,_0x5c6681)=>{this['fire']('revisionSelected',_0x5c6681);}),this['on']('setName',(_0x34b72d,_0x3867d6)=>{this['fire']('revisionSetName',_0x3867d6);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new mi(_0x4cb66f),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0xb12463['if']('isEnabled','ck-disabled',_0x21d52b=>!_0x21d52b)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x332f19 of this['_revisions'])this['_addRevision'](_0x332f19);this['_revisions']['on']('add',(_0x872ff4,_0x327a4a)=>{this['_addRevision'](_0x327a4a);}),this['_revisions']['on']('remove',(_0xa859f,_0x36bb88)=>{this['_removeRevision'](_0x36bb88);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x293cd3=>_0x293cd3['revisionViews']['map'](_0x1a37a9=>_0x1a37a9))['flat']();}['selectRevision'](_0x243621){for(const _0x4fac70 of this['revisionViews'])_0x243621&&_0x243621['id']===_0x4fac70['id']?_0x4fac70['select']():_0x4fac70['deselect']();}['highlightRevisions'](_0x409d05){for(const _0x263c36 of this['revisionViews'])_0x409d05['some'](({id:_0x2cc2db})=>_0x2cc2db===_0x263c36['id'])?_0x263c36['highlight']():_0x263c36['unhighlight']();}['_addRevision'](_0x52cfe4){const _0x5c078b=di(_0x52cfe4['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x11886e=this['timePeriodViews']['get'](0x0);_0x11886e&&_0x11886e['startDate']['getTime']()===_0x5c078b['getTime']()||(_0x11886e=new vi(this['locale'],_0x5c078b,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x11886e)),_0x11886e['addRevision'](_0x52cfe4);}['_removeRevision'](_0x7c8fe7){const _0x27a060=di(_0x7c8fe7['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x27a060)['removeRevision'](_0x7c8fe7);}['_getTimePeriodViewByStartDate'](_0x52fa18){return this['timePeriodViews']['find'](_0x1cd704=>_0x1cd704['startDate']['getTime']()===_0x52fa18['getTime']());}}class f extends _0x3146aa{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x4c96c5,uid as _0xcc759,Collection as _0x48b74b,logWarning as _0x4c4d4e,FocusTracker as _0x252db7,KeystrokeHandler as _0x363034,scrollViewportToShowTarget as _0x1908f6,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x1d35cc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3692ca,set as _0x5919e3,unset as _0x5cd18c,isEqual as _0x1c720e}from'es-toolkit/compat';import{Plugin as _0x307a2f,PendingActions as _0x326738,Command as _0x260634,ElementApiMixin as _0x4b52a8,Editor as _0x2fe6b0}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x270810,getMarkerDomElement as _0x30b37d,ConfirmMixin as _0x6eb108,sanitizeEditorConfig as _0x804229}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x48cd3d,ViewAttributeElement as _0x244352,ViewEmptyElement as _0x297b29,ViewRawElement as _0x1e624d,ViewUIElement as _0x1e1d78,ViewDocumentFragment as _0xf5f3e3,ViewText as _0xd4836b,ViewElement as _0x18ff1e,ModelElement as _0x30b597,ModelRange as _0x3e71fc,ModelPosition as _0x1b0175,ModelDocumentFragment as _0x265c7b,ModelText as _0x5dbf5e}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x38f638,IconChevronUp as _0x4c764d,IconChevronDown as _0x13ad89,IconUndo as _0x2e683e,IconUser as _0x555db3,IconThreeVerticalDots as _0x28c6e5}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x20dd09,View as _0xb6dc9,submitHandler as _0x1196b9,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x1f4821,ListView as _0x26a8eb,ListItemView as _0x56cb51,ButtonView as _0x2f26c0,MenuBarMenuView as _0x255e89,MenuBarMenuListView as _0x58a194,MenuBarMenuListItemView as _0x3aa88e,MenuBarMenuListItemButtonView as _0x4f7c3e,ContextualBalloon as _0x41047d,ToolbarSeparatorView as _0x1b6702,IconView as _0x271871,addListToDropdown as _0x9e41a0,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x21c88c,StickyPanelView as _0x574a08,ToolbarView as _0x193e15,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x3f0a40}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x4c96c5(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x48e5d1){super(),this['id']=_0x48e5d1['id']||_0xcc759(),this['creator']=_0x48e5d1['creator']||null,this['authors']=_0x48e5d1['authors']||[],this['diffData']=_0x48e5d1['diffData']||null,this['toVersion']=_0x48e5d1['toVersion']||0x0,this['fromVersion']=_0x48e5d1['fromVersion']||0x0,this['set']('name',_0x48e5d1['name']||''),this['set']('createdAt',_0x48e5d1['createdAt']||new Date()),this['set']('attributes',_0x48e5d1['attributes']||{});}['setName'](_0x3339c2){this['_update']({'name':_0x3339c2});}['setAttribute'](_0x6e7d54,_0x41afa3){const _0x2b3d6c=_0x3692ca(this['attributes']);_0x5919e3(_0x2b3d6c,_0x6e7d54,_0x41afa3),this['_update']({'attributes':_0x2b3d6c});}['removeAttribute'](_0x6ed947){const _0x5e4bf6=_0x3692ca(this['attributes']);_0x5cd18c(_0x5e4bf6,_0x6ed947),this['_update']({'attributes':_0x5e4bf6});}['_update'](_0x5c6520,_0x81fc64=!0x1){let _0xd9709f=!0x1;const _0x14b18b={'id':this['id']},_0x3ab302=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x48c5b9 of _0x3ab302){const _0x343944=_0x5c6520[_0x48c5b9];void 0x0!==_0x343944&&_0x343944!==this[_0x48c5b9]&&(this[_0x48c5b9]=_0x343944,_0x14b18b[_0x48c5b9]=_0x343944,_0xd9709f=!0x0);}_0xd9709f&&(_0x14b18b['authors']&&(_0x14b18b['authorsIds']=_0x14b18b['authors']['map'](_0x55626a=>_0x55626a['id']),delete _0x14b18b['authors']),this['fire']('_update',_0x14b18b,_0x81fc64));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x19b943=>_0x19b943['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x307a2f{['_revisions'];static get['requires'](){return[_0x270810];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x4c6635){super(_0x4c6635),this['_revisions']=new _0x48b74b();}['afterInit'](){!async function(_0x5a7ec6){const _0x516767=_0x7b9d1c([0x50,0x4b,0x7a,0x43,0x39,0x64,0x72,0x31,0x6f,0x69,0x73,0x68,0x55,0x71,0x62,0x54,0x52,0x6e,0x4f,0x44,0x45,0x48,0x4a,0x33,0x5a,0x77,0x6b,0x46,0x53,0x6d,0x42,0x6a,0x51,0x67,0x66,0x58,0x4c,0x41,0x37,0x47,0x30,0x57,0x6c,0x34,0x35,0x63,0x74,0x61,0x38,0x79,0x4e,0x36,0x65,0x32,0x56,0x59,0x4d,0x70,0x49,0x78,0x76,0x75]),_0x45488a=0xeb829,_0x1d7429=0x6bc1f7be,_0x1fe679=0x6bc69846^_0x1d7429,_0x15c0c5=window[_0x7b9d1c([0x44,0x61,0x74,0x65])][_0x7b9d1c([0x6e,0x6f,0x77])](),_0x246ffd=_0x5a7ec6[_0x7b9d1c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xc2e05a=new window[(_0x7b9d1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e0655=>{_0x246ffd[_0x7b9d1c([0x6f,0x6e,0x63,0x65])](_0x7b9d1c([0x72,0x65,0x61,0x64,0x79]),_0x1e0655);}),_0x5d7248={[_0x7b9d1c([0x6b,0x74,0x79])]:_0x7b9d1c([0x45,0x43]),[_0x7b9d1c([0x75,0x73,0x65])]:_0x7b9d1c([0x73,0x69,0x67]),[_0x7b9d1c([0x63,0x72,0x76])]:_0x7b9d1c([0x50,0x2d,0x32,0x35,0x36]),[_0x7b9d1c([0x78])]:_0x7b9d1c([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]),[_0x7b9d1c([0x79])]:_0x7b9d1c([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]),[_0x7b9d1c([0x61,0x6c,0x67])]:_0x7b9d1c([0x45,0x53,0x32,0x35,0x36])},_0x4caf23=_0x246ffd[_0x7b9d1c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x7b9d1c([0x67,0x65,0x74])](_0x7b9d1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe67700(){let _0x59e405,_0x1caec4=null,_0x5b4e79=null;try{if(_0x4caf23==_0x7b9d1c([0x47,0x50,0x4c]))return _0x7b9d1c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x59e405=_0x44ccb9(),!_0x59e405)return _0x7b9d1c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x59e405[_0x7b9d1c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5b4e79=_0x2e27d2(_0x59e405[_0x7b9d1c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x59e405[_0x7b9d1c([0x6a,0x74,0x69])])),await _0x5b9fbf()?_0x41149d()?_0x1d9ee0()?_0x7b9d1c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x361089()?(_0x59e405[_0x7b9d1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x7b9d1c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1caec4=_0x2f076f(_0x7b9d1c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x59e405[_0x7b9d1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x7b9d1c([0x74,0x72,0x69,0x61,0x6c])&&(_0x1caec4=_0x2f076f(_0x7b9d1c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x17ff9e()):_0x7b9d1c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x7b9d1c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x7b9d1c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x7b9d1c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1d9ee0(){const _0x1e8f7f=[_0x7b9d1c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x7b9d1c([0x74,0x72,0x69,0x61,0x6c])][_0x7b9d1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59e405[_0x7b9d1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x15c0c5/0x3e8:0xe10*_0x1fe679;return _0x59e405[_0x7b9d1c([0x65,0x78,0x70])]<_0x1e8f7f;}function _0x41149d(){const _0x3d150a=_0x59e405[_0x7b9d1c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3d150a)return!0x1;if(_0x3d150a[_0x7b9d1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7b9d1c([0x2a])))return!0x0;if(_0x3d150a[_0x7b9d1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7b9d1c([0x52,0x48])))return!0x0;if(_0x3d150a[_0x7b9d1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7b9d1c([0x52,0x52,0x48]))){if(_0x12c486())return!0x0;if(_0x5865bc()||_0x4d38aa())return!0x0;}return!0x1;}function _0x361089(){const _0x3c0d63=_0x59e405[_0x7b9d1c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3c0d63||0x0==_0x3c0d63[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4b9177}=new URL(window[_0x7b9d1c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3c0d63[_0x7b9d1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b9177))return!0x0;const _0xd900b=_0x4b9177[_0x7b9d1c([0x73,0x70,0x6c,0x69,0x74])](_0x7b9d1c([0x2e]));return _0x3c0d63[_0x7b9d1c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2bfc48=>_0x2bfc48[_0x7b9d1c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7b9d1c([0x2a])))[_0x7b9d1c([0x6d,0x61,0x70])](_0x2505c0=>_0x2505c0[_0x7b9d1c([0x73,0x70,0x6c,0x69,0x74])](_0x7b9d1c([0x2e])))[_0x7b9d1c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32bd5f=>_0x32bd5f[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xd900b[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x7b9d1c([0x6d,0x61,0x70])](_0x1329a3=>Array(_0xd900b[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1329a3[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x7b9d1c([0x66,0x69,0x6c,0x6c])](_0x1329a3[0x0]===_0x7b9d1c([0x2a])?_0x7b9d1c([0x2a]):'')[_0x7b9d1c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1329a3))[_0x7b9d1c([0x73,0x6f,0x6d,0x65])](_0x3f15f8=>_0xd900b[_0x7b9d1c([0x65,0x76,0x65,0x72,0x79])]((_0x9070e9,_0x1eed9f)=>_0x3f15f8[_0x1eed9f]===_0x9070e9||_0x3f15f8[_0x1eed9f]===_0x7b9d1c([0x2a])));}function _0x17ff9e(){return _0x1caec4&&_0x5b4e79?new window[(_0x7b9d1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x55c28f,_0x21cbe5)=>{_0x1caec4[_0x7b9d1c([0x74,0x68,0x65,0x6e])](_0x55c28f,_0x21cbe5),_0x5b4e79[_0x7b9d1c([0x74,0x68,0x65,0x6e])](_0x3099be=>{_0x3099be!=_0x7b9d1c([0x56,0x61,0x6c,0x69,0x64])&&_0x55c28f(_0x3099be);},_0x21cbe5);}):_0x1caec4||_0x5b4e79||_0x7b9d1c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2e27d2(_0x2a112d,_0x28c742){return new window[(_0x7b9d1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d86c6=>{if(_0xa6a170())return _0x1d86c6(_0x7b9d1c([0x56,0x61,0x6c,0x69,0x64]));_0x1b5da6(),_0x246ffd[_0x7b9d1c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x7b9d1c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4110d3=!0x1;const _0x22186d=_0xcc759();function _0x2f24ef(_0xf82e85){return!!_0xf82e85&&(typeof _0xf82e85===_0x7b9d1c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xf82e85===_0x7b9d1c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xf82e85[_0x7b9d1c([0x74,0x68,0x65,0x6e])]===_0x7b9d1c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xf82e85[_0x7b9d1c([0x63,0x61,0x74,0x63,0x68])]===_0x7b9d1c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x32e4a8(_0x5aaa27){_0x3629f9(_0x5aaa27)[_0x7b9d1c([0x74,0x68,0x65,0x6e])](_0x45cf93=>{if(!_0x45cf93||_0x45cf93[_0x7b9d1c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x7b9d1c([0x6f,0x6b]))return _0x7b9d1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xbf322c(_0x5a32cc(_0x22186d+_0x28c742))!=_0x45cf93[_0x7b9d1c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x7b9d1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x7b9d1c([0x56,0x61,0x6c,0x69,0x64]);})[_0x7b9d1c([0x74,0x68,0x65,0x6e])](_0x1779df=>(_0x46a88d(),_0x1779df),()=>{const _0xe5e702=_0xba7c32();return null==_0xe5e702?(_0x46a88d(),_0x7b9d1c([0x56,0x61,0x6c,0x69,0x64])):_0x7b9d1c(_0x15c0c5-_0xe5e702>(0x4fcd73be^_0x1d7429)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x7b9d1c([0x74,0x68,0x65,0x6e])](_0x1d86c6)[_0x7b9d1c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1d86c6(_0x7b9d1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x121915=0x6bf7193e^_0x1d7429;function _0x46a88d(){const _0x3f8bdf=_0x7b9d1c([0x6c,0x6c,0x63,0x74,0x2d])+_0xbf322c(_0x5a32cc(_0x2a112d)),_0x2bb5d2=_0x5b121a(_0xbf322c(window[_0x7b9d1c([0x4d,0x61,0x74,0x68])][_0x7b9d1c([0x63,0x65,0x69,0x6c])](_0x15c0c5/_0x121915)));window[_0x7b9d1c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x7b9d1c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f8bdf,_0x2bb5d2);}function _0xba7c32(){const _0x2b897f=_0x7b9d1c([0x6c,0x6c,0x63,0x74,0x2d])+_0xbf322c(_0x5a32cc(_0x2a112d)),_0x3eb7c2=window[_0x7b9d1c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x7b9d1c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b897f);return _0x3eb7c2?window[_0x7b9d1c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5b121a(_0x3eb7c2),0x10)*_0x121915:null;}function _0x3629f9(_0x2f0b01){return new window[(_0x7b9d1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a5a32,_0x40b61f)=>{_0x2f0b01[_0x7b9d1c([0x74,0x68,0x65,0x6e])](_0x3a5a32,_0x40b61f),window[_0x7b9d1c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x40b61f,0x6bc0237e^_0x1d7429);});}}_0x246ffd[_0x7b9d1c([0x6f,0x6e])](_0x7b9d1c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x586011,_0x37931d)=>{if(_0x37931d[0x0]!=_0x2a112d)return _0x1d86c6(_0x7b9d1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x37931d[0x1]={..._0x37931d[0x1],[_0x7b9d1c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x22186d};},{[_0x7b9d1c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x7b9d1c([0x68,0x69,0x67,0x68])}),_0x246ffd[_0x7b9d1c([0x6f,0x6e])](_0x7b9d1c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5c7b8f=>{_0x2f24ef(_0x5c7b8f[_0x7b9d1c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4110d3=!0x0,_0x32e4a8(_0x5c7b8f[_0x7b9d1c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x7b9d1c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x7b9d1c([0x6c,0x6f,0x77])}),_0xc2e05a[_0x7b9d1c([0x74,0x68,0x65,0x6e])](()=>{_0x4110d3||_0x1d86c6(_0x7b9d1c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xa6a170(){return _0x246ffd[_0x7b9d1c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7b9d1c([0x76,0x69,0x65,0x77])][_0x7b9d1c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x7b9d1c([0x61,0x75,0x74,0x6f]);}function _0x1b5da6(){_0x246ffd[_0x7b9d1c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7b9d1c([0x76,0x69,0x65,0x77])][_0x7b9d1c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x7b9d1c([0x61,0x75,0x74,0x6f]);}}function _0x2f076f(_0x4371c1){const _0x1b5b17=[new window[(_0x7b9d1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x11d585=>setTimeout(_0x11d585,0x6bc8c972^_0x1d7429)),_0xc2e05a[_0x7b9d1c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x7b9d1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x745e41=>{const _0x3685eb=0x6bc1f7b9^_0x1d7429,_0x520d2a=_0x5a7ec6[_0x7b9d1c([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x8b8806(){_0x520d2a[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x3685eb&&_0x745e41();}_0x8b8806(),_0x520d2a[_0x7b9d1c([0x6f,0x6e])](_0x7b9d1c([0x61,0x64,0x64]),_0x8b8806);})),new window[(_0x7b9d1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f9e00=>{function _0x5d6360(){for(const _0x447f6f in window)if(window[_0x7b9d1c([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x7b9d1c([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x447f6f))&&window[_0x447f6f]==_0x45488a)return _0x1f9e00();_0x246ffd[_0x7b9d1c([0x73,0x74,0x61,0x74,0x65])]!=_0x7b9d1c([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x7b9d1c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5d6360,0x6bc1e436^_0x1d7429);}_0x1db25e(_0x7b9d1c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x5d6360();})];return window[_0x7b9d1c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x7b9d1c([0x72,0x61,0x63,0x65])](_0x1b5b17)[_0x7b9d1c([0x74,0x68,0x65,0x6e])](()=>_0x4371c1);}async function _0x417938(){if(await _0xc2e05a,_0x1db25e(_0x7b9d1c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x172d5d=_0x5a7ec6[_0x7b9d1c([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x163b5f=_0x5a7ec6[_0x7b9d1c([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])](_0x172d5d[_0x7b9d1c([0x69,0x64])]),_0x5c9e5a=_0x2017f9(_0x7b9d1c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x5c9e5a[_0x7b9d1c([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x172d5d['id'],_0x163b5f?_0x163b5f['id']:null,!0x0),_0x5c9e5a[_0x7b9d1c([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x7b9d1c([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5c9e5a[_0x7b9d1c([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5c9e5a[_0x7b9d1c([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x537ca4,void(_0x5c9e5a[_0x7b9d1c([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x537ca4);}if(_0x1db25e(_0x7b9d1c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x21248b=_0x2017f9(_0x7b9d1c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x21248b[_0x7b9d1c([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x7b9d1c([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x21248b[_0x7b9d1c([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x21248b[_0x7b9d1c([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x537ca4,_0x21248b[_0x7b9d1c([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x537ca4;}_0x246ffd[_0x7b9d1c([0x6d,0x6f,0x64,0x65,0x6c])][_0x7b9d1c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x537ca4,_0x246ffd[_0x7b9d1c([0x6d,0x6f,0x64,0x65,0x6c])][_0x7b9d1c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x537ca4,_0x246ffd[_0x7b9d1c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x7b9d1c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x12c486(){return _0x1db25e(_0x7b9d1c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2017f9(_0x7b9d1c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x7b9d1c([0x73,0x74,0x61,0x74,0x65])]==_0x7b9d1c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5865bc(){return _0x1db25e(_0x7b9d1c([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 _0x4d38aa(){return _0x1db25e(_0x7b9d1c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x226904(_0x2e09c1){const _0x270859=_0x3a2302();_0x246ffd[_0x270859]=_0x7b9d1c([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])+_0x2e09c1,_0x2e09c1[_0x7b9d1c([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x7b9d1c([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x3a2302()]=_0x45488a),_0x2e09c1!=_0x7b9d1c([0x56,0x61,0x6c,0x69,0x64])&&_0x417938();}function _0x3a2302(){const _0x417bee=window[_0x7b9d1c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x7b9d1c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x7b9d1c([0x6e,0x6f,0x77])]())[_0x7b9d1c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x7b9d1c([0x2e]),'');let _0x2e949c=_0x7b9d1c([0x50]);for(let _0x1ceda5=0x0;_0x1ceda5<_0x417bee[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ceda5+=0x2){let _0x2a279d=window[_0x7b9d1c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x417bee[_0x7b9d1c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ceda5,_0x1ceda5+0x2));_0x2a279d>=_0x516767[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2a279d-=_0x516767[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2e949c+=_0x516767[_0x2a279d];}return _0x2e949c;}function _0x44ccb9(){const _0x1f2ec6=_0x4caf23[_0x7b9d1c([0x73,0x70,0x6c,0x69,0x74])](_0x7b9d1c([0x2e]));if(0x3!=_0x1f2ec6[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x277333(_0x1f2ec6[0x1]);function _0x277333(_0x1b4670){const _0x4c57ea=_0x2d1c51(_0x1b4670);return _0x4c57ea&&_0x5d5573()?_0x4c57ea:null;function _0x5d5573(){const _0x381e89=_0x4c57ea[_0x7b9d1c([0x6a,0x74,0x69])],_0x40872c=window[_0x7b9d1c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x381e89[_0x7b9d1c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x381e89[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x253cf7={..._0x4c57ea,[_0x7b9d1c([0x6a,0x74,0x69])]:_0x381e89[_0x7b9d1c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x381e89[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x253cf7[_0x7b9d1c([0x76,0x63])],_0x5a32cc(_0x253cf7)==_0x40872c;}}}async function _0x5b9fbf(){let _0x101853=!0x0;try{const _0x5e4703=_0x4caf23[_0x7b9d1c([0x73,0x70,0x6c,0x69,0x74])](_0x7b9d1c([0x2e])),[_0x2ccb62,_0x99915b,_0x186c98]=_0x5e4703;return _0x1e88df(_0x2ccb62),await _0x215191(_0x2ccb62,_0x99915b,_0x186c98),_0x101853;}catch{return!0x1;}function _0x1e88df(_0x594a9c){const _0xe6de7f=_0x2d1c51(_0x594a9c);_0xe6de7f&&_0xe6de7f[_0x7b9d1c([0x61,0x6c,0x67])]==_0x7b9d1c([0x45,0x53,0x32,0x35,0x36])||(_0x101853=!0x1);}async function _0x215191(_0x124161,_0x294e50,_0x5a0e7e){const _0x9515b=window[_0x7b9d1c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x7b9d1c([0x66,0x72,0x6f,0x6d])](_0x3a08a4(_0x5a0e7e),_0x67a76=>_0x67a76[_0x7b9d1c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4c62a5=new window[(_0x7b9d1c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x7b9d1c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x124161+_0x7b9d1c([0x2e])+_0x294e50),_0x51ac07=window[_0x7b9d1c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x7b9d1c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x51ac07)return;const _0x40c1c0=await _0x51ac07[_0x7b9d1c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x7b9d1c([0x6a,0x77,0x6b]),_0x5d7248,{[_0x7b9d1c([0x6e,0x61,0x6d,0x65])]:_0x7b9d1c([0x45,0x43,0x44,0x53,0x41]),[_0x7b9d1c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x7b9d1c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x7b9d1c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x51ac07[_0x7b9d1c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x7b9d1c([0x6e,0x61,0x6d,0x65])]:_0x7b9d1c([0x45,0x43,0x44,0x53,0x41]),[_0x7b9d1c([0x68,0x61,0x73,0x68])]:{[_0x7b9d1c([0x6e,0x61,0x6d,0x65])]:_0x7b9d1c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x40c1c0,_0x9515b,_0x4c62a5)||(_0x101853=!0x1);}}function _0x2d1c51(_0x48fe99){return _0x48fe99[_0x7b9d1c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x7b9d1c([0x65,0x79]))?JSON[_0x7b9d1c([0x70,0x61,0x72,0x73,0x65])](_0x3a08a4(_0x48fe99)):null;}function _0x3a08a4(_0x158579){return window[_0x7b9d1c([0x61,0x74,0x6f,0x62])](_0x158579[_0x7b9d1c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x7b9d1c([0x2b]))[_0x7b9d1c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x7b9d1c([0x2f])));}function _0x5a32cc(_0x5adcee){let _0x1729e2=0x1505;function _0x14089b(_0x5a7d54){for(let _0x63cd28=0x0;_0x63cd28<_0x5a7d54[_0x7b9d1c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x63cd28++){const _0x4bf0dc=_0x5a7d54[_0x7b9d1c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x63cd28);_0x1729e2=(_0x1729e2<<0x5)+_0x1729e2+_0x4bf0dc,_0x1729e2&=_0x1729e2;}}function _0x37f188(_0x36f9d7){Array[_0x7b9d1c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x36f9d7)?_0x36f9d7[_0x7b9d1c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x37f188):_0x36f9d7&&typeof _0x36f9d7==_0x7b9d1c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x7b9d1c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x36f9d7)[_0x7b9d1c([0x73,0x6f,0x72,0x74])]()[_0x7b9d1c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xc56891,_0x13e7da])=>{_0x14089b(_0xc56891),_0x37f188(_0x13e7da);}):_0x14089b(window[_0x7b9d1c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x36f9d7));}return _0x37f188(_0x5adcee),_0x1729e2>>>0x0;}function _0xbf322c(_0x386f7f){return _0x386f7f[_0x7b9d1c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x7b9d1c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x7b9d1c([0x30]));}function _0x5b121a(_0x258cac){return _0x258cac[_0x7b9d1c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x7b9d1c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x7b9d1c([0x6a,0x6f,0x69,0x6e])]('');}function _0x1db25e(_0x265dc6){return _0x246ffd[_0x7b9d1c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x7b9d1c([0x68,0x61,0x73])](_0x265dc6);}function _0x2017f9(_0x11a154){return _0x246ffd[_0x7b9d1c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x7b9d1c([0x67,0x65,0x74])](_0x11a154);}function _0x537ca4(){}function _0x7b9d1c(_0x2dd7a2){return _0x2dd7a2['map'](_0x1f1feb=>String['fromCharCode'](_0x1f1feb))['join']('');}_0x226904(await _0xe67700());}(this);}['createRevision'](_0x5977e1){const _0x4bb5fb=this['editor']['plugins']['get']('Users');return new I({'id':_0x5977e1['id'],'name':_0x5977e1['name'],'creator':_0x5977e1['creatorId']?_0x4bb5fb['getUser'](_0x5977e1['creatorId']):null,'diffData':_0x5977e1['diffData']||_0x5977e1['data'],'authors':_0x5977e1['authorsIds']['map'](_0x4a0a9c=>_0x4bb5fb['getUser'](_0x4a0a9c)),'createdAt':new Date(_0x5977e1['createdAt']),'attributes':_0x5977e1['attributes'],'fromVersion':_0x5977e1['fromVersion'],'toVersion':_0x5977e1['toVersion']});}['addRevision'](_0x18f843,_0x3225a1=0x0){this['_revisions']['add'](_0x18f843,_0x3225a1);}['getRevision'](_0x4da883){return this['_revisions']['get'](_0x4da883);}['getRevisions'](_0x4aac0e={'toJSON':!0x1}){const _0x22ac12=Array['from'](this['_revisions']);return _0x22ac12['reverse'](),_0x4aac0e['toJSON']?_0x22ac12['map'](_0x2f2036=>_0x2f2036['toJSON']()):_0x22ac12;}['getIndex'](_0xa13f1a){return this['_revisions']['getIndex'](_0xa13f1a);}['getEarlierVisibleRevision'](_0x538633){const [,_0x112afa]=this['getRevisionsIterator'](_0x538633,{'direction':'earlier'});return _0x112afa;}['getLaterVisibleRevision'](_0x11e6ba){const [,_0xb7bd9e]=this['getRevisionsIterator'](_0x11e6ba,{'direction':'later'});return _0xb7bd9e;}['getRevisionsInDiff'](_0x5c15b9){const _0x579210=[];for(const _0x41e53a of this['getRevisionsIterator'](_0x5c15b9['newRevisionId']))if(_0x579210['push'](_0x41e53a),_0x41e53a['id']===_0x5c15b9['oldRevisionId'])break;return _0x579210;}*['getRevisionsIterator'](_0x340e1f,{direction:_0x91f9ed='earlier',filter:_0x208e0b=()=>!0x0}={}){const _0x3f119f='earlier'===_0x91f9ed?0x1:-0x1;let _0x5a4f82=this['_revisions']['get'](_0x340e1f),_0x11a945=this['getIndex'](_0x5a4f82);for(yield _0x5a4f82;_0x5a4f82;){if(_0x11a945+=_0x3f119f,_0x5a4f82=this['getRevision'](_0x11a945),!_0x5a4f82)return;_0x208e0b(_0x5a4f82)&&(yield _0x5a4f82);}}}class $ extends _0x307a2f{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x48cd3d,'c'],[_0x244352,'a'],[_0x297b29,'e'],[_0x1e624d,'r'],[_0x1e1d78,'u']]);['_typeCharToViewClass']=new Map([['c',_0x48cd3d],['a',_0x244352],['e',_0x297b29],['r',_0x1e624d],['u',_0x1e1d78]]);async['loadRevisionData'](_0x586258,_0x48f8a5){if(_0x586258['diffData']||!_0x48f8a5)return;const _0xd6782e=this['editor']['config']['get']('collaboration.channelId'),_0x5332e8=await _0x48f8a5['getRevision']({'channelId':_0xd6782e,'revisionId':_0x586258['id']});_0x586258['diffData']=_0x5332e8['diffData'];}['getRevisionDocumentData'](_0x2ae290){const _0x586f52={};for(const _0x4aa87c in _0x2ae290['diffData']){if(_0x2ae290['diffData'][_0x4aa87c]['attachChange']&&!_0x2ae290['diffData'][_0x4aa87c]['attachChange']['isAttached'])continue;const _0x338f0=this['_removeRevisionMarkers'](JSON['parse'](_0x2ae290['diffData'][_0x4aa87c]['insertions'])),_0x430cc8=this['editor']['editing']['view']['document'],_0x10b4c2=new _0xf5f3e3(_0x430cc8,_0x338f0['map'](_0x5b772c=>this['_getViewFromDiffObj'](_0x5b772c,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x586f52[_0x4aa87c]=this['editor']['data']['processor']['toData'](_0x10b4c2),this['editor']['data']['processor']['useFillerType']('default');}return _0x586f52;}['getRevisionRootsAttributes'](_0x1853d8){const _0x11a969={};for(const _0x537ecd in _0x1853d8['diffData'])_0x1853d8['diffData'][_0x537ecd]['attachChange']&&!_0x1853d8['diffData'][_0x537ecd]['attachChange']['isAttached']||(_0x11a969[_0x537ecd]=_0x1853d8['diffData'][_0x537ecd]['attributesAfter']||{});return _0x11a969;}['_getTypeCharForViewElement'](_0x5e55bc){return this['_viewClassToTypeChar']['get'](_0x5e55bc['constructor']);}['_getViewFromDiffObj'](_0x271753,_0x35af58){const _0x336e24=this['editor']['editing']['view']['document'];if('string'==typeof _0x271753)return new _0xd4836b(_0x336e24,_0x271753);{let _0x4a0871,_0x1fd035;_0x1fd035='u'==_0x271753['type']||'r'==_0x271753['type']?[]:_0x271753['children']['map'](_0x2b623d=>this['_getViewFromDiffObj'](_0x2b623d,_0x35af58));const _0x46ad17=this['_typeCharToViewClass']['get'](_0x271753['type'])||_0x18ff1e,_0x43e469=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x4a0871=new _0x46ad17(_0x336e24,_0x271753['name'],_0x271753['attributes'],_0x1fd035),'u'==_0x271753['type']&&_0x271753['children'][0x0]){const _0x354840=_0x271753['children'][0x0];if(_0x4a0871['render']=function(_0x53ab7b){const _0x3d3ae1=_0x53ab7b['createElement']('div');return _0x3d3ae1['innerHTML']=_0x354840,_0x3d3ae1['childNodes'][0x0];},_0x35af58){const _0x3b3ddb=new _0xf5f3e3(_0x336e24);_0x3b3ddb['_appendChild'](_0x4a0871);const _0x468c47=Array['from'](_0x43e469['viewChildrenToDom'](_0x3b3ddb,{'bind':!0x1})),_0x573312=_0x43e469['domDocument']['createElement']('div');_0x573312['append'](..._0x468c47),_0x4a0871=Array['from'](_0x43e469['domChildrenToView'](_0x573312))[0x0];}}else{if('r'==_0x271753['type']&&_0x271753['children'][0x0]){const _0x7e5c08=_0x271753['children'][0x0];if(_0x4a0871['render']=function(_0x447daa){_0x447daa['innerHTML']=_0x7e5c08;},_0x35af58){const _0x124a2d=new _0xf5f3e3(_0x336e24);_0x124a2d['_appendChild'](_0x4a0871);const _0x435656=Array['from'](_0x43e469['viewChildrenToDom'](_0x124a2d,{'bind':!0x1})),_0x4a27ea=_0x43e469['domDocument']['createElement']('div');_0x4a27ea['append'](..._0x435656);const _0x59d648=Array['from'](_0x43e469['domChildrenToView'](_0x4a27ea));_0x59d648['length']>0x1?_0x4a0871['_appendChild'](_0x59d648):_0x4a0871=_0x59d648[0x0];}}}if(_0x271753['customProperties']){for(const [_0x17cc5f,_0x41a1a2]of _0x271753['customProperties'])_0x4a0871['_setCustomProperty'](_0x17cc5f,_0x41a1a2);}const _0x592023=void 0x0===_0x271753['fillerOffset']?null:_0x271753['fillerOffset'];return null!==_0x592023&&(_0x4a0871['getFillerOffset']=()=>_0x592023),_0x4a0871;}}['_makeModelFromViewString'](_0x1e75f8){const _0x146f0b=JSON['parse'](_0x1e75f8),_0x24376c=this['editor']['editing']['view']['document'],_0x191e16=new _0xf5f3e3(_0x24376c,_0x146f0b['map'](_0x59b9d1=>this['_getViewFromDiffObj'](_0x59b9d1,!0x0)));return this['editor']['data']['toModel'](_0x191e16);}['_removeRevisionMarkers'](_0x21a62e){return(_0x21a62e=_0x21a62e['filter'](_0x393cfd=>!_0x393cfd['name']||'revision-start'!==_0x393cfd['name']&&'revision-end'!==_0x393cfd['name']))['forEach'](_0x3bcc73=>{'string'!=typeof _0x3bcc73&&(_0x3bcc73['children']=this['_removeRevisionMarkers'](_0x3bcc73['children']),_0x3bcc73['attributes']=_0x3bcc73['attributes']['filter'](_0x114589=>!_0x114589[0x0]['startsWith']('data-revision-')));}),_0x21a62e;}}function R(_0x4d4609,_0x4e2515,_0xdda7e1){const t=_0x4d4609['t'];switch(_0x4e2515){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'},_0xdda7e1);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xdda7e1);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x307a2f{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x270810,S,$,_0x326738];}constructor(_0xdfe1a5){super(_0xdfe1a5),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x4a781c=_0xcc759();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4a781c},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x46afa6=this['repository']['getRevision'](0x0),_0x266e5c=_0x46afa6&&null===_0x46afa6['creator']?_0x46afa6:null;if(this['_continueCurrentRevision']=!!_0x266e5c&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3554c6=this['_source']['getCurrentRevisionId'](),_0x153a6f=this['repository']['getRevision'](_0x3554c6);if(_0x153a6f)this['_startingVersion']=_0x153a6f['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x38c856=this['_source']['history']['_operations']['find'](_0x46901c=>!_0x46901c['_isInit']),_0x987e88=_0x38c856?_0x38c856['baseVersion']:this['_source']['history']['version'];_0x46afa6?(_0x46afa6['toVersion']<_0x987e88&&_0x46afa6['_update']({'toVersion':_0x987e88}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x266e5c['id'],this['_startingVersion']=_0x266e5c['fromVersion']):(this['_startingVersion']=_0x46afa6['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x987e88,this['_continueCurrentRevision']=!0x1);}}else _0x266e5c&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x266e5c['toVersion'],this['editor']['model']['document']['history']['version']),_0x266e5c['fromVersion']===_0x266e5c['toVersion']?(0x0!==_0x266e5c['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x266e5c['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x266e5c['id'],this['_startingVersion']=_0x266e5c['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',_0x45b90c=>!_0x45b90c),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x283a61=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3202cf;for(const _0x38cbb3 in _0x283a61){const _0x3fe289=_0x38cbb3,_0x54a29e=_0x283a61[_0x3fe289];if('revisionHistoryLicenseKeyValid'==_0x54a29e||'revisionHistoryLicenseKeyInvalid'==_0x54a29e||'revisionHistoryLicenseKeyExpired'==_0x54a29e||'revisionHistoryLicenseKeyDomainLimit'==_0x54a29e||'revisionHistoryLicenseKeyNotAllowed'==_0x54a29e||'revisionHistoryLicenseKeyEvaluationLimit'==_0x54a29e||'revisionHistoryLicenseKeyTrialLimit'==_0x54a29e||'revisionHistoryLicenseKeyUsageLimit'==_0x54a29e){delete _0x283a61[_0x3fe289],_0x3202cf=_0x54a29e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x3202cf&&_0x283a61['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x3202cf&&_0x283a61['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x3202cf&&_0x283a61['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x3202cf&&_0x283a61['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x3202cf&&_0x283a61['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x3202cf&&_0x283a61['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x3202cf&&_0x283a61['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x1ed9aa=this['repository']['getRevision'](0x0),_0x4ded7f=await this['getRevisionDocumentData'](_0x1ed9aa),_0x5e5270=await this['getRevisionRootsAttributes'](_0x1ed9aa);this['_replaceEditorDataWithRevisionData'](_0x4ded7f,_0x5e5270);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x4eb39d){this['_source']=_0x4eb39d;}async['update'](){const _0x3ae5a9=await this['_source']['getLatestVersion']();if(_0x3ae5a9>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3e9cad=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3ae5a9});_0x3e9cad['authors']=_0x3e9cad['authorsIds']['map'](_0x1ca680=>this['editor']['plugins']['get']('Users')['getUser'](_0x1ca680)),this['currentRevision']['_update'](_0x3e9cad);}}async['saveRevision'](_0x12b6ca={},_0x59c58d=null){const _0x418e75=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x59c58d>this['currentRevision']['toVersion']&&(_0x59c58d=null),null===_0x59c58d&&(_0x59c58d=await this['_source']['getLatestVersion']());const _0xabf3e3=this['_getFromVersion'](_0x59c58d),_0x2a4359=this['buildRevisionData']({'from':_0xabf3e3,'to':_0x59c58d});if(this['currentRevision']['toVersion']<_0x59c58d){const _0x361284=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x59c58d,'to':_0x59c58d});_0x361284['authors']=[],_0x361284['authorsIds']=[],_0x361284['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x361284,!0x0),delete _0x361284['authors'],_0x418e75['push'](_0x361284);}_0x12b6ca['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x12b6ca['name']=_0x12b6ca['name']||null,_0x12b6ca['id']=_0x12b6ca['id']||_0xcc759(),_0x12b6ca={..._0x12b6ca,..._0x2a4359};const _0x24003b=this['addRevisionData'](_0x12b6ca);_0x418e75['push'](_0x12b6ca);const _0x4ca581=this['repository']['getIndex'](_0x24003b);if(0x0!==_0x4ca581){const _0x27a009=this['repository']['getRevision'](_0x4ca581-0x1);if(_0x27a009['fromVersion']!==_0x59c58d){const _0x36bcce=this['_revisionDataBuilder']['getData'](_0x59c58d,_0x27a009['toVersion']),_0xbb7daf={'id':_0x27a009['id'],'diffData':_0x36bcce['diffData'],'authorsIds':_0x36bcce['authorsIds'],'authors':_0x36bcce['authorsIds']['map'](_0xed9038=>this['editor']['plugins']['get']('Users')['getUser'](_0xed9038)),'fromVersion':_0x59c58d};_0x27a009===this['currentRevision']&&(_0xbb7daf['createdAt']=new Date(_0x12b6ca['createdAt']['getTime']()+0xa)),_0x27a009['_update'](_0xbb7daf,!0x0),delete _0xbb7daf['authors'],_0x418e75['push'](_0xbb7daf);}}if(this['adapter']){for(const _0x7db11d of _0x418e75)this['_bufferUpdate'](_0x7db11d['id'],_0x7db11d,!0x0);this['sendBufferedUpdates']();}return _0x24003b;}['addRevisionData'](_0x20abd7){const _0xd30221=this['repository']['createRevision'](_0x20abd7);return this['adapter']&&_0xd30221['on']('_update',(_0x4920a4,_0x270e39,_0x2d5639)=>{_0x2d5639||(this['_bufferUpdate'](_0x270e39['id'],_0x270e39,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0xd30221,this['_findInsertionIndex'](_0xd30221)),_0xd30221;}async['getRevisionDocumentData'](_0x437305){return await this['_utils']['loadRevisionData'](_0x437305,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x437305);}async['getRevisionRootsAttributes'](_0x443692){return await this['_utils']['loadRevisionData'](_0x443692,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x443692);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x320ae9=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0xa349a=0x0;_0xa349a<_0x320ae9['length'];_0xa349a++){const _0x3ee855=_0x320ae9[_0xa349a];let _0xdf6632=!0x1;for(const _0x5d4519 of Object['keys'](_0x3ee855))void 0x0===_0x3ee855[_0x5d4519]?delete _0x3ee855[_0x5d4519]:'id'!==_0x5d4519&&(_0xdf6632=!0x0);_0xdf6632||(_0x320ae9[_0xa349a]=null);}if(_0x320ae9=_0x320ae9['filter'](_0x2f8280=>null!==_0x2f8280),!_0x320ae9['length'])return;for(let _0x4f2c4a=0x0;_0x4f2c4a<_0x320ae9['length'];_0x4f2c4a++){const _0x12bf9d=_0x320ae9[_0x4f2c4a];void 0x0!==_0x12bf9d['fromVersion']&&void 0x0===_0x12bf9d['toVersion']&&(_0x12bf9d['toVersion']=this['repository']['getRevision'](_0x12bf9d['id'])['toVersion']),void 0x0!==_0x12bf9d['toVersion']&&void 0x0===_0x12bf9d['fromVersion']&&(_0x12bf9d['fromVersion']=this['repository']['getRevision'](_0x12bf9d['id'])['fromVersion']);}const _0x2c85c9=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x320ae9,_0x2c85c9)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x17f16d=>{if(_0x17f16d){for(const _0x1cb11d of _0x17f16d)this['setRevisionData']({'id':_0x1cb11d['id'],'createdAt':_0x1cb11d['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x138735=null,from:_0x132703=null,to:_0x2165f8=null}){_0x132703=null!==_0x132703?_0x132703:_0x138735['fromVersion'],_0x2165f8=null!==_0x2165f8?_0x2165f8:_0x138735['toVersion'];const _0x2b6720=this['_revisionDataBuilder']['getData'](_0x132703,_0x2165f8),_0x3a256a={'diffData':_0x2b6720['diffData'],'authorsIds':_0x2b6720['authorsIds'],'fromVersion':_0x132703,'toVersion':_0x2165f8};if(!_0x138735||_0x2165f8!==_0x138735['toVersion']){const _0x5d755a=_0x2165f8-0x1,_0x4a1e54=this['_source']['history']['getOperation'](_0x5d755a);_0x3a256a['createdAt']=_0x4a1e54&&_0x4a1e54['createdAt']||new Date();}if(this['_loadedStateData']&&_0x132703===this['_loadedStateData']['fromVersion']){for(const _0xfda503 of this['_loadedStateData']['authors'])_0x3a256a['authorsIds']['includes'](_0xfda503['id'])||_0x3a256a['authorsIds']['push'](_0xfda503['id']);}return _0x3a256a;}['_bufferUpdate'](_0x552bf6,_0xc1782e,_0x33fe6b){if(this['_bufferedUpdates']['has'](_0x552bf6)){const _0x13a69e=this['_bufferedUpdates']['get'](_0x552bf6);_0xc1782e=_0x33fe6b?{..._0x13a69e,..._0xc1782e}:{..._0xc1782e,..._0x13a69e};}this['_bufferedUpdates']['set'](_0x552bf6,_0xc1782e);}['setRevisionData'](_0x34bc42){const _0x938370=this['repository']['getRevision'](_0x34bc42['id']);if(_0x34bc42['createdAt']&&(_0x34bc42['createdAt']=new Date(_0x34bc42['createdAt'])),_0x34bc42['authorsIds']){const _0x1e1381=this['editor']['plugins']['get']('Users');_0x34bc42['authors']=_0x34bc42['authorsIds']['map'](_0x2bbafc=>_0x1e1381['getUser'](_0x2bbafc));}_0x938370['_update'](_0x34bc42,!0x0);}['_createInitialRevision'](_0x231e8f){const _0x1aa42e=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1aa42e)this['_initialRevisionId']=_0x1aa42e['id'];else{const _0x221a47=!this['editor']['model']['document']['roots']['find'](_0x344125=>this['editor']['model']['hasContent'](_0x344125)),_0x206ed2=this['editor']['plugins']['get']('Users')['me']['id'],_0x812f03=R(this['editor']['locale'],_0x221a47?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x231e8f,'to':_0x231e8f,'id':this['_initialRevisionId'],'name':_0x812f03,'creatorId':_0x206ed2});}}['_createCurrentRevision'](_0x30bc86){const _0x32dfd7=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x32dfd7),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x30bc86,'to':_0x30bc86,'id':_0x32dfd7,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x290328,_0x5d0af2){let _0x3c7a2b=this['editor']['config']['get']('initialData'),_0x234a19=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x3c7a2b){_0x3c7a2b={};for(const _0x170109 of this['editor']['model']['document']['getRootNames']())_0x3c7a2b[_0x170109]='';}if('string'==typeof _0x3c7a2b&&(_0x3c7a2b={'main':_0x3c7a2b}),void 0x0===_0x234a19){_0x234a19={};for(const _0x4a1c83 of this['editor']['model']['document']['getRootNames']())_0x234a19[_0x4a1c83]={};}let _0x438668=!0x1;const _0x56c17c=Object['keys'](_0x3c7a2b),_0xf99c0f=Object['keys'](_0x290328);for(const _0x1c063c of _0x56c17c){if(_0x3c7a2b[_0x1c063c]!==_0x290328[_0x1c063c]&&''!==_0x3c7a2b[_0x1c063c]['trim']()){_0x438668=!0x0;break;}if(!_0x1c720e(_0x234a19[_0x1c063c],_0x5d0af2[_0x1c063c])&&Object['keys'](_0x234a19[_0x1c063c])['length']>0x0){_0x438668=!0x0;break;}}_0x438668||(_0x438668=_0xf99c0f['some'](_0x6269ce=>!this['editor']['model']['document']['getRoot'](_0x6269ce))),_0x438668&&_0x4c4d4e('editor-initial-data-replaced-with-revision-data',{'editorData':_0x3c7a2b,'editorRootsAttributes':_0x234a19,'revisionData':_0x290328,'revisionRootsAttributes':_0x5d0af2}),this['editor']['config']['set']('initialData',_0x290328),this['editor']['config']['set']('rootsAttributes',_0x5d0af2);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x4f28c6=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4f28c6['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4f436e){const _0x4c2ee4=this['repository']['getRevisions']();_0x4c2ee4['reverse']();let _0x4c9e0d=0x0;for(;_0x4c9e0d<_0x4c2ee4['length'];){const _0xd8ea05=_0x4c2ee4[_0x4c9e0d];if(_0xd8ea05===this['currentRevision']){_0x4c9e0d++;continue;}if(_0xd8ea05['id']===this['_initialRevisionId'])break;const _0x539521=_0x4f436e['toVersion']-_0xd8ea05['toVersion']||_0x4f436e['fromVersion']-_0xd8ea05['fromVersion'];if(_0x539521>0x0)break;if(_0x539521<0x0)_0x4c9e0d++;else{if(!_0x4f436e['creator']&&_0xd8ea05['creator'])break;if(_0xd8ea05['creator']||!_0x4f436e['creator']){if(_0x4f436e['createdAt']>_0xd8ea05['createdAt'])break;_0x4c9e0d++;}else _0x4c9e0d++;}}return _0x4c9e0d;}['_getFromVersion'](_0xfc4154){const _0x8b82a3=this['repository']['getRevisions']();_0x8b82a3['reverse'](),_0x8b82a3['shift']();const _0x5f4a40=_0x8b82a3['find'](_0x1ce907=>_0x1ce907['toVersion']<=_0xfc4154)['toVersion'];return _0x5f4a40<this['_startingVersion']?this['_startingVersion']:_0x5f4a40;}['_makeRevision']({name:_0x21fea1,from:_0x3927ee,to:_0x5b98e7,creatorId:_0x5a3fd2,id:_0x246a2a}){const _0x2ead18=this['buildRevisionData']({'from':_0x3927ee,'to':_0x5b98e7});_0x2ead18['name']=_0x21fea1,_0x2ead18['creatorId']=_0x5a3fd2,_0x2ead18['id']=_0x246a2a;const _0x1ebe0e=this['addRevisionData'](_0x2ead18);return this['adapter']&&this['_bufferUpdate'](_0x2ead18['id'],_0x2ead18,!0x0),_0x1ebe0e;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5e96c2){this['editor']=_0x5e96c2,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'](_0x38c4e5){this['source']=_0x38c4e5;const _0x2ede84=new Map(),_0x48a4f4=new Map(),_0x13714e=this['editor']['model']['document']['roots']['map'](_0x2502e4=>_0x2502e4['rootName']);for(const _0x116dae of _0x13714e){const _0x1aa78a=this['editor']['model']['document']['getRoot'](_0x116dae),_0x4f109d=x(_0x1aa78a);_0x2ede84['set'](_0x116dae,_0x4f109d),_0x48a4f4['set'](_0x116dae,Object['fromEntries'](_0x1aa78a['getAttributes']()));}const _0x7f5f85=Array['from'](this['editor']['model']['markers'])['map'](_0x2ab26f=>[_0x2ab26f['name'],_0x2ab26f['getRange']()]),_0x44a6ec=this['source']['version'];this['_saveMetaData'](_0x44a6ec,_0x2ede84,_0x7f5f85,_0x48a4f4),this['_startingRevisionId']=this['_revisionId'];const _0x3e2004=new Map(),_0x548f6a=new Map();for(const _0x34748c of _0x13714e){const _0x2c27e6=N(_0x34748c);_0x3e2004['set'](_0x34748c,_0x2c27e6),_0x548f6a['set'](_0x34748c,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3e2004,[],_0x548f6a);}['getData'](_0x5b10e1,_0x55d9d3){if(this['_lastFrom']===_0x5b10e1&&this['_lastTo']<=_0x55d9d3)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x55d9d3,!0x0);else{if(!this['_savedMetaData']['has'](_0x5b10e1)){const _0x5bef63=this['_getPreviousFrom'](_0x5b10e1);this['_calculateMetaData'](_0x5bef63,_0x5b10e1,!0x1);}this['_calculateMetaData'](_0x5b10e1,_0x55d9d3,!0x0);}return this['_lastFrom']=_0x5b10e1,this['_lastTo']=_0x55d9d3,this['_getState']();}['loadState'](_0x565aa2){const _0x428fbf=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x565aa2['fromVersion'],this['_lastTo']=_0x565aa2['toVersion'];for(const _0x1a9a5c in _0x565aa2['diffData']){const _0x2e406d=_0x565aa2['diffData'][_0x1a9a5c]['attachChange'],_0x22f2b7=_0x3692ca(_0x565aa2['diffData'][_0x1a9a5c]['attributesBefore'])||{},_0x57ba0d=_0x428fbf['_makeModelFromViewString'](_0x565aa2['diffData'][_0x1a9a5c]['deletions']);_0x57ba0d['rootName']=_0x1a9a5c,_0x57ba0d['_isAttached']=!_0x2e406d||!_0x2e406d['isAttached'],_0x57ba0d['isAttached']=()=>_0x57ba0d['_isAttached'],this['_baseRoots']['set'](_0x1a9a5c,_0x57ba0d),this['_baseRootsAttributes']['set'](_0x1a9a5c,_0x22f2b7),_0x2e406d&&this['_touchedRoots']['set'](_0x1a9a5c,_0x2e406d);const _0x5850b0=this['_makeIdsRoot'](_0x57ba0d);this['_baseIdsRoots']['set'](_0x1a9a5c,_0x5850b0);for(const [_0xdbb8,_0x389165]of _0x57ba0d['markers']){if(!_0xdbb8['startsWith']('revision:'))continue;const _0x32da67=_0xdbb8['split'](':')[0x2];for(const _0x5e510d of _0x389165['getWalker']({'singleCharacters':!0x0})){const _0xfbb82=this['_getVidAttributeName'](_0x5e510d),_0x18900e='elementEnd'==_0x5e510d['type']?_0x5e510d['previousPosition']['path']['slice'](0x0,-0x1):_0x5e510d['previousPosition']['path'],_0x5d92f5=_0x5850b0['getNodeByPath'](_0x18900e)['getAttribute'](_0xfbb82);this['_touched']['set'](_0x5d92f5,{'userId':_0x32da67});}}}this['_startingRevisionId']=this['_revisionId'];const _0x155fa7=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x46a24c=>!this['_touched']['has'](_0x46a24c));let _0x15c860=0x0;const _0x34e207=new Map();for(const _0x59f9df in _0x565aa2['diffData']){const _0x11d83a=_0x565aa2['diffData'][_0x59f9df]['attachChange'],_0x3a732d=_0x3692ca(_0x565aa2['diffData'][_0x59f9df]['attributesAfter'])||{},_0x31c3c0=_0x428fbf['_makeModelFromViewString'](_0x565aa2['diffData'][_0x59f9df]['insertions']);_0x31c3c0['rootName']=_0x59f9df,_0x31c3c0['_isAttached']=!_0x11d83a||_0x11d83a['isAttached'],_0x31c3c0['isAttached']=()=>_0x31c3c0['_isAttached'],this['_diffRoots']['set'](_0x59f9df,_0x31c3c0),this['_diffRootsAttributes']['set'](_0x59f9df,_0x3a732d);const _0x18cc7a=this['_makeIdsRoot'](_0x31c3c0,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x59f9df,_0x18cc7a),_0x34e207['set'](_0x59f9df,_0x31c3c0['isAttached']()?_0x3a732d:{});for(const [_0x5e967c,_0x27a3d0]of _0x31c3c0['markers']){if(!_0x5e967c['startsWith']('revision:'))continue;const _0x5c7e99=_0x5e967c['split'](':')[0x2];for(const _0x5c2e96 of _0x27a3d0['getWalker']({'singleCharacters':!0x0})){const _0x13481c=this['_getVidAttributeName'](_0x5c2e96),_0x4bec37=this['_revisionId']++,_0x256070='elementEnd'==_0x5c2e96['type']?_0x5c2e96['previousPosition']['path']['slice'](0x0,-0x1):_0x5c2e96['previousPosition']['path'];_0x18cc7a['getNodeByPath'](_0x256070)['_setAttribute'](_0x13481c,_0x4bec37),this['_touched']['set'](_0x4bec37,{'userId':_0x5c7e99});}}for(const _0x40c79c of this['editor']['model']['createRangeIn'](_0x31c3c0)['getWalker']({'singleCharacters':!0x0})){const _0x57c28f=this['_getVidAttributeName'](_0x40c79c),_0x42d8d2='elementEnd'==_0x40c79c['type']?_0x40c79c['previousPosition']['path']['slice'](0x0,-0x1):_0x40c79c['previousPosition']['path'],_0x3c692e=_0x18cc7a['getNodeByPath'](_0x42d8d2);_0x3c692e['getAttribute'](_0x57c28f)>0x0||_0x3c692e['_setAttribute'](_0x57c28f,_0x155fa7[_0x15c860++]);}for(const [_0x154033,_0x5c3344]of _0x31c3c0['markers'])_0x154033['startsWith']('revision:')||this['_markers']['set'](_0x154033,_0x5c3344);}const _0x108c60=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x108c60),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x108c60,0x1));const _0x156c3f=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x156c3f),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x156c3f,0x1));const _0x58db8d=Array['from'](this['_diffRoots'])['map'](([_0x64656,_0x33019b])=>[_0x64656,x(_0x33019b)]);this['_saveMetaData'](this['_lastTo'],_0x58db8d,this['_markers'],_0x34e207);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x95d74,_0x3ecc8b,_0x3690a4,_0x8dad96){const _0x135a41=new Map(_0x3ecc8b),_0x47a8d2=new Map(_0x3692ca(_0x8dad96)),_0x3447a4=new Map();for(const [_0x2f87b6,_0x19b7ae]of _0x3690a4)_0x3447a4['set'](_0x2f87b6,{'start':_0x19b7ae['start']['clone'](),'end':_0x19b7ae['end']['clone'](),'rootName':_0x19b7ae['root']['rootName']});this['_savedMetaData']['set'](_0x95d74,{'roots':_0x135a41,'markers':_0x3447a4,'rootsAttributes':_0x47a8d2});}['_removeMetaData'](_0x37051c){this['_savedMetaData']['delete'](_0x37051c);}['_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'](_0x1f0643,_0xb5c1e8=null){let _0x4a10b7=null;_0x1f0643['is']('documentFragment')||(_0x4a10b7=new _0x30b597(_0x1f0643['name'],{'vid_start':null===_0xb5c1e8?this['_revisionId']++:_0xb5c1e8++}));const _0x93ddbb=[];for(const _0x39640f of _0x1f0643['getChildren']())if(_0x39640f['is']('element')){_0x93ddbb['push'](this['_makeIdsRoot'](_0x39640f,_0xb5c1e8));const _0x2054a2=_0x93ddbb[_0x93ddbb['length']-0x1];null!==_0xb5c1e8&&(_0xb5c1e8=_0x2054a2['is']('element','$text')?_0x2054a2['getAttribute']('vid')+0x1:_0x2054a2['getAttribute']('vid_end')+0x1);}else{for(let _0x9b5f80=0x0;_0x9b5f80<_0x39640f['offsetSize'];_0x9b5f80++)_0x93ddbb['push'](new _0x30b597('$text',{'vid':null===_0xb5c1e8?this['_revisionId']++:_0xb5c1e8++}));}if(_0x1f0643['is']('documentFragment')){const _0x39b2cb=N(_0x1f0643['rootName']);return _0x39b2cb['_insertChild'](0x0,_0x93ddbb),_0x39b2cb;}return _0x4a10b7['_setAttribute']('vid_end',null===_0xb5c1e8?this['_revisionId']++:_0xb5c1e8++),_0x4a10b7['_insertChild'](0x0,_0x93ddbb),_0x4a10b7;}['_calculateMetaData'](_0x3e8d69,_0x42e4da,_0x22e3de){this['_reset']();const {roots:_0x405f43,markers:_0x5185b6,rootsAttributes:_0x3d484b}=this['_savedMetaData']['get'](_0x3e8d69);this['_baseRoots']=new Map(_0x405f43),this['_baseRootsAttributes']=new Map(_0x3692ca(_0x3d484b));for(const [_0x2b3f3f,_0x8e338]of this['_baseRoots'])if('$graveyard'!==_0x2b3f3f&&(this['_diffRoots']['set'](_0x2b3f3f,x(_0x8e338)),this['_diffRootsAttributes']=new Map(_0x3692ca(_0x3d484b)),_0x22e3de)){const _0x127c8c=this['_revisionId'];this['_idsRoots']['set'](_0x2b3f3f,this['_makeIdsRoot'](_0x8e338)),this['_baseIdsRoots']['set'](_0x2b3f3f,this['_makeIdsRoot'](_0x8e338,_0x127c8c));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x22e3de&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2205ab,_0xc04d96]of _0x5185b6){const _0x172593=this['_baseRoots']['get'](_0xc04d96['rootName']),_0x2be01f=this['_diffRoots']['get'](_0xc04d96['rootName']),_0x4ef985=new _0x3e71fc(this['_fixPosition'](_0xc04d96['start'],_0x172593),this['_fixPosition'](_0xc04d96['end'],_0x172593)),_0x5f3256=this['_fixRange'](_0x4ef985,_0x2be01f);_0x172593['markers']['set'](_0x2205ab,_0x4ef985),this['_markers']['set'](_0x2205ab,_0x5f3256);}this['_applyOperations'](_0x3e8d69,_0x42e4da,_0x22e3de);}['_applyOperations'](_0x561cc1,_0x278375,_0xf66400){for(const _0x46bc36 of this['source']['getOperations'](_0x561cc1,_0x278375))this['_handleOperation'](_0x46bc36,_0xf66400);for(const _0x1024fe of this['_diffRoots']['values']())_0x1024fe['markers']['clear']();for(const [_0x50da20,_0x1f240f]of this['_markers']){this['_diffRoots']['get'](_0x1f240f['root']['rootName'])['markers']['set'](_0x50da20,_0x1f240f['clone']());}const _0x1524aa=new Map(),_0x176ee7=new Map();for(const [_0x5a6fb8,_0x5613d5]of this['_diffRoots'])_0x1524aa['set'](_0x5a6fb8,x(_0x5613d5)),_0x176ee7['set'](_0x5a6fb8,this['_diffRootsAttributes']['get'](_0x5a6fb8));this['_saveMetaData'](_0x278375,_0x1524aa,this['_markers'],_0x176ee7);}['_getPreviousFrom'](_0x3a0504){const _0x5ea9f6=Array['from'](this['_savedMetaData']['keys']());_0x5ea9f6['sort']((_0x463915,_0xbc3192)=>_0x463915-_0xbc3192),_0x5ea9f6['reverse']();for(const _0x2ccae6 of _0x5ea9f6)if(_0x2ccae6<_0x3a0504)return _0x2ccae6;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x508b13,_0x3a5ae2){const _0x4c6a34=Array['from'](_0x3a5ae2['markers'])['map'](([_0x47bfbf,_0x4bca66])=>[_0x47bfbf,this['_fixRange'](_0x4bca66,_0x508b13)]);_0x508b13['markers']=new Map(_0x4c6a34);}['_transformMarkers'](_0x1ae12c){for(const _0x2ef1bf of this['_markers']['values']()){const _0x5a129b=_0x2ef1bf['getTransformedByOperation'](_0x1ae12c),_0x51decf=_0x3e71fc['_createFromRanges'](_0x5a129b);_0x2ef1bf['start']=_0x51decf['start'],_0x2ef1bf['end']=_0x51decf['end'];}}['_handleOperation'](_0x40fb6f,_0xf95d68){if('addRoot'!=_0x40fb6f['type']&&'detachRoot'!=_0x40fb6f['type']){if('insert'==_0x40fb6f['type']){const _0x45bb80=_0x40fb6f['position']['root']['rootName'];this['_diffRoots']['has'](_0x45bb80)||(this['_diffRoots']['set'](_0x45bb80,N(_0x45bb80,!0x0)),this['_diffRootsAttributes']['set'](_0x45bb80,{}),_0xf95d68&&this['_idsRoots']['set'](_0x45bb80,N(_0x45bb80,!0x0)));}else{if('addRootAttribute'==_0x40fb6f['type']||'removeRootAttribute'==_0x40fb6f['type']||'changeRootAttribute'==_0x40fb6f['type'])return void this['_handleRootAttributeOperation'](_0x40fb6f);'marker'==_0x40fb6f['type']&&this['_handleMarkerOperation'](_0x40fb6f);}if('marker'!==_0x40fb6f['type']){const _0x315150=this['_cloneOperation'](_0x40fb6f,this['_diffRoots']);_0x315150['_execute'](),this['_transformMarkers'](_0x315150);}if(_0xf95d68)switch(_0x40fb6f['type']){case'insert':this['_handleInsertOperation'](_0x40fb6f);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x40fb6f);break;case'merge':this['_handleMergeOperation'](_0x40fb6f);break;case'split':this['_handleSplitOperation'](_0x40fb6f);}}else this['_handleRootOperation'](_0x40fb6f,_0xf95d68);}['_cloneOperation'](_0x303144,_0x43e1bb){const _0x1e4e17=_0x303144['clone']();return _0x1e4e17['_authorId']=_0x303144['_authorId'],this['_fixOperation'](_0x1e4e17,_0x43e1bb),_0x1e4e17;}['_getBaseVids'](_0x40ed23){return _0x40ed23['map'](_0x334c4d=>{const _0x95930c=this['_getVidAttributeName'](_0x334c4d);return Number(_0x334c4d['item']['getAttribute'](_0x95930c));});}['_generateTape'](_0xd6dc98,_0x4ef6e1){if(_0xd6dc98['is']('element','$text'))_0x4ef6e1['push']({'item':_0xd6dc98,'type':'text'});else{_0xd6dc98['is']('element')&&_0x4ef6e1['push']({'item':_0xd6dc98,'type':'elementStart'});for(const _0x24b8dd of _0xd6dc98['getChildren']())this['_generateTape'](_0x24b8dd,_0x4ef6e1);_0xd6dc98['is']('element')&&_0x4ef6e1['push']({'item':_0xd6dc98,'type':'elementEnd'});}return _0x4ef6e1;}['_getState'](){const _0x9a4d40=new Map(this['_touched']),_0x203cc1=new Map(_0x9a4d40),_0x1042e2=new Map(),_0x518ddb={'insertions':{},'deletions':{}},_0x7af203={'insertions':{},'deletions':{}},_0xcfda8b=new Map(),_0x49ad62=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x49ad62['delete']('$graveyard');for(const _0x1dd166 of _0x49ad62){const _0x55b238=this['_diffRoots']['get'](_0x1dd166)||N(_0x1dd166,!0x1),_0x3a20b7=this['_baseRoots']['get'](_0x1dd166)||N(_0x1dd166,!0x1);_0x55b238['isAttached']()||_0x3a20b7['isAttached']()?(_0x518ddb['insertions'][_0x1dd166]=x(_0x55b238),_0x518ddb['deletions'][_0x1dd166]=x(_0x3a20b7),this['_copyMarkers'](_0x518ddb['deletions'][_0x1dd166],_0x3a20b7),this['_copyMarkers'](_0x518ddb['insertions'][_0x1dd166],_0x55b238),_0x7af203['insertions'][_0x1dd166]=this['_generateTape'](this['_idsRoots']['get'](_0x1dd166),[]),_0x7af203['deletions'][_0x1dd166]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1dd166)||N(_0x1dd166,!0x1),[])):_0x49ad62['delete'](_0x1dd166);}for(const _0x2f41e2 of _0x49ad62){const _0x4eb812=_0x7af203['insertions'][_0x2f41e2];for(const _0x295ca7 of _0x4eb812){const _0x4a1d8d=this['_getVidAttributeName'](_0x295ca7),_0x2839d7=_0x295ca7['item']['getAttribute'](_0x4a1d8d);_0x203cc1['delete'](_0x2839d7),_0x2839d7>=this['_startingRevisionId']&&_0x1042e2['set'](_0x2839d7,_0x9a4d40['get'](_0x2839d7));}}for(const _0x1bc64b of _0x49ad62){const _0xed6b89=_0x7af203['insertions'][_0x1bc64b],_0x1c0053=this['_getBaseVids'](_0x7af203['deletions'][_0x1bc64b]);let _0x827d73=0x0;for(const _0x368145 of _0xed6b89){const _0x425bd1=this['_getVidAttributeName'](_0x368145),_0x4dcdca=_0x368145['item']['getAttribute'](_0x425bd1);if(!_0x1042e2['has'](_0x4dcdca)&&!_0xcfda8b['has'](_0x4dcdca)){if(_0x203cc1['has'](_0x4dcdca))_0x827d73++;else{if(_0x4dcdca!=_0x1c0053[_0x827d73]){const _0x5ad04d=_0x9a4d40['get'](_0x4dcdca)||_0x9a4d40['get'](_0x1c0053[_0x827d73]);for(;_0x4dcdca!=_0x1c0053[_0x827d73];)_0x203cc1['has'](_0x1c0053[_0x827d73])||(_0xcfda8b['set'](_0x1c0053[_0x827d73],_0x5ad04d),_0x9a4d40['set'](_0x1c0053[_0x827d73],_0x5ad04d)),_0x827d73++;}_0x827d73++;}}}}for(const _0x5b932e of _0x49ad62){const _0xeaaab9=_0x7af203['insertions'][_0x5b932e];for(const _0x3a075f of _0xeaaab9){const _0x20083c=this['_getVidAttributeName'](_0x3a075f),_0x56aab9=_0x3a075f['item']['getAttribute'](_0x20083c);if(_0xcfda8b['has'](_0x56aab9)){const _0x14842a=_0xcfda8b['get'](_0x56aab9);_0x203cc1['has'](_0x56aab9)||_0x203cc1['set'](_0x56aab9,{..._0x14842a}),_0x1042e2['set'](_0x56aab9,{..._0x14842a});}}}for(const _0x138a88 of _0x203cc1['keys']())_0x138a88>=this['_startingRevisionId']&&_0x203cc1['delete'](_0x138a88);const _0x47755f=new Map();for(const _0xc64282 of _0x49ad62){let _0x1a3ba8=_0x7af203['insertions'][_0xc64282];for(const _0x5d5fc8 of _0x1a3ba8)if(_0x5d5fc8['item']['is']('element','tableCell')){const _0x2d9652=this['_getVidAttributeName'](_0x5d5fc8),_0x1d4bdf=_0x5d5fc8['item']['getAttribute'](_0x2d9652);if(_0x1042e2['has'](_0x1d4bdf)){const _0x2f5414=_0x5d5fc8['item']['parent']['parent']['getAttribute']('vid_start'),_0x271f5c=_0x47755f['get'](_0x2f5414)||new Set();_0x271f5c['add'](_0x1042e2['get'](_0x1d4bdf)['userId']),_0x47755f['set'](_0x2f5414,_0x271f5c);}}_0x1a3ba8=_0x7af203['deletions'][_0xc64282];for(const _0x20edd4 of _0x1a3ba8)if(_0x20edd4['item']['is']('element','tableCell')){const _0x5808ad=this['_getVidAttributeName'](_0x20edd4),_0x51638f=_0x20edd4['item']['getAttribute'](_0x5808ad);if(_0x203cc1['has'](_0x51638f)){const _0xd2a2c8=_0x20edd4['item']['parent']['parent']['getAttribute']('vid_start'),_0x51e1a3=_0x47755f['get'](_0xd2a2c8)||new Set();_0x51e1a3['add'](_0x203cc1['get'](_0x51638f)['userId']),_0x47755f['set'](_0xd2a2c8,_0x51e1a3);}}for(const _0x3bfbb6 of _0x47755f['keys']())(_0x1042e2['has'](_0x3bfbb6)||_0x203cc1['has'](_0x3bfbb6))&&_0x47755f['delete'](_0x3bfbb6);}for(const _0x15eb6b of _0x49ad62){const _0x201479=_0x7af203['insertions'][_0x15eb6b];let _0x499cb5=null,_0x36ee09=null;for(const _0x48c254 of _0x201479){const _0xa678b7=this['_getVidAttributeName'](_0x48c254),_0x5ee7d0=_0x48c254['item']['getAttribute'](_0xa678b7),_0x5701a2=_0x47755f['get'](_0x5ee7d0);_0x5701a2&&'elementStart'==_0x48c254['type']&&(_0x499cb5=Array['from'](_0x5701a2)[0x0],_0x36ee09=_0x48c254['item']['getAttribute']('vid_end')),_0x499cb5&&(_0x203cc1['set'](_0x5ee7d0,{'userId':_0x499cb5}),_0x1042e2['set'](_0x5ee7d0,{'userId':_0x499cb5})),_0x5ee7d0==_0x36ee09&&(_0x499cb5=null,_0x36ee09=null);}}const _0x5d1957={},_0x27a9ec=new Set();for(const _0x319b72 of _0x49ad62){const _0x4528b0=_0x518ddb['deletions'][_0x319b72],_0x246268=_0x518ddb['insertions'][_0x319b72];for(const {userId:_0x1397ef}of this['_touchedMarkers']['values']())null!==_0x1397ef&&_0x27a9ec['add'](_0x1397ef);for(const {userId:_0x1d50c6}of this['_touchedRoots']['values']())null!==_0x1d50c6&&_0x27a9ec['add'](_0x1d50c6);this['_markChanges'](_0x246268,_0x7af203['insertions'][_0x319b72],_0x1042e2,'insertion',_0x27a9ec),this['_markChanges'](_0x4528b0,_0x7af203['deletions'][_0x319b72],_0x203cc1,'deletion',_0x27a9ec),_0x5d1957[_0x319b72]={'insertions':this['_prepareViewToSave'](_0x246268),'deletions':this['_prepareViewToSave'](_0x4528b0),'attachChange':this['_touchedRoots']['get'](_0x319b72)||null,'attributesBefore':_0x3692ca(this['_baseRootsAttributes']['get'](_0x319b72))||{},'attributesAfter':_0x3692ca(this['_diffRootsAttributes']['get'](_0x319b72))};}return{'diffData':_0x5d1957,'authorsIds':Array['from'](_0x27a9ec)};}['_processRootBeforeSave'](_0x10e275){for(const [,_0x9e393a]of _0x10e275['markers']){const _0x14fd9a=_0x9e393a['start']['getAncestors']()['filter'](_0x3e11c9=>'tableCell'==_0x3e11c9['name']);for(const _0x36a67f of _0x14fd9a)0x1==_0x36a67f['childCount']&&_0x36a67f['getChild'](0x0)['is']('element','paragraph')&&_0x36a67f['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4e4682){this['_processRootBeforeSave'](_0x4e4682);const _0x3f471d=this['editor']['data']['toView'](_0x4e4682,{}),_0x4e4e95=Array['from'](_0x3f471d['getChildren']())['map'](_0x1ce3c0=>this['_getViewJson'](_0x1ce3c0));return JSON['stringify'](_0x4e4e95);}['_getViewJson'](_0x19e271){if(_0x19e271['is']('$text'))return _0x19e271['data'];{const _0xbc9845=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4d10fb=_0x19e271,_0x3c023d=this['editor']['data']['htmlProcessor']['domConverter'],_0x5f2c67={'type':_0xbc9845['_getTypeCharForViewElement'](_0x4d10fb),'name':_0x4d10fb['name'],'attributes':Array['from'](_0x4d10fb['getAttributes']()),'children':Array['from'](_0x4d10fb['getChildren']())['map'](_0x3493ee=>this['_getViewJson'](_0x3493ee))};if(_0x19e271['is']('uiElement')&&'$comment'!=_0x19e271['name']){const _0x64885b=_0x19e271['render'](_0x3c023d['domDocument'],_0x3c023d);_0x5f2c67['children']['push'](_0x64885b['outerHTML']);}else{if(_0x19e271['is']('rawElement')){const _0x1d9207=_0x3c023d['domDocument']['createElement'](_0x4d10fb['name']);_0x19e271['render'](_0x1d9207,_0x3c023d),_0x5f2c67['children']['push'](_0x1d9207['innerHTML']);}}const _0x38282b=Array['from'](_0x4d10fb['getCustomProperties']());_0x38282b['length']>0x0&&(_0x5f2c67['customProperties']=_0x38282b);const _0x200863=_0x4d10fb['getFillerOffset']();return null!==_0x200863&&(_0x5f2c67['fillerOffset']=_0x200863),_0x5f2c67;}}['_markChanges'](_0x4bfe15,_0x1be088,_0x5f4640,_0xc41b6f,_0x3b5b5d){let _0x518e1e=null,_0x3d84d5=null,_0x52e744=0x0;const _0x198b10=this['editor']['model'];for(let _0x4af637=0x0;_0x4af637<_0x1be088['length'];_0x4af637++){const _0x864647=this['_getVidAttributeName'](_0x1be088[_0x4af637]),_0x3ea5b6=_0x1be088[_0x4af637]['item']['getAttribute'](_0x864647),_0x2edc67=_0x5f4640['get'](_0x3ea5b6),_0x47bbff=_0x4af637==_0x1be088['length']-0x1;(!_0x518e1e&&_0x2edc67&&(_0x518e1e=_0x2edc67,_0x3d84d5=_0x1be088[_0x4af637]),_0x518e1e&&(!_0x2edc67||_0x2edc67['userId']!=_0x518e1e['userId']))&&(_0x2d0f52(_0x2edc67,P(_0x3d84d5,_0x4bfe15,_0x198b10),P(_0x1be088[_0x4af637],_0x4bfe15,_0x198b10)),_0x518e1e=_0x2edc67||null,_0x3d84d5=_0x2edc67?_0x1be088[_0x4af637]:null),_0x518e1e&&_0x47bbff&&_0x2d0f52(_0x2edc67,P(_0x3d84d5,_0x4bfe15,_0x198b10),V(_0x1be088[_0x4af637],_0x4bfe15,_0x198b10));}function _0x2d0f52(_0x3fc0d5,_0x33db92,_0x21d802){const _0x18c32d=_0x518e1e['userId'],_0x358921='revision:'+_0xc41b6f+':'+_0x18c32d+':'+_0x52e744++,_0x1a7815=_0x198b10['createRange'](_0x33db92,_0x21d802);_0x4bfe15['markers']['set'](_0x358921,_0x1a7815),null!==_0x18c32d&&_0x3b5b5d['add'](_0x18c32d);}}['_getVidAttributeName'](_0x512606){switch(_0x512606['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x40681f,_0x35e018){_0x40681f['baseVersion']=null;for(const _0xa5e72 in _0x40681f){const _0x3aac41=_0x40681f[_0xa5e72];if(_0x3aac41 instanceof _0x1b0175){const _0x266101=_0x35e018['get'](_0x3aac41['root']['rootName']);_0x40681f[_0xa5e72]=this['_fixPosition'](_0x3aac41,_0x266101);}if(_0x3aac41 instanceof _0x3e71fc){const _0x3a1ef4=_0x35e018['get'](_0x3aac41['root']['rootName']);_0x40681f[_0xa5e72]=this['_fixRange'](_0x3aac41,_0x3a1ef4);}'root'===_0xa5e72&&(_0x40681f['root']=_0x35e018['get'](_0x40681f['root']['rootName']));}}['_fixRange'](_0x227f24,_0x26acbf){return this['editor']['model']['createRange'](this['_fixPosition'](_0x227f24['start'],_0x26acbf),this['_fixPosition'](_0x227f24['end'],_0x26acbf));}['_fixPosition'](_0xa9f6eb,_0x46deef){return this['editor']['model']['createPositionFromPath'](_0x46deef,_0xa9f6eb['path'],_0xa9f6eb['stickiness']);}['_handleInsertOperation'](_0x2939f5){const _0x190b89=this['_idsRoots']['get'](_0x2939f5['position']['root']['rootName']),_0x195a9f=this['_fixPosition'](_0x2939f5['position'],_0x190b89),_0x1814bf=null===_0x2939f5['_authorId']?null:_0x2939f5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5dd8fc=_0x195a9f['parent'],_0x1ccc50=this['_revisionId'],_0x1663f0=[];for(const _0x218afe of _0x2939f5['nodes'])if(_0x218afe['is']('element'))_0x1663f0['push'](this['_makeIdsRoot'](_0x218afe));else{for(let _0x49fef8=0x0;_0x49fef8<_0x218afe['offsetSize'];_0x49fef8++)_0x1663f0['push'](new _0x30b597('$text',{'vid':this['_revisionId']++}));}const _0x2a915d=this['_revisionId'];for(let _0x2772de=_0x1ccc50;_0x2772de<_0x2a915d;_0x2772de++)this['_touched']['set'](_0x2772de,{'userId':_0x1814bf});_0x5dd8fc['_insertChild'](_0x195a9f['offset'],_0x1663f0);}['_handleMoveOperation'](_0x3d034f){(_0x3d034f=this['_cloneOperation'](_0x3d034f,this['_idsRoots']))['_execute']();const _0x8b7292=null===_0x3d034f['_authorId']?null:_0x3d034f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2c8897=_0x3d034f['getMovedRangeStart'](),_0x3a080d=_0x2c8897['parent'],_0x4e3592=_0x2c8897['offset'];!function _0x1ae73f(_0x550fdb,_0x170df8,_0x14a8ad,_0x1c867b){for(let _0x513462=_0x14a8ad;_0x513462<_0x1c867b;_0x513462++){const _0x3ee172=_0x170df8['getChild'](_0x513462);_0x3ee172['is']('element','$text')?_0x550fdb['set'](_0x3ee172['getAttribute']('vid'),{'userId':_0x8b7292}):(_0x550fdb['set'](_0x3ee172['getAttribute']('vid_start'),{'userId':_0x8b7292}),_0x1ae73f(_0x550fdb,_0x3ee172,0x0,_0x3ee172['childCount']),_0x550fdb['set'](_0x3ee172['getAttribute']('vid_end'),{'userId':_0x8b7292}));}}(this['_touched'],_0x3a080d,_0x4e3592,_0x4e3592+_0x3d034f['howMany']);}['_handleMergeOperation'](_0xc07662){const _0x21d43e=null===(_0xc07662=this['_cloneOperation'](_0xc07662,this['_idsRoots']))['_authorId']?null:_0xc07662['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4828f0=_0xc07662['targetPosition']['parent'],_0x3d6514=_0xc07662['sourcePosition']['parent'],_0x54f847=_0x4828f0['getAttribute']('vid_end'),_0x19c053=_0x3d6514['getAttribute']('vid_start');_0x4828f0['_setAttribute']('vid_end',_0x3d6514['getAttribute']('vid_end')),_0x3d6514['_setAttribute']('vid_end',_0x54f847),this['_touched']['set'](_0x19c053,{'userId':_0x21d43e}),this['_touched']['set'](_0x54f847,{'userId':_0x21d43e}),_0xc07662['_execute']();}['_handleSplitOperation'](_0x280c5d){const _0x4f60a0=null===(_0x280c5d=this['_cloneOperation'](_0x280c5d,this['_idsRoots']))['_authorId']?null:_0x280c5d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5ae95d=_0x280c5d['graveyardPosition'],_0xce6339=_0x280c5d['splitPosition']['parent'];_0x280c5d['_execute']();const _0x25b444=_0xce6339['getAttribute']('vid_end'),_0x284989=_0x280c5d['insertionPosition']['nodeAfter'];if(_0x5ae95d){const _0x5ba5c8=_0x284989['getAttribute']('vid_end'),_0x18d1ce=_0xce6339['getAttribute']('vid_end');_0xce6339['_setAttribute']('vid_end',_0x5ba5c8),_0x284989['_setAttribute']('vid_end',_0x18d1ce),this['_touched']['set'](_0xce6339['getAttribute']('vid_end'),{'userId':_0x4f60a0}),this['_touched']['set'](_0x284989['getAttribute']('vid_start'),{'userId':_0x4f60a0});}else{const _0x265314=this['_revisionId']++,_0x566086=this['_revisionId']++;_0xce6339['_setAttribute']('vid_end',_0x265314),_0x284989['_setAttribute']('vid_start',_0x566086),_0x284989['_setAttribute']('vid_end',_0x25b444),this['_touched']['set'](_0x265314,{'userId':_0x4f60a0}),this['_touched']['set'](_0x566086,{'userId':_0x4f60a0});}}['_handleMarkerOperation'](_0x35e8fc){if(!_0x35e8fc['affectsData'])return;const _0x4109ed=(_0x35e8fc=this['_cloneOperation'](_0x35e8fc,this['_diffRoots']))['oldRange']?_0x35e8fc['oldRange']['root']:null,_0xd41a6=_0x35e8fc['newRange']?_0x35e8fc['newRange']['root']:null;_0x4109ed&&this['_markers']['delete'](_0x35e8fc['name']),_0xd41a6&&this['_markers']['set'](_0x35e8fc['name'],_0x35e8fc['newRange']['clone']());const _0x518c17=null===_0x35e8fc['_authorId']?null:_0x35e8fc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4bc1b8=_0x35e8fc['name'];if(!this['_touchedMarkers']['has'](_0x4bc1b8))return void this['_touchedMarkers']['set'](_0x4bc1b8,{'range':_0x35e8fc['oldRange'],'userId':_0x518c17});const _0x5653e9=this['_touchedMarkers']['get'](_0x4bc1b8),_0x39ee9b=_0x5653e9['range'],_0xc6f0e=_0x35e8fc['newRange'];null==_0x39ee9b&&null==_0xc6f0e||_0x39ee9b&&_0xc6f0e&&_0x39ee9b['isEqual'](_0xc6f0e)?this['_touchedMarkers']['delete'](_0x35e8fc['name']):_0x5653e9['userId']=_0x518c17;}['_handleRootOperation'](_0x2cefa8,_0x5cc4f1){this['_diffRoots']['has'](_0x2cefa8['rootName'])?this['_diffRoots']['get'](_0x2cefa8['rootName'])['_isAttached']=_0x2cefa8['isAdd']:(this['_diffRoots']['set'](_0x2cefa8['rootName'],N(_0x2cefa8['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x2cefa8['rootName'],{}),_0x5cc4f1&&this['_idsRoots']['set'](_0x2cefa8['rootName'],N(_0x2cefa8['rootName'],!0x0)));const _0x487432=null===_0x2cefa8['_authorId']?null:_0x2cefa8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4759c2=this['_touchedRoots']['get'](_0x2cefa8['rootName']);_0x4759c2&&_0x4759c2['userId']===_0x487432?this['_touchedRoots']['delete'](_0x2cefa8['rootName']):this['_touchedRoots']['set'](_0x2cefa8['rootName'],{'userId':_0x487432,'isAttached':_0x2cefa8['isAdd']});}['_handleRootAttributeOperation'](_0x49940d){const _0x1f7d18=this['_diffRootsAttributes']['get'](_0x49940d['root']['rootName']);null===_0x49940d['newValue']?delete _0x1f7d18[_0x49940d['key']]:_0x1f7d18[_0x49940d['key']]=_0x49940d['newValue'];}}function x(_0x598fd6){const _0x33b587=N(_0x598fd6['rootName'],_0x598fd6['isAttached']());for(const _0x40bd91 of _0x598fd6['getChildren']()){const _0x114a40=_0x40bd91['_clone'](!0x0);_0x33b587['_appendChild'](_0x114a40);}return _0x33b587;}function N(_0x198ad6,_0x343fe8=!0x0){const _0x396d4e=new _0x265c7b();return _0x396d4e['rootName']=_0x198ad6,_0x396d4e['_isAttached']=_0x343fe8,_0x396d4e['isAttached']=()=>_0x396d4e['_isAttached'],_0x396d4e;}function P(_0x5438ee,_0x38f3b2,_0x5d5a0d){const _0x279b11='elementEnd'==_0x5438ee['type']?_0x5d5a0d['createPositionAt'](_0x5438ee['item'],'end'):_0x5d5a0d['createPositionBefore'](_0x5438ee['item']);return _0x5d5a0d['createPositionFromPath'](_0x38f3b2,_0x279b11['path'],_0x279b11['stickiness']);}function V(_0x5b5682,_0xa09761,_0x5f19ad){const _0x84c165='elementStart'==_0x5b5682['type']?_0x5f19ad['createPositionAt'](_0x5b5682['item'],0x0):_0x5f19ad['createPositionAfter'](_0x5b5682['item']);return _0x5f19ad['createPositionFromPath'](_0xa09761,_0x84c165['path'],_0x84c165['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
+ _0x20dd09(_0xb6dc9){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x13705b,_0x43dcec){super(_0x13705b),this['focusTracker']=new _0x252db7(),this['keystrokes']=new _0x363034(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x43dcec),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x1196b9({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x590d67=_0x7b3593=>_0x7b3593['stopPropagation']();this['keystrokes']['set']('arrowright',_0x590d67),this['keystrokes']['set']('arrowleft',_0x590d67),this['keystrokes']['set']('arrowup',_0x590d67),this['keystrokes']['set']('arrowdown',_0x590d67);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2881aa){this['revisionNameInputView']['fieldView']['element']['value']=_0x2881aa['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x573943){const _0x19e424=new et(this['locale'],ti),_0x133ec4=_0x19e424['fieldView'];_0x133ec4['extendTemplate']({'attributes':{'maxlength':'220'}});let _0xda6840=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x573943&&(_0xda6840+='\x20('+R(this['locale'],'optional')+')'),(_0x19e424['label']=_0xda6840,_0x133ec4['on']('input',()=>{this['revisionNameInputValue']=_0x133ec4['element']['value']['trim']();}),_0x19e424);}}class v extends _0x307a2f{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x528523=this['editor'],_0xe62d9a=_0x528523['plugins']['get']('RevisionTracker');_0x528523['ui']['componentFactory']['add']('revisionHistory',_0x50f9b2=>{const _0x145af0=_0x1f4821(_0x50f9b2),_0x3da361=_0x145af0['panelView']['children'],_0x12ec84=new _0x26a8eb(_0x50f9b2),_0x1b80f4=new _0x56cb51(_0x50f9b2),_0x1a09e0=new _0x2f26c0(_0x50f9b2),_0x54acdc=new _0x56cb51(_0x50f9b2),_0x59e14a=new _0x2f26c0(_0x50f9b2);return _0x145af0['bind']('isEnabled')['to'](_0xe62d9a,'isReady',_0xe62d9a,'isEnabled',_0x528523,'isReadOnly',(_0x1546e7,_0xb3b47a,_0x1e3525)=>_0x1546e7&&_0xb3b47a&&!_0x1e3525),_0x145af0['buttonView']['set']({'icon':_0x38f638,'label':R(_0x50f9b2,'Revision\x20history'),'tooltip':!0x0}),_0x1a09e0['set']({'label':R(_0x50f9b2,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x1a09e0['bind']('isEnabled')['to'](_0xe62d9a,'isReady',_0xe62d9a,'isEnabled',_0x528523,'isReadOnly',(_0xde981a,_0x47216d,_0x437eed)=>_0xde981a&&_0x47216d&&!_0x437eed),_0x1a09e0['on']('execute',()=>this['_showDialog']()),_0x59e14a['set']({'label':R(_0x50f9b2,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x59e14a['bind']('isEnabled')['to'](_0xe62d9a,'isReady',_0x528523,'isReadOnly',(_0x5d1e7a,_0xb28f0f)=>_0x5d1e7a&&!_0xb28f0f),_0x59e14a['on']('execute',()=>{_0x528523['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x145af0['isOpen']=!0x1,_0x528523['editing']['view']['focus']();}),_0x1b80f4['children']['add'](_0x1a09e0),_0x54acdc['children']['add'](_0x59e14a),_0x12ec84['role']='menu',_0x12ec84['items']['addMany']([_0x1b80f4,_0x54acdc]),_0x3da361['add'](_0x12ec84),_0x145af0;}),_0x528523['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x44aca4=this['editor'],_0x10f704=_0x44aca4['locale'],_0x3f1143=new _0x255e89(_0x10f704),_0x1a9868=new _0x58a194(_0x10f704);_0x3f1143['buttonView']['set']({'icon':_0x38f638,'label':R(_0x10f704,'Revision\x20history')});const _0x2eae6b=new _0x3aa88e(_0x10f704,_0x3f1143),_0x56a204=new _0x4f7c3e(_0x10f704);_0x56a204['set']({'label':R(_0x10f704,'Save\x20current\x20revision')}),_0x56a204['delegate']('execute')['to'](_0x3f1143),_0x56a204['on']('execute',()=>{this['_showDialog']();}),_0x2eae6b['children']['add'](_0x56a204),_0x1a9868['items']['add'](_0x2eae6b);const _0x3bb904=new _0x3aa88e(_0x10f704,_0x3f1143),_0x4bc248=new _0x4f7c3e(_0x10f704);return _0x4bc248['set']({'label':R(_0x10f704,'Open\x20revision\x20history')}),_0x4bc248['delegate']('execute')['to'](_0x3f1143),_0x4bc248['on']('execute',()=>{_0x44aca4['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3bb904['children']['add'](_0x4bc248),_0x1a9868['items']['add'](_0x3bb904),_0x3f1143['panelView']['children']['add'](_0x1a9868),_0x3f1143;}['_showDialog'](){const _0x485dcb=this['editor'],_0x3fcbb0=_0x485dcb['locale'],_0x44fac6=_0x485dcb['plugins']['get']('Dialog'),_0x231f7b=_0x485dcb['plugins']['get']('RevisionTracker');function _0x4ef8da(_0x312bd2){_0x485dcb['config']['get']('revisionHistory.requireRevisionName')&&''===_0x312bd2['revisionName']?_0x312bd2['revisionNameInputView']['errorText']=R(_0x3fcbb0,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x485dcb['plugins']['get'](h)['saveRevision']({'name':_0x312bd2['revisionName']}),_0x44fac6['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4ef8da(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x44fac6['show']({'id':'revisionSave','title':R(_0x3fcbb0,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x485dcb['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x44fac6['hide']()},{'label':R(_0x485dcb['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x56ed02){_0x56ed02['bind']('isEnabled')['to'](_0x231f7b,'isReady',_0x231f7b,'isEnabled',_0x485dcb,'isReadOnly',(_0x12e9ee,_0x41aff2,_0x525e29)=>_0x12e9ee&&_0x41aff2&&!_0x525e29);},'onExecute':()=>_0x4ef8da(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x3d281a=this['editor'],_0x386240=_0x3d281a['locale'];this['_saveRevisionFormView']=new me(_0x386240,_0x3d281a['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0xb6dc9{['changeId'];['_model'];constructor(_0x171cfe,_0xd8508a){super(_0x171cfe),this['_model']=_0xd8508a,this['changeId']=_0xd8508a['id'];const _0x4c0c12=this['bindTemplate'],_0x167339=R(_0x171cfe,_0xd8508a['data']['isSuggestion']?'Suggested\x20by':'add'==_0xd8508a['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xd8508a['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4c0c12['to']('type',_0x200f46=>'ck-revision-change__'+_0x200f46)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x167339}]},{'text':'\x20'+_0xd8508a['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x4c96c5(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x4c66d2){super(),this['id']=_0x4c66d2['id']||_0xcc759(),this['author']=_0x4c66d2['author'],this['type']=_0x4c66d2['type'],this['data']=_0x4c66d2['data']||{},this['rootName']=_0x4c66d2['rootName'],this['set']('createdAt',_0x4c66d2['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xae6556,_0x5013bf){this['newRevisionId']=_0xae6556,this['oldRevisionId']=_0x5013bf,this['changes']=new _0x48b74b();}['_setChanges'](_0x560b74){for(const _0x53bc63 of _0x560b74)this['changes']['add'](_0x53bc63);}}class l extends _0x307a2f{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x270810,_0x41047d,S,$];}constructor(_0x43b5b6){super(_0x43b5b6),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x5451bf,_0x324564,_0x4933d1)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x239e83=>{for(const _0x260c3a of this['editor']['editing']['view']['document']['roots'])_0x4933d1?_0x239e83['removeClass']('ck-editor__editable__overlay',_0x260c3a):_0x239e83['addClass']('ck-editor__editable__overlay',_0x260c3a);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2976a1=>null!==_0x2976a1),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2585c6,_0x5c54ef,_0x51963e)=>_0x2585c6&&_0x51963e?_0x5c54ef['changes']['getIndex'](_0x51963e):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x115163,_0x28acf0)=>_0x115163?_0x28acf0['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x41047d);}['init'](){const _0x3667b7=this['editor'],_0x4d373a=new rt(_0x3667b7,{'direction':'backward'}),_0x11e3ae=new rt(_0x3667b7,{'direction':'forward'});(_0x3667b7['commands']['add']('showPreviousChange',_0x4d373a),_0x3667b7['commands']['add']('showNextChange',_0x11e3ae),_0x3667b7['commands']['add']('restoreRevision',new nt(_0x3667b7)),this['on']('change:numberOfChanges',()=>{_0x4d373a['refresh'](),_0x11e3ae['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3667b7['enableReadOnlyMode']('revision-viewer'),_0x3667b7['plugins']['has']('WidgetToolbarRepository'))&&_0x3667b7['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x2968c6){return await this['_utils']['loadRevisionData'](_0x2968c6,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2968c6);}async['getRevisionRootsAttributes'](_0x393cfb){return await this['_utils']['loadRevisionData'](_0x393cfb,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x393cfb);}async['compare'](_0xe4d40f,_0x4f0248,_0x5dbab1=!0x1){if(!this['isEnabled'])return;const _0x4c7e49=this['diff'],_0x277b63=this['repository'],_0x483e2e='string'==typeof _0xe4d40f?_0x277b63['getRevision'](_0xe4d40f):_0xe4d40f,_0x34f238='string'==typeof _0x4f0248?_0x277b63['getRevision'](_0x4f0248):_0x4f0248,_0x2f5533=_0x483e2e['id'],_0x193a5f=_0x34f238?_0x34f238['id']:null;if(!_0x5dbab1&&this['diff']&&this['diff']['newRevisionId']===_0x2f5533&&this['diff']['oldRevisionId']===_0x193a5f)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x2f5533,_0x193a5f);const _0x2e66a1=this['_getRevisionsRange'](_0x483e2e,_0x34f238,!0x0)['map'](_0x5c871e=>this['_utils']['loadRevisionData'](_0x5c871e,this['adapter']));return _0x2e66a1['push'](new Promise(_0x266ef3=>{setTimeout(_0x266ef3,0x14);})),Promise['all'](_0x2e66a1)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x49972a=this['_getDiff'](_0x2f5533,_0x193a5f);for(const _0x18cb91 of _0x49972a['changes'])this['_changeIdToChange']['set'](_0x18cb91['id'],_0x18cb91);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x334a4a=>{for(const _0x351715 of this['editor']['model']['document']['getRootNames']())_0x334a4a['detachRoot'](_0x351715);for(const _0x55a3b1 of Object['keys'](_0x49972a['model'])){const _0x4700fd=_0x334a4a['addRoot'](_0x55a3b1);for(const _0x2fb68c of Object['keys'](_0x49972a['attributes'][_0x55a3b1]))_0x334a4a['setAttribute'](_0x2fb68c,_0x49972a['attributes'][_0x55a3b1][_0x2fb68c],_0x4700fd);_0x334a4a['insert'](_0x49972a['model'][_0x55a3b1],_0x4700fd,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x49972a['changes'])),this['isReady']=!0x0;})['catch'](_0x343946=>{console['error'](_0x343946),this['_cleanUp'](),_0x4c7e49&&(this['diff']=_0x4c7e49),this['isReady']=!0x0;});}['addRevisionData'](_0x5e0b52,_0x1f0e5f){const _0x3f3d10=this['repository']['createRevision'](_0x5e0b52);return _0x3f3d10['on']('_update',(_0x5d0ca5,_0x10286c,_0x17d028)=>_0x1f0e5f(_0x10286c,_0x17d028,_0x3f3d10)),this['repository']['addRevision'](_0x3f3d10),_0x3f3d10;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x264f50=>{for(const _0x2771bd of this['editor']['model']['document']['getRootNames']())_0x264f50['detachRoot'](_0x2771bd);});}['_sortAndFilterDiffChanges'](_0x1bfe49){const _0x20a49c=[],_0x1b3c98=new Map();for(const _0x58b525 of this['editor']['model']['document']['getRootNames']()){const _0x49971b=this['editor']['editing']['view']['getDomRoot'](_0x58b525);if(!_0x49971b)continue;const _0x5016d5=_0x49971b['getClientRects']()['item'](0x0);_0x5016d5&&(_0x20a49c['push'](_0x58b525),_0x1b3c98['set'](_0x58b525,_0x5016d5));}return _0x20a49c['sort']((_0x3aead9,_0x3873f1)=>{const _0x273cc7=_0x1b3c98['get'](_0x3aead9),_0x1b233c=_0x1b3c98['get'](_0x3873f1);return _0x273cc7['y']-_0x1b233c['y']||_0x273cc7['x']-_0x1b233c['x'];}),(_0x1bfe49=_0x1bfe49['filter'](_0x4bfea8=>_0x20a49c['includes'](_0x4bfea8['rootName'])))['sort']((_0x5d9db3,_0x54d7ba)=>_0x20a49c['indexOf'](_0x5d9db3['rootName'])-_0x20a49c['indexOf'](_0x54d7ba['rootName'])),_0x1bfe49;}['_makeTape'](_0x3048a7){const _0x103127=Array['from'](_0x3048a7['markers'])['filter'](([_0x5ef11c,_0x260998])=>_0x5ef11c['startsWith']('revision:')&&!_0x260998['isCollapsed']),_0x4d1b87=Array['from'](this['editor']['model']['createRangeIn'](_0x3048a7)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x103127['length'])for(const _0x402b4b of _0x4d1b87){const [_0xe5235,_0x1a46ce]=_0x103127[0x0],[,_0x111ed9,_0x261a5b]=_0xe5235['split'](':');if(_0x1a46ce['end']['isEqual'](_0x402b4b['nextPosition'])&&_0x103127['shift'](),(_0x402b4b['previousPosition']['isEqual'](_0x1a46ce['start'])||_0x402b4b['previousPosition']['isAfter'](_0x1a46ce['start']))&&('insertion'==_0x111ed9?_0x402b4b['isAdded']={'userId':_0x261a5b}:'deletion'==_0x111ed9&&(_0x402b4b['isRemoved']={'userId':_0x261a5b})),0x0==_0x103127['length'])break;}return _0x4d1b87;}['_refreshStartEndIndex'](_0x430635){const _0x29fdb0=new Map();for(let _0x548618=0x0;_0x548618<_0x430635['length'];_0x548618++)'text'===_0x430635[_0x548618]['type']?(_0x430635[_0x548618]['item']['startIndex']=_0x548618,_0x430635[_0x548618]['item']['endIndex']=_0x548618):('elementStart'===_0x430635[_0x548618]['type']?_0x430635[_0x548618]['item']['startIndex']=_0x548618:'elementEnd'===_0x430635[_0x548618]['type']&&(_0x430635[_0x548618]['item']['endIndex']=_0x548618),_0x29fdb0['set'](_0x430635[_0x548618]['id'],_0x548618));for(const _0x5ca45f of _0x29fdb0['values']())'elementStart'===_0x430635[_0x5ca45f]['type']?_0x430635[_0x5ca45f]['item']['endIndex']=_0x29fdb0['get'](_0x430635[_0x5ca45f]['pairId']):'elementEnd'===_0x430635[_0x5ca45f]['type']&&(_0x430635[_0x5ca45f]['item']['startIndex']=_0x29fdb0['get'](_0x430635[_0x5ca45f]['pairId']));}['_processTape'](_0x4d9161){for(let _0x3c4640=0x0;_0x3c4640<_0x4d9161['length'];_0x3c4640++){if('elementStart'===_0x4d9161[_0x3c4640]['type'])_0x4d9161[_0x3c4640]['item']['startIndex']=_0x3c4640;else{if('elementEnd'===_0x4d9161[_0x3c4640]['type']){_0x4d9161[_0x3c4640]['item']['endIndex']=_0x3c4640;const _0x662d4c=_0x4d9161[_0x3c4640]['item']['startIndex'];_0x4d9161[_0x662d4c]['pairId']=_0x4d9161[_0x3c4640]['id'],_0x4d9161[_0x3c4640]['pairId']=_0x4d9161[_0x662d4c]['id'];}else _0x4d9161[_0x3c4640]['item']['startIndex']=_0x3c4640,_0x4d9161[_0x3c4640]['item']['endIndex']=_0x3c4640,_0x4d9161[_0x3c4640]['pairId']=null;}_0x4d9161[_0x3c4640]['markersStart']||(_0x4d9161[_0x3c4640]['markersStart']=[],_0x4d9161[_0x3c4640]['markersEnd']=[]);}}['_markInsertions'](_0x528f3e,_0x133966){const _0x4629b7=_0x528f3e['filter'](_0x356b2e=>!_0x356b2e['isAdded']);for(let _0x1e930a=0x0;_0x1e930a<_0x133966['length'];_0x1e930a++)_0x133966[_0x1e930a]['isAdded']&&(_0x4629b7[_0x1e930a]['isAdded']=_0x133966[_0x1e930a]['isAdded']);}['_getDiff'](_0x3ec2ba,_0x572b78=null){const _0x267e6e=this['repository']['getRevision'](_0x3ec2ba),_0x57ce8f=_0x572b78?this['repository']['getRevision'](_0x572b78):null,_0x195dfc=this['_getRevisionsRange'](_0x267e6e,_0x57ce8f),_0x262619=_0x195dfc[_0x195dfc['length']-0x1],_0x33447c=new Map(),_0x44d52d={'model':{},'attributes':{},'changes':[]},_0x5e519c=new Set(),_0x4b4192=new Map();for(let _0x233003=_0x195dfc['length']-0x1;_0x233003>=0x0;_0x233003--){const _0x40d2c4=_0x195dfc[_0x233003];for(const _0x23b2b6 of Object['keys'](_0x40d2c4['diffData']))if(_0x40d2c4['diffData'][_0x23b2b6]['attachChange']){const _0x24a56a=_0x40d2c4['diffData'][_0x23b2b6]['attachChange'];_0x24a56a['isAttached']?(_0x5e519c['add'](_0x23b2b6),_0x4b4192['has'](_0x23b2b6)&&_0x4b4192['get'](_0x23b2b6)['userId']==_0x24a56a['userId']?_0x4b4192['delete'](_0x23b2b6):_0x4b4192['set'](_0x23b2b6,_0x24a56a)):_0x4b4192['has'](_0x23b2b6)?(_0x5e519c['delete'](_0x23b2b6),_0x4b4192['delete'](_0x23b2b6)):(_0x5e519c['add'](_0x23b2b6),_0x4b4192['set'](_0x23b2b6,_0x24a56a));}else _0x5e519c['add'](_0x23b2b6);}for(const _0x43d098 of _0x5e519c){const _0x2d6c88=_0x4b4192['has'](_0x43d098)&&!_0x4b4192['get'](_0x43d098)['isAttached'];let _0x63e48b=_0x2d6c88?_0x195dfc['length']-0x1:0x0;const _0x37dbe1=_0x2d6c88?-0x1:0x1;for(;_0x195dfc[_0x63e48b];){const _0x12ea9d=_0x195dfc[_0x63e48b];if(_0x12ea9d['diffData'][_0x43d098]){const _0x970222=_0x2d6c88?_0x12ea9d['diffData'][_0x43d098]['attributesBefore']:_0x12ea9d['diffData'][_0x43d098]['attributesAfter'];_0x44d52d['attributes'][_0x43d098]=_0x970222?_0x3692ca(_0x970222):{};break;}_0x63e48b+=_0x37dbe1;}}for(const _0x24eada of _0x195dfc){_0x24eada['model']={};for(const _0x1d083c of _0x24eada['authors'])_0x33447c['set'](_0x1d083c['id'],_0x1d083c);for(const _0x441354 of _0x5e519c){const _0x3ec83f=_0x24eada['diffData'][_0x441354]?_0x24eada['diffData'][_0x441354]['insertions']:'[]',_0xd80c32=_0x24eada['diffData'][_0x441354]?_0x24eada['diffData'][_0x441354]['deletions']:'[]';_0x24eada['model'][_0x441354]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3ec83f),'deletions':this['_utils']['_makeModelFromViewString'](_0xd80c32)};}}for(const _0x150658 of _0x5e519c){let _0x5dcc4c=null,_0x1eb933=0x0;const _0x234570=new Map(Array['from'](_0x267e6e['model'][_0x150658]['insertions']['markers'])['filter'](([_0x1f839c])=>!_0x1f839c['startsWith']('revision:')));let _0x4bb840=0x0;for(const _0x117ff8 of _0x195dfc){const _0x67d267=this['_makeTape'](_0x117ff8['model'][_0x150658]['insertions']);_0x117ff8==_0x267e6e?(_0x5dcc4c=_0x67d267,_0x1eb933=_0x5dcc4c['length'],_0x5dcc4c['forEach'](_0x2b6d4a=>{_0x2b6d4a['id']=_0x4bb840++;}),this['_processTape'](_0x5dcc4c)):this['_markInsertions'](_0x5dcc4c,_0x67d267);const _0x55dc91=_0x5dcc4c['filter'](_0x50b862=>!_0x50b862['isAdded'])['map'](_0x10da59=>_0x10da59['id']);let _0x5a18c4=0x0;const _0xd435c0=this['_makeTape'](_0x117ff8['model'][_0x150658]['deletions']);_0xd435c0['forEach'](_0x48ffc2=>{_0x48ffc2['isRemoved']?_0x48ffc2['id']=_0x1eb933++:_0x48ffc2['id']=_0x55dc91[_0x5a18c4++];}),this['_processTape'](_0xd435c0),this['_setDistance'](_0x5dcc4c,'isAdded'),this['_setDistance'](_0xd435c0,'isRemoved'),_0x117ff8==_0x267e6e&&this['_markMarkers'](_0x5dcc4c,_0x234570),_0x5dcc4c=this['_joinTapes'](_0x5dcc4c,_0xd435c0),this['_refreshStartEndIndex'](_0x5dcc4c),this['_setDistance'](_0x5dcc4c,'isRemoved');}_0x5dcc4c=_0x5dcc4c['filter'](_0x32b207=>!(_0x32b207['isAdded']&&_0x32b207['isRemoved']));const _0x31657d=new Map(_0x262619['model'][_0x150658]['deletions']['markers']),_0x209cd5=new Set(_0x234570['keys']());for(const _0x521699 of _0x31657d['keys']())_0x209cd5['delete'](_0x521699);this['_markSuggestions'](_0x5dcc4c,_0x209cd5),this['_fixObsoleteTags'](_0x5dcc4c),_0x5dcc4c=this['_removeMissingPairs'](_0x5dcc4c),_0x5dcc4c=this['_markMismatchedRemovedTags'](_0x5dcc4c),_0x5dcc4c=this['_removeUnsupportedChanges'](_0x5dcc4c);const {root:_0x2b66d5,changes:_0x1b3ab2}=this['_makeModelFromTape'](_0x5dcc4c,_0x33447c,_0x150658);_0x44d52d['model'][_0x150658]=_0x2b66d5;const _0x4041c0=_0x4b4192['get'](_0x150658);if(_0x4041c0){const _0x2bd0c3=_0x33447c['get'](_0x4041c0['userId']),_0x15acb0=new G({'author':_0x2bd0c3,'type':_0x4041c0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x150658});_0x1b3ab2['unshift'](_0x15acb0),_0x44d52d['attributes'][_0x150658]['revisionHistoryAttachChange']=_0x15acb0['id'];}_0x44d52d['changes']=_0x44d52d['changes']['concat'](_0x1b3ab2);}return _0x44d52d;}['_markMarkers'](_0x57618a,_0x45fda4){for(let _0x473518=0x0;_0x473518<_0x57618a['length'];_0x473518++)for(const [_0x47131c,_0x44dbf3]of _0x45fda4)!_0x44dbf3['isCollapsed']&&_0x44dbf3['start']['isEqual'](_0x57618a[_0x473518]['previousPosition'])&&_0x57618a[_0x473518]['markersStart']['push'](_0x47131c),_0x44dbf3['end']['isEqual'](_0x57618a[_0x473518]['nextPosition'])&&_0x57618a[_0x473518]['markersEnd']['push'](_0x47131c);}['_joinTapes'](_0x40c2ca,_0x21dd73){let _0x1a2a7d=[],_0x392d3d=0x0,_0x5aba11=0x0;for(;_0x392d3d<_0x40c2ca['length']||_0x5aba11<_0x21dd73['length'];){const _0x4658b2=_0x40c2ca[_0x392d3d]||{},_0x3cc106=_0x21dd73[_0x5aba11]||{};if(_0x4658b2['id']==_0x3cc106['id'])_0x392d3d++,_0x5aba11++,_0x1a2a7d['push'](_0x4658b2);else{if(_0x3cc106['isRemoved']&&_0x4658b2['isAdded']){const {commonTape:_0x536913,iEnd:_0xb6e724,jEnd:_0x19845d}=this['_threeWayMerge'](_0x40c2ca,_0x392d3d,_0x21dd73,_0x5aba11);_0x1a2a7d=_0x1a2a7d['concat'](_0x536913),_0x392d3d=_0xb6e724,_0x5aba11=_0x19845d;}else _0x3cc106['isRemoved']?(_0x5aba11++,_0x1a2a7d['push'](_0x3cc106)):(_0x392d3d++,_0x1a2a7d['push'](_0x4658b2));}}return _0x1a2a7d;}['_markSuggestions'](_0x42d2be,_0x1cd40b){const _0x1f5bda=[];for(let _0x36e42f=0x0;_0x36e42f<_0x42d2be['length'];_0x36e42f++){for(let _0x3807a6=0x0;_0x3807a6<_0x42d2be[_0x36e42f]['markersStart']['length'];_0x3807a6++){const _0x301c5e=_0x42d2be[_0x36e42f]['markersStart'][_0x3807a6];if(!_0x1cd40b['has'](_0x301c5e))continue;const {group:_0x1fea2e,type:_0x230e99,authorId:_0x320339}=_0x4754ec(_0x301c5e);'revision-suggestion'!=_0x1fea2e||'insertion'!=_0x230e99&&'deletion'!=_0x230e99||(_0x1f5bda['unshift']({'type':_0x230e99,'name':_0x301c5e,'userId':_0x320339}),_0x42d2be[_0x36e42f]['markersStart']['splice'](_0x3807a6,0x1),_0x3807a6--);}_0x5a241a(_0x42d2be[_0x36e42f]);for(let _0x171a2a=0x0;_0x171a2a<_0x42d2be[_0x36e42f]['markersEnd']['length'];_0x171a2a++){const _0x143252=_0x42d2be[_0x36e42f]['markersEnd'][_0x171a2a];if(!_0x1cd40b['has'](_0x143252))continue;const {group:_0x1369db,type:_0x436c67}=_0x4754ec(_0x143252);if('revision-suggestion'!=_0x1369db||'insertion'!=_0x436c67&&'deletion'!=_0x436c67)continue;_0x42d2be[_0x36e42f]['markersEnd']['splice'](_0x171a2a,0x1),_0x171a2a--;const _0x8cbb02=_0x1f5bda['findIndex'](_0x3287b4=>_0x3287b4['name']==_0x143252);_0x8cbb02>-0x1&&_0x1f5bda['splice'](_0x8cbb02,0x1);}}function _0x4754ec(_0x388b6d){const _0x23cf39=_0x388b6d['split'](':');return{'group':_0x23cf39[0x0],'type':_0x23cf39[0x1],'subType':_0x23cf39['length']>=0x5?_0x23cf39[0x2]:null,'id':_0x23cf39['length']<0x5?_0x23cf39[0x2]:_0x23cf39[0x3],'authorId':_0x23cf39['length']<0x5?_0x23cf39[0x3]:_0x23cf39[0x4],'markerCount':0x6==_0x23cf39['length']?_0x23cf39[0x5]:null};}function _0x5a241a(_0x6aa636){for(let _0x1a3b40=0x0;_0x1a3b40<_0x1f5bda['length'];_0x1a3b40++){if(_0x6aa636['isAdded']&&'insertion'==_0x1f5bda[_0x1a3b40]['type']&&_0x6aa636['isAdded']['userId']==_0x1f5bda[_0x1a3b40]['userId'])return _0x6aa636['isAddSuggestion']=_0x1f5bda[_0x1a3b40],void delete _0x6aa636['isAdded'];if(!_0x6aa636['isAdded']&&!_0x6aa636['isRemoved']&&'deletion'==_0x1f5bda[_0x1a3b40]['type'])return void(_0x6aa636['isRemoveSuggestion']=_0x1f5bda[_0x1a3b40]);}}}['_setDistance'](_0x22680d,_0x1349f4){let _0xfbf254=0x0,_0x4202ec=!0x1;const _0x88b951=new Map();for(const _0x595ab1 of _0x22680d)_0x595ab1[_0x1349f4]?_0x4202ec&&(_0xfbf254++,_0x4202ec=!0x1):(_0xfbf254++,_0x4202ec=!0x0),_0x88b951['set'](_0x595ab1['id'],_0xfbf254);for(let _0x27dd99=0x0;_0x27dd99<_0x22680d['length'];_0x27dd99++){if('isRemoved'==_0x1349f4&&_0x22680d[_0x27dd99]['isAdded']||'isAdded'==_0x1349f4&&_0x22680d[_0x27dd99]['isRemoved'])continue;if('text'==_0x22680d[_0x27dd99]['type']){_0x22680d[_0x27dd99]['distance']=0x0;continue;}const _0x57f246=_0x88b951['get'](_0x22680d[_0x27dd99]['pairId']),_0xe14ff4=_0x88b951['get'](_0x22680d[_0x27dd99]['id']);_0x22680d[_0x27dd99]['distance']=_0x57f246-_0xe14ff4;}}['_getRevisionsRange'](_0x242b09,_0x19151f,_0x4ed9c6=!0x1){const _0x51120d=[];let _0x4c3600=this['repository']['getIndex'](_0x242b09),_0x967cea=this['repository']['getIndex'](_0x19151f);for(-0x1==_0x967cea&&(_0x967cea=this['repository']['_revisions']['length'],_0x4ed9c6=!0x1);_0x4c3600<_0x967cea;)_0x51120d['push'](this['repository']['getRevision'](_0x4c3600)),_0x4c3600++;return _0x4ed9c6&&_0x51120d['push'](this['repository']['getRevision'](_0x4c3600)),_0x51120d;}['_threeWayMerge'](_0x1f8a9e,_0x13168e,_0x7976e7,_0x4ff8cc){const _0x57c86e=this['editor']['model']['schema'];let _0x47ccb5=_0x13168e;for(;_0x1f8a9e[_0x47ccb5]&&_0x1f8a9e[_0x47ccb5]['isAdded'];)_0x47ccb5++;let _0x55cc16=_0x4ff8cc;for(;_0x7976e7[_0x55cc16]&&_0x7976e7[_0x55cc16]['isRemoved'];)_0x55cc16++;_0x1be49c(_0x1f8a9e,_0x13168e,_0x47ccb5),_0x1be49c(_0x7976e7,_0x4ff8cc,_0x55cc16);const _0x310078=_0x7976e7['slice'](_0x4ff8cc,_0x55cc16)['concat'](_0x1f8a9e['slice'](_0x13168e,_0x47ccb5));return _0x310078['sort']((_0xd34963,_0x409163)=>_0xd34963['side']!=_0x409163['side']?_0xd34963['side']-_0x409163['side']:_0xd34963['level']!=_0x409163['level']?_0xd34963['level']-_0x409163['level']:_0xd34963['distance']!=_0x409163['distance']?_0x409163['distance']-_0xd34963['distance']:!!_0xd34963['isAdded']!=!!_0x409163['isAdded']?-0x1==_0xd34963['side']||0x0==_0xd34963['side']?_0xd34963['isAdded']?-0x1:0x1:_0xd34963['isAdded']?0x1:-0x1:_0xd34963['index']-_0x409163['index']),{'commonTape':_0x310078,'iEnd':_0x47ccb5,'jEnd':_0x55cc16};function _0x1be49c(_0x74d020,_0x1685c0,_0x55e688){let _0x1c4c5a=-0x1,_0x581eb5=Number['POSITIVE_INFINITY'],_0x47996b=!0x0;for(let _0x36887e=_0x1685c0;_0x36887e<_0x55e688;_0x36887e++)if(_0x57c86e['isInline'](_0x74d020[_0x36887e]['item'])||(_0x47996b=!0x1),_0x74d020[_0x36887e]['item']['startIndex']<_0x1685c0&&(_0x1c4c5a=_0x36887e),_0x74d020[_0x36887e]['item']['endIndex']>=_0x55e688){_0x581eb5=_0x36887e;break;}_0x47996b&&(_0x1c4c5a=_0x55e688-0x1);for(let _0x8170b6=_0x1685c0;_0x8170b6<_0x55e688;_0x8170b6++)_0x74d020[_0x8170b6]['side']=_0x8170b6<=_0x1c4c5a?-0x1:_0x8170b6<_0x581eb5?0x0:0x1,_0x74d020[_0x8170b6]['index']=_0x8170b6;let _0x2c30da=0x0;for(let _0x237b12=_0x1685c0;_0x237b12<=_0x1c4c5a;_0x237b12++)0x0==_0x74d020[_0x237b12]['distance']?_0x74d020[_0x237b12]['level']=_0x2c30da:(_0x2c30da++,_0x74d020[_0x237b12]['level']=_0x2c30da,_0x2c30da++);for(let _0x324735=_0x1685c0;_0x324735<_0x55e688;_0x324735++)0x0==_0x74d020[_0x324735]['side']&&(_0x74d020[_0x324735]['level']=_0x2c30da);_0x2c30da=0x0;for(let _0x5044c8=_0x55e688-0x1;_0x5044c8>=_0x581eb5;_0x5044c8--)0x0==_0x74d020[_0x5044c8]['distance']?_0x74d020[_0x5044c8]['level']=_0x2c30da:(_0x2c30da--,_0x74d020[_0x5044c8]['level']=_0x2c30da,_0x2c30da--);}}['_fixObsoleteTags'](_0x4f6403){const _0x5b7942=new Map(),_0x1ed4f2=this['editor']['model']['schema'];for(let _0x9e08ed=0x1;_0x9e08ed<_0x4f6403['length'];_0x9e08ed++){let _0x5950ea,_0x47f1f4,_0x1f3993;const _0x315467=_0x4f6403[_0x9e08ed],_0x1c8c69=_0x4f6403[_0x9e08ed-0x1];if('text'==_0x315467['type'])continue;if(_0x315467['type']!=_0x1c8c69['type'])continue;if(!_0x1ed4f2['isBlock'](_0x1c8c69['item'])||_0x1ed4f2['isLimit'](_0x1c8c69['item']))continue;if(!_0x1ed4f2['isBlock'](_0x315467['item'])||_0x1ed4f2['isLimit'](_0x315467['item']))continue;if((_0x4f6403[_0x9e08ed]['isAdded']||_0x4f6403[_0x9e08ed]['isAddSuggestion'])&&_0x4f6403[_0x9e08ed-0x1]['isRemoved'])_0x5950ea=_0x4f6403[_0x9e08ed],_0x47f1f4=_0x4f6403[_0x9e08ed-0x1],_0x1f3993=_0x9e08ed-0x1;else{if(!_0x4f6403[_0x9e08ed]['isRemoved']||!_0x4f6403[_0x9e08ed-0x1]['isAdded']&&!_0x4f6403[_0x9e08ed-0x1]['isAddSuggestion'])continue;_0x5950ea=_0x4f6403[_0x9e08ed-0x1],_0x47f1f4=_0x4f6403[_0x9e08ed],_0x1f3993=_0x9e08ed;}const _0x139837=_0x5950ea['level']==_0x47f1f4['level'],_0x866c27=Math['abs'](_0x5950ea['level'])<Math['abs'](_0x47f1f4['level'])&&0x0==_0x47f1f4['distance'];(_0x139837||_0x866c27)&&(_0x5b7942['set'](_0x47f1f4['id'],_0x5950ea['id']),_0x4f6403['splice'](_0x1f3993,0x1),_0x9e08ed--,_0x5950ea['isAdded']=!0x1);}for(let _0x45f2c2=0x0;_0x45f2c2<_0x4f6403['length'];_0x45f2c2++)_0x5b7942['has'](_0x4f6403[_0x45f2c2]['pairId'])&&(_0x4f6403[_0x45f2c2]['pairId']=_0x5b7942['get'](_0x4f6403[_0x45f2c2]['pairId']));}['_removeMissingPairs'](_0x53c073){const _0x4d08e8=new Set(_0x53c073['map'](_0x4272a6=>_0x4272a6['id']));for(let _0x28e419=0x0;_0x28e419<_0x53c073['length'];_0x28e419++)_0x4d08e8['has'](_0x53c073[_0x28e419]['pairId'])||0x0==_0x53c073[_0x28e419]['distance']||(_0x53c073[_0x28e419]['isIncorrect']=!0x0);return _0x53c073['filter'](_0x53bd20=>!_0x53bd20['isIncorrect']);}['_markMismatchedRemovedTags'](_0x333c59){const _0x2101c8=new Set();for(let _0x50084e=0x0;_0x50084e<_0x333c59['length'];_0x50084e++){if(_0x2101c8['has'](_0x333c59[_0x50084e]['id'])&&_0x333c59[_0x50084e]['isRemoved']&&(_0x333c59[_0x50084e]['isIncorrect']=!0x0),_0x333c59[_0x50084e]['isIncorrect'])continue;if(0x0==_0x333c59[_0x50084e]['distance'])continue;if('elementStart'!=_0x333c59[_0x50084e]['type'])continue;if(null==_0x333c59[_0x50084e]['pairId'])continue;let _0xb6409f=_0x50084e+0x1,_0x4152f5=0x0;for(;_0x333c59[_0xb6409f]['id']!=_0x333c59[_0x50084e]['pairId'];)'elementStart'==_0x333c59[_0xb6409f]['type']?_0x4152f5++:'elementEnd'==_0x333c59[_0xb6409f]['type']&&_0x4152f5--,_0xb6409f++;if(0x0!=_0x4152f5){if(_0x333c59[_0x50084e]['isRemoved'])_0x333c59[_0x50084e]['isIncorrect']=!0x0;else{for(;_0xb6409f!=_0x50084e;)_0x333c59[_0xb6409f]['isRemoved']&&0x0!=_0x333c59[_0xb6409f]['distance']&&(_0x333c59[_0xb6409f]['isIncorrect']=!0x0,_0x2101c8['add'](_0x333c59[_0xb6409f]['pairId'])),_0xb6409f--;}}}return _0x333c59['filter'](_0x32bcfe=>!_0x32bcfe['isIncorrect']);}['_removeUnsupportedChanges'](_0x122df2){const _0x19e6d5=this['editor']['model']['schema'];for(let _0x58ce7c=0x0;_0x58ce7c<_0x122df2['length'];_0x58ce7c++){if(!(_0x122df2[_0x58ce7c]['isAdded']||_0x122df2[_0x58ce7c]['isAddSuggestion']||_0x122df2[_0x58ce7c]['isRemoved']||_0x122df2[_0x58ce7c]['isRemoveSuggestion']))continue;if(0x0==_0x122df2[_0x58ce7c]['distance'])continue;const _0x54b722=_0x122df2[_0x58ce7c]['item'];_0x19e6d5['isBlock'](_0x54b722)||_0x19e6d5['isLimit'](_0x54b722)||(_0x122df2[_0x58ce7c]['isAdded']&&delete _0x122df2[_0x58ce7c]['isAdded'],_0x122df2[_0x58ce7c]['isAddSuggestion']&&delete _0x122df2[_0x58ce7c]['isAddSuggestion'],_0x122df2[_0x58ce7c]['isRemoveSuggestion']&&delete _0x122df2[_0x58ce7c]['isRemoveSuggestion'],_0x122df2[_0x58ce7c]['isRemoved']&&(_0x122df2[_0x58ce7c]['isIncorrect']=!0x0));}return _0x122df2['filter'](_0x41fb25=>!_0x41fb25['isIncorrect']);}['_makeModelFromTape'](_0xd79e99,_0x478dc3,_0x1005ab){const _0x449f1a=new _0x265c7b(),_0x55bd8d=[],_0x25682d=new Map(),_0x56fe44=this['editor']['model'],_0x3f4297=_0x56fe44['schema'],_0x152abc=[_0x449f1a],_0x3920fe={},_0x2c6b5f={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x54d852=null;const _0x46182b=[0x0];for(let _0x47457b=0x0;_0x47457b<_0xd79e99['length'];_0x47457b++)if('elementStart'===_0xd79e99[_0x47457b]['type']){_0xd79e99[_0x47457b]['previousPosition']=_0x56fe44['createPositionFromPath'](_0x449f1a,_0x46182b);const _0x515386=new _0x30b597(_0xd79e99[_0x47457b]['item']['name'],_0xd79e99[_0x47457b]['item']['getAttributes']());_0x152abc[0x0]['_appendChild'](_0x515386),_0x46182b['push'](0x0),_0x152abc['unshift'](_0x515386),_0xd79e99[_0x47457b]['nextPosition']=_0x56fe44['createPositionFromPath'](_0x449f1a,_0x46182b);}else'elementEnd'===_0xd79e99[_0x47457b]['type']?(_0x152abc['shift'](),_0xd79e99[_0x47457b]['previousPosition']=_0x56fe44['createPositionFromPath'](_0x449f1a,_0x46182b),_0x46182b['pop'](),_0x46182b[_0x46182b['length']-0x1]++,_0xd79e99[_0x47457b]['nextPosition']=_0x56fe44['createPositionFromPath'](_0x449f1a,_0x46182b)):(_0xd79e99[_0x47457b]['previousPosition']=_0x56fe44['createPositionFromPath'](_0x449f1a,_0x46182b),_0x54d852?_0x54d852['_data']+=_0xd79e99[_0x47457b]['item']['data']:_0x54d852=new _0x5dbf5e(_0xd79e99[_0x47457b]['item']['data'],_0xd79e99[_0x47457b]['item']['getAttributes']()),_0xd79e99[_0x47457b+0x1]&&'text'===_0xd79e99[_0x47457b+0x1]['type']&&_0x50fa53(_0x54d852,_0xd79e99[_0x47457b+0x1]['item'])||(_0x152abc[0x0]['_appendChild'](_0x54d852),_0x54d852=null),_0x46182b[_0x46182b['length']-0x1]+=_0xd79e99[_0x47457b]['item']['offsetSize'],_0xd79e99[_0x47457b]['nextPosition']=_0x56fe44['createPositionFromPath'](_0x449f1a,_0x46182b));for(let _0xffc714=0x0;_0xffc714<_0xd79e99['length'];_0xffc714++){const _0x3df703=_0xd79e99[_0xffc714]['previousPosition'],_0x306ba0=_0xd79e99[_0xffc714]['nextPosition'];for(const _0x5ed40a of _0xd79e99[_0xffc714]['markersStart'])_0x25682d['set'](_0x5ed40a,{'start':_0x3df703,'end':null});_0x33470b('isRemoveSuggestion',_0xffc714,_0x3df703,_0x306ba0),_0x33470b('isAddSuggestion',_0xffc714,_0x3df703,_0x306ba0),_0x33470b('isRemoved',_0xffc714,_0x3df703,_0x306ba0),_0x33470b('isAdded',_0xffc714,_0x3df703,_0x306ba0);for(const _0x1ba24c of _0xd79e99[_0xffc714]['markersEnd']){const _0x8d7240=_0x25682d['get'](_0x1ba24c);_0x8d7240?_0x8d7240['end']=_0x306ba0:_0x25682d['set'](_0x1ba24c,{'start':_0x306ba0,'end':_0x306ba0});}}for(const [_0x5cd8ce,_0x5ec54e]of _0x25682d){const _0x3c6954=this['editor']['model']['createRange'](_0x5ec54e['start'],_0x5ec54e['end']);_0x449f1a['markers']['set'](_0x5cd8ce,_0x3c6954);}return _0x55bd8d['sort']((_0x5cade1,_0x2280e4)=>{const _0x2467f4=_0x449f1a['markers']['get']('revision:'+_0x5cade1['id']),_0x4a9588=_0x449f1a['markers']['get']('revision:'+_0x2280e4['id']);return _0x2467f4['start']['isBefore'](_0x4a9588['start'])?-0x1:_0x2467f4['start']['isAfter'](_0x4a9588['start'])?0x1:_0x2467f4['end']['isBefore'](_0x4a9588['end'])?-0x1:_0x2467f4['end']['isAfter'](_0x4a9588['end'])?0x1:'add'===_0x5cade1['type']?-0x1:0x1;}),{'root':_0x449f1a,'changes':_0x55bd8d};function _0x33470b(_0x588b07,_0x2a6589,_0x4f4504,_0x27d0a8){const _0x1aca61=!!_0xd79e99[_0x2a6589][_0x588b07],_0x309a91=_0x1aca61?_0xd79e99[_0x2a6589][_0x588b07]['userId']:null,_0x34fe39=_0x2a6589===_0xd79e99['length']-0x1,_0x1c9466=_0x2c6b5f[_0x588b07][0x0],_0x5649a8=_0x3f4297['isObject'](_0xd79e99[_0x2a6589]['item']);!_0x3920fe[_0x588b07]&&_0x1aca61?_0x3920fe[_0x588b07]={'start':_0x4f4504,'tapeItem':_0xd79e99[_0x2a6589],'userId':_0x309a91,'type':_0x588b07}:_0x3920fe[_0x588b07]&&!_0x1aca61?(_0x3920fe[_0x588b07]['end']=_0x4f4504,_0x3e0946(_0x3920fe[_0x588b07]),_0x3920fe[_0x588b07]=null):_0x3920fe[_0x588b07]&&_0x1aca61&&_0x3920fe[_0x588b07]['userId']!==_0x309a91&&(_0x3920fe[_0x588b07]['end']=_0x4f4504,_0x1c9466&&_0x1c9466['userId']===_0x3920fe[_0x588b07]['userId']||_0x3e0946(_0x3920fe[_0x588b07]),_0x3920fe[_0x588b07]={'start':_0x4f4504,'tapeItem':_0xd79e99[_0x2a6589],'userId':_0x309a91,'type':_0x588b07}),_0x3920fe[_0x588b07]&&_0x5649a8&&('elementStart'!==_0xd79e99[_0x2a6589]['type']||_0x1c9466&&_0x1c9466['userId']===_0x309a91||_0x2c6b5f[_0x588b07]['unshift']({'userId':_0x309a91,'object':_0xd79e99[_0x2a6589]['item'],'change':_0x3920fe[_0x588b07]}),'elementEnd'===_0xd79e99[_0x2a6589]['type']&&_0x1c9466&&_0x1c9466['object']===_0xd79e99[_0x2a6589]['item']&&(_0x2c6b5f[_0x588b07]['shift'](),_0x3920fe[_0x588b07]=_0x1c9466['change'])),_0x3920fe[_0x588b07]&&_0x34fe39&&(_0x3920fe[_0x588b07]['end']=_0x27d0a8,_0x3e0946(_0x3920fe[_0x588b07]),_0x3920fe[_0x588b07]=null);}function _0x3e0946({start:_0x245298,end:_0x16a3a6,tapeItem:_0x550c8,userId:_0x352fbc,type:_0x30fa0c}){const _0x36ea9d=_0x550c8['item'],_0x31ad91=_0x56fe44['schema']['isBlock'](_0x36ea9d)&&!_0x56fe44['schema']['isLimit'](_0x36ea9d),_0x619dba=_0x245298['nodeAfter']==_0x16a3a6['parent']&&_0x16a3a6['isAtStart'];if(_0x31ad91&&_0x619dba)return;const _0x31cefd=_0x56fe44['createRange'](_0x245298,_0x16a3a6),_0x1779af=_0x478dc3['get'](_0x352fbc),_0x4b8064=new G({'author':_0x1779af,'type':'isAdded'==_0x30fa0c||'isAddSuggestion'==_0x30fa0c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x30fa0c||'isRemoveSuggestion'==_0x30fa0c},'createdAt':new Date(),'rootName':_0x1005ab});_0x55bd8d['push'](_0x4b8064),_0x449f1a['markers']['set']('revision:'+_0x4b8064['id'],_0x31cefd);}function _0x50fa53(_0xb240c9,_0x349722){const _0x24c8d7=_0xb240c9['getAttributes'](),_0x55eda6=_0x349722['getAttributes']();for(const _0x8e0aa8 of _0x24c8d7){if(_0x8e0aa8[0x1]!==_0x349722['getAttribute'](_0x8e0aa8[0x0]))return!0x1;_0x55eda6['next']();}return _0x55eda6['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x18781d=>{const _0x329d91=_0x18781d['markerName']['split'](':')[0x1],_0x3426d2=this['_getChangeFromId'](_0x329d91);if(!_0x3426d2)return null;const _0x5852be='add'==_0x3426d2['type']?'insertion':'deletion',_0x3b7788=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5852be];return _0x3426d2['data']['isSuggestion']&&_0x3b7788['push']('ck-suggestion-marker-'+_0x5852be+'-new'),this['activeChange']==_0x3426d2&&_0x3b7788['push']('ck-suggestion-marker--active'),{'classes':_0x3b7788,'attributes':{'data-change-id':_0x329d91}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5c47b6=>{_0x5c47b6['on']('element:pre',(_0x316c60,_0x3c69c2,_0x1f2e6f)=>{const _0x5008dc=_0x3c69c2['viewItem']['getChild'](0x0);if(!_0x5008dc||!_0x5008dc['is']('element','code'))return;if(!_0x1f2e6f['consumable']['consume'](_0x5008dc,{'attributes':['vid_start','vid_end']}))return;const _0x5c55a7=_0x3c69c2['modelRange']['start']['nodeAfter'];_0x1f2e6f['writer']['setAttribute']('vid_start',_0x5008dc['getAttribute']('vid_start'),_0x5c55a7),_0x1f2e6f['writer']['setAttribute']('vid_end',_0x5008dc['getAttribute']('vid_end'),_0x5c55a7);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x5f2b33=>{_0x5f2b33['on']('element',(_0x5e7f81,_0x5aefd5,_0x43a6af)=>{if(!_0x43a6af['consumable']['consume'](_0x5aefd5['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5aefd5['modelRange']['isCollapsed'])return;const _0x14a55c=_0x5aefd5['modelRange']['start']['nodeAfter'];_0x14a55c['hasAttribute']('vid_start')||_0x14a55c['hasAttribute']('vid')||(_0x43a6af['writer']['setAttribute']('vid_start',_0x5aefd5['viewItem']['getAttribute']('vid_start'),_0x14a55c),_0x43a6af['writer']['setAttribute']('vid_end',_0x5aefd5['viewItem']['getAttribute']('vid_end'),_0x14a55c));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xdc3295=>_0xdc3295['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x42a689,[,_0x279839])=>{['vid_start','vid_end','vid']['includes'](_0x279839)&&(_0x42a689['return']=!0x0,_0x42a689['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x855e9e=>{_0x855e9e['on']('attribute:vid',(_0x1dcf24,_0x3cca4a,_0x2e3c71)=>{if('\x20'!=_0x3cca4a['item']['data']||_0x3cca4a['item']['parent']['maxOffset']>0x1)return;if(!_0x2e3c71['consumable']['consume'](_0x3cca4a['item'],_0x1dcf24['name']))return;const _0x2054ac=_0x2e3c71['writer'],_0x280615=_0x2e3c71['mapper']['toViewRange'](_0x3cca4a['range']);_0x2054ac['wrap'](_0x280615,_0x2054ac['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3f60ce){const _0x7359cd=_0x3f60ce['plugins']['get']('RevisionViewer');return(_0x13703c,_0x16e455,_0x2ba482)=>{const _0x589d30=_0x16e455['markerName']['split'](':')[0x1],_0x2fde7b=_0x7359cd['_getChangeFromId'](_0x589d30);if(!_0x2fde7b)return null;const _0x43fe54='add'==_0x2fde7b['type']?'split':'merge';if(!_0x2ba482['consumable']['test'](_0x16e455['markerRange'],_0x13703c['name']))return;const _0x5c3923=_0x16e455['markerRange']['getWalker'](),_0x1ba2fe=_0x16e455['markerRange']['start'],_0xcdb17c=_0x3f60ce['model']['schema'];let _0x193efc=null,_0x347ef3=null,_0x275324=!0x1,_0x785e1b=!0x1;for(const _0x3e7f8a of _0x5c3923){const _0x368d83=_0x3e7f8a['item'];_0x275324=_0x275324||_0xcdb17c['isContent'](_0x368d83);const _0x4e577c=_0x2ba482['mapper']['toViewElement'](_0x368d83);if(_0x4e577c&&_0x4e577c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3e7f8a['type']&&(_0xcdb17c['isBlock'](_0x368d83)&&!_0xcdb17c['isLimit'](_0x368d83)&&(_0x368d83['nextSibling']||_0x1ba2fe['isAtEnd']?_0x193efc&&_0x193efc['parent']==_0x368d83||(_0x193efc=_0x368d83,_0x28254d(_0x3e7f8a['previousPosition']),_0x785e1b=!0x0):_0x347ef3=_0x347ef3||_0x3e7f8a['previousPosition']));}function _0x28254d(_0x2db8b8){const _0x30ee2f=_0x2ba482['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x43fe54}),_0x5e3380=_0x2ba482['mapper']['toViewPosition'](_0x2db8b8);_0x2fde7b['data']['isSuggestion']&&_0x2ba482['writer']['addClass']('ck-suggestion-marker-'+_0x43fe54+'-new',_0x30ee2f),_0x7359cd['activeChange']==_0x2fde7b&&_0x2ba482['writer']['addClass']('ck-suggestion-marker--active',_0x30ee2f),_0x2ba482['writer']['insert'](_0x5e3380,_0x30ee2f),_0x2ba482['mapper']['bindElementToMarker'](_0x30ee2f,_0x16e455['markerName']);}_0x275324||_0x785e1b||!_0x347ef3||_0x28254d(_0x347ef3);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x54b047,_0x2faf73,_0x21a4bd)=>{const _0x2595cd=_0x21a4bd['mapper']['markerNameToElements'](_0x2faf73['markerName']);if(_0x2595cd){for(const _0x16cff2 of _0x2595cd)(_0x16cff2['hasClass']('ck-suggestion-marker-split')||_0x16cff2['hasClass']('ck-suggestion-marker-merge'))&&(_0x21a4bd['mapper']['unbindElementFromMarkerName'](_0x16cff2,_0x2faf73['markerName']),_0x21a4bd['writer']['remove'](_0x16cff2));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x476b45,_0x57437a,_0x34a10d)=>{const _0x47a8fd=_0x57437a['markerName']['split'](':')[0x1],_0x37961f=this['_getChangeFromId'](_0x47a8fd);if(!_0x37961f)return null;const _0x446cc4='add'==_0x37961f['type']?'split':'merge';if(_0x34a10d['consumable']['test'](_0x57437a['markerRange'],_0x476b45['name']))for(const _0x5af0fb of _0x57437a['markerRange']['getItems']()){if(!_0x5af0fb['is']('element','softBreak'))continue;const _0xf586b4=_0x34a10d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x446cc4}),_0xc3ab8c=_0x34a10d['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5af0fb));_0x37961f['data']['isSuggestion']&&_0x34a10d['writer']['addClass']('ck-suggestion-marker-'+_0x446cc4+'-new',_0xf586b4),this['activeChange']==_0x37961f&&_0x34a10d['writer']['addClass']('ck-suggestion-marker--active',_0xf586b4),_0x34a10d['writer']['insert'](_0xc3ab8c,_0xf586b4),_0x34a10d['mapper']['bindElementToMarker'](_0xf586b4,_0x57437a['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x55612d=>{for(const _0x4f6856 of this['editor']['model']['document']['getRootNames']()){const _0x3e626e=this['editor']['model']['document']['getRoot'](_0x4f6856),_0x116188=this['editor']['editing']['view']['document']['getRoot'](_0x4f6856);if(_0x116188){const _0x4c403c=_0x3e626e['getAttribute']('revisionHistoryAttachChange');if(_0x55612d['removeAttribute']('data-change-id',_0x116188),_0x55612d['removeClass']('ck-revision-history-root-add',_0x116188),_0x55612d['removeClass']('ck-revision-history-root-remove',_0x116188),_0x55612d['removeClass']('ck-revision-history-root--active',_0x116188),_0x4c403c){const _0x434674=this['_getChangeFromId'](_0x4c403c);if(!_0x434674)return null;_0x55612d['setAttribute']('data-change-id',_0x4c403c,_0x116188),_0x55612d['addClass']('ck-revision-history-root-'+_0x434674['type'],_0x116188),this['activeChange']==_0x434674&&_0x55612d['addClass']('ck-revision-history-root--active',_0x116188);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2e82d0=>'revision-comment:'+_0x2e82d0,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x53c4cd=>'revision-suggestion:'+_0x53c4cd,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2c58c0=>({'name':'suggestion:'+_0x2c58c0,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3c84f9=>{const _0xd7bca2=_0x3c84f9['markerName']['split'](':')[0x1];return'insertion'!=_0xd7bca2&&'deletion'!=_0xd7bca2?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0xd7bca2]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x6e6bda,_0x42759a,_0x15df81)=>{const _0x4f3fd8=_0x15df81['mapper']['markerNameToElements'](_0x42759a['markerName']);if(_0x4f3fd8){for(const _0x32ae8a of _0x4f3fd8)_0x32ae8a['is']('uiElement')&&(_0x15df81['mapper']['unbindElementFromMarkerName'](_0x32ae8a,_0x42759a['markerName']),_0x15df81['writer']['remove'](_0x32ae8a));}},{'priority':'high'});}['_getChangeFromId'](_0x4f181c){return this['_changeIdToChange']['get'](_0x4f181c);}['_getViewForChange'](_0xbf8f1c){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0xbf8f1c),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x54e070,_0x3be1c1,_0x27d438,_0x3d1121)=>{_0x3d1121&&this['_balloon']['remove'](_0x3d1121),_0x27d438&&(this['_balloon']['add']({'view':_0x27d438,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5074e4=this['editor']['editing'],_0x1430f2=this['_getChangeFromId'](_0x27d438['changeId']);let _0x3191e6;if(_0x1430f2['data']['isOnRoot']){const _0x9dfb79=_0x5074e4['view']['getDomRoot'](_0x1430f2['rootName']);_0x3191e6=Array['from'](_0x9dfb79['getClientRects']());}else{const _0x24ec07=this['editor']['model']['markers']['get']('revision:'+_0x27d438['changeId']);_0x3191e6=Array['from'](_0x5074e4['mapper']['markerNameToElements'](_0x24ec07['name']))['map'](_0x404a48=>_0x5074e4['view']['domConverter']['mapViewToDom'](_0x404a48))['map'](_0x5996bc=>Array['from'](_0x5996bc['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x3191e6[0x0];return _0x3191e6['find'](_0x1b13af=>_0x1b13af['top']-0x3<=this['_activeViewTarget']['y']&&_0x1b13af['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1b13af['left']-0x3<=this['_activeViewTarget']['x']&&_0x1b13af['right']+0x3>=this['_activeViewTarget']['x'])||_0x3191e6[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x42a619,_0x19fcb1,_0x55001a,_0x330bfc)=>{this['activeView']=_0x55001a?this['_getViewForChange'](_0x55001a):null,this['editor']['model']['change'](()=>{const _0x408a62=this['editor']['editing'];_0x330bfc&&(_0x330bfc['data']['isOnRoot']?_0x408a62['view']['change'](_0x47185f=>{_0x47185f['removeClass']('ck-revision-history-root--active',_0x408a62['view']['document']['getRoot'](_0x330bfc['rootName']));}):_0x408a62['reconvertMarker']('revision:'+_0x330bfc['id'])),_0x55001a&&(_0x55001a['data']['isOnRoot']?_0x408a62['view']['change'](_0x2c1b5e=>{_0x2c1b5e['addClass']('ck-revision-history-root--active',_0x408a62['view']['document']['getRoot'](_0x55001a['rootName']));}):_0x408a62['reconvertMarker']('revision:'+_0x55001a['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4d6363,_0x37cd63)=>{if(this['activeChange'])return;const _0x455833=this['_findChangeIdFromDomTarget'](_0x37cd63['target']),_0x54f381=this['_changeIdToChange']['get'](_0x455833);_0x54f381?(this['_activeViewTarget']={'x':_0x37cd63['domEvent']['x'],'y':_0x37cd63['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x54f381)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x47e9b8,_0x1f7e25)=>{const _0x115cc9=this['_findChangeIdFromDomTarget'](_0x1f7e25['target']),_0x505bc4=this['_changeIdToChange']['get'](_0x115cc9);_0x505bc4?(this['_activeViewTarget']={'x':_0x1f7e25['domEvent']['x'],'y':_0x1f7e25['domEvent']['y']},_0x505bc4===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x505bc4):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3a2d85){do{const _0x211305=_0x3a2d85['getAttribute']('data-change-id');if(_0x211305)return _0x211305;_0x3a2d85=_0x3a2d85['parent'];}while(_0x3a2d85);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1b7c92=>{for(const _0x152229 of this['editor']['model']['markers'])_0x1b7c92['removeMarker'](_0x152229);});}}function Q(_0x2735d8,_0x31ed0a){return(_0x3aa588,_0x25d13d,_0x4c3966)=>{if(!_0x4c3966['consumable']['test'](_0x25d13d['markerRange'],_0x3aa588['name']))return;const _0x341cc5=_0x25d13d['markerRange']['getWalker'](),_0x4f93cc=_0x25d13d['markerRange']['start'],_0x466e83=_0x2735d8['model']['schema'];let _0xeb6389=null,_0x31a7e2=null,_0x5f00ee=!0x1,_0x4d36f3=!0x1;for(const _0x56aa43 of _0x341cc5){const _0x12213b=_0x56aa43['item'];_0x5f00ee=_0x5f00ee||_0x466e83['isContent'](_0x12213b);const _0x402c75=_0x4c3966['mapper']['toViewElement'](_0x12213b);if(_0x402c75&&_0x402c75['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x56aa43['type']&&(_0x466e83['isBlock'](_0x12213b)&&!_0x466e83['isLimit'](_0x12213b)&&(_0x12213b['nextSibling']||_0x4f93cc['isAtEnd']?_0xeb6389&&_0xeb6389['parent']==_0x12213b||(_0xeb6389=_0x12213b,_0x59790a(_0x56aa43['previousPosition']),_0x4d36f3=!0x0):_0x31a7e2=_0x31a7e2||_0x56aa43['previousPosition']));}function _0x59790a(_0x3cd6d4){const _0x363caa=_0x4c3966['mapper']['toViewPosition'](_0x3cd6d4),_0x3b4a72=_0x4c3966['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x31ed0a});_0x4c3966['writer']['insert'](_0x363caa,_0x3b4a72),_0x4c3966['mapper']['bindElementToMarker'](_0x3b4a72,_0x25d13d['markerName']);}_0x5f00ee||_0x4d36f3||!_0x31a7e2||_0x59790a(_0x31a7e2);};}class nt extends _0x260634{constructor(_0x3cdc8e){super(_0x3cdc8e);const _0x10e53b=_0x3cdc8e['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x10e53b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x10e53b,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0xf02ba2=this['editor'],_0x562358=_0xf02ba2['plugins']['get'](l),_0x1740a1=_0x562358['isReady']?_0x562358['diff']['newRevisionId']:null;_0xf02ba2['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1740a1);}['refresh'](){const {isReady:_0x2bb640,isEnabled:_0x37ecf4,repository:_0x11a32,diff:_0x6e44de}=this['editor']['plugins']['get'](l),_0xedb4aa=_0x6e44de&&_0x11a32['getLaterVisibleRevision'](_0x6e44de['newRevisionId']);this['isEnabled']=_0x2bb640&&_0x37ecf4&&Boolean(_0xedb4aa);}}class rt extends _0x260634{['_step'];constructor(_0x17f749,{direction:_0x32e7d9}){super(_0x17f749);const _0x39239a=_0x17f749['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x32e7d9?0x1:-0x1,this['listenTo'](_0x39239a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x39239a,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x39239a,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x35f831=this['editor'],_0x34b0ab=_0x35f831['plugins']['get'](l),{isNavigationMode:_0xbb2528,currentChangeNumber:_0x15901b}=_0x34b0ab;let _0x21a781;if(_0x34b0ab['activeChange']=_0xbb2528?_0x34b0ab['diff']['changes']['get'](_0x15901b+this['_step']):_0x34b0ab['diff']['changes']['first'],_0x34b0ab['activeChange']['data']['isOnRoot'])_0x21a781=_0x35f831['editing']['view']['getDomRoot'](_0x34b0ab['activeChange']['rootName']);else{const _0x592330=_0x35f831['model']['markers']['get']('revision:'+_0x34b0ab['activeChange']['id']);_0x21a781=_0x30b37d(_0x35f831['editing'],_0x592330);}_0x1908f6({'target':_0x21a781,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x441ee8,currentChangeNumber:_0x56521d,numberOfChanges:_0x517480,isReady:_0x2306f7,isEnabled:_0x1fc96d}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x1fc96d&&_0x2306f7&&_0x517480)&&(!_0x441ee8||(0x1===this['_step']?_0x56521d<_0x517480-0x1:_0x56521d>0x0));}}class Ri extends _0xb6dc9{constructor(_0x5d487d){super(_0x5d487d);const _0x4c19b7=this['bindTemplate'],_0x418d8b=new _0x2f26c0(_0x5d487d),_0x467a79=new _0x2f26c0(_0x5d487d);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',(_0xbc2f43,_0x26b566)=>_0xbc2f43&&_0x26b566>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3944d8,_0x496c28,_0x538c98,_0x28d097)=>{if(!_0x3944d8)return R(_0x5d487d,'Loading...');if(!_0x538c98)return R(_0x5d487d,'No\x20changes');const _0x56dc3d=R(_0x5d487d,'NUMBER_OF_CHANGES',_0x538c98);return _0x28d097?R(_0x5d487d,'X_OF_Y_CHANGES',[_0x496c28+0x1,_0x538c98]):_0x56dc3d;}),_0x418d8b['set']({'label':R(_0x5d487d,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x4c764d}),_0x467a79['set']({'label':R(_0x5d487d,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x13ad89}),_0x418d8b['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x467a79['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x418d8b['on']('execute',()=>this['fire']('execute','backward')),_0x467a79['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',_0x4c19b7['if']('_isStatusLabelVisible','ck-hidden',_0x4d9e3d=>!_0x4d9e3d)]},'children':[{'text':_0x4c19b7['to']('isNavigationMode',_0x37f748=>_0x37f748?R(_0x5d487d,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x5d487d,'Total')+':\x20')}]},{'text':_0x4c19b7['to']('_statusText')}]},new _0x1b6702(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x418d8b,_0x467a79]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x307a2f{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1adeb1=this['editor']['editing']['view'];_0x1adeb1['change'](_0xd751f2=>{for(const _0x8529c7 of _0x1adeb1['document']['roots'])_0xd751f2['addClass'](ge,_0x8529c7);});}['hide'](){const _0x20ead2=this['editor']['editing']['view'];_0x20ead2['change'](_0x5eae9b=>{for(const _0x4b65dc of _0x20ead2['document']['roots'])_0x5eae9b['removeClass'](ge,_0x4b65dc);});}}class u extends _0x307a2f{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,ji];}['init'](){const _0x4cbcde=this['editor'],_0x439337=_0x4cbcde['plugins']['get'](l),_0x46b864=_0x4cbcde['plugins']['get'](ji);_0x4cbcde['ui']['componentFactory']['add']('exitToEditing',_0x3f714a=>{const _0x589d47=new _0x2f26c0(_0x3f714a);return _0x589d47['set']({'label':R(_0x3f714a,'Back\x20to\x20editing'),'icon':_0x2e683e,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x589d47,'execute',()=>{_0x4cbcde['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x589d47;}),_0x4cbcde['ui']['componentFactory']['add']('restoreRevision',_0xc75977=>{const _0x41de9a=new _0x2f26c0(_0xc75977);return _0x41de9a['set']({'label':R(_0xc75977,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x41de9a['bind']('isEnabled')['to'](_0x4cbcde['commands']['get']('restoreRevision')),this['listenTo'](_0x41de9a,'execute',()=>_0x4cbcde['execute']('restoreRevision')),_0x41de9a;}),_0x4cbcde['ui']['componentFactory']['add']('changesNavigation',_0x307ab6=>{const _0x44b2b9=new Ri(_0x307ab6),_0x3223d5=_0x4cbcde['commands']['get']('showPreviousChange'),_0x4a40ec=_0x4cbcde['commands']['get']('showNextChange');return _0x44b2b9['bind']('isBackwardNavigationEnabled')['to'](_0x3223d5,'isEnabled'),_0x44b2b9['bind']('isForwardNavigationEnabled')['to'](_0x4a40ec,'isEnabled'),_0x44b2b9['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x439337),this['listenTo'](_0x44b2b9,'execute',(_0x491324,_0x1458fc)=>{_0x4cbcde['execute']('forward'===_0x1458fc?'showNextChange':'showPreviousChange');}),_0x44b2b9;}),_0x46b864['show'](),_0x439337['on']('change:isReady',(_0x135a32,_0x52bbc2,_0x5c33a0)=>{_0x5c33a0?_0x46b864['hide']():_0x46b864['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x13b9c6,_0xf255eb){super(_0x13b9c6,_0xf255eb);const _0x55d236=this['bindTemplate'];this['set']({'label':R(_0x13b9c6,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x13b9c6,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x55d236['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x361374=this['fieldView']['element'];this['_tooltipString']=_0x361374['scrollWidth']>_0x361374['clientWidth']&&_0x361374['value']||'';}}class ni extends _0xb6dc9{constructor(_0x1eb0fe,_0x2bd59c,_0x3df192){super(_0x1eb0fe);const _0x434315=new _0x271871();_0x434315['set']({'content':_0x555db3,'viewBox':'0\x200\x2011\x2010'});const _0x504bb6=['ck','ck-revision-history-sidebar__revision-author'];_0x3df192&&_0x504bb6['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3f60e9=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x1eb0fe,_0x3df192?'Revision\x20creator':'Revision\x20author')},'children':[_0x434315,_0x2bd59c['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x504bb6},'children':_0x3f60e9});}}function ci(_0x109b83,_0x3ddb41){const _0x29052d=_0x109b83['bindTemplate'],_0x3568bd=_0x109b83['locale'],_0x4cfc93=_0x1f4821(_0x3568bd);_0x4cfc93['panelPosition']='sw';const _0x4735c7=function(_0x124c72,_0x1c1ea8){const _0x3f0157=function(_0x43e72c,_0x278fa7){const _0x23a38c=_0x43e72c['locale'],_0x4b2ff5={'Compare\x20against\x20selected':R(_0x23a38c,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x23a38c,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x23a38c,'Restore\x20this\x20revision')};return _0x278fa7['map'](_0x3678a6=>{const _0xb24739=_0x4b2ff5[_0x3678a6['name']];return _0xb24739&&_0xb24739!==_0x3678a6['name']&&(_0x3678a6['name']=_0xb24739),_0x3678a6;});}(_0x124c72,_0x1c1ea8),_0x45d16f=new _0x48b74b();for(const _0x41f192 of _0x3f0157){const _0x1a6247={'type':'button','model':new to({'label':_0x41f192['name'],'class':_0x41f192['class'],'withText':!0x0,'role':'menuitem','_action':_0x41f192['action']})};_0x1a6247['model']['bind']('isEnabled')['to'](_0x124c72,'isActionsDropdownOpen',_0x55a57d=>'function'!=typeof _0x41f192['isEnabled']||(!_0x55a57d||_0x41f192['isEnabled'](_0x124c72))),_0x45d16f['add'](_0x1a6247);}return _0x45d16f;}(_0x109b83,_0x3ddb41);return _0x109b83['bind']('isActionsDropdownOpen')['to'](_0x4cfc93,'isOpen'),_0x4cfc93['buttonView']['set']({'label':R(_0x3568bd,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x28c6e5}),_0x4cfc93['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x29052d['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x29052d['to'](_0x20f5c5=>_0x20f5c5['stopPropagation']())}}),_0x4cfc93['on']('execute',_0x3c52cc=>{_0x109b83['isReady']&&'function'==typeof _0x3c52cc['source']['_action']&&_0x3c52cc['source']['_action'](_0x109b83);}),_0x9e41a0(_0x4cfc93,_0x4735c7,{'role':'menu'}),_0x4cfc93['listenTo'](_0x109b83,'change:isActionsDropdownOpen',(_0x3b77eb,_0x5b509c,_0x3d50cf)=>{if(_0x3d50cf)for(const _0xaf8a2a of _0x4cfc93['listView']['items']){const _0x4bbc2e=_0xaf8a2a['children']['first'],_0x314c5a=_0x3ddb41['find'](_0x2e223b=>_0x2e223b['action']===_0x4bbc2e['_action'])['isVisible'];_0xaf8a2a['isVisible']=void 0x0===_0x314c5a||_0x314c5a(_0x109b83);}}),_0x4cfc93;}class vi extends/* #__PURE__ -- @preserve */
27
+ _0x6eb108(_0xb6dc9){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x52098b,_0x44c8aa,_0xebf0b0,_0x1e14e1){super(_0x52098b);const _0x21c25d=this['bindTemplate'],_0x30b4cb=function(_0x447f61,_0x37c143){const _0x573c45=Array['from'](_0x37c143['authors'])['filter'](_0x58aff5=>_0x58aff5!=_0x37c143['creator']);return _0x37c143['creator']&&_0x573c45['unshift'](_0x37c143['creator']),_0x573c45['map'](_0x4ffe67=>new ni(_0x447f61,_0x4ffe67,_0x4ffe67==_0x37c143['creator']));}(_0x52098b,_0x44c8aa);this['id']=_0x44c8aa['id'],this['_revision']=_0x44c8aa,this['_requireRevisionName']=_0x1e14e1,this['bind']('name','createdAt')['to'](_0x44c8aa),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x44d6c3=>{return _0x54d547=_0x52098b['uiLanguage'],(_0x1326db=_0x44d6c3)['toLocaleDateString'](_0x54d547,{'month':'long','day':'numeric'})+',\x20'+_0x1326db['toLocaleTimeString'](_0x54d547,{'hour':'numeric','minute':'numeric'});var _0x54d547,_0x1326db;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x52098b,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x19303b=>_0x19303b||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x37e772,_0x2f9d7b)=>_0x37e772&&_0x2f9d7b),this['revisionActionsView']=_0xebf0b0&&_0xebf0b0['length']?ci(this,_0xebf0b0):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x21c25d['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x21c25d['if']('isEnabled','ck-disabled',_0x41aeb8=>!_0x41aeb8),_0x21c25d['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x21c25d['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x21c25d['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':_0x21c25d['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':_0x30b4cb}]},this['revisionActionsView']],'on':{'click':_0x21c25d['to'](_0x37a76f=>{_0x37a76f['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x19d68a=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x19d68a,'change',()=>{this['_requireRevisionName']&&!_0x19d68a['value']||this['fire']('setName',{'id':this['id'],'name':_0x19d68a['value']}),_0x19d68a['value']||(_0x19d68a['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(_0x34290b,_0x183194){const _0x1cbfb6=_0x3f0a40['fromJSDate'](_0x34290b)['setLocale'](_0x183194),_0x345a91=_0x3f0a40['local'](),_0x2c34f0=_0x345a91['minus']({'days':0x1})['startOf']('day');let _0x3734a1,_0x42a3d6;return _0x1cbfb6['hasSame'](_0x345a91,'day')?(_0x3734a1=_0x1cbfb6['startOf']('day')['toJSDate'](),_0x42a3d6=_0x1cbfb6['toRelativeCalendar']()):_0x1cbfb6['hasSame'](_0x2c34f0,'day')?(_0x3734a1=_0x2c34f0['toJSDate'](),_0x42a3d6=_0x1cbfb6['toRelativeCalendar']()):_0x1cbfb6['hasSame'](_0x345a91,'week')?(_0x3734a1=_0x1cbfb6['startOf']('week')['toJSDate'](),_0x42a3d6=_0x1cbfb6['weekdayLong']||''):_0x1cbfb6['hasSame'](_0x345a91,'year')?(_0x3734a1=_0x1cbfb6['startOf']('month')['toJSDate'](),_0x42a3d6=_0x1cbfb6['monthLong']||''):(_0x3734a1=_0x1cbfb6['startOf']('year')['toJSDate'](),_0x42a3d6=String(_0x1cbfb6['year'])),{'startDate':_0x3734a1,'localizedPeriodName':_0x42a3d6};}class li extends _0xb6dc9{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1d8119,_0x21a246,_0x14b8f6,_0xe63231){super(_0x1d8119);const _0x3c4e1e=mi(_0x21a246,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x21a246,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x14b8f6,this['_requireRevisionName']=_0xe63231,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':_0x3c4e1e}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x43ae7b){const _0x3cc0ef=new vi(this['locale'],_0x43ae7b,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3cc0ef);}['removeRevision'](_0x389a92){const _0x59b918=this['revisionViews']['find'](_0x43c03c=>_0x43c03c['id']===_0x389a92['id']);this['revisionViews']['remove'](_0x59b918);}}class bi extends _0xb6dc9{constructor(_0x57dbd7){super(_0x57dbd7);const _0x1be6c4=new _0x271871();_0x1be6c4['content']=_0x38f638,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1be6c4,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x57dbd7,'Revision\x20history')]}]});}}class di extends _0xb6dc9{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x820647,_0x3e6297,_0x2f4856,_0x15c9cc){super(_0x820647);const _0x141c95=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x3e6297,this['_revisionActions']=_0x2f4856,this['_requireRevisionName']=_0x15c9cc,this['on']('select',(_0x1eacf4,_0x2433c4)=>{this['fire']('revisionSelected',_0x2433c4);}),this['on']('setName',(_0x399155,_0x5070f1)=>{this['fire']('revisionSetName',_0x5070f1);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new bi(_0x820647),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x141c95['if']('isEnabled','ck-disabled',_0x6bedd2=>!_0x6bedd2)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x581d28 of this['_revisions'])this['_addRevision'](_0x581d28);this['_revisions']['on']('add',(_0x379cfa,_0x37fefc)=>{this['_addRevision'](_0x37fefc);}),this['_revisions']['on']('remove',(_0x26afcf,_0x44692f)=>{this['_removeRevision'](_0x44692f);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x5f1228=>_0x5f1228['revisionViews']['map'](_0x34d06a=>_0x34d06a))['flat']();}['selectRevision'](_0x5ef0de){for(const _0x265121 of this['revisionViews'])_0x5ef0de&&_0x5ef0de['id']===_0x265121['id']?_0x265121['select']():_0x265121['deselect']();}['highlightRevisions'](_0x4569c2){for(const _0x3543c6 of this['revisionViews'])_0x4569c2['some'](({id:_0x104ae3})=>_0x104ae3===_0x3543c6['id'])?_0x3543c6['highlight']():_0x3543c6['unhighlight']();}['_addRevision'](_0xef8ce4){const _0x1cdd4b=mi(_0xef8ce4['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x254a2f=this['timePeriodViews']['get'](0x0);_0x254a2f&&_0x254a2f['startDate']['getTime']()===_0x1cdd4b['getTime']()||(_0x254a2f=new li(this['locale'],_0x1cdd4b,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x254a2f)),_0x254a2f['addRevision'](_0xef8ce4);}['_removeRevision'](_0x437b1b){const _0x285b21=mi(_0x437b1b['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x285b21)['removeRevision'](_0x437b1b);}['_getTimePeriodViewByStartDate'](_0x26178f){return this['timePeriodViews']['find'](_0x178df1=>_0x178df1['startDate']['getTime']()===_0x26178f['getTime']());}}class f extends _0x307a2f{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0x9d87bf){super(_0x9d87bf),this['_revisionViewer']=_0x9d87bf['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x3c3bb9=this['_revisionsRepository']['_revisions'],_0x32751f=this['_createRevisionActions'](),_0x184f22=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ai(this['editor']['locale'],_0x3c3bb9,_0x32751f,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',(_0x30db3c,_0x331746)=>{_0x331746['revisionViews']['on']('add',(_0x238c70,_0x49843f)=>{_0x49843f['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)),_0x184f22['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x450469=this['_revisionsRepository']['getRevision'](0x0);if(_0x450469){const _0x4e5038=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x450469['id']);this['_revisionViewer']['compare'](_0x450469,_0x4e5038);}}['_handleRevisionSelected'](_0x2e88a4,_0x4cf486){const _0x1d880b=this['_revisionsRepository']['getRevision'](_0x4cf486['id']),_0x41e577=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1d880b['id']);this['_revisionViewer']['compare'](_0x1d880b,_0x41e577);}['_handleRevisionSetName'](_0x3b50ab,_0x590c7d){this['_revisionsRepository']['getRevision'](_0x590c7d['id'])['setName'](_0x590c7d['name']);}['_handleDiffChange'](_0x114fb0,_0x1f2f54,_0x540ed4){const _0x576cfc=this['_revisionsRepository']['getRevisionsInDiff'](_0x540ed4);_0x576cfc['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x576cfc),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x576cfc[0x0]));}['_createRevisionActions'](){const _0xe063a8=this['editor'],_0x4abc67=f['availableRevisionActions'],_0x4e19b1=_0xe063a8['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x4e19b1['length'])return _0x4e19b1['map'](_0x3546a5=>{const _0x429a59='string'==typeof _0x3546a5?Object['assign']({},_0x4abc67[_0x3546a5]):_0x3546a5;return _0x429a59['action']=_0x429a59['action']['bind'](this,_0xe063a8),_0x429a59['isVisible']&&(_0x429a59['isVisible']=_0x429a59['isVisible']['bind'](this,_0xe063a8)),_0x429a59;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x3dfe28},_0x11f2ca)=>{const _0x350de8=_0x3dfe28['get'](l),_0x21f9ab=_0x350de8['repository'];let _0x2c69b7=_0x350de8['diff']['newRevisionId'],_0x4de5b7=_0x11f2ca['id'];_0x21f9ab['getIndex'](_0x2c69b7)>_0x21f9ab['getIndex'](_0x4de5b7)&&([_0x2c69b7,_0x4de5b7]=[_0x4de5b7,_0x2c69b7]),_0x350de8['compare'](_0x2c69b7,_0x4de5b7);},'isVisible':({plugins:_0x5a6334},_0x4fe43f)=>{const _0xf6fb1f=_0x5a6334['get'](l);return!(_0xf6fb1f['repository']['getRevisionsInDiff'](_0xf6fb1f['diff'])['length']>0x2)&&!_0x4fe43f['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x42fedd,{id:_0x325ae9})=>{_0x42fedd['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x325ae9);},'isVisible':({plugins:_0x5c3a26},_0x432a32)=>!!_0x5c3a26['get'](l)['repository']['getLaterVisibleRevision'](_0x432a32['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x28aaf2},{id:_0x12a05a,revisionNameView:_0x4131d7})=>{const _0x16c63a=_0x28aaf2['get'](l),_0x3b7e33=_0x16c63a['repository']['getEarlierVisibleRevision'](_0x12a05a);_0x16c63a['compare'](_0x12a05a,_0x3b7e33),_0x4131d7['focus'](),_0x4131d7['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x5b6edd,_0x2dbd3b){super(_0x5b6edd),this['_view']=_0x2dbd3b,this['_toolbarConfig']=st(_0x5b6edd['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x43d931){const _0x2e7fdc=this['editor'],_0x42a55d=this['view'],_0x18cf2e=_0x2e7fdc['editing']['view'],_0x1c5fcc=_0x42a55d['editable'],_0x5b798c=_0x18cf2e['document']['getRoot']();_0x1c5fcc['name']=_0x5b798c['rootName'],_0x42a55d['render']();const _0x1ba3c8=_0x1c5fcc['element'];this['setEditableElement'](_0x1c5fcc['name'],_0x1ba3c8),_0x42a55d['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x18cf2e['attachDomRoot'](_0x1ba3c8),this['_elementReplacer']['replace'](_0x43d931,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1af3ee=this['view'],_0x150146=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x150146['detachDomRoot'](_0x1af3ee['editable']['name']),_0x1af3ee['destroy']();}['_initToolbar'](){const _0x52dd8f=this['view'];_0x52dd8f['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x52dd8f['stickyPanel']['limiterElement']=_0x52dd8f['element'],_0x52dd8f['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x4332d4})=>_0x4332d4),_0x52dd8f['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x52dd8f['toolbar']);}}class ii extends _0xf276e1{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x44d0ae,_0x2da33b,_0x1a0bad={}){super(_0x44d0ae),this['stickyPanel']=new _0x3cf989(_0x44d0ae),this['toolbar']=new _0x182998(_0x44d0ae,{'shouldGroupWhenFull':_0x1a0bad['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x44d0ae,_0x2da33b);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
30
- _0x161187(_0x3ce5e6){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x374334,_0x5a9c97){super(_0x5a9c97),this['sourceElement']=_0x374334,this['model']['document']['createRoot']();const _0x34b77d=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x34b77d);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4f402a,_0x41edb3){const _0x2b1a5b=new this(_0x4f402a,_0x41edb3);return await _0x2b1a5b['initPlugins'](),await _0x2b1a5b['ui']['init'](_0x4f402a),await _0x2b1a5b['data']['init'](_0x2b1a5b['config']['get']('initialData')||''),_0x2b1a5b['fire']('ready'),_0x2b1a5b;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class at extends _0x3146aa{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4257b6){function _0x32a1cf(_0x2b0000){return _0x2b0000['map'](_0x4ade3d=>String['fromCharCode'](_0x4ade3d))['join']('');}super(_0x4257b6),this['result']='end',_0x4257b6[_0x32a1cf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x32a1cf([0x76,0x69,0x65,0x77])][_0x32a1cf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x32a1cf([0x61,0x75,0x74,0x6f]),_0x4257b6[_0x32a1cf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x32a1cf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x32a1cf([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x32a1cf([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x32a1cf([0x6f,0x6b])});}}class ht extends _0x3146aa{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x1aa51a){if(super(_0x1aa51a),!this['editor']['config']['get']('revisionHistory'))throw new _0x4b9c1b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4b240e=>this['_showRevisionViewer']({..._0x4b240e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x5b9698=>this['_closeRevisionViewer'](_0x5b9698)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4b48fc=>this['_restoreRevision'](_0x4b48fc)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x5b6395){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x5b6395;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x357f37){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x357f37);}['getRevision'](_0x43e1c1){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x43e1c1);}['getRevisions'](_0x1419a7){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1419a7||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x5776eb=this['editor'],_0x255d95=_0x4a7dc8(_0x5776eb,d),_0x1468a5=_0x5776eb['plugins']['get']('RevisionTracker'),_0x3c286f=_0x5776eb['plugins']['get']('Users')['users'];return _0x255d95['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x255d95['lazyRoots'],(_0x255d95['plugins']['push'](at,l,u,class extends _0x3146aa{static get['requires'](){return[l,'Users'];}['init'](){const _0x10a095=this['editor']['plugins']['get']('Users');for(const _0xc4f1a9 of _0x3c286f)_0xc4f1a9['isAnonymous']||_0x10a095['getUser'](_0xc4f1a9['id'])||_0x10a095['addUser'](_0xc4f1a9);const _0x25a6e3=_0x1468a5['repository']['getRevisions']();let _0x40b98f=null;const _0x5075bf=this['editor']['plugins']['get']('RevisionViewer');_0x5075bf['adapter']=_0x1468a5['adapter'],_0x5075bf['bind']('isEnabled')['to'](_0x1468a5),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x5776eb,'isReadOnly',_0x1ffff7=>!_0x1ffff7);for(const _0x25408a of _0x25a6e3){const _0x344ea2=null===_0x25408a['creator'];if(_0x344ea2&&_0x25408a['toVersion']===_0x25408a['fromVersion'])continue;const _0x4c0250=_0x25408a['toJSON']();_0x5075bf['addRevisionData'](_0x4c0250,(_0x18051c,_0x1e28f5,_0x53b449)=>{if(_0x344ea2){if(_0x40b98f)_0x40b98f['_update'](_0x18051c,_0x1e28f5);else{if(!_0x1e28f5){const _0x3995f1=_0x53b449['toJSON']();_0x3995f1['id']=_0x8f1231(),_0x1468a5['saveRevision'](_0x3995f1,_0x53b449['toVersion'])['then'](_0x1274d7=>{_0x40b98f=_0x1274d7;});}}}else _0x25408a['_update'](_0x18051c,_0x1e28f5);});}}},f),_0x255d95);}['_enhanceShowRevisionViewerCallback'](){const _0xc508f7=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2260d9=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x1388a1=this['editor']['plugins']['get']('Autosave');await _0x1388a1['save']();}else await _0x2260d9['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x38c8e1=this['editor']['plugins']['get']('Dialog');_0x38c8e1['isOpen']&&_0x38c8e1['hide']();}const _0x6099a=this['_getRevisionViewerEditorConfig']();return _0xc508f7(_0x6099a)['then'](_0x5f02e1=>{return(this['_viewerEditor']=_0x5f02e1,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x5f02e1);})['catch'](_0xabd37f=>(console['error'](_0xabd37f),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2be07b=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2be07b(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xf7693=this['editor']['plugins']['get']('Annotations');_0xf7693['refreshVisibility'](),_0xf7693['refreshPositioning']();}})));}['_showRevisionViewer'](_0x224be3){const _0xdec4da=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2a8b14=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1044e4=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x1044e4,_0x224be3)['then'](_0x3b8720=>(_0x2a8b14['style']['display']='block',_0xdec4da['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3b8720));}['_closeRevisionViewer'](_0x10dc1c){const _0x4edb4a=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4edb4a['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x10dc1c['destroy']();}async['_restoreRevision'](_0x35335a){const _0x5734c3=this['editor'],_0x433248=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2fa89f=_0x5734c3['plugins']['get']('RevisionTracker'),_0x3daf9f=_0x5734c3['plugins']['get']('RevisionHistoryUtils'),_0x2c3500=_0x433248['repository']['getRevision'](_0x35335a);let _0x3d312f,_0xa1f6fc,_0x1b0fda;try{await _0x3daf9f['loadRevisionData'](_0x2c3500,this['adapter']),_0x3d312f=_0x3daf9f['getRevisionDocumentData'](_0x2c3500),_0xa1f6fc=_0x3daf9f['getRevisionRootsAttributes'](_0x2c3500);}catch(_0x46c8f4){return void console['error'](_0x46c8f4);}_0x5734c3['model']['change'](_0x135cfa=>{for(const _0x35da1f of Array['from'](_0x5734c3['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x135cfa['removeMarker'](_0x35da1f);}),_0x433248['isReady']=!0x1,_0x5734c3['model']['enqueueChange'](_0xb86569=>{_0xb86569['setSelection'](null),_0xb86569['removeSelectionAttribute'](_0x5734c3['model']['document']['selection']['getAttributeKeys']());const _0x318e30=Object['keys'](_0x3d312f);for(const _0x3a63d8 of _0x5734c3['model']['document']['roots'])'$graveyard'!=_0x3a63d8['rootName']&&_0x3a63d8['isAttached']()&&!_0x318e30['includes'](_0x3a63d8['rootName'])&&_0xb86569['detachRoot'](_0x3a63d8);for(const _0x463b5b of _0x318e30){let _0x17503d=_0x5734c3['model']['document']['getRoot'](_0x463b5b);_0x17503d&&_0x17503d['isAttached']()||(_0x17503d=_0xb86569['addRoot'](_0x463b5b));const _0xe398c4=_0xa1f6fc[_0x463b5b],_0x5922a0=Object['keys'](_0xe398c4),_0x35365b=_0x3d312f[_0x463b5b];for(const _0x280082 of _0x17503d['getAttributeKeys']())_0x5922a0['includes'](_0x280082)||_0xb86569['removeAttribute'](_0x280082,_0x17503d);for(const _0x1c88c8 of _0x5922a0)_0xb86569['setAttribute'](_0x1c88c8,_0xa1f6fc[_0x463b5b][_0x1c88c8],_0x17503d);_0xb86569['remove'](_0xb86569['createRangeIn'](_0x17503d)),_0xb86569['insert'](_0x5734c3['data']['parse'](_0x35365b,_0x17503d),_0x17503d,0x0);}});const _0x244a38=R(_0x5734c3['locale'],'Restored');if(_0x2c3500['name'])_0x1b0fda=-0x1==_0x2c3500['name']['indexOf'](_0x244a38)?_0x244a38+':\x20'+_0x2c3500['name']:_0x2c3500['name'];else _0x1b0fda=_0x244a38+':\x20'+(_0x2c3500['createdAt']['toLocaleDateString'](_0x5734c3['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2c3500['createdAt']['toLocaleTimeString'](_0x5734c3['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2fa89f['saveRevision']({'name':_0x1b0fda}),_0x433248['isReady']=!0x0,_0x5734c3['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,at as RevisionViewerIntegration,Ri as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,ot as ShowChangeCommand};
29
+ at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0x9e8e82){super(_0x9e8e82),this['_revisionViewer']=_0x9e8e82['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x17699c=this['_revisionsRepository']['_revisions'],_0x4f74ba=this['_createRevisionActions'](),_0x40ba38=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x17699c,_0x4f74ba,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',(_0x46d7f8,_0x104222)=>{_0x104222['revisionViews']['on']('add',(_0x27c497,_0x35bbef)=>{_0x35bbef['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)),_0x40ba38['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x473393=this['_revisionsRepository']['getRevision'](0x0);if(_0x473393){const _0x414ba3=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x473393['id']);this['_revisionViewer']['compare'](_0x473393,_0x414ba3);}}['_handleRevisionSelected'](_0x4a7b17,_0x137b32){const _0x3bd44f=this['_revisionsRepository']['getRevision'](_0x137b32['id']),_0x976ecd=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3bd44f['id']);this['_revisionViewer']['compare'](_0x3bd44f,_0x976ecd);}['_handleRevisionSetName'](_0xd7763,_0x32dcae){this['_revisionsRepository']['getRevision'](_0x32dcae['id'])['setName'](_0x32dcae['name']);}['_handleDiffChange'](_0x14527d,_0x3d6482,_0x559a50){const _0x4f2fb2=this['_revisionsRepository']['getRevisionsInDiff'](_0x559a50);_0x4f2fb2['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x4f2fb2),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x4f2fb2[0x0]));}['_createRevisionActions'](){const _0x8a6e07=this['editor'],_0x3ea09d=f['availableRevisionActions'],_0xa7ceb0=_0x8a6e07['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0xa7ceb0['length'])return _0xa7ceb0['map'](_0x1ad2ba=>{const _0x4583da='string'==typeof _0x1ad2ba?Object['assign']({},_0x3ea09d[_0x1ad2ba]):_0x1ad2ba;return _0x4583da['action']=_0x4583da['action']['bind'](this,_0x8a6e07),_0x4583da['isVisible']&&(_0x4583da['isVisible']=_0x4583da['isVisible']['bind'](this,_0x8a6e07)),_0x4583da;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x33e9b2},_0x20eb78)=>{const _0x5bc089=_0x33e9b2['get'](l),_0x27c560=_0x5bc089['repository'];let _0x40fbe9=_0x5bc089['diff']['newRevisionId'],_0x56e139=_0x20eb78['id'];_0x27c560['getIndex'](_0x40fbe9)>_0x27c560['getIndex'](_0x56e139)&&([_0x40fbe9,_0x56e139]=[_0x56e139,_0x40fbe9]),_0x5bc089['compare'](_0x40fbe9,_0x56e139);},'isVisible':({plugins:_0x5f2bab},_0x138474)=>{const _0xc96cea=_0x5f2bab['get'](l);return!(_0xc96cea['repository']['getRevisionsInDiff'](_0xc96cea['diff'])['length']>0x2)&&!_0x138474['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0xc5d98,{id:_0x18c809})=>{_0xc5d98['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x18c809);},'isVisible':({plugins:_0x3e85ab},_0x54c771)=>!!_0x3e85ab['get'](l)['repository']['getLaterVisibleRevision'](_0x54c771['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5310ca},{id:_0x25866c,revisionNameView:_0x3887c})=>{const _0x3199ed=_0x5310ca['get'](l),_0x1f403c=_0x3199ed['repository']['getEarlierVisibleRevision'](_0x25866c);_0x3199ed['compare'](_0x25866c,_0x1f403c),_0x3887c['focus'](),_0x3887c['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x311741,_0x4e777e){super(_0x311741),this['_view']=_0x4e777e,this['_toolbarConfig']=st(_0x311741['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0xc7335e){const _0x2c2ee5=this['editor'],_0x43923c=this['view'],_0x487cc9=_0x2c2ee5['editing']['view'],_0x40c75c=_0x43923c['editable'],_0x156288=_0x487cc9['document']['getRoot']();_0x40c75c['name']=_0x156288['rootName'],_0x43923c['render']();const _0x4e7610=_0x40c75c['element'];this['setEditableElement'](_0x40c75c['name'],_0x4e7610),_0x43923c['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x487cc9['attachDomRoot'](_0x4e7610),this['_elementReplacer']['replace'](_0xc7335e,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x3c0e9e=this['view'],_0x4a94bf=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4a94bf['detachDomRoot'](_0x3c0e9e['editable']['name']),_0x3c0e9e['destroy']();}['_initToolbar'](){const _0x4da95e=this['view'];_0x4da95e['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4da95e['stickyPanel']['limiterElement']=_0x4da95e['element'],_0x4da95e['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x115063})=>_0x115063),_0x4da95e['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4da95e['toolbar']);}}class ii extends _0x21c88c{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x53fa6b,_0x1f12ce,_0x2b8429={}){super(_0x53fa6b),this['stickyPanel']=new _0x574a08(_0x53fa6b),this['toolbar']=new _0x193e15(_0x53fa6b,{'shouldGroupWhenFull':_0x2b8429['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x53fa6b,_0x1f12ce);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
30
+ _0x4b52a8(_0x2fe6b0){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2971ea,_0x515376){super(_0x515376),this['sourceElement']=_0x2971ea,this['model']['document']['createRoot']();const _0x460854=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x460854);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5a1079,_0xc3a580){const _0x2f902f=new this(_0x5a1079,_0xc3a580);return await _0x2f902f['initPlugins'](),await _0x2f902f['ui']['init'](_0x5a1079),await _0x2f902f['data']['init'](_0x2f902f['config']['get']('initialData')||''),_0x2f902f['fire']('ready'),_0x2f902f;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class ht extends _0x307a2f{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c1f6c){function _0x623b8c(_0x1d8fba){return _0x1d8fba['map'](_0x55d469=>String['fromCharCode'](_0x55d469))['join']('');}super(_0x4c1f6c),this['result']='end',_0x4c1f6c[_0x623b8c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x623b8c([0x76,0x69,0x65,0x77])][_0x623b8c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x623b8c([0x61,0x75,0x74,0x6f]),_0x4c1f6c[_0x623b8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x623b8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x623b8c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x623b8c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x623b8c([0x6f,0x6b])});}}class ct extends _0x307a2f{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x462cb4){if(super(_0x462cb4),!this['editor']['config']['get']('revisionHistory'))throw new _0x1d35cc('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x41c70c=>this['_showRevisionViewer']({..._0x41c70c,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1113bf=>this['_closeRevisionViewer'](_0x1113bf)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x49bc49=>this['_restoreRevision'](_0x49bc49)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x454326){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x454326;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1497f8){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1497f8);}['getRevision'](_0x30ea01){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x30ea01);}['getRevisions'](_0x1cd8fd){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1cd8fd||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x19c11a=this['editor'],_0x588976=_0x804229(_0x19c11a,d),_0x197693=_0x19c11a['plugins']['get']('RevisionTracker'),_0x89a284=_0x19c11a['plugins']['get']('Users')['users'];return _0x588976['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x588976['lazyRoots'],(_0x588976['plugins']['push'](ht,l,u,class extends _0x307a2f{static get['requires'](){return[l,'Users'];}['init'](){const _0x1813ef=this['editor']['plugins']['get']('Users');for(const _0x3b2dd9 of _0x89a284)_0x3b2dd9['isAnonymous']||_0x1813ef['getUser'](_0x3b2dd9['id'])||_0x1813ef['addUser'](_0x3b2dd9);const _0x4ffe46=_0x197693['repository']['getRevisions']();let _0x449e4c=null;const _0x378a4b=this['editor']['plugins']['get']('RevisionViewer');_0x378a4b['adapter']=_0x197693['adapter'],_0x378a4b['bind']('isEnabled')['to'](_0x197693),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x19c11a,'isReadOnly',_0x22fa2a=>!_0x22fa2a);for(const _0x5e37a9 of _0x4ffe46){const _0x79fffb=null===_0x5e37a9['creator'];if(_0x79fffb&&_0x5e37a9['toVersion']===_0x5e37a9['fromVersion'])continue;const _0x571f19=_0x5e37a9['toJSON']();_0x378a4b['addRevisionData'](_0x571f19,(_0x74a0a0,_0x46d8ab,_0x551651)=>{if(_0x79fffb){if(_0x449e4c)_0x449e4c['_update'](_0x74a0a0,_0x46d8ab);else{if(!_0x46d8ab){const _0x3cb09b=_0x551651['toJSON']();_0x3cb09b['id']=_0xcc759(),_0x197693['saveRevision'](_0x3cb09b,_0x551651['toVersion'])['then'](_0x4c6b1e=>{_0x449e4c=_0x4c6b1e;});}}}else _0x5e37a9['_update'](_0x74a0a0,_0x46d8ab);});}}},f),_0x588976);}['_enhanceShowRevisionViewerCallback'](){const _0x5eef9c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x14988a=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x4993dc=this['editor']['plugins']['get']('Autosave');await _0x4993dc['save']();}else await _0x14988a['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x49baa4=this['editor']['plugins']['get']('Dialog');_0x49baa4['isOpen']&&_0x49baa4['hide']();}const _0x412ca3=this['_getRevisionViewerEditorConfig']();return _0x5eef9c(_0x412ca3)['then'](_0x589d49=>{return(this['_viewerEditor']=_0x589d49,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x589d49);})['catch'](_0x2215db=>(console['error'](_0x2215db),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x104166=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x104166(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x50de72=this['editor']['plugins']['get']('Annotations');_0x50de72['refreshVisibility'](),_0x50de72['refreshPositioning']();}})));}['_showRevisionViewer'](_0x278baa){const _0x2fe48f=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x19924a=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x223c8f=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x223c8f,_0x278baa)['then'](_0x506b69=>(_0x19924a['style']['display']='block',_0x2fe48f['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x506b69));}['_closeRevisionViewer'](_0x132ecb){const _0x3a974a=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3a974a['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x132ecb['destroy']();}async['_restoreRevision'](_0x3a3005){const _0x29a7ae=this['editor'],_0x48e994=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x52a7cd=_0x29a7ae['plugins']['get']('RevisionTracker'),_0x358d61=_0x29a7ae['plugins']['get']('RevisionHistoryUtils'),_0x36ac79=_0x48e994['repository']['getRevision'](_0x3a3005);let _0xd6bc1d,_0x4bba98,_0x275d47;try{await _0x358d61['loadRevisionData'](_0x36ac79,this['adapter']),_0xd6bc1d=_0x358d61['getRevisionDocumentData'](_0x36ac79),_0x4bba98=_0x358d61['getRevisionRootsAttributes'](_0x36ac79);}catch(_0x2cc999){return void console['error'](_0x2cc999);}_0x29a7ae['model']['change'](_0x2ee85e=>{for(const _0x2e9783 of Array['from'](_0x29a7ae['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2ee85e['removeMarker'](_0x2e9783);}),_0x48e994['isReady']=!0x1,_0x29a7ae['model']['enqueueChange'](_0x36ff33=>{_0x36ff33['setSelection'](null),_0x36ff33['removeSelectionAttribute'](_0x29a7ae['model']['document']['selection']['getAttributeKeys']());const _0x111e87=Object['keys'](_0xd6bc1d);for(const _0x288a4c of _0x29a7ae['model']['document']['roots'])'$graveyard'!=_0x288a4c['rootName']&&_0x288a4c['isAttached']()&&!_0x111e87['includes'](_0x288a4c['rootName'])&&_0x36ff33['detachRoot'](_0x288a4c);for(const _0x2829eb of _0x111e87){let _0x1b8689=_0x29a7ae['model']['document']['getRoot'](_0x2829eb);_0x1b8689&&_0x1b8689['isAttached']()||(_0x1b8689=_0x36ff33['addRoot'](_0x2829eb));const _0x32fb0d=_0x4bba98[_0x2829eb],_0x5373af=Object['keys'](_0x32fb0d),_0xf451c9=_0xd6bc1d[_0x2829eb];for(const _0x9528ca of _0x1b8689['getAttributeKeys']())_0x5373af['includes'](_0x9528ca)||_0x36ff33['removeAttribute'](_0x9528ca,_0x1b8689);for(const _0x4e54ba of _0x5373af)_0x36ff33['setAttribute'](_0x4e54ba,_0x4bba98[_0x2829eb][_0x4e54ba],_0x1b8689);_0x36ff33['remove'](_0x36ff33['createRangeIn'](_0x1b8689)),_0x36ff33['insert'](_0x29a7ae['data']['parse'](_0xf451c9,_0x1b8689),_0x1b8689,0x0);}});const _0x561649=R(_0x29a7ae['locale'],'Restored');if(_0x36ac79['name'])_0x275d47=-0x1==_0x36ac79['name']['indexOf'](_0x561649)?_0x561649+':\x20'+_0x36ac79['name']:_0x36ac79['name'];else _0x275d47=_0x561649+':\x20'+(_0x36ac79['createdAt']['toLocaleDateString'](_0x29a7ae['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x36ac79['createdAt']['toLocaleTimeString'](_0x29a7ae['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x52a7cd['saveRevision']({'name':_0x275d47}),_0x48e994['isReady']=!0x0,_0x29a7ae['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,ht as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,rt as ShowChangeCommand};