@ckeditor/ckeditor5-revision-history 48.3.0 → 48.3.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/index.js +7 -7
  2. package/dist/translations/af.js +1 -1
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/ast.js +1 -1
  7. package/dist/translations/ast.umd.js +1 -1
  8. package/dist/translations/az.js +1 -1
  9. package/dist/translations/az.umd.js +1 -1
  10. package/dist/translations/be.js +1 -1
  11. package/dist/translations/be.umd.js +1 -1
  12. package/dist/translations/bg.js +1 -1
  13. package/dist/translations/bg.umd.js +1 -1
  14. package/dist/translations/bn.js +1 -1
  15. package/dist/translations/bn.umd.js +1 -1
  16. package/dist/translations/bs.js +1 -1
  17. package/dist/translations/bs.umd.js +1 -1
  18. package/dist/translations/ca.js +1 -1
  19. package/dist/translations/ca.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/da.js +1 -1
  23. package/dist/translations/da.umd.js +1 -1
  24. package/dist/translations/de-ch.js +1 -1
  25. package/dist/translations/de-ch.umd.js +1 -1
  26. package/dist/translations/de.js +1 -1
  27. package/dist/translations/de.umd.js +1 -1
  28. package/dist/translations/el.js +1 -1
  29. package/dist/translations/el.umd.js +1 -1
  30. package/dist/translations/en-au.js +1 -1
  31. package/dist/translations/en-au.umd.js +1 -1
  32. package/dist/translations/en-gb.js +1 -1
  33. package/dist/translations/en-gb.umd.js +1 -1
  34. package/dist/translations/en.js +1 -1
  35. package/dist/translations/en.umd.js +1 -1
  36. package/dist/translations/eo.js +1 -1
  37. package/dist/translations/eo.umd.js +1 -1
  38. package/dist/translations/es-co.js +1 -1
  39. package/dist/translations/es-co.umd.js +1 -1
  40. package/dist/translations/es.js +1 -1
  41. package/dist/translations/es.umd.js +1 -1
  42. package/dist/translations/et.js +1 -1
  43. package/dist/translations/et.umd.js +1 -1
  44. package/dist/translations/eu.js +1 -1
  45. package/dist/translations/eu.umd.js +1 -1
  46. package/dist/translations/fa.js +1 -1
  47. package/dist/translations/fa.umd.js +1 -1
  48. package/dist/translations/fi.js +1 -1
  49. package/dist/translations/fi.umd.js +1 -1
  50. package/dist/translations/fr.js +1 -1
  51. package/dist/translations/fr.umd.js +1 -1
  52. package/dist/translations/gl.js +1 -1
  53. package/dist/translations/gl.umd.js +1 -1
  54. package/dist/translations/gu.js +1 -1
  55. package/dist/translations/gu.umd.js +1 -1
  56. package/dist/translations/he.js +1 -1
  57. package/dist/translations/he.umd.js +1 -1
  58. package/dist/translations/hi.js +1 -1
  59. package/dist/translations/hi.umd.js +1 -1
  60. package/dist/translations/hr.js +1 -1
  61. package/dist/translations/hr.umd.js +1 -1
  62. package/dist/translations/hu.js +1 -1
  63. package/dist/translations/hu.umd.js +1 -1
  64. package/dist/translations/hy.js +1 -1
  65. package/dist/translations/hy.umd.js +1 -1
  66. package/dist/translations/id.js +1 -1
  67. package/dist/translations/id.umd.js +1 -1
  68. package/dist/translations/it.js +1 -1
  69. package/dist/translations/it.umd.js +1 -1
  70. package/dist/translations/ja.js +1 -1
  71. package/dist/translations/ja.umd.js +1 -1
  72. package/dist/translations/jv.js +1 -1
  73. package/dist/translations/jv.umd.js +1 -1
  74. package/dist/translations/kk.js +1 -1
  75. package/dist/translations/kk.umd.js +1 -1
  76. package/dist/translations/km.js +1 -1
  77. package/dist/translations/km.umd.js +1 -1
  78. package/dist/translations/kn.js +1 -1
  79. package/dist/translations/kn.umd.js +1 -1
  80. package/dist/translations/ko.js +1 -1
  81. package/dist/translations/ko.umd.js +1 -1
  82. package/dist/translations/ku.js +1 -1
  83. package/dist/translations/ku.umd.js +1 -1
  84. package/dist/translations/lt.js +1 -1
  85. package/dist/translations/lt.umd.js +1 -1
  86. package/dist/translations/lv.js +1 -1
  87. package/dist/translations/lv.umd.js +1 -1
  88. package/dist/translations/ms.js +1 -1
  89. package/dist/translations/ms.umd.js +1 -1
  90. package/dist/translations/nb.js +1 -1
  91. package/dist/translations/nb.umd.js +1 -1
  92. package/dist/translations/ne.js +1 -1
  93. package/dist/translations/ne.umd.js +1 -1
  94. package/dist/translations/nl.js +1 -1
  95. package/dist/translations/nl.umd.js +1 -1
  96. package/dist/translations/no.js +1 -1
  97. package/dist/translations/no.umd.js +1 -1
  98. package/dist/translations/oc.js +1 -1
  99. package/dist/translations/oc.umd.js +1 -1
  100. package/dist/translations/pl.js +1 -1
  101. package/dist/translations/pl.umd.js +1 -1
  102. package/dist/translations/pt-br.js +1 -1
  103. package/dist/translations/pt-br.umd.js +1 -1
  104. package/dist/translations/pt.js +1 -1
  105. package/dist/translations/pt.umd.js +1 -1
  106. package/dist/translations/ro.js +1 -1
  107. package/dist/translations/ro.umd.js +1 -1
  108. package/dist/translations/ru.js +1 -1
  109. package/dist/translations/ru.umd.js +1 -1
  110. package/dist/translations/si.js +1 -1
  111. package/dist/translations/si.umd.js +1 -1
  112. package/dist/translations/sk.js +1 -1
  113. package/dist/translations/sk.umd.js +1 -1
  114. package/dist/translations/sl.js +1 -1
  115. package/dist/translations/sl.umd.js +1 -1
  116. package/dist/translations/sq.js +1 -1
  117. package/dist/translations/sq.umd.js +1 -1
  118. package/dist/translations/sr-latn.js +1 -1
  119. package/dist/translations/sr-latn.umd.js +1 -1
  120. package/dist/translations/sr.js +1 -1
  121. package/dist/translations/sr.umd.js +1 -1
  122. package/dist/translations/sv.js +1 -1
  123. package/dist/translations/sv.umd.js +1 -1
  124. package/dist/translations/th.js +1 -1
  125. package/dist/translations/th.umd.js +1 -1
  126. package/dist/translations/ti.js +1 -1
  127. package/dist/translations/ti.umd.js +1 -1
  128. package/dist/translations/tk.js +1 -1
  129. package/dist/translations/tk.umd.js +1 -1
  130. package/dist/translations/tr.js +1 -1
  131. package/dist/translations/tr.umd.js +1 -1
  132. package/dist/translations/tt.js +1 -1
  133. package/dist/translations/tt.umd.js +1 -1
  134. package/dist/translations/ug.js +1 -1
  135. package/dist/translations/ug.umd.js +1 -1
  136. package/dist/translations/uk.js +1 -1
  137. package/dist/translations/uk.umd.js +1 -1
  138. package/dist/translations/ur.js +1 -1
  139. package/dist/translations/ur.umd.js +1 -1
  140. package/dist/translations/uz.js +1 -1
  141. package/dist/translations/uz.umd.js +1 -1
  142. package/dist/translations/vi.js +1 -1
  143. package/dist/translations/vi.umd.js +1 -1
  144. package/dist/translations/zh-cn.js +1 -1
  145. package/dist/translations/zh-cn.umd.js +1 -1
  146. package/dist/translations/zh.js +1 -1
  147. package/dist/translations/zh.umd.js +1 -1
  148. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{CKEditorError as _0x16b9f2,Collection as _0xe1aaa7,ElementReplacer as _0x3c5642,FocusTracker as _0x8acf98,KeystrokeHandler as _0x142511,ObservableMixin as _0x3c8f7b,ResizeObserver as _0x33c34e,logWarning as _0x5bea80,scrollViewportToShowTarget as _0x5b653f,uid as _0x551659}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x28481c,isEqual as _0x5a02ed,set as _0x4ce8c3,unset as _0x4bb046}from'es-toolkit/compat';import{Command as _0xe8c052,Editor as _0x354082,ElementApiMixin as _0xbf5d60,PendingActions as _0x5ec6e7,Plugin as _0x592ef7}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x54da09,Users as _0x20176c,getMarkerDomElement as _0x358092,sanitizeEditorConfig as _0x1292c3}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x2136fb,ModelElement as _0x5ebea3,ModelPosition as _0x2779d2,ModelRange as _0x830771,ModelText as _0x26fa72,ViewAttributeElement as _0x4a7a04,ViewContainerElement as _0x510376,ViewDocumentFragment as _0xf18515,ViewElement as _0x474ff1,ViewEmptyElement as _0xdb2f8d,ViewRawElement as _0xbeeaa5,ViewText as _0xb883c0,ViewUIElement as _0x796ee2}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x445035,IconChevronUp as _0x20110a,IconHistory as _0x5fc2b3,IconThreeVerticalDots as _0xff9c52,IconUndo as _0x53d4c9,IconUser as _0x320df2}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x21ca49,ButtonView as _0x5ab628,ContextualBalloon as _0x3e4519,CssTransitionDisablerMixin as _0x735ba7,EditorUI as _0x3a737f,IconView as _0x52ff68,InlineEditableUIView as _0x27b5d1,LabeledFieldView as _0x1a4e29,ListItemView as _0x3ab91f,ListView as _0x37c124,MenuBarMenuListItemButtonView as _0x5b83fc,MenuBarMenuListItemView as tt,MenuBarMenuListView as it,MenuBarMenuView as et,StickyPanelView as st,ToolbarSeparatorView as nt,ToolbarView as ot,UIModel as rt,View as at,addListToDropdown as ht,createDropdown as ct,createLabeledInputText as lt,normalizeToolbarConfig as ut,submitHandler as dt}from'@ckeditor/ckeditor5-ui';import{DateTime as ft}from'luxon';const vt=/* #__PURE__ -- @preserve */
24
- _0x3c8f7b();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x480cd2){super(),this['id']=_0x480cd2['id']||_0x551659(),this['creator']=_0x480cd2['creator']||null,this['authors']=_0x480cd2['authors']||[],this['diffData']=_0x480cd2['diffData']||null,this['toVersion']=_0x480cd2['toVersion']||0x0,this['fromVersion']=_0x480cd2['fromVersion']||0x0,this['set']('name',_0x480cd2['name']||''),this['set']('createdAt',_0x480cd2['createdAt']||new Date()),this['set']('attributes',_0x480cd2['attributes']||{});}['setName'](_0x1ece2d){this['_update']({'name':_0x1ece2d});}['setAttribute'](_0x41ea21,_0x3c16a8){const _0x17661c=_0x28481c(this['attributes']);_0x4ce8c3(_0x17661c,_0x41ea21,_0x3c16a8),this['_update']({'attributes':_0x17661c});}['removeAttribute'](_0x5db762){const _0x247f1c=_0x28481c(this['attributes']);_0x4bb046(_0x247f1c,_0x5db762),this['_update']({'attributes':_0x247f1c});}['_update'](_0xbdcd2f,_0x43d92f=!0x1){let _0x160a52=!0x1;const _0x1d268a={'id':this['id']};for(const _0x1a16f2 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1c0ad4=_0xbdcd2f[_0x1a16f2];void 0x0!==_0x1c0ad4&&_0x1c0ad4!==this[_0x1a16f2]&&(this[_0x1a16f2]=_0x1c0ad4,_0x1d268a[_0x1a16f2]=_0x1c0ad4,_0x160a52=!0x0);}_0x160a52&&(_0x1d268a['authors']&&(_0x1d268a['authorsIds']=_0x1d268a['authors']['map'](_0x2b3147=>_0x2b3147['id']),delete _0x1d268a['authors']),this['fire']('_update',_0x1d268a,_0x43d92f));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x19706f=>_0x19706f['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x592ef7{['_revisions'];static get['requires'](){return[_0x20176c];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x48782e){super(_0x48782e),this['_revisions']=new _0xe1aaa7();}['afterInit'](){!async function(_0x5138de){const _0x5ab9d8='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x27c358=0xeb829,_0x2606b5=0x78e88,_0x4aac75=window['Date']['now'](),_0xafa962=_0x5138de['editor'],_0x1c4e99=new window['Promise'](_0x4075b1=>{_0xafa962['once']('ready',_0x4075b1);}),_0x2012dd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x4979da=_0xafa962['config']['get']('licenseKey');async function _0x239eb3(){let _0x4dd921,_0x5b0df8=null,_0xed885c=null;try{return'GPL'==_0x4979da?'NotAllowed':(_0x4dd921=_0x4f95c9(),_0x4dd921?(_0x4dd921['usageEndpoint']&&(_0xed885c=_0xe25b44(_0x4dd921['usageEndpoint'],_0x4dd921['jti'])),await _0xafd3ac()?_0x435b6e()?_0x50f64d()?'Expired':_0x4722e2()?('evaluation'==_0x4dd921['licenseType']&&(_0x5b0df8=_0x1e0821('EvaluationLimit')),await _0x5e39c7()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x50f64d(){const _0x47e046=['evaluation','trial']['includes'](_0x4dd921['licenseType'])?_0x4aac75/0x3e8:0xe10*_0x2606b5;return _0x4dd921['exp']<_0x47e046;}function _0x435b6e(){const _0x157c3f=_0x4dd921['features'];if(!_0x157c3f)return!0x1;if(_0x157c3f['includes']('*'))return!0x0;if(_0x157c3f['includes']('RH'))return!0x0;if(_0x157c3f['includes']('RRH')){if(_0x5337d1())return!0x0;if(_0x360213()||_0x5b55ff())return!0x0;}return!0x1;}function _0x4722e2(){const _0x2d0955=_0x4dd921['licensedHosts'];if(!_0x2d0955||0x0==_0x2d0955['length'])return!0x0;const {hostname:_0xf92e75}=new URL(window['location']['href']);if(_0x2d0955['includes'](_0xf92e75))return!0x0;const _0x10a163=_0xf92e75['split']('.');return _0x2d0955['filter'](_0x2b7f15=>_0x2b7f15['includes']('*'))['map'](_0x4091dd=>_0x4091dd['split']('.'))['filter'](_0x5df8aa=>_0x5df8aa['length']<=_0x10a163['length'])['map'](_0x1a3de9=>Array(_0x10a163['length']-_0x1a3de9['length'])['fill']('*'===_0x1a3de9[0x0]?'*':'')['concat'](_0x1a3de9))['some'](_0x13072c=>_0x10a163['every']((_0xdba86d,_0x21bdd6)=>_0x13072c[_0x21bdd6]===_0xdba86d||'*'===_0x13072c[_0x21bdd6]));}function _0x5e39c7(){return _0x5b0df8&&_0xed885c?new window['Promise']((_0x149547,_0x1ca553)=>{_0x5b0df8['then'](_0x149547,_0x1ca553),_0xed885c['then'](_0x284025=>{'Valid'!=_0x284025&&_0x149547(_0x284025);},_0x1ca553);}):_0x5b0df8||_0xed885c||'Valid';}}function _0xe25b44(_0x2207b9,_0x364b48){return new window['Promise'](_0x154d6b=>{if(_0x599dc9())return _0x154d6b('Valid');_0xe1317e(),_0xafa962['decorate']('_sendUsageRequest');let _0x3a29bd=!0x1;const _0x4d9b7d=_0x551659();function _0x377c85(_0x227d38){return!!_0x227d38&&('object'==typeof _0x227d38||'function'==typeof _0x227d38)&&'function'==typeof _0x227d38['then']&&'function'==typeof _0x227d38['catch'];}function _0x365b21(_0x44c551){_0x31ec17(_0x44c551)['then'](_0x1bf375=>_0x1bf375&&'ok'==_0x1bf375['status']?_0x5630fd(_0x207ab0(_0x4d9b7d+_0x364b48))!=_0x1bf375['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x758a2=>(_0x42bf65(),_0x758a2),()=>{const _0x29ebe8=_0x25ed2a();return null==_0x29ebe8?(_0x42bf65(),'Valid'):_0x4aac75-_0x29ebe8>0x240c8400?'UsageLimit':'Valid';})['then'](_0x154d6b)['catch'](()=>{_0x154d6b('UsageLimit');});const _0x1cab2b=0x36ee80;function _0x42bf65(){const _0x4671ab='llct-'+_0x5630fd(_0x207ab0(_0x2207b9)),_0x51c907=_0x21269c(_0x5630fd(window['Math']['ceil'](_0x4aac75/_0x1cab2b)));window['localStorage']['setItem'](_0x4671ab,_0x51c907);}function _0x25ed2a(){const _0x312b7e='llct-'+_0x5630fd(_0x207ab0(_0x2207b9)),_0x152fdc=window['localStorage']['getItem'](_0x312b7e);return _0x152fdc?window['parseInt'](_0x21269c(_0x152fdc),0x10)*_0x1cab2b:null;}function _0x31ec17(_0x5204c){return new window['Promise']((_0x42f8df,_0x12e805)=>{_0x5204c['then'](_0x42f8df,_0x12e805),window['setTimeout'](_0x12e805,0x1d4c0);});}}_0xafa962['on']('_sendUsageRequest',(_0x49bba5,_0x58bdf5)=>{if(_0x58bdf5[0x0]!=_0x2207b9)return _0x154d6b('UsageLimit');_0x58bdf5[0x1]={..._0x58bdf5[0x1],'requestId':_0x4d9b7d};},{'priority':'high'}),_0xafa962['on']('_sendUsageRequest',_0x512eec=>{_0x377c85(_0x512eec['return'])&&(_0x3a29bd=!0x0,_0x365b21(_0x512eec['return']));},{'priority':'low'}),_0x1c4e99['then'](()=>{_0x3a29bd||_0x154d6b('UsageLimit');});});function _0x599dc9(){return'auto'==_0xafa962['editing']['view']['_overlayModeHint'];}function _0xe1317e(){_0xafa962['editing']['view']['_overlayModeHint']='auto';}}function _0x1e0821(_0x192a2b){const _0xf127c=[new window['Promise'](_0x30b434=>setTimeout(_0x30b434,0x93ecc)),_0x1c4e99['then'](()=>new window['Promise'](_0x5078d2=>{const _0xfe9de=0x7,_0x2fada0=_0x5138de['_revisions'];function _0x266096(){_0x2fada0['length']>=_0xfe9de&&_0x5078d2();}_0x266096(),_0x2fada0['on']('add',_0x266096);})),new window['Promise'](_0x510807=>{function _0x193f89(){for(const _0xbd76a1 in window)if(window['Number']['isNaN'](window['Number'](_0xbd76a1))&&window[_0xbd76a1]==_0x27c358)return _0x510807();'destroyed'!=_0xafa962['state']&&window['setTimeout'](_0x193f89,0x1388);}_0x18d230('RevisionViewer')&&_0x193f89();})];return window['Promise']['race'](_0xf127c)['then'](()=>_0x192a2b);}async function _0xd3d94a(){if(await _0x1c4e99,_0x18d230('RevisionViewer')){const _0x48049d=_0x5138de['getRevision'](0x0),_0x26f9ea=_0x5138de['getEarlierVisibleRevision'](_0x48049d['id']),_0x1e69a1=_0x5a91cb('RevisionViewer');return await _0x1e69a1['compare'](_0x48049d['id'],_0x26f9ea?_0x26f9ea['id']:null,!0x0),_0x1e69a1['unbind']('isEnabled'),_0x1e69a1['isEnabled']=!0x1,_0x1e69a1['compare']=_0x270320,void(_0x1e69a1['_getDiff']=_0x270320);}if(_0x18d230('RevisionTracker')){const _0xadd4e7=_0x5a91cb('RevisionTracker');_0xadd4e7['unbind']('isEnabled'),_0xadd4e7['isEnabled']=!0x1,_0xadd4e7['update']=_0x270320,_0xadd4e7['saveRevision']=_0x270320;}_0xafa962['model']['change']=_0x270320,_0xafa962['model']['enqueueChange']=_0x270320,_0xafa962['enableReadOnlyMode']('model');}function _0x5337d1(){return _0x18d230('WebSocketGateway')&&'connected'==_0x5a91cb('WebSocketGateway')['state'];}function _0x360213(){return _0x18d230('RevisionViewerIntegration');}function _0x5b55ff(){return _0x18d230('TrackChangesDataGetter');}function _0x37c008(_0xb6b714){const _0x44d200=_0x116920();_0xafa962[_0x44d200]='revisionHistoryLicenseKey'+_0xb6b714,_0xb6b714['endsWith']('Limit')&&(window[_0x116920()]=_0x27c358),'Valid'!=_0xb6b714&&_0xd3d94a();}function _0x116920(){const _0x4ae3e3=window['String'](window['performance']['now']())['replace']('.','');let _0x4b33f9='v';for(let _0x50a8c4=0x0;_0x50a8c4<_0x4ae3e3['length'];_0x50a8c4+=0x2){let _0x254ba1=window['parseInt'](_0x4ae3e3['substring'](_0x50a8c4,_0x50a8c4+0x2));_0x254ba1>=0x3e&&(_0x254ba1-=0x3e),_0x4b33f9+=_0x5ab9d8[_0x254ba1];}return _0x4b33f9;}function _0x4f95c9(){const _0x4e045f=_0x4979da['split']('.');if(0x3!=_0x4e045f['length'])return null;return _0x517ee7(_0x4e045f[0x1]);function _0x517ee7(_0x2b4329){const _0x4cc1b1=_0x3127bf(_0x2b4329);return _0x4cc1b1&&_0x15b4b8()?_0x4cc1b1:null;function _0x15b4b8(){const _0x1bb1fb=_0x4cc1b1['jti'],_0x1fc126=window['parseInt'](_0x1bb1fb['substring'](_0x1bb1fb['length']-0x8),0x10),_0x4b682a={..._0x4cc1b1,'jti':_0x1bb1fb['substring'](0x0,_0x1bb1fb['length']-0x8)};return delete _0x4b682a['vc'],_0x207ab0(_0x4b682a)==_0x1fc126;}}}async function _0xafd3ac(){let _0x5c9378=!0x0;try{const [_0x48badf,_0x4b77f9,_0xab3393]=_0x4979da['split']('.');return _0x437989(_0x48badf),await _0x574003(_0x48badf,_0x4b77f9,_0xab3393),_0x5c9378;}catch{return!0x1;}function _0x437989(_0x54c66d){const _0x4f7249=_0x3127bf(_0x54c66d);_0x4f7249&&'ES256'==_0x4f7249['alg']||(_0x5c9378=!0x1);}async function _0x574003(_0x135f4c,_0x4893b5,_0x41add3){const _0x30462b=window['Uint8Array']['from'](_0x1badaf(_0x41add3),_0x1e9ffa=>_0x1e9ffa['charCodeAt'](0x0)),_0x1044aa=new window['TextEncoder']()['encode'](_0x135f4c+'.'+_0x4893b5),_0x2391fa=window['crypto']['subtle'];if(!_0x2391fa)return;const _0x35f299=await _0x2391fa['importKey']('jwk',_0x2012dd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2391fa['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x35f299,_0x30462b,_0x1044aa)||(_0x5c9378=!0x1);}}function _0x3127bf(_0x1fd9f1){return _0x1fd9f1['startsWith']('ey')?JSON['parse'](_0x1badaf(_0x1fd9f1)):null;}function _0x1badaf(_0x24b490){return window['atob'](_0x24b490['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x207ab0(_0xba12cb){let _0x2b5541=0x1505;function _0x5e731b(_0x2561e5){for(let _0x3bddbc=0x0;_0x3bddbc<_0x2561e5['length'];_0x3bddbc++){const _0x23188b=_0x2561e5['charCodeAt'](_0x3bddbc);_0x2b5541=(_0x2b5541<<0x5)+_0x2b5541+_0x23188b,_0x2b5541&=_0x2b5541;}}function _0x125a00(_0xc9fbb2){Array['isArray'](_0xc9fbb2)?_0xc9fbb2['forEach'](_0x125a00):_0xc9fbb2&&'object'==typeof _0xc9fbb2?Object['entries'](_0xc9fbb2)['sort']()['forEach'](([_0x3c6b4d,_0x1c8c4b])=>{_0x5e731b(_0x3c6b4d),_0x125a00(_0x1c8c4b);}):_0x5e731b(window['String'](_0xc9fbb2));}return _0x125a00(_0xba12cb),_0x2b5541>>>0x0;}function _0x5630fd(_0x147aa5){return _0x147aa5['toString'](0x10)['padStart'](0x8,'0');}function _0x21269c(_0x1fd517){return _0x1fd517['split']('')['reverse']()['join']('');}function _0x18d230(_0x26b1db){return _0xafa962['plugins']['has'](_0x26b1db);}function _0x5a91cb(_0x23f5a8){return _0xafa962['plugins']['get'](_0x23f5a8);}function _0x270320(){}_0x37c008(await _0x239eb3());}(this);}['createRevision'](_0xd1e31b){const _0x13b4b7=this['editor']['plugins']['get']('Users');return new gt({'id':_0xd1e31b['id'],'name':_0xd1e31b['name'],'creator':_0xd1e31b['creatorId']?_0x13b4b7['getUser'](_0xd1e31b['creatorId']):null,'diffData':_0xd1e31b['diffData']||_0xd1e31b['data'],'authors':_0xd1e31b['authorsIds']['map'](_0x1550fa=>_0x13b4b7['getUser'](_0x1550fa)),'createdAt':new Date(_0xd1e31b['createdAt']),'attributes':_0xd1e31b['attributes'],'fromVersion':_0xd1e31b['fromVersion'],'toVersion':_0xd1e31b['toVersion']});}['addRevision'](_0x490c91,_0x1fcab7=0x0){this['_revisions']['add'](_0x490c91,_0x1fcab7);}['getRevision'](_0x3b65d1){return this['_revisions']['get'](_0x3b65d1);}['getRevisions'](_0x3f189f={'toJSON':!0x1}){const _0x512f1b=Array['from'](this['_revisions']);return _0x512f1b['reverse'](),_0x3f189f['toJSON']?_0x512f1b['map'](_0x4840cd=>_0x4840cd['toJSON']()):_0x512f1b;}['getIndex'](_0x116b5c){return this['_revisions']['getIndex'](_0x116b5c);}['getEarlierVisibleRevision'](_0x30de49){const [,_0x478cd6]=this['getRevisionsIterator'](_0x30de49,{'direction':'earlier'});return _0x478cd6;}['getLaterVisibleRevision'](_0x167198){const [,_0x1a5040]=this['getRevisionsIterator'](_0x167198,{'direction':'later'});return _0x1a5040;}['getRevisionsInDiff'](_0x10cfe9){const _0xe861ae=[];for(const _0x57f215 of this['getRevisionsIterator'](_0x10cfe9['newRevisionId']))if(_0xe861ae['push'](_0x57f215),_0x57f215['id']===_0x10cfe9['oldRevisionId'])break;return _0xe861ae;}*['getRevisionsIterator'](_0x4ef927,{direction:_0x37359c='earlier',filter:_0x4b3e9a=()=>!0x0}={}){const _0x5a42c1='earlier'===_0x37359c?0x1:-0x1;let _0x188587=this['_revisions']['get'](_0x4ef927),_0xb1898=this['getIndex'](_0x188587);for(yield _0x188587;_0x188587;){if(_0xb1898+=_0x5a42c1,_0x188587=this['getRevision'](_0xb1898),!_0x188587)return;_0x4b3e9a(_0x188587)&&(yield _0x188587);}}},wt=class extends _0x592ef7{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x510376,'c'],[_0x4a7a04,'a'],[_0xdb2f8d,'e'],[_0xbeeaa5,'r'],[_0x796ee2,'u']]);['_typeCharToViewClass']=new Map([['c',_0x510376],['a',_0x4a7a04],['e',_0xdb2f8d],['r',_0xbeeaa5],['u',_0x796ee2]]);async['loadRevisionData'](_0x1a3e55,_0x30f6a9){if(_0x1a3e55['diffData']||!_0x30f6a9)return;const _0x2d457f=this['editor']['config']['get']('collaboration.channelId');_0x1a3e55['diffData']=(await _0x30f6a9['getRevision']({'channelId':_0x2d457f,'revisionId':_0x1a3e55['id']}))['diffData'];}['getRevisionDocumentData'](_0x14a4db){const _0x34ceed={};for(const _0x80ab59 in _0x14a4db['diffData']){if(_0x14a4db['diffData'][_0x80ab59]['attachChange']&&!_0x14a4db['diffData'][_0x80ab59]['attachChange']['isAttached'])continue;const _0x11796d=this['_removeRevisionMarkers'](JSON['parse'](_0x14a4db['diffData'][_0x80ab59]['insertions'])),_0x166332=this['editor']['editing']['view']['document'],_0x252d8b=new _0xf18515(_0x166332,_0x11796d['map'](_0x747c5b=>this['_getViewFromDiffObj'](_0x747c5b,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x34ceed[_0x80ab59]=this['editor']['data']['processor']['toData'](_0x252d8b),this['editor']['data']['processor']['useFillerType']('default');}return _0x34ceed;}['getRevisionRootsAttributes'](_0x5b97dc){const _0xbc53c7={};for(const _0x571a62 in _0x5b97dc['diffData'])_0x5b97dc['diffData'][_0x571a62]['attachChange']&&!_0x5b97dc['diffData'][_0x571a62]['attachChange']['isAttached']||(_0xbc53c7[_0x571a62]=_0x5b97dc['diffData'][_0x571a62]['attributesAfter']||{});return _0xbc53c7;}['getRevisionRootsModelElements'](_0x4feaec){const _0x5a2692={};for(const _0x156579 in _0x4feaec['diffData']){if(_0x4feaec['diffData'][_0x156579]['attachChange']&&!_0x4feaec['diffData'][_0x156579]['attachChange']['isAttached'])continue;const _0x21de39=_0x4feaec['diffData'][_0x156579]['rootElementName'];_0x21de39&&(_0x5a2692[_0x156579]=_0x21de39);}return _0x5a2692;}['_getTypeCharForViewElement'](_0x1b316d){return this['_viewClassToTypeChar']['get'](_0x1b316d['constructor']);}['_getViewFromDiffObj'](_0x2bf8c2,_0x240d1d){const _0x38fab9=this['editor']['editing']['view']['document'];if('string'==typeof _0x2bf8c2)return new _0xb883c0(_0x38fab9,_0x2bf8c2);{let _0x56248b,_0x51609a;_0x51609a='u'==_0x2bf8c2['type']||'r'==_0x2bf8c2['type']?[]:_0x2bf8c2['children']['map'](_0xa4e087=>this['_getViewFromDiffObj'](_0xa4e087,_0x240d1d));const _0x428362=this['_typeCharToViewClass']['get'](_0x2bf8c2['type'])||_0x474ff1,_0x220435=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x56248b=new _0x428362(_0x38fab9,_0x2bf8c2['name'],_0x2bf8c2['attributes'],_0x51609a),'u'==_0x2bf8c2['type']&&_0x2bf8c2['children'][0x0]){const _0x12b39c=_0x2bf8c2['children'][0x0];if(_0x56248b['render']=function(_0x205900){const _0x4dc9fb=_0x205900['createElement']('div');return _0x4dc9fb['innerHTML']=_0x12b39c,_0x4dc9fb['childNodes'][0x0];},_0x240d1d){const _0x9aa0db=new _0xf18515(_0x38fab9);_0x9aa0db['_appendChild'](_0x56248b);const _0x45af94=Array['from'](_0x220435['viewChildrenToDom'](_0x9aa0db,{'bind':!0x1})),_0x545136=_0x220435['domDocument']['createElement']('div');_0x545136['append'](..._0x45af94),_0x56248b=Array['from'](_0x220435['domChildrenToView'](_0x545136))[0x0];}}else{if('r'==_0x2bf8c2['type']&&_0x2bf8c2['children'][0x0]){const _0x1785bf=_0x2bf8c2['children'][0x0];if(_0x56248b['render']=function(_0x3b9865){_0x3b9865['innerHTML']=_0x1785bf;},_0x240d1d){const _0x13c4ad=new _0xf18515(_0x38fab9);_0x13c4ad['_appendChild'](_0x56248b);const _0xac7cc7=Array['from'](_0x220435['viewChildrenToDom'](_0x13c4ad,{'bind':!0x1})),_0x3be223=_0x220435['domDocument']['createElement']('div');_0x3be223['append'](..._0xac7cc7);const _0x274600=Array['from'](_0x220435['domChildrenToView'](_0x3be223));_0x274600['length']>0x1?_0x56248b['_appendChild'](_0x274600):_0x56248b=_0x274600[0x0];}}}if(_0x2bf8c2['customProperties']){for(const [_0xd7a26f,_0x3deaae]of _0x2bf8c2['customProperties'])_0x56248b['_setCustomProperty'](_0xd7a26f,_0x3deaae);}const _0xa01d57=void 0x0===_0x2bf8c2['fillerOffset']?null:_0x2bf8c2['fillerOffset'];return null!==_0xa01d57&&(_0x56248b['getFillerOffset']=()=>_0xa01d57),_0x56248b;}}['_makeModelFromViewString'](_0x533ff0,_0x519e78){const _0x427a55=JSON['parse'](_0x533ff0),_0x26079d=this['editor']['editing']['view']['document'],_0x30c0d0=new _0xf18515(_0x26079d,_0x427a55['map'](_0x35f8cf=>this['_getViewFromDiffObj'](_0x35f8cf,!0x0))),_0x4fa88d=this['editor']['data']['toModel'](_0x30c0d0,_0x519e78);return _0x4fa88d['name']=_0x519e78,_0x4fa88d;}['_removeRevisionMarkers'](_0x2fd75a){return(_0x2fd75a=_0x2fd75a['filter'](_0x180a50=>!_0x180a50['name']||'revision-start'!==_0x180a50['name']&&'revision-end'!==_0x180a50['name']))['forEach'](_0x3f278d=>{'string'!=typeof _0x3f278d&&(_0x3f278d['children']=this['_removeRevisionMarkers'](_0x3f278d['children']),_0x3f278d['attributes']=_0x3f278d['attributes']['filter'](_0xb5b406=>!_0xb5b406[0x0]['startsWith']('data-revision-')));}),_0x2fd75a;}};function pt(_0x792c52,_0x16dad9,_0x2072d4){const t=_0x792c52['t'];switch(_0x16dad9){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'},_0x2072d4);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2072d4);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'';}}var _t=class extends _0x592ef7{['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[_0x20176c,mt,wt,_0x5ec6e7];}constructor(_0x512618){super(_0x512618),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x208512=_0x551659();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x208512},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 _0x266481=this['repository']['getRevision'](0x0),_0x5d67b5=_0x266481&&null===_0x266481['creator']?_0x266481:null;if(this['_continueCurrentRevision']=!!_0x5d67b5&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x521601=this['_source']['getCurrentRevisionId'](),_0x3b3ff7=this['repository']['getRevision'](_0x521601);if(_0x3b3ff7)this['_startingVersion']=_0x3b3ff7['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x22a864=this['_source']['history']['_operations']['find'](_0x215f6e=>!_0x215f6e['_isInit']),_0x52d6b9=_0x22a864?_0x22a864['baseVersion']:this['_source']['history']['version'];_0x266481?(_0x266481['toVersion']<_0x52d6b9&&_0x266481['_update']({'toVersion':_0x52d6b9}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5d67b5['id'],this['_startingVersion']=_0x5d67b5['fromVersion']):(this['_startingVersion']=_0x266481['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x52d6b9,this['_continueCurrentRevision']=!0x1);}}else _0x5d67b5&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5d67b5['toVersion'],this['editor']['model']['document']['history']['version']),_0x5d67b5['fromVersion']===_0x5d67b5['toVersion']?(0x0!==_0x5d67b5['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5d67b5['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5d67b5['id'],this['_startingVersion']=_0x5d67b5['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',_0xed9968=>!_0xed9968),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x115a85=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b58a5;for(const _0x3b29cb in _0x115a85){const _0x29300e=_0x3b29cb,_0x2e7f2b=_0x115a85[_0x29300e];if('revisionHistoryLicenseKeyValid'==_0x2e7f2b||'revisionHistoryLicenseKeyInvalid'==_0x2e7f2b||'revisionHistoryLicenseKeyExpired'==_0x2e7f2b||'revisionHistoryLicenseKeyDomainLimit'==_0x2e7f2b||'revisionHistoryLicenseKeyNotAllowed'==_0x2e7f2b||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2e7f2b||'revisionHistoryLicenseKeyUsageLimit'==_0x2e7f2b){delete _0x115a85[_0x29300e],_0x4b58a5=_0x2e7f2b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4b58a5&&_0x115a85['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4b58a5&&_0x115a85['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4b58a5&&_0x115a85['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4b58a5&&_0x115a85['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4b58a5&&_0x115a85['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4b58a5&&_0x115a85['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x41c297=this['repository']['getRevision'](0x0),_0x237cee=await this['getRevisionDocumentData'](_0x41c297),_0x593cf4=await this['getRevisionRootsAttributes'](_0x41c297),_0x1c2a13=this['_utils']['getRevisionRootsModelElements'](_0x41c297);this['_replaceEditorDataWithRevisionData'](_0x237cee,_0x593cf4,_0x1c2a13);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x17ee4b){this['_source']=_0x17ee4b;}async['update'](){const _0x1ed0c9=await this['_source']['getLatestVersion']();if(_0x1ed0c9>this['currentRevision']['toVersion']){await this['_loadState']();const _0x7bd263=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1ed0c9});_0x7bd263['authors']=_0x7bd263['authorsIds']['map'](_0xefe28a=>this['editor']['plugins']['get']('Users')['getUser'](_0xefe28a)),this['currentRevision']['_update'](_0x7bd263);}}async['saveRevision'](_0x5d0606={},_0x2be6a7=null){const _0x11b74b=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2be6a7>this['currentRevision']['toVersion']&&(_0x2be6a7=null),null===_0x2be6a7&&(_0x2be6a7=await this['_source']['getLatestVersion']());const _0x698a1c=this['_getFromVersion'](_0x2be6a7),_0x4aa778=this['buildRevisionData']({'from':_0x698a1c,'to':_0x2be6a7});if(this['currentRevision']['toVersion']<_0x2be6a7){const _0x4431b1=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2be6a7,'to':_0x2be6a7});_0x4431b1['authors']=[],_0x4431b1['authorsIds']=[],_0x4431b1['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4431b1,!0x0),delete _0x4431b1['authors'],_0x11b74b['push'](_0x4431b1);}_0x5d0606['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5d0606['name']=_0x5d0606['name']||null,_0x5d0606['id']=_0x5d0606['id']||_0x551659(),_0x5d0606={..._0x5d0606,..._0x4aa778};const _0x440277=this['addRevisionData'](_0x5d0606);_0x11b74b['push'](_0x5d0606);const _0x2eddfa=this['repository']['getIndex'](_0x440277);if(0x0!==_0x2eddfa){const _0x164956=this['repository']['getRevision'](_0x2eddfa-0x1);if(_0x164956['fromVersion']!==_0x2be6a7){const _0x3cdd29=this['_revisionDataBuilder']['getData'](_0x2be6a7,_0x164956['toVersion']),_0x3c7304={'id':_0x164956['id'],'diffData':_0x3cdd29['diffData'],'authorsIds':_0x3cdd29['authorsIds'],'authors':_0x3cdd29['authorsIds']['map'](_0x3c134a=>this['editor']['plugins']['get']('Users')['getUser'](_0x3c134a)),'fromVersion':_0x2be6a7};_0x164956===this['currentRevision']&&(_0x3c7304['createdAt']=new Date(_0x5d0606['createdAt']['getTime']()+0xa)),_0x164956['_update'](_0x3c7304,!0x0),delete _0x3c7304['authors'],_0x11b74b['push'](_0x3c7304);}}if(this['adapter']){for(const _0x4ae784 of _0x11b74b)this['_bufferUpdate'](_0x4ae784['id'],_0x4ae784,!0x0);this['sendBufferedUpdates']();}return _0x440277;}['addRevisionData'](_0x2ca9c6){const _0x6026d6=this['repository']['createRevision'](_0x2ca9c6);return this['adapter']&&_0x6026d6['on']('_update',(_0x4ca9f6,_0x55afec,_0x165df7)=>{_0x165df7||(this['_bufferUpdate'](_0x55afec['id'],_0x55afec,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x6026d6,this['_findInsertionIndex'](_0x6026d6)),_0x6026d6;}async['getRevisionDocumentData'](_0x500c21){return await this['_utils']['loadRevisionData'](_0x500c21,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x500c21);}async['getRevisionRootsAttributes'](_0x42555f){return await this['_utils']['loadRevisionData'](_0x42555f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x42555f);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x49fb78=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1edd29=0x0;_0x1edd29<_0x49fb78['length'];_0x1edd29++){const _0x3c8877=_0x49fb78[_0x1edd29];let _0x13eadc=!0x1;for(const _0x36232f of Object['keys'](_0x3c8877))void 0x0===_0x3c8877[_0x36232f]?delete _0x3c8877[_0x36232f]:'id'!==_0x36232f&&(_0x13eadc=!0x0);_0x13eadc||(_0x49fb78[_0x1edd29]=null);}if(_0x49fb78=_0x49fb78['filter'](_0x2bd582=>null!==_0x2bd582),!_0x49fb78['length'])return;for(let _0x1a14a4=0x0;_0x1a14a4<_0x49fb78['length'];_0x1a14a4++){const _0xc490be=_0x49fb78[_0x1a14a4];void 0x0!==_0xc490be['fromVersion']&&void 0x0===_0xc490be['toVersion']&&(_0xc490be['toVersion']=this['repository']['getRevision'](_0xc490be['id'])['toVersion']),void 0x0!==_0xc490be['toVersion']&&void 0x0===_0xc490be['fromVersion']&&(_0xc490be['fromVersion']=this['repository']['getRevision'](_0xc490be['id'])['fromVersion']);}const _0x38778e=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x49fb78,_0x38778e)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1893d5=>{if(_0x1893d5){for(const _0x181fca of _0x1893d5)this['setRevisionData']({'id':_0x181fca['id'],'createdAt':_0x181fca['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x4fd60c=null,from:_0x4ea67d=null,to:_0x5f3db2=null}){_0x4ea67d=null!==_0x4ea67d?_0x4ea67d:_0x4fd60c['fromVersion'],_0x5f3db2=null!==_0x5f3db2?_0x5f3db2:_0x4fd60c['toVersion'];const _0x5bd6b6=this['_revisionDataBuilder']['getData'](_0x4ea67d,_0x5f3db2),_0x266fbe={'diffData':_0x5bd6b6['diffData'],'authorsIds':_0x5bd6b6['authorsIds'],'fromVersion':_0x4ea67d,'toVersion':_0x5f3db2};if(!_0x4fd60c||_0x5f3db2!==_0x4fd60c['toVersion']){const _0x1e375c=_0x5f3db2-0x1,_0x7609e1=this['_source']['history']['getOperation'](_0x1e375c);_0x266fbe['createdAt']=_0x7609e1&&_0x7609e1['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4ea67d===this['_loadedStateData']['fromVersion']){for(const _0x22c88d of this['_loadedStateData']['authors'])_0x266fbe['authorsIds']['includes'](_0x22c88d['id'])||_0x266fbe['authorsIds']['push'](_0x22c88d['id']);}return _0x266fbe;}['_bufferUpdate'](_0x5ef383,_0x516eb9,_0x1157ef){if(this['_bufferedUpdates']['has'](_0x5ef383)){const _0x1763ce=this['_bufferedUpdates']['get'](_0x5ef383);_0x516eb9=_0x1157ef?{..._0x1763ce,..._0x516eb9}:{..._0x516eb9,..._0x1763ce};}this['_bufferedUpdates']['set'](_0x5ef383,_0x516eb9);}['setRevisionData'](_0x551468){const _0x49373f=this['repository']['getRevision'](_0x551468['id']);if(_0x551468['createdAt']&&(_0x551468['createdAt']=new Date(_0x551468['createdAt'])),_0x551468['authorsIds']){const _0x3af043=this['editor']['plugins']['get']('Users');_0x551468['authors']=_0x551468['authorsIds']['map'](_0x2dd865=>_0x3af043['getUser'](_0x2dd865));}_0x49373f['_update'](_0x551468,!0x0);}['_createInitialRevision'](_0x710b20){const _0x58d647=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x58d647)this['_initialRevisionId']=_0x58d647['id'];else{const _0x181edb=!this['editor']['model']['document']['roots']['find'](_0x5c5541=>this['editor']['model']['hasContent'](_0x5c5541)),_0x5a1e4f=this['editor']['plugins']['get']('Users')['me']['id'],_0x474f64=pt(this['editor']['locale'],_0x181edb?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x710b20,'to':_0x710b20,'id':this['_initialRevisionId'],'name':_0x474f64,'creatorId':_0x5a1e4f});}}['_createCurrentRevision'](_0x1e90a0){const _0x278a7c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x278a7c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1e90a0,'to':_0x1e90a0,'id':_0x278a7c,'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'](_0x45cc4c,_0x4c1f57,_0x41654e){const _0x4bf325={},_0x1d3edc={},_0x4d1c38={},_0x5846bc=this['editor']['config']['get']('roots')||{};for(const [_0x327645,_0xfebdf1]of Object['entries'](_0x5846bc))_0xfebdf1['lazyLoad']||(_0x4bf325[_0x327645]=_0xfebdf1['initialData']??'',_0x1d3edc[_0x327645]=_0xfebdf1['modelAttributes']||{},_0xfebdf1['modelElement']&&(_0x4d1c38[_0x327645]=_0xfebdf1['modelElement']));for(const _0x43e55c of this['editor']['model']['document']['getRootNames']())_0x4bf325[_0x43e55c]??='',_0x1d3edc[_0x43e55c]??={};let _0xfd847e=!0x1;const _0x43dcec=Object['keys'](_0x4bf325),_0x3a7041=Object['keys'](_0x45cc4c);for(const _0xd97a95 of _0x43dcec){if(_0x4bf325[_0xd97a95]!==_0x45cc4c[_0xd97a95]&&''!==_0x4bf325[_0xd97a95]['trim']()){_0xfd847e=!0x0;break;}if(!_0x5a02ed(_0x1d3edc[_0xd97a95],_0x4c1f57[_0xd97a95])&&Object['keys'](_0x1d3edc[_0xd97a95])['length']>0x0){_0xfd847e=!0x0;break;}const _0x12707f=_0x4d1c38[_0xd97a95],_0x49ddf1=_0x41654e[_0xd97a95];if(_0x12707f&&_0x49ddf1&&_0x12707f!==_0x49ddf1){_0xfd847e=!0x0;break;}}_0xfd847e||(_0xfd847e=_0x3a7041['some'](_0x3c9e5a=>!this['editor']['model']['document']['getRoot'](_0x3c9e5a))),_0xfd847e&&_0x5bea80('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4bf325,'editorRootsAttributes':_0x1d3edc,'editorRootsModelElements':_0x4d1c38,'revisionData':_0x45cc4c,'revisionRootsAttributes':_0x4c1f57,'revisionRootsModelElements':_0x41654e});for(const [_0x2c4c02,_0x2dc4f9]of Object['entries'](_0x45cc4c))this['editor']['config']['set']('roots.'+_0x2c4c02+'.initialData',_0x2dc4f9);for(const [_0x2ee9ba,_0x44bcc7]of Object['entries'](_0x4c1f57))this['editor']['config']['set']('roots.'+_0x2ee9ba+'.modelAttributes',_0x44bcc7);const _0x277eba=this['editor']['model']['document'];for(const [_0x292058,_0x4baf7d]of Object['entries'](_0x41654e)){this['editor']['config']['set']('roots.'+_0x292058+'.modelElement',_0x4baf7d);const _0x328306=_0x277eba['getRoot'](_0x292058);_0x328306&&_0x328306['name']!==_0x4baf7d&&(_0x277eba['roots']['remove'](_0x292058),_0x277eba['createRoot'](_0x4baf7d,_0x292058));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x22a411=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x22a411['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x297d33){const _0x1288d4=this['repository']['getRevisions']();_0x1288d4['reverse']();let _0xd8325=0x0;for(;_0xd8325<_0x1288d4['length'];){const _0x17ae40=_0x1288d4[_0xd8325];if(_0x17ae40===this['currentRevision']){_0xd8325++;continue;}if(_0x17ae40['id']===this['_initialRevisionId'])break;const _0x1047fa=_0x297d33['toVersion']-_0x17ae40['toVersion']||_0x297d33['fromVersion']-_0x17ae40['fromVersion'];if(_0x1047fa>0x0)break;if(_0x1047fa<0x0)_0xd8325++;else{if(!_0x297d33['creator']&&_0x17ae40['creator'])break;if(_0x17ae40['creator']||!_0x297d33['creator']){if(_0x297d33['createdAt']>_0x17ae40['createdAt'])break;_0xd8325++;}else _0xd8325++;}}return _0xd8325;}['_getFromVersion'](_0x56894f){const _0x572b15=this['repository']['getRevisions']();_0x572b15['reverse'](),_0x572b15['shift']();const _0x31fbb3=_0x572b15['find'](_0x1eb229=>_0x1eb229['toVersion']<=_0x56894f)['toVersion'];return _0x31fbb3<this['_startingVersion']?this['_startingVersion']:_0x31fbb3;}['_makeRevision']({name:_0x2e452b,from:_0x561642,to:_0x5f0f51,creatorId:_0xb6ffc4,id:_0x2867bf}){const _0x5d79c7=this['buildRevisionData']({'from':_0x561642,'to':_0x5f0f51});_0x5d79c7['name']=_0x2e452b,_0x5d79c7['creatorId']=_0xb6ffc4,_0x5d79c7['id']=_0x2867bf;const _0x439e92=this['addRevisionData'](_0x5d79c7);return this['adapter']&&this['_bufferUpdate'](_0x5d79c7['id'],_0x5d79c7,!0x0),_0x439e92;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5184fb){this['editor']=_0x5184fb,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'](_0x3faf84){this['source']=_0x3faf84;const _0x1f08d3=new Map(),_0x59ae01=new Map(),_0x4240da=this['editor']['model']['document']['roots']['map'](_0x4975ff=>_0x4975ff['rootName']);for(const _0x480970 of _0x4240da){const _0x280895=this['editor']['model']['document']['getRoot'](_0x480970),_0x1fa3a3=bt(_0x280895);_0x1f08d3['set'](_0x480970,_0x1fa3a3),_0x59ae01['set'](_0x480970,Object['fromEntries'](_0x280895['getAttributes']()));}const _0x2c9308=Array['from'](this['editor']['model']['markers'])['map'](_0x3a3294=>[_0x3a3294['name'],_0x3a3294['getRange']()]),_0x4cec5f=this['source']['version'];this['_saveMetaData'](_0x4cec5f,_0x1f08d3,_0x2c9308,_0x59ae01),this['_startingRevisionId']=this['_revisionId'];const _0x58fa16=new Map(),_0x3c9ff8=new Map();for(const _0x26c751 of _0x4240da){const _0x1fea7e=Rt(_0x26c751,this['editor']['model']['document']['getRoot'](_0x26c751)['name']);_0x58fa16['set'](_0x26c751,_0x1fea7e),_0x3c9ff8['set'](_0x26c751,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x58fa16,[],_0x3c9ff8);}['getData'](_0x593c09,_0x22edbd){if(this['_lastFrom']===_0x593c09&&this['_lastTo']<=_0x22edbd)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x22edbd,!0x0);else{if(!this['_savedMetaData']['has'](_0x593c09)){const _0x3006c5=this['_getPreviousFrom'](_0x593c09);this['_calculateMetaData'](_0x3006c5,_0x593c09,!0x1);}this['_calculateMetaData'](_0x593c09,_0x22edbd,!0x0);}return this['_lastFrom']=_0x593c09,this['_lastTo']=_0x22edbd,this['_getState']();}['loadState'](_0x4dc660){if(!this['_savedMetaData']['has'](_0x4dc660['fromVersion'])){const _0x5b9c14=this['_getPreviousFrom'](_0x4dc660['fromVersion']);this['_calculateMetaData'](_0x5b9c14,_0x4dc660['fromVersion'],!0x1);}this['_calculateMetaData'](_0x4dc660['fromVersion'],_0x4dc660['toVersion'],!0x1);const _0x14bd90=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4dc660['fromVersion'],this['_lastTo']=_0x4dc660['toVersion'];for(const _0x1f8ae2 in _0x4dc660['diffData']){const _0x2d088a=_0x4dc660['diffData'][_0x1f8ae2]['attachChange'],_0x457588=_0x28481c(_0x4dc660['diffData'][_0x1f8ae2]['attributesBefore'])||{},_0x37ea14=_0x4dc660['diffData'][_0x1f8ae2],_0x33089b=_0x14bd90['_makeModelFromViewString'](_0x37ea14['deletions'],_0x37ea14['rootElementName']||'$root');_0x33089b['rootName']=_0x1f8ae2,_0x33089b['_isAttached']=!_0x2d088a||!_0x2d088a['isAttached'],_0x33089b['isAttached']=()=>_0x33089b['_isAttached'],this['_baseRoots']['set'](_0x1f8ae2,_0x33089b),this['_baseRootsAttributes']['set'](_0x1f8ae2,_0x457588),_0x2d088a&&this['_touchedRoots']['set'](_0x1f8ae2,_0x2d088a);const _0x3e8dd1=this['_makeIdsRoot'](_0x33089b);this['_baseIdsRoots']['set'](_0x1f8ae2,_0x3e8dd1);for(const [_0xa5c1ec,_0xb4ce97]of _0x33089b['markers']){if(!_0xa5c1ec['startsWith']('revision:'))continue;const _0x5148a0=_0xa5c1ec['split'](':')[0x2];for(const _0x3a0a28 of _0xb4ce97['getWalker']({'singleCharacters':!0x0})){const _0x36cb7b=this['_getVidAttributeName'](_0x3a0a28),_0x4f1cbd='elementEnd'==_0x3a0a28['type']?_0x3a0a28['previousPosition']['path']['slice'](0x0,-0x1):_0x3a0a28['previousPosition']['path'],_0x3fc410=_0x3e8dd1['getNodeByPath'](_0x4f1cbd)['getAttribute'](_0x36cb7b);this['_touched']['set'](_0x3fc410,{'userId':_0x5148a0});}_0x33089b['markers']['delete'](_0xa5c1ec);}}this['_startingRevisionId']=this['_revisionId'];const _0x88caf9=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0xde9064=>!this['_touched']['has'](_0xde9064));let _0x58a725=0x0;const _0x17ad1f=new Map();for(const _0x5c9eb0 in _0x4dc660['diffData']){const _0x173814=_0x4dc660['diffData'][_0x5c9eb0]['attachChange'],_0x5137ee=_0x28481c(_0x4dc660['diffData'][_0x5c9eb0]['attributesAfter'])||{},_0x3d08ae=_0x4dc660['diffData'][_0x5c9eb0],_0x4fcb37=_0x14bd90['_makeModelFromViewString'](_0x3d08ae['insertions'],_0x3d08ae['rootElementName']||'$root');_0x4fcb37['rootName']=_0x5c9eb0,_0x4fcb37['_isAttached']=!_0x173814||_0x173814['isAttached'],_0x4fcb37['isAttached']=()=>_0x4fcb37['_isAttached'],this['_diffRoots']['set'](_0x5c9eb0,_0x4fcb37),this['_diffRootsAttributes']['set'](_0x5c9eb0,_0x5137ee);const _0x4a1919=this['_makeIdsRoot'](_0x4fcb37,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5c9eb0,_0x4a1919),_0x17ad1f['set'](_0x5c9eb0,_0x4fcb37['isAttached']()?_0x5137ee:{});for(const [_0x43357b,_0x2e8389]of _0x4fcb37['markers']){if(!_0x43357b['startsWith']('revision:'))continue;const _0x2ff519=_0x43357b['split'](':')[0x2];for(const _0xe576c0 of _0x2e8389['getWalker']({'singleCharacters':!0x0})){const _0x38288e=this['_getVidAttributeName'](_0xe576c0),_0x522013=this['_revisionId']++,_0x2c35ec='elementEnd'==_0xe576c0['type']?_0xe576c0['previousPosition']['path']['slice'](0x0,-0x1):_0xe576c0['previousPosition']['path'];_0x4a1919['getNodeByPath'](_0x2c35ec)['_setAttribute'](_0x38288e,_0x522013),this['_touched']['set'](_0x522013,{'userId':_0x2ff519});}_0x4fcb37['markers']['delete'](_0x43357b);}for(const _0x19d456 of this['editor']['model']['createRangeIn'](_0x4fcb37)['getWalker']({'singleCharacters':!0x0})){const _0x21f6ef=this['_getVidAttributeName'](_0x19d456),_0x245345='elementEnd'==_0x19d456['type']?_0x19d456['previousPosition']['path']['slice'](0x0,-0x1):_0x19d456['previousPosition']['path'],_0x4f7ef0=_0x4a1919['getNodeByPath'](_0x245345);_0x4f7ef0['getAttribute'](_0x21f6ef)>0x0||_0x4f7ef0['_setAttribute'](_0x21f6ef,_0x88caf9[_0x58a725++]);}for(const [_0x1f0927,_0x3a2856]of _0x4fcb37['markers'])_0x1f0927['startsWith']('revision:')||this['_markers']['set'](_0x1f0927,_0x3a2856);}const {roots:_0x350e72}=this['_savedMetaData']['get'](_0x4dc660['fromVersion']),{roots:_0x5021ba}=this['_savedMetaData']['get'](_0x4dc660['toVersion']),_0x480a11=bt(_0x350e72['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x480a11),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x480a11,Number['NEGATIVE_INFINITY']));const _0x163583=bt(_0x5021ba['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x163583),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x163583));const _0x5bada7=Array['from'](this['_diffRoots'])['map'](([_0x3b280f,_0x462d41])=>[_0x3b280f,bt(_0x462d41)]);this['_saveMetaData'](this['_lastTo'],_0x5bada7,this['_markers'],_0x17ad1f);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x45315a,_0x515374,_0x582283,_0x377bd8){const _0x590519=new Map(_0x515374),_0x3d2f68=new Map(_0x28481c(_0x377bd8)),_0x314dbc=new Map();for(const [_0x265276,_0x4ea9cd]of _0x582283)_0x314dbc['set'](_0x265276,{'start':_0x4ea9cd['start']['clone'](),'end':_0x4ea9cd['end']['clone'](),'rootName':_0x4ea9cd['root']['rootName']});this['_savedMetaData']['set'](_0x45315a,{'roots':_0x590519,'markers':_0x314dbc,'rootsAttributes':_0x3d2f68});}['_removeMetaData'](_0x20311b){this['_savedMetaData']['delete'](_0x20311b);}['_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'](_0x46d3d7,_0x5403ea=null){let _0x362ceb=null;_0x46d3d7['is']('documentFragment')||(_0x362ceb=new _0x5ebea3(_0x46d3d7['name'],{'vid_start':null===_0x5403ea?this['_revisionId']++:_0x5403ea++}));const _0x2907c0=[];for(const _0xfc5efc of _0x46d3d7['getChildren']())if(_0xfc5efc['is']('element')){_0x2907c0['push'](this['_makeIdsRoot'](_0xfc5efc,_0x5403ea));const _0x10f22b=_0x2907c0[_0x2907c0['length']-0x1];null!==_0x5403ea&&(_0x5403ea=_0x10f22b['is']('element','$text')?_0x10f22b['getAttribute']('vid')+0x1:_0x10f22b['getAttribute']('vid_end')+0x1);}else{for(let _0x4ef7fa=0x0;_0x4ef7fa<_0xfc5efc['offsetSize'];_0x4ef7fa++)_0x2907c0['push'](new _0x5ebea3('$text',{'vid':null===_0x5403ea?this['_revisionId']++:_0x5403ea++}));}if(_0x46d3d7['is']('documentFragment')){const _0x2a1b6b=Rt(_0x46d3d7['rootName'],_0x46d3d7['name']);return _0x2a1b6b['_insertChild'](0x0,_0x2907c0),_0x2a1b6b;}return _0x362ceb['_setAttribute']('vid_end',null===_0x5403ea?this['_revisionId']++:_0x5403ea++),_0x362ceb['_insertChild'](0x0,_0x2907c0),_0x362ceb;}['_calculateMetaData'](_0x499b8c,_0x2dcd5a,_0x103337){this['_reset']();const {roots:_0x25ee2e,markers:_0x1325e7,rootsAttributes:_0x3e48a3}=this['_savedMetaData']['get'](_0x499b8c);this['_baseRoots']=new Map(_0x25ee2e),this['_baseRootsAttributes']=new Map(_0x28481c(_0x3e48a3));for(const [_0xa5810f,_0x19fcc6]of this['_baseRoots'])if('$graveyard'!==_0xa5810f&&(this['_diffRoots']['set'](_0xa5810f,bt(_0x19fcc6)),this['_diffRootsAttributes']=new Map(_0x28481c(_0x3e48a3)),_0x103337)){const _0x3faef4=this['_revisionId'];this['_idsRoots']['set'](_0xa5810f,this['_makeIdsRoot'](_0x19fcc6)),this['_baseIdsRoots']['set'](_0xa5810f,this['_makeIdsRoot'](_0x19fcc6,_0x3faef4));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x103337&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x82e6b0,_0x5509ee]of _0x1325e7){const _0x532a0e=this['_baseRoots']['get'](_0x5509ee['rootName']),_0x238a4d=this['_diffRoots']['get'](_0x5509ee['rootName']),_0x3efb20=new _0x830771(this['_fixPosition'](_0x5509ee['start'],_0x532a0e),this['_fixPosition'](_0x5509ee['end'],_0x532a0e)),_0xa93dea=this['_fixRange'](_0x3efb20,_0x238a4d);_0x532a0e['markers']['set'](_0x82e6b0,_0x3efb20),this['_markers']['set'](_0x82e6b0,_0xa93dea);}this['_applyOperations'](_0x499b8c,_0x2dcd5a,_0x103337);}['_applyOperations'](_0x98010d,_0x503610,_0x1ff853){for(const _0xcbeec3 of this['source']['getOperations'](_0x98010d,_0x503610))this['_handleOperation'](_0xcbeec3,_0x1ff853);for(const _0x480018 of this['_diffRoots']['values']())_0x480018['markers']['clear']();for(const [_0x3a0e1f,_0xc6d11]of this['_markers'])this['_diffRoots']['get'](_0xc6d11['root']['rootName'])['markers']['set'](_0x3a0e1f,_0xc6d11['clone']());const _0x1b5958=new Map(),_0x39beab=new Map();for(const [_0x65914b,_0x457726]of this['_diffRoots'])_0x1b5958['set'](_0x65914b,bt(_0x457726)),_0x39beab['set'](_0x65914b,this['_diffRootsAttributes']['get'](_0x65914b));this['_saveMetaData'](_0x503610,_0x1b5958,this['_markers'],_0x39beab);}['_getPreviousFrom'](_0x4e1d78){const _0x4894c8=Array['from'](this['_savedMetaData']['keys']());_0x4894c8['sort']((_0x30f183,_0x79860d)=>_0x30f183-_0x79860d),_0x4894c8['reverse']();for(const _0x457472 of _0x4894c8)if(_0x457472<_0x4e1d78)return _0x457472;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4d41cd,_0x23682d){const _0x5aa15b=Array['from'](_0x23682d['markers'])['map'](([_0x2e305e,_0x1e734b])=>[_0x2e305e,this['_fixRange'](_0x1e734b,_0x4d41cd)]);_0x4d41cd['markers']=new Map(_0x5aa15b);}['_transformMarkers'](_0x236a1c){for(const _0x417cbd of this['_markers']['values']()){const _0x11d21c=_0x417cbd['getTransformedByOperation'](_0x236a1c),_0x40bde8=_0x830771['_createFromRanges'](_0x11d21c);_0x417cbd['start']=_0x40bde8['start'],_0x417cbd['end']=_0x40bde8['end'];}}['_handleOperation'](_0x1441c1,_0x24030a){if('addRoot'!=_0x1441c1['type']&&'detachRoot'!=_0x1441c1['type']){if('insert'==_0x1441c1['type']){const _0x941dbe=_0x1441c1['position']['root'],_0xf33c60=_0x941dbe['rootName'],_0x3d6607=_0x941dbe['name'];this['_diffRoots']['has'](_0xf33c60)||(this['_diffRoots']['set'](_0xf33c60,Rt(_0xf33c60,_0x3d6607,!0x0)),this['_diffRootsAttributes']['set'](_0xf33c60,{}),_0x24030a&&this['_idsRoots']['set'](_0xf33c60,Rt(_0xf33c60,_0x3d6607,!0x0)));}else{if('addRootAttribute'==_0x1441c1['type']||'removeRootAttribute'==_0x1441c1['type']||'changeRootAttribute'==_0x1441c1['type'])return void this['_handleRootAttributeOperation'](_0x1441c1);'marker'==_0x1441c1['type']&&this['_handleMarkerOperation'](_0x1441c1);}if('marker'!==_0x1441c1['type']){const _0x550a4e=this['_cloneOperation'](_0x1441c1,this['_diffRoots']);_0x550a4e['_execute'](),this['_transformMarkers'](_0x550a4e);}if(_0x24030a)switch(_0x1441c1['type']){case'insert':this['_handleInsertOperation'](_0x1441c1);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1441c1);break;case'merge':this['_handleMergeOperation'](_0x1441c1);break;case'split':this['_handleSplitOperation'](_0x1441c1);}}else this['_handleRootOperation'](_0x1441c1,_0x24030a);}['_cloneOperation'](_0x34b1a7,_0x3e68e5){const _0x54893a=_0x34b1a7['clone']();return _0x54893a['_authorId']=_0x34b1a7['_authorId'],this['_fixOperation'](_0x54893a,_0x3e68e5),_0x54893a;}['_getBaseVids'](_0x17ff97){return _0x17ff97['map'](_0x11d056=>{const _0x15a2cd=this['_getVidAttributeName'](_0x11d056);return Number(_0x11d056['item']['getAttribute'](_0x15a2cd));});}['_generateTape'](_0x14709c,_0xecd980){if(_0x14709c['is']('element','$text'))_0xecd980['push']({'item':_0x14709c,'type':'text'});else{_0x14709c['is']('element')&&_0xecd980['push']({'item':_0x14709c,'type':'elementStart'});for(const _0x100a56 of _0x14709c['getChildren']())this['_generateTape'](_0x100a56,_0xecd980);_0x14709c['is']('element')&&_0xecd980['push']({'item':_0x14709c,'type':'elementEnd'});}return _0xecd980;}['_getState'](){const _0xa268df=new Map(this['_touched']),_0x19e1b3=new Map(_0xa268df),_0x1de117=new Map(),_0x227b97={'insertions':{},'deletions':{}},_0x469477={'insertions':{},'deletions':{}},_0x1244d8=new Map(),_0x367803=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x535f30=new Map();_0x367803['delete']('$graveyard');for(const _0x311bc0 of _0x367803){const _0x182c0d=(this['_diffRoots']['get'](_0x311bc0)??this['_baseRoots']['get'](_0x311bc0))['name'],_0x3b14ef=this['_diffRoots']['get'](_0x311bc0)||Rt(_0x311bc0,_0x182c0d,!0x1),_0x33f5c7=this['_baseRoots']['get'](_0x311bc0)||Rt(_0x311bc0,_0x182c0d,!0x1);_0x3b14ef['isAttached']()||_0x33f5c7['isAttached']()?(_0x535f30['set'](_0x311bc0,_0x182c0d),_0x227b97['insertions'][_0x311bc0]=bt(_0x3b14ef),_0x227b97['deletions'][_0x311bc0]=bt(_0x33f5c7),this['_copyMarkers'](_0x227b97['deletions'][_0x311bc0],_0x33f5c7),this['_copyMarkers'](_0x227b97['insertions'][_0x311bc0],_0x3b14ef),_0x469477['insertions'][_0x311bc0]=this['_generateTape'](this['_idsRoots']['get'](_0x311bc0),[]),_0x469477['deletions'][_0x311bc0]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x311bc0)||Rt(_0x311bc0,_0x182c0d,!0x1),[])):_0x367803['delete'](_0x311bc0);}for(const _0x17690b of _0x367803){const _0x3445e6=_0x469477['insertions'][_0x17690b];for(const _0x3e19bc of _0x3445e6){const _0x57b067=this['_getVidAttributeName'](_0x3e19bc),_0x4b3c1b=_0x3e19bc['item']['getAttribute'](_0x57b067);_0x19e1b3['delete'](_0x4b3c1b),_0x4b3c1b>=this['_startingRevisionId']&&_0x1de117['set'](_0x4b3c1b,_0xa268df['get'](_0x4b3c1b));}}for(const _0x40755f of _0x367803){const _0x35ae02=_0x469477['insertions'][_0x40755f],_0x295f05=this['_getBaseVids'](_0x469477['deletions'][_0x40755f]);let _0x124733=0x0;for(const _0x2b6294 of _0x35ae02){const _0x1c595f=this['_getVidAttributeName'](_0x2b6294),_0x380310=_0x2b6294['item']['getAttribute'](_0x1c595f);if(!_0x1de117['has'](_0x380310)&&!_0x1244d8['has'](_0x380310)){if(_0x19e1b3['has'](_0x380310))_0x124733++;else{if(_0x380310!=_0x295f05[_0x124733]){const _0x1e1ae5=_0xa268df['get'](_0x380310)||_0xa268df['get'](_0x295f05[_0x124733]);for(;_0x380310!=_0x295f05[_0x124733];)_0x19e1b3['has'](_0x295f05[_0x124733])||(_0x1244d8['set'](_0x295f05[_0x124733],_0x1e1ae5),_0xa268df['set'](_0x295f05[_0x124733],_0x1e1ae5)),_0x124733++;}_0x124733++;}}}}for(const _0x18fea6 of _0x367803){const _0x4eca45=_0x469477['insertions'][_0x18fea6];for(const _0x2e2349 of _0x4eca45){const _0x38111d=this['_getVidAttributeName'](_0x2e2349),_0x58be9b=_0x2e2349['item']['getAttribute'](_0x38111d);if(_0x1244d8['has'](_0x58be9b)){const _0x2967f6=_0x1244d8['get'](_0x58be9b);_0x19e1b3['has'](_0x58be9b)||_0x19e1b3['set'](_0x58be9b,{..._0x2967f6}),_0x1de117['set'](_0x58be9b,{..._0x2967f6});}}}for(const _0x4d0068 of _0x19e1b3['keys']())_0x4d0068>=this['_startingRevisionId']&&_0x19e1b3['delete'](_0x4d0068);const _0x36d957=new Map();for(const _0x3b1e2e of _0x367803){let _0x2212c6=_0x469477['insertions'][_0x3b1e2e];for(const _0x38e8a8 of _0x2212c6)if(_0x38e8a8['item']['is']('element','tableCell')){const _0x681506=this['_getVidAttributeName'](_0x38e8a8),_0x3d3220=_0x38e8a8['item']['getAttribute'](_0x681506);if(_0x1de117['has'](_0x3d3220)){const _0x8fc366=_0x38e8a8['item']['parent']['parent']['getAttribute']('vid_start'),_0x347b65=_0x36d957['get'](_0x8fc366)||new Set();_0x347b65['add'](_0x1de117['get'](_0x3d3220)['userId']),_0x36d957['set'](_0x8fc366,_0x347b65);}}_0x2212c6=_0x469477['deletions'][_0x3b1e2e];for(const _0x413e8e of _0x2212c6)if(_0x413e8e['item']['is']('element','tableCell')){const _0xf9c3e0=this['_getVidAttributeName'](_0x413e8e),_0x397e24=_0x413e8e['item']['getAttribute'](_0xf9c3e0);if(_0x19e1b3['has'](_0x397e24)){const _0x383058=_0x413e8e['item']['parent']['parent']['getAttribute']('vid_start'),_0x14303d=_0x36d957['get'](_0x383058)||new Set();_0x14303d['add'](_0x19e1b3['get'](_0x397e24)['userId']),_0x36d957['set'](_0x383058,_0x14303d);}}for(const _0x4a21a3 of _0x36d957['keys']())(_0x1de117['has'](_0x4a21a3)||_0x19e1b3['has'](_0x4a21a3))&&_0x36d957['delete'](_0x4a21a3);}for(const _0x2a436c of _0x367803){const _0x336346=_0x469477['insertions'][_0x2a436c];let _0x45be89=null,_0xfa9b6=null;for(const _0x58fa40 of _0x336346){const _0x2c8b2f=this['_getVidAttributeName'](_0x58fa40),_0x3fda6e=_0x58fa40['item']['getAttribute'](_0x2c8b2f),_0x2bdcc8=_0x36d957['get'](_0x3fda6e);_0x2bdcc8&&'elementStart'==_0x58fa40['type']&&(_0x45be89=Array['from'](_0x2bdcc8)[0x0],_0xfa9b6=_0x58fa40['item']['getAttribute']('vid_end')),_0x45be89&&(_0x19e1b3['set'](_0x3fda6e,{'userId':_0x45be89}),_0x1de117['set'](_0x3fda6e,{'userId':_0x45be89})),_0x3fda6e==_0xfa9b6&&(_0x45be89=null,_0xfa9b6=null);}}const _0x496982={},_0xff459c=new Set();for(const _0x4860cd of _0x367803){const _0x184588=_0x227b97['deletions'][_0x4860cd],_0x4a1e8f=_0x227b97['insertions'][_0x4860cd];for(const {userId:_0x3c00e6}of this['_touchedMarkers']['values']())null!==_0x3c00e6&&_0xff459c['add'](_0x3c00e6);for(const {userId:_0x28e08b}of this['_touchedRoots']['values']())null!==_0x28e08b&&_0xff459c['add'](_0x28e08b);this['_markChanges'](_0x4a1e8f,_0x469477['insertions'][_0x4860cd],_0x1de117,'insertion',_0xff459c),this['_markChanges'](_0x184588,_0x469477['deletions'][_0x4860cd],_0x19e1b3,'deletion',_0xff459c),_0x496982[_0x4860cd]={'insertions':this['_prepareViewToSave'](_0x4a1e8f),'deletions':this['_prepareViewToSave'](_0x184588),'attachChange':this['_touchedRoots']['get'](_0x4860cd)||null,'attributesBefore':_0x28481c(this['_baseRootsAttributes']['get'](_0x4860cd))||{},'attributesAfter':_0x28481c(this['_diffRootsAttributes']['get'](_0x4860cd)),'rootElementName':_0x535f30['get'](_0x4860cd)};}return{'diffData':_0x496982,'authorsIds':Array['from'](_0xff459c)};}['_processRootBeforeSave'](_0x16d092){for(const [,_0x481cdc]of _0x16d092['markers']){const _0x549854=_0x481cdc['start']['getAncestors']()['filter'](_0x3125a1=>'tableCell'==_0x3125a1['name']);for(const _0x33d5df of _0x549854)0x1==_0x33d5df['childCount']&&_0x33d5df['getChild'](0x0)['is']('element','paragraph')&&_0x33d5df['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x450890){this['_processRootBeforeSave'](_0x450890);const _0x2cca59=this['editor']['data']['toView'](_0x450890,{}),_0x28a18a=Array['from'](_0x2cca59['getChildren']())['map'](_0x19baa3=>this['_getViewJson'](_0x19baa3));return JSON['stringify'](_0x28a18a);}['_getViewJson'](_0x2df296){if(_0x2df296['is']('$text'))return _0x2df296['data'];{const _0x132407=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x2ccff1=_0x2df296,_0x56471e=this['editor']['data']['htmlProcessor']['domConverter'],_0x14f518={'type':_0x132407['_getTypeCharForViewElement'](_0x2ccff1),'name':_0x2ccff1['name'],'attributes':Array['from'](_0x2ccff1['getAttributes']()),'children':Array['from'](_0x2ccff1['getChildren']())['map'](_0x5db0d8=>this['_getViewJson'](_0x5db0d8))};if(_0x2df296['is']('uiElement')&&'$comment'!=_0x2df296['name']){const _0xbd84dd=_0x2df296['render'](_0x56471e['domDocument'],_0x56471e);_0x14f518['children']['push'](_0xbd84dd['outerHTML']);}else{if(_0x2df296['is']('rawElement')){const _0x17edf4=_0x56471e['domDocument']['createElement'](_0x2ccff1['name']);_0x2df296['render'](_0x17edf4,_0x56471e),_0x14f518['children']['push'](_0x17edf4['innerHTML']);}}const _0x213cc0=Array['from'](_0x2ccff1['getCustomProperties']());_0x213cc0['length']>0x0&&(_0x14f518['customProperties']=_0x213cc0);const _0x2a4901=_0x2ccff1['getFillerOffset']();return null!==_0x2a4901&&(_0x14f518['fillerOffset']=_0x2a4901),_0x14f518;}}['_markChanges'](_0x2cd574,_0x22f18a,_0x3e3038,_0x46baf0,_0x5e42ab){let _0x30a376=null,_0x3f2045=null,_0x2ee2e4=0x0;const _0x5b840=this['editor']['model'];for(let _0x8f6666=0x0;_0x8f6666<_0x22f18a['length'];_0x8f6666++){const _0x46a7cc=this['_getVidAttributeName'](_0x22f18a[_0x8f6666]),_0x59501f=_0x22f18a[_0x8f6666]['item']['getAttribute'](_0x46a7cc),_0x4b0f6b=_0x3e3038['get'](_0x59501f),_0x5b4435=_0x8f6666==_0x22f18a['length']-0x1;!_0x30a376&&_0x4b0f6b&&(_0x30a376=_0x4b0f6b,_0x3f2045=_0x22f18a[_0x8f6666]),!_0x30a376||_0x4b0f6b&&_0x4b0f6b['userId']==_0x30a376['userId']||(_0x37f033(_0x4b0f6b,kt(_0x3f2045,_0x2cd574,_0x5b840),kt(_0x22f18a[_0x8f6666],_0x2cd574,_0x5b840)),_0x30a376=_0x4b0f6b||null,_0x3f2045=_0x4b0f6b?_0x22f18a[_0x8f6666]:null),_0x30a376&&_0x5b4435&&_0x37f033(_0x4b0f6b,kt(_0x3f2045,_0x2cd574,_0x5b840),At(_0x22f18a[_0x8f6666],_0x2cd574,_0x5b840));}function _0x37f033(_0x5e3f66,_0x24eaf9,_0x33e30a){const _0xf73f45=_0x30a376['userId'],_0x5c8d89='revision:'+_0x46baf0+':'+_0xf73f45+':'+_0x2ee2e4++,_0x3e7bd9=_0x5b840['createRange'](_0x24eaf9,_0x33e30a);_0x2cd574['markers']['set'](_0x5c8d89,_0x3e7bd9),null!==_0xf73f45&&_0x5e42ab['add'](_0xf73f45);}}['_getVidAttributeName'](_0x604f18){switch(_0x604f18['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x50b2d5,_0x2dce6a){_0x50b2d5['baseVersion']=null;for(const _0x2e2e in _0x50b2d5){const _0x1e5156=_0x50b2d5[_0x2e2e];if(_0x1e5156 instanceof _0x2779d2){const _0x3a9321=_0x2dce6a['get'](_0x1e5156['root']['rootName']);_0x50b2d5[_0x2e2e]=this['_fixPosition'](_0x1e5156,_0x3a9321);}if(_0x1e5156 instanceof _0x830771){const _0xb0ee83=_0x2dce6a['get'](_0x1e5156['root']['rootName']);_0x50b2d5[_0x2e2e]=this['_fixRange'](_0x1e5156,_0xb0ee83);}'root'===_0x2e2e&&(_0x50b2d5['root']=_0x2dce6a['get'](_0x50b2d5['root']['rootName']));}}['_fixRange'](_0x5bda1d,_0x376c4f){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5bda1d['start'],_0x376c4f),this['_fixPosition'](_0x5bda1d['end'],_0x376c4f));}['_fixPosition'](_0x59d717,_0x55d0fd){return this['editor']['model']['createPositionFromPath'](_0x55d0fd,_0x59d717['path'],_0x59d717['stickiness']);}['_handleInsertOperation'](_0x28a6b1){const _0x2db31d=this['_idsRoots']['get'](_0x28a6b1['position']['root']['rootName']),_0x380862=this['_fixPosition'](_0x28a6b1['position'],_0x2db31d),_0x14acb0=null===_0x28a6b1['_authorId']?null:_0x28a6b1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21accb=_0x380862['parent'],_0x5999b0=this['_revisionId'],_0x5da899=[];for(const _0x2d4edc of _0x28a6b1['nodes'])if(_0x2d4edc['is']('element'))_0x5da899['push'](this['_makeIdsRoot'](_0x2d4edc));else{for(let _0x4d3b02=0x0;_0x4d3b02<_0x2d4edc['offsetSize'];_0x4d3b02++)_0x5da899['push'](new _0x5ebea3('$text',{'vid':this['_revisionId']++}));}const _0x4fb42a=this['_revisionId'];for(let _0x17b971=_0x5999b0;_0x17b971<_0x4fb42a;_0x17b971++)this['_touched']['set'](_0x17b971,{'userId':_0x14acb0});_0x21accb['_insertChild'](_0x380862['offset'],_0x5da899);}['_handleMoveOperation'](_0x3380ac){(_0x3380ac=this['_cloneOperation'](_0x3380ac,this['_idsRoots']))['_execute']();const _0x38b88e=null===_0x3380ac['_authorId']?null:_0x3380ac['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4bdc20=_0x3380ac['getMovedRangeStart'](),_0x356e32=_0x4bdc20['parent'],_0x149f06=_0x4bdc20['offset'];!function _0x1413a0(_0x19dad1,_0x463467,_0x2e7a10,_0x1f91b){for(let _0x314a79=_0x2e7a10;_0x314a79<_0x1f91b;_0x314a79++){const _0x561c82=_0x463467['getChild'](_0x314a79);_0x561c82['is']('element','$text')?_0x19dad1['set'](_0x561c82['getAttribute']('vid'),{'userId':_0x38b88e}):(_0x19dad1['set'](_0x561c82['getAttribute']('vid_start'),{'userId':_0x38b88e}),_0x1413a0(_0x19dad1,_0x561c82,0x0,_0x561c82['childCount']),_0x19dad1['set'](_0x561c82['getAttribute']('vid_end'),{'userId':_0x38b88e}));}}(this['_touched'],_0x356e32,_0x149f06,_0x149f06+_0x3380ac['howMany']);}['_handleMergeOperation'](_0xe7eaf9){const _0x203a26=null===(_0xe7eaf9=this['_cloneOperation'](_0xe7eaf9,this['_idsRoots']))['_authorId']?null:_0xe7eaf9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2461be=_0xe7eaf9['targetPosition']['parent'],_0x275eae=_0xe7eaf9['sourcePosition']['parent'],_0x271748=_0x2461be['getAttribute']('vid_end'),_0x5eca30=_0x275eae['getAttribute']('vid_start');_0x2461be['_setAttribute']('vid_end',_0x275eae['getAttribute']('vid_end')),_0x275eae['_setAttribute']('vid_end',_0x271748),this['_touched']['set'](_0x5eca30,{'userId':_0x203a26}),this['_touched']['set'](_0x271748,{'userId':_0x203a26}),_0xe7eaf9['_execute']();}['_handleSplitOperation'](_0x9255a6){const _0x296dbd=null===(_0x9255a6=this['_cloneOperation'](_0x9255a6,this['_idsRoots']))['_authorId']?null:_0x9255a6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xeec052=_0x9255a6['graveyardPosition'],_0x35e8e7=_0x9255a6['splitPosition']['parent'];_0x9255a6['_execute']();const _0x38d9d4=_0x35e8e7['getAttribute']('vid_end'),_0x3a53b5=_0x9255a6['insertionPosition']['nodeAfter'];if(_0xeec052){const _0x2a39ee=_0x3a53b5['getAttribute']('vid_end'),_0x2c243=_0x35e8e7['getAttribute']('vid_end');_0x35e8e7['_setAttribute']('vid_end',_0x2a39ee),_0x3a53b5['_setAttribute']('vid_end',_0x2c243),this['_touched']['set'](_0x35e8e7['getAttribute']('vid_end'),{'userId':_0x296dbd}),this['_touched']['set'](_0x3a53b5['getAttribute']('vid_start'),{'userId':_0x296dbd});}else{const _0x43cb2b=this['_revisionId']++,_0x35b6b4=this['_revisionId']++;_0x35e8e7['_setAttribute']('vid_end',_0x43cb2b),_0x3a53b5['_setAttribute']('vid_start',_0x35b6b4),_0x3a53b5['_setAttribute']('vid_end',_0x38d9d4),this['_touched']['set'](_0x43cb2b,{'userId':_0x296dbd}),this['_touched']['set'](_0x35b6b4,{'userId':_0x296dbd});}}['_handleMarkerOperation'](_0x29b3a9){if(!_0x29b3a9['affectsData'])return;const _0xc651ed=(_0x29b3a9=this['_cloneOperation'](_0x29b3a9,this['_diffRoots']))['oldRange']?_0x29b3a9['oldRange']['root']:null,_0x3782ba=_0x29b3a9['newRange']?_0x29b3a9['newRange']['root']:null;_0xc651ed&&this['_markers']['delete'](_0x29b3a9['name']),_0x3782ba&&this['_markers']['set'](_0x29b3a9['name'],_0x29b3a9['newRange']['clone']());const _0x343741=null===_0x29b3a9['_authorId']?null:_0x29b3a9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x300552=_0x29b3a9['name'];if(!this['_touchedMarkers']['has'](_0x300552))return void this['_touchedMarkers']['set'](_0x300552,{'range':_0x29b3a9['oldRange'],'userId':_0x343741});const _0xa198f0=this['_touchedMarkers']['get'](_0x300552),_0x340253=_0xa198f0['range'],_0x3518f3=_0x29b3a9['newRange'];null==_0x340253&&null==_0x3518f3||_0x340253&&_0x3518f3&&_0x340253['isEqual'](_0x3518f3)?this['_touchedMarkers']['delete'](_0x29b3a9['name']):_0xa198f0['userId']=_0x343741;}['_handleRootOperation'](_0xd17ead,_0xbb3ddd){this['_diffRoots']['has'](_0xd17ead['rootName'])?this['_diffRoots']['get'](_0xd17ead['rootName'])['_isAttached']=_0xd17ead['isAdd']:(this['_diffRoots']['set'](_0xd17ead['rootName'],Rt(_0xd17ead['rootName'],_0xd17ead['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0xd17ead['rootName'],{}),_0xbb3ddd&&this['_idsRoots']['set'](_0xd17ead['rootName'],Rt(_0xd17ead['rootName'],_0xd17ead['elementName'],!0x0)));const _0x21450a=null===_0xd17ead['_authorId']?null:_0xd17ead['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40dca4=this['_touchedRoots']['get'](_0xd17ead['rootName']);_0x40dca4&&_0x40dca4['userId']===_0x21450a?this['_touchedRoots']['delete'](_0xd17ead['rootName']):this['_touchedRoots']['set'](_0xd17ead['rootName'],{'userId':_0x21450a,'isAttached':_0xd17ead['isAdd']});}['_handleRootAttributeOperation'](_0x3ceda4){const _0x2cd03b=this['_diffRootsAttributes']['get'](_0x3ceda4['root']['rootName']);null===_0x3ceda4['newValue']?delete _0x2cd03b[_0x3ceda4['key']]:_0x2cd03b[_0x3ceda4['key']]=_0x3ceda4['newValue'];}};function bt(_0x5dd636){const _0x44b500=Rt(_0x5dd636['rootName'],_0x5dd636['name'],_0x5dd636['isAttached']());for(const _0x2de45c of _0x5dd636['getChildren']()){const _0x2347e7=_0x2de45c['_clone'](!0x0);_0x44b500['_appendChild'](_0x2347e7);}return _0x44b500;}function Rt(_0x170937,_0x1aac0a,_0x23a09f=!0x0){const _0x43185f=new _0x2136fb();return _0x43185f['rootName']=_0x170937,_0x43185f['name']=_0x1aac0a,_0x43185f['_isAttached']=_0x23a09f,_0x43185f['isAttached']=()=>_0x43185f['_isAttached'],_0x43185f;}function kt(_0x558aea,_0x1b0443,_0x3f790b){const _0x19936c='elementEnd'==_0x558aea['type']?_0x3f790b['createPositionAt'](_0x558aea['item'],'end'):_0x3f790b['createPositionBefore'](_0x558aea['item']);return _0x3f790b['createPositionFromPath'](_0x1b0443,_0x19936c['path'],_0x19936c['stickiness']);}function At(_0x47aed5,_0x4704ba,_0x1b0b62){const _0x2d63c0='elementStart'==_0x47aed5['type']?_0x1b0b62['createPositionAt'](_0x47aed5['item'],0x0):_0x1b0b62['createPositionAfter'](_0x47aed5['item']);return _0x1b0b62['createPositionFromPath'](_0x4704ba,_0x2d63c0['path'],_0x2d63c0['stickiness']);}const It=/* #__PURE__ -- @preserve */
25
- _0x735ba7(at);var Et=class extends It{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x2078bb,_0x21b37d){super(_0x2078bb),this['focusTracker']=new _0x8acf98(),this['keystrokes']=new _0x142511(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x21b37d),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'](),dt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x3def62=_0x164d2b=>_0x164d2b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x3def62),this['keystrokes']['set']('arrowleft',_0x3def62),this['keystrokes']['set']('arrowup',_0x3def62),this['keystrokes']['set']('arrowdown',_0x3def62);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x248f14){this['revisionNameInputView']['fieldView']['element']['value']=_0x248f14['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x29c054){const _0x1f59ae=new _0x1a4e29(this['locale'],lt),_0x214b4f=_0x1f59ae['fieldView'];_0x214b4f['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x271d0a=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x29c054&&(_0x271d0a+='\x20('+pt(this['locale'],'optional')+')'),(_0x1f59ae['label']=_0x271d0a,_0x214b4f['on']('input',()=>{this['revisionNameInputValue']=_0x214b4f['element']['value']['trim']();}),_0x1f59ae);}},St=class extends _0x592ef7{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t];}['_saveRevisionFormView'];['init'](){const _0x35adce=this['editor'],_0x5083a6=_0x35adce['plugins']['get']('RevisionTracker');_0x35adce['ui']['componentFactory']['add']('revisionHistory',_0x2ccabc=>{const _0x3c1c69=ct(_0x2ccabc),_0x33114b=_0x3c1c69['panelView']['children'],_0x1c6d57=new _0x37c124(_0x2ccabc),_0x1b7bea=new _0x3ab91f(_0x2ccabc),_0x31d581=this['_createSaveRevisionButton'](_0x5ab628),_0x302ed2=new _0x3ab91f(_0x2ccabc),_0x5b1978=this['_createOpenRevisionButton'](_0x5ab628);return _0x3c1c69['bind']('isEnabled')['to'](_0x5083a6,'isReady',_0x5083a6,'isEnabled',_0x35adce,'isReadOnly',(_0x5547f8,_0x21f7c3,_0x3b67af)=>_0x5547f8&&_0x21f7c3&&!_0x3b67af),_0x3c1c69['buttonView']['set']({'icon':_0x5fc2b3,'label':pt(_0x2ccabc,'Revision\x20history'),'tooltip':!0x0}),_0x31d581['set']({'withText':!0x0,'role':'menuitem'}),_0x5b1978['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x5b1978,'execute',()=>{_0x3c1c69['isOpen']=!0x1,_0x35adce['editing']['view']['focus']();},{'priority':'low'}),_0x1b7bea['children']['add'](_0x31d581),_0x302ed2['children']['add'](_0x5b1978),_0x1c6d57['role']='menu',_0x1c6d57['items']['addMany']([_0x1b7bea,_0x302ed2]),_0x33114b['add'](_0x1c6d57),_0x3c1c69;}),_0x35adce['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x51b820=this['editor'],_0x4d35f0=_0x51b820['locale'],_0x48020c=_0x51b820['plugins']['get']('RevisionTracker'),_0x4a1ae8=new et(_0x4d35f0),_0x534762=new it(_0x4d35f0);_0x4a1ae8['bind']('isEnabled')['to'](_0x48020c,'isReady',_0x48020c,'isEnabled',_0x51b820,'isReadOnly',(_0x1d0588,_0x10c508,_0x570a4e)=>_0x1d0588&&_0x10c508&&!_0x570a4e),_0x4a1ae8['buttonView']['set']({'icon':_0x5fc2b3,'label':pt(_0x4d35f0,'Revision\x20history')});const _0xb3d26c=new tt(_0x4d35f0,_0x4a1ae8),_0x341b97=this['_createSaveRevisionButton'](_0x5b83fc);_0x341b97['delegate']('execute')['to'](_0x4a1ae8),_0xb3d26c['children']['add'](_0x341b97),_0x534762['items']['add'](_0xb3d26c);const _0x429efb=new tt(_0x4d35f0,_0x4a1ae8),_0x14ff42=this['_createOpenRevisionButton'](_0x5b83fc);return _0x14ff42['delegate']('execute')['to'](_0x4a1ae8),_0x429efb['children']['add'](_0x14ff42),_0x534762['items']['add'](_0x429efb),_0x4a1ae8['panelView']['children']['add'](_0x534762),_0x4a1ae8;}['_createSaveRevisionButton'](_0x3b170f){const _0xa30996=this['editor'],_0x251859=_0xa30996['plugins']['get']('RevisionTracker'),_0x4aaee4=new _0x3b170f(_0xa30996['locale']);return _0x4aaee4['set']({'label':pt(_0xa30996['locale'],'Save\x20current\x20revision')}),_0x4aaee4['bind']('isEnabled')['to'](_0x251859,'isReady',_0x251859,'isEnabled',_0xa30996,'isReadOnly',(_0x196d62,_0x506ed0,_0x1b5477)=>_0x196d62&&_0x506ed0&&!_0x1b5477),this['listenTo'](_0x4aaee4,'execute',()=>{this['_showDialog']();}),_0x4aaee4;}['_createOpenRevisionButton'](_0x4a758c){const _0x674af7=this['editor'],_0x30a5ee=_0x674af7['plugins']['get']('RevisionTracker'),_0x41f43a=new _0x4a758c(_0x674af7['locale']);return _0x41f43a['set']({'label':pt(_0x674af7['locale'],'Open\x20revision\x20history')}),_0x41f43a['bind']('isEnabled')['to'](_0x30a5ee,'isReady',_0x674af7,'isReadOnly',(_0xdd573a,_0x349497)=>_0xdd573a&&!_0x349497),this['listenTo'](_0x41f43a,'execute',()=>{_0x674af7['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x41f43a;}['_showDialog'](){const _0x115317=this['editor'],_0x55935f=_0x115317['locale'],_0x4dbf6b=_0x115317['plugins']['get']('Dialog'),_0x4ee802=_0x115317['plugins']['get']('RevisionTracker');function _0x1713fc(_0x407d19){_0x115317['config']['get']('revisionHistory.requireRevisionName')&&''===_0x407d19['revisionName']?_0x407d19['revisionNameInputView']['errorText']=pt(_0x55935f,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x115317['plugins']['get'](_t)['saveRevision']({'name':_0x407d19['revisionName']}),_0x4dbf6b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1713fc(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4dbf6b['show']({'id':'revisionSave','title':pt(_0x55935f,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x115317['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4dbf6b['hide']()},{'label':pt(_0x115317['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x470e43){_0x470e43['bind']('isEnabled')['to'](_0x4ee802,'isReady',_0x4ee802,'isEnabled',_0x115317,'isReadOnly',(_0xf91018,_0x456d0a,_0x34875a)=>_0xf91018&&_0x456d0a&&!_0x34875a);},'onExecute':()=>_0x1713fc(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x43cb14=this['editor'],_0x2066e2=_0x43cb14['locale'];this['_saveRevisionFormView']=new Et(_0x2066e2,_0x43cb14['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x5513f1,_0x1ba1f3){super(_0x5513f1),this['_model']=_0x1ba1f3,this['changeId']=_0x1ba1f3['id'];const _0x5ad022=this['bindTemplate'],_0x3f8fc8=pt(_0x5513f1,_0x1ba1f3['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1ba1f3['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1ba1f3['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5ad022['to']('type',_0x67c39=>'ck-revision-change__'+_0x67c39)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x3f8fc8}]},{'text':'\x20'+_0x1ba1f3['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
26
- _0x3c8f7b();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x3ad335){super(),this['id']=_0x3ad335['id']||_0x551659(),this['author']=_0x3ad335['author'],this['type']=_0x3ad335['type'],this['data']=_0x3ad335['data']||{},this['rootName']=_0x3ad335['rootName'],this['set']('createdAt',_0x3ad335['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x2bfd36,_0x31c312){this['newRevisionId']=_0x2bfd36,this['oldRevisionId']=_0x31c312,this['changes']=new _0xe1aaa7();}['_setChanges'](_0x44d9b8){for(const _0xc0e30d of _0x44d9b8)this['changes']['add'](_0xc0e30d);}},Mt=class extends _0x592ef7{['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[_0x20176c,_0x3e4519,mt,wt];}constructor(_0x121e22){super(_0x121e22),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',(_0x422bf8,_0x5e1964,_0xdbb0d)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x50c127=>{for(const _0x3111e5 of this['editor']['editing']['view']['document']['roots'])_0xdbb0d?_0x50c127['removeClass']('ck-editor__editable__overlay',_0x3111e5):_0x50c127['addClass']('ck-editor__editable__overlay',_0x3111e5);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5c776d=>null!==_0x5c776d),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2c7091,_0x54f7e3,_0x8ced9a)=>_0x2c7091&&_0x8ced9a?_0x54f7e3['changes']['getIndex'](_0x8ced9a):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x31e526,_0x1ee3e7)=>_0x31e526?_0x1ee3e7['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3e4519);}['init'](){const _0x3c6321=this['editor'],_0x605525=new Tt(_0x3c6321,{'direction':'backward'}),_0x3df084=new Tt(_0x3c6321,{'direction':'forward'});_0x3c6321['commands']['add']('showPreviousChange',_0x605525),_0x3c6321['commands']['add']('showNextChange',_0x3df084),_0x3c6321['commands']['add']('restoreRevision',new Dt(_0x3c6321)),this['on']('change:numberOfChanges',()=>{_0x605525['refresh'](),_0x3df084['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3c6321['enableReadOnlyMode']('revision-viewer'),_0x3c6321['plugins']['has']('WidgetToolbarRepository')&&_0x3c6321['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x71bdf4){return await this['_utils']['loadRevisionData'](_0x71bdf4,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x71bdf4);}async['getRevisionRootsAttributes'](_0x4606f2){return await this['_utils']['loadRevisionData'](_0x4606f2,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4606f2);}async['compare'](_0x297e20,_0x3b724a,_0x222141=!0x1){if(!this['isEnabled'])return;const _0x1763fa=this['diff'],_0x16292b=this['repository'],_0x5a81c2='string'==typeof _0x297e20?_0x16292b['getRevision'](_0x297e20):_0x297e20,_0x1be9ad='string'==typeof _0x3b724a?_0x16292b['getRevision'](_0x3b724a):_0x3b724a,_0x614383=_0x5a81c2['id'],_0x4fc825=_0x1be9ad?_0x1be9ad['id']:null;if(!_0x222141&&this['diff']&&this['diff']['newRevisionId']===_0x614383&&this['diff']['oldRevisionId']===_0x4fc825)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x614383,_0x4fc825);const _0x3e1b72=this['_getRevisionsRange'](_0x5a81c2,_0x1be9ad,!0x0)['map'](_0x36c4f4=>this['_utils']['loadRevisionData'](_0x36c4f4,this['adapter']));return _0x3e1b72['push'](new Promise(_0x897ce8=>{setTimeout(_0x897ce8,0x14);})),Promise['all'](_0x3e1b72)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x9447e1=this['_getDiff'](_0x614383,_0x4fc825);for(const _0x30a433 of _0x9447e1['changes'])this['_changeIdToChange']['set'](_0x30a433['id'],_0x30a433);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5d80a1=>{for(const _0x10c6be of this['editor']['model']['document']['getRootNames']())_0x5d80a1['detachRoot'](_0x10c6be);for(const _0xa86ff of Object['keys'](_0x9447e1['model'])){const _0x1120a5=_0x9447e1['model'][_0xa86ff]['name'],_0xbe316e=_0x5d80a1['addRoot'](_0xa86ff,_0x1120a5);for(const _0x2c1dc7 of Object['keys'](_0x9447e1['attributes'][_0xa86ff]))_0x5d80a1['setAttribute'](_0x2c1dc7,_0x9447e1['attributes'][_0xa86ff][_0x2c1dc7],_0xbe316e);_0x5d80a1['insert'](_0x9447e1['model'][_0xa86ff],_0xbe316e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x9447e1['changes'])),this['isReady']=!0x0;})['catch'](_0x2534c0=>{console['error'](_0x2534c0),this['_cleanUp'](),_0x1763fa&&(this['diff']=_0x1763fa),this['isReady']=!0x0;});}['addRevisionData'](_0x18ff49,_0x1cc6e4){const _0x89d125=this['repository']['createRevision'](_0x18ff49);return _0x89d125['on']('_update',(_0x1646b3,_0x3f509b,_0x5c0cb9)=>_0x1cc6e4(_0x3f509b,_0x5c0cb9,_0x89d125)),this['repository']['addRevision'](_0x89d125),_0x89d125;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x355022=>{for(const _0x18660d of this['editor']['model']['document']['getRootNames']())_0x355022['detachRoot'](_0x18660d);});}['_sortAndFilterDiffChanges'](_0x50f27d){const _0x25ecff=[],_0x121573=new Map();for(const _0x2fa8fa of this['editor']['model']['document']['getRootNames']()){const _0x5828a1=this['editor']['editing']['view']['getDomRoot'](_0x2fa8fa);if(!_0x5828a1)continue;const _0x180445=_0x5828a1['getClientRects']()['item'](0x0);_0x180445&&(_0x25ecff['push'](_0x2fa8fa),_0x121573['set'](_0x2fa8fa,_0x180445));}return _0x25ecff['sort']((_0xdafd02,_0x3a5fe4)=>{const _0x3458f6=_0x121573['get'](_0xdafd02),_0x622f53=_0x121573['get'](_0x3a5fe4);return _0x3458f6['y']-_0x622f53['y']||_0x3458f6['x']-_0x622f53['x'];}),(_0x50f27d=_0x50f27d['filter'](_0x18df98=>_0x25ecff['includes'](_0x18df98['rootName'])))['sort']((_0x356621,_0xb78c43)=>_0x25ecff['indexOf'](_0x356621['rootName'])-_0x25ecff['indexOf'](_0xb78c43['rootName'])),_0x50f27d;}['_makeTape'](_0x3af291){const _0x57c636=Array['from'](_0x3af291['markers'])['filter'](([_0x502648,_0x20557b])=>_0x502648['startsWith']('revision:')&&!_0x20557b['isCollapsed']),_0x5d3b84=Array['from'](this['editor']['model']['createRangeIn'](_0x3af291)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x57c636['length'])for(const _0x51f3f4 of _0x5d3b84){const [_0x44770d,_0x37f7cb]=_0x57c636[0x0],[,_0x4a2686,_0x28393f]=_0x44770d['split'](':');if(_0x37f7cb['end']['isEqual'](_0x51f3f4['nextPosition'])&&_0x57c636['shift'](),(_0x51f3f4['previousPosition']['isEqual'](_0x37f7cb['start'])||_0x51f3f4['previousPosition']['isAfter'](_0x37f7cb['start']))&&('insertion'==_0x4a2686?_0x51f3f4['isAdded']={'userId':_0x28393f}:'deletion'==_0x4a2686&&(_0x51f3f4['isRemoved']={'userId':_0x28393f})),0x0==_0x57c636['length'])break;}return _0x5d3b84;}['_refreshStartEndIndex'](_0x2c5d52){const _0x2e58a2=new Map();for(let _0x454976=0x0;_0x454976<_0x2c5d52['length'];_0x454976++)'text'===_0x2c5d52[_0x454976]['type']?(_0x2c5d52[_0x454976]['item']['startIndex']=_0x454976,_0x2c5d52[_0x454976]['item']['endIndex']=_0x454976):('elementStart'===_0x2c5d52[_0x454976]['type']?_0x2c5d52[_0x454976]['item']['startIndex']=_0x454976:'elementEnd'===_0x2c5d52[_0x454976]['type']&&(_0x2c5d52[_0x454976]['item']['endIndex']=_0x454976),_0x2e58a2['set'](_0x2c5d52[_0x454976]['id'],_0x454976));for(const _0xb8a0bf of _0x2e58a2['values']())'elementStart'===_0x2c5d52[_0xb8a0bf]['type']?_0x2c5d52[_0xb8a0bf]['item']['endIndex']=_0x2e58a2['get'](_0x2c5d52[_0xb8a0bf]['pairId']):'elementEnd'===_0x2c5d52[_0xb8a0bf]['type']&&(_0x2c5d52[_0xb8a0bf]['item']['startIndex']=_0x2e58a2['get'](_0x2c5d52[_0xb8a0bf]['pairId']));}['_processTape'](_0x509a45){for(let _0x72837c=0x0;_0x72837c<_0x509a45['length'];_0x72837c++){if('elementStart'===_0x509a45[_0x72837c]['type'])_0x509a45[_0x72837c]['item']['startIndex']=_0x72837c;else{if('elementEnd'===_0x509a45[_0x72837c]['type']){_0x509a45[_0x72837c]['item']['endIndex']=_0x72837c;const _0x5299a2=_0x509a45[_0x72837c]['item']['startIndex'];_0x509a45[_0x5299a2]['pairId']=_0x509a45[_0x72837c]['id'],_0x509a45[_0x72837c]['pairId']=_0x509a45[_0x5299a2]['id'];}else _0x509a45[_0x72837c]['item']['startIndex']=_0x72837c,_0x509a45[_0x72837c]['item']['endIndex']=_0x72837c,_0x509a45[_0x72837c]['pairId']=null;}_0x509a45[_0x72837c]['markersStart']||(_0x509a45[_0x72837c]['markersStart']=[],_0x509a45[_0x72837c]['markersEnd']=[]);}}['_markInsertions'](_0x25af01,_0x362dab){const _0x4e85d2=_0x25af01['filter'](_0x106f59=>!_0x106f59['isAdded']);for(let _0x3ef52b=0x0;_0x3ef52b<_0x362dab['length'];_0x3ef52b++)_0x362dab[_0x3ef52b]['isAdded']&&(_0x4e85d2[_0x3ef52b]['isAdded']=_0x362dab[_0x3ef52b]['isAdded']);}['_getDiff'](_0x9bf1da,_0x1be4dc=null){const _0x3c784d=this['repository']['getRevision'](_0x9bf1da),_0x1cb7d6=_0x1be4dc?this['repository']['getRevision'](_0x1be4dc):null,_0x24f665=this['_getRevisionsRange'](_0x3c784d,_0x1cb7d6),_0x5d29ef=_0x24f665[_0x24f665['length']-0x1],_0x2e78ed=new Map(),_0xbdc1a6={'model':{},'attributes':{},'changes':[]},_0x10ee20=new Set(),_0x3e8c06=new Map();for(let _0x3d5f8b=_0x24f665['length']-0x1;_0x3d5f8b>=0x0;_0x3d5f8b--){const _0x3bdcaf=_0x24f665[_0x3d5f8b];for(const _0x3197c6 of Object['keys'](_0x3bdcaf['diffData']))if(_0x3bdcaf['diffData'][_0x3197c6]['attachChange']){const _0x41e41a=_0x3bdcaf['diffData'][_0x3197c6]['attachChange'];_0x41e41a['isAttached']?(_0x10ee20['add'](_0x3197c6),_0x3e8c06['has'](_0x3197c6)&&_0x3e8c06['get'](_0x3197c6)['userId']==_0x41e41a['userId']?_0x3e8c06['delete'](_0x3197c6):_0x3e8c06['set'](_0x3197c6,_0x41e41a)):_0x3e8c06['has'](_0x3197c6)?(_0x10ee20['delete'](_0x3197c6),_0x3e8c06['delete'](_0x3197c6)):(_0x10ee20['add'](_0x3197c6),_0x3e8c06['set'](_0x3197c6,_0x41e41a));}else _0x10ee20['add'](_0x3197c6);}for(const _0x8e055c of _0x10ee20){const _0x35f98c=_0x3e8c06['has'](_0x8e055c)&&!_0x3e8c06['get'](_0x8e055c)['isAttached'];let _0xb9a357=_0x35f98c?_0x24f665['length']-0x1:0x0;const _0x566fd1=_0x35f98c?-0x1:0x1;for(;_0x24f665[_0xb9a357];){const _0xcbaa46=_0x24f665[_0xb9a357];if(_0xcbaa46['diffData'][_0x8e055c]){const _0x56895f=_0x35f98c?_0xcbaa46['diffData'][_0x8e055c]['attributesBefore']:_0xcbaa46['diffData'][_0x8e055c]['attributesAfter'];_0xbdc1a6['attributes'][_0x8e055c]=_0x56895f?_0x28481c(_0x56895f):{};break;}_0xb9a357+=_0x566fd1;}}for(const _0x255f0c of _0x24f665){_0x255f0c['model']={};for(const _0x10cdbf of _0x255f0c['authors'])_0x2e78ed['set'](_0x10cdbf['id'],_0x10cdbf);for(const _0x5c0716 of _0x10ee20){const _0x4790f6=_0x255f0c['diffData'][_0x5c0716]?_0x255f0c['diffData'][_0x5c0716]['insertions']:'[]',_0x283960=_0x255f0c['diffData'][_0x5c0716]?_0x255f0c['diffData'][_0x5c0716]['deletions']:'[]',_0x3d23ef=_0x255f0c['diffData'][_0x5c0716]?.['rootElementName']||'$root';_0x255f0c['model'][_0x5c0716]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4790f6,_0x3d23ef),'deletions':this['_utils']['_makeModelFromViewString'](_0x283960,_0x3d23ef)};}}for(const _0x52e065 of _0x10ee20){let _0x2eb14d=null,_0x23567e=0x0;const _0x3fcfe9=_0x24f665['map'](_0x217477=>_0x217477['diffData'][_0x52e065]?.['rootElementName'])['find'](_0x590662=>void 0x0!==_0x590662)||'$root',_0x22e8f0=new Map(Array['from'](_0x3c784d['model'][_0x52e065]['insertions']['markers'])['filter'](([_0x494a0b])=>!_0x494a0b['startsWith']('revision:')));let _0x14535e=0x0;for(const _0x180e88 of _0x24f665){const _0x66e1b2=this['_makeTape'](_0x180e88['model'][_0x52e065]['insertions']);_0x180e88==_0x3c784d?(_0x2eb14d=_0x66e1b2,_0x23567e=_0x2eb14d['length'],_0x2eb14d['forEach'](_0x33b1a0=>{_0x33b1a0['id']=_0x14535e++;}),this['_processTape'](_0x2eb14d)):this['_markInsertions'](_0x2eb14d,_0x66e1b2);const _0x418497=_0x2eb14d['filter'](_0x5be9f5=>!_0x5be9f5['isAdded'])['map'](_0x4bb00b=>_0x4bb00b['id']);let _0x5dbe4a=0x0;const _0x394829=this['_makeTape'](_0x180e88['model'][_0x52e065]['deletions']);_0x394829['forEach'](_0x256726=>{_0x256726['isRemoved']?_0x256726['id']=_0x23567e++:_0x256726['id']=_0x418497[_0x5dbe4a++];}),this['_processTape'](_0x394829),this['_setDistance'](_0x2eb14d,'isAdded'),this['_setDistance'](_0x394829,'isRemoved'),_0x180e88==_0x3c784d&&this['_markMarkers'](_0x2eb14d,_0x22e8f0),_0x2eb14d=this['_joinTapes'](_0x2eb14d,_0x394829),this['_refreshStartEndIndex'](_0x2eb14d),this['_setDistance'](_0x2eb14d,'isRemoved');}_0x2eb14d=_0x2eb14d['filter'](_0x3b33b7=>!(_0x3b33b7['isAdded']&&_0x3b33b7['isRemoved']));const _0xd87701=new Map(_0x5d29ef['model'][_0x52e065]['deletions']['markers']),_0x2d8347=new Set(_0x22e8f0['keys']());for(const _0x250b12 of _0xd87701['keys']())_0x2d8347['delete'](_0x250b12);this['_markSuggestions'](_0x2eb14d,_0x2d8347),this['_fixObsoleteTags'](_0x2eb14d),_0x2eb14d=this['_removeMissingPairs'](_0x2eb14d),_0x2eb14d=this['_markMismatchedRemovedTags'](_0x2eb14d),_0x2eb14d=this['_removeUnsupportedChanges'](_0x2eb14d);const {root:_0x12df78,changes:_0x542bb7}=this['_makeModelFromTape'](_0x2eb14d,_0x2e78ed,_0x52e065,_0x3fcfe9);_0xbdc1a6['model'][_0x52e065]=_0x12df78;const _0x1acfa0=_0x3e8c06['get'](_0x52e065);if(_0x1acfa0){const _0x523d66=new Ot({'author':_0x2e78ed['get'](_0x1acfa0['userId']),'type':_0x1acfa0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x52e065});_0x542bb7['unshift'](_0x523d66),_0xbdc1a6['attributes'][_0x52e065]['revisionHistoryAttachChange']=_0x523d66['id'];}_0xbdc1a6['changes']=_0xbdc1a6['changes']['concat'](_0x542bb7);}return _0xbdc1a6;}['_markMarkers'](_0x29cc03,_0x2712e8){for(let _0x12adea=0x0;_0x12adea<_0x29cc03['length'];_0x12adea++)for(const [_0x56e097,_0x23189]of _0x2712e8)!_0x23189['isCollapsed']&&_0x23189['start']['isEqual'](_0x29cc03[_0x12adea]['previousPosition'])&&_0x29cc03[_0x12adea]['markersStart']['push'](_0x56e097),_0x23189['end']['isEqual'](_0x29cc03[_0x12adea]['nextPosition'])&&_0x29cc03[_0x12adea]['markersEnd']['push'](_0x56e097);}['_joinTapes'](_0xc5cac8,_0x2f0615){let _0x9495d1=[],_0x45eff8=0x0,_0x40de27=0x0;for(;_0x45eff8<_0xc5cac8['length']||_0x40de27<_0x2f0615['length'];){const _0x2e548c=_0xc5cac8[_0x45eff8]||{},_0x4dc443=_0x2f0615[_0x40de27]||{};if(_0x2e548c['id']==_0x4dc443['id'])_0x45eff8++,_0x40de27++,_0x9495d1['push'](_0x2e548c);else{if(_0x4dc443['isRemoved']&&_0x2e548c['isAdded']){const {commonTape:_0x3b99a6,iEnd:_0x543f77,jEnd:_0x39ce19}=this['_threeWayMerge'](_0xc5cac8,_0x45eff8,_0x2f0615,_0x40de27);_0x9495d1=_0x9495d1['concat'](_0x3b99a6),_0x45eff8=_0x543f77,_0x40de27=_0x39ce19;}else _0x4dc443['isRemoved']?(_0x40de27++,_0x9495d1['push'](_0x4dc443)):(_0x45eff8++,_0x9495d1['push'](_0x2e548c));}}return _0x9495d1;}['_markSuggestions'](_0x193b55,_0x2f6e2e){const _0x1c685a=[];for(let _0x3be3d1=0x0;_0x3be3d1<_0x193b55['length'];_0x3be3d1++){for(let _0x4cedcc=0x0;_0x4cedcc<_0x193b55[_0x3be3d1]['markersStart']['length'];_0x4cedcc++){const _0x36702c=_0x193b55[_0x3be3d1]['markersStart'][_0x4cedcc];if(!_0x2f6e2e['has'](_0x36702c))continue;const {group:_0x58f8cc,type:_0xd86917,authorId:_0x14bdf2}=_0x497270(_0x36702c);'revision-suggestion'!=_0x58f8cc||'insertion'!=_0xd86917&&'deletion'!=_0xd86917||(_0x1c685a['unshift']({'type':_0xd86917,'name':_0x36702c,'userId':_0x14bdf2}),_0x193b55[_0x3be3d1]['markersStart']['splice'](_0x4cedcc,0x1),_0x4cedcc--);}_0x2d35af(_0x193b55[_0x3be3d1]);for(let _0x24f2fc=0x0;_0x24f2fc<_0x193b55[_0x3be3d1]['markersEnd']['length'];_0x24f2fc++){const _0x13a779=_0x193b55[_0x3be3d1]['markersEnd'][_0x24f2fc];if(!_0x2f6e2e['has'](_0x13a779))continue;const {group:_0x589a63,type:_0x27ffbf}=_0x497270(_0x13a779);if('revision-suggestion'!=_0x589a63||'insertion'!=_0x27ffbf&&'deletion'!=_0x27ffbf)continue;_0x193b55[_0x3be3d1]['markersEnd']['splice'](_0x24f2fc,0x1),_0x24f2fc--;const _0xfc6c6b=_0x1c685a['findIndex'](_0x4f5a39=>_0x4f5a39['name']==_0x13a779);_0xfc6c6b>-0x1&&_0x1c685a['splice'](_0xfc6c6b,0x1);}}function _0x497270(_0x437560){const _0x4e8713=_0x437560['split'](':');return{'group':_0x4e8713[0x0],'type':_0x4e8713[0x1],'subType':_0x4e8713['length']>=0x5?_0x4e8713[0x2]:null,'id':_0x4e8713['length']<0x5?_0x4e8713[0x2]:_0x4e8713[0x3],'authorId':_0x4e8713['length']<0x5?_0x4e8713[0x3]:_0x4e8713[0x4],'markerCount':0x6==_0x4e8713['length']?_0x4e8713[0x5]:null};}function _0x2d35af(_0x55c3ee){for(let _0x8da4ca=0x0;_0x8da4ca<_0x1c685a['length'];_0x8da4ca++){if(_0x55c3ee['isAdded']&&'insertion'==_0x1c685a[_0x8da4ca]['type']&&_0x55c3ee['isAdded']['userId']==_0x1c685a[_0x8da4ca]['userId'])return _0x55c3ee['isAddSuggestion']=_0x1c685a[_0x8da4ca],void delete _0x55c3ee['isAdded'];if(!_0x55c3ee['isAdded']&&!_0x55c3ee['isRemoved']&&'deletion'==_0x1c685a[_0x8da4ca]['type'])return void(_0x55c3ee['isRemoveSuggestion']=_0x1c685a[_0x8da4ca]);}}}['_setDistance'](_0x1a3197,_0x124ef1){let _0xfe48a0=0x0,_0xa1dc41=!0x1;const _0x332dbb=new Map();for(const _0x5be2ca of _0x1a3197)_0x5be2ca[_0x124ef1]?_0xa1dc41&&(_0xfe48a0++,_0xa1dc41=!0x1):(_0xfe48a0++,_0xa1dc41=!0x0),_0x332dbb['set'](_0x5be2ca['id'],_0xfe48a0);for(let _0x3539d6=0x0;_0x3539d6<_0x1a3197['length'];_0x3539d6++){if('isRemoved'==_0x124ef1&&_0x1a3197[_0x3539d6]['isAdded']||'isAdded'==_0x124ef1&&_0x1a3197[_0x3539d6]['isRemoved'])continue;if('text'==_0x1a3197[_0x3539d6]['type']){_0x1a3197[_0x3539d6]['distance']=0x0;continue;}const _0x23383f=_0x332dbb['get'](_0x1a3197[_0x3539d6]['pairId']),_0x33b4f1=_0x332dbb['get'](_0x1a3197[_0x3539d6]['id']);_0x1a3197[_0x3539d6]['distance']=_0x23383f-_0x33b4f1;}}['_getRevisionsRange'](_0x3721c7,_0x2d6e1b,_0x492ce6=!0x1){const _0x166be0=[];let _0x220218=this['repository']['getIndex'](_0x3721c7),_0x1fd4d1=this['repository']['getIndex'](_0x2d6e1b);for(-0x1==_0x1fd4d1&&(_0x1fd4d1=this['repository']['_revisions']['length'],_0x492ce6=!0x1);_0x220218<_0x1fd4d1;)_0x166be0['push'](this['repository']['getRevision'](_0x220218)),_0x220218++;return _0x492ce6&&_0x166be0['push'](this['repository']['getRevision'](_0x220218)),_0x166be0;}['_threeWayMerge'](_0x20b7f6,_0x55aaf7,_0x41c760,_0x267e5c){const _0x324a27=this['editor']['model']['schema'];let _0x4e2b27=_0x55aaf7;for(;_0x20b7f6[_0x4e2b27]&&_0x20b7f6[_0x4e2b27]['isAdded'];)_0x4e2b27++;let _0x118dff=_0x267e5c;for(;_0x41c760[_0x118dff]&&_0x41c760[_0x118dff]['isRemoved'];)_0x118dff++;_0x297e95(_0x20b7f6,_0x55aaf7,_0x4e2b27),_0x297e95(_0x41c760,_0x267e5c,_0x118dff);const _0x2505b5=_0x41c760['slice'](_0x267e5c,_0x118dff)['concat'](_0x20b7f6['slice'](_0x55aaf7,_0x4e2b27));return _0x2505b5['sort']((_0x1adb4e,_0x41c3c4)=>_0x1adb4e['side']!=_0x41c3c4['side']?_0x1adb4e['side']-_0x41c3c4['side']:_0x1adb4e['level']!=_0x41c3c4['level']?_0x1adb4e['level']-_0x41c3c4['level']:_0x1adb4e['distance']!=_0x41c3c4['distance']?_0x41c3c4['distance']-_0x1adb4e['distance']:!!_0x1adb4e['isAdded']!=!!_0x41c3c4['isAdded']?-0x1==_0x1adb4e['side']||0x0==_0x1adb4e['side']?_0x1adb4e['isAdded']?-0x1:0x1:_0x1adb4e['isAdded']?0x1:-0x1:_0x1adb4e['index']-_0x41c3c4['index']),{'commonTape':_0x2505b5,'iEnd':_0x4e2b27,'jEnd':_0x118dff};function _0x297e95(_0x2602ed,_0x1985fa,_0x1173a6){let _0xd37594=-0x1,_0x55acc1=Number['POSITIVE_INFINITY'],_0xf21a6f=!0x0;for(let _0x1d3497=_0x1985fa;_0x1d3497<_0x1173a6;_0x1d3497++)if(_0x324a27['isInline'](_0x2602ed[_0x1d3497]['item'])||(_0xf21a6f=!0x1),_0x2602ed[_0x1d3497]['item']['startIndex']<_0x1985fa&&(_0xd37594=_0x1d3497),_0x2602ed[_0x1d3497]['item']['endIndex']>=_0x1173a6){_0x55acc1=_0x1d3497;break;}_0xf21a6f&&(_0xd37594=_0x1173a6-0x1);for(let _0x3c0c2a=_0x1985fa;_0x3c0c2a<_0x1173a6;_0x3c0c2a++)_0x2602ed[_0x3c0c2a]['side']=_0x3c0c2a<=_0xd37594?-0x1:_0x3c0c2a<_0x55acc1?0x0:0x1,_0x2602ed[_0x3c0c2a]['index']=_0x3c0c2a;let _0x411648=0x0;for(let _0x4191d2=_0x1985fa;_0x4191d2<=_0xd37594;_0x4191d2++)0x0==_0x2602ed[_0x4191d2]['distance']?_0x2602ed[_0x4191d2]['level']=_0x411648:(_0x411648++,_0x2602ed[_0x4191d2]['level']=_0x411648,_0x411648++);for(let _0x5508e4=_0x1985fa;_0x5508e4<_0x1173a6;_0x5508e4++)0x0==_0x2602ed[_0x5508e4]['side']&&(_0x2602ed[_0x5508e4]['level']=_0x411648);_0x411648=0x0;for(let _0x56ef51=_0x1173a6-0x1;_0x56ef51>=_0x55acc1;_0x56ef51--)0x0==_0x2602ed[_0x56ef51]['distance']?_0x2602ed[_0x56ef51]['level']=_0x411648:(_0x411648--,_0x2602ed[_0x56ef51]['level']=_0x411648,_0x411648--);}}['_fixObsoleteTags'](_0x45c4f3){const _0x384050=new Map(),_0x333485=this['editor']['model']['schema'];for(let _0x373d6a=0x1;_0x373d6a<_0x45c4f3['length'];_0x373d6a++){let _0x3c5987,_0x3e79a8,_0x496f75;const _0x541592=_0x45c4f3[_0x373d6a],_0x1bb914=_0x45c4f3[_0x373d6a-0x1];if('text'==_0x541592['type'])continue;if(_0x541592['type']!=_0x1bb914['type'])continue;if(!_0x333485['isBlock'](_0x1bb914['item'])||_0x333485['isLimit'](_0x1bb914['item']))continue;if(!_0x333485['isBlock'](_0x541592['item'])||_0x333485['isLimit'](_0x541592['item']))continue;if((_0x45c4f3[_0x373d6a]['isAdded']||_0x45c4f3[_0x373d6a]['isAddSuggestion'])&&_0x45c4f3[_0x373d6a-0x1]['isRemoved'])_0x3c5987=_0x45c4f3[_0x373d6a],_0x3e79a8=_0x45c4f3[_0x373d6a-0x1],_0x496f75=_0x373d6a-0x1;else{if(!_0x45c4f3[_0x373d6a]['isRemoved']||!_0x45c4f3[_0x373d6a-0x1]['isAdded']&&!_0x45c4f3[_0x373d6a-0x1]['isAddSuggestion'])continue;_0x3c5987=_0x45c4f3[_0x373d6a-0x1],_0x3e79a8=_0x45c4f3[_0x373d6a],_0x496f75=_0x373d6a;}const _0x57e9e3=_0x3c5987['level']==_0x3e79a8['level'],_0x5e9810=Math['abs'](_0x3c5987['level'])<Math['abs'](_0x3e79a8['level'])&&0x0==_0x3e79a8['distance'];(_0x57e9e3||_0x5e9810)&&(_0x384050['set'](_0x3e79a8['id'],_0x3c5987['id']),_0x45c4f3['splice'](_0x496f75,0x1),_0x373d6a--,_0x3c5987['isAdded']=!0x1);}for(let _0x53bac6=0x0;_0x53bac6<_0x45c4f3['length'];_0x53bac6++)_0x384050['has'](_0x45c4f3[_0x53bac6]['pairId'])&&(_0x45c4f3[_0x53bac6]['pairId']=_0x384050['get'](_0x45c4f3[_0x53bac6]['pairId']));}['_removeMissingPairs'](_0x41c2de){const _0x1f0b07=new Set(_0x41c2de['map'](_0x5d56d2=>_0x5d56d2['id']));for(let _0x515f85=0x0;_0x515f85<_0x41c2de['length'];_0x515f85++)_0x1f0b07['has'](_0x41c2de[_0x515f85]['pairId'])||0x0==_0x41c2de[_0x515f85]['distance']||(_0x41c2de[_0x515f85]['isIncorrect']=!0x0);return _0x41c2de['filter'](_0x1b8b2f=>!_0x1b8b2f['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2cc5e2){const _0x52b8c0=new Set();for(let _0x14eb32=0x0;_0x14eb32<_0x2cc5e2['length'];_0x14eb32++){if(_0x52b8c0['has'](_0x2cc5e2[_0x14eb32]['id'])&&_0x2cc5e2[_0x14eb32]['isRemoved']&&(_0x2cc5e2[_0x14eb32]['isIncorrect']=!0x0),_0x2cc5e2[_0x14eb32]['isIncorrect'])continue;if(0x0==_0x2cc5e2[_0x14eb32]['distance'])continue;if('elementStart'!=_0x2cc5e2[_0x14eb32]['type'])continue;if(null==_0x2cc5e2[_0x14eb32]['pairId'])continue;let _0x36e31f=_0x14eb32+0x1,_0x3ba005=0x0;for(;_0x2cc5e2[_0x36e31f]['id']!=_0x2cc5e2[_0x14eb32]['pairId'];)'elementStart'==_0x2cc5e2[_0x36e31f]['type']?_0x3ba005++:'elementEnd'==_0x2cc5e2[_0x36e31f]['type']&&_0x3ba005--,_0x36e31f++;if(0x0!=_0x3ba005){if(_0x2cc5e2[_0x14eb32]['isRemoved'])_0x2cc5e2[_0x14eb32]['isIncorrect']=!0x0;else{for(;_0x36e31f!=_0x14eb32;)_0x2cc5e2[_0x36e31f]['isRemoved']&&0x0!=_0x2cc5e2[_0x36e31f]['distance']&&(_0x2cc5e2[_0x36e31f]['isIncorrect']=!0x0,_0x52b8c0['add'](_0x2cc5e2[_0x36e31f]['pairId'])),_0x36e31f--;}}}return _0x2cc5e2['filter'](_0x340659=>!_0x340659['isIncorrect']);}['_removeUnsupportedChanges'](_0x55655d){const _0x29cd31=this['editor']['model']['schema'];for(let _0x1861cc=0x0;_0x1861cc<_0x55655d['length'];_0x1861cc++){if(!(_0x55655d[_0x1861cc]['isAdded']||_0x55655d[_0x1861cc]['isAddSuggestion']||_0x55655d[_0x1861cc]['isRemoved']||_0x55655d[_0x1861cc]['isRemoveSuggestion']))continue;if(0x0==_0x55655d[_0x1861cc]['distance'])continue;const _0x8015c9=_0x55655d[_0x1861cc]['item'];_0x29cd31['isBlock'](_0x8015c9)||_0x29cd31['isLimit'](_0x8015c9)||(_0x55655d[_0x1861cc]['isAdded']&&delete _0x55655d[_0x1861cc]['isAdded'],_0x55655d[_0x1861cc]['isAddSuggestion']&&delete _0x55655d[_0x1861cc]['isAddSuggestion'],_0x55655d[_0x1861cc]['isRemoveSuggestion']&&delete _0x55655d[_0x1861cc]['isRemoveSuggestion'],_0x55655d[_0x1861cc]['isRemoved']&&(_0x55655d[_0x1861cc]['isIncorrect']=!0x0));}return _0x55655d['filter'](_0x4a741b=>!_0x4a741b['isIncorrect']);}['_makeModelFromTape'](_0x9f18ee,_0x4949a8,_0x2bed6,_0x34bf93){const _0x4efe27=new _0x2136fb(),_0x16c2f3=[],_0x59f5ab=new Map(),_0x50c1d1=this['editor']['model'],_0x4c809c=_0x50c1d1['schema'],_0x1d56bf=[_0x4efe27],_0x2a1484={},_0x18d24b={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x4efe27['name']=_0x34bf93;let _0x1684e2=null;const _0x201b6a=[0x0];for(let _0x1464cb=0x0;_0x1464cb<_0x9f18ee['length'];_0x1464cb++)if('elementStart'===_0x9f18ee[_0x1464cb]['type']){_0x9f18ee[_0x1464cb]['previousPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a);const _0x14bb39=new _0x5ebea3(_0x9f18ee[_0x1464cb]['item']['name'],_0x9f18ee[_0x1464cb]['item']['getAttributes']());_0x1d56bf[0x0]['_appendChild'](_0x14bb39),_0x201b6a['push'](0x0),_0x1d56bf['unshift'](_0x14bb39),_0x9f18ee[_0x1464cb]['nextPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a);}else'elementEnd'===_0x9f18ee[_0x1464cb]['type']?(_0x1d56bf['shift'](),_0x9f18ee[_0x1464cb]['previousPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a),_0x201b6a['pop'](),_0x201b6a[_0x201b6a['length']-0x1]++,_0x9f18ee[_0x1464cb]['nextPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a)):(_0x9f18ee[_0x1464cb]['previousPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a),_0x1684e2?_0x1684e2['_data']+=_0x9f18ee[_0x1464cb]['item']['data']:_0x1684e2=new _0x26fa72(_0x9f18ee[_0x1464cb]['item']['data'],_0x9f18ee[_0x1464cb]['item']['getAttributes']()),_0x9f18ee[_0x1464cb+0x1]&&'text'===_0x9f18ee[_0x1464cb+0x1]['type']&&_0x2f4b44(_0x1684e2,_0x9f18ee[_0x1464cb+0x1]['item'])||(_0x1d56bf[0x0]['_appendChild'](_0x1684e2),_0x1684e2=null),_0x201b6a[_0x201b6a['length']-0x1]+=_0x9f18ee[_0x1464cb]['item']['offsetSize'],_0x9f18ee[_0x1464cb]['nextPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a));for(let _0x26ba2c=0x0;_0x26ba2c<_0x9f18ee['length'];_0x26ba2c++){const _0x48b7d6=_0x9f18ee[_0x26ba2c]['previousPosition'],_0x45f5b7=_0x9f18ee[_0x26ba2c]['nextPosition'];for(const _0x19c1b9 of _0x9f18ee[_0x26ba2c]['markersStart'])_0x59f5ab['set'](_0x19c1b9,{'start':_0x48b7d6,'end':null});_0x48d450('isRemoveSuggestion',_0x26ba2c,_0x48b7d6,_0x45f5b7),_0x48d450('isAddSuggestion',_0x26ba2c,_0x48b7d6,_0x45f5b7),_0x48d450('isRemoved',_0x26ba2c,_0x48b7d6,_0x45f5b7),_0x48d450('isAdded',_0x26ba2c,_0x48b7d6,_0x45f5b7);for(const _0xd16c24 of _0x9f18ee[_0x26ba2c]['markersEnd']){const _0x529306=_0x59f5ab['get'](_0xd16c24);_0x529306?_0x529306['end']=_0x45f5b7:_0x59f5ab['set'](_0xd16c24,{'start':_0x45f5b7,'end':_0x45f5b7});}}for(const [_0x259401,_0x3f2e57]of _0x59f5ab){const _0x218740=this['editor']['model']['createRange'](_0x3f2e57['start'],_0x3f2e57['end']);_0x4efe27['markers']['set'](_0x259401,_0x218740);}return _0x16c2f3['sort']((_0xe14b95,_0x5e745e)=>{const _0x35ee38=_0x4efe27['markers']['get']('revision:'+_0xe14b95['id']),_0x529539=_0x4efe27['markers']['get']('revision:'+_0x5e745e['id']);return _0x35ee38['start']['isBefore'](_0x529539['start'])?-0x1:_0x35ee38['start']['isAfter'](_0x529539['start'])?0x1:_0x35ee38['end']['isBefore'](_0x529539['end'])?-0x1:_0x35ee38['end']['isAfter'](_0x529539['end'])?0x1:'add'===_0xe14b95['type']?-0x1:0x1;}),{'root':_0x4efe27,'changes':_0x16c2f3};function _0x48d450(_0x46c71f,_0x4910a5,_0x5dfe70,_0x2be3f1){const _0x3a4f99=!!_0x9f18ee[_0x4910a5][_0x46c71f],_0x5148b6=_0x3a4f99?_0x9f18ee[_0x4910a5][_0x46c71f]['userId']:null,_0x2516ca=_0x4910a5===_0x9f18ee['length']-0x1,_0x1eff3c=_0x18d24b[_0x46c71f][0x0],_0x518412=_0x4c809c['isObject'](_0x9f18ee[_0x4910a5]['item']);!_0x2a1484[_0x46c71f]&&_0x3a4f99?_0x2a1484[_0x46c71f]={'start':_0x5dfe70,'tapeItem':_0x9f18ee[_0x4910a5],'userId':_0x5148b6,'type':_0x46c71f}:_0x2a1484[_0x46c71f]&&!_0x3a4f99?(_0x2a1484[_0x46c71f]['end']=_0x5dfe70,_0x3e04da(_0x2a1484[_0x46c71f]),_0x2a1484[_0x46c71f]=null):_0x2a1484[_0x46c71f]&&_0x3a4f99&&_0x2a1484[_0x46c71f]['userId']!==_0x5148b6&&(_0x2a1484[_0x46c71f]['end']=_0x5dfe70,_0x1eff3c&&_0x1eff3c['userId']===_0x2a1484[_0x46c71f]['userId']||_0x3e04da(_0x2a1484[_0x46c71f]),_0x2a1484[_0x46c71f]={'start':_0x5dfe70,'tapeItem':_0x9f18ee[_0x4910a5],'userId':_0x5148b6,'type':_0x46c71f}),_0x2a1484[_0x46c71f]&&_0x518412&&('elementStart'!==_0x9f18ee[_0x4910a5]['type']||_0x1eff3c&&_0x1eff3c['userId']===_0x5148b6||_0x18d24b[_0x46c71f]['unshift']({'userId':_0x5148b6,'object':_0x9f18ee[_0x4910a5]['item'],'change':_0x2a1484[_0x46c71f]}),'elementEnd'===_0x9f18ee[_0x4910a5]['type']&&_0x1eff3c&&_0x1eff3c['object']===_0x9f18ee[_0x4910a5]['item']&&(_0x18d24b[_0x46c71f]['shift'](),_0x2a1484[_0x46c71f]=_0x1eff3c['change'])),_0x2a1484[_0x46c71f]&&_0x2516ca&&(_0x2a1484[_0x46c71f]['end']=_0x2be3f1,_0x3e04da(_0x2a1484[_0x46c71f]),_0x2a1484[_0x46c71f]=null);}function _0x3e04da({start:_0x47ede8,end:_0x5c9e79,tapeItem:_0x5f3390,userId:_0x218cce,type:_0x770d14}){const _0x36b3a5=_0x5f3390['item'],_0x519642=_0x50c1d1['schema']['isBlock'](_0x36b3a5)&&!_0x50c1d1['schema']['isLimit'](_0x36b3a5),_0x5f3aca=_0x47ede8['nodeAfter']==_0x5c9e79['parent']&&_0x5c9e79['isAtStart'];if(_0x519642&&_0x5f3aca)return;const _0x35f004=_0x50c1d1['createRange'](_0x47ede8,_0x5c9e79),_0x22e777=new Ot({'author':_0x4949a8['get'](_0x218cce),'type':'isAdded'==_0x770d14||'isAddSuggestion'==_0x770d14?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x770d14||'isRemoveSuggestion'==_0x770d14},'createdAt':new Date(),'rootName':_0x2bed6});_0x16c2f3['push'](_0x22e777),_0x4efe27['markers']['set']('revision:'+_0x22e777['id'],_0x35f004);}function _0x2f4b44(_0x5b959d,_0x3bb014){const _0xf4155d=_0x5b959d['getAttributes'](),_0xe83718=_0x3bb014['getAttributes']();for(const _0x4fc116 of _0xf4155d){if(_0x4fc116[0x1]!==_0x3bb014['getAttribute'](_0x4fc116[0x0]))return!0x1;_0xe83718['next']();}return _0xe83718['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x322fd6=>{const _0xedb613=_0x322fd6['markerName']['split'](':')[0x1],_0x145049=this['_getChangeFromId'](_0xedb613);if(!_0x145049)return null;const _0x2036df='add'==_0x145049['type']?'insertion':'deletion',_0x228719=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2036df];return _0x145049['data']['isSuggestion']&&_0x228719['push']('ck-suggestion-marker-'+_0x2036df+'-new'),this['activeChange']==_0x145049&&_0x228719['push']('ck-suggestion-marker--active'),{'classes':_0x228719,'attributes':{'data-change-id':_0xedb613}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x35768c=>{_0x35768c['on']('element:pre',(_0x2d2f76,_0x16ea6a,_0x3b4b05)=>{const _0x22efa0=_0x16ea6a['viewItem']['getChild'](0x0);if(!_0x22efa0||!_0x22efa0['is']('element','code'))return;if(!_0x3b4b05['consumable']['consume'](_0x22efa0,{'attributes':['vid_start','vid_end']}))return;const _0x499f20=_0x16ea6a['modelRange']['start']['nodeAfter'];_0x3b4b05['writer']['setAttribute']('vid_start',_0x22efa0['getAttribute']('vid_start'),_0x499f20),_0x3b4b05['writer']['setAttribute']('vid_end',_0x22efa0['getAttribute']('vid_end'),_0x499f20);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x18a752=>{_0x18a752['on']('element',(_0x2b0c0b,_0x205b71,_0x4737c8)=>{if(!_0x4737c8['consumable']['consume'](_0x205b71['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x205b71['modelRange']['isCollapsed'])return;const _0x3216f9=_0x205b71['modelRange']['start']['nodeAfter'];_0x3216f9['hasAttribute']('vid_start')||_0x3216f9['hasAttribute']('vid')||(_0x4737c8['writer']['setAttribute']('vid_start',_0x205b71['viewItem']['getAttribute']('vid_start'),_0x3216f9),_0x4737c8['writer']['setAttribute']('vid_end',_0x205b71['viewItem']['getAttribute']('vid_end'),_0x3216f9));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x23aff2=>_0x23aff2['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x31f334,[,_0x516198])=>{['vid_start','vid_end','vid']['includes'](_0x516198)&&(_0x31f334['return']=!0x0,_0x31f334['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x39345=>{_0x39345['on']('attribute:vid',(_0x3ec42e,_0x48237d,_0x56e6d5)=>{if('\x20'!=_0x48237d['item']['data']||_0x48237d['item']['parent']['maxOffset']>0x1)return;if(!_0x56e6d5['consumable']['consume'](_0x48237d['item'],_0x3ec42e['name']))return;const _0x3ef1bd=_0x56e6d5['writer'],_0x31b44f=_0x56e6d5['mapper']['toViewRange'](_0x48237d['range']);_0x3ef1bd['wrap'](_0x31b44f,_0x3ef1bd['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4ab63a){const _0x3322f0=_0x4ab63a['plugins']['get']('RevisionViewer');return(_0x5eadd4,_0x2e7120,_0x9aa393)=>{const _0xc3c28=_0x2e7120['markerName']['split'](':')[0x1],_0x42c592=_0x3322f0['_getChangeFromId'](_0xc3c28);if(!_0x42c592)return null;const _0x29e01b='add'==_0x42c592['type']?'split':'merge';if(!_0x9aa393['consumable']['test'](_0x2e7120['markerRange'],_0x5eadd4['name']))return;const _0xa42271=_0x2e7120['markerRange']['getWalker'](),_0x544125=_0x2e7120['markerRange']['start'],_0x8d48b3=_0x4ab63a['model']['schema'];let _0x14c0fe=null,_0x32afdb=null,_0x18ab78=!0x1,_0x215c90=!0x1;for(const _0x36886e of _0xa42271){const _0x19a523=_0x36886e['item'];_0x18ab78=_0x18ab78||_0x8d48b3['isContent'](_0x19a523);const _0x3b2382=_0x9aa393['mapper']['toViewElement'](_0x19a523);if(_0x3b2382&&_0x3b2382['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x36886e['type']&&(_0x8d48b3['isBlock'](_0x19a523)&&!_0x8d48b3['isLimit'](_0x19a523)&&(_0x19a523['nextSibling']||_0x544125['isAtEnd']?_0x14c0fe&&_0x14c0fe['parent']==_0x19a523||(_0x14c0fe=_0x19a523,_0x1637c6(_0x36886e['previousPosition']),_0x215c90=!0x0):_0x32afdb=_0x32afdb||_0x36886e['previousPosition']));}function _0x1637c6(_0x11383e){const _0x44050e=_0x9aa393['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x29e01b}),_0x240c23=_0x9aa393['mapper']['toViewPosition'](_0x11383e);_0x42c592['data']['isSuggestion']&&_0x9aa393['writer']['addClass']('ck-suggestion-marker-'+_0x29e01b+'-new',_0x44050e),_0x3322f0['activeChange']==_0x42c592&&_0x9aa393['writer']['addClass']('ck-suggestion-marker--active',_0x44050e),_0x9aa393['writer']['insert'](_0x240c23,_0x44050e),_0x9aa393['mapper']['bindElementToMarker'](_0x44050e,_0x2e7120['markerName']);}_0x18ab78||_0x215c90||!_0x32afdb||_0x1637c6(_0x32afdb);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3ff52a,_0x566e79,_0x26231a)=>{const _0x40f9b4=_0x26231a['mapper']['markerNameToElements'](_0x566e79['markerName']);if(_0x40f9b4){for(const _0x3c1c3a of _0x40f9b4)(_0x3c1c3a['hasClass']('ck-suggestion-marker-split')||_0x3c1c3a['hasClass']('ck-suggestion-marker-merge'))&&(_0x26231a['mapper']['unbindElementFromMarkerName'](_0x3c1c3a,_0x566e79['markerName']),_0x26231a['writer']['remove'](_0x3c1c3a));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x41cd86,_0x40f52d,_0x36a9ee)=>{const _0x243641=_0x40f52d['markerName']['split'](':')[0x1],_0x38a0fe=this['_getChangeFromId'](_0x243641);if(!_0x38a0fe)return null;const _0x169717='add'==_0x38a0fe['type']?'split':'merge';if(_0x36a9ee['consumable']['test'](_0x40f52d['markerRange'],_0x41cd86['name']))for(const _0x1237cf of _0x40f52d['markerRange']['getItems']()){if(!_0x1237cf['is']('element','softBreak'))continue;const _0xe25bb2=_0x36a9ee['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x169717}),_0x1851a3=_0x36a9ee['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1237cf));_0x38a0fe['data']['isSuggestion']&&_0x36a9ee['writer']['addClass']('ck-suggestion-marker-'+_0x169717+'-new',_0xe25bb2),this['activeChange']==_0x38a0fe&&_0x36a9ee['writer']['addClass']('ck-suggestion-marker--active',_0xe25bb2),_0x36a9ee['writer']['insert'](_0x1851a3,_0xe25bb2),_0x36a9ee['mapper']['bindElementToMarker'](_0xe25bb2,_0x40f52d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x59b56e=>{for(const _0x34f2ac of this['editor']['model']['document']['getRootNames']()){const _0x28ab2f=this['editor']['model']['document']['getRoot'](_0x34f2ac),_0x11137f=this['editor']['editing']['view']['document']['getRoot'](_0x34f2ac);if(_0x11137f){const _0x28119f=_0x28ab2f['getAttribute']('revisionHistoryAttachChange');if(_0x59b56e['removeAttribute']('data-change-id',_0x11137f),_0x59b56e['removeClass']('ck-revision-history-root-add',_0x11137f),_0x59b56e['removeClass']('ck-revision-history-root-remove',_0x11137f),_0x59b56e['removeClass']('ck-revision-history-root--active',_0x11137f),_0x28119f){const _0x3fff37=this['_getChangeFromId'](_0x28119f);if(!_0x3fff37)return null;_0x59b56e['setAttribute']('data-change-id',_0x28119f,_0x11137f),_0x59b56e['addClass']('ck-revision-history-root-'+_0x3fff37['type'],_0x11137f),this['activeChange']==_0x3fff37&&_0x59b56e['addClass']('ck-revision-history-root--active',_0x11137f);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x55e5af=>'revision-comment:'+_0x55e5af,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x63b8d=>'revision-suggestion:'+_0x63b8d,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x38ea55=>({'name':'suggestion:'+_0x38ea55,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x428df7=>{const _0x5331d=_0x428df7['markerName']['split'](':')[0x1];return'insertion'!=_0x5331d&&'deletion'!=_0x5331d?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5331d]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x234055,_0x147a34,_0x41ff75)=>{const _0x45d12e=_0x41ff75['mapper']['markerNameToElements'](_0x147a34['markerName']);if(_0x45d12e){for(const _0x29ad31 of _0x45d12e)_0x29ad31['is']('uiElement')&&(_0x41ff75['mapper']['unbindElementFromMarkerName'](_0x29ad31,_0x147a34['markerName']),_0x41ff75['writer']['remove'](_0x29ad31));}},{'priority':'high'});}['_getChangeFromId'](_0x2dc8ce){return this['_changeIdToChange']['get'](_0x2dc8ce);}['_getViewForChange'](_0x5e1657){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x5e1657),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1a8d94,_0x58949f,_0x549205,_0x5c2296)=>{_0x5c2296&&this['_balloon']['remove'](_0x5c2296),_0x549205&&(this['_balloon']['add']({'view':_0x549205,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4dd930=this['editor']['editing'],_0x59a772=this['_getChangeFromId'](_0x549205['changeId']);let _0x4aef03;if(_0x59a772['data']['isOnRoot']){const _0x3b486e=_0x4dd930['view']['getDomRoot'](_0x59a772['rootName']);_0x4aef03=Array['from'](_0x3b486e['getClientRects']());}else{const _0x4c75e0=this['editor']['model']['markers']['get']('revision:'+_0x549205['changeId']);_0x4aef03=Array['from'](_0x4dd930['mapper']['markerNameToElements'](_0x4c75e0['name']))['map'](_0x34ea67=>_0x4dd930['view']['domConverter']['mapViewToDom'](_0x34ea67))['map'](_0x2ae1d0=>Array['from'](_0x2ae1d0['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x4aef03['find'](_0x33d56f=>_0x33d56f['top']-0x3<=this['_activeViewTarget']['y']&&_0x33d56f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x33d56f['left']-0x3<=this['_activeViewTarget']['x']&&_0x33d56f['right']+0x3>=this['_activeViewTarget']['x'])||_0x4aef03[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x40b19e,_0x162e86,_0x61bc07,_0x504946)=>{this['activeView']=_0x61bc07?this['_getViewForChange'](_0x61bc07):null,this['editor']['model']['change'](()=>{const _0x10c704=this['editor']['editing'];_0x504946&&(_0x504946['data']['isOnRoot']?_0x10c704['view']['change'](_0x342e98=>{_0x342e98['removeClass']('ck-revision-history-root--active',_0x10c704['view']['document']['getRoot'](_0x504946['rootName']));}):_0x10c704['reconvertMarker']('revision:'+_0x504946['id'])),_0x61bc07&&(_0x61bc07['data']['isOnRoot']?_0x10c704['view']['change'](_0x4fe5c4=>{_0x4fe5c4['addClass']('ck-revision-history-root--active',_0x10c704['view']['document']['getRoot'](_0x61bc07['rootName']));}):_0x10c704['reconvertMarker']('revision:'+_0x61bc07['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4ffa8c,_0x46834f)=>{if(this['activeChange'])return;const _0x41e2ab=this['_findChangeIdFromDomTarget'](_0x46834f['target']),_0x5e1ad2=this['_changeIdToChange']['get'](_0x41e2ab);_0x5e1ad2?(this['_activeViewTarget']={'x':_0x46834f['domEvent']['x'],'y':_0x46834f['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5e1ad2)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x247616,_0x528f5e)=>{const _0xddcd6f=this['_findChangeIdFromDomTarget'](_0x528f5e['target']),_0x28df17=this['_changeIdToChange']['get'](_0xddcd6f);_0x28df17?(this['_activeViewTarget']={'x':_0x528f5e['domEvent']['x'],'y':_0x528f5e['domEvent']['y']},_0x28df17===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x28df17):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3aff13){do{const _0x342754=_0x3aff13['getAttribute']('data-change-id');if(_0x342754)return _0x342754;_0x3aff13=_0x3aff13['parent'];}while(_0x3aff13);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1c42e8=>{for(const _0xb5ebf3 of this['editor']['model']['markers'])_0x1c42e8['removeMarker'](_0xb5ebf3);});}};function Vt(_0x400b42,_0x49f1dc){return(_0x423885,_0x32648b,_0x27a21f)=>{if(!_0x27a21f['consumable']['test'](_0x32648b['markerRange'],_0x423885['name']))return;const _0x4dbe6c=_0x32648b['markerRange']['getWalker'](),_0x149aa8=_0x32648b['markerRange']['start'],_0x1e8bb0=_0x400b42['model']['schema'];let _0x51ba87=null,_0x59961c=null,_0x47bf16=!0x1,_0x548c92=!0x1;for(const _0x1e3b47 of _0x4dbe6c){const _0x2a245e=_0x1e3b47['item'];_0x47bf16=_0x47bf16||_0x1e8bb0['isContent'](_0x2a245e);const _0x30c77f=_0x27a21f['mapper']['toViewElement'](_0x2a245e);if(_0x30c77f&&_0x30c77f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1e3b47['type']&&(_0x1e8bb0['isBlock'](_0x2a245e)&&!_0x1e8bb0['isLimit'](_0x2a245e)&&(_0x2a245e['nextSibling']||_0x149aa8['isAtEnd']?_0x51ba87&&_0x51ba87['parent']==_0x2a245e||(_0x51ba87=_0x2a245e,_0x2f948d(_0x1e3b47['previousPosition']),_0x548c92=!0x0):_0x59961c=_0x59961c||_0x1e3b47['previousPosition']));}function _0x2f948d(_0x323cf9){const _0x263fd5=_0x27a21f['mapper']['toViewPosition'](_0x323cf9),_0x507159=_0x27a21f['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x49f1dc});_0x27a21f['writer']['insert'](_0x263fd5,_0x507159),_0x27a21f['mapper']['bindElementToMarker'](_0x507159,_0x32648b['markerName']);}_0x47bf16||_0x548c92||!_0x59961c||_0x2f948d(_0x59961c);};}var Dt=class extends _0xe8c052{constructor(_0x1a5f6b){super(_0x1a5f6b);const _0x13d261=_0x1a5f6b['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x13d261,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x13d261,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x45abf5=this['editor'],_0x308d53=_0x45abf5['plugins']['get'](Mt),_0x4fc6de=_0x308d53['isReady']?_0x308d53['diff']['newRevisionId']:null;_0x45abf5['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4fc6de);}['refresh'](){const {isReady:_0x27ad05,isEnabled:_0x4461fd,repository:_0x5df293,diff:_0x1f9ba5}=this['editor']['plugins']['get'](Mt),_0x45163b=_0x1f9ba5&&_0x5df293['getLaterVisibleRevision'](_0x1f9ba5['newRevisionId']);this['isEnabled']=_0x27ad05&&_0x4461fd&&Boolean(_0x45163b);}},Tt=class extends _0xe8c052{['_step'];constructor(_0x204461,{direction:_0x15f61d}){super(_0x204461);const _0x12d675=_0x204461['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x15f61d?0x1:-0x1,this['listenTo'](_0x12d675,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x12d675,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x12d675,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3d8ca7=this['editor'],_0x47be1c=_0x3d8ca7['plugins']['get'](Mt),{isNavigationMode:_0x5b6ad1,currentChangeNumber:_0xfe3b03}=_0x47be1c;let _0x42653a;if(_0x47be1c['activeChange']=_0x5b6ad1?_0x47be1c['diff']['changes']['get'](_0xfe3b03+this['_step']):_0x47be1c['diff']['changes']['first'],_0x47be1c['activeChange']['data']['isOnRoot'])_0x42653a=_0x3d8ca7['editing']['view']['getDomRoot'](_0x47be1c['activeChange']['rootName']);else{const _0x137302=_0x3d8ca7['model']['markers']['get']('revision:'+_0x47be1c['activeChange']['id']);_0x42653a=_0x358092(_0x3d8ca7['editing'],_0x137302);}_0x5b653f({'target':_0x42653a,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x456786,currentChangeNumber:_0x50c2fe,numberOfChanges:_0x44a86d,isReady:_0x724f6c,isEnabled:_0x5c1217}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x5c1217&&_0x724f6c&&_0x44a86d)&&(!_0x456786||(0x1===this['_step']?_0x50c2fe<_0x44a86d-0x1:_0x50c2fe>0x0));}},Ht=class extends at{constructor(_0x47fc84){super(_0x47fc84);const _0x10e016=this['bindTemplate'],_0xdc1592=new _0x5ab628(_0x47fc84),_0x4fc100=new _0x5ab628(_0x47fc84);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',(_0x57fb1b,_0x54afc7)=>_0x57fb1b&&_0x54afc7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x311131,_0x51bd04,_0x2e9d18,_0x3bb5c0)=>{if(!_0x311131)return pt(_0x47fc84,'Loading...');if(!_0x2e9d18)return pt(_0x47fc84,'No\x20changes');const _0xc2b70b=pt(_0x47fc84,'NUMBER_OF_CHANGES',_0x2e9d18);return _0x3bb5c0?pt(_0x47fc84,'X_OF_Y_CHANGES',[_0x51bd04+0x1,_0x2e9d18]):_0xc2b70b;}),_0xdc1592['set']({'label':pt(_0x47fc84,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x20110a}),_0x4fc100['set']({'label':pt(_0x47fc84,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x445035}),_0xdc1592['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4fc100['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xdc1592['on']('execute',()=>this['fire']('execute','backward')),_0x4fc100['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',_0x10e016['if']('_isStatusLabelVisible','ck-hidden',_0x1596bb=>!_0x1596bb)]},'children':[{'text':_0x10e016['to']('isNavigationMode',_0x360d54=>_0x360d54?pt(_0x47fc84,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x47fc84,'Total')+':\x20')}]},{'text':_0x10e016['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xdc1592,_0x4fc100]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x592ef7{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0xade1ee=this['editor']['editing']['view'];_0xade1ee['change'](_0x199898=>{for(const _0x5b90ab of _0xade1ee['document']['roots'])_0x199898['addClass'](Pt,_0x5b90ab);});}['hide'](){const _0x217e81=this['editor']['editing']['view'];_0x217e81['change'](_0x37d5b8=>{for(const _0x4b344e of _0x217e81['document']['roots'])_0x37d5b8['removeClass'](Pt,_0x4b344e);});}},Lt=class extends _0x592ef7{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x2edd=this['editor'],_0x3cb19a=_0x2edd['plugins']['get'](Mt),_0x1d6da3=_0x2edd['plugins']['get'](Ut);_0x2edd['ui']['componentFactory']['add']('exitToEditing',_0x4641a8=>{const _0x4bb453=new _0x5ab628(_0x4641a8);return _0x4bb453['set']({'label':pt(_0x4641a8,'Back\x20to\x20editing'),'icon':_0x53d4c9,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x4bb453,'execute',()=>{_0x2edd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x4bb453;}),_0x2edd['ui']['componentFactory']['add']('restoreRevision',_0x1b1f31=>{const _0x30606e=new _0x5ab628(_0x1b1f31);return _0x30606e['set']({'label':pt(_0x1b1f31,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x30606e['bind']('isEnabled')['to'](_0x2edd['commands']['get']('restoreRevision')),this['listenTo'](_0x30606e,'execute',()=>_0x2edd['execute']('restoreRevision')),_0x30606e;}),_0x2edd['ui']['componentFactory']['add']('changesNavigation',_0x414a9f=>{const _0x40fb6b=new Ht(_0x414a9f),_0x2f57d4=_0x2edd['commands']['get']('showPreviousChange'),_0x325181=_0x2edd['commands']['get']('showNextChange');return _0x40fb6b['bind']('isBackwardNavigationEnabled')['to'](_0x2f57d4,'isEnabled'),_0x40fb6b['bind']('isForwardNavigationEnabled')['to'](_0x325181,'isEnabled'),_0x40fb6b['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3cb19a),this['listenTo'](_0x40fb6b,'execute',(_0x590711,_0x1332f1)=>{_0x2edd['execute']('forward'===_0x1332f1?'showNextChange':'showPreviousChange');}),_0x40fb6b;}),_0x1d6da3['show'](),_0x3cb19a['on']('change:isReady',(_0x4658d1,_0xf3c1c8,_0x63701f)=>{_0x63701f?_0x1d6da3['hide']():_0x1d6da3['show']();});}},Ft=class extends _0x1a4e29{['_resizeObserver']=null;constructor(_0x3e2a39,_0x4dbe77){super(_0x3e2a39,_0x4dbe77);const _0x176f17=this['bindTemplate'];this['set']({'label':pt(_0x3e2a39,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x3e2a39,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x176f17['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x33c34e(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x3fe4cc=this['fieldView']['element'];this['_tooltipString']=_0x3fe4cc['scrollWidth']>_0x3fe4cc['clientWidth']&&_0x3fe4cc['value']||'';}},$t=class extends at{constructor(_0x3810c3,_0x1ab75f,_0x271479){super(_0x3810c3);const _0x2dfbaf=new _0x52ff68();_0x2dfbaf['set']({'content':_0x320df2,'viewBox':'0\x200\x2011\x2010'});const _0x4d9b48=['ck','ck-revision-history-sidebar__revision-author'];_0x271479&&_0x4d9b48['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5480c4=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x3810c3,_0x271479?'Revision\x20creator':'Revision\x20author')},'children':[_0x2dfbaf,_0x1ab75f['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4d9b48},'children':_0x5480c4});}};function jt(_0x21e820,_0x3ae735){const _0x32d8b1=_0x21e820['bindTemplate'],_0x1071d2=_0x21e820['locale'],_0x4f76af=ct(_0x1071d2);_0x4f76af['panelPosition']='sw';const _0x1985e0=function(_0x3bbf8b,_0x19d974){const _0x449a3a=function(_0x567e81,_0x552d95){const _0x46204b=_0x567e81['locale'],_0xc420a={'Compare\x20against\x20selected':pt(_0x46204b,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x46204b,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x46204b,'Restore\x20this\x20revision')};return _0x552d95['map'](_0x50a629=>{const _0x1d0f1b=_0xc420a[_0x50a629['name']];return _0x1d0f1b&&_0x1d0f1b!==_0x50a629['name']&&(_0x50a629['name']=_0x1d0f1b),_0x50a629;});}(_0x3bbf8b,_0x19d974),_0x3ffcac=new _0xe1aaa7();for(const _0x4ef947 of _0x449a3a){const _0x50510c={'type':'button','model':new rt({'label':_0x4ef947['name'],'class':_0x4ef947['class'],'withText':!0x0,'role':'menuitem','_action':_0x4ef947['action']})};_0x50510c['model']['bind']('isEnabled')['to'](_0x3bbf8b,'isActionsDropdownOpen',_0x565e5e=>'function'!=typeof _0x4ef947['isEnabled']||(!_0x565e5e||_0x4ef947['isEnabled'](_0x3bbf8b))),_0x3ffcac['add'](_0x50510c);}return _0x3ffcac;}(_0x21e820,_0x3ae735);return _0x21e820['bind']('isActionsDropdownOpen')['to'](_0x4f76af,'isOpen'),_0x4f76af['buttonView']['set']({'label':pt(_0x1071d2,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0xff9c52}),_0x4f76af['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x32d8b1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x32d8b1['to'](_0x1d0f31=>_0x1d0f31['stopPropagation']())}}),_0x4f76af['on']('execute',_0x6af1b2=>{_0x21e820['isReady']&&'function'==typeof _0x6af1b2['source']['_action']&&_0x6af1b2['source']['_action'](_0x21e820);}),ht(_0x4f76af,_0x1985e0,{'role':'menu'}),_0x4f76af['listenTo'](_0x21e820,'change:isActionsDropdownOpen',(_0x55c74a,_0xfb3da9,_0x2db417)=>{if(_0x2db417)for(const _0xab97d1 of _0x4f76af['listView']['items']){const _0x2f2383=_0xab97d1['children']['first'],_0x5686ed=_0x3ae735['find'](_0x3f47ad=>_0x3f47ad['action']===_0x2f2383['_action'])['isVisible'];_0xab97d1['isVisible']=void 0x0===_0x5686ed||_0x5686ed(_0x21e820);}}),_0x4f76af;}const Bt=/* #__PURE__ -- @preserve */
27
- _0x54da09(at);var Kt=class extends Bt{['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x4ab881,_0x23e44a,_0x3d2601,_0x42059b){super(_0x4ab881);const _0x19ff20=this['bindTemplate'],_0xf63f37=function(_0x2685f6,_0x56eb45){const _0x3439f8=Array['from'](_0x56eb45['authors'])['filter'](_0x299295=>_0x299295!=_0x56eb45['creator']);return _0x56eb45['creator']&&_0x3439f8['unshift'](_0x56eb45['creator']),_0x3439f8['map'](_0x27e79a=>new $t(_0x2685f6,_0x27e79a,_0x27e79a==_0x56eb45['creator']));}(_0x4ab881,_0x23e44a);this['id']=_0x23e44a['id'],this['_revision']=_0x23e44a,this['_requireRevisionName']=_0x42059b,this['bind']('name','createdAt')['to'](_0x23e44a),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2948fd=>{return _0x564d39=_0x4ab881['uiLanguage'],(_0x291f0f=_0x2948fd)['toLocaleDateString'](_0x564d39,{'month':'long','day':'numeric'})+',\x20'+_0x291f0f['toLocaleTimeString'](_0x564d39,{'hour':'numeric','minute':'numeric'});var _0x564d39,_0x291f0f;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x4ab881,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x44cb18=>_0x44cb18||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x558e42,_0x205d47)=>_0x558e42&&_0x205d47),this['revisionActionsView']=_0x3d2601&&_0x3d2601['length']?jt(this,_0x3d2601):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x19ff20['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x19ff20['if']('isEnabled','ck-disabled',_0x1c0772=>!_0x1c0772),_0x19ff20['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x19ff20['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x19ff20['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':_0x19ff20['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':_0xf63f37}]},this['revisionActionsView']],'on':{'click':_0x19ff20['to'](_0x3dc731=>{_0x3dc731['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x243bb3=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x243bb3,'change',()=>{this['_requireRevisionName']&&!_0x243bb3['value']||this['fire']('setName',{'id':this['id'],'name':_0x243bb3['value']}),_0x243bb3['value']||(_0x243bb3['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}};function qt(_0x3e1cd7,_0x4e43c9){const _0x5a9950=ft['fromJSDate'](_0x3e1cd7)['setLocale'](_0x4e43c9),_0x2c92c2=ft['local'](),_0x5be3bf=_0x2c92c2['minus']({'days':0x1})['startOf']('day');let _0x1085da,_0x2b633e;return _0x5a9950['hasSame'](_0x2c92c2,'day')?(_0x1085da=_0x5a9950['startOf']('day')['toJSDate'](),_0x2b633e=_0x5a9950['toRelativeCalendar']()):_0x5a9950['hasSame'](_0x5be3bf,'day')?(_0x1085da=_0x5be3bf['toJSDate'](),_0x2b633e=_0x5a9950['toRelativeCalendar']()):_0x5a9950['hasSame'](_0x2c92c2,'week')?(_0x1085da=_0x5a9950['startOf']('week')['toJSDate'](),_0x2b633e=_0x5a9950['weekdayLong']||''):_0x5a9950['hasSame'](_0x2c92c2,'year')?(_0x1085da=_0x5a9950['startOf']('month')['toJSDate'](),_0x2b633e=_0x5a9950['monthLong']||''):(_0x1085da=_0x5a9950['startOf']('year')['toJSDate'](),_0x2b633e=String(_0x5a9950['year'])),{'startDate':_0x1085da,'localizedPeriodName':_0x2b633e};}var Gt=class extends at{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x19c18b,_0x4ff13b,_0x3c381b,_0x483112){super(_0x19c18b);const _0x400762=qt(_0x4ff13b,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4ff13b,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x3c381b,this['_requireRevisionName']=_0x483112,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':_0x400762}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x21225a){const _0x233411=new Kt(this['locale'],_0x21225a,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x233411);}['removeRevision'](_0x114dc5){const _0x2af8b5=this['revisionViews']['find'](_0xf76ae2=>_0xf76ae2['id']===_0x114dc5['id']);this['revisionViews']['remove'](_0x2af8b5);}},Jt=class extends at{constructor(_0x2d60b0){super(_0x2d60b0);const _0xf33b16=new _0x52ff68();_0xf33b16['content']=_0x5fc2b3,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0xf33b16,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x2d60b0,'Revision\x20history')]}]});}},Wt=class extends at{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x40a600,_0x175377,_0x152cee,_0x39e666){super(_0x40a600);const _0x37460f=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x175377,this['_revisionActions']=_0x152cee,this['_requireRevisionName']=_0x39e666,this['on']('select',(_0x1e8101,_0x4e4ddc)=>{this['fire']('revisionSelected',_0x4e4ddc);}),this['on']('setName',(_0x42c509,_0x25678d)=>{this['fire']('revisionSetName',_0x25678d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x40a600),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x37460f['if']('isEnabled','ck-disabled',_0x316b5f=>!_0x316b5f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x2c3dfe of this['_revisions'])this['_addRevision'](_0x2c3dfe);this['_revisions']['on']('add',(_0x1300f8,_0x2c0137)=>{this['_addRevision'](_0x2c0137);}),this['_revisions']['on']('remove',(_0x506afa,_0x5e8a26)=>{this['_removeRevision'](_0x5e8a26);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x7c1da1=>_0x7c1da1['revisionViews']['map'](_0x52aac2=>_0x52aac2))['flat']();}['selectRevision'](_0x2f07cc){for(const _0x465bff of this['revisionViews'])_0x2f07cc&&_0x2f07cc['id']===_0x465bff['id']?_0x465bff['select']():_0x465bff['deselect']();}['highlightRevisions'](_0x1b653a){for(const _0x3c2d45 of this['revisionViews'])_0x1b653a['some'](({id:_0xabe570})=>_0xabe570===_0x3c2d45['id'])?_0x3c2d45['highlight']():_0x3c2d45['unhighlight']();}['_addRevision'](_0x3e66ba){const _0x216dcb=qt(_0x3e66ba['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x56c31f=this['_getTimePeriodViewByStartDate'](_0x216dcb);_0x56c31f||(_0x56c31f=new Gt(this['locale'],_0x216dcb,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x56c31f)),_0x56c31f['addRevision'](_0x3e66ba);}['_removeRevision'](_0x132ee3){const _0x4c52b0=qt(_0x132ee3['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4c52b0)['removeRevision'](_0x132ee3);}['_getTimePeriodViewByStartDate'](_0x7e5a75){return this['timePeriodViews']['find'](_0x3d3f7c=>_0x3d3f7c['startDate']['getTime']()===_0x7e5a75['getTime']());}},Yt=class RevisionsSidebar extends _0x592ef7{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{CKEditorError as _0x135cf0,Collection as _0x453cd2,ElementReplacer as _0x3440e3,FocusTracker as _0x321da2,KeystrokeHandler as _0x32815b,ObservableMixin as _0x4e64c6,ResizeObserver as _0x5490e3,logWarning as _0x4ac5cd,scrollViewportToShowTarget as _0x269e7a,uid as _0x3001b8}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x201516,isEqual as _0x14a458,set as _0x13863d,unset as _0x5a2c4b}from'es-toolkit/compat';import{Command as _0x2702e2,Editor as _0x36c4f1,ElementApiMixin as _0x15a34e,PendingActions as _0x2e33f3,Plugin as _0x73140e}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x55aae2,Users as _0x1a8e81,getMarkerDomElement as _0x293709,sanitizeEditorConfig as _0x583072}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x75e513,ModelElement as _0xe6fd24,ModelPosition as _0x51b10c,ModelRange as _0x32e9fa,ModelText as _0x1e0d67,ViewAttributeElement as _0x4ba13c,ViewContainerElement as _0x19913c,ViewDocumentFragment as _0x3bcecd,ViewElement as _0x134973,ViewEmptyElement as _0x5b3d97,ViewRawElement as _0x23aa6d,ViewText as _0x290400,ViewUIElement as _0x5bd25c}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x420769,IconChevronUp as _0x1ce83c,IconHistory as _0x52e288,IconThreeVerticalDots as _0x1cdb41,IconUndo as _0x4781ac,IconUser as _0x38a6c8}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x3b7457,ButtonView as _0x178003,ContextualBalloon as _0x3176ee,CssTransitionDisablerMixin as _0x4ef663,EditorUI as _0x5ad29c,IconView as _0x3cc9fe,InlineEditableUIView as _0xe50b03,LabeledFieldView as _0x469ef1,ListItemView as _0x5082de,ListView as _0x4ae715,MenuBarMenuListItemButtonView as _0x552109,MenuBarMenuListItemView as tt,MenuBarMenuListView as it,MenuBarMenuView as et,StickyPanelView as st,ToolbarSeparatorView as nt,ToolbarView as ot,UIModel as rt,View as at,addListToDropdown as ht,createDropdown as ct,createLabeledInputText as lt,normalizeToolbarConfig as ut,submitHandler as dt}from'@ckeditor/ckeditor5-ui';import{DateTime as ft}from'luxon';const vt=/* #__PURE__ -- @preserve */
24
+ _0x4e64c6();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1f4a7b){super(),this['id']=_0x1f4a7b['id']||_0x3001b8(),this['creator']=_0x1f4a7b['creator']||null,this['authors']=_0x1f4a7b['authors']||[],this['diffData']=_0x1f4a7b['diffData']||null,this['toVersion']=_0x1f4a7b['toVersion']||0x0,this['fromVersion']=_0x1f4a7b['fromVersion']||0x0,this['set']('name',_0x1f4a7b['name']||''),this['set']('createdAt',_0x1f4a7b['createdAt']||new Date()),this['set']('attributes',_0x1f4a7b['attributes']||{});}['setName'](_0x16aec0){this['_update']({'name':_0x16aec0});}['setAttribute'](_0x3fc4ba,_0x493892){const _0x5457ed=_0x201516(this['attributes']);_0x13863d(_0x5457ed,_0x3fc4ba,_0x493892),this['_update']({'attributes':_0x5457ed});}['removeAttribute'](_0x48aa99){const _0x49bd09=_0x201516(this['attributes']);_0x5a2c4b(_0x49bd09,_0x48aa99),this['_update']({'attributes':_0x49bd09});}['_update'](_0x222aba,_0x2d6ec2=!0x1){let _0x45c723=!0x1;const _0x3035a8={'id':this['id']};for(const _0x8eb745 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x331ffe=_0x222aba[_0x8eb745];void 0x0!==_0x331ffe&&_0x331ffe!==this[_0x8eb745]&&(this[_0x8eb745]=_0x331ffe,_0x3035a8[_0x8eb745]=_0x331ffe,_0x45c723=!0x0);}_0x45c723&&(_0x3035a8['authors']&&(_0x3035a8['authorsIds']=_0x3035a8['authors']['map'](_0x138213=>_0x138213['id']),delete _0x3035a8['authors']),this['fire']('_update',_0x3035a8,_0x2d6ec2));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x10d774=>_0x10d774['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x73140e{['_revisions'];static get['requires'](){return[_0x1a8e81];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2588ce){super(_0x2588ce),this['_revisions']=new _0x453cd2();}['afterInit'](){!async function(_0x56b98a){const _0x1a850f='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x549625=0xeb829,_0x5260a3=0x78fc0,_0x40d1d8=window['Date']['now'](),_0xd2485=_0x56b98a['editor'],_0x26e7c6=new window['Promise'](_0x477d58=>{_0xd2485['once']('ready',_0x477d58);}),_0x5d59b4={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x86eca1=_0xd2485['config']['get']('licenseKey');async function _0x5d0131(){let _0x300bbd,_0x559cb0=null,_0x3b64a9=null;try{return'GPL'==_0x86eca1?'NotAllowed':(_0x300bbd=_0x48c3eb(),_0x300bbd?(_0x300bbd['usageEndpoint']&&(_0x3b64a9=_0x251936(_0x300bbd['usageEndpoint'],_0x300bbd['jti'])),await _0x5d244a()?_0x4f6862()?_0x556021()?'Expired':_0x124484()?('evaluation'==_0x300bbd['licenseType']&&(_0x559cb0=_0x4c9c19('EvaluationLimit')),await _0x13122d()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x556021(){const _0x2488ee=['evaluation','trial']['includes'](_0x300bbd['licenseType'])?_0x40d1d8/0x3e8:0xe10*_0x5260a3;return _0x300bbd['exp']<_0x2488ee;}function _0x4f6862(){const _0x5a85a2=_0x300bbd['features'];if(!_0x5a85a2)return!0x1;if(_0x5a85a2['includes']('*'))return!0x0;if(_0x5a85a2['includes']('RH'))return!0x0;if(_0x5a85a2['includes']('RRH')){if(_0xc0298d())return!0x0;if(_0x2746c7()||_0x45dbc7())return!0x0;}return!0x1;}function _0x124484(){const _0x48ad4b=_0x300bbd['licensedHosts'];if(!_0x48ad4b||0x0==_0x48ad4b['length'])return!0x0;const {hostname:_0x3e61d4}=new URL(window['location']['href']);if(_0x48ad4b['includes'](_0x3e61d4))return!0x0;const _0x313463=_0x3e61d4['split']('.');return _0x48ad4b['filter'](_0x52b010=>_0x52b010['includes']('*'))['map'](_0x4e1b86=>_0x4e1b86['split']('.'))['filter'](_0x3f68cd=>_0x3f68cd['length']<=_0x313463['length'])['map'](_0x38f93b=>Array(_0x313463['length']-_0x38f93b['length'])['fill']('*'===_0x38f93b[0x0]?'*':'')['concat'](_0x38f93b))['some'](_0x2285f4=>_0x313463['every']((_0x4bf753,_0x34097b)=>_0x2285f4[_0x34097b]===_0x4bf753||'*'===_0x2285f4[_0x34097b]));}function _0x13122d(){return _0x559cb0&&_0x3b64a9?new window['Promise']((_0x4fbdf6,_0x336ff5)=>{_0x559cb0['then'](_0x4fbdf6,_0x336ff5),_0x3b64a9['then'](_0x5d0239=>{'Valid'!=_0x5d0239&&_0x4fbdf6(_0x5d0239);},_0x336ff5);}):_0x559cb0||_0x3b64a9||'Valid';}}function _0x251936(_0x176a1c,_0x28d13b){return new window['Promise'](_0x5a75b8=>{if(_0x41db72())return _0x5a75b8('Valid');_0x1c0d65(),_0xd2485['decorate']('_sendUsageRequest');let _0x3da89e=!0x1;const _0x3f3de2=_0x3001b8();function _0x7e4b3f(_0x4fc601){return!!_0x4fc601&&('object'==typeof _0x4fc601||'function'==typeof _0x4fc601)&&'function'==typeof _0x4fc601['then']&&'function'==typeof _0x4fc601['catch'];}function _0x541e3a(_0x17c690){_0x22c0b1(_0x17c690)['then'](_0x274e8f=>_0x274e8f&&'ok'==_0x274e8f['status']?_0x1e6a5a(_0x3c8ce1(_0x3f3de2+_0x28d13b))!=_0x274e8f['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x50cccb=>(_0x51787b(),_0x50cccb),()=>{const _0x1de09a=_0x5dda70();return null==_0x1de09a?(_0x51787b(),'Valid'):_0x40d1d8-_0x1de09a>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5a75b8)['catch'](()=>{_0x5a75b8('UsageLimit');});const _0xbd6a54=0x36ee80;function _0x51787b(){const _0x3fd592='llct-'+_0x1e6a5a(_0x3c8ce1(_0x176a1c)),_0x169ffa=_0x4279f5(_0x1e6a5a(window['Math']['ceil'](_0x40d1d8/_0xbd6a54)));window['localStorage']['setItem'](_0x3fd592,_0x169ffa);}function _0x5dda70(){const _0x4d66e1='llct-'+_0x1e6a5a(_0x3c8ce1(_0x176a1c)),_0x8c378e=window['localStorage']['getItem'](_0x4d66e1);return _0x8c378e?window['parseInt'](_0x4279f5(_0x8c378e),0x10)*_0xbd6a54:null;}function _0x22c0b1(_0x59a251){return new window['Promise']((_0x1e6d5e,_0x3fe71d)=>{_0x59a251['then'](_0x1e6d5e,_0x3fe71d),window['setTimeout'](_0x3fe71d,0x1d4c0);});}}_0xd2485['on']('_sendUsageRequest',(_0x5629a0,_0x5ea536)=>{if(_0x5ea536[0x0]!=_0x176a1c)return _0x5a75b8('UsageLimit');_0x5ea536[0x1]={..._0x5ea536[0x1],'requestId':_0x3f3de2};},{'priority':'high'}),_0xd2485['on']('_sendUsageRequest',_0xaaffa0=>{_0x7e4b3f(_0xaaffa0['return'])&&(_0x3da89e=!0x0,_0x541e3a(_0xaaffa0['return']));},{'priority':'low'}),_0x26e7c6['then'](()=>{_0x3da89e||_0x5a75b8('UsageLimit');});});function _0x41db72(){return'auto'==_0xd2485['editing']['view']['_overlayModeHint'];}function _0x1c0d65(){_0xd2485['editing']['view']['_overlayModeHint']='auto';}}function _0x4c9c19(_0x3bcaa0){const _0x47f699=[new window['Promise'](_0x2ae699=>setTimeout(_0x2ae699,0x93ecc)),_0x26e7c6['then'](()=>new window['Promise'](_0x1e6188=>{const _0x37226f=0x7,_0x5851ab=_0x56b98a['_revisions'];function _0x4d4631(){_0x5851ab['length']>=_0x37226f&&_0x1e6188();}_0x4d4631(),_0x5851ab['on']('add',_0x4d4631);})),new window['Promise'](_0x2ed82e=>{function _0x1b4f30(){for(const _0x566204 in window)if(window['Number']['isNaN'](window['Number'](_0x566204))&&window[_0x566204]==_0x549625)return _0x2ed82e();'destroyed'!=_0xd2485['state']&&window['setTimeout'](_0x1b4f30,0x1388);}_0x5152a1('RevisionViewer')&&_0x1b4f30();})];return window['Promise']['race'](_0x47f699)['then'](()=>_0x3bcaa0);}async function _0x425039(){if(await _0x26e7c6,_0x5152a1('RevisionViewer')){const _0x2d4ad3=_0x56b98a['getRevision'](0x0),_0x111fa3=_0x56b98a['getEarlierVisibleRevision'](_0x2d4ad3['id']),_0x584f56=_0x25e75f('RevisionViewer');return await _0x584f56['compare'](_0x2d4ad3['id'],_0x111fa3?_0x111fa3['id']:null,!0x0),_0x584f56['unbind']('isEnabled'),_0x584f56['isEnabled']=!0x1,_0x584f56['compare']=_0x374785,void(_0x584f56['_getDiff']=_0x374785);}if(_0x5152a1('RevisionTracker')){const _0x29d279=_0x25e75f('RevisionTracker');_0x29d279['unbind']('isEnabled'),_0x29d279['isEnabled']=!0x1,_0x29d279['update']=_0x374785,_0x29d279['saveRevision']=_0x374785;}_0xd2485['model']['change']=_0x374785,_0xd2485['model']['enqueueChange']=_0x374785,_0xd2485['enableReadOnlyMode']('model');}function _0xc0298d(){return _0x5152a1('WebSocketGateway')&&'connected'==_0x25e75f('WebSocketGateway')['state'];}function _0x2746c7(){return _0x5152a1('RevisionViewerIntegration');}function _0x45dbc7(){return _0x5152a1('TrackChangesDataGetter');}function _0x26f605(_0x13bc81){const _0x2d3766=_0x181794();_0xd2485[_0x2d3766]='revisionHistoryLicenseKey'+_0x13bc81,_0x13bc81['endsWith']('Limit')&&(window[_0x181794()]=_0x549625),'Valid'!=_0x13bc81&&_0x425039();}function _0x181794(){const _0x35f024=window['String'](window['performance']['now']())['replace']('.','');let _0x56eb95='v';for(let _0x1fed8c=0x0;_0x1fed8c<_0x35f024['length'];_0x1fed8c+=0x2){let _0x11cc02=window['parseInt'](_0x35f024['substring'](_0x1fed8c,_0x1fed8c+0x2));_0x11cc02>=0x3e&&(_0x11cc02-=0x3e),_0x56eb95+=_0x1a850f[_0x11cc02];}return _0x56eb95;}function _0x48c3eb(){const _0x50c04a=_0x86eca1['split']('.');if(0x3!=_0x50c04a['length'])return null;return _0x309b82(_0x50c04a[0x1]);function _0x309b82(_0xf8a28a){const _0x3d19e4=_0x104768(_0xf8a28a);return _0x3d19e4&&_0x5d8a2a()?_0x3d19e4:null;function _0x5d8a2a(){const _0x204968=_0x3d19e4['jti'],_0x5e73bd=window['parseInt'](_0x204968['substring'](_0x204968['length']-0x8),0x10),_0x33aa7a={..._0x3d19e4,'jti':_0x204968['substring'](0x0,_0x204968['length']-0x8)};return delete _0x33aa7a['vc'],_0x3c8ce1(_0x33aa7a)==_0x5e73bd;}}}async function _0x5d244a(){let _0x3506bc=!0x0;try{const [_0x23a036,_0x59dbe4,_0x317d34]=_0x86eca1['split']('.');return _0x5acd63(_0x23a036),await _0x348303(_0x23a036,_0x59dbe4,_0x317d34),_0x3506bc;}catch{return!0x1;}function _0x5acd63(_0x19571b){const _0x3eb420=_0x104768(_0x19571b);_0x3eb420&&'ES256'==_0x3eb420['alg']||(_0x3506bc=!0x1);}async function _0x348303(_0x28c061,_0x49ee4e,_0x31562b){const _0x332670=window['Uint8Array']['from'](_0x33ef43(_0x31562b),_0x38f1a6=>_0x38f1a6['charCodeAt'](0x0)),_0x2125c5=new window['TextEncoder']()['encode'](_0x28c061+'.'+_0x49ee4e),_0x1f84df=window['crypto']['subtle'];if(!_0x1f84df)return;const _0xd3c3fc=await _0x1f84df['importKey']('jwk',_0x5d59b4,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1f84df['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xd3c3fc,_0x332670,_0x2125c5)||(_0x3506bc=!0x1);}}function _0x104768(_0x103d07){return _0x103d07['startsWith']('ey')?JSON['parse'](_0x33ef43(_0x103d07)):null;}function _0x33ef43(_0x3e5abc){return window['atob'](_0x3e5abc['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3c8ce1(_0x13bf4d){let _0x1abacf=0x1505;function _0x5686d2(_0x437523){for(let _0x578209=0x0;_0x578209<_0x437523['length'];_0x578209++){const _0x5c6000=_0x437523['charCodeAt'](_0x578209);_0x1abacf=(_0x1abacf<<0x5)+_0x1abacf+_0x5c6000,_0x1abacf&=_0x1abacf;}}function _0x6d2747(_0x1dc7f6){Array['isArray'](_0x1dc7f6)?_0x1dc7f6['forEach'](_0x6d2747):_0x1dc7f6&&'object'==typeof _0x1dc7f6?Object['entries'](_0x1dc7f6)['sort']()['forEach'](([_0x1750a6,_0x470a94])=>{_0x5686d2(_0x1750a6),_0x6d2747(_0x470a94);}):_0x5686d2(window['String'](_0x1dc7f6));}return _0x6d2747(_0x13bf4d),_0x1abacf>>>0x0;}function _0x1e6a5a(_0x4b5eab){return _0x4b5eab['toString'](0x10)['padStart'](0x8,'0');}function _0x4279f5(_0x522764){return _0x522764['split']('')['reverse']()['join']('');}function _0x5152a1(_0x50a8ad){return _0xd2485['plugins']['has'](_0x50a8ad);}function _0x25e75f(_0x112d45){return _0xd2485['plugins']['get'](_0x112d45);}function _0x374785(){}_0x26f605(await _0x5d0131());}(this);}['createRevision'](_0x1694be){const _0x187d33=this['editor']['plugins']['get']('Users');return new gt({'id':_0x1694be['id'],'name':_0x1694be['name'],'creator':_0x1694be['creatorId']?_0x187d33['getUser'](_0x1694be['creatorId']):null,'diffData':_0x1694be['diffData']||_0x1694be['data'],'authors':_0x1694be['authorsIds']['map'](_0x1c3392=>_0x187d33['getUser'](_0x1c3392)),'createdAt':new Date(_0x1694be['createdAt']),'attributes':_0x1694be['attributes'],'fromVersion':_0x1694be['fromVersion'],'toVersion':_0x1694be['toVersion']});}['addRevision'](_0x494528,_0x57fcad=0x0){this['_revisions']['add'](_0x494528,_0x57fcad);}['getRevision'](_0x5cc1e6){return this['_revisions']['get'](_0x5cc1e6);}['getRevisions'](_0x12c352={'toJSON':!0x1}){const _0x251c69=Array['from'](this['_revisions']);return _0x251c69['reverse'](),_0x12c352['toJSON']?_0x251c69['map'](_0x3dcae8=>_0x3dcae8['toJSON']()):_0x251c69;}['getIndex'](_0x20e176){return this['_revisions']['getIndex'](_0x20e176);}['getEarlierVisibleRevision'](_0x12bcb1){const [,_0x3681fd]=this['getRevisionsIterator'](_0x12bcb1,{'direction':'earlier'});return _0x3681fd;}['getLaterVisibleRevision'](_0x3531a8){const [,_0x2bfd70]=this['getRevisionsIterator'](_0x3531a8,{'direction':'later'});return _0x2bfd70;}['getRevisionsInDiff'](_0x12694d){const _0x4f7b2e=[];for(const _0x82690f of this['getRevisionsIterator'](_0x12694d['newRevisionId']))if(_0x4f7b2e['push'](_0x82690f),_0x82690f['id']===_0x12694d['oldRevisionId'])break;return _0x4f7b2e;}*['getRevisionsIterator'](_0x5089f1,{direction:_0x4deaa1='earlier',filter:_0x548224=()=>!0x0}={}){const _0x1d6be8='earlier'===_0x4deaa1?0x1:-0x1;let _0x2b9716=this['_revisions']['get'](_0x5089f1),_0x4676de=this['getIndex'](_0x2b9716);for(yield _0x2b9716;_0x2b9716;){if(_0x4676de+=_0x1d6be8,_0x2b9716=this['getRevision'](_0x4676de),!_0x2b9716)return;_0x548224(_0x2b9716)&&(yield _0x2b9716);}}},wt=class extends _0x73140e{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x19913c,'c'],[_0x4ba13c,'a'],[_0x5b3d97,'e'],[_0x23aa6d,'r'],[_0x5bd25c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x19913c],['a',_0x4ba13c],['e',_0x5b3d97],['r',_0x23aa6d],['u',_0x5bd25c]]);async['loadRevisionData'](_0x2b7ead,_0x28f853){if(_0x2b7ead['diffData']||!_0x28f853)return;const _0x4973dd=this['editor']['config']['get']('collaboration.channelId');_0x2b7ead['diffData']=(await _0x28f853['getRevision']({'channelId':_0x4973dd,'revisionId':_0x2b7ead['id']}))['diffData'];}['getRevisionDocumentData'](_0x23739c){const _0x48e2ca={};for(const _0xf4d017 in _0x23739c['diffData']){if(_0x23739c['diffData'][_0xf4d017]['attachChange']&&!_0x23739c['diffData'][_0xf4d017]['attachChange']['isAttached'])continue;const _0x325db5=this['_removeRevisionMarkers'](JSON['parse'](_0x23739c['diffData'][_0xf4d017]['insertions'])),_0xf0f242=this['editor']['editing']['view']['document'],_0x5ec3a4=new _0x3bcecd(_0xf0f242,_0x325db5['map'](_0x4715ec=>this['_getViewFromDiffObj'](_0x4715ec,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x48e2ca[_0xf4d017]=this['editor']['data']['processor']['toData'](_0x5ec3a4),this['editor']['data']['processor']['useFillerType']('default');}return _0x48e2ca;}['getRevisionRootsAttributes'](_0x213f1f){const _0x33dce5={};for(const _0x44a74c in _0x213f1f['diffData'])_0x213f1f['diffData'][_0x44a74c]['attachChange']&&!_0x213f1f['diffData'][_0x44a74c]['attachChange']['isAttached']||(_0x33dce5[_0x44a74c]=_0x213f1f['diffData'][_0x44a74c]['attributesAfter']||{});return _0x33dce5;}['getRevisionRootsModelElements'](_0x2e7970){const _0x3c0448={};for(const _0x317b74 in _0x2e7970['diffData']){if(_0x2e7970['diffData'][_0x317b74]['attachChange']&&!_0x2e7970['diffData'][_0x317b74]['attachChange']['isAttached'])continue;const _0x4da4c7=_0x2e7970['diffData'][_0x317b74]['rootElementName'];_0x4da4c7&&(_0x3c0448[_0x317b74]=_0x4da4c7);}return _0x3c0448;}['_getTypeCharForViewElement'](_0x1b9941){return this['_viewClassToTypeChar']['get'](_0x1b9941['constructor']);}['_getViewFromDiffObj'](_0xc72688,_0x373e5c){const _0x36a36d=this['editor']['editing']['view']['document'];if('string'==typeof _0xc72688)return new _0x290400(_0x36a36d,_0xc72688);{let _0x2360b0,_0x43efd6;_0x43efd6='u'==_0xc72688['type']||'r'==_0xc72688['type']?[]:_0xc72688['children']['map'](_0x2e8532=>this['_getViewFromDiffObj'](_0x2e8532,_0x373e5c));const _0x45937a=this['_typeCharToViewClass']['get'](_0xc72688['type'])||_0x134973,_0x2d5639=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2360b0=new _0x45937a(_0x36a36d,_0xc72688['name'],_0xc72688['attributes'],_0x43efd6),'u'==_0xc72688['type']&&_0xc72688['children'][0x0]){const _0x312927=_0xc72688['children'][0x0];if(_0x2360b0['render']=function(_0x19c1ba){const _0x126ac2=_0x19c1ba['createElement']('div');return _0x126ac2['innerHTML']=_0x312927,_0x126ac2['childNodes'][0x0];},_0x373e5c){const _0x346077=new _0x3bcecd(_0x36a36d);_0x346077['_appendChild'](_0x2360b0);const _0x4c9e36=Array['from'](_0x2d5639['viewChildrenToDom'](_0x346077,{'bind':!0x1})),_0x232d50=_0x2d5639['domDocument']['createElement']('div');_0x232d50['append'](..._0x4c9e36),_0x2360b0=Array['from'](_0x2d5639['domChildrenToView'](_0x232d50))[0x0];}}else{if('r'==_0xc72688['type']&&_0xc72688['children'][0x0]){const _0x509d42=_0xc72688['children'][0x0];if(_0x2360b0['render']=function(_0x23d868){_0x23d868['innerHTML']=_0x509d42;},_0x373e5c){const _0x299fc0=new _0x3bcecd(_0x36a36d);_0x299fc0['_appendChild'](_0x2360b0);const _0x14244c=Array['from'](_0x2d5639['viewChildrenToDom'](_0x299fc0,{'bind':!0x1})),_0x47a47e=_0x2d5639['domDocument']['createElement']('div');_0x47a47e['append'](..._0x14244c);const _0x4fd242=Array['from'](_0x2d5639['domChildrenToView'](_0x47a47e));_0x4fd242['length']>0x1?_0x2360b0['_appendChild'](_0x4fd242):_0x2360b0=_0x4fd242[0x0];}}}if(_0xc72688['customProperties']){for(const [_0xaa0e3b,_0x213a65]of _0xc72688['customProperties'])_0x2360b0['_setCustomProperty'](_0xaa0e3b,_0x213a65);}const _0x3e8808=void 0x0===_0xc72688['fillerOffset']?null:_0xc72688['fillerOffset'];return null!==_0x3e8808&&(_0x2360b0['getFillerOffset']=()=>_0x3e8808),_0x2360b0;}}['_makeModelFromViewString'](_0x490d05,_0x543923){const _0x1be7d8=JSON['parse'](_0x490d05),_0x8972f9=this['editor']['editing']['view']['document'],_0x1ff843=new _0x3bcecd(_0x8972f9,_0x1be7d8['map'](_0x5a4906=>this['_getViewFromDiffObj'](_0x5a4906,!0x0))),_0x57a47c=this['editor']['data']['toModel'](_0x1ff843,_0x543923);return _0x57a47c['name']=_0x543923,_0x57a47c;}['_removeRevisionMarkers'](_0x478022){return(_0x478022=_0x478022['filter'](_0x5d45d8=>!_0x5d45d8['name']||'revision-start'!==_0x5d45d8['name']&&'revision-end'!==_0x5d45d8['name']))['forEach'](_0x545c82=>{'string'!=typeof _0x545c82&&(_0x545c82['children']=this['_removeRevisionMarkers'](_0x545c82['children']),_0x545c82['attributes']=_0x545c82['attributes']['filter'](_0xb94d85=>!_0xb94d85[0x0]['startsWith']('data-revision-')));}),_0x478022;}};function pt(_0x2b545f,_0x2f5967,_0xbdc018){const t=_0x2b545f['t'];switch(_0x2f5967){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'},_0xbdc018);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xbdc018);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'';}}var _t=class extends _0x73140e{['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[_0x1a8e81,mt,wt,_0x2e33f3];}constructor(_0x3999d3){super(_0x3999d3),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x328ec9=_0x3001b8();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x328ec9},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 _0x328629=this['repository']['getRevision'](0x0),_0x1da7ba=_0x328629&&null===_0x328629['creator']?_0x328629:null;if(this['_continueCurrentRevision']=!!_0x1da7ba&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x303d6=this['_source']['getCurrentRevisionId'](),_0xad9d1b=this['repository']['getRevision'](_0x303d6);if(_0xad9d1b)this['_startingVersion']=_0xad9d1b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1b662b=this['_source']['history']['_operations']['find'](_0x14d754=>!_0x14d754['_isInit']),_0x489d74=_0x1b662b?_0x1b662b['baseVersion']:this['_source']['history']['version'];_0x328629?(_0x328629['toVersion']<_0x489d74&&_0x328629['_update']({'toVersion':_0x489d74}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x1da7ba['id'],this['_startingVersion']=_0x1da7ba['fromVersion']):(this['_startingVersion']=_0x328629['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x489d74,this['_continueCurrentRevision']=!0x1);}}else _0x1da7ba&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x1da7ba['toVersion'],this['editor']['model']['document']['history']['version']),_0x1da7ba['fromVersion']===_0x1da7ba['toVersion']?(0x0!==_0x1da7ba['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x1da7ba['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x1da7ba['id'],this['_startingVersion']=_0x1da7ba['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',_0x1abf26=>!_0x1abf26),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3765ca=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2cefa6;for(const _0x2e8413 in _0x3765ca){const _0x5d3e63=_0x2e8413,_0x30971d=_0x3765ca[_0x5d3e63];if('revisionHistoryLicenseKeyValid'==_0x30971d||'revisionHistoryLicenseKeyInvalid'==_0x30971d||'revisionHistoryLicenseKeyExpired'==_0x30971d||'revisionHistoryLicenseKeyDomainLimit'==_0x30971d||'revisionHistoryLicenseKeyNotAllowed'==_0x30971d||'revisionHistoryLicenseKeyEvaluationLimit'==_0x30971d||'revisionHistoryLicenseKeyUsageLimit'==_0x30971d){delete _0x3765ca[_0x5d3e63],_0x2cefa6=_0x30971d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2cefa6&&_0x3765ca['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2cefa6&&_0x3765ca['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2cefa6&&_0x3765ca['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2cefa6&&_0x3765ca['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2cefa6&&_0x3765ca['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2cefa6&&_0x3765ca['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x1e1f4a=this['repository']['getRevision'](0x0),_0x4537b5=await this['getRevisionDocumentData'](_0x1e1f4a),_0x3af90b=await this['getRevisionRootsAttributes'](_0x1e1f4a),_0x5b0df1=this['_utils']['getRevisionRootsModelElements'](_0x1e1f4a);this['_replaceEditorDataWithRevisionData'](_0x4537b5,_0x3af90b,_0x5b0df1);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1cf51f){this['_source']=_0x1cf51f;}async['update'](){const _0x2a056c=await this['_source']['getLatestVersion']();if(_0x2a056c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x21d84c=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x2a056c});_0x21d84c['authors']=_0x21d84c['authorsIds']['map'](_0x200003=>this['editor']['plugins']['get']('Users')['getUser'](_0x200003)),this['currentRevision']['_update'](_0x21d84c);}}async['saveRevision'](_0x423f5c={},_0xeee83e=null){const _0x3e6d9b=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xeee83e>this['currentRevision']['toVersion']&&(_0xeee83e=null),null===_0xeee83e&&(_0xeee83e=await this['_source']['getLatestVersion']());const _0x266e43=this['_getFromVersion'](_0xeee83e),_0x180193=this['buildRevisionData']({'from':_0x266e43,'to':_0xeee83e});if(this['currentRevision']['toVersion']<_0xeee83e){const _0x1a7723=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xeee83e,'to':_0xeee83e});_0x1a7723['authors']=[],_0x1a7723['authorsIds']=[],_0x1a7723['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1a7723,!0x0),delete _0x1a7723['authors'],_0x3e6d9b['push'](_0x1a7723);}_0x423f5c['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x423f5c['name']=_0x423f5c['name']||null,_0x423f5c['id']=_0x423f5c['id']||_0x3001b8(),_0x423f5c={..._0x423f5c,..._0x180193};const _0x47b49f=this['addRevisionData'](_0x423f5c);_0x3e6d9b['push'](_0x423f5c);const _0x2735a6=this['repository']['getIndex'](_0x47b49f);if(0x0!==_0x2735a6){const _0x15c197=this['repository']['getRevision'](_0x2735a6-0x1);if(_0x15c197['fromVersion']!==_0xeee83e){const _0x2df1a7=this['_revisionDataBuilder']['getData'](_0xeee83e,_0x15c197['toVersion']),_0x7437c9={'id':_0x15c197['id'],'diffData':_0x2df1a7['diffData'],'authorsIds':_0x2df1a7['authorsIds'],'authors':_0x2df1a7['authorsIds']['map'](_0x4fe507=>this['editor']['plugins']['get']('Users')['getUser'](_0x4fe507)),'fromVersion':_0xeee83e};_0x15c197===this['currentRevision']&&(_0x7437c9['createdAt']=new Date(_0x423f5c['createdAt']['getTime']()+0xa)),_0x15c197['_update'](_0x7437c9,!0x0),delete _0x7437c9['authors'],_0x3e6d9b['push'](_0x7437c9);}}if(this['adapter']){for(const _0x4e6557 of _0x3e6d9b)this['_bufferUpdate'](_0x4e6557['id'],_0x4e6557,!0x0);this['sendBufferedUpdates']();}return _0x47b49f;}['addRevisionData'](_0x37c920){const _0x411afa=this['repository']['createRevision'](_0x37c920);return this['adapter']&&_0x411afa['on']('_update',(_0x237316,_0x49471c,_0x450e4f)=>{_0x450e4f||(this['_bufferUpdate'](_0x49471c['id'],_0x49471c,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x411afa,this['_findInsertionIndex'](_0x411afa)),_0x411afa;}async['getRevisionDocumentData'](_0x11d591){return await this['_utils']['loadRevisionData'](_0x11d591,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x11d591);}async['getRevisionRootsAttributes'](_0xcbe6b5){return await this['_utils']['loadRevisionData'](_0xcbe6b5,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xcbe6b5);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5043ab=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x19b20c=0x0;_0x19b20c<_0x5043ab['length'];_0x19b20c++){const _0x3713b8=_0x5043ab[_0x19b20c];let _0x517d31=!0x1;for(const _0xc772a0 of Object['keys'](_0x3713b8))void 0x0===_0x3713b8[_0xc772a0]?delete _0x3713b8[_0xc772a0]:'id'!==_0xc772a0&&(_0x517d31=!0x0);_0x517d31||(_0x5043ab[_0x19b20c]=null);}if(_0x5043ab=_0x5043ab['filter'](_0x5e08a6=>null!==_0x5e08a6),!_0x5043ab['length'])return;for(let _0x51767a=0x0;_0x51767a<_0x5043ab['length'];_0x51767a++){const _0x106f9a=_0x5043ab[_0x51767a];void 0x0!==_0x106f9a['fromVersion']&&void 0x0===_0x106f9a['toVersion']&&(_0x106f9a['toVersion']=this['repository']['getRevision'](_0x106f9a['id'])['toVersion']),void 0x0!==_0x106f9a['toVersion']&&void 0x0===_0x106f9a['fromVersion']&&(_0x106f9a['fromVersion']=this['repository']['getRevision'](_0x106f9a['id'])['fromVersion']);}const _0xae7d6=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5043ab,_0xae7d6)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1d438f=>{if(_0x1d438f){for(const _0x1e17c7 of _0x1d438f)this['setRevisionData']({'id':_0x1e17c7['id'],'createdAt':_0x1e17c7['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x518dab=null,from:_0x544580=null,to:_0x4a249d=null}){_0x544580=null!==_0x544580?_0x544580:_0x518dab['fromVersion'],_0x4a249d=null!==_0x4a249d?_0x4a249d:_0x518dab['toVersion'];const _0x640ca4=this['_revisionDataBuilder']['getData'](_0x544580,_0x4a249d),_0x5cd9e4={'diffData':_0x640ca4['diffData'],'authorsIds':_0x640ca4['authorsIds'],'fromVersion':_0x544580,'toVersion':_0x4a249d};if(!_0x518dab||_0x4a249d!==_0x518dab['toVersion']){const _0x4e126a=_0x4a249d-0x1,_0x37583f=this['_source']['history']['getOperation'](_0x4e126a);_0x5cd9e4['createdAt']=_0x37583f&&_0x37583f['createdAt']||new Date();}if(this['_loadedStateData']&&_0x544580===this['_loadedStateData']['fromVersion']){for(const _0x5b25dd of this['_loadedStateData']['authors'])_0x5cd9e4['authorsIds']['includes'](_0x5b25dd['id'])||_0x5cd9e4['authorsIds']['push'](_0x5b25dd['id']);}return _0x5cd9e4;}['_bufferUpdate'](_0x2b43ae,_0xedc11a,_0x5317a4){if(this['_bufferedUpdates']['has'](_0x2b43ae)){const _0x52ea15=this['_bufferedUpdates']['get'](_0x2b43ae);_0xedc11a=_0x5317a4?{..._0x52ea15,..._0xedc11a}:{..._0xedc11a,..._0x52ea15};}this['_bufferedUpdates']['set'](_0x2b43ae,_0xedc11a);}['setRevisionData'](_0x53fc28){const _0x2137fa=this['repository']['getRevision'](_0x53fc28['id']);if(_0x53fc28['createdAt']&&(_0x53fc28['createdAt']=new Date(_0x53fc28['createdAt'])),_0x53fc28['authorsIds']){const _0xb0baf1=this['editor']['plugins']['get']('Users');_0x53fc28['authors']=_0x53fc28['authorsIds']['map'](_0x5d0f57=>_0xb0baf1['getUser'](_0x5d0f57));}_0x2137fa['_update'](_0x53fc28,!0x0);}['_createInitialRevision'](_0x4438a3){const _0x44bba4=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x44bba4)this['_initialRevisionId']=_0x44bba4['id'];else{const _0x43d25e=!this['editor']['model']['document']['roots']['find'](_0x46a2f0=>this['editor']['model']['hasContent'](_0x46a2f0)),_0x2a0d5e=this['editor']['plugins']['get']('Users')['me']['id'],_0x23de51=pt(this['editor']['locale'],_0x43d25e?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4438a3,'to':_0x4438a3,'id':this['_initialRevisionId'],'name':_0x23de51,'creatorId':_0x2a0d5e});}}['_createCurrentRevision'](_0x124db0){const _0x4cafb4=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4cafb4),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x124db0,'to':_0x124db0,'id':_0x4cafb4,'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'](_0x4eeee1,_0x45552b,_0xa025c1){const _0x475871={},_0x286d8d={},_0x5ece07={},_0xdd74c2=this['editor']['config']['get']('roots')||{};for(const [_0x40b365,_0x98e4ba]of Object['entries'](_0xdd74c2))_0x98e4ba['lazyLoad']||(_0x475871[_0x40b365]=_0x98e4ba['initialData']??'',_0x286d8d[_0x40b365]=_0x98e4ba['modelAttributes']||{},_0x98e4ba['modelElement']&&(_0x5ece07[_0x40b365]=_0x98e4ba['modelElement']));for(const _0x2af1e4 of this['editor']['model']['document']['getRootNames']())_0x475871[_0x2af1e4]??='',_0x286d8d[_0x2af1e4]??={};let _0x47d553=!0x1;const _0x4e4bc2=Object['keys'](_0x475871),_0x4165fd=Object['keys'](_0x4eeee1);for(const _0x443e6f of _0x4e4bc2){if(_0x475871[_0x443e6f]!==_0x4eeee1[_0x443e6f]&&''!==_0x475871[_0x443e6f]['trim']()){_0x47d553=!0x0;break;}if(!_0x14a458(_0x286d8d[_0x443e6f],_0x45552b[_0x443e6f])&&Object['keys'](_0x286d8d[_0x443e6f])['length']>0x0){_0x47d553=!0x0;break;}const _0x35e909=_0x5ece07[_0x443e6f],_0x1591bb=_0xa025c1[_0x443e6f];if(_0x35e909&&_0x1591bb&&_0x35e909!==_0x1591bb){_0x47d553=!0x0;break;}}_0x47d553||(_0x47d553=_0x4165fd['some'](_0x3de439=>!this['editor']['model']['document']['getRoot'](_0x3de439))),_0x47d553&&_0x4ac5cd('editor-initial-data-replaced-with-revision-data',{'editorData':_0x475871,'editorRootsAttributes':_0x286d8d,'editorRootsModelElements':_0x5ece07,'revisionData':_0x4eeee1,'revisionRootsAttributes':_0x45552b,'revisionRootsModelElements':_0xa025c1});for(const [_0x4b4181,_0x4a3726]of Object['entries'](_0x4eeee1))this['editor']['config']['set']('roots.'+_0x4b4181+'.initialData',_0x4a3726);for(const [_0x4a1c42,_0x192542]of Object['entries'](_0x45552b))this['editor']['config']['set']('roots.'+_0x4a1c42+'.modelAttributes',_0x192542);const _0x218478=this['editor']['model']['document'];for(const [_0x250fcc,_0x2791ab]of Object['entries'](_0xa025c1)){this['editor']['config']['set']('roots.'+_0x250fcc+'.modelElement',_0x2791ab);const _0x2a9821=_0x218478['getRoot'](_0x250fcc);_0x2a9821&&_0x2a9821['name']!==_0x2791ab&&(_0x218478['roots']['remove'](_0x250fcc),_0x218478['createRoot'](_0x2791ab,_0x250fcc));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5eb2c8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5eb2c8['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x3be022){const _0x52bc0d=this['repository']['getRevisions']();_0x52bc0d['reverse']();let _0x60ecd7=0x0;for(;_0x60ecd7<_0x52bc0d['length'];){const _0xbdd4f7=_0x52bc0d[_0x60ecd7];if(_0xbdd4f7===this['currentRevision']){_0x60ecd7++;continue;}if(_0xbdd4f7['id']===this['_initialRevisionId'])break;const _0x22c015=_0x3be022['toVersion']-_0xbdd4f7['toVersion']||_0x3be022['fromVersion']-_0xbdd4f7['fromVersion'];if(_0x22c015>0x0)break;if(_0x22c015<0x0)_0x60ecd7++;else{if(!_0x3be022['creator']&&_0xbdd4f7['creator'])break;if(_0xbdd4f7['creator']||!_0x3be022['creator']){if(_0x3be022['createdAt']>_0xbdd4f7['createdAt'])break;_0x60ecd7++;}else _0x60ecd7++;}}return _0x60ecd7;}['_getFromVersion'](_0x5cd152){const _0x44e1d7=this['repository']['getRevisions']();_0x44e1d7['reverse'](),_0x44e1d7['shift']();const _0x1db30f=_0x44e1d7['find'](_0x31b1ff=>_0x31b1ff['toVersion']<=_0x5cd152)['toVersion'];return _0x1db30f<this['_startingVersion']?this['_startingVersion']:_0x1db30f;}['_makeRevision']({name:_0x37013d,from:_0x265915,to:_0x17aac8,creatorId:_0x282e02,id:_0x40a30e}){const _0x98a183=this['buildRevisionData']({'from':_0x265915,'to':_0x17aac8});_0x98a183['name']=_0x37013d,_0x98a183['creatorId']=_0x282e02,_0x98a183['id']=_0x40a30e;const _0x4e87fb=this['addRevisionData'](_0x98a183);return this['adapter']&&this['_bufferUpdate'](_0x98a183['id'],_0x98a183,!0x0),_0x4e87fb;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0xff23ab){this['editor']=_0xff23ab,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'](_0xc22114){this['source']=_0xc22114;const _0x59085c=new Map(),_0x105051=new Map(),_0x74c008=this['editor']['model']['document']['roots']['map'](_0x3626cb=>_0x3626cb['rootName']);for(const _0x562aad of _0x74c008){const _0x37426e=this['editor']['model']['document']['getRoot'](_0x562aad),_0x140c3a=bt(_0x37426e);_0x59085c['set'](_0x562aad,_0x140c3a),_0x105051['set'](_0x562aad,Object['fromEntries'](_0x37426e['getAttributes']()));}const _0x395786=Array['from'](this['editor']['model']['markers'])['map'](_0x6126c8=>[_0x6126c8['name'],_0x6126c8['getRange']()]),_0x5a04d1=this['source']['version'];this['_saveMetaData'](_0x5a04d1,_0x59085c,_0x395786,_0x105051),this['_startingRevisionId']=this['_revisionId'];const _0x16209c=new Map(),_0x1930ac=new Map();for(const _0x370a9d of _0x74c008){const _0x1bbd13=Rt(_0x370a9d,this['editor']['model']['document']['getRoot'](_0x370a9d)['name']);_0x16209c['set'](_0x370a9d,_0x1bbd13),_0x1930ac['set'](_0x370a9d,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x16209c,[],_0x1930ac);}['getData'](_0x45321c,_0x3b8227){if(this['_lastFrom']===_0x45321c&&this['_lastTo']<=_0x3b8227)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3b8227,!0x0);else{if(!this['_savedMetaData']['has'](_0x45321c)){const _0x311576=this['_getPreviousFrom'](_0x45321c);this['_calculateMetaData'](_0x311576,_0x45321c,!0x1);}this['_calculateMetaData'](_0x45321c,_0x3b8227,!0x0);}return this['_lastFrom']=_0x45321c,this['_lastTo']=_0x3b8227,this['_getState']();}['loadState'](_0x5889c9){if(!this['_savedMetaData']['has'](_0x5889c9['fromVersion'])){const _0x2829bf=this['_getPreviousFrom'](_0x5889c9['fromVersion']);this['_calculateMetaData'](_0x2829bf,_0x5889c9['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5889c9['fromVersion'],_0x5889c9['toVersion'],!0x1);const _0x298e52=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5889c9['fromVersion'],this['_lastTo']=_0x5889c9['toVersion'];for(const _0xa98da in _0x5889c9['diffData']){const _0x1d98f5=_0x5889c9['diffData'][_0xa98da]['attachChange'],_0x2bcd27=_0x201516(_0x5889c9['diffData'][_0xa98da]['attributesBefore'])||{},_0x3f45a2=_0x5889c9['diffData'][_0xa98da],_0xd40c21=_0x298e52['_makeModelFromViewString'](_0x3f45a2['deletions'],_0x3f45a2['rootElementName']||'$root');_0xd40c21['rootName']=_0xa98da,_0xd40c21['_isAttached']=!_0x1d98f5||!_0x1d98f5['isAttached'],_0xd40c21['isAttached']=()=>_0xd40c21['_isAttached'],this['_baseRoots']['set'](_0xa98da,_0xd40c21),this['_baseRootsAttributes']['set'](_0xa98da,_0x2bcd27),_0x1d98f5&&this['_touchedRoots']['set'](_0xa98da,_0x1d98f5);const _0x1ff511=this['_makeIdsRoot'](_0xd40c21);this['_baseIdsRoots']['set'](_0xa98da,_0x1ff511);for(const [_0x1cacf4,_0x38512c]of _0xd40c21['markers']){if(!_0x1cacf4['startsWith']('revision:'))continue;const _0x181997=_0x1cacf4['split'](':')[0x2];for(const _0x5b1aaa of _0x38512c['getWalker']({'singleCharacters':!0x0})){const _0x4ab445=this['_getVidAttributeName'](_0x5b1aaa),_0x362a90='elementEnd'==_0x5b1aaa['type']?_0x5b1aaa['previousPosition']['path']['slice'](0x0,-0x1):_0x5b1aaa['previousPosition']['path'],_0x2cff36=_0x1ff511['getNodeByPath'](_0x362a90)['getAttribute'](_0x4ab445);this['_touched']['set'](_0x2cff36,{'userId':_0x181997});}_0xd40c21['markers']['delete'](_0x1cacf4);}}this['_startingRevisionId']=this['_revisionId'];const _0x3ef076=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x123b2=>!this['_touched']['has'](_0x123b2));let _0x3cfc62=0x0;const _0x11f410=new Map();for(const _0x50a482 in _0x5889c9['diffData']){const _0x50931a=_0x5889c9['diffData'][_0x50a482]['attachChange'],_0x5d113f=_0x201516(_0x5889c9['diffData'][_0x50a482]['attributesAfter'])||{},_0x3d0acd=_0x5889c9['diffData'][_0x50a482],_0xc9f445=_0x298e52['_makeModelFromViewString'](_0x3d0acd['insertions'],_0x3d0acd['rootElementName']||'$root');_0xc9f445['rootName']=_0x50a482,_0xc9f445['_isAttached']=!_0x50931a||_0x50931a['isAttached'],_0xc9f445['isAttached']=()=>_0xc9f445['_isAttached'],this['_diffRoots']['set'](_0x50a482,_0xc9f445),this['_diffRootsAttributes']['set'](_0x50a482,_0x5d113f);const _0x18559a=this['_makeIdsRoot'](_0xc9f445,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x50a482,_0x18559a),_0x11f410['set'](_0x50a482,_0xc9f445['isAttached']()?_0x5d113f:{});for(const [_0x2278cd,_0x438cef]of _0xc9f445['markers']){if(!_0x2278cd['startsWith']('revision:'))continue;const _0x19e8e9=_0x2278cd['split'](':')[0x2];for(const _0x16b09c of _0x438cef['getWalker']({'singleCharacters':!0x0})){const _0x53263f=this['_getVidAttributeName'](_0x16b09c),_0x405a31=this['_revisionId']++,_0x3c8599='elementEnd'==_0x16b09c['type']?_0x16b09c['previousPosition']['path']['slice'](0x0,-0x1):_0x16b09c['previousPosition']['path'];_0x18559a['getNodeByPath'](_0x3c8599)['_setAttribute'](_0x53263f,_0x405a31),this['_touched']['set'](_0x405a31,{'userId':_0x19e8e9});}_0xc9f445['markers']['delete'](_0x2278cd);}for(const _0x547bea of this['editor']['model']['createRangeIn'](_0xc9f445)['getWalker']({'singleCharacters':!0x0})){const _0x21a2c6=this['_getVidAttributeName'](_0x547bea),_0x41b248='elementEnd'==_0x547bea['type']?_0x547bea['previousPosition']['path']['slice'](0x0,-0x1):_0x547bea['previousPosition']['path'],_0x2743a5=_0x18559a['getNodeByPath'](_0x41b248);_0x2743a5['getAttribute'](_0x21a2c6)>0x0||_0x2743a5['_setAttribute'](_0x21a2c6,_0x3ef076[_0x3cfc62++]);}for(const [_0x44c1ac,_0x32ce0e]of _0xc9f445['markers'])_0x44c1ac['startsWith']('revision:')||this['_markers']['set'](_0x44c1ac,_0x32ce0e);}const {roots:_0x313af9}=this['_savedMetaData']['get'](_0x5889c9['fromVersion']),{roots:_0x38f2d3}=this['_savedMetaData']['get'](_0x5889c9['toVersion']),_0x290556=bt(_0x313af9['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x290556),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x290556,Number['NEGATIVE_INFINITY']));const _0x3c6e85=bt(_0x38f2d3['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x3c6e85),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3c6e85));const _0x4be9be=Array['from'](this['_diffRoots'])['map'](([_0x975d70,_0x1284cc])=>[_0x975d70,bt(_0x1284cc)]);this['_saveMetaData'](this['_lastTo'],_0x4be9be,this['_markers'],_0x11f410);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x28c3d3,_0xe2d9e2,_0x34382e,_0x4f9237){const _0x300636=new Map(_0xe2d9e2),_0x317ef9=new Map(_0x201516(_0x4f9237)),_0x474faf=new Map();for(const [_0x2e3bd3,_0x892835]of _0x34382e)_0x474faf['set'](_0x2e3bd3,{'start':_0x892835['start']['clone'](),'end':_0x892835['end']['clone'](),'rootName':_0x892835['root']['rootName']});this['_savedMetaData']['set'](_0x28c3d3,{'roots':_0x300636,'markers':_0x474faf,'rootsAttributes':_0x317ef9});}['_removeMetaData'](_0x467c78){this['_savedMetaData']['delete'](_0x467c78);}['_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'](_0x1af78b,_0x40a9e2=null){let _0x59dd5d=null;_0x1af78b['is']('documentFragment')||(_0x59dd5d=new _0xe6fd24(_0x1af78b['name'],{'vid_start':null===_0x40a9e2?this['_revisionId']++:_0x40a9e2++}));const _0x5ab5ed=[];for(const _0x3f1ec9 of _0x1af78b['getChildren']())if(_0x3f1ec9['is']('element')){_0x5ab5ed['push'](this['_makeIdsRoot'](_0x3f1ec9,_0x40a9e2));const _0x303551=_0x5ab5ed[_0x5ab5ed['length']-0x1];null!==_0x40a9e2&&(_0x40a9e2=_0x303551['is']('element','$text')?_0x303551['getAttribute']('vid')+0x1:_0x303551['getAttribute']('vid_end')+0x1);}else{for(let _0x933827=0x0;_0x933827<_0x3f1ec9['offsetSize'];_0x933827++)_0x5ab5ed['push'](new _0xe6fd24('$text',{'vid':null===_0x40a9e2?this['_revisionId']++:_0x40a9e2++}));}if(_0x1af78b['is']('documentFragment')){const _0x1e9c1d=Rt(_0x1af78b['rootName'],_0x1af78b['name']);return _0x1e9c1d['_insertChild'](0x0,_0x5ab5ed),_0x1e9c1d;}return _0x59dd5d['_setAttribute']('vid_end',null===_0x40a9e2?this['_revisionId']++:_0x40a9e2++),_0x59dd5d['_insertChild'](0x0,_0x5ab5ed),_0x59dd5d;}['_calculateMetaData'](_0x1dacf2,_0x5cab50,_0xb88652){this['_reset']();const {roots:_0x24ae43,markers:_0x1e6dcb,rootsAttributes:_0x3b04c6}=this['_savedMetaData']['get'](_0x1dacf2);this['_baseRoots']=new Map(_0x24ae43),this['_baseRootsAttributes']=new Map(_0x201516(_0x3b04c6));for(const [_0x367f30,_0x2b64fd]of this['_baseRoots'])if('$graveyard'!==_0x367f30&&(this['_diffRoots']['set'](_0x367f30,bt(_0x2b64fd)),this['_diffRootsAttributes']=new Map(_0x201516(_0x3b04c6)),_0xb88652)){const _0x3ba042=this['_revisionId'];this['_idsRoots']['set'](_0x367f30,this['_makeIdsRoot'](_0x2b64fd)),this['_baseIdsRoots']['set'](_0x367f30,this['_makeIdsRoot'](_0x2b64fd,_0x3ba042));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0xb88652&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4000c8,_0x48c1b2]of _0x1e6dcb){const _0x144558=this['_baseRoots']['get'](_0x48c1b2['rootName']),_0x32fabc=this['_diffRoots']['get'](_0x48c1b2['rootName']),_0x20b187=new _0x32e9fa(this['_fixPosition'](_0x48c1b2['start'],_0x144558),this['_fixPosition'](_0x48c1b2['end'],_0x144558)),_0x224e87=this['_fixRange'](_0x20b187,_0x32fabc);_0x144558['markers']['set'](_0x4000c8,_0x20b187),this['_markers']['set'](_0x4000c8,_0x224e87);}this['_applyOperations'](_0x1dacf2,_0x5cab50,_0xb88652);}['_applyOperations'](_0x500fe3,_0x46de4e,_0x23414b){for(const _0x30a4cb of this['source']['getOperations'](_0x500fe3,_0x46de4e))this['_handleOperation'](_0x30a4cb,_0x23414b);for(const _0x60ed9d of this['_diffRoots']['values']())_0x60ed9d['markers']['clear']();for(const [_0x2cbd4b,_0x25ee55]of this['_markers'])this['_diffRoots']['get'](_0x25ee55['root']['rootName'])['markers']['set'](_0x2cbd4b,_0x25ee55['clone']());const _0x4c0e14=new Map(),_0x3f3faa=new Map();for(const [_0x17e0c7,_0x5631a4]of this['_diffRoots'])_0x4c0e14['set'](_0x17e0c7,bt(_0x5631a4)),_0x3f3faa['set'](_0x17e0c7,this['_diffRootsAttributes']['get'](_0x17e0c7));this['_saveMetaData'](_0x46de4e,_0x4c0e14,this['_markers'],_0x3f3faa);}['_getPreviousFrom'](_0x59adba){const _0x5746b9=Array['from'](this['_savedMetaData']['keys']());_0x5746b9['sort']((_0x2b2c37,_0x1dcf47)=>_0x2b2c37-_0x1dcf47),_0x5746b9['reverse']();for(const _0x246d89 of _0x5746b9)if(_0x246d89<_0x59adba)return _0x246d89;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x16b899,_0x1c3854){const _0x6125e6=Array['from'](_0x1c3854['markers'])['map'](([_0x2dc1c2,_0x47b69c])=>[_0x2dc1c2,this['_fixRange'](_0x47b69c,_0x16b899)]);_0x16b899['markers']=new Map(_0x6125e6);}['_transformMarkers'](_0x976b9e){for(const _0x180106 of this['_markers']['values']()){const _0x525d5b=_0x180106['getTransformedByOperation'](_0x976b9e),_0x2ffb7d=_0x32e9fa['_createFromRanges'](_0x525d5b);_0x180106['start']=_0x2ffb7d['start'],_0x180106['end']=_0x2ffb7d['end'];}}['_handleOperation'](_0xe56421,_0x115633){if('addRoot'!=_0xe56421['type']&&'detachRoot'!=_0xe56421['type']){if('insert'==_0xe56421['type']){const _0x57bc80=_0xe56421['position']['root'],_0x5b787b=_0x57bc80['rootName'],_0x349b6a=_0x57bc80['name'];this['_diffRoots']['has'](_0x5b787b)||(this['_diffRoots']['set'](_0x5b787b,Rt(_0x5b787b,_0x349b6a,!0x0)),this['_diffRootsAttributes']['set'](_0x5b787b,{}),_0x115633&&this['_idsRoots']['set'](_0x5b787b,Rt(_0x5b787b,_0x349b6a,!0x0)));}else{if('addRootAttribute'==_0xe56421['type']||'removeRootAttribute'==_0xe56421['type']||'changeRootAttribute'==_0xe56421['type'])return void this['_handleRootAttributeOperation'](_0xe56421);'marker'==_0xe56421['type']&&this['_handleMarkerOperation'](_0xe56421);}if('marker'!==_0xe56421['type']){const _0x13d400=this['_cloneOperation'](_0xe56421,this['_diffRoots']);_0x13d400['_execute'](),this['_transformMarkers'](_0x13d400);}if(_0x115633)switch(_0xe56421['type']){case'insert':this['_handleInsertOperation'](_0xe56421);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xe56421);break;case'merge':this['_handleMergeOperation'](_0xe56421);break;case'split':this['_handleSplitOperation'](_0xe56421);}}else this['_handleRootOperation'](_0xe56421,_0x115633);}['_cloneOperation'](_0x3b12fb,_0x1059fb){const _0x131c4a=_0x3b12fb['clone']();return _0x131c4a['_authorId']=_0x3b12fb['_authorId'],this['_fixOperation'](_0x131c4a,_0x1059fb),_0x131c4a;}['_getBaseVids'](_0x469cf4){return _0x469cf4['map'](_0x1aa4b9=>{const _0x10fb92=this['_getVidAttributeName'](_0x1aa4b9);return Number(_0x1aa4b9['item']['getAttribute'](_0x10fb92));});}['_generateTape'](_0x1d8eca,_0x10fbf0){if(_0x1d8eca['is']('element','$text'))_0x10fbf0['push']({'item':_0x1d8eca,'type':'text'});else{_0x1d8eca['is']('element')&&_0x10fbf0['push']({'item':_0x1d8eca,'type':'elementStart'});for(const _0x331f1e of _0x1d8eca['getChildren']())this['_generateTape'](_0x331f1e,_0x10fbf0);_0x1d8eca['is']('element')&&_0x10fbf0['push']({'item':_0x1d8eca,'type':'elementEnd'});}return _0x10fbf0;}['_getState'](){const _0x40d650=new Map(this['_touched']),_0xa31e6e=new Map(_0x40d650),_0x208fa2=new Map(),_0x5546aa={'insertions':{},'deletions':{}},_0x1ab717={'insertions':{},'deletions':{}},_0x19d285=new Map(),_0xe1e4c9=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1b7599=new Map();_0xe1e4c9['delete']('$graveyard');for(const _0x2ddc36 of _0xe1e4c9){const _0x38a2ea=(this['_diffRoots']['get'](_0x2ddc36)??this['_baseRoots']['get'](_0x2ddc36))['name'],_0x3ae2d5=this['_diffRoots']['get'](_0x2ddc36)||Rt(_0x2ddc36,_0x38a2ea,!0x1),_0x70ac25=this['_baseRoots']['get'](_0x2ddc36)||Rt(_0x2ddc36,_0x38a2ea,!0x1);_0x3ae2d5['isAttached']()||_0x70ac25['isAttached']()?(_0x1b7599['set'](_0x2ddc36,_0x38a2ea),_0x5546aa['insertions'][_0x2ddc36]=bt(_0x3ae2d5),_0x5546aa['deletions'][_0x2ddc36]=bt(_0x70ac25),this['_copyMarkers'](_0x5546aa['deletions'][_0x2ddc36],_0x70ac25),this['_copyMarkers'](_0x5546aa['insertions'][_0x2ddc36],_0x3ae2d5),_0x1ab717['insertions'][_0x2ddc36]=this['_generateTape'](this['_idsRoots']['get'](_0x2ddc36),[]),_0x1ab717['deletions'][_0x2ddc36]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x2ddc36)||Rt(_0x2ddc36,_0x38a2ea,!0x1),[])):_0xe1e4c9['delete'](_0x2ddc36);}for(const _0xeee03 of _0xe1e4c9){const _0x488d87=_0x1ab717['insertions'][_0xeee03];for(const _0x6483d of _0x488d87){const _0x265c67=this['_getVidAttributeName'](_0x6483d),_0xe14333=_0x6483d['item']['getAttribute'](_0x265c67);_0xa31e6e['delete'](_0xe14333),_0xe14333>=this['_startingRevisionId']&&_0x208fa2['set'](_0xe14333,_0x40d650['get'](_0xe14333));}}for(const _0x2eedee of _0xe1e4c9){const _0x41c55a=_0x1ab717['insertions'][_0x2eedee],_0x4ab2c4=this['_getBaseVids'](_0x1ab717['deletions'][_0x2eedee]);let _0x3382e9=0x0;for(const _0x41aedd of _0x41c55a){const _0x3b2c8b=this['_getVidAttributeName'](_0x41aedd),_0x2f4e69=_0x41aedd['item']['getAttribute'](_0x3b2c8b);if(!_0x208fa2['has'](_0x2f4e69)&&!_0x19d285['has'](_0x2f4e69)){if(_0xa31e6e['has'](_0x2f4e69))_0x3382e9++;else{if(_0x2f4e69!=_0x4ab2c4[_0x3382e9]){const _0x5e3c13=_0x40d650['get'](_0x2f4e69)||_0x40d650['get'](_0x4ab2c4[_0x3382e9]);for(;_0x2f4e69!=_0x4ab2c4[_0x3382e9];)_0xa31e6e['has'](_0x4ab2c4[_0x3382e9])||(_0x19d285['set'](_0x4ab2c4[_0x3382e9],_0x5e3c13),_0x40d650['set'](_0x4ab2c4[_0x3382e9],_0x5e3c13)),_0x3382e9++;}_0x3382e9++;}}}}for(const _0x319e8f of _0xe1e4c9){const _0xa2473d=_0x1ab717['insertions'][_0x319e8f];for(const _0xd4038c of _0xa2473d){const _0x16094a=this['_getVidAttributeName'](_0xd4038c),_0x5ec1a3=_0xd4038c['item']['getAttribute'](_0x16094a);if(_0x19d285['has'](_0x5ec1a3)){const _0x328c2d=_0x19d285['get'](_0x5ec1a3);_0xa31e6e['has'](_0x5ec1a3)||_0xa31e6e['set'](_0x5ec1a3,{..._0x328c2d}),_0x208fa2['set'](_0x5ec1a3,{..._0x328c2d});}}}for(const _0x3a4084 of _0xa31e6e['keys']())_0x3a4084>=this['_startingRevisionId']&&_0xa31e6e['delete'](_0x3a4084);const _0x2d1018=new Map();for(const _0x1d42a1 of _0xe1e4c9){let _0x5a22d7=_0x1ab717['insertions'][_0x1d42a1];for(const _0x226a82 of _0x5a22d7)if(_0x226a82['item']['is']('element','tableCell')){const _0x487aa9=this['_getVidAttributeName'](_0x226a82),_0x53969d=_0x226a82['item']['getAttribute'](_0x487aa9);if(_0x208fa2['has'](_0x53969d)){const _0x563179=_0x226a82['item']['parent']['parent']['getAttribute']('vid_start'),_0x3bb410=_0x2d1018['get'](_0x563179)||new Set();_0x3bb410['add'](_0x208fa2['get'](_0x53969d)['userId']),_0x2d1018['set'](_0x563179,_0x3bb410);}}_0x5a22d7=_0x1ab717['deletions'][_0x1d42a1];for(const _0x192814 of _0x5a22d7)if(_0x192814['item']['is']('element','tableCell')){const _0x23da3e=this['_getVidAttributeName'](_0x192814),_0x1c68e2=_0x192814['item']['getAttribute'](_0x23da3e);if(_0xa31e6e['has'](_0x1c68e2)){const _0x3ad114=_0x192814['item']['parent']['parent']['getAttribute']('vid_start'),_0x4a4ccc=_0x2d1018['get'](_0x3ad114)||new Set();_0x4a4ccc['add'](_0xa31e6e['get'](_0x1c68e2)['userId']),_0x2d1018['set'](_0x3ad114,_0x4a4ccc);}}for(const _0x299e06 of _0x2d1018['keys']())(_0x208fa2['has'](_0x299e06)||_0xa31e6e['has'](_0x299e06))&&_0x2d1018['delete'](_0x299e06);}for(const _0x533940 of _0xe1e4c9){const _0x124346=_0x1ab717['insertions'][_0x533940];let _0x4e697d=null,_0x5d2b65=null;for(const _0x22a9a1 of _0x124346){const _0x273393=this['_getVidAttributeName'](_0x22a9a1),_0x42bac6=_0x22a9a1['item']['getAttribute'](_0x273393),_0x10300a=_0x2d1018['get'](_0x42bac6);_0x10300a&&'elementStart'==_0x22a9a1['type']&&(_0x4e697d=Array['from'](_0x10300a)[0x0],_0x5d2b65=_0x22a9a1['item']['getAttribute']('vid_end')),_0x4e697d&&(_0xa31e6e['set'](_0x42bac6,{'userId':_0x4e697d}),_0x208fa2['set'](_0x42bac6,{'userId':_0x4e697d})),_0x42bac6==_0x5d2b65&&(_0x4e697d=null,_0x5d2b65=null);}}const _0x3553aa={},_0x33ef5b=new Set();for(const _0x522c75 of _0xe1e4c9){const _0x212ce2=_0x5546aa['deletions'][_0x522c75],_0x513dc7=_0x5546aa['insertions'][_0x522c75];for(const {userId:_0x32d988}of this['_touchedMarkers']['values']())null!==_0x32d988&&_0x33ef5b['add'](_0x32d988);for(const {userId:_0x5584b8}of this['_touchedRoots']['values']())null!==_0x5584b8&&_0x33ef5b['add'](_0x5584b8);this['_markChanges'](_0x513dc7,_0x1ab717['insertions'][_0x522c75],_0x208fa2,'insertion',_0x33ef5b),this['_markChanges'](_0x212ce2,_0x1ab717['deletions'][_0x522c75],_0xa31e6e,'deletion',_0x33ef5b),_0x3553aa[_0x522c75]={'insertions':this['_prepareViewToSave'](_0x513dc7),'deletions':this['_prepareViewToSave'](_0x212ce2),'attachChange':this['_touchedRoots']['get'](_0x522c75)||null,'attributesBefore':_0x201516(this['_baseRootsAttributes']['get'](_0x522c75))||{},'attributesAfter':_0x201516(this['_diffRootsAttributes']['get'](_0x522c75)),'rootElementName':_0x1b7599['get'](_0x522c75)};}return{'diffData':_0x3553aa,'authorsIds':Array['from'](_0x33ef5b)};}['_processRootBeforeSave'](_0x6d7c5e){for(const [,_0x3bd106]of _0x6d7c5e['markers']){const _0x34f927=_0x3bd106['start']['getAncestors']()['filter'](_0x7c7517=>'tableCell'==_0x7c7517['name']);for(const _0x539e71 of _0x34f927)0x1==_0x539e71['childCount']&&_0x539e71['getChild'](0x0)['is']('element','paragraph')&&_0x539e71['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x269f57){this['_processRootBeforeSave'](_0x269f57);const _0x15fa55=this['editor']['data']['toView'](_0x269f57,{}),_0x751b47=Array['from'](_0x15fa55['getChildren']())['map'](_0x328765=>this['_getViewJson'](_0x328765));return JSON['stringify'](_0x751b47);}['_getViewJson'](_0xed40d3){if(_0xed40d3['is']('$text'))return _0xed40d3['data'];{const _0x20b51f=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4d1db8=_0xed40d3,_0x56a127=this['editor']['data']['htmlProcessor']['domConverter'],_0x34de54={'type':_0x20b51f['_getTypeCharForViewElement'](_0x4d1db8),'name':_0x4d1db8['name'],'attributes':Array['from'](_0x4d1db8['getAttributes']()),'children':Array['from'](_0x4d1db8['getChildren']())['map'](_0x5aa492=>this['_getViewJson'](_0x5aa492))};if(_0xed40d3['is']('uiElement')&&'$comment'!=_0xed40d3['name']){const _0x5be1cb=_0xed40d3['render'](_0x56a127['domDocument'],_0x56a127);_0x34de54['children']['push'](_0x5be1cb['outerHTML']);}else{if(_0xed40d3['is']('rawElement')){const _0x1fa119=_0x56a127['domDocument']['createElement'](_0x4d1db8['name']);_0xed40d3['render'](_0x1fa119,_0x56a127),_0x34de54['children']['push'](_0x1fa119['innerHTML']);}}const _0x5114dd=Array['from'](_0x4d1db8['getCustomProperties']());_0x5114dd['length']>0x0&&(_0x34de54['customProperties']=_0x5114dd);const _0x4ca5c2=_0x4d1db8['getFillerOffset']();return null!==_0x4ca5c2&&(_0x34de54['fillerOffset']=_0x4ca5c2),_0x34de54;}}['_markChanges'](_0x2164c9,_0x1693e5,_0x5d23e1,_0x369200,_0xb7fa48){let _0x58ecac=null,_0x20afd6=null,_0x1f56f1=0x0;const _0x3c9e6d=this['editor']['model'];for(let _0x398d29=0x0;_0x398d29<_0x1693e5['length'];_0x398d29++){const _0x11b11f=this['_getVidAttributeName'](_0x1693e5[_0x398d29]),_0xb6409c=_0x1693e5[_0x398d29]['item']['getAttribute'](_0x11b11f),_0x564e54=_0x5d23e1['get'](_0xb6409c),_0x36faf0=_0x398d29==_0x1693e5['length']-0x1;!_0x58ecac&&_0x564e54&&(_0x58ecac=_0x564e54,_0x20afd6=_0x1693e5[_0x398d29]),!_0x58ecac||_0x564e54&&_0x564e54['userId']==_0x58ecac['userId']||(_0x1b08c3(_0x564e54,kt(_0x20afd6,_0x2164c9,_0x3c9e6d),kt(_0x1693e5[_0x398d29],_0x2164c9,_0x3c9e6d)),_0x58ecac=_0x564e54||null,_0x20afd6=_0x564e54?_0x1693e5[_0x398d29]:null),_0x58ecac&&_0x36faf0&&_0x1b08c3(_0x564e54,kt(_0x20afd6,_0x2164c9,_0x3c9e6d),At(_0x1693e5[_0x398d29],_0x2164c9,_0x3c9e6d));}function _0x1b08c3(_0x2263fe,_0x4de94c,_0x287212){const _0x5b73e4=_0x58ecac['userId'],_0x424be7='revision:'+_0x369200+':'+_0x5b73e4+':'+_0x1f56f1++,_0x4ed791=_0x3c9e6d['createRange'](_0x4de94c,_0x287212);_0x2164c9['markers']['set'](_0x424be7,_0x4ed791),null!==_0x5b73e4&&_0xb7fa48['add'](_0x5b73e4);}}['_getVidAttributeName'](_0x44812e){switch(_0x44812e['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x11139f,_0x4ba48a){_0x11139f['baseVersion']=null;for(const _0xae5277 in _0x11139f){const _0x1723e=_0x11139f[_0xae5277];if(_0x1723e instanceof _0x51b10c){const _0x2cae67=_0x4ba48a['get'](_0x1723e['root']['rootName']);_0x11139f[_0xae5277]=this['_fixPosition'](_0x1723e,_0x2cae67);}if(_0x1723e instanceof _0x32e9fa){const _0x561932=_0x4ba48a['get'](_0x1723e['root']['rootName']);_0x11139f[_0xae5277]=this['_fixRange'](_0x1723e,_0x561932);}'root'===_0xae5277&&(_0x11139f['root']=_0x4ba48a['get'](_0x11139f['root']['rootName']));}}['_fixRange'](_0x57e9a6,_0xab82d6){return this['editor']['model']['createRange'](this['_fixPosition'](_0x57e9a6['start'],_0xab82d6),this['_fixPosition'](_0x57e9a6['end'],_0xab82d6));}['_fixPosition'](_0x429554,_0x582d87){return this['editor']['model']['createPositionFromPath'](_0x582d87,_0x429554['path'],_0x429554['stickiness']);}['_handleInsertOperation'](_0x535566){const _0x189310=this['_idsRoots']['get'](_0x535566['position']['root']['rootName']),_0x5e6fb8=this['_fixPosition'](_0x535566['position'],_0x189310),_0x518fba=null===_0x535566['_authorId']?null:_0x535566['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x9740e9=_0x5e6fb8['parent'],_0x412f56=this['_revisionId'],_0x5272f7=[];for(const _0x4ed2a2 of _0x535566['nodes'])if(_0x4ed2a2['is']('element'))_0x5272f7['push'](this['_makeIdsRoot'](_0x4ed2a2));else{for(let _0x29a3af=0x0;_0x29a3af<_0x4ed2a2['offsetSize'];_0x29a3af++)_0x5272f7['push'](new _0xe6fd24('$text',{'vid':this['_revisionId']++}));}const _0x5bb5c3=this['_revisionId'];for(let _0x1b0f27=_0x412f56;_0x1b0f27<_0x5bb5c3;_0x1b0f27++)this['_touched']['set'](_0x1b0f27,{'userId':_0x518fba});_0x9740e9['_insertChild'](_0x5e6fb8['offset'],_0x5272f7);}['_handleMoveOperation'](_0x354e74){(_0x354e74=this['_cloneOperation'](_0x354e74,this['_idsRoots']))['_execute']();const _0xea9cfc=null===_0x354e74['_authorId']?null:_0x354e74['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x678c37=_0x354e74['getMovedRangeStart'](),_0x338c06=_0x678c37['parent'],_0x4b3a0a=_0x678c37['offset'];!function _0x44ca1e(_0x3da153,_0x311d31,_0x5335e4,_0x13f4d2){for(let _0x49987c=_0x5335e4;_0x49987c<_0x13f4d2;_0x49987c++){const _0x56ad9d=_0x311d31['getChild'](_0x49987c);_0x56ad9d['is']('element','$text')?_0x3da153['set'](_0x56ad9d['getAttribute']('vid'),{'userId':_0xea9cfc}):(_0x3da153['set'](_0x56ad9d['getAttribute']('vid_start'),{'userId':_0xea9cfc}),_0x44ca1e(_0x3da153,_0x56ad9d,0x0,_0x56ad9d['childCount']),_0x3da153['set'](_0x56ad9d['getAttribute']('vid_end'),{'userId':_0xea9cfc}));}}(this['_touched'],_0x338c06,_0x4b3a0a,_0x4b3a0a+_0x354e74['howMany']);}['_handleMergeOperation'](_0x148d35){const _0x1e9b50=null===(_0x148d35=this['_cloneOperation'](_0x148d35,this['_idsRoots']))['_authorId']?null:_0x148d35['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d6211=_0x148d35['targetPosition']['parent'],_0x1b79eb=_0x148d35['sourcePosition']['parent'],_0x13720e=_0x4d6211['getAttribute']('vid_end'),_0xab8938=_0x1b79eb['getAttribute']('vid_start');_0x4d6211['_setAttribute']('vid_end',_0x1b79eb['getAttribute']('vid_end')),_0x1b79eb['_setAttribute']('vid_end',_0x13720e),this['_touched']['set'](_0xab8938,{'userId':_0x1e9b50}),this['_touched']['set'](_0x13720e,{'userId':_0x1e9b50}),_0x148d35['_execute']();}['_handleSplitOperation'](_0x286ad0){const _0x4ff806=null===(_0x286ad0=this['_cloneOperation'](_0x286ad0,this['_idsRoots']))['_authorId']?null:_0x286ad0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x28d15f=_0x286ad0['graveyardPosition'],_0x26e9a1=_0x286ad0['splitPosition']['parent'];_0x286ad0['_execute']();const _0xdfac6b=_0x26e9a1['getAttribute']('vid_end'),_0x332f18=_0x286ad0['insertionPosition']['nodeAfter'];if(_0x28d15f){const _0x39a2c8=_0x332f18['getAttribute']('vid_end'),_0x237bd5=_0x26e9a1['getAttribute']('vid_end');_0x26e9a1['_setAttribute']('vid_end',_0x39a2c8),_0x332f18['_setAttribute']('vid_end',_0x237bd5),this['_touched']['set'](_0x26e9a1['getAttribute']('vid_end'),{'userId':_0x4ff806}),this['_touched']['set'](_0x332f18['getAttribute']('vid_start'),{'userId':_0x4ff806});}else{const _0x455a49=this['_revisionId']++,_0x2b9cf3=this['_revisionId']++;_0x26e9a1['_setAttribute']('vid_end',_0x455a49),_0x332f18['_setAttribute']('vid_start',_0x2b9cf3),_0x332f18['_setAttribute']('vid_end',_0xdfac6b),this['_touched']['set'](_0x455a49,{'userId':_0x4ff806}),this['_touched']['set'](_0x2b9cf3,{'userId':_0x4ff806});}}['_handleMarkerOperation'](_0x1d06e8){if(!_0x1d06e8['affectsData'])return;const _0x1889d5=(_0x1d06e8=this['_cloneOperation'](_0x1d06e8,this['_diffRoots']))['oldRange']?_0x1d06e8['oldRange']['root']:null,_0x1499e2=_0x1d06e8['newRange']?_0x1d06e8['newRange']['root']:null;_0x1889d5&&this['_markers']['delete'](_0x1d06e8['name']),_0x1499e2&&this['_markers']['set'](_0x1d06e8['name'],_0x1d06e8['newRange']['clone']());const _0x32b0fb=null===_0x1d06e8['_authorId']?null:_0x1d06e8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5e4069=_0x1d06e8['name'];if(!this['_touchedMarkers']['has'](_0x5e4069))return void this['_touchedMarkers']['set'](_0x5e4069,{'range':_0x1d06e8['oldRange'],'userId':_0x32b0fb});const _0x1a80f9=this['_touchedMarkers']['get'](_0x5e4069),_0x34cf17=_0x1a80f9['range'],_0x1d84d3=_0x1d06e8['newRange'];null==_0x34cf17&&null==_0x1d84d3||_0x34cf17&&_0x1d84d3&&_0x34cf17['isEqual'](_0x1d84d3)?this['_touchedMarkers']['delete'](_0x1d06e8['name']):_0x1a80f9['userId']=_0x32b0fb;}['_handleRootOperation'](_0x3fe22e,_0x9aebd1){this['_diffRoots']['has'](_0x3fe22e['rootName'])?this['_diffRoots']['get'](_0x3fe22e['rootName'])['_isAttached']=_0x3fe22e['isAdd']:(this['_diffRoots']['set'](_0x3fe22e['rootName'],Rt(_0x3fe22e['rootName'],_0x3fe22e['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3fe22e['rootName'],{}),_0x9aebd1&&this['_idsRoots']['set'](_0x3fe22e['rootName'],Rt(_0x3fe22e['rootName'],_0x3fe22e['elementName'],!0x0)));const _0x21b804=null===_0x3fe22e['_authorId']?null:_0x3fe22e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x56a7d1=this['_touchedRoots']['get'](_0x3fe22e['rootName']);_0x56a7d1&&_0x56a7d1['userId']===_0x21b804?this['_touchedRoots']['delete'](_0x3fe22e['rootName']):this['_touchedRoots']['set'](_0x3fe22e['rootName'],{'userId':_0x21b804,'isAttached':_0x3fe22e['isAdd']});}['_handleRootAttributeOperation'](_0x2d9003){const _0x5ae983=this['_diffRootsAttributes']['get'](_0x2d9003['root']['rootName']);null===_0x2d9003['newValue']?delete _0x5ae983[_0x2d9003['key']]:_0x5ae983[_0x2d9003['key']]=_0x2d9003['newValue'];}};function bt(_0x45bafe){const _0x1a2b7c=Rt(_0x45bafe['rootName'],_0x45bafe['name'],_0x45bafe['isAttached']());for(const _0x193581 of _0x45bafe['getChildren']()){const _0x24d947=_0x193581['_clone'](!0x0);_0x1a2b7c['_appendChild'](_0x24d947);}return _0x1a2b7c;}function Rt(_0x448118,_0x1ac97f,_0xe57b29=!0x0){const _0x123a72=new _0x75e513();return _0x123a72['rootName']=_0x448118,_0x123a72['name']=_0x1ac97f,_0x123a72['_isAttached']=_0xe57b29,_0x123a72['isAttached']=()=>_0x123a72['_isAttached'],_0x123a72;}function kt(_0x3b6ddf,_0x2acf57,_0x426c27){const _0xabbce5='elementEnd'==_0x3b6ddf['type']?_0x426c27['createPositionAt'](_0x3b6ddf['item'],'end'):_0x426c27['createPositionBefore'](_0x3b6ddf['item']);return _0x426c27['createPositionFromPath'](_0x2acf57,_0xabbce5['path'],_0xabbce5['stickiness']);}function At(_0x49b1aa,_0x28bf69,_0x500e8b){const _0xa60d87='elementStart'==_0x49b1aa['type']?_0x500e8b['createPositionAt'](_0x49b1aa['item'],0x0):_0x500e8b['createPositionAfter'](_0x49b1aa['item']);return _0x500e8b['createPositionFromPath'](_0x28bf69,_0xa60d87['path'],_0xa60d87['stickiness']);}const It=/* #__PURE__ -- @preserve */
25
+ _0x4ef663(at);var Et=class extends It{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x32cb46,_0x1ad1e3){super(_0x32cb46),this['focusTracker']=new _0x321da2(),this['keystrokes']=new _0x32815b(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1ad1e3),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'](),dt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x494718=_0x325741=>_0x325741['stopPropagation']();this['keystrokes']['set']('arrowright',_0x494718),this['keystrokes']['set']('arrowleft',_0x494718),this['keystrokes']['set']('arrowup',_0x494718),this['keystrokes']['set']('arrowdown',_0x494718);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x154c03){this['revisionNameInputView']['fieldView']['element']['value']=_0x154c03['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x546bb6){const _0x1ba929=new _0x469ef1(this['locale'],lt),_0x87bc34=_0x1ba929['fieldView'];_0x87bc34['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x27c268=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x546bb6&&(_0x27c268+='\x20('+pt(this['locale'],'optional')+')'),(_0x1ba929['label']=_0x27c268,_0x87bc34['on']('input',()=>{this['revisionNameInputValue']=_0x87bc34['element']['value']['trim']();}),_0x1ba929);}},St=class extends _0x73140e{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t];}['_saveRevisionFormView'];['init'](){const _0x4d35dc=this['editor'],_0x329cd7=_0x4d35dc['plugins']['get']('RevisionTracker');_0x4d35dc['ui']['componentFactory']['add']('revisionHistory',_0x5bdc21=>{const _0x17f2ed=ct(_0x5bdc21),_0x2eab4e=_0x17f2ed['panelView']['children'],_0x52df3d=new _0x4ae715(_0x5bdc21),_0x261b20=new _0x5082de(_0x5bdc21),_0x26509f=this['_createSaveRevisionButton'](_0x178003),_0x40baac=new _0x5082de(_0x5bdc21),_0x4e69b8=this['_createOpenRevisionButton'](_0x178003);return _0x17f2ed['bind']('isEnabled')['to'](_0x329cd7,'isReady',_0x329cd7,'isEnabled',_0x4d35dc,'isReadOnly',(_0x1dc45f,_0x22b6e5,_0x127923)=>_0x1dc45f&&_0x22b6e5&&!_0x127923),_0x17f2ed['buttonView']['set']({'icon':_0x52e288,'label':pt(_0x5bdc21,'Revision\x20history'),'tooltip':!0x0}),_0x26509f['set']({'withText':!0x0,'role':'menuitem'}),_0x4e69b8['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x4e69b8,'execute',()=>{_0x17f2ed['isOpen']=!0x1,_0x4d35dc['editing']['view']['focus']();},{'priority':'low'}),_0x261b20['children']['add'](_0x26509f),_0x40baac['children']['add'](_0x4e69b8),_0x52df3d['role']='menu',_0x52df3d['items']['addMany']([_0x261b20,_0x40baac]),_0x2eab4e['add'](_0x52df3d),_0x17f2ed;}),_0x4d35dc['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x255958=this['editor'],_0x214f8a=_0x255958['locale'],_0x3965a9=_0x255958['plugins']['get']('RevisionTracker'),_0x1f216b=new et(_0x214f8a),_0x26ffd1=new it(_0x214f8a);_0x1f216b['bind']('isEnabled')['to'](_0x3965a9,'isReady',_0x3965a9,'isEnabled',_0x255958,'isReadOnly',(_0x3f0a97,_0x326370,_0x21cfa1)=>_0x3f0a97&&_0x326370&&!_0x21cfa1),_0x1f216b['buttonView']['set']({'icon':_0x52e288,'label':pt(_0x214f8a,'Revision\x20history')});const _0x111232=new tt(_0x214f8a,_0x1f216b),_0x503f6f=this['_createSaveRevisionButton'](_0x552109);_0x503f6f['delegate']('execute')['to'](_0x1f216b),_0x111232['children']['add'](_0x503f6f),_0x26ffd1['items']['add'](_0x111232);const _0x2867ea=new tt(_0x214f8a,_0x1f216b),_0x532b55=this['_createOpenRevisionButton'](_0x552109);return _0x532b55['delegate']('execute')['to'](_0x1f216b),_0x2867ea['children']['add'](_0x532b55),_0x26ffd1['items']['add'](_0x2867ea),_0x1f216b['panelView']['children']['add'](_0x26ffd1),_0x1f216b;}['_createSaveRevisionButton'](_0x29a9f8){const _0x168860=this['editor'],_0x5d3eb0=_0x168860['plugins']['get']('RevisionTracker'),_0x4c3283=new _0x29a9f8(_0x168860['locale']);return _0x4c3283['set']({'label':pt(_0x168860['locale'],'Save\x20current\x20revision')}),_0x4c3283['bind']('isEnabled')['to'](_0x5d3eb0,'isReady',_0x5d3eb0,'isEnabled',_0x168860,'isReadOnly',(_0x35f24d,_0x16d9c9,_0x1c7881)=>_0x35f24d&&_0x16d9c9&&!_0x1c7881),this['listenTo'](_0x4c3283,'execute',()=>{this['_showDialog']();}),_0x4c3283;}['_createOpenRevisionButton'](_0x55eba6){const _0x280dc5=this['editor'],_0x21057e=_0x280dc5['plugins']['get']('RevisionTracker'),_0x3c6da8=new _0x55eba6(_0x280dc5['locale']);return _0x3c6da8['set']({'label':pt(_0x280dc5['locale'],'Open\x20revision\x20history')}),_0x3c6da8['bind']('isEnabled')['to'](_0x21057e,'isReady',_0x280dc5,'isReadOnly',(_0x31629f,_0x89be92)=>_0x31629f&&!_0x89be92),this['listenTo'](_0x3c6da8,'execute',()=>{_0x280dc5['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3c6da8;}['_showDialog'](){const _0x4a1566=this['editor'],_0x3de5ab=_0x4a1566['locale'],_0x3239bf=_0x4a1566['plugins']['get']('Dialog'),_0x2a4a2b=_0x4a1566['plugins']['get']('RevisionTracker');function _0x5ba8e2(_0x1228ef){_0x4a1566['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1228ef['revisionName']?_0x1228ef['revisionNameInputView']['errorText']=pt(_0x3de5ab,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4a1566['plugins']['get'](_t)['saveRevision']({'name':_0x1228ef['revisionName']}),_0x3239bf['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5ba8e2(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3239bf['show']({'id':'revisionSave','title':pt(_0x3de5ab,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x4a1566['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3239bf['hide']()},{'label':pt(_0x4a1566['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3ccf78){_0x3ccf78['bind']('isEnabled')['to'](_0x2a4a2b,'isReady',_0x2a4a2b,'isEnabled',_0x4a1566,'isReadOnly',(_0x30dda6,_0x409a7d,_0x50d8a2)=>_0x30dda6&&_0x409a7d&&!_0x50d8a2);},'onExecute':()=>_0x5ba8e2(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x14e177=this['editor'],_0x3714f3=_0x14e177['locale'];this['_saveRevisionFormView']=new Et(_0x3714f3,_0x14e177['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x4a96e9,_0x44cc4){super(_0x4a96e9),this['_model']=_0x44cc4,this['changeId']=_0x44cc4['id'];const _0x5cbf8b=this['bindTemplate'],_0x5f476a=pt(_0x4a96e9,_0x44cc4['data']['isSuggestion']?'Suggested\x20by':'add'==_0x44cc4['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x44cc4['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5cbf8b['to']('type',_0x555276=>'ck-revision-change__'+_0x555276)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5f476a}]},{'text':'\x20'+_0x44cc4['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
26
+ _0x4e64c6();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x33036f){super(),this['id']=_0x33036f['id']||_0x3001b8(),this['author']=_0x33036f['author'],this['type']=_0x33036f['type'],this['data']=_0x33036f['data']||{},this['rootName']=_0x33036f['rootName'],this['set']('createdAt',_0x33036f['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x253f16,_0x37f48c){this['newRevisionId']=_0x253f16,this['oldRevisionId']=_0x37f48c,this['changes']=new _0x453cd2();}['_setChanges'](_0x4bbac1){for(const _0x584b50 of _0x4bbac1)this['changes']['add'](_0x584b50);}},Mt=class extends _0x73140e{['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[_0x1a8e81,_0x3176ee,mt,wt];}constructor(_0x242016){super(_0x242016),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',(_0x57ae16,_0x13d58e,_0x458666)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x39ee61=>{for(const _0x57addd of this['editor']['editing']['view']['document']['roots'])_0x458666?_0x39ee61['removeClass']('ck-editor__editable__overlay',_0x57addd):_0x39ee61['addClass']('ck-editor__editable__overlay',_0x57addd);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5377a8=>null!==_0x5377a8),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3626b7,_0x7d80a0,_0x105c0d)=>_0x3626b7&&_0x105c0d?_0x7d80a0['changes']['getIndex'](_0x105c0d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x21255d,_0x390319)=>_0x21255d?_0x390319['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3176ee);}['init'](){const _0x620940=this['editor'],_0x127a98=new Tt(_0x620940,{'direction':'backward'}),_0x2fd40a=new Tt(_0x620940,{'direction':'forward'});_0x620940['commands']['add']('showPreviousChange',_0x127a98),_0x620940['commands']['add']('showNextChange',_0x2fd40a),_0x620940['commands']['add']('restoreRevision',new Dt(_0x620940)),this['on']('change:numberOfChanges',()=>{_0x127a98['refresh'](),_0x2fd40a['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x620940['enableReadOnlyMode']('revision-viewer'),_0x620940['plugins']['has']('WidgetToolbarRepository')&&_0x620940['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x485fbe){return await this['_utils']['loadRevisionData'](_0x485fbe,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x485fbe);}async['getRevisionRootsAttributes'](_0x27ceb0){return await this['_utils']['loadRevisionData'](_0x27ceb0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x27ceb0);}async['compare'](_0x1c8852,_0x3e36b0,_0x3349c4=!0x1){if(!this['isEnabled'])return;const _0x58d889=this['diff'],_0x32b05b=this['repository'],_0x182537='string'==typeof _0x1c8852?_0x32b05b['getRevision'](_0x1c8852):_0x1c8852,_0x50c583='string'==typeof _0x3e36b0?_0x32b05b['getRevision'](_0x3e36b0):_0x3e36b0,_0x157484=_0x182537['id'],_0x3d4192=_0x50c583?_0x50c583['id']:null;if(!_0x3349c4&&this['diff']&&this['diff']['newRevisionId']===_0x157484&&this['diff']['oldRevisionId']===_0x3d4192)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x157484,_0x3d4192);const _0xa9fca4=this['_getRevisionsRange'](_0x182537,_0x50c583,!0x0)['map'](_0x406ce3=>this['_utils']['loadRevisionData'](_0x406ce3,this['adapter']));return _0xa9fca4['push'](new Promise(_0x59b224=>{setTimeout(_0x59b224,0x14);})),Promise['all'](_0xa9fca4)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x34c259=this['_getDiff'](_0x157484,_0x3d4192);for(const _0xe2463 of _0x34c259['changes'])this['_changeIdToChange']['set'](_0xe2463['id'],_0xe2463);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x27802f=>{for(const _0x324a7d of this['editor']['model']['document']['getRootNames']())_0x27802f['detachRoot'](_0x324a7d);for(const _0x5ba535 of Object['keys'](_0x34c259['model'])){const _0x3c3878=_0x34c259['model'][_0x5ba535]['name'],_0x3022ec=_0x27802f['addRoot'](_0x5ba535,_0x3c3878);for(const _0x37d071 of Object['keys'](_0x34c259['attributes'][_0x5ba535]))_0x27802f['setAttribute'](_0x37d071,_0x34c259['attributes'][_0x5ba535][_0x37d071],_0x3022ec);_0x27802f['insert'](_0x34c259['model'][_0x5ba535],_0x3022ec,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x34c259['changes'])),this['isReady']=!0x0;})['catch'](_0x3cf647=>{console['error'](_0x3cf647),this['_cleanUp'](),_0x58d889&&(this['diff']=_0x58d889),this['isReady']=!0x0;});}['addRevisionData'](_0x4a38f6,_0x5412b7){const _0x6a8293=this['repository']['createRevision'](_0x4a38f6);return _0x6a8293['on']('_update',(_0x2613cc,_0x438679,_0x248a91)=>_0x5412b7(_0x438679,_0x248a91,_0x6a8293)),this['repository']['addRevision'](_0x6a8293),_0x6a8293;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x613971=>{for(const _0x3d9ea6 of this['editor']['model']['document']['getRootNames']())_0x613971['detachRoot'](_0x3d9ea6);});}['_sortAndFilterDiffChanges'](_0x2260fe){const _0x50babd=[],_0x26ba58=new Map();for(const _0x376b67 of this['editor']['model']['document']['getRootNames']()){const _0x384cbf=this['editor']['editing']['view']['getDomRoot'](_0x376b67);if(!_0x384cbf)continue;const _0x111191=_0x384cbf['getClientRects']()['item'](0x0);_0x111191&&(_0x50babd['push'](_0x376b67),_0x26ba58['set'](_0x376b67,_0x111191));}return _0x50babd['sort']((_0x2b89f3,_0x2522d7)=>{const _0x21a46e=_0x26ba58['get'](_0x2b89f3),_0x550e46=_0x26ba58['get'](_0x2522d7);return _0x21a46e['y']-_0x550e46['y']||_0x21a46e['x']-_0x550e46['x'];}),(_0x2260fe=_0x2260fe['filter'](_0x43bec6=>_0x50babd['includes'](_0x43bec6['rootName'])))['sort']((_0x4d03e8,_0x3c9498)=>_0x50babd['indexOf'](_0x4d03e8['rootName'])-_0x50babd['indexOf'](_0x3c9498['rootName'])),_0x2260fe;}['_makeTape'](_0x403b97){const _0x5705cf=Array['from'](_0x403b97['markers'])['filter'](([_0x33943e,_0x3eec4e])=>_0x33943e['startsWith']('revision:')&&!_0x3eec4e['isCollapsed']),_0x33dc2f=Array['from'](this['editor']['model']['createRangeIn'](_0x403b97)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x5705cf['length'])for(const _0x207273 of _0x33dc2f){const [_0x6dd610,_0x1f037f]=_0x5705cf[0x0],[,_0x55b5e2,_0x1f0734]=_0x6dd610['split'](':');if(_0x1f037f['end']['isEqual'](_0x207273['nextPosition'])&&_0x5705cf['shift'](),(_0x207273['previousPosition']['isEqual'](_0x1f037f['start'])||_0x207273['previousPosition']['isAfter'](_0x1f037f['start']))&&('insertion'==_0x55b5e2?_0x207273['isAdded']={'userId':_0x1f0734}:'deletion'==_0x55b5e2&&(_0x207273['isRemoved']={'userId':_0x1f0734})),0x0==_0x5705cf['length'])break;}return _0x33dc2f;}['_refreshStartEndIndex'](_0x577683){const _0x5895f9=new Map();for(let _0x3dc35b=0x0;_0x3dc35b<_0x577683['length'];_0x3dc35b++)'text'===_0x577683[_0x3dc35b]['type']?(_0x577683[_0x3dc35b]['item']['startIndex']=_0x3dc35b,_0x577683[_0x3dc35b]['item']['endIndex']=_0x3dc35b):('elementStart'===_0x577683[_0x3dc35b]['type']?_0x577683[_0x3dc35b]['item']['startIndex']=_0x3dc35b:'elementEnd'===_0x577683[_0x3dc35b]['type']&&(_0x577683[_0x3dc35b]['item']['endIndex']=_0x3dc35b),_0x5895f9['set'](_0x577683[_0x3dc35b]['id'],_0x3dc35b));for(const _0x298ba5 of _0x5895f9['values']())'elementStart'===_0x577683[_0x298ba5]['type']?_0x577683[_0x298ba5]['item']['endIndex']=_0x5895f9['get'](_0x577683[_0x298ba5]['pairId']):'elementEnd'===_0x577683[_0x298ba5]['type']&&(_0x577683[_0x298ba5]['item']['startIndex']=_0x5895f9['get'](_0x577683[_0x298ba5]['pairId']));}['_processTape'](_0x504cef){for(let _0x56f410=0x0;_0x56f410<_0x504cef['length'];_0x56f410++){if('elementStart'===_0x504cef[_0x56f410]['type'])_0x504cef[_0x56f410]['item']['startIndex']=_0x56f410;else{if('elementEnd'===_0x504cef[_0x56f410]['type']){_0x504cef[_0x56f410]['item']['endIndex']=_0x56f410;const _0x87d65d=_0x504cef[_0x56f410]['item']['startIndex'];_0x504cef[_0x87d65d]['pairId']=_0x504cef[_0x56f410]['id'],_0x504cef[_0x56f410]['pairId']=_0x504cef[_0x87d65d]['id'];}else _0x504cef[_0x56f410]['item']['startIndex']=_0x56f410,_0x504cef[_0x56f410]['item']['endIndex']=_0x56f410,_0x504cef[_0x56f410]['pairId']=null;}_0x504cef[_0x56f410]['markersStart']||(_0x504cef[_0x56f410]['markersStart']=[],_0x504cef[_0x56f410]['markersEnd']=[]);}}['_markInsertions'](_0x402e93,_0x10ef12){const _0x51432e=_0x402e93['filter'](_0x15631a=>!_0x15631a['isAdded']);for(let _0x2d32c4=0x0;_0x2d32c4<_0x10ef12['length'];_0x2d32c4++)_0x10ef12[_0x2d32c4]['isAdded']&&(_0x51432e[_0x2d32c4]['isAdded']=_0x10ef12[_0x2d32c4]['isAdded']);}['_getDiff'](_0x191fbb,_0x1b60f7=null){const _0x3e37fc=this['repository']['getRevision'](_0x191fbb),_0x53fc99=_0x1b60f7?this['repository']['getRevision'](_0x1b60f7):null,_0x5d377b=this['_getRevisionsRange'](_0x3e37fc,_0x53fc99),_0x416236=_0x5d377b[_0x5d377b['length']-0x1],_0x46a533=new Map(),_0xf269b6={'model':{},'attributes':{},'changes':[]},_0x47108d=new Set(),_0x2a0e76=new Map();for(let _0x3b7978=_0x5d377b['length']-0x1;_0x3b7978>=0x0;_0x3b7978--){const _0x5a17d6=_0x5d377b[_0x3b7978];for(const _0x282048 of Object['keys'](_0x5a17d6['diffData']))if(_0x5a17d6['diffData'][_0x282048]['attachChange']){const _0x24069b=_0x5a17d6['diffData'][_0x282048]['attachChange'];_0x24069b['isAttached']?(_0x47108d['add'](_0x282048),_0x2a0e76['has'](_0x282048)&&_0x2a0e76['get'](_0x282048)['userId']==_0x24069b['userId']?_0x2a0e76['delete'](_0x282048):_0x2a0e76['set'](_0x282048,_0x24069b)):_0x2a0e76['has'](_0x282048)?(_0x47108d['delete'](_0x282048),_0x2a0e76['delete'](_0x282048)):(_0x47108d['add'](_0x282048),_0x2a0e76['set'](_0x282048,_0x24069b));}else _0x47108d['add'](_0x282048);}for(const _0x535a58 of _0x47108d){const _0x53a654=_0x2a0e76['has'](_0x535a58)&&!_0x2a0e76['get'](_0x535a58)['isAttached'];let _0x3163ff=_0x53a654?_0x5d377b['length']-0x1:0x0;const _0x405e5d=_0x53a654?-0x1:0x1;for(;_0x5d377b[_0x3163ff];){const _0x3bba58=_0x5d377b[_0x3163ff];if(_0x3bba58['diffData'][_0x535a58]){const _0x31fc18=_0x53a654?_0x3bba58['diffData'][_0x535a58]['attributesBefore']:_0x3bba58['diffData'][_0x535a58]['attributesAfter'];_0xf269b6['attributes'][_0x535a58]=_0x31fc18?_0x201516(_0x31fc18):{};break;}_0x3163ff+=_0x405e5d;}}for(const _0x2785b1 of _0x5d377b){_0x2785b1['model']={};for(const _0x1e3f93 of _0x2785b1['authors'])_0x46a533['set'](_0x1e3f93['id'],_0x1e3f93);for(const _0x38c2a7 of _0x47108d){const _0x29735c=_0x2785b1['diffData'][_0x38c2a7]?_0x2785b1['diffData'][_0x38c2a7]['insertions']:'[]',_0xe2e321=_0x2785b1['diffData'][_0x38c2a7]?_0x2785b1['diffData'][_0x38c2a7]['deletions']:'[]',_0x66f4de=_0x2785b1['diffData'][_0x38c2a7]?.['rootElementName']||'$root';_0x2785b1['model'][_0x38c2a7]={'insertions':this['_utils']['_makeModelFromViewString'](_0x29735c,_0x66f4de),'deletions':this['_utils']['_makeModelFromViewString'](_0xe2e321,_0x66f4de)};}}for(const _0x1581e5 of _0x47108d){let _0x11942c=null,_0x431f58=0x0;const _0x22c4c9=_0x5d377b['map'](_0x69009f=>_0x69009f['diffData'][_0x1581e5]?.['rootElementName'])['find'](_0x35ccad=>void 0x0!==_0x35ccad)||'$root',_0x4504c7=new Map(Array['from'](_0x3e37fc['model'][_0x1581e5]['insertions']['markers'])['filter'](([_0x1f0143])=>!_0x1f0143['startsWith']('revision:')));let _0x55ef34=0x0;for(const _0x3cc7e9 of _0x5d377b){const _0x50cb8b=this['_makeTape'](_0x3cc7e9['model'][_0x1581e5]['insertions']);_0x3cc7e9==_0x3e37fc?(_0x11942c=_0x50cb8b,_0x431f58=_0x11942c['length'],_0x11942c['forEach'](_0x10a87b=>{_0x10a87b['id']=_0x55ef34++;}),this['_processTape'](_0x11942c)):this['_markInsertions'](_0x11942c,_0x50cb8b);const _0x5606a6=_0x11942c['filter'](_0x48d84a=>!_0x48d84a['isAdded'])['map'](_0x47e4ff=>_0x47e4ff['id']);let _0xa08c84=0x0;const _0x5d685c=this['_makeTape'](_0x3cc7e9['model'][_0x1581e5]['deletions']);_0x5d685c['forEach'](_0x1595b5=>{_0x1595b5['isRemoved']?_0x1595b5['id']=_0x431f58++:_0x1595b5['id']=_0x5606a6[_0xa08c84++];}),this['_processTape'](_0x5d685c),this['_setDistance'](_0x11942c,'isAdded'),this['_setDistance'](_0x5d685c,'isRemoved'),_0x3cc7e9==_0x3e37fc&&this['_markMarkers'](_0x11942c,_0x4504c7),_0x11942c=this['_joinTapes'](_0x11942c,_0x5d685c),this['_refreshStartEndIndex'](_0x11942c),this['_setDistance'](_0x11942c,'isRemoved');}_0x11942c=_0x11942c['filter'](_0x3535fa=>!(_0x3535fa['isAdded']&&_0x3535fa['isRemoved']));const _0x1078dc=new Map(_0x416236['model'][_0x1581e5]['deletions']['markers']),_0x140cfb=new Set(_0x4504c7['keys']());for(const _0x324557 of _0x1078dc['keys']())_0x140cfb['delete'](_0x324557);this['_markSuggestions'](_0x11942c,_0x140cfb),this['_fixObsoleteTags'](_0x11942c),_0x11942c=this['_removeMissingPairs'](_0x11942c),_0x11942c=this['_markMismatchedRemovedTags'](_0x11942c),_0x11942c=this['_removeUnsupportedChanges'](_0x11942c);const {root:_0x226ae8,changes:_0x45986c}=this['_makeModelFromTape'](_0x11942c,_0x46a533,_0x1581e5,_0x22c4c9);_0xf269b6['model'][_0x1581e5]=_0x226ae8;const _0x280b1e=_0x2a0e76['get'](_0x1581e5);if(_0x280b1e){const _0xa057c0=new Ot({'author':_0x46a533['get'](_0x280b1e['userId']),'type':_0x280b1e['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x1581e5});_0x45986c['unshift'](_0xa057c0),_0xf269b6['attributes'][_0x1581e5]['revisionHistoryAttachChange']=_0xa057c0['id'];}_0xf269b6['changes']=_0xf269b6['changes']['concat'](_0x45986c);}return _0xf269b6;}['_markMarkers'](_0x3e0476,_0x104b81){for(let _0x591117=0x0;_0x591117<_0x3e0476['length'];_0x591117++)for(const [_0x3b81b7,_0x3fbc8a]of _0x104b81)!_0x3fbc8a['isCollapsed']&&_0x3fbc8a['start']['isEqual'](_0x3e0476[_0x591117]['previousPosition'])&&_0x3e0476[_0x591117]['markersStart']['push'](_0x3b81b7),_0x3fbc8a['end']['isEqual'](_0x3e0476[_0x591117]['nextPosition'])&&_0x3e0476[_0x591117]['markersEnd']['push'](_0x3b81b7);}['_joinTapes'](_0x2e9c52,_0x19c0b2){let _0x1bf81b=[],_0x285a55=0x0,_0x15f46d=0x0;for(;_0x285a55<_0x2e9c52['length']||_0x15f46d<_0x19c0b2['length'];){const _0x39e417=_0x2e9c52[_0x285a55]||{},_0x355a30=_0x19c0b2[_0x15f46d]||{};if(_0x39e417['id']==_0x355a30['id'])_0x285a55++,_0x15f46d++,_0x1bf81b['push'](_0x39e417);else{if(_0x355a30['isRemoved']&&_0x39e417['isAdded']){const {commonTape:_0x404fb7,iEnd:_0x25dcd8,jEnd:_0x4bfb79}=this['_threeWayMerge'](_0x2e9c52,_0x285a55,_0x19c0b2,_0x15f46d);_0x1bf81b=_0x1bf81b['concat'](_0x404fb7),_0x285a55=_0x25dcd8,_0x15f46d=_0x4bfb79;}else _0x355a30['isRemoved']?(_0x15f46d++,_0x1bf81b['push'](_0x355a30)):(_0x285a55++,_0x1bf81b['push'](_0x39e417));}}return _0x1bf81b;}['_markSuggestions'](_0x290b53,_0xa87d66){const _0x56756c=[];for(let _0x3ab4b6=0x0;_0x3ab4b6<_0x290b53['length'];_0x3ab4b6++){for(let _0x4876ae=0x0;_0x4876ae<_0x290b53[_0x3ab4b6]['markersStart']['length'];_0x4876ae++){const _0x33c9d1=_0x290b53[_0x3ab4b6]['markersStart'][_0x4876ae];if(!_0xa87d66['has'](_0x33c9d1))continue;const {group:_0x14a010,type:_0x2a8ce3,authorId:_0x3046d3}=_0x10a345(_0x33c9d1);'revision-suggestion'!=_0x14a010||'insertion'!=_0x2a8ce3&&'deletion'!=_0x2a8ce3||(_0x56756c['unshift']({'type':_0x2a8ce3,'name':_0x33c9d1,'userId':_0x3046d3}),_0x290b53[_0x3ab4b6]['markersStart']['splice'](_0x4876ae,0x1),_0x4876ae--);}_0x5064c5(_0x290b53[_0x3ab4b6]);for(let _0x202a24=0x0;_0x202a24<_0x290b53[_0x3ab4b6]['markersEnd']['length'];_0x202a24++){const _0x5c3e64=_0x290b53[_0x3ab4b6]['markersEnd'][_0x202a24];if(!_0xa87d66['has'](_0x5c3e64))continue;const {group:_0x39bd76,type:_0xb9119}=_0x10a345(_0x5c3e64);if('revision-suggestion'!=_0x39bd76||'insertion'!=_0xb9119&&'deletion'!=_0xb9119)continue;_0x290b53[_0x3ab4b6]['markersEnd']['splice'](_0x202a24,0x1),_0x202a24--;const _0xfce01=_0x56756c['findIndex'](_0x53f416=>_0x53f416['name']==_0x5c3e64);_0xfce01>-0x1&&_0x56756c['splice'](_0xfce01,0x1);}}function _0x10a345(_0x58c601){const _0x18f203=_0x58c601['split'](':');return{'group':_0x18f203[0x0],'type':_0x18f203[0x1],'subType':_0x18f203['length']>=0x5?_0x18f203[0x2]:null,'id':_0x18f203['length']<0x5?_0x18f203[0x2]:_0x18f203[0x3],'authorId':_0x18f203['length']<0x5?_0x18f203[0x3]:_0x18f203[0x4],'markerCount':0x6==_0x18f203['length']?_0x18f203[0x5]:null};}function _0x5064c5(_0x3f7fb4){for(let _0x4feb47=0x0;_0x4feb47<_0x56756c['length'];_0x4feb47++){if(_0x3f7fb4['isAdded']&&'insertion'==_0x56756c[_0x4feb47]['type']&&_0x3f7fb4['isAdded']['userId']==_0x56756c[_0x4feb47]['userId'])return _0x3f7fb4['isAddSuggestion']=_0x56756c[_0x4feb47],void delete _0x3f7fb4['isAdded'];if(!_0x3f7fb4['isAdded']&&!_0x3f7fb4['isRemoved']&&'deletion'==_0x56756c[_0x4feb47]['type'])return void(_0x3f7fb4['isRemoveSuggestion']=_0x56756c[_0x4feb47]);}}}['_setDistance'](_0x1f444b,_0xf8e04c){let _0x482927=0x0,_0x22d265=!0x1;const _0xbd9407=new Map();for(const _0x54cff2 of _0x1f444b)_0x54cff2[_0xf8e04c]?_0x22d265&&(_0x482927++,_0x22d265=!0x1):(_0x482927++,_0x22d265=!0x0),_0xbd9407['set'](_0x54cff2['id'],_0x482927);for(let _0x4df136=0x0;_0x4df136<_0x1f444b['length'];_0x4df136++){if('isRemoved'==_0xf8e04c&&_0x1f444b[_0x4df136]['isAdded']||'isAdded'==_0xf8e04c&&_0x1f444b[_0x4df136]['isRemoved'])continue;if('text'==_0x1f444b[_0x4df136]['type']){_0x1f444b[_0x4df136]['distance']=0x0;continue;}const _0x238436=_0xbd9407['get'](_0x1f444b[_0x4df136]['pairId']),_0x20c931=_0xbd9407['get'](_0x1f444b[_0x4df136]['id']);_0x1f444b[_0x4df136]['distance']=_0x238436-_0x20c931;}}['_getRevisionsRange'](_0x4514ca,_0x24456a,_0x440769=!0x1){const _0x416ee0=[];let _0x4224aa=this['repository']['getIndex'](_0x4514ca),_0x4f5bad=this['repository']['getIndex'](_0x24456a);for(-0x1==_0x4f5bad&&(_0x4f5bad=this['repository']['_revisions']['length'],_0x440769=!0x1);_0x4224aa<_0x4f5bad;)_0x416ee0['push'](this['repository']['getRevision'](_0x4224aa)),_0x4224aa++;return _0x440769&&_0x416ee0['push'](this['repository']['getRevision'](_0x4224aa)),_0x416ee0;}['_threeWayMerge'](_0x2189f4,_0x8fe0d3,_0x6807ac,_0x3c5e02){const _0x3cb40a=this['editor']['model']['schema'];let _0x22b06c=_0x8fe0d3;for(;_0x2189f4[_0x22b06c]&&_0x2189f4[_0x22b06c]['isAdded'];)_0x22b06c++;let _0x1115f3=_0x3c5e02;for(;_0x6807ac[_0x1115f3]&&_0x6807ac[_0x1115f3]['isRemoved'];)_0x1115f3++;_0x164b80(_0x2189f4,_0x8fe0d3,_0x22b06c),_0x164b80(_0x6807ac,_0x3c5e02,_0x1115f3);const _0x5957f9=_0x6807ac['slice'](_0x3c5e02,_0x1115f3)['concat'](_0x2189f4['slice'](_0x8fe0d3,_0x22b06c));return _0x5957f9['sort']((_0x1d6e97,_0x289ce4)=>_0x1d6e97['side']!=_0x289ce4['side']?_0x1d6e97['side']-_0x289ce4['side']:_0x1d6e97['level']!=_0x289ce4['level']?_0x1d6e97['level']-_0x289ce4['level']:_0x1d6e97['distance']!=_0x289ce4['distance']?_0x289ce4['distance']-_0x1d6e97['distance']:!!_0x1d6e97['isAdded']!=!!_0x289ce4['isAdded']?-0x1==_0x1d6e97['side']||0x0==_0x1d6e97['side']?_0x1d6e97['isAdded']?-0x1:0x1:_0x1d6e97['isAdded']?0x1:-0x1:_0x1d6e97['index']-_0x289ce4['index']),{'commonTape':_0x5957f9,'iEnd':_0x22b06c,'jEnd':_0x1115f3};function _0x164b80(_0x7511a2,_0x5cb21d,_0x472830){let _0xdffaf6=-0x1,_0x87dcb7=Number['POSITIVE_INFINITY'],_0x46e6e6=!0x0;for(let _0x306280=_0x5cb21d;_0x306280<_0x472830;_0x306280++)if(_0x3cb40a['isInline'](_0x7511a2[_0x306280]['item'])||(_0x46e6e6=!0x1),_0x7511a2[_0x306280]['item']['startIndex']<_0x5cb21d&&(_0xdffaf6=_0x306280),_0x7511a2[_0x306280]['item']['endIndex']>=_0x472830){_0x87dcb7=_0x306280;break;}_0x46e6e6&&(_0xdffaf6=_0x472830-0x1);for(let _0x114331=_0x5cb21d;_0x114331<_0x472830;_0x114331++)_0x7511a2[_0x114331]['side']=_0x114331<=_0xdffaf6?-0x1:_0x114331<_0x87dcb7?0x0:0x1,_0x7511a2[_0x114331]['index']=_0x114331;let _0x1adccc=0x0;for(let _0x28bfbb=_0x5cb21d;_0x28bfbb<=_0xdffaf6;_0x28bfbb++)0x0==_0x7511a2[_0x28bfbb]['distance']?_0x7511a2[_0x28bfbb]['level']=_0x1adccc:(_0x1adccc++,_0x7511a2[_0x28bfbb]['level']=_0x1adccc,_0x1adccc++);for(let _0x2119d9=_0x5cb21d;_0x2119d9<_0x472830;_0x2119d9++)0x0==_0x7511a2[_0x2119d9]['side']&&(_0x7511a2[_0x2119d9]['level']=_0x1adccc);_0x1adccc=0x0;for(let _0x27e501=_0x472830-0x1;_0x27e501>=_0x87dcb7;_0x27e501--)0x0==_0x7511a2[_0x27e501]['distance']?_0x7511a2[_0x27e501]['level']=_0x1adccc:(_0x1adccc--,_0x7511a2[_0x27e501]['level']=_0x1adccc,_0x1adccc--);}}['_fixObsoleteTags'](_0x332510){const _0x51123f=new Map(),_0xa344f0=this['editor']['model']['schema'];for(let _0x53050a=0x1;_0x53050a<_0x332510['length'];_0x53050a++){let _0x44df82,_0x3b5b41,_0x2c1b6d;const _0xd8fb8=_0x332510[_0x53050a],_0x352354=_0x332510[_0x53050a-0x1];if('text'==_0xd8fb8['type'])continue;if(_0xd8fb8['type']!=_0x352354['type'])continue;if(!_0xa344f0['isBlock'](_0x352354['item'])||_0xa344f0['isLimit'](_0x352354['item']))continue;if(!_0xa344f0['isBlock'](_0xd8fb8['item'])||_0xa344f0['isLimit'](_0xd8fb8['item']))continue;if((_0x332510[_0x53050a]['isAdded']||_0x332510[_0x53050a]['isAddSuggestion'])&&_0x332510[_0x53050a-0x1]['isRemoved'])_0x44df82=_0x332510[_0x53050a],_0x3b5b41=_0x332510[_0x53050a-0x1],_0x2c1b6d=_0x53050a-0x1;else{if(!_0x332510[_0x53050a]['isRemoved']||!_0x332510[_0x53050a-0x1]['isAdded']&&!_0x332510[_0x53050a-0x1]['isAddSuggestion'])continue;_0x44df82=_0x332510[_0x53050a-0x1],_0x3b5b41=_0x332510[_0x53050a],_0x2c1b6d=_0x53050a;}const _0x3c3d84=_0x44df82['level']==_0x3b5b41['level'],_0x4dbe77=Math['abs'](_0x44df82['level'])<Math['abs'](_0x3b5b41['level'])&&0x0==_0x3b5b41['distance'];(_0x3c3d84||_0x4dbe77)&&(_0x51123f['set'](_0x3b5b41['id'],_0x44df82['id']),_0x332510['splice'](_0x2c1b6d,0x1),_0x53050a--,_0x44df82['isAdded']=!0x1);}for(let _0x124749=0x0;_0x124749<_0x332510['length'];_0x124749++)_0x51123f['has'](_0x332510[_0x124749]['pairId'])&&(_0x332510[_0x124749]['pairId']=_0x51123f['get'](_0x332510[_0x124749]['pairId']));}['_removeMissingPairs'](_0x277351){const _0x5e14a4=new Set(_0x277351['map'](_0x16c876=>_0x16c876['id']));for(let _0x238351=0x0;_0x238351<_0x277351['length'];_0x238351++)_0x5e14a4['has'](_0x277351[_0x238351]['pairId'])||0x0==_0x277351[_0x238351]['distance']||(_0x277351[_0x238351]['isIncorrect']=!0x0);return _0x277351['filter'](_0x11b82a=>!_0x11b82a['isIncorrect']);}['_markMismatchedRemovedTags'](_0x965016){const _0xb196fe=new Set();for(let _0x3a3da0=0x0;_0x3a3da0<_0x965016['length'];_0x3a3da0++){if(_0xb196fe['has'](_0x965016[_0x3a3da0]['id'])&&_0x965016[_0x3a3da0]['isRemoved']&&(_0x965016[_0x3a3da0]['isIncorrect']=!0x0),_0x965016[_0x3a3da0]['isIncorrect'])continue;if(0x0==_0x965016[_0x3a3da0]['distance'])continue;if('elementStart'!=_0x965016[_0x3a3da0]['type'])continue;if(null==_0x965016[_0x3a3da0]['pairId'])continue;let _0x5c9c62=_0x3a3da0+0x1,_0x47d54a=0x0;for(;_0x965016[_0x5c9c62]['id']!=_0x965016[_0x3a3da0]['pairId'];)'elementStart'==_0x965016[_0x5c9c62]['type']?_0x47d54a++:'elementEnd'==_0x965016[_0x5c9c62]['type']&&_0x47d54a--,_0x5c9c62++;if(0x0!=_0x47d54a){if(_0x965016[_0x3a3da0]['isRemoved'])_0x965016[_0x3a3da0]['isIncorrect']=!0x0;else{for(;_0x5c9c62!=_0x3a3da0;)_0x965016[_0x5c9c62]['isRemoved']&&0x0!=_0x965016[_0x5c9c62]['distance']&&(_0x965016[_0x5c9c62]['isIncorrect']=!0x0,_0xb196fe['add'](_0x965016[_0x5c9c62]['pairId'])),_0x5c9c62--;}}}return _0x965016['filter'](_0x4562cd=>!_0x4562cd['isIncorrect']);}['_removeUnsupportedChanges'](_0x339a5c){const _0x103416=this['editor']['model']['schema'];for(let _0x2a5406=0x0;_0x2a5406<_0x339a5c['length'];_0x2a5406++){if(!(_0x339a5c[_0x2a5406]['isAdded']||_0x339a5c[_0x2a5406]['isAddSuggestion']||_0x339a5c[_0x2a5406]['isRemoved']||_0x339a5c[_0x2a5406]['isRemoveSuggestion']))continue;if(0x0==_0x339a5c[_0x2a5406]['distance'])continue;const _0x5ad5ec=_0x339a5c[_0x2a5406]['item'];_0x103416['isBlock'](_0x5ad5ec)||_0x103416['isLimit'](_0x5ad5ec)||(_0x339a5c[_0x2a5406]['isAdded']&&delete _0x339a5c[_0x2a5406]['isAdded'],_0x339a5c[_0x2a5406]['isAddSuggestion']&&delete _0x339a5c[_0x2a5406]['isAddSuggestion'],_0x339a5c[_0x2a5406]['isRemoveSuggestion']&&delete _0x339a5c[_0x2a5406]['isRemoveSuggestion'],_0x339a5c[_0x2a5406]['isRemoved']&&(_0x339a5c[_0x2a5406]['isIncorrect']=!0x0));}return _0x339a5c['filter'](_0x7ec0=>!_0x7ec0['isIncorrect']);}['_makeModelFromTape'](_0x235e98,_0x24bdf7,_0x1d7910,_0x3443d7){const _0x20dfde=new _0x75e513(),_0x3510d1=[],_0x5696a5=new Map(),_0x1bd004=this['editor']['model'],_0x395d3d=_0x1bd004['schema'],_0x2f88c0=[_0x20dfde],_0x4503bb={},_0x330f80={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x20dfde['name']=_0x3443d7;let _0x298253=null;const _0x4e1725=[0x0];for(let _0x3fd62b=0x0;_0x3fd62b<_0x235e98['length'];_0x3fd62b++)if('elementStart'===_0x235e98[_0x3fd62b]['type']){_0x235e98[_0x3fd62b]['previousPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725);const _0x2a49cf=new _0xe6fd24(_0x235e98[_0x3fd62b]['item']['name'],_0x235e98[_0x3fd62b]['item']['getAttributes']());_0x2f88c0[0x0]['_appendChild'](_0x2a49cf),_0x4e1725['push'](0x0),_0x2f88c0['unshift'](_0x2a49cf),_0x235e98[_0x3fd62b]['nextPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725);}else'elementEnd'===_0x235e98[_0x3fd62b]['type']?(_0x2f88c0['shift'](),_0x235e98[_0x3fd62b]['previousPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725),_0x4e1725['pop'](),_0x4e1725[_0x4e1725['length']-0x1]++,_0x235e98[_0x3fd62b]['nextPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725)):(_0x235e98[_0x3fd62b]['previousPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725),_0x298253?_0x298253['_data']+=_0x235e98[_0x3fd62b]['item']['data']:_0x298253=new _0x1e0d67(_0x235e98[_0x3fd62b]['item']['data'],_0x235e98[_0x3fd62b]['item']['getAttributes']()),_0x235e98[_0x3fd62b+0x1]&&'text'===_0x235e98[_0x3fd62b+0x1]['type']&&_0x5346dc(_0x298253,_0x235e98[_0x3fd62b+0x1]['item'])||(_0x2f88c0[0x0]['_appendChild'](_0x298253),_0x298253=null),_0x4e1725[_0x4e1725['length']-0x1]+=_0x235e98[_0x3fd62b]['item']['offsetSize'],_0x235e98[_0x3fd62b]['nextPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725));for(let _0x4777be=0x0;_0x4777be<_0x235e98['length'];_0x4777be++){const _0x52aa3d=_0x235e98[_0x4777be]['previousPosition'],_0x3a9cbf=_0x235e98[_0x4777be]['nextPosition'];for(const _0x5190ff of _0x235e98[_0x4777be]['markersStart'])_0x5696a5['set'](_0x5190ff,{'start':_0x52aa3d,'end':null});_0x362444('isRemoveSuggestion',_0x4777be,_0x52aa3d,_0x3a9cbf),_0x362444('isAddSuggestion',_0x4777be,_0x52aa3d,_0x3a9cbf),_0x362444('isRemoved',_0x4777be,_0x52aa3d,_0x3a9cbf),_0x362444('isAdded',_0x4777be,_0x52aa3d,_0x3a9cbf);for(const _0x5edc35 of _0x235e98[_0x4777be]['markersEnd']){const _0x388fa8=_0x5696a5['get'](_0x5edc35);_0x388fa8?_0x388fa8['end']=_0x3a9cbf:_0x5696a5['set'](_0x5edc35,{'start':_0x3a9cbf,'end':_0x3a9cbf});}}for(const [_0x4a20b0,_0x500c24]of _0x5696a5){const _0x7031a2=this['editor']['model']['createRange'](_0x500c24['start'],_0x500c24['end']);_0x20dfde['markers']['set'](_0x4a20b0,_0x7031a2);}return _0x3510d1['sort']((_0x1fa475,_0x18fb44)=>{const _0x29445b=_0x20dfde['markers']['get']('revision:'+_0x1fa475['id']),_0x5d683a=_0x20dfde['markers']['get']('revision:'+_0x18fb44['id']);return _0x29445b['start']['isBefore'](_0x5d683a['start'])?-0x1:_0x29445b['start']['isAfter'](_0x5d683a['start'])?0x1:_0x29445b['end']['isBefore'](_0x5d683a['end'])?-0x1:_0x29445b['end']['isAfter'](_0x5d683a['end'])?0x1:'add'===_0x1fa475['type']?-0x1:0x1;}),{'root':_0x20dfde,'changes':_0x3510d1};function _0x362444(_0x19ca0e,_0x27581c,_0x6ad47b,_0x2f492b){const _0x9f277b=!!_0x235e98[_0x27581c][_0x19ca0e],_0x32d23a=_0x9f277b?_0x235e98[_0x27581c][_0x19ca0e]['userId']:null,_0x11cd80=_0x27581c===_0x235e98['length']-0x1,_0x323e5b=_0x330f80[_0x19ca0e][0x0],_0x17d07e=_0x395d3d['isObject'](_0x235e98[_0x27581c]['item']);!_0x4503bb[_0x19ca0e]&&_0x9f277b?_0x4503bb[_0x19ca0e]={'start':_0x6ad47b,'tapeItem':_0x235e98[_0x27581c],'userId':_0x32d23a,'type':_0x19ca0e}:_0x4503bb[_0x19ca0e]&&!_0x9f277b?(_0x4503bb[_0x19ca0e]['end']=_0x6ad47b,_0x46fdd8(_0x4503bb[_0x19ca0e]),_0x4503bb[_0x19ca0e]=null):_0x4503bb[_0x19ca0e]&&_0x9f277b&&_0x4503bb[_0x19ca0e]['userId']!==_0x32d23a&&(_0x4503bb[_0x19ca0e]['end']=_0x6ad47b,_0x323e5b&&_0x323e5b['userId']===_0x4503bb[_0x19ca0e]['userId']||_0x46fdd8(_0x4503bb[_0x19ca0e]),_0x4503bb[_0x19ca0e]={'start':_0x6ad47b,'tapeItem':_0x235e98[_0x27581c],'userId':_0x32d23a,'type':_0x19ca0e}),_0x4503bb[_0x19ca0e]&&_0x17d07e&&('elementStart'!==_0x235e98[_0x27581c]['type']||_0x323e5b&&_0x323e5b['userId']===_0x32d23a||_0x330f80[_0x19ca0e]['unshift']({'userId':_0x32d23a,'object':_0x235e98[_0x27581c]['item'],'change':_0x4503bb[_0x19ca0e]}),'elementEnd'===_0x235e98[_0x27581c]['type']&&_0x323e5b&&_0x323e5b['object']===_0x235e98[_0x27581c]['item']&&(_0x330f80[_0x19ca0e]['shift'](),_0x4503bb[_0x19ca0e]=_0x323e5b['change'])),_0x4503bb[_0x19ca0e]&&_0x11cd80&&(_0x4503bb[_0x19ca0e]['end']=_0x2f492b,_0x46fdd8(_0x4503bb[_0x19ca0e]),_0x4503bb[_0x19ca0e]=null);}function _0x46fdd8({start:_0x38ee84,end:_0x247268,tapeItem:_0x191cd5,userId:_0x219534,type:_0x4c34bf}){const _0x58bff9=_0x191cd5['item'],_0x195246=_0x1bd004['schema']['isBlock'](_0x58bff9)&&!_0x1bd004['schema']['isLimit'](_0x58bff9),_0x4b4368=_0x38ee84['nodeAfter']==_0x247268['parent']&&_0x247268['isAtStart'];if(_0x195246&&_0x4b4368)return;const _0x28bc26=_0x1bd004['createRange'](_0x38ee84,_0x247268),_0x3bd7b5=new Ot({'author':_0x24bdf7['get'](_0x219534),'type':'isAdded'==_0x4c34bf||'isAddSuggestion'==_0x4c34bf?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4c34bf||'isRemoveSuggestion'==_0x4c34bf},'createdAt':new Date(),'rootName':_0x1d7910});_0x3510d1['push'](_0x3bd7b5),_0x20dfde['markers']['set']('revision:'+_0x3bd7b5['id'],_0x28bc26);}function _0x5346dc(_0x2cb55f,_0x108c0e){const _0x14c66b=_0x2cb55f['getAttributes'](),_0x17e9c8=_0x108c0e['getAttributes']();for(const _0x1fff09 of _0x14c66b){if(_0x1fff09[0x1]!==_0x108c0e['getAttribute'](_0x1fff09[0x0]))return!0x1;_0x17e9c8['next']();}return _0x17e9c8['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x56ba0d=>{const _0x476cad=_0x56ba0d['markerName']['split'](':')[0x1],_0x43e902=this['_getChangeFromId'](_0x476cad);if(!_0x43e902)return null;const _0x331c85='add'==_0x43e902['type']?'insertion':'deletion',_0x5d825a=['ck-suggestion-marker','ck-suggestion-marker-'+_0x331c85];return _0x43e902['data']['isSuggestion']&&_0x5d825a['push']('ck-suggestion-marker-'+_0x331c85+'-new'),this['activeChange']==_0x43e902&&_0x5d825a['push']('ck-suggestion-marker--active'),{'classes':_0x5d825a,'attributes':{'data-change-id':_0x476cad}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x21dc57=>{_0x21dc57['on']('element:pre',(_0x328572,_0x3cacfa,_0x1fdfe1)=>{const _0x3bc854=_0x3cacfa['viewItem']['getChild'](0x0);if(!_0x3bc854||!_0x3bc854['is']('element','code'))return;if(!_0x1fdfe1['consumable']['consume'](_0x3bc854,{'attributes':['vid_start','vid_end']}))return;const _0x43e89d=_0x3cacfa['modelRange']['start']['nodeAfter'];_0x1fdfe1['writer']['setAttribute']('vid_start',_0x3bc854['getAttribute']('vid_start'),_0x43e89d),_0x1fdfe1['writer']['setAttribute']('vid_end',_0x3bc854['getAttribute']('vid_end'),_0x43e89d);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x356670=>{_0x356670['on']('element',(_0x3cf5ea,_0x16533e,_0x3c431b)=>{if(!_0x3c431b['consumable']['consume'](_0x16533e['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x16533e['modelRange']['isCollapsed'])return;const _0x773277=_0x16533e['modelRange']['start']['nodeAfter'];_0x773277['hasAttribute']('vid_start')||_0x773277['hasAttribute']('vid')||(_0x3c431b['writer']['setAttribute']('vid_start',_0x16533e['viewItem']['getAttribute']('vid_start'),_0x773277),_0x3c431b['writer']['setAttribute']('vid_end',_0x16533e['viewItem']['getAttribute']('vid_end'),_0x773277));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1db906=>_0x1db906['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x26d25e,[,_0xfdc9c3])=>{['vid_start','vid_end','vid']['includes'](_0xfdc9c3)&&(_0x26d25e['return']=!0x0,_0x26d25e['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1f3289=>{_0x1f3289['on']('attribute:vid',(_0x5017dc,_0x3de8e1,_0x2f02a4)=>{if('\x20'!=_0x3de8e1['item']['data']||_0x3de8e1['item']['parent']['maxOffset']>0x1)return;if(!_0x2f02a4['consumable']['consume'](_0x3de8e1['item'],_0x5017dc['name']))return;const _0x4aa388=_0x2f02a4['writer'],_0x5b034b=_0x2f02a4['mapper']['toViewRange'](_0x3de8e1['range']);_0x4aa388['wrap'](_0x5b034b,_0x4aa388['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4392ef){const _0x5ba89a=_0x4392ef['plugins']['get']('RevisionViewer');return(_0x308d9b,_0x330aa6,_0x4f3442)=>{const _0x49b10b=_0x330aa6['markerName']['split'](':')[0x1],_0x3890f3=_0x5ba89a['_getChangeFromId'](_0x49b10b);if(!_0x3890f3)return null;const _0x21155c='add'==_0x3890f3['type']?'split':'merge';if(!_0x4f3442['consumable']['test'](_0x330aa6['markerRange'],_0x308d9b['name']))return;const _0x49cea7=_0x330aa6['markerRange']['getWalker'](),_0xe7dba3=_0x330aa6['markerRange']['start'],_0x1ee543=_0x4392ef['model']['schema'];let _0x4ba166=null,_0x5b5603=null,_0x266d0a=!0x1,_0x395d8f=!0x1;for(const _0x4fa04f of _0x49cea7){const _0x29de6a=_0x4fa04f['item'];_0x266d0a=_0x266d0a||_0x1ee543['isContent'](_0x29de6a);const _0x573758=_0x4f3442['mapper']['toViewElement'](_0x29de6a);if(_0x573758&&_0x573758['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4fa04f['type']&&(_0x1ee543['isBlock'](_0x29de6a)&&!_0x1ee543['isLimit'](_0x29de6a)&&(_0x29de6a['nextSibling']||_0xe7dba3['isAtEnd']?_0x4ba166&&_0x4ba166['parent']==_0x29de6a||(_0x4ba166=_0x29de6a,_0x14c173(_0x4fa04f['previousPosition']),_0x395d8f=!0x0):_0x5b5603=_0x5b5603||_0x4fa04f['previousPosition']));}function _0x14c173(_0x5b7f7a){const _0x400ded=_0x4f3442['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x21155c}),_0x15f104=_0x4f3442['mapper']['toViewPosition'](_0x5b7f7a);_0x3890f3['data']['isSuggestion']&&_0x4f3442['writer']['addClass']('ck-suggestion-marker-'+_0x21155c+'-new',_0x400ded),_0x5ba89a['activeChange']==_0x3890f3&&_0x4f3442['writer']['addClass']('ck-suggestion-marker--active',_0x400ded),_0x4f3442['writer']['insert'](_0x15f104,_0x400ded),_0x4f3442['mapper']['bindElementToMarker'](_0x400ded,_0x330aa6['markerName']);}_0x266d0a||_0x395d8f||!_0x5b5603||_0x14c173(_0x5b5603);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x6219c4,_0x254296,_0x4e50ac)=>{const _0x58c52d=_0x4e50ac['mapper']['markerNameToElements'](_0x254296['markerName']);if(_0x58c52d){for(const _0x3f6ea8 of _0x58c52d)(_0x3f6ea8['hasClass']('ck-suggestion-marker-split')||_0x3f6ea8['hasClass']('ck-suggestion-marker-merge'))&&(_0x4e50ac['mapper']['unbindElementFromMarkerName'](_0x3f6ea8,_0x254296['markerName']),_0x4e50ac['writer']['remove'](_0x3f6ea8));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x166e6f,_0x2f423c,_0x58fd6b)=>{const _0x5372bf=_0x2f423c['markerName']['split'](':')[0x1],_0x4d9819=this['_getChangeFromId'](_0x5372bf);if(!_0x4d9819)return null;const _0x292e66='add'==_0x4d9819['type']?'split':'merge';if(_0x58fd6b['consumable']['test'](_0x2f423c['markerRange'],_0x166e6f['name']))for(const _0x5348b7 of _0x2f423c['markerRange']['getItems']()){if(!_0x5348b7['is']('element','softBreak'))continue;const _0x470777=_0x58fd6b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x292e66}),_0x13fdf9=_0x58fd6b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5348b7));_0x4d9819['data']['isSuggestion']&&_0x58fd6b['writer']['addClass']('ck-suggestion-marker-'+_0x292e66+'-new',_0x470777),this['activeChange']==_0x4d9819&&_0x58fd6b['writer']['addClass']('ck-suggestion-marker--active',_0x470777),_0x58fd6b['writer']['insert'](_0x13fdf9,_0x470777),_0x58fd6b['mapper']['bindElementToMarker'](_0x470777,_0x2f423c['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x222b1c=>{for(const _0x3a8aca of this['editor']['model']['document']['getRootNames']()){const _0x17248f=this['editor']['model']['document']['getRoot'](_0x3a8aca),_0x38d81c=this['editor']['editing']['view']['document']['getRoot'](_0x3a8aca);if(_0x38d81c){const _0x111b5d=_0x17248f['getAttribute']('revisionHistoryAttachChange');if(_0x222b1c['removeAttribute']('data-change-id',_0x38d81c),_0x222b1c['removeClass']('ck-revision-history-root-add',_0x38d81c),_0x222b1c['removeClass']('ck-revision-history-root-remove',_0x38d81c),_0x222b1c['removeClass']('ck-revision-history-root--active',_0x38d81c),_0x111b5d){const _0x2048e8=this['_getChangeFromId'](_0x111b5d);if(!_0x2048e8)return null;_0x222b1c['setAttribute']('data-change-id',_0x111b5d,_0x38d81c),_0x222b1c['addClass']('ck-revision-history-root-'+_0x2048e8['type'],_0x38d81c),this['activeChange']==_0x2048e8&&_0x222b1c['addClass']('ck-revision-history-root--active',_0x38d81c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4beda1=>'revision-comment:'+_0x4beda1,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xfcc0bb=>'revision-suggestion:'+_0xfcc0bb,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x58f1b7=>({'name':'suggestion:'+_0x58f1b7,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3c7c4d=>{const _0x496a4d=_0x3c7c4d['markerName']['split'](':')[0x1];return'insertion'!=_0x496a4d&&'deletion'!=_0x496a4d?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x496a4d]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x7eb1cc,_0xb62c97,_0x2840ab)=>{const _0x38ec3b=_0x2840ab['mapper']['markerNameToElements'](_0xb62c97['markerName']);if(_0x38ec3b){for(const _0x29b124 of _0x38ec3b)_0x29b124['is']('uiElement')&&(_0x2840ab['mapper']['unbindElementFromMarkerName'](_0x29b124,_0xb62c97['markerName']),_0x2840ab['writer']['remove'](_0x29b124));}},{'priority':'high'});}['_getChangeFromId'](_0xeed832){return this['_changeIdToChange']['get'](_0xeed832);}['_getViewForChange'](_0x22ac4d){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x22ac4d),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x34b388,_0x4e05d5,_0x3b8178,_0x45cba7)=>{_0x45cba7&&this['_balloon']['remove'](_0x45cba7),_0x3b8178&&(this['_balloon']['add']({'view':_0x3b8178,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2fdf4a=this['editor']['editing'],_0x585008=this['_getChangeFromId'](_0x3b8178['changeId']);let _0x16d000;if(_0x585008['data']['isOnRoot']){const _0x3a6489=_0x2fdf4a['view']['getDomRoot'](_0x585008['rootName']);_0x16d000=Array['from'](_0x3a6489['getClientRects']());}else{const _0x228b4e=this['editor']['model']['markers']['get']('revision:'+_0x3b8178['changeId']);_0x16d000=Array['from'](_0x2fdf4a['mapper']['markerNameToElements'](_0x228b4e['name']))['map'](_0xcd6806=>_0x2fdf4a['view']['domConverter']['mapViewToDom'](_0xcd6806))['map'](_0x261ff1=>Array['from'](_0x261ff1['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x16d000['find'](_0x3174e2=>_0x3174e2['top']-0x3<=this['_activeViewTarget']['y']&&_0x3174e2['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3174e2['left']-0x3<=this['_activeViewTarget']['x']&&_0x3174e2['right']+0x3>=this['_activeViewTarget']['x'])||_0x16d000[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5e1c23,_0xca5751,_0xfee0e,_0x5993f2)=>{this['activeView']=_0xfee0e?this['_getViewForChange'](_0xfee0e):null,this['editor']['model']['change'](()=>{const _0xe19ec6=this['editor']['editing'];_0x5993f2&&(_0x5993f2['data']['isOnRoot']?_0xe19ec6['view']['change'](_0x269ebe=>{_0x269ebe['removeClass']('ck-revision-history-root--active',_0xe19ec6['view']['document']['getRoot'](_0x5993f2['rootName']));}):_0xe19ec6['reconvertMarker']('revision:'+_0x5993f2['id'])),_0xfee0e&&(_0xfee0e['data']['isOnRoot']?_0xe19ec6['view']['change'](_0x177024=>{_0x177024['addClass']('ck-revision-history-root--active',_0xe19ec6['view']['document']['getRoot'](_0xfee0e['rootName']));}):_0xe19ec6['reconvertMarker']('revision:'+_0xfee0e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3105d7,_0x101508)=>{if(this['activeChange'])return;const _0x57cc39=this['_findChangeIdFromDomTarget'](_0x101508['target']),_0x190715=this['_changeIdToChange']['get'](_0x57cc39);_0x190715?(this['_activeViewTarget']={'x':_0x101508['domEvent']['x'],'y':_0x101508['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x190715)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0xa435d,_0x126d0b)=>{const _0x87b971=this['_findChangeIdFromDomTarget'](_0x126d0b['target']),_0xff3503=this['_changeIdToChange']['get'](_0x87b971);_0xff3503?(this['_activeViewTarget']={'x':_0x126d0b['domEvent']['x'],'y':_0x126d0b['domEvent']['y']},_0xff3503===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0xff3503):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xc33017){do{const _0x36e027=_0xc33017['getAttribute']('data-change-id');if(_0x36e027)return _0x36e027;_0xc33017=_0xc33017['parent'];}while(_0xc33017);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1ed35d=>{for(const _0x1d0cc4 of this['editor']['model']['markers'])_0x1ed35d['removeMarker'](_0x1d0cc4);});}};function Vt(_0x4af6f1,_0x44a006){return(_0x2afd93,_0x5d91f5,_0x3d47bb)=>{if(!_0x3d47bb['consumable']['test'](_0x5d91f5['markerRange'],_0x2afd93['name']))return;const _0x576771=_0x5d91f5['markerRange']['getWalker'](),_0x5e2b73=_0x5d91f5['markerRange']['start'],_0x14fdd7=_0x4af6f1['model']['schema'];let _0x5f0a01=null,_0x14e350=null,_0x1f83da=!0x1,_0x124b24=!0x1;for(const _0x764634 of _0x576771){const _0x218488=_0x764634['item'];_0x1f83da=_0x1f83da||_0x14fdd7['isContent'](_0x218488);const _0x5355fa=_0x3d47bb['mapper']['toViewElement'](_0x218488);if(_0x5355fa&&_0x5355fa['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x764634['type']&&(_0x14fdd7['isBlock'](_0x218488)&&!_0x14fdd7['isLimit'](_0x218488)&&(_0x218488['nextSibling']||_0x5e2b73['isAtEnd']?_0x5f0a01&&_0x5f0a01['parent']==_0x218488||(_0x5f0a01=_0x218488,_0x266ece(_0x764634['previousPosition']),_0x124b24=!0x0):_0x14e350=_0x14e350||_0x764634['previousPosition']));}function _0x266ece(_0x2b1a4d){const _0x37b96e=_0x3d47bb['mapper']['toViewPosition'](_0x2b1a4d),_0x43e50b=_0x3d47bb['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x44a006});_0x3d47bb['writer']['insert'](_0x37b96e,_0x43e50b),_0x3d47bb['mapper']['bindElementToMarker'](_0x43e50b,_0x5d91f5['markerName']);}_0x1f83da||_0x124b24||!_0x14e350||_0x266ece(_0x14e350);};}var Dt=class extends _0x2702e2{constructor(_0x4118e6){super(_0x4118e6);const _0x2c9d3a=_0x4118e6['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x2c9d3a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2c9d3a,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4ad630=this['editor'],_0x412068=_0x4ad630['plugins']['get'](Mt),_0xbcd263=_0x412068['isReady']?_0x412068['diff']['newRevisionId']:null;_0x4ad630['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xbcd263);}['refresh'](){const {isReady:_0x3bc113,isEnabled:_0x1df16c,repository:_0x4bf337,diff:_0x2be20d}=this['editor']['plugins']['get'](Mt),_0x51e638=_0x2be20d&&_0x4bf337['getLaterVisibleRevision'](_0x2be20d['newRevisionId']);this['isEnabled']=_0x3bc113&&_0x1df16c&&Boolean(_0x51e638);}},Tt=class extends _0x2702e2{['_step'];constructor(_0x1cb93f,{direction:_0x51490f}){super(_0x1cb93f);const _0x3691f1=_0x1cb93f['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x51490f?0x1:-0x1,this['listenTo'](_0x3691f1,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3691f1,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3691f1,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x5c5c10=this['editor'],_0xf76632=_0x5c5c10['plugins']['get'](Mt),{isNavigationMode:_0x4ecfcd,currentChangeNumber:_0x54d716}=_0xf76632;let _0x352b6d;if(_0xf76632['activeChange']=_0x4ecfcd?_0xf76632['diff']['changes']['get'](_0x54d716+this['_step']):_0xf76632['diff']['changes']['first'],_0xf76632['activeChange']['data']['isOnRoot'])_0x352b6d=_0x5c5c10['editing']['view']['getDomRoot'](_0xf76632['activeChange']['rootName']);else{const _0xdf0a0=_0x5c5c10['model']['markers']['get']('revision:'+_0xf76632['activeChange']['id']);_0x352b6d=_0x293709(_0x5c5c10['editing'],_0xdf0a0);}_0x269e7a({'target':_0x352b6d,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x1c8390,currentChangeNumber:_0x4d8c4a,numberOfChanges:_0x4902a1,isReady:_0x224d16,isEnabled:_0x5d2aa2}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x5d2aa2&&_0x224d16&&_0x4902a1)&&(!_0x1c8390||(0x1===this['_step']?_0x4d8c4a<_0x4902a1-0x1:_0x4d8c4a>0x0));}},Ht=class extends at{constructor(_0x4774b8){super(_0x4774b8);const _0x2c6e4b=this['bindTemplate'],_0x377a05=new _0x178003(_0x4774b8),_0x5e1dc4=new _0x178003(_0x4774b8);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',(_0x49ee98,_0x32a0ad)=>_0x49ee98&&_0x32a0ad>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3956d3,_0x4c9a93,_0x11b04c,_0x337544)=>{if(!_0x3956d3)return pt(_0x4774b8,'Loading...');if(!_0x11b04c)return pt(_0x4774b8,'No\x20changes');const _0x278e9b=pt(_0x4774b8,'NUMBER_OF_CHANGES',_0x11b04c);return _0x337544?pt(_0x4774b8,'X_OF_Y_CHANGES',[_0x4c9a93+0x1,_0x11b04c]):_0x278e9b;}),_0x377a05['set']({'label':pt(_0x4774b8,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1ce83c}),_0x5e1dc4['set']({'label':pt(_0x4774b8,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x420769}),_0x377a05['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5e1dc4['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x377a05['on']('execute',()=>this['fire']('execute','backward')),_0x5e1dc4['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',_0x2c6e4b['if']('_isStatusLabelVisible','ck-hidden',_0x14e5e0=>!_0x14e5e0)]},'children':[{'text':_0x2c6e4b['to']('isNavigationMode',_0x3c9522=>_0x3c9522?pt(_0x4774b8,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x4774b8,'Total')+':\x20')}]},{'text':_0x2c6e4b['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x377a05,_0x5e1dc4]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x73140e{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x3909d4=this['editor']['editing']['view'];_0x3909d4['change'](_0x132097=>{for(const _0xc805d4 of _0x3909d4['document']['roots'])_0x132097['addClass'](Pt,_0xc805d4);});}['hide'](){const _0x13f6d6=this['editor']['editing']['view'];_0x13f6d6['change'](_0x5837fe=>{for(const _0x12bbdf of _0x13f6d6['document']['roots'])_0x5837fe['removeClass'](Pt,_0x12bbdf);});}},Lt=class extends _0x73140e{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x2b3f5a=this['editor'],_0x3258a3=_0x2b3f5a['plugins']['get'](Mt),_0x144559=_0x2b3f5a['plugins']['get'](Ut);_0x2b3f5a['ui']['componentFactory']['add']('exitToEditing',_0x359274=>{const _0x2ec463=new _0x178003(_0x359274);return _0x2ec463['set']({'label':pt(_0x359274,'Back\x20to\x20editing'),'icon':_0x4781ac,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2ec463,'execute',()=>{_0x2b3f5a['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2ec463;}),_0x2b3f5a['ui']['componentFactory']['add']('restoreRevision',_0x3beb17=>{const _0x32c672=new _0x178003(_0x3beb17);return _0x32c672['set']({'label':pt(_0x3beb17,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x32c672['bind']('isEnabled')['to'](_0x2b3f5a['commands']['get']('restoreRevision')),this['listenTo'](_0x32c672,'execute',()=>_0x2b3f5a['execute']('restoreRevision')),_0x32c672;}),_0x2b3f5a['ui']['componentFactory']['add']('changesNavigation',_0x56989f=>{const _0x28caff=new Ht(_0x56989f),_0x348979=_0x2b3f5a['commands']['get']('showPreviousChange'),_0x214c11=_0x2b3f5a['commands']['get']('showNextChange');return _0x28caff['bind']('isBackwardNavigationEnabled')['to'](_0x348979,'isEnabled'),_0x28caff['bind']('isForwardNavigationEnabled')['to'](_0x214c11,'isEnabled'),_0x28caff['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3258a3),this['listenTo'](_0x28caff,'execute',(_0x1b12c6,_0x34965b)=>{_0x2b3f5a['execute']('forward'===_0x34965b?'showNextChange':'showPreviousChange');}),_0x28caff;}),_0x144559['show'](),_0x3258a3['on']('change:isReady',(_0x1f0cb5,_0x13f1c1,_0x106c9a)=>{_0x106c9a?_0x144559['hide']():_0x144559['show']();});}},Ft=class extends _0x469ef1{['_resizeObserver']=null;constructor(_0x375796,_0x1edb31){super(_0x375796,_0x1edb31);const _0x395598=this['bindTemplate'];this['set']({'label':pt(_0x375796,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x375796,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x395598['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x5490e3(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4a6526=this['fieldView']['element'];this['_tooltipString']=_0x4a6526['scrollWidth']>_0x4a6526['clientWidth']&&_0x4a6526['value']||'';}},$t=class extends at{constructor(_0x151aac,_0x32b294,_0x65ed39){super(_0x151aac);const _0x46af59=new _0x3cc9fe();_0x46af59['set']({'content':_0x38a6c8,'viewBox':'0\x200\x2011\x2010'});const _0xf38bec=['ck','ck-revision-history-sidebar__revision-author'];_0x65ed39&&_0xf38bec['push']('ck-revision-history-sidebar__revision-author_creator');const _0x140f1c=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x151aac,_0x65ed39?'Revision\x20creator':'Revision\x20author')},'children':[_0x46af59,_0x32b294['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xf38bec},'children':_0x140f1c});}};function jt(_0x2d1782,_0x551a59){const _0x36791c=_0x2d1782['bindTemplate'],_0x394f44=_0x2d1782['locale'],_0x56beef=ct(_0x394f44);_0x56beef['panelPosition']='sw';const _0x52f380=function(_0x1e60a7,_0x49e395){const _0x46c982=function(_0x320dae,_0x2ec03d){const _0x39f307=_0x320dae['locale'],_0x342c89={'Compare\x20against\x20selected':pt(_0x39f307,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x39f307,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x39f307,'Restore\x20this\x20revision')};return _0x2ec03d['map'](_0x1daabc=>{const _0x1a1840=_0x342c89[_0x1daabc['name']];return _0x1a1840&&_0x1a1840!==_0x1daabc['name']&&(_0x1daabc['name']=_0x1a1840),_0x1daabc;});}(_0x1e60a7,_0x49e395),_0x38d42f=new _0x453cd2();for(const _0x2babc6 of _0x46c982){const _0x476968={'type':'button','model':new rt({'label':_0x2babc6['name'],'class':_0x2babc6['class'],'withText':!0x0,'role':'menuitem','_action':_0x2babc6['action']})};_0x476968['model']['bind']('isEnabled')['to'](_0x1e60a7,'isActionsDropdownOpen',_0x2f5e91=>'function'!=typeof _0x2babc6['isEnabled']||(!_0x2f5e91||_0x2babc6['isEnabled'](_0x1e60a7))),_0x38d42f['add'](_0x476968);}return _0x38d42f;}(_0x2d1782,_0x551a59);return _0x2d1782['bind']('isActionsDropdownOpen')['to'](_0x56beef,'isOpen'),_0x56beef['buttonView']['set']({'label':pt(_0x394f44,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1cdb41}),_0x56beef['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x36791c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x36791c['to'](_0x498f8a=>_0x498f8a['stopPropagation']())}}),_0x56beef['on']('execute',_0x51402b=>{_0x2d1782['isReady']&&'function'==typeof _0x51402b['source']['_action']&&_0x51402b['source']['_action'](_0x2d1782);}),ht(_0x56beef,_0x52f380,{'role':'menu'}),_0x56beef['listenTo'](_0x2d1782,'change:isActionsDropdownOpen',(_0x443316,_0x55f6b7,_0x15d029)=>{if(_0x15d029)for(const _0x38d07c of _0x56beef['listView']['items']){const _0x2f3dbf=_0x38d07c['children']['first'],_0x264e9e=_0x551a59['find'](_0x4bc16e=>_0x4bc16e['action']===_0x2f3dbf['_action'])['isVisible'];_0x38d07c['isVisible']=void 0x0===_0x264e9e||_0x264e9e(_0x2d1782);}}),_0x56beef;}const Bt=/* #__PURE__ -- @preserve */
27
+ _0x55aae2(at);var Kt=class extends Bt{['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x4db4de,_0x3cea79,_0x982a3f,_0x100e7a){super(_0x4db4de);const _0x5eb72b=this['bindTemplate'],_0x1fdfd5=function(_0x15ec8a,_0x4a1fff){const _0x13c772=Array['from'](_0x4a1fff['authors'])['filter'](_0x424b5a=>_0x424b5a!=_0x4a1fff['creator']);return _0x4a1fff['creator']&&_0x13c772['unshift'](_0x4a1fff['creator']),_0x13c772['map'](_0x34c883=>new $t(_0x15ec8a,_0x34c883,_0x34c883==_0x4a1fff['creator']));}(_0x4db4de,_0x3cea79);this['id']=_0x3cea79['id'],this['_revision']=_0x3cea79,this['_requireRevisionName']=_0x100e7a,this['bind']('name','createdAt')['to'](_0x3cea79),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x40c39f=>{return _0x5df443=_0x4db4de['uiLanguage'],(_0x5b7872=_0x40c39f)['toLocaleDateString'](_0x5df443,{'month':'long','day':'numeric'})+',\x20'+_0x5b7872['toLocaleTimeString'](_0x5df443,{'hour':'numeric','minute':'numeric'});var _0x5df443,_0x5b7872;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x4db4de,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x5c31ba=>_0x5c31ba||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x28e9b5,_0x1be101)=>_0x28e9b5&&_0x1be101),this['revisionActionsView']=_0x982a3f&&_0x982a3f['length']?jt(this,_0x982a3f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x5eb72b['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x5eb72b['if']('isEnabled','ck-disabled',_0x26393e=>!_0x26393e),_0x5eb72b['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x5eb72b['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x5eb72b['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':_0x5eb72b['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':_0x1fdfd5}]},this['revisionActionsView']],'on':{'click':_0x5eb72b['to'](_0xef86a3=>{_0xef86a3['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x32de54=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x32de54,'change',()=>{this['_requireRevisionName']&&!_0x32de54['value']||this['fire']('setName',{'id':this['id'],'name':_0x32de54['value']}),_0x32de54['value']||(_0x32de54['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}};function qt(_0x2c007e,_0x260ceb){const _0x4fc9ac=ft['fromJSDate'](_0x2c007e)['setLocale'](_0x260ceb),_0x492a1c=ft['local'](),_0x907e9c=_0x492a1c['minus']({'days':0x1})['startOf']('day');let _0x5b68df,_0x10e855;return _0x4fc9ac['hasSame'](_0x492a1c,'day')?(_0x5b68df=_0x4fc9ac['startOf']('day')['toJSDate'](),_0x10e855=_0x4fc9ac['toRelativeCalendar']()):_0x4fc9ac['hasSame'](_0x907e9c,'day')?(_0x5b68df=_0x907e9c['toJSDate'](),_0x10e855=_0x4fc9ac['toRelativeCalendar']()):_0x4fc9ac['hasSame'](_0x492a1c,'week')?(_0x5b68df=_0x4fc9ac['startOf']('week')['toJSDate'](),_0x10e855=_0x4fc9ac['weekdayLong']||''):_0x4fc9ac['hasSame'](_0x492a1c,'year')?(_0x5b68df=_0x4fc9ac['startOf']('month')['toJSDate'](),_0x10e855=_0x4fc9ac['monthLong']||''):(_0x5b68df=_0x4fc9ac['startOf']('year')['toJSDate'](),_0x10e855=String(_0x4fc9ac['year'])),{'startDate':_0x5b68df,'localizedPeriodName':_0x10e855};}var Gt=class extends at{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x452167,_0x12aabf,_0x5b87ea,_0x220e88){super(_0x452167);const _0x80f2e6=qt(_0x12aabf,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x12aabf,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x5b87ea,this['_requireRevisionName']=_0x220e88,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':_0x80f2e6}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1803a0){const _0x1c5bd2=new Kt(this['locale'],_0x1803a0,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1c5bd2);}['removeRevision'](_0xef4626){const _0x223f50=this['revisionViews']['find'](_0x332216=>_0x332216['id']===_0xef4626['id']);this['revisionViews']['remove'](_0x223f50);}},Jt=class extends at{constructor(_0x4a3fcf){super(_0x4a3fcf);const _0x337adc=new _0x3cc9fe();_0x337adc['content']=_0x52e288,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x337adc,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x4a3fcf,'Revision\x20history')]}]});}},Wt=class extends at{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x52519f,_0x14c502,_0x44188a,_0x3f37d0){super(_0x52519f);const _0x41603c=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x14c502,this['_revisionActions']=_0x44188a,this['_requireRevisionName']=_0x3f37d0,this['on']('select',(_0x1fc828,_0x1fa83c)=>{this['fire']('revisionSelected',_0x1fa83c);}),this['on']('setName',(_0x255dec,_0x53075d)=>{this['fire']('revisionSetName',_0x53075d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x52519f),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x41603c['if']('isEnabled','ck-disabled',_0x2de54b=>!_0x2de54b)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3de58c of this['_revisions'])this['_addRevision'](_0x3de58c);this['_revisions']['on']('add',(_0x241d50,_0xcdca8)=>{this['_addRevision'](_0xcdca8);}),this['_revisions']['on']('remove',(_0x585d2c,_0x2e894a)=>{this['_removeRevision'](_0x2e894a);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x34db78=>_0x34db78['revisionViews']['map'](_0x1d845c=>_0x1d845c))['flat']();}['selectRevision'](_0x89bd82){for(const _0x41524b of this['revisionViews'])_0x89bd82&&_0x89bd82['id']===_0x41524b['id']?_0x41524b['select']():_0x41524b['deselect']();}['highlightRevisions'](_0x5aba23){for(const _0x52a5e2 of this['revisionViews'])_0x5aba23['some'](({id:_0xc934fa})=>_0xc934fa===_0x52a5e2['id'])?_0x52a5e2['highlight']():_0x52a5e2['unhighlight']();}['_addRevision'](_0x29a1bf){const _0x429c84=qt(_0x29a1bf['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1aafeb=this['_getTimePeriodViewByStartDate'](_0x429c84);_0x1aafeb||(_0x1aafeb=new Gt(this['locale'],_0x429c84,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x1aafeb)),_0x1aafeb['addRevision'](_0x29a1bf);}['_removeRevision'](_0x3154a3){const _0x5be586=qt(_0x3154a3['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x5be586)['removeRevision'](_0x3154a3);}['_getTimePeriodViewByStartDate'](_0xfc1458){return this['timePeriodViews']['find'](_0x279396=>_0x279396['startDate']['getTime']()===_0xfc1458['getTime']());}},Yt=class RevisionsSidebar extends _0x73140e{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt];}constructor(_0x57d457){super(_0x57d457),this['_revisionViewer']=_0x57d457['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x5774e2=this['_revisionsRepository']['_revisions'],_0x1d92fc=this['_createRevisionActions'](),_0xf2ba81=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x5774e2,_0x1d92fc,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',(_0x3ac16e,_0x336f2c)=>{_0x336f2c['revisionViews']['on']('add',(_0xae0bf1,_0x15e454)=>{_0x15e454['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)),_0xf2ba81['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x171355=this['_revisionsRepository']['getRevision'](0x0);if(_0x171355){const _0x31ba28=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x171355['id']);this['_revisionViewer']['compare'](_0x171355,_0x31ba28);}}['_handleRevisionSelected'](_0x48435b,_0x1c1a0e){const _0x1518e4=this['_revisionsRepository']['getRevision'](_0x1c1a0e['id']),_0x423111=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1518e4['id']);this['_revisionViewer']['compare'](_0x1518e4,_0x423111);}['_handleRevisionSetName'](_0x3fd3af,_0x30649c){this['_revisionsRepository']['getRevision'](_0x30649c['id'])['setName'](_0x30649c['name']);}['_handleDiffChange'](_0x3a76ca,_0x4b1549,_0xac53cc){const _0x4c0525=this['_revisionsRepository']['getRevisionsInDiff'](_0xac53cc);_0x4c0525['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x4c0525),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x4c0525[0x0]));}['_createRevisionActions'](){const _0x443fc8=this['editor'],_0x3beccd=RevisionsSidebar['availableRevisionActions'],_0x35db60=_0x443fc8['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x35db60['length'])return _0x35db60['map'](_0x23ac70=>{const _0x84b56d='string'==typeof _0x23ac70?Object['assign']({},_0x3beccd[_0x23ac70]):_0x23ac70;return _0x84b56d['action']=_0x84b56d['action']['bind'](this,_0x443fc8),_0x84b56d['isVisible']&&(_0x84b56d['isVisible']=_0x84b56d['isVisible']['bind'](this,_0x443fc8)),_0x84b56d;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x31ec7b},_0x3a2c42)=>{const _0x4dd2e2=_0x31ec7b['get'](Mt),_0x32656a=_0x4dd2e2['repository'];let _0x3d445d=_0x4dd2e2['diff']['newRevisionId'],_0x568d4c=_0x3a2c42['id'];_0x32656a['getIndex'](_0x3d445d)>_0x32656a['getIndex'](_0x568d4c)&&([_0x3d445d,_0x568d4c]=[_0x568d4c,_0x3d445d]),_0x4dd2e2['compare'](_0x3d445d,_0x568d4c);},'isVisible':({plugins:_0x4fa300},_0x3bffdb)=>{const _0x154592=_0x4fa300['get'](Mt);return!(_0x154592['repository']['getRevisionsInDiff'](_0x154592['diff'])['length']>0x2)&&!_0x3bffdb['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1cf458,{id:_0x1f5b6d})=>{_0x1cf458['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1f5b6d);},'isVisible':({plugins:_0x5b11d6},_0x52c997)=>!!_0x5b11d6['get'](Mt)['repository']['getLaterVisibleRevision'](_0x52c997['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1b7edb},{id:_0x4a68a7,revisionNameView:_0x47ecf1})=>{const _0x1436c1=_0x1b7edb['get'](Mt),_0x5ad3b8=_0x1436c1['repository']['getEarlierVisibleRevision'](_0x4a68a7);_0x1436c1['compare'](_0x4a68a7,_0x5ad3b8),_0x47ecf1['focus'](),_0x47ecf1['fieldView']['select']();}}};}var Qt=class extends _0x3a737f{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x584b15,_0x4338bf){super(_0x584b15),this['_view']=_0x4338bf,this['_toolbarConfig']=ut(_0x584b15['config']['get']('toolbar')),this['_elementReplacer']=new _0x3c5642();}get['element'](){return this['view']['element'];}['init'](_0x5c84a5){const _0x362704=this['editor'],_0x4d9f92=this['view'],_0x194970=_0x362704['editing']['view'],_0x438476=_0x4d9f92['editable'];_0x438476['name']=_0x194970['document']['getRoot']()['rootName'],_0x4d9f92['render']();const _0x29cdbb=_0x438476['element'];this['setEditableElement'](_0x438476['name'],_0x29cdbb),_0x4d9f92['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x194970['attachDomRoot'](_0x29cdbb),this['_elementReplacer']['replace'](_0x5c84a5,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1729dd=this['view'],_0xc69aee=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0xc69aee['detachDomRoot'](_0x1729dd['editable']['name']),_0x1729dd['destroy']();}['_initToolbar'](){const _0xf78e36=this['view'];_0xf78e36['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0xf78e36['stickyPanel']['limiterElement']=_0xf78e36['element'],_0xf78e36['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x59e730})=>_0x59e730),_0xf78e36['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0xf78e36['toolbar']);}},zt=class extends _0x21ca49{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x1780c3,_0x31c85b,_0x2eaee9={}){super(_0x1780c3),this['stickyPanel']=new st(_0x1780c3),this['toolbar']=new ot(_0x1780c3,{'shouldGroupWhenFull':_0x2eaee9['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x27b5d1(_0x1780c3,_0x31c85b);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
30
- _0xbf5d60(_0x354082);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0xaae990,_0x582d32){super(_0x582d32),this['sourceElement']=_0xaae990,this['model']['document']['createRoot']();const _0x29ac59=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x29ac59);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5afa6c,_0x37c88c){const _0x298c2b=new this(_0x5afa6c,_0x37c88c);return await _0x298c2b['initPlugins'](),await _0x298c2b['ui']['init'](_0x5afa6c),await _0x298c2b['data']['init'](_0x298c2b['config']['get']('initialData')||''),_0x298c2b['fire']('ready'),_0x298c2b;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x592ef7{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4834c9){super(_0x4834c9),this['result']='end',_0x4834c9['editing']['view']['_overlayModeHint']='auto',_0x4834c9['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x592ef7{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x107925){if(super(_0x107925),!this['editor']['config']['get']('revisionHistory'))throw new _0x16b9f2('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3134f7=>this['_showRevisionViewer']({..._0x3134f7,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4b88b0=>this['_closeRevisionViewer'](_0x4b88b0)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1d80f2=>this['_restoreRevision'](_0x1d80f2)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x36621e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x36621e;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x323979){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x323979);}['getRevision'](_0x240108){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x240108);}['getRevisions'](_0x2626be){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2626be||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x34d425=this['editor'],_0x3c0e98=_0x1292c3(_0x34d425,ii),_0x455c01=_0x34d425['plugins']['get']('RevisionTracker'),_0x48be56=_0x34d425['plugins']['get'](_0x20176c)['users'];return _0x3c0e98['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x3c0e98['lazyRoots'],(_0x3c0e98['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x592ef7{static get['requires'](){return[Mt,_0x20176c];}['init'](){const _0x18b1e9=this['editor']['plugins']['get'](_0x20176c);for(const _0x22566d of _0x48be56)_0x22566d['isAnonymous']||_0x18b1e9['getUser'](_0x22566d['id'])||_0x18b1e9['addUser'](_0x22566d);const _0x473191=_0x455c01['repository']['getRevisions']();let _0x1ea6dd=null;const _0x54ea79=this['editor']['plugins']['get']('RevisionViewer');_0x54ea79['adapter']=_0x455c01['adapter'],_0x54ea79['bind']('isEnabled')['to'](_0x455c01),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x34d425,'isReadOnly',_0xe90ce2=>!_0xe90ce2);for(const _0x27cad8 of _0x473191){const _0x57123e=null===_0x27cad8['creator'];if(_0x57123e&&_0x27cad8['toVersion']===_0x27cad8['fromVersion'])continue;const _0x5c8e7b=_0x27cad8['toJSON']();_0x54ea79['addRevisionData'](_0x5c8e7b,(_0xe6ba22,_0x3bd45f,_0x384f1e)=>{if(_0x57123e){if(_0x1ea6dd)_0x1ea6dd['_update'](_0xe6ba22,_0x3bd45f);else{if(!_0x3bd45f){const _0x36ad3c=_0x384f1e['toJSON']();_0x36ad3c['id']=_0x551659(),_0x455c01['saveRevision'](_0x36ad3c,_0x384f1e['toVersion'])['then'](_0x37d686=>{_0x1ea6dd=_0x37d686;});}}}else _0x27cad8['_update'](_0xe6ba22,_0x3bd45f);});}}},Yt),_0x3c0e98);}['_enhanceShowRevisionViewerCallback'](){const _0x38f248=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xc55a35=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0xc55a35['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xd7e942=this['editor']['plugins']['get']('Dialog');_0xd7e942['isOpen']&&_0xd7e942['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x1a4e77=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x299db5 of _0x1a4e77)_0x299db5['class']=_0x299db5['class']?_0x299db5['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x5e5c15=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5e5c15&&_0x5e5c15['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x28eeee=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x28eeee&&_0x28eeee['setAttribute']('tabindex','-1');}}return _0x38f248(this['_getRevisionViewerEditorConfig']())['then'](_0x4b7544=>(this['_viewerEditor']=_0x4b7544,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'),_0x4b7544))['catch'](_0x35b9dd=>(console['error'](_0x35b9dd),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x6091a2=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x1258a0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x195e06 of _0x1258a0)_0x195e06['class']='ck-tab-panel_disabled'===_0x195e06['class']?'':_0x195e06['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x1a66a3=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1a66a3&&_0x1a66a3['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3eb97d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3eb97d&&_0x3eb97d['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x6091a2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x19fe4a=this['editor']['plugins']['get']('Annotations');_0x19fe4a['refreshVisibility'](),_0x19fe4a['refreshPositioning']();}});});}['_showRevisionViewer'](_0xf0d1ba){const _0x4fcaa5=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x238e30=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x67c44b=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x67c44b,_0xf0d1ba)['then'](_0x3eb92a=>(_0x238e30['style']['display']='block',_0x4fcaa5['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3eb92a));}['_closeRevisionViewer'](_0x3232c5){const _0x5e882b=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5e882b['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3232c5['destroy']();}async['_restoreRevision'](_0x33f6b9){const _0x558910=this['editor'],_0x1669e6=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x352e66=_0x558910['plugins']['get']('RevisionTracker'),_0x53d9b7=_0x558910['plugins']['get']('RevisionHistoryUtils'),_0x6f8bd0=_0x1669e6['repository']['getRevision'](_0x33f6b9);let _0x5734c6,_0x1e523e,_0x5b8e2d;try{await _0x53d9b7['loadRevisionData'](_0x6f8bd0,this['adapter']),_0x5734c6=_0x53d9b7['getRevisionDocumentData'](_0x6f8bd0),_0x1e523e=_0x53d9b7['getRevisionRootsAttributes'](_0x6f8bd0);}catch(_0x23a62e){return void console['error'](_0x23a62e);}_0x558910['model']['change'](_0x4c4cc2=>{for(const _0x292a0d of Array['from'](_0x558910['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4c4cc2['removeMarker'](_0x292a0d);}),_0x1669e6['isReady']=!0x1,_0x558910['model']['enqueueChange'](_0x2b959c=>{_0x2b959c['setSelection'](null),_0x2b959c['removeSelectionAttribute'](_0x558910['model']['document']['selection']['getAttributeKeys']());const _0x4c7929=Object['keys'](_0x5734c6);for(const _0x4da712 of _0x558910['model']['document']['roots'])'$graveyard'!=_0x4da712['rootName']&&_0x4da712['isAttached']()&&!_0x4c7929['includes'](_0x4da712['rootName'])&&_0x2b959c['detachRoot'](_0x4da712);for(const _0x2ee419 of _0x4c7929){let _0x53b02a=_0x558910['model']['document']['getRoot'](_0x2ee419);if(!_0x53b02a||!_0x53b02a['isAttached']()){const _0x3ec1d8=_0x6f8bd0['diffData']?.[_0x2ee419]?.['rootElementName']||'$root';_0x53b02a=_0x2b959c['addRoot'](_0x2ee419,_0x3ec1d8);}const _0x17f75f=_0x1e523e[_0x2ee419],_0x2b82f7=Object['keys'](_0x17f75f),_0xcc9190=_0x5734c6[_0x2ee419];for(const _0x143452 of _0x53b02a['getAttributeKeys']())_0x2b82f7['includes'](_0x143452)||_0x2b959c['removeAttribute'](_0x143452,_0x53b02a);for(const _0xe8bd62 of _0x2b82f7)_0x2b959c['setAttribute'](_0xe8bd62,_0x1e523e[_0x2ee419][_0xe8bd62],_0x53b02a);_0x2b959c['remove'](_0x2b959c['createRangeIn'](_0x53b02a)),_0x2b959c['insert'](_0x558910['data']['parse'](_0xcc9190,_0x53b02a),_0x53b02a,0x0);}});const _0x3fe7cc=pt(_0x558910['locale'],'Restored');if(_0x6f8bd0['name'])_0x5b8e2d=-0x1==_0x6f8bd0['name']['indexOf'](_0x3fe7cc)?_0x3fe7cc+':\x20'+_0x6f8bd0['name']:_0x6f8bd0['name'];else _0x5b8e2d=_0x3fe7cc+':\x20'+(_0x6f8bd0['createdAt']['toLocaleDateString'](_0x558910['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x6f8bd0['createdAt']['toLocaleTimeString'](_0x558910['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x352e66['saveRevision']({'name':_0x5b8e2d}),_0x1669e6['isReady']=!0x0,_0x558910['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
29
+ Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt];}constructor(_0x48f707){super(_0x48f707),this['_revisionViewer']=_0x48f707['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2bd80e=this['_revisionsRepository']['_revisions'],_0x137df6=this['_createRevisionActions'](),_0x269e0b=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x2bd80e,_0x137df6,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',(_0x2b90f3,_0x337661)=>{_0x337661['revisionViews']['on']('add',(_0x46ede3,_0x429c3f)=>{_0x429c3f['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)),_0x269e0b['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x51baf0=this['_revisionsRepository']['getRevision'](0x0);if(_0x51baf0){const _0xce3938=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x51baf0['id']);this['_revisionViewer']['compare'](_0x51baf0,_0xce3938);}}['_handleRevisionSelected'](_0x56f614,_0x1a3a1c){const _0x5975ec=this['_revisionsRepository']['getRevision'](_0x1a3a1c['id']),_0x33efe1=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5975ec['id']);this['_revisionViewer']['compare'](_0x5975ec,_0x33efe1);}['_handleRevisionSetName'](_0x7c78f4,_0x32943e){this['_revisionsRepository']['getRevision'](_0x32943e['id'])['setName'](_0x32943e['name']);}['_handleDiffChange'](_0x2dea53,_0x3b5eda,_0x3fef6){const _0x36e8ee=this['_revisionsRepository']['getRevisionsInDiff'](_0x3fef6);_0x36e8ee['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x36e8ee),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x36e8ee[0x0]));}['_createRevisionActions'](){const _0xf2224d=this['editor'],_0x39c6f4=RevisionsSidebar['availableRevisionActions'],_0x153eb4=_0xf2224d['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x153eb4['length'])return _0x153eb4['map'](_0x305bf9=>{const _0x32c9bf='string'==typeof _0x305bf9?Object['assign']({},_0x39c6f4[_0x305bf9]):_0x305bf9;return _0x32c9bf['action']=_0x32c9bf['action']['bind'](this,_0xf2224d),_0x32c9bf['isVisible']&&(_0x32c9bf['isVisible']=_0x32c9bf['isVisible']['bind'](this,_0xf2224d)),_0x32c9bf;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4086ed},_0x44d0d1)=>{const _0x32fe1a=_0x4086ed['get'](Mt),_0x18be72=_0x32fe1a['repository'];let _0x55c384=_0x32fe1a['diff']['newRevisionId'],_0x3a130c=_0x44d0d1['id'];_0x18be72['getIndex'](_0x55c384)>_0x18be72['getIndex'](_0x3a130c)&&([_0x55c384,_0x3a130c]=[_0x3a130c,_0x55c384]),_0x32fe1a['compare'](_0x55c384,_0x3a130c);},'isVisible':({plugins:_0x5a23ab},_0x5e814a)=>{const _0x201fb4=_0x5a23ab['get'](Mt);return!(_0x201fb4['repository']['getRevisionsInDiff'](_0x201fb4['diff'])['length']>0x2)&&!_0x5e814a['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x69349a,{id:_0x315a8c})=>{_0x69349a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x315a8c);},'isVisible':({plugins:_0x2ea78d},_0x554981)=>!!_0x2ea78d['get'](Mt)['repository']['getLaterVisibleRevision'](_0x554981['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x563110},{id:_0x5117b5,revisionNameView:_0x269a9c})=>{const _0x3f5c71=_0x563110['get'](Mt),_0x123e64=_0x3f5c71['repository']['getEarlierVisibleRevision'](_0x5117b5);_0x3f5c71['compare'](_0x5117b5,_0x123e64),_0x269a9c['focus'](),_0x269a9c['fieldView']['select']();}}};}var Qt=class extends _0x5ad29c{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x11d6e6,_0x1c10d6){super(_0x11d6e6),this['_view']=_0x1c10d6,this['_toolbarConfig']=ut(_0x11d6e6['config']['get']('toolbar')),this['_elementReplacer']=new _0x3440e3();}get['element'](){return this['view']['element'];}['init'](_0x5dea42){const _0x5a9d9a=this['editor'],_0x13c592=this['view'],_0xeeb7e8=_0x5a9d9a['editing']['view'],_0x3f645c=_0x13c592['editable'];_0x3f645c['name']=_0xeeb7e8['document']['getRoot']()['rootName'],_0x13c592['render']();const _0x3e9e71=_0x3f645c['element'];this['setEditableElement'](_0x3f645c['name'],_0x3e9e71),_0x13c592['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xeeb7e8['attachDomRoot'](_0x3e9e71),this['_elementReplacer']['replace'](_0x5dea42,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x900272=this['view'],_0x5b46f9=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5b46f9['detachDomRoot'](_0x900272['editable']['name']),_0x900272['destroy']();}['_initToolbar'](){const _0x83c1c1=this['view'];_0x83c1c1['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x83c1c1['stickyPanel']['limiterElement']=_0x83c1c1['element'],_0x83c1c1['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xfd81b})=>_0xfd81b),_0x83c1c1['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x83c1c1['toolbar']);}},zt=class extends _0x3b7457{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x41a31f,_0x5251fe,_0x3181c3={}){super(_0x41a31f),this['stickyPanel']=new st(_0x41a31f),this['toolbar']=new ot(_0x41a31f,{'shouldGroupWhenFull':_0x3181c3['shouldToolbarGroupWhenFull']}),this['_editable']=new _0xe50b03(_0x41a31f,_0x5251fe);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
30
+ _0x15a34e(_0x36c4f1);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2820be,_0x43a6a7){super(_0x43a6a7),this['sourceElement']=_0x2820be,this['model']['document']['createRoot']();const _0x36f2b7=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x36f2b7);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x54b298,_0x8502da){const _0x1662fb=new this(_0x54b298,_0x8502da);return await _0x1662fb['initPlugins'](),await _0x1662fb['ui']['init'](_0x54b298),await _0x1662fb['data']['init'](_0x1662fb['config']['get']('initialData')||''),_0x1662fb['fire']('ready'),_0x1662fb;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x73140e{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x25cb56){super(_0x25cb56),this['result']='end',_0x25cb56['editing']['view']['_overlayModeHint']='auto',_0x25cb56['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x73140e{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x4d1562){if(super(_0x4d1562),!this['editor']['config']['get']('revisionHistory'))throw new _0x135cf0('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4c8bb=>this['_showRevisionViewer']({..._0x4c8bb,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x102af9=>this['_closeRevisionViewer'](_0x102af9)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x43c1dd=>this['_restoreRevision'](_0x43c1dd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x394c3a){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x394c3a;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3ee8cb){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3ee8cb);}['getRevision'](_0x257c69){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x257c69);}['getRevisions'](_0x14f4b9){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x14f4b9||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x1acb8c=this['editor'],_0x90f88c=_0x583072(_0x1acb8c,ii),_0x44ee06=_0x1acb8c['plugins']['get']('RevisionTracker'),_0x440412=_0x1acb8c['plugins']['get'](_0x1a8e81)['users'];return _0x90f88c['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x90f88c['lazyRoots'],(_0x90f88c['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x73140e{static get['requires'](){return[Mt,_0x1a8e81];}['init'](){const _0x463559=this['editor']['plugins']['get'](_0x1a8e81);for(const _0x372ef6 of _0x440412)_0x372ef6['isAnonymous']||_0x463559['getUser'](_0x372ef6['id'])||_0x463559['addUser'](_0x372ef6);const _0x14d39a=_0x44ee06['repository']['getRevisions']();let _0x34f745=null;const _0x1bdac2=this['editor']['plugins']['get']('RevisionViewer');_0x1bdac2['adapter']=_0x44ee06['adapter'],_0x1bdac2['bind']('isEnabled')['to'](_0x44ee06),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x1acb8c,'isReadOnly',_0x39db0c=>!_0x39db0c);for(const _0x3b9cec of _0x14d39a){const _0xe41309=null===_0x3b9cec['creator'];if(_0xe41309&&_0x3b9cec['toVersion']===_0x3b9cec['fromVersion'])continue;const _0x30e871=_0x3b9cec['toJSON']();_0x1bdac2['addRevisionData'](_0x30e871,(_0x3b5871,_0x479f51,_0x5babac)=>{if(_0xe41309){if(_0x34f745)_0x34f745['_update'](_0x3b5871,_0x479f51);else{if(!_0x479f51){const _0x365ea4=_0x5babac['toJSON']();_0x365ea4['id']=_0x3001b8(),_0x44ee06['saveRevision'](_0x365ea4,_0x5babac['toVersion'])['then'](_0xadd02c=>{_0x34f745=_0xadd02c;});}}}else _0x3b9cec['_update'](_0x3b5871,_0x479f51);});}}},Yt),_0x90f88c);}['_enhanceShowRevisionViewerCallback'](){const _0x44b636=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xec16a3=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0xec16a3['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5debfd=this['editor']['plugins']['get']('Dialog');_0x5debfd['isOpen']&&_0x5debfd['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xceb9a7=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x238740 of _0xceb9a7)_0x238740['class']=_0x238740['class']?_0x238740['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x4b9188=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4b9188&&_0x4b9188['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4fdcd2=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4fdcd2&&_0x4fdcd2['setAttribute']('tabindex','-1');}}return _0x44b636(this['_getRevisionViewerEditorConfig']())['then'](_0x2922c3=>(this['_viewerEditor']=_0x2922c3,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'),_0x2922c3))['catch'](_0x5de884=>(console['error'](_0x5de884),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x31a3f2=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x46ce15=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1e93f7 of _0x46ce15)_0x1e93f7['class']='ck-tab-panel_disabled'===_0x1e93f7['class']?'':_0x1e93f7['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x236acf=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x236acf&&_0x236acf['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x439873=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x439873&&_0x439873['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x31a3f2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3be399=this['editor']['plugins']['get']('Annotations');_0x3be399['refreshVisibility'](),_0x3be399['refreshPositioning']();}});});}['_showRevisionViewer'](_0x22ce69){const _0x2df671=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x109bdf=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xf01906=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0xf01906,_0x22ce69)['then'](_0xcc64d0=>(_0x109bdf['style']['display']='block',_0x2df671['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0xcc64d0));}['_closeRevisionViewer'](_0x36c5ef){const _0x312964=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x312964['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x36c5ef['destroy']();}async['_restoreRevision'](_0x4a0d4f){const _0x575e73=this['editor'],_0x33b5ed=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x45ef76=_0x575e73['plugins']['get']('RevisionTracker'),_0x4c47ac=_0x575e73['plugins']['get']('RevisionHistoryUtils'),_0x28fe94=_0x33b5ed['repository']['getRevision'](_0x4a0d4f);let _0x3bc6f4,_0x543f91,_0x559f41;try{await _0x4c47ac['loadRevisionData'](_0x28fe94,this['adapter']),_0x3bc6f4=_0x4c47ac['getRevisionDocumentData'](_0x28fe94),_0x543f91=_0x4c47ac['getRevisionRootsAttributes'](_0x28fe94);}catch(_0xd08db5){return void console['error'](_0xd08db5);}_0x575e73['model']['change'](_0x2820d5=>{for(const _0x58540a of Array['from'](_0x575e73['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2820d5['removeMarker'](_0x58540a);}),_0x33b5ed['isReady']=!0x1,_0x575e73['model']['enqueueChange'](_0x325a1d=>{_0x325a1d['setSelection'](null),_0x325a1d['removeSelectionAttribute'](_0x575e73['model']['document']['selection']['getAttributeKeys']());const _0x5aa200=Object['keys'](_0x3bc6f4);for(const _0x18cee8 of _0x575e73['model']['document']['roots'])'$graveyard'!=_0x18cee8['rootName']&&_0x18cee8['isAttached']()&&!_0x5aa200['includes'](_0x18cee8['rootName'])&&_0x325a1d['detachRoot'](_0x18cee8);for(const _0x3ab1f3 of _0x5aa200){let _0x569270=_0x575e73['model']['document']['getRoot'](_0x3ab1f3);if(!_0x569270||!_0x569270['isAttached']()){const _0xc657de=_0x28fe94['diffData']?.[_0x3ab1f3]?.['rootElementName']||'$root';_0x569270=_0x325a1d['addRoot'](_0x3ab1f3,_0xc657de);}const _0x1ca3c4=_0x543f91[_0x3ab1f3],_0x5094b7=Object['keys'](_0x1ca3c4),_0x26bfab=_0x3bc6f4[_0x3ab1f3];for(const _0x582292 of _0x569270['getAttributeKeys']())_0x5094b7['includes'](_0x582292)||_0x325a1d['removeAttribute'](_0x582292,_0x569270);for(const _0x1d079a of _0x5094b7)_0x325a1d['setAttribute'](_0x1d079a,_0x543f91[_0x3ab1f3][_0x1d079a],_0x569270);_0x325a1d['remove'](_0x325a1d['createRangeIn'](_0x569270)),_0x325a1d['insert'](_0x575e73['data']['parse'](_0x26bfab,_0x569270),_0x569270,0x0);}});const _0x51a291=pt(_0x575e73['locale'],'Restored');if(_0x28fe94['name'])_0x559f41=-0x1==_0x28fe94['name']['indexOf'](_0x51a291)?_0x51a291+':\x20'+_0x28fe94['name']:_0x28fe94['name'];else _0x559f41=_0x51a291+':\x20'+(_0x28fe94['createdAt']['toLocaleDateString'](_0x575e73['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x28fe94['createdAt']['toLocaleTimeString'](_0x575e73['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x45ef76['saveRevision']({'name':_0x559f41}),_0x33b5ed['isReady']=!0x0,_0x575e73['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};