@ckeditor/ckeditor5-revision-history 46.1.1-alpha.1 → 46.1.1-alpha.2

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 _0x223ec6,uid as _0x189557,Collection as _0x1e8ea3,logWarning as _0x43e3aa,FocusTracker as _0x408ec4,KeystrokeHandler as _0x4d84bf,scrollViewportToShowTarget as _0x1108f0,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x557c8b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x240ca5,set as _0xbdbba6,unset as _0x110887,isEqual as _0x2ea464}from'es-toolkit/compat';import{Plugin as _0xb2d8c8,PendingActions as _0x5e678a,Command as _0xd0c377,ElementApiMixin as _0x14c85d,Editor as _0x502371}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x3db46c,getMarkerDomElement as _0x195504,ConfirmMixin as _0x2ed6a5,sanitizeEditorConfig as _0x5ea847}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x598a4b,ViewAttributeElement as _0x4e70b8,ViewEmptyElement as _0x2f1121,ViewRawElement as _0x4d9c6a,ViewUIElement as _0x35e088,ViewDocumentFragment as _0x359ce1,ViewText as _0x200728,ViewElement as _0x5ff874,ModelElement as _0x429deb,ModelRange as _0x5d129e,ModelPosition as _0x569535,ModelDocumentFragment as _0x24ebb7,ModelText as _0x4f2aa1}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x378803,IconChevronUp as _0x2dab41,IconChevronDown as _0x141731,IconUndo as _0x1f7494,IconUser as _0xfa7be3,IconThreeVerticalDots as _0x2f6449}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x3f52ee,View as _0x2d670e,submitHandler as _0x973ae7,LabeledFieldView as ti,createLabeledInputText as _0x84c75d,createDropdown as _0x455c58,ListView as _0x174095,ListItemView as _0x2be811,ButtonView as _0xbbf7fb,MenuBarMenuView as _0x3d1a00,MenuBarMenuListView as _0x7b6454,MenuBarMenuListItemView as _0x28b6aa,MenuBarMenuListItemButtonView as _0x16e359,ContextualBalloon as _0x1d58fa,ToolbarSeparatorView as _0x3df35a,IconView as _0x5dfca0,addListToDropdown as _0x3388f2,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x4fb2a1,StickyPanelView as _0x2fa7fc,ToolbarView as _0x5abd83,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x925bc5}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x223ec6(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x5db186){super(),this['id']=_0x5db186['id']||_0x189557(),this['creator']=_0x5db186['creator']||null,this['authors']=_0x5db186['authors']||[],this['diffData']=_0x5db186['diffData']||null,this['toVersion']=_0x5db186['toVersion']||0x0,this['fromVersion']=_0x5db186['fromVersion']||0x0,this['set']('name',_0x5db186['name']||''),this['set']('createdAt',_0x5db186['createdAt']||new Date()),this['set']('attributes',_0x5db186['attributes']||{});}['setName'](_0x5469b4){this['_update']({'name':_0x5469b4});}['setAttribute'](_0xc08764,_0x1b0ebd){const _0x35a550=_0x240ca5(this['attributes']);_0xbdbba6(_0x35a550,_0xc08764,_0x1b0ebd),this['_update']({'attributes':_0x35a550});}['removeAttribute'](_0x5cd58b){const _0x4742fa=_0x240ca5(this['attributes']);_0x110887(_0x4742fa,_0x5cd58b),this['_update']({'attributes':_0x4742fa});}['_update'](_0x5614af,_0x140969=!0x1){let _0x2305a6=!0x1;const _0x440647={'id':this['id']},_0x7fe614=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0xda0629 of _0x7fe614){const _0x465871=_0x5614af[_0xda0629];void 0x0!==_0x465871&&_0x465871!==this[_0xda0629]&&(this[_0xda0629]=_0x465871,_0x440647[_0xda0629]=_0x465871,_0x2305a6=!0x0);}_0x2305a6&&(_0x440647['authors']&&(_0x440647['authorsIds']=_0x440647['authors']['map'](_0x25ab3d=>_0x25ab3d['id']),delete _0x440647['authors']),this['fire']('_update',_0x440647,_0x140969));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0xc0056d=>_0xc0056d['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0xb2d8c8{['_revisions'];static get['requires'](){return[_0x3db46c];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x24c0b4){super(_0x24c0b4),this['_revisions']=new _0x1e8ea3();}['afterInit'](){!async function(_0x16a5b7){const _0x5a23b7=_0x15aa01([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0x58d088=0xeb829,_0x31432b=0x7374585f,_0x2de9a7=0x73732b1f^_0x31432b,_0xee042e=window[_0x15aa01([0x44,0x61,0x74,0x65])][_0x15aa01([0x6e,0x6f,0x77])](),_0x2dc18c=_0x16a5b7[_0x15aa01([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x463d6e=new window[(_0x15aa01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4540fd=>{_0x2dc18c[_0x15aa01([0x6f,0x6e,0x63,0x65])](_0x15aa01([0x72,0x65,0x61,0x64,0x79]),_0x4540fd);}),_0x257d07={[_0x15aa01([0x6b,0x74,0x79])]:_0x15aa01([0x45,0x43]),[_0x15aa01([0x75,0x73,0x65])]:_0x15aa01([0x73,0x69,0x67]),[_0x15aa01([0x63,0x72,0x76])]:_0x15aa01([0x50,0x2d,0x32,0x35,0x36]),[_0x15aa01([0x78])]:_0x15aa01([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]),[_0x15aa01([0x79])]:_0x15aa01([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]),[_0x15aa01([0x61,0x6c,0x67])]:_0x15aa01([0x45,0x53,0x32,0x35,0x36])},_0x5eabfe=_0x2dc18c[_0x15aa01([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x15aa01([0x67,0x65,0x74])](_0x15aa01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2de81d(){let _0x176df4,_0x2cb472=null,_0x2f87c9=null;try{if(_0x5eabfe==_0x15aa01([0x47,0x50,0x4c]))return _0x15aa01([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x176df4=_0x4f33ed(),!_0x176df4)return _0x15aa01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x176df4[_0x15aa01([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f87c9=_0x54e98f(_0x176df4[_0x15aa01([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x176df4[_0x15aa01([0x6a,0x74,0x69])])),await _0x5e37f2()?_0x5a02fd()?_0x3a4eda()?_0x15aa01([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x231d0b()?(_0x176df4[_0x15aa01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x15aa01([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2cb472=_0x5d561f(_0x15aa01([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x176df4[_0x15aa01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x15aa01([0x74,0x72,0x69,0x61,0x6c])&&(_0x2cb472=_0x5d561f(_0x15aa01([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5c3429()):_0x15aa01([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x15aa01([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x15aa01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x15aa01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3a4eda(){const _0xfb07d=[_0x15aa01([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x15aa01([0x74,0x72,0x69,0x61,0x6c])][_0x15aa01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x176df4[_0x15aa01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xee042e/0x3e8:0xe10*_0x2de9a7;return _0x176df4[_0x15aa01([0x65,0x78,0x70])]<_0xfb07d;}function _0x5a02fd(){const _0x2a08aa=_0x176df4[_0x15aa01([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2a08aa)return!0x1;if(_0x2a08aa[_0x15aa01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15aa01([0x2a])))return!0x0;if(_0x2a08aa[_0x15aa01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15aa01([0x52,0x48])))return!0x0;if(_0x2a08aa[_0x15aa01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15aa01([0x52,0x52,0x48]))){if(_0x190a31())return!0x0;if(_0x2697d4()||_0x391d7a())return!0x0;}return!0x1;}function _0x231d0b(){const _0x473bba=_0x176df4[_0x15aa01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x473bba||0x0==_0x473bba[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x476fda}=new URL(window[_0x15aa01([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x473bba[_0x15aa01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x476fda))return!0x0;const _0x120994=_0x476fda[_0x15aa01([0x73,0x70,0x6c,0x69,0x74])](_0x15aa01([0x2e]));return _0x473bba[_0x15aa01([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xee9bfd=>_0xee9bfd[_0x15aa01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15aa01([0x2a])))[_0x15aa01([0x6d,0x61,0x70])](_0x1c8283=>_0x1c8283[_0x15aa01([0x73,0x70,0x6c,0x69,0x74])](_0x15aa01([0x2e])))[_0x15aa01([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5df455=>_0x5df455[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x120994[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x15aa01([0x6d,0x61,0x70])](_0x415583=>Array(_0x120994[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x415583[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x15aa01([0x66,0x69,0x6c,0x6c])](_0x415583[0x0]===_0x15aa01([0x2a])?_0x15aa01([0x2a]):'')[_0x15aa01([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x415583))[_0x15aa01([0x73,0x6f,0x6d,0x65])](_0x1552a6=>_0x120994[_0x15aa01([0x65,0x76,0x65,0x72,0x79])]((_0x49404a,_0x23f101)=>_0x1552a6[_0x23f101]===_0x49404a||_0x1552a6[_0x23f101]===_0x15aa01([0x2a])));}function _0x5c3429(){return _0x2cb472&&_0x2f87c9?new window[(_0x15aa01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2e6388,_0x50867a)=>{_0x2cb472[_0x15aa01([0x74,0x68,0x65,0x6e])](_0x2e6388,_0x50867a),_0x2f87c9[_0x15aa01([0x74,0x68,0x65,0x6e])](_0x2f6db3=>{_0x2f6db3!=_0x15aa01([0x56,0x61,0x6c,0x69,0x64])&&_0x2e6388(_0x2f6db3);},_0x50867a);}):_0x2cb472||_0x2f87c9||_0x15aa01([0x56,0x61,0x6c,0x69,0x64]);}}function _0x54e98f(_0x16f3cc,_0x55f40d){return new window[(_0x15aa01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x144886=>{if(_0x1429f8())return _0x144886(_0x15aa01([0x56,0x61,0x6c,0x69,0x64]));_0x59929a(),_0x2dc18c[_0x15aa01([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x15aa01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x504ccb=!0x1;const _0x3a98f2=_0x189557();function _0x3fc9fe(_0x49d0ce){return!!_0x49d0ce&&(typeof _0x49d0ce===_0x15aa01([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x49d0ce===_0x15aa01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x49d0ce[_0x15aa01([0x74,0x68,0x65,0x6e])]===_0x15aa01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x49d0ce[_0x15aa01([0x63,0x61,0x74,0x63,0x68])]===_0x15aa01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2b80b4(_0x1eb1dd){_0x5b0e33(_0x1eb1dd)[_0x15aa01([0x74,0x68,0x65,0x6e])](_0x21d599=>{if(!_0x21d599||_0x21d599[_0x15aa01([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x15aa01([0x6f,0x6b]))return _0x15aa01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4eee23(_0x4de802(_0x3a98f2+_0x55f40d))!=_0x21d599[_0x15aa01([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x15aa01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x15aa01([0x56,0x61,0x6c,0x69,0x64]);})[_0x15aa01([0x74,0x68,0x65,0x6e])](_0x25e85c=>(_0x32c5de(),_0x25e85c),()=>{const _0x3f7d59=_0x465c48();return null==_0x3f7d59?(_0x32c5de(),_0x15aa01([0x56,0x61,0x6c,0x69,0x64])):_0x15aa01(_0xee042e-_0x3f7d59>(0x5778dc5f^_0x31432b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x15aa01([0x74,0x68,0x65,0x6e])](_0x144886)[_0x15aa01([0x63,0x61,0x74,0x63,0x68])](()=>{_0x144886(_0x15aa01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4157a6=0x7342b6df^_0x31432b;function _0x32c5de(){const _0x22b8d5=_0x15aa01([0x6c,0x6c,0x63,0x74,0x2d])+_0x4eee23(_0x4de802(_0x16f3cc)),_0x4b857f=_0x5c003d(_0x4eee23(window[_0x15aa01([0x4d,0x61,0x74,0x68])][_0x15aa01([0x63,0x65,0x69,0x6c])](_0xee042e/_0x4157a6)));window[_0x15aa01([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x15aa01([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x22b8d5,_0x4b857f);}function _0x465c48(){const _0x546a29=_0x15aa01([0x6c,0x6c,0x63,0x74,0x2d])+_0x4eee23(_0x4de802(_0x16f3cc)),_0x2a90fe=window[_0x15aa01([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x15aa01([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x546a29);return _0x2a90fe?window[_0x15aa01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c003d(_0x2a90fe),0x10)*_0x4157a6:null;}function _0x5b0e33(_0x2ed098){return new window[(_0x15aa01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x379f4e,_0xc872b9)=>{_0x2ed098[_0x15aa01([0x74,0x68,0x65,0x6e])](_0x379f4e,_0xc872b9),window[_0x15aa01([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xc872b9,0x73758c9f^_0x31432b);});}}_0x2dc18c[_0x15aa01([0x6f,0x6e])](_0x15aa01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x160226,_0x2ddc73)=>{if(_0x2ddc73[0x0]!=_0x16f3cc)return _0x144886(_0x15aa01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2ddc73[0x1]={..._0x2ddc73[0x1],[_0x15aa01([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3a98f2};},{[_0x15aa01([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x15aa01([0x68,0x69,0x67,0x68])}),_0x2dc18c[_0x15aa01([0x6f,0x6e])](_0x15aa01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xdd1ab8=>{_0x3fc9fe(_0xdd1ab8[_0x15aa01([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x504ccb=!0x0,_0x2b80b4(_0xdd1ab8[_0x15aa01([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x15aa01([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x15aa01([0x6c,0x6f,0x77])}),_0x463d6e[_0x15aa01([0x74,0x68,0x65,0x6e])](()=>{_0x504ccb||_0x144886(_0x15aa01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1429f8(){return _0x2dc18c[_0x15aa01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15aa01([0x76,0x69,0x65,0x77])][_0x15aa01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x15aa01([0x61,0x75,0x74,0x6f]);}function _0x59929a(){_0x2dc18c[_0x15aa01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15aa01([0x76,0x69,0x65,0x77])][_0x15aa01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x15aa01([0x61,0x75,0x74,0x6f]);}}function _0x5d561f(_0x243bcc){const _0x2789bd=[new window[(_0x15aa01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f778d=>setTimeout(_0x3f778d,0x737d6693^_0x31432b)),_0x463d6e[_0x15aa01([0x74,0x68,0x65,0x6e])](()=>new window[(_0x15aa01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x179418=>{const _0x54d7b2=0x73745858^_0x31432b,_0xd5b515=_0x16a5b7[_0x15aa01([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x57ee23(){_0xd5b515[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x54d7b2&&_0x179418();}_0x57ee23(),_0xd5b515[_0x15aa01([0x6f,0x6e])](_0x15aa01([0x61,0x64,0x64]),_0x57ee23);})),new window[(_0x15aa01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x75ee47=>{function _0x4c45cc(){for(const _0x5bc9c2 in window)if(window[_0x15aa01([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x15aa01([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x5bc9c2))&&window[_0x5bc9c2]==_0x58d088)return _0x75ee47();_0x2dc18c[_0x15aa01([0x73,0x74,0x61,0x74,0x65])]!=_0x15aa01([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x15aa01([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4c45cc,0x73744bd7^_0x31432b);}_0x5b761c(_0x15aa01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x4c45cc();})];return window[_0x15aa01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x15aa01([0x72,0x61,0x63,0x65])](_0x2789bd)[_0x15aa01([0x74,0x68,0x65,0x6e])](()=>_0x243bcc);}async function _0x47838b(){if(await _0x463d6e,_0x5b761c(_0x15aa01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x43d2a6=_0x16a5b7[_0x15aa01([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x3c1bf3=_0x16a5b7[_0x15aa01([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])](_0x43d2a6[_0x15aa01([0x69,0x64])]),_0x1a427b=_0x10bf11(_0x15aa01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1a427b[_0x15aa01([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x43d2a6['id'],_0x3c1bf3?_0x3c1bf3['id']:null,!0x0),_0x1a427b[_0x15aa01([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x15aa01([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1a427b[_0x15aa01([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1a427b[_0x15aa01([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0xab2e24,void(_0x1a427b[_0x15aa01([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0xab2e24);}if(_0x5b761c(_0x15aa01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0xd21c74=_0x10bf11(_0x15aa01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0xd21c74[_0x15aa01([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x15aa01([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0xd21c74[_0x15aa01([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0xd21c74[_0x15aa01([0x75,0x70,0x64,0x61,0x74,0x65])]=_0xab2e24,_0xd21c74[_0x15aa01([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0xab2e24;}_0x2dc18c[_0x15aa01([0x6d,0x6f,0x64,0x65,0x6c])][_0x15aa01([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xab2e24,_0x2dc18c[_0x15aa01([0x6d,0x6f,0x64,0x65,0x6c])][_0x15aa01([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xab2e24,_0x2dc18c[_0x15aa01([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x15aa01([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x190a31(){return _0x5b761c(_0x15aa01([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x10bf11(_0x15aa01([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x15aa01([0x73,0x74,0x61,0x74,0x65])]==_0x15aa01([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2697d4(){return _0x5b761c(_0x15aa01([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 _0x391d7a(){return _0x5b761c(_0x15aa01([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5d3040(_0x4c7d50){const _0x4a2839=_0x53c8f8();_0x2dc18c[_0x4a2839]=_0x15aa01([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])+_0x4c7d50,_0x4c7d50[_0x15aa01([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x15aa01([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x53c8f8()]=_0x58d088),_0x4c7d50!=_0x15aa01([0x56,0x61,0x6c,0x69,0x64])&&_0x47838b();}function _0x53c8f8(){const _0x1a01dd=window[_0x15aa01([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x15aa01([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x15aa01([0x6e,0x6f,0x77])]())[_0x15aa01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x15aa01([0x2e]),'');let _0x43ad86=_0x15aa01([0x73]);for(let _0x3d71a0=0x0;_0x3d71a0<_0x1a01dd[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d71a0+=0x2){let _0x45b2fd=window[_0x15aa01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1a01dd[_0x15aa01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d71a0,_0x3d71a0+0x2));_0x45b2fd>=_0x5a23b7[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x45b2fd-=_0x5a23b7[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x43ad86+=_0x5a23b7[_0x45b2fd];}return _0x43ad86;}function _0x4f33ed(){const _0x22ed74=_0x5eabfe[_0x15aa01([0x73,0x70,0x6c,0x69,0x74])](_0x15aa01([0x2e]));if(0x3!=_0x22ed74[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4ab7bb(_0x22ed74[0x1]);function _0x4ab7bb(_0x3e067d){const _0x4bb8c7=_0x377898(_0x3e067d);return _0x4bb8c7&&_0x29d296()?_0x4bb8c7:null;function _0x29d296(){const _0x45ddc0=_0x4bb8c7[_0x15aa01([0x6a,0x74,0x69])],_0x385e00=window[_0x15aa01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x45ddc0[_0x15aa01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x45ddc0[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3b6ad4={..._0x4bb8c7,[_0x15aa01([0x6a,0x74,0x69])]:_0x45ddc0[_0x15aa01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x45ddc0[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3b6ad4[_0x15aa01([0x76,0x63])],_0x4de802(_0x3b6ad4)==_0x385e00;}}}async function _0x5e37f2(){let _0x595de9=!0x0;try{const _0x2a5175=_0x5eabfe[_0x15aa01([0x73,0x70,0x6c,0x69,0x74])](_0x15aa01([0x2e])),[_0x48dd98,_0x221cbb,_0x3da191]=_0x2a5175;return _0x4d64bc(_0x48dd98),await _0x5336f5(_0x48dd98,_0x221cbb,_0x3da191),_0x595de9;}catch{return!0x1;}function _0x4d64bc(_0xb7f78a){const _0x5146c2=_0x377898(_0xb7f78a);_0x5146c2&&_0x5146c2[_0x15aa01([0x61,0x6c,0x67])]==_0x15aa01([0x45,0x53,0x32,0x35,0x36])||(_0x595de9=!0x1);}async function _0x5336f5(_0x163e52,_0x3c6a67,_0x53f0be){const _0x38cbf5=window[_0x15aa01([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x15aa01([0x66,0x72,0x6f,0x6d])](_0x16b802(_0x53f0be),_0x2609eb=>_0x2609eb[_0x15aa01([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x270095=new window[(_0x15aa01([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x15aa01([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x163e52+_0x15aa01([0x2e])+_0x3c6a67),_0x23581d=window[_0x15aa01([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x15aa01([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x23581d)return;const _0xcc503c=await _0x23581d[_0x15aa01([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x15aa01([0x6a,0x77,0x6b]),_0x257d07,{[_0x15aa01([0x6e,0x61,0x6d,0x65])]:_0x15aa01([0x45,0x43,0x44,0x53,0x41]),[_0x15aa01([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x15aa01([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x15aa01([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x23581d[_0x15aa01([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x15aa01([0x6e,0x61,0x6d,0x65])]:_0x15aa01([0x45,0x43,0x44,0x53,0x41]),[_0x15aa01([0x68,0x61,0x73,0x68])]:{[_0x15aa01([0x6e,0x61,0x6d,0x65])]:_0x15aa01([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xcc503c,_0x38cbf5,_0x270095)||(_0x595de9=!0x1);}}function _0x377898(_0x3f663c){return _0x3f663c[_0x15aa01([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x15aa01([0x65,0x79]))?JSON[_0x15aa01([0x70,0x61,0x72,0x73,0x65])](_0x16b802(_0x3f663c)):null;}function _0x16b802(_0x85ce4e){return window[_0x15aa01([0x61,0x74,0x6f,0x62])](_0x85ce4e[_0x15aa01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x15aa01([0x2b]))[_0x15aa01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x15aa01([0x2f])));}function _0x4de802(_0x52494c){let _0x92f865=0x1505;function _0x441ab1(_0x6b9b53){for(let _0x1f8fe0=0x0;_0x1f8fe0<_0x6b9b53[_0x15aa01([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1f8fe0++){const _0x17eaa2=_0x6b9b53[_0x15aa01([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1f8fe0);_0x92f865=(_0x92f865<<0x5)+_0x92f865+_0x17eaa2,_0x92f865&=_0x92f865;}}function _0x36ffd1(_0x54833c){Array[_0x15aa01([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x54833c)?_0x54833c[_0x15aa01([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x36ffd1):_0x54833c&&typeof _0x54833c==_0x15aa01([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x15aa01([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x54833c)[_0x15aa01([0x73,0x6f,0x72,0x74])]()[_0x15aa01([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x23c57d,_0x257609])=>{_0x441ab1(_0x23c57d),_0x36ffd1(_0x257609);}):_0x441ab1(window[_0x15aa01([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x54833c));}return _0x36ffd1(_0x52494c),_0x92f865>>>0x0;}function _0x4eee23(_0x201d1f){return _0x201d1f[_0x15aa01([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x15aa01([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x15aa01([0x30]));}function _0x5c003d(_0x50bc0a){return _0x50bc0a[_0x15aa01([0x73,0x70,0x6c,0x69,0x74])]('')[_0x15aa01([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x15aa01([0x6a,0x6f,0x69,0x6e])]('');}function _0x5b761c(_0x4dacf2){return _0x2dc18c[_0x15aa01([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x15aa01([0x68,0x61,0x73])](_0x4dacf2);}function _0x10bf11(_0x55c852){return _0x2dc18c[_0x15aa01([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x15aa01([0x67,0x65,0x74])](_0x55c852);}function _0xab2e24(){}function _0x15aa01(_0x22a006){return _0x22a006['map'](_0x5a56d1=>String['fromCharCode'](_0x5a56d1))['join']('');}_0x5d3040(await _0x2de81d());}(this);}['createRevision'](_0x2e8f5d){const _0x274fa7=this['editor']['plugins']['get']('Users');return new I({'id':_0x2e8f5d['id'],'name':_0x2e8f5d['name'],'creator':_0x2e8f5d['creatorId']?_0x274fa7['getUser'](_0x2e8f5d['creatorId']):null,'diffData':_0x2e8f5d['diffData']||_0x2e8f5d['data'],'authors':_0x2e8f5d['authorsIds']['map'](_0x3b71e1=>_0x274fa7['getUser'](_0x3b71e1)),'createdAt':new Date(_0x2e8f5d['createdAt']),'attributes':_0x2e8f5d['attributes'],'fromVersion':_0x2e8f5d['fromVersion'],'toVersion':_0x2e8f5d['toVersion']});}['addRevision'](_0x49f748,_0x48b256=0x0){this['_revisions']['add'](_0x49f748,_0x48b256);}['getRevision'](_0x57b0af){return this['_revisions']['get'](_0x57b0af);}['getRevisions'](_0x15e1d={'toJSON':!0x1}){const _0x2292b1=Array['from'](this['_revisions']);return _0x2292b1['reverse'](),_0x15e1d['toJSON']?_0x2292b1['map'](_0x5e2810=>_0x5e2810['toJSON']()):_0x2292b1;}['getIndex'](_0x52de14){return this['_revisions']['getIndex'](_0x52de14);}['getEarlierVisibleRevision'](_0x2cfbd5){const [,_0x40f217]=this['getRevisionsIterator'](_0x2cfbd5,{'direction':'earlier'});return _0x40f217;}['getLaterVisibleRevision'](_0x42f428){const [,_0x596e88]=this['getRevisionsIterator'](_0x42f428,{'direction':'later'});return _0x596e88;}['getRevisionsInDiff'](_0x3ad13c){const _0x2054f8=[];for(const _0x142c40 of this['getRevisionsIterator'](_0x3ad13c['newRevisionId']))if(_0x2054f8['push'](_0x142c40),_0x142c40['id']===_0x3ad13c['oldRevisionId'])break;return _0x2054f8;}*['getRevisionsIterator'](_0x3ece0a,{direction:_0x4696bc='earlier',filter:_0x39df70=()=>!0x0}={}){const _0xf5050a='earlier'===_0x4696bc?0x1:-0x1;let _0x146837=this['_revisions']['get'](_0x3ece0a),_0x4e4091=this['getIndex'](_0x146837);for(yield _0x146837;_0x146837;){if(_0x4e4091+=_0xf5050a,_0x146837=this['getRevision'](_0x4e4091),!_0x146837)return;_0x39df70(_0x146837)&&(yield _0x146837);}}}class $ extends _0xb2d8c8{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x598a4b,'c'],[_0x4e70b8,'a'],[_0x2f1121,'e'],[_0x4d9c6a,'r'],[_0x35e088,'u']]);['_typeCharToViewClass']=new Map([['c',_0x598a4b],['a',_0x4e70b8],['e',_0x2f1121],['r',_0x4d9c6a],['u',_0x35e088]]);async['loadRevisionData'](_0x29d992,_0x32dfab){if(_0x29d992['diffData']||!_0x32dfab)return;const _0x3fb069=this['editor']['config']['get']('collaboration.channelId'),_0x41688b=await _0x32dfab['getRevision']({'channelId':_0x3fb069,'revisionId':_0x29d992['id']});_0x29d992['diffData']=_0x41688b['diffData'];}['getRevisionDocumentData'](_0x1e5490){const _0x5a339e={};for(const _0x6cc2e2 in _0x1e5490['diffData']){if(_0x1e5490['diffData'][_0x6cc2e2]['attachChange']&&!_0x1e5490['diffData'][_0x6cc2e2]['attachChange']['isAttached'])continue;const _0x1ed33a=this['_removeRevisionMarkers'](JSON['parse'](_0x1e5490['diffData'][_0x6cc2e2]['insertions'])),_0x23e674=this['editor']['editing']['view']['document'],_0x59d08e=new _0x359ce1(_0x23e674,_0x1ed33a['map'](_0x266d23=>this['_getViewFromDiffObj'](_0x266d23,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5a339e[_0x6cc2e2]=this['editor']['data']['processor']['toData'](_0x59d08e),this['editor']['data']['processor']['useFillerType']('default');}return _0x5a339e;}['getRevisionRootsAttributes'](_0x3935fe){const _0x5cbd4c={};for(const _0x4cf27d in _0x3935fe['diffData'])_0x3935fe['diffData'][_0x4cf27d]['attachChange']&&!_0x3935fe['diffData'][_0x4cf27d]['attachChange']['isAttached']||(_0x5cbd4c[_0x4cf27d]=_0x3935fe['diffData'][_0x4cf27d]['attributesAfter']||{});return _0x5cbd4c;}['_getTypeCharForViewElement'](_0x23e889){return this['_viewClassToTypeChar']['get'](_0x23e889['constructor']);}['_getViewFromDiffObj'](_0x36760e,_0x2b409e){const _0x21e937=this['editor']['editing']['view']['document'];if('string'==typeof _0x36760e)return new _0x200728(_0x21e937,_0x36760e);{let _0x191d38,_0x48eff3;_0x48eff3='u'==_0x36760e['type']||'r'==_0x36760e['type']?[]:_0x36760e['children']['map'](_0x28823d=>this['_getViewFromDiffObj'](_0x28823d,_0x2b409e));const _0x4c8a10=this['_typeCharToViewClass']['get'](_0x36760e['type'])||_0x5ff874,_0x4ff097=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x191d38=new _0x4c8a10(_0x21e937,_0x36760e['name'],_0x36760e['attributes'],_0x48eff3),'u'==_0x36760e['type']&&_0x36760e['children'][0x0]){const _0x404f63=_0x36760e['children'][0x0];if(_0x191d38['render']=function(_0x508aa8){const _0x25146f=_0x508aa8['createElement']('div');return _0x25146f['innerHTML']=_0x404f63,_0x25146f['childNodes'][0x0];},_0x2b409e){const _0x330940=new _0x359ce1(_0x21e937);_0x330940['_appendChild'](_0x191d38);const _0x2bfdb7=Array['from'](_0x4ff097['viewChildrenToDom'](_0x330940,{'bind':!0x1})),_0x209002=_0x4ff097['domDocument']['createElement']('div');_0x209002['append'](..._0x2bfdb7),_0x191d38=Array['from'](_0x4ff097['domChildrenToView'](_0x209002))[0x0];}}else{if('r'==_0x36760e['type']&&_0x36760e['children'][0x0]){const _0x51fc80=_0x36760e['children'][0x0];if(_0x191d38['render']=function(_0x4cfcb0){_0x4cfcb0['innerHTML']=_0x51fc80;},_0x2b409e){const _0x58df21=new _0x359ce1(_0x21e937);_0x58df21['_appendChild'](_0x191d38);const _0xb52e2e=Array['from'](_0x4ff097['viewChildrenToDom'](_0x58df21,{'bind':!0x1})),_0x54da20=_0x4ff097['domDocument']['createElement']('div');_0x54da20['append'](..._0xb52e2e);const _0x38d378=Array['from'](_0x4ff097['domChildrenToView'](_0x54da20));_0x38d378['length']>0x1?_0x191d38['_appendChild'](_0x38d378):_0x191d38=_0x38d378[0x0];}}}if(_0x36760e['customProperties']){for(const [_0x41ef8f,_0x3e63a8]of _0x36760e['customProperties'])_0x191d38['_setCustomProperty'](_0x41ef8f,_0x3e63a8);}const _0x13b4e6=void 0x0===_0x36760e['fillerOffset']?null:_0x36760e['fillerOffset'];return null!==_0x13b4e6&&(_0x191d38['getFillerOffset']=()=>_0x13b4e6),_0x191d38;}}['_makeModelFromViewString'](_0x16b5cf){const _0x289538=JSON['parse'](_0x16b5cf),_0x4de3b2=this['editor']['editing']['view']['document'],_0x352b58=new _0x359ce1(_0x4de3b2,_0x289538['map'](_0x48e69d=>this['_getViewFromDiffObj'](_0x48e69d,!0x0)));return this['editor']['data']['toModel'](_0x352b58);}['_removeRevisionMarkers'](_0x37c3e0){return(_0x37c3e0=_0x37c3e0['filter'](_0x5c323c=>!_0x5c323c['name']||'revision-start'!==_0x5c323c['name']&&'revision-end'!==_0x5c323c['name']))['forEach'](_0x51cb12=>{'string'!=typeof _0x51cb12&&(_0x51cb12['children']=this['_removeRevisionMarkers'](_0x51cb12['children']),_0x51cb12['attributes']=_0x51cb12['attributes']['filter'](_0x3fe49e=>!_0x3fe49e[0x0]['startsWith']('data-revision-')));}),_0x37c3e0;}}function R(_0x5eb506,_0x102030,_0x5cc5bb){const t=_0x5eb506['t'];switch(_0x102030){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'},_0x5cc5bb);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5cc5bb);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 _0xb2d8c8{['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[_0x3db46c,S,$,_0x5e678a];}constructor(_0x19ac2c){super(_0x19ac2c),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 _0x148b61=_0x189557();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x148b61},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 _0x3bdd69=this['repository']['getRevision'](0x0),_0x419ff7=_0x3bdd69&&null===_0x3bdd69['creator']?_0x3bdd69:null;if(this['_continueCurrentRevision']=!!_0x419ff7&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0xad3f37=this['_source']['getCurrentRevisionId'](),_0x4c56cb=this['repository']['getRevision'](_0xad3f37);if(_0x4c56cb)this['_startingVersion']=_0x4c56cb['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x434b39=this['_source']['history']['_operations']['find'](_0x19d8d9=>!_0x19d8d9['_isInit']),_0xedb424=_0x434b39?_0x434b39['baseVersion']:this['_source']['history']['version'];_0x3bdd69?(_0x3bdd69['toVersion']<_0xedb424&&_0x3bdd69['_update']({'toVersion':_0xedb424}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x419ff7['id'],this['_startingVersion']=_0x419ff7['fromVersion']):(this['_startingVersion']=_0x3bdd69['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xedb424,this['_continueCurrentRevision']=!0x1);}}else _0x419ff7&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x419ff7['toVersion'],this['editor']['model']['document']['history']['version']),_0x419ff7['fromVersion']===_0x419ff7['toVersion']?(0x0!==_0x419ff7['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x419ff7['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x419ff7['id'],this['_startingVersion']=_0x419ff7['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',_0x4f3822=>!_0x4f3822),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3e91ab=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x39dae5;for(const _0x50ba55 in _0x3e91ab){const _0x58fcab=_0x50ba55,_0x274c7a=_0x3e91ab[_0x58fcab];if('revisionHistoryLicenseKeyValid'==_0x274c7a||'revisionHistoryLicenseKeyInvalid'==_0x274c7a||'revisionHistoryLicenseKeyExpired'==_0x274c7a||'revisionHistoryLicenseKeyDomainLimit'==_0x274c7a||'revisionHistoryLicenseKeyNotAllowed'==_0x274c7a||'revisionHistoryLicenseKeyEvaluationLimit'==_0x274c7a||'revisionHistoryLicenseKeyTrialLimit'==_0x274c7a||'revisionHistoryLicenseKeyUsageLimit'==_0x274c7a){delete _0x3e91ab[_0x58fcab],_0x39dae5=_0x274c7a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x39dae5&&_0x3e91ab['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x39dae5&&_0x3e91ab['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x39dae5&&_0x3e91ab['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x39dae5&&_0x3e91ab['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x39dae5&&_0x3e91ab['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x39dae5&&_0x3e91ab['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x39dae5&&_0x3e91ab['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x58b81d=this['repository']['getRevision'](0x0),_0x526b3a=await this['getRevisionDocumentData'](_0x58b81d),_0x1dc829=await this['getRevisionRootsAttributes'](_0x58b81d);this['_replaceEditorDataWithRevisionData'](_0x526b3a,_0x1dc829);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x190947){this['_source']=_0x190947;}async['update'](){const _0x477793=await this['_source']['getLatestVersion']();if(_0x477793>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5a0d38=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x477793});_0x5a0d38['authors']=_0x5a0d38['authorsIds']['map'](_0x1cd77a=>this['editor']['plugins']['get']('Users')['getUser'](_0x1cd77a)),this['currentRevision']['_update'](_0x5a0d38);}}async['saveRevision'](_0xc41ab1={},_0x363bb6=null){const _0x258a6e=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x363bb6>this['currentRevision']['toVersion']&&(_0x363bb6=null),null===_0x363bb6&&(_0x363bb6=await this['_source']['getLatestVersion']());const _0x4f0409=this['_getFromVersion'](_0x363bb6),_0x7ae4b7=this['buildRevisionData']({'from':_0x4f0409,'to':_0x363bb6});if(this['currentRevision']['toVersion']<_0x363bb6){const _0xd84102=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x363bb6,'to':_0x363bb6});_0xd84102['authors']=[],_0xd84102['authorsIds']=[],_0xd84102['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xd84102,!0x0),delete _0xd84102['authors'],_0x258a6e['push'](_0xd84102);}_0xc41ab1['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0xc41ab1['name']=_0xc41ab1['name']||null,_0xc41ab1['id']=_0xc41ab1['id']||_0x189557(),_0xc41ab1={..._0xc41ab1,..._0x7ae4b7};const _0x134f68=this['addRevisionData'](_0xc41ab1);_0x258a6e['push'](_0xc41ab1);const _0x537f5c=this['repository']['getIndex'](_0x134f68);if(0x0!==_0x537f5c){const _0xab677d=this['repository']['getRevision'](_0x537f5c-0x1);if(_0xab677d['fromVersion']!==_0x363bb6){const _0x195da7=this['_revisionDataBuilder']['getData'](_0x363bb6,_0xab677d['toVersion']),_0x185785={'id':_0xab677d['id'],'diffData':_0x195da7['diffData'],'authorsIds':_0x195da7['authorsIds'],'authors':_0x195da7['authorsIds']['map'](_0x170945=>this['editor']['plugins']['get']('Users')['getUser'](_0x170945)),'fromVersion':_0x363bb6};_0xab677d===this['currentRevision']&&(_0x185785['createdAt']=new Date(_0xc41ab1['createdAt']['getTime']()+0xa)),_0xab677d['_update'](_0x185785,!0x0),delete _0x185785['authors'],_0x258a6e['push'](_0x185785);}}if(this['adapter']){for(const _0x565ee8 of _0x258a6e)this['_bufferUpdate'](_0x565ee8['id'],_0x565ee8,!0x0);this['sendBufferedUpdates']();}return _0x134f68;}['addRevisionData'](_0x50dcfb){const _0x14bc01=this['repository']['createRevision'](_0x50dcfb);return this['adapter']&&_0x14bc01['on']('_update',(_0x559d72,_0x3b62ba,_0xdf54ad)=>{_0xdf54ad||(this['_bufferUpdate'](_0x3b62ba['id'],_0x3b62ba,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x14bc01,this['_findInsertionIndex'](_0x14bc01)),_0x14bc01;}async['getRevisionDocumentData'](_0xd7578f){return await this['_utils']['loadRevisionData'](_0xd7578f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xd7578f);}async['getRevisionRootsAttributes'](_0x3df232){return await this['_utils']['loadRevisionData'](_0x3df232,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3df232);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x15b25f=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x506957=0x0;_0x506957<_0x15b25f['length'];_0x506957++){const _0x12287f=_0x15b25f[_0x506957];let _0x1919b8=!0x1;for(const _0x2eb179 of Object['keys'](_0x12287f))void 0x0===_0x12287f[_0x2eb179]?delete _0x12287f[_0x2eb179]:'id'!==_0x2eb179&&(_0x1919b8=!0x0);_0x1919b8||(_0x15b25f[_0x506957]=null);}if(_0x15b25f=_0x15b25f['filter'](_0x320c44=>null!==_0x320c44),!_0x15b25f['length'])return;for(let _0xa67f1b=0x0;_0xa67f1b<_0x15b25f['length'];_0xa67f1b++){const _0xb51a1c=_0x15b25f[_0xa67f1b];void 0x0!==_0xb51a1c['fromVersion']&&void 0x0===_0xb51a1c['toVersion']&&(_0xb51a1c['toVersion']=this['repository']['getRevision'](_0xb51a1c['id'])['toVersion']),void 0x0!==_0xb51a1c['toVersion']&&void 0x0===_0xb51a1c['fromVersion']&&(_0xb51a1c['fromVersion']=this['repository']['getRevision'](_0xb51a1c['id'])['fromVersion']);}const _0x574c7b=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x15b25f,_0x574c7b)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x594632=>{if(_0x594632){for(const _0x3da5f6 of _0x594632)this['setRevisionData']({'id':_0x3da5f6['id'],'createdAt':_0x3da5f6['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x49270e=null,from:_0x4eeb61=null,to:_0x8d02a=null}){_0x4eeb61=null!==_0x4eeb61?_0x4eeb61:_0x49270e['fromVersion'],_0x8d02a=null!==_0x8d02a?_0x8d02a:_0x49270e['toVersion'];const _0x5c16f7=this['_revisionDataBuilder']['getData'](_0x4eeb61,_0x8d02a),_0x581e36={'diffData':_0x5c16f7['diffData'],'authorsIds':_0x5c16f7['authorsIds'],'fromVersion':_0x4eeb61,'toVersion':_0x8d02a};if(!_0x49270e||_0x8d02a!==_0x49270e['toVersion']){const _0x383f00=_0x8d02a-0x1,_0x6a8799=this['_source']['history']['getOperation'](_0x383f00);_0x581e36['createdAt']=_0x6a8799&&_0x6a8799['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4eeb61===this['_loadedStateData']['fromVersion']){for(const _0x1fdd20 of this['_loadedStateData']['authors'])_0x581e36['authorsIds']['includes'](_0x1fdd20['id'])||_0x581e36['authorsIds']['push'](_0x1fdd20['id']);}return _0x581e36;}['_bufferUpdate'](_0x3f54c7,_0x334725,_0x6f524b){if(this['_bufferedUpdates']['has'](_0x3f54c7)){const _0x351cd1=this['_bufferedUpdates']['get'](_0x3f54c7);_0x334725=_0x6f524b?{..._0x351cd1,..._0x334725}:{..._0x334725,..._0x351cd1};}this['_bufferedUpdates']['set'](_0x3f54c7,_0x334725);}['setRevisionData'](_0x323552){const _0x4a84e8=this['repository']['getRevision'](_0x323552['id']);if(_0x323552['createdAt']&&(_0x323552['createdAt']=new Date(_0x323552['createdAt'])),_0x323552['authorsIds']){const _0x2452a8=this['editor']['plugins']['get']('Users');_0x323552['authors']=_0x323552['authorsIds']['map'](_0x44e9e7=>_0x2452a8['getUser'](_0x44e9e7));}_0x4a84e8['_update'](_0x323552,!0x0);}['_createInitialRevision'](_0x2ad848){const _0x258bcd=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x258bcd)this['_initialRevisionId']=_0x258bcd['id'];else{const _0x5e4ee7=!this['editor']['model']['document']['roots']['find'](_0x4af4b2=>this['editor']['model']['hasContent'](_0x4af4b2)),_0x23535b=this['editor']['plugins']['get']('Users')['me']['id'],_0x4b9d9f=R(this['editor']['locale'],_0x5e4ee7?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2ad848,'to':_0x2ad848,'id':this['_initialRevisionId'],'name':_0x4b9d9f,'creatorId':_0x23535b});}}['_createCurrentRevision'](_0x266f8f){const _0x13fb53=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x13fb53),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x266f8f,'to':_0x266f8f,'id':_0x13fb53,'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'](_0x79300,_0xf93cb1){let _0x46ecbb=this['editor']['config']['get']('initialData'),_0x249d7f=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x46ecbb){_0x46ecbb={};for(const _0x235f04 of this['editor']['model']['document']['getRootNames']())_0x46ecbb[_0x235f04]='';}if('string'==typeof _0x46ecbb&&(_0x46ecbb={'main':_0x46ecbb}),void 0x0===_0x249d7f){_0x249d7f={};for(const _0x3473f2 of this['editor']['model']['document']['getRootNames']())_0x249d7f[_0x3473f2]={};}let _0x316dee=!0x1;const _0x5a557d=Object['keys'](_0x46ecbb),_0x8bbc3e=Object['keys'](_0x79300);for(const _0x403ead of _0x5a557d){if(_0x46ecbb[_0x403ead]!==_0x79300[_0x403ead]&&''!==_0x46ecbb[_0x403ead]['trim']()){_0x316dee=!0x0;break;}if(!_0x2ea464(_0x249d7f[_0x403ead],_0xf93cb1[_0x403ead])&&Object['keys'](_0x249d7f[_0x403ead])['length']>0x0){_0x316dee=!0x0;break;}}_0x316dee||(_0x316dee=_0x8bbc3e['some'](_0x4b7d1a=>!this['editor']['model']['document']['getRoot'](_0x4b7d1a))),_0x316dee&&_0x43e3aa('editor-initial-data-replaced-with-revision-data',{'editorData':_0x46ecbb,'editorRootsAttributes':_0x249d7f,'revisionData':_0x79300,'revisionRootsAttributes':_0xf93cb1}),this['editor']['config']['set']('initialData',_0x79300),this['editor']['config']['set']('rootsAttributes',_0xf93cb1);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x3dfdab=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3dfdab['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2ae3b0){const _0x3f22e9=this['repository']['getRevisions']();_0x3f22e9['reverse']();let _0x56fe34=0x0;for(;_0x56fe34<_0x3f22e9['length'];){const _0x338b99=_0x3f22e9[_0x56fe34];if(_0x338b99===this['currentRevision']){_0x56fe34++;continue;}if(_0x338b99['id']===this['_initialRevisionId'])break;const _0x562583=_0x2ae3b0['toVersion']-_0x338b99['toVersion']||_0x2ae3b0['fromVersion']-_0x338b99['fromVersion'];if(_0x562583>0x0)break;if(_0x562583<0x0)_0x56fe34++;else{if(!_0x2ae3b0['creator']&&_0x338b99['creator'])break;if(_0x338b99['creator']||!_0x2ae3b0['creator']){if(_0x2ae3b0['createdAt']>_0x338b99['createdAt'])break;_0x56fe34++;}else _0x56fe34++;}}return _0x56fe34;}['_getFromVersion'](_0xb8161a){const _0x3cfdbe=this['repository']['getRevisions']();_0x3cfdbe['reverse'](),_0x3cfdbe['shift']();const _0x184f46=_0x3cfdbe['find'](_0x18388f=>_0x18388f['toVersion']<=_0xb8161a)['toVersion'];return _0x184f46<this['_startingVersion']?this['_startingVersion']:_0x184f46;}['_makeRevision']({name:_0x140f09,from:_0x47fd84,to:_0x3d1397,creatorId:_0x599ae7,id:_0x4c76eb}){const _0x164fe9=this['buildRevisionData']({'from':_0x47fd84,'to':_0x3d1397});_0x164fe9['name']=_0x140f09,_0x164fe9['creatorId']=_0x599ae7,_0x164fe9['id']=_0x4c76eb;const _0x104cf4=this['addRevisionData'](_0x164fe9);return this['adapter']&&this['_bufferUpdate'](_0x164fe9['id'],_0x164fe9,!0x0),_0x104cf4;}['_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(_0x1463e5){this['editor']=_0x1463e5,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'](_0x5bb749){this['source']=_0x5bb749;const _0x5d94dc=new Map(),_0x4ecccd=new Map(),_0x150f21=this['editor']['model']['document']['roots']['map'](_0x2f42df=>_0x2f42df['rootName']);for(const _0x4ad82e of _0x150f21){const _0x5b337c=this['editor']['model']['document']['getRoot'](_0x4ad82e),_0x3ad238=x(_0x5b337c);_0x5d94dc['set'](_0x4ad82e,_0x3ad238),_0x4ecccd['set'](_0x4ad82e,Object['fromEntries'](_0x5b337c['getAttributes']()));}const _0x5a6b2a=Array['from'](this['editor']['model']['markers'])['map'](_0x9af257=>[_0x9af257['name'],_0x9af257['getRange']()]),_0x485c70=this['source']['version'];this['_saveMetaData'](_0x485c70,_0x5d94dc,_0x5a6b2a,_0x4ecccd),this['_startingRevisionId']=this['_revisionId'];const _0x51b5c0=new Map(),_0x4feb37=new Map();for(const _0x225763 of _0x150f21){const _0x31a7f2=N(_0x225763);_0x51b5c0['set'](_0x225763,_0x31a7f2),_0x4feb37['set'](_0x225763,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x51b5c0,[],_0x4feb37);}['getData'](_0x771818,_0x1c31a7){if(this['_lastFrom']===_0x771818&&this['_lastTo']<=_0x1c31a7)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1c31a7,!0x0);else{if(!this['_savedMetaData']['has'](_0x771818)){const _0x44ead7=this['_getPreviousFrom'](_0x771818);this['_calculateMetaData'](_0x44ead7,_0x771818,!0x1);}this['_calculateMetaData'](_0x771818,_0x1c31a7,!0x0);}return this['_lastFrom']=_0x771818,this['_lastTo']=_0x1c31a7,this['_getState']();}['loadState'](_0x39529b){const _0x5894d9=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x39529b['fromVersion'],this['_lastTo']=_0x39529b['toVersion'];for(const _0x2ae60e in _0x39529b['diffData']){const _0x32fb9c=_0x39529b['diffData'][_0x2ae60e]['attachChange'],_0x4b6803=_0x240ca5(_0x39529b['diffData'][_0x2ae60e]['attributesBefore'])||{},_0x2eae9b=_0x5894d9['_makeModelFromViewString'](_0x39529b['diffData'][_0x2ae60e]['deletions']);_0x2eae9b['rootName']=_0x2ae60e,_0x2eae9b['_isAttached']=!_0x32fb9c||!_0x32fb9c['isAttached'],_0x2eae9b['isAttached']=()=>_0x2eae9b['_isAttached'],this['_baseRoots']['set'](_0x2ae60e,_0x2eae9b),this['_baseRootsAttributes']['set'](_0x2ae60e,_0x4b6803),_0x32fb9c&&this['_touchedRoots']['set'](_0x2ae60e,_0x32fb9c);const _0x452ebd=this['_makeIdsRoot'](_0x2eae9b);this['_baseIdsRoots']['set'](_0x2ae60e,_0x452ebd);for(const [_0x24f54a,_0x5eb7ff]of _0x2eae9b['markers']){if(!_0x24f54a['startsWith']('revision:'))continue;const _0x595a12=_0x24f54a['split'](':')[0x2];for(const _0x1f5790 of _0x5eb7ff['getWalker']({'singleCharacters':!0x0})){const _0x4f9b59=this['_getVidAttributeName'](_0x1f5790),_0x1a8461='elementEnd'==_0x1f5790['type']?_0x1f5790['previousPosition']['path']['slice'](0x0,-0x1):_0x1f5790['previousPosition']['path'],_0x5b52fa=_0x452ebd['getNodeByPath'](_0x1a8461)['getAttribute'](_0x4f9b59);this['_touched']['set'](_0x5b52fa,{'userId':_0x595a12});}}}this['_startingRevisionId']=this['_revisionId'];const _0xaee37a=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x554b36=>!this['_touched']['has'](_0x554b36));let _0x3e5e16=0x0;const _0x2de089=new Map();for(const _0x897a36 in _0x39529b['diffData']){const _0x180dcc=_0x39529b['diffData'][_0x897a36]['attachChange'],_0x395c3b=_0x240ca5(_0x39529b['diffData'][_0x897a36]['attributesAfter'])||{},_0x427c25=_0x5894d9['_makeModelFromViewString'](_0x39529b['diffData'][_0x897a36]['insertions']);_0x427c25['rootName']=_0x897a36,_0x427c25['_isAttached']=!_0x180dcc||_0x180dcc['isAttached'],_0x427c25['isAttached']=()=>_0x427c25['_isAttached'],this['_diffRoots']['set'](_0x897a36,_0x427c25),this['_diffRootsAttributes']['set'](_0x897a36,_0x395c3b);const _0x1fe5cf=this['_makeIdsRoot'](_0x427c25,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x897a36,_0x1fe5cf),_0x2de089['set'](_0x897a36,_0x427c25['isAttached']()?_0x395c3b:{});for(const [_0x31b7ea,_0xbdb094]of _0x427c25['markers']){if(!_0x31b7ea['startsWith']('revision:'))continue;const _0x22a2e5=_0x31b7ea['split'](':')[0x2];for(const _0x1ac844 of _0xbdb094['getWalker']({'singleCharacters':!0x0})){const _0x134cfb=this['_getVidAttributeName'](_0x1ac844),_0x213128=this['_revisionId']++,_0xa3e41d='elementEnd'==_0x1ac844['type']?_0x1ac844['previousPosition']['path']['slice'](0x0,-0x1):_0x1ac844['previousPosition']['path'];_0x1fe5cf['getNodeByPath'](_0xa3e41d)['_setAttribute'](_0x134cfb,_0x213128),this['_touched']['set'](_0x213128,{'userId':_0x22a2e5});}}for(const _0x2b73fd of this['editor']['model']['createRangeIn'](_0x427c25)['getWalker']({'singleCharacters':!0x0})){const _0x24c715=this['_getVidAttributeName'](_0x2b73fd),_0x4dcb05='elementEnd'==_0x2b73fd['type']?_0x2b73fd['previousPosition']['path']['slice'](0x0,-0x1):_0x2b73fd['previousPosition']['path'],_0x36d38c=_0x1fe5cf['getNodeByPath'](_0x4dcb05);_0x36d38c['getAttribute'](_0x24c715)>0x0||_0x36d38c['_setAttribute'](_0x24c715,_0xaee37a[_0x3e5e16++]);}for(const [_0x1c2119,_0x1a1c74]of _0x427c25['markers'])_0x1c2119['startsWith']('revision:')||this['_markers']['set'](_0x1c2119,_0x1a1c74);}const _0x5bc978=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x5bc978),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5bc978,0x1));const _0xe6bc74=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0xe6bc74),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xe6bc74,0x1));const _0x5d3e71=Array['from'](this['_diffRoots'])['map'](([_0x19df89,_0x15fed3])=>[_0x19df89,x(_0x15fed3)]);this['_saveMetaData'](this['_lastTo'],_0x5d3e71,this['_markers'],_0x2de089);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x16bd3f,_0x27e88e,_0x15343e,_0xa46ff8){const _0x250dff=new Map(_0x27e88e),_0x789e7e=new Map(_0x240ca5(_0xa46ff8)),_0x499805=new Map();for(const [_0x3bdf98,_0x3ecbba]of _0x15343e)_0x499805['set'](_0x3bdf98,{'start':_0x3ecbba['start']['clone'](),'end':_0x3ecbba['end']['clone'](),'rootName':_0x3ecbba['root']['rootName']});this['_savedMetaData']['set'](_0x16bd3f,{'roots':_0x250dff,'markers':_0x499805,'rootsAttributes':_0x789e7e});}['_removeMetaData'](_0x3dbd3b){this['_savedMetaData']['delete'](_0x3dbd3b);}['_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'](_0x31cc68,_0x5cbfa1=null){let _0x2c7c8b=null;_0x31cc68['is']('documentFragment')||(_0x2c7c8b=new _0x429deb(_0x31cc68['name'],{'vid_start':null===_0x5cbfa1?this['_revisionId']++:_0x5cbfa1++}));const _0x323f04=[];for(const _0x4431c0 of _0x31cc68['getChildren']())if(_0x4431c0['is']('element')){_0x323f04['push'](this['_makeIdsRoot'](_0x4431c0,_0x5cbfa1));const _0xae4578=_0x323f04[_0x323f04['length']-0x1];null!==_0x5cbfa1&&(_0x5cbfa1=_0xae4578['is']('element','$text')?_0xae4578['getAttribute']('vid')+0x1:_0xae4578['getAttribute']('vid_end')+0x1);}else{for(let _0x4badae=0x0;_0x4badae<_0x4431c0['offsetSize'];_0x4badae++)_0x323f04['push'](new _0x429deb('$text',{'vid':null===_0x5cbfa1?this['_revisionId']++:_0x5cbfa1++}));}if(_0x31cc68['is']('documentFragment')){const _0x5c572f=N(_0x31cc68['rootName']);return _0x5c572f['_insertChild'](0x0,_0x323f04),_0x5c572f;}return _0x2c7c8b['_setAttribute']('vid_end',null===_0x5cbfa1?this['_revisionId']++:_0x5cbfa1++),_0x2c7c8b['_insertChild'](0x0,_0x323f04),_0x2c7c8b;}['_calculateMetaData'](_0x4014b7,_0x4ceb16,_0x439bf3){this['_reset']();const {roots:_0x5a2b12,markers:_0x911f39,rootsAttributes:_0x219c0f}=this['_savedMetaData']['get'](_0x4014b7);this['_baseRoots']=new Map(_0x5a2b12),this['_baseRootsAttributes']=new Map(_0x240ca5(_0x219c0f));for(const [_0x42d25f,_0x799095]of this['_baseRoots'])if('$graveyard'!==_0x42d25f&&(this['_diffRoots']['set'](_0x42d25f,x(_0x799095)),this['_diffRootsAttributes']=new Map(_0x240ca5(_0x219c0f)),_0x439bf3)){const _0x553541=this['_revisionId'];this['_idsRoots']['set'](_0x42d25f,this['_makeIdsRoot'](_0x799095)),this['_baseIdsRoots']['set'](_0x42d25f,this['_makeIdsRoot'](_0x799095,_0x553541));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x439bf3&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x27867a,_0x796357]of _0x911f39){const _0x45338f=this['_baseRoots']['get'](_0x796357['rootName']),_0x5c5159=this['_diffRoots']['get'](_0x796357['rootName']),_0x2528c4=new _0x5d129e(this['_fixPosition'](_0x796357['start'],_0x45338f),this['_fixPosition'](_0x796357['end'],_0x45338f)),_0x420d39=this['_fixRange'](_0x2528c4,_0x5c5159);_0x45338f['markers']['set'](_0x27867a,_0x2528c4),this['_markers']['set'](_0x27867a,_0x420d39);}this['_applyOperations'](_0x4014b7,_0x4ceb16,_0x439bf3);}['_applyOperations'](_0x212971,_0x65ecc6,_0x1d1ade){for(const _0x3f5593 of this['source']['getOperations'](_0x212971,_0x65ecc6))this['_handleOperation'](_0x3f5593,_0x1d1ade);for(const _0x46a526 of this['_diffRoots']['values']())_0x46a526['markers']['clear']();for(const [_0x3d56a5,_0x5f16f1]of this['_markers']){this['_diffRoots']['get'](_0x5f16f1['root']['rootName'])['markers']['set'](_0x3d56a5,_0x5f16f1['clone']());}const _0x13781a=new Map(),_0x183eef=new Map();for(const [_0xc868ef,_0x4af6d2]of this['_diffRoots'])_0x13781a['set'](_0xc868ef,x(_0x4af6d2)),_0x183eef['set'](_0xc868ef,this['_diffRootsAttributes']['get'](_0xc868ef));this['_saveMetaData'](_0x65ecc6,_0x13781a,this['_markers'],_0x183eef);}['_getPreviousFrom'](_0x226b70){const _0x3eb6eb=Array['from'](this['_savedMetaData']['keys']());_0x3eb6eb['sort']((_0x3907b5,_0x449b35)=>_0x3907b5-_0x449b35),_0x3eb6eb['reverse']();for(const _0x565c04 of _0x3eb6eb)if(_0x565c04<_0x226b70)return _0x565c04;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1fde7d,_0x25c720){const _0x463ba0=Array['from'](_0x25c720['markers'])['map'](([_0x10adf2,_0x45e6a3])=>[_0x10adf2,this['_fixRange'](_0x45e6a3,_0x1fde7d)]);_0x1fde7d['markers']=new Map(_0x463ba0);}['_transformMarkers'](_0xc963eb){for(const _0x47f794 of this['_markers']['values']()){const _0xe75640=_0x47f794['getTransformedByOperation'](_0xc963eb),_0x78eed6=_0x5d129e['_createFromRanges'](_0xe75640);_0x47f794['start']=_0x78eed6['start'],_0x47f794['end']=_0x78eed6['end'];}}['_handleOperation'](_0x4a1b27,_0x159042){if('addRoot'!=_0x4a1b27['type']&&'detachRoot'!=_0x4a1b27['type']){if('insert'==_0x4a1b27['type']){const _0x517bd6=_0x4a1b27['position']['root']['rootName'];this['_diffRoots']['has'](_0x517bd6)||(this['_diffRoots']['set'](_0x517bd6,N(_0x517bd6,!0x0)),this['_diffRootsAttributes']['set'](_0x517bd6,{}),_0x159042&&this['_idsRoots']['set'](_0x517bd6,N(_0x517bd6,!0x0)));}else{if('addRootAttribute'==_0x4a1b27['type']||'removeRootAttribute'==_0x4a1b27['type']||'changeRootAttribute'==_0x4a1b27['type'])return void this['_handleRootAttributeOperation'](_0x4a1b27);'marker'==_0x4a1b27['type']&&this['_handleMarkerOperation'](_0x4a1b27);}if('marker'!==_0x4a1b27['type']){const _0x3f6e59=this['_cloneOperation'](_0x4a1b27,this['_diffRoots']);_0x3f6e59['_execute'](),this['_transformMarkers'](_0x3f6e59);}if(_0x159042)switch(_0x4a1b27['type']){case'insert':this['_handleInsertOperation'](_0x4a1b27);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4a1b27);break;case'merge':this['_handleMergeOperation'](_0x4a1b27);break;case'split':this['_handleSplitOperation'](_0x4a1b27);}}else this['_handleRootOperation'](_0x4a1b27,_0x159042);}['_cloneOperation'](_0x3d1985,_0x59ea2a){const _0x3374fe=_0x3d1985['clone']();return _0x3374fe['_authorId']=_0x3d1985['_authorId'],this['_fixOperation'](_0x3374fe,_0x59ea2a),_0x3374fe;}['_getBaseVids'](_0x9f261f){return _0x9f261f['map'](_0x1421c6=>{const _0xc70dcd=this['_getVidAttributeName'](_0x1421c6);return Number(_0x1421c6['item']['getAttribute'](_0xc70dcd));});}['_generateTape'](_0x8a4d8f,_0x1fae98){if(_0x8a4d8f['is']('element','$text'))_0x1fae98['push']({'item':_0x8a4d8f,'type':'text'});else{_0x8a4d8f['is']('element')&&_0x1fae98['push']({'item':_0x8a4d8f,'type':'elementStart'});for(const _0x283539 of _0x8a4d8f['getChildren']())this['_generateTape'](_0x283539,_0x1fae98);_0x8a4d8f['is']('element')&&_0x1fae98['push']({'item':_0x8a4d8f,'type':'elementEnd'});}return _0x1fae98;}['_getState'](){const _0x3f1367=new Map(this['_touched']),_0x536f13=new Map(_0x3f1367),_0x3c80dd=new Map(),_0x5371d0={'insertions':{},'deletions':{}},_0x107cce={'insertions':{},'deletions':{}},_0x5d715b=new Map(),_0x51c616=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x51c616['delete']('$graveyard');for(const _0x30ce46 of _0x51c616){const _0x377f15=this['_diffRoots']['get'](_0x30ce46)||N(_0x30ce46,!0x1),_0x386e36=this['_baseRoots']['get'](_0x30ce46)||N(_0x30ce46,!0x1);_0x377f15['isAttached']()||_0x386e36['isAttached']()?(_0x5371d0['insertions'][_0x30ce46]=x(_0x377f15),_0x5371d0['deletions'][_0x30ce46]=x(_0x386e36),this['_copyMarkers'](_0x5371d0['deletions'][_0x30ce46],_0x386e36),this['_copyMarkers'](_0x5371d0['insertions'][_0x30ce46],_0x377f15),_0x107cce['insertions'][_0x30ce46]=this['_generateTape'](this['_idsRoots']['get'](_0x30ce46),[]),_0x107cce['deletions'][_0x30ce46]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x30ce46)||N(_0x30ce46,!0x1),[])):_0x51c616['delete'](_0x30ce46);}for(const _0x327600 of _0x51c616){const _0x4d22cc=_0x107cce['insertions'][_0x327600];for(const _0x565a86 of _0x4d22cc){const _0xe167f5=this['_getVidAttributeName'](_0x565a86),_0x5dafc2=_0x565a86['item']['getAttribute'](_0xe167f5);_0x536f13['delete'](_0x5dafc2),_0x5dafc2>=this['_startingRevisionId']&&_0x3c80dd['set'](_0x5dafc2,_0x3f1367['get'](_0x5dafc2));}}for(const _0x3de0d8 of _0x51c616){const _0x8b0978=_0x107cce['insertions'][_0x3de0d8],_0x29e024=this['_getBaseVids'](_0x107cce['deletions'][_0x3de0d8]);let _0x1644c5=0x0;for(const _0x29bec2 of _0x8b0978){const _0x3f76e8=this['_getVidAttributeName'](_0x29bec2),_0x3d8b2b=_0x29bec2['item']['getAttribute'](_0x3f76e8);if(!_0x3c80dd['has'](_0x3d8b2b)&&!_0x5d715b['has'](_0x3d8b2b)){if(_0x536f13['has'](_0x3d8b2b))_0x1644c5++;else{if(_0x3d8b2b!=_0x29e024[_0x1644c5]){const _0x54e8c2=_0x3f1367['get'](_0x3d8b2b)||_0x3f1367['get'](_0x29e024[_0x1644c5]);for(;_0x3d8b2b!=_0x29e024[_0x1644c5];)_0x536f13['has'](_0x29e024[_0x1644c5])||(_0x5d715b['set'](_0x29e024[_0x1644c5],_0x54e8c2),_0x3f1367['set'](_0x29e024[_0x1644c5],_0x54e8c2)),_0x1644c5++;}_0x1644c5++;}}}}for(const _0x4be90a of _0x51c616){const _0x549d93=_0x107cce['insertions'][_0x4be90a];for(const _0x364231 of _0x549d93){const _0x4e1c3e=this['_getVidAttributeName'](_0x364231),_0x507555=_0x364231['item']['getAttribute'](_0x4e1c3e);if(_0x5d715b['has'](_0x507555)){const _0x491558=_0x5d715b['get'](_0x507555);_0x536f13['has'](_0x507555)||_0x536f13['set'](_0x507555,{..._0x491558}),_0x3c80dd['set'](_0x507555,{..._0x491558});}}}for(const _0xe2e6fe of _0x536f13['keys']())_0xe2e6fe>=this['_startingRevisionId']&&_0x536f13['delete'](_0xe2e6fe);const _0x1ce849=new Map();for(const _0x4ab2c7 of _0x51c616){let _0x5c4c97=_0x107cce['insertions'][_0x4ab2c7];for(const _0xb62435 of _0x5c4c97)if(_0xb62435['item']['is']('element','tableCell')){const _0x14d861=this['_getVidAttributeName'](_0xb62435),_0x51e33d=_0xb62435['item']['getAttribute'](_0x14d861);if(_0x3c80dd['has'](_0x51e33d)){const _0x2f1bbb=_0xb62435['item']['parent']['parent']['getAttribute']('vid_start'),_0x41532b=_0x1ce849['get'](_0x2f1bbb)||new Set();_0x41532b['add'](_0x3c80dd['get'](_0x51e33d)['userId']),_0x1ce849['set'](_0x2f1bbb,_0x41532b);}}_0x5c4c97=_0x107cce['deletions'][_0x4ab2c7];for(const _0x47bf38 of _0x5c4c97)if(_0x47bf38['item']['is']('element','tableCell')){const _0x3e1fea=this['_getVidAttributeName'](_0x47bf38),_0x34c5c1=_0x47bf38['item']['getAttribute'](_0x3e1fea);if(_0x536f13['has'](_0x34c5c1)){const _0x433678=_0x47bf38['item']['parent']['parent']['getAttribute']('vid_start'),_0x1ac488=_0x1ce849['get'](_0x433678)||new Set();_0x1ac488['add'](_0x536f13['get'](_0x34c5c1)['userId']),_0x1ce849['set'](_0x433678,_0x1ac488);}}for(const _0x706f1 of _0x1ce849['keys']())(_0x3c80dd['has'](_0x706f1)||_0x536f13['has'](_0x706f1))&&_0x1ce849['delete'](_0x706f1);}for(const _0x278217 of _0x51c616){const _0x3dae1c=_0x107cce['insertions'][_0x278217];let _0x4f758f=null,_0x30a904=null;for(const _0x1b9e52 of _0x3dae1c){const _0x4dd45c=this['_getVidAttributeName'](_0x1b9e52),_0x15c36c=_0x1b9e52['item']['getAttribute'](_0x4dd45c),_0x2afcbc=_0x1ce849['get'](_0x15c36c);_0x2afcbc&&'elementStart'==_0x1b9e52['type']&&(_0x4f758f=Array['from'](_0x2afcbc)[0x0],_0x30a904=_0x1b9e52['item']['getAttribute']('vid_end')),_0x4f758f&&(_0x536f13['set'](_0x15c36c,{'userId':_0x4f758f}),_0x3c80dd['set'](_0x15c36c,{'userId':_0x4f758f})),_0x15c36c==_0x30a904&&(_0x4f758f=null,_0x30a904=null);}}const _0x3237c={},_0x1a40e3=new Set();for(const _0x4e7094 of _0x51c616){const _0x6f33e3=_0x5371d0['deletions'][_0x4e7094],_0xf6a8e2=_0x5371d0['insertions'][_0x4e7094];for(const {userId:_0x9fe85c}of this['_touchedMarkers']['values']())null!==_0x9fe85c&&_0x1a40e3['add'](_0x9fe85c);for(const {userId:_0x2f08d1}of this['_touchedRoots']['values']())null!==_0x2f08d1&&_0x1a40e3['add'](_0x2f08d1);this['_markChanges'](_0xf6a8e2,_0x107cce['insertions'][_0x4e7094],_0x3c80dd,'insertion',_0x1a40e3),this['_markChanges'](_0x6f33e3,_0x107cce['deletions'][_0x4e7094],_0x536f13,'deletion',_0x1a40e3),_0x3237c[_0x4e7094]={'insertions':this['_prepareViewToSave'](_0xf6a8e2),'deletions':this['_prepareViewToSave'](_0x6f33e3),'attachChange':this['_touchedRoots']['get'](_0x4e7094)||null,'attributesBefore':_0x240ca5(this['_baseRootsAttributes']['get'](_0x4e7094))||{},'attributesAfter':_0x240ca5(this['_diffRootsAttributes']['get'](_0x4e7094))};}return{'diffData':_0x3237c,'authorsIds':Array['from'](_0x1a40e3)};}['_processRootBeforeSave'](_0x150e6b){for(const [,_0x598441]of _0x150e6b['markers']){const _0xa0cd71=_0x598441['start']['getAncestors']()['filter'](_0x16e923=>'tableCell'==_0x16e923['name']);for(const _0x2cf1a5 of _0xa0cd71)0x1==_0x2cf1a5['childCount']&&_0x2cf1a5['getChild'](0x0)['is']('element','paragraph')&&_0x2cf1a5['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1654ab){this['_processRootBeforeSave'](_0x1654ab);const _0x5c93cc=this['editor']['data']['toView'](_0x1654ab,{}),_0x5100b0=Array['from'](_0x5c93cc['getChildren']())['map'](_0x9daa70=>this['_getViewJson'](_0x9daa70));return JSON['stringify'](_0x5100b0);}['_getViewJson'](_0x2ed4c0){if(_0x2ed4c0['is']('$text'))return _0x2ed4c0['data'];{const _0x20195c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4a0c55=_0x2ed4c0,_0x36f178=this['editor']['data']['htmlProcessor']['domConverter'],_0x316f08={'type':_0x20195c['_getTypeCharForViewElement'](_0x4a0c55),'name':_0x4a0c55['name'],'attributes':Array['from'](_0x4a0c55['getAttributes']()),'children':Array['from'](_0x4a0c55['getChildren']())['map'](_0x17d07c=>this['_getViewJson'](_0x17d07c))};if(_0x2ed4c0['is']('uiElement')&&'$comment'!=_0x2ed4c0['name']){const _0x4e254e=_0x2ed4c0['render'](_0x36f178['domDocument'],_0x36f178);_0x316f08['children']['push'](_0x4e254e['outerHTML']);}else{if(_0x2ed4c0['is']('rawElement')){const _0x512148=_0x36f178['domDocument']['createElement'](_0x4a0c55['name']);_0x2ed4c0['render'](_0x512148,_0x36f178),_0x316f08['children']['push'](_0x512148['innerHTML']);}}const _0x1ca131=Array['from'](_0x4a0c55['getCustomProperties']());_0x1ca131['length']>0x0&&(_0x316f08['customProperties']=_0x1ca131);const _0x22bdf3=_0x4a0c55['getFillerOffset']();return null!==_0x22bdf3&&(_0x316f08['fillerOffset']=_0x22bdf3),_0x316f08;}}['_markChanges'](_0x13abb6,_0x444749,_0x23b830,_0x640deb,_0x2db6ff){let _0x3224c0=null,_0x470154=null,_0x34ab0a=0x0;const _0x250e84=this['editor']['model'];for(let _0x699022=0x0;_0x699022<_0x444749['length'];_0x699022++){const _0x795d69=this['_getVidAttributeName'](_0x444749[_0x699022]),_0x2e9335=_0x444749[_0x699022]['item']['getAttribute'](_0x795d69),_0x11bcc7=_0x23b830['get'](_0x2e9335),_0x5be963=_0x699022==_0x444749['length']-0x1;(!_0x3224c0&&_0x11bcc7&&(_0x3224c0=_0x11bcc7,_0x470154=_0x444749[_0x699022]),_0x3224c0&&(!_0x11bcc7||_0x11bcc7['userId']!=_0x3224c0['userId']))&&(_0xc3ac46(_0x11bcc7,P(_0x470154,_0x13abb6,_0x250e84),P(_0x444749[_0x699022],_0x13abb6,_0x250e84)),_0x3224c0=_0x11bcc7||null,_0x470154=_0x11bcc7?_0x444749[_0x699022]:null),_0x3224c0&&_0x5be963&&_0xc3ac46(_0x11bcc7,P(_0x470154,_0x13abb6,_0x250e84),V(_0x444749[_0x699022],_0x13abb6,_0x250e84));}function _0xc3ac46(_0x112f4d,_0x1129d1,_0x562d2c){const _0x249ab1=_0x3224c0['userId'],_0xa38404='revision:'+_0x640deb+':'+_0x249ab1+':'+_0x34ab0a++,_0x433533=_0x250e84['createRange'](_0x1129d1,_0x562d2c);_0x13abb6['markers']['set'](_0xa38404,_0x433533),null!==_0x249ab1&&_0x2db6ff['add'](_0x249ab1);}}['_getVidAttributeName'](_0x152dcd){switch(_0x152dcd['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x38ed19,_0x147f10){_0x38ed19['baseVersion']=null;for(const _0xc06862 in _0x38ed19){const _0x84aaa=_0x38ed19[_0xc06862];if(_0x84aaa instanceof _0x569535){const _0x5738f3=_0x147f10['get'](_0x84aaa['root']['rootName']);_0x38ed19[_0xc06862]=this['_fixPosition'](_0x84aaa,_0x5738f3);}if(_0x84aaa instanceof _0x5d129e){const _0x5523f6=_0x147f10['get'](_0x84aaa['root']['rootName']);_0x38ed19[_0xc06862]=this['_fixRange'](_0x84aaa,_0x5523f6);}'root'===_0xc06862&&(_0x38ed19['root']=_0x147f10['get'](_0x38ed19['root']['rootName']));}}['_fixRange'](_0x83a7dc,_0x26602c){return this['editor']['model']['createRange'](this['_fixPosition'](_0x83a7dc['start'],_0x26602c),this['_fixPosition'](_0x83a7dc['end'],_0x26602c));}['_fixPosition'](_0x3b3cef,_0x42fd6b){return this['editor']['model']['createPositionFromPath'](_0x42fd6b,_0x3b3cef['path'],_0x3b3cef['stickiness']);}['_handleInsertOperation'](_0x219246){const _0x121abc=this['_idsRoots']['get'](_0x219246['position']['root']['rootName']),_0x1e09f5=this['_fixPosition'](_0x219246['position'],_0x121abc),_0x402175=null===_0x219246['_authorId']?null:_0x219246['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x16eef9=_0x1e09f5['parent'],_0x1130aa=this['_revisionId'],_0x3d0edf=[];for(const _0x169b58 of _0x219246['nodes'])if(_0x169b58['is']('element'))_0x3d0edf['push'](this['_makeIdsRoot'](_0x169b58));else{for(let _0x1d43aa=0x0;_0x1d43aa<_0x169b58['offsetSize'];_0x1d43aa++)_0x3d0edf['push'](new _0x429deb('$text',{'vid':this['_revisionId']++}));}const _0x20cddf=this['_revisionId'];for(let _0x3641ca=_0x1130aa;_0x3641ca<_0x20cddf;_0x3641ca++)this['_touched']['set'](_0x3641ca,{'userId':_0x402175});_0x16eef9['_insertChild'](_0x1e09f5['offset'],_0x3d0edf);}['_handleMoveOperation'](_0x45d48a){(_0x45d48a=this['_cloneOperation'](_0x45d48a,this['_idsRoots']))['_execute']();const _0x153ac3=null===_0x45d48a['_authorId']?null:_0x45d48a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3189e0=_0x45d48a['getMovedRangeStart'](),_0x3699f8=_0x3189e0['parent'],_0xfc3790=_0x3189e0['offset'];!function _0xa56eae(_0x54fa1c,_0x3deee4,_0x54cc2c,_0x377e15){for(let _0x2d885f=_0x54cc2c;_0x2d885f<_0x377e15;_0x2d885f++){const _0x149319=_0x3deee4['getChild'](_0x2d885f);_0x149319['is']('element','$text')?_0x54fa1c['set'](_0x149319['getAttribute']('vid'),{'userId':_0x153ac3}):(_0x54fa1c['set'](_0x149319['getAttribute']('vid_start'),{'userId':_0x153ac3}),_0xa56eae(_0x54fa1c,_0x149319,0x0,_0x149319['childCount']),_0x54fa1c['set'](_0x149319['getAttribute']('vid_end'),{'userId':_0x153ac3}));}}(this['_touched'],_0x3699f8,_0xfc3790,_0xfc3790+_0x45d48a['howMany']);}['_handleMergeOperation'](_0x3c96d2){const _0x2c6993=null===(_0x3c96d2=this['_cloneOperation'](_0x3c96d2,this['_idsRoots']))['_authorId']?null:_0x3c96d2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x57396f=_0x3c96d2['targetPosition']['parent'],_0xc907c6=_0x3c96d2['sourcePosition']['parent'],_0xe914dd=_0x57396f['getAttribute']('vid_end'),_0x2408ae=_0xc907c6['getAttribute']('vid_start');_0x57396f['_setAttribute']('vid_end',_0xc907c6['getAttribute']('vid_end')),_0xc907c6['_setAttribute']('vid_end',_0xe914dd),this['_touched']['set'](_0x2408ae,{'userId':_0x2c6993}),this['_touched']['set'](_0xe914dd,{'userId':_0x2c6993}),_0x3c96d2['_execute']();}['_handleSplitOperation'](_0x428f99){const _0x2b115c=null===(_0x428f99=this['_cloneOperation'](_0x428f99,this['_idsRoots']))['_authorId']?null:_0x428f99['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x47955f=_0x428f99['graveyardPosition'],_0x44a7e1=_0x428f99['splitPosition']['parent'];_0x428f99['_execute']();const _0x4eb6c1=_0x44a7e1['getAttribute']('vid_end'),_0xdd7676=_0x428f99['insertionPosition']['nodeAfter'];if(_0x47955f){const _0x336cba=_0xdd7676['getAttribute']('vid_end'),_0x2eb9bf=_0x44a7e1['getAttribute']('vid_end');_0x44a7e1['_setAttribute']('vid_end',_0x336cba),_0xdd7676['_setAttribute']('vid_end',_0x2eb9bf),this['_touched']['set'](_0x44a7e1['getAttribute']('vid_end'),{'userId':_0x2b115c}),this['_touched']['set'](_0xdd7676['getAttribute']('vid_start'),{'userId':_0x2b115c});}else{const _0x34bc7d=this['_revisionId']++,_0x22d8b4=this['_revisionId']++;_0x44a7e1['_setAttribute']('vid_end',_0x34bc7d),_0xdd7676['_setAttribute']('vid_start',_0x22d8b4),_0xdd7676['_setAttribute']('vid_end',_0x4eb6c1),this['_touched']['set'](_0x34bc7d,{'userId':_0x2b115c}),this['_touched']['set'](_0x22d8b4,{'userId':_0x2b115c});}}['_handleMarkerOperation'](_0x1a38a5){if(!_0x1a38a5['affectsData'])return;const _0x3cad68=(_0x1a38a5=this['_cloneOperation'](_0x1a38a5,this['_diffRoots']))['oldRange']?_0x1a38a5['oldRange']['root']:null,_0x130321=_0x1a38a5['newRange']?_0x1a38a5['newRange']['root']:null;_0x3cad68&&this['_markers']['delete'](_0x1a38a5['name']),_0x130321&&this['_markers']['set'](_0x1a38a5['name'],_0x1a38a5['newRange']['clone']());const _0x34e90e=null===_0x1a38a5['_authorId']?null:_0x1a38a5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x34adc8=_0x1a38a5['name'];if(!this['_touchedMarkers']['has'](_0x34adc8))return void this['_touchedMarkers']['set'](_0x34adc8,{'range':_0x1a38a5['oldRange'],'userId':_0x34e90e});const _0x14f4de=this['_touchedMarkers']['get'](_0x34adc8),_0x222426=_0x14f4de['range'],_0x3293a9=_0x1a38a5['newRange'];null==_0x222426&&null==_0x3293a9||_0x222426&&_0x3293a9&&_0x222426['isEqual'](_0x3293a9)?this['_touchedMarkers']['delete'](_0x1a38a5['name']):_0x14f4de['userId']=_0x34e90e;}['_handleRootOperation'](_0x47719c,_0x3053eb){this['_diffRoots']['has'](_0x47719c['rootName'])?this['_diffRoots']['get'](_0x47719c['rootName'])['_isAttached']=_0x47719c['isAdd']:(this['_diffRoots']['set'](_0x47719c['rootName'],N(_0x47719c['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x47719c['rootName'],{}),_0x3053eb&&this['_idsRoots']['set'](_0x47719c['rootName'],N(_0x47719c['rootName'],!0x0)));const _0x4c623b=null===_0x47719c['_authorId']?null:_0x47719c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x505a9f=this['_touchedRoots']['get'](_0x47719c['rootName']);_0x505a9f&&_0x505a9f['userId']===_0x4c623b?this['_touchedRoots']['delete'](_0x47719c['rootName']):this['_touchedRoots']['set'](_0x47719c['rootName'],{'userId':_0x4c623b,'isAttached':_0x47719c['isAdd']});}['_handleRootAttributeOperation'](_0x13e1f4){const _0x34acfc=this['_diffRootsAttributes']['get'](_0x13e1f4['root']['rootName']);null===_0x13e1f4['newValue']?delete _0x34acfc[_0x13e1f4['key']]:_0x34acfc[_0x13e1f4['key']]=_0x13e1f4['newValue'];}}function x(_0x5230e6){const _0x1383f0=N(_0x5230e6['rootName'],_0x5230e6['isAttached']());for(const _0x5a13b5 of _0x5230e6['getChildren']()){const _0x49ade1=_0x5a13b5['_clone'](!0x0);_0x1383f0['_appendChild'](_0x49ade1);}return _0x1383f0;}function N(_0x5aadc6,_0x1ed642=!0x0){const _0x545f46=new _0x24ebb7();return _0x545f46['rootName']=_0x5aadc6,_0x545f46['_isAttached']=_0x1ed642,_0x545f46['isAttached']=()=>_0x545f46['_isAttached'],_0x545f46;}function P(_0x1d0139,_0x57faaf,_0x24d486){const _0x39915d='elementEnd'==_0x1d0139['type']?_0x24d486['createPositionAt'](_0x1d0139['item'],'end'):_0x24d486['createPositionBefore'](_0x1d0139['item']);return _0x24d486['createPositionFromPath'](_0x57faaf,_0x39915d['path'],_0x39915d['stickiness']);}function V(_0x3da172,_0x2a53db,_0xbfd8e7){const _0x3bb3d9='elementStart'==_0x3da172['type']?_0xbfd8e7['createPositionAt'](_0x3da172['item'],0x0):_0xbfd8e7['createPositionAfter'](_0x3da172['item']);return _0xbfd8e7['createPositionFromPath'](_0x2a53db,_0x3bb3d9['path'],_0x3bb3d9['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
- _0x3f52ee(_0x2d670e){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1e25ef,_0x56a017){super(_0x1e25ef),this['focusTracker']=new _0x408ec4(),this['keystrokes']=new _0x4d84bf(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x56a017),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'](),_0x973ae7({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x4492ca=_0x14e777=>_0x14e777['stopPropagation']();this['keystrokes']['set']('arrowright',_0x4492ca),this['keystrokes']['set']('arrowleft',_0x4492ca),this['keystrokes']['set']('arrowup',_0x4492ca),this['keystrokes']['set']('arrowdown',_0x4492ca);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x4aff17){this['revisionNameInputView']['fieldView']['element']['value']=_0x4aff17['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x2332bd){const _0x57dc78=new ti(this['locale'],_0x84c75d),_0x1b6ac8=_0x57dc78['fieldView'];_0x1b6ac8['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2b2e9b=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x2332bd&&(_0x2b2e9b+='\x20('+R(this['locale'],'optional')+')'),(_0x57dc78['label']=_0x2b2e9b,_0x1b6ac8['on']('input',()=>{this['revisionNameInputValue']=_0x1b6ac8['element']['value']['trim']();}),_0x57dc78);}}class v extends _0xb2d8c8{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x3e79a8=this['editor'],_0x577ef5=_0x3e79a8['plugins']['get']('RevisionTracker');_0x3e79a8['ui']['componentFactory']['add']('revisionHistory',_0xb0500a=>{const _0xb3663a=_0x455c58(_0xb0500a),_0x1551eb=_0xb3663a['panelView']['children'],_0x4ce1ff=new _0x174095(_0xb0500a),_0x47460e=new _0x2be811(_0xb0500a),_0x5bb4f4=new _0xbbf7fb(_0xb0500a),_0x3b6636=new _0x2be811(_0xb0500a),_0x4b7181=new _0xbbf7fb(_0xb0500a);return _0xb3663a['bind']('isEnabled')['to'](_0x577ef5,'isReady',_0x577ef5,'isEnabled',_0x3e79a8,'isReadOnly',(_0x30035f,_0x510999,_0x5bcb7c)=>_0x30035f&&_0x510999&&!_0x5bcb7c),_0xb3663a['buttonView']['set']({'icon':_0x378803,'label':R(_0xb0500a,'Revision\x20history'),'tooltip':!0x0}),_0x5bb4f4['set']({'label':R(_0xb0500a,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x5bb4f4['bind']('isEnabled')['to'](_0x577ef5,'isReady',_0x577ef5,'isEnabled',_0x3e79a8,'isReadOnly',(_0x13c6f7,_0x336e6e,_0x2bbf07)=>_0x13c6f7&&_0x336e6e&&!_0x2bbf07),_0x5bb4f4['on']('execute',()=>this['_showDialog']()),_0x4b7181['set']({'label':R(_0xb0500a,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x4b7181['bind']('isEnabled')['to'](_0x577ef5,'isReady',_0x3e79a8,'isReadOnly',(_0x5a6935,_0x2a7e6)=>_0x5a6935&&!_0x2a7e6),_0x4b7181['on']('execute',()=>{_0x3e79a8['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0xb3663a['isOpen']=!0x1,_0x3e79a8['editing']['view']['focus']();}),_0x47460e['children']['add'](_0x5bb4f4),_0x3b6636['children']['add'](_0x4b7181),_0x4ce1ff['role']='menu',_0x4ce1ff['items']['addMany']([_0x47460e,_0x3b6636]),_0x1551eb['add'](_0x4ce1ff),_0xb3663a;}),_0x3e79a8['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1235e9=this['editor'],_0x596a5c=_0x1235e9['locale'],_0x24ac8a=new _0x3d1a00(_0x596a5c),_0x2101d1=new _0x7b6454(_0x596a5c);_0x24ac8a['buttonView']['set']({'icon':_0x378803,'label':R(_0x596a5c,'Revision\x20history')});const _0x3d7c01=new _0x28b6aa(_0x596a5c,_0x24ac8a),_0x39ec48=new _0x16e359(_0x596a5c);_0x39ec48['set']({'label':R(_0x596a5c,'Save\x20current\x20revision')}),_0x39ec48['delegate']('execute')['to'](_0x24ac8a),_0x39ec48['on']('execute',()=>{this['_showDialog']();}),_0x3d7c01['children']['add'](_0x39ec48),_0x2101d1['items']['add'](_0x3d7c01);const _0x110aa5=new _0x28b6aa(_0x596a5c,_0x24ac8a),_0x12eb57=new _0x16e359(_0x596a5c);return _0x12eb57['set']({'label':R(_0x596a5c,'Open\x20revision\x20history')}),_0x12eb57['delegate']('execute')['to'](_0x24ac8a),_0x12eb57['on']('execute',()=>{_0x1235e9['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x110aa5['children']['add'](_0x12eb57),_0x2101d1['items']['add'](_0x110aa5),_0x24ac8a['panelView']['children']['add'](_0x2101d1),_0x24ac8a;}['_showDialog'](){const _0x1afd9c=this['editor'],_0x4046d2=_0x1afd9c['locale'],_0x3b1724=_0x1afd9c['plugins']['get']('Dialog'),_0x3c1f6d=_0x1afd9c['plugins']['get']('RevisionTracker');function _0x108d6c(_0x172c94){_0x1afd9c['config']['get']('revisionHistory.requireRevisionName')&&''===_0x172c94['revisionName']?_0x172c94['revisionNameInputView']['errorText']=R(_0x4046d2,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x1afd9c['plugins']['get'](h)['saveRevision']({'name':_0x172c94['revisionName']}),_0x3b1724['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x108d6c(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3b1724['show']({'id':'revisionSave','title':R(_0x4046d2,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x1afd9c['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3b1724['hide']()},{'label':R(_0x1afd9c['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x33881b){_0x33881b['bind']('isEnabled')['to'](_0x3c1f6d,'isReady',_0x3c1f6d,'isEnabled',_0x1afd9c,'isReadOnly',(_0x175928,_0x7425d9,_0x375cf6)=>_0x175928&&_0x7425d9&&!_0x375cf6);},'onExecute':()=>_0x108d6c(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x31e8da=this['editor'],_0x564bd2=_0x31e8da['locale'];this['_saveRevisionFormView']=new he(_0x564bd2,_0x31e8da['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x2d670e{['changeId'];['_model'];constructor(_0x5448b2,_0x50a22e){super(_0x5448b2),this['_model']=_0x50a22e,this['changeId']=_0x50a22e['id'];const _0x29b87f=this['bindTemplate'],_0x35fadd=R(_0x5448b2,_0x50a22e['data']['isSuggestion']?'Suggested\x20by':'add'==_0x50a22e['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x50a22e['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x29b87f['to']('type',_0x414f21=>'ck-revision-change__'+_0x414f21)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x35fadd}]},{'text':'\x20'+_0x50a22e['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x223ec6(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x292777){super(),this['id']=_0x292777['id']||_0x189557(),this['author']=_0x292777['author'],this['type']=_0x292777['type'],this['data']=_0x292777['data']||{},this['rootName']=_0x292777['rootName'],this['set']('createdAt',_0x292777['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(_0x4a2a0e,_0x4170a2){this['newRevisionId']=_0x4a2a0e,this['oldRevisionId']=_0x4170a2,this['changes']=new _0x1e8ea3();}['_setChanges'](_0xcf9c67){for(const _0x30c447 of _0xcf9c67)this['changes']['add'](_0x30c447);}}class l extends _0xb2d8c8{['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[_0x3db46c,_0x1d58fa,S,$];}constructor(_0x4cac16){super(_0x4cac16),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',(_0x31b029,_0x12a6e9,_0xce3a1a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4c22e6=>{for(const _0x5569cf of this['editor']['editing']['view']['document']['roots'])_0xce3a1a?_0x4c22e6['removeClass']('ck-editor__editable__overlay',_0x5569cf):_0x4c22e6['addClass']('ck-editor__editable__overlay',_0x5569cf);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3eedbc=>null!==_0x3eedbc),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x53a879,_0x439e07,_0x514d80)=>_0x53a879&&_0x514d80?_0x439e07['changes']['getIndex'](_0x514d80):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x30a370,_0x516336)=>_0x30a370?_0x516336['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1d58fa);}['init'](){const _0x369bc9=this['editor'],_0xe41bd6=new ot(_0x369bc9,{'direction':'backward'}),_0x1c8d2d=new ot(_0x369bc9,{'direction':'forward'});(_0x369bc9['commands']['add']('showPreviousChange',_0xe41bd6),_0x369bc9['commands']['add']('showNextChange',_0x1c8d2d),_0x369bc9['commands']['add']('restoreRevision',new nt(_0x369bc9)),this['on']('change:numberOfChanges',()=>{_0xe41bd6['refresh'](),_0x1c8d2d['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x369bc9['enableReadOnlyMode']('revision-viewer'),_0x369bc9['plugins']['has']('WidgetToolbarRepository'))&&_0x369bc9['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x8d9e5){return await this['_utils']['loadRevisionData'](_0x8d9e5,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x8d9e5);}async['getRevisionRootsAttributes'](_0x38abac){return await this['_utils']['loadRevisionData'](_0x38abac,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x38abac);}async['compare'](_0x5b2f27,_0x1f1fc8,_0x5aa419=!0x1){if(!this['isEnabled'])return;const _0x4929d2=this['diff'],_0x32dbdb=this['repository'],_0x25b546='string'==typeof _0x5b2f27?_0x32dbdb['getRevision'](_0x5b2f27):_0x5b2f27,_0x2e192f='string'==typeof _0x1f1fc8?_0x32dbdb['getRevision'](_0x1f1fc8):_0x1f1fc8,_0x38fed0=_0x25b546['id'],_0x42a897=_0x2e192f?_0x2e192f['id']:null;if(!_0x5aa419&&this['diff']&&this['diff']['newRevisionId']===_0x38fed0&&this['diff']['oldRevisionId']===_0x42a897)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x38fed0,_0x42a897);const _0x1fbf78=this['_getRevisionsRange'](_0x25b546,_0x2e192f,!0x0)['map'](_0x219bdf=>this['_utils']['loadRevisionData'](_0x219bdf,this['adapter']));return _0x1fbf78['push'](new Promise(_0x59ea0f=>{setTimeout(_0x59ea0f,0x14);})),Promise['all'](_0x1fbf78)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x16dcd2=this['_getDiff'](_0x38fed0,_0x42a897);for(const _0x3d996a of _0x16dcd2['changes'])this['_changeIdToChange']['set'](_0x3d996a['id'],_0x3d996a);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x184877=>{for(const _0x21c8a4 of this['editor']['model']['document']['getRootNames']())_0x184877['detachRoot'](_0x21c8a4);for(const _0x1138d0 of Object['keys'](_0x16dcd2['model'])){const _0x537279=_0x184877['addRoot'](_0x1138d0);for(const _0x18c7f8 of Object['keys'](_0x16dcd2['attributes'][_0x1138d0]))_0x184877['setAttribute'](_0x18c7f8,_0x16dcd2['attributes'][_0x1138d0][_0x18c7f8],_0x537279);_0x184877['insert'](_0x16dcd2['model'][_0x1138d0],_0x537279,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x16dcd2['changes'])),this['isReady']=!0x0;})['catch'](_0x2267cf=>{console['error'](_0x2267cf),this['_cleanUp'](),_0x4929d2&&(this['diff']=_0x4929d2),this['isReady']=!0x0;});}['addRevisionData'](_0x11df98,_0x1d45c2){const _0x1e95a5=this['repository']['createRevision'](_0x11df98);return _0x1e95a5['on']('_update',(_0x13de27,_0x115e05,_0x1dbfc2)=>_0x1d45c2(_0x115e05,_0x1dbfc2,_0x1e95a5)),this['repository']['addRevision'](_0x1e95a5),_0x1e95a5;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3a0129=>{for(const _0x42781c of this['editor']['model']['document']['getRootNames']())_0x3a0129['detachRoot'](_0x42781c);});}['_sortAndFilterDiffChanges'](_0x2bc1aa){const _0x4a8ae4=[],_0x4962c6=new Map();for(const _0x3d6eca of this['editor']['model']['document']['getRootNames']()){const _0x809eb0=this['editor']['editing']['view']['getDomRoot'](_0x3d6eca);if(!_0x809eb0)continue;const _0x2357b1=_0x809eb0['getClientRects']()['item'](0x0);_0x2357b1&&(_0x4a8ae4['push'](_0x3d6eca),_0x4962c6['set'](_0x3d6eca,_0x2357b1));}return _0x4a8ae4['sort']((_0x3ec8a,_0x288419)=>{const _0x109cf2=_0x4962c6['get'](_0x3ec8a),_0x1970f3=_0x4962c6['get'](_0x288419);return _0x109cf2['y']-_0x1970f3['y']||_0x109cf2['x']-_0x1970f3['x'];}),(_0x2bc1aa=_0x2bc1aa['filter'](_0x38064f=>_0x4a8ae4['includes'](_0x38064f['rootName'])))['sort']((_0x1209f8,_0x20ad2b)=>_0x4a8ae4['indexOf'](_0x1209f8['rootName'])-_0x4a8ae4['indexOf'](_0x20ad2b['rootName'])),_0x2bc1aa;}['_makeTape'](_0xe699eb){const _0x513b8e=Array['from'](_0xe699eb['markers'])['filter'](([_0x114429,_0x1c04ec])=>_0x114429['startsWith']('revision:')&&!_0x1c04ec['isCollapsed']),_0x4560c2=Array['from'](this['editor']['model']['createRangeIn'](_0xe699eb)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x513b8e['length'])for(const _0x541891 of _0x4560c2){const [_0x116a44,_0x46b80f]=_0x513b8e[0x0],[,_0x2391d1,_0x13ca4e]=_0x116a44['split'](':');if(_0x46b80f['end']['isEqual'](_0x541891['nextPosition'])&&_0x513b8e['shift'](),(_0x541891['previousPosition']['isEqual'](_0x46b80f['start'])||_0x541891['previousPosition']['isAfter'](_0x46b80f['start']))&&('insertion'==_0x2391d1?_0x541891['isAdded']={'userId':_0x13ca4e}:'deletion'==_0x2391d1&&(_0x541891['isRemoved']={'userId':_0x13ca4e})),0x0==_0x513b8e['length'])break;}return _0x4560c2;}['_refreshStartEndIndex'](_0xc4d246){const _0x3374dc=new Map();for(let _0x200875=0x0;_0x200875<_0xc4d246['length'];_0x200875++)'text'===_0xc4d246[_0x200875]['type']?(_0xc4d246[_0x200875]['item']['startIndex']=_0x200875,_0xc4d246[_0x200875]['item']['endIndex']=_0x200875):('elementStart'===_0xc4d246[_0x200875]['type']?_0xc4d246[_0x200875]['item']['startIndex']=_0x200875:'elementEnd'===_0xc4d246[_0x200875]['type']&&(_0xc4d246[_0x200875]['item']['endIndex']=_0x200875),_0x3374dc['set'](_0xc4d246[_0x200875]['id'],_0x200875));for(const _0x228c8e of _0x3374dc['values']())'elementStart'===_0xc4d246[_0x228c8e]['type']?_0xc4d246[_0x228c8e]['item']['endIndex']=_0x3374dc['get'](_0xc4d246[_0x228c8e]['pairId']):'elementEnd'===_0xc4d246[_0x228c8e]['type']&&(_0xc4d246[_0x228c8e]['item']['startIndex']=_0x3374dc['get'](_0xc4d246[_0x228c8e]['pairId']));}['_processTape'](_0x38d196){for(let _0x51e6d0=0x0;_0x51e6d0<_0x38d196['length'];_0x51e6d0++){if('elementStart'===_0x38d196[_0x51e6d0]['type'])_0x38d196[_0x51e6d0]['item']['startIndex']=_0x51e6d0;else{if('elementEnd'===_0x38d196[_0x51e6d0]['type']){_0x38d196[_0x51e6d0]['item']['endIndex']=_0x51e6d0;const _0x33b638=_0x38d196[_0x51e6d0]['item']['startIndex'];_0x38d196[_0x33b638]['pairId']=_0x38d196[_0x51e6d0]['id'],_0x38d196[_0x51e6d0]['pairId']=_0x38d196[_0x33b638]['id'];}else _0x38d196[_0x51e6d0]['item']['startIndex']=_0x51e6d0,_0x38d196[_0x51e6d0]['item']['endIndex']=_0x51e6d0,_0x38d196[_0x51e6d0]['pairId']=null;}_0x38d196[_0x51e6d0]['markersStart']||(_0x38d196[_0x51e6d0]['markersStart']=[],_0x38d196[_0x51e6d0]['markersEnd']=[]);}}['_markInsertions'](_0xb12ab3,_0x101cc3){const _0x46d23d=_0xb12ab3['filter'](_0x5743bb=>!_0x5743bb['isAdded']);for(let _0x479eda=0x0;_0x479eda<_0x101cc3['length'];_0x479eda++)_0x101cc3[_0x479eda]['isAdded']&&(_0x46d23d[_0x479eda]['isAdded']=_0x101cc3[_0x479eda]['isAdded']);}['_getDiff'](_0x553270,_0x32de30=null){const _0x54a364=this['repository']['getRevision'](_0x553270),_0x573d94=_0x32de30?this['repository']['getRevision'](_0x32de30):null,_0x540739=this['_getRevisionsRange'](_0x54a364,_0x573d94),_0x39d99a=_0x540739[_0x540739['length']-0x1],_0x2e6919=new Map(),_0x34d168={'model':{},'attributes':{},'changes':[]},_0x49c6db=new Set(),_0xc783e5=new Map();for(let _0x17739d=_0x540739['length']-0x1;_0x17739d>=0x0;_0x17739d--){const _0x545a23=_0x540739[_0x17739d];for(const _0x4b9e41 of Object['keys'](_0x545a23['diffData']))if(_0x545a23['diffData'][_0x4b9e41]['attachChange']){const _0x32731d=_0x545a23['diffData'][_0x4b9e41]['attachChange'];_0x32731d['isAttached']?(_0x49c6db['add'](_0x4b9e41),_0xc783e5['has'](_0x4b9e41)&&_0xc783e5['get'](_0x4b9e41)['userId']==_0x32731d['userId']?_0xc783e5['delete'](_0x4b9e41):_0xc783e5['set'](_0x4b9e41,_0x32731d)):_0xc783e5['has'](_0x4b9e41)?(_0x49c6db['delete'](_0x4b9e41),_0xc783e5['delete'](_0x4b9e41)):(_0x49c6db['add'](_0x4b9e41),_0xc783e5['set'](_0x4b9e41,_0x32731d));}else _0x49c6db['add'](_0x4b9e41);}for(const _0x1ebfbc of _0x49c6db){const _0x14bdba=_0xc783e5['has'](_0x1ebfbc)&&!_0xc783e5['get'](_0x1ebfbc)['isAttached'];let _0x81c503=_0x14bdba?_0x540739['length']-0x1:0x0;const _0x5339a3=_0x14bdba?-0x1:0x1;for(;_0x540739[_0x81c503];){const _0x5e0693=_0x540739[_0x81c503];if(_0x5e0693['diffData'][_0x1ebfbc]){const _0x1806ae=_0x14bdba?_0x5e0693['diffData'][_0x1ebfbc]['attributesBefore']:_0x5e0693['diffData'][_0x1ebfbc]['attributesAfter'];_0x34d168['attributes'][_0x1ebfbc]=_0x1806ae?_0x240ca5(_0x1806ae):{};break;}_0x81c503+=_0x5339a3;}}for(const _0x7c6cb5 of _0x540739){_0x7c6cb5['model']={};for(const _0x273193 of _0x7c6cb5['authors'])_0x2e6919['set'](_0x273193['id'],_0x273193);for(const _0x1760e7 of _0x49c6db){const _0x34c605=_0x7c6cb5['diffData'][_0x1760e7]?_0x7c6cb5['diffData'][_0x1760e7]['insertions']:'[]',_0x3b5f1f=_0x7c6cb5['diffData'][_0x1760e7]?_0x7c6cb5['diffData'][_0x1760e7]['deletions']:'[]';_0x7c6cb5['model'][_0x1760e7]={'insertions':this['_utils']['_makeModelFromViewString'](_0x34c605),'deletions':this['_utils']['_makeModelFromViewString'](_0x3b5f1f)};}}for(const _0x382c1e of _0x49c6db){let _0x3c9e5d=null,_0x823816=0x0;const _0x471afa=new Map(Array['from'](_0x54a364['model'][_0x382c1e]['insertions']['markers'])['filter'](([_0x488210])=>!_0x488210['startsWith']('revision:')));let _0x354a13=0x0;for(const _0xa8d2bc of _0x540739){const _0x9329cb=this['_makeTape'](_0xa8d2bc['model'][_0x382c1e]['insertions']);_0xa8d2bc==_0x54a364?(_0x3c9e5d=_0x9329cb,_0x823816=_0x3c9e5d['length'],_0x3c9e5d['forEach'](_0x575842=>{_0x575842['id']=_0x354a13++;}),this['_processTape'](_0x3c9e5d)):this['_markInsertions'](_0x3c9e5d,_0x9329cb);const _0x16c0a7=_0x3c9e5d['filter'](_0x58d0e6=>!_0x58d0e6['isAdded'])['map'](_0x306386=>_0x306386['id']);let _0x3a927e=0x0;const _0xc3e55b=this['_makeTape'](_0xa8d2bc['model'][_0x382c1e]['deletions']);_0xc3e55b['forEach'](_0x9ffe11=>{_0x9ffe11['isRemoved']?_0x9ffe11['id']=_0x823816++:_0x9ffe11['id']=_0x16c0a7[_0x3a927e++];}),this['_processTape'](_0xc3e55b),this['_setDistance'](_0x3c9e5d,'isAdded'),this['_setDistance'](_0xc3e55b,'isRemoved'),_0xa8d2bc==_0x54a364&&this['_markMarkers'](_0x3c9e5d,_0x471afa),_0x3c9e5d=this['_joinTapes'](_0x3c9e5d,_0xc3e55b),this['_refreshStartEndIndex'](_0x3c9e5d),this['_setDistance'](_0x3c9e5d,'isRemoved');}_0x3c9e5d=_0x3c9e5d['filter'](_0xd556a1=>!(_0xd556a1['isAdded']&&_0xd556a1['isRemoved']));const _0x5a3cd2=new Map(_0x39d99a['model'][_0x382c1e]['deletions']['markers']),_0x165752=new Set(_0x471afa['keys']());for(const _0x1ae718 of _0x5a3cd2['keys']())_0x165752['delete'](_0x1ae718);this['_markSuggestions'](_0x3c9e5d,_0x165752),this['_fixObsoleteTags'](_0x3c9e5d),_0x3c9e5d=this['_removeMissingPairs'](_0x3c9e5d),_0x3c9e5d=this['_markMismatchedRemovedTags'](_0x3c9e5d),_0x3c9e5d=this['_removeUnsupportedChanges'](_0x3c9e5d);const {root:_0x411d13,changes:_0x336652}=this['_makeModelFromTape'](_0x3c9e5d,_0x2e6919,_0x382c1e);_0x34d168['model'][_0x382c1e]=_0x411d13;const _0x386046=_0xc783e5['get'](_0x382c1e);if(_0x386046){const _0x2bec62=_0x2e6919['get'](_0x386046['userId']),_0x499d77=new G({'author':_0x2bec62,'type':_0x386046['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x382c1e});_0x336652['unshift'](_0x499d77),_0x34d168['attributes'][_0x382c1e]['revisionHistoryAttachChange']=_0x499d77['id'];}_0x34d168['changes']=_0x34d168['changes']['concat'](_0x336652);}return _0x34d168;}['_markMarkers'](_0x21d51f,_0x57f1cb){for(let _0x42d0fd=0x0;_0x42d0fd<_0x21d51f['length'];_0x42d0fd++)for(const [_0x1aac00,_0x4ac2ba]of _0x57f1cb)!_0x4ac2ba['isCollapsed']&&_0x4ac2ba['start']['isEqual'](_0x21d51f[_0x42d0fd]['previousPosition'])&&_0x21d51f[_0x42d0fd]['markersStart']['push'](_0x1aac00),_0x4ac2ba['end']['isEqual'](_0x21d51f[_0x42d0fd]['nextPosition'])&&_0x21d51f[_0x42d0fd]['markersEnd']['push'](_0x1aac00);}['_joinTapes'](_0xe349df,_0xb527e2){let _0x174b66=[],_0xc91e4d=0x0,_0x4bbae9=0x0;for(;_0xc91e4d<_0xe349df['length']||_0x4bbae9<_0xb527e2['length'];){const _0x147435=_0xe349df[_0xc91e4d]||{},_0x27289f=_0xb527e2[_0x4bbae9]||{};if(_0x147435['id']==_0x27289f['id'])_0xc91e4d++,_0x4bbae9++,_0x174b66['push'](_0x147435);else{if(_0x27289f['isRemoved']&&_0x147435['isAdded']){const {commonTape:_0x3f0d52,iEnd:_0x1c2f6c,jEnd:_0x172e79}=this['_threeWayMerge'](_0xe349df,_0xc91e4d,_0xb527e2,_0x4bbae9);_0x174b66=_0x174b66['concat'](_0x3f0d52),_0xc91e4d=_0x1c2f6c,_0x4bbae9=_0x172e79;}else _0x27289f['isRemoved']?(_0x4bbae9++,_0x174b66['push'](_0x27289f)):(_0xc91e4d++,_0x174b66['push'](_0x147435));}}return _0x174b66;}['_markSuggestions'](_0x32dd2a,_0x46fda0){const _0x346778=[];for(let _0xa3a2fe=0x0;_0xa3a2fe<_0x32dd2a['length'];_0xa3a2fe++){for(let _0x103775=0x0;_0x103775<_0x32dd2a[_0xa3a2fe]['markersStart']['length'];_0x103775++){const _0x327b6f=_0x32dd2a[_0xa3a2fe]['markersStart'][_0x103775];if(!_0x46fda0['has'](_0x327b6f))continue;const {group:_0xa4d19f,type:_0x429c6a,authorId:_0x497901}=_0x1666d3(_0x327b6f);'revision-suggestion'!=_0xa4d19f||'insertion'!=_0x429c6a&&'deletion'!=_0x429c6a||(_0x346778['unshift']({'type':_0x429c6a,'name':_0x327b6f,'userId':_0x497901}),_0x32dd2a[_0xa3a2fe]['markersStart']['splice'](_0x103775,0x1),_0x103775--);}_0x210c21(_0x32dd2a[_0xa3a2fe]);for(let _0xc81187=0x0;_0xc81187<_0x32dd2a[_0xa3a2fe]['markersEnd']['length'];_0xc81187++){const _0x2c545b=_0x32dd2a[_0xa3a2fe]['markersEnd'][_0xc81187];if(!_0x46fda0['has'](_0x2c545b))continue;const {group:_0x22db1c,type:_0x34fee2}=_0x1666d3(_0x2c545b);if('revision-suggestion'!=_0x22db1c||'insertion'!=_0x34fee2&&'deletion'!=_0x34fee2)continue;_0x32dd2a[_0xa3a2fe]['markersEnd']['splice'](_0xc81187,0x1),_0xc81187--;const _0x2cbca6=_0x346778['findIndex'](_0x2c0955=>_0x2c0955['name']==_0x2c545b);_0x2cbca6>-0x1&&_0x346778['splice'](_0x2cbca6,0x1);}}function _0x1666d3(_0x4b5342){const _0x4041d9=_0x4b5342['split'](':');return{'group':_0x4041d9[0x0],'type':_0x4041d9[0x1],'subType':_0x4041d9['length']>=0x5?_0x4041d9[0x2]:null,'id':_0x4041d9['length']<0x5?_0x4041d9[0x2]:_0x4041d9[0x3],'authorId':_0x4041d9['length']<0x5?_0x4041d9[0x3]:_0x4041d9[0x4],'markerCount':0x6==_0x4041d9['length']?_0x4041d9[0x5]:null};}function _0x210c21(_0x1e5ee1){for(let _0x26a94c=0x0;_0x26a94c<_0x346778['length'];_0x26a94c++){if(_0x1e5ee1['isAdded']&&'insertion'==_0x346778[_0x26a94c]['type']&&_0x1e5ee1['isAdded']['userId']==_0x346778[_0x26a94c]['userId'])return _0x1e5ee1['isAddSuggestion']=_0x346778[_0x26a94c],void delete _0x1e5ee1['isAdded'];if(!_0x1e5ee1['isAdded']&&!_0x1e5ee1['isRemoved']&&'deletion'==_0x346778[_0x26a94c]['type'])return void(_0x1e5ee1['isRemoveSuggestion']=_0x346778[_0x26a94c]);}}}['_setDistance'](_0x2d74d2,_0x18c357){let _0x357bc6=0x0,_0x4dd68e=!0x1;const _0x1a2f94=new Map();for(const _0x3588f9 of _0x2d74d2)_0x3588f9[_0x18c357]?_0x4dd68e&&(_0x357bc6++,_0x4dd68e=!0x1):(_0x357bc6++,_0x4dd68e=!0x0),_0x1a2f94['set'](_0x3588f9['id'],_0x357bc6);for(let _0x170f0e=0x0;_0x170f0e<_0x2d74d2['length'];_0x170f0e++){if('isRemoved'==_0x18c357&&_0x2d74d2[_0x170f0e]['isAdded']||'isAdded'==_0x18c357&&_0x2d74d2[_0x170f0e]['isRemoved'])continue;if('text'==_0x2d74d2[_0x170f0e]['type']){_0x2d74d2[_0x170f0e]['distance']=0x0;continue;}const _0x1fc2f2=_0x1a2f94['get'](_0x2d74d2[_0x170f0e]['pairId']),_0x2ea84f=_0x1a2f94['get'](_0x2d74d2[_0x170f0e]['id']);_0x2d74d2[_0x170f0e]['distance']=_0x1fc2f2-_0x2ea84f;}}['_getRevisionsRange'](_0x5b4633,_0xa2a916,_0x5bcc16=!0x1){const _0x2b9186=[];let _0x821c9f=this['repository']['getIndex'](_0x5b4633),_0x384587=this['repository']['getIndex'](_0xa2a916);for(-0x1==_0x384587&&(_0x384587=this['repository']['_revisions']['length'],_0x5bcc16=!0x1);_0x821c9f<_0x384587;)_0x2b9186['push'](this['repository']['getRevision'](_0x821c9f)),_0x821c9f++;return _0x5bcc16&&_0x2b9186['push'](this['repository']['getRevision'](_0x821c9f)),_0x2b9186;}['_threeWayMerge'](_0x2baec9,_0x51edf6,_0x52f21e,_0x3cab10){const _0x3d1731=this['editor']['model']['schema'];let _0x303411=_0x51edf6;for(;_0x2baec9[_0x303411]&&_0x2baec9[_0x303411]['isAdded'];)_0x303411++;let _0x53cc12=_0x3cab10;for(;_0x52f21e[_0x53cc12]&&_0x52f21e[_0x53cc12]['isRemoved'];)_0x53cc12++;_0x2711bb(_0x2baec9,_0x51edf6,_0x303411),_0x2711bb(_0x52f21e,_0x3cab10,_0x53cc12);const _0x3f5202=_0x52f21e['slice'](_0x3cab10,_0x53cc12)['concat'](_0x2baec9['slice'](_0x51edf6,_0x303411));return _0x3f5202['sort']((_0x33eed0,_0x461b5d)=>_0x33eed0['side']!=_0x461b5d['side']?_0x33eed0['side']-_0x461b5d['side']:_0x33eed0['level']!=_0x461b5d['level']?_0x33eed0['level']-_0x461b5d['level']:_0x33eed0['distance']!=_0x461b5d['distance']?_0x461b5d['distance']-_0x33eed0['distance']:!!_0x33eed0['isAdded']!=!!_0x461b5d['isAdded']?-0x1==_0x33eed0['side']||0x0==_0x33eed0['side']?_0x33eed0['isAdded']?-0x1:0x1:_0x33eed0['isAdded']?0x1:-0x1:_0x33eed0['index']-_0x461b5d['index']),{'commonTape':_0x3f5202,'iEnd':_0x303411,'jEnd':_0x53cc12};function _0x2711bb(_0x5caca6,_0x141f9a,_0x5c354e){let _0x104024=-0x1,_0x32bd5e=Number['POSITIVE_INFINITY'],_0x24d9ef=!0x0;for(let _0x55d856=_0x141f9a;_0x55d856<_0x5c354e;_0x55d856++)if(_0x3d1731['isInline'](_0x5caca6[_0x55d856]['item'])||(_0x24d9ef=!0x1),_0x5caca6[_0x55d856]['item']['startIndex']<_0x141f9a&&(_0x104024=_0x55d856),_0x5caca6[_0x55d856]['item']['endIndex']>=_0x5c354e){_0x32bd5e=_0x55d856;break;}_0x24d9ef&&(_0x104024=_0x5c354e-0x1);for(let _0x4cbf82=_0x141f9a;_0x4cbf82<_0x5c354e;_0x4cbf82++)_0x5caca6[_0x4cbf82]['side']=_0x4cbf82<=_0x104024?-0x1:_0x4cbf82<_0x32bd5e?0x0:0x1,_0x5caca6[_0x4cbf82]['index']=_0x4cbf82;let _0x4c3296=0x0;for(let _0x3fcc66=_0x141f9a;_0x3fcc66<=_0x104024;_0x3fcc66++)0x0==_0x5caca6[_0x3fcc66]['distance']?_0x5caca6[_0x3fcc66]['level']=_0x4c3296:(_0x4c3296++,_0x5caca6[_0x3fcc66]['level']=_0x4c3296,_0x4c3296++);for(let _0x2b34e4=_0x141f9a;_0x2b34e4<_0x5c354e;_0x2b34e4++)0x0==_0x5caca6[_0x2b34e4]['side']&&(_0x5caca6[_0x2b34e4]['level']=_0x4c3296);_0x4c3296=0x0;for(let _0x47d89c=_0x5c354e-0x1;_0x47d89c>=_0x32bd5e;_0x47d89c--)0x0==_0x5caca6[_0x47d89c]['distance']?_0x5caca6[_0x47d89c]['level']=_0x4c3296:(_0x4c3296--,_0x5caca6[_0x47d89c]['level']=_0x4c3296,_0x4c3296--);}}['_fixObsoleteTags'](_0x16b3a7){const _0x23e90a=new Map(),_0x4dc16f=this['editor']['model']['schema'];for(let _0x5201dc=0x1;_0x5201dc<_0x16b3a7['length'];_0x5201dc++){let _0x9a2070,_0x24307e,_0x34cf10;const _0x1dc9d1=_0x16b3a7[_0x5201dc],_0x203d8b=_0x16b3a7[_0x5201dc-0x1];if('text'==_0x1dc9d1['type'])continue;if(_0x1dc9d1['type']!=_0x203d8b['type'])continue;if(!_0x4dc16f['isBlock'](_0x203d8b['item'])||_0x4dc16f['isLimit'](_0x203d8b['item']))continue;if(!_0x4dc16f['isBlock'](_0x1dc9d1['item'])||_0x4dc16f['isLimit'](_0x1dc9d1['item']))continue;if((_0x16b3a7[_0x5201dc]['isAdded']||_0x16b3a7[_0x5201dc]['isAddSuggestion'])&&_0x16b3a7[_0x5201dc-0x1]['isRemoved'])_0x9a2070=_0x16b3a7[_0x5201dc],_0x24307e=_0x16b3a7[_0x5201dc-0x1],_0x34cf10=_0x5201dc-0x1;else{if(!_0x16b3a7[_0x5201dc]['isRemoved']||!_0x16b3a7[_0x5201dc-0x1]['isAdded']&&!_0x16b3a7[_0x5201dc-0x1]['isAddSuggestion'])continue;_0x9a2070=_0x16b3a7[_0x5201dc-0x1],_0x24307e=_0x16b3a7[_0x5201dc],_0x34cf10=_0x5201dc;}const _0x462969=_0x9a2070['level']==_0x24307e['level'],_0x54ec3c=Math['abs'](_0x9a2070['level'])<Math['abs'](_0x24307e['level'])&&0x0==_0x24307e['distance'];(_0x462969||_0x54ec3c)&&(_0x23e90a['set'](_0x24307e['id'],_0x9a2070['id']),_0x16b3a7['splice'](_0x34cf10,0x1),_0x5201dc--,_0x9a2070['isAdded']=!0x1);}for(let _0x3daca4=0x0;_0x3daca4<_0x16b3a7['length'];_0x3daca4++)_0x23e90a['has'](_0x16b3a7[_0x3daca4]['pairId'])&&(_0x16b3a7[_0x3daca4]['pairId']=_0x23e90a['get'](_0x16b3a7[_0x3daca4]['pairId']));}['_removeMissingPairs'](_0x7763f3){const _0x313e85=new Set(_0x7763f3['map'](_0x460cf6=>_0x460cf6['id']));for(let _0x2e4753=0x0;_0x2e4753<_0x7763f3['length'];_0x2e4753++)_0x313e85['has'](_0x7763f3[_0x2e4753]['pairId'])||0x0==_0x7763f3[_0x2e4753]['distance']||(_0x7763f3[_0x2e4753]['isIncorrect']=!0x0);return _0x7763f3['filter'](_0x3790ab=>!_0x3790ab['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5bae50){const _0x24bf7c=new Set();for(let _0x56b875=0x0;_0x56b875<_0x5bae50['length'];_0x56b875++){if(_0x24bf7c['has'](_0x5bae50[_0x56b875]['id'])&&_0x5bae50[_0x56b875]['isRemoved']&&(_0x5bae50[_0x56b875]['isIncorrect']=!0x0),_0x5bae50[_0x56b875]['isIncorrect'])continue;if(0x0==_0x5bae50[_0x56b875]['distance'])continue;if('elementStart'!=_0x5bae50[_0x56b875]['type'])continue;if(null==_0x5bae50[_0x56b875]['pairId'])continue;let _0x5e6dc8=_0x56b875+0x1,_0x1bc36a=0x0;for(;_0x5bae50[_0x5e6dc8]['id']!=_0x5bae50[_0x56b875]['pairId'];)'elementStart'==_0x5bae50[_0x5e6dc8]['type']?_0x1bc36a++:'elementEnd'==_0x5bae50[_0x5e6dc8]['type']&&_0x1bc36a--,_0x5e6dc8++;if(0x0!=_0x1bc36a){if(_0x5bae50[_0x56b875]['isRemoved'])_0x5bae50[_0x56b875]['isIncorrect']=!0x0;else{for(;_0x5e6dc8!=_0x56b875;)_0x5bae50[_0x5e6dc8]['isRemoved']&&0x0!=_0x5bae50[_0x5e6dc8]['distance']&&(_0x5bae50[_0x5e6dc8]['isIncorrect']=!0x0,_0x24bf7c['add'](_0x5bae50[_0x5e6dc8]['pairId'])),_0x5e6dc8--;}}}return _0x5bae50['filter'](_0xda431c=>!_0xda431c['isIncorrect']);}['_removeUnsupportedChanges'](_0xcf2ecf){const _0x2f78fc=this['editor']['model']['schema'];for(let _0x38eb98=0x0;_0x38eb98<_0xcf2ecf['length'];_0x38eb98++){if(!(_0xcf2ecf[_0x38eb98]['isAdded']||_0xcf2ecf[_0x38eb98]['isAddSuggestion']||_0xcf2ecf[_0x38eb98]['isRemoved']||_0xcf2ecf[_0x38eb98]['isRemoveSuggestion']))continue;if(0x0==_0xcf2ecf[_0x38eb98]['distance'])continue;const _0x2962f5=_0xcf2ecf[_0x38eb98]['item'];_0x2f78fc['isBlock'](_0x2962f5)||_0x2f78fc['isLimit'](_0x2962f5)||(_0xcf2ecf[_0x38eb98]['isAdded']&&delete _0xcf2ecf[_0x38eb98]['isAdded'],_0xcf2ecf[_0x38eb98]['isAddSuggestion']&&delete _0xcf2ecf[_0x38eb98]['isAddSuggestion'],_0xcf2ecf[_0x38eb98]['isRemoveSuggestion']&&delete _0xcf2ecf[_0x38eb98]['isRemoveSuggestion'],_0xcf2ecf[_0x38eb98]['isRemoved']&&(_0xcf2ecf[_0x38eb98]['isIncorrect']=!0x0));}return _0xcf2ecf['filter'](_0x9ccde9=>!_0x9ccde9['isIncorrect']);}['_makeModelFromTape'](_0x33fd6a,_0x269971,_0x1df451){const _0x5b745b=new _0x24ebb7(),_0x7960e5=[],_0x523dcc=new Map(),_0x7c7f74=this['editor']['model'],_0x2c5c98=_0x7c7f74['schema'],_0x3b880c=[_0x5b745b],_0x482251={},_0x216e9f={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x43809d=null;const _0x281639=[0x0];for(let _0x27adbf=0x0;_0x27adbf<_0x33fd6a['length'];_0x27adbf++)if('elementStart'===_0x33fd6a[_0x27adbf]['type']){_0x33fd6a[_0x27adbf]['previousPosition']=_0x7c7f74['createPositionFromPath'](_0x5b745b,_0x281639);const _0x414697=new _0x429deb(_0x33fd6a[_0x27adbf]['item']['name'],_0x33fd6a[_0x27adbf]['item']['getAttributes']());_0x3b880c[0x0]['_appendChild'](_0x414697),_0x281639['push'](0x0),_0x3b880c['unshift'](_0x414697),_0x33fd6a[_0x27adbf]['nextPosition']=_0x7c7f74['createPositionFromPath'](_0x5b745b,_0x281639);}else'elementEnd'===_0x33fd6a[_0x27adbf]['type']?(_0x3b880c['shift'](),_0x33fd6a[_0x27adbf]['previousPosition']=_0x7c7f74['createPositionFromPath'](_0x5b745b,_0x281639),_0x281639['pop'](),_0x281639[_0x281639['length']-0x1]++,_0x33fd6a[_0x27adbf]['nextPosition']=_0x7c7f74['createPositionFromPath'](_0x5b745b,_0x281639)):(_0x33fd6a[_0x27adbf]['previousPosition']=_0x7c7f74['createPositionFromPath'](_0x5b745b,_0x281639),_0x43809d?_0x43809d['_data']+=_0x33fd6a[_0x27adbf]['item']['data']:_0x43809d=new _0x4f2aa1(_0x33fd6a[_0x27adbf]['item']['data'],_0x33fd6a[_0x27adbf]['item']['getAttributes']()),_0x33fd6a[_0x27adbf+0x1]&&'text'===_0x33fd6a[_0x27adbf+0x1]['type']&&_0x1d3e14(_0x43809d,_0x33fd6a[_0x27adbf+0x1]['item'])||(_0x3b880c[0x0]['_appendChild'](_0x43809d),_0x43809d=null),_0x281639[_0x281639['length']-0x1]+=_0x33fd6a[_0x27adbf]['item']['offsetSize'],_0x33fd6a[_0x27adbf]['nextPosition']=_0x7c7f74['createPositionFromPath'](_0x5b745b,_0x281639));for(let _0x535a99=0x0;_0x535a99<_0x33fd6a['length'];_0x535a99++){const _0x31f5ac=_0x33fd6a[_0x535a99]['previousPosition'],_0x10fdd9=_0x33fd6a[_0x535a99]['nextPosition'];for(const _0x3f03b2 of _0x33fd6a[_0x535a99]['markersStart'])_0x523dcc['set'](_0x3f03b2,{'start':_0x31f5ac,'end':null});_0x1b23b8('isRemoveSuggestion',_0x535a99,_0x31f5ac,_0x10fdd9),_0x1b23b8('isAddSuggestion',_0x535a99,_0x31f5ac,_0x10fdd9),_0x1b23b8('isRemoved',_0x535a99,_0x31f5ac,_0x10fdd9),_0x1b23b8('isAdded',_0x535a99,_0x31f5ac,_0x10fdd9);for(const _0x2cc8e1 of _0x33fd6a[_0x535a99]['markersEnd']){const _0x1579aa=_0x523dcc['get'](_0x2cc8e1);_0x1579aa?_0x1579aa['end']=_0x10fdd9:_0x523dcc['set'](_0x2cc8e1,{'start':_0x10fdd9,'end':_0x10fdd9});}}for(const [_0x5ed3ff,_0x137b0]of _0x523dcc){const _0xb98e55=this['editor']['model']['createRange'](_0x137b0['start'],_0x137b0['end']);_0x5b745b['markers']['set'](_0x5ed3ff,_0xb98e55);}return _0x7960e5['sort']((_0x28dabb,_0x256078)=>{const _0x250d26=_0x5b745b['markers']['get']('revision:'+_0x28dabb['id']),_0x9bb509=_0x5b745b['markers']['get']('revision:'+_0x256078['id']);return _0x250d26['start']['isBefore'](_0x9bb509['start'])?-0x1:_0x250d26['start']['isAfter'](_0x9bb509['start'])?0x1:_0x250d26['end']['isBefore'](_0x9bb509['end'])?-0x1:_0x250d26['end']['isAfter'](_0x9bb509['end'])?0x1:'add'===_0x28dabb['type']?-0x1:0x1;}),{'root':_0x5b745b,'changes':_0x7960e5};function _0x1b23b8(_0x31ebe7,_0x305e14,_0x4a22d0,_0x53b35a){const _0x9ada45=!!_0x33fd6a[_0x305e14][_0x31ebe7],_0x4f1564=_0x9ada45?_0x33fd6a[_0x305e14][_0x31ebe7]['userId']:null,_0x299486=_0x305e14===_0x33fd6a['length']-0x1,_0x496b2a=_0x216e9f[_0x31ebe7][0x0],_0x37b378=_0x2c5c98['isObject'](_0x33fd6a[_0x305e14]['item']);!_0x482251[_0x31ebe7]&&_0x9ada45?_0x482251[_0x31ebe7]={'start':_0x4a22d0,'tapeItem':_0x33fd6a[_0x305e14],'userId':_0x4f1564,'type':_0x31ebe7}:_0x482251[_0x31ebe7]&&!_0x9ada45?(_0x482251[_0x31ebe7]['end']=_0x4a22d0,_0xe4f69d(_0x482251[_0x31ebe7]),_0x482251[_0x31ebe7]=null):_0x482251[_0x31ebe7]&&_0x9ada45&&_0x482251[_0x31ebe7]['userId']!==_0x4f1564&&(_0x482251[_0x31ebe7]['end']=_0x4a22d0,_0x496b2a&&_0x496b2a['userId']===_0x482251[_0x31ebe7]['userId']||_0xe4f69d(_0x482251[_0x31ebe7]),_0x482251[_0x31ebe7]={'start':_0x4a22d0,'tapeItem':_0x33fd6a[_0x305e14],'userId':_0x4f1564,'type':_0x31ebe7}),_0x482251[_0x31ebe7]&&_0x37b378&&('elementStart'!==_0x33fd6a[_0x305e14]['type']||_0x496b2a&&_0x496b2a['userId']===_0x4f1564||_0x216e9f[_0x31ebe7]['unshift']({'userId':_0x4f1564,'object':_0x33fd6a[_0x305e14]['item'],'change':_0x482251[_0x31ebe7]}),'elementEnd'===_0x33fd6a[_0x305e14]['type']&&_0x496b2a&&_0x496b2a['object']===_0x33fd6a[_0x305e14]['item']&&(_0x216e9f[_0x31ebe7]['shift'](),_0x482251[_0x31ebe7]=_0x496b2a['change'])),_0x482251[_0x31ebe7]&&_0x299486&&(_0x482251[_0x31ebe7]['end']=_0x53b35a,_0xe4f69d(_0x482251[_0x31ebe7]),_0x482251[_0x31ebe7]=null);}function _0xe4f69d({start:_0x3a733f,end:_0x593f73,tapeItem:_0x147126,userId:_0x50d492,type:_0x8ae82a}){const _0x510334=_0x147126['item'],_0x1db229=_0x7c7f74['schema']['isBlock'](_0x510334)&&!_0x7c7f74['schema']['isLimit'](_0x510334),_0x186888=_0x3a733f['nodeAfter']==_0x593f73['parent']&&_0x593f73['isAtStart'];if(_0x1db229&&_0x186888)return;const _0x58cf87=_0x7c7f74['createRange'](_0x3a733f,_0x593f73),_0x1ced05=_0x269971['get'](_0x50d492),_0x28579c=new G({'author':_0x1ced05,'type':'isAdded'==_0x8ae82a||'isAddSuggestion'==_0x8ae82a?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x8ae82a||'isRemoveSuggestion'==_0x8ae82a},'createdAt':new Date(),'rootName':_0x1df451});_0x7960e5['push'](_0x28579c),_0x5b745b['markers']['set']('revision:'+_0x28579c['id'],_0x58cf87);}function _0x1d3e14(_0x11ad45,_0x4d148c){const _0x19a787=_0x11ad45['getAttributes'](),_0xd5c33c=_0x4d148c['getAttributes']();for(const _0x39d4ad of _0x19a787){if(_0x39d4ad[0x1]!==_0x4d148c['getAttribute'](_0x39d4ad[0x0]))return!0x1;_0xd5c33c['next']();}return _0xd5c33c['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x459492=>{const _0x46bfe0=_0x459492['markerName']['split'](':')[0x1],_0x1e8325=this['_getChangeFromId'](_0x46bfe0);if(!_0x1e8325)return null;const _0xcdb9f2='add'==_0x1e8325['type']?'insertion':'deletion',_0x50f3f2=['ck-suggestion-marker','ck-suggestion-marker-'+_0xcdb9f2];return _0x1e8325['data']['isSuggestion']&&_0x50f3f2['push']('ck-suggestion-marker-'+_0xcdb9f2+'-new'),this['activeChange']==_0x1e8325&&_0x50f3f2['push']('ck-suggestion-marker--active'),{'classes':_0x50f3f2,'attributes':{'data-change-id':_0x46bfe0}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1fe775=>{_0x1fe775['on']('element:pre',(_0x309200,_0x2ef597,_0x4821b2)=>{const _0x1f532a=_0x2ef597['viewItem']['getChild'](0x0);if(!_0x1f532a||!_0x1f532a['is']('element','code'))return;if(!_0x4821b2['consumable']['consume'](_0x1f532a,{'attributes':['vid_start','vid_end']}))return;const _0xe5acd2=_0x2ef597['modelRange']['start']['nodeAfter'];_0x4821b2['writer']['setAttribute']('vid_start',_0x1f532a['getAttribute']('vid_start'),_0xe5acd2),_0x4821b2['writer']['setAttribute']('vid_end',_0x1f532a['getAttribute']('vid_end'),_0xe5acd2);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x27eff5=>{_0x27eff5['on']('element',(_0x5bb280,_0x1c8971,_0x15837b)=>{if(!_0x15837b['consumable']['consume'](_0x1c8971['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1c8971['modelRange']['isCollapsed'])return;const _0x84d35c=_0x1c8971['modelRange']['start']['nodeAfter'];_0x84d35c['hasAttribute']('vid_start')||_0x84d35c['hasAttribute']('vid')||(_0x15837b['writer']['setAttribute']('vid_start',_0x1c8971['viewItem']['getAttribute']('vid_start'),_0x84d35c),_0x15837b['writer']['setAttribute']('vid_end',_0x1c8971['viewItem']['getAttribute']('vid_end'),_0x84d35c));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x282060=>_0x282060['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x175e8a,[,_0x125959])=>{['vid_start','vid_end','vid']['includes'](_0x125959)&&(_0x175e8a['return']=!0x0,_0x175e8a['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x375759=>{_0x375759['on']('attribute:vid',(_0x4d9d8e,_0x886fe3,_0x1bc782)=>{if('\x20'!=_0x886fe3['item']['data']||_0x886fe3['item']['parent']['maxOffset']>0x1)return;if(!_0x1bc782['consumable']['consume'](_0x886fe3['item'],_0x4d9d8e['name']))return;const _0x503121=_0x1bc782['writer'],_0x36d917=_0x1bc782['mapper']['toViewRange'](_0x886fe3['range']);_0x503121['wrap'](_0x36d917,_0x503121['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xebfe82){const _0x229a2f=_0xebfe82['plugins']['get']('RevisionViewer');return(_0x2cbd8c,_0x2bf37d,_0x17a07f)=>{const _0x202630=_0x2bf37d['markerName']['split'](':')[0x1],_0xfdb158=_0x229a2f['_getChangeFromId'](_0x202630);if(!_0xfdb158)return null;const _0x531ff3='add'==_0xfdb158['type']?'split':'merge';if(!_0x17a07f['consumable']['test'](_0x2bf37d['markerRange'],_0x2cbd8c['name']))return;const _0x22c786=_0x2bf37d['markerRange']['getWalker'](),_0x6840f=_0x2bf37d['markerRange']['start'],_0x4a1061=_0xebfe82['model']['schema'];let _0x4dec21=null,_0x2569ee=null,_0x51908e=!0x1,_0xf3d1e4=!0x1;for(const _0x10ef5a of _0x22c786){const _0x3579b7=_0x10ef5a['item'];_0x51908e=_0x51908e||_0x4a1061['isContent'](_0x3579b7);const _0x2bdab5=_0x17a07f['mapper']['toViewElement'](_0x3579b7);if(_0x2bdab5&&_0x2bdab5['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x10ef5a['type']&&(_0x4a1061['isBlock'](_0x3579b7)&&!_0x4a1061['isLimit'](_0x3579b7)&&(_0x3579b7['nextSibling']||_0x6840f['isAtEnd']?_0x4dec21&&_0x4dec21['parent']==_0x3579b7||(_0x4dec21=_0x3579b7,_0x2109e0(_0x10ef5a['previousPosition']),_0xf3d1e4=!0x0):_0x2569ee=_0x2569ee||_0x10ef5a['previousPosition']));}function _0x2109e0(_0x16f6e5){const _0x2a5117=_0x17a07f['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x531ff3}),_0x52fc01=_0x17a07f['mapper']['toViewPosition'](_0x16f6e5);_0xfdb158['data']['isSuggestion']&&_0x17a07f['writer']['addClass']('ck-suggestion-marker-'+_0x531ff3+'-new',_0x2a5117),_0x229a2f['activeChange']==_0xfdb158&&_0x17a07f['writer']['addClass']('ck-suggestion-marker--active',_0x2a5117),_0x17a07f['writer']['insert'](_0x52fc01,_0x2a5117),_0x17a07f['mapper']['bindElementToMarker'](_0x2a5117,_0x2bf37d['markerName']);}_0x51908e||_0xf3d1e4||!_0x2569ee||_0x2109e0(_0x2569ee);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x95a59,_0x2c5e4f,_0x154eb2)=>{const _0x28a19a=_0x154eb2['mapper']['markerNameToElements'](_0x2c5e4f['markerName']);if(_0x28a19a){for(const _0x2c7d8e of _0x28a19a)(_0x2c7d8e['hasClass']('ck-suggestion-marker-split')||_0x2c7d8e['hasClass']('ck-suggestion-marker-merge'))&&(_0x154eb2['mapper']['unbindElementFromMarkerName'](_0x2c7d8e,_0x2c5e4f['markerName']),_0x154eb2['writer']['remove'](_0x2c7d8e));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4e3d8b,_0x2da85c,_0x4bbc4a)=>{const _0x1299e1=_0x2da85c['markerName']['split'](':')[0x1],_0x4ab4b1=this['_getChangeFromId'](_0x1299e1);if(!_0x4ab4b1)return null;const _0x5b3af0='add'==_0x4ab4b1['type']?'split':'merge';if(_0x4bbc4a['consumable']['test'](_0x2da85c['markerRange'],_0x4e3d8b['name']))for(const _0x165b77 of _0x2da85c['markerRange']['getItems']()){if(!_0x165b77['is']('element','softBreak'))continue;const _0x22733b=_0x4bbc4a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5b3af0}),_0x1910aa=_0x4bbc4a['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x165b77));_0x4ab4b1['data']['isSuggestion']&&_0x4bbc4a['writer']['addClass']('ck-suggestion-marker-'+_0x5b3af0+'-new',_0x22733b),this['activeChange']==_0x4ab4b1&&_0x4bbc4a['writer']['addClass']('ck-suggestion-marker--active',_0x22733b),_0x4bbc4a['writer']['insert'](_0x1910aa,_0x22733b),_0x4bbc4a['mapper']['bindElementToMarker'](_0x22733b,_0x2da85c['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3d8d89=>{for(const _0x2e2e6a of this['editor']['model']['document']['getRootNames']()){const _0x4b88da=this['editor']['model']['document']['getRoot'](_0x2e2e6a),_0x1a0e4a=this['editor']['editing']['view']['document']['getRoot'](_0x2e2e6a);if(_0x1a0e4a){const _0x3a4c27=_0x4b88da['getAttribute']('revisionHistoryAttachChange');if(_0x3d8d89['removeAttribute']('data-change-id',_0x1a0e4a),_0x3d8d89['removeClass']('ck-revision-history-root-add',_0x1a0e4a),_0x3d8d89['removeClass']('ck-revision-history-root-remove',_0x1a0e4a),_0x3d8d89['removeClass']('ck-revision-history-root--active',_0x1a0e4a),_0x3a4c27){const _0x2dd8dc=this['_getChangeFromId'](_0x3a4c27);if(!_0x2dd8dc)return null;_0x3d8d89['setAttribute']('data-change-id',_0x3a4c27,_0x1a0e4a),_0x3d8d89['addClass']('ck-revision-history-root-'+_0x2dd8dc['type'],_0x1a0e4a),this['activeChange']==_0x2dd8dc&&_0x3d8d89['addClass']('ck-revision-history-root--active',_0x1a0e4a);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x332ace=>'revision-comment:'+_0x332ace,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x381309=>'revision-suggestion:'+_0x381309,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3fd937=>({'name':'suggestion:'+_0x3fd937,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x35a4da=>{const _0x84eadb=_0x35a4da['markerName']['split'](':')[0x1];return'insertion'!=_0x84eadb&&'deletion'!=_0x84eadb?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x84eadb]};}}),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',(_0x11e3ed,_0x1ab6a2,_0x4e2af9)=>{const _0x39f2a0=_0x4e2af9['mapper']['markerNameToElements'](_0x1ab6a2['markerName']);if(_0x39f2a0){for(const _0x1c8a20 of _0x39f2a0)_0x1c8a20['is']('uiElement')&&(_0x4e2af9['mapper']['unbindElementFromMarkerName'](_0x1c8a20,_0x1ab6a2['markerName']),_0x4e2af9['writer']['remove'](_0x1c8a20));}},{'priority':'high'});}['_getChangeFromId'](_0x562ceb){return this['_changeIdToChange']['get'](_0x562ceb);}['_getViewForChange'](_0x3f726b){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x3f726b),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x110f1a,_0x323c6c,_0x3144b9,_0x52ecc9)=>{_0x52ecc9&&this['_balloon']['remove'](_0x52ecc9),_0x3144b9&&(this['_balloon']['add']({'view':_0x3144b9,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x46a69b=this['editor']['editing'],_0x1acc91=this['_getChangeFromId'](_0x3144b9['changeId']);let _0x197b89;if(_0x1acc91['data']['isOnRoot']){const _0x4c8947=_0x46a69b['view']['getDomRoot'](_0x1acc91['rootName']);_0x197b89=Array['from'](_0x4c8947['getClientRects']());}else{const _0x473ead=this['editor']['model']['markers']['get']('revision:'+_0x3144b9['changeId']);_0x197b89=Array['from'](_0x46a69b['mapper']['markerNameToElements'](_0x473ead['name']))['map'](_0xb45a85=>_0x46a69b['view']['domConverter']['mapViewToDom'](_0xb45a85))['map'](_0x2ce775=>Array['from'](_0x2ce775['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x197b89[0x0];return _0x197b89['find'](_0x1e3d0f=>_0x1e3d0f['top']-0x3<=this['_activeViewTarget']['y']&&_0x1e3d0f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1e3d0f['left']-0x3<=this['_activeViewTarget']['x']&&_0x1e3d0f['right']+0x3>=this['_activeViewTarget']['x'])||_0x197b89[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x496321,_0x303306,_0xca0bce,_0xec5340)=>{this['activeView']=_0xca0bce?this['_getViewForChange'](_0xca0bce):null,this['editor']['model']['change'](()=>{const _0x47d311=this['editor']['editing'];_0xec5340&&(_0xec5340['data']['isOnRoot']?_0x47d311['view']['change'](_0x30dcbe=>{_0x30dcbe['removeClass']('ck-revision-history-root--active',_0x47d311['view']['document']['getRoot'](_0xec5340['rootName']));}):_0x47d311['reconvertMarker']('revision:'+_0xec5340['id'])),_0xca0bce&&(_0xca0bce['data']['isOnRoot']?_0x47d311['view']['change'](_0x5c705f=>{_0x5c705f['addClass']('ck-revision-history-root--active',_0x47d311['view']['document']['getRoot'](_0xca0bce['rootName']));}):_0x47d311['reconvertMarker']('revision:'+_0xca0bce['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5ec6bd,_0x4522b4)=>{if(this['activeChange'])return;const _0x329957=this['_findChangeIdFromDomTarget'](_0x4522b4['target']),_0x3032d1=this['_changeIdToChange']['get'](_0x329957);_0x3032d1?(this['_activeViewTarget']={'x':_0x4522b4['domEvent']['x'],'y':_0x4522b4['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3032d1)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x31fd52,_0x5ef472)=>{const _0x42fff8=this['_findChangeIdFromDomTarget'](_0x5ef472['target']),_0x5217fe=this['_changeIdToChange']['get'](_0x42fff8);_0x5217fe?(this['_activeViewTarget']={'x':_0x5ef472['domEvent']['x'],'y':_0x5ef472['domEvent']['y']},_0x5217fe===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5217fe):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x43ce6e){do{const _0x1154aa=_0x43ce6e['getAttribute']('data-change-id');if(_0x1154aa)return _0x1154aa;_0x43ce6e=_0x43ce6e['parent'];}while(_0x43ce6e);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x263d47=>{for(const _0x39cc27 of this['editor']['model']['markers'])_0x263d47['removeMarker'](_0x39cc27);});}}function Q(_0x536cd1,_0x58b33b){return(_0x4611f0,_0x4267b6,_0xf1b196)=>{if(!_0xf1b196['consumable']['test'](_0x4267b6['markerRange'],_0x4611f0['name']))return;const _0x1e2795=_0x4267b6['markerRange']['getWalker'](),_0xcee9a8=_0x4267b6['markerRange']['start'],_0x422cbd=_0x536cd1['model']['schema'];let _0x16fcec=null,_0x2530da=null,_0x5f1b72=!0x1,_0x5b5d67=!0x1;for(const _0x5d2eb6 of _0x1e2795){const _0x507e7=_0x5d2eb6['item'];_0x5f1b72=_0x5f1b72||_0x422cbd['isContent'](_0x507e7);const _0x15d097=_0xf1b196['mapper']['toViewElement'](_0x507e7);if(_0x15d097&&_0x15d097['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5d2eb6['type']&&(_0x422cbd['isBlock'](_0x507e7)&&!_0x422cbd['isLimit'](_0x507e7)&&(_0x507e7['nextSibling']||_0xcee9a8['isAtEnd']?_0x16fcec&&_0x16fcec['parent']==_0x507e7||(_0x16fcec=_0x507e7,_0x1ec68e(_0x5d2eb6['previousPosition']),_0x5b5d67=!0x0):_0x2530da=_0x2530da||_0x5d2eb6['previousPosition']));}function _0x1ec68e(_0x5309cc){const _0x420782=_0xf1b196['mapper']['toViewPosition'](_0x5309cc),_0x3c811b=_0xf1b196['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x58b33b});_0xf1b196['writer']['insert'](_0x420782,_0x3c811b),_0xf1b196['mapper']['bindElementToMarker'](_0x3c811b,_0x4267b6['markerName']);}_0x5f1b72||_0x5b5d67||!_0x2530da||_0x1ec68e(_0x2530da);};}class nt extends _0xd0c377{constructor(_0x27f936){super(_0x27f936);const _0x4cfcc6=_0x27f936['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x4cfcc6,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4cfcc6,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x326565=this['editor'],_0x532e90=_0x326565['plugins']['get'](l),_0x38a5c9=_0x532e90['isReady']?_0x532e90['diff']['newRevisionId']:null;_0x326565['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x38a5c9);}['refresh'](){const {isReady:_0x39c061,isEnabled:_0xe5f3e4,repository:_0x1ab2a0,diff:_0x1e832d}=this['editor']['plugins']['get'](l),_0x12e401=_0x1e832d&&_0x1ab2a0['getLaterVisibleRevision'](_0x1e832d['newRevisionId']);this['isEnabled']=_0x39c061&&_0xe5f3e4&&Boolean(_0x12e401);}}class ot extends _0xd0c377{['_step'];constructor(_0x4f8a69,{direction:_0x617f6e}){super(_0x4f8a69);const _0x58d52e=_0x4f8a69['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x617f6e?0x1:-0x1,this['listenTo'](_0x58d52e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x58d52e,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x58d52e,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x56958a=this['editor'],_0x29fa75=_0x56958a['plugins']['get'](l),{isNavigationMode:_0xd85542,currentChangeNumber:_0x2a3f69}=_0x29fa75;let _0x48ddee;if(_0x29fa75['activeChange']=_0xd85542?_0x29fa75['diff']['changes']['get'](_0x2a3f69+this['_step']):_0x29fa75['diff']['changes']['first'],_0x29fa75['activeChange']['data']['isOnRoot'])_0x48ddee=_0x56958a['editing']['view']['getDomRoot'](_0x29fa75['activeChange']['rootName']);else{const _0x321e10=_0x56958a['model']['markers']['get']('revision:'+_0x29fa75['activeChange']['id']);_0x48ddee=_0x195504(_0x56958a['editing'],_0x321e10);}_0x1108f0({'target':_0x48ddee,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5f3237,currentChangeNumber:_0x3cd603,numberOfChanges:_0x3c2078,isReady:_0x4178d5,isEnabled:_0x3f9c20}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x3f9c20&&_0x4178d5&&_0x3c2078)&&(!_0x5f3237||(0x1===this['_step']?_0x3cd603<_0x3c2078-0x1:_0x3cd603>0x0));}}class xi extends _0x2d670e{constructor(_0x2eeef4){super(_0x2eeef4);const _0x331fdf=this['bindTemplate'],_0x301ae3=new _0xbbf7fb(_0x2eeef4),_0x5c744d=new _0xbbf7fb(_0x2eeef4);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',(_0x55137c,_0xd81f2b)=>_0x55137c&&_0xd81f2b>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x18803a,_0x3a3997,_0x48c3e7,_0x4ac535)=>{if(!_0x18803a)return R(_0x2eeef4,'Loading...');if(!_0x48c3e7)return R(_0x2eeef4,'No\x20changes');const _0x35a665=R(_0x2eeef4,'NUMBER_OF_CHANGES',_0x48c3e7);return _0x4ac535?R(_0x2eeef4,'X_OF_Y_CHANGES',[_0x3a3997+0x1,_0x48c3e7]):_0x35a665;}),_0x301ae3['set']({'label':R(_0x2eeef4,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2dab41}),_0x5c744d['set']({'label':R(_0x2eeef4,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x141731}),_0x301ae3['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5c744d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x301ae3['on']('execute',()=>this['fire']('execute','backward')),_0x5c744d['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',_0x331fdf['if']('_isStatusLabelVisible','ck-hidden',_0x1b9034=>!_0x1b9034)]},'children':[{'text':_0x331fdf['to']('isNavigationMode',_0x1fdfe1=>_0x1fdfe1?R(_0x2eeef4,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x2eeef4,'Total')+':\x20')}]},{'text':_0x331fdf['to']('_statusText')}]},new _0x3df35a(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x301ae3,_0x5c744d]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0xb2d8c8{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x115732=this['editor']['editing']['view'];_0x115732['change'](_0x3d3d59=>{for(const _0x3bf76a of _0x115732['document']['roots'])_0x3d3d59['addClass'](ge,_0x3bf76a);});}['hide'](){const _0x51b9ca=this['editor']['editing']['view'];_0x51b9ca['change'](_0x1ae5e4=>{for(const _0x1fe972 of _0x51b9ca['document']['roots'])_0x1ae5e4['removeClass'](ge,_0x1fe972);});}}class u extends _0xb2d8c8{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,Ri];}['init'](){const _0x884ece=this['editor'],_0x33503f=_0x884ece['plugins']['get'](l),_0x4efd57=_0x884ece['plugins']['get'](Ri);_0x884ece['ui']['componentFactory']['add']('exitToEditing',_0x5343ac=>{const _0x2177ad=new _0xbbf7fb(_0x5343ac);return _0x2177ad['set']({'label':R(_0x5343ac,'Back\x20to\x20editing'),'icon':_0x1f7494,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2177ad,'execute',()=>{_0x884ece['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2177ad;}),_0x884ece['ui']['componentFactory']['add']('restoreRevision',_0xd7eb3a=>{const _0x2a3717=new _0xbbf7fb(_0xd7eb3a);return _0x2a3717['set']({'label':R(_0xd7eb3a,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2a3717['bind']('isEnabled')['to'](_0x884ece['commands']['get']('restoreRevision')),this['listenTo'](_0x2a3717,'execute',()=>_0x884ece['execute']('restoreRevision')),_0x2a3717;}),_0x884ece['ui']['componentFactory']['add']('changesNavigation',_0x30b03e=>{const _0x2d7c0b=new xi(_0x30b03e),_0x47dd2c=_0x884ece['commands']['get']('showPreviousChange'),_0xefc49a=_0x884ece['commands']['get']('showNextChange');return _0x2d7c0b['bind']('isBackwardNavigationEnabled')['to'](_0x47dd2c,'isEnabled'),_0x2d7c0b['bind']('isForwardNavigationEnabled')['to'](_0xefc49a,'isEnabled'),_0x2d7c0b['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x33503f),this['listenTo'](_0x2d7c0b,'execute',(_0x36ff99,_0x3e8761)=>{_0x884ece['execute']('forward'===_0x3e8761?'showNextChange':'showPreviousChange');}),_0x2d7c0b;}),_0x4efd57['show'](),_0x33503f['on']('change:isReady',(_0x176f12,_0x534c88,_0x234836)=>{_0x234836?_0x4efd57['hide']():_0x4efd57['show']();});}}class _i extends ti{['_resizeObserver']=null;constructor(_0x441abb,_0x1357d0){super(_0x441abb,_0x1357d0);const _0x58314b=this['bindTemplate'];this['set']({'label':R(_0x441abb,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x441abb,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x58314b['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 _0x134f9a=this['fieldView']['element'];this['_tooltipString']=_0x134f9a['scrollWidth']>_0x134f9a['clientWidth']&&_0x134f9a['value']||'';}}class bi extends _0x2d670e{constructor(_0x296c50,_0x2653f2,_0x3e92a3){super(_0x296c50);const _0x24fa7d=new _0x5dfca0();_0x24fa7d['set']({'content':_0xfa7be3,'viewBox':'0\x200\x2011\x2010'});const _0x2fc4e8=['ck','ck-revision-history-sidebar__revision-author'];_0x3e92a3&&_0x2fc4e8['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3c6a8f=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x296c50,_0x3e92a3?'Revision\x20creator':'Revision\x20author')},'children':[_0x24fa7d,_0x2653f2['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2fc4e8},'children':_0x3c6a8f});}}function ki(_0x202420,_0xec5e6c){const _0x1994f1=_0x202420['bindTemplate'],_0x48c6b3=_0x202420['locale'],_0x4d01f5=_0x455c58(_0x48c6b3);_0x4d01f5['panelPosition']='sw';const _0x26e600=function(_0x5eebb3,_0x26cde0){const _0x45fb31=function(_0x3f71b3,_0xb0b427){const _0xd0ac48=_0x3f71b3['locale'],_0x179a2d={'Compare\x20against\x20selected':R(_0xd0ac48,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0xd0ac48,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0xd0ac48,'Restore\x20this\x20revision')};return _0xb0b427['map'](_0x4af67c=>{const _0x2578d4=_0x179a2d[_0x4af67c['name']];return _0x2578d4&&_0x2578d4!==_0x4af67c['name']&&(_0x4af67c['name']=_0x2578d4),_0x4af67c;});}(_0x5eebb3,_0x26cde0),_0x4d5ed8=new _0x1e8ea3();for(const _0x1db2db of _0x45fb31){const _0x1c5827={'type':'button','model':new to({'label':_0x1db2db['name'],'class':_0x1db2db['class'],'withText':!0x0,'role':'menuitem','_action':_0x1db2db['action']})};_0x1c5827['model']['bind']('isEnabled')['to'](_0x5eebb3,'isActionsDropdownOpen',_0x4bc565=>'function'!=typeof _0x1db2db['isEnabled']||(!_0x4bc565||_0x1db2db['isEnabled'](_0x5eebb3))),_0x4d5ed8['add'](_0x1c5827);}return _0x4d5ed8;}(_0x202420,_0xec5e6c);return _0x202420['bind']('isActionsDropdownOpen')['to'](_0x4d01f5,'isOpen'),_0x4d01f5['buttonView']['set']({'label':R(_0x48c6b3,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2f6449}),_0x4d01f5['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1994f1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1994f1['to'](_0x4c9639=>_0x4c9639['stopPropagation']())}}),_0x4d01f5['on']('execute',_0x13c54c=>{_0x202420['isReady']&&'function'==typeof _0x13c54c['source']['_action']&&_0x13c54c['source']['_action'](_0x202420);}),_0x3388f2(_0x4d01f5,_0x26e600,{'role':'menu'}),_0x4d01f5['listenTo'](_0x202420,'change:isActionsDropdownOpen',(_0x724d8c,_0x32fe12,_0x51545f)=>{if(_0x51545f)for(const _0x56253b of _0x4d01f5['listView']['items']){const _0x530d2d=_0x56253b['children']['first'],_0x5ce316=_0xec5e6c['find'](_0x278d17=>_0x278d17['action']===_0x530d2d['_action'])['isVisible'];_0x56253b['isVisible']=void 0x0===_0x5ce316||_0x5ce316(_0x202420);}}),_0x4d01f5;}class ci extends/* #__PURE__ -- @preserve */
27
- _0x2ed6a5(_0x2d670e){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x27bdf6,_0x5d0e04,_0x456501,_0x1c56f0){super(_0x27bdf6);const _0x30eb9f=this['bindTemplate'],_0x4b08ab=function(_0x1367b3,_0xa11f74){const _0x594126=Array['from'](_0xa11f74['authors'])['filter'](_0x3018be=>_0x3018be!=_0xa11f74['creator']);return _0xa11f74['creator']&&_0x594126['unshift'](_0xa11f74['creator']),_0x594126['map'](_0x59668b=>new bi(_0x1367b3,_0x59668b,_0x59668b==_0xa11f74['creator']));}(_0x27bdf6,_0x5d0e04);this['id']=_0x5d0e04['id'],this['_revision']=_0x5d0e04,this['_requireRevisionName']=_0x1c56f0,this['bind']('name','createdAt')['to'](_0x5d0e04),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x41d9cc=>{return _0xd217b1=_0x27bdf6['uiLanguage'],(_0x51896d=_0x41d9cc)['toLocaleDateString'](_0xd217b1,{'month':'long','day':'numeric'})+',\x20'+_0x51896d['toLocaleTimeString'](_0xd217b1,{'hour':'numeric','minute':'numeric'});var _0xd217b1,_0x51896d;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new _i(_0x27bdf6,_0x84c75d),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4d1b78=>_0x4d1b78||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x532a4a,_0x8bbf17)=>_0x532a4a&&_0x8bbf17),this['revisionActionsView']=_0x456501&&_0x456501['length']?ki(this,_0x456501):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x30eb9f['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x30eb9f['if']('isEnabled','ck-disabled',_0x3f31ff=>!_0x3f31ff),_0x30eb9f['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x30eb9f['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x30eb9f['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':_0x30eb9f['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':_0x4b08ab}]},this['revisionActionsView']],'on':{'click':_0x30eb9f['to'](_0x467a32=>{_0x467a32['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x331d37=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x331d37,'change',()=>{this['_requireRevisionName']&&!_0x331d37['value']||this['fire']('setName',{'id':this['id'],'name':_0x331d37['value']}),_0x331d37['value']||(_0x331d37['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(_0x1f50cb,_0xfc821c){const _0x2d14c5=_0x925bc5['fromJSDate'](_0x1f50cb)['setLocale'](_0xfc821c),_0x2c5d59=_0x925bc5['local'](),_0x10fdf3=_0x2c5d59['minus']({'days':0x1})['startOf']('day');let _0x410815,_0x356318;return _0x2d14c5['hasSame'](_0x2c5d59,'day')?(_0x410815=_0x2d14c5['startOf']('day')['toJSDate'](),_0x356318=_0x2d14c5['toRelativeCalendar']()):_0x2d14c5['hasSame'](_0x10fdf3,'day')?(_0x410815=_0x10fdf3['toJSDate'](),_0x356318=_0x2d14c5['toRelativeCalendar']()):_0x2d14c5['hasSame'](_0x2c5d59,'week')?(_0x410815=_0x2d14c5['startOf']('week')['toJSDate'](),_0x356318=_0x2d14c5['weekdayLong']||''):_0x2d14c5['hasSame'](_0x2c5d59,'year')?(_0x410815=_0x2d14c5['startOf']('month')['toJSDate'](),_0x356318=_0x2d14c5['monthLong']||''):(_0x410815=_0x2d14c5['startOf']('year')['toJSDate'](),_0x356318=String(_0x2d14c5['year'])),{'startDate':_0x410815,'localizedPeriodName':_0x356318};}class vi extends _0x2d670e{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2fda86,_0x4b52e7,_0x2878de,_0x2d3d09){super(_0x2fda86);const _0x3eb2ed=di(_0x4b52e7,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4b52e7,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x2878de,this['_requireRevisionName']=_0x2d3d09,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':_0x3eb2ed}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x457eae){const _0x5dd93c=new ci(this['locale'],_0x457eae,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x5dd93c);}['removeRevision'](_0x43e216){const _0x38a452=this['revisionViews']['find'](_0xbca1cf=>_0xbca1cf['id']===_0x43e216['id']);this['revisionViews']['remove'](_0x38a452);}}class mi extends _0x2d670e{constructor(_0x56346f){super(_0x56346f);const _0x2e3fda=new _0x5dfca0();_0x2e3fda['content']=_0x378803,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2e3fda,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x56346f,'Revision\x20history')]}]});}}class ai extends _0x2d670e{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x206cb7,_0x4807b9,_0x1db2af,_0x478f77){super(_0x206cb7);const _0xc19778=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4807b9,this['_revisionActions']=_0x1db2af,this['_requireRevisionName']=_0x478f77,this['on']('select',(_0x43f5d4,_0x5d018a)=>{this['fire']('revisionSelected',_0x5d018a);}),this['on']('setName',(_0x149d68,_0x452031)=>{this['fire']('revisionSetName',_0x452031);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new mi(_0x206cb7),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0xc19778['if']('isEnabled','ck-disabled',_0xc8c13e=>!_0xc8c13e)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xeb7bd3 of this['_revisions'])this['_addRevision'](_0xeb7bd3);this['_revisions']['on']('add',(_0x3bb664,_0x343121)=>{this['_addRevision'](_0x343121);}),this['_revisions']['on']('remove',(_0x2b1e32,_0x37e569)=>{this['_removeRevision'](_0x37e569);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x3d8ea7=>_0x3d8ea7['revisionViews']['map'](_0x269d64=>_0x269d64))['flat']();}['selectRevision'](_0x51ba8c){for(const _0x4ddfad of this['revisionViews'])_0x51ba8c&&_0x51ba8c['id']===_0x4ddfad['id']?_0x4ddfad['select']():_0x4ddfad['deselect']();}['highlightRevisions'](_0x882836){for(const _0xfb4316 of this['revisionViews'])_0x882836['some'](({id:_0x4eb51f})=>_0x4eb51f===_0xfb4316['id'])?_0xfb4316['highlight']():_0xfb4316['unhighlight']();}['_addRevision'](_0xb499de){const _0x16b9e2=di(_0xb499de['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x13dfd8=this['timePeriodViews']['get'](0x0);_0x13dfd8&&_0x13dfd8['startDate']['getTime']()===_0x16b9e2['getTime']()||(_0x13dfd8=new vi(this['locale'],_0x16b9e2,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x13dfd8)),_0x13dfd8['addRevision'](_0xb499de);}['_removeRevision'](_0x18f08){const _0x4fc913=di(_0x18f08['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4fc913)['removeRevision'](_0x18f08);}['_getTimePeriodViewByStartDate'](_0x4f4c91){return this['timePeriodViews']['find'](_0x480e28=>_0x480e28['startDate']['getTime']()===_0x4f4c91['getTime']());}}class f extends _0xb2d8c8{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x4f3aac,uid as _0x2e23f1,Collection as _0xd01162,logWarning as _0x43702b,FocusTracker as _0xd221d5,KeystrokeHandler as _0x567867,scrollViewportToShowTarget as _0x799686,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x51ae0d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x25ff9b,set as _0x336c62,unset as _0x57d449,isEqual as _0x23914e}from'es-toolkit/compat';import{Plugin as _0x1305a6,PendingActions as _0x12b2e2,Command as _0x5788b1,ElementApiMixin as _0x1cd33c,Editor as _0x674d86}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x4ca452,getMarkerDomElement as _0x308ad9,ConfirmMixin as _0x5f2668,sanitizeEditorConfig as _0x5dbe93}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x27e06e,ViewAttributeElement as _0x735ecc,ViewEmptyElement as _0x3458cf,ViewRawElement as _0x41874f,ViewUIElement as _0x4535de,ViewDocumentFragment as _0x54b629,ViewText as _0x470b3b,ViewElement as _0x2b40c0,ModelElement as _0x220be8,ModelRange as _0x15b2d1,ModelPosition as _0xb51ac3,ModelDocumentFragment as _0x24dd64,ModelText as _0x53c09b}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x317799,IconChevronUp as _0x434994,IconChevronDown as _0x1b458c,IconUndo as _0x3c04b5,IconUser as _0x5d06bd,IconThreeVerticalDots as _0x47696e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x59796b,View as _0x5afe72,submitHandler as _0x2f1169,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x5191d3,ListView as _0xa2f141,ListItemView as _0x3b47c2,ButtonView as _0x20e177,MenuBarMenuView as _0xaf22f1,MenuBarMenuListView as _0xb503e8,MenuBarMenuListItemView as _0x5c1894,MenuBarMenuListItemButtonView as _0x2a248b,ContextualBalloon as _0xbad7fb,ToolbarSeparatorView as _0x56d6b1,IconView as _0x13a599,addListToDropdown as _0x2730e5,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x331048,StickyPanelView as _0x4bf268,ToolbarView as _0x32ff63,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x18db6e}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x4f3aac(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0xfdca93){super(),this['id']=_0xfdca93['id']||_0x2e23f1(),this['creator']=_0xfdca93['creator']||null,this['authors']=_0xfdca93['authors']||[],this['diffData']=_0xfdca93['diffData']||null,this['toVersion']=_0xfdca93['toVersion']||0x0,this['fromVersion']=_0xfdca93['fromVersion']||0x0,this['set']('name',_0xfdca93['name']||''),this['set']('createdAt',_0xfdca93['createdAt']||new Date()),this['set']('attributes',_0xfdca93['attributes']||{});}['setName'](_0x32e3a9){this['_update']({'name':_0x32e3a9});}['setAttribute'](_0xbbdaa3,_0x1a5c43){const _0x23dc29=_0x25ff9b(this['attributes']);_0x336c62(_0x23dc29,_0xbbdaa3,_0x1a5c43),this['_update']({'attributes':_0x23dc29});}['removeAttribute'](_0x2726ef){const _0x99e1bf=_0x25ff9b(this['attributes']);_0x57d449(_0x99e1bf,_0x2726ef),this['_update']({'attributes':_0x99e1bf});}['_update'](_0x2bb524,_0x3ceadc=!0x1){let _0x272fde=!0x1;const _0x427da6={'id':this['id']},_0xfd2a=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x5474d7 of _0xfd2a){const _0x1b98b7=_0x2bb524[_0x5474d7];void 0x0!==_0x1b98b7&&_0x1b98b7!==this[_0x5474d7]&&(this[_0x5474d7]=_0x1b98b7,_0x427da6[_0x5474d7]=_0x1b98b7,_0x272fde=!0x0);}_0x272fde&&(_0x427da6['authors']&&(_0x427da6['authorsIds']=_0x427da6['authors']['map'](_0x138c3f=>_0x138c3f['id']),delete _0x427da6['authors']),this['fire']('_update',_0x427da6,_0x3ceadc));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4e322b=>_0x4e322b['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x1305a6{['_revisions'];static get['requires'](){return[_0x4ca452];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x334d7f){super(_0x334d7f),this['_revisions']=new _0xd01162();}['afterInit'](){!async function(_0x37628d){const _0x4298eb=_0x4932c2([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0x2e5285=0xeb829,_0x97b2b8=0x7374585f,_0x5d09d3=0x73732b07^_0x97b2b8,_0x1d89fe=window[_0x4932c2([0x44,0x61,0x74,0x65])][_0x4932c2([0x6e,0x6f,0x77])](),_0x224c81=_0x37628d[_0x4932c2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x128c9b=new window[(_0x4932c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d1d2f=>{_0x224c81[_0x4932c2([0x6f,0x6e,0x63,0x65])](_0x4932c2([0x72,0x65,0x61,0x64,0x79]),_0x3d1d2f);}),_0x5bbba5={[_0x4932c2([0x6b,0x74,0x79])]:_0x4932c2([0x45,0x43]),[_0x4932c2([0x75,0x73,0x65])]:_0x4932c2([0x73,0x69,0x67]),[_0x4932c2([0x63,0x72,0x76])]:_0x4932c2([0x50,0x2d,0x32,0x35,0x36]),[_0x4932c2([0x78])]:_0x4932c2([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]),[_0x4932c2([0x79])]:_0x4932c2([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]),[_0x4932c2([0x61,0x6c,0x67])]:_0x4932c2([0x45,0x53,0x32,0x35,0x36])},_0x1c772a=_0x224c81[_0x4932c2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4932c2([0x67,0x65,0x74])](_0x4932c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4befb8(){let _0x47d915,_0x1a7174=null,_0x31b414=null;try{if(_0x1c772a==_0x4932c2([0x47,0x50,0x4c]))return _0x4932c2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x47d915=_0x294ebb(),!_0x47d915)return _0x4932c2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x47d915[_0x4932c2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x31b414=_0x3bd83f(_0x47d915[_0x4932c2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x47d915[_0x4932c2([0x6a,0x74,0x69])])),await _0x11fe66()?_0x4bf16c()?_0xbb59a7()?_0x4932c2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2bf63a()?(_0x47d915[_0x4932c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4932c2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1a7174=_0x1ab9a4(_0x4932c2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x47d915[_0x4932c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4932c2([0x74,0x72,0x69,0x61,0x6c])&&(_0x1a7174=_0x1ab9a4(_0x4932c2([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x52aa23()):_0x4932c2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4932c2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4932c2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4932c2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xbb59a7(){const _0x58a61a=[_0x4932c2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4932c2([0x74,0x72,0x69,0x61,0x6c])][_0x4932c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47d915[_0x4932c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1d89fe/0x3e8:0xe10*_0x5d09d3;return _0x47d915[_0x4932c2([0x65,0x78,0x70])]<_0x58a61a;}function _0x4bf16c(){const _0xba2915=_0x47d915[_0x4932c2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xba2915)return!0x1;if(_0xba2915[_0x4932c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4932c2([0x2a])))return!0x0;if(_0xba2915[_0x4932c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4932c2([0x52,0x48])))return!0x0;if(_0xba2915[_0x4932c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4932c2([0x52,0x52,0x48]))){if(_0x5bc768())return!0x0;if(_0x287090()||_0x431987())return!0x0;}return!0x1;}function _0x2bf63a(){const _0x20c7e2=_0x47d915[_0x4932c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x20c7e2||0x0==_0x20c7e2[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1e773d}=new URL(window[_0x4932c2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x20c7e2[_0x4932c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e773d))return!0x0;const _0x45a22c=_0x1e773d[_0x4932c2([0x73,0x70,0x6c,0x69,0x74])](_0x4932c2([0x2e]));return _0x20c7e2[_0x4932c2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x572151=>_0x572151[_0x4932c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4932c2([0x2a])))[_0x4932c2([0x6d,0x61,0x70])](_0x2daca6=>_0x2daca6[_0x4932c2([0x73,0x70,0x6c,0x69,0x74])](_0x4932c2([0x2e])))[_0x4932c2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2a871e=>_0x2a871e[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x45a22c[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4932c2([0x6d,0x61,0x70])](_0x25a4d9=>Array(_0x45a22c[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x25a4d9[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4932c2([0x66,0x69,0x6c,0x6c])](_0x25a4d9[0x0]===_0x4932c2([0x2a])?_0x4932c2([0x2a]):'')[_0x4932c2([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x25a4d9))[_0x4932c2([0x73,0x6f,0x6d,0x65])](_0x52566f=>_0x45a22c[_0x4932c2([0x65,0x76,0x65,0x72,0x79])]((_0x42d365,_0x289db5)=>_0x52566f[_0x289db5]===_0x42d365||_0x52566f[_0x289db5]===_0x4932c2([0x2a])));}function _0x52aa23(){return _0x1a7174&&_0x31b414?new window[(_0x4932c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xed6b2c,_0x319cc6)=>{_0x1a7174[_0x4932c2([0x74,0x68,0x65,0x6e])](_0xed6b2c,_0x319cc6),_0x31b414[_0x4932c2([0x74,0x68,0x65,0x6e])](_0x1b20d4=>{_0x1b20d4!=_0x4932c2([0x56,0x61,0x6c,0x69,0x64])&&_0xed6b2c(_0x1b20d4);},_0x319cc6);}):_0x1a7174||_0x31b414||_0x4932c2([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3bd83f(_0xaa3f10,_0x53a7de){return new window[(_0x4932c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58bfa3=>{if(_0x4c9d02())return _0x58bfa3(_0x4932c2([0x56,0x61,0x6c,0x69,0x64]));_0x4345ef(),_0x224c81[_0x4932c2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4932c2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3d8348=!0x1;const _0x1ffa5c=_0x2e23f1();function _0x3f2be5(_0x2f59bf){return!!_0x2f59bf&&(typeof _0x2f59bf===_0x4932c2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2f59bf===_0x4932c2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2f59bf[_0x4932c2([0x74,0x68,0x65,0x6e])]===_0x4932c2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2f59bf[_0x4932c2([0x63,0x61,0x74,0x63,0x68])]===_0x4932c2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x71a85(_0x55b075){_0x23580d(_0x55b075)[_0x4932c2([0x74,0x68,0x65,0x6e])](_0x4f9e16=>{if(!_0x4f9e16||_0x4f9e16[_0x4932c2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4932c2([0x6f,0x6b]))return _0x4932c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3ccbbc(_0x46d187(_0x1ffa5c+_0x53a7de))!=_0x4f9e16[_0x4932c2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4932c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4932c2([0x56,0x61,0x6c,0x69,0x64]);})[_0x4932c2([0x74,0x68,0x65,0x6e])](_0x420d74=>(_0x22b689(),_0x420d74),()=>{const _0x273025=_0x4dec4f();return null==_0x273025?(_0x22b689(),_0x4932c2([0x56,0x61,0x6c,0x69,0x64])):_0x4932c2(_0x1d89fe-_0x273025>(0x5778dc5f^_0x97b2b8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4932c2([0x74,0x68,0x65,0x6e])](_0x58bfa3)[_0x4932c2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x58bfa3(_0x4932c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5e30c1=0x7342b6df^_0x97b2b8;function _0x22b689(){const _0x53f605=_0x4932c2([0x6c,0x6c,0x63,0x74,0x2d])+_0x3ccbbc(_0x46d187(_0xaa3f10)),_0x15478c=_0x56c842(_0x3ccbbc(window[_0x4932c2([0x4d,0x61,0x74,0x68])][_0x4932c2([0x63,0x65,0x69,0x6c])](_0x1d89fe/_0x5e30c1)));window[_0x4932c2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4932c2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x53f605,_0x15478c);}function _0x4dec4f(){const _0x410ccf=_0x4932c2([0x6c,0x6c,0x63,0x74,0x2d])+_0x3ccbbc(_0x46d187(_0xaa3f10)),_0x191ecf=window[_0x4932c2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4932c2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x410ccf);return _0x191ecf?window[_0x4932c2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56c842(_0x191ecf),0x10)*_0x5e30c1:null;}function _0x23580d(_0x3a81e3){return new window[(_0x4932c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x72b533,_0x39399f)=>{_0x3a81e3[_0x4932c2([0x74,0x68,0x65,0x6e])](_0x72b533,_0x39399f),window[_0x4932c2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x39399f,0x73758c9f^_0x97b2b8);});}}_0x224c81[_0x4932c2([0x6f,0x6e])](_0x4932c2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x239e9c,_0x15e16b)=>{if(_0x15e16b[0x0]!=_0xaa3f10)return _0x58bfa3(_0x4932c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x15e16b[0x1]={..._0x15e16b[0x1],[_0x4932c2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1ffa5c};},{[_0x4932c2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4932c2([0x68,0x69,0x67,0x68])}),_0x224c81[_0x4932c2([0x6f,0x6e])](_0x4932c2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x59ccca=>{_0x3f2be5(_0x59ccca[_0x4932c2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3d8348=!0x0,_0x71a85(_0x59ccca[_0x4932c2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4932c2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4932c2([0x6c,0x6f,0x77])}),_0x128c9b[_0x4932c2([0x74,0x68,0x65,0x6e])](()=>{_0x3d8348||_0x58bfa3(_0x4932c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4c9d02(){return _0x224c81[_0x4932c2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4932c2([0x76,0x69,0x65,0x77])][_0x4932c2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4932c2([0x61,0x75,0x74,0x6f]);}function _0x4345ef(){_0x224c81[_0x4932c2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4932c2([0x76,0x69,0x65,0x77])][_0x4932c2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4932c2([0x61,0x75,0x74,0x6f]);}}function _0x1ab9a4(_0x88a94d){const _0x460ae3=[new window[(_0x4932c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x41e1a1=>setTimeout(_0x41e1a1,0x737d6693^_0x97b2b8)),_0x128c9b[_0x4932c2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4932c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47942c=>{const _0x45348b=0x73745858^_0x97b2b8,_0x50419a=_0x37628d[_0x4932c2([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4a2ae5(){_0x50419a[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x45348b&&_0x47942c();}_0x4a2ae5(),_0x50419a[_0x4932c2([0x6f,0x6e])](_0x4932c2([0x61,0x64,0x64]),_0x4a2ae5);})),new window[(_0x4932c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15d3be=>{function _0x2623df(){for(const _0xb9f286 in window)if(window[_0x4932c2([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4932c2([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0xb9f286))&&window[_0xb9f286]==_0x2e5285)return _0x15d3be();_0x224c81[_0x4932c2([0x73,0x74,0x61,0x74,0x65])]!=_0x4932c2([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4932c2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2623df,0x73744bd7^_0x97b2b8);}_0x256b17(_0x4932c2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2623df();})];return window[_0x4932c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4932c2([0x72,0x61,0x63,0x65])](_0x460ae3)[_0x4932c2([0x74,0x68,0x65,0x6e])](()=>_0x88a94d);}async function _0x592b58(){if(await _0x128c9b,_0x256b17(_0x4932c2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x37ab75=_0x37628d[_0x4932c2([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x3450d1=_0x37628d[_0x4932c2([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])](_0x37ab75[_0x4932c2([0x69,0x64])]),_0x270566=_0x502379(_0x4932c2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x270566[_0x4932c2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x37ab75['id'],_0x3450d1?_0x3450d1['id']:null,!0x0),_0x270566[_0x4932c2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4932c2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x270566[_0x4932c2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x270566[_0x4932c2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3d269a,void(_0x270566[_0x4932c2([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3d269a);}if(_0x256b17(_0x4932c2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x31d9ad=_0x502379(_0x4932c2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x31d9ad[_0x4932c2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4932c2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x31d9ad[_0x4932c2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x31d9ad[_0x4932c2([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3d269a,_0x31d9ad[_0x4932c2([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3d269a;}_0x224c81[_0x4932c2([0x6d,0x6f,0x64,0x65,0x6c])][_0x4932c2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3d269a,_0x224c81[_0x4932c2([0x6d,0x6f,0x64,0x65,0x6c])][_0x4932c2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3d269a,_0x224c81[_0x4932c2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4932c2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5bc768(){return _0x256b17(_0x4932c2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x502379(_0x4932c2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4932c2([0x73,0x74,0x61,0x74,0x65])]==_0x4932c2([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x287090(){return _0x256b17(_0x4932c2([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 _0x431987(){return _0x256b17(_0x4932c2([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x142e21(_0x31b05a){const _0x37b81e=_0x3056df();_0x224c81[_0x37b81e]=_0x4932c2([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])+_0x31b05a,_0x31b05a[_0x4932c2([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4932c2([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x3056df()]=_0x2e5285),_0x31b05a!=_0x4932c2([0x56,0x61,0x6c,0x69,0x64])&&_0x592b58();}function _0x3056df(){const _0x5de7e8=window[_0x4932c2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4932c2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4932c2([0x6e,0x6f,0x77])]())[_0x4932c2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4932c2([0x2e]),'');let _0x5d34b8=_0x4932c2([0x73]);for(let _0x10543c=0x0;_0x10543c<_0x5de7e8[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x10543c+=0x2){let _0x430f37=window[_0x4932c2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5de7e8[_0x4932c2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10543c,_0x10543c+0x2));_0x430f37>=_0x4298eb[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x430f37-=_0x4298eb[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5d34b8+=_0x4298eb[_0x430f37];}return _0x5d34b8;}function _0x294ebb(){const _0x284280=_0x1c772a[_0x4932c2([0x73,0x70,0x6c,0x69,0x74])](_0x4932c2([0x2e]));if(0x3!=_0x284280[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5c05d4(_0x284280[0x1]);function _0x5c05d4(_0x22ec19){const _0x3dcdd6=_0xa6cbf2(_0x22ec19);return _0x3dcdd6&&_0x159e2e()?_0x3dcdd6:null;function _0x159e2e(){const _0x40704a=_0x3dcdd6[_0x4932c2([0x6a,0x74,0x69])],_0xc1a29e=window[_0x4932c2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x40704a[_0x4932c2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x40704a[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x34858e={..._0x3dcdd6,[_0x4932c2([0x6a,0x74,0x69])]:_0x40704a[_0x4932c2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x40704a[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x34858e[_0x4932c2([0x76,0x63])],_0x46d187(_0x34858e)==_0xc1a29e;}}}async function _0x11fe66(){let _0x4c59fb=!0x0;try{const _0x4aeed3=_0x1c772a[_0x4932c2([0x73,0x70,0x6c,0x69,0x74])](_0x4932c2([0x2e])),[_0x3ddc4f,_0x20d54c,_0x5b0fb6]=_0x4aeed3;return _0xef2568(_0x3ddc4f),await _0x301bde(_0x3ddc4f,_0x20d54c,_0x5b0fb6),_0x4c59fb;}catch{return!0x1;}function _0xef2568(_0x24efe4){const _0x4659b3=_0xa6cbf2(_0x24efe4);_0x4659b3&&_0x4659b3[_0x4932c2([0x61,0x6c,0x67])]==_0x4932c2([0x45,0x53,0x32,0x35,0x36])||(_0x4c59fb=!0x1);}async function _0x301bde(_0x39e8c0,_0x50899e,_0x491cc1){const _0xe0d2c9=window[_0x4932c2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4932c2([0x66,0x72,0x6f,0x6d])](_0x585c12(_0x491cc1),_0x220bb0=>_0x220bb0[_0x4932c2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4ed02b=new window[(_0x4932c2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4932c2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x39e8c0+_0x4932c2([0x2e])+_0x50899e),_0x29e9aa=window[_0x4932c2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4932c2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x29e9aa)return;const _0x3b86d1=await _0x29e9aa[_0x4932c2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4932c2([0x6a,0x77,0x6b]),_0x5bbba5,{[_0x4932c2([0x6e,0x61,0x6d,0x65])]:_0x4932c2([0x45,0x43,0x44,0x53,0x41]),[_0x4932c2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4932c2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4932c2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x29e9aa[_0x4932c2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4932c2([0x6e,0x61,0x6d,0x65])]:_0x4932c2([0x45,0x43,0x44,0x53,0x41]),[_0x4932c2([0x68,0x61,0x73,0x68])]:{[_0x4932c2([0x6e,0x61,0x6d,0x65])]:_0x4932c2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3b86d1,_0xe0d2c9,_0x4ed02b)||(_0x4c59fb=!0x1);}}function _0xa6cbf2(_0x1ddd90){return _0x1ddd90[_0x4932c2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4932c2([0x65,0x79]))?JSON[_0x4932c2([0x70,0x61,0x72,0x73,0x65])](_0x585c12(_0x1ddd90)):null;}function _0x585c12(_0x4e5e26){return window[_0x4932c2([0x61,0x74,0x6f,0x62])](_0x4e5e26[_0x4932c2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4932c2([0x2b]))[_0x4932c2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4932c2([0x2f])));}function _0x46d187(_0x52f715){let _0x38ae25=0x1505;function _0x226784(_0x3a00f9){for(let _0x4c2d78=0x0;_0x4c2d78<_0x3a00f9[_0x4932c2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4c2d78++){const _0x4f0519=_0x3a00f9[_0x4932c2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4c2d78);_0x38ae25=(_0x38ae25<<0x5)+_0x38ae25+_0x4f0519,_0x38ae25&=_0x38ae25;}}function _0x30e9cd(_0x4c8f2b){Array[_0x4932c2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4c8f2b)?_0x4c8f2b[_0x4932c2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x30e9cd):_0x4c8f2b&&typeof _0x4c8f2b==_0x4932c2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4932c2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4c8f2b)[_0x4932c2([0x73,0x6f,0x72,0x74])]()[_0x4932c2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x19864c,_0x2479af])=>{_0x226784(_0x19864c),_0x30e9cd(_0x2479af);}):_0x226784(window[_0x4932c2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4c8f2b));}return _0x30e9cd(_0x52f715),_0x38ae25>>>0x0;}function _0x3ccbbc(_0x4c3532){return _0x4c3532[_0x4932c2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4932c2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4932c2([0x30]));}function _0x56c842(_0x54c428){return _0x54c428[_0x4932c2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4932c2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4932c2([0x6a,0x6f,0x69,0x6e])]('');}function _0x256b17(_0xcb7486){return _0x224c81[_0x4932c2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4932c2([0x68,0x61,0x73])](_0xcb7486);}function _0x502379(_0x515990){return _0x224c81[_0x4932c2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4932c2([0x67,0x65,0x74])](_0x515990);}function _0x3d269a(){}function _0x4932c2(_0xc018e3){return _0xc018e3['map'](_0x5c32b5=>String['fromCharCode'](_0x5c32b5))['join']('');}_0x142e21(await _0x4befb8());}(this);}['createRevision'](_0x368107){const _0x38f622=this['editor']['plugins']['get']('Users');return new I({'id':_0x368107['id'],'name':_0x368107['name'],'creator':_0x368107['creatorId']?_0x38f622['getUser'](_0x368107['creatorId']):null,'diffData':_0x368107['diffData']||_0x368107['data'],'authors':_0x368107['authorsIds']['map'](_0x2e033f=>_0x38f622['getUser'](_0x2e033f)),'createdAt':new Date(_0x368107['createdAt']),'attributes':_0x368107['attributes'],'fromVersion':_0x368107['fromVersion'],'toVersion':_0x368107['toVersion']});}['addRevision'](_0xc380a9,_0x138730=0x0){this['_revisions']['add'](_0xc380a9,_0x138730);}['getRevision'](_0xa4b7b0){return this['_revisions']['get'](_0xa4b7b0);}['getRevisions'](_0x5c5828={'toJSON':!0x1}){const _0x3fa538=Array['from'](this['_revisions']);return _0x3fa538['reverse'](),_0x5c5828['toJSON']?_0x3fa538['map'](_0x868a81=>_0x868a81['toJSON']()):_0x3fa538;}['getIndex'](_0x5ed4d6){return this['_revisions']['getIndex'](_0x5ed4d6);}['getEarlierVisibleRevision'](_0x2b4c29){const [,_0x5f0751]=this['getRevisionsIterator'](_0x2b4c29,{'direction':'earlier'});return _0x5f0751;}['getLaterVisibleRevision'](_0x5bc127){const [,_0x21e477]=this['getRevisionsIterator'](_0x5bc127,{'direction':'later'});return _0x21e477;}['getRevisionsInDiff'](_0x111cd2){const _0x5e0f2a=[];for(const _0x173dff of this['getRevisionsIterator'](_0x111cd2['newRevisionId']))if(_0x5e0f2a['push'](_0x173dff),_0x173dff['id']===_0x111cd2['oldRevisionId'])break;return _0x5e0f2a;}*['getRevisionsIterator'](_0x3f9baf,{direction:_0x5843ef='earlier',filter:_0x286a11=()=>!0x0}={}){const _0x12fd5a='earlier'===_0x5843ef?0x1:-0x1;let _0xc9fc33=this['_revisions']['get'](_0x3f9baf),_0x450d4e=this['getIndex'](_0xc9fc33);for(yield _0xc9fc33;_0xc9fc33;){if(_0x450d4e+=_0x12fd5a,_0xc9fc33=this['getRevision'](_0x450d4e),!_0xc9fc33)return;_0x286a11(_0xc9fc33)&&(yield _0xc9fc33);}}}class $ extends _0x1305a6{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x27e06e,'c'],[_0x735ecc,'a'],[_0x3458cf,'e'],[_0x41874f,'r'],[_0x4535de,'u']]);['_typeCharToViewClass']=new Map([['c',_0x27e06e],['a',_0x735ecc],['e',_0x3458cf],['r',_0x41874f],['u',_0x4535de]]);async['loadRevisionData'](_0x5cf160,_0x4d839c){if(_0x5cf160['diffData']||!_0x4d839c)return;const _0x2d14ae=this['editor']['config']['get']('collaboration.channelId'),_0x4d078=await _0x4d839c['getRevision']({'channelId':_0x2d14ae,'revisionId':_0x5cf160['id']});_0x5cf160['diffData']=_0x4d078['diffData'];}['getRevisionDocumentData'](_0x14e09e){const _0x2b98cd={};for(const _0x775f0b in _0x14e09e['diffData']){if(_0x14e09e['diffData'][_0x775f0b]['attachChange']&&!_0x14e09e['diffData'][_0x775f0b]['attachChange']['isAttached'])continue;const _0x42fa4c=this['_removeRevisionMarkers'](JSON['parse'](_0x14e09e['diffData'][_0x775f0b]['insertions'])),_0x4a00b7=this['editor']['editing']['view']['document'],_0x3a5bda=new _0x54b629(_0x4a00b7,_0x42fa4c['map'](_0x17b23e=>this['_getViewFromDiffObj'](_0x17b23e,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2b98cd[_0x775f0b]=this['editor']['data']['processor']['toData'](_0x3a5bda),this['editor']['data']['processor']['useFillerType']('default');}return _0x2b98cd;}['getRevisionRootsAttributes'](_0x548022){const _0x37460f={};for(const _0x5ca643 in _0x548022['diffData'])_0x548022['diffData'][_0x5ca643]['attachChange']&&!_0x548022['diffData'][_0x5ca643]['attachChange']['isAttached']||(_0x37460f[_0x5ca643]=_0x548022['diffData'][_0x5ca643]['attributesAfter']||{});return _0x37460f;}['_getTypeCharForViewElement'](_0x15cd16){return this['_viewClassToTypeChar']['get'](_0x15cd16['constructor']);}['_getViewFromDiffObj'](_0x526ec0,_0x2a9177){const _0x23918d=this['editor']['editing']['view']['document'];if('string'==typeof _0x526ec0)return new _0x470b3b(_0x23918d,_0x526ec0);{let _0x2257a6,_0x9e8384;_0x9e8384='u'==_0x526ec0['type']||'r'==_0x526ec0['type']?[]:_0x526ec0['children']['map'](_0x31594c=>this['_getViewFromDiffObj'](_0x31594c,_0x2a9177));const _0x2bdd7c=this['_typeCharToViewClass']['get'](_0x526ec0['type'])||_0x2b40c0,_0x9e5ac2=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2257a6=new _0x2bdd7c(_0x23918d,_0x526ec0['name'],_0x526ec0['attributes'],_0x9e8384),'u'==_0x526ec0['type']&&_0x526ec0['children'][0x0]){const _0x2d9131=_0x526ec0['children'][0x0];if(_0x2257a6['render']=function(_0x18729f){const _0x186285=_0x18729f['createElement']('div');return _0x186285['innerHTML']=_0x2d9131,_0x186285['childNodes'][0x0];},_0x2a9177){const _0x123e8c=new _0x54b629(_0x23918d);_0x123e8c['_appendChild'](_0x2257a6);const _0x1521ac=Array['from'](_0x9e5ac2['viewChildrenToDom'](_0x123e8c,{'bind':!0x1})),_0x5277fe=_0x9e5ac2['domDocument']['createElement']('div');_0x5277fe['append'](..._0x1521ac),_0x2257a6=Array['from'](_0x9e5ac2['domChildrenToView'](_0x5277fe))[0x0];}}else{if('r'==_0x526ec0['type']&&_0x526ec0['children'][0x0]){const _0x161b68=_0x526ec0['children'][0x0];if(_0x2257a6['render']=function(_0x5f577e){_0x5f577e['innerHTML']=_0x161b68;},_0x2a9177){const _0x2bb892=new _0x54b629(_0x23918d);_0x2bb892['_appendChild'](_0x2257a6);const _0x3fb6eb=Array['from'](_0x9e5ac2['viewChildrenToDom'](_0x2bb892,{'bind':!0x1})),_0x23db7e=_0x9e5ac2['domDocument']['createElement']('div');_0x23db7e['append'](..._0x3fb6eb);const _0x419aee=Array['from'](_0x9e5ac2['domChildrenToView'](_0x23db7e));_0x419aee['length']>0x1?_0x2257a6['_appendChild'](_0x419aee):_0x2257a6=_0x419aee[0x0];}}}if(_0x526ec0['customProperties']){for(const [_0x1758f9,_0x1730e0]of _0x526ec0['customProperties'])_0x2257a6['_setCustomProperty'](_0x1758f9,_0x1730e0);}const _0xd6fab5=void 0x0===_0x526ec0['fillerOffset']?null:_0x526ec0['fillerOffset'];return null!==_0xd6fab5&&(_0x2257a6['getFillerOffset']=()=>_0xd6fab5),_0x2257a6;}}['_makeModelFromViewString'](_0x5a4922){const _0x3612cc=JSON['parse'](_0x5a4922),_0x585701=this['editor']['editing']['view']['document'],_0x44757b=new _0x54b629(_0x585701,_0x3612cc['map'](_0x2f61bd=>this['_getViewFromDiffObj'](_0x2f61bd,!0x0)));return this['editor']['data']['toModel'](_0x44757b);}['_removeRevisionMarkers'](_0x15d611){return(_0x15d611=_0x15d611['filter'](_0x3f6e53=>!_0x3f6e53['name']||'revision-start'!==_0x3f6e53['name']&&'revision-end'!==_0x3f6e53['name']))['forEach'](_0x5833aa=>{'string'!=typeof _0x5833aa&&(_0x5833aa['children']=this['_removeRevisionMarkers'](_0x5833aa['children']),_0x5833aa['attributes']=_0x5833aa['attributes']['filter'](_0x11245b=>!_0x11245b[0x0]['startsWith']('data-revision-')));}),_0x15d611;}}function R(_0x21d22e,_0x389aff,_0x1f1586){const t=_0x21d22e['t'];switch(_0x389aff){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'},_0x1f1586);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1f1586);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 _0x1305a6{['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[_0x4ca452,S,$,_0x12b2e2];}constructor(_0x1f4a68){super(_0x1f4a68),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 _0xd053e0=_0x2e23f1();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0xd053e0},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 _0x16e1a5=this['repository']['getRevision'](0x0),_0x33b196=_0x16e1a5&&null===_0x16e1a5['creator']?_0x16e1a5:null;if(this['_continueCurrentRevision']=!!_0x33b196&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x237ea2=this['_source']['getCurrentRevisionId'](),_0x25e365=this['repository']['getRevision'](_0x237ea2);if(_0x25e365)this['_startingVersion']=_0x25e365['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x38b60e=this['_source']['history']['_operations']['find'](_0x33f720=>!_0x33f720['_isInit']),_0x229ec0=_0x38b60e?_0x38b60e['baseVersion']:this['_source']['history']['version'];_0x16e1a5?(_0x16e1a5['toVersion']<_0x229ec0&&_0x16e1a5['_update']({'toVersion':_0x229ec0}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x33b196['id'],this['_startingVersion']=_0x33b196['fromVersion']):(this['_startingVersion']=_0x16e1a5['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x229ec0,this['_continueCurrentRevision']=!0x1);}}else _0x33b196&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x33b196['toVersion'],this['editor']['model']['document']['history']['version']),_0x33b196['fromVersion']===_0x33b196['toVersion']?(0x0!==_0x33b196['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x33b196['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x33b196['id'],this['_startingVersion']=_0x33b196['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',_0x5f5d66=>!_0x5f5d66),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x434ccc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x186157;for(const _0x5cfc10 in _0x434ccc){const _0x48d878=_0x5cfc10,_0x526ca6=_0x434ccc[_0x48d878];if('revisionHistoryLicenseKeyValid'==_0x526ca6||'revisionHistoryLicenseKeyInvalid'==_0x526ca6||'revisionHistoryLicenseKeyExpired'==_0x526ca6||'revisionHistoryLicenseKeyDomainLimit'==_0x526ca6||'revisionHistoryLicenseKeyNotAllowed'==_0x526ca6||'revisionHistoryLicenseKeyEvaluationLimit'==_0x526ca6||'revisionHistoryLicenseKeyTrialLimit'==_0x526ca6||'revisionHistoryLicenseKeyUsageLimit'==_0x526ca6){delete _0x434ccc[_0x48d878],_0x186157=_0x526ca6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x186157&&_0x434ccc['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x186157&&_0x434ccc['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x186157&&_0x434ccc['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x186157&&_0x434ccc['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x186157&&_0x434ccc['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x186157&&_0x434ccc['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x186157&&_0x434ccc['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x360613=this['repository']['getRevision'](0x0),_0x5875f8=await this['getRevisionDocumentData'](_0x360613),_0x27bf96=await this['getRevisionRootsAttributes'](_0x360613);this['_replaceEditorDataWithRevisionData'](_0x5875f8,_0x27bf96);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2cd678){this['_source']=_0x2cd678;}async['update'](){const _0xdb6b43=await this['_source']['getLatestVersion']();if(_0xdb6b43>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3aa6de=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0xdb6b43});_0x3aa6de['authors']=_0x3aa6de['authorsIds']['map'](_0x3c86e8=>this['editor']['plugins']['get']('Users')['getUser'](_0x3c86e8)),this['currentRevision']['_update'](_0x3aa6de);}}async['saveRevision'](_0x2a3a62={},_0x5cf760=null){const _0x223455=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x5cf760>this['currentRevision']['toVersion']&&(_0x5cf760=null),null===_0x5cf760&&(_0x5cf760=await this['_source']['getLatestVersion']());const _0x1d75f5=this['_getFromVersion'](_0x5cf760),_0x558294=this['buildRevisionData']({'from':_0x1d75f5,'to':_0x5cf760});if(this['currentRevision']['toVersion']<_0x5cf760){const _0x19e2ce=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x5cf760,'to':_0x5cf760});_0x19e2ce['authors']=[],_0x19e2ce['authorsIds']=[],_0x19e2ce['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x19e2ce,!0x0),delete _0x19e2ce['authors'],_0x223455['push'](_0x19e2ce);}_0x2a3a62['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x2a3a62['name']=_0x2a3a62['name']||null,_0x2a3a62['id']=_0x2a3a62['id']||_0x2e23f1(),_0x2a3a62={..._0x2a3a62,..._0x558294};const _0xfee374=this['addRevisionData'](_0x2a3a62);_0x223455['push'](_0x2a3a62);const _0x197505=this['repository']['getIndex'](_0xfee374);if(0x0!==_0x197505){const _0x3752ef=this['repository']['getRevision'](_0x197505-0x1);if(_0x3752ef['fromVersion']!==_0x5cf760){const _0x1643fc=this['_revisionDataBuilder']['getData'](_0x5cf760,_0x3752ef['toVersion']),_0x531394={'id':_0x3752ef['id'],'diffData':_0x1643fc['diffData'],'authorsIds':_0x1643fc['authorsIds'],'authors':_0x1643fc['authorsIds']['map'](_0xe4d1ee=>this['editor']['plugins']['get']('Users')['getUser'](_0xe4d1ee)),'fromVersion':_0x5cf760};_0x3752ef===this['currentRevision']&&(_0x531394['createdAt']=new Date(_0x2a3a62['createdAt']['getTime']()+0xa)),_0x3752ef['_update'](_0x531394,!0x0),delete _0x531394['authors'],_0x223455['push'](_0x531394);}}if(this['adapter']){for(const _0x520f0d of _0x223455)this['_bufferUpdate'](_0x520f0d['id'],_0x520f0d,!0x0);this['sendBufferedUpdates']();}return _0xfee374;}['addRevisionData'](_0x5c9d79){const _0x2c181d=this['repository']['createRevision'](_0x5c9d79);return this['adapter']&&_0x2c181d['on']('_update',(_0x4d02ea,_0x1825e5,_0x124a19)=>{_0x124a19||(this['_bufferUpdate'](_0x1825e5['id'],_0x1825e5,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2c181d,this['_findInsertionIndex'](_0x2c181d)),_0x2c181d;}async['getRevisionDocumentData'](_0x885d87){return await this['_utils']['loadRevisionData'](_0x885d87,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x885d87);}async['getRevisionRootsAttributes'](_0x20c44a){return await this['_utils']['loadRevisionData'](_0x20c44a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x20c44a);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x138d55=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x27193d=0x0;_0x27193d<_0x138d55['length'];_0x27193d++){const _0x3eb329=_0x138d55[_0x27193d];let _0x2dcdad=!0x1;for(const _0x28e0c8 of Object['keys'](_0x3eb329))void 0x0===_0x3eb329[_0x28e0c8]?delete _0x3eb329[_0x28e0c8]:'id'!==_0x28e0c8&&(_0x2dcdad=!0x0);_0x2dcdad||(_0x138d55[_0x27193d]=null);}if(_0x138d55=_0x138d55['filter'](_0x33cc98=>null!==_0x33cc98),!_0x138d55['length'])return;for(let _0x52a058=0x0;_0x52a058<_0x138d55['length'];_0x52a058++){const _0x1fa665=_0x138d55[_0x52a058];void 0x0!==_0x1fa665['fromVersion']&&void 0x0===_0x1fa665['toVersion']&&(_0x1fa665['toVersion']=this['repository']['getRevision'](_0x1fa665['id'])['toVersion']),void 0x0!==_0x1fa665['toVersion']&&void 0x0===_0x1fa665['fromVersion']&&(_0x1fa665['fromVersion']=this['repository']['getRevision'](_0x1fa665['id'])['fromVersion']);}const _0x58c305=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x138d55,_0x58c305)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x15a9bb=>{if(_0x15a9bb){for(const _0x1ac554 of _0x15a9bb)this['setRevisionData']({'id':_0x1ac554['id'],'createdAt':_0x1ac554['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x3c749d=null,from:_0x5741b8=null,to:_0xd16ce9=null}){_0x5741b8=null!==_0x5741b8?_0x5741b8:_0x3c749d['fromVersion'],_0xd16ce9=null!==_0xd16ce9?_0xd16ce9:_0x3c749d['toVersion'];const _0x4f68b5=this['_revisionDataBuilder']['getData'](_0x5741b8,_0xd16ce9),_0xcc1914={'diffData':_0x4f68b5['diffData'],'authorsIds':_0x4f68b5['authorsIds'],'fromVersion':_0x5741b8,'toVersion':_0xd16ce9};if(!_0x3c749d||_0xd16ce9!==_0x3c749d['toVersion']){const _0x1326ad=_0xd16ce9-0x1,_0x5176aa=this['_source']['history']['getOperation'](_0x1326ad);_0xcc1914['createdAt']=_0x5176aa&&_0x5176aa['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5741b8===this['_loadedStateData']['fromVersion']){for(const _0x5133aa of this['_loadedStateData']['authors'])_0xcc1914['authorsIds']['includes'](_0x5133aa['id'])||_0xcc1914['authorsIds']['push'](_0x5133aa['id']);}return _0xcc1914;}['_bufferUpdate'](_0x447ef1,_0x1e33d4,_0x2893fc){if(this['_bufferedUpdates']['has'](_0x447ef1)){const _0x163adb=this['_bufferedUpdates']['get'](_0x447ef1);_0x1e33d4=_0x2893fc?{..._0x163adb,..._0x1e33d4}:{..._0x1e33d4,..._0x163adb};}this['_bufferedUpdates']['set'](_0x447ef1,_0x1e33d4);}['setRevisionData'](_0x504235){const _0x503507=this['repository']['getRevision'](_0x504235['id']);if(_0x504235['createdAt']&&(_0x504235['createdAt']=new Date(_0x504235['createdAt'])),_0x504235['authorsIds']){const _0x51fcc8=this['editor']['plugins']['get']('Users');_0x504235['authors']=_0x504235['authorsIds']['map'](_0x4ce33c=>_0x51fcc8['getUser'](_0x4ce33c));}_0x503507['_update'](_0x504235,!0x0);}['_createInitialRevision'](_0x390b39){const _0x385f3b=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x385f3b)this['_initialRevisionId']=_0x385f3b['id'];else{const _0x51a74e=!this['editor']['model']['document']['roots']['find'](_0x48ae27=>this['editor']['model']['hasContent'](_0x48ae27)),_0x57a942=this['editor']['plugins']['get']('Users')['me']['id'],_0x5ef061=R(this['editor']['locale'],_0x51a74e?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x390b39,'to':_0x390b39,'id':this['_initialRevisionId'],'name':_0x5ef061,'creatorId':_0x57a942});}}['_createCurrentRevision'](_0x1a9903){const _0xc46b9f=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xc46b9f),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1a9903,'to':_0x1a9903,'id':_0xc46b9f,'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'](_0x58af42,_0x317347){let _0xe13c9f=this['editor']['config']['get']('initialData'),_0x36c1d4=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0xe13c9f){_0xe13c9f={};for(const _0x509c84 of this['editor']['model']['document']['getRootNames']())_0xe13c9f[_0x509c84]='';}if('string'==typeof _0xe13c9f&&(_0xe13c9f={'main':_0xe13c9f}),void 0x0===_0x36c1d4){_0x36c1d4={};for(const _0x4cd632 of this['editor']['model']['document']['getRootNames']())_0x36c1d4[_0x4cd632]={};}let _0x59a9d3=!0x1;const _0x208ea8=Object['keys'](_0xe13c9f),_0x2b3ebe=Object['keys'](_0x58af42);for(const _0x3b6137 of _0x208ea8){if(_0xe13c9f[_0x3b6137]!==_0x58af42[_0x3b6137]&&''!==_0xe13c9f[_0x3b6137]['trim']()){_0x59a9d3=!0x0;break;}if(!_0x23914e(_0x36c1d4[_0x3b6137],_0x317347[_0x3b6137])&&Object['keys'](_0x36c1d4[_0x3b6137])['length']>0x0){_0x59a9d3=!0x0;break;}}_0x59a9d3||(_0x59a9d3=_0x2b3ebe['some'](_0x1bb477=>!this['editor']['model']['document']['getRoot'](_0x1bb477))),_0x59a9d3&&_0x43702b('editor-initial-data-replaced-with-revision-data',{'editorData':_0xe13c9f,'editorRootsAttributes':_0x36c1d4,'revisionData':_0x58af42,'revisionRootsAttributes':_0x317347}),this['editor']['config']['set']('initialData',_0x58af42),this['editor']['config']['set']('rootsAttributes',_0x317347);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x52dd5b=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x52dd5b['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x37bfad){const _0x4b25bc=this['repository']['getRevisions']();_0x4b25bc['reverse']();let _0x286d42=0x0;for(;_0x286d42<_0x4b25bc['length'];){const _0x560c8d=_0x4b25bc[_0x286d42];if(_0x560c8d===this['currentRevision']){_0x286d42++;continue;}if(_0x560c8d['id']===this['_initialRevisionId'])break;const _0x3fc46f=_0x37bfad['toVersion']-_0x560c8d['toVersion']||_0x37bfad['fromVersion']-_0x560c8d['fromVersion'];if(_0x3fc46f>0x0)break;if(_0x3fc46f<0x0)_0x286d42++;else{if(!_0x37bfad['creator']&&_0x560c8d['creator'])break;if(_0x560c8d['creator']||!_0x37bfad['creator']){if(_0x37bfad['createdAt']>_0x560c8d['createdAt'])break;_0x286d42++;}else _0x286d42++;}}return _0x286d42;}['_getFromVersion'](_0x5ccc62){const _0x236a0f=this['repository']['getRevisions']();_0x236a0f['reverse'](),_0x236a0f['shift']();const _0xf751f6=_0x236a0f['find'](_0x453eff=>_0x453eff['toVersion']<=_0x5ccc62)['toVersion'];return _0xf751f6<this['_startingVersion']?this['_startingVersion']:_0xf751f6;}['_makeRevision']({name:_0x1fa1e1,from:_0x1bbeb8,to:_0x2f0146,creatorId:_0x14f87e,id:_0x592533}){const _0x50c4ed=this['buildRevisionData']({'from':_0x1bbeb8,'to':_0x2f0146});_0x50c4ed['name']=_0x1fa1e1,_0x50c4ed['creatorId']=_0x14f87e,_0x50c4ed['id']=_0x592533;const _0x2c68f5=this['addRevisionData'](_0x50c4ed);return this['adapter']&&this['_bufferUpdate'](_0x50c4ed['id'],_0x50c4ed,!0x0),_0x2c68f5;}['_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(_0x373278){this['editor']=_0x373278,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'](_0x5e0415){this['source']=_0x5e0415;const _0x45a850=new Map(),_0x24b80c=new Map(),_0x587b2c=this['editor']['model']['document']['roots']['map'](_0x42d814=>_0x42d814['rootName']);for(const _0x11a6dc of _0x587b2c){const _0x5a323c=this['editor']['model']['document']['getRoot'](_0x11a6dc),_0x3384ac=x(_0x5a323c);_0x45a850['set'](_0x11a6dc,_0x3384ac),_0x24b80c['set'](_0x11a6dc,Object['fromEntries'](_0x5a323c['getAttributes']()));}const _0x3f1cc2=Array['from'](this['editor']['model']['markers'])['map'](_0x59f775=>[_0x59f775['name'],_0x59f775['getRange']()]),_0x5ac951=this['source']['version'];this['_saveMetaData'](_0x5ac951,_0x45a850,_0x3f1cc2,_0x24b80c),this['_startingRevisionId']=this['_revisionId'];const _0x371f9c=new Map(),_0x31b313=new Map();for(const _0x268991 of _0x587b2c){const _0x10bd95=N(_0x268991);_0x371f9c['set'](_0x268991,_0x10bd95),_0x31b313['set'](_0x268991,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x371f9c,[],_0x31b313);}['getData'](_0xa4bdb3,_0x54853c){if(this['_lastFrom']===_0xa4bdb3&&this['_lastTo']<=_0x54853c)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x54853c,!0x0);else{if(!this['_savedMetaData']['has'](_0xa4bdb3)){const _0x1d9eb1=this['_getPreviousFrom'](_0xa4bdb3);this['_calculateMetaData'](_0x1d9eb1,_0xa4bdb3,!0x1);}this['_calculateMetaData'](_0xa4bdb3,_0x54853c,!0x0);}return this['_lastFrom']=_0xa4bdb3,this['_lastTo']=_0x54853c,this['_getState']();}['loadState'](_0x1c2c22){const _0x748f62=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1c2c22['fromVersion'],this['_lastTo']=_0x1c2c22['toVersion'];for(const _0x300b5e in _0x1c2c22['diffData']){const _0x317ccd=_0x1c2c22['diffData'][_0x300b5e]['attachChange'],_0x5d2af6=_0x25ff9b(_0x1c2c22['diffData'][_0x300b5e]['attributesBefore'])||{},_0x26bd25=_0x748f62['_makeModelFromViewString'](_0x1c2c22['diffData'][_0x300b5e]['deletions']);_0x26bd25['rootName']=_0x300b5e,_0x26bd25['_isAttached']=!_0x317ccd||!_0x317ccd['isAttached'],_0x26bd25['isAttached']=()=>_0x26bd25['_isAttached'],this['_baseRoots']['set'](_0x300b5e,_0x26bd25),this['_baseRootsAttributes']['set'](_0x300b5e,_0x5d2af6),_0x317ccd&&this['_touchedRoots']['set'](_0x300b5e,_0x317ccd);const _0x367ab0=this['_makeIdsRoot'](_0x26bd25);this['_baseIdsRoots']['set'](_0x300b5e,_0x367ab0);for(const [_0x226457,_0x34dc8f]of _0x26bd25['markers']){if(!_0x226457['startsWith']('revision:'))continue;const _0x33bd27=_0x226457['split'](':')[0x2];for(const _0x5af942 of _0x34dc8f['getWalker']({'singleCharacters':!0x0})){const _0x20e4b2=this['_getVidAttributeName'](_0x5af942),_0xf149a2='elementEnd'==_0x5af942['type']?_0x5af942['previousPosition']['path']['slice'](0x0,-0x1):_0x5af942['previousPosition']['path'],_0xb44b36=_0x367ab0['getNodeByPath'](_0xf149a2)['getAttribute'](_0x20e4b2);this['_touched']['set'](_0xb44b36,{'userId':_0x33bd27});}}}this['_startingRevisionId']=this['_revisionId'];const _0x2761b8=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x479b1e=>!this['_touched']['has'](_0x479b1e));let _0x25d636=0x0;const _0x37697b=new Map();for(const _0x2595c1 in _0x1c2c22['diffData']){const _0x886255=_0x1c2c22['diffData'][_0x2595c1]['attachChange'],_0x15be2f=_0x25ff9b(_0x1c2c22['diffData'][_0x2595c1]['attributesAfter'])||{},_0x4bd491=_0x748f62['_makeModelFromViewString'](_0x1c2c22['diffData'][_0x2595c1]['insertions']);_0x4bd491['rootName']=_0x2595c1,_0x4bd491['_isAttached']=!_0x886255||_0x886255['isAttached'],_0x4bd491['isAttached']=()=>_0x4bd491['_isAttached'],this['_diffRoots']['set'](_0x2595c1,_0x4bd491),this['_diffRootsAttributes']['set'](_0x2595c1,_0x15be2f);const _0x444fb0=this['_makeIdsRoot'](_0x4bd491,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2595c1,_0x444fb0),_0x37697b['set'](_0x2595c1,_0x4bd491['isAttached']()?_0x15be2f:{});for(const [_0x16c1f9,_0x365c0e]of _0x4bd491['markers']){if(!_0x16c1f9['startsWith']('revision:'))continue;const _0x2af9b1=_0x16c1f9['split'](':')[0x2];for(const _0x553a69 of _0x365c0e['getWalker']({'singleCharacters':!0x0})){const _0x469693=this['_getVidAttributeName'](_0x553a69),_0x18b27d=this['_revisionId']++,_0x102b02='elementEnd'==_0x553a69['type']?_0x553a69['previousPosition']['path']['slice'](0x0,-0x1):_0x553a69['previousPosition']['path'];_0x444fb0['getNodeByPath'](_0x102b02)['_setAttribute'](_0x469693,_0x18b27d),this['_touched']['set'](_0x18b27d,{'userId':_0x2af9b1});}}for(const _0x393323 of this['editor']['model']['createRangeIn'](_0x4bd491)['getWalker']({'singleCharacters':!0x0})){const _0x464eb1=this['_getVidAttributeName'](_0x393323),_0x235838='elementEnd'==_0x393323['type']?_0x393323['previousPosition']['path']['slice'](0x0,-0x1):_0x393323['previousPosition']['path'],_0x86486e=_0x444fb0['getNodeByPath'](_0x235838);_0x86486e['getAttribute'](_0x464eb1)>0x0||_0x86486e['_setAttribute'](_0x464eb1,_0x2761b8[_0x25d636++]);}for(const [_0x5b8229,_0x23e28d]of _0x4bd491['markers'])_0x5b8229['startsWith']('revision:')||this['_markers']['set'](_0x5b8229,_0x23e28d);}const _0x1e8dd2=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x1e8dd2),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1e8dd2,0x1));const _0x2235ce=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2235ce),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2235ce,0x1));const _0x3c1b02=Array['from'](this['_diffRoots'])['map'](([_0x5c9a04,_0x1f5737])=>[_0x5c9a04,x(_0x1f5737)]);this['_saveMetaData'](this['_lastTo'],_0x3c1b02,this['_markers'],_0x37697b);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x3e5ef4,_0x48a71e,_0x21f041,_0x5f44f1){const _0x425ca7=new Map(_0x48a71e),_0x164af2=new Map(_0x25ff9b(_0x5f44f1)),_0x4ee697=new Map();for(const [_0x5a5545,_0x4ea785]of _0x21f041)_0x4ee697['set'](_0x5a5545,{'start':_0x4ea785['start']['clone'](),'end':_0x4ea785['end']['clone'](),'rootName':_0x4ea785['root']['rootName']});this['_savedMetaData']['set'](_0x3e5ef4,{'roots':_0x425ca7,'markers':_0x4ee697,'rootsAttributes':_0x164af2});}['_removeMetaData'](_0x1bb233){this['_savedMetaData']['delete'](_0x1bb233);}['_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'](_0x637966,_0x30e093=null){let _0x45576f=null;_0x637966['is']('documentFragment')||(_0x45576f=new _0x220be8(_0x637966['name'],{'vid_start':null===_0x30e093?this['_revisionId']++:_0x30e093++}));const _0x5efa4a=[];for(const _0x3487cc of _0x637966['getChildren']())if(_0x3487cc['is']('element')){_0x5efa4a['push'](this['_makeIdsRoot'](_0x3487cc,_0x30e093));const _0x69406e=_0x5efa4a[_0x5efa4a['length']-0x1];null!==_0x30e093&&(_0x30e093=_0x69406e['is']('element','$text')?_0x69406e['getAttribute']('vid')+0x1:_0x69406e['getAttribute']('vid_end')+0x1);}else{for(let _0x3f866d=0x0;_0x3f866d<_0x3487cc['offsetSize'];_0x3f866d++)_0x5efa4a['push'](new _0x220be8('$text',{'vid':null===_0x30e093?this['_revisionId']++:_0x30e093++}));}if(_0x637966['is']('documentFragment')){const _0x1d254b=N(_0x637966['rootName']);return _0x1d254b['_insertChild'](0x0,_0x5efa4a),_0x1d254b;}return _0x45576f['_setAttribute']('vid_end',null===_0x30e093?this['_revisionId']++:_0x30e093++),_0x45576f['_insertChild'](0x0,_0x5efa4a),_0x45576f;}['_calculateMetaData'](_0x489c83,_0x4e364f,_0x19850f){this['_reset']();const {roots:_0x479fb7,markers:_0x3a5147,rootsAttributes:_0x335176}=this['_savedMetaData']['get'](_0x489c83);this['_baseRoots']=new Map(_0x479fb7),this['_baseRootsAttributes']=new Map(_0x25ff9b(_0x335176));for(const [_0x2124b5,_0x4432c6]of this['_baseRoots'])if('$graveyard'!==_0x2124b5&&(this['_diffRoots']['set'](_0x2124b5,x(_0x4432c6)),this['_diffRootsAttributes']=new Map(_0x25ff9b(_0x335176)),_0x19850f)){const _0x135583=this['_revisionId'];this['_idsRoots']['set'](_0x2124b5,this['_makeIdsRoot'](_0x4432c6)),this['_baseIdsRoots']['set'](_0x2124b5,this['_makeIdsRoot'](_0x4432c6,_0x135583));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x19850f&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1cd080,_0x2da971]of _0x3a5147){const _0xa79c96=this['_baseRoots']['get'](_0x2da971['rootName']),_0x5ccfc0=this['_diffRoots']['get'](_0x2da971['rootName']),_0xde12ee=new _0x15b2d1(this['_fixPosition'](_0x2da971['start'],_0xa79c96),this['_fixPosition'](_0x2da971['end'],_0xa79c96)),_0x25dc30=this['_fixRange'](_0xde12ee,_0x5ccfc0);_0xa79c96['markers']['set'](_0x1cd080,_0xde12ee),this['_markers']['set'](_0x1cd080,_0x25dc30);}this['_applyOperations'](_0x489c83,_0x4e364f,_0x19850f);}['_applyOperations'](_0x73783a,_0x2bd38f,_0xb26621){for(const _0x327e22 of this['source']['getOperations'](_0x73783a,_0x2bd38f))this['_handleOperation'](_0x327e22,_0xb26621);for(const _0x521a15 of this['_diffRoots']['values']())_0x521a15['markers']['clear']();for(const [_0x57145c,_0x4dcda5]of this['_markers']){this['_diffRoots']['get'](_0x4dcda5['root']['rootName'])['markers']['set'](_0x57145c,_0x4dcda5['clone']());}const _0x4896b=new Map(),_0x4253d3=new Map();for(const [_0x376a97,_0xa9bb45]of this['_diffRoots'])_0x4896b['set'](_0x376a97,x(_0xa9bb45)),_0x4253d3['set'](_0x376a97,this['_diffRootsAttributes']['get'](_0x376a97));this['_saveMetaData'](_0x2bd38f,_0x4896b,this['_markers'],_0x4253d3);}['_getPreviousFrom'](_0x797d56){const _0x27ab24=Array['from'](this['_savedMetaData']['keys']());_0x27ab24['sort']((_0x23d1c0,_0x54c978)=>_0x23d1c0-_0x54c978),_0x27ab24['reverse']();for(const _0x432bad of _0x27ab24)if(_0x432bad<_0x797d56)return _0x432bad;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4b9fd2,_0x3ccbc9){const _0x519da9=Array['from'](_0x3ccbc9['markers'])['map'](([_0x1e9d90,_0x2776ba])=>[_0x1e9d90,this['_fixRange'](_0x2776ba,_0x4b9fd2)]);_0x4b9fd2['markers']=new Map(_0x519da9);}['_transformMarkers'](_0x114a64){for(const _0x4663fd of this['_markers']['values']()){const _0x3a0a4d=_0x4663fd['getTransformedByOperation'](_0x114a64),_0x44fa44=_0x15b2d1['_createFromRanges'](_0x3a0a4d);_0x4663fd['start']=_0x44fa44['start'],_0x4663fd['end']=_0x44fa44['end'];}}['_handleOperation'](_0x488795,_0x24d761){if('addRoot'!=_0x488795['type']&&'detachRoot'!=_0x488795['type']){if('insert'==_0x488795['type']){const _0x4cbc13=_0x488795['position']['root']['rootName'];this['_diffRoots']['has'](_0x4cbc13)||(this['_diffRoots']['set'](_0x4cbc13,N(_0x4cbc13,!0x0)),this['_diffRootsAttributes']['set'](_0x4cbc13,{}),_0x24d761&&this['_idsRoots']['set'](_0x4cbc13,N(_0x4cbc13,!0x0)));}else{if('addRootAttribute'==_0x488795['type']||'removeRootAttribute'==_0x488795['type']||'changeRootAttribute'==_0x488795['type'])return void this['_handleRootAttributeOperation'](_0x488795);'marker'==_0x488795['type']&&this['_handleMarkerOperation'](_0x488795);}if('marker'!==_0x488795['type']){const _0x14b7d8=this['_cloneOperation'](_0x488795,this['_diffRoots']);_0x14b7d8['_execute'](),this['_transformMarkers'](_0x14b7d8);}if(_0x24d761)switch(_0x488795['type']){case'insert':this['_handleInsertOperation'](_0x488795);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x488795);break;case'merge':this['_handleMergeOperation'](_0x488795);break;case'split':this['_handleSplitOperation'](_0x488795);}}else this['_handleRootOperation'](_0x488795,_0x24d761);}['_cloneOperation'](_0x584862,_0x352771){const _0x4468b0=_0x584862['clone']();return _0x4468b0['_authorId']=_0x584862['_authorId'],this['_fixOperation'](_0x4468b0,_0x352771),_0x4468b0;}['_getBaseVids'](_0x1aa30f){return _0x1aa30f['map'](_0x4c943f=>{const _0x160873=this['_getVidAttributeName'](_0x4c943f);return Number(_0x4c943f['item']['getAttribute'](_0x160873));});}['_generateTape'](_0x16989a,_0x596cb5){if(_0x16989a['is']('element','$text'))_0x596cb5['push']({'item':_0x16989a,'type':'text'});else{_0x16989a['is']('element')&&_0x596cb5['push']({'item':_0x16989a,'type':'elementStart'});for(const _0x52611b of _0x16989a['getChildren']())this['_generateTape'](_0x52611b,_0x596cb5);_0x16989a['is']('element')&&_0x596cb5['push']({'item':_0x16989a,'type':'elementEnd'});}return _0x596cb5;}['_getState'](){const _0x23aa3c=new Map(this['_touched']),_0x359b8b=new Map(_0x23aa3c),_0x3ae746=new Map(),_0x19d0be={'insertions':{},'deletions':{}},_0x22e51c={'insertions':{},'deletions':{}},_0x238147=new Map(),_0x29b945=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x29b945['delete']('$graveyard');for(const _0x115e67 of _0x29b945){const _0x3eeabf=this['_diffRoots']['get'](_0x115e67)||N(_0x115e67,!0x1),_0x1c77c5=this['_baseRoots']['get'](_0x115e67)||N(_0x115e67,!0x1);_0x3eeabf['isAttached']()||_0x1c77c5['isAttached']()?(_0x19d0be['insertions'][_0x115e67]=x(_0x3eeabf),_0x19d0be['deletions'][_0x115e67]=x(_0x1c77c5),this['_copyMarkers'](_0x19d0be['deletions'][_0x115e67],_0x1c77c5),this['_copyMarkers'](_0x19d0be['insertions'][_0x115e67],_0x3eeabf),_0x22e51c['insertions'][_0x115e67]=this['_generateTape'](this['_idsRoots']['get'](_0x115e67),[]),_0x22e51c['deletions'][_0x115e67]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x115e67)||N(_0x115e67,!0x1),[])):_0x29b945['delete'](_0x115e67);}for(const _0x3c10df of _0x29b945){const _0x24ef1a=_0x22e51c['insertions'][_0x3c10df];for(const _0x5833e7 of _0x24ef1a){const _0xa3d792=this['_getVidAttributeName'](_0x5833e7),_0x2c68c8=_0x5833e7['item']['getAttribute'](_0xa3d792);_0x359b8b['delete'](_0x2c68c8),_0x2c68c8>=this['_startingRevisionId']&&_0x3ae746['set'](_0x2c68c8,_0x23aa3c['get'](_0x2c68c8));}}for(const _0x2d533a of _0x29b945){const _0x21979d=_0x22e51c['insertions'][_0x2d533a],_0x2d2d3=this['_getBaseVids'](_0x22e51c['deletions'][_0x2d533a]);let _0x4763b8=0x0;for(const _0x1b3219 of _0x21979d){const _0x535f9f=this['_getVidAttributeName'](_0x1b3219),_0x16d23e=_0x1b3219['item']['getAttribute'](_0x535f9f);if(!_0x3ae746['has'](_0x16d23e)&&!_0x238147['has'](_0x16d23e)){if(_0x359b8b['has'](_0x16d23e))_0x4763b8++;else{if(_0x16d23e!=_0x2d2d3[_0x4763b8]){const _0x38d123=_0x23aa3c['get'](_0x16d23e)||_0x23aa3c['get'](_0x2d2d3[_0x4763b8]);for(;_0x16d23e!=_0x2d2d3[_0x4763b8];)_0x359b8b['has'](_0x2d2d3[_0x4763b8])||(_0x238147['set'](_0x2d2d3[_0x4763b8],_0x38d123),_0x23aa3c['set'](_0x2d2d3[_0x4763b8],_0x38d123)),_0x4763b8++;}_0x4763b8++;}}}}for(const _0x2480af of _0x29b945){const _0x5c21e4=_0x22e51c['insertions'][_0x2480af];for(const _0x358ef5 of _0x5c21e4){const _0x59440c=this['_getVidAttributeName'](_0x358ef5),_0x100e49=_0x358ef5['item']['getAttribute'](_0x59440c);if(_0x238147['has'](_0x100e49)){const _0x2eb8dd=_0x238147['get'](_0x100e49);_0x359b8b['has'](_0x100e49)||_0x359b8b['set'](_0x100e49,{..._0x2eb8dd}),_0x3ae746['set'](_0x100e49,{..._0x2eb8dd});}}}for(const _0x641fc of _0x359b8b['keys']())_0x641fc>=this['_startingRevisionId']&&_0x359b8b['delete'](_0x641fc);const _0x73c013=new Map();for(const _0x5c9adf of _0x29b945){let _0x19b88=_0x22e51c['insertions'][_0x5c9adf];for(const _0x48b5af of _0x19b88)if(_0x48b5af['item']['is']('element','tableCell')){const _0x2fac83=this['_getVidAttributeName'](_0x48b5af),_0x5c230c=_0x48b5af['item']['getAttribute'](_0x2fac83);if(_0x3ae746['has'](_0x5c230c)){const _0x49799f=_0x48b5af['item']['parent']['parent']['getAttribute']('vid_start'),_0x94f538=_0x73c013['get'](_0x49799f)||new Set();_0x94f538['add'](_0x3ae746['get'](_0x5c230c)['userId']),_0x73c013['set'](_0x49799f,_0x94f538);}}_0x19b88=_0x22e51c['deletions'][_0x5c9adf];for(const _0x41e3b4 of _0x19b88)if(_0x41e3b4['item']['is']('element','tableCell')){const _0x5512e2=this['_getVidAttributeName'](_0x41e3b4),_0x4baad8=_0x41e3b4['item']['getAttribute'](_0x5512e2);if(_0x359b8b['has'](_0x4baad8)){const _0x5d781d=_0x41e3b4['item']['parent']['parent']['getAttribute']('vid_start'),_0x29bb36=_0x73c013['get'](_0x5d781d)||new Set();_0x29bb36['add'](_0x359b8b['get'](_0x4baad8)['userId']),_0x73c013['set'](_0x5d781d,_0x29bb36);}}for(const _0x40ba36 of _0x73c013['keys']())(_0x3ae746['has'](_0x40ba36)||_0x359b8b['has'](_0x40ba36))&&_0x73c013['delete'](_0x40ba36);}for(const _0x532032 of _0x29b945){const _0x3e8fde=_0x22e51c['insertions'][_0x532032];let _0x1ecf87=null,_0x302499=null;for(const _0x48da21 of _0x3e8fde){const _0x1cfbb0=this['_getVidAttributeName'](_0x48da21),_0x16fca1=_0x48da21['item']['getAttribute'](_0x1cfbb0),_0x5c1048=_0x73c013['get'](_0x16fca1);_0x5c1048&&'elementStart'==_0x48da21['type']&&(_0x1ecf87=Array['from'](_0x5c1048)[0x0],_0x302499=_0x48da21['item']['getAttribute']('vid_end')),_0x1ecf87&&(_0x359b8b['set'](_0x16fca1,{'userId':_0x1ecf87}),_0x3ae746['set'](_0x16fca1,{'userId':_0x1ecf87})),_0x16fca1==_0x302499&&(_0x1ecf87=null,_0x302499=null);}}const _0x4a64ef={},_0x5822cc=new Set();for(const _0x298f16 of _0x29b945){const _0x57e31a=_0x19d0be['deletions'][_0x298f16],_0x4bb12c=_0x19d0be['insertions'][_0x298f16];for(const {userId:_0x292f59}of this['_touchedMarkers']['values']())null!==_0x292f59&&_0x5822cc['add'](_0x292f59);for(const {userId:_0x2001ed}of this['_touchedRoots']['values']())null!==_0x2001ed&&_0x5822cc['add'](_0x2001ed);this['_markChanges'](_0x4bb12c,_0x22e51c['insertions'][_0x298f16],_0x3ae746,'insertion',_0x5822cc),this['_markChanges'](_0x57e31a,_0x22e51c['deletions'][_0x298f16],_0x359b8b,'deletion',_0x5822cc),_0x4a64ef[_0x298f16]={'insertions':this['_prepareViewToSave'](_0x4bb12c),'deletions':this['_prepareViewToSave'](_0x57e31a),'attachChange':this['_touchedRoots']['get'](_0x298f16)||null,'attributesBefore':_0x25ff9b(this['_baseRootsAttributes']['get'](_0x298f16))||{},'attributesAfter':_0x25ff9b(this['_diffRootsAttributes']['get'](_0x298f16))};}return{'diffData':_0x4a64ef,'authorsIds':Array['from'](_0x5822cc)};}['_processRootBeforeSave'](_0x40ffc8){for(const [,_0x51807d]of _0x40ffc8['markers']){const _0x24d626=_0x51807d['start']['getAncestors']()['filter'](_0x3e815d=>'tableCell'==_0x3e815d['name']);for(const _0x16b184 of _0x24d626)0x1==_0x16b184['childCount']&&_0x16b184['getChild'](0x0)['is']('element','paragraph')&&_0x16b184['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x53b804){this['_processRootBeforeSave'](_0x53b804);const _0x4b0be8=this['editor']['data']['toView'](_0x53b804,{}),_0x20769c=Array['from'](_0x4b0be8['getChildren']())['map'](_0x3cdd8d=>this['_getViewJson'](_0x3cdd8d));return JSON['stringify'](_0x20769c);}['_getViewJson'](_0x3c8f98){if(_0x3c8f98['is']('$text'))return _0x3c8f98['data'];{const _0x25af97=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x34bd6d=_0x3c8f98,_0x7aac05=this['editor']['data']['htmlProcessor']['domConverter'],_0x56cc03={'type':_0x25af97['_getTypeCharForViewElement'](_0x34bd6d),'name':_0x34bd6d['name'],'attributes':Array['from'](_0x34bd6d['getAttributes']()),'children':Array['from'](_0x34bd6d['getChildren']())['map'](_0x3413a0=>this['_getViewJson'](_0x3413a0))};if(_0x3c8f98['is']('uiElement')&&'$comment'!=_0x3c8f98['name']){const _0x2ddddb=_0x3c8f98['render'](_0x7aac05['domDocument'],_0x7aac05);_0x56cc03['children']['push'](_0x2ddddb['outerHTML']);}else{if(_0x3c8f98['is']('rawElement')){const _0x4c21f8=_0x7aac05['domDocument']['createElement'](_0x34bd6d['name']);_0x3c8f98['render'](_0x4c21f8,_0x7aac05),_0x56cc03['children']['push'](_0x4c21f8['innerHTML']);}}const _0x3d0ef7=Array['from'](_0x34bd6d['getCustomProperties']());_0x3d0ef7['length']>0x0&&(_0x56cc03['customProperties']=_0x3d0ef7);const _0x3d8876=_0x34bd6d['getFillerOffset']();return null!==_0x3d8876&&(_0x56cc03['fillerOffset']=_0x3d8876),_0x56cc03;}}['_markChanges'](_0x165a5b,_0x4ade8b,_0x297da3,_0x3afff1,_0x41b250){let _0x3b43fe=null,_0x4d8855=null,_0x7c97aa=0x0;const _0x343181=this['editor']['model'];for(let _0x32fdd5=0x0;_0x32fdd5<_0x4ade8b['length'];_0x32fdd5++){const _0x581fb8=this['_getVidAttributeName'](_0x4ade8b[_0x32fdd5]),_0x450b8a=_0x4ade8b[_0x32fdd5]['item']['getAttribute'](_0x581fb8),_0x5ddf8e=_0x297da3['get'](_0x450b8a),_0x5d79af=_0x32fdd5==_0x4ade8b['length']-0x1;(!_0x3b43fe&&_0x5ddf8e&&(_0x3b43fe=_0x5ddf8e,_0x4d8855=_0x4ade8b[_0x32fdd5]),_0x3b43fe&&(!_0x5ddf8e||_0x5ddf8e['userId']!=_0x3b43fe['userId']))&&(_0x35c36d(_0x5ddf8e,P(_0x4d8855,_0x165a5b,_0x343181),P(_0x4ade8b[_0x32fdd5],_0x165a5b,_0x343181)),_0x3b43fe=_0x5ddf8e||null,_0x4d8855=_0x5ddf8e?_0x4ade8b[_0x32fdd5]:null),_0x3b43fe&&_0x5d79af&&_0x35c36d(_0x5ddf8e,P(_0x4d8855,_0x165a5b,_0x343181),V(_0x4ade8b[_0x32fdd5],_0x165a5b,_0x343181));}function _0x35c36d(_0x50b44b,_0x3a8069,_0xe4246d){const _0x25260c=_0x3b43fe['userId'],_0x2497b1='revision:'+_0x3afff1+':'+_0x25260c+':'+_0x7c97aa++,_0x196562=_0x343181['createRange'](_0x3a8069,_0xe4246d);_0x165a5b['markers']['set'](_0x2497b1,_0x196562),null!==_0x25260c&&_0x41b250['add'](_0x25260c);}}['_getVidAttributeName'](_0x5ea6f9){switch(_0x5ea6f9['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3e6acb,_0x243d86){_0x3e6acb['baseVersion']=null;for(const _0x41fedc in _0x3e6acb){const _0x1addc5=_0x3e6acb[_0x41fedc];if(_0x1addc5 instanceof _0xb51ac3){const _0x8fb270=_0x243d86['get'](_0x1addc5['root']['rootName']);_0x3e6acb[_0x41fedc]=this['_fixPosition'](_0x1addc5,_0x8fb270);}if(_0x1addc5 instanceof _0x15b2d1){const _0x4040fc=_0x243d86['get'](_0x1addc5['root']['rootName']);_0x3e6acb[_0x41fedc]=this['_fixRange'](_0x1addc5,_0x4040fc);}'root'===_0x41fedc&&(_0x3e6acb['root']=_0x243d86['get'](_0x3e6acb['root']['rootName']));}}['_fixRange'](_0x2d8b10,_0x4552e7){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2d8b10['start'],_0x4552e7),this['_fixPosition'](_0x2d8b10['end'],_0x4552e7));}['_fixPosition'](_0x3003fb,_0x3c408a){return this['editor']['model']['createPositionFromPath'](_0x3c408a,_0x3003fb['path'],_0x3003fb['stickiness']);}['_handleInsertOperation'](_0x1d5441){const _0x35c1b2=this['_idsRoots']['get'](_0x1d5441['position']['root']['rootName']),_0x5317ae=this['_fixPosition'](_0x1d5441['position'],_0x35c1b2),_0x168acd=null===_0x1d5441['_authorId']?null:_0x1d5441['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5a78c2=_0x5317ae['parent'],_0x5b95f2=this['_revisionId'],_0x1cd563=[];for(const _0x385c6b of _0x1d5441['nodes'])if(_0x385c6b['is']('element'))_0x1cd563['push'](this['_makeIdsRoot'](_0x385c6b));else{for(let _0x5bee9a=0x0;_0x5bee9a<_0x385c6b['offsetSize'];_0x5bee9a++)_0x1cd563['push'](new _0x220be8('$text',{'vid':this['_revisionId']++}));}const _0x3942be=this['_revisionId'];for(let _0x27e27e=_0x5b95f2;_0x27e27e<_0x3942be;_0x27e27e++)this['_touched']['set'](_0x27e27e,{'userId':_0x168acd});_0x5a78c2['_insertChild'](_0x5317ae['offset'],_0x1cd563);}['_handleMoveOperation'](_0x28aec2){(_0x28aec2=this['_cloneOperation'](_0x28aec2,this['_idsRoots']))['_execute']();const _0x5effa2=null===_0x28aec2['_authorId']?null:_0x28aec2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5f22a8=_0x28aec2['getMovedRangeStart'](),_0x344f72=_0x5f22a8['parent'],_0x1adf30=_0x5f22a8['offset'];!function _0x506200(_0x113531,_0x54c5d8,_0x1abab9,_0x228965){for(let _0x4177f1=_0x1abab9;_0x4177f1<_0x228965;_0x4177f1++){const _0x100d48=_0x54c5d8['getChild'](_0x4177f1);_0x100d48['is']('element','$text')?_0x113531['set'](_0x100d48['getAttribute']('vid'),{'userId':_0x5effa2}):(_0x113531['set'](_0x100d48['getAttribute']('vid_start'),{'userId':_0x5effa2}),_0x506200(_0x113531,_0x100d48,0x0,_0x100d48['childCount']),_0x113531['set'](_0x100d48['getAttribute']('vid_end'),{'userId':_0x5effa2}));}}(this['_touched'],_0x344f72,_0x1adf30,_0x1adf30+_0x28aec2['howMany']);}['_handleMergeOperation'](_0xacfbc8){const _0x460468=null===(_0xacfbc8=this['_cloneOperation'](_0xacfbc8,this['_idsRoots']))['_authorId']?null:_0xacfbc8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2cacb2=_0xacfbc8['targetPosition']['parent'],_0xfa83db=_0xacfbc8['sourcePosition']['parent'],_0x51ee37=_0x2cacb2['getAttribute']('vid_end'),_0x2438bb=_0xfa83db['getAttribute']('vid_start');_0x2cacb2['_setAttribute']('vid_end',_0xfa83db['getAttribute']('vid_end')),_0xfa83db['_setAttribute']('vid_end',_0x51ee37),this['_touched']['set'](_0x2438bb,{'userId':_0x460468}),this['_touched']['set'](_0x51ee37,{'userId':_0x460468}),_0xacfbc8['_execute']();}['_handleSplitOperation'](_0x22cf66){const _0x320c8e=null===(_0x22cf66=this['_cloneOperation'](_0x22cf66,this['_idsRoots']))['_authorId']?null:_0x22cf66['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a599d=_0x22cf66['graveyardPosition'],_0x2a7a1f=_0x22cf66['splitPosition']['parent'];_0x22cf66['_execute']();const _0x355655=_0x2a7a1f['getAttribute']('vid_end'),_0x1d690c=_0x22cf66['insertionPosition']['nodeAfter'];if(_0x4a599d){const _0x4ed64d=_0x1d690c['getAttribute']('vid_end'),_0x1576a4=_0x2a7a1f['getAttribute']('vid_end');_0x2a7a1f['_setAttribute']('vid_end',_0x4ed64d),_0x1d690c['_setAttribute']('vid_end',_0x1576a4),this['_touched']['set'](_0x2a7a1f['getAttribute']('vid_end'),{'userId':_0x320c8e}),this['_touched']['set'](_0x1d690c['getAttribute']('vid_start'),{'userId':_0x320c8e});}else{const _0x2f9d7d=this['_revisionId']++,_0x24d044=this['_revisionId']++;_0x2a7a1f['_setAttribute']('vid_end',_0x2f9d7d),_0x1d690c['_setAttribute']('vid_start',_0x24d044),_0x1d690c['_setAttribute']('vid_end',_0x355655),this['_touched']['set'](_0x2f9d7d,{'userId':_0x320c8e}),this['_touched']['set'](_0x24d044,{'userId':_0x320c8e});}}['_handleMarkerOperation'](_0x3a52ff){if(!_0x3a52ff['affectsData'])return;const _0x70b74f=(_0x3a52ff=this['_cloneOperation'](_0x3a52ff,this['_diffRoots']))['oldRange']?_0x3a52ff['oldRange']['root']:null,_0x21cef8=_0x3a52ff['newRange']?_0x3a52ff['newRange']['root']:null;_0x70b74f&&this['_markers']['delete'](_0x3a52ff['name']),_0x21cef8&&this['_markers']['set'](_0x3a52ff['name'],_0x3a52ff['newRange']['clone']());const _0xb2d356=null===_0x3a52ff['_authorId']?null:_0x3a52ff['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x42e5c7=_0x3a52ff['name'];if(!this['_touchedMarkers']['has'](_0x42e5c7))return void this['_touchedMarkers']['set'](_0x42e5c7,{'range':_0x3a52ff['oldRange'],'userId':_0xb2d356});const _0x302573=this['_touchedMarkers']['get'](_0x42e5c7),_0x5bf3a2=_0x302573['range'],_0x173e06=_0x3a52ff['newRange'];null==_0x5bf3a2&&null==_0x173e06||_0x5bf3a2&&_0x173e06&&_0x5bf3a2['isEqual'](_0x173e06)?this['_touchedMarkers']['delete'](_0x3a52ff['name']):_0x302573['userId']=_0xb2d356;}['_handleRootOperation'](_0x76b8d6,_0x3c2597){this['_diffRoots']['has'](_0x76b8d6['rootName'])?this['_diffRoots']['get'](_0x76b8d6['rootName'])['_isAttached']=_0x76b8d6['isAdd']:(this['_diffRoots']['set'](_0x76b8d6['rootName'],N(_0x76b8d6['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x76b8d6['rootName'],{}),_0x3c2597&&this['_idsRoots']['set'](_0x76b8d6['rootName'],N(_0x76b8d6['rootName'],!0x0)));const _0x1a726a=null===_0x76b8d6['_authorId']?null:_0x76b8d6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x259725=this['_touchedRoots']['get'](_0x76b8d6['rootName']);_0x259725&&_0x259725['userId']===_0x1a726a?this['_touchedRoots']['delete'](_0x76b8d6['rootName']):this['_touchedRoots']['set'](_0x76b8d6['rootName'],{'userId':_0x1a726a,'isAttached':_0x76b8d6['isAdd']});}['_handleRootAttributeOperation'](_0x32add9){const _0x2e2f1e=this['_diffRootsAttributes']['get'](_0x32add9['root']['rootName']);null===_0x32add9['newValue']?delete _0x2e2f1e[_0x32add9['key']]:_0x2e2f1e[_0x32add9['key']]=_0x32add9['newValue'];}}function x(_0x44591a){const _0x4577b2=N(_0x44591a['rootName'],_0x44591a['isAttached']());for(const _0x13295b of _0x44591a['getChildren']()){const _0x565bac=_0x13295b['_clone'](!0x0);_0x4577b2['_appendChild'](_0x565bac);}return _0x4577b2;}function N(_0x1196d4,_0x19a9a9=!0x0){const _0xc7127e=new _0x24dd64();return _0xc7127e['rootName']=_0x1196d4,_0xc7127e['_isAttached']=_0x19a9a9,_0xc7127e['isAttached']=()=>_0xc7127e['_isAttached'],_0xc7127e;}function P(_0x4dd2b7,_0x15cd45,_0x4fcf00){const _0x83e6c7='elementEnd'==_0x4dd2b7['type']?_0x4fcf00['createPositionAt'](_0x4dd2b7['item'],'end'):_0x4fcf00['createPositionBefore'](_0x4dd2b7['item']);return _0x4fcf00['createPositionFromPath'](_0x15cd45,_0x83e6c7['path'],_0x83e6c7['stickiness']);}function V(_0x35deb8,_0x59051a,_0x5e86c5){const _0x4412f8='elementStart'==_0x35deb8['type']?_0x5e86c5['createPositionAt'](_0x35deb8['item'],0x0):_0x5e86c5['createPositionAfter'](_0x35deb8['item']);return _0x5e86c5['createPositionFromPath'](_0x59051a,_0x4412f8['path'],_0x4412f8['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
+ _0x59796b(_0x5afe72){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5ac9fa,_0x362af8){super(_0x5ac9fa),this['focusTracker']=new _0xd221d5(),this['keystrokes']=new _0x567867(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x362af8),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'](),_0x2f1169({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x226fad=_0x399b0a=>_0x399b0a['stopPropagation']();this['keystrokes']['set']('arrowright',_0x226fad),this['keystrokes']['set']('arrowleft',_0x226fad),this['keystrokes']['set']('arrowup',_0x226fad),this['keystrokes']['set']('arrowdown',_0x226fad);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2390ce){this['revisionNameInputView']['fieldView']['element']['value']=_0x2390ce['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x382104){const _0x1ba84f=new et(this['locale'],ti),_0x5d4586=_0x1ba84f['fieldView'];_0x5d4586['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x248118=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x382104&&(_0x248118+='\x20('+R(this['locale'],'optional')+')'),(_0x1ba84f['label']=_0x248118,_0x5d4586['on']('input',()=>{this['revisionNameInputValue']=_0x5d4586['element']['value']['trim']();}),_0x1ba84f);}}class v extends _0x1305a6{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x607c3b=this['editor'],_0x126dc6=_0x607c3b['plugins']['get']('RevisionTracker');_0x607c3b['ui']['componentFactory']['add']('revisionHistory',_0x598c59=>{const _0x205121=_0x5191d3(_0x598c59),_0x561bbf=_0x205121['panelView']['children'],_0x1f8862=new _0xa2f141(_0x598c59),_0x4c30a6=new _0x3b47c2(_0x598c59),_0x3919e9=new _0x20e177(_0x598c59),_0x7e59cc=new _0x3b47c2(_0x598c59),_0x3c0f39=new _0x20e177(_0x598c59);return _0x205121['bind']('isEnabled')['to'](_0x126dc6,'isReady',_0x126dc6,'isEnabled',_0x607c3b,'isReadOnly',(_0x1f4445,_0x1b3606,_0x5d279c)=>_0x1f4445&&_0x1b3606&&!_0x5d279c),_0x205121['buttonView']['set']({'icon':_0x317799,'label':R(_0x598c59,'Revision\x20history'),'tooltip':!0x0}),_0x3919e9['set']({'label':R(_0x598c59,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x3919e9['bind']('isEnabled')['to'](_0x126dc6,'isReady',_0x126dc6,'isEnabled',_0x607c3b,'isReadOnly',(_0x19445f,_0x3dd6f0,_0x5df363)=>_0x19445f&&_0x3dd6f0&&!_0x5df363),_0x3919e9['on']('execute',()=>this['_showDialog']()),_0x3c0f39['set']({'label':R(_0x598c59,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x3c0f39['bind']('isEnabled')['to'](_0x126dc6,'isReady',_0x607c3b,'isReadOnly',(_0x4e2d70,_0x21558c)=>_0x4e2d70&&!_0x21558c),_0x3c0f39['on']('execute',()=>{_0x607c3b['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x205121['isOpen']=!0x1,_0x607c3b['editing']['view']['focus']();}),_0x4c30a6['children']['add'](_0x3919e9),_0x7e59cc['children']['add'](_0x3c0f39),_0x1f8862['role']='menu',_0x1f8862['items']['addMany']([_0x4c30a6,_0x7e59cc]),_0x561bbf['add'](_0x1f8862),_0x205121;}),_0x607c3b['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x89ccfe=this['editor'],_0xc3d00=_0x89ccfe['locale'],_0x50ab5c=new _0xaf22f1(_0xc3d00),_0x2c870c=new _0xb503e8(_0xc3d00);_0x50ab5c['buttonView']['set']({'icon':_0x317799,'label':R(_0xc3d00,'Revision\x20history')});const _0x7f00e6=new _0x5c1894(_0xc3d00,_0x50ab5c),_0x502552=new _0x2a248b(_0xc3d00);_0x502552['set']({'label':R(_0xc3d00,'Save\x20current\x20revision')}),_0x502552['delegate']('execute')['to'](_0x50ab5c),_0x502552['on']('execute',()=>{this['_showDialog']();}),_0x7f00e6['children']['add'](_0x502552),_0x2c870c['items']['add'](_0x7f00e6);const _0x57f0f1=new _0x5c1894(_0xc3d00,_0x50ab5c),_0x2a8dc3=new _0x2a248b(_0xc3d00);return _0x2a8dc3['set']({'label':R(_0xc3d00,'Open\x20revision\x20history')}),_0x2a8dc3['delegate']('execute')['to'](_0x50ab5c),_0x2a8dc3['on']('execute',()=>{_0x89ccfe['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x57f0f1['children']['add'](_0x2a8dc3),_0x2c870c['items']['add'](_0x57f0f1),_0x50ab5c['panelView']['children']['add'](_0x2c870c),_0x50ab5c;}['_showDialog'](){const _0x5c073a=this['editor'],_0xb784ee=_0x5c073a['locale'],_0x94125f=_0x5c073a['plugins']['get']('Dialog'),_0x40ba5c=_0x5c073a['plugins']['get']('RevisionTracker');function _0x26e40e(_0x50eb04){_0x5c073a['config']['get']('revisionHistory.requireRevisionName')&&''===_0x50eb04['revisionName']?_0x50eb04['revisionNameInputView']['errorText']=R(_0xb784ee,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x5c073a['plugins']['get'](h)['saveRevision']({'name':_0x50eb04['revisionName']}),_0x94125f['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x26e40e(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x94125f['show']({'id':'revisionSave','title':R(_0xb784ee,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x5c073a['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x94125f['hide']()},{'label':R(_0x5c073a['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4c65e9){_0x4c65e9['bind']('isEnabled')['to'](_0x40ba5c,'isReady',_0x40ba5c,'isEnabled',_0x5c073a,'isReadOnly',(_0x1f8d44,_0x1ba5d2,_0x56b11e)=>_0x1f8d44&&_0x1ba5d2&&!_0x56b11e);},'onExecute':()=>_0x26e40e(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x25258a=this['editor'],_0x24ad85=_0x25258a['locale'];this['_saveRevisionFormView']=new me(_0x24ad85,_0x25258a['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x5afe72{['changeId'];['_model'];constructor(_0x46700c,_0xb288b){super(_0x46700c),this['_model']=_0xb288b,this['changeId']=_0xb288b['id'];const _0x186e46=this['bindTemplate'],_0x35b5de=R(_0x46700c,_0xb288b['data']['isSuggestion']?'Suggested\x20by':'add'==_0xb288b['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xb288b['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x186e46['to']('type',_0x28975c=>'ck-revision-change__'+_0x28975c)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x35b5de}]},{'text':'\x20'+_0xb288b['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x4f3aac(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x51ba98){super(),this['id']=_0x51ba98['id']||_0x2e23f1(),this['author']=_0x51ba98['author'],this['type']=_0x51ba98['type'],this['data']=_0x51ba98['data']||{},this['rootName']=_0x51ba98['rootName'],this['set']('createdAt',_0x51ba98['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(_0x1dcbcb,_0x4983be){this['newRevisionId']=_0x1dcbcb,this['oldRevisionId']=_0x4983be,this['changes']=new _0xd01162();}['_setChanges'](_0x5f563f){for(const _0x5266d4 of _0x5f563f)this['changes']['add'](_0x5266d4);}}class l extends _0x1305a6{['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[_0x4ca452,_0xbad7fb,S,$];}constructor(_0x1777be){super(_0x1777be),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',(_0x2d0ce7,_0x508280,_0x55d399)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x173d37=>{for(const _0x335b18 of this['editor']['editing']['view']['document']['roots'])_0x55d399?_0x173d37['removeClass']('ck-editor__editable__overlay',_0x335b18):_0x173d37['addClass']('ck-editor__editable__overlay',_0x335b18);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3d8d14=>null!==_0x3d8d14),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5eeb1a,_0x112f0a,_0x48605c)=>_0x5eeb1a&&_0x48605c?_0x112f0a['changes']['getIndex'](_0x48605c):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3d6c59,_0x4afb67)=>_0x3d6c59?_0x4afb67['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0xbad7fb);}['init'](){const _0x1dd41f=this['editor'],_0x334c0e=new rt(_0x1dd41f,{'direction':'backward'}),_0x5bb826=new rt(_0x1dd41f,{'direction':'forward'});(_0x1dd41f['commands']['add']('showPreviousChange',_0x334c0e),_0x1dd41f['commands']['add']('showNextChange',_0x5bb826),_0x1dd41f['commands']['add']('restoreRevision',new nt(_0x1dd41f)),this['on']('change:numberOfChanges',()=>{_0x334c0e['refresh'](),_0x5bb826['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1dd41f['enableReadOnlyMode']('revision-viewer'),_0x1dd41f['plugins']['has']('WidgetToolbarRepository'))&&_0x1dd41f['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x2acfc2){return await this['_utils']['loadRevisionData'](_0x2acfc2,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2acfc2);}async['getRevisionRootsAttributes'](_0x36789f){return await this['_utils']['loadRevisionData'](_0x36789f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x36789f);}async['compare'](_0x500841,_0x2131ba,_0x1ec71d=!0x1){if(!this['isEnabled'])return;const _0x2cb7b6=this['diff'],_0x3f546d=this['repository'],_0x76093b='string'==typeof _0x500841?_0x3f546d['getRevision'](_0x500841):_0x500841,_0x574194='string'==typeof _0x2131ba?_0x3f546d['getRevision'](_0x2131ba):_0x2131ba,_0x4a5239=_0x76093b['id'],_0x268304=_0x574194?_0x574194['id']:null;if(!_0x1ec71d&&this['diff']&&this['diff']['newRevisionId']===_0x4a5239&&this['diff']['oldRevisionId']===_0x268304)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x4a5239,_0x268304);const _0x399228=this['_getRevisionsRange'](_0x76093b,_0x574194,!0x0)['map'](_0x24ad54=>this['_utils']['loadRevisionData'](_0x24ad54,this['adapter']));return _0x399228['push'](new Promise(_0x10eb3c=>{setTimeout(_0x10eb3c,0x14);})),Promise['all'](_0x399228)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x476a1f=this['_getDiff'](_0x4a5239,_0x268304);for(const _0x15f256 of _0x476a1f['changes'])this['_changeIdToChange']['set'](_0x15f256['id'],_0x15f256);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x41d124=>{for(const _0x452eb1 of this['editor']['model']['document']['getRootNames']())_0x41d124['detachRoot'](_0x452eb1);for(const _0x236c32 of Object['keys'](_0x476a1f['model'])){const _0xa0bb61=_0x41d124['addRoot'](_0x236c32);for(const _0x2bc8e0 of Object['keys'](_0x476a1f['attributes'][_0x236c32]))_0x41d124['setAttribute'](_0x2bc8e0,_0x476a1f['attributes'][_0x236c32][_0x2bc8e0],_0xa0bb61);_0x41d124['insert'](_0x476a1f['model'][_0x236c32],_0xa0bb61,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x476a1f['changes'])),this['isReady']=!0x0;})['catch'](_0x3a4aaf=>{console['error'](_0x3a4aaf),this['_cleanUp'](),_0x2cb7b6&&(this['diff']=_0x2cb7b6),this['isReady']=!0x0;});}['addRevisionData'](_0x35947b,_0xa41f62){const _0x140cd5=this['repository']['createRevision'](_0x35947b);return _0x140cd5['on']('_update',(_0x6a3cac,_0x2bf102,_0x5a6b19)=>_0xa41f62(_0x2bf102,_0x5a6b19,_0x140cd5)),this['repository']['addRevision'](_0x140cd5),_0x140cd5;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x58fd73=>{for(const _0x271bb0 of this['editor']['model']['document']['getRootNames']())_0x58fd73['detachRoot'](_0x271bb0);});}['_sortAndFilterDiffChanges'](_0x16e237){const _0x199b42=[],_0x2864ac=new Map();for(const _0x228954 of this['editor']['model']['document']['getRootNames']()){const _0x4c6dc5=this['editor']['editing']['view']['getDomRoot'](_0x228954);if(!_0x4c6dc5)continue;const _0x29840c=_0x4c6dc5['getClientRects']()['item'](0x0);_0x29840c&&(_0x199b42['push'](_0x228954),_0x2864ac['set'](_0x228954,_0x29840c));}return _0x199b42['sort']((_0x427859,_0x4b1424)=>{const _0xa16261=_0x2864ac['get'](_0x427859),_0xbc1243=_0x2864ac['get'](_0x4b1424);return _0xa16261['y']-_0xbc1243['y']||_0xa16261['x']-_0xbc1243['x'];}),(_0x16e237=_0x16e237['filter'](_0x31b193=>_0x199b42['includes'](_0x31b193['rootName'])))['sort']((_0x5b1370,_0x56fb3d)=>_0x199b42['indexOf'](_0x5b1370['rootName'])-_0x199b42['indexOf'](_0x56fb3d['rootName'])),_0x16e237;}['_makeTape'](_0x30d3b3){const _0x21f2a7=Array['from'](_0x30d3b3['markers'])['filter'](([_0x418677,_0xf7813a])=>_0x418677['startsWith']('revision:')&&!_0xf7813a['isCollapsed']),_0x31c4fd=Array['from'](this['editor']['model']['createRangeIn'](_0x30d3b3)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x21f2a7['length'])for(const _0x52317b of _0x31c4fd){const [_0x1162ef,_0x3e3ba4]=_0x21f2a7[0x0],[,_0x5004cf,_0x153efb]=_0x1162ef['split'](':');if(_0x3e3ba4['end']['isEqual'](_0x52317b['nextPosition'])&&_0x21f2a7['shift'](),(_0x52317b['previousPosition']['isEqual'](_0x3e3ba4['start'])||_0x52317b['previousPosition']['isAfter'](_0x3e3ba4['start']))&&('insertion'==_0x5004cf?_0x52317b['isAdded']={'userId':_0x153efb}:'deletion'==_0x5004cf&&(_0x52317b['isRemoved']={'userId':_0x153efb})),0x0==_0x21f2a7['length'])break;}return _0x31c4fd;}['_refreshStartEndIndex'](_0x321123){const _0x445d2c=new Map();for(let _0xb01356=0x0;_0xb01356<_0x321123['length'];_0xb01356++)'text'===_0x321123[_0xb01356]['type']?(_0x321123[_0xb01356]['item']['startIndex']=_0xb01356,_0x321123[_0xb01356]['item']['endIndex']=_0xb01356):('elementStart'===_0x321123[_0xb01356]['type']?_0x321123[_0xb01356]['item']['startIndex']=_0xb01356:'elementEnd'===_0x321123[_0xb01356]['type']&&(_0x321123[_0xb01356]['item']['endIndex']=_0xb01356),_0x445d2c['set'](_0x321123[_0xb01356]['id'],_0xb01356));for(const _0x2be6b1 of _0x445d2c['values']())'elementStart'===_0x321123[_0x2be6b1]['type']?_0x321123[_0x2be6b1]['item']['endIndex']=_0x445d2c['get'](_0x321123[_0x2be6b1]['pairId']):'elementEnd'===_0x321123[_0x2be6b1]['type']&&(_0x321123[_0x2be6b1]['item']['startIndex']=_0x445d2c['get'](_0x321123[_0x2be6b1]['pairId']));}['_processTape'](_0x5987e4){for(let _0x225eb3=0x0;_0x225eb3<_0x5987e4['length'];_0x225eb3++){if('elementStart'===_0x5987e4[_0x225eb3]['type'])_0x5987e4[_0x225eb3]['item']['startIndex']=_0x225eb3;else{if('elementEnd'===_0x5987e4[_0x225eb3]['type']){_0x5987e4[_0x225eb3]['item']['endIndex']=_0x225eb3;const _0x36ae5f=_0x5987e4[_0x225eb3]['item']['startIndex'];_0x5987e4[_0x36ae5f]['pairId']=_0x5987e4[_0x225eb3]['id'],_0x5987e4[_0x225eb3]['pairId']=_0x5987e4[_0x36ae5f]['id'];}else _0x5987e4[_0x225eb3]['item']['startIndex']=_0x225eb3,_0x5987e4[_0x225eb3]['item']['endIndex']=_0x225eb3,_0x5987e4[_0x225eb3]['pairId']=null;}_0x5987e4[_0x225eb3]['markersStart']||(_0x5987e4[_0x225eb3]['markersStart']=[],_0x5987e4[_0x225eb3]['markersEnd']=[]);}}['_markInsertions'](_0x4c4955,_0x229767){const _0x318381=_0x4c4955['filter'](_0x24eb9d=>!_0x24eb9d['isAdded']);for(let _0x5484b0=0x0;_0x5484b0<_0x229767['length'];_0x5484b0++)_0x229767[_0x5484b0]['isAdded']&&(_0x318381[_0x5484b0]['isAdded']=_0x229767[_0x5484b0]['isAdded']);}['_getDiff'](_0xcd699a,_0x53db85=null){const _0x258ae5=this['repository']['getRevision'](_0xcd699a),_0x2e6165=_0x53db85?this['repository']['getRevision'](_0x53db85):null,_0x366671=this['_getRevisionsRange'](_0x258ae5,_0x2e6165),_0x9d0061=_0x366671[_0x366671['length']-0x1],_0x40dcc5=new Map(),_0x2c4a79={'model':{},'attributes':{},'changes':[]},_0x7f832d=new Set(),_0x2fd9d5=new Map();for(let _0x4171d1=_0x366671['length']-0x1;_0x4171d1>=0x0;_0x4171d1--){const _0x4a278c=_0x366671[_0x4171d1];for(const _0x4e3fd2 of Object['keys'](_0x4a278c['diffData']))if(_0x4a278c['diffData'][_0x4e3fd2]['attachChange']){const _0x53b522=_0x4a278c['diffData'][_0x4e3fd2]['attachChange'];_0x53b522['isAttached']?(_0x7f832d['add'](_0x4e3fd2),_0x2fd9d5['has'](_0x4e3fd2)&&_0x2fd9d5['get'](_0x4e3fd2)['userId']==_0x53b522['userId']?_0x2fd9d5['delete'](_0x4e3fd2):_0x2fd9d5['set'](_0x4e3fd2,_0x53b522)):_0x2fd9d5['has'](_0x4e3fd2)?(_0x7f832d['delete'](_0x4e3fd2),_0x2fd9d5['delete'](_0x4e3fd2)):(_0x7f832d['add'](_0x4e3fd2),_0x2fd9d5['set'](_0x4e3fd2,_0x53b522));}else _0x7f832d['add'](_0x4e3fd2);}for(const _0x2ddefc of _0x7f832d){const _0xa5ac47=_0x2fd9d5['has'](_0x2ddefc)&&!_0x2fd9d5['get'](_0x2ddefc)['isAttached'];let _0x1d167f=_0xa5ac47?_0x366671['length']-0x1:0x0;const _0x450776=_0xa5ac47?-0x1:0x1;for(;_0x366671[_0x1d167f];){const _0x168a51=_0x366671[_0x1d167f];if(_0x168a51['diffData'][_0x2ddefc]){const _0x51b072=_0xa5ac47?_0x168a51['diffData'][_0x2ddefc]['attributesBefore']:_0x168a51['diffData'][_0x2ddefc]['attributesAfter'];_0x2c4a79['attributes'][_0x2ddefc]=_0x51b072?_0x25ff9b(_0x51b072):{};break;}_0x1d167f+=_0x450776;}}for(const _0xe72f88 of _0x366671){_0xe72f88['model']={};for(const _0x2b0f3c of _0xe72f88['authors'])_0x40dcc5['set'](_0x2b0f3c['id'],_0x2b0f3c);for(const _0x19fc3f of _0x7f832d){const _0x5a6fd7=_0xe72f88['diffData'][_0x19fc3f]?_0xe72f88['diffData'][_0x19fc3f]['insertions']:'[]',_0x12e338=_0xe72f88['diffData'][_0x19fc3f]?_0xe72f88['diffData'][_0x19fc3f]['deletions']:'[]';_0xe72f88['model'][_0x19fc3f]={'insertions':this['_utils']['_makeModelFromViewString'](_0x5a6fd7),'deletions':this['_utils']['_makeModelFromViewString'](_0x12e338)};}}for(const _0x3f37fa of _0x7f832d){let _0x314de1=null,_0x1c23e8=0x0;const _0x124576=new Map(Array['from'](_0x258ae5['model'][_0x3f37fa]['insertions']['markers'])['filter'](([_0x1b036b])=>!_0x1b036b['startsWith']('revision:')));let _0x1a4bb0=0x0;for(const _0x3791c of _0x366671){const _0x28d55b=this['_makeTape'](_0x3791c['model'][_0x3f37fa]['insertions']);_0x3791c==_0x258ae5?(_0x314de1=_0x28d55b,_0x1c23e8=_0x314de1['length'],_0x314de1['forEach'](_0x198a32=>{_0x198a32['id']=_0x1a4bb0++;}),this['_processTape'](_0x314de1)):this['_markInsertions'](_0x314de1,_0x28d55b);const _0x3fc545=_0x314de1['filter'](_0xbf1002=>!_0xbf1002['isAdded'])['map'](_0x5d8e03=>_0x5d8e03['id']);let _0x4899b4=0x0;const _0x22c740=this['_makeTape'](_0x3791c['model'][_0x3f37fa]['deletions']);_0x22c740['forEach'](_0x302259=>{_0x302259['isRemoved']?_0x302259['id']=_0x1c23e8++:_0x302259['id']=_0x3fc545[_0x4899b4++];}),this['_processTape'](_0x22c740),this['_setDistance'](_0x314de1,'isAdded'),this['_setDistance'](_0x22c740,'isRemoved'),_0x3791c==_0x258ae5&&this['_markMarkers'](_0x314de1,_0x124576),_0x314de1=this['_joinTapes'](_0x314de1,_0x22c740),this['_refreshStartEndIndex'](_0x314de1),this['_setDistance'](_0x314de1,'isRemoved');}_0x314de1=_0x314de1['filter'](_0x4a4dd8=>!(_0x4a4dd8['isAdded']&&_0x4a4dd8['isRemoved']));const _0x35982a=new Map(_0x9d0061['model'][_0x3f37fa]['deletions']['markers']),_0x57b3c5=new Set(_0x124576['keys']());for(const _0x25d5d9 of _0x35982a['keys']())_0x57b3c5['delete'](_0x25d5d9);this['_markSuggestions'](_0x314de1,_0x57b3c5),this['_fixObsoleteTags'](_0x314de1),_0x314de1=this['_removeMissingPairs'](_0x314de1),_0x314de1=this['_markMismatchedRemovedTags'](_0x314de1),_0x314de1=this['_removeUnsupportedChanges'](_0x314de1);const {root:_0x397eda,changes:_0x191851}=this['_makeModelFromTape'](_0x314de1,_0x40dcc5,_0x3f37fa);_0x2c4a79['model'][_0x3f37fa]=_0x397eda;const _0x5e4ab4=_0x2fd9d5['get'](_0x3f37fa);if(_0x5e4ab4){const _0x4bf44e=_0x40dcc5['get'](_0x5e4ab4['userId']),_0x596f46=new G({'author':_0x4bf44e,'type':_0x5e4ab4['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3f37fa});_0x191851['unshift'](_0x596f46),_0x2c4a79['attributes'][_0x3f37fa]['revisionHistoryAttachChange']=_0x596f46['id'];}_0x2c4a79['changes']=_0x2c4a79['changes']['concat'](_0x191851);}return _0x2c4a79;}['_markMarkers'](_0x467837,_0x5896e4){for(let _0x14ee08=0x0;_0x14ee08<_0x467837['length'];_0x14ee08++)for(const [_0x5c635c,_0x4ef32c]of _0x5896e4)!_0x4ef32c['isCollapsed']&&_0x4ef32c['start']['isEqual'](_0x467837[_0x14ee08]['previousPosition'])&&_0x467837[_0x14ee08]['markersStart']['push'](_0x5c635c),_0x4ef32c['end']['isEqual'](_0x467837[_0x14ee08]['nextPosition'])&&_0x467837[_0x14ee08]['markersEnd']['push'](_0x5c635c);}['_joinTapes'](_0x4d1f22,_0x3243cb){let _0x24d006=[],_0x104793=0x0,_0x3ac0e7=0x0;for(;_0x104793<_0x4d1f22['length']||_0x3ac0e7<_0x3243cb['length'];){const _0x3a1467=_0x4d1f22[_0x104793]||{},_0x39e4e2=_0x3243cb[_0x3ac0e7]||{};if(_0x3a1467['id']==_0x39e4e2['id'])_0x104793++,_0x3ac0e7++,_0x24d006['push'](_0x3a1467);else{if(_0x39e4e2['isRemoved']&&_0x3a1467['isAdded']){const {commonTape:_0x56228b,iEnd:_0x295c1e,jEnd:_0x5a5826}=this['_threeWayMerge'](_0x4d1f22,_0x104793,_0x3243cb,_0x3ac0e7);_0x24d006=_0x24d006['concat'](_0x56228b),_0x104793=_0x295c1e,_0x3ac0e7=_0x5a5826;}else _0x39e4e2['isRemoved']?(_0x3ac0e7++,_0x24d006['push'](_0x39e4e2)):(_0x104793++,_0x24d006['push'](_0x3a1467));}}return _0x24d006;}['_markSuggestions'](_0x1fac04,_0x3f4fb1){const _0x778c64=[];for(let _0x28b5da=0x0;_0x28b5da<_0x1fac04['length'];_0x28b5da++){for(let _0x339be5=0x0;_0x339be5<_0x1fac04[_0x28b5da]['markersStart']['length'];_0x339be5++){const _0x418aaf=_0x1fac04[_0x28b5da]['markersStart'][_0x339be5];if(!_0x3f4fb1['has'](_0x418aaf))continue;const {group:_0x2bf8f6,type:_0xa8391,authorId:_0xf6531e}=_0x5edcda(_0x418aaf);'revision-suggestion'!=_0x2bf8f6||'insertion'!=_0xa8391&&'deletion'!=_0xa8391||(_0x778c64['unshift']({'type':_0xa8391,'name':_0x418aaf,'userId':_0xf6531e}),_0x1fac04[_0x28b5da]['markersStart']['splice'](_0x339be5,0x1),_0x339be5--);}_0x176e65(_0x1fac04[_0x28b5da]);for(let _0xddc3db=0x0;_0xddc3db<_0x1fac04[_0x28b5da]['markersEnd']['length'];_0xddc3db++){const _0x361fb4=_0x1fac04[_0x28b5da]['markersEnd'][_0xddc3db];if(!_0x3f4fb1['has'](_0x361fb4))continue;const {group:_0x4b4eef,type:_0x4066de}=_0x5edcda(_0x361fb4);if('revision-suggestion'!=_0x4b4eef||'insertion'!=_0x4066de&&'deletion'!=_0x4066de)continue;_0x1fac04[_0x28b5da]['markersEnd']['splice'](_0xddc3db,0x1),_0xddc3db--;const _0x3d2b65=_0x778c64['findIndex'](_0x30bfdc=>_0x30bfdc['name']==_0x361fb4);_0x3d2b65>-0x1&&_0x778c64['splice'](_0x3d2b65,0x1);}}function _0x5edcda(_0x2502e3){const _0x27d553=_0x2502e3['split'](':');return{'group':_0x27d553[0x0],'type':_0x27d553[0x1],'subType':_0x27d553['length']>=0x5?_0x27d553[0x2]:null,'id':_0x27d553['length']<0x5?_0x27d553[0x2]:_0x27d553[0x3],'authorId':_0x27d553['length']<0x5?_0x27d553[0x3]:_0x27d553[0x4],'markerCount':0x6==_0x27d553['length']?_0x27d553[0x5]:null};}function _0x176e65(_0x59848e){for(let _0x31f301=0x0;_0x31f301<_0x778c64['length'];_0x31f301++){if(_0x59848e['isAdded']&&'insertion'==_0x778c64[_0x31f301]['type']&&_0x59848e['isAdded']['userId']==_0x778c64[_0x31f301]['userId'])return _0x59848e['isAddSuggestion']=_0x778c64[_0x31f301],void delete _0x59848e['isAdded'];if(!_0x59848e['isAdded']&&!_0x59848e['isRemoved']&&'deletion'==_0x778c64[_0x31f301]['type'])return void(_0x59848e['isRemoveSuggestion']=_0x778c64[_0x31f301]);}}}['_setDistance'](_0x4eb68b,_0x2296ff){let _0x318042=0x0,_0x1fdf9b=!0x1;const _0x288f19=new Map();for(const _0x44dc56 of _0x4eb68b)_0x44dc56[_0x2296ff]?_0x1fdf9b&&(_0x318042++,_0x1fdf9b=!0x1):(_0x318042++,_0x1fdf9b=!0x0),_0x288f19['set'](_0x44dc56['id'],_0x318042);for(let _0x48cb7e=0x0;_0x48cb7e<_0x4eb68b['length'];_0x48cb7e++){if('isRemoved'==_0x2296ff&&_0x4eb68b[_0x48cb7e]['isAdded']||'isAdded'==_0x2296ff&&_0x4eb68b[_0x48cb7e]['isRemoved'])continue;if('text'==_0x4eb68b[_0x48cb7e]['type']){_0x4eb68b[_0x48cb7e]['distance']=0x0;continue;}const _0x3ec854=_0x288f19['get'](_0x4eb68b[_0x48cb7e]['pairId']),_0x3d3ee7=_0x288f19['get'](_0x4eb68b[_0x48cb7e]['id']);_0x4eb68b[_0x48cb7e]['distance']=_0x3ec854-_0x3d3ee7;}}['_getRevisionsRange'](_0x27de6d,_0x3c4bb8,_0x39ae42=!0x1){const _0x284085=[];let _0x3d30c6=this['repository']['getIndex'](_0x27de6d),_0x36448f=this['repository']['getIndex'](_0x3c4bb8);for(-0x1==_0x36448f&&(_0x36448f=this['repository']['_revisions']['length'],_0x39ae42=!0x1);_0x3d30c6<_0x36448f;)_0x284085['push'](this['repository']['getRevision'](_0x3d30c6)),_0x3d30c6++;return _0x39ae42&&_0x284085['push'](this['repository']['getRevision'](_0x3d30c6)),_0x284085;}['_threeWayMerge'](_0xb1897d,_0x35d320,_0x1814ed,_0x1551bb){const _0x1f740c=this['editor']['model']['schema'];let _0x4dd67a=_0x35d320;for(;_0xb1897d[_0x4dd67a]&&_0xb1897d[_0x4dd67a]['isAdded'];)_0x4dd67a++;let _0x182ce8=_0x1551bb;for(;_0x1814ed[_0x182ce8]&&_0x1814ed[_0x182ce8]['isRemoved'];)_0x182ce8++;_0x2d8346(_0xb1897d,_0x35d320,_0x4dd67a),_0x2d8346(_0x1814ed,_0x1551bb,_0x182ce8);const _0x4fe013=_0x1814ed['slice'](_0x1551bb,_0x182ce8)['concat'](_0xb1897d['slice'](_0x35d320,_0x4dd67a));return _0x4fe013['sort']((_0x85d151,_0x4e965e)=>_0x85d151['side']!=_0x4e965e['side']?_0x85d151['side']-_0x4e965e['side']:_0x85d151['level']!=_0x4e965e['level']?_0x85d151['level']-_0x4e965e['level']:_0x85d151['distance']!=_0x4e965e['distance']?_0x4e965e['distance']-_0x85d151['distance']:!!_0x85d151['isAdded']!=!!_0x4e965e['isAdded']?-0x1==_0x85d151['side']||0x0==_0x85d151['side']?_0x85d151['isAdded']?-0x1:0x1:_0x85d151['isAdded']?0x1:-0x1:_0x85d151['index']-_0x4e965e['index']),{'commonTape':_0x4fe013,'iEnd':_0x4dd67a,'jEnd':_0x182ce8};function _0x2d8346(_0x3a2b81,_0x8c5062,_0x34797a){let _0x2701f8=-0x1,_0x46893c=Number['POSITIVE_INFINITY'],_0x2cfe8c=!0x0;for(let _0x406f1f=_0x8c5062;_0x406f1f<_0x34797a;_0x406f1f++)if(_0x1f740c['isInline'](_0x3a2b81[_0x406f1f]['item'])||(_0x2cfe8c=!0x1),_0x3a2b81[_0x406f1f]['item']['startIndex']<_0x8c5062&&(_0x2701f8=_0x406f1f),_0x3a2b81[_0x406f1f]['item']['endIndex']>=_0x34797a){_0x46893c=_0x406f1f;break;}_0x2cfe8c&&(_0x2701f8=_0x34797a-0x1);for(let _0x2ac7e8=_0x8c5062;_0x2ac7e8<_0x34797a;_0x2ac7e8++)_0x3a2b81[_0x2ac7e8]['side']=_0x2ac7e8<=_0x2701f8?-0x1:_0x2ac7e8<_0x46893c?0x0:0x1,_0x3a2b81[_0x2ac7e8]['index']=_0x2ac7e8;let _0x394900=0x0;for(let _0x462262=_0x8c5062;_0x462262<=_0x2701f8;_0x462262++)0x0==_0x3a2b81[_0x462262]['distance']?_0x3a2b81[_0x462262]['level']=_0x394900:(_0x394900++,_0x3a2b81[_0x462262]['level']=_0x394900,_0x394900++);for(let _0xb68d4b=_0x8c5062;_0xb68d4b<_0x34797a;_0xb68d4b++)0x0==_0x3a2b81[_0xb68d4b]['side']&&(_0x3a2b81[_0xb68d4b]['level']=_0x394900);_0x394900=0x0;for(let _0x41ec8c=_0x34797a-0x1;_0x41ec8c>=_0x46893c;_0x41ec8c--)0x0==_0x3a2b81[_0x41ec8c]['distance']?_0x3a2b81[_0x41ec8c]['level']=_0x394900:(_0x394900--,_0x3a2b81[_0x41ec8c]['level']=_0x394900,_0x394900--);}}['_fixObsoleteTags'](_0x522e3d){const _0x27abc6=new Map(),_0x57d031=this['editor']['model']['schema'];for(let _0x1654bd=0x1;_0x1654bd<_0x522e3d['length'];_0x1654bd++){let _0x2d3f5d,_0xb039b9,_0x1c2194;const _0x48938c=_0x522e3d[_0x1654bd],_0x455043=_0x522e3d[_0x1654bd-0x1];if('text'==_0x48938c['type'])continue;if(_0x48938c['type']!=_0x455043['type'])continue;if(!_0x57d031['isBlock'](_0x455043['item'])||_0x57d031['isLimit'](_0x455043['item']))continue;if(!_0x57d031['isBlock'](_0x48938c['item'])||_0x57d031['isLimit'](_0x48938c['item']))continue;if((_0x522e3d[_0x1654bd]['isAdded']||_0x522e3d[_0x1654bd]['isAddSuggestion'])&&_0x522e3d[_0x1654bd-0x1]['isRemoved'])_0x2d3f5d=_0x522e3d[_0x1654bd],_0xb039b9=_0x522e3d[_0x1654bd-0x1],_0x1c2194=_0x1654bd-0x1;else{if(!_0x522e3d[_0x1654bd]['isRemoved']||!_0x522e3d[_0x1654bd-0x1]['isAdded']&&!_0x522e3d[_0x1654bd-0x1]['isAddSuggestion'])continue;_0x2d3f5d=_0x522e3d[_0x1654bd-0x1],_0xb039b9=_0x522e3d[_0x1654bd],_0x1c2194=_0x1654bd;}const _0x3f1c34=_0x2d3f5d['level']==_0xb039b9['level'],_0x537fc6=Math['abs'](_0x2d3f5d['level'])<Math['abs'](_0xb039b9['level'])&&0x0==_0xb039b9['distance'];(_0x3f1c34||_0x537fc6)&&(_0x27abc6['set'](_0xb039b9['id'],_0x2d3f5d['id']),_0x522e3d['splice'](_0x1c2194,0x1),_0x1654bd--,_0x2d3f5d['isAdded']=!0x1);}for(let _0x5899e6=0x0;_0x5899e6<_0x522e3d['length'];_0x5899e6++)_0x27abc6['has'](_0x522e3d[_0x5899e6]['pairId'])&&(_0x522e3d[_0x5899e6]['pairId']=_0x27abc6['get'](_0x522e3d[_0x5899e6]['pairId']));}['_removeMissingPairs'](_0x9dcf36){const _0x344e2e=new Set(_0x9dcf36['map'](_0x1fc399=>_0x1fc399['id']));for(let _0x2cdacd=0x0;_0x2cdacd<_0x9dcf36['length'];_0x2cdacd++)_0x344e2e['has'](_0x9dcf36[_0x2cdacd]['pairId'])||0x0==_0x9dcf36[_0x2cdacd]['distance']||(_0x9dcf36[_0x2cdacd]['isIncorrect']=!0x0);return _0x9dcf36['filter'](_0x21f59d=>!_0x21f59d['isIncorrect']);}['_markMismatchedRemovedTags'](_0xefe65){const _0x5379b8=new Set();for(let _0x2e22e8=0x0;_0x2e22e8<_0xefe65['length'];_0x2e22e8++){if(_0x5379b8['has'](_0xefe65[_0x2e22e8]['id'])&&_0xefe65[_0x2e22e8]['isRemoved']&&(_0xefe65[_0x2e22e8]['isIncorrect']=!0x0),_0xefe65[_0x2e22e8]['isIncorrect'])continue;if(0x0==_0xefe65[_0x2e22e8]['distance'])continue;if('elementStart'!=_0xefe65[_0x2e22e8]['type'])continue;if(null==_0xefe65[_0x2e22e8]['pairId'])continue;let _0x3b2015=_0x2e22e8+0x1,_0x8ee1e6=0x0;for(;_0xefe65[_0x3b2015]['id']!=_0xefe65[_0x2e22e8]['pairId'];)'elementStart'==_0xefe65[_0x3b2015]['type']?_0x8ee1e6++:'elementEnd'==_0xefe65[_0x3b2015]['type']&&_0x8ee1e6--,_0x3b2015++;if(0x0!=_0x8ee1e6){if(_0xefe65[_0x2e22e8]['isRemoved'])_0xefe65[_0x2e22e8]['isIncorrect']=!0x0;else{for(;_0x3b2015!=_0x2e22e8;)_0xefe65[_0x3b2015]['isRemoved']&&0x0!=_0xefe65[_0x3b2015]['distance']&&(_0xefe65[_0x3b2015]['isIncorrect']=!0x0,_0x5379b8['add'](_0xefe65[_0x3b2015]['pairId'])),_0x3b2015--;}}}return _0xefe65['filter'](_0x47118b=>!_0x47118b['isIncorrect']);}['_removeUnsupportedChanges'](_0xecdd04){const _0x59b714=this['editor']['model']['schema'];for(let _0x52ac85=0x0;_0x52ac85<_0xecdd04['length'];_0x52ac85++){if(!(_0xecdd04[_0x52ac85]['isAdded']||_0xecdd04[_0x52ac85]['isAddSuggestion']||_0xecdd04[_0x52ac85]['isRemoved']||_0xecdd04[_0x52ac85]['isRemoveSuggestion']))continue;if(0x0==_0xecdd04[_0x52ac85]['distance'])continue;const _0x196eb8=_0xecdd04[_0x52ac85]['item'];_0x59b714['isBlock'](_0x196eb8)||_0x59b714['isLimit'](_0x196eb8)||(_0xecdd04[_0x52ac85]['isAdded']&&delete _0xecdd04[_0x52ac85]['isAdded'],_0xecdd04[_0x52ac85]['isAddSuggestion']&&delete _0xecdd04[_0x52ac85]['isAddSuggestion'],_0xecdd04[_0x52ac85]['isRemoveSuggestion']&&delete _0xecdd04[_0x52ac85]['isRemoveSuggestion'],_0xecdd04[_0x52ac85]['isRemoved']&&(_0xecdd04[_0x52ac85]['isIncorrect']=!0x0));}return _0xecdd04['filter'](_0x3c7502=>!_0x3c7502['isIncorrect']);}['_makeModelFromTape'](_0x3d5158,_0x1d38fc,_0x39a0ce){const _0xd08691=new _0x24dd64(),_0x19b7dc=[],_0x2e090e=new Map(),_0x48bff3=this['editor']['model'],_0x1acf0=_0x48bff3['schema'],_0x4800de=[_0xd08691],_0x202693={},_0x39d139={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5b17e8=null;const _0x382a94=[0x0];for(let _0x5bb8ec=0x0;_0x5bb8ec<_0x3d5158['length'];_0x5bb8ec++)if('elementStart'===_0x3d5158[_0x5bb8ec]['type']){_0x3d5158[_0x5bb8ec]['previousPosition']=_0x48bff3['createPositionFromPath'](_0xd08691,_0x382a94);const _0x596ef2=new _0x220be8(_0x3d5158[_0x5bb8ec]['item']['name'],_0x3d5158[_0x5bb8ec]['item']['getAttributes']());_0x4800de[0x0]['_appendChild'](_0x596ef2),_0x382a94['push'](0x0),_0x4800de['unshift'](_0x596ef2),_0x3d5158[_0x5bb8ec]['nextPosition']=_0x48bff3['createPositionFromPath'](_0xd08691,_0x382a94);}else'elementEnd'===_0x3d5158[_0x5bb8ec]['type']?(_0x4800de['shift'](),_0x3d5158[_0x5bb8ec]['previousPosition']=_0x48bff3['createPositionFromPath'](_0xd08691,_0x382a94),_0x382a94['pop'](),_0x382a94[_0x382a94['length']-0x1]++,_0x3d5158[_0x5bb8ec]['nextPosition']=_0x48bff3['createPositionFromPath'](_0xd08691,_0x382a94)):(_0x3d5158[_0x5bb8ec]['previousPosition']=_0x48bff3['createPositionFromPath'](_0xd08691,_0x382a94),_0x5b17e8?_0x5b17e8['_data']+=_0x3d5158[_0x5bb8ec]['item']['data']:_0x5b17e8=new _0x53c09b(_0x3d5158[_0x5bb8ec]['item']['data'],_0x3d5158[_0x5bb8ec]['item']['getAttributes']()),_0x3d5158[_0x5bb8ec+0x1]&&'text'===_0x3d5158[_0x5bb8ec+0x1]['type']&&_0x1c0881(_0x5b17e8,_0x3d5158[_0x5bb8ec+0x1]['item'])||(_0x4800de[0x0]['_appendChild'](_0x5b17e8),_0x5b17e8=null),_0x382a94[_0x382a94['length']-0x1]+=_0x3d5158[_0x5bb8ec]['item']['offsetSize'],_0x3d5158[_0x5bb8ec]['nextPosition']=_0x48bff3['createPositionFromPath'](_0xd08691,_0x382a94));for(let _0x3ee718=0x0;_0x3ee718<_0x3d5158['length'];_0x3ee718++){const _0xd15757=_0x3d5158[_0x3ee718]['previousPosition'],_0x93c19e=_0x3d5158[_0x3ee718]['nextPosition'];for(const _0x40ad3d of _0x3d5158[_0x3ee718]['markersStart'])_0x2e090e['set'](_0x40ad3d,{'start':_0xd15757,'end':null});_0x48f26b('isRemoveSuggestion',_0x3ee718,_0xd15757,_0x93c19e),_0x48f26b('isAddSuggestion',_0x3ee718,_0xd15757,_0x93c19e),_0x48f26b('isRemoved',_0x3ee718,_0xd15757,_0x93c19e),_0x48f26b('isAdded',_0x3ee718,_0xd15757,_0x93c19e);for(const _0x390e8a of _0x3d5158[_0x3ee718]['markersEnd']){const _0x3f41e2=_0x2e090e['get'](_0x390e8a);_0x3f41e2?_0x3f41e2['end']=_0x93c19e:_0x2e090e['set'](_0x390e8a,{'start':_0x93c19e,'end':_0x93c19e});}}for(const [_0x599017,_0x5d950d]of _0x2e090e){const _0x43ca5b=this['editor']['model']['createRange'](_0x5d950d['start'],_0x5d950d['end']);_0xd08691['markers']['set'](_0x599017,_0x43ca5b);}return _0x19b7dc['sort']((_0x1c47a9,_0x32f20f)=>{const _0x674e4f=_0xd08691['markers']['get']('revision:'+_0x1c47a9['id']),_0x4c2712=_0xd08691['markers']['get']('revision:'+_0x32f20f['id']);return _0x674e4f['start']['isBefore'](_0x4c2712['start'])?-0x1:_0x674e4f['start']['isAfter'](_0x4c2712['start'])?0x1:_0x674e4f['end']['isBefore'](_0x4c2712['end'])?-0x1:_0x674e4f['end']['isAfter'](_0x4c2712['end'])?0x1:'add'===_0x1c47a9['type']?-0x1:0x1;}),{'root':_0xd08691,'changes':_0x19b7dc};function _0x48f26b(_0x497fbe,_0x3eb91d,_0x219f3a,_0x3a4d96){const _0x138e56=!!_0x3d5158[_0x3eb91d][_0x497fbe],_0x3bcf2d=_0x138e56?_0x3d5158[_0x3eb91d][_0x497fbe]['userId']:null,_0xe74129=_0x3eb91d===_0x3d5158['length']-0x1,_0x1d74a4=_0x39d139[_0x497fbe][0x0],_0x75d87c=_0x1acf0['isObject'](_0x3d5158[_0x3eb91d]['item']);!_0x202693[_0x497fbe]&&_0x138e56?_0x202693[_0x497fbe]={'start':_0x219f3a,'tapeItem':_0x3d5158[_0x3eb91d],'userId':_0x3bcf2d,'type':_0x497fbe}:_0x202693[_0x497fbe]&&!_0x138e56?(_0x202693[_0x497fbe]['end']=_0x219f3a,_0x2ca79a(_0x202693[_0x497fbe]),_0x202693[_0x497fbe]=null):_0x202693[_0x497fbe]&&_0x138e56&&_0x202693[_0x497fbe]['userId']!==_0x3bcf2d&&(_0x202693[_0x497fbe]['end']=_0x219f3a,_0x1d74a4&&_0x1d74a4['userId']===_0x202693[_0x497fbe]['userId']||_0x2ca79a(_0x202693[_0x497fbe]),_0x202693[_0x497fbe]={'start':_0x219f3a,'tapeItem':_0x3d5158[_0x3eb91d],'userId':_0x3bcf2d,'type':_0x497fbe}),_0x202693[_0x497fbe]&&_0x75d87c&&('elementStart'!==_0x3d5158[_0x3eb91d]['type']||_0x1d74a4&&_0x1d74a4['userId']===_0x3bcf2d||_0x39d139[_0x497fbe]['unshift']({'userId':_0x3bcf2d,'object':_0x3d5158[_0x3eb91d]['item'],'change':_0x202693[_0x497fbe]}),'elementEnd'===_0x3d5158[_0x3eb91d]['type']&&_0x1d74a4&&_0x1d74a4['object']===_0x3d5158[_0x3eb91d]['item']&&(_0x39d139[_0x497fbe]['shift'](),_0x202693[_0x497fbe]=_0x1d74a4['change'])),_0x202693[_0x497fbe]&&_0xe74129&&(_0x202693[_0x497fbe]['end']=_0x3a4d96,_0x2ca79a(_0x202693[_0x497fbe]),_0x202693[_0x497fbe]=null);}function _0x2ca79a({start:_0x64dba8,end:_0x248647,tapeItem:_0x3c8fbc,userId:_0x155a05,type:_0xbf22e8}){const _0x127d10=_0x3c8fbc['item'],_0x2d2ca2=_0x48bff3['schema']['isBlock'](_0x127d10)&&!_0x48bff3['schema']['isLimit'](_0x127d10),_0xd83808=_0x64dba8['nodeAfter']==_0x248647['parent']&&_0x248647['isAtStart'];if(_0x2d2ca2&&_0xd83808)return;const _0xe72c5c=_0x48bff3['createRange'](_0x64dba8,_0x248647),_0x54abfa=_0x1d38fc['get'](_0x155a05),_0x43829e=new G({'author':_0x54abfa,'type':'isAdded'==_0xbf22e8||'isAddSuggestion'==_0xbf22e8?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xbf22e8||'isRemoveSuggestion'==_0xbf22e8},'createdAt':new Date(),'rootName':_0x39a0ce});_0x19b7dc['push'](_0x43829e),_0xd08691['markers']['set']('revision:'+_0x43829e['id'],_0xe72c5c);}function _0x1c0881(_0x2bb970,_0x61cce8){const _0x4df61e=_0x2bb970['getAttributes'](),_0x37e5c6=_0x61cce8['getAttributes']();for(const _0xcc45a4 of _0x4df61e){if(_0xcc45a4[0x1]!==_0x61cce8['getAttribute'](_0xcc45a4[0x0]))return!0x1;_0x37e5c6['next']();}return _0x37e5c6['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x492be2=>{const _0x25c8b2=_0x492be2['markerName']['split'](':')[0x1],_0x40b67f=this['_getChangeFromId'](_0x25c8b2);if(!_0x40b67f)return null;const _0x143231='add'==_0x40b67f['type']?'insertion':'deletion',_0x49ced7=['ck-suggestion-marker','ck-suggestion-marker-'+_0x143231];return _0x40b67f['data']['isSuggestion']&&_0x49ced7['push']('ck-suggestion-marker-'+_0x143231+'-new'),this['activeChange']==_0x40b67f&&_0x49ced7['push']('ck-suggestion-marker--active'),{'classes':_0x49ced7,'attributes':{'data-change-id':_0x25c8b2}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x916bef=>{_0x916bef['on']('element:pre',(_0x416b2a,_0xb330eb,_0x45ad43)=>{const _0x13c12b=_0xb330eb['viewItem']['getChild'](0x0);if(!_0x13c12b||!_0x13c12b['is']('element','code'))return;if(!_0x45ad43['consumable']['consume'](_0x13c12b,{'attributes':['vid_start','vid_end']}))return;const _0x178fe1=_0xb330eb['modelRange']['start']['nodeAfter'];_0x45ad43['writer']['setAttribute']('vid_start',_0x13c12b['getAttribute']('vid_start'),_0x178fe1),_0x45ad43['writer']['setAttribute']('vid_end',_0x13c12b['getAttribute']('vid_end'),_0x178fe1);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2ab9f6=>{_0x2ab9f6['on']('element',(_0x373efc,_0x42a6d3,_0x29286f)=>{if(!_0x29286f['consumable']['consume'](_0x42a6d3['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x42a6d3['modelRange']['isCollapsed'])return;const _0x39d93f=_0x42a6d3['modelRange']['start']['nodeAfter'];_0x39d93f['hasAttribute']('vid_start')||_0x39d93f['hasAttribute']('vid')||(_0x29286f['writer']['setAttribute']('vid_start',_0x42a6d3['viewItem']['getAttribute']('vid_start'),_0x39d93f),_0x29286f['writer']['setAttribute']('vid_end',_0x42a6d3['viewItem']['getAttribute']('vid_end'),_0x39d93f));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x6c8866=>_0x6c8866['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x2d7ea1,[,_0xfedfa])=>{['vid_start','vid_end','vid']['includes'](_0xfedfa)&&(_0x2d7ea1['return']=!0x0,_0x2d7ea1['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1f3d93=>{_0x1f3d93['on']('attribute:vid',(_0x7637ad,_0x49bf73,_0x5edd98)=>{if('\x20'!=_0x49bf73['item']['data']||_0x49bf73['item']['parent']['maxOffset']>0x1)return;if(!_0x5edd98['consumable']['consume'](_0x49bf73['item'],_0x7637ad['name']))return;const _0x3dcb31=_0x5edd98['writer'],_0x427b3c=_0x5edd98['mapper']['toViewRange'](_0x49bf73['range']);_0x3dcb31['wrap'](_0x427b3c,_0x3dcb31['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4781e5){const _0x48e21c=_0x4781e5['plugins']['get']('RevisionViewer');return(_0x55c25a,_0xb71e08,_0x1f9e74)=>{const _0xdf1cc2=_0xb71e08['markerName']['split'](':')[0x1],_0x3b1c8e=_0x48e21c['_getChangeFromId'](_0xdf1cc2);if(!_0x3b1c8e)return null;const _0x5877f6='add'==_0x3b1c8e['type']?'split':'merge';if(!_0x1f9e74['consumable']['test'](_0xb71e08['markerRange'],_0x55c25a['name']))return;const _0xf24404=_0xb71e08['markerRange']['getWalker'](),_0x44c2e7=_0xb71e08['markerRange']['start'],_0x143794=_0x4781e5['model']['schema'];let _0x4e1247=null,_0x3a34a6=null,_0x267cab=!0x1,_0x5dfb66=!0x1;for(const _0x383456 of _0xf24404){const _0x58d804=_0x383456['item'];_0x267cab=_0x267cab||_0x143794['isContent'](_0x58d804);const _0xd8fc7b=_0x1f9e74['mapper']['toViewElement'](_0x58d804);if(_0xd8fc7b&&_0xd8fc7b['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x383456['type']&&(_0x143794['isBlock'](_0x58d804)&&!_0x143794['isLimit'](_0x58d804)&&(_0x58d804['nextSibling']||_0x44c2e7['isAtEnd']?_0x4e1247&&_0x4e1247['parent']==_0x58d804||(_0x4e1247=_0x58d804,_0x2b1688(_0x383456['previousPosition']),_0x5dfb66=!0x0):_0x3a34a6=_0x3a34a6||_0x383456['previousPosition']));}function _0x2b1688(_0x2ee688){const _0x4e840d=_0x1f9e74['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5877f6}),_0x1c8953=_0x1f9e74['mapper']['toViewPosition'](_0x2ee688);_0x3b1c8e['data']['isSuggestion']&&_0x1f9e74['writer']['addClass']('ck-suggestion-marker-'+_0x5877f6+'-new',_0x4e840d),_0x48e21c['activeChange']==_0x3b1c8e&&_0x1f9e74['writer']['addClass']('ck-suggestion-marker--active',_0x4e840d),_0x1f9e74['writer']['insert'](_0x1c8953,_0x4e840d),_0x1f9e74['mapper']['bindElementToMarker'](_0x4e840d,_0xb71e08['markerName']);}_0x267cab||_0x5dfb66||!_0x3a34a6||_0x2b1688(_0x3a34a6);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2b6ebc,_0x411446,_0x576b23)=>{const _0x460fc9=_0x576b23['mapper']['markerNameToElements'](_0x411446['markerName']);if(_0x460fc9){for(const _0x9e20ce of _0x460fc9)(_0x9e20ce['hasClass']('ck-suggestion-marker-split')||_0x9e20ce['hasClass']('ck-suggestion-marker-merge'))&&(_0x576b23['mapper']['unbindElementFromMarkerName'](_0x9e20ce,_0x411446['markerName']),_0x576b23['writer']['remove'](_0x9e20ce));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x460295,_0x569b9c,_0x28d486)=>{const _0x3cfd4c=_0x569b9c['markerName']['split'](':')[0x1],_0x35fe53=this['_getChangeFromId'](_0x3cfd4c);if(!_0x35fe53)return null;const _0x1ba917='add'==_0x35fe53['type']?'split':'merge';if(_0x28d486['consumable']['test'](_0x569b9c['markerRange'],_0x460295['name']))for(const _0x22d0e0 of _0x569b9c['markerRange']['getItems']()){if(!_0x22d0e0['is']('element','softBreak'))continue;const _0x347a93=_0x28d486['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1ba917}),_0x447aba=_0x28d486['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x22d0e0));_0x35fe53['data']['isSuggestion']&&_0x28d486['writer']['addClass']('ck-suggestion-marker-'+_0x1ba917+'-new',_0x347a93),this['activeChange']==_0x35fe53&&_0x28d486['writer']['addClass']('ck-suggestion-marker--active',_0x347a93),_0x28d486['writer']['insert'](_0x447aba,_0x347a93),_0x28d486['mapper']['bindElementToMarker'](_0x347a93,_0x569b9c['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2e8c4d=>{for(const _0x5a430 of this['editor']['model']['document']['getRootNames']()){const _0x2460c0=this['editor']['model']['document']['getRoot'](_0x5a430),_0x2d7604=this['editor']['editing']['view']['document']['getRoot'](_0x5a430);if(_0x2d7604){const _0x437c5e=_0x2460c0['getAttribute']('revisionHistoryAttachChange');if(_0x2e8c4d['removeAttribute']('data-change-id',_0x2d7604),_0x2e8c4d['removeClass']('ck-revision-history-root-add',_0x2d7604),_0x2e8c4d['removeClass']('ck-revision-history-root-remove',_0x2d7604),_0x2e8c4d['removeClass']('ck-revision-history-root--active',_0x2d7604),_0x437c5e){const _0x5ebc74=this['_getChangeFromId'](_0x437c5e);if(!_0x5ebc74)return null;_0x2e8c4d['setAttribute']('data-change-id',_0x437c5e,_0x2d7604),_0x2e8c4d['addClass']('ck-revision-history-root-'+_0x5ebc74['type'],_0x2d7604),this['activeChange']==_0x5ebc74&&_0x2e8c4d['addClass']('ck-revision-history-root--active',_0x2d7604);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x294e62=>'revision-comment:'+_0x294e62,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2b37fc=>'revision-suggestion:'+_0x2b37fc,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x1ec9d0=>({'name':'suggestion:'+_0x1ec9d0,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1d2a09=>{const _0x135217=_0x1d2a09['markerName']['split'](':')[0x1];return'insertion'!=_0x135217&&'deletion'!=_0x135217?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x135217]};}}),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',(_0x2eeb6d,_0x29327e,_0x4b8dd4)=>{const _0xde0758=_0x4b8dd4['mapper']['markerNameToElements'](_0x29327e['markerName']);if(_0xde0758){for(const _0x1a274a of _0xde0758)_0x1a274a['is']('uiElement')&&(_0x4b8dd4['mapper']['unbindElementFromMarkerName'](_0x1a274a,_0x29327e['markerName']),_0x4b8dd4['writer']['remove'](_0x1a274a));}},{'priority':'high'});}['_getChangeFromId'](_0x583b45){return this['_changeIdToChange']['get'](_0x583b45);}['_getViewForChange'](_0x55a1f4){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x55a1f4),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x3e81e5,_0x1b718a,_0x2f7e84,_0x590e69)=>{_0x590e69&&this['_balloon']['remove'](_0x590e69),_0x2f7e84&&(this['_balloon']['add']({'view':_0x2f7e84,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x51fe25=this['editor']['editing'],_0x4b79cc=this['_getChangeFromId'](_0x2f7e84['changeId']);let _0x4bbca9;if(_0x4b79cc['data']['isOnRoot']){const _0x1e0799=_0x51fe25['view']['getDomRoot'](_0x4b79cc['rootName']);_0x4bbca9=Array['from'](_0x1e0799['getClientRects']());}else{const _0x58a79c=this['editor']['model']['markers']['get']('revision:'+_0x2f7e84['changeId']);_0x4bbca9=Array['from'](_0x51fe25['mapper']['markerNameToElements'](_0x58a79c['name']))['map'](_0x129f7d=>_0x51fe25['view']['domConverter']['mapViewToDom'](_0x129f7d))['map'](_0x15afc8=>Array['from'](_0x15afc8['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x4bbca9[0x0];return _0x4bbca9['find'](_0x2bfee=>_0x2bfee['top']-0x3<=this['_activeViewTarget']['y']&&_0x2bfee['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2bfee['left']-0x3<=this['_activeViewTarget']['x']&&_0x2bfee['right']+0x3>=this['_activeViewTarget']['x'])||_0x4bbca9[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4a329a,_0x58dc6f,_0x4f5bde,_0x407b20)=>{this['activeView']=_0x4f5bde?this['_getViewForChange'](_0x4f5bde):null,this['editor']['model']['change'](()=>{const _0x7e6d9d=this['editor']['editing'];_0x407b20&&(_0x407b20['data']['isOnRoot']?_0x7e6d9d['view']['change'](_0x1f7544=>{_0x1f7544['removeClass']('ck-revision-history-root--active',_0x7e6d9d['view']['document']['getRoot'](_0x407b20['rootName']));}):_0x7e6d9d['reconvertMarker']('revision:'+_0x407b20['id'])),_0x4f5bde&&(_0x4f5bde['data']['isOnRoot']?_0x7e6d9d['view']['change'](_0x16fd68=>{_0x16fd68['addClass']('ck-revision-history-root--active',_0x7e6d9d['view']['document']['getRoot'](_0x4f5bde['rootName']));}):_0x7e6d9d['reconvertMarker']('revision:'+_0x4f5bde['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x35a37d,_0x2efa29)=>{if(this['activeChange'])return;const _0x213b3e=this['_findChangeIdFromDomTarget'](_0x2efa29['target']),_0x251fcf=this['_changeIdToChange']['get'](_0x213b3e);_0x251fcf?(this['_activeViewTarget']={'x':_0x2efa29['domEvent']['x'],'y':_0x2efa29['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x251fcf)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3419d4,_0x31d727)=>{const _0x419061=this['_findChangeIdFromDomTarget'](_0x31d727['target']),_0x47d910=this['_changeIdToChange']['get'](_0x419061);_0x47d910?(this['_activeViewTarget']={'x':_0x31d727['domEvent']['x'],'y':_0x31d727['domEvent']['y']},_0x47d910===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x47d910):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x570ac6){do{const _0x14098d=_0x570ac6['getAttribute']('data-change-id');if(_0x14098d)return _0x14098d;_0x570ac6=_0x570ac6['parent'];}while(_0x570ac6);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x25f570=>{for(const _0x53cea2 of this['editor']['model']['markers'])_0x25f570['removeMarker'](_0x53cea2);});}}function Q(_0x3c6db1,_0x55a8ed){return(_0xff0ec9,_0x381d7b,_0x1d20b8)=>{if(!_0x1d20b8['consumable']['test'](_0x381d7b['markerRange'],_0xff0ec9['name']))return;const _0x524630=_0x381d7b['markerRange']['getWalker'](),_0x5bf329=_0x381d7b['markerRange']['start'],_0x193057=_0x3c6db1['model']['schema'];let _0x173393=null,_0x146beb=null,_0x5558aa=!0x1,_0x33dde8=!0x1;for(const _0x3339fd of _0x524630){const _0x22344c=_0x3339fd['item'];_0x5558aa=_0x5558aa||_0x193057['isContent'](_0x22344c);const _0x3a86a0=_0x1d20b8['mapper']['toViewElement'](_0x22344c);if(_0x3a86a0&&_0x3a86a0['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3339fd['type']&&(_0x193057['isBlock'](_0x22344c)&&!_0x193057['isLimit'](_0x22344c)&&(_0x22344c['nextSibling']||_0x5bf329['isAtEnd']?_0x173393&&_0x173393['parent']==_0x22344c||(_0x173393=_0x22344c,_0xf86237(_0x3339fd['previousPosition']),_0x33dde8=!0x0):_0x146beb=_0x146beb||_0x3339fd['previousPosition']));}function _0xf86237(_0x3bc2eb){const _0x228e11=_0x1d20b8['mapper']['toViewPosition'](_0x3bc2eb),_0x424414=_0x1d20b8['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x55a8ed});_0x1d20b8['writer']['insert'](_0x228e11,_0x424414),_0x1d20b8['mapper']['bindElementToMarker'](_0x424414,_0x381d7b['markerName']);}_0x5558aa||_0x33dde8||!_0x146beb||_0xf86237(_0x146beb);};}class nt extends _0x5788b1{constructor(_0x57f8df){super(_0x57f8df);const _0x2f2b93=_0x57f8df['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x2f2b93,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2f2b93,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x7115d3=this['editor'],_0x5f3edb=_0x7115d3['plugins']['get'](l),_0x419563=_0x5f3edb['isReady']?_0x5f3edb['diff']['newRevisionId']:null;_0x7115d3['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x419563);}['refresh'](){const {isReady:_0x2e93f3,isEnabled:_0x341225,repository:_0x5041a7,diff:_0xbe75da}=this['editor']['plugins']['get'](l),_0x3b4cf9=_0xbe75da&&_0x5041a7['getLaterVisibleRevision'](_0xbe75da['newRevisionId']);this['isEnabled']=_0x2e93f3&&_0x341225&&Boolean(_0x3b4cf9);}}class rt extends _0x5788b1{['_step'];constructor(_0x3cdb6f,{direction:_0x464d84}){super(_0x3cdb6f);const _0x37db98=_0x3cdb6f['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x464d84?0x1:-0x1,this['listenTo'](_0x37db98,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x37db98,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x37db98,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x470f85=this['editor'],_0x261ada=_0x470f85['plugins']['get'](l),{isNavigationMode:_0x5e60cb,currentChangeNumber:_0x19120a}=_0x261ada;let _0xd52598;if(_0x261ada['activeChange']=_0x5e60cb?_0x261ada['diff']['changes']['get'](_0x19120a+this['_step']):_0x261ada['diff']['changes']['first'],_0x261ada['activeChange']['data']['isOnRoot'])_0xd52598=_0x470f85['editing']['view']['getDomRoot'](_0x261ada['activeChange']['rootName']);else{const _0x43b3ad=_0x470f85['model']['markers']['get']('revision:'+_0x261ada['activeChange']['id']);_0xd52598=_0x308ad9(_0x470f85['editing'],_0x43b3ad);}_0x799686({'target':_0xd52598,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5470d3,currentChangeNumber:_0x252f54,numberOfChanges:_0x7329bb,isReady:_0x182c9b,isEnabled:_0xcd8edd}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0xcd8edd&&_0x182c9b&&_0x7329bb)&&(!_0x5470d3||(0x1===this['_step']?_0x252f54<_0x7329bb-0x1:_0x252f54>0x0));}}class Ri extends _0x5afe72{constructor(_0x16a877){super(_0x16a877);const _0x1ccedb=this['bindTemplate'],_0x3f950e=new _0x20e177(_0x16a877),_0x2b675d=new _0x20e177(_0x16a877);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',(_0x1964b9,_0x4d64d2)=>_0x1964b9&&_0x4d64d2>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x419c7b,_0x40e898,_0x29be76,_0xef3b9f)=>{if(!_0x419c7b)return R(_0x16a877,'Loading...');if(!_0x29be76)return R(_0x16a877,'No\x20changes');const _0x5f0b15=R(_0x16a877,'NUMBER_OF_CHANGES',_0x29be76);return _0xef3b9f?R(_0x16a877,'X_OF_Y_CHANGES',[_0x40e898+0x1,_0x29be76]):_0x5f0b15;}),_0x3f950e['set']({'label':R(_0x16a877,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x434994}),_0x2b675d['set']({'label':R(_0x16a877,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1b458c}),_0x3f950e['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2b675d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x3f950e['on']('execute',()=>this['fire']('execute','backward')),_0x2b675d['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',_0x1ccedb['if']('_isStatusLabelVisible','ck-hidden',_0x8a02dc=>!_0x8a02dc)]},'children':[{'text':_0x1ccedb['to']('isNavigationMode',_0x5e0f78=>_0x5e0f78?R(_0x16a877,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x16a877,'Total')+':\x20')}]},{'text':_0x1ccedb['to']('_statusText')}]},new _0x56d6b1(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x3f950e,_0x2b675d]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x1305a6{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x34ee8f=this['editor']['editing']['view'];_0x34ee8f['change'](_0x1a1e20=>{for(const _0x1148ae of _0x34ee8f['document']['roots'])_0x1a1e20['addClass'](ge,_0x1148ae);});}['hide'](){const _0x3ded21=this['editor']['editing']['view'];_0x3ded21['change'](_0x28ad09=>{for(const _0x183147 of _0x3ded21['document']['roots'])_0x28ad09['removeClass'](ge,_0x183147);});}}class u extends _0x1305a6{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,ji];}['init'](){const _0x29e9be=this['editor'],_0x2e475a=_0x29e9be['plugins']['get'](l),_0x5ae89e=_0x29e9be['plugins']['get'](ji);_0x29e9be['ui']['componentFactory']['add']('exitToEditing',_0xd83fcf=>{const _0x319d54=new _0x20e177(_0xd83fcf);return _0x319d54['set']({'label':R(_0xd83fcf,'Back\x20to\x20editing'),'icon':_0x3c04b5,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x319d54,'execute',()=>{_0x29e9be['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x319d54;}),_0x29e9be['ui']['componentFactory']['add']('restoreRevision',_0x171bad=>{const _0x2a927e=new _0x20e177(_0x171bad);return _0x2a927e['set']({'label':R(_0x171bad,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2a927e['bind']('isEnabled')['to'](_0x29e9be['commands']['get']('restoreRevision')),this['listenTo'](_0x2a927e,'execute',()=>_0x29e9be['execute']('restoreRevision')),_0x2a927e;}),_0x29e9be['ui']['componentFactory']['add']('changesNavigation',_0x4e7d96=>{const _0x2f4144=new Ri(_0x4e7d96),_0xe11223=_0x29e9be['commands']['get']('showPreviousChange'),_0x5e52a4=_0x29e9be['commands']['get']('showNextChange');return _0x2f4144['bind']('isBackwardNavigationEnabled')['to'](_0xe11223,'isEnabled'),_0x2f4144['bind']('isForwardNavigationEnabled')['to'](_0x5e52a4,'isEnabled'),_0x2f4144['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2e475a),this['listenTo'](_0x2f4144,'execute',(_0x54519c,_0x4dc08b)=>{_0x29e9be['execute']('forward'===_0x4dc08b?'showNextChange':'showPreviousChange');}),_0x2f4144;}),_0x5ae89e['show'](),_0x2e475a['on']('change:isReady',(_0x59b1d2,_0x96ee9a,_0x3512b4)=>{_0x3512b4?_0x5ae89e['hide']():_0x5ae89e['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x31a567,_0x2fccbb){super(_0x31a567,_0x2fccbb);const _0x347427=this['bindTemplate'];this['set']({'label':R(_0x31a567,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x31a567,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x347427['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 _0x5885e1=this['fieldView']['element'];this['_tooltipString']=_0x5885e1['scrollWidth']>_0x5885e1['clientWidth']&&_0x5885e1['value']||'';}}class ni extends _0x5afe72{constructor(_0x48e1fa,_0x2c1e55,_0x125764){super(_0x48e1fa);const _0x4709d6=new _0x13a599();_0x4709d6['set']({'content':_0x5d06bd,'viewBox':'0\x200\x2011\x2010'});const _0x365aae=['ck','ck-revision-history-sidebar__revision-author'];_0x125764&&_0x365aae['push']('ck-revision-history-sidebar__revision-author_creator');const _0x160172=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x48e1fa,_0x125764?'Revision\x20creator':'Revision\x20author')},'children':[_0x4709d6,_0x2c1e55['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x365aae},'children':_0x160172});}}function ci(_0x370628,_0x44d6e8){const _0x3b7fed=_0x370628['bindTemplate'],_0x2949cb=_0x370628['locale'],_0x26a482=_0x5191d3(_0x2949cb);_0x26a482['panelPosition']='sw';const _0x55f807=function(_0x4ca342,_0x44f328){const _0x2c46f9=function(_0x2c9666,_0x3aeea8){const _0x59ca70=_0x2c9666['locale'],_0xd44bd7={'Compare\x20against\x20selected':R(_0x59ca70,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x59ca70,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x59ca70,'Restore\x20this\x20revision')};return _0x3aeea8['map'](_0x488ad0=>{const _0x1d7680=_0xd44bd7[_0x488ad0['name']];return _0x1d7680&&_0x1d7680!==_0x488ad0['name']&&(_0x488ad0['name']=_0x1d7680),_0x488ad0;});}(_0x4ca342,_0x44f328),_0x1672a4=new _0xd01162();for(const _0x3aae17 of _0x2c46f9){const _0x42e50b={'type':'button','model':new to({'label':_0x3aae17['name'],'class':_0x3aae17['class'],'withText':!0x0,'role':'menuitem','_action':_0x3aae17['action']})};_0x42e50b['model']['bind']('isEnabled')['to'](_0x4ca342,'isActionsDropdownOpen',_0x3032b4=>'function'!=typeof _0x3aae17['isEnabled']||(!_0x3032b4||_0x3aae17['isEnabled'](_0x4ca342))),_0x1672a4['add'](_0x42e50b);}return _0x1672a4;}(_0x370628,_0x44d6e8);return _0x370628['bind']('isActionsDropdownOpen')['to'](_0x26a482,'isOpen'),_0x26a482['buttonView']['set']({'label':R(_0x2949cb,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x47696e}),_0x26a482['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3b7fed['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3b7fed['to'](_0x5853b2=>_0x5853b2['stopPropagation']())}}),_0x26a482['on']('execute',_0x183af5=>{_0x370628['isReady']&&'function'==typeof _0x183af5['source']['_action']&&_0x183af5['source']['_action'](_0x370628);}),_0x2730e5(_0x26a482,_0x55f807,{'role':'menu'}),_0x26a482['listenTo'](_0x370628,'change:isActionsDropdownOpen',(_0x250b33,_0x5b30bd,_0x2fb7a0)=>{if(_0x2fb7a0)for(const _0xf5583 of _0x26a482['listView']['items']){const _0x214a0c=_0xf5583['children']['first'],_0x510720=_0x44d6e8['find'](_0x43f649=>_0x43f649['action']===_0x214a0c['_action'])['isVisible'];_0xf5583['isVisible']=void 0x0===_0x510720||_0x510720(_0x370628);}}),_0x26a482;}class _i extends/* #__PURE__ -- @preserve */
27
+ _0x5f2668(_0x5afe72){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x2cc007,_0x41df40,_0x10b2ad,_0x313a73){super(_0x2cc007);const _0x386475=this['bindTemplate'],_0x125683=function(_0x30170e,_0x13ad0e){const _0x4afc93=Array['from'](_0x13ad0e['authors'])['filter'](_0xa5e0c2=>_0xa5e0c2!=_0x13ad0e['creator']);return _0x13ad0e['creator']&&_0x4afc93['unshift'](_0x13ad0e['creator']),_0x4afc93['map'](_0x2b3cb1=>new ni(_0x30170e,_0x2b3cb1,_0x2b3cb1==_0x13ad0e['creator']));}(_0x2cc007,_0x41df40);this['id']=_0x41df40['id'],this['_revision']=_0x41df40,this['_requireRevisionName']=_0x313a73,this['bind']('name','createdAt')['to'](_0x41df40),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x330098=>{return _0x506636=_0x2cc007['uiLanguage'],(_0x3c96a6=_0x330098)['toLocaleDateString'](_0x506636,{'month':'long','day':'numeric'})+',\x20'+_0x3c96a6['toLocaleTimeString'](_0x506636,{'hour':'numeric','minute':'numeric'});var _0x506636,_0x3c96a6;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x2cc007,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x387f14=>_0x387f14||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x24c8ca,_0x4adcd7)=>_0x24c8ca&&_0x4adcd7),this['revisionActionsView']=_0x10b2ad&&_0x10b2ad['length']?ci(this,_0x10b2ad):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x386475['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x386475['if']('isEnabled','ck-disabled',_0x1d71bd=>!_0x1d71bd),_0x386475['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x386475['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x386475['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':_0x386475['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':_0x125683}]},this['revisionActionsView']],'on':{'click':_0x386475['to'](_0x215af1=>{_0x215af1['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x59894d=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x59894d,'change',()=>{this['_requireRevisionName']&&!_0x59894d['value']||this['fire']('setName',{'id':this['id'],'name':_0x59894d['value']}),_0x59894d['value']||(_0x59894d['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0x12229f,_0x3c6bce){const _0x5c71f5=_0x18db6e['fromJSDate'](_0x12229f)['setLocale'](_0x3c6bce),_0x5d38bc=_0x18db6e['local'](),_0x18c94c=_0x5d38bc['minus']({'days':0x1})['startOf']('day');let _0x1c3515,_0x1d6d0f;return _0x5c71f5['hasSame'](_0x5d38bc,'day')?(_0x1c3515=_0x5c71f5['startOf']('day')['toJSDate'](),_0x1d6d0f=_0x5c71f5['toRelativeCalendar']()):_0x5c71f5['hasSame'](_0x18c94c,'day')?(_0x1c3515=_0x18c94c['toJSDate'](),_0x1d6d0f=_0x5c71f5['toRelativeCalendar']()):_0x5c71f5['hasSame'](_0x5d38bc,'week')?(_0x1c3515=_0x5c71f5['startOf']('week')['toJSDate'](),_0x1d6d0f=_0x5c71f5['weekdayLong']||''):_0x5c71f5['hasSame'](_0x5d38bc,'year')?(_0x1c3515=_0x5c71f5['startOf']('month')['toJSDate'](),_0x1d6d0f=_0x5c71f5['monthLong']||''):(_0x1c3515=_0x5c71f5['startOf']('year')['toJSDate'](),_0x1d6d0f=String(_0x5c71f5['year'])),{'startDate':_0x1c3515,'localizedPeriodName':_0x1d6d0f};}class bi extends _0x5afe72{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3d4542,_0x3b4cf2,_0x3a25ad,_0x4e8e52){super(_0x3d4542);const _0x5c7111=li(_0x3b4cf2,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x3b4cf2,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x3a25ad,this['_requireRevisionName']=_0x4e8e52,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':_0x5c7111}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x3363b0){const _0x3a511f=new _i(this['locale'],_0x3363b0,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3a511f);}['removeRevision'](_0x2b96d3){const _0x443b4a=this['revisionViews']['find'](_0x3c45a4=>_0x3c45a4['id']===_0x2b96d3['id']);this['revisionViews']['remove'](_0x443b4a);}}class fi extends _0x5afe72{constructor(_0x3df28f){super(_0x3df28f);const _0x49bb67=new _0x13a599();_0x49bb67['content']=_0x317799,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x49bb67,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x3df28f,'Revision\x20history')]}]});}}class di extends _0x5afe72{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2161d3,_0x141598,_0x199ec5,_0x457dd4){super(_0x2161d3);const _0x118aac=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x141598,this['_revisionActions']=_0x199ec5,this['_requireRevisionName']=_0x457dd4,this['on']('select',(_0x23ecb1,_0x511f92)=>{this['fire']('revisionSelected',_0x511f92);}),this['on']('setName',(_0x5dc6b3,_0x4f0c83)=>{this['fire']('revisionSetName',_0x4f0c83);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x2161d3),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x118aac['if']('isEnabled','ck-disabled',_0x15f34b=>!_0x15f34b)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x12f242 of this['_revisions'])this['_addRevision'](_0x12f242);this['_revisions']['on']('add',(_0x365c09,_0x3f1643)=>{this['_addRevision'](_0x3f1643);}),this['_revisions']['on']('remove',(_0x13631b,_0x32324f)=>{this['_removeRevision'](_0x32324f);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x28ef35=>_0x28ef35['revisionViews']['map'](_0xeae68=>_0xeae68))['flat']();}['selectRevision'](_0x44ab0f){for(const _0x5a81a0 of this['revisionViews'])_0x44ab0f&&_0x44ab0f['id']===_0x5a81a0['id']?_0x5a81a0['select']():_0x5a81a0['deselect']();}['highlightRevisions'](_0x62bea7){for(const _0x391b0a of this['revisionViews'])_0x62bea7['some'](({id:_0x4773e8})=>_0x4773e8===_0x391b0a['id'])?_0x391b0a['highlight']():_0x391b0a['unhighlight']();}['_addRevision'](_0x33c29b){const _0x3486c2=li(_0x33c29b['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x20b803=this['timePeriodViews']['get'](0x0);_0x20b803&&_0x20b803['startDate']['getTime']()===_0x3486c2['getTime']()||(_0x20b803=new bi(this['locale'],_0x3486c2,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x20b803)),_0x20b803['addRevision'](_0x33c29b);}['_removeRevision'](_0x5b5418){const _0x37f632=li(_0x5b5418['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x37f632)['removeRevision'](_0x5b5418);}['_getTimePeriodViewByStartDate'](_0x26dcac){return this['timePeriodViews']['find'](_0x3e088f=>_0x3e088f['startDate']['getTime']()===_0x26dcac['getTime']());}}class f extends _0x1305a6{['_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(_0x256c15){super(_0x256c15),this['_revisionViewer']=_0x256c15['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1798d4=this['_revisionsRepository']['_revisions'],_0x39827e=this['_createRevisionActions'](),_0x1eae8e=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ai(this['editor']['locale'],_0x1798d4,_0x39827e,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',(_0xeaa02e,_0x233ca9)=>{_0x233ca9['revisionViews']['on']('add',(_0x4e841a,_0x589966)=>{_0x589966['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)),_0x1eae8e['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x113553=this['_revisionsRepository']['getRevision'](0x0);if(_0x113553){const _0xacd1b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x113553['id']);this['_revisionViewer']['compare'](_0x113553,_0xacd1b);}}['_handleRevisionSelected'](_0x40d7ff,_0x207afe){const _0x26b964=this['_revisionsRepository']['getRevision'](_0x207afe['id']),_0x3ebcdf=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x26b964['id']);this['_revisionViewer']['compare'](_0x26b964,_0x3ebcdf);}['_handleRevisionSetName'](_0x756f2c,_0x13b5e6){this['_revisionsRepository']['getRevision'](_0x13b5e6['id'])['setName'](_0x13b5e6['name']);}['_handleDiffChange'](_0x4300c7,_0x2886a2,_0x30c5f1){const _0x3f735f=this['_revisionsRepository']['getRevisionsInDiff'](_0x30c5f1);_0x3f735f['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3f735f),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3f735f[0x0]));}['_createRevisionActions'](){const _0xfbcb60=this['editor'],_0x4e0a3b=f['availableRevisionActions'],_0x209667=_0xfbcb60['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x209667['length'])return _0x209667['map'](_0x409f6c=>{const _0x19b284='string'==typeof _0x409f6c?Object['assign']({},_0x4e0a3b[_0x409f6c]):_0x409f6c;return _0x19b284['action']=_0x19b284['action']['bind'](this,_0xfbcb60),_0x19b284['isVisible']&&(_0x19b284['isVisible']=_0x19b284['isVisible']['bind'](this,_0xfbcb60)),_0x19b284;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x779c06},_0x24151b)=>{const _0x39f231=_0x779c06['get'](l),_0x3111ac=_0x39f231['repository'];let _0x5a40c9=_0x39f231['diff']['newRevisionId'],_0x3e6c09=_0x24151b['id'];_0x3111ac['getIndex'](_0x5a40c9)>_0x3111ac['getIndex'](_0x3e6c09)&&([_0x5a40c9,_0x3e6c09]=[_0x3e6c09,_0x5a40c9]),_0x39f231['compare'](_0x5a40c9,_0x3e6c09);},'isVisible':({plugins:_0x18ad82},_0x475157)=>{const _0x52978f=_0x18ad82['get'](l);return!(_0x52978f['repository']['getRevisionsInDiff'](_0x52978f['diff'])['length']>0x2)&&!_0x475157['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x38f154,{id:_0xba4923})=>{_0x38f154['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xba4923);},'isVisible':({plugins:_0x2da6e1},_0x27c816)=>!!_0x2da6e1['get'](l)['repository']['getLaterVisibleRevision'](_0x27c816['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xda5e2a},{id:_0x160fd2,revisionNameView:_0x7f42bb})=>{const _0x4ae193=_0xda5e2a['get'](l),_0x4742a3=_0x4ae193['repository']['getEarlierVisibleRevision'](_0x160fd2);_0x4ae193['compare'](_0x160fd2,_0x4742a3),_0x7f42bb['focus'](),_0x7f42bb['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x2eda27,_0x58c5eb){super(_0x2eda27),this['_view']=_0x58c5eb,this['_toolbarConfig']=st(_0x2eda27['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x29f229){const _0x148992=this['editor'],_0x5a6e96=this['view'],_0x4999fd=_0x148992['editing']['view'],_0x420821=_0x5a6e96['editable'],_0x4b9e4b=_0x4999fd['document']['getRoot']();_0x420821['name']=_0x4b9e4b['rootName'],_0x5a6e96['render']();const _0x1c3ba6=_0x420821['element'];this['setEditableElement'](_0x420821['name'],_0x1c3ba6),_0x5a6e96['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4999fd['attachDomRoot'](_0x1c3ba6),this['_elementReplacer']['replace'](_0x29f229,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x29942b=this['view'],_0xe16404=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0xe16404['detachDomRoot'](_0x29942b['editable']['name']),_0x29942b['destroy']();}['_initToolbar'](){const _0x488924=this['view'];_0x488924['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x488924['stickyPanel']['limiterElement']=_0x488924['element'],_0x488924['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x612842})=>_0x612842),_0x488924['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x488924['toolbar']);}}class ii extends _0x4fb2a1{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x27a902,_0x450eb3,_0x1b1101={}){super(_0x27a902),this['stickyPanel']=new _0x2fa7fc(_0x27a902),this['toolbar']=new _0x5abd83(_0x27a902,{'shouldGroupWhenFull':_0x1b1101['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x27a902,_0x450eb3);}['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
- _0x14c85d(_0x502371){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x59b103,_0x50e5fe){super(_0x50e5fe),this['sourceElement']=_0x59b103,this['model']['document']['createRoot']();const _0x5dfacd=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x5dfacd);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x591be6,_0x55f980){const _0x52ef23=new this(_0x591be6,_0x55f980);return await _0x52ef23['initPlugins'](),await _0x52ef23['ui']['init'](_0x591be6),await _0x52ef23['data']['init'](_0x52ef23['config']['get']('initialData')||''),_0x52ef23['fire']('ready'),_0x52ef23;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class at extends _0xb2d8c8{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x543c10){function _0x340755(_0x5cac25){return _0x5cac25['map'](_0x8ef5d2=>String['fromCharCode'](_0x8ef5d2))['join']('');}super(_0x543c10),this['result']='end',_0x543c10[_0x340755([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x340755([0x76,0x69,0x65,0x77])][_0x340755([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x340755([0x61,0x75,0x74,0x6f]),_0x543c10[_0x340755([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x340755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x340755([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x340755([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x340755([0x6f,0x6b])});}}class ht extends _0xb2d8c8{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x3d363c){if(super(_0x3d363c),!this['editor']['config']['get']('revisionHistory'))throw new _0x557c8b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xb088f5=>this['_showRevisionViewer']({..._0xb088f5,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x522ba2=>this['_closeRevisionViewer'](_0x522ba2)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x53863c=>this['_restoreRevision'](_0x53863c)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x5282c3){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x5282c3;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x29e37f){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x29e37f);}['getRevision'](_0x292b33){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x292b33);}['getRevisions'](_0x4dc78d){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4dc78d||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x34fe95=this['editor'],_0x1e1602=_0x5ea847(_0x34fe95,d),_0x6f4c49=_0x34fe95['plugins']['get']('RevisionTracker'),_0xd9ed8e=_0x34fe95['plugins']['get']('Users')['users'];return _0x1e1602['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1e1602['lazyRoots'],(_0x1e1602['plugins']['push'](at,l,u,class extends _0xb2d8c8{static get['requires'](){return[l,'Users'];}['init'](){const _0x299b7e=this['editor']['plugins']['get']('Users');for(const _0x36a408 of _0xd9ed8e)_0x36a408['isAnonymous']||_0x299b7e['getUser'](_0x36a408['id'])||_0x299b7e['addUser'](_0x36a408);const _0x5cb625=_0x6f4c49['repository']['getRevisions']();let _0x130793=null;const _0xfc7522=this['editor']['plugins']['get']('RevisionViewer');_0xfc7522['adapter']=_0x6f4c49['adapter'],_0xfc7522['bind']('isEnabled')['to'](_0x6f4c49),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x34fe95,'isReadOnly',_0x28588d=>!_0x28588d);for(const _0x24ff9b of _0x5cb625){const _0x1d1d88=null===_0x24ff9b['creator'];if(_0x1d1d88&&_0x24ff9b['toVersion']===_0x24ff9b['fromVersion'])continue;const _0x76180a=_0x24ff9b['toJSON']();_0xfc7522['addRevisionData'](_0x76180a,(_0x1f6f49,_0x350ebd,_0x526660)=>{if(_0x1d1d88){if(_0x130793)_0x130793['_update'](_0x1f6f49,_0x350ebd);else{if(!_0x350ebd){const _0x3c25d3=_0x526660['toJSON']();_0x3c25d3['id']=_0x189557(),_0x6f4c49['saveRevision'](_0x3c25d3,_0x526660['toVersion'])['then'](_0x104fe9=>{_0x130793=_0x104fe9;});}}}else _0x24ff9b['_update'](_0x1f6f49,_0x350ebd);});}}},f),_0x1e1602);}['_enhanceShowRevisionViewerCallback'](){const _0x11f0de=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x322e88=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x476045=this['editor']['plugins']['get']('Autosave');await _0x476045['save']();}else await _0x322e88['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1cfae9=this['editor']['plugins']['get']('Dialog');_0x1cfae9['isOpen']&&_0x1cfae9['hide']();}const _0x860e44=this['_getRevisionViewerEditorConfig']();return _0x11f0de(_0x860e44)['then'](_0x11698e=>{return(this['_viewerEditor']=_0x11698e,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'),_0x11698e);})['catch'](_0x264b6=>(console['error'](_0x264b6),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1079af=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'](),_0x1079af(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x5f580a=this['editor']['plugins']['get']('Annotations');_0x5f580a['refreshVisibility'](),_0x5f580a['refreshPositioning']();}})));}['_showRevisionViewer'](_0x9904c1){const _0xc27b32=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xe53d01=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1c25c5=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x1c25c5,_0x9904c1)['then'](_0x3a2dd1=>(_0xe53d01['style']['display']='block',_0xc27b32['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3a2dd1));}['_closeRevisionViewer'](_0x119d8c){const _0x16f018=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x16f018['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x119d8c['destroy']();}async['_restoreRevision'](_0x1d550f){const _0x8bb375=this['editor'],_0x49e212=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x44451c=_0x8bb375['plugins']['get']('RevisionTracker'),_0x378cfb=_0x8bb375['plugins']['get']('RevisionHistoryUtils'),_0x243091=_0x49e212['repository']['getRevision'](_0x1d550f);let _0x599402,_0x922610,_0x3a9b33;try{await _0x378cfb['loadRevisionData'](_0x243091,this['adapter']),_0x599402=_0x378cfb['getRevisionDocumentData'](_0x243091),_0x922610=_0x378cfb['getRevisionRootsAttributes'](_0x243091);}catch(_0x239893){return void console['error'](_0x239893);}_0x8bb375['model']['change'](_0x4581b8=>{for(const _0x4bf7aa of Array['from'](_0x8bb375['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4581b8['removeMarker'](_0x4bf7aa);}),_0x49e212['isReady']=!0x1,_0x8bb375['model']['enqueueChange'](_0x229cb1=>{_0x229cb1['setSelection'](null),_0x229cb1['removeSelectionAttribute'](_0x8bb375['model']['document']['selection']['getAttributeKeys']());const _0xae747f=Object['keys'](_0x599402);for(const _0x42bcb4 of _0x8bb375['model']['document']['roots'])'$graveyard'!=_0x42bcb4['rootName']&&_0x42bcb4['isAttached']()&&!_0xae747f['includes'](_0x42bcb4['rootName'])&&_0x229cb1['detachRoot'](_0x42bcb4);for(const _0x468e34 of _0xae747f){let _0x535540=_0x8bb375['model']['document']['getRoot'](_0x468e34);_0x535540&&_0x535540['isAttached']()||(_0x535540=_0x229cb1['addRoot'](_0x468e34));const _0x52baba=_0x922610[_0x468e34],_0x48078b=Object['keys'](_0x52baba),_0x3f8b82=_0x599402[_0x468e34];for(const _0xc8df31 of _0x535540['getAttributeKeys']())_0x48078b['includes'](_0xc8df31)||_0x229cb1['removeAttribute'](_0xc8df31,_0x535540);for(const _0x3e41e6 of _0x48078b)_0x229cb1['setAttribute'](_0x3e41e6,_0x922610[_0x468e34][_0x3e41e6],_0x535540);_0x229cb1['remove'](_0x229cb1['createRangeIn'](_0x535540)),_0x229cb1['insert'](_0x8bb375['data']['parse'](_0x3f8b82,_0x535540),_0x535540,0x0);}});const _0x1d26d8=R(_0x8bb375['locale'],'Restored');if(_0x243091['name'])_0x3a9b33=-0x1==_0x243091['name']['indexOf'](_0x1d26d8)?_0x1d26d8+':\x20'+_0x243091['name']:_0x243091['name'];else _0x3a9b33=_0x1d26d8+':\x20'+(_0x243091['createdAt']['toLocaleDateString'](_0x8bb375['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x243091['createdAt']['toLocaleTimeString'](_0x8bb375['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x44451c['saveRevision']({'name':_0x3a9b33}),_0x49e212['isReady']=!0x0,_0x8bb375['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(_0x5387a5){super(_0x5387a5),this['_revisionViewer']=_0x5387a5['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x4b790f=this['_revisionsRepository']['_revisions'],_0x47a16b=this['_createRevisionActions'](),_0x17eca6=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x4b790f,_0x47a16b,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',(_0x72ffb0,_0x45e594)=>{_0x45e594['revisionViews']['on']('add',(_0x1e055,_0x6ec01f)=>{_0x6ec01f['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)),_0x17eca6['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x22f6ec=this['_revisionsRepository']['getRevision'](0x0);if(_0x22f6ec){const _0x7507dc=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x22f6ec['id']);this['_revisionViewer']['compare'](_0x22f6ec,_0x7507dc);}}['_handleRevisionSelected'](_0x17d5ea,_0x4c8857){const _0xc068a4=this['_revisionsRepository']['getRevision'](_0x4c8857['id']),_0x10cb28=this['_revisionsRepository']['getEarlierVisibleRevision'](_0xc068a4['id']);this['_revisionViewer']['compare'](_0xc068a4,_0x10cb28);}['_handleRevisionSetName'](_0x520b57,_0x2ada39){this['_revisionsRepository']['getRevision'](_0x2ada39['id'])['setName'](_0x2ada39['name']);}['_handleDiffChange'](_0xf475cf,_0x627b6,_0xfffd98){const _0x419041=this['_revisionsRepository']['getRevisionsInDiff'](_0xfffd98);_0x419041['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x419041),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x419041[0x0]));}['_createRevisionActions'](){const _0x22c73a=this['editor'],_0x194b38=f['availableRevisionActions'],_0x19d08a=_0x22c73a['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x19d08a['length'])return _0x19d08a['map'](_0xc17b97=>{const _0x570b70='string'==typeof _0xc17b97?Object['assign']({},_0x194b38[_0xc17b97]):_0xc17b97;return _0x570b70['action']=_0x570b70['action']['bind'](this,_0x22c73a),_0x570b70['isVisible']&&(_0x570b70['isVisible']=_0x570b70['isVisible']['bind'](this,_0x22c73a)),_0x570b70;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x14bcc9},_0xacc77a)=>{const _0x161018=_0x14bcc9['get'](l),_0x320598=_0x161018['repository'];let _0x2caef0=_0x161018['diff']['newRevisionId'],_0x1f408b=_0xacc77a['id'];_0x320598['getIndex'](_0x2caef0)>_0x320598['getIndex'](_0x1f408b)&&([_0x2caef0,_0x1f408b]=[_0x1f408b,_0x2caef0]),_0x161018['compare'](_0x2caef0,_0x1f408b);},'isVisible':({plugins:_0x1876ed},_0x416cab)=>{const _0x5a5734=_0x1876ed['get'](l);return!(_0x5a5734['repository']['getRevisionsInDiff'](_0x5a5734['diff'])['length']>0x2)&&!_0x416cab['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x30c515,{id:_0x58a757})=>{_0x30c515['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x58a757);},'isVisible':({plugins:_0x45c002},_0x34f040)=>!!_0x45c002['get'](l)['repository']['getLaterVisibleRevision'](_0x34f040['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3eb04a},{id:_0x59d34b,revisionNameView:_0x14d58c})=>{const _0x15a8e5=_0x3eb04a['get'](l),_0x1b9dd7=_0x15a8e5['repository']['getEarlierVisibleRevision'](_0x59d34b);_0x15a8e5['compare'](_0x59d34b,_0x1b9dd7),_0x14d58c['focus'](),_0x14d58c['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x31b7ab,_0x4c9d41){super(_0x31b7ab),this['_view']=_0x4c9d41,this['_toolbarConfig']=st(_0x31b7ab['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x5287f9){const _0x233238=this['editor'],_0x45a4af=this['view'],_0x1fab8e=_0x233238['editing']['view'],_0x25e0f5=_0x45a4af['editable'],_0x434882=_0x1fab8e['document']['getRoot']();_0x25e0f5['name']=_0x434882['rootName'],_0x45a4af['render']();const _0x2dfdc1=_0x25e0f5['element'];this['setEditableElement'](_0x25e0f5['name'],_0x2dfdc1),_0x45a4af['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1fab8e['attachDomRoot'](_0x2dfdc1),this['_elementReplacer']['replace'](_0x5287f9,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1888d7=this['view'],_0x4235fb=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4235fb['detachDomRoot'](_0x1888d7['editable']['name']),_0x1888d7['destroy']();}['_initToolbar'](){const _0x15633c=this['view'];_0x15633c['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x15633c['stickyPanel']['limiterElement']=_0x15633c['element'],_0x15633c['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1da315})=>_0x1da315),_0x15633c['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x15633c['toolbar']);}}class ii extends _0x331048{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x5bc747,_0x26b01d,_0x21bd60={}){super(_0x5bc747),this['stickyPanel']=new _0x4bf268(_0x5bc747),this['toolbar']=new _0x32ff63(_0x5bc747,{'shouldGroupWhenFull':_0x21bd60['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x5bc747,_0x26b01d);}['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
+ _0x1cd33c(_0x674d86){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4d3802,_0x2861d3){super(_0x2861d3),this['sourceElement']=_0x4d3802,this['model']['document']['createRoot']();const _0x422aac=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x422aac);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x24a39a,_0x2e10fd){const _0xd8202b=new this(_0x24a39a,_0x2e10fd);return await _0xd8202b['initPlugins'](),await _0xd8202b['ui']['init'](_0x24a39a),await _0xd8202b['data']['init'](_0xd8202b['config']['get']('initialData')||''),_0xd8202b['fire']('ready'),_0xd8202b;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class ht extends _0x1305a6{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x369ab0){function _0x35be22(_0x1e57c0){return _0x1e57c0['map'](_0x1d991d=>String['fromCharCode'](_0x1d991d))['join']('');}super(_0x369ab0),this['result']='end',_0x369ab0[_0x35be22([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x35be22([0x76,0x69,0x65,0x77])][_0x35be22([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x35be22([0x61,0x75,0x74,0x6f]),_0x369ab0[_0x35be22([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x35be22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x35be22([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x35be22([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x35be22([0x6f,0x6b])});}}class ct extends _0x1305a6{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x3d717f){if(super(_0x3d717f),!this['editor']['config']['get']('revisionHistory'))throw new _0x51ae0d('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x584691=>this['_showRevisionViewer']({..._0x584691,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x36d7bf=>this['_closeRevisionViewer'](_0x36d7bf)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x2ea12d=>this['_restoreRevision'](_0x2ea12d)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x5bf4f5){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x5bf4f5;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4a304d){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4a304d);}['getRevision'](_0x2489b8){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x2489b8);}['getRevisions'](_0x28f11b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x28f11b||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4bddd7=this['editor'],_0x474721=_0x5dbe93(_0x4bddd7,d),_0x5b6b10=_0x4bddd7['plugins']['get']('RevisionTracker'),_0x5774f9=_0x4bddd7['plugins']['get']('Users')['users'];return _0x474721['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x474721['lazyRoots'],(_0x474721['plugins']['push'](ht,l,u,class extends _0x1305a6{static get['requires'](){return[l,'Users'];}['init'](){const _0x3b061d=this['editor']['plugins']['get']('Users');for(const _0x45b43d of _0x5774f9)_0x45b43d['isAnonymous']||_0x3b061d['getUser'](_0x45b43d['id'])||_0x3b061d['addUser'](_0x45b43d);const _0x4c8a73=_0x5b6b10['repository']['getRevisions']();let _0x2f0417=null;const _0x5496e1=this['editor']['plugins']['get']('RevisionViewer');_0x5496e1['adapter']=_0x5b6b10['adapter'],_0x5496e1['bind']('isEnabled')['to'](_0x5b6b10),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4bddd7,'isReadOnly',_0x5234ef=>!_0x5234ef);for(const _0x1faf9d of _0x4c8a73){const _0x1480c3=null===_0x1faf9d['creator'];if(_0x1480c3&&_0x1faf9d['toVersion']===_0x1faf9d['fromVersion'])continue;const _0x48bfab=_0x1faf9d['toJSON']();_0x5496e1['addRevisionData'](_0x48bfab,(_0x1164b9,_0x283a7e,_0x3783bd)=>{if(_0x1480c3){if(_0x2f0417)_0x2f0417['_update'](_0x1164b9,_0x283a7e);else{if(!_0x283a7e){const _0x37fd5e=_0x3783bd['toJSON']();_0x37fd5e['id']=_0x2e23f1(),_0x5b6b10['saveRevision'](_0x37fd5e,_0x3783bd['toVersion'])['then'](_0x436b01=>{_0x2f0417=_0x436b01;});}}}else _0x1faf9d['_update'](_0x1164b9,_0x283a7e);});}}},f),_0x474721);}['_enhanceShowRevisionViewerCallback'](){const _0x401ea2=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x265556=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x1fce27=this['editor']['plugins']['get']('Autosave');await _0x1fce27['save']();}else await _0x265556['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x111326=this['editor']['plugins']['get']('Dialog');_0x111326['isOpen']&&_0x111326['hide']();}const _0x23f6b3=this['_getRevisionViewerEditorConfig']();return _0x401ea2(_0x23f6b3)['then'](_0xcf2c75=>{return(this['_viewerEditor']=_0xcf2c75,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'),_0xcf2c75);})['catch'](_0x41076f=>(console['error'](_0x41076f),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xb16d93=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'](),_0xb16d93(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x37e3fe=this['editor']['plugins']['get']('Annotations');_0x37e3fe['refreshVisibility'](),_0x37e3fe['refreshPositioning']();}})));}['_showRevisionViewer'](_0x32b0c4){const _0xc248aa=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x12c0d0=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4541e0=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x4541e0,_0x32b0c4)['then'](_0x492cc4=>(_0x12c0d0['style']['display']='block',_0xc248aa['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x492cc4));}['_closeRevisionViewer'](_0x5bd0c2){const _0x2cf0cc=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2cf0cc['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x5bd0c2['destroy']();}async['_restoreRevision'](_0x30b9ce){const _0x5be029=this['editor'],_0x30b4ce=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3cb2f7=_0x5be029['plugins']['get']('RevisionTracker'),_0x404fb9=_0x5be029['plugins']['get']('RevisionHistoryUtils'),_0x4fac3b=_0x30b4ce['repository']['getRevision'](_0x30b9ce);let _0x1155a9,_0x2daa6f,_0x1a4d50;try{await _0x404fb9['loadRevisionData'](_0x4fac3b,this['adapter']),_0x1155a9=_0x404fb9['getRevisionDocumentData'](_0x4fac3b),_0x2daa6f=_0x404fb9['getRevisionRootsAttributes'](_0x4fac3b);}catch(_0x1cb2eb){return void console['error'](_0x1cb2eb);}_0x5be029['model']['change'](_0x1ef335=>{for(const _0x552424 of Array['from'](_0x5be029['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1ef335['removeMarker'](_0x552424);}),_0x30b4ce['isReady']=!0x1,_0x5be029['model']['enqueueChange'](_0x36220b=>{_0x36220b['setSelection'](null),_0x36220b['removeSelectionAttribute'](_0x5be029['model']['document']['selection']['getAttributeKeys']());const _0x31017b=Object['keys'](_0x1155a9);for(const _0x2110c8 of _0x5be029['model']['document']['roots'])'$graveyard'!=_0x2110c8['rootName']&&_0x2110c8['isAttached']()&&!_0x31017b['includes'](_0x2110c8['rootName'])&&_0x36220b['detachRoot'](_0x2110c8);for(const _0x5bd6fe of _0x31017b){let _0x3b140b=_0x5be029['model']['document']['getRoot'](_0x5bd6fe);_0x3b140b&&_0x3b140b['isAttached']()||(_0x3b140b=_0x36220b['addRoot'](_0x5bd6fe));const _0x51a7ac=_0x2daa6f[_0x5bd6fe],_0x13472=Object['keys'](_0x51a7ac),_0x2d4ec1=_0x1155a9[_0x5bd6fe];for(const _0x2c5141 of _0x3b140b['getAttributeKeys']())_0x13472['includes'](_0x2c5141)||_0x36220b['removeAttribute'](_0x2c5141,_0x3b140b);for(const _0x5a05b4 of _0x13472)_0x36220b['setAttribute'](_0x5a05b4,_0x2daa6f[_0x5bd6fe][_0x5a05b4],_0x3b140b);_0x36220b['remove'](_0x36220b['createRangeIn'](_0x3b140b)),_0x36220b['insert'](_0x5be029['data']['parse'](_0x2d4ec1,_0x3b140b),_0x3b140b,0x0);}});const _0x42ba3f=R(_0x5be029['locale'],'Restored');if(_0x4fac3b['name'])_0x1a4d50=-0x1==_0x4fac3b['name']['indexOf'](_0x42ba3f)?_0x42ba3f+':\x20'+_0x4fac3b['name']:_0x4fac3b['name'];else _0x1a4d50=_0x42ba3f+':\x20'+(_0x4fac3b['createdAt']['toLocaleDateString'](_0x5be029['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4fac3b['createdAt']['toLocaleTimeString'](_0x5be029['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3cb2f7['saveRevision']({'name':_0x1a4d50}),_0x30b4ce['isReady']=!0x0,_0x5be029['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};