@ckeditor/ckeditor5-revision-history 48.2.0-alpha.7 → 48.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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{ObservableMixin as _0xf684e0,uid as _0x51ceb2,Collection as _0x3625c9,logWarning as _0x1b67c3,FocusTracker as _0x28ca2c,KeystrokeHandler as _0x2f638f,scrollViewportToShowTarget as _0x4fee1d,ResizeObserver as _0x39f055,ElementReplacer as _0x4acda2,CKEditorError as _0x423177}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x8c5550,set as _0x49f456,unset as _0x1ca3fa,isEqual as _0x5af7ec}from'es-toolkit/compat';import{Plugin as _0x538071,PendingActions as _0x3985ee,Command as _0x3dad1f,ElementApiMixin as _0x26f772,Editor as _0x278490}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x2baa1d,getMarkerDomElement as _0x205b94,ConfirmMixin as _0x1f967d,sanitizeEditorConfig as _0x21c68e}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x20af03,ViewAttributeElement as _0x4babb5,ViewEmptyElement as _0x4ed8f7,ViewRawElement as _0x4e0b8b,ViewUIElement as _0x103961,ViewDocumentFragment as _0x862c9,ViewText as _0x460563,ViewElement as _0x2c71cb,ModelElement as _0x46d26f,ModelRange as _0xa8802c,ModelPosition as _0x10f6fa,ModelDocumentFragment as _0x59fcbe,ModelText as _0x3b5bf9}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5ea9e8,IconChevronUp as _0x37d115,IconChevronDown as _0x27b0d7,IconUndo as _0x2c0af7,IconUser as _0x185391,IconThreeVerticalDots as _0x5379e9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x151f05,View as _0xafec90,submitHandler as _0x33eb0a,LabeledFieldView as _0x17e56b,createLabeledInputText as _0x238b41,createDropdown as _0x182132,ListView as _0x44c12a,ListItemView as _0x4582a8,ButtonView as _0x135801,MenuBarMenuView as _0x48deab,MenuBarMenuListView as _0x41b7d1,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
24
- _0xf684e0(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0xbcc8a2){super(),this['id']=_0xbcc8a2['id']||_0x51ceb2(),this['creator']=_0xbcc8a2['creator']||null,this['authors']=_0xbcc8a2['authors']||[],this['diffData']=_0xbcc8a2['diffData']||null,this['toVersion']=_0xbcc8a2['toVersion']||0x0,this['fromVersion']=_0xbcc8a2['fromVersion']||0x0,this['set']('name',_0xbcc8a2['name']||''),this['set']('createdAt',_0xbcc8a2['createdAt']||new Date()),this['set']('attributes',_0xbcc8a2['attributes']||{});}['setName'](_0x150791){this['_update']({'name':_0x150791});}['setAttribute'](_0x56add3,_0x2547a0){const _0xc5668c=_0x8c5550(this['attributes']);_0x49f456(_0xc5668c,_0x56add3,_0x2547a0),this['_update']({'attributes':_0xc5668c});}['removeAttribute'](_0xe43243){const _0x4e080b=_0x8c5550(this['attributes']);_0x1ca3fa(_0x4e080b,_0xe43243),this['_update']({'attributes':_0x4e080b});}['_update'](_0x32e4e1,_0x2f35a3=!0x1){let _0x3aa059=!0x1;const _0x1da0e1={'id':this['id']},_0x196ba5=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x3e1c76 of _0x196ba5){const _0x39fd51=_0x32e4e1[_0x3e1c76];void 0x0!==_0x39fd51&&_0x39fd51!==this[_0x3e1c76]&&(this[_0x3e1c76]=_0x39fd51,_0x1da0e1[_0x3e1c76]=_0x39fd51,_0x3aa059=!0x0);}_0x3aa059&&(_0x1da0e1['authors']&&(_0x1da0e1['authorsIds']=_0x1da0e1['authors']['map'](_0x583edd=>_0x583edd['id']),delete _0x1da0e1['authors']),this['fire']('_update',_0x1da0e1,_0x2f35a3));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x141b53=>_0x141b53['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x538071{['_revisions'];static get['requires'](){return[_0x2baa1d];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2699be){super(_0x2699be),this['_revisions']=new _0x3625c9();}['afterInit'](){!async function(_0x3bb343){const _0x24b7ef=_0x498e7a([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x386ccc=0xeb829,_0x271916=0x359e09b0,_0x56ab77=0x35998260^_0x271916,_0x469276=window[_0x498e7a([0x44,0x61,0x74,0x65])][_0x498e7a([0x6e,0x6f,0x77])](),_0x22c383=_0x3bb343[_0x498e7a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1dc45d=new window[(_0x498e7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ca87b=>{_0x22c383[_0x498e7a([0x6f,0x6e,0x63,0x65])](_0x498e7a([0x72,0x65,0x61,0x64,0x79]),_0x5ca87b);}),_0x2207e8={[_0x498e7a([0x6b,0x74,0x79])]:_0x498e7a([0x45,0x43]),[_0x498e7a([0x75,0x73,0x65])]:_0x498e7a([0x73,0x69,0x67]),[_0x498e7a([0x63,0x72,0x76])]:_0x498e7a([0x50,0x2d,0x32,0x35,0x36]),[_0x498e7a([0x78])]:_0x498e7a([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x498e7a([0x79])]:_0x498e7a([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x498e7a([0x61,0x6c,0x67])]:_0x498e7a([0x45,0x53,0x32,0x35,0x36])},_0x2d9ff2=_0x22c383[_0x498e7a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x498e7a([0x67,0x65,0x74])](_0x498e7a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x28fbe8(){let _0x50f855,_0x5c6019=null,_0x3aaf94=null;try{if(_0x2d9ff2==_0x498e7a([0x47,0x50,0x4c]))return _0x498e7a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x50f855=_0x25327a(),!_0x50f855)return _0x498e7a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x50f855[_0x498e7a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3aaf94=_0x42fd34(_0x50f855[_0x498e7a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x50f855[_0x498e7a([0x6a,0x74,0x69])])),await _0x381c2f()?_0x144643()?_0x11b6ce()?_0x498e7a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x10bf9b()?(_0x50f855[_0x498e7a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x498e7a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5c6019=_0x4ab8b8(_0x498e7a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x52fbb8()):_0x498e7a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x498e7a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x498e7a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x498e7a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x11b6ce(){const _0x3b6d21=[_0x498e7a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x498e7a([0x74,0x72,0x69,0x61,0x6c])][_0x498e7a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x50f855[_0x498e7a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x469276/0x3e8:0xe10*_0x56ab77;return _0x50f855[_0x498e7a([0x65,0x78,0x70])]<_0x3b6d21;}function _0x144643(){const _0x445867=_0x50f855[_0x498e7a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x445867)return!0x1;if(_0x445867[_0x498e7a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x498e7a([0x2a])))return!0x0;if(_0x445867[_0x498e7a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x498e7a([0x52,0x48])))return!0x0;if(_0x445867[_0x498e7a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x498e7a([0x52,0x52,0x48]))){if(_0x298ef9())return!0x0;if(_0x597463()||_0x5a5a99())return!0x0;}return!0x1;}function _0x10bf9b(){const _0x3f5bd4=_0x50f855[_0x498e7a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3f5bd4||0x0==_0x3f5bd4[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1c290c}=new URL(window[_0x498e7a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3f5bd4[_0x498e7a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c290c))return!0x0;const _0x3d836c=_0x1c290c[_0x498e7a([0x73,0x70,0x6c,0x69,0x74])](_0x498e7a([0x2e]));return _0x3f5bd4[_0x498e7a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23fc64=>_0x23fc64[_0x498e7a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x498e7a([0x2a])))[_0x498e7a([0x6d,0x61,0x70])](_0x3db965=>_0x3db965[_0x498e7a([0x73,0x70,0x6c,0x69,0x74])](_0x498e7a([0x2e])))[_0x498e7a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x465372=>_0x465372[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3d836c[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x498e7a([0x6d,0x61,0x70])](_0xfaa118=>Array(_0x3d836c[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xfaa118[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x498e7a([0x66,0x69,0x6c,0x6c])](_0xfaa118[0x0]===_0x498e7a([0x2a])?_0x498e7a([0x2a]):'')[_0x498e7a([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xfaa118))[_0x498e7a([0x73,0x6f,0x6d,0x65])](_0x2fbc2d=>_0x3d836c[_0x498e7a([0x65,0x76,0x65,0x72,0x79])]((_0x281b5c,_0x353512)=>_0x2fbc2d[_0x353512]===_0x281b5c||_0x2fbc2d[_0x353512]===_0x498e7a([0x2a])));}function _0x52fbb8(){return _0x5c6019&&_0x3aaf94?new window[(_0x498e7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2c8092,_0x2c4e83)=>{_0x5c6019[_0x498e7a([0x74,0x68,0x65,0x6e])](_0x2c8092,_0x2c4e83),_0x3aaf94[_0x498e7a([0x74,0x68,0x65,0x6e])](_0x54a092=>{_0x54a092!=_0x498e7a([0x56,0x61,0x6c,0x69,0x64])&&_0x2c8092(_0x54a092);},_0x2c4e83);}):_0x5c6019||_0x3aaf94||_0x498e7a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x42fd34(_0x3b4a9a,_0x1b455b){return new window[(_0x498e7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x408fcb=>{if(_0x455e26())return _0x408fcb(_0x498e7a([0x56,0x61,0x6c,0x69,0x64]));_0x349ac3(),_0x22c383[_0x498e7a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x498e7a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4444fd=!0x1;const _0x17b2e1=_0x51ceb2();function _0xf67011(_0x56bcaf){return!!_0x56bcaf&&(typeof _0x56bcaf===_0x498e7a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x56bcaf===_0x498e7a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x56bcaf[_0x498e7a([0x74,0x68,0x65,0x6e])]===_0x498e7a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x56bcaf[_0x498e7a([0x63,0x61,0x74,0x63,0x68])]===_0x498e7a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1f25df(_0xd10a06){_0x49d510(_0xd10a06)[_0x498e7a([0x74,0x68,0x65,0x6e])](_0x1c1eab=>{if(!_0x1c1eab||_0x1c1eab[_0x498e7a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x498e7a([0x6f,0x6b]))return _0x498e7a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xa8a720(_0x2a726d(_0x17b2e1+_0x1b455b))!=_0x1c1eab[_0x498e7a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x498e7a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x498e7a([0x56,0x61,0x6c,0x69,0x64]);})[_0x498e7a([0x74,0x68,0x65,0x6e])](_0x1a5d91=>(_0x3d1e72(),_0x1a5d91),()=>{const _0x268a52=_0x509a51();return null==_0x268a52?(_0x3d1e72(),_0x498e7a([0x56,0x61,0x6c,0x69,0x64])):_0x498e7a(_0x469276-_0x268a52>(0x11928db0^_0x271916)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x498e7a([0x74,0x68,0x65,0x6e])](_0x408fcb)[_0x498e7a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x408fcb(_0x498e7a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4315b5=0x35a8e730^_0x271916;function _0x3d1e72(){const _0x2f7578=_0x498e7a([0x6c,0x6c,0x63,0x74,0x2d])+_0xa8a720(_0x2a726d(_0x3b4a9a)),_0x3d93a1=_0x2a1fd5(_0xa8a720(window[_0x498e7a([0x4d,0x61,0x74,0x68])][_0x498e7a([0x63,0x65,0x69,0x6c])](_0x469276/_0x4315b5)));window[_0x498e7a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x498e7a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f7578,_0x3d93a1);}function _0x509a51(){const _0x767272=_0x498e7a([0x6c,0x6c,0x63,0x74,0x2d])+_0xa8a720(_0x2a726d(_0x3b4a9a)),_0x3604b4=window[_0x498e7a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x498e7a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x767272);return _0x3604b4?window[_0x498e7a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a1fd5(_0x3604b4),0x10)*_0x4315b5:null;}function _0x49d510(_0x97052){return new window[(_0x498e7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x55f76a,_0x9feba4)=>{_0x97052[_0x498e7a([0x74,0x68,0x65,0x6e])](_0x55f76a,_0x9feba4),window[_0x498e7a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x9feba4,0x359fdd70^_0x271916);});}}_0x22c383[_0x498e7a([0x6f,0x6e])](_0x498e7a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4e4a82,_0x246c43)=>{if(_0x246c43[0x0]!=_0x3b4a9a)return _0x408fcb(_0x498e7a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x246c43[0x1]={..._0x246c43[0x1],[_0x498e7a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x17b2e1};},{[_0x498e7a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x498e7a([0x68,0x69,0x67,0x68])}),_0x22c383[_0x498e7a([0x6f,0x6e])](_0x498e7a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x309642=>{_0xf67011(_0x309642[_0x498e7a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4444fd=!0x0,_0x1f25df(_0x309642[_0x498e7a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x498e7a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x498e7a([0x6c,0x6f,0x77])}),_0x1dc45d[_0x498e7a([0x74,0x68,0x65,0x6e])](()=>{_0x4444fd||_0x408fcb(_0x498e7a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x455e26(){return _0x22c383[_0x498e7a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x498e7a([0x76,0x69,0x65,0x77])][_0x498e7a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x498e7a([0x61,0x75,0x74,0x6f]);}function _0x349ac3(){_0x22c383[_0x498e7a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x498e7a([0x76,0x69,0x65,0x77])][_0x498e7a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x498e7a([0x61,0x75,0x74,0x6f]);}}function _0x4ab8b8(_0x3ec652){const _0x327053=[new window[(_0x498e7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1bc0cb=>setTimeout(_0x1bc0cb,0x3597377c^_0x271916)),_0x1dc45d[_0x498e7a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x498e7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ef61f=>{const _0x49d176=0x359e09b7^_0x271916,_0x23492b=_0x3bb343[_0x498e7a([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x300ae6(){_0x23492b[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x49d176&&_0x2ef61f();}_0x300ae6(),_0x23492b[_0x498e7a([0x6f,0x6e])](_0x498e7a([0x61,0x64,0x64]),_0x300ae6);})),new window[(_0x498e7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d327f=>{function _0x4c9491(){for(const _0x3432cc in window)if(window[_0x498e7a([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x498e7a([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3432cc))&&window[_0x3432cc]==_0x386ccc)return _0x4d327f();_0x22c383[_0x498e7a([0x73,0x74,0x61,0x74,0x65])]!=_0x498e7a([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x498e7a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4c9491,0x359e1a38^_0x271916);}_0x3d3cf9(_0x498e7a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x4c9491();})];return window[_0x498e7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x498e7a([0x72,0x61,0x63,0x65])](_0x327053)[_0x498e7a([0x74,0x68,0x65,0x6e])](()=>_0x3ec652);}async function _0xea7be2(){if(await _0x1dc45d,_0x3d3cf9(_0x498e7a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x5e969f=_0x3bb343[_0x498e7a([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x25398c=_0x3bb343[_0x498e7a([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x5e969f[_0x498e7a([0x69,0x64])]),_0x19495b=_0x45cdde(_0x498e7a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x19495b[_0x498e7a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x5e969f['id'],_0x25398c?_0x25398c['id']:null,!0x0),_0x19495b[_0x498e7a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x498e7a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x19495b[_0x498e7a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x19495b[_0x498e7a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x516f48,void(_0x19495b[_0x498e7a([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x516f48);}if(_0x3d3cf9(_0x498e7a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4308be=_0x45cdde(_0x498e7a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4308be[_0x498e7a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x498e7a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4308be[_0x498e7a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4308be[_0x498e7a([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x516f48,_0x4308be[_0x498e7a([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x516f48;}_0x22c383[_0x498e7a([0x6d,0x6f,0x64,0x65,0x6c])][_0x498e7a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x516f48,_0x22c383[_0x498e7a([0x6d,0x6f,0x64,0x65,0x6c])][_0x498e7a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x516f48,_0x22c383[_0x498e7a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x498e7a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x298ef9(){return _0x3d3cf9(_0x498e7a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x45cdde(_0x498e7a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x498e7a([0x73,0x74,0x61,0x74,0x65])]==_0x498e7a([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x597463(){return _0x3d3cf9(_0x498e7a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x5a5a99(){return _0x3d3cf9(_0x498e7a([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3e6a63(_0x42b122){const _0x4246bb=_0x25e5aa();_0x22c383[_0x4246bb]=_0x498e7a([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x42b122,_0x42b122[_0x498e7a([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x498e7a([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x25e5aa()]=_0x386ccc),_0x42b122!=_0x498e7a([0x56,0x61,0x6c,0x69,0x64])&&_0xea7be2();}function _0x25e5aa(){const _0x4da422=window[_0x498e7a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x498e7a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x498e7a([0x6e,0x6f,0x77])]())[_0x498e7a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x498e7a([0x2e]),'');let _0x4ed06c=_0x498e7a([0x76]);for(let _0x5c6f64=0x0;_0x5c6f64<_0x4da422[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5c6f64+=0x2){let _0x94c79a=window[_0x498e7a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4da422[_0x498e7a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5c6f64,_0x5c6f64+0x2));_0x94c79a>=_0x24b7ef[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x94c79a-=_0x24b7ef[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4ed06c+=_0x24b7ef[_0x94c79a];}return _0x4ed06c;}function _0x25327a(){const _0x3356ce=_0x2d9ff2[_0x498e7a([0x73,0x70,0x6c,0x69,0x74])](_0x498e7a([0x2e]));if(0x3!=_0x3356ce[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5b583f(_0x3356ce[0x1]);function _0x5b583f(_0x572e73){const _0x408f68=_0x43a3a7(_0x572e73);return _0x408f68&&_0x4641ab()?_0x408f68:null;function _0x4641ab(){const _0x206313=_0x408f68[_0x498e7a([0x6a,0x74,0x69])],_0x30805e=window[_0x498e7a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x206313[_0x498e7a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x206313[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xdcd8c5={..._0x408f68,[_0x498e7a([0x6a,0x74,0x69])]:_0x206313[_0x498e7a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x206313[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xdcd8c5[_0x498e7a([0x76,0x63])],_0x2a726d(_0xdcd8c5)==_0x30805e;}}}async function _0x381c2f(){let _0x3f4276=!0x0;try{const _0x3d890e=_0x2d9ff2[_0x498e7a([0x73,0x70,0x6c,0x69,0x74])](_0x498e7a([0x2e])),[_0x1618fe,_0x158d8f,_0x5b1bb3]=_0x3d890e;return _0x2f71a6(_0x1618fe),await _0x24dedc(_0x1618fe,_0x158d8f,_0x5b1bb3),_0x3f4276;}catch{return!0x1;}function _0x2f71a6(_0x3dfe4b){const _0x4bd4d5=_0x43a3a7(_0x3dfe4b);_0x4bd4d5&&_0x4bd4d5[_0x498e7a([0x61,0x6c,0x67])]==_0x498e7a([0x45,0x53,0x32,0x35,0x36])||(_0x3f4276=!0x1);}async function _0x24dedc(_0x387599,_0x3d80b8,_0x42102f){const _0xf2d3c8=window[_0x498e7a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x498e7a([0x66,0x72,0x6f,0x6d])](_0x297178(_0x42102f),_0x4c2cb3=>_0x4c2cb3[_0x498e7a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1293ac=new window[(_0x498e7a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x498e7a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x387599+_0x498e7a([0x2e])+_0x3d80b8),_0x15dbb8=window[_0x498e7a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x498e7a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x15dbb8)return;const _0x150a72=await _0x15dbb8[_0x498e7a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x498e7a([0x6a,0x77,0x6b]),_0x2207e8,{[_0x498e7a([0x6e,0x61,0x6d,0x65])]:_0x498e7a([0x45,0x43,0x44,0x53,0x41]),[_0x498e7a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x498e7a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x498e7a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x15dbb8[_0x498e7a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x498e7a([0x6e,0x61,0x6d,0x65])]:_0x498e7a([0x45,0x43,0x44,0x53,0x41]),[_0x498e7a([0x68,0x61,0x73,0x68])]:{[_0x498e7a([0x6e,0x61,0x6d,0x65])]:_0x498e7a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x150a72,_0xf2d3c8,_0x1293ac)||(_0x3f4276=!0x1);}}function _0x43a3a7(_0x3f5026){return _0x3f5026[_0x498e7a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x498e7a([0x65,0x79]))?JSON[_0x498e7a([0x70,0x61,0x72,0x73,0x65])](_0x297178(_0x3f5026)):null;}function _0x297178(_0x97576f){return window[_0x498e7a([0x61,0x74,0x6f,0x62])](_0x97576f[_0x498e7a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x498e7a([0x2b]))[_0x498e7a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x498e7a([0x2f])));}function _0x2a726d(_0x1ba69b){let _0x5a6c57=0x1505;function _0x427c53(_0x3bb3df){for(let _0x53f346=0x0;_0x53f346<_0x3bb3df[_0x498e7a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x53f346++){const _0x2185e9=_0x3bb3df[_0x498e7a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x53f346);_0x5a6c57=(_0x5a6c57<<0x5)+_0x5a6c57+_0x2185e9,_0x5a6c57&=_0x5a6c57;}}function _0x378de7(_0x57f8a9){Array[_0x498e7a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x57f8a9)?_0x57f8a9[_0x498e7a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x378de7):_0x57f8a9&&typeof _0x57f8a9==_0x498e7a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x498e7a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x57f8a9)[_0x498e7a([0x73,0x6f,0x72,0x74])]()[_0x498e7a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4a986a,_0x3b15a4])=>{_0x427c53(_0x4a986a),_0x378de7(_0x3b15a4);}):_0x427c53(window[_0x498e7a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x57f8a9));}return _0x378de7(_0x1ba69b),_0x5a6c57>>>0x0;}function _0xa8a720(_0x2eb342){return _0x2eb342[_0x498e7a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x498e7a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x498e7a([0x30]));}function _0x2a1fd5(_0x3712d3){return _0x3712d3[_0x498e7a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x498e7a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x498e7a([0x6a,0x6f,0x69,0x6e])]('');}function _0x3d3cf9(_0x1984df){return _0x22c383[_0x498e7a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x498e7a([0x68,0x61,0x73])](_0x1984df);}function _0x45cdde(_0x22d666){return _0x22c383[_0x498e7a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x498e7a([0x67,0x65,0x74])](_0x22d666);}function _0x516f48(){}function _0x498e7a(_0x229300){return _0x229300['map'](_0xf2c0cb=>String['fromCharCode'](_0xf2c0cb))['join']('');}_0x3e6a63(await _0x28fbe8());}(this);}['createRevision'](_0xad21c6){const _0x19b9b2=this['editor']['plugins']['get']('Users');return new Revision({'id':_0xad21c6['id'],'name':_0xad21c6['name'],'creator':_0xad21c6['creatorId']?_0x19b9b2['getUser'](_0xad21c6['creatorId']):null,'diffData':_0xad21c6['diffData']||_0xad21c6['data'],'authors':_0xad21c6['authorsIds']['map'](_0x290311=>_0x19b9b2['getUser'](_0x290311)),'createdAt':new Date(_0xad21c6['createdAt']),'attributes':_0xad21c6['attributes'],'fromVersion':_0xad21c6['fromVersion'],'toVersion':_0xad21c6['toVersion']});}['addRevision'](_0x5006e4,_0x2d4031=0x0){this['_revisions']['add'](_0x5006e4,_0x2d4031);}['getRevision'](_0xfef6e2){return this['_revisions']['get'](_0xfef6e2);}['getRevisions'](_0x5eac0b={'toJSON':!0x1}){const _0x5734b4=Array['from'](this['_revisions']);return _0x5734b4['reverse'](),_0x5eac0b['toJSON']?_0x5734b4['map'](_0x18b5e7=>_0x18b5e7['toJSON']()):_0x5734b4;}['getIndex'](_0x14352f){return this['_revisions']['getIndex'](_0x14352f);}['getEarlierVisibleRevision'](_0x33ed78){const [,_0x5c2b]=this['getRevisionsIterator'](_0x33ed78,{'direction':'earlier'});return _0x5c2b;}['getLaterVisibleRevision'](_0x456a10){const [,_0x563eed]=this['getRevisionsIterator'](_0x456a10,{'direction':'later'});return _0x563eed;}['getRevisionsInDiff'](_0x467eaf){const _0x1a6098=[];for(const _0x1112ab of this['getRevisionsIterator'](_0x467eaf['newRevisionId']))if(_0x1a6098['push'](_0x1112ab),_0x1112ab['id']===_0x467eaf['oldRevisionId'])break;return _0x1a6098;}*['getRevisionsIterator'](_0x2f8983,{direction:_0x338a9f='earlier',filter:_0x2369f2=()=>!0x0}={}){const _0x3172ed='earlier'===_0x338a9f?0x1:-0x1;let _0x842a40=this['_revisions']['get'](_0x2f8983),_0x58e3c6=this['getIndex'](_0x842a40);for(yield _0x842a40;_0x842a40;){if(_0x58e3c6+=_0x3172ed,_0x842a40=this['getRevision'](_0x58e3c6),!_0x842a40)return;_0x2369f2(_0x842a40)&&(yield _0x842a40);}}}class RevisionHistoryUtils extends _0x538071{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x20af03,'c'],[_0x4babb5,'a'],[_0x4ed8f7,'e'],[_0x4e0b8b,'r'],[_0x103961,'u']]);['_typeCharToViewClass']=new Map([['c',_0x20af03],['a',_0x4babb5],['e',_0x4ed8f7],['r',_0x4e0b8b],['u',_0x103961]]);async['loadRevisionData'](_0x55c3e4,_0x4e0463){if(_0x55c3e4['diffData']||!_0x4e0463)return;const _0x2fd230=this['editor']['config']['get']('collaboration.channelId'),_0x152e2b=await _0x4e0463['getRevision']({'channelId':_0x2fd230,'revisionId':_0x55c3e4['id']});_0x55c3e4['diffData']=_0x152e2b['diffData'];}['getRevisionDocumentData'](_0x50a1f8){const _0x57ea1a={};for(const _0x3f01c0 in _0x50a1f8['diffData']){if(_0x50a1f8['diffData'][_0x3f01c0]['attachChange']&&!_0x50a1f8['diffData'][_0x3f01c0]['attachChange']['isAttached'])continue;const _0x2999e0=this['_removeRevisionMarkers'](JSON['parse'](_0x50a1f8['diffData'][_0x3f01c0]['insertions'])),_0x3de638=this['editor']['editing']['view']['document'],_0x175dd8=new _0x862c9(_0x3de638,_0x2999e0['map'](_0x37287f=>this['_getViewFromDiffObj'](_0x37287f,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x57ea1a[_0x3f01c0]=this['editor']['data']['processor']['toData'](_0x175dd8),this['editor']['data']['processor']['useFillerType']('default');}return _0x57ea1a;}['getRevisionRootsAttributes'](_0x44dd12){const _0x5f3947={};for(const _0x5dfbea in _0x44dd12['diffData'])_0x44dd12['diffData'][_0x5dfbea]['attachChange']&&!_0x44dd12['diffData'][_0x5dfbea]['attachChange']['isAttached']||(_0x5f3947[_0x5dfbea]=_0x44dd12['diffData'][_0x5dfbea]['attributesAfter']||{});return _0x5f3947;}['getRevisionRootsModelElements'](_0x4846cf){const _0x4470d3={};for(const _0x1c80d6 in _0x4846cf['diffData']){if(_0x4846cf['diffData'][_0x1c80d6]['attachChange']&&!_0x4846cf['diffData'][_0x1c80d6]['attachChange']['isAttached'])continue;const _0x3b78c7=_0x4846cf['diffData'][_0x1c80d6]['rootElementName'];_0x3b78c7&&(_0x4470d3[_0x1c80d6]=_0x3b78c7);}return _0x4470d3;}['_getTypeCharForViewElement'](_0x6d4805){return this['_viewClassToTypeChar']['get'](_0x6d4805['constructor']);}['_getViewFromDiffObj'](_0x4c3c4e,_0x5b7304){const _0x1f8ab5=this['editor']['editing']['view']['document'];if('string'==typeof _0x4c3c4e)return new _0x460563(_0x1f8ab5,_0x4c3c4e);{let _0xc2e5d2,_0x22dec4;_0x22dec4='u'==_0x4c3c4e['type']||'r'==_0x4c3c4e['type']?[]:_0x4c3c4e['children']['map'](_0x16b42a=>this['_getViewFromDiffObj'](_0x16b42a,_0x5b7304));const _0x3d2e01=this['_typeCharToViewClass']['get'](_0x4c3c4e['type'])||_0x2c71cb,_0x5286af=this['editor']['data']['htmlProcessor']['domConverter'];if(_0xc2e5d2=new _0x3d2e01(_0x1f8ab5,_0x4c3c4e['name'],_0x4c3c4e['attributes'],_0x22dec4),'u'==_0x4c3c4e['type']&&_0x4c3c4e['children'][0x0]){const _0x75d162=_0x4c3c4e['children'][0x0];if(_0xc2e5d2['render']=function(_0x2124e0){const _0x51d014=_0x2124e0['createElement']('div');return _0x51d014['innerHTML']=_0x75d162,_0x51d014['childNodes'][0x0];},_0x5b7304){const _0x37128c=new _0x862c9(_0x1f8ab5);_0x37128c['_appendChild'](_0xc2e5d2);const _0x56982d=Array['from'](_0x5286af['viewChildrenToDom'](_0x37128c,{'bind':!0x1})),_0x39f4ea=_0x5286af['domDocument']['createElement']('div');_0x39f4ea['append'](..._0x56982d),_0xc2e5d2=Array['from'](_0x5286af['domChildrenToView'](_0x39f4ea))[0x0];}}else{if('r'==_0x4c3c4e['type']&&_0x4c3c4e['children'][0x0]){const _0xd5359f=_0x4c3c4e['children'][0x0];if(_0xc2e5d2['render']=function(_0x492940){_0x492940['innerHTML']=_0xd5359f;},_0x5b7304){const _0xf5df63=new _0x862c9(_0x1f8ab5);_0xf5df63['_appendChild'](_0xc2e5d2);const _0x25a64b=Array['from'](_0x5286af['viewChildrenToDom'](_0xf5df63,{'bind':!0x1})),_0x5c5401=_0x5286af['domDocument']['createElement']('div');_0x5c5401['append'](..._0x25a64b);const _0xb2048=Array['from'](_0x5286af['domChildrenToView'](_0x5c5401));_0xb2048['length']>0x1?_0xc2e5d2['_appendChild'](_0xb2048):_0xc2e5d2=_0xb2048[0x0];}}}if(_0x4c3c4e['customProperties']){for(const [_0x84ff7e,_0x110a01]of _0x4c3c4e['customProperties'])_0xc2e5d2['_setCustomProperty'](_0x84ff7e,_0x110a01);}const _0x4405d9=void 0x0===_0x4c3c4e['fillerOffset']?null:_0x4c3c4e['fillerOffset'];return null!==_0x4405d9&&(_0xc2e5d2['getFillerOffset']=()=>_0x4405d9),_0xc2e5d2;}}['_makeModelFromViewString'](_0x2c588e,_0x5a223f){const _0x17d549=JSON['parse'](_0x2c588e),_0x5814ca=this['editor']['editing']['view']['document'],_0x212b7b=new _0x862c9(_0x5814ca,_0x17d549['map'](_0x3b75cc=>this['_getViewFromDiffObj'](_0x3b75cc,!0x0))),_0x42430d=this['editor']['data']['toModel'](_0x212b7b,_0x5a223f);return _0x42430d['name']=_0x5a223f,_0x42430d;}['_removeRevisionMarkers'](_0x47e219){return(_0x47e219=_0x47e219['filter'](_0x1ea34b=>!_0x1ea34b['name']||'revision-start'!==_0x1ea34b['name']&&'revision-end'!==_0x1ea34b['name']))['forEach'](_0xa61a26=>{'string'!=typeof _0xa61a26&&(_0xa61a26['children']=this['_removeRevisionMarkers'](_0xa61a26['children']),_0xa61a26['attributes']=_0xa61a26['attributes']['filter'](_0x261e43=>!_0x261e43[0x0]['startsWith']('data-revision-')));}),_0x47e219;}}function ft(_0x2e7e40,_0x5db6bd,_0x5f30ef){const t=_0x2e7e40['t'];switch(_0x5db6bd){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'},_0x5f30ef);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5f30ef);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x538071{['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[_0x2baa1d,RevisionsRepository,RevisionHistoryUtils,_0x3985ee];}constructor(_0x3ebfbd){super(_0x3ebfbd),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2017a7=_0x51ceb2();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2017a7},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 _0x321e41=this['repository']['getRevision'](0x0),_0x14c78c=_0x321e41&&null===_0x321e41['creator']?_0x321e41:null;if(this['_continueCurrentRevision']=!!_0x14c78c&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x52d718=this['_source']['getCurrentRevisionId'](),_0x4363ef=this['repository']['getRevision'](_0x52d718);if(_0x4363ef)this['_startingVersion']=_0x4363ef['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x22e759=this['_source']['history']['_operations']['find'](_0x5d6329=>!_0x5d6329['_isInit']),_0x136122=_0x22e759?_0x22e759['baseVersion']:this['_source']['history']['version'];_0x321e41?(_0x321e41['toVersion']<_0x136122&&_0x321e41['_update']({'toVersion':_0x136122}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x14c78c['id'],this['_startingVersion']=_0x14c78c['fromVersion']):(this['_startingVersion']=_0x321e41['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x136122,this['_continueCurrentRevision']=!0x1);}}else _0x14c78c&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x14c78c['toVersion'],this['editor']['model']['document']['history']['version']),_0x14c78c['fromVersion']===_0x14c78c['toVersion']?(0x0!==_0x14c78c['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x14c78c['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x14c78c['id'],this['_startingVersion']=_0x14c78c['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',_0x1370a8=>!_0x1370a8),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2c5d54=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1beeaa;for(const _0x13f036 in _0x2c5d54){const _0x1e908a=_0x13f036,_0x267c22=_0x2c5d54[_0x1e908a];if('revisionHistoryLicenseKeyValid'==_0x267c22||'revisionHistoryLicenseKeyInvalid'==_0x267c22||'revisionHistoryLicenseKeyExpired'==_0x267c22||'revisionHistoryLicenseKeyDomainLimit'==_0x267c22||'revisionHistoryLicenseKeyNotAllowed'==_0x267c22||'revisionHistoryLicenseKeyEvaluationLimit'==_0x267c22||'revisionHistoryLicenseKeyUsageLimit'==_0x267c22){delete _0x2c5d54[_0x1e908a],_0x1beeaa=_0x267c22,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1beeaa&&_0x2c5d54['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1beeaa&&_0x2c5d54['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1beeaa&&_0x2c5d54['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1beeaa&&_0x2c5d54['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1beeaa&&_0x2c5d54['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1beeaa&&_0x2c5d54['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0xa404b8=this['repository']['getRevision'](0x0),_0x5c0f45=await this['getRevisionDocumentData'](_0xa404b8),_0xf90263=await this['getRevisionRootsAttributes'](_0xa404b8),_0x279884=this['_utils']['getRevisionRootsModelElements'](_0xa404b8);this['_replaceEditorDataWithRevisionData'](_0x5c0f45,_0xf90263,_0x279884);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xdc7e84){this['_source']=_0xdc7e84;}async['update'](){const _0x3924f9=await this['_source']['getLatestVersion']();if(_0x3924f9>this['currentRevision']['toVersion']){await this['_loadState']();const _0x24912f=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3924f9});_0x24912f['authors']=_0x24912f['authorsIds']['map'](_0x4c3377=>this['editor']['plugins']['get']('Users')['getUser'](_0x4c3377)),this['currentRevision']['_update'](_0x24912f);}}async['saveRevision'](_0x1ab741={},_0x70072c=null){const _0x3b94b7=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x70072c>this['currentRevision']['toVersion']&&(_0x70072c=null),null===_0x70072c&&(_0x70072c=await this['_source']['getLatestVersion']());const _0x38f5d5=this['_getFromVersion'](_0x70072c),_0x3068d5=this['buildRevisionData']({'from':_0x38f5d5,'to':_0x70072c});if(this['currentRevision']['toVersion']<_0x70072c){const _0x5eee93=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x70072c,'to':_0x70072c});_0x5eee93['authors']=[],_0x5eee93['authorsIds']=[],_0x5eee93['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x5eee93,!0x0),delete _0x5eee93['authors'],_0x3b94b7['push'](_0x5eee93);}_0x1ab741['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1ab741['name']=_0x1ab741['name']||null,_0x1ab741['id']=_0x1ab741['id']||_0x51ceb2(),_0x1ab741={..._0x1ab741,..._0x3068d5};const _0x525b51=this['addRevisionData'](_0x1ab741);_0x3b94b7['push'](_0x1ab741);const _0x3eaf98=this['repository']['getIndex'](_0x525b51);if(0x0!==_0x3eaf98){const _0x40b3ff=this['repository']['getRevision'](_0x3eaf98-0x1);if(_0x40b3ff['fromVersion']!==_0x70072c){const _0x1544b7=this['_revisionDataBuilder']['getData'](_0x70072c,_0x40b3ff['toVersion']),_0x599be5={'id':_0x40b3ff['id'],'diffData':_0x1544b7['diffData'],'authorsIds':_0x1544b7['authorsIds'],'authors':_0x1544b7['authorsIds']['map'](_0x5c5666=>this['editor']['plugins']['get']('Users')['getUser'](_0x5c5666)),'fromVersion':_0x70072c};_0x40b3ff===this['currentRevision']&&(_0x599be5['createdAt']=new Date(_0x1ab741['createdAt']['getTime']()+0xa)),_0x40b3ff['_update'](_0x599be5,!0x0),delete _0x599be5['authors'],_0x3b94b7['push'](_0x599be5);}}if(this['adapter']){for(const _0x1f06b6 of _0x3b94b7)this['_bufferUpdate'](_0x1f06b6['id'],_0x1f06b6,!0x0);this['sendBufferedUpdates']();}return _0x525b51;}['addRevisionData'](_0x260be9){const _0x45f6a8=this['repository']['createRevision'](_0x260be9);return this['adapter']&&_0x45f6a8['on']('_update',(_0x29697d,_0xfc796c,_0x181695)=>{_0x181695||(this['_bufferUpdate'](_0xfc796c['id'],_0xfc796c,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x45f6a8,this['_findInsertionIndex'](_0x45f6a8)),_0x45f6a8;}async['getRevisionDocumentData'](_0x310cc2){return await this['_utils']['loadRevisionData'](_0x310cc2,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x310cc2);}async['getRevisionRootsAttributes'](_0x4f15ad){return await this['_utils']['loadRevisionData'](_0x4f15ad,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4f15ad);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x56d21d=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x264145=0x0;_0x264145<_0x56d21d['length'];_0x264145++){const _0x36bc31=_0x56d21d[_0x264145];let _0x1d7359=!0x1;for(const _0x5689eb of Object['keys'](_0x36bc31))void 0x0===_0x36bc31[_0x5689eb]?delete _0x36bc31[_0x5689eb]:'id'!==_0x5689eb&&(_0x1d7359=!0x0);_0x1d7359||(_0x56d21d[_0x264145]=null);}if(_0x56d21d=_0x56d21d['filter'](_0x1c9830=>null!==_0x1c9830),!_0x56d21d['length'])return;for(let _0x54acad=0x0;_0x54acad<_0x56d21d['length'];_0x54acad++){const _0x2b76b3=_0x56d21d[_0x54acad];void 0x0!==_0x2b76b3['fromVersion']&&void 0x0===_0x2b76b3['toVersion']&&(_0x2b76b3['toVersion']=this['repository']['getRevision'](_0x2b76b3['id'])['toVersion']),void 0x0!==_0x2b76b3['toVersion']&&void 0x0===_0x2b76b3['fromVersion']&&(_0x2b76b3['fromVersion']=this['repository']['getRevision'](_0x2b76b3['id'])['fromVersion']);}const _0x9c8e1=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x56d21d,_0x9c8e1)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x245954=>{if(_0x245954){for(const _0x1d9ad8 of _0x245954)this['setRevisionData']({'id':_0x1d9ad8['id'],'createdAt':_0x1d9ad8['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x5394ac=null,from:_0x3edae7=null,to:_0x38283e=null}){_0x3edae7=null!==_0x3edae7?_0x3edae7:_0x5394ac['fromVersion'],_0x38283e=null!==_0x38283e?_0x38283e:_0x5394ac['toVersion'];const _0x2c41fb=this['_revisionDataBuilder']['getData'](_0x3edae7,_0x38283e),_0x2c058c={'diffData':_0x2c41fb['diffData'],'authorsIds':_0x2c41fb['authorsIds'],'fromVersion':_0x3edae7,'toVersion':_0x38283e};if(!_0x5394ac||_0x38283e!==_0x5394ac['toVersion']){const _0x424d15=_0x38283e-0x1,_0x8a2f34=this['_source']['history']['getOperation'](_0x424d15);_0x2c058c['createdAt']=_0x8a2f34&&_0x8a2f34['createdAt']||new Date();}if(this['_loadedStateData']&&_0x3edae7===this['_loadedStateData']['fromVersion']){for(const _0x46072e of this['_loadedStateData']['authors'])_0x2c058c['authorsIds']['includes'](_0x46072e['id'])||_0x2c058c['authorsIds']['push'](_0x46072e['id']);}return _0x2c058c;}['_bufferUpdate'](_0x4a2d1f,_0x1ec4c7,_0x329f73){if(this['_bufferedUpdates']['has'](_0x4a2d1f)){const _0x1f02d3=this['_bufferedUpdates']['get'](_0x4a2d1f);_0x1ec4c7=_0x329f73?{..._0x1f02d3,..._0x1ec4c7}:{..._0x1ec4c7,..._0x1f02d3};}this['_bufferedUpdates']['set'](_0x4a2d1f,_0x1ec4c7);}['setRevisionData'](_0x1aa24e){const _0x3605df=this['repository']['getRevision'](_0x1aa24e['id']);if(_0x1aa24e['createdAt']&&(_0x1aa24e['createdAt']=new Date(_0x1aa24e['createdAt'])),_0x1aa24e['authorsIds']){const _0x1d63e1=this['editor']['plugins']['get']('Users');_0x1aa24e['authors']=_0x1aa24e['authorsIds']['map'](_0x5a240d=>_0x1d63e1['getUser'](_0x5a240d));}_0x3605df['_update'](_0x1aa24e,!0x0);}['_createInitialRevision'](_0x3f0feb){const _0x410cac=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x410cac)this['_initialRevisionId']=_0x410cac['id'];else{const _0x531cc3=!this['editor']['model']['document']['roots']['find'](_0x578f7d=>this['editor']['model']['hasContent'](_0x578f7d)),_0x5a4d40=this['editor']['plugins']['get']('Users')['me']['id'],_0x159109=ft(this['editor']['locale'],_0x531cc3?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3f0feb,'to':_0x3f0feb,'id':this['_initialRevisionId'],'name':_0x159109,'creatorId':_0x5a4d40});}}['_createCurrentRevision'](_0x1ee7f0){const _0x259188=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x259188),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1ee7f0,'to':_0x1ee7f0,'id':_0x259188,'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'](_0x1101b7,_0x29487c,_0x17360e){const _0x4b4502={},_0x2e604a={},_0x2ed59b={},_0x231d70=this['editor']['config']['get']('roots')||{};for(const [_0x260741,_0x231e95]of Object['entries'](_0x231d70))_0x231e95['lazyLoad']||(_0x4b4502[_0x260741]=_0x231e95['initialData']??'',_0x2e604a[_0x260741]=_0x231e95['modelAttributes']||{},_0x231e95['modelElement']&&(_0x2ed59b[_0x260741]=_0x231e95['modelElement']));for(const _0x4a58a6 of this['editor']['model']['document']['getRootNames']())_0x4b4502[_0x4a58a6]??='',_0x2e604a[_0x4a58a6]??={};let _0x4d7287=!0x1;const _0x51430c=Object['keys'](_0x4b4502),_0x3ff515=Object['keys'](_0x1101b7);for(const _0x16ceb1 of _0x51430c){if(_0x4b4502[_0x16ceb1]!==_0x1101b7[_0x16ceb1]&&''!==_0x4b4502[_0x16ceb1]['trim']()){_0x4d7287=!0x0;break;}if(!_0x5af7ec(_0x2e604a[_0x16ceb1],_0x29487c[_0x16ceb1])&&Object['keys'](_0x2e604a[_0x16ceb1])['length']>0x0){_0x4d7287=!0x0;break;}const _0x4bd16b=_0x2ed59b[_0x16ceb1],_0x34401f=_0x17360e[_0x16ceb1];if(_0x4bd16b&&_0x34401f&&_0x4bd16b!==_0x34401f){_0x4d7287=!0x0;break;}}_0x4d7287||(_0x4d7287=_0x3ff515['some'](_0x4bdc40=>!this['editor']['model']['document']['getRoot'](_0x4bdc40))),_0x4d7287&&_0x1b67c3('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4b4502,'editorRootsAttributes':_0x2e604a,'editorRootsModelElements':_0x2ed59b,'revisionData':_0x1101b7,'revisionRootsAttributes':_0x29487c,'revisionRootsModelElements':_0x17360e});for(const [_0x553a0c,_0x1341be]of Object['entries'](_0x1101b7))this['editor']['config']['set']('roots.'+_0x553a0c+'.initialData',_0x1341be);for(const [_0x48bb13,_0x1d72b9]of Object['entries'](_0x29487c))this['editor']['config']['set']('roots.'+_0x48bb13+'.modelAttributes',_0x1d72b9);const _0x108f46=this['editor']['model']['document'];for(const [_0x1c0e9c,_0x11b3a2]of Object['entries'](_0x17360e)){this['editor']['config']['set']('roots.'+_0x1c0e9c+'.modelElement',_0x11b3a2);const _0x20a363=_0x108f46['getRoot'](_0x1c0e9c);_0x20a363&&_0x20a363['name']!==_0x11b3a2&&(_0x108f46['roots']['remove'](_0x1c0e9c),_0x108f46['createRoot'](_0x11b3a2,_0x1c0e9c));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x7716aa=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x7716aa['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x245ee0){const _0x454408=this['repository']['getRevisions']();_0x454408['reverse']();let _0x3a452e=0x0;for(;_0x3a452e<_0x454408['length'];){const _0x5a0c28=_0x454408[_0x3a452e];if(_0x5a0c28===this['currentRevision']){_0x3a452e++;continue;}if(_0x5a0c28['id']===this['_initialRevisionId'])break;const _0x1ef849=_0x245ee0['toVersion']-_0x5a0c28['toVersion']||_0x245ee0['fromVersion']-_0x5a0c28['fromVersion'];if(_0x1ef849>0x0)break;if(_0x1ef849<0x0)_0x3a452e++;else{if(!_0x245ee0['creator']&&_0x5a0c28['creator'])break;if(_0x5a0c28['creator']||!_0x245ee0['creator']){if(_0x245ee0['createdAt']>_0x5a0c28['createdAt'])break;_0x3a452e++;}else _0x3a452e++;}}return _0x3a452e;}['_getFromVersion'](_0x1ad5e8){const _0x211216=this['repository']['getRevisions']();_0x211216['reverse'](),_0x211216['shift']();const _0x59a928=_0x211216['find'](_0x59dcd5=>_0x59dcd5['toVersion']<=_0x1ad5e8)['toVersion'];return _0x59a928<this['_startingVersion']?this['_startingVersion']:_0x59a928;}['_makeRevision']({name:_0x149ed4,from:_0x45feba,to:_0x37f6b0,creatorId:_0x54e6c3,id:_0x115e11}){const _0x65fab4=this['buildRevisionData']({'from':_0x45feba,'to':_0x37f6b0});_0x65fab4['name']=_0x149ed4,_0x65fab4['creatorId']=_0x54e6c3,_0x65fab4['id']=_0x115e11;const _0x592f28=this['addRevisionData'](_0x65fab4);return this['adapter']&&this['_bufferUpdate'](_0x65fab4['id'],_0x65fab4,!0x0),_0x592f28;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x164171){this['editor']=_0x164171,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'](_0x33119e){this['source']=_0x33119e;const _0x4501da=new Map(),_0x3dc4c2=new Map(),_0x262070=this['editor']['model']['document']['roots']['map'](_0xded587=>_0xded587['rootName']);for(const _0x6d3e10 of _0x262070){const _0x48e352=this['editor']['model']['document']['getRoot'](_0x6d3e10),_0x215bd9=gt(_0x48e352);_0x4501da['set'](_0x6d3e10,_0x215bd9),_0x3dc4c2['set'](_0x6d3e10,Object['fromEntries'](_0x48e352['getAttributes']()));}const _0xee17e8=Array['from'](this['editor']['model']['markers'])['map'](_0x1621f7=>[_0x1621f7['name'],_0x1621f7['getRange']()]),_0x562e94=this['source']['version'];this['_saveMetaData'](_0x562e94,_0x4501da,_0xee17e8,_0x3dc4c2),this['_startingRevisionId']=this['_revisionId'];const _0x2ec43b=new Map(),_0x212caf=new Map();for(const _0x107aa5 of _0x262070){const _0x3b2616=wt(_0x107aa5,this['editor']['model']['document']['getRoot'](_0x107aa5)['name']);_0x2ec43b['set'](_0x107aa5,_0x3b2616),_0x212caf['set'](_0x107aa5,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2ec43b,[],_0x212caf);}['getData'](_0xcbd783,_0x51460d){if(this['_lastFrom']===_0xcbd783&&this['_lastTo']<=_0x51460d)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x51460d,!0x0);else{if(!this['_savedMetaData']['has'](_0xcbd783)){const _0x3e8b30=this['_getPreviousFrom'](_0xcbd783);this['_calculateMetaData'](_0x3e8b30,_0xcbd783,!0x1);}this['_calculateMetaData'](_0xcbd783,_0x51460d,!0x0);}return this['_lastFrom']=_0xcbd783,this['_lastTo']=_0x51460d,this['_getState']();}['loadState'](_0x1201a5){if(!this['_savedMetaData']['has'](_0x1201a5['fromVersion'])){const _0x28eb52=this['_getPreviousFrom'](_0x1201a5['fromVersion']);this['_calculateMetaData'](_0x28eb52,_0x1201a5['fromVersion'],!0x1);}this['_calculateMetaData'](_0x1201a5['fromVersion'],_0x1201a5['toVersion'],!0x1);const _0x10d26a=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1201a5['fromVersion'],this['_lastTo']=_0x1201a5['toVersion'];for(const _0x211530 in _0x1201a5['diffData']){const _0x51cf05=_0x1201a5['diffData'][_0x211530]['attachChange'],_0x4c9364=_0x8c5550(_0x1201a5['diffData'][_0x211530]['attributesBefore'])||{},_0xfee157=_0x1201a5['diffData'][_0x211530],_0x187e6b=_0x10d26a['_makeModelFromViewString'](_0xfee157['deletions'],_0xfee157['rootElementName']||'$root');_0x187e6b['rootName']=_0x211530,_0x187e6b['_isAttached']=!_0x51cf05||!_0x51cf05['isAttached'],_0x187e6b['isAttached']=()=>_0x187e6b['_isAttached'],this['_baseRoots']['set'](_0x211530,_0x187e6b),this['_baseRootsAttributes']['set'](_0x211530,_0x4c9364),_0x51cf05&&this['_touchedRoots']['set'](_0x211530,_0x51cf05);const _0x317bef=this['_makeIdsRoot'](_0x187e6b);this['_baseIdsRoots']['set'](_0x211530,_0x317bef);for(const [_0x2d419c,_0x39e7d8]of _0x187e6b['markers']){if(!_0x2d419c['startsWith']('revision:'))continue;const _0x85dca2=_0x2d419c['split'](':')[0x2];for(const _0x2fc59f of _0x39e7d8['getWalker']({'singleCharacters':!0x0})){const _0x4261b9=this['_getVidAttributeName'](_0x2fc59f),_0x24abd4='elementEnd'==_0x2fc59f['type']?_0x2fc59f['previousPosition']['path']['slice'](0x0,-0x1):_0x2fc59f['previousPosition']['path'],_0x14b4ea=_0x317bef['getNodeByPath'](_0x24abd4)['getAttribute'](_0x4261b9);this['_touched']['set'](_0x14b4ea,{'userId':_0x85dca2});}_0x187e6b['markers']['delete'](_0x2d419c);}}this['_startingRevisionId']=this['_revisionId'];const _0x117c30=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x449d9b=>!this['_touched']['has'](_0x449d9b));let _0x28b160=0x0;const _0xb84af2=new Map();for(const _0x2a08f5 in _0x1201a5['diffData']){const _0x24b249=_0x1201a5['diffData'][_0x2a08f5]['attachChange'],_0x5364f4=_0x8c5550(_0x1201a5['diffData'][_0x2a08f5]['attributesAfter'])||{},_0x90ced3=_0x1201a5['diffData'][_0x2a08f5],_0x26ea02=_0x10d26a['_makeModelFromViewString'](_0x90ced3['insertions'],_0x90ced3['rootElementName']||'$root');_0x26ea02['rootName']=_0x2a08f5,_0x26ea02['_isAttached']=!_0x24b249||_0x24b249['isAttached'],_0x26ea02['isAttached']=()=>_0x26ea02['_isAttached'],this['_diffRoots']['set'](_0x2a08f5,_0x26ea02),this['_diffRootsAttributes']['set'](_0x2a08f5,_0x5364f4);const _0x16d1e2=this['_makeIdsRoot'](_0x26ea02,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2a08f5,_0x16d1e2),_0xb84af2['set'](_0x2a08f5,_0x26ea02['isAttached']()?_0x5364f4:{});for(const [_0x3f4e35,_0x3131bf]of _0x26ea02['markers']){if(!_0x3f4e35['startsWith']('revision:'))continue;const _0x5e860a=_0x3f4e35['split'](':')[0x2];for(const _0x41bf19 of _0x3131bf['getWalker']({'singleCharacters':!0x0})){const _0xecb73=this['_getVidAttributeName'](_0x41bf19),_0x23f593=this['_revisionId']++,_0x154940='elementEnd'==_0x41bf19['type']?_0x41bf19['previousPosition']['path']['slice'](0x0,-0x1):_0x41bf19['previousPosition']['path'];_0x16d1e2['getNodeByPath'](_0x154940)['_setAttribute'](_0xecb73,_0x23f593),this['_touched']['set'](_0x23f593,{'userId':_0x5e860a});}_0x26ea02['markers']['delete'](_0x3f4e35);}for(const _0x349204 of this['editor']['model']['createRangeIn'](_0x26ea02)['getWalker']({'singleCharacters':!0x0})){const _0x43a2c9=this['_getVidAttributeName'](_0x349204),_0x52beb8='elementEnd'==_0x349204['type']?_0x349204['previousPosition']['path']['slice'](0x0,-0x1):_0x349204['previousPosition']['path'],_0x46d6aa=_0x16d1e2['getNodeByPath'](_0x52beb8);_0x46d6aa['getAttribute'](_0x43a2c9)>0x0||_0x46d6aa['_setAttribute'](_0x43a2c9,_0x117c30[_0x28b160++]);}for(const [_0x3e31ba,_0x34ec82]of _0x26ea02['markers'])_0x3e31ba['startsWith']('revision:')||this['_markers']['set'](_0x3e31ba,_0x34ec82);}const {roots:_0x2b9d50}=this['_savedMetaData']['get'](_0x1201a5['fromVersion']),{roots:_0x3d187d}=this['_savedMetaData']['get'](_0x1201a5['toVersion']),_0x5cef6d=gt(_0x2b9d50['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x5cef6d),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5cef6d,Number['NEGATIVE_INFINITY']));const _0x2148e5=gt(_0x3d187d['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2148e5),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2148e5));const _0x492936=Array['from'](this['_diffRoots'])['map'](([_0x2ac7d4,_0x3f4de4])=>[_0x2ac7d4,gt(_0x3f4de4)]);this['_saveMetaData'](this['_lastTo'],_0x492936,this['_markers'],_0xb84af2);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x4f890f,_0x353e3a,_0x54f1f1,_0xa875f2){const _0x212390=new Map(_0x353e3a),_0x3a9824=new Map(_0x8c5550(_0xa875f2)),_0x295916=new Map();for(const [_0xfc152a,_0x5c8b30]of _0x54f1f1)_0x295916['set'](_0xfc152a,{'start':_0x5c8b30['start']['clone'](),'end':_0x5c8b30['end']['clone'](),'rootName':_0x5c8b30['root']['rootName']});this['_savedMetaData']['set'](_0x4f890f,{'roots':_0x212390,'markers':_0x295916,'rootsAttributes':_0x3a9824});}['_removeMetaData'](_0x242cb1){this['_savedMetaData']['delete'](_0x242cb1);}['_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'](_0x51cfdc,_0x4fd686=null){let _0xb18c96=null;_0x51cfdc['is']('documentFragment')||(_0xb18c96=new _0x46d26f(_0x51cfdc['name'],{'vid_start':null===_0x4fd686?this['_revisionId']++:_0x4fd686++}));const _0x5b25c5=[];for(const _0x5189ec of _0x51cfdc['getChildren']())if(_0x5189ec['is']('element')){_0x5b25c5['push'](this['_makeIdsRoot'](_0x5189ec,_0x4fd686));const _0x14341a=_0x5b25c5[_0x5b25c5['length']-0x1];null!==_0x4fd686&&(_0x4fd686=_0x14341a['is']('element','$text')?_0x14341a['getAttribute']('vid')+0x1:_0x14341a['getAttribute']('vid_end')+0x1);}else{for(let _0x518f86=0x0;_0x518f86<_0x5189ec['offsetSize'];_0x518f86++)_0x5b25c5['push'](new _0x46d26f('$text',{'vid':null===_0x4fd686?this['_revisionId']++:_0x4fd686++}));}if(_0x51cfdc['is']('documentFragment')){const _0x57e8b1=wt(_0x51cfdc['rootName'],_0x51cfdc['name']);return _0x57e8b1['_insertChild'](0x0,_0x5b25c5),_0x57e8b1;}return _0xb18c96['_setAttribute']('vid_end',null===_0x4fd686?this['_revisionId']++:_0x4fd686++),_0xb18c96['_insertChild'](0x0,_0x5b25c5),_0xb18c96;}['_calculateMetaData'](_0x71d2b6,_0x359751,_0xf3f40f){this['_reset']();const {roots:_0x497925,markers:_0x276976,rootsAttributes:_0x43d613}=this['_savedMetaData']['get'](_0x71d2b6);this['_baseRoots']=new Map(_0x497925),this['_baseRootsAttributes']=new Map(_0x8c5550(_0x43d613));for(const [_0x2f9351,_0x3f6294]of this['_baseRoots'])if('$graveyard'!==_0x2f9351&&(this['_diffRoots']['set'](_0x2f9351,gt(_0x3f6294)),this['_diffRootsAttributes']=new Map(_0x8c5550(_0x43d613)),_0xf3f40f)){const _0x251ed0=this['_revisionId'];this['_idsRoots']['set'](_0x2f9351,this['_makeIdsRoot'](_0x3f6294)),this['_baseIdsRoots']['set'](_0x2f9351,this['_makeIdsRoot'](_0x3f6294,_0x251ed0));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0xf3f40f&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1ff339,_0x58f781]of _0x276976){const _0x4c87bb=this['_baseRoots']['get'](_0x58f781['rootName']),_0x400a2b=this['_diffRoots']['get'](_0x58f781['rootName']),_0x493579=new _0xa8802c(this['_fixPosition'](_0x58f781['start'],_0x4c87bb),this['_fixPosition'](_0x58f781['end'],_0x4c87bb)),_0x4d3a48=this['_fixRange'](_0x493579,_0x400a2b);_0x4c87bb['markers']['set'](_0x1ff339,_0x493579),this['_markers']['set'](_0x1ff339,_0x4d3a48);}this['_applyOperations'](_0x71d2b6,_0x359751,_0xf3f40f);}['_applyOperations'](_0xe16e56,_0x12d519,_0x401274){for(const _0x5bc536 of this['source']['getOperations'](_0xe16e56,_0x12d519))this['_handleOperation'](_0x5bc536,_0x401274);for(const _0x268993 of this['_diffRoots']['values']())_0x268993['markers']['clear']();for(const [_0x57ab43,_0x32c083]of this['_markers']){this['_diffRoots']['get'](_0x32c083['root']['rootName'])['markers']['set'](_0x57ab43,_0x32c083['clone']());}const _0x29ae54=new Map(),_0x16acdd=new Map();for(const [_0x2cd0ed,_0x486b34]of this['_diffRoots'])_0x29ae54['set'](_0x2cd0ed,gt(_0x486b34)),_0x16acdd['set'](_0x2cd0ed,this['_diffRootsAttributes']['get'](_0x2cd0ed));this['_saveMetaData'](_0x12d519,_0x29ae54,this['_markers'],_0x16acdd);}['_getPreviousFrom'](_0x42ccd6){const _0x3d8500=Array['from'](this['_savedMetaData']['keys']());_0x3d8500['sort']((_0x3f7b1e,_0x110bc1)=>_0x3f7b1e-_0x110bc1),_0x3d8500['reverse']();for(const _0x451b8c of _0x3d8500)if(_0x451b8c<_0x42ccd6)return _0x451b8c;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xf6b1ae,_0x31ebde){const _0x344456=Array['from'](_0x31ebde['markers'])['map'](([_0x26eb8a,_0x16ec26])=>[_0x26eb8a,this['_fixRange'](_0x16ec26,_0xf6b1ae)]);_0xf6b1ae['markers']=new Map(_0x344456);}['_transformMarkers'](_0x502668){for(const _0x3a8607 of this['_markers']['values']()){const _0x199645=_0x3a8607['getTransformedByOperation'](_0x502668),_0xd35267=_0xa8802c['_createFromRanges'](_0x199645);_0x3a8607['start']=_0xd35267['start'],_0x3a8607['end']=_0xd35267['end'];}}['_handleOperation'](_0x5f203e,_0x3d8baf){if('addRoot'!=_0x5f203e['type']&&'detachRoot'!=_0x5f203e['type']){if('insert'==_0x5f203e['type']){const _0x516341=_0x5f203e['position']['root'],_0xded08d=_0x516341['rootName'],_0x22033e=_0x516341['name'];this['_diffRoots']['has'](_0xded08d)||(this['_diffRoots']['set'](_0xded08d,wt(_0xded08d,_0x22033e,!0x0)),this['_diffRootsAttributes']['set'](_0xded08d,{}),_0x3d8baf&&this['_idsRoots']['set'](_0xded08d,wt(_0xded08d,_0x22033e,!0x0)));}else{if('addRootAttribute'==_0x5f203e['type']||'removeRootAttribute'==_0x5f203e['type']||'changeRootAttribute'==_0x5f203e['type'])return void this['_handleRootAttributeOperation'](_0x5f203e);'marker'==_0x5f203e['type']&&this['_handleMarkerOperation'](_0x5f203e);}if('marker'!==_0x5f203e['type']){const _0x4d0984=this['_cloneOperation'](_0x5f203e,this['_diffRoots']);_0x4d0984['_execute'](),this['_transformMarkers'](_0x4d0984);}if(_0x3d8baf)switch(_0x5f203e['type']){case'insert':this['_handleInsertOperation'](_0x5f203e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5f203e);break;case'merge':this['_handleMergeOperation'](_0x5f203e);break;case'split':this['_handleSplitOperation'](_0x5f203e);}}else this['_handleRootOperation'](_0x5f203e,_0x3d8baf);}['_cloneOperation'](_0x572ade,_0x39a48a){const _0x3c9641=_0x572ade['clone']();return _0x3c9641['_authorId']=_0x572ade['_authorId'],this['_fixOperation'](_0x3c9641,_0x39a48a),_0x3c9641;}['_getBaseVids'](_0x469ce3){return _0x469ce3['map'](_0xb10902=>{const _0x193f78=this['_getVidAttributeName'](_0xb10902);return Number(_0xb10902['item']['getAttribute'](_0x193f78));});}['_generateTape'](_0x16873e,_0x5b3e11){if(_0x16873e['is']('element','$text'))_0x5b3e11['push']({'item':_0x16873e,'type':'text'});else{_0x16873e['is']('element')&&_0x5b3e11['push']({'item':_0x16873e,'type':'elementStart'});for(const _0x26501a of _0x16873e['getChildren']())this['_generateTape'](_0x26501a,_0x5b3e11);_0x16873e['is']('element')&&_0x5b3e11['push']({'item':_0x16873e,'type':'elementEnd'});}return _0x5b3e11;}['_getState'](){const _0x32e8f1=new Map(this['_touched']),_0x517942=new Map(_0x32e8f1),_0xe11ea5=new Map(),_0x1e4185={'insertions':{},'deletions':{}},_0x39c24a={'insertions':{},'deletions':{}},_0x10cb30=new Map(),_0x3ee65b=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x21a4e7=new Map();_0x3ee65b['delete']('$graveyard');for(const _0x561e4b of _0x3ee65b){const _0x5d6d67=(this['_diffRoots']['get'](_0x561e4b)??this['_baseRoots']['get'](_0x561e4b))['name'],_0x2a2107=this['_diffRoots']['get'](_0x561e4b)||wt(_0x561e4b,_0x5d6d67,!0x1),_0x56cf55=this['_baseRoots']['get'](_0x561e4b)||wt(_0x561e4b,_0x5d6d67,!0x1);_0x2a2107['isAttached']()||_0x56cf55['isAttached']()?(_0x21a4e7['set'](_0x561e4b,_0x5d6d67),_0x1e4185['insertions'][_0x561e4b]=gt(_0x2a2107),_0x1e4185['deletions'][_0x561e4b]=gt(_0x56cf55),this['_copyMarkers'](_0x1e4185['deletions'][_0x561e4b],_0x56cf55),this['_copyMarkers'](_0x1e4185['insertions'][_0x561e4b],_0x2a2107),_0x39c24a['insertions'][_0x561e4b]=this['_generateTape'](this['_idsRoots']['get'](_0x561e4b),[]),_0x39c24a['deletions'][_0x561e4b]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x561e4b)||wt(_0x561e4b,_0x5d6d67,!0x1),[])):_0x3ee65b['delete'](_0x561e4b);}for(const _0x1c4dd4 of _0x3ee65b){const _0x5e54e9=_0x39c24a['insertions'][_0x1c4dd4];for(const _0x3cba97 of _0x5e54e9){const _0x197fd0=this['_getVidAttributeName'](_0x3cba97),_0x25f53a=_0x3cba97['item']['getAttribute'](_0x197fd0);_0x517942['delete'](_0x25f53a),_0x25f53a>=this['_startingRevisionId']&&_0xe11ea5['set'](_0x25f53a,_0x32e8f1['get'](_0x25f53a));}}for(const _0x36ca0d of _0x3ee65b){const _0x3f2d56=_0x39c24a['insertions'][_0x36ca0d],_0x5add97=this['_getBaseVids'](_0x39c24a['deletions'][_0x36ca0d]);let _0x31d4a8=0x0;for(const _0x4b3695 of _0x3f2d56){const _0x2dd340=this['_getVidAttributeName'](_0x4b3695),_0x3f2f70=_0x4b3695['item']['getAttribute'](_0x2dd340);if(!_0xe11ea5['has'](_0x3f2f70)&&!_0x10cb30['has'](_0x3f2f70)){if(_0x517942['has'](_0x3f2f70))_0x31d4a8++;else{if(_0x3f2f70!=_0x5add97[_0x31d4a8]){const _0x16ab01=_0x32e8f1['get'](_0x3f2f70)||_0x32e8f1['get'](_0x5add97[_0x31d4a8]);for(;_0x3f2f70!=_0x5add97[_0x31d4a8];)_0x517942['has'](_0x5add97[_0x31d4a8])||(_0x10cb30['set'](_0x5add97[_0x31d4a8],_0x16ab01),_0x32e8f1['set'](_0x5add97[_0x31d4a8],_0x16ab01)),_0x31d4a8++;}_0x31d4a8++;}}}}for(const _0x481365 of _0x3ee65b){const _0x1053d0=_0x39c24a['insertions'][_0x481365];for(const _0x1a6049 of _0x1053d0){const _0x3c6d17=this['_getVidAttributeName'](_0x1a6049),_0x22a8b2=_0x1a6049['item']['getAttribute'](_0x3c6d17);if(_0x10cb30['has'](_0x22a8b2)){const _0x3a0224=_0x10cb30['get'](_0x22a8b2);_0x517942['has'](_0x22a8b2)||_0x517942['set'](_0x22a8b2,{..._0x3a0224}),_0xe11ea5['set'](_0x22a8b2,{..._0x3a0224});}}}for(const _0x16e062 of _0x517942['keys']())_0x16e062>=this['_startingRevisionId']&&_0x517942['delete'](_0x16e062);const _0x215c00=new Map();for(const _0x37fd1a of _0x3ee65b){let _0x59ab1f=_0x39c24a['insertions'][_0x37fd1a];for(const _0x4b2cf4 of _0x59ab1f)if(_0x4b2cf4['item']['is']('element','tableCell')){const _0xf1ec7e=this['_getVidAttributeName'](_0x4b2cf4),_0x5a41d8=_0x4b2cf4['item']['getAttribute'](_0xf1ec7e);if(_0xe11ea5['has'](_0x5a41d8)){const _0x43d712=_0x4b2cf4['item']['parent']['parent']['getAttribute']('vid_start'),_0x58facd=_0x215c00['get'](_0x43d712)||new Set();_0x58facd['add'](_0xe11ea5['get'](_0x5a41d8)['userId']),_0x215c00['set'](_0x43d712,_0x58facd);}}_0x59ab1f=_0x39c24a['deletions'][_0x37fd1a];for(const _0x182e11 of _0x59ab1f)if(_0x182e11['item']['is']('element','tableCell')){const _0x44bc24=this['_getVidAttributeName'](_0x182e11),_0x1c43d7=_0x182e11['item']['getAttribute'](_0x44bc24);if(_0x517942['has'](_0x1c43d7)){const _0x174d00=_0x182e11['item']['parent']['parent']['getAttribute']('vid_start'),_0x1c7ec9=_0x215c00['get'](_0x174d00)||new Set();_0x1c7ec9['add'](_0x517942['get'](_0x1c43d7)['userId']),_0x215c00['set'](_0x174d00,_0x1c7ec9);}}for(const _0x991cbe of _0x215c00['keys']())(_0xe11ea5['has'](_0x991cbe)||_0x517942['has'](_0x991cbe))&&_0x215c00['delete'](_0x991cbe);}for(const _0x2963ba of _0x3ee65b){const _0x361207=_0x39c24a['insertions'][_0x2963ba];let _0x1dc649=null,_0x5eefa8=null;for(const _0xad7e45 of _0x361207){const _0x48b5a7=this['_getVidAttributeName'](_0xad7e45),_0xc31246=_0xad7e45['item']['getAttribute'](_0x48b5a7),_0x3b1b3f=_0x215c00['get'](_0xc31246);_0x3b1b3f&&'elementStart'==_0xad7e45['type']&&(_0x1dc649=Array['from'](_0x3b1b3f)[0x0],_0x5eefa8=_0xad7e45['item']['getAttribute']('vid_end')),_0x1dc649&&(_0x517942['set'](_0xc31246,{'userId':_0x1dc649}),_0xe11ea5['set'](_0xc31246,{'userId':_0x1dc649})),_0xc31246==_0x5eefa8&&(_0x1dc649=null,_0x5eefa8=null);}}const _0x22e1a1={},_0xcaa8f7=new Set();for(const _0xd6eff of _0x3ee65b){const _0x31bc05=_0x1e4185['deletions'][_0xd6eff],_0x4a3c69=_0x1e4185['insertions'][_0xd6eff];for(const {userId:_0x27730a}of this['_touchedMarkers']['values']())null!==_0x27730a&&_0xcaa8f7['add'](_0x27730a);for(const {userId:_0x4e3642}of this['_touchedRoots']['values']())null!==_0x4e3642&&_0xcaa8f7['add'](_0x4e3642);this['_markChanges'](_0x4a3c69,_0x39c24a['insertions'][_0xd6eff],_0xe11ea5,'insertion',_0xcaa8f7),this['_markChanges'](_0x31bc05,_0x39c24a['deletions'][_0xd6eff],_0x517942,'deletion',_0xcaa8f7),_0x22e1a1[_0xd6eff]={'insertions':this['_prepareViewToSave'](_0x4a3c69),'deletions':this['_prepareViewToSave'](_0x31bc05),'attachChange':this['_touchedRoots']['get'](_0xd6eff)||null,'attributesBefore':_0x8c5550(this['_baseRootsAttributes']['get'](_0xd6eff))||{},'attributesAfter':_0x8c5550(this['_diffRootsAttributes']['get'](_0xd6eff)),'rootElementName':_0x21a4e7['get'](_0xd6eff)};}return{'diffData':_0x22e1a1,'authorsIds':Array['from'](_0xcaa8f7)};}['_processRootBeforeSave'](_0x4d42fe){for(const [,_0x4472c6]of _0x4d42fe['markers']){const _0x2a1b6d=_0x4472c6['start']['getAncestors']()['filter'](_0x32e81b=>'tableCell'==_0x32e81b['name']);for(const _0x35a162 of _0x2a1b6d)0x1==_0x35a162['childCount']&&_0x35a162['getChild'](0x0)['is']('element','paragraph')&&_0x35a162['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5c6af6){this['_processRootBeforeSave'](_0x5c6af6);const _0x2ba76a=this['editor']['data']['toView'](_0x5c6af6,{}),_0x81cd09=Array['from'](_0x2ba76a['getChildren']())['map'](_0x24127b=>this['_getViewJson'](_0x24127b));return JSON['stringify'](_0x81cd09);}['_getViewJson'](_0x4723a9){if(_0x4723a9['is']('$text'))return _0x4723a9['data'];{const _0x3970a2=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x517df2=_0x4723a9,_0x4123fe=this['editor']['data']['htmlProcessor']['domConverter'],_0x17b8ec={'type':_0x3970a2['_getTypeCharForViewElement'](_0x517df2),'name':_0x517df2['name'],'attributes':Array['from'](_0x517df2['getAttributes']()),'children':Array['from'](_0x517df2['getChildren']())['map'](_0x469e84=>this['_getViewJson'](_0x469e84))};if(_0x4723a9['is']('uiElement')&&'$comment'!=_0x4723a9['name']){const _0x52c1b8=_0x4723a9['render'](_0x4123fe['domDocument'],_0x4123fe);_0x17b8ec['children']['push'](_0x52c1b8['outerHTML']);}else{if(_0x4723a9['is']('rawElement')){const _0x3cb671=_0x4123fe['domDocument']['createElement'](_0x517df2['name']);_0x4723a9['render'](_0x3cb671,_0x4123fe),_0x17b8ec['children']['push'](_0x3cb671['innerHTML']);}}const _0x415623=Array['from'](_0x517df2['getCustomProperties']());_0x415623['length']>0x0&&(_0x17b8ec['customProperties']=_0x415623);const _0x1bc014=_0x517df2['getFillerOffset']();return null!==_0x1bc014&&(_0x17b8ec['fillerOffset']=_0x1bc014),_0x17b8ec;}}['_markChanges'](_0x5850af,_0x3eae41,_0x35197e,_0x2c421c,_0x30f1b4){let _0x4e52a7=null,_0x54b41d=null,_0x2b4d0a=0x0;const _0x28f694=this['editor']['model'];for(let _0x374f70=0x0;_0x374f70<_0x3eae41['length'];_0x374f70++){const _0x5dfde2=this['_getVidAttributeName'](_0x3eae41[_0x374f70]),_0xe52493=_0x3eae41[_0x374f70]['item']['getAttribute'](_0x5dfde2),_0x4069e5=_0x35197e['get'](_0xe52493),_0x47d802=_0x374f70==_0x3eae41['length']-0x1;(!_0x4e52a7&&_0x4069e5&&(_0x4e52a7=_0x4069e5,_0x54b41d=_0x3eae41[_0x374f70]),_0x4e52a7&&(!_0x4069e5||_0x4069e5['userId']!=_0x4e52a7['userId']))&&(_0x36f0a7(_0x4069e5,mt(_0x54b41d,_0x5850af,_0x28f694),mt(_0x3eae41[_0x374f70],_0x5850af,_0x28f694)),_0x4e52a7=_0x4069e5||null,_0x54b41d=_0x4069e5?_0x3eae41[_0x374f70]:null),_0x4e52a7&&_0x47d802&&_0x36f0a7(_0x4069e5,mt(_0x54b41d,_0x5850af,_0x28f694),pt(_0x3eae41[_0x374f70],_0x5850af,_0x28f694));}function _0x36f0a7(_0x50243e,_0x4345de,_0x3e580c){const _0x55b49=_0x4e52a7['userId'],_0x1344ae='revision:'+_0x2c421c+':'+_0x55b49+':'+_0x2b4d0a++,_0x42d8df=_0x28f694['createRange'](_0x4345de,_0x3e580c);_0x5850af['markers']['set'](_0x1344ae,_0x42d8df),null!==_0x55b49&&_0x30f1b4['add'](_0x55b49);}}['_getVidAttributeName'](_0x46068d){switch(_0x46068d['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x12cf26,_0x38bb9e){_0x12cf26['baseVersion']=null;for(const _0x16d468 in _0x12cf26){const _0x34a8ae=_0x12cf26[_0x16d468];if(_0x34a8ae instanceof _0x10f6fa){const _0x1678ed=_0x38bb9e['get'](_0x34a8ae['root']['rootName']);_0x12cf26[_0x16d468]=this['_fixPosition'](_0x34a8ae,_0x1678ed);}if(_0x34a8ae instanceof _0xa8802c){const _0x4065d7=_0x38bb9e['get'](_0x34a8ae['root']['rootName']);_0x12cf26[_0x16d468]=this['_fixRange'](_0x34a8ae,_0x4065d7);}'root'===_0x16d468&&(_0x12cf26['root']=_0x38bb9e['get'](_0x12cf26['root']['rootName']));}}['_fixRange'](_0x22c10a,_0x28db87){return this['editor']['model']['createRange'](this['_fixPosition'](_0x22c10a['start'],_0x28db87),this['_fixPosition'](_0x22c10a['end'],_0x28db87));}['_fixPosition'](_0x1dab09,_0x3d987a){return this['editor']['model']['createPositionFromPath'](_0x3d987a,_0x1dab09['path'],_0x1dab09['stickiness']);}['_handleInsertOperation'](_0x15e7c2){const _0x5511fb=this['_idsRoots']['get'](_0x15e7c2['position']['root']['rootName']),_0x21d529=this['_fixPosition'](_0x15e7c2['position'],_0x5511fb),_0x9e9774=null===_0x15e7c2['_authorId']?null:_0x15e7c2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3ab51c=_0x21d529['parent'],_0xd16ecc=this['_revisionId'],_0x4521d7=[];for(const _0xd4730f of _0x15e7c2['nodes'])if(_0xd4730f['is']('element'))_0x4521d7['push'](this['_makeIdsRoot'](_0xd4730f));else{for(let _0x3cea2e=0x0;_0x3cea2e<_0xd4730f['offsetSize'];_0x3cea2e++)_0x4521d7['push'](new _0x46d26f('$text',{'vid':this['_revisionId']++}));}const _0xa5968c=this['_revisionId'];for(let _0x3010f3=_0xd16ecc;_0x3010f3<_0xa5968c;_0x3010f3++)this['_touched']['set'](_0x3010f3,{'userId':_0x9e9774});_0x3ab51c['_insertChild'](_0x21d529['offset'],_0x4521d7);}['_handleMoveOperation'](_0x41fd63){(_0x41fd63=this['_cloneOperation'](_0x41fd63,this['_idsRoots']))['_execute']();const _0xb4d941=null===_0x41fd63['_authorId']?null:_0x41fd63['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4bb2c9=_0x41fd63['getMovedRangeStart'](),_0x40c354=_0x4bb2c9['parent'],_0x4fc2dd=_0x4bb2c9['offset'];!function _0xd00e9c(_0x26143d,_0x3128cc,_0x2384b0,_0x4778db){for(let _0xaf4fca=_0x2384b0;_0xaf4fca<_0x4778db;_0xaf4fca++){const _0x3b2859=_0x3128cc['getChild'](_0xaf4fca);_0x3b2859['is']('element','$text')?_0x26143d['set'](_0x3b2859['getAttribute']('vid'),{'userId':_0xb4d941}):(_0x26143d['set'](_0x3b2859['getAttribute']('vid_start'),{'userId':_0xb4d941}),_0xd00e9c(_0x26143d,_0x3b2859,0x0,_0x3b2859['childCount']),_0x26143d['set'](_0x3b2859['getAttribute']('vid_end'),{'userId':_0xb4d941}));}}(this['_touched'],_0x40c354,_0x4fc2dd,_0x4fc2dd+_0x41fd63['howMany']);}['_handleMergeOperation'](_0x3ba458){const _0x5e020f=null===(_0x3ba458=this['_cloneOperation'](_0x3ba458,this['_idsRoots']))['_authorId']?null:_0x3ba458['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3c7e0a=_0x3ba458['targetPosition']['parent'],_0x3f042f=_0x3ba458['sourcePosition']['parent'],_0x441931=_0x3c7e0a['getAttribute']('vid_end'),_0x584552=_0x3f042f['getAttribute']('vid_start');_0x3c7e0a['_setAttribute']('vid_end',_0x3f042f['getAttribute']('vid_end')),_0x3f042f['_setAttribute']('vid_end',_0x441931),this['_touched']['set'](_0x584552,{'userId':_0x5e020f}),this['_touched']['set'](_0x441931,{'userId':_0x5e020f}),_0x3ba458['_execute']();}['_handleSplitOperation'](_0x180775){const _0x46bd48=null===(_0x180775=this['_cloneOperation'](_0x180775,this['_idsRoots']))['_authorId']?null:_0x180775['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x414665=_0x180775['graveyardPosition'],_0x5f3f48=_0x180775['splitPosition']['parent'];_0x180775['_execute']();const _0x566450=_0x5f3f48['getAttribute']('vid_end'),_0x5020eb=_0x180775['insertionPosition']['nodeAfter'];if(_0x414665){const _0x4fdc97=_0x5020eb['getAttribute']('vid_end'),_0x22afc5=_0x5f3f48['getAttribute']('vid_end');_0x5f3f48['_setAttribute']('vid_end',_0x4fdc97),_0x5020eb['_setAttribute']('vid_end',_0x22afc5),this['_touched']['set'](_0x5f3f48['getAttribute']('vid_end'),{'userId':_0x46bd48}),this['_touched']['set'](_0x5020eb['getAttribute']('vid_start'),{'userId':_0x46bd48});}else{const _0x28ca35=this['_revisionId']++,_0x10808f=this['_revisionId']++;_0x5f3f48['_setAttribute']('vid_end',_0x28ca35),_0x5020eb['_setAttribute']('vid_start',_0x10808f),_0x5020eb['_setAttribute']('vid_end',_0x566450),this['_touched']['set'](_0x28ca35,{'userId':_0x46bd48}),this['_touched']['set'](_0x10808f,{'userId':_0x46bd48});}}['_handleMarkerOperation'](_0x4d5f2c){if(!_0x4d5f2c['affectsData'])return;const _0x25fe3c=(_0x4d5f2c=this['_cloneOperation'](_0x4d5f2c,this['_diffRoots']))['oldRange']?_0x4d5f2c['oldRange']['root']:null,_0x4ea0f1=_0x4d5f2c['newRange']?_0x4d5f2c['newRange']['root']:null;_0x25fe3c&&this['_markers']['delete'](_0x4d5f2c['name']),_0x4ea0f1&&this['_markers']['set'](_0x4d5f2c['name'],_0x4d5f2c['newRange']['clone']());const _0x5e25b0=null===_0x4d5f2c['_authorId']?null:_0x4d5f2c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x36a9c4=_0x4d5f2c['name'];if(!this['_touchedMarkers']['has'](_0x36a9c4))return void this['_touchedMarkers']['set'](_0x36a9c4,{'range':_0x4d5f2c['oldRange'],'userId':_0x5e25b0});const _0x5ee2df=this['_touchedMarkers']['get'](_0x36a9c4),_0x5b806f=_0x5ee2df['range'],_0x3e57db=_0x4d5f2c['newRange'];null==_0x5b806f&&null==_0x3e57db||_0x5b806f&&_0x3e57db&&_0x5b806f['isEqual'](_0x3e57db)?this['_touchedMarkers']['delete'](_0x4d5f2c['name']):_0x5ee2df['userId']=_0x5e25b0;}['_handleRootOperation'](_0x29a9e2,_0x37652){this['_diffRoots']['has'](_0x29a9e2['rootName'])?this['_diffRoots']['get'](_0x29a9e2['rootName'])['_isAttached']=_0x29a9e2['isAdd']:(this['_diffRoots']['set'](_0x29a9e2['rootName'],wt(_0x29a9e2['rootName'],_0x29a9e2['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x29a9e2['rootName'],{}),_0x37652&&this['_idsRoots']['set'](_0x29a9e2['rootName'],wt(_0x29a9e2['rootName'],_0x29a9e2['elementName'],!0x0)));const _0x1bde0f=null===_0x29a9e2['_authorId']?null:_0x29a9e2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31661c=this['_touchedRoots']['get'](_0x29a9e2['rootName']);_0x31661c&&_0x31661c['userId']===_0x1bde0f?this['_touchedRoots']['delete'](_0x29a9e2['rootName']):this['_touchedRoots']['set'](_0x29a9e2['rootName'],{'userId':_0x1bde0f,'isAttached':_0x29a9e2['isAdd']});}['_handleRootAttributeOperation'](_0x482cd0){const _0x53a3c7=this['_diffRootsAttributes']['get'](_0x482cd0['root']['rootName']);null===_0x482cd0['newValue']?delete _0x53a3c7[_0x482cd0['key']]:_0x53a3c7[_0x482cd0['key']]=_0x482cd0['newValue'];}}function gt(_0x5b7250){const _0x6e69ca=wt(_0x5b7250['rootName'],_0x5b7250['name'],_0x5b7250['isAttached']());for(const _0xe954d5 of _0x5b7250['getChildren']()){const _0x279586=_0xe954d5['_clone'](!0x0);_0x6e69ca['_appendChild'](_0x279586);}return _0x6e69ca;}function wt(_0x5cfaa0,_0x3ffb37,_0x4de986=!0x0){const _0x5301ff=new _0x59fcbe();return _0x5301ff['rootName']=_0x5cfaa0,_0x5301ff['name']=_0x3ffb37,_0x5301ff['_isAttached']=_0x4de986,_0x5301ff['isAttached']=()=>_0x5301ff['_isAttached'],_0x5301ff;}function mt(_0x5a0253,_0x58073d,_0x478435){const _0x5bea26='elementEnd'==_0x5a0253['type']?_0x478435['createPositionAt'](_0x5a0253['item'],'end'):_0x478435['createPositionBefore'](_0x5a0253['item']);return _0x478435['createPositionFromPath'](_0x58073d,_0x5bea26['path'],_0x5bea26['stickiness']);}function pt(_0xd0b542,_0x413ef8,_0x51d605){const _0xc66955='elementStart'==_0xd0b542['type']?_0x51d605['createPositionAt'](_0xd0b542['item'],0x0):_0x51d605['createPositionAfter'](_0xd0b542['item']);return _0x51d605['createPositionFromPath'](_0x413ef8,_0xc66955['path'],_0xc66955['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
25
- _0x151f05(_0xafec90){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0xfe7fa8,_0x339212){super(_0xfe7fa8),this['focusTracker']=new _0x28ca2c(),this['keystrokes']=new _0x2f638f(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x339212),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'](),_0x33eb0a({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x26f1e1=_0x3ec8c0=>_0x3ec8c0['stopPropagation']();this['keystrokes']['set']('arrowright',_0x26f1e1),this['keystrokes']['set']('arrowleft',_0x26f1e1),this['keystrokes']['set']('arrowup',_0x26f1e1),this['keystrokes']['set']('arrowdown',_0x26f1e1);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x4d3635){this['revisionNameInputView']['fieldView']['element']['value']=_0x4d3635['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x5890ab){const _0x161b39=new _0x17e56b(this['locale'],_0x238b41),_0x1eb624=_0x161b39['fieldView'];_0x1eb624['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x590dff=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x5890ab&&(_0x590dff+='\x20('+ft(this['locale'],'optional')+')'),(_0x161b39['label']=_0x590dff,_0x1eb624['on']('input',()=>{this['revisionNameInputValue']=_0x1eb624['element']['value']['trim']();}),_0x161b39);}}class RevisionHistoryUI extends _0x538071{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x38749d=this['editor'],_0x28c204=_0x38749d['plugins']['get']('RevisionTracker');_0x38749d['ui']['componentFactory']['add']('revisionHistory',_0x3cbb7c=>{const _0x3378a2=_0x182132(_0x3cbb7c),_0x46b311=_0x3378a2['panelView']['children'],_0x5cfb71=new _0x44c12a(_0x3cbb7c),_0x57f7bb=new _0x4582a8(_0x3cbb7c),_0x17e2b8=this['_createSaveRevisionButton'](_0x135801),_0x168889=new _0x4582a8(_0x3cbb7c),_0x1aec2b=this['_createOpenRevisionButton'](_0x135801);return _0x3378a2['bind']('isEnabled')['to'](_0x28c204,'isReady',_0x28c204,'isEnabled',_0x38749d,'isReadOnly',(_0x3a8b78,_0x280dc1,_0x2c94fa)=>_0x3a8b78&&_0x280dc1&&!_0x2c94fa),_0x3378a2['buttonView']['set']({'icon':_0x5ea9e8,'label':ft(_0x3cbb7c,'Revision\x20history'),'tooltip':!0x0}),_0x17e2b8['set']({'withText':!0x0,'role':'menuitem'}),_0x1aec2b['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x1aec2b,'execute',()=>{_0x3378a2['isOpen']=!0x1,_0x38749d['editing']['view']['focus']();},{'priority':'low'}),_0x57f7bb['children']['add'](_0x17e2b8),_0x168889['children']['add'](_0x1aec2b),_0x5cfb71['role']='menu',_0x5cfb71['items']['addMany']([_0x57f7bb,_0x168889]),_0x46b311['add'](_0x5cfb71),_0x3378a2;}),_0x38749d['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x4f0c61=this['editor'],_0x453a89=_0x4f0c61['locale'],_0x453312=_0x4f0c61['plugins']['get']('RevisionTracker'),_0x896a83=new _0x48deab(_0x453a89),_0x593d62=new _0x41b7d1(_0x453a89);_0x896a83['bind']('isEnabled')['to'](_0x453312,'isReady',_0x453312,'isEnabled',_0x4f0c61,'isReadOnly',(_0x471ca6,_0x3f96a0,_0x4d4944)=>_0x471ca6&&_0x3f96a0&&!_0x4d4944),_0x896a83['buttonView']['set']({'icon':_0x5ea9e8,'label':ft(_0x453a89,'Revision\x20history')});const _0x2608c4=new tt(_0x453a89,_0x896a83),_0x495459=this['_createSaveRevisionButton'](it);_0x495459['delegate']('execute')['to'](_0x896a83),_0x2608c4['children']['add'](_0x495459),_0x593d62['items']['add'](_0x2608c4);const _0x1eb7eb=new tt(_0x453a89,_0x896a83),_0x271a18=this['_createOpenRevisionButton'](it);return _0x271a18['delegate']('execute')['to'](_0x896a83),_0x1eb7eb['children']['add'](_0x271a18),_0x593d62['items']['add'](_0x1eb7eb),_0x896a83['panelView']['children']['add'](_0x593d62),_0x896a83;}['_createSaveRevisionButton'](_0x5398a5){const _0x4a5261=this['editor'],_0x3534d4=_0x4a5261['plugins']['get']('RevisionTracker'),_0x2315b6=new _0x5398a5(_0x4a5261['locale']);return _0x2315b6['set']({'label':ft(_0x4a5261['locale'],'Save\x20current\x20revision')}),_0x2315b6['bind']('isEnabled')['to'](_0x3534d4,'isReady',_0x3534d4,'isEnabled',_0x4a5261,'isReadOnly',(_0x95cec3,_0x2c45f1,_0x2e4e40)=>_0x95cec3&&_0x2c45f1&&!_0x2e4e40),this['listenTo'](_0x2315b6,'execute',()=>{this['_showDialog']();}),_0x2315b6;}['_createOpenRevisionButton'](_0x10ddf7){const _0xbdf08=this['editor'],_0x1baffd=_0xbdf08['plugins']['get']('RevisionTracker'),_0x552029=new _0x10ddf7(_0xbdf08['locale']);return _0x552029['set']({'label':ft(_0xbdf08['locale'],'Open\x20revision\x20history')}),_0x552029['bind']('isEnabled')['to'](_0x1baffd,'isReady',_0xbdf08,'isReadOnly',(_0x284df5,_0x76b3bf)=>_0x284df5&&!_0x76b3bf),this['listenTo'](_0x552029,'execute',()=>{_0xbdf08['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x552029;}['_showDialog'](){const _0x3f0b7b=this['editor'],_0x31111e=_0x3f0b7b['locale'],_0x39f321=_0x3f0b7b['plugins']['get']('Dialog'),_0x1583e2=_0x3f0b7b['plugins']['get']('RevisionTracker');function _0x182f40(_0x248563){_0x3f0b7b['config']['get']('revisionHistory.requireRevisionName')&&''===_0x248563['revisionName']?_0x248563['revisionNameInputView']['errorText']=ft(_0x31111e,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x3f0b7b['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x248563['revisionName']}),_0x39f321['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x182f40(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x39f321['show']({'id':'revisionSave','title':ft(_0x31111e,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x3f0b7b['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x39f321['hide']()},{'label':ft(_0x3f0b7b['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x287ee1){_0x287ee1['bind']('isEnabled')['to'](_0x1583e2,'isReady',_0x1583e2,'isEnabled',_0x3f0b7b,'isReadOnly',(_0x3874b8,_0x925459,_0x5e95f3)=>_0x3874b8&&_0x925459&&!_0x5e95f3);},'onExecute':()=>_0x182f40(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0xfd874e=this['editor'],_0x3870b5=_0xfd874e['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x3870b5,_0xfd874e['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0xafec90{['changeId'];['_model'];constructor(_0x443e51,_0x59f26b){super(_0x443e51),this['_model']=_0x59f26b,this['changeId']=_0x59f26b['id'];const _0x7e2ecb=this['bindTemplate'],_0x1757e6=ft(_0x443e51,_0x59f26b['data']['isSuggestion']?'Suggested\x20by':'add'==_0x59f26b['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x59f26b['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x7e2ecb['to']('type',_0x18732f=>'ck-revision-change__'+_0x18732f)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x1757e6}]},{'text':'\x20'+_0x59f26b['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
26
- _0xf684e0(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x37dd15){super(),this['id']=_0x37dd15['id']||_0x51ceb2(),this['author']=_0x37dd15['author'],this['type']=_0x37dd15['type'],this['data']=_0x37dd15['data']||{},this['rootName']=_0x37dd15['rootName'],this['set']('createdAt',_0x37dd15['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x3029fd,_0x28b2cc){this['newRevisionId']=_0x3029fd,this['oldRevisionId']=_0x28b2cc,this['changes']=new _0x3625c9();}['_setChanges'](_0x134fe2){for(const _0x405e3d of _0x134fe2)this['changes']['add'](_0x405e3d);}}class RevisionViewer extends _0x538071{['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[_0x2baa1d,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x1f6b81){super(_0x1f6b81),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',(_0x2e70a3,_0x44c010,_0x48f2ea)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x8940e5=>{for(const _0x19b166 of this['editor']['editing']['view']['document']['roots'])_0x48f2ea?_0x8940e5['removeClass']('ck-editor__editable__overlay',_0x19b166):_0x8940e5['addClass']('ck-editor__editable__overlay',_0x19b166);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1b2c12=>null!==_0x1b2c12),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5cb3da,_0xa89e5c,_0x3022cf)=>_0x5cb3da&&_0x3022cf?_0xa89e5c['changes']['getIndex'](_0x3022cf):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x44925d,_0xe3fdb3)=>_0x44925d?_0xe3fdb3['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x13e5eb=this['editor'],_0x25d4a2=new ShowChangeCommand(_0x13e5eb,{'direction':'backward'}),_0x310e10=new ShowChangeCommand(_0x13e5eb,{'direction':'forward'});(_0x13e5eb['commands']['add']('showPreviousChange',_0x25d4a2),_0x13e5eb['commands']['add']('showNextChange',_0x310e10),_0x13e5eb['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x13e5eb)),this['on']('change:numberOfChanges',()=>{_0x25d4a2['refresh'](),_0x310e10['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x13e5eb['enableReadOnlyMode']('revision-viewer'),_0x13e5eb['plugins']['has']('WidgetToolbarRepository'))&&_0x13e5eb['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x4815ad){return await this['_utils']['loadRevisionData'](_0x4815ad,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4815ad);}async['getRevisionRootsAttributes'](_0x250cc2){return await this['_utils']['loadRevisionData'](_0x250cc2,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x250cc2);}async['compare'](_0x4af679,_0x2df7c2,_0x5747a4=!0x1){if(!this['isEnabled'])return;const _0x14688f=this['diff'],_0x1138f5=this['repository'],_0x35aa88='string'==typeof _0x4af679?_0x1138f5['getRevision'](_0x4af679):_0x4af679,_0x588858='string'==typeof _0x2df7c2?_0x1138f5['getRevision'](_0x2df7c2):_0x2df7c2,_0x4e156b=_0x35aa88['id'],_0x342c79=_0x588858?_0x588858['id']:null;if(!_0x5747a4&&this['diff']&&this['diff']['newRevisionId']===_0x4e156b&&this['diff']['oldRevisionId']===_0x342c79)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x4e156b,_0x342c79);const _0x474d5d=this['_getRevisionsRange'](_0x35aa88,_0x588858,!0x0)['map'](_0x22c3bc=>this['_utils']['loadRevisionData'](_0x22c3bc,this['adapter']));return _0x474d5d['push'](new Promise(_0xa5bdad=>{setTimeout(_0xa5bdad,0x14);})),Promise['all'](_0x474d5d)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x17d443=this['_getDiff'](_0x4e156b,_0x342c79);for(const _0x360094 of _0x17d443['changes'])this['_changeIdToChange']['set'](_0x360094['id'],_0x360094);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5835cd=>{for(const _0xb8cba5 of this['editor']['model']['document']['getRootNames']())_0x5835cd['detachRoot'](_0xb8cba5);for(const _0x568b63 of Object['keys'](_0x17d443['model'])){const _0x158d70=_0x17d443['model'][_0x568b63]['name'],_0x578e8d=_0x5835cd['addRoot'](_0x568b63,_0x158d70);for(const _0x102a85 of Object['keys'](_0x17d443['attributes'][_0x568b63]))_0x5835cd['setAttribute'](_0x102a85,_0x17d443['attributes'][_0x568b63][_0x102a85],_0x578e8d);_0x5835cd['insert'](_0x17d443['model'][_0x568b63],_0x578e8d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x17d443['changes'])),this['isReady']=!0x0;})['catch'](_0x7b6451=>{console['error'](_0x7b6451),this['_cleanUp'](),_0x14688f&&(this['diff']=_0x14688f),this['isReady']=!0x0;});}['addRevisionData'](_0x46b69d,_0x507b66){const _0x5b1fe7=this['repository']['createRevision'](_0x46b69d);return _0x5b1fe7['on']('_update',(_0x2384ef,_0x2f9ced,_0x24b795)=>_0x507b66(_0x2f9ced,_0x24b795,_0x5b1fe7)),this['repository']['addRevision'](_0x5b1fe7),_0x5b1fe7;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x439218=>{for(const _0x451e15 of this['editor']['model']['document']['getRootNames']())_0x439218['detachRoot'](_0x451e15);});}['_sortAndFilterDiffChanges'](_0x228591){const _0x2ae375=[],_0xcd331c=new Map();for(const _0x26baf4 of this['editor']['model']['document']['getRootNames']()){const _0x4fb61e=this['editor']['editing']['view']['getDomRoot'](_0x26baf4);if(!_0x4fb61e)continue;const _0x1f20a0=_0x4fb61e['getClientRects']()['item'](0x0);_0x1f20a0&&(_0x2ae375['push'](_0x26baf4),_0xcd331c['set'](_0x26baf4,_0x1f20a0));}return _0x2ae375['sort']((_0x5c7636,_0x37b74a)=>{const _0x41b7b4=_0xcd331c['get'](_0x5c7636),_0x13697c=_0xcd331c['get'](_0x37b74a);return _0x41b7b4['y']-_0x13697c['y']||_0x41b7b4['x']-_0x13697c['x'];}),(_0x228591=_0x228591['filter'](_0x5ed611=>_0x2ae375['includes'](_0x5ed611['rootName'])))['sort']((_0x2392cb,_0x2d3ed0)=>_0x2ae375['indexOf'](_0x2392cb['rootName'])-_0x2ae375['indexOf'](_0x2d3ed0['rootName'])),_0x228591;}['_makeTape'](_0x585f2f){const _0x1cf1ec=Array['from'](_0x585f2f['markers'])['filter'](([_0x2c51ed,_0x5f0504])=>_0x2c51ed['startsWith']('revision:')&&!_0x5f0504['isCollapsed']),_0x506e7=Array['from'](this['editor']['model']['createRangeIn'](_0x585f2f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1cf1ec['length'])for(const _0x12eafa of _0x506e7){const [_0x349f54,_0x5860b1]=_0x1cf1ec[0x0],[,_0x3da456,_0x56982a]=_0x349f54['split'](':');if(_0x5860b1['end']['isEqual'](_0x12eafa['nextPosition'])&&_0x1cf1ec['shift'](),(_0x12eafa['previousPosition']['isEqual'](_0x5860b1['start'])||_0x12eafa['previousPosition']['isAfter'](_0x5860b1['start']))&&('insertion'==_0x3da456?_0x12eafa['isAdded']={'userId':_0x56982a}:'deletion'==_0x3da456&&(_0x12eafa['isRemoved']={'userId':_0x56982a})),0x0==_0x1cf1ec['length'])break;}return _0x506e7;}['_refreshStartEndIndex'](_0x4884d4){const _0x217dc0=new Map();for(let _0x57d5de=0x0;_0x57d5de<_0x4884d4['length'];_0x57d5de++)'text'===_0x4884d4[_0x57d5de]['type']?(_0x4884d4[_0x57d5de]['item']['startIndex']=_0x57d5de,_0x4884d4[_0x57d5de]['item']['endIndex']=_0x57d5de):('elementStart'===_0x4884d4[_0x57d5de]['type']?_0x4884d4[_0x57d5de]['item']['startIndex']=_0x57d5de:'elementEnd'===_0x4884d4[_0x57d5de]['type']&&(_0x4884d4[_0x57d5de]['item']['endIndex']=_0x57d5de),_0x217dc0['set'](_0x4884d4[_0x57d5de]['id'],_0x57d5de));for(const _0x298dce of _0x217dc0['values']())'elementStart'===_0x4884d4[_0x298dce]['type']?_0x4884d4[_0x298dce]['item']['endIndex']=_0x217dc0['get'](_0x4884d4[_0x298dce]['pairId']):'elementEnd'===_0x4884d4[_0x298dce]['type']&&(_0x4884d4[_0x298dce]['item']['startIndex']=_0x217dc0['get'](_0x4884d4[_0x298dce]['pairId']));}['_processTape'](_0x193b02){for(let _0x562603=0x0;_0x562603<_0x193b02['length'];_0x562603++){if('elementStart'===_0x193b02[_0x562603]['type'])_0x193b02[_0x562603]['item']['startIndex']=_0x562603;else{if('elementEnd'===_0x193b02[_0x562603]['type']){_0x193b02[_0x562603]['item']['endIndex']=_0x562603;const _0x5af6f2=_0x193b02[_0x562603]['item']['startIndex'];_0x193b02[_0x5af6f2]['pairId']=_0x193b02[_0x562603]['id'],_0x193b02[_0x562603]['pairId']=_0x193b02[_0x5af6f2]['id'];}else _0x193b02[_0x562603]['item']['startIndex']=_0x562603,_0x193b02[_0x562603]['item']['endIndex']=_0x562603,_0x193b02[_0x562603]['pairId']=null;}_0x193b02[_0x562603]['markersStart']||(_0x193b02[_0x562603]['markersStart']=[],_0x193b02[_0x562603]['markersEnd']=[]);}}['_markInsertions'](_0x2c16d4,_0x21d65c){const _0x5adc1d=_0x2c16d4['filter'](_0x57b230=>!_0x57b230['isAdded']);for(let _0x17b966=0x0;_0x17b966<_0x21d65c['length'];_0x17b966++)_0x21d65c[_0x17b966]['isAdded']&&(_0x5adc1d[_0x17b966]['isAdded']=_0x21d65c[_0x17b966]['isAdded']);}['_getDiff'](_0x24654d,_0x2513c7=null){const _0x132981=this['repository']['getRevision'](_0x24654d),_0x29e9e3=_0x2513c7?this['repository']['getRevision'](_0x2513c7):null,_0x479c93=this['_getRevisionsRange'](_0x132981,_0x29e9e3),_0x451e3f=_0x479c93[_0x479c93['length']-0x1],_0x498bb6=new Map(),_0x4602b={'model':{},'attributes':{},'changes':[]},_0x484ac1=new Set(),_0x11d5c0=new Map();for(let _0x75bee4=_0x479c93['length']-0x1;_0x75bee4>=0x0;_0x75bee4--){const _0x44d253=_0x479c93[_0x75bee4];for(const _0x226559 of Object['keys'](_0x44d253['diffData']))if(_0x44d253['diffData'][_0x226559]['attachChange']){const _0x2daa82=_0x44d253['diffData'][_0x226559]['attachChange'];_0x2daa82['isAttached']?(_0x484ac1['add'](_0x226559),_0x11d5c0['has'](_0x226559)&&_0x11d5c0['get'](_0x226559)['userId']==_0x2daa82['userId']?_0x11d5c0['delete'](_0x226559):_0x11d5c0['set'](_0x226559,_0x2daa82)):_0x11d5c0['has'](_0x226559)?(_0x484ac1['delete'](_0x226559),_0x11d5c0['delete'](_0x226559)):(_0x484ac1['add'](_0x226559),_0x11d5c0['set'](_0x226559,_0x2daa82));}else _0x484ac1['add'](_0x226559);}for(const _0x6b1811 of _0x484ac1){const _0x1c2c98=_0x11d5c0['has'](_0x6b1811)&&!_0x11d5c0['get'](_0x6b1811)['isAttached'];let _0x56b2c3=_0x1c2c98?_0x479c93['length']-0x1:0x0;const _0x2e0135=_0x1c2c98?-0x1:0x1;for(;_0x479c93[_0x56b2c3];){const _0x19fe49=_0x479c93[_0x56b2c3];if(_0x19fe49['diffData'][_0x6b1811]){const _0xbe2521=_0x1c2c98?_0x19fe49['diffData'][_0x6b1811]['attributesBefore']:_0x19fe49['diffData'][_0x6b1811]['attributesAfter'];_0x4602b['attributes'][_0x6b1811]=_0xbe2521?_0x8c5550(_0xbe2521):{};break;}_0x56b2c3+=_0x2e0135;}}for(const _0x44761b of _0x479c93){_0x44761b['model']={};for(const _0x11c5d4 of _0x44761b['authors'])_0x498bb6['set'](_0x11c5d4['id'],_0x11c5d4);for(const _0x19ed31 of _0x484ac1){const _0x4c14b7=_0x44761b['diffData'][_0x19ed31]?_0x44761b['diffData'][_0x19ed31]['insertions']:'[]',_0x345575=_0x44761b['diffData'][_0x19ed31]?_0x44761b['diffData'][_0x19ed31]['deletions']:'[]',_0x34c947=_0x44761b['diffData'][_0x19ed31]?.['rootElementName']||'$root';_0x44761b['model'][_0x19ed31]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4c14b7,_0x34c947),'deletions':this['_utils']['_makeModelFromViewString'](_0x345575,_0x34c947)};}}for(const _0x4e0e14 of _0x484ac1){let _0x4c5c6e=null,_0x101c51=0x0;const _0x12fd16=_0x479c93['map'](_0x81b411=>_0x81b411['diffData'][_0x4e0e14]?.['rootElementName'])['find'](_0x5ae716=>void 0x0!==_0x5ae716)||'$root',_0x11e7cc=new Map(Array['from'](_0x132981['model'][_0x4e0e14]['insertions']['markers'])['filter'](([_0x3ea4c2])=>!_0x3ea4c2['startsWith']('revision:')));let _0x1ee92f=0x0;for(const _0x38f7b9 of _0x479c93){const _0xb67f69=this['_makeTape'](_0x38f7b9['model'][_0x4e0e14]['insertions']);_0x38f7b9==_0x132981?(_0x4c5c6e=_0xb67f69,_0x101c51=_0x4c5c6e['length'],_0x4c5c6e['forEach'](_0x12298a=>{_0x12298a['id']=_0x1ee92f++;}),this['_processTape'](_0x4c5c6e)):this['_markInsertions'](_0x4c5c6e,_0xb67f69);const _0xd2c30c=_0x4c5c6e['filter'](_0x352f6d=>!_0x352f6d['isAdded'])['map'](_0x45d26f=>_0x45d26f['id']);let _0x43dba3=0x0;const _0x572f28=this['_makeTape'](_0x38f7b9['model'][_0x4e0e14]['deletions']);_0x572f28['forEach'](_0x18a67f=>{_0x18a67f['isRemoved']?_0x18a67f['id']=_0x101c51++:_0x18a67f['id']=_0xd2c30c[_0x43dba3++];}),this['_processTape'](_0x572f28),this['_setDistance'](_0x4c5c6e,'isAdded'),this['_setDistance'](_0x572f28,'isRemoved'),_0x38f7b9==_0x132981&&this['_markMarkers'](_0x4c5c6e,_0x11e7cc),_0x4c5c6e=this['_joinTapes'](_0x4c5c6e,_0x572f28),this['_refreshStartEndIndex'](_0x4c5c6e),this['_setDistance'](_0x4c5c6e,'isRemoved');}_0x4c5c6e=_0x4c5c6e['filter'](_0x252808=>!(_0x252808['isAdded']&&_0x252808['isRemoved']));const _0x4232eb=new Map(_0x451e3f['model'][_0x4e0e14]['deletions']['markers']),_0x8d1a1c=new Set(_0x11e7cc['keys']());for(const _0x27c90b of _0x4232eb['keys']())_0x8d1a1c['delete'](_0x27c90b);this['_markSuggestions'](_0x4c5c6e,_0x8d1a1c),this['_fixObsoleteTags'](_0x4c5c6e),_0x4c5c6e=this['_removeMissingPairs'](_0x4c5c6e),_0x4c5c6e=this['_markMismatchedRemovedTags'](_0x4c5c6e),_0x4c5c6e=this['_removeUnsupportedChanges'](_0x4c5c6e);const {root:_0x4ca19a,changes:_0x1fea3e}=this['_makeModelFromTape'](_0x4c5c6e,_0x498bb6,_0x4e0e14,_0x12fd16);_0x4602b['model'][_0x4e0e14]=_0x4ca19a;const _0x103ef3=_0x11d5c0['get'](_0x4e0e14);if(_0x103ef3){const _0x271619=_0x498bb6['get'](_0x103ef3['userId']),_0x1c7939=new ChangeItem({'author':_0x271619,'type':_0x103ef3['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4e0e14});_0x1fea3e['unshift'](_0x1c7939),_0x4602b['attributes'][_0x4e0e14]['revisionHistoryAttachChange']=_0x1c7939['id'];}_0x4602b['changes']=_0x4602b['changes']['concat'](_0x1fea3e);}return _0x4602b;}['_markMarkers'](_0x1f23fd,_0x49ed24){for(let _0xa0bf4c=0x0;_0xa0bf4c<_0x1f23fd['length'];_0xa0bf4c++)for(const [_0xf257f,_0x4ba272]of _0x49ed24)!_0x4ba272['isCollapsed']&&_0x4ba272['start']['isEqual'](_0x1f23fd[_0xa0bf4c]['previousPosition'])&&_0x1f23fd[_0xa0bf4c]['markersStart']['push'](_0xf257f),_0x4ba272['end']['isEqual'](_0x1f23fd[_0xa0bf4c]['nextPosition'])&&_0x1f23fd[_0xa0bf4c]['markersEnd']['push'](_0xf257f);}['_joinTapes'](_0x55c82b,_0x38ba99){let _0x3caae1=[],_0x14217f=0x0,_0x1160ee=0x0;for(;_0x14217f<_0x55c82b['length']||_0x1160ee<_0x38ba99['length'];){const _0x387726=_0x55c82b[_0x14217f]||{},_0x56df7f=_0x38ba99[_0x1160ee]||{};if(_0x387726['id']==_0x56df7f['id'])_0x14217f++,_0x1160ee++,_0x3caae1['push'](_0x387726);else{if(_0x56df7f['isRemoved']&&_0x387726['isAdded']){const {commonTape:_0x24aed7,iEnd:_0x534b36,jEnd:_0xc21037}=this['_threeWayMerge'](_0x55c82b,_0x14217f,_0x38ba99,_0x1160ee);_0x3caae1=_0x3caae1['concat'](_0x24aed7),_0x14217f=_0x534b36,_0x1160ee=_0xc21037;}else _0x56df7f['isRemoved']?(_0x1160ee++,_0x3caae1['push'](_0x56df7f)):(_0x14217f++,_0x3caae1['push'](_0x387726));}}return _0x3caae1;}['_markSuggestions'](_0x4c116a,_0x31e591){const _0x26dc55=[];for(let _0x451106=0x0;_0x451106<_0x4c116a['length'];_0x451106++){for(let _0x4cd69b=0x0;_0x4cd69b<_0x4c116a[_0x451106]['markersStart']['length'];_0x4cd69b++){const _0x463e98=_0x4c116a[_0x451106]['markersStart'][_0x4cd69b];if(!_0x31e591['has'](_0x463e98))continue;const {group:_0xed4190,type:_0x2611a1,authorId:_0xc19edd}=_0x36a5b8(_0x463e98);'revision-suggestion'!=_0xed4190||'insertion'!=_0x2611a1&&'deletion'!=_0x2611a1||(_0x26dc55['unshift']({'type':_0x2611a1,'name':_0x463e98,'userId':_0xc19edd}),_0x4c116a[_0x451106]['markersStart']['splice'](_0x4cd69b,0x1),_0x4cd69b--);}_0x49f12d(_0x4c116a[_0x451106]);for(let _0x16a0be=0x0;_0x16a0be<_0x4c116a[_0x451106]['markersEnd']['length'];_0x16a0be++){const _0x311343=_0x4c116a[_0x451106]['markersEnd'][_0x16a0be];if(!_0x31e591['has'](_0x311343))continue;const {group:_0xe621f6,type:_0x556335}=_0x36a5b8(_0x311343);if('revision-suggestion'!=_0xe621f6||'insertion'!=_0x556335&&'deletion'!=_0x556335)continue;_0x4c116a[_0x451106]['markersEnd']['splice'](_0x16a0be,0x1),_0x16a0be--;const _0x48cec3=_0x26dc55['findIndex'](_0x8d9591=>_0x8d9591['name']==_0x311343);_0x48cec3>-0x1&&_0x26dc55['splice'](_0x48cec3,0x1);}}function _0x36a5b8(_0x3d9a1a){const _0x2dfc41=_0x3d9a1a['split'](':');return{'group':_0x2dfc41[0x0],'type':_0x2dfc41[0x1],'subType':_0x2dfc41['length']>=0x5?_0x2dfc41[0x2]:null,'id':_0x2dfc41['length']<0x5?_0x2dfc41[0x2]:_0x2dfc41[0x3],'authorId':_0x2dfc41['length']<0x5?_0x2dfc41[0x3]:_0x2dfc41[0x4],'markerCount':0x6==_0x2dfc41['length']?_0x2dfc41[0x5]:null};}function _0x49f12d(_0x20cb22){for(let _0x552b0e=0x0;_0x552b0e<_0x26dc55['length'];_0x552b0e++){if(_0x20cb22['isAdded']&&'insertion'==_0x26dc55[_0x552b0e]['type']&&_0x20cb22['isAdded']['userId']==_0x26dc55[_0x552b0e]['userId'])return _0x20cb22['isAddSuggestion']=_0x26dc55[_0x552b0e],void delete _0x20cb22['isAdded'];if(!_0x20cb22['isAdded']&&!_0x20cb22['isRemoved']&&'deletion'==_0x26dc55[_0x552b0e]['type'])return void(_0x20cb22['isRemoveSuggestion']=_0x26dc55[_0x552b0e]);}}}['_setDistance'](_0x227e23,_0x1f81b2){let _0x19f6fc=0x0,_0x21efea=!0x1;const _0x4cd35c=new Map();for(const _0x1698c5 of _0x227e23)_0x1698c5[_0x1f81b2]?_0x21efea&&(_0x19f6fc++,_0x21efea=!0x1):(_0x19f6fc++,_0x21efea=!0x0),_0x4cd35c['set'](_0x1698c5['id'],_0x19f6fc);for(let _0x354ae6=0x0;_0x354ae6<_0x227e23['length'];_0x354ae6++){if('isRemoved'==_0x1f81b2&&_0x227e23[_0x354ae6]['isAdded']||'isAdded'==_0x1f81b2&&_0x227e23[_0x354ae6]['isRemoved'])continue;if('text'==_0x227e23[_0x354ae6]['type']){_0x227e23[_0x354ae6]['distance']=0x0;continue;}const _0x1732b8=_0x4cd35c['get'](_0x227e23[_0x354ae6]['pairId']),_0x16557d=_0x4cd35c['get'](_0x227e23[_0x354ae6]['id']);_0x227e23[_0x354ae6]['distance']=_0x1732b8-_0x16557d;}}['_getRevisionsRange'](_0x4d4d1d,_0x51a2f9,_0x2f2b1c=!0x1){const _0x1366ba=[];let _0x3b9789=this['repository']['getIndex'](_0x4d4d1d),_0x5a736f=this['repository']['getIndex'](_0x51a2f9);for(-0x1==_0x5a736f&&(_0x5a736f=this['repository']['_revisions']['length'],_0x2f2b1c=!0x1);_0x3b9789<_0x5a736f;)_0x1366ba['push'](this['repository']['getRevision'](_0x3b9789)),_0x3b9789++;return _0x2f2b1c&&_0x1366ba['push'](this['repository']['getRevision'](_0x3b9789)),_0x1366ba;}['_threeWayMerge'](_0x508ece,_0xef125e,_0x5d45da,_0x2029a0){const _0x6371a1=this['editor']['model']['schema'];let _0x5d745d=_0xef125e;for(;_0x508ece[_0x5d745d]&&_0x508ece[_0x5d745d]['isAdded'];)_0x5d745d++;let _0x240043=_0x2029a0;for(;_0x5d45da[_0x240043]&&_0x5d45da[_0x240043]['isRemoved'];)_0x240043++;_0x2f9b74(_0x508ece,_0xef125e,_0x5d745d),_0x2f9b74(_0x5d45da,_0x2029a0,_0x240043);const _0x1c5872=_0x5d45da['slice'](_0x2029a0,_0x240043)['concat'](_0x508ece['slice'](_0xef125e,_0x5d745d));return _0x1c5872['sort']((_0x92e18b,_0x4d72b1)=>_0x92e18b['side']!=_0x4d72b1['side']?_0x92e18b['side']-_0x4d72b1['side']:_0x92e18b['level']!=_0x4d72b1['level']?_0x92e18b['level']-_0x4d72b1['level']:_0x92e18b['distance']!=_0x4d72b1['distance']?_0x4d72b1['distance']-_0x92e18b['distance']:!!_0x92e18b['isAdded']!=!!_0x4d72b1['isAdded']?-0x1==_0x92e18b['side']||0x0==_0x92e18b['side']?_0x92e18b['isAdded']?-0x1:0x1:_0x92e18b['isAdded']?0x1:-0x1:_0x92e18b['index']-_0x4d72b1['index']),{'commonTape':_0x1c5872,'iEnd':_0x5d745d,'jEnd':_0x240043};function _0x2f9b74(_0x188a7c,_0x578f86,_0x480cb6){let _0x42a372=-0x1,_0x366020=Number['POSITIVE_INFINITY'],_0x51c75f=!0x0;for(let _0x3dfac7=_0x578f86;_0x3dfac7<_0x480cb6;_0x3dfac7++)if(_0x6371a1['isInline'](_0x188a7c[_0x3dfac7]['item'])||(_0x51c75f=!0x1),_0x188a7c[_0x3dfac7]['item']['startIndex']<_0x578f86&&(_0x42a372=_0x3dfac7),_0x188a7c[_0x3dfac7]['item']['endIndex']>=_0x480cb6){_0x366020=_0x3dfac7;break;}_0x51c75f&&(_0x42a372=_0x480cb6-0x1);for(let _0x375afa=_0x578f86;_0x375afa<_0x480cb6;_0x375afa++)_0x188a7c[_0x375afa]['side']=_0x375afa<=_0x42a372?-0x1:_0x375afa<_0x366020?0x0:0x1,_0x188a7c[_0x375afa]['index']=_0x375afa;let _0x46001b=0x0;for(let _0x31db8a=_0x578f86;_0x31db8a<=_0x42a372;_0x31db8a++)0x0==_0x188a7c[_0x31db8a]['distance']?_0x188a7c[_0x31db8a]['level']=_0x46001b:(_0x46001b++,_0x188a7c[_0x31db8a]['level']=_0x46001b,_0x46001b++);for(let _0x115e75=_0x578f86;_0x115e75<_0x480cb6;_0x115e75++)0x0==_0x188a7c[_0x115e75]['side']&&(_0x188a7c[_0x115e75]['level']=_0x46001b);_0x46001b=0x0;for(let _0x544949=_0x480cb6-0x1;_0x544949>=_0x366020;_0x544949--)0x0==_0x188a7c[_0x544949]['distance']?_0x188a7c[_0x544949]['level']=_0x46001b:(_0x46001b--,_0x188a7c[_0x544949]['level']=_0x46001b,_0x46001b--);}}['_fixObsoleteTags'](_0x271139){const _0x1a738c=new Map(),_0x302d73=this['editor']['model']['schema'];for(let _0x257544=0x1;_0x257544<_0x271139['length'];_0x257544++){let _0x420f3c,_0x2a80b3,_0x1f98fb;const _0x49a10e=_0x271139[_0x257544],_0x655fe2=_0x271139[_0x257544-0x1];if('text'==_0x49a10e['type'])continue;if(_0x49a10e['type']!=_0x655fe2['type'])continue;if(!_0x302d73['isBlock'](_0x655fe2['item'])||_0x302d73['isLimit'](_0x655fe2['item']))continue;if(!_0x302d73['isBlock'](_0x49a10e['item'])||_0x302d73['isLimit'](_0x49a10e['item']))continue;if((_0x271139[_0x257544]['isAdded']||_0x271139[_0x257544]['isAddSuggestion'])&&_0x271139[_0x257544-0x1]['isRemoved'])_0x420f3c=_0x271139[_0x257544],_0x2a80b3=_0x271139[_0x257544-0x1],_0x1f98fb=_0x257544-0x1;else{if(!_0x271139[_0x257544]['isRemoved']||!_0x271139[_0x257544-0x1]['isAdded']&&!_0x271139[_0x257544-0x1]['isAddSuggestion'])continue;_0x420f3c=_0x271139[_0x257544-0x1],_0x2a80b3=_0x271139[_0x257544],_0x1f98fb=_0x257544;}const _0x2d211d=_0x420f3c['level']==_0x2a80b3['level'],_0x4b2c86=Math['abs'](_0x420f3c['level'])<Math['abs'](_0x2a80b3['level'])&&0x0==_0x2a80b3['distance'];(_0x2d211d||_0x4b2c86)&&(_0x1a738c['set'](_0x2a80b3['id'],_0x420f3c['id']),_0x271139['splice'](_0x1f98fb,0x1),_0x257544--,_0x420f3c['isAdded']=!0x1);}for(let _0x2f3649=0x0;_0x2f3649<_0x271139['length'];_0x2f3649++)_0x1a738c['has'](_0x271139[_0x2f3649]['pairId'])&&(_0x271139[_0x2f3649]['pairId']=_0x1a738c['get'](_0x271139[_0x2f3649]['pairId']));}['_removeMissingPairs'](_0x30d36d){const _0x3b0fee=new Set(_0x30d36d['map'](_0x5912b5=>_0x5912b5['id']));for(let _0x203a9e=0x0;_0x203a9e<_0x30d36d['length'];_0x203a9e++)_0x3b0fee['has'](_0x30d36d[_0x203a9e]['pairId'])||0x0==_0x30d36d[_0x203a9e]['distance']||(_0x30d36d[_0x203a9e]['isIncorrect']=!0x0);return _0x30d36d['filter'](_0x41171=>!_0x41171['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5b39b8){const _0x3a5a86=new Set();for(let _0x309895=0x0;_0x309895<_0x5b39b8['length'];_0x309895++){if(_0x3a5a86['has'](_0x5b39b8[_0x309895]['id'])&&_0x5b39b8[_0x309895]['isRemoved']&&(_0x5b39b8[_0x309895]['isIncorrect']=!0x0),_0x5b39b8[_0x309895]['isIncorrect'])continue;if(0x0==_0x5b39b8[_0x309895]['distance'])continue;if('elementStart'!=_0x5b39b8[_0x309895]['type'])continue;if(null==_0x5b39b8[_0x309895]['pairId'])continue;let _0x42955a=_0x309895+0x1,_0x26a4c4=0x0;for(;_0x5b39b8[_0x42955a]['id']!=_0x5b39b8[_0x309895]['pairId'];)'elementStart'==_0x5b39b8[_0x42955a]['type']?_0x26a4c4++:'elementEnd'==_0x5b39b8[_0x42955a]['type']&&_0x26a4c4--,_0x42955a++;if(0x0!=_0x26a4c4){if(_0x5b39b8[_0x309895]['isRemoved'])_0x5b39b8[_0x309895]['isIncorrect']=!0x0;else{for(;_0x42955a!=_0x309895;)_0x5b39b8[_0x42955a]['isRemoved']&&0x0!=_0x5b39b8[_0x42955a]['distance']&&(_0x5b39b8[_0x42955a]['isIncorrect']=!0x0,_0x3a5a86['add'](_0x5b39b8[_0x42955a]['pairId'])),_0x42955a--;}}}return _0x5b39b8['filter'](_0x5e157f=>!_0x5e157f['isIncorrect']);}['_removeUnsupportedChanges'](_0x5c76d2){const _0x2dabd4=this['editor']['model']['schema'];for(let _0x16b180=0x0;_0x16b180<_0x5c76d2['length'];_0x16b180++){if(!(_0x5c76d2[_0x16b180]['isAdded']||_0x5c76d2[_0x16b180]['isAddSuggestion']||_0x5c76d2[_0x16b180]['isRemoved']||_0x5c76d2[_0x16b180]['isRemoveSuggestion']))continue;if(0x0==_0x5c76d2[_0x16b180]['distance'])continue;const _0x2e40b2=_0x5c76d2[_0x16b180]['item'];_0x2dabd4['isBlock'](_0x2e40b2)||_0x2dabd4['isLimit'](_0x2e40b2)||(_0x5c76d2[_0x16b180]['isAdded']&&delete _0x5c76d2[_0x16b180]['isAdded'],_0x5c76d2[_0x16b180]['isAddSuggestion']&&delete _0x5c76d2[_0x16b180]['isAddSuggestion'],_0x5c76d2[_0x16b180]['isRemoveSuggestion']&&delete _0x5c76d2[_0x16b180]['isRemoveSuggestion'],_0x5c76d2[_0x16b180]['isRemoved']&&(_0x5c76d2[_0x16b180]['isIncorrect']=!0x0));}return _0x5c76d2['filter'](_0x12986d=>!_0x12986d['isIncorrect']);}['_makeModelFromTape'](_0x1af85a,_0xa2c4a0,_0xca466f,_0x303001){const _0x277e01=new _0x59fcbe(),_0x19066b=[],_0x3feab7=new Map(),_0x1d2bba=this['editor']['model'],_0x2168ad=_0x1d2bba['schema'],_0x35b34d=[_0x277e01],_0xa6b095={},_0x5387f0={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x277e01['name']=_0x303001;let _0x251f82=null;const _0x5c1d67=[0x0];for(let _0x553d53=0x0;_0x553d53<_0x1af85a['length'];_0x553d53++)if('elementStart'===_0x1af85a[_0x553d53]['type']){_0x1af85a[_0x553d53]['previousPosition']=_0x1d2bba['createPositionFromPath'](_0x277e01,_0x5c1d67);const _0x5b2b27=new _0x46d26f(_0x1af85a[_0x553d53]['item']['name'],_0x1af85a[_0x553d53]['item']['getAttributes']());_0x35b34d[0x0]['_appendChild'](_0x5b2b27),_0x5c1d67['push'](0x0),_0x35b34d['unshift'](_0x5b2b27),_0x1af85a[_0x553d53]['nextPosition']=_0x1d2bba['createPositionFromPath'](_0x277e01,_0x5c1d67);}else'elementEnd'===_0x1af85a[_0x553d53]['type']?(_0x35b34d['shift'](),_0x1af85a[_0x553d53]['previousPosition']=_0x1d2bba['createPositionFromPath'](_0x277e01,_0x5c1d67),_0x5c1d67['pop'](),_0x5c1d67[_0x5c1d67['length']-0x1]++,_0x1af85a[_0x553d53]['nextPosition']=_0x1d2bba['createPositionFromPath'](_0x277e01,_0x5c1d67)):(_0x1af85a[_0x553d53]['previousPosition']=_0x1d2bba['createPositionFromPath'](_0x277e01,_0x5c1d67),_0x251f82?_0x251f82['_data']+=_0x1af85a[_0x553d53]['item']['data']:_0x251f82=new _0x3b5bf9(_0x1af85a[_0x553d53]['item']['data'],_0x1af85a[_0x553d53]['item']['getAttributes']()),_0x1af85a[_0x553d53+0x1]&&'text'===_0x1af85a[_0x553d53+0x1]['type']&&_0x5722d1(_0x251f82,_0x1af85a[_0x553d53+0x1]['item'])||(_0x35b34d[0x0]['_appendChild'](_0x251f82),_0x251f82=null),_0x5c1d67[_0x5c1d67['length']-0x1]+=_0x1af85a[_0x553d53]['item']['offsetSize'],_0x1af85a[_0x553d53]['nextPosition']=_0x1d2bba['createPositionFromPath'](_0x277e01,_0x5c1d67));for(let _0x40cf51=0x0;_0x40cf51<_0x1af85a['length'];_0x40cf51++){const _0x3dbcfd=_0x1af85a[_0x40cf51]['previousPosition'],_0x22899a=_0x1af85a[_0x40cf51]['nextPosition'];for(const _0x3249bb of _0x1af85a[_0x40cf51]['markersStart'])_0x3feab7['set'](_0x3249bb,{'start':_0x3dbcfd,'end':null});_0xedf4cf('isRemoveSuggestion',_0x40cf51,_0x3dbcfd,_0x22899a),_0xedf4cf('isAddSuggestion',_0x40cf51,_0x3dbcfd,_0x22899a),_0xedf4cf('isRemoved',_0x40cf51,_0x3dbcfd,_0x22899a),_0xedf4cf('isAdded',_0x40cf51,_0x3dbcfd,_0x22899a);for(const _0x1d0044 of _0x1af85a[_0x40cf51]['markersEnd']){const _0x4e99a4=_0x3feab7['get'](_0x1d0044);_0x4e99a4?_0x4e99a4['end']=_0x22899a:_0x3feab7['set'](_0x1d0044,{'start':_0x22899a,'end':_0x22899a});}}for(const [_0x36cf7b,_0x560e15]of _0x3feab7){const _0x527f42=this['editor']['model']['createRange'](_0x560e15['start'],_0x560e15['end']);_0x277e01['markers']['set'](_0x36cf7b,_0x527f42);}return _0x19066b['sort']((_0x17bd8f,_0x18e3e5)=>{const _0x2e6b7d=_0x277e01['markers']['get']('revision:'+_0x17bd8f['id']),_0x1158db=_0x277e01['markers']['get']('revision:'+_0x18e3e5['id']);return _0x2e6b7d['start']['isBefore'](_0x1158db['start'])?-0x1:_0x2e6b7d['start']['isAfter'](_0x1158db['start'])?0x1:_0x2e6b7d['end']['isBefore'](_0x1158db['end'])?-0x1:_0x2e6b7d['end']['isAfter'](_0x1158db['end'])?0x1:'add'===_0x17bd8f['type']?-0x1:0x1;}),{'root':_0x277e01,'changes':_0x19066b};function _0xedf4cf(_0x4dfa2c,_0x4ba9d6,_0x2ccd39,_0x4aef7b){const _0xf388d0=!!_0x1af85a[_0x4ba9d6][_0x4dfa2c],_0xbff0aa=_0xf388d0?_0x1af85a[_0x4ba9d6][_0x4dfa2c]['userId']:null,_0xe0aca2=_0x4ba9d6===_0x1af85a['length']-0x1,_0x477d7f=_0x5387f0[_0x4dfa2c][0x0],_0x3e7036=_0x2168ad['isObject'](_0x1af85a[_0x4ba9d6]['item']);!_0xa6b095[_0x4dfa2c]&&_0xf388d0?_0xa6b095[_0x4dfa2c]={'start':_0x2ccd39,'tapeItem':_0x1af85a[_0x4ba9d6],'userId':_0xbff0aa,'type':_0x4dfa2c}:_0xa6b095[_0x4dfa2c]&&!_0xf388d0?(_0xa6b095[_0x4dfa2c]['end']=_0x2ccd39,_0x5471a9(_0xa6b095[_0x4dfa2c]),_0xa6b095[_0x4dfa2c]=null):_0xa6b095[_0x4dfa2c]&&_0xf388d0&&_0xa6b095[_0x4dfa2c]['userId']!==_0xbff0aa&&(_0xa6b095[_0x4dfa2c]['end']=_0x2ccd39,_0x477d7f&&_0x477d7f['userId']===_0xa6b095[_0x4dfa2c]['userId']||_0x5471a9(_0xa6b095[_0x4dfa2c]),_0xa6b095[_0x4dfa2c]={'start':_0x2ccd39,'tapeItem':_0x1af85a[_0x4ba9d6],'userId':_0xbff0aa,'type':_0x4dfa2c}),_0xa6b095[_0x4dfa2c]&&_0x3e7036&&('elementStart'!==_0x1af85a[_0x4ba9d6]['type']||_0x477d7f&&_0x477d7f['userId']===_0xbff0aa||_0x5387f0[_0x4dfa2c]['unshift']({'userId':_0xbff0aa,'object':_0x1af85a[_0x4ba9d6]['item'],'change':_0xa6b095[_0x4dfa2c]}),'elementEnd'===_0x1af85a[_0x4ba9d6]['type']&&_0x477d7f&&_0x477d7f['object']===_0x1af85a[_0x4ba9d6]['item']&&(_0x5387f0[_0x4dfa2c]['shift'](),_0xa6b095[_0x4dfa2c]=_0x477d7f['change'])),_0xa6b095[_0x4dfa2c]&&_0xe0aca2&&(_0xa6b095[_0x4dfa2c]['end']=_0x4aef7b,_0x5471a9(_0xa6b095[_0x4dfa2c]),_0xa6b095[_0x4dfa2c]=null);}function _0x5471a9({start:_0x4d1824,end:_0x27eba2,tapeItem:_0x5274ef,userId:_0x55336a,type:_0x22c3f3}){const _0x5c513e=_0x5274ef['item'],_0x2fc9e4=_0x1d2bba['schema']['isBlock'](_0x5c513e)&&!_0x1d2bba['schema']['isLimit'](_0x5c513e),_0x2e3e1f=_0x4d1824['nodeAfter']==_0x27eba2['parent']&&_0x27eba2['isAtStart'];if(_0x2fc9e4&&_0x2e3e1f)return;const _0x52fbce=_0x1d2bba['createRange'](_0x4d1824,_0x27eba2),_0xd74f6c=_0xa2c4a0['get'](_0x55336a),_0x3627ef=new ChangeItem({'author':_0xd74f6c,'type':'isAdded'==_0x22c3f3||'isAddSuggestion'==_0x22c3f3?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x22c3f3||'isRemoveSuggestion'==_0x22c3f3},'createdAt':new Date(),'rootName':_0xca466f});_0x19066b['push'](_0x3627ef),_0x277e01['markers']['set']('revision:'+_0x3627ef['id'],_0x52fbce);}function _0x5722d1(_0x324ba3,_0x28711d){const _0x528e18=_0x324ba3['getAttributes'](),_0x3d5eed=_0x28711d['getAttributes']();for(const _0x10d9ab of _0x528e18){if(_0x10d9ab[0x1]!==_0x28711d['getAttribute'](_0x10d9ab[0x0]))return!0x1;_0x3d5eed['next']();}return _0x3d5eed['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xc032db=>{const _0x58c13a=_0xc032db['markerName']['split'](':')[0x1],_0xcde035=this['_getChangeFromId'](_0x58c13a);if(!_0xcde035)return null;const _0x3c62cc='add'==_0xcde035['type']?'insertion':'deletion',_0x2c02eb=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3c62cc];return _0xcde035['data']['isSuggestion']&&_0x2c02eb['push']('ck-suggestion-marker-'+_0x3c62cc+'-new'),this['activeChange']==_0xcde035&&_0x2c02eb['push']('ck-suggestion-marker--active'),{'classes':_0x2c02eb,'attributes':{'data-change-id':_0x58c13a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x32467e=>{_0x32467e['on']('element:pre',(_0x34f7e7,_0x32a629,_0x5ea890)=>{const _0x3edb61=_0x32a629['viewItem']['getChild'](0x0);if(!_0x3edb61||!_0x3edb61['is']('element','code'))return;if(!_0x5ea890['consumable']['consume'](_0x3edb61,{'attributes':['vid_start','vid_end']}))return;const _0x1b5092=_0x32a629['modelRange']['start']['nodeAfter'];_0x5ea890['writer']['setAttribute']('vid_start',_0x3edb61['getAttribute']('vid_start'),_0x1b5092),_0x5ea890['writer']['setAttribute']('vid_end',_0x3edb61['getAttribute']('vid_end'),_0x1b5092);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x56f587=>{_0x56f587['on']('element',(_0x3ba932,_0x4523de,_0x5e6125)=>{if(!_0x5e6125['consumable']['consume'](_0x4523de['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4523de['modelRange']['isCollapsed'])return;const _0x43766a=_0x4523de['modelRange']['start']['nodeAfter'];_0x43766a['hasAttribute']('vid_start')||_0x43766a['hasAttribute']('vid')||(_0x5e6125['writer']['setAttribute']('vid_start',_0x4523de['viewItem']['getAttribute']('vid_start'),_0x43766a),_0x5e6125['writer']['setAttribute']('vid_end',_0x4523de['viewItem']['getAttribute']('vid_end'),_0x43766a));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x6a95f=>_0x6a95f['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x13b1ca,[,_0x2d359e])=>{['vid_start','vid_end','vid']['includes'](_0x2d359e)&&(_0x13b1ca['return']=!0x0,_0x13b1ca['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5be889=>{_0x5be889['on']('attribute:vid',(_0xdb58a0,_0x478600,_0x2c574c)=>{if('\x20'!=_0x478600['item']['data']||_0x478600['item']['parent']['maxOffset']>0x1)return;if(!_0x2c574c['consumable']['consume'](_0x478600['item'],_0xdb58a0['name']))return;const _0x2f1495=_0x2c574c['writer'],_0x599cb8=_0x2c574c['mapper']['toViewRange'](_0x478600['range']);_0x2f1495['wrap'](_0x599cb8,_0x2f1495['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x8bbcf4){const _0x298c55=_0x8bbcf4['plugins']['get']('RevisionViewer');return(_0x382cfc,_0xc973e8,_0x2a30f8)=>{const _0x1fc9f1=_0xc973e8['markerName']['split'](':')[0x1],_0x157221=_0x298c55['_getChangeFromId'](_0x1fc9f1);if(!_0x157221)return null;const _0x3a0390='add'==_0x157221['type']?'split':'merge';if(!_0x2a30f8['consumable']['test'](_0xc973e8['markerRange'],_0x382cfc['name']))return;const _0xf95050=_0xc973e8['markerRange']['getWalker'](),_0x57cfb7=_0xc973e8['markerRange']['start'],_0x244cce=_0x8bbcf4['model']['schema'];let _0x16a133=null,_0x47cd11=null,_0x23c538=!0x1,_0x2de000=!0x1;for(const _0x342bb1 of _0xf95050){const _0xa1281f=_0x342bb1['item'];_0x23c538=_0x23c538||_0x244cce['isContent'](_0xa1281f);const _0x36453e=_0x2a30f8['mapper']['toViewElement'](_0xa1281f);if(_0x36453e&&_0x36453e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x342bb1['type']&&(_0x244cce['isBlock'](_0xa1281f)&&!_0x244cce['isLimit'](_0xa1281f)&&(_0xa1281f['nextSibling']||_0x57cfb7['isAtEnd']?_0x16a133&&_0x16a133['parent']==_0xa1281f||(_0x16a133=_0xa1281f,_0xcc5857(_0x342bb1['previousPosition']),_0x2de000=!0x0):_0x47cd11=_0x47cd11||_0x342bb1['previousPosition']));}function _0xcc5857(_0x522352){const _0x2bf8f2=_0x2a30f8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3a0390}),_0xa7d1ca=_0x2a30f8['mapper']['toViewPosition'](_0x522352);_0x157221['data']['isSuggestion']&&_0x2a30f8['writer']['addClass']('ck-suggestion-marker-'+_0x3a0390+'-new',_0x2bf8f2),_0x298c55['activeChange']==_0x157221&&_0x2a30f8['writer']['addClass']('ck-suggestion-marker--active',_0x2bf8f2),_0x2a30f8['writer']['insert'](_0xa7d1ca,_0x2bf8f2),_0x2a30f8['mapper']['bindElementToMarker'](_0x2bf8f2,_0xc973e8['markerName']);}_0x23c538||_0x2de000||!_0x47cd11||_0xcc5857(_0x47cd11);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1dd817,_0x2c8b2c,_0x284efe)=>{const _0xc40ba3=_0x284efe['mapper']['markerNameToElements'](_0x2c8b2c['markerName']);if(_0xc40ba3){for(const _0x2ebb78 of _0xc40ba3)(_0x2ebb78['hasClass']('ck-suggestion-marker-split')||_0x2ebb78['hasClass']('ck-suggestion-marker-merge'))&&(_0x284efe['mapper']['unbindElementFromMarkerName'](_0x2ebb78,_0x2c8b2c['markerName']),_0x284efe['writer']['remove'](_0x2ebb78));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1010e8,_0x23a913,_0x1ca828)=>{const _0x35bd91=_0x23a913['markerName']['split'](':')[0x1],_0x239cf4=this['_getChangeFromId'](_0x35bd91);if(!_0x239cf4)return null;const _0x216d1a='add'==_0x239cf4['type']?'split':'merge';if(_0x1ca828['consumable']['test'](_0x23a913['markerRange'],_0x1010e8['name']))for(const _0x5b541e of _0x23a913['markerRange']['getItems']()){if(!_0x5b541e['is']('element','softBreak'))continue;const _0x546af9=_0x1ca828['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x216d1a}),_0x3f57be=_0x1ca828['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5b541e));_0x239cf4['data']['isSuggestion']&&_0x1ca828['writer']['addClass']('ck-suggestion-marker-'+_0x216d1a+'-new',_0x546af9),this['activeChange']==_0x239cf4&&_0x1ca828['writer']['addClass']('ck-suggestion-marker--active',_0x546af9),_0x1ca828['writer']['insert'](_0x3f57be,_0x546af9),_0x1ca828['mapper']['bindElementToMarker'](_0x546af9,_0x23a913['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1d86d9=>{for(const _0x5b0800 of this['editor']['model']['document']['getRootNames']()){const _0x55cad1=this['editor']['model']['document']['getRoot'](_0x5b0800),_0xde906d=this['editor']['editing']['view']['document']['getRoot'](_0x5b0800);if(_0xde906d){const _0x2e0126=_0x55cad1['getAttribute']('revisionHistoryAttachChange');if(_0x1d86d9['removeAttribute']('data-change-id',_0xde906d),_0x1d86d9['removeClass']('ck-revision-history-root-add',_0xde906d),_0x1d86d9['removeClass']('ck-revision-history-root-remove',_0xde906d),_0x1d86d9['removeClass']('ck-revision-history-root--active',_0xde906d),_0x2e0126){const _0x43f2f7=this['_getChangeFromId'](_0x2e0126);if(!_0x43f2f7)return null;_0x1d86d9['setAttribute']('data-change-id',_0x2e0126,_0xde906d),_0x1d86d9['addClass']('ck-revision-history-root-'+_0x43f2f7['type'],_0xde906d),this['activeChange']==_0x43f2f7&&_0x1d86d9['addClass']('ck-revision-history-root--active',_0xde906d);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x22157d=>'revision-comment:'+_0x22157d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2b0152=>'revision-suggestion:'+_0x2b0152,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5bf65c=>({'name':'suggestion:'+_0x5bf65c,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x33315d=>{const _0x19aba7=_0x33315d['markerName']['split'](':')[0x1];return'insertion'!=_0x19aba7&&'deletion'!=_0x19aba7?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x19aba7]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x56ee8e,_0x1ebf2a,_0x2585c5)=>{const _0x2fee29=_0x2585c5['mapper']['markerNameToElements'](_0x1ebf2a['markerName']);if(_0x2fee29){for(const _0x3b3a8f of _0x2fee29)_0x3b3a8f['is']('uiElement')&&(_0x2585c5['mapper']['unbindElementFromMarkerName'](_0x3b3a8f,_0x1ebf2a['markerName']),_0x2585c5['writer']['remove'](_0x3b3a8f));}},{'priority':'high'});}['_getChangeFromId'](_0xd84258){return this['_changeIdToChange']['get'](_0xd84258);}['_getViewForChange'](_0x3dab98){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x3dab98),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x3bc98c,_0xf3c307,_0x4c0e1c,_0x29f304)=>{_0x29f304&&this['_balloon']['remove'](_0x29f304),_0x4c0e1c&&(this['_balloon']['add']({'view':_0x4c0e1c,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x7af140=this['editor']['editing'],_0x25325a=this['_getChangeFromId'](_0x4c0e1c['changeId']);let _0x31c69f;if(_0x25325a['data']['isOnRoot']){const _0x46e62b=_0x7af140['view']['getDomRoot'](_0x25325a['rootName']);_0x31c69f=Array['from'](_0x46e62b['getClientRects']());}else{const _0xaaa48f=this['editor']['model']['markers']['get']('revision:'+_0x4c0e1c['changeId']);_0x31c69f=Array['from'](_0x7af140['mapper']['markerNameToElements'](_0xaaa48f['name']))['map'](_0x12f8d5=>_0x7af140['view']['domConverter']['mapViewToDom'](_0x12f8d5))['map'](_0x3ac84e=>Array['from'](_0x3ac84e['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x31c69f[0x0];return _0x31c69f['find'](_0x15cca5=>_0x15cca5['top']-0x3<=this['_activeViewTarget']['y']&&_0x15cca5['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x15cca5['left']-0x3<=this['_activeViewTarget']['x']&&_0x15cca5['right']+0x3>=this['_activeViewTarget']['x'])||_0x31c69f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4eb8fc,_0x27be5c,_0x35f561,_0x8177d2)=>{this['activeView']=_0x35f561?this['_getViewForChange'](_0x35f561):null,this['editor']['model']['change'](()=>{const _0x43104a=this['editor']['editing'];_0x8177d2&&(_0x8177d2['data']['isOnRoot']?_0x43104a['view']['change'](_0x1c635c=>{_0x1c635c['removeClass']('ck-revision-history-root--active',_0x43104a['view']['document']['getRoot'](_0x8177d2['rootName']));}):_0x43104a['reconvertMarker']('revision:'+_0x8177d2['id'])),_0x35f561&&(_0x35f561['data']['isOnRoot']?_0x43104a['view']['change'](_0x51e934=>{_0x51e934['addClass']('ck-revision-history-root--active',_0x43104a['view']['document']['getRoot'](_0x35f561['rootName']));}):_0x43104a['reconvertMarker']('revision:'+_0x35f561['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1088d0,_0x5d50f1)=>{if(this['activeChange'])return;const _0x3317de=this['_findChangeIdFromDomTarget'](_0x5d50f1['target']),_0x3df386=this['_changeIdToChange']['get'](_0x3317de);_0x3df386?(this['_activeViewTarget']={'x':_0x5d50f1['domEvent']['x'],'y':_0x5d50f1['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3df386)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x11ef1c,_0x34530f)=>{const _0xa80260=this['_findChangeIdFromDomTarget'](_0x34530f['target']),_0x124857=this['_changeIdToChange']['get'](_0xa80260);_0x124857?(this['_activeViewTarget']={'x':_0x34530f['domEvent']['x'],'y':_0x34530f['domEvent']['y']},_0x124857===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x124857):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3072e6){do{const _0x5584f8=_0x3072e6['getAttribute']('data-change-id');if(_0x5584f8)return _0x5584f8;_0x3072e6=_0x3072e6['parent'];}while(_0x3072e6);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x3478d8=>{for(const _0x2b7999 of this['editor']['model']['markers'])_0x3478d8['removeMarker'](_0x2b7999);});}}function _t(_0x174649,_0x161c99){return(_0x4dbc24,_0x278d4e,_0x52ebdb)=>{if(!_0x52ebdb['consumable']['test'](_0x278d4e['markerRange'],_0x4dbc24['name']))return;const _0x598280=_0x278d4e['markerRange']['getWalker'](),_0xd90dd=_0x278d4e['markerRange']['start'],_0x582593=_0x174649['model']['schema'];let _0x1e471c=null,_0x2f7fb9=null,_0x251231=!0x1,_0x1eaf8e=!0x1;for(const _0xd417be of _0x598280){const _0x3566e4=_0xd417be['item'];_0x251231=_0x251231||_0x582593['isContent'](_0x3566e4);const _0x29c569=_0x52ebdb['mapper']['toViewElement'](_0x3566e4);if(_0x29c569&&_0x29c569['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xd417be['type']&&(_0x582593['isBlock'](_0x3566e4)&&!_0x582593['isLimit'](_0x3566e4)&&(_0x3566e4['nextSibling']||_0xd90dd['isAtEnd']?_0x1e471c&&_0x1e471c['parent']==_0x3566e4||(_0x1e471c=_0x3566e4,_0x2fbd48(_0xd417be['previousPosition']),_0x1eaf8e=!0x0):_0x2f7fb9=_0x2f7fb9||_0xd417be['previousPosition']));}function _0x2fbd48(_0x572b3a){const _0x59d550=_0x52ebdb['mapper']['toViewPosition'](_0x572b3a),_0x7930a7=_0x52ebdb['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x161c99});_0x52ebdb['writer']['insert'](_0x59d550,_0x7930a7),_0x52ebdb['mapper']['bindElementToMarker'](_0x7930a7,_0x278d4e['markerName']);}_0x251231||_0x1eaf8e||!_0x2f7fb9||_0x2fbd48(_0x2f7fb9);};}class RestoreRevisionCommand extends _0x3dad1f{constructor(_0x1a3418){super(_0x1a3418);const _0x3888cc=_0x1a3418['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x3888cc,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3888cc,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3298d8=this['editor'],_0x27692c=_0x3298d8['plugins']['get'](RevisionViewer),_0x5774f0=_0x27692c['isReady']?_0x27692c['diff']['newRevisionId']:null;_0x3298d8['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5774f0);}['refresh'](){const {isReady:_0x3cee8f,isEnabled:_0x147887,repository:_0x29288a,diff:_0x5ac106}=this['editor']['plugins']['get'](RevisionViewer),_0x4ab354=_0x5ac106&&_0x29288a['getLaterVisibleRevision'](_0x5ac106['newRevisionId']);this['isEnabled']=_0x3cee8f&&_0x147887&&Boolean(_0x4ab354);}}class ShowChangeCommand extends _0x3dad1f{['_step'];constructor(_0x8a95a5,{direction:_0x5ba60e}){super(_0x8a95a5);const _0xc6402=_0x8a95a5['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x5ba60e?0x1:-0x1,this['listenTo'](_0xc6402,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xc6402,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xc6402,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x9d0bc=this['editor'],_0x5b16a7=_0x9d0bc['plugins']['get'](RevisionViewer),{isNavigationMode:_0x57ae37,currentChangeNumber:_0x47a554}=_0x5b16a7;let _0x5590b7;if(_0x5b16a7['activeChange']=_0x57ae37?_0x5b16a7['diff']['changes']['get'](_0x47a554+this['_step']):_0x5b16a7['diff']['changes']['first'],_0x5b16a7['activeChange']['data']['isOnRoot'])_0x5590b7=_0x9d0bc['editing']['view']['getDomRoot'](_0x5b16a7['activeChange']['rootName']);else{const _0x21d5ce=_0x9d0bc['model']['markers']['get']('revision:'+_0x5b16a7['activeChange']['id']);_0x5590b7=_0x205b94(_0x9d0bc['editing'],_0x21d5ce);}_0x4fee1d({'target':_0x5590b7,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x3e0e39,currentChangeNumber:_0x4eea59,numberOfChanges:_0x271a1b,isReady:_0x328e1e,isEnabled:_0x54e47c}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x54e47c&&_0x328e1e&&_0x271a1b)&&(!_0x3e0e39||(0x1===this['_step']?_0x4eea59<_0x271a1b-0x1:_0x4eea59>0x0));}}class ChangesNavigationView extends _0xafec90{constructor(_0x27335b){super(_0x27335b);const _0x266b2e=this['bindTemplate'],_0x33036a=new _0x135801(_0x27335b),_0x257ec0=new _0x135801(_0x27335b);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',(_0x26f1d5,_0x3e8ae6)=>_0x26f1d5&&_0x3e8ae6>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x56d9d7,_0x339ef8,_0x2f420a,_0x3cc2e8)=>{if(!_0x56d9d7)return ft(_0x27335b,'Loading...');if(!_0x2f420a)return ft(_0x27335b,'No\x20changes');const _0x3bd669=ft(_0x27335b,'NUMBER_OF_CHANGES',_0x2f420a);return _0x3cc2e8?ft(_0x27335b,'X_OF_Y_CHANGES',[_0x339ef8+0x1,_0x2f420a]):_0x3bd669;}),_0x33036a['set']({'label':ft(_0x27335b,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x37d115}),_0x257ec0['set']({'label':ft(_0x27335b,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x27b0d7}),_0x33036a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x257ec0['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x33036a['on']('execute',()=>this['fire']('execute','backward')),_0x257ec0['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',_0x266b2e['if']('_isStatusLabelVisible','ck-hidden',_0x55912d=>!_0x55912d)]},'children':[{'text':_0x266b2e['to']('isNavigationMode',_0xbf806c=>_0xbf806c?ft(_0x27335b,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x27335b,'Total')+':\x20')}]},{'text':_0x266b2e['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x33036a,_0x257ec0]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x538071{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4a4826=this['editor']['editing']['view'];_0x4a4826['change'](_0x1a8a86=>{for(const _0x4770c0 of _0x4a4826['document']['roots'])_0x1a8a86['addClass'](yt,_0x4770c0);});}['hide'](){const _0x528adb=this['editor']['editing']['view'];_0x528adb['change'](_0x4860f0=>{for(const _0x473b2b of _0x528adb['document']['roots'])_0x4860f0['removeClass'](yt,_0x473b2b);});}}class RevisionViewerUI extends _0x538071{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x4729c4=this['editor'],_0x1bbf48=_0x4729c4['plugins']['get'](RevisionViewer),_0x46f328=_0x4729c4['plugins']['get'](RevisionViewerLoadingOverlay);_0x4729c4['ui']['componentFactory']['add']('exitToEditing',_0x5e3d11=>{const _0xc0794=new _0x135801(_0x5e3d11);return _0xc0794['set']({'label':ft(_0x5e3d11,'Back\x20to\x20editing'),'icon':_0x2c0af7,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xc0794,'execute',()=>{_0x4729c4['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xc0794;}),_0x4729c4['ui']['componentFactory']['add']('restoreRevision',_0x326f75=>{const _0x47b0cf=new _0x135801(_0x326f75);return _0x47b0cf['set']({'label':ft(_0x326f75,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x47b0cf['bind']('isEnabled')['to'](_0x4729c4['commands']['get']('restoreRevision')),this['listenTo'](_0x47b0cf,'execute',()=>_0x4729c4['execute']('restoreRevision')),_0x47b0cf;}),_0x4729c4['ui']['componentFactory']['add']('changesNavigation',_0x3f2fc3=>{const _0x4868a1=new ChangesNavigationView(_0x3f2fc3),_0x20cf63=_0x4729c4['commands']['get']('showPreviousChange'),_0x3c1bf1=_0x4729c4['commands']['get']('showNextChange');return _0x4868a1['bind']('isBackwardNavigationEnabled')['to'](_0x20cf63,'isEnabled'),_0x4868a1['bind']('isForwardNavigationEnabled')['to'](_0x3c1bf1,'isEnabled'),_0x4868a1['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1bbf48),this['listenTo'](_0x4868a1,'execute',(_0x52c49a,_0x1a7d83)=>{_0x4729c4['execute']('forward'===_0x1a7d83?'showNextChange':'showPreviousChange');}),_0x4868a1;}),_0x46f328['show'](),_0x1bbf48['on']('change:isReady',(_0x4598fb,_0x4bb2a0,_0x2f00ff)=>{_0x2f00ff?_0x46f328['hide']():_0x46f328['show']();});}}class RevisionNameView extends _0x17e56b{['_resizeObserver']=null;constructor(_0xc08aca,_0x5e463b){super(_0xc08aca,_0x5e463b);const _0x26ce64=this['bindTemplate'];this['set']({'label':ft(_0xc08aca,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0xc08aca,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x26ce64['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x39f055(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x2705ae=this['fieldView']['element'];this['_tooltipString']=_0x2705ae['scrollWidth']>_0x2705ae['clientWidth']&&_0x2705ae['value']||'';}}class RevisionAuthorView extends _0xafec90{constructor(_0x5dfb96,_0x169a71,_0xa5cc3a){super(_0x5dfb96);const _0x41afe7=new nt();_0x41afe7['set']({'content':_0x185391,'viewBox':'0\x200\x2011\x2010'});const _0x9539ff=['ck','ck-revision-history-sidebar__revision-author'];_0xa5cc3a&&_0x9539ff['push']('ck-revision-history-sidebar__revision-author_creator');const _0x557798=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x5dfb96,_0xa5cc3a?'Revision\x20creator':'Revision\x20author')},'children':[_0x41afe7,_0x169a71['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x9539ff},'children':_0x557798});}}function Rt(_0x7d78c5,_0x5b62a9){const _0x40a8ce=_0x7d78c5['bindTemplate'],_0xe9a06e=_0x7d78c5['locale'],_0x3ed543=_0x182132(_0xe9a06e);_0x3ed543['panelPosition']='sw';const _0x40ee4b=function(_0x2b9254,_0x440ca6){const _0x58d883=function(_0x59e4c2,_0x5edcd2){const _0x53f9cd=_0x59e4c2['locale'],_0x211183={'Compare\x20against\x20selected':ft(_0x53f9cd,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x53f9cd,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x53f9cd,'Restore\x20this\x20revision')};return _0x5edcd2['map'](_0x338a09=>{const _0x51b170=_0x211183[_0x338a09['name']];return _0x51b170&&_0x51b170!==_0x338a09['name']&&(_0x338a09['name']=_0x51b170),_0x338a09;});}(_0x2b9254,_0x440ca6),_0x286a7c=new _0x3625c9();for(const _0x868898 of _0x58d883){const _0x470cd8={'type':'button','model':new rt({'label':_0x868898['name'],'class':_0x868898['class'],'withText':!0x0,'role':'menuitem','_action':_0x868898['action']})};_0x470cd8['model']['bind']('isEnabled')['to'](_0x2b9254,'isActionsDropdownOpen',_0x24eaae=>'function'!=typeof _0x868898['isEnabled']||(!_0x24eaae||_0x868898['isEnabled'](_0x2b9254))),_0x286a7c['add'](_0x470cd8);}return _0x286a7c;}(_0x7d78c5,_0x5b62a9);return _0x7d78c5['bind']('isActionsDropdownOpen')['to'](_0x3ed543,'isOpen'),_0x3ed543['buttonView']['set']({'label':ft(_0xe9a06e,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x5379e9}),_0x3ed543['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x40a8ce['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x40a8ce['to'](_0x42f41a=>_0x42f41a['stopPropagation']())}}),_0x3ed543['on']('execute',_0x5b827f=>{_0x7d78c5['isReady']&&'function'==typeof _0x5b827f['source']['_action']&&_0x5b827f['source']['_action'](_0x7d78c5);}),ot(_0x3ed543,_0x40ee4b,{'role':'menu'}),_0x3ed543['listenTo'](_0x7d78c5,'change:isActionsDropdownOpen',(_0x41ee18,_0x4368fa,_0x2ab2b2)=>{if(_0x2ab2b2)for(const _0x41606b of _0x3ed543['listView']['items']){const _0x16da51=_0x41606b['children']['first'],_0x2e0e83=_0x5b62a9['find'](_0x1ad6f1=>_0x1ad6f1['action']===_0x16da51['_action'])['isVisible'];_0x41606b['isVisible']=void 0x0===_0x2e0e83||_0x2e0e83(_0x7d78c5);}}),_0x3ed543;}class RevisionView extends/* #__PURE__ -- @preserve */
27
- _0x1f967d(_0xafec90){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x524caf,_0xd38c8e,_0x892ae0,_0x23c543){super(_0x524caf);const _0x4ca3e6=this['bindTemplate'],_0x59c01d=function(_0x384b27,_0x4f43ac){const _0x52e3ba=Array['from'](_0x4f43ac['authors'])['filter'](_0x20d6b7=>_0x20d6b7!=_0x4f43ac['creator']);return _0x4f43ac['creator']&&_0x52e3ba['unshift'](_0x4f43ac['creator']),_0x52e3ba['map'](_0x14cde7=>new RevisionAuthorView(_0x384b27,_0x14cde7,_0x14cde7==_0x4f43ac['creator']));}(_0x524caf,_0xd38c8e);this['id']=_0xd38c8e['id'],this['_revision']=_0xd38c8e,this['_requireRevisionName']=_0x23c543,this['bind']('name','createdAt')['to'](_0xd38c8e),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x12bc82=>{return _0x21c992=_0x524caf['uiLanguage'],(_0x44af9c=_0x12bc82)['toLocaleDateString'](_0x21c992,{'month':'long','day':'numeric'})+',\x20'+_0x44af9c['toLocaleTimeString'](_0x21c992,{'hour':'numeric','minute':'numeric'});var _0x21c992,_0x44af9c;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x524caf,_0x238b41),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x1e3443=>_0x1e3443||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x2033c4,_0x10916f)=>_0x2033c4&&_0x10916f),this['revisionActionsView']=_0x892ae0&&_0x892ae0['length']?Rt(this,_0x892ae0):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x4ca3e6['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x4ca3e6['if']('isEnabled','ck-disabled',_0x42dddc=>!_0x42dddc),_0x4ca3e6['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x4ca3e6['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x4ca3e6['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':_0x4ca3e6['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':_0x59c01d}]},this['revisionActionsView']],'on':{'click':_0x4ca3e6['to'](_0x5835f7=>{_0x5835f7['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x2cc92a=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x2cc92a,'change',()=>{this['_requireRevisionName']&&!_0x2cc92a['value']||this['fire']('setName',{'id':this['id'],'name':_0x2cc92a['value']}),_0x2cc92a['value']||(_0x2cc92a['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0xe1aff4,_0x22f11f){const _0x142ad6=vt['fromJSDate'](_0xe1aff4)['setLocale'](_0x22f11f),_0x46df4f=vt['local'](),_0x1876d2=_0x46df4f['minus']({'days':0x1})['startOf']('day');let _0x12bbdf,_0x30bae6;return _0x142ad6['hasSame'](_0x46df4f,'day')?(_0x12bbdf=_0x142ad6['startOf']('day')['toJSDate'](),_0x30bae6=_0x142ad6['toRelativeCalendar']()):_0x142ad6['hasSame'](_0x1876d2,'day')?(_0x12bbdf=_0x1876d2['toJSDate'](),_0x30bae6=_0x142ad6['toRelativeCalendar']()):_0x142ad6['hasSame'](_0x46df4f,'week')?(_0x12bbdf=_0x142ad6['startOf']('week')['toJSDate'](),_0x30bae6=_0x142ad6['weekdayLong']||''):_0x142ad6['hasSame'](_0x46df4f,'year')?(_0x12bbdf=_0x142ad6['startOf']('month')['toJSDate'](),_0x30bae6=_0x142ad6['monthLong']||''):(_0x12bbdf=_0x142ad6['startOf']('year')['toJSDate'](),_0x30bae6=String(_0x142ad6['year'])),{'startDate':_0x12bbdf,'localizedPeriodName':_0x30bae6};}class RevisionsSidebarTimePeriodView extends _0xafec90{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x25a448,_0x169b2a,_0x1118a2,_0x51acd8){super(_0x25a448);const _0x1d4d64=bt(_0x169b2a,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x169b2a,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1118a2,this['_requireRevisionName']=_0x51acd8,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':_0x1d4d64}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x59fca8){const _0x1fadce=new RevisionView(this['locale'],_0x59fca8,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1fadce);}['removeRevision'](_0x446c37){const _0x6b7bba=this['revisionViews']['find'](_0x410590=>_0x410590['id']===_0x446c37['id']);this['revisionViews']['remove'](_0x6b7bba);}}class RevisionsSidebarHeaderView extends _0xafec90{constructor(_0x1cc838){super(_0x1cc838);const _0xf5d2b4=new nt();_0xf5d2b4['content']=_0x5ea9e8,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0xf5d2b4,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x1cc838,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0xafec90{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x44a43e,_0x46cbea,_0x42c5f7,_0x3baee3){super(_0x44a43e);const _0x55e156=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x46cbea,this['_revisionActions']=_0x42c5f7,this['_requireRevisionName']=_0x3baee3,this['on']('select',(_0x13bca6,_0x1b73eb)=>{this['fire']('revisionSelected',_0x1b73eb);}),this['on']('setName',(_0x187e10,_0x37f373)=>{this['fire']('revisionSetName',_0x37f373);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x44a43e),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x55e156['if']('isEnabled','ck-disabled',_0x3724b5=>!_0x3724b5)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x38a787 of this['_revisions'])this['_addRevision'](_0x38a787);this['_revisions']['on']('add',(_0x2d8765,_0x2f0ea8)=>{this['_addRevision'](_0x2f0ea8);}),this['_revisions']['on']('remove',(_0x14937c,_0x513568)=>{this['_removeRevision'](_0x513568);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0xc09a4=>_0xc09a4['revisionViews']['map'](_0x1f176b=>_0x1f176b))['flat']();}['selectRevision'](_0x514d18){for(const _0x23d5cc of this['revisionViews'])_0x514d18&&_0x514d18['id']===_0x23d5cc['id']?_0x23d5cc['select']():_0x23d5cc['deselect']();}['highlightRevisions'](_0x53b33d){for(const _0x3ba440 of this['revisionViews'])_0x53b33d['some'](({id:_0x12db71})=>_0x12db71===_0x3ba440['id'])?_0x3ba440['highlight']():_0x3ba440['unhighlight']();}['_addRevision'](_0x76edce){const _0x100b74=bt(_0x76edce['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x22ccd9=this['_getTimePeriodViewByStartDate'](_0x100b74);_0x22ccd9||(_0x22ccd9=new RevisionsSidebarTimePeriodView(this['locale'],_0x100b74,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x22ccd9)),_0x22ccd9['addRevision'](_0x76edce);}['_removeRevision'](_0x34e946){const _0xd124a9=bt(_0x34e946['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xd124a9)['removeRevision'](_0x34e946);}['_getTimePeriodViewByStartDate'](_0x7e638f){return this['timePeriodViews']['find'](_0x2a79be=>_0x2a79be['startDate']['getTime']()===_0x7e638f['getTime']());}}class RevisionsSidebar extends _0x538071{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x4dc482,uid as _0x439976,Collection as _0xe9e71e,logWarning as _0x17d11b,FocusTracker as _0x204a41,KeystrokeHandler as _0x4d6df5,scrollViewportToShowTarget as _0x387e02,ResizeObserver as _0x1a3a9e,ElementReplacer as _0x1d2c7d,CKEditorError as _0x5107d5}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0xea4767,set as _0x19eb55,unset as _0x433876,isEqual as _0x1afd5b}from'es-toolkit/compat';import{Plugin as _0x3b8836,PendingActions as _0x2a4269,Command as _0x2cc57b,ElementApiMixin as _0x5dad88,Editor as _0x305000}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x51d413,getMarkerDomElement as _0x28ad10,ConfirmMixin as _0x37afc1,sanitizeEditorConfig as _0x4d94e7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x2b3821,ViewAttributeElement as _0x7e8884,ViewEmptyElement as _0x420bb3,ViewRawElement as _0x41e063,ViewUIElement as _0xe4622e,ViewDocumentFragment as _0x3bad1b,ViewText as _0x232386,ViewElement as _0x59eec1,ModelElement as _0x1a0f77,ModelRange as _0x414021,ModelPosition as _0x461e8e,ModelDocumentFragment as _0x538fb3,ModelText as _0xa58127}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x184ecc,IconChevronUp as _0x3bea5a,IconChevronDown as _0x32087f,IconUndo as _0x5065e8,IconUser as _0x2f3753,IconThreeVerticalDots as _0x3ed45e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0xd8f0c9,View as _0x6b0c43,submitHandler as _0x11315e,LabeledFieldView as _0x7cd47d,createLabeledInputText as _0x1fb48d,createDropdown as _0xcc940,ListView as _0x47cf56,ListItemView as _0x55e3f4,ButtonView as _0x8647ff,MenuBarMenuView as _0x564222,MenuBarMenuListView as _0x3cbddb,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
24
+ _0x4dc482(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x30b1a9){super(),this['id']=_0x30b1a9['id']||_0x439976(),this['creator']=_0x30b1a9['creator']||null,this['authors']=_0x30b1a9['authors']||[],this['diffData']=_0x30b1a9['diffData']||null,this['toVersion']=_0x30b1a9['toVersion']||0x0,this['fromVersion']=_0x30b1a9['fromVersion']||0x0,this['set']('name',_0x30b1a9['name']||''),this['set']('createdAt',_0x30b1a9['createdAt']||new Date()),this['set']('attributes',_0x30b1a9['attributes']||{});}['setName'](_0x1e1926){this['_update']({'name':_0x1e1926});}['setAttribute'](_0x59d306,_0x5b7039){const _0x10a452=_0xea4767(this['attributes']);_0x19eb55(_0x10a452,_0x59d306,_0x5b7039),this['_update']({'attributes':_0x10a452});}['removeAttribute'](_0x5a0fdf){const _0x258253=_0xea4767(this['attributes']);_0x433876(_0x258253,_0x5a0fdf),this['_update']({'attributes':_0x258253});}['_update'](_0x83af5a,_0x432241=!0x1){let _0x4baa68=!0x1;const _0x5490bb={'id':this['id']},_0x110b10=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x44155a of _0x110b10){const _0x52cb3f=_0x83af5a[_0x44155a];void 0x0!==_0x52cb3f&&_0x52cb3f!==this[_0x44155a]&&(this[_0x44155a]=_0x52cb3f,_0x5490bb[_0x44155a]=_0x52cb3f,_0x4baa68=!0x0);}_0x4baa68&&(_0x5490bb['authors']&&(_0x5490bb['authorsIds']=_0x5490bb['authors']['map'](_0x30547d=>_0x30547d['id']),delete _0x5490bb['authors']),this['fire']('_update',_0x5490bb,_0x432241));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x50d070=>_0x50d070['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x3b8836{['_revisions'];static get['requires'](){return[_0x51d413];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x252061){super(_0x252061),this['_revisions']=new _0xe9e71e();}['afterInit'](){!async function(_0xb295bc){const _0xab70f1=_0x54830e([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x45e882=0xeb829,_0x1b9c92=0x359e09b0,_0xde71cf=0x35998260^_0x1b9c92,_0x149559=window[_0x54830e([0x44,0x61,0x74,0x65])][_0x54830e([0x6e,0x6f,0x77])](),_0x582c71=_0xb295bc[_0x54830e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x12ab9a=new window[(_0x54830e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d59c1=>{_0x582c71[_0x54830e([0x6f,0x6e,0x63,0x65])](_0x54830e([0x72,0x65,0x61,0x64,0x79]),_0x5d59c1);}),_0x278bbf={[_0x54830e([0x6b,0x74,0x79])]:_0x54830e([0x45,0x43]),[_0x54830e([0x75,0x73,0x65])]:_0x54830e([0x73,0x69,0x67]),[_0x54830e([0x63,0x72,0x76])]:_0x54830e([0x50,0x2d,0x32,0x35,0x36]),[_0x54830e([0x78])]:_0x54830e([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x54830e([0x79])]:_0x54830e([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x54830e([0x61,0x6c,0x67])]:_0x54830e([0x45,0x53,0x32,0x35,0x36])},_0x4e7b07=_0x582c71[_0x54830e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x54830e([0x67,0x65,0x74])](_0x54830e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x89e8f8(){let _0x19b7ef,_0x462461=null,_0x340397=null;try{if(_0x4e7b07==_0x54830e([0x47,0x50,0x4c]))return _0x54830e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x19b7ef=_0x21d0eb(),!_0x19b7ef)return _0x54830e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x19b7ef[_0x54830e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x340397=_0x12e1a5(_0x19b7ef[_0x54830e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x19b7ef[_0x54830e([0x6a,0x74,0x69])])),await _0x1c5a17()?_0x58c0e6()?_0x81784()?_0x54830e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1c1c12()?(_0x19b7ef[_0x54830e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x54830e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x462461=_0x2500cf(_0x54830e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4aeed0()):_0x54830e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x54830e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x54830e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x54830e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x81784(){const _0xcc318=[_0x54830e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x54830e([0x74,0x72,0x69,0x61,0x6c])][_0x54830e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x19b7ef[_0x54830e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x149559/0x3e8:0xe10*_0xde71cf;return _0x19b7ef[_0x54830e([0x65,0x78,0x70])]<_0xcc318;}function _0x58c0e6(){const _0x2aaca8=_0x19b7ef[_0x54830e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2aaca8)return!0x1;if(_0x2aaca8[_0x54830e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54830e([0x2a])))return!0x0;if(_0x2aaca8[_0x54830e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54830e([0x52,0x48])))return!0x0;if(_0x2aaca8[_0x54830e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54830e([0x52,0x52,0x48]))){if(_0x4c2dee())return!0x0;if(_0x54e277()||_0x14d9a8())return!0x0;}return!0x1;}function _0x1c1c12(){const _0x531de9=_0x19b7ef[_0x54830e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x531de9||0x0==_0x531de9[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x94ef27}=new URL(window[_0x54830e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x531de9[_0x54830e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x94ef27))return!0x0;const _0x36070d=_0x94ef27[_0x54830e([0x73,0x70,0x6c,0x69,0x74])](_0x54830e([0x2e]));return _0x531de9[_0x54830e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fa302=>_0x1fa302[_0x54830e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54830e([0x2a])))[_0x54830e([0x6d,0x61,0x70])](_0x591427=>_0x591427[_0x54830e([0x73,0x70,0x6c,0x69,0x74])](_0x54830e([0x2e])))[_0x54830e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x996cea=>_0x996cea[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x36070d[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x54830e([0x6d,0x61,0x70])](_0x47d65=>Array(_0x36070d[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x47d65[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x54830e([0x66,0x69,0x6c,0x6c])](_0x47d65[0x0]===_0x54830e([0x2a])?_0x54830e([0x2a]):'')[_0x54830e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x47d65))[_0x54830e([0x73,0x6f,0x6d,0x65])](_0x25fc6d=>_0x36070d[_0x54830e([0x65,0x76,0x65,0x72,0x79])]((_0x2d9632,_0x1cad61)=>_0x25fc6d[_0x1cad61]===_0x2d9632||_0x25fc6d[_0x1cad61]===_0x54830e([0x2a])));}function _0x4aeed0(){return _0x462461&&_0x340397?new window[(_0x54830e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6c868e,_0x30b420)=>{_0x462461[_0x54830e([0x74,0x68,0x65,0x6e])](_0x6c868e,_0x30b420),_0x340397[_0x54830e([0x74,0x68,0x65,0x6e])](_0x3d9dc4=>{_0x3d9dc4!=_0x54830e([0x56,0x61,0x6c,0x69,0x64])&&_0x6c868e(_0x3d9dc4);},_0x30b420);}):_0x462461||_0x340397||_0x54830e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x12e1a5(_0x18ac2c,_0x5834e4){return new window[(_0x54830e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1800a1=>{if(_0x1ca092())return _0x1800a1(_0x54830e([0x56,0x61,0x6c,0x69,0x64]));_0x1bc309(),_0x582c71[_0x54830e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x54830e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1608ca=!0x1;const _0x87716d=_0x439976();function _0x4e873b(_0x12b019){return!!_0x12b019&&(typeof _0x12b019===_0x54830e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x12b019===_0x54830e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x12b019[_0x54830e([0x74,0x68,0x65,0x6e])]===_0x54830e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x12b019[_0x54830e([0x63,0x61,0x74,0x63,0x68])]===_0x54830e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x8f42c8(_0x26776f){_0x5e6e93(_0x26776f)[_0x54830e([0x74,0x68,0x65,0x6e])](_0xfd1e03=>{if(!_0xfd1e03||_0xfd1e03[_0x54830e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x54830e([0x6f,0x6b]))return _0x54830e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2d8c88(_0x25486d(_0x87716d+_0x5834e4))!=_0xfd1e03[_0x54830e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x54830e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x54830e([0x56,0x61,0x6c,0x69,0x64]);})[_0x54830e([0x74,0x68,0x65,0x6e])](_0x4e2237=>(_0x4caf53(),_0x4e2237),()=>{const _0x110a79=_0x202137();return null==_0x110a79?(_0x4caf53(),_0x54830e([0x56,0x61,0x6c,0x69,0x64])):_0x54830e(_0x149559-_0x110a79>(0x11928db0^_0x1b9c92)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x54830e([0x74,0x68,0x65,0x6e])](_0x1800a1)[_0x54830e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1800a1(_0x54830e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x44af92=0x35a8e730^_0x1b9c92;function _0x4caf53(){const _0x50f3bd=_0x54830e([0x6c,0x6c,0x63,0x74,0x2d])+_0x2d8c88(_0x25486d(_0x18ac2c)),_0x5cc271=_0x4d3141(_0x2d8c88(window[_0x54830e([0x4d,0x61,0x74,0x68])][_0x54830e([0x63,0x65,0x69,0x6c])](_0x149559/_0x44af92)));window[_0x54830e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x54830e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x50f3bd,_0x5cc271);}function _0x202137(){const _0x1dfa66=_0x54830e([0x6c,0x6c,0x63,0x74,0x2d])+_0x2d8c88(_0x25486d(_0x18ac2c)),_0xb5db0f=window[_0x54830e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x54830e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1dfa66);return _0xb5db0f?window[_0x54830e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4d3141(_0xb5db0f),0x10)*_0x44af92:null;}function _0x5e6e93(_0x1ce7d3){return new window[(_0x54830e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23c66d,_0x544b11)=>{_0x1ce7d3[_0x54830e([0x74,0x68,0x65,0x6e])](_0x23c66d,_0x544b11),window[_0x54830e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x544b11,0x359fdd70^_0x1b9c92);});}}_0x582c71[_0x54830e([0x6f,0x6e])](_0x54830e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5b4612,_0x46fdda)=>{if(_0x46fdda[0x0]!=_0x18ac2c)return _0x1800a1(_0x54830e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x46fdda[0x1]={..._0x46fdda[0x1],[_0x54830e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x87716d};},{[_0x54830e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x54830e([0x68,0x69,0x67,0x68])}),_0x582c71[_0x54830e([0x6f,0x6e])](_0x54830e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xa3b85b=>{_0x4e873b(_0xa3b85b[_0x54830e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1608ca=!0x0,_0x8f42c8(_0xa3b85b[_0x54830e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x54830e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x54830e([0x6c,0x6f,0x77])}),_0x12ab9a[_0x54830e([0x74,0x68,0x65,0x6e])](()=>{_0x1608ca||_0x1800a1(_0x54830e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1ca092(){return _0x582c71[_0x54830e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54830e([0x76,0x69,0x65,0x77])][_0x54830e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x54830e([0x61,0x75,0x74,0x6f]);}function _0x1bc309(){_0x582c71[_0x54830e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54830e([0x76,0x69,0x65,0x77])][_0x54830e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x54830e([0x61,0x75,0x74,0x6f]);}}function _0x2500cf(_0x82e3ec){const _0xad9f7a=[new window[(_0x54830e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xad7556=>setTimeout(_0xad7556,0x3597377c^_0x1b9c92)),_0x12ab9a[_0x54830e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x54830e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x486f99=>{const _0x41097d=0x359e09b7^_0x1b9c92,_0x5f4c7f=_0xb295bc[_0x54830e([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x42580b(){_0x5f4c7f[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x41097d&&_0x486f99();}_0x42580b(),_0x5f4c7f[_0x54830e([0x6f,0x6e])](_0x54830e([0x61,0x64,0x64]),_0x42580b);})),new window[(_0x54830e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x178f1e=>{function _0x3aafb7(){for(const _0xbe2a97 in window)if(window[_0x54830e([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x54830e([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0xbe2a97))&&window[_0xbe2a97]==_0x45e882)return _0x178f1e();_0x582c71[_0x54830e([0x73,0x74,0x61,0x74,0x65])]!=_0x54830e([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x54830e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3aafb7,0x359e1a38^_0x1b9c92);}_0x36a4fb(_0x54830e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3aafb7();})];return window[_0x54830e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x54830e([0x72,0x61,0x63,0x65])](_0xad9f7a)[_0x54830e([0x74,0x68,0x65,0x6e])](()=>_0x82e3ec);}async function _0x356185(){if(await _0x12ab9a,_0x36a4fb(_0x54830e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4f79c0=_0xb295bc[_0x54830e([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x19a0bf=_0xb295bc[_0x54830e([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x4f79c0[_0x54830e([0x69,0x64])]),_0x30cbe0=_0x374080(_0x54830e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x30cbe0[_0x54830e([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4f79c0['id'],_0x19a0bf?_0x19a0bf['id']:null,!0x0),_0x30cbe0[_0x54830e([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x54830e([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x30cbe0[_0x54830e([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x30cbe0[_0x54830e([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x410f39,void(_0x30cbe0[_0x54830e([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x410f39);}if(_0x36a4fb(_0x54830e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1392ab=_0x374080(_0x54830e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1392ab[_0x54830e([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x54830e([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1392ab[_0x54830e([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1392ab[_0x54830e([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x410f39,_0x1392ab[_0x54830e([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x410f39;}_0x582c71[_0x54830e([0x6d,0x6f,0x64,0x65,0x6c])][_0x54830e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x410f39,_0x582c71[_0x54830e([0x6d,0x6f,0x64,0x65,0x6c])][_0x54830e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x410f39,_0x582c71[_0x54830e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x54830e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4c2dee(){return _0x36a4fb(_0x54830e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x374080(_0x54830e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x54830e([0x73,0x74,0x61,0x74,0x65])]==_0x54830e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x54e277(){return _0x36a4fb(_0x54830e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x14d9a8(){return _0x36a4fb(_0x54830e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xdb009a(_0x34e88a){const _0x4a9b1e=_0x55164e();_0x582c71[_0x4a9b1e]=_0x54830e([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x34e88a,_0x34e88a[_0x54830e([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x54830e([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x55164e()]=_0x45e882),_0x34e88a!=_0x54830e([0x56,0x61,0x6c,0x69,0x64])&&_0x356185();}function _0x55164e(){const _0x3470d6=window[_0x54830e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x54830e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x54830e([0x6e,0x6f,0x77])]())[_0x54830e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x54830e([0x2e]),'');let _0x2309c9=_0x54830e([0x76]);for(let _0x2d5521=0x0;_0x2d5521<_0x3470d6[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2d5521+=0x2){let _0xbbe506=window[_0x54830e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3470d6[_0x54830e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d5521,_0x2d5521+0x2));_0xbbe506>=_0xab70f1[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xbbe506-=_0xab70f1[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2309c9+=_0xab70f1[_0xbbe506];}return _0x2309c9;}function _0x21d0eb(){const _0x4f36cc=_0x4e7b07[_0x54830e([0x73,0x70,0x6c,0x69,0x74])](_0x54830e([0x2e]));if(0x3!=_0x4f36cc[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2a7365(_0x4f36cc[0x1]);function _0x2a7365(_0x558904){const _0x14ab47=_0x1d10fa(_0x558904);return _0x14ab47&&_0x1f7455()?_0x14ab47:null;function _0x1f7455(){const _0x218a80=_0x14ab47[_0x54830e([0x6a,0x74,0x69])],_0x310ed3=window[_0x54830e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x218a80[_0x54830e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x218a80[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1635ae={..._0x14ab47,[_0x54830e([0x6a,0x74,0x69])]:_0x218a80[_0x54830e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x218a80[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1635ae[_0x54830e([0x76,0x63])],_0x25486d(_0x1635ae)==_0x310ed3;}}}async function _0x1c5a17(){let _0x88354d=!0x0;try{const _0x11bfb6=_0x4e7b07[_0x54830e([0x73,0x70,0x6c,0x69,0x74])](_0x54830e([0x2e])),[_0x559354,_0xdc523e,_0x147f47]=_0x11bfb6;return _0x2cf521(_0x559354),await _0x1b6180(_0x559354,_0xdc523e,_0x147f47),_0x88354d;}catch{return!0x1;}function _0x2cf521(_0x202dc0){const _0x407a76=_0x1d10fa(_0x202dc0);_0x407a76&&_0x407a76[_0x54830e([0x61,0x6c,0x67])]==_0x54830e([0x45,0x53,0x32,0x35,0x36])||(_0x88354d=!0x1);}async function _0x1b6180(_0xb92356,_0x3aa467,_0x146497){const _0x327707=window[_0x54830e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x54830e([0x66,0x72,0x6f,0x6d])](_0x2013e0(_0x146497),_0x31428d=>_0x31428d[_0x54830e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f1148=new window[(_0x54830e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x54830e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xb92356+_0x54830e([0x2e])+_0x3aa467),_0x5de535=window[_0x54830e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x54830e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5de535)return;const _0x3b7f4a=await _0x5de535[_0x54830e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x54830e([0x6a,0x77,0x6b]),_0x278bbf,{[_0x54830e([0x6e,0x61,0x6d,0x65])]:_0x54830e([0x45,0x43,0x44,0x53,0x41]),[_0x54830e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x54830e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x54830e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5de535[_0x54830e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x54830e([0x6e,0x61,0x6d,0x65])]:_0x54830e([0x45,0x43,0x44,0x53,0x41]),[_0x54830e([0x68,0x61,0x73,0x68])]:{[_0x54830e([0x6e,0x61,0x6d,0x65])]:_0x54830e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3b7f4a,_0x327707,_0x2f1148)||(_0x88354d=!0x1);}}function _0x1d10fa(_0x20a692){return _0x20a692[_0x54830e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x54830e([0x65,0x79]))?JSON[_0x54830e([0x70,0x61,0x72,0x73,0x65])](_0x2013e0(_0x20a692)):null;}function _0x2013e0(_0x4536a4){return window[_0x54830e([0x61,0x74,0x6f,0x62])](_0x4536a4[_0x54830e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x54830e([0x2b]))[_0x54830e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x54830e([0x2f])));}function _0x25486d(_0xc76072){let _0x56541a=0x1505;function _0x4c7021(_0x2d064a){for(let _0x433577=0x0;_0x433577<_0x2d064a[_0x54830e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x433577++){const _0x358769=_0x2d064a[_0x54830e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x433577);_0x56541a=(_0x56541a<<0x5)+_0x56541a+_0x358769,_0x56541a&=_0x56541a;}}function _0x31fe13(_0x4857ab){Array[_0x54830e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4857ab)?_0x4857ab[_0x54830e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x31fe13):_0x4857ab&&typeof _0x4857ab==_0x54830e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x54830e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4857ab)[_0x54830e([0x73,0x6f,0x72,0x74])]()[_0x54830e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9526a3,_0x49ad28])=>{_0x4c7021(_0x9526a3),_0x31fe13(_0x49ad28);}):_0x4c7021(window[_0x54830e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4857ab));}return _0x31fe13(_0xc76072),_0x56541a>>>0x0;}function _0x2d8c88(_0xfcfec7){return _0xfcfec7[_0x54830e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x54830e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x54830e([0x30]));}function _0x4d3141(_0x410d0e){return _0x410d0e[_0x54830e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x54830e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x54830e([0x6a,0x6f,0x69,0x6e])]('');}function _0x36a4fb(_0x125440){return _0x582c71[_0x54830e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x54830e([0x68,0x61,0x73])](_0x125440);}function _0x374080(_0x29bc04){return _0x582c71[_0x54830e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x54830e([0x67,0x65,0x74])](_0x29bc04);}function _0x410f39(){}function _0x54830e(_0x391b6f){return _0x391b6f['map'](_0x417ce5=>String['fromCharCode'](_0x417ce5))['join']('');}_0xdb009a(await _0x89e8f8());}(this);}['createRevision'](_0x2d6900){const _0x13d148=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x2d6900['id'],'name':_0x2d6900['name'],'creator':_0x2d6900['creatorId']?_0x13d148['getUser'](_0x2d6900['creatorId']):null,'diffData':_0x2d6900['diffData']||_0x2d6900['data'],'authors':_0x2d6900['authorsIds']['map'](_0x31c8f4=>_0x13d148['getUser'](_0x31c8f4)),'createdAt':new Date(_0x2d6900['createdAt']),'attributes':_0x2d6900['attributes'],'fromVersion':_0x2d6900['fromVersion'],'toVersion':_0x2d6900['toVersion']});}['addRevision'](_0x45f265,_0x139966=0x0){this['_revisions']['add'](_0x45f265,_0x139966);}['getRevision'](_0x2b8e51){return this['_revisions']['get'](_0x2b8e51);}['getRevisions'](_0x28174c={'toJSON':!0x1}){const _0xdfb587=Array['from'](this['_revisions']);return _0xdfb587['reverse'](),_0x28174c['toJSON']?_0xdfb587['map'](_0x122240=>_0x122240['toJSON']()):_0xdfb587;}['getIndex'](_0x273bbd){return this['_revisions']['getIndex'](_0x273bbd);}['getEarlierVisibleRevision'](_0x40ee1e){const [,_0xad0447]=this['getRevisionsIterator'](_0x40ee1e,{'direction':'earlier'});return _0xad0447;}['getLaterVisibleRevision'](_0x5c5414){const [,_0x68746a]=this['getRevisionsIterator'](_0x5c5414,{'direction':'later'});return _0x68746a;}['getRevisionsInDiff'](_0x31722c){const _0x5a60a2=[];for(const _0xa9905 of this['getRevisionsIterator'](_0x31722c['newRevisionId']))if(_0x5a60a2['push'](_0xa9905),_0xa9905['id']===_0x31722c['oldRevisionId'])break;return _0x5a60a2;}*['getRevisionsIterator'](_0x215655,{direction:_0x2cacf2='earlier',filter:_0x23e5b4=()=>!0x0}={}){const _0x3424ff='earlier'===_0x2cacf2?0x1:-0x1;let _0x417b4d=this['_revisions']['get'](_0x215655),_0x344a46=this['getIndex'](_0x417b4d);for(yield _0x417b4d;_0x417b4d;){if(_0x344a46+=_0x3424ff,_0x417b4d=this['getRevision'](_0x344a46),!_0x417b4d)return;_0x23e5b4(_0x417b4d)&&(yield _0x417b4d);}}}class RevisionHistoryUtils extends _0x3b8836{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2b3821,'c'],[_0x7e8884,'a'],[_0x420bb3,'e'],[_0x41e063,'r'],[_0xe4622e,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2b3821],['a',_0x7e8884],['e',_0x420bb3],['r',_0x41e063],['u',_0xe4622e]]);async['loadRevisionData'](_0x360bd3,_0x2429f4){if(_0x360bd3['diffData']||!_0x2429f4)return;const _0x24405e=this['editor']['config']['get']('collaboration.channelId'),_0x3318b7=await _0x2429f4['getRevision']({'channelId':_0x24405e,'revisionId':_0x360bd3['id']});_0x360bd3['diffData']=_0x3318b7['diffData'];}['getRevisionDocumentData'](_0x3f0f7a){const _0x1375ef={};for(const _0x3f14b9 in _0x3f0f7a['diffData']){if(_0x3f0f7a['diffData'][_0x3f14b9]['attachChange']&&!_0x3f0f7a['diffData'][_0x3f14b9]['attachChange']['isAttached'])continue;const _0x8e6a48=this['_removeRevisionMarkers'](JSON['parse'](_0x3f0f7a['diffData'][_0x3f14b9]['insertions'])),_0x54191c=this['editor']['editing']['view']['document'],_0xcfbaec=new _0x3bad1b(_0x54191c,_0x8e6a48['map'](_0x7e0887=>this['_getViewFromDiffObj'](_0x7e0887,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1375ef[_0x3f14b9]=this['editor']['data']['processor']['toData'](_0xcfbaec),this['editor']['data']['processor']['useFillerType']('default');}return _0x1375ef;}['getRevisionRootsAttributes'](_0x12d362){const _0x95aa09={};for(const _0x25f58a in _0x12d362['diffData'])_0x12d362['diffData'][_0x25f58a]['attachChange']&&!_0x12d362['diffData'][_0x25f58a]['attachChange']['isAttached']||(_0x95aa09[_0x25f58a]=_0x12d362['diffData'][_0x25f58a]['attributesAfter']||{});return _0x95aa09;}['getRevisionRootsModelElements'](_0x52944a){const _0x4ae5e1={};for(const _0x45ddec in _0x52944a['diffData']){if(_0x52944a['diffData'][_0x45ddec]['attachChange']&&!_0x52944a['diffData'][_0x45ddec]['attachChange']['isAttached'])continue;const _0x499c95=_0x52944a['diffData'][_0x45ddec]['rootElementName'];_0x499c95&&(_0x4ae5e1[_0x45ddec]=_0x499c95);}return _0x4ae5e1;}['_getTypeCharForViewElement'](_0x5be5d3){return this['_viewClassToTypeChar']['get'](_0x5be5d3['constructor']);}['_getViewFromDiffObj'](_0x479caa,_0xada8c3){const _0x3e74c8=this['editor']['editing']['view']['document'];if('string'==typeof _0x479caa)return new _0x232386(_0x3e74c8,_0x479caa);{let _0x553a33,_0x5cb5db;_0x5cb5db='u'==_0x479caa['type']||'r'==_0x479caa['type']?[]:_0x479caa['children']['map'](_0x522a1a=>this['_getViewFromDiffObj'](_0x522a1a,_0xada8c3));const _0x3967cc=this['_typeCharToViewClass']['get'](_0x479caa['type'])||_0x59eec1,_0x5d2be0=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x553a33=new _0x3967cc(_0x3e74c8,_0x479caa['name'],_0x479caa['attributes'],_0x5cb5db),'u'==_0x479caa['type']&&_0x479caa['children'][0x0]){const _0x94db7b=_0x479caa['children'][0x0];if(_0x553a33['render']=function(_0x41cb56){const _0x4e6cef=_0x41cb56['createElement']('div');return _0x4e6cef['innerHTML']=_0x94db7b,_0x4e6cef['childNodes'][0x0];},_0xada8c3){const _0x171357=new _0x3bad1b(_0x3e74c8);_0x171357['_appendChild'](_0x553a33);const _0x490f34=Array['from'](_0x5d2be0['viewChildrenToDom'](_0x171357,{'bind':!0x1})),_0x248871=_0x5d2be0['domDocument']['createElement']('div');_0x248871['append'](..._0x490f34),_0x553a33=Array['from'](_0x5d2be0['domChildrenToView'](_0x248871))[0x0];}}else{if('r'==_0x479caa['type']&&_0x479caa['children'][0x0]){const _0x55dae1=_0x479caa['children'][0x0];if(_0x553a33['render']=function(_0x1d1a84){_0x1d1a84['innerHTML']=_0x55dae1;},_0xada8c3){const _0x58db5e=new _0x3bad1b(_0x3e74c8);_0x58db5e['_appendChild'](_0x553a33);const _0x428a23=Array['from'](_0x5d2be0['viewChildrenToDom'](_0x58db5e,{'bind':!0x1})),_0x59f436=_0x5d2be0['domDocument']['createElement']('div');_0x59f436['append'](..._0x428a23);const _0x4358f4=Array['from'](_0x5d2be0['domChildrenToView'](_0x59f436));_0x4358f4['length']>0x1?_0x553a33['_appendChild'](_0x4358f4):_0x553a33=_0x4358f4[0x0];}}}if(_0x479caa['customProperties']){for(const [_0x4a86bb,_0x3fc348]of _0x479caa['customProperties'])_0x553a33['_setCustomProperty'](_0x4a86bb,_0x3fc348);}const _0x1fa5bf=void 0x0===_0x479caa['fillerOffset']?null:_0x479caa['fillerOffset'];return null!==_0x1fa5bf&&(_0x553a33['getFillerOffset']=()=>_0x1fa5bf),_0x553a33;}}['_makeModelFromViewString'](_0x17153e,_0x3c90c7){const _0x5caa3e=JSON['parse'](_0x17153e),_0x2786a6=this['editor']['editing']['view']['document'],_0x2419e3=new _0x3bad1b(_0x2786a6,_0x5caa3e['map'](_0x2e1213=>this['_getViewFromDiffObj'](_0x2e1213,!0x0))),_0x4035f7=this['editor']['data']['toModel'](_0x2419e3,_0x3c90c7);return _0x4035f7['name']=_0x3c90c7,_0x4035f7;}['_removeRevisionMarkers'](_0x41f166){return(_0x41f166=_0x41f166['filter'](_0x366ff3=>!_0x366ff3['name']||'revision-start'!==_0x366ff3['name']&&'revision-end'!==_0x366ff3['name']))['forEach'](_0x5e63b3=>{'string'!=typeof _0x5e63b3&&(_0x5e63b3['children']=this['_removeRevisionMarkers'](_0x5e63b3['children']),_0x5e63b3['attributes']=_0x5e63b3['attributes']['filter'](_0x49810a=>!_0x49810a[0x0]['startsWith']('data-revision-')));}),_0x41f166;}}function ft(_0x18605e,_0x4adfb8,_0x408be8){const t=_0x18605e['t'];switch(_0x4adfb8){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'},_0x408be8);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x408be8);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x3b8836{['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[_0x51d413,RevisionsRepository,RevisionHistoryUtils,_0x2a4269];}constructor(_0xcb5b68){super(_0xcb5b68),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x573643=_0x439976();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x573643},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 _0x33e1d9=this['repository']['getRevision'](0x0),_0x4e3824=_0x33e1d9&&null===_0x33e1d9['creator']?_0x33e1d9:null;if(this['_continueCurrentRevision']=!!_0x4e3824&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x485229=this['_source']['getCurrentRevisionId'](),_0x1d50fc=this['repository']['getRevision'](_0x485229);if(_0x1d50fc)this['_startingVersion']=_0x1d50fc['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x599671=this['_source']['history']['_operations']['find'](_0xe5a3a2=>!_0xe5a3a2['_isInit']),_0x4d2071=_0x599671?_0x599671['baseVersion']:this['_source']['history']['version'];_0x33e1d9?(_0x33e1d9['toVersion']<_0x4d2071&&_0x33e1d9['_update']({'toVersion':_0x4d2071}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x4e3824['id'],this['_startingVersion']=_0x4e3824['fromVersion']):(this['_startingVersion']=_0x33e1d9['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4d2071,this['_continueCurrentRevision']=!0x1);}}else _0x4e3824&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x4e3824['toVersion'],this['editor']['model']['document']['history']['version']),_0x4e3824['fromVersion']===_0x4e3824['toVersion']?(0x0!==_0x4e3824['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x4e3824['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x4e3824['id'],this['_startingVersion']=_0x4e3824['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',_0x180f23=>!_0x180f23),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x17c4e1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xbcb23e;for(const _0x152209 in _0x17c4e1){const _0x2574c3=_0x152209,_0x245520=_0x17c4e1[_0x2574c3];if('revisionHistoryLicenseKeyValid'==_0x245520||'revisionHistoryLicenseKeyInvalid'==_0x245520||'revisionHistoryLicenseKeyExpired'==_0x245520||'revisionHistoryLicenseKeyDomainLimit'==_0x245520||'revisionHistoryLicenseKeyNotAllowed'==_0x245520||'revisionHistoryLicenseKeyEvaluationLimit'==_0x245520||'revisionHistoryLicenseKeyUsageLimit'==_0x245520){delete _0x17c4e1[_0x2574c3],_0xbcb23e=_0x245520,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xbcb23e&&_0x17c4e1['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xbcb23e&&_0x17c4e1['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xbcb23e&&_0x17c4e1['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xbcb23e&&_0x17c4e1['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xbcb23e&&_0x17c4e1['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xbcb23e&&_0x17c4e1['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x22aa97=this['repository']['getRevision'](0x0),_0x233f40=await this['getRevisionDocumentData'](_0x22aa97),_0xe3dc28=await this['getRevisionRootsAttributes'](_0x22aa97),_0x5638c4=this['_utils']['getRevisionRootsModelElements'](_0x22aa97);this['_replaceEditorDataWithRevisionData'](_0x233f40,_0xe3dc28,_0x5638c4);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x378dce){this['_source']=_0x378dce;}async['update'](){const _0x26a658=await this['_source']['getLatestVersion']();if(_0x26a658>this['currentRevision']['toVersion']){await this['_loadState']();const _0x546a56=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x26a658});_0x546a56['authors']=_0x546a56['authorsIds']['map'](_0x3fd987=>this['editor']['plugins']['get']('Users')['getUser'](_0x3fd987)),this['currentRevision']['_update'](_0x546a56);}}async['saveRevision'](_0x39ae69={},_0x35d882=null){const _0x307b49=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x35d882>this['currentRevision']['toVersion']&&(_0x35d882=null),null===_0x35d882&&(_0x35d882=await this['_source']['getLatestVersion']());const _0x342242=this['_getFromVersion'](_0x35d882),_0x514f37=this['buildRevisionData']({'from':_0x342242,'to':_0x35d882});if(this['currentRevision']['toVersion']<_0x35d882){const _0x2c412c=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x35d882,'to':_0x35d882});_0x2c412c['authors']=[],_0x2c412c['authorsIds']=[],_0x2c412c['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2c412c,!0x0),delete _0x2c412c['authors'],_0x307b49['push'](_0x2c412c);}_0x39ae69['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x39ae69['name']=_0x39ae69['name']||null,_0x39ae69['id']=_0x39ae69['id']||_0x439976(),_0x39ae69={..._0x39ae69,..._0x514f37};const _0x12b6db=this['addRevisionData'](_0x39ae69);_0x307b49['push'](_0x39ae69);const _0x40f440=this['repository']['getIndex'](_0x12b6db);if(0x0!==_0x40f440){const _0x14ff91=this['repository']['getRevision'](_0x40f440-0x1);if(_0x14ff91['fromVersion']!==_0x35d882){const _0x4f6187=this['_revisionDataBuilder']['getData'](_0x35d882,_0x14ff91['toVersion']),_0x5d958f={'id':_0x14ff91['id'],'diffData':_0x4f6187['diffData'],'authorsIds':_0x4f6187['authorsIds'],'authors':_0x4f6187['authorsIds']['map'](_0x5b5500=>this['editor']['plugins']['get']('Users')['getUser'](_0x5b5500)),'fromVersion':_0x35d882};_0x14ff91===this['currentRevision']&&(_0x5d958f['createdAt']=new Date(_0x39ae69['createdAt']['getTime']()+0xa)),_0x14ff91['_update'](_0x5d958f,!0x0),delete _0x5d958f['authors'],_0x307b49['push'](_0x5d958f);}}if(this['adapter']){for(const _0x2871df of _0x307b49)this['_bufferUpdate'](_0x2871df['id'],_0x2871df,!0x0);this['sendBufferedUpdates']();}return _0x12b6db;}['addRevisionData'](_0xc25c9c){const _0x3f219e=this['repository']['createRevision'](_0xc25c9c);return this['adapter']&&_0x3f219e['on']('_update',(_0x12e20c,_0x1954e7,_0x417e6c)=>{_0x417e6c||(this['_bufferUpdate'](_0x1954e7['id'],_0x1954e7,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3f219e,this['_findInsertionIndex'](_0x3f219e)),_0x3f219e;}async['getRevisionDocumentData'](_0x24f335){return await this['_utils']['loadRevisionData'](_0x24f335,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x24f335);}async['getRevisionRootsAttributes'](_0x31d6e9){return await this['_utils']['loadRevisionData'](_0x31d6e9,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x31d6e9);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x19fd40=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x12454b=0x0;_0x12454b<_0x19fd40['length'];_0x12454b++){const _0x2cd985=_0x19fd40[_0x12454b];let _0x331f6b=!0x1;for(const _0x342790 of Object['keys'](_0x2cd985))void 0x0===_0x2cd985[_0x342790]?delete _0x2cd985[_0x342790]:'id'!==_0x342790&&(_0x331f6b=!0x0);_0x331f6b||(_0x19fd40[_0x12454b]=null);}if(_0x19fd40=_0x19fd40['filter'](_0x1d453f=>null!==_0x1d453f),!_0x19fd40['length'])return;for(let _0x31807a=0x0;_0x31807a<_0x19fd40['length'];_0x31807a++){const _0x426325=_0x19fd40[_0x31807a];void 0x0!==_0x426325['fromVersion']&&void 0x0===_0x426325['toVersion']&&(_0x426325['toVersion']=this['repository']['getRevision'](_0x426325['id'])['toVersion']),void 0x0!==_0x426325['toVersion']&&void 0x0===_0x426325['fromVersion']&&(_0x426325['fromVersion']=this['repository']['getRevision'](_0x426325['id'])['fromVersion']);}const _0x504752=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x19fd40,_0x504752)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x470f05=>{if(_0x470f05){for(const _0x541565 of _0x470f05)this['setRevisionData']({'id':_0x541565['id'],'createdAt':_0x541565['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x22aaa5=null,from:_0x28aa81=null,to:_0x2d774d=null}){_0x28aa81=null!==_0x28aa81?_0x28aa81:_0x22aaa5['fromVersion'],_0x2d774d=null!==_0x2d774d?_0x2d774d:_0x22aaa5['toVersion'];const _0x315698=this['_revisionDataBuilder']['getData'](_0x28aa81,_0x2d774d),_0x588ee0={'diffData':_0x315698['diffData'],'authorsIds':_0x315698['authorsIds'],'fromVersion':_0x28aa81,'toVersion':_0x2d774d};if(!_0x22aaa5||_0x2d774d!==_0x22aaa5['toVersion']){const _0x59ad26=_0x2d774d-0x1,_0x508702=this['_source']['history']['getOperation'](_0x59ad26);_0x588ee0['createdAt']=_0x508702&&_0x508702['createdAt']||new Date();}if(this['_loadedStateData']&&_0x28aa81===this['_loadedStateData']['fromVersion']){for(const _0xc3d464 of this['_loadedStateData']['authors'])_0x588ee0['authorsIds']['includes'](_0xc3d464['id'])||_0x588ee0['authorsIds']['push'](_0xc3d464['id']);}return _0x588ee0;}['_bufferUpdate'](_0x355e5e,_0x83766c,_0x5a3d85){if(this['_bufferedUpdates']['has'](_0x355e5e)){const _0x365a00=this['_bufferedUpdates']['get'](_0x355e5e);_0x83766c=_0x5a3d85?{..._0x365a00,..._0x83766c}:{..._0x83766c,..._0x365a00};}this['_bufferedUpdates']['set'](_0x355e5e,_0x83766c);}['setRevisionData'](_0x4b005c){const _0x4543ac=this['repository']['getRevision'](_0x4b005c['id']);if(_0x4b005c['createdAt']&&(_0x4b005c['createdAt']=new Date(_0x4b005c['createdAt'])),_0x4b005c['authorsIds']){const _0x2d9f3e=this['editor']['plugins']['get']('Users');_0x4b005c['authors']=_0x4b005c['authorsIds']['map'](_0x326850=>_0x2d9f3e['getUser'](_0x326850));}_0x4543ac['_update'](_0x4b005c,!0x0);}['_createInitialRevision'](_0x4222cb){const _0x1898f6=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1898f6)this['_initialRevisionId']=_0x1898f6['id'];else{const _0x58448d=!this['editor']['model']['document']['roots']['find'](_0x4ae754=>this['editor']['model']['hasContent'](_0x4ae754)),_0x100b40=this['editor']['plugins']['get']('Users')['me']['id'],_0x5be223=ft(this['editor']['locale'],_0x58448d?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4222cb,'to':_0x4222cb,'id':this['_initialRevisionId'],'name':_0x5be223,'creatorId':_0x100b40});}}['_createCurrentRevision'](_0x3dbbb3){const _0x3466a2=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x3466a2),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x3dbbb3,'to':_0x3dbbb3,'id':_0x3466a2,'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'](_0x2ea634,_0x47a2df,_0x54265a){const _0x2e3ab0={},_0x4e333b={},_0x279479={},_0xa7157b=this['editor']['config']['get']('roots')||{};for(const [_0x15e21c,_0x4c32c2]of Object['entries'](_0xa7157b))_0x4c32c2['lazyLoad']||(_0x2e3ab0[_0x15e21c]=_0x4c32c2['initialData']??'',_0x4e333b[_0x15e21c]=_0x4c32c2['modelAttributes']||{},_0x4c32c2['modelElement']&&(_0x279479[_0x15e21c]=_0x4c32c2['modelElement']));for(const _0x272916 of this['editor']['model']['document']['getRootNames']())_0x2e3ab0[_0x272916]??='',_0x4e333b[_0x272916]??={};let _0x5e4cec=!0x1;const _0x526ab3=Object['keys'](_0x2e3ab0),_0x405496=Object['keys'](_0x2ea634);for(const _0x459d0e of _0x526ab3){if(_0x2e3ab0[_0x459d0e]!==_0x2ea634[_0x459d0e]&&''!==_0x2e3ab0[_0x459d0e]['trim']()){_0x5e4cec=!0x0;break;}if(!_0x1afd5b(_0x4e333b[_0x459d0e],_0x47a2df[_0x459d0e])&&Object['keys'](_0x4e333b[_0x459d0e])['length']>0x0){_0x5e4cec=!0x0;break;}const _0x452c5e=_0x279479[_0x459d0e],_0x2081d7=_0x54265a[_0x459d0e];if(_0x452c5e&&_0x2081d7&&_0x452c5e!==_0x2081d7){_0x5e4cec=!0x0;break;}}_0x5e4cec||(_0x5e4cec=_0x405496['some'](_0x4bc794=>!this['editor']['model']['document']['getRoot'](_0x4bc794))),_0x5e4cec&&_0x17d11b('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2e3ab0,'editorRootsAttributes':_0x4e333b,'editorRootsModelElements':_0x279479,'revisionData':_0x2ea634,'revisionRootsAttributes':_0x47a2df,'revisionRootsModelElements':_0x54265a});for(const [_0x54dc6c,_0x5da83f]of Object['entries'](_0x2ea634))this['editor']['config']['set']('roots.'+_0x54dc6c+'.initialData',_0x5da83f);for(const [_0x57f5e7,_0x54bb4d]of Object['entries'](_0x47a2df))this['editor']['config']['set']('roots.'+_0x57f5e7+'.modelAttributes',_0x54bb4d);const _0x1c109d=this['editor']['model']['document'];for(const [_0x3372d7,_0x33d187]of Object['entries'](_0x54265a)){this['editor']['config']['set']('roots.'+_0x3372d7+'.modelElement',_0x33d187);const _0x3d4af6=_0x1c109d['getRoot'](_0x3372d7);_0x3d4af6&&_0x3d4af6['name']!==_0x33d187&&(_0x1c109d['roots']['remove'](_0x3372d7),_0x1c109d['createRoot'](_0x33d187,_0x3372d7));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x3f8b1d=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3f8b1d['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x186814){const _0x473266=this['repository']['getRevisions']();_0x473266['reverse']();let _0x282ae1=0x0;for(;_0x282ae1<_0x473266['length'];){const _0x5d15ee=_0x473266[_0x282ae1];if(_0x5d15ee===this['currentRevision']){_0x282ae1++;continue;}if(_0x5d15ee['id']===this['_initialRevisionId'])break;const _0x221665=_0x186814['toVersion']-_0x5d15ee['toVersion']||_0x186814['fromVersion']-_0x5d15ee['fromVersion'];if(_0x221665>0x0)break;if(_0x221665<0x0)_0x282ae1++;else{if(!_0x186814['creator']&&_0x5d15ee['creator'])break;if(_0x5d15ee['creator']||!_0x186814['creator']){if(_0x186814['createdAt']>_0x5d15ee['createdAt'])break;_0x282ae1++;}else _0x282ae1++;}}return _0x282ae1;}['_getFromVersion'](_0x11c054){const _0x1365c2=this['repository']['getRevisions']();_0x1365c2['reverse'](),_0x1365c2['shift']();const _0x51f519=_0x1365c2['find'](_0x9d1182=>_0x9d1182['toVersion']<=_0x11c054)['toVersion'];return _0x51f519<this['_startingVersion']?this['_startingVersion']:_0x51f519;}['_makeRevision']({name:_0x5d411a,from:_0xdc99e1,to:_0x370f75,creatorId:_0x49b62a,id:_0x43a85c}){const _0x3cef68=this['buildRevisionData']({'from':_0xdc99e1,'to':_0x370f75});_0x3cef68['name']=_0x5d411a,_0x3cef68['creatorId']=_0x49b62a,_0x3cef68['id']=_0x43a85c;const _0x16cc2e=this['addRevisionData'](_0x3cef68);return this['adapter']&&this['_bufferUpdate'](_0x3cef68['id'],_0x3cef68,!0x0),_0x16cc2e;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x573ad1){this['editor']=_0x573ad1,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'](_0x4302cd){this['source']=_0x4302cd;const _0x4210fa=new Map(),_0x3b18f5=new Map(),_0x50c3f7=this['editor']['model']['document']['roots']['map'](_0x41c842=>_0x41c842['rootName']);for(const _0x70dc41 of _0x50c3f7){const _0x52e810=this['editor']['model']['document']['getRoot'](_0x70dc41),_0x58e998=gt(_0x52e810);_0x4210fa['set'](_0x70dc41,_0x58e998),_0x3b18f5['set'](_0x70dc41,Object['fromEntries'](_0x52e810['getAttributes']()));}const _0xa939c1=Array['from'](this['editor']['model']['markers'])['map'](_0x3ba1ca=>[_0x3ba1ca['name'],_0x3ba1ca['getRange']()]),_0x47b4e3=this['source']['version'];this['_saveMetaData'](_0x47b4e3,_0x4210fa,_0xa939c1,_0x3b18f5),this['_startingRevisionId']=this['_revisionId'];const _0xb1704a=new Map(),_0x5e38d1=new Map();for(const _0x2b934d of _0x50c3f7){const _0x36c470=wt(_0x2b934d,this['editor']['model']['document']['getRoot'](_0x2b934d)['name']);_0xb1704a['set'](_0x2b934d,_0x36c470),_0x5e38d1['set'](_0x2b934d,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0xb1704a,[],_0x5e38d1);}['getData'](_0x4ce374,_0x429aab){if(this['_lastFrom']===_0x4ce374&&this['_lastTo']<=_0x429aab)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x429aab,!0x0);else{if(!this['_savedMetaData']['has'](_0x4ce374)){const _0x15e5aa=this['_getPreviousFrom'](_0x4ce374);this['_calculateMetaData'](_0x15e5aa,_0x4ce374,!0x1);}this['_calculateMetaData'](_0x4ce374,_0x429aab,!0x0);}return this['_lastFrom']=_0x4ce374,this['_lastTo']=_0x429aab,this['_getState']();}['loadState'](_0x39b7e7){if(!this['_savedMetaData']['has'](_0x39b7e7['fromVersion'])){const _0x14c1df=this['_getPreviousFrom'](_0x39b7e7['fromVersion']);this['_calculateMetaData'](_0x14c1df,_0x39b7e7['fromVersion'],!0x1);}this['_calculateMetaData'](_0x39b7e7['fromVersion'],_0x39b7e7['toVersion'],!0x1);const _0x2b306f=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x39b7e7['fromVersion'],this['_lastTo']=_0x39b7e7['toVersion'];for(const _0x116778 in _0x39b7e7['diffData']){const _0x476e91=_0x39b7e7['diffData'][_0x116778]['attachChange'],_0x392e9a=_0xea4767(_0x39b7e7['diffData'][_0x116778]['attributesBefore'])||{},_0x4ac6a6=_0x39b7e7['diffData'][_0x116778],_0x3d3496=_0x2b306f['_makeModelFromViewString'](_0x4ac6a6['deletions'],_0x4ac6a6['rootElementName']||'$root');_0x3d3496['rootName']=_0x116778,_0x3d3496['_isAttached']=!_0x476e91||!_0x476e91['isAttached'],_0x3d3496['isAttached']=()=>_0x3d3496['_isAttached'],this['_baseRoots']['set'](_0x116778,_0x3d3496),this['_baseRootsAttributes']['set'](_0x116778,_0x392e9a),_0x476e91&&this['_touchedRoots']['set'](_0x116778,_0x476e91);const _0x35c68d=this['_makeIdsRoot'](_0x3d3496);this['_baseIdsRoots']['set'](_0x116778,_0x35c68d);for(const [_0x4606d8,_0x50b639]of _0x3d3496['markers']){if(!_0x4606d8['startsWith']('revision:'))continue;const _0x353647=_0x4606d8['split'](':')[0x2];for(const _0x39d492 of _0x50b639['getWalker']({'singleCharacters':!0x0})){const _0x3392aa=this['_getVidAttributeName'](_0x39d492),_0x3697cb='elementEnd'==_0x39d492['type']?_0x39d492['previousPosition']['path']['slice'](0x0,-0x1):_0x39d492['previousPosition']['path'],_0x18cc57=_0x35c68d['getNodeByPath'](_0x3697cb)['getAttribute'](_0x3392aa);this['_touched']['set'](_0x18cc57,{'userId':_0x353647});}_0x3d3496['markers']['delete'](_0x4606d8);}}this['_startingRevisionId']=this['_revisionId'];const _0x442dbb=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x57cdbe=>!this['_touched']['has'](_0x57cdbe));let _0x508236=0x0;const _0x21e4ad=new Map();for(const _0x59b091 in _0x39b7e7['diffData']){const _0x4bbd42=_0x39b7e7['diffData'][_0x59b091]['attachChange'],_0x2b4b3e=_0xea4767(_0x39b7e7['diffData'][_0x59b091]['attributesAfter'])||{},_0x5d567c=_0x39b7e7['diffData'][_0x59b091],_0x259f3b=_0x2b306f['_makeModelFromViewString'](_0x5d567c['insertions'],_0x5d567c['rootElementName']||'$root');_0x259f3b['rootName']=_0x59b091,_0x259f3b['_isAttached']=!_0x4bbd42||_0x4bbd42['isAttached'],_0x259f3b['isAttached']=()=>_0x259f3b['_isAttached'],this['_diffRoots']['set'](_0x59b091,_0x259f3b),this['_diffRootsAttributes']['set'](_0x59b091,_0x2b4b3e);const _0x201e48=this['_makeIdsRoot'](_0x259f3b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x59b091,_0x201e48),_0x21e4ad['set'](_0x59b091,_0x259f3b['isAttached']()?_0x2b4b3e:{});for(const [_0x284669,_0x1a5869]of _0x259f3b['markers']){if(!_0x284669['startsWith']('revision:'))continue;const _0x5e1826=_0x284669['split'](':')[0x2];for(const _0x244508 of _0x1a5869['getWalker']({'singleCharacters':!0x0})){const _0x1c33a1=this['_getVidAttributeName'](_0x244508),_0x1c3271=this['_revisionId']++,_0x139787='elementEnd'==_0x244508['type']?_0x244508['previousPosition']['path']['slice'](0x0,-0x1):_0x244508['previousPosition']['path'];_0x201e48['getNodeByPath'](_0x139787)['_setAttribute'](_0x1c33a1,_0x1c3271),this['_touched']['set'](_0x1c3271,{'userId':_0x5e1826});}_0x259f3b['markers']['delete'](_0x284669);}for(const _0x549731 of this['editor']['model']['createRangeIn'](_0x259f3b)['getWalker']({'singleCharacters':!0x0})){const _0x281051=this['_getVidAttributeName'](_0x549731),_0x55302a='elementEnd'==_0x549731['type']?_0x549731['previousPosition']['path']['slice'](0x0,-0x1):_0x549731['previousPosition']['path'],_0x569d1c=_0x201e48['getNodeByPath'](_0x55302a);_0x569d1c['getAttribute'](_0x281051)>0x0||_0x569d1c['_setAttribute'](_0x281051,_0x442dbb[_0x508236++]);}for(const [_0xfc5789,_0x57085d]of _0x259f3b['markers'])_0xfc5789['startsWith']('revision:')||this['_markers']['set'](_0xfc5789,_0x57085d);}const {roots:_0x44f246}=this['_savedMetaData']['get'](_0x39b7e7['fromVersion']),{roots:_0x264d6d}=this['_savedMetaData']['get'](_0x39b7e7['toVersion']),_0x4640d2=gt(_0x44f246['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4640d2),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4640d2,Number['NEGATIVE_INFINITY']));const _0x2a2e0e=gt(_0x264d6d['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2a2e0e),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2a2e0e));const _0x2b3253=Array['from'](this['_diffRoots'])['map'](([_0x5d1338,_0x5a442c])=>[_0x5d1338,gt(_0x5a442c)]);this['_saveMetaData'](this['_lastTo'],_0x2b3253,this['_markers'],_0x21e4ad);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x17f63b,_0x2c2a1e,_0x2e45b1,_0x59ff43){const _0x3da681=new Map(_0x2c2a1e),_0x55abad=new Map(_0xea4767(_0x59ff43)),_0x3b62c3=new Map();for(const [_0x23cef4,_0x339e5e]of _0x2e45b1)_0x3b62c3['set'](_0x23cef4,{'start':_0x339e5e['start']['clone'](),'end':_0x339e5e['end']['clone'](),'rootName':_0x339e5e['root']['rootName']});this['_savedMetaData']['set'](_0x17f63b,{'roots':_0x3da681,'markers':_0x3b62c3,'rootsAttributes':_0x55abad});}['_removeMetaData'](_0x3f4b84){this['_savedMetaData']['delete'](_0x3f4b84);}['_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'](_0x1717bf,_0x2e453c=null){let _0x4d3283=null;_0x1717bf['is']('documentFragment')||(_0x4d3283=new _0x1a0f77(_0x1717bf['name'],{'vid_start':null===_0x2e453c?this['_revisionId']++:_0x2e453c++}));const _0x3d7c0a=[];for(const _0x157747 of _0x1717bf['getChildren']())if(_0x157747['is']('element')){_0x3d7c0a['push'](this['_makeIdsRoot'](_0x157747,_0x2e453c));const _0x346ff0=_0x3d7c0a[_0x3d7c0a['length']-0x1];null!==_0x2e453c&&(_0x2e453c=_0x346ff0['is']('element','$text')?_0x346ff0['getAttribute']('vid')+0x1:_0x346ff0['getAttribute']('vid_end')+0x1);}else{for(let _0x453a53=0x0;_0x453a53<_0x157747['offsetSize'];_0x453a53++)_0x3d7c0a['push'](new _0x1a0f77('$text',{'vid':null===_0x2e453c?this['_revisionId']++:_0x2e453c++}));}if(_0x1717bf['is']('documentFragment')){const _0x37e8c4=wt(_0x1717bf['rootName'],_0x1717bf['name']);return _0x37e8c4['_insertChild'](0x0,_0x3d7c0a),_0x37e8c4;}return _0x4d3283['_setAttribute']('vid_end',null===_0x2e453c?this['_revisionId']++:_0x2e453c++),_0x4d3283['_insertChild'](0x0,_0x3d7c0a),_0x4d3283;}['_calculateMetaData'](_0xb5ad05,_0x5692a0,_0x3c565a){this['_reset']();const {roots:_0x429e49,markers:_0x152d01,rootsAttributes:_0x25e0d4}=this['_savedMetaData']['get'](_0xb5ad05);this['_baseRoots']=new Map(_0x429e49),this['_baseRootsAttributes']=new Map(_0xea4767(_0x25e0d4));for(const [_0x2a7190,_0x590e4c]of this['_baseRoots'])if('$graveyard'!==_0x2a7190&&(this['_diffRoots']['set'](_0x2a7190,gt(_0x590e4c)),this['_diffRootsAttributes']=new Map(_0xea4767(_0x25e0d4)),_0x3c565a)){const _0x2541f1=this['_revisionId'];this['_idsRoots']['set'](_0x2a7190,this['_makeIdsRoot'](_0x590e4c)),this['_baseIdsRoots']['set'](_0x2a7190,this['_makeIdsRoot'](_0x590e4c,_0x2541f1));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x3c565a&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x26fa8b,_0x3d152c]of _0x152d01){const _0x14f0cc=this['_baseRoots']['get'](_0x3d152c['rootName']),_0xcf4e38=this['_diffRoots']['get'](_0x3d152c['rootName']),_0x18a626=new _0x414021(this['_fixPosition'](_0x3d152c['start'],_0x14f0cc),this['_fixPosition'](_0x3d152c['end'],_0x14f0cc)),_0xe6431a=this['_fixRange'](_0x18a626,_0xcf4e38);_0x14f0cc['markers']['set'](_0x26fa8b,_0x18a626),this['_markers']['set'](_0x26fa8b,_0xe6431a);}this['_applyOperations'](_0xb5ad05,_0x5692a0,_0x3c565a);}['_applyOperations'](_0x5b6abd,_0x22037c,_0x474a13){for(const _0x5ef814 of this['source']['getOperations'](_0x5b6abd,_0x22037c))this['_handleOperation'](_0x5ef814,_0x474a13);for(const _0x166a73 of this['_diffRoots']['values']())_0x166a73['markers']['clear']();for(const [_0x176119,_0x456743]of this['_markers']){this['_diffRoots']['get'](_0x456743['root']['rootName'])['markers']['set'](_0x176119,_0x456743['clone']());}const _0x467501=new Map(),_0x3abc09=new Map();for(const [_0x4ad969,_0x241512]of this['_diffRoots'])_0x467501['set'](_0x4ad969,gt(_0x241512)),_0x3abc09['set'](_0x4ad969,this['_diffRootsAttributes']['get'](_0x4ad969));this['_saveMetaData'](_0x22037c,_0x467501,this['_markers'],_0x3abc09);}['_getPreviousFrom'](_0x5aa7ea){const _0x4cc926=Array['from'](this['_savedMetaData']['keys']());_0x4cc926['sort']((_0x46b668,_0x551649)=>_0x46b668-_0x551649),_0x4cc926['reverse']();for(const _0xf29270 of _0x4cc926)if(_0xf29270<_0x5aa7ea)return _0xf29270;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xd004e3,_0x372dbc){const _0xf64fb1=Array['from'](_0x372dbc['markers'])['map'](([_0x578073,_0x5f3825])=>[_0x578073,this['_fixRange'](_0x5f3825,_0xd004e3)]);_0xd004e3['markers']=new Map(_0xf64fb1);}['_transformMarkers'](_0x26e316){for(const _0x7a3f30 of this['_markers']['values']()){const _0x58eda4=_0x7a3f30['getTransformedByOperation'](_0x26e316),_0x168bd0=_0x414021['_createFromRanges'](_0x58eda4);_0x7a3f30['start']=_0x168bd0['start'],_0x7a3f30['end']=_0x168bd0['end'];}}['_handleOperation'](_0xf39206,_0x54babc){if('addRoot'!=_0xf39206['type']&&'detachRoot'!=_0xf39206['type']){if('insert'==_0xf39206['type']){const _0x93c46e=_0xf39206['position']['root'],_0x1bd04e=_0x93c46e['rootName'],_0x3353ba=_0x93c46e['name'];this['_diffRoots']['has'](_0x1bd04e)||(this['_diffRoots']['set'](_0x1bd04e,wt(_0x1bd04e,_0x3353ba,!0x0)),this['_diffRootsAttributes']['set'](_0x1bd04e,{}),_0x54babc&&this['_idsRoots']['set'](_0x1bd04e,wt(_0x1bd04e,_0x3353ba,!0x0)));}else{if('addRootAttribute'==_0xf39206['type']||'removeRootAttribute'==_0xf39206['type']||'changeRootAttribute'==_0xf39206['type'])return void this['_handleRootAttributeOperation'](_0xf39206);'marker'==_0xf39206['type']&&this['_handleMarkerOperation'](_0xf39206);}if('marker'!==_0xf39206['type']){const _0x493bcc=this['_cloneOperation'](_0xf39206,this['_diffRoots']);_0x493bcc['_execute'](),this['_transformMarkers'](_0x493bcc);}if(_0x54babc)switch(_0xf39206['type']){case'insert':this['_handleInsertOperation'](_0xf39206);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xf39206);break;case'merge':this['_handleMergeOperation'](_0xf39206);break;case'split':this['_handleSplitOperation'](_0xf39206);}}else this['_handleRootOperation'](_0xf39206,_0x54babc);}['_cloneOperation'](_0x2ab934,_0x4062bc){const _0x1fd460=_0x2ab934['clone']();return _0x1fd460['_authorId']=_0x2ab934['_authorId'],this['_fixOperation'](_0x1fd460,_0x4062bc),_0x1fd460;}['_getBaseVids'](_0x1864d8){return _0x1864d8['map'](_0x5ae086=>{const _0x1d6cae=this['_getVidAttributeName'](_0x5ae086);return Number(_0x5ae086['item']['getAttribute'](_0x1d6cae));});}['_generateTape'](_0x36903e,_0x52bfd7){if(_0x36903e['is']('element','$text'))_0x52bfd7['push']({'item':_0x36903e,'type':'text'});else{_0x36903e['is']('element')&&_0x52bfd7['push']({'item':_0x36903e,'type':'elementStart'});for(const _0xdb9cf0 of _0x36903e['getChildren']())this['_generateTape'](_0xdb9cf0,_0x52bfd7);_0x36903e['is']('element')&&_0x52bfd7['push']({'item':_0x36903e,'type':'elementEnd'});}return _0x52bfd7;}['_getState'](){const _0x49a05e=new Map(this['_touched']),_0xaf9596=new Map(_0x49a05e),_0x3d6472=new Map(),_0x5d7c04={'insertions':{},'deletions':{}},_0x344ee5={'insertions':{},'deletions':{}},_0x3c5ce0=new Map(),_0x3f845f=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x3c3dba=new Map();_0x3f845f['delete']('$graveyard');for(const _0x1aa353 of _0x3f845f){const _0x390662=(this['_diffRoots']['get'](_0x1aa353)??this['_baseRoots']['get'](_0x1aa353))['name'],_0x163c35=this['_diffRoots']['get'](_0x1aa353)||wt(_0x1aa353,_0x390662,!0x1),_0x27b526=this['_baseRoots']['get'](_0x1aa353)||wt(_0x1aa353,_0x390662,!0x1);_0x163c35['isAttached']()||_0x27b526['isAttached']()?(_0x3c3dba['set'](_0x1aa353,_0x390662),_0x5d7c04['insertions'][_0x1aa353]=gt(_0x163c35),_0x5d7c04['deletions'][_0x1aa353]=gt(_0x27b526),this['_copyMarkers'](_0x5d7c04['deletions'][_0x1aa353],_0x27b526),this['_copyMarkers'](_0x5d7c04['insertions'][_0x1aa353],_0x163c35),_0x344ee5['insertions'][_0x1aa353]=this['_generateTape'](this['_idsRoots']['get'](_0x1aa353),[]),_0x344ee5['deletions'][_0x1aa353]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1aa353)||wt(_0x1aa353,_0x390662,!0x1),[])):_0x3f845f['delete'](_0x1aa353);}for(const _0x59d000 of _0x3f845f){const _0x43a895=_0x344ee5['insertions'][_0x59d000];for(const _0x2bf9b1 of _0x43a895){const _0x56561d=this['_getVidAttributeName'](_0x2bf9b1),_0x3aeda9=_0x2bf9b1['item']['getAttribute'](_0x56561d);_0xaf9596['delete'](_0x3aeda9),_0x3aeda9>=this['_startingRevisionId']&&_0x3d6472['set'](_0x3aeda9,_0x49a05e['get'](_0x3aeda9));}}for(const _0x55afb8 of _0x3f845f){const _0x3e5768=_0x344ee5['insertions'][_0x55afb8],_0x4fb406=this['_getBaseVids'](_0x344ee5['deletions'][_0x55afb8]);let _0x187796=0x0;for(const _0x5767ea of _0x3e5768){const _0x531087=this['_getVidAttributeName'](_0x5767ea),_0x3de5e0=_0x5767ea['item']['getAttribute'](_0x531087);if(!_0x3d6472['has'](_0x3de5e0)&&!_0x3c5ce0['has'](_0x3de5e0)){if(_0xaf9596['has'](_0x3de5e0))_0x187796++;else{if(_0x3de5e0!=_0x4fb406[_0x187796]){const _0x429697=_0x49a05e['get'](_0x3de5e0)||_0x49a05e['get'](_0x4fb406[_0x187796]);for(;_0x3de5e0!=_0x4fb406[_0x187796];)_0xaf9596['has'](_0x4fb406[_0x187796])||(_0x3c5ce0['set'](_0x4fb406[_0x187796],_0x429697),_0x49a05e['set'](_0x4fb406[_0x187796],_0x429697)),_0x187796++;}_0x187796++;}}}}for(const _0x30ee68 of _0x3f845f){const _0x2153ad=_0x344ee5['insertions'][_0x30ee68];for(const _0x26375e of _0x2153ad){const _0x5ddea0=this['_getVidAttributeName'](_0x26375e),_0xd733ca=_0x26375e['item']['getAttribute'](_0x5ddea0);if(_0x3c5ce0['has'](_0xd733ca)){const _0x207599=_0x3c5ce0['get'](_0xd733ca);_0xaf9596['has'](_0xd733ca)||_0xaf9596['set'](_0xd733ca,{..._0x207599}),_0x3d6472['set'](_0xd733ca,{..._0x207599});}}}for(const _0x4de775 of _0xaf9596['keys']())_0x4de775>=this['_startingRevisionId']&&_0xaf9596['delete'](_0x4de775);const _0x1e9174=new Map();for(const _0x38ebd5 of _0x3f845f){let _0x5ecf2d=_0x344ee5['insertions'][_0x38ebd5];for(const _0xf9d58e of _0x5ecf2d)if(_0xf9d58e['item']['is']('element','tableCell')){const _0x53619b=this['_getVidAttributeName'](_0xf9d58e),_0x30c529=_0xf9d58e['item']['getAttribute'](_0x53619b);if(_0x3d6472['has'](_0x30c529)){const _0x19d410=_0xf9d58e['item']['parent']['parent']['getAttribute']('vid_start'),_0x5c3fa4=_0x1e9174['get'](_0x19d410)||new Set();_0x5c3fa4['add'](_0x3d6472['get'](_0x30c529)['userId']),_0x1e9174['set'](_0x19d410,_0x5c3fa4);}}_0x5ecf2d=_0x344ee5['deletions'][_0x38ebd5];for(const _0x17bb97 of _0x5ecf2d)if(_0x17bb97['item']['is']('element','tableCell')){const _0x367817=this['_getVidAttributeName'](_0x17bb97),_0x1bb601=_0x17bb97['item']['getAttribute'](_0x367817);if(_0xaf9596['has'](_0x1bb601)){const _0x204d44=_0x17bb97['item']['parent']['parent']['getAttribute']('vid_start'),_0x4ffc08=_0x1e9174['get'](_0x204d44)||new Set();_0x4ffc08['add'](_0xaf9596['get'](_0x1bb601)['userId']),_0x1e9174['set'](_0x204d44,_0x4ffc08);}}for(const _0x2c9d96 of _0x1e9174['keys']())(_0x3d6472['has'](_0x2c9d96)||_0xaf9596['has'](_0x2c9d96))&&_0x1e9174['delete'](_0x2c9d96);}for(const _0xb94ef3 of _0x3f845f){const _0x1f4b15=_0x344ee5['insertions'][_0xb94ef3];let _0x2cd85c=null,_0x2f9813=null;for(const _0x24dbaf of _0x1f4b15){const _0x4569f9=this['_getVidAttributeName'](_0x24dbaf),_0x52c720=_0x24dbaf['item']['getAttribute'](_0x4569f9),_0x84eeee=_0x1e9174['get'](_0x52c720);_0x84eeee&&'elementStart'==_0x24dbaf['type']&&(_0x2cd85c=Array['from'](_0x84eeee)[0x0],_0x2f9813=_0x24dbaf['item']['getAttribute']('vid_end')),_0x2cd85c&&(_0xaf9596['set'](_0x52c720,{'userId':_0x2cd85c}),_0x3d6472['set'](_0x52c720,{'userId':_0x2cd85c})),_0x52c720==_0x2f9813&&(_0x2cd85c=null,_0x2f9813=null);}}const _0x318099={},_0x18ea35=new Set();for(const _0x558e18 of _0x3f845f){const _0x1651ca=_0x5d7c04['deletions'][_0x558e18],_0x5930f9=_0x5d7c04['insertions'][_0x558e18];for(const {userId:_0x2695ea}of this['_touchedMarkers']['values']())null!==_0x2695ea&&_0x18ea35['add'](_0x2695ea);for(const {userId:_0x52b1ba}of this['_touchedRoots']['values']())null!==_0x52b1ba&&_0x18ea35['add'](_0x52b1ba);this['_markChanges'](_0x5930f9,_0x344ee5['insertions'][_0x558e18],_0x3d6472,'insertion',_0x18ea35),this['_markChanges'](_0x1651ca,_0x344ee5['deletions'][_0x558e18],_0xaf9596,'deletion',_0x18ea35),_0x318099[_0x558e18]={'insertions':this['_prepareViewToSave'](_0x5930f9),'deletions':this['_prepareViewToSave'](_0x1651ca),'attachChange':this['_touchedRoots']['get'](_0x558e18)||null,'attributesBefore':_0xea4767(this['_baseRootsAttributes']['get'](_0x558e18))||{},'attributesAfter':_0xea4767(this['_diffRootsAttributes']['get'](_0x558e18)),'rootElementName':_0x3c3dba['get'](_0x558e18)};}return{'diffData':_0x318099,'authorsIds':Array['from'](_0x18ea35)};}['_processRootBeforeSave'](_0x47a45a){for(const [,_0x4f05cb]of _0x47a45a['markers']){const _0x26c417=_0x4f05cb['start']['getAncestors']()['filter'](_0x3c7401=>'tableCell'==_0x3c7401['name']);for(const _0xea631 of _0x26c417)0x1==_0xea631['childCount']&&_0xea631['getChild'](0x0)['is']('element','paragraph')&&_0xea631['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2bc193){this['_processRootBeforeSave'](_0x2bc193);const _0x35903b=this['editor']['data']['toView'](_0x2bc193,{}),_0x3c8032=Array['from'](_0x35903b['getChildren']())['map'](_0x30780f=>this['_getViewJson'](_0x30780f));return JSON['stringify'](_0x3c8032);}['_getViewJson'](_0x333c81){if(_0x333c81['is']('$text'))return _0x333c81['data'];{const _0x164776=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x95e634=_0x333c81,_0x3f6192=this['editor']['data']['htmlProcessor']['domConverter'],_0x2b299a={'type':_0x164776['_getTypeCharForViewElement'](_0x95e634),'name':_0x95e634['name'],'attributes':Array['from'](_0x95e634['getAttributes']()),'children':Array['from'](_0x95e634['getChildren']())['map'](_0x2cdaca=>this['_getViewJson'](_0x2cdaca))};if(_0x333c81['is']('uiElement')&&'$comment'!=_0x333c81['name']){const _0x5312f2=_0x333c81['render'](_0x3f6192['domDocument'],_0x3f6192);_0x2b299a['children']['push'](_0x5312f2['outerHTML']);}else{if(_0x333c81['is']('rawElement')){const _0x5899ff=_0x3f6192['domDocument']['createElement'](_0x95e634['name']);_0x333c81['render'](_0x5899ff,_0x3f6192),_0x2b299a['children']['push'](_0x5899ff['innerHTML']);}}const _0x4f5ce1=Array['from'](_0x95e634['getCustomProperties']());_0x4f5ce1['length']>0x0&&(_0x2b299a['customProperties']=_0x4f5ce1);const _0x1518a3=_0x95e634['getFillerOffset']();return null!==_0x1518a3&&(_0x2b299a['fillerOffset']=_0x1518a3),_0x2b299a;}}['_markChanges'](_0x114de9,_0xe95cc5,_0x16964f,_0x2c8b52,_0x53a335){let _0x197b96=null,_0x4eddd6=null,_0x2bb6e9=0x0;const _0x4fa6c6=this['editor']['model'];for(let _0x223d5e=0x0;_0x223d5e<_0xe95cc5['length'];_0x223d5e++){const _0x58b74b=this['_getVidAttributeName'](_0xe95cc5[_0x223d5e]),_0x187c4a=_0xe95cc5[_0x223d5e]['item']['getAttribute'](_0x58b74b),_0x12b2e9=_0x16964f['get'](_0x187c4a),_0x474f01=_0x223d5e==_0xe95cc5['length']-0x1;(!_0x197b96&&_0x12b2e9&&(_0x197b96=_0x12b2e9,_0x4eddd6=_0xe95cc5[_0x223d5e]),_0x197b96&&(!_0x12b2e9||_0x12b2e9['userId']!=_0x197b96['userId']))&&(_0x4c5678(_0x12b2e9,mt(_0x4eddd6,_0x114de9,_0x4fa6c6),mt(_0xe95cc5[_0x223d5e],_0x114de9,_0x4fa6c6)),_0x197b96=_0x12b2e9||null,_0x4eddd6=_0x12b2e9?_0xe95cc5[_0x223d5e]:null),_0x197b96&&_0x474f01&&_0x4c5678(_0x12b2e9,mt(_0x4eddd6,_0x114de9,_0x4fa6c6),pt(_0xe95cc5[_0x223d5e],_0x114de9,_0x4fa6c6));}function _0x4c5678(_0x184712,_0x594349,_0x503cfb){const _0x103255=_0x197b96['userId'],_0x1e7a0e='revision:'+_0x2c8b52+':'+_0x103255+':'+_0x2bb6e9++,_0x93548f=_0x4fa6c6['createRange'](_0x594349,_0x503cfb);_0x114de9['markers']['set'](_0x1e7a0e,_0x93548f),null!==_0x103255&&_0x53a335['add'](_0x103255);}}['_getVidAttributeName'](_0x4ddd6e){switch(_0x4ddd6e['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1ad9fd,_0x56f0a7){_0x1ad9fd['baseVersion']=null;for(const _0xc6c8df in _0x1ad9fd){const _0x58d05e=_0x1ad9fd[_0xc6c8df];if(_0x58d05e instanceof _0x461e8e){const _0x541848=_0x56f0a7['get'](_0x58d05e['root']['rootName']);_0x1ad9fd[_0xc6c8df]=this['_fixPosition'](_0x58d05e,_0x541848);}if(_0x58d05e instanceof _0x414021){const _0x17813d=_0x56f0a7['get'](_0x58d05e['root']['rootName']);_0x1ad9fd[_0xc6c8df]=this['_fixRange'](_0x58d05e,_0x17813d);}'root'===_0xc6c8df&&(_0x1ad9fd['root']=_0x56f0a7['get'](_0x1ad9fd['root']['rootName']));}}['_fixRange'](_0x1f28ab,_0x3ca4d9){return this['editor']['model']['createRange'](this['_fixPosition'](_0x1f28ab['start'],_0x3ca4d9),this['_fixPosition'](_0x1f28ab['end'],_0x3ca4d9));}['_fixPosition'](_0x1701f2,_0x5c5395){return this['editor']['model']['createPositionFromPath'](_0x5c5395,_0x1701f2['path'],_0x1701f2['stickiness']);}['_handleInsertOperation'](_0x24eeac){const _0x2ceb4b=this['_idsRoots']['get'](_0x24eeac['position']['root']['rootName']),_0x2910e9=this['_fixPosition'](_0x24eeac['position'],_0x2ceb4b),_0x40c43a=null===_0x24eeac['_authorId']?null:_0x24eeac['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53af5f=_0x2910e9['parent'],_0x10390e=this['_revisionId'],_0x101ff9=[];for(const _0x16c2b7 of _0x24eeac['nodes'])if(_0x16c2b7['is']('element'))_0x101ff9['push'](this['_makeIdsRoot'](_0x16c2b7));else{for(let _0x3b133b=0x0;_0x3b133b<_0x16c2b7['offsetSize'];_0x3b133b++)_0x101ff9['push'](new _0x1a0f77('$text',{'vid':this['_revisionId']++}));}const _0xe231bf=this['_revisionId'];for(let _0x5932ca=_0x10390e;_0x5932ca<_0xe231bf;_0x5932ca++)this['_touched']['set'](_0x5932ca,{'userId':_0x40c43a});_0x53af5f['_insertChild'](_0x2910e9['offset'],_0x101ff9);}['_handleMoveOperation'](_0x5051b9){(_0x5051b9=this['_cloneOperation'](_0x5051b9,this['_idsRoots']))['_execute']();const _0x46d278=null===_0x5051b9['_authorId']?null:_0x5051b9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x29e5a7=_0x5051b9['getMovedRangeStart'](),_0x2b70b5=_0x29e5a7['parent'],_0x212e6e=_0x29e5a7['offset'];!function _0x394a5c(_0x290c99,_0xd5220e,_0x4714ef,_0x209ab3){for(let _0x42ccb3=_0x4714ef;_0x42ccb3<_0x209ab3;_0x42ccb3++){const _0x533161=_0xd5220e['getChild'](_0x42ccb3);_0x533161['is']('element','$text')?_0x290c99['set'](_0x533161['getAttribute']('vid'),{'userId':_0x46d278}):(_0x290c99['set'](_0x533161['getAttribute']('vid_start'),{'userId':_0x46d278}),_0x394a5c(_0x290c99,_0x533161,0x0,_0x533161['childCount']),_0x290c99['set'](_0x533161['getAttribute']('vid_end'),{'userId':_0x46d278}));}}(this['_touched'],_0x2b70b5,_0x212e6e,_0x212e6e+_0x5051b9['howMany']);}['_handleMergeOperation'](_0x15ce9d){const _0x2254fa=null===(_0x15ce9d=this['_cloneOperation'](_0x15ce9d,this['_idsRoots']))['_authorId']?null:_0x15ce9d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xa9f0ca=_0x15ce9d['targetPosition']['parent'],_0x16b58c=_0x15ce9d['sourcePosition']['parent'],_0x47229f=_0xa9f0ca['getAttribute']('vid_end'),_0x176f97=_0x16b58c['getAttribute']('vid_start');_0xa9f0ca['_setAttribute']('vid_end',_0x16b58c['getAttribute']('vid_end')),_0x16b58c['_setAttribute']('vid_end',_0x47229f),this['_touched']['set'](_0x176f97,{'userId':_0x2254fa}),this['_touched']['set'](_0x47229f,{'userId':_0x2254fa}),_0x15ce9d['_execute']();}['_handleSplitOperation'](_0x10ad84){const _0x2cda9c=null===(_0x10ad84=this['_cloneOperation'](_0x10ad84,this['_idsRoots']))['_authorId']?null:_0x10ad84['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4108a4=_0x10ad84['graveyardPosition'],_0x326094=_0x10ad84['splitPosition']['parent'];_0x10ad84['_execute']();const _0x1a551d=_0x326094['getAttribute']('vid_end'),_0x346672=_0x10ad84['insertionPosition']['nodeAfter'];if(_0x4108a4){const _0x3da3ee=_0x346672['getAttribute']('vid_end'),_0x12324c=_0x326094['getAttribute']('vid_end');_0x326094['_setAttribute']('vid_end',_0x3da3ee),_0x346672['_setAttribute']('vid_end',_0x12324c),this['_touched']['set'](_0x326094['getAttribute']('vid_end'),{'userId':_0x2cda9c}),this['_touched']['set'](_0x346672['getAttribute']('vid_start'),{'userId':_0x2cda9c});}else{const _0x1e4098=this['_revisionId']++,_0x45ddd5=this['_revisionId']++;_0x326094['_setAttribute']('vid_end',_0x1e4098),_0x346672['_setAttribute']('vid_start',_0x45ddd5),_0x346672['_setAttribute']('vid_end',_0x1a551d),this['_touched']['set'](_0x1e4098,{'userId':_0x2cda9c}),this['_touched']['set'](_0x45ddd5,{'userId':_0x2cda9c});}}['_handleMarkerOperation'](_0x10755c){if(!_0x10755c['affectsData'])return;const _0x77a8f2=(_0x10755c=this['_cloneOperation'](_0x10755c,this['_diffRoots']))['oldRange']?_0x10755c['oldRange']['root']:null,_0x389785=_0x10755c['newRange']?_0x10755c['newRange']['root']:null;_0x77a8f2&&this['_markers']['delete'](_0x10755c['name']),_0x389785&&this['_markers']['set'](_0x10755c['name'],_0x10755c['newRange']['clone']());const _0x102ebe=null===_0x10755c['_authorId']?null:_0x10755c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5bd12f=_0x10755c['name'];if(!this['_touchedMarkers']['has'](_0x5bd12f))return void this['_touchedMarkers']['set'](_0x5bd12f,{'range':_0x10755c['oldRange'],'userId':_0x102ebe});const _0x38d2eb=this['_touchedMarkers']['get'](_0x5bd12f),_0x104429=_0x38d2eb['range'],_0x2979bd=_0x10755c['newRange'];null==_0x104429&&null==_0x2979bd||_0x104429&&_0x2979bd&&_0x104429['isEqual'](_0x2979bd)?this['_touchedMarkers']['delete'](_0x10755c['name']):_0x38d2eb['userId']=_0x102ebe;}['_handleRootOperation'](_0x26a0f7,_0x5e96e8){this['_diffRoots']['has'](_0x26a0f7['rootName'])?this['_diffRoots']['get'](_0x26a0f7['rootName'])['_isAttached']=_0x26a0f7['isAdd']:(this['_diffRoots']['set'](_0x26a0f7['rootName'],wt(_0x26a0f7['rootName'],_0x26a0f7['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x26a0f7['rootName'],{}),_0x5e96e8&&this['_idsRoots']['set'](_0x26a0f7['rootName'],wt(_0x26a0f7['rootName'],_0x26a0f7['elementName'],!0x0)));const _0x5b26a0=null===_0x26a0f7['_authorId']?null:_0x26a0f7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2dc95b=this['_touchedRoots']['get'](_0x26a0f7['rootName']);_0x2dc95b&&_0x2dc95b['userId']===_0x5b26a0?this['_touchedRoots']['delete'](_0x26a0f7['rootName']):this['_touchedRoots']['set'](_0x26a0f7['rootName'],{'userId':_0x5b26a0,'isAttached':_0x26a0f7['isAdd']});}['_handleRootAttributeOperation'](_0x515570){const _0xcad375=this['_diffRootsAttributes']['get'](_0x515570['root']['rootName']);null===_0x515570['newValue']?delete _0xcad375[_0x515570['key']]:_0xcad375[_0x515570['key']]=_0x515570['newValue'];}}function gt(_0x59d5fd){const _0x83fd3f=wt(_0x59d5fd['rootName'],_0x59d5fd['name'],_0x59d5fd['isAttached']());for(const _0x1af81e of _0x59d5fd['getChildren']()){const _0x2c6f48=_0x1af81e['_clone'](!0x0);_0x83fd3f['_appendChild'](_0x2c6f48);}return _0x83fd3f;}function wt(_0x536fa1,_0x76c9e9,_0x7ceb7b=!0x0){const _0x212a9a=new _0x538fb3();return _0x212a9a['rootName']=_0x536fa1,_0x212a9a['name']=_0x76c9e9,_0x212a9a['_isAttached']=_0x7ceb7b,_0x212a9a['isAttached']=()=>_0x212a9a['_isAttached'],_0x212a9a;}function mt(_0x38923f,_0x2f51f0,_0x525dc5){const _0x250ba2='elementEnd'==_0x38923f['type']?_0x525dc5['createPositionAt'](_0x38923f['item'],'end'):_0x525dc5['createPositionBefore'](_0x38923f['item']);return _0x525dc5['createPositionFromPath'](_0x2f51f0,_0x250ba2['path'],_0x250ba2['stickiness']);}function pt(_0x17cdce,_0x5ca52c,_0x4a8c1f){const _0x521721='elementStart'==_0x17cdce['type']?_0x4a8c1f['createPositionAt'](_0x17cdce['item'],0x0):_0x4a8c1f['createPositionAfter'](_0x17cdce['item']);return _0x4a8c1f['createPositionFromPath'](_0x5ca52c,_0x521721['path'],_0x521721['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
25
+ _0xd8f0c9(_0x6b0c43){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x29f6a8,_0x173ee6){super(_0x29f6a8),this['focusTracker']=new _0x204a41(),this['keystrokes']=new _0x4d6df5(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x173ee6),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'](),_0x11315e({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x3e2511=_0x18e73b=>_0x18e73b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x3e2511),this['keystrokes']['set']('arrowleft',_0x3e2511),this['keystrokes']['set']('arrowup',_0x3e2511),this['keystrokes']['set']('arrowdown',_0x3e2511);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x4f5419){this['revisionNameInputView']['fieldView']['element']['value']=_0x4f5419['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x3e8dc2){const _0x384495=new _0x7cd47d(this['locale'],_0x1fb48d),_0x1dd9ac=_0x384495['fieldView'];_0x1dd9ac['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x458ff7=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x3e8dc2&&(_0x458ff7+='\x20('+ft(this['locale'],'optional')+')'),(_0x384495['label']=_0x458ff7,_0x1dd9ac['on']('input',()=>{this['revisionNameInputValue']=_0x1dd9ac['element']['value']['trim']();}),_0x384495);}}class RevisionHistoryUI extends _0x3b8836{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x1e9265=this['editor'],_0xfd7378=_0x1e9265['plugins']['get']('RevisionTracker');_0x1e9265['ui']['componentFactory']['add']('revisionHistory',_0x2fb61f=>{const _0x127f74=_0xcc940(_0x2fb61f),_0x1e4273=_0x127f74['panelView']['children'],_0x4c74cc=new _0x47cf56(_0x2fb61f),_0x46c122=new _0x55e3f4(_0x2fb61f),_0x2ca53d=this['_createSaveRevisionButton'](_0x8647ff),_0x15fdbf=new _0x55e3f4(_0x2fb61f),_0x49f3bc=this['_createOpenRevisionButton'](_0x8647ff);return _0x127f74['bind']('isEnabled')['to'](_0xfd7378,'isReady',_0xfd7378,'isEnabled',_0x1e9265,'isReadOnly',(_0x5a708c,_0x252e8f,_0x200477)=>_0x5a708c&&_0x252e8f&&!_0x200477),_0x127f74['buttonView']['set']({'icon':_0x184ecc,'label':ft(_0x2fb61f,'Revision\x20history'),'tooltip':!0x0}),_0x2ca53d['set']({'withText':!0x0,'role':'menuitem'}),_0x49f3bc['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x49f3bc,'execute',()=>{_0x127f74['isOpen']=!0x1,_0x1e9265['editing']['view']['focus']();},{'priority':'low'}),_0x46c122['children']['add'](_0x2ca53d),_0x15fdbf['children']['add'](_0x49f3bc),_0x4c74cc['role']='menu',_0x4c74cc['items']['addMany']([_0x46c122,_0x15fdbf]),_0x1e4273['add'](_0x4c74cc),_0x127f74;}),_0x1e9265['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3dc3fc=this['editor'],_0x2e42a8=_0x3dc3fc['locale'],_0xf134ff=_0x3dc3fc['plugins']['get']('RevisionTracker'),_0x284d39=new _0x564222(_0x2e42a8),_0x47af08=new _0x3cbddb(_0x2e42a8);_0x284d39['bind']('isEnabled')['to'](_0xf134ff,'isReady',_0xf134ff,'isEnabled',_0x3dc3fc,'isReadOnly',(_0x1363ca,_0xfaf1be,_0x3107ed)=>_0x1363ca&&_0xfaf1be&&!_0x3107ed),_0x284d39['buttonView']['set']({'icon':_0x184ecc,'label':ft(_0x2e42a8,'Revision\x20history')});const _0x439044=new tt(_0x2e42a8,_0x284d39),_0x307148=this['_createSaveRevisionButton'](it);_0x307148['delegate']('execute')['to'](_0x284d39),_0x439044['children']['add'](_0x307148),_0x47af08['items']['add'](_0x439044);const _0x20c8d2=new tt(_0x2e42a8,_0x284d39),_0x8cbace=this['_createOpenRevisionButton'](it);return _0x8cbace['delegate']('execute')['to'](_0x284d39),_0x20c8d2['children']['add'](_0x8cbace),_0x47af08['items']['add'](_0x20c8d2),_0x284d39['panelView']['children']['add'](_0x47af08),_0x284d39;}['_createSaveRevisionButton'](_0x259597){const _0x3e68f1=this['editor'],_0x2b7908=_0x3e68f1['plugins']['get']('RevisionTracker'),_0x37a629=new _0x259597(_0x3e68f1['locale']);return _0x37a629['set']({'label':ft(_0x3e68f1['locale'],'Save\x20current\x20revision')}),_0x37a629['bind']('isEnabled')['to'](_0x2b7908,'isReady',_0x2b7908,'isEnabled',_0x3e68f1,'isReadOnly',(_0x844751,_0x543317,_0x250402)=>_0x844751&&_0x543317&&!_0x250402),this['listenTo'](_0x37a629,'execute',()=>{this['_showDialog']();}),_0x37a629;}['_createOpenRevisionButton'](_0x2428ac){const _0x481437=this['editor'],_0x1bac0f=_0x481437['plugins']['get']('RevisionTracker'),_0x4a58c2=new _0x2428ac(_0x481437['locale']);return _0x4a58c2['set']({'label':ft(_0x481437['locale'],'Open\x20revision\x20history')}),_0x4a58c2['bind']('isEnabled')['to'](_0x1bac0f,'isReady',_0x481437,'isReadOnly',(_0x2b3e10,_0x35cdb5)=>_0x2b3e10&&!_0x35cdb5),this['listenTo'](_0x4a58c2,'execute',()=>{_0x481437['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x4a58c2;}['_showDialog'](){const _0x4fa20b=this['editor'],_0x1f25b8=_0x4fa20b['locale'],_0x8dd9b6=_0x4fa20b['plugins']['get']('Dialog'),_0x355f8d=_0x4fa20b['plugins']['get']('RevisionTracker');function _0x317543(_0x557cea){_0x4fa20b['config']['get']('revisionHistory.requireRevisionName')&&''===_0x557cea['revisionName']?_0x557cea['revisionNameInputView']['errorText']=ft(_0x1f25b8,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4fa20b['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x557cea['revisionName']}),_0x8dd9b6['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x317543(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x8dd9b6['show']({'id':'revisionSave','title':ft(_0x1f25b8,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x4fa20b['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x8dd9b6['hide']()},{'label':ft(_0x4fa20b['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x238cd0){_0x238cd0['bind']('isEnabled')['to'](_0x355f8d,'isReady',_0x355f8d,'isEnabled',_0x4fa20b,'isReadOnly',(_0x5db2ad,_0xc6408,_0x59728d)=>_0x5db2ad&&_0xc6408&&!_0x59728d);},'onExecute':()=>_0x317543(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x38c2ed=this['editor'],_0x37484a=_0x38c2ed['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x37484a,_0x38c2ed['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x6b0c43{['changeId'];['_model'];constructor(_0x2f356d,_0x3109ea){super(_0x2f356d),this['_model']=_0x3109ea,this['changeId']=_0x3109ea['id'];const _0x56f5b7=this['bindTemplate'],_0x34338d=ft(_0x2f356d,_0x3109ea['data']['isSuggestion']?'Suggested\x20by':'add'==_0x3109ea['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x3109ea['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x56f5b7['to']('type',_0x5d1213=>'ck-revision-change__'+_0x5d1213)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x34338d}]},{'text':'\x20'+_0x3109ea['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
26
+ _0x4dc482(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x65d574){super(),this['id']=_0x65d574['id']||_0x439976(),this['author']=_0x65d574['author'],this['type']=_0x65d574['type'],this['data']=_0x65d574['data']||{},this['rootName']=_0x65d574['rootName'],this['set']('createdAt',_0x65d574['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x56632b,_0x83a169){this['newRevisionId']=_0x56632b,this['oldRevisionId']=_0x83a169,this['changes']=new _0xe9e71e();}['_setChanges'](_0x588f15){for(const _0x32b3c4 of _0x588f15)this['changes']['add'](_0x32b3c4);}}class RevisionViewer extends _0x3b8836{['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[_0x51d413,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x474a75){super(_0x474a75),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',(_0x10c252,_0x5563e5,_0x13e526)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5421fb=>{for(const _0x4bfc70 of this['editor']['editing']['view']['document']['roots'])_0x13e526?_0x5421fb['removeClass']('ck-editor__editable__overlay',_0x4bfc70):_0x5421fb['addClass']('ck-editor__editable__overlay',_0x4bfc70);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4c4fdf=>null!==_0x4c4fdf),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5db196,_0x51c636,_0x1989f4)=>_0x5db196&&_0x1989f4?_0x51c636['changes']['getIndex'](_0x1989f4):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4d407b,_0x2ca930)=>_0x4d407b?_0x2ca930['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x431827=this['editor'],_0x3c4b10=new ShowChangeCommand(_0x431827,{'direction':'backward'}),_0x163eec=new ShowChangeCommand(_0x431827,{'direction':'forward'});(_0x431827['commands']['add']('showPreviousChange',_0x3c4b10),_0x431827['commands']['add']('showNextChange',_0x163eec),_0x431827['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x431827)),this['on']('change:numberOfChanges',()=>{_0x3c4b10['refresh'](),_0x163eec['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x431827['enableReadOnlyMode']('revision-viewer'),_0x431827['plugins']['has']('WidgetToolbarRepository'))&&_0x431827['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x587509){return await this['_utils']['loadRevisionData'](_0x587509,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x587509);}async['getRevisionRootsAttributes'](_0x4ce3b4){return await this['_utils']['loadRevisionData'](_0x4ce3b4,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4ce3b4);}async['compare'](_0x1e131e,_0x5c1587,_0x1bac3b=!0x1){if(!this['isEnabled'])return;const _0x17ed86=this['diff'],_0x4d09d8=this['repository'],_0x52da7c='string'==typeof _0x1e131e?_0x4d09d8['getRevision'](_0x1e131e):_0x1e131e,_0x13bfea='string'==typeof _0x5c1587?_0x4d09d8['getRevision'](_0x5c1587):_0x5c1587,_0x31d594=_0x52da7c['id'],_0x1081c9=_0x13bfea?_0x13bfea['id']:null;if(!_0x1bac3b&&this['diff']&&this['diff']['newRevisionId']===_0x31d594&&this['diff']['oldRevisionId']===_0x1081c9)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x31d594,_0x1081c9);const _0x62fd0d=this['_getRevisionsRange'](_0x52da7c,_0x13bfea,!0x0)['map'](_0x1a1d93=>this['_utils']['loadRevisionData'](_0x1a1d93,this['adapter']));return _0x62fd0d['push'](new Promise(_0x5e0d06=>{setTimeout(_0x5e0d06,0x14);})),Promise['all'](_0x62fd0d)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x247b5b=this['_getDiff'](_0x31d594,_0x1081c9);for(const _0xcc3849 of _0x247b5b['changes'])this['_changeIdToChange']['set'](_0xcc3849['id'],_0xcc3849);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1f977e=>{for(const _0x27ed03 of this['editor']['model']['document']['getRootNames']())_0x1f977e['detachRoot'](_0x27ed03);for(const _0x3b6007 of Object['keys'](_0x247b5b['model'])){const _0x117d25=_0x247b5b['model'][_0x3b6007]['name'],_0x108bb5=_0x1f977e['addRoot'](_0x3b6007,_0x117d25);for(const _0x118dfa of Object['keys'](_0x247b5b['attributes'][_0x3b6007]))_0x1f977e['setAttribute'](_0x118dfa,_0x247b5b['attributes'][_0x3b6007][_0x118dfa],_0x108bb5);_0x1f977e['insert'](_0x247b5b['model'][_0x3b6007],_0x108bb5,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x247b5b['changes'])),this['isReady']=!0x0;})['catch'](_0x1693e3=>{console['error'](_0x1693e3),this['_cleanUp'](),_0x17ed86&&(this['diff']=_0x17ed86),this['isReady']=!0x0;});}['addRevisionData'](_0x3bcaf3,_0x82e4c){const _0x1158d2=this['repository']['createRevision'](_0x3bcaf3);return _0x1158d2['on']('_update',(_0x5dcb88,_0x5a2b18,_0x2c06b9)=>_0x82e4c(_0x5a2b18,_0x2c06b9,_0x1158d2)),this['repository']['addRevision'](_0x1158d2),_0x1158d2;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x18fbf4=>{for(const _0xefc35a of this['editor']['model']['document']['getRootNames']())_0x18fbf4['detachRoot'](_0xefc35a);});}['_sortAndFilterDiffChanges'](_0x8e2b36){const _0x13f19c=[],_0x2f79a9=new Map();for(const _0x147839 of this['editor']['model']['document']['getRootNames']()){const _0x3f1987=this['editor']['editing']['view']['getDomRoot'](_0x147839);if(!_0x3f1987)continue;const _0x3f6570=_0x3f1987['getClientRects']()['item'](0x0);_0x3f6570&&(_0x13f19c['push'](_0x147839),_0x2f79a9['set'](_0x147839,_0x3f6570));}return _0x13f19c['sort']((_0x51f851,_0x19a4ee)=>{const _0x5cff2c=_0x2f79a9['get'](_0x51f851),_0x35e32b=_0x2f79a9['get'](_0x19a4ee);return _0x5cff2c['y']-_0x35e32b['y']||_0x5cff2c['x']-_0x35e32b['x'];}),(_0x8e2b36=_0x8e2b36['filter'](_0x3a215d=>_0x13f19c['includes'](_0x3a215d['rootName'])))['sort']((_0x5a5720,_0x1e4820)=>_0x13f19c['indexOf'](_0x5a5720['rootName'])-_0x13f19c['indexOf'](_0x1e4820['rootName'])),_0x8e2b36;}['_makeTape'](_0x3dbf2f){const _0x24dfc9=Array['from'](_0x3dbf2f['markers'])['filter'](([_0x16d8f7,_0x38159f])=>_0x16d8f7['startsWith']('revision:')&&!_0x38159f['isCollapsed']),_0x2f0f6e=Array['from'](this['editor']['model']['createRangeIn'](_0x3dbf2f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x24dfc9['length'])for(const _0x2ff1e4 of _0x2f0f6e){const [_0x1ada2d,_0x2369a5]=_0x24dfc9[0x0],[,_0x371139,_0x386413]=_0x1ada2d['split'](':');if(_0x2369a5['end']['isEqual'](_0x2ff1e4['nextPosition'])&&_0x24dfc9['shift'](),(_0x2ff1e4['previousPosition']['isEqual'](_0x2369a5['start'])||_0x2ff1e4['previousPosition']['isAfter'](_0x2369a5['start']))&&('insertion'==_0x371139?_0x2ff1e4['isAdded']={'userId':_0x386413}:'deletion'==_0x371139&&(_0x2ff1e4['isRemoved']={'userId':_0x386413})),0x0==_0x24dfc9['length'])break;}return _0x2f0f6e;}['_refreshStartEndIndex'](_0x4ff48a){const _0x50d97f=new Map();for(let _0x5d35cf=0x0;_0x5d35cf<_0x4ff48a['length'];_0x5d35cf++)'text'===_0x4ff48a[_0x5d35cf]['type']?(_0x4ff48a[_0x5d35cf]['item']['startIndex']=_0x5d35cf,_0x4ff48a[_0x5d35cf]['item']['endIndex']=_0x5d35cf):('elementStart'===_0x4ff48a[_0x5d35cf]['type']?_0x4ff48a[_0x5d35cf]['item']['startIndex']=_0x5d35cf:'elementEnd'===_0x4ff48a[_0x5d35cf]['type']&&(_0x4ff48a[_0x5d35cf]['item']['endIndex']=_0x5d35cf),_0x50d97f['set'](_0x4ff48a[_0x5d35cf]['id'],_0x5d35cf));for(const _0x489ccb of _0x50d97f['values']())'elementStart'===_0x4ff48a[_0x489ccb]['type']?_0x4ff48a[_0x489ccb]['item']['endIndex']=_0x50d97f['get'](_0x4ff48a[_0x489ccb]['pairId']):'elementEnd'===_0x4ff48a[_0x489ccb]['type']&&(_0x4ff48a[_0x489ccb]['item']['startIndex']=_0x50d97f['get'](_0x4ff48a[_0x489ccb]['pairId']));}['_processTape'](_0x2f94cf){for(let _0x49aefd=0x0;_0x49aefd<_0x2f94cf['length'];_0x49aefd++){if('elementStart'===_0x2f94cf[_0x49aefd]['type'])_0x2f94cf[_0x49aefd]['item']['startIndex']=_0x49aefd;else{if('elementEnd'===_0x2f94cf[_0x49aefd]['type']){_0x2f94cf[_0x49aefd]['item']['endIndex']=_0x49aefd;const _0x445ccc=_0x2f94cf[_0x49aefd]['item']['startIndex'];_0x2f94cf[_0x445ccc]['pairId']=_0x2f94cf[_0x49aefd]['id'],_0x2f94cf[_0x49aefd]['pairId']=_0x2f94cf[_0x445ccc]['id'];}else _0x2f94cf[_0x49aefd]['item']['startIndex']=_0x49aefd,_0x2f94cf[_0x49aefd]['item']['endIndex']=_0x49aefd,_0x2f94cf[_0x49aefd]['pairId']=null;}_0x2f94cf[_0x49aefd]['markersStart']||(_0x2f94cf[_0x49aefd]['markersStart']=[],_0x2f94cf[_0x49aefd]['markersEnd']=[]);}}['_markInsertions'](_0x7bb8ee,_0x225d6a){const _0x1f590e=_0x7bb8ee['filter'](_0x2885f4=>!_0x2885f4['isAdded']);for(let _0x5e6849=0x0;_0x5e6849<_0x225d6a['length'];_0x5e6849++)_0x225d6a[_0x5e6849]['isAdded']&&(_0x1f590e[_0x5e6849]['isAdded']=_0x225d6a[_0x5e6849]['isAdded']);}['_getDiff'](_0x8b7725,_0x10be1a=null){const _0x2d3875=this['repository']['getRevision'](_0x8b7725),_0x2e6ade=_0x10be1a?this['repository']['getRevision'](_0x10be1a):null,_0x6cc462=this['_getRevisionsRange'](_0x2d3875,_0x2e6ade),_0x18917e=_0x6cc462[_0x6cc462['length']-0x1],_0x446e04=new Map(),_0xd42b23={'model':{},'attributes':{},'changes':[]},_0x37d9f0=new Set(),_0x47af52=new Map();for(let _0x13b140=_0x6cc462['length']-0x1;_0x13b140>=0x0;_0x13b140--){const _0x2518b=_0x6cc462[_0x13b140];for(const _0x192bc2 of Object['keys'](_0x2518b['diffData']))if(_0x2518b['diffData'][_0x192bc2]['attachChange']){const _0xa32cec=_0x2518b['diffData'][_0x192bc2]['attachChange'];_0xa32cec['isAttached']?(_0x37d9f0['add'](_0x192bc2),_0x47af52['has'](_0x192bc2)&&_0x47af52['get'](_0x192bc2)['userId']==_0xa32cec['userId']?_0x47af52['delete'](_0x192bc2):_0x47af52['set'](_0x192bc2,_0xa32cec)):_0x47af52['has'](_0x192bc2)?(_0x37d9f0['delete'](_0x192bc2),_0x47af52['delete'](_0x192bc2)):(_0x37d9f0['add'](_0x192bc2),_0x47af52['set'](_0x192bc2,_0xa32cec));}else _0x37d9f0['add'](_0x192bc2);}for(const _0x5b8f0d of _0x37d9f0){const _0x446b3a=_0x47af52['has'](_0x5b8f0d)&&!_0x47af52['get'](_0x5b8f0d)['isAttached'];let _0x3880b4=_0x446b3a?_0x6cc462['length']-0x1:0x0;const _0x50a582=_0x446b3a?-0x1:0x1;for(;_0x6cc462[_0x3880b4];){const _0x1075fc=_0x6cc462[_0x3880b4];if(_0x1075fc['diffData'][_0x5b8f0d]){const _0x11103e=_0x446b3a?_0x1075fc['diffData'][_0x5b8f0d]['attributesBefore']:_0x1075fc['diffData'][_0x5b8f0d]['attributesAfter'];_0xd42b23['attributes'][_0x5b8f0d]=_0x11103e?_0xea4767(_0x11103e):{};break;}_0x3880b4+=_0x50a582;}}for(const _0x562f86 of _0x6cc462){_0x562f86['model']={};for(const _0x51130d of _0x562f86['authors'])_0x446e04['set'](_0x51130d['id'],_0x51130d);for(const _0x422e50 of _0x37d9f0){const _0x28d2ce=_0x562f86['diffData'][_0x422e50]?_0x562f86['diffData'][_0x422e50]['insertions']:'[]',_0x16cff9=_0x562f86['diffData'][_0x422e50]?_0x562f86['diffData'][_0x422e50]['deletions']:'[]',_0x3abbcf=_0x562f86['diffData'][_0x422e50]?.['rootElementName']||'$root';_0x562f86['model'][_0x422e50]={'insertions':this['_utils']['_makeModelFromViewString'](_0x28d2ce,_0x3abbcf),'deletions':this['_utils']['_makeModelFromViewString'](_0x16cff9,_0x3abbcf)};}}for(const _0xe8de35 of _0x37d9f0){let _0x416ab2=null,_0x33ffc4=0x0;const _0x5a70ea=_0x6cc462['map'](_0x2398da=>_0x2398da['diffData'][_0xe8de35]?.['rootElementName'])['find'](_0x518daa=>void 0x0!==_0x518daa)||'$root',_0x4871b6=new Map(Array['from'](_0x2d3875['model'][_0xe8de35]['insertions']['markers'])['filter'](([_0x108a6d])=>!_0x108a6d['startsWith']('revision:')));let _0x462386=0x0;for(const _0x142c87 of _0x6cc462){const _0x51decc=this['_makeTape'](_0x142c87['model'][_0xe8de35]['insertions']);_0x142c87==_0x2d3875?(_0x416ab2=_0x51decc,_0x33ffc4=_0x416ab2['length'],_0x416ab2['forEach'](_0x2af23c=>{_0x2af23c['id']=_0x462386++;}),this['_processTape'](_0x416ab2)):this['_markInsertions'](_0x416ab2,_0x51decc);const _0x11113a=_0x416ab2['filter'](_0x1d3a7d=>!_0x1d3a7d['isAdded'])['map'](_0x3c3948=>_0x3c3948['id']);let _0x2082e7=0x0;const _0x2c15e2=this['_makeTape'](_0x142c87['model'][_0xe8de35]['deletions']);_0x2c15e2['forEach'](_0x45b21a=>{_0x45b21a['isRemoved']?_0x45b21a['id']=_0x33ffc4++:_0x45b21a['id']=_0x11113a[_0x2082e7++];}),this['_processTape'](_0x2c15e2),this['_setDistance'](_0x416ab2,'isAdded'),this['_setDistance'](_0x2c15e2,'isRemoved'),_0x142c87==_0x2d3875&&this['_markMarkers'](_0x416ab2,_0x4871b6),_0x416ab2=this['_joinTapes'](_0x416ab2,_0x2c15e2),this['_refreshStartEndIndex'](_0x416ab2),this['_setDistance'](_0x416ab2,'isRemoved');}_0x416ab2=_0x416ab2['filter'](_0x1b3017=>!(_0x1b3017['isAdded']&&_0x1b3017['isRemoved']));const _0x471b4f=new Map(_0x18917e['model'][_0xe8de35]['deletions']['markers']),_0x1a9869=new Set(_0x4871b6['keys']());for(const _0x52081f of _0x471b4f['keys']())_0x1a9869['delete'](_0x52081f);this['_markSuggestions'](_0x416ab2,_0x1a9869),this['_fixObsoleteTags'](_0x416ab2),_0x416ab2=this['_removeMissingPairs'](_0x416ab2),_0x416ab2=this['_markMismatchedRemovedTags'](_0x416ab2),_0x416ab2=this['_removeUnsupportedChanges'](_0x416ab2);const {root:_0x28d4f7,changes:_0x5a243e}=this['_makeModelFromTape'](_0x416ab2,_0x446e04,_0xe8de35,_0x5a70ea);_0xd42b23['model'][_0xe8de35]=_0x28d4f7;const _0x33bb30=_0x47af52['get'](_0xe8de35);if(_0x33bb30){const _0x438e4e=_0x446e04['get'](_0x33bb30['userId']),_0x22f44c=new ChangeItem({'author':_0x438e4e,'type':_0x33bb30['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0xe8de35});_0x5a243e['unshift'](_0x22f44c),_0xd42b23['attributes'][_0xe8de35]['revisionHistoryAttachChange']=_0x22f44c['id'];}_0xd42b23['changes']=_0xd42b23['changes']['concat'](_0x5a243e);}return _0xd42b23;}['_markMarkers'](_0x5563cf,_0x23ff7c){for(let _0x19a32f=0x0;_0x19a32f<_0x5563cf['length'];_0x19a32f++)for(const [_0x4dcbae,_0x42964c]of _0x23ff7c)!_0x42964c['isCollapsed']&&_0x42964c['start']['isEqual'](_0x5563cf[_0x19a32f]['previousPosition'])&&_0x5563cf[_0x19a32f]['markersStart']['push'](_0x4dcbae),_0x42964c['end']['isEqual'](_0x5563cf[_0x19a32f]['nextPosition'])&&_0x5563cf[_0x19a32f]['markersEnd']['push'](_0x4dcbae);}['_joinTapes'](_0x4ee215,_0x54ff6c){let _0x3b1536=[],_0x52c376=0x0,_0x252b1b=0x0;for(;_0x52c376<_0x4ee215['length']||_0x252b1b<_0x54ff6c['length'];){const _0x384b74=_0x4ee215[_0x52c376]||{},_0x443916=_0x54ff6c[_0x252b1b]||{};if(_0x384b74['id']==_0x443916['id'])_0x52c376++,_0x252b1b++,_0x3b1536['push'](_0x384b74);else{if(_0x443916['isRemoved']&&_0x384b74['isAdded']){const {commonTape:_0x7c0f8b,iEnd:_0x2829c6,jEnd:_0x268a3d}=this['_threeWayMerge'](_0x4ee215,_0x52c376,_0x54ff6c,_0x252b1b);_0x3b1536=_0x3b1536['concat'](_0x7c0f8b),_0x52c376=_0x2829c6,_0x252b1b=_0x268a3d;}else _0x443916['isRemoved']?(_0x252b1b++,_0x3b1536['push'](_0x443916)):(_0x52c376++,_0x3b1536['push'](_0x384b74));}}return _0x3b1536;}['_markSuggestions'](_0x238493,_0x381672){const _0x40df82=[];for(let _0x4976dc=0x0;_0x4976dc<_0x238493['length'];_0x4976dc++){for(let _0x3ee8db=0x0;_0x3ee8db<_0x238493[_0x4976dc]['markersStart']['length'];_0x3ee8db++){const _0x448af7=_0x238493[_0x4976dc]['markersStart'][_0x3ee8db];if(!_0x381672['has'](_0x448af7))continue;const {group:_0xdef5e,type:_0x10013f,authorId:_0xbd8348}=_0xe8e0f4(_0x448af7);'revision-suggestion'!=_0xdef5e||'insertion'!=_0x10013f&&'deletion'!=_0x10013f||(_0x40df82['unshift']({'type':_0x10013f,'name':_0x448af7,'userId':_0xbd8348}),_0x238493[_0x4976dc]['markersStart']['splice'](_0x3ee8db,0x1),_0x3ee8db--);}_0x345495(_0x238493[_0x4976dc]);for(let _0x482dba=0x0;_0x482dba<_0x238493[_0x4976dc]['markersEnd']['length'];_0x482dba++){const _0xcad840=_0x238493[_0x4976dc]['markersEnd'][_0x482dba];if(!_0x381672['has'](_0xcad840))continue;const {group:_0x7eaf8f,type:_0x59c5a8}=_0xe8e0f4(_0xcad840);if('revision-suggestion'!=_0x7eaf8f||'insertion'!=_0x59c5a8&&'deletion'!=_0x59c5a8)continue;_0x238493[_0x4976dc]['markersEnd']['splice'](_0x482dba,0x1),_0x482dba--;const _0x2e1034=_0x40df82['findIndex'](_0x3225de=>_0x3225de['name']==_0xcad840);_0x2e1034>-0x1&&_0x40df82['splice'](_0x2e1034,0x1);}}function _0xe8e0f4(_0x5a0cb1){const _0x14e1f4=_0x5a0cb1['split'](':');return{'group':_0x14e1f4[0x0],'type':_0x14e1f4[0x1],'subType':_0x14e1f4['length']>=0x5?_0x14e1f4[0x2]:null,'id':_0x14e1f4['length']<0x5?_0x14e1f4[0x2]:_0x14e1f4[0x3],'authorId':_0x14e1f4['length']<0x5?_0x14e1f4[0x3]:_0x14e1f4[0x4],'markerCount':0x6==_0x14e1f4['length']?_0x14e1f4[0x5]:null};}function _0x345495(_0x446c64){for(let _0x3160e1=0x0;_0x3160e1<_0x40df82['length'];_0x3160e1++){if(_0x446c64['isAdded']&&'insertion'==_0x40df82[_0x3160e1]['type']&&_0x446c64['isAdded']['userId']==_0x40df82[_0x3160e1]['userId'])return _0x446c64['isAddSuggestion']=_0x40df82[_0x3160e1],void delete _0x446c64['isAdded'];if(!_0x446c64['isAdded']&&!_0x446c64['isRemoved']&&'deletion'==_0x40df82[_0x3160e1]['type'])return void(_0x446c64['isRemoveSuggestion']=_0x40df82[_0x3160e1]);}}}['_setDistance'](_0x8035d5,_0x165e18){let _0x8ecccc=0x0,_0x367ee6=!0x1;const _0x1ac8a4=new Map();for(const _0x1f6bf4 of _0x8035d5)_0x1f6bf4[_0x165e18]?_0x367ee6&&(_0x8ecccc++,_0x367ee6=!0x1):(_0x8ecccc++,_0x367ee6=!0x0),_0x1ac8a4['set'](_0x1f6bf4['id'],_0x8ecccc);for(let _0x270661=0x0;_0x270661<_0x8035d5['length'];_0x270661++){if('isRemoved'==_0x165e18&&_0x8035d5[_0x270661]['isAdded']||'isAdded'==_0x165e18&&_0x8035d5[_0x270661]['isRemoved'])continue;if('text'==_0x8035d5[_0x270661]['type']){_0x8035d5[_0x270661]['distance']=0x0;continue;}const _0x451265=_0x1ac8a4['get'](_0x8035d5[_0x270661]['pairId']),_0x37f39f=_0x1ac8a4['get'](_0x8035d5[_0x270661]['id']);_0x8035d5[_0x270661]['distance']=_0x451265-_0x37f39f;}}['_getRevisionsRange'](_0x57c18b,_0x4592e8,_0x16edee=!0x1){const _0x38afb6=[];let _0x29bebd=this['repository']['getIndex'](_0x57c18b),_0x1fc45a=this['repository']['getIndex'](_0x4592e8);for(-0x1==_0x1fc45a&&(_0x1fc45a=this['repository']['_revisions']['length'],_0x16edee=!0x1);_0x29bebd<_0x1fc45a;)_0x38afb6['push'](this['repository']['getRevision'](_0x29bebd)),_0x29bebd++;return _0x16edee&&_0x38afb6['push'](this['repository']['getRevision'](_0x29bebd)),_0x38afb6;}['_threeWayMerge'](_0x4436cb,_0x398933,_0x531bb7,_0x2907dd){const _0x51d4d5=this['editor']['model']['schema'];let _0x26bf0d=_0x398933;for(;_0x4436cb[_0x26bf0d]&&_0x4436cb[_0x26bf0d]['isAdded'];)_0x26bf0d++;let _0x5b93e7=_0x2907dd;for(;_0x531bb7[_0x5b93e7]&&_0x531bb7[_0x5b93e7]['isRemoved'];)_0x5b93e7++;_0x190deb(_0x4436cb,_0x398933,_0x26bf0d),_0x190deb(_0x531bb7,_0x2907dd,_0x5b93e7);const _0x46ae0f=_0x531bb7['slice'](_0x2907dd,_0x5b93e7)['concat'](_0x4436cb['slice'](_0x398933,_0x26bf0d));return _0x46ae0f['sort']((_0x4062bb,_0x1e4ffe)=>_0x4062bb['side']!=_0x1e4ffe['side']?_0x4062bb['side']-_0x1e4ffe['side']:_0x4062bb['level']!=_0x1e4ffe['level']?_0x4062bb['level']-_0x1e4ffe['level']:_0x4062bb['distance']!=_0x1e4ffe['distance']?_0x1e4ffe['distance']-_0x4062bb['distance']:!!_0x4062bb['isAdded']!=!!_0x1e4ffe['isAdded']?-0x1==_0x4062bb['side']||0x0==_0x4062bb['side']?_0x4062bb['isAdded']?-0x1:0x1:_0x4062bb['isAdded']?0x1:-0x1:_0x4062bb['index']-_0x1e4ffe['index']),{'commonTape':_0x46ae0f,'iEnd':_0x26bf0d,'jEnd':_0x5b93e7};function _0x190deb(_0x1515fe,_0x2ea8c8,_0x4b5173){let _0x2cd96b=-0x1,_0x5f3028=Number['POSITIVE_INFINITY'],_0x108540=!0x0;for(let _0x3e8198=_0x2ea8c8;_0x3e8198<_0x4b5173;_0x3e8198++)if(_0x51d4d5['isInline'](_0x1515fe[_0x3e8198]['item'])||(_0x108540=!0x1),_0x1515fe[_0x3e8198]['item']['startIndex']<_0x2ea8c8&&(_0x2cd96b=_0x3e8198),_0x1515fe[_0x3e8198]['item']['endIndex']>=_0x4b5173){_0x5f3028=_0x3e8198;break;}_0x108540&&(_0x2cd96b=_0x4b5173-0x1);for(let _0x44a6f1=_0x2ea8c8;_0x44a6f1<_0x4b5173;_0x44a6f1++)_0x1515fe[_0x44a6f1]['side']=_0x44a6f1<=_0x2cd96b?-0x1:_0x44a6f1<_0x5f3028?0x0:0x1,_0x1515fe[_0x44a6f1]['index']=_0x44a6f1;let _0x5f3f1a=0x0;for(let _0x448fb1=_0x2ea8c8;_0x448fb1<=_0x2cd96b;_0x448fb1++)0x0==_0x1515fe[_0x448fb1]['distance']?_0x1515fe[_0x448fb1]['level']=_0x5f3f1a:(_0x5f3f1a++,_0x1515fe[_0x448fb1]['level']=_0x5f3f1a,_0x5f3f1a++);for(let _0x551831=_0x2ea8c8;_0x551831<_0x4b5173;_0x551831++)0x0==_0x1515fe[_0x551831]['side']&&(_0x1515fe[_0x551831]['level']=_0x5f3f1a);_0x5f3f1a=0x0;for(let _0xc940aa=_0x4b5173-0x1;_0xc940aa>=_0x5f3028;_0xc940aa--)0x0==_0x1515fe[_0xc940aa]['distance']?_0x1515fe[_0xc940aa]['level']=_0x5f3f1a:(_0x5f3f1a--,_0x1515fe[_0xc940aa]['level']=_0x5f3f1a,_0x5f3f1a--);}}['_fixObsoleteTags'](_0x2d8002){const _0x177dca=new Map(),_0x206951=this['editor']['model']['schema'];for(let _0x37970b=0x1;_0x37970b<_0x2d8002['length'];_0x37970b++){let _0x3e2859,_0x5dcd9c,_0x3d3db9;const _0x23f470=_0x2d8002[_0x37970b],_0x38689d=_0x2d8002[_0x37970b-0x1];if('text'==_0x23f470['type'])continue;if(_0x23f470['type']!=_0x38689d['type'])continue;if(!_0x206951['isBlock'](_0x38689d['item'])||_0x206951['isLimit'](_0x38689d['item']))continue;if(!_0x206951['isBlock'](_0x23f470['item'])||_0x206951['isLimit'](_0x23f470['item']))continue;if((_0x2d8002[_0x37970b]['isAdded']||_0x2d8002[_0x37970b]['isAddSuggestion'])&&_0x2d8002[_0x37970b-0x1]['isRemoved'])_0x3e2859=_0x2d8002[_0x37970b],_0x5dcd9c=_0x2d8002[_0x37970b-0x1],_0x3d3db9=_0x37970b-0x1;else{if(!_0x2d8002[_0x37970b]['isRemoved']||!_0x2d8002[_0x37970b-0x1]['isAdded']&&!_0x2d8002[_0x37970b-0x1]['isAddSuggestion'])continue;_0x3e2859=_0x2d8002[_0x37970b-0x1],_0x5dcd9c=_0x2d8002[_0x37970b],_0x3d3db9=_0x37970b;}const _0x2ee56f=_0x3e2859['level']==_0x5dcd9c['level'],_0x51eb58=Math['abs'](_0x3e2859['level'])<Math['abs'](_0x5dcd9c['level'])&&0x0==_0x5dcd9c['distance'];(_0x2ee56f||_0x51eb58)&&(_0x177dca['set'](_0x5dcd9c['id'],_0x3e2859['id']),_0x2d8002['splice'](_0x3d3db9,0x1),_0x37970b--,_0x3e2859['isAdded']=!0x1);}for(let _0x13dea4=0x0;_0x13dea4<_0x2d8002['length'];_0x13dea4++)_0x177dca['has'](_0x2d8002[_0x13dea4]['pairId'])&&(_0x2d8002[_0x13dea4]['pairId']=_0x177dca['get'](_0x2d8002[_0x13dea4]['pairId']));}['_removeMissingPairs'](_0x33f6b6){const _0x947edd=new Set(_0x33f6b6['map'](_0x24ee98=>_0x24ee98['id']));for(let _0xced088=0x0;_0xced088<_0x33f6b6['length'];_0xced088++)_0x947edd['has'](_0x33f6b6[_0xced088]['pairId'])||0x0==_0x33f6b6[_0xced088]['distance']||(_0x33f6b6[_0xced088]['isIncorrect']=!0x0);return _0x33f6b6['filter'](_0x183313=>!_0x183313['isIncorrect']);}['_markMismatchedRemovedTags'](_0x864b0d){const _0x7ec546=new Set();for(let _0x47da97=0x0;_0x47da97<_0x864b0d['length'];_0x47da97++){if(_0x7ec546['has'](_0x864b0d[_0x47da97]['id'])&&_0x864b0d[_0x47da97]['isRemoved']&&(_0x864b0d[_0x47da97]['isIncorrect']=!0x0),_0x864b0d[_0x47da97]['isIncorrect'])continue;if(0x0==_0x864b0d[_0x47da97]['distance'])continue;if('elementStart'!=_0x864b0d[_0x47da97]['type'])continue;if(null==_0x864b0d[_0x47da97]['pairId'])continue;let _0x1afdd1=_0x47da97+0x1,_0x52e897=0x0;for(;_0x864b0d[_0x1afdd1]['id']!=_0x864b0d[_0x47da97]['pairId'];)'elementStart'==_0x864b0d[_0x1afdd1]['type']?_0x52e897++:'elementEnd'==_0x864b0d[_0x1afdd1]['type']&&_0x52e897--,_0x1afdd1++;if(0x0!=_0x52e897){if(_0x864b0d[_0x47da97]['isRemoved'])_0x864b0d[_0x47da97]['isIncorrect']=!0x0;else{for(;_0x1afdd1!=_0x47da97;)_0x864b0d[_0x1afdd1]['isRemoved']&&0x0!=_0x864b0d[_0x1afdd1]['distance']&&(_0x864b0d[_0x1afdd1]['isIncorrect']=!0x0,_0x7ec546['add'](_0x864b0d[_0x1afdd1]['pairId'])),_0x1afdd1--;}}}return _0x864b0d['filter'](_0x3180f7=>!_0x3180f7['isIncorrect']);}['_removeUnsupportedChanges'](_0x219000){const _0x55a7bb=this['editor']['model']['schema'];for(let _0x6fed31=0x0;_0x6fed31<_0x219000['length'];_0x6fed31++){if(!(_0x219000[_0x6fed31]['isAdded']||_0x219000[_0x6fed31]['isAddSuggestion']||_0x219000[_0x6fed31]['isRemoved']||_0x219000[_0x6fed31]['isRemoveSuggestion']))continue;if(0x0==_0x219000[_0x6fed31]['distance'])continue;const _0x4c9a52=_0x219000[_0x6fed31]['item'];_0x55a7bb['isBlock'](_0x4c9a52)||_0x55a7bb['isLimit'](_0x4c9a52)||(_0x219000[_0x6fed31]['isAdded']&&delete _0x219000[_0x6fed31]['isAdded'],_0x219000[_0x6fed31]['isAddSuggestion']&&delete _0x219000[_0x6fed31]['isAddSuggestion'],_0x219000[_0x6fed31]['isRemoveSuggestion']&&delete _0x219000[_0x6fed31]['isRemoveSuggestion'],_0x219000[_0x6fed31]['isRemoved']&&(_0x219000[_0x6fed31]['isIncorrect']=!0x0));}return _0x219000['filter'](_0x14535=>!_0x14535['isIncorrect']);}['_makeModelFromTape'](_0x438871,_0x54139a,_0x195adc,_0x317475){const _0xcd5e58=new _0x538fb3(),_0x4c3b69=[],_0x1301d7=new Map(),_0x2d3bb3=this['editor']['model'],_0x199ae7=_0x2d3bb3['schema'],_0x1de5ff=[_0xcd5e58],_0x5c8fda={},_0x32b001={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0xcd5e58['name']=_0x317475;let _0x52ef8d=null;const _0x26d06e=[0x0];for(let _0x5a0632=0x0;_0x5a0632<_0x438871['length'];_0x5a0632++)if('elementStart'===_0x438871[_0x5a0632]['type']){_0x438871[_0x5a0632]['previousPosition']=_0x2d3bb3['createPositionFromPath'](_0xcd5e58,_0x26d06e);const _0x299acc=new _0x1a0f77(_0x438871[_0x5a0632]['item']['name'],_0x438871[_0x5a0632]['item']['getAttributes']());_0x1de5ff[0x0]['_appendChild'](_0x299acc),_0x26d06e['push'](0x0),_0x1de5ff['unshift'](_0x299acc),_0x438871[_0x5a0632]['nextPosition']=_0x2d3bb3['createPositionFromPath'](_0xcd5e58,_0x26d06e);}else'elementEnd'===_0x438871[_0x5a0632]['type']?(_0x1de5ff['shift'](),_0x438871[_0x5a0632]['previousPosition']=_0x2d3bb3['createPositionFromPath'](_0xcd5e58,_0x26d06e),_0x26d06e['pop'](),_0x26d06e[_0x26d06e['length']-0x1]++,_0x438871[_0x5a0632]['nextPosition']=_0x2d3bb3['createPositionFromPath'](_0xcd5e58,_0x26d06e)):(_0x438871[_0x5a0632]['previousPosition']=_0x2d3bb3['createPositionFromPath'](_0xcd5e58,_0x26d06e),_0x52ef8d?_0x52ef8d['_data']+=_0x438871[_0x5a0632]['item']['data']:_0x52ef8d=new _0xa58127(_0x438871[_0x5a0632]['item']['data'],_0x438871[_0x5a0632]['item']['getAttributes']()),_0x438871[_0x5a0632+0x1]&&'text'===_0x438871[_0x5a0632+0x1]['type']&&_0x263318(_0x52ef8d,_0x438871[_0x5a0632+0x1]['item'])||(_0x1de5ff[0x0]['_appendChild'](_0x52ef8d),_0x52ef8d=null),_0x26d06e[_0x26d06e['length']-0x1]+=_0x438871[_0x5a0632]['item']['offsetSize'],_0x438871[_0x5a0632]['nextPosition']=_0x2d3bb3['createPositionFromPath'](_0xcd5e58,_0x26d06e));for(let _0x24f01c=0x0;_0x24f01c<_0x438871['length'];_0x24f01c++){const _0x4917ee=_0x438871[_0x24f01c]['previousPosition'],_0x893c8f=_0x438871[_0x24f01c]['nextPosition'];for(const _0x213273 of _0x438871[_0x24f01c]['markersStart'])_0x1301d7['set'](_0x213273,{'start':_0x4917ee,'end':null});_0x4a9edf('isRemoveSuggestion',_0x24f01c,_0x4917ee,_0x893c8f),_0x4a9edf('isAddSuggestion',_0x24f01c,_0x4917ee,_0x893c8f),_0x4a9edf('isRemoved',_0x24f01c,_0x4917ee,_0x893c8f),_0x4a9edf('isAdded',_0x24f01c,_0x4917ee,_0x893c8f);for(const _0x322013 of _0x438871[_0x24f01c]['markersEnd']){const _0x753f7a=_0x1301d7['get'](_0x322013);_0x753f7a?_0x753f7a['end']=_0x893c8f:_0x1301d7['set'](_0x322013,{'start':_0x893c8f,'end':_0x893c8f});}}for(const [_0xae232b,_0xaa26da]of _0x1301d7){const _0x112ec7=this['editor']['model']['createRange'](_0xaa26da['start'],_0xaa26da['end']);_0xcd5e58['markers']['set'](_0xae232b,_0x112ec7);}return _0x4c3b69['sort']((_0x1a417d,_0x253cd9)=>{const _0x4b9b45=_0xcd5e58['markers']['get']('revision:'+_0x1a417d['id']),_0x20abbf=_0xcd5e58['markers']['get']('revision:'+_0x253cd9['id']);return _0x4b9b45['start']['isBefore'](_0x20abbf['start'])?-0x1:_0x4b9b45['start']['isAfter'](_0x20abbf['start'])?0x1:_0x4b9b45['end']['isBefore'](_0x20abbf['end'])?-0x1:_0x4b9b45['end']['isAfter'](_0x20abbf['end'])?0x1:'add'===_0x1a417d['type']?-0x1:0x1;}),{'root':_0xcd5e58,'changes':_0x4c3b69};function _0x4a9edf(_0x248c65,_0x15363e,_0x2ac56e,_0x41ac89){const _0x5d66ba=!!_0x438871[_0x15363e][_0x248c65],_0x5b195a=_0x5d66ba?_0x438871[_0x15363e][_0x248c65]['userId']:null,_0x2176e0=_0x15363e===_0x438871['length']-0x1,_0x102ffd=_0x32b001[_0x248c65][0x0],_0x52f6d2=_0x199ae7['isObject'](_0x438871[_0x15363e]['item']);!_0x5c8fda[_0x248c65]&&_0x5d66ba?_0x5c8fda[_0x248c65]={'start':_0x2ac56e,'tapeItem':_0x438871[_0x15363e],'userId':_0x5b195a,'type':_0x248c65}:_0x5c8fda[_0x248c65]&&!_0x5d66ba?(_0x5c8fda[_0x248c65]['end']=_0x2ac56e,_0x13c675(_0x5c8fda[_0x248c65]),_0x5c8fda[_0x248c65]=null):_0x5c8fda[_0x248c65]&&_0x5d66ba&&_0x5c8fda[_0x248c65]['userId']!==_0x5b195a&&(_0x5c8fda[_0x248c65]['end']=_0x2ac56e,_0x102ffd&&_0x102ffd['userId']===_0x5c8fda[_0x248c65]['userId']||_0x13c675(_0x5c8fda[_0x248c65]),_0x5c8fda[_0x248c65]={'start':_0x2ac56e,'tapeItem':_0x438871[_0x15363e],'userId':_0x5b195a,'type':_0x248c65}),_0x5c8fda[_0x248c65]&&_0x52f6d2&&('elementStart'!==_0x438871[_0x15363e]['type']||_0x102ffd&&_0x102ffd['userId']===_0x5b195a||_0x32b001[_0x248c65]['unshift']({'userId':_0x5b195a,'object':_0x438871[_0x15363e]['item'],'change':_0x5c8fda[_0x248c65]}),'elementEnd'===_0x438871[_0x15363e]['type']&&_0x102ffd&&_0x102ffd['object']===_0x438871[_0x15363e]['item']&&(_0x32b001[_0x248c65]['shift'](),_0x5c8fda[_0x248c65]=_0x102ffd['change'])),_0x5c8fda[_0x248c65]&&_0x2176e0&&(_0x5c8fda[_0x248c65]['end']=_0x41ac89,_0x13c675(_0x5c8fda[_0x248c65]),_0x5c8fda[_0x248c65]=null);}function _0x13c675({start:_0x21f252,end:_0x422127,tapeItem:_0x55c8b3,userId:_0x1ac888,type:_0x5de1c2}){const _0x54d296=_0x55c8b3['item'],_0x398c70=_0x2d3bb3['schema']['isBlock'](_0x54d296)&&!_0x2d3bb3['schema']['isLimit'](_0x54d296),_0x103077=_0x21f252['nodeAfter']==_0x422127['parent']&&_0x422127['isAtStart'];if(_0x398c70&&_0x103077)return;const _0x3545bb=_0x2d3bb3['createRange'](_0x21f252,_0x422127),_0x3ef7ed=_0x54139a['get'](_0x1ac888),_0x27932f=new ChangeItem({'author':_0x3ef7ed,'type':'isAdded'==_0x5de1c2||'isAddSuggestion'==_0x5de1c2?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5de1c2||'isRemoveSuggestion'==_0x5de1c2},'createdAt':new Date(),'rootName':_0x195adc});_0x4c3b69['push'](_0x27932f),_0xcd5e58['markers']['set']('revision:'+_0x27932f['id'],_0x3545bb);}function _0x263318(_0x312e64,_0x2b0eeb){const _0x4c87d4=_0x312e64['getAttributes'](),_0x2fd296=_0x2b0eeb['getAttributes']();for(const _0x4e19a6 of _0x4c87d4){if(_0x4e19a6[0x1]!==_0x2b0eeb['getAttribute'](_0x4e19a6[0x0]))return!0x1;_0x2fd296['next']();}return _0x2fd296['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4ca321=>{const _0x3ba7e1=_0x4ca321['markerName']['split'](':')[0x1],_0x71ecdf=this['_getChangeFromId'](_0x3ba7e1);if(!_0x71ecdf)return null;const _0x113ec3='add'==_0x71ecdf['type']?'insertion':'deletion',_0x308ae1=['ck-suggestion-marker','ck-suggestion-marker-'+_0x113ec3];return _0x71ecdf['data']['isSuggestion']&&_0x308ae1['push']('ck-suggestion-marker-'+_0x113ec3+'-new'),this['activeChange']==_0x71ecdf&&_0x308ae1['push']('ck-suggestion-marker--active'),{'classes':_0x308ae1,'attributes':{'data-change-id':_0x3ba7e1}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x109902=>{_0x109902['on']('element:pre',(_0x1da6dd,_0x112c7e,_0x23bebc)=>{const _0x5d9f97=_0x112c7e['viewItem']['getChild'](0x0);if(!_0x5d9f97||!_0x5d9f97['is']('element','code'))return;if(!_0x23bebc['consumable']['consume'](_0x5d9f97,{'attributes':['vid_start','vid_end']}))return;const _0x46292f=_0x112c7e['modelRange']['start']['nodeAfter'];_0x23bebc['writer']['setAttribute']('vid_start',_0x5d9f97['getAttribute']('vid_start'),_0x46292f),_0x23bebc['writer']['setAttribute']('vid_end',_0x5d9f97['getAttribute']('vid_end'),_0x46292f);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1eb1df=>{_0x1eb1df['on']('element',(_0x21716e,_0xe94ba,_0x2e962d)=>{if(!_0x2e962d['consumable']['consume'](_0xe94ba['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xe94ba['modelRange']['isCollapsed'])return;const _0x2525ac=_0xe94ba['modelRange']['start']['nodeAfter'];_0x2525ac['hasAttribute']('vid_start')||_0x2525ac['hasAttribute']('vid')||(_0x2e962d['writer']['setAttribute']('vid_start',_0xe94ba['viewItem']['getAttribute']('vid_start'),_0x2525ac),_0x2e962d['writer']['setAttribute']('vid_end',_0xe94ba['viewItem']['getAttribute']('vid_end'),_0x2525ac));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2a2e48=>_0x2a2e48['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x56535d,[,_0x46d6b0])=>{['vid_start','vid_end','vid']['includes'](_0x46d6b0)&&(_0x56535d['return']=!0x0,_0x56535d['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2585c8=>{_0x2585c8['on']('attribute:vid',(_0xdf815a,_0x683f4c,_0x3f46fc)=>{if('\x20'!=_0x683f4c['item']['data']||_0x683f4c['item']['parent']['maxOffset']>0x1)return;if(!_0x3f46fc['consumable']['consume'](_0x683f4c['item'],_0xdf815a['name']))return;const _0x4fa5dd=_0x3f46fc['writer'],_0x21eebd=_0x3f46fc['mapper']['toViewRange'](_0x683f4c['range']);_0x4fa5dd['wrap'](_0x21eebd,_0x4fa5dd['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4f8a50){const _0x4c51f9=_0x4f8a50['plugins']['get']('RevisionViewer');return(_0xd66d3,_0x5221bb,_0xcaf41c)=>{const _0x1f6f6d=_0x5221bb['markerName']['split'](':')[0x1],_0x133e76=_0x4c51f9['_getChangeFromId'](_0x1f6f6d);if(!_0x133e76)return null;const _0x427f65='add'==_0x133e76['type']?'split':'merge';if(!_0xcaf41c['consumable']['test'](_0x5221bb['markerRange'],_0xd66d3['name']))return;const _0x30fdcc=_0x5221bb['markerRange']['getWalker'](),_0x5a2f2b=_0x5221bb['markerRange']['start'],_0xa11795=_0x4f8a50['model']['schema'];let _0x4344ee=null,_0x41f842=null,_0x50e21c=!0x1,_0x21f31c=!0x1;for(const _0xbfc1f9 of _0x30fdcc){const _0x40067d=_0xbfc1f9['item'];_0x50e21c=_0x50e21c||_0xa11795['isContent'](_0x40067d);const _0x879aa2=_0xcaf41c['mapper']['toViewElement'](_0x40067d);if(_0x879aa2&&_0x879aa2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xbfc1f9['type']&&(_0xa11795['isBlock'](_0x40067d)&&!_0xa11795['isLimit'](_0x40067d)&&(_0x40067d['nextSibling']||_0x5a2f2b['isAtEnd']?_0x4344ee&&_0x4344ee['parent']==_0x40067d||(_0x4344ee=_0x40067d,_0x557e3b(_0xbfc1f9['previousPosition']),_0x21f31c=!0x0):_0x41f842=_0x41f842||_0xbfc1f9['previousPosition']));}function _0x557e3b(_0x2c9414){const _0xb4b426=_0xcaf41c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x427f65}),_0x1415a2=_0xcaf41c['mapper']['toViewPosition'](_0x2c9414);_0x133e76['data']['isSuggestion']&&_0xcaf41c['writer']['addClass']('ck-suggestion-marker-'+_0x427f65+'-new',_0xb4b426),_0x4c51f9['activeChange']==_0x133e76&&_0xcaf41c['writer']['addClass']('ck-suggestion-marker--active',_0xb4b426),_0xcaf41c['writer']['insert'](_0x1415a2,_0xb4b426),_0xcaf41c['mapper']['bindElementToMarker'](_0xb4b426,_0x5221bb['markerName']);}_0x50e21c||_0x21f31c||!_0x41f842||_0x557e3b(_0x41f842);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x31aa6f,_0x2b4d4b,_0x3e5b91)=>{const _0x1270ae=_0x3e5b91['mapper']['markerNameToElements'](_0x2b4d4b['markerName']);if(_0x1270ae){for(const _0x3a16a2 of _0x1270ae)(_0x3a16a2['hasClass']('ck-suggestion-marker-split')||_0x3a16a2['hasClass']('ck-suggestion-marker-merge'))&&(_0x3e5b91['mapper']['unbindElementFromMarkerName'](_0x3a16a2,_0x2b4d4b['markerName']),_0x3e5b91['writer']['remove'](_0x3a16a2));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x44a605,_0x212349,_0x3d5a75)=>{const _0x2912ea=_0x212349['markerName']['split'](':')[0x1],_0x38d9b9=this['_getChangeFromId'](_0x2912ea);if(!_0x38d9b9)return null;const _0x6bbe4c='add'==_0x38d9b9['type']?'split':'merge';if(_0x3d5a75['consumable']['test'](_0x212349['markerRange'],_0x44a605['name']))for(const _0x13cde6 of _0x212349['markerRange']['getItems']()){if(!_0x13cde6['is']('element','softBreak'))continue;const _0x7d7ba7=_0x3d5a75['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x6bbe4c}),_0x29657b=_0x3d5a75['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x13cde6));_0x38d9b9['data']['isSuggestion']&&_0x3d5a75['writer']['addClass']('ck-suggestion-marker-'+_0x6bbe4c+'-new',_0x7d7ba7),this['activeChange']==_0x38d9b9&&_0x3d5a75['writer']['addClass']('ck-suggestion-marker--active',_0x7d7ba7),_0x3d5a75['writer']['insert'](_0x29657b,_0x7d7ba7),_0x3d5a75['mapper']['bindElementToMarker'](_0x7d7ba7,_0x212349['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x28bb18=>{for(const _0x40e22e of this['editor']['model']['document']['getRootNames']()){const _0x347ecc=this['editor']['model']['document']['getRoot'](_0x40e22e),_0x522894=this['editor']['editing']['view']['document']['getRoot'](_0x40e22e);if(_0x522894){const _0x3e96da=_0x347ecc['getAttribute']('revisionHistoryAttachChange');if(_0x28bb18['removeAttribute']('data-change-id',_0x522894),_0x28bb18['removeClass']('ck-revision-history-root-add',_0x522894),_0x28bb18['removeClass']('ck-revision-history-root-remove',_0x522894),_0x28bb18['removeClass']('ck-revision-history-root--active',_0x522894),_0x3e96da){const _0x1fd27e=this['_getChangeFromId'](_0x3e96da);if(!_0x1fd27e)return null;_0x28bb18['setAttribute']('data-change-id',_0x3e96da,_0x522894),_0x28bb18['addClass']('ck-revision-history-root-'+_0x1fd27e['type'],_0x522894),this['activeChange']==_0x1fd27e&&_0x28bb18['addClass']('ck-revision-history-root--active',_0x522894);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3a37db=>'revision-comment:'+_0x3a37db,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x587a7a=>'revision-suggestion:'+_0x587a7a,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x73d795=>({'name':'suggestion:'+_0x73d795,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x287202=>{const _0x28a942=_0x287202['markerName']['split'](':')[0x1];return'insertion'!=_0x28a942&&'deletion'!=_0x28a942?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x28a942]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x5ec8af,_0x1f800f,_0x4fec45)=>{const _0x4533bf=_0x4fec45['mapper']['markerNameToElements'](_0x1f800f['markerName']);if(_0x4533bf){for(const _0x1fe973 of _0x4533bf)_0x1fe973['is']('uiElement')&&(_0x4fec45['mapper']['unbindElementFromMarkerName'](_0x1fe973,_0x1f800f['markerName']),_0x4fec45['writer']['remove'](_0x1fe973));}},{'priority':'high'});}['_getChangeFromId'](_0x17784e){return this['_changeIdToChange']['get'](_0x17784e);}['_getViewForChange'](_0x2c5bf5){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x2c5bf5),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x351c6f,_0x5d13ef,_0x3a2ce9,_0x20fa06)=>{_0x20fa06&&this['_balloon']['remove'](_0x20fa06),_0x3a2ce9&&(this['_balloon']['add']({'view':_0x3a2ce9,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x231985=this['editor']['editing'],_0x5943c4=this['_getChangeFromId'](_0x3a2ce9['changeId']);let _0x3f9445;if(_0x5943c4['data']['isOnRoot']){const _0x4a4e02=_0x231985['view']['getDomRoot'](_0x5943c4['rootName']);_0x3f9445=Array['from'](_0x4a4e02['getClientRects']());}else{const _0x319558=this['editor']['model']['markers']['get']('revision:'+_0x3a2ce9['changeId']);_0x3f9445=Array['from'](_0x231985['mapper']['markerNameToElements'](_0x319558['name']))['map'](_0x497126=>_0x231985['view']['domConverter']['mapViewToDom'](_0x497126))['map'](_0x388566=>Array['from'](_0x388566['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x3f9445[0x0];return _0x3f9445['find'](_0x2ff6b6=>_0x2ff6b6['top']-0x3<=this['_activeViewTarget']['y']&&_0x2ff6b6['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2ff6b6['left']-0x3<=this['_activeViewTarget']['x']&&_0x2ff6b6['right']+0x3>=this['_activeViewTarget']['x'])||_0x3f9445[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2d5608,_0x2f17b0,_0x366c27,_0x5712e3)=>{this['activeView']=_0x366c27?this['_getViewForChange'](_0x366c27):null,this['editor']['model']['change'](()=>{const _0x5f28e1=this['editor']['editing'];_0x5712e3&&(_0x5712e3['data']['isOnRoot']?_0x5f28e1['view']['change'](_0x3e4b88=>{_0x3e4b88['removeClass']('ck-revision-history-root--active',_0x5f28e1['view']['document']['getRoot'](_0x5712e3['rootName']));}):_0x5f28e1['reconvertMarker']('revision:'+_0x5712e3['id'])),_0x366c27&&(_0x366c27['data']['isOnRoot']?_0x5f28e1['view']['change'](_0x3be756=>{_0x3be756['addClass']('ck-revision-history-root--active',_0x5f28e1['view']['document']['getRoot'](_0x366c27['rootName']));}):_0x5f28e1['reconvertMarker']('revision:'+_0x366c27['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1c0e11,_0x2244c8)=>{if(this['activeChange'])return;const _0x515b6f=this['_findChangeIdFromDomTarget'](_0x2244c8['target']),_0x3039b4=this['_changeIdToChange']['get'](_0x515b6f);_0x3039b4?(this['_activeViewTarget']={'x':_0x2244c8['domEvent']['x'],'y':_0x2244c8['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3039b4)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0xee22b1,_0x319c48)=>{const _0x558e5a=this['_findChangeIdFromDomTarget'](_0x319c48['target']),_0x44c3e3=this['_changeIdToChange']['get'](_0x558e5a);_0x44c3e3?(this['_activeViewTarget']={'x':_0x319c48['domEvent']['x'],'y':_0x319c48['domEvent']['y']},_0x44c3e3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x44c3e3):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x4490f0){do{const _0x20f6f9=_0x4490f0['getAttribute']('data-change-id');if(_0x20f6f9)return _0x20f6f9;_0x4490f0=_0x4490f0['parent'];}while(_0x4490f0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x2c0904=>{for(const _0x5cebf4 of this['editor']['model']['markers'])_0x2c0904['removeMarker'](_0x5cebf4);});}}function _t(_0x20e09c,_0xdc43a3){return(_0x5a8047,_0x4917ab,_0x55ba9e)=>{if(!_0x55ba9e['consumable']['test'](_0x4917ab['markerRange'],_0x5a8047['name']))return;const _0x5e5b89=_0x4917ab['markerRange']['getWalker'](),_0xe10d38=_0x4917ab['markerRange']['start'],_0x4d4f8e=_0x20e09c['model']['schema'];let _0x4d1c19=null,_0x3274c2=null,_0x44bfff=!0x1,_0x28598c=!0x1;for(const _0x5ee52a of _0x5e5b89){const _0x5a4907=_0x5ee52a['item'];_0x44bfff=_0x44bfff||_0x4d4f8e['isContent'](_0x5a4907);const _0x5b4a5c=_0x55ba9e['mapper']['toViewElement'](_0x5a4907);if(_0x5b4a5c&&_0x5b4a5c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5ee52a['type']&&(_0x4d4f8e['isBlock'](_0x5a4907)&&!_0x4d4f8e['isLimit'](_0x5a4907)&&(_0x5a4907['nextSibling']||_0xe10d38['isAtEnd']?_0x4d1c19&&_0x4d1c19['parent']==_0x5a4907||(_0x4d1c19=_0x5a4907,_0x111501(_0x5ee52a['previousPosition']),_0x28598c=!0x0):_0x3274c2=_0x3274c2||_0x5ee52a['previousPosition']));}function _0x111501(_0x11dc9d){const _0xcb99d3=_0x55ba9e['mapper']['toViewPosition'](_0x11dc9d),_0x4a5f01=_0x55ba9e['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xdc43a3});_0x55ba9e['writer']['insert'](_0xcb99d3,_0x4a5f01),_0x55ba9e['mapper']['bindElementToMarker'](_0x4a5f01,_0x4917ab['markerName']);}_0x44bfff||_0x28598c||!_0x3274c2||_0x111501(_0x3274c2);};}class RestoreRevisionCommand extends _0x2cc57b{constructor(_0x411625){super(_0x411625);const _0x4f4da0=_0x411625['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x4f4da0,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4f4da0,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x46c389=this['editor'],_0x5b9fae=_0x46c389['plugins']['get'](RevisionViewer),_0xaf3e46=_0x5b9fae['isReady']?_0x5b9fae['diff']['newRevisionId']:null;_0x46c389['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xaf3e46);}['refresh'](){const {isReady:_0x5713f5,isEnabled:_0x5903ad,repository:_0x3078fd,diff:_0x559a6f}=this['editor']['plugins']['get'](RevisionViewer),_0x1bdbd5=_0x559a6f&&_0x3078fd['getLaterVisibleRevision'](_0x559a6f['newRevisionId']);this['isEnabled']=_0x5713f5&&_0x5903ad&&Boolean(_0x1bdbd5);}}class ShowChangeCommand extends _0x2cc57b{['_step'];constructor(_0x437fcd,{direction:_0x4dfabc}){super(_0x437fcd);const _0x2280fb=_0x437fcd['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x4dfabc?0x1:-0x1,this['listenTo'](_0x2280fb,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2280fb,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2280fb,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1cefc4=this['editor'],_0x35f2e4=_0x1cefc4['plugins']['get'](RevisionViewer),{isNavigationMode:_0x63bdec,currentChangeNumber:_0x3c3914}=_0x35f2e4;let _0x2edfcf;if(_0x35f2e4['activeChange']=_0x63bdec?_0x35f2e4['diff']['changes']['get'](_0x3c3914+this['_step']):_0x35f2e4['diff']['changes']['first'],_0x35f2e4['activeChange']['data']['isOnRoot'])_0x2edfcf=_0x1cefc4['editing']['view']['getDomRoot'](_0x35f2e4['activeChange']['rootName']);else{const _0x168013=_0x1cefc4['model']['markers']['get']('revision:'+_0x35f2e4['activeChange']['id']);_0x2edfcf=_0x28ad10(_0x1cefc4['editing'],_0x168013);}_0x387e02({'target':_0x2edfcf,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4476ee,currentChangeNumber:_0x5bdfdd,numberOfChanges:_0x198ef,isReady:_0xc8fd53,isEnabled:_0xc8fa64}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0xc8fa64&&_0xc8fd53&&_0x198ef)&&(!_0x4476ee||(0x1===this['_step']?_0x5bdfdd<_0x198ef-0x1:_0x5bdfdd>0x0));}}class ChangesNavigationView extends _0x6b0c43{constructor(_0x453ea8){super(_0x453ea8);const _0x510bf0=this['bindTemplate'],_0x4f5970=new _0x8647ff(_0x453ea8),_0x3b9837=new _0x8647ff(_0x453ea8);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',(_0x52c76c,_0x6d0a63)=>_0x52c76c&&_0x6d0a63>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x40e51f,_0x3a48c1,_0x584785,_0x50fd66)=>{if(!_0x40e51f)return ft(_0x453ea8,'Loading...');if(!_0x584785)return ft(_0x453ea8,'No\x20changes');const _0x25cdaa=ft(_0x453ea8,'NUMBER_OF_CHANGES',_0x584785);return _0x50fd66?ft(_0x453ea8,'X_OF_Y_CHANGES',[_0x3a48c1+0x1,_0x584785]):_0x25cdaa;}),_0x4f5970['set']({'label':ft(_0x453ea8,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3bea5a}),_0x3b9837['set']({'label':ft(_0x453ea8,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x32087f}),_0x4f5970['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3b9837['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4f5970['on']('execute',()=>this['fire']('execute','backward')),_0x3b9837['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',_0x510bf0['if']('_isStatusLabelVisible','ck-hidden',_0x14cb2f=>!_0x14cb2f)]},'children':[{'text':_0x510bf0['to']('isNavigationMode',_0x471acc=>_0x471acc?ft(_0x453ea8,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x453ea8,'Total')+':\x20')}]},{'text':_0x510bf0['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4f5970,_0x3b9837]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x3b8836{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x34d756=this['editor']['editing']['view'];_0x34d756['change'](_0xd67f7b=>{for(const _0x206428 of _0x34d756['document']['roots'])_0xd67f7b['addClass'](yt,_0x206428);});}['hide'](){const _0x435976=this['editor']['editing']['view'];_0x435976['change'](_0x2e26c1=>{for(const _0x4be4bc of _0x435976['document']['roots'])_0x2e26c1['removeClass'](yt,_0x4be4bc);});}}class RevisionViewerUI extends _0x3b8836{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x374879=this['editor'],_0x429e2d=_0x374879['plugins']['get'](RevisionViewer),_0x5226bc=_0x374879['plugins']['get'](RevisionViewerLoadingOverlay);_0x374879['ui']['componentFactory']['add']('exitToEditing',_0x130997=>{const _0x492128=new _0x8647ff(_0x130997);return _0x492128['set']({'label':ft(_0x130997,'Back\x20to\x20editing'),'icon':_0x5065e8,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x492128,'execute',()=>{_0x374879['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x492128;}),_0x374879['ui']['componentFactory']['add']('restoreRevision',_0x4ff1b0=>{const _0x299c0e=new _0x8647ff(_0x4ff1b0);return _0x299c0e['set']({'label':ft(_0x4ff1b0,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x299c0e['bind']('isEnabled')['to'](_0x374879['commands']['get']('restoreRevision')),this['listenTo'](_0x299c0e,'execute',()=>_0x374879['execute']('restoreRevision')),_0x299c0e;}),_0x374879['ui']['componentFactory']['add']('changesNavigation',_0xe919c8=>{const _0x2600f4=new ChangesNavigationView(_0xe919c8),_0x399497=_0x374879['commands']['get']('showPreviousChange'),_0x53bc1d=_0x374879['commands']['get']('showNextChange');return _0x2600f4['bind']('isBackwardNavigationEnabled')['to'](_0x399497,'isEnabled'),_0x2600f4['bind']('isForwardNavigationEnabled')['to'](_0x53bc1d,'isEnabled'),_0x2600f4['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x429e2d),this['listenTo'](_0x2600f4,'execute',(_0x16d42e,_0x52229e)=>{_0x374879['execute']('forward'===_0x52229e?'showNextChange':'showPreviousChange');}),_0x2600f4;}),_0x5226bc['show'](),_0x429e2d['on']('change:isReady',(_0x101f91,_0x524ec1,_0x505b26)=>{_0x505b26?_0x5226bc['hide']():_0x5226bc['show']();});}}class RevisionNameView extends _0x7cd47d{['_resizeObserver']=null;constructor(_0x3f0e16,_0x8bbfa){super(_0x3f0e16,_0x8bbfa);const _0x12d39c=this['bindTemplate'];this['set']({'label':ft(_0x3f0e16,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x3f0e16,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x12d39c['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1a3a9e(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5f4bc0=this['fieldView']['element'];this['_tooltipString']=_0x5f4bc0['scrollWidth']>_0x5f4bc0['clientWidth']&&_0x5f4bc0['value']||'';}}class RevisionAuthorView extends _0x6b0c43{constructor(_0x598767,_0x9ac6ca,_0x517311){super(_0x598767);const _0x5e4cb4=new nt();_0x5e4cb4['set']({'content':_0x2f3753,'viewBox':'0\x200\x2011\x2010'});const _0x4e6f78=['ck','ck-revision-history-sidebar__revision-author'];_0x517311&&_0x4e6f78['push']('ck-revision-history-sidebar__revision-author_creator');const _0xa7bd7a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x598767,_0x517311?'Revision\x20creator':'Revision\x20author')},'children':[_0x5e4cb4,_0x9ac6ca['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4e6f78},'children':_0xa7bd7a});}}function Rt(_0x15612b,_0x4f3e74){const _0x55edac=_0x15612b['bindTemplate'],_0x512625=_0x15612b['locale'],_0x4553a7=_0xcc940(_0x512625);_0x4553a7['panelPosition']='sw';const _0x26d788=function(_0x26e2a5,_0x359774){const _0x72ed7d=function(_0x53d8b1,_0x265985){const _0x55a9ba=_0x53d8b1['locale'],_0x3d8dd9={'Compare\x20against\x20selected':ft(_0x55a9ba,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x55a9ba,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x55a9ba,'Restore\x20this\x20revision')};return _0x265985['map'](_0x4e92cb=>{const _0x5cb1d9=_0x3d8dd9[_0x4e92cb['name']];return _0x5cb1d9&&_0x5cb1d9!==_0x4e92cb['name']&&(_0x4e92cb['name']=_0x5cb1d9),_0x4e92cb;});}(_0x26e2a5,_0x359774),_0x4e93e2=new _0xe9e71e();for(const _0x14e34f of _0x72ed7d){const _0x1a461b={'type':'button','model':new rt({'label':_0x14e34f['name'],'class':_0x14e34f['class'],'withText':!0x0,'role':'menuitem','_action':_0x14e34f['action']})};_0x1a461b['model']['bind']('isEnabled')['to'](_0x26e2a5,'isActionsDropdownOpen',_0xd842f=>'function'!=typeof _0x14e34f['isEnabled']||(!_0xd842f||_0x14e34f['isEnabled'](_0x26e2a5))),_0x4e93e2['add'](_0x1a461b);}return _0x4e93e2;}(_0x15612b,_0x4f3e74);return _0x15612b['bind']('isActionsDropdownOpen')['to'](_0x4553a7,'isOpen'),_0x4553a7['buttonView']['set']({'label':ft(_0x512625,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3ed45e}),_0x4553a7['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x55edac['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x55edac['to'](_0x3854c8=>_0x3854c8['stopPropagation']())}}),_0x4553a7['on']('execute',_0x58bf17=>{_0x15612b['isReady']&&'function'==typeof _0x58bf17['source']['_action']&&_0x58bf17['source']['_action'](_0x15612b);}),ot(_0x4553a7,_0x26d788,{'role':'menu'}),_0x4553a7['listenTo'](_0x15612b,'change:isActionsDropdownOpen',(_0x40b7a0,_0x36e4dd,_0x2e68a0)=>{if(_0x2e68a0)for(const _0x34e351 of _0x4553a7['listView']['items']){const _0x1ed540=_0x34e351['children']['first'],_0x255514=_0x4f3e74['find'](_0x3b3f8b=>_0x3b3f8b['action']===_0x1ed540['_action'])['isVisible'];_0x34e351['isVisible']=void 0x0===_0x255514||_0x255514(_0x15612b);}}),_0x4553a7;}class RevisionView extends/* #__PURE__ -- @preserve */
27
+ _0x37afc1(_0x6b0c43){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1d7df8,_0x579f03,_0x402318,_0x4d6089){super(_0x1d7df8);const _0x23f764=this['bindTemplate'],_0xc70908=function(_0x39f8fb,_0xdf6d9a){const _0x44e4bc=Array['from'](_0xdf6d9a['authors'])['filter'](_0x20305b=>_0x20305b!=_0xdf6d9a['creator']);return _0xdf6d9a['creator']&&_0x44e4bc['unshift'](_0xdf6d9a['creator']),_0x44e4bc['map'](_0xf67fc=>new RevisionAuthorView(_0x39f8fb,_0xf67fc,_0xf67fc==_0xdf6d9a['creator']));}(_0x1d7df8,_0x579f03);this['id']=_0x579f03['id'],this['_revision']=_0x579f03,this['_requireRevisionName']=_0x4d6089,this['bind']('name','createdAt')['to'](_0x579f03),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x475d77=>{return _0x429c5b=_0x1d7df8['uiLanguage'],(_0x780d51=_0x475d77)['toLocaleDateString'](_0x429c5b,{'month':'long','day':'numeric'})+',\x20'+_0x780d51['toLocaleTimeString'](_0x429c5b,{'hour':'numeric','minute':'numeric'});var _0x429c5b,_0x780d51;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x1d7df8,_0x1fb48d),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x429c43=>_0x429c43||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x30860c,_0x48531d)=>_0x30860c&&_0x48531d),this['revisionActionsView']=_0x402318&&_0x402318['length']?Rt(this,_0x402318):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x23f764['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x23f764['if']('isEnabled','ck-disabled',_0x29744d=>!_0x29744d),_0x23f764['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x23f764['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x23f764['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':_0x23f764['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':_0xc70908}]},this['revisionActionsView']],'on':{'click':_0x23f764['to'](_0x12d631=>{_0x12d631['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x1f7879=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x1f7879,'change',()=>{this['_requireRevisionName']&&!_0x1f7879['value']||this['fire']('setName',{'id':this['id'],'name':_0x1f7879['value']}),_0x1f7879['value']||(_0x1f7879['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x4f0ecc,_0x35cbe1){const _0x33ba67=vt['fromJSDate'](_0x4f0ecc)['setLocale'](_0x35cbe1),_0x885993=vt['local'](),_0x1954b9=_0x885993['minus']({'days':0x1})['startOf']('day');let _0x8813ee,_0x1597ca;return _0x33ba67['hasSame'](_0x885993,'day')?(_0x8813ee=_0x33ba67['startOf']('day')['toJSDate'](),_0x1597ca=_0x33ba67['toRelativeCalendar']()):_0x33ba67['hasSame'](_0x1954b9,'day')?(_0x8813ee=_0x1954b9['toJSDate'](),_0x1597ca=_0x33ba67['toRelativeCalendar']()):_0x33ba67['hasSame'](_0x885993,'week')?(_0x8813ee=_0x33ba67['startOf']('week')['toJSDate'](),_0x1597ca=_0x33ba67['weekdayLong']||''):_0x33ba67['hasSame'](_0x885993,'year')?(_0x8813ee=_0x33ba67['startOf']('month')['toJSDate'](),_0x1597ca=_0x33ba67['monthLong']||''):(_0x8813ee=_0x33ba67['startOf']('year')['toJSDate'](),_0x1597ca=String(_0x33ba67['year'])),{'startDate':_0x8813ee,'localizedPeriodName':_0x1597ca};}class RevisionsSidebarTimePeriodView extends _0x6b0c43{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1859d2,_0x1564c1,_0x91673b,_0xb89280){super(_0x1859d2);const _0x4165ed=bt(_0x1564c1,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x1564c1,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x91673b,this['_requireRevisionName']=_0xb89280,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':_0x4165ed}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x50b2d3){const _0xa56ea3=new RevisionView(this['locale'],_0x50b2d3,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0xa56ea3);}['removeRevision'](_0x576ae8){const _0x10ee2a=this['revisionViews']['find'](_0x49180f=>_0x49180f['id']===_0x576ae8['id']);this['revisionViews']['remove'](_0x10ee2a);}}class RevisionsSidebarHeaderView extends _0x6b0c43{constructor(_0xfa4a6){super(_0xfa4a6);const _0x31cc40=new nt();_0x31cc40['content']=_0x184ecc,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x31cc40,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0xfa4a6,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x6b0c43{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2bf7db,_0x524061,_0x10b0ef,_0x39e918){super(_0x2bf7db);const _0x29554a=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x524061,this['_revisionActions']=_0x10b0ef,this['_requireRevisionName']=_0x39e918,this['on']('select',(_0x2aee06,_0x35b261)=>{this['fire']('revisionSelected',_0x35b261);}),this['on']('setName',(_0x222de8,_0x8f8a03)=>{this['fire']('revisionSetName',_0x8f8a03);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x2bf7db),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x29554a['if']('isEnabled','ck-disabled',_0xf4d273=>!_0xf4d273)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x189296 of this['_revisions'])this['_addRevision'](_0x189296);this['_revisions']['on']('add',(_0x299755,_0x43d4c8)=>{this['_addRevision'](_0x43d4c8);}),this['_revisions']['on']('remove',(_0x50a2bf,_0x33e267)=>{this['_removeRevision'](_0x33e267);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2610e3=>_0x2610e3['revisionViews']['map'](_0x567bb7=>_0x567bb7))['flat']();}['selectRevision'](_0x15678f){for(const _0x5f2640 of this['revisionViews'])_0x15678f&&_0x15678f['id']===_0x5f2640['id']?_0x5f2640['select']():_0x5f2640['deselect']();}['highlightRevisions'](_0x4d8a99){for(const _0x5782af of this['revisionViews'])_0x4d8a99['some'](({id:_0x3cbbc5})=>_0x3cbbc5===_0x5782af['id'])?_0x5782af['highlight']():_0x5782af['unhighlight']();}['_addRevision'](_0x25c7de){const _0x58a6c6=bt(_0x25c7de['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x4f843d=this['_getTimePeriodViewByStartDate'](_0x58a6c6);_0x4f843d||(_0x4f843d=new RevisionsSidebarTimePeriodView(this['locale'],_0x58a6c6,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x4f843d)),_0x4f843d['addRevision'](_0x25c7de);}['_removeRevision'](_0x179359){const _0x5a67c5=bt(_0x179359['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x5a67c5)['removeRevision'](_0x179359);}['_getTimePeriodViewByStartDate'](_0x19853f){return this['timePeriodViews']['find'](_0x5a9ba2=>_0x5a9ba2['startDate']['getTime']()===_0x19853f['getTime']());}}class RevisionsSidebar extends _0x3b8836{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x227219){super(_0x227219),this['_revisionViewer']=_0x227219['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x21125c=this['_revisionsRepository']['_revisions'],_0x5c9c41=this['_createRevisionActions'](),_0x3843e3=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x21125c,_0x5c9c41,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',(_0x29155c,_0x335fbe)=>{_0x335fbe['revisionViews']['on']('add',(_0x35fd6a,_0x449fc7)=>{_0x449fc7['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)),_0x3843e3['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x4f1985=this['_revisionsRepository']['getRevision'](0x0);if(_0x4f1985){const _0x482c07=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4f1985['id']);this['_revisionViewer']['compare'](_0x4f1985,_0x482c07);}}['_handleRevisionSelected'](_0x1b7f6d,_0x487502){const _0x3b5523=this['_revisionsRepository']['getRevision'](_0x487502['id']),_0x41a1c2=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3b5523['id']);this['_revisionViewer']['compare'](_0x3b5523,_0x41a1c2);}['_handleRevisionSetName'](_0x1bd895,_0x408a49){this['_revisionsRepository']['getRevision'](_0x408a49['id'])['setName'](_0x408a49['name']);}['_handleDiffChange'](_0x25d356,_0x149c79,_0x5a3051){const _0x29cea5=this['_revisionsRepository']['getRevisionsInDiff'](_0x5a3051);_0x29cea5['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x29cea5),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x29cea5[0x0]));}['_createRevisionActions'](){const _0x2a654d=this['editor'],_0x2c15ea=RevisionsSidebar['availableRevisionActions'],_0x594257=_0x2a654d['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x594257['length'])return _0x594257['map'](_0x51b8e3=>{const _0x2f6007='string'==typeof _0x51b8e3?Object['assign']({},_0x2c15ea[_0x51b8e3]):_0x51b8e3;return _0x2f6007['action']=_0x2f6007['action']['bind'](this,_0x2a654d),_0x2f6007['isVisible']&&(_0x2f6007['isVisible']=_0x2f6007['isVisible']['bind'](this,_0x2a654d)),_0x2f6007;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x485f5b},_0x1762e9)=>{const _0x2e936f=_0x485f5b['get'](RevisionViewer),_0xebfede=_0x2e936f['repository'];let _0x4aa954=_0x2e936f['diff']['newRevisionId'],_0x5bfdf3=_0x1762e9['id'];_0xebfede['getIndex'](_0x4aa954)>_0xebfede['getIndex'](_0x5bfdf3)&&([_0x4aa954,_0x5bfdf3]=[_0x5bfdf3,_0x4aa954]),_0x2e936f['compare'](_0x4aa954,_0x5bfdf3);},'isVisible':({plugins:_0x4c4ca2},_0x295afe)=>{const _0x11d9c8=_0x4c4ca2['get'](RevisionViewer);return!(_0x11d9c8['repository']['getRevisionsInDiff'](_0x11d9c8['diff'])['length']>0x2)&&!_0x295afe['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x5c9556,{id:_0x5e0520})=>{_0x5c9556['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5e0520);},'isVisible':({plugins:_0x5f14b2},_0x48bcef)=>!!_0x5f14b2['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x48bcef['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x43d540},{id:_0x1e3b7f,revisionNameView:_0x2e4300})=>{const _0x76c0e=_0x43d540['get'](RevisionViewer),_0x3e757a=_0x76c0e['repository']['getEarlierVisibleRevision'](_0x1e3b7f);_0x76c0e['compare'](_0x1e3b7f,_0x3e757a),_0x2e4300['focus'](),_0x2e4300['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x167372,_0x17f6f4){super(_0x167372),this['_view']=_0x17f6f4,this['_toolbarConfig']=ht(_0x167372['config']['get']('toolbar')),this['_elementReplacer']=new _0x4acda2();}get['element'](){return this['view']['element'];}['init'](_0x1c0db9){const _0x115b80=this['editor'],_0x40e973=this['view'],_0x3d1770=_0x115b80['editing']['view'],_0x4a87c4=_0x40e973['editable'],_0x3bed59=_0x3d1770['document']['getRoot']();_0x4a87c4['name']=_0x3bed59['rootName'],_0x40e973['render']();const _0x3858bf=_0x4a87c4['element'];this['setEditableElement'](_0x4a87c4['name'],_0x3858bf),_0x40e973['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3d1770['attachDomRoot'](_0x3858bf),this['_elementReplacer']['replace'](_0x1c0db9,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x2b3488=this['view'],_0x3d62f7=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x3d62f7['detachDomRoot'](_0x2b3488['editable']['name']),_0x2b3488['destroy']();}['_initToolbar'](){const _0x21c161=this['view'];_0x21c161['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x21c161['stickyPanel']['limiterElement']=_0x21c161['element'],_0x21c161['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x163c20})=>_0x163c20),_0x21c161['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x21c161['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x4e866c,_0x92f590,_0xe508e={}){super(_0x4e866c),this['stickyPanel']=new lt(_0x4e866c),this['toolbar']=new ut(_0x4e866c,{'shouldGroupWhenFull':_0xe508e['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x4e866c,_0x92f590);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
30
- _0x26f772(_0x278490){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x30d062,_0x324efb){super(_0x324efb),this['sourceElement']=_0x30d062,this['model']['document']['createRoot']();const _0x178446=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x178446);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x22d809,_0x594e46){const _0x3c4bdd=new this(_0x22d809,_0x594e46);return await _0x3c4bdd['initPlugins'](),await _0x3c4bdd['ui']['init'](_0x22d809),await _0x3c4bdd['data']['init'](_0x3c4bdd['config']['get']('initialData')||''),_0x3c4bdd['fire']('ready'),_0x3c4bdd;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x538071{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49cfe4){function _0x5e6a65(_0x540a43){return _0x540a43['map'](_0x101a32=>String['fromCharCode'](_0x101a32))['join']('');}super(_0x49cfe4),this['result']='end',_0x49cfe4[_0x5e6a65([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e6a65([0x76,0x69,0x65,0x77])][_0x5e6a65([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5e6a65([0x61,0x75,0x74,0x6f]),_0x49cfe4[_0x5e6a65([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5e6a65([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5e6a65([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5e6a65([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5e6a65([0x6f,0x6b])});}}class RevisionHistory extends _0x538071{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x264422){if(super(_0x264422),!this['editor']['config']['get']('revisionHistory'))throw new _0x423177('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4a757f=>this['_showRevisionViewer']({..._0x4a757f,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x22069a=>this['_closeRevisionViewer'](_0x22069a)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x56da53=>this['_restoreRevision'](_0x56da53)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3e5258){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3e5258;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x584264){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x584264);}['getRevision'](_0x55530f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x55530f);}['getRevisions'](_0x582463){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x582463||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x38d81a=this['editor'],_0x5454fa=_0x21c68e(_0x38d81a,It),_0x5eb4c5=_0x38d81a['plugins']['get']('RevisionTracker'),_0x123db3=_0x38d81a['plugins']['get'](_0x2baa1d)['users'];return _0x5454fa['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5454fa['lazyRoots'],(_0x5454fa['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x538071{static get['requires'](){return[RevisionViewer,_0x2baa1d];}['init'](){const _0x130a3b=this['editor']['plugins']['get'](_0x2baa1d);for(const _0x534a86 of _0x123db3)_0x534a86['isAnonymous']||_0x130a3b['getUser'](_0x534a86['id'])||_0x130a3b['addUser'](_0x534a86);const _0x41eac1=_0x5eb4c5['repository']['getRevisions']();let _0x5944d2=null;const _0x814115=this['editor']['plugins']['get']('RevisionViewer');_0x814115['adapter']=_0x5eb4c5['adapter'],_0x814115['bind']('isEnabled')['to'](_0x5eb4c5),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x38d81a,'isReadOnly',_0x462ebb=>!_0x462ebb);for(const _0x3efddb of _0x41eac1){const _0x19b5e6=null===_0x3efddb['creator'];if(_0x19b5e6&&_0x3efddb['toVersion']===_0x3efddb['fromVersion'])continue;const _0x4c82cc=_0x3efddb['toJSON']();_0x814115['addRevisionData'](_0x4c82cc,(_0x2493d6,_0x3f6772,_0x4ed8cb)=>{if(_0x19b5e6){if(_0x5944d2)_0x5944d2['_update'](_0x2493d6,_0x3f6772);else{if(!_0x3f6772){const _0x13f9bf=_0x4ed8cb['toJSON']();_0x13f9bf['id']=_0x51ceb2(),_0x5eb4c5['saveRevision'](_0x13f9bf,_0x4ed8cb['toVersion'])['then'](_0x39cb61=>{_0x5944d2=_0x39cb61;});}}}else _0x3efddb['_update'](_0x2493d6,_0x3f6772);});}}},RevisionsSidebar),_0x5454fa);}['_enhanceShowRevisionViewerCallback'](){const _0x2c64ae=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xd083d4=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x90b6a7=this['editor']['plugins']['get']('Autosave');await _0x90b6a7['save']();}else await _0xd083d4['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x30581e=this['editor']['plugins']['get']('Dialog');_0x30581e['isOpen']&&_0x30581e['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x11d570=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4fc634 of _0x11d570)_0x4fc634['class']=_0x4fc634['class']?_0x4fc634['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x4e2bf4=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4e2bf4&&_0x4e2bf4['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x2d1bb6=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x2d1bb6&&_0x2d1bb6['setAttribute']('tabindex','-1');}}const _0x235bdd=this['_getRevisionViewerEditorConfig']();return _0x2c64ae(_0x235bdd)['then'](_0x593705=>{return(this['_viewerEditor']=_0x593705,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'),_0x593705);})['catch'](_0x523aa0=>(console['error'](_0x523aa0),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2be4c7=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 _0x5bf701=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1f2318 of _0x5bf701)_0x1f2318['class']='ck-tab-panel_disabled'===_0x1f2318['class']?'':_0x1f2318['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x21c3a7=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x21c3a7&&_0x21c3a7['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x594fb3=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x594fb3&&_0x594fb3['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2be4c7(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x40bc5d=this['editor']['plugins']['get']('Annotations');_0x40bc5d['refreshVisibility'](),_0x40bc5d['refreshPositioning']();}});});}['_showRevisionViewer'](_0x2fb4a4){const _0xa5650b=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x326c1c=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x43e08b=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x43e08b,_0x2fb4a4)['then'](_0x452fe6=>(_0x326c1c['style']['display']='block',_0xa5650b['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x452fe6));}['_closeRevisionViewer'](_0x20e5fe){const _0x2ac452=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2ac452['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x20e5fe['destroy']();}async['_restoreRevision'](_0x431c98){const _0x107210=this['editor'],_0x404013=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1ceed1=_0x107210['plugins']['get']('RevisionTracker'),_0x3610db=_0x107210['plugins']['get']('RevisionHistoryUtils'),_0x3e8d5f=_0x404013['repository']['getRevision'](_0x431c98);let _0x3e2678,_0x28f619,_0xf51379;try{await _0x3610db['loadRevisionData'](_0x3e8d5f,this['adapter']),_0x3e2678=_0x3610db['getRevisionDocumentData'](_0x3e8d5f),_0x28f619=_0x3610db['getRevisionRootsAttributes'](_0x3e8d5f);}catch(_0x3aaa59){return void console['error'](_0x3aaa59);}_0x107210['model']['change'](_0x327e00=>{for(const _0x5447aa of Array['from'](_0x107210['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x327e00['removeMarker'](_0x5447aa);}),_0x404013['isReady']=!0x1,_0x107210['model']['enqueueChange'](_0x267580=>{_0x267580['setSelection'](null),_0x267580['removeSelectionAttribute'](_0x107210['model']['document']['selection']['getAttributeKeys']());const _0x40f7ff=Object['keys'](_0x3e2678);for(const _0x399431 of _0x107210['model']['document']['roots'])'$graveyard'!=_0x399431['rootName']&&_0x399431['isAttached']()&&!_0x40f7ff['includes'](_0x399431['rootName'])&&_0x267580['detachRoot'](_0x399431);for(const _0x82696e of _0x40f7ff){let _0x3f62a2=_0x107210['model']['document']['getRoot'](_0x82696e);if(!_0x3f62a2||!_0x3f62a2['isAttached']()){const _0x51b12d=_0x3e8d5f['diffData']?.[_0x82696e]?.['rootElementName']||'$root';_0x3f62a2=_0x267580['addRoot'](_0x82696e,_0x51b12d);}const _0x26fb4b=_0x28f619[_0x82696e],_0x14d467=Object['keys'](_0x26fb4b),_0x41eb21=_0x3e2678[_0x82696e];for(const _0x2a6693 of _0x3f62a2['getAttributeKeys']())_0x14d467['includes'](_0x2a6693)||_0x267580['removeAttribute'](_0x2a6693,_0x3f62a2);for(const _0x25c5aa of _0x14d467)_0x267580['setAttribute'](_0x25c5aa,_0x28f619[_0x82696e][_0x25c5aa],_0x3f62a2);_0x267580['remove'](_0x267580['createRangeIn'](_0x3f62a2)),_0x267580['insert'](_0x107210['data']['parse'](_0x41eb21,_0x3f62a2),_0x3f62a2,0x0);}});const _0x36ca26=ft(_0x107210['locale'],'Restored');if(_0x3e8d5f['name'])_0xf51379=-0x1==_0x3e8d5f['name']['indexOf'](_0x36ca26)?_0x36ca26+':\x20'+_0x3e8d5f['name']:_0x3e8d5f['name'];else _0xf51379=_0x36ca26+':\x20'+(_0x3e8d5f['createdAt']['toLocaleDateString'](_0x107210['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3e8d5f['createdAt']['toLocaleTimeString'](_0x107210['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1ceed1['saveRevision']({'name':_0xf51379}),_0x404013['isReady']=!0x0,_0x107210['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
29
+ kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x52fed5){super(_0x52fed5),this['_revisionViewer']=_0x52fed5['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2fa601=this['_revisionsRepository']['_revisions'],_0x27ad72=this['_createRevisionActions'](),_0x8c8200=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x2fa601,_0x27ad72,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',(_0x11d421,_0x1ebfca)=>{_0x1ebfca['revisionViews']['on']('add',(_0x182cf2,_0x4ed3f7)=>{_0x4ed3f7['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)),_0x8c8200['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x5b5390=this['_revisionsRepository']['getRevision'](0x0);if(_0x5b5390){const _0x5ccf76=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5b5390['id']);this['_revisionViewer']['compare'](_0x5b5390,_0x5ccf76);}}['_handleRevisionSelected'](_0x33fd16,_0xc7f9){const _0x30441f=this['_revisionsRepository']['getRevision'](_0xc7f9['id']),_0x28b450=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x30441f['id']);this['_revisionViewer']['compare'](_0x30441f,_0x28b450);}['_handleRevisionSetName'](_0x5e626a,_0x38e34c){this['_revisionsRepository']['getRevision'](_0x38e34c['id'])['setName'](_0x38e34c['name']);}['_handleDiffChange'](_0x2121bc,_0x280a19,_0x291851){const _0x236367=this['_revisionsRepository']['getRevisionsInDiff'](_0x291851);_0x236367['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x236367),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x236367[0x0]));}['_createRevisionActions'](){const _0x3fbc78=this['editor'],_0x447e89=RevisionsSidebar['availableRevisionActions'],_0x5db38e=_0x3fbc78['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x5db38e['length'])return _0x5db38e['map'](_0x23a364=>{const _0x3e6d4b='string'==typeof _0x23a364?Object['assign']({},_0x447e89[_0x23a364]):_0x23a364;return _0x3e6d4b['action']=_0x3e6d4b['action']['bind'](this,_0x3fbc78),_0x3e6d4b['isVisible']&&(_0x3e6d4b['isVisible']=_0x3e6d4b['isVisible']['bind'](this,_0x3fbc78)),_0x3e6d4b;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x95cdb},_0x47146f)=>{const _0x158baa=_0x95cdb['get'](RevisionViewer),_0xf8ce4f=_0x158baa['repository'];let _0x279be7=_0x158baa['diff']['newRevisionId'],_0x5998ea=_0x47146f['id'];_0xf8ce4f['getIndex'](_0x279be7)>_0xf8ce4f['getIndex'](_0x5998ea)&&([_0x279be7,_0x5998ea]=[_0x5998ea,_0x279be7]),_0x158baa['compare'](_0x279be7,_0x5998ea);},'isVisible':({plugins:_0x20ea1e},_0x401382)=>{const _0x4c56ed=_0x20ea1e['get'](RevisionViewer);return!(_0x4c56ed['repository']['getRevisionsInDiff'](_0x4c56ed['diff'])['length']>0x2)&&!_0x401382['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x5f3d02,{id:_0x101e49})=>{_0x5f3d02['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x101e49);},'isVisible':({plugins:_0x47ce4a},_0x4a5bce)=>!!_0x47ce4a['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x4a5bce['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xf39c88},{id:_0x5927dc,revisionNameView:_0xdb92f4})=>{const _0x3bfab4=_0xf39c88['get'](RevisionViewer),_0x4268be=_0x3bfab4['repository']['getEarlierVisibleRevision'](_0x5927dc);_0x3bfab4['compare'](_0x5927dc,_0x4268be),_0xdb92f4['focus'](),_0xdb92f4['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x429798,_0x3b7966){super(_0x429798),this['_view']=_0x3b7966,this['_toolbarConfig']=ht(_0x429798['config']['get']('toolbar')),this['_elementReplacer']=new _0x1d2c7d();}get['element'](){return this['view']['element'];}['init'](_0x554d4f){const _0x3066f5=this['editor'],_0x347e20=this['view'],_0x3d95c9=_0x3066f5['editing']['view'],_0x58ce61=_0x347e20['editable'],_0x189eb7=_0x3d95c9['document']['getRoot']();_0x58ce61['name']=_0x189eb7['rootName'],_0x347e20['render']();const _0x454d5a=_0x58ce61['element'];this['setEditableElement'](_0x58ce61['name'],_0x454d5a),_0x347e20['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3d95c9['attachDomRoot'](_0x454d5a),this['_elementReplacer']['replace'](_0x554d4f,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x3cf4fe=this['view'],_0x16313c=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x16313c['detachDomRoot'](_0x3cf4fe['editable']['name']),_0x3cf4fe['destroy']();}['_initToolbar'](){const _0x5b5502=this['view'];_0x5b5502['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x5b5502['stickyPanel']['limiterElement']=_0x5b5502['element'],_0x5b5502['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x348ffe})=>_0x348ffe),_0x5b5502['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x5b5502['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x152e03,_0x55ceda,_0x308100={}){super(_0x152e03),this['stickyPanel']=new lt(_0x152e03),this['toolbar']=new ut(_0x152e03,{'shouldGroupWhenFull':_0x308100['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x152e03,_0x55ceda);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
30
+ _0x5dad88(_0x305000){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x55d662,_0x29c893){super(_0x29c893),this['sourceElement']=_0x55d662,this['model']['document']['createRoot']();const _0x510ca3=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x510ca3);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x96edd3,_0x21cc1c){const _0x17d4be=new this(_0x96edd3,_0x21cc1c);return await _0x17d4be['initPlugins'](),await _0x17d4be['ui']['init'](_0x96edd3),await _0x17d4be['data']['init'](_0x17d4be['config']['get']('initialData')||''),_0x17d4be['fire']('ready'),_0x17d4be;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x3b8836{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c2539){function _0x324207(_0x452fe6){return _0x452fe6['map'](_0xceec89=>String['fromCharCode'](_0xceec89))['join']('');}super(_0x2c2539),this['result']='end',_0x2c2539[_0x324207([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x324207([0x76,0x69,0x65,0x77])][_0x324207([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x324207([0x61,0x75,0x74,0x6f]),_0x2c2539[_0x324207([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x324207([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x324207([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x324207([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x324207([0x6f,0x6b])});}}class RevisionHistory extends _0x3b8836{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x19aee1){if(super(_0x19aee1),!this['editor']['config']['get']('revisionHistory'))throw new _0x5107d5('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x597a1a=>this['_showRevisionViewer']({..._0x597a1a,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x20046c=>this['_closeRevisionViewer'](_0x20046c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3d48a9=>this['_restoreRevision'](_0x3d48a9)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3dbf1b){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3dbf1b;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1837c1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1837c1);}['getRevision'](_0x7f5545){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x7f5545);}['getRevisions'](_0x211e4c){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x211e4c||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x57e641=this['editor'],_0x10e622=_0x4d94e7(_0x57e641,It),_0x526a81=_0x57e641['plugins']['get']('RevisionTracker'),_0x4c13cf=_0x57e641['plugins']['get'](_0x51d413)['users'];return _0x10e622['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x10e622['lazyRoots'],(_0x10e622['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x3b8836{static get['requires'](){return[RevisionViewer,_0x51d413];}['init'](){const _0x4b4443=this['editor']['plugins']['get'](_0x51d413);for(const _0x2f1ab1 of _0x4c13cf)_0x2f1ab1['isAnonymous']||_0x4b4443['getUser'](_0x2f1ab1['id'])||_0x4b4443['addUser'](_0x2f1ab1);const _0x5e5f0c=_0x526a81['repository']['getRevisions']();let _0x1e0b7a=null;const _0x184cd8=this['editor']['plugins']['get']('RevisionViewer');_0x184cd8['adapter']=_0x526a81['adapter'],_0x184cd8['bind']('isEnabled')['to'](_0x526a81),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x57e641,'isReadOnly',_0x48b063=>!_0x48b063);for(const _0x492f2a of _0x5e5f0c){const _0x313509=null===_0x492f2a['creator'];if(_0x313509&&_0x492f2a['toVersion']===_0x492f2a['fromVersion'])continue;const _0x2f54ef=_0x492f2a['toJSON']();_0x184cd8['addRevisionData'](_0x2f54ef,(_0x51e2e0,_0x2bc932,_0x1854a8)=>{if(_0x313509){if(_0x1e0b7a)_0x1e0b7a['_update'](_0x51e2e0,_0x2bc932);else{if(!_0x2bc932){const _0x1b1e7b=_0x1854a8['toJSON']();_0x1b1e7b['id']=_0x439976(),_0x526a81['saveRevision'](_0x1b1e7b,_0x1854a8['toVersion'])['then'](_0x579c84=>{_0x1e0b7a=_0x579c84;});}}}else _0x492f2a['_update'](_0x51e2e0,_0x2bc932);});}}},RevisionsSidebar),_0x10e622);}['_enhanceShowRevisionViewerCallback'](){const _0x5a7743=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xd23f52=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x49a1eb=this['editor']['plugins']['get']('Autosave');await _0x49a1eb['save']();}else await _0xd23f52['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x15f620=this['editor']['plugins']['get']('Dialog');_0x15f620['isOpen']&&_0x15f620['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x439da6=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xf332c5 of _0x439da6)_0xf332c5['class']=_0xf332c5['class']?_0xf332c5['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x3ee202=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3ee202&&_0x3ee202['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3d2127=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3d2127&&_0x3d2127['setAttribute']('tabindex','-1');}}const _0x534e88=this['_getRevisionViewerEditorConfig']();return _0x5a7743(_0x534e88)['then'](_0x24f063=>{return(this['_viewerEditor']=_0x24f063,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'),_0x24f063);})['catch'](_0x4b6ec3=>(console['error'](_0x4b6ec3),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x404e91=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 _0x54cda3=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1d1a40 of _0x54cda3)_0x1d1a40['class']='ck-tab-panel_disabled'===_0x1d1a40['class']?'':_0x1d1a40['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x112437=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x112437&&_0x112437['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1470fd=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1470fd&&_0x1470fd['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x404e91(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x22e8fc=this['editor']['plugins']['get']('Annotations');_0x22e8fc['refreshVisibility'](),_0x22e8fc['refreshPositioning']();}});});}['_showRevisionViewer'](_0x3bc891){const _0x2ffdfa=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x55865d=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2b287a=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x2b287a,_0x3bc891)['then'](_0x5514f8=>(_0x55865d['style']['display']='block',_0x2ffdfa['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x5514f8));}['_closeRevisionViewer'](_0x4a0dc8){const _0x3a03b5=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3a03b5['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4a0dc8['destroy']();}async['_restoreRevision'](_0x122e5b){const _0x5dc9cf=this['editor'],_0x13696b=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x158df2=_0x5dc9cf['plugins']['get']('RevisionTracker'),_0xb55d71=_0x5dc9cf['plugins']['get']('RevisionHistoryUtils'),_0x1b0176=_0x13696b['repository']['getRevision'](_0x122e5b);let _0x5194f3,_0x52e966,_0x87d329;try{await _0xb55d71['loadRevisionData'](_0x1b0176,this['adapter']),_0x5194f3=_0xb55d71['getRevisionDocumentData'](_0x1b0176),_0x52e966=_0xb55d71['getRevisionRootsAttributes'](_0x1b0176);}catch(_0x5507e1){return void console['error'](_0x5507e1);}_0x5dc9cf['model']['change'](_0xe089c6=>{for(const _0x5fac62 of Array['from'](_0x5dc9cf['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xe089c6['removeMarker'](_0x5fac62);}),_0x13696b['isReady']=!0x1,_0x5dc9cf['model']['enqueueChange'](_0x120bb6=>{_0x120bb6['setSelection'](null),_0x120bb6['removeSelectionAttribute'](_0x5dc9cf['model']['document']['selection']['getAttributeKeys']());const _0x575d52=Object['keys'](_0x5194f3);for(const _0x51fa1 of _0x5dc9cf['model']['document']['roots'])'$graveyard'!=_0x51fa1['rootName']&&_0x51fa1['isAttached']()&&!_0x575d52['includes'](_0x51fa1['rootName'])&&_0x120bb6['detachRoot'](_0x51fa1);for(const _0x2ce684 of _0x575d52){let _0x47fcba=_0x5dc9cf['model']['document']['getRoot'](_0x2ce684);if(!_0x47fcba||!_0x47fcba['isAttached']()){const _0x4ea2a7=_0x1b0176['diffData']?.[_0x2ce684]?.['rootElementName']||'$root';_0x47fcba=_0x120bb6['addRoot'](_0x2ce684,_0x4ea2a7);}const _0xed7c4c=_0x52e966[_0x2ce684],_0x143221=Object['keys'](_0xed7c4c),_0x57ff82=_0x5194f3[_0x2ce684];for(const _0x743e0f of _0x47fcba['getAttributeKeys']())_0x143221['includes'](_0x743e0f)||_0x120bb6['removeAttribute'](_0x743e0f,_0x47fcba);for(const _0x4b2346 of _0x143221)_0x120bb6['setAttribute'](_0x4b2346,_0x52e966[_0x2ce684][_0x4b2346],_0x47fcba);_0x120bb6['remove'](_0x120bb6['createRangeIn'](_0x47fcba)),_0x120bb6['insert'](_0x5dc9cf['data']['parse'](_0x57ff82,_0x47fcba),_0x47fcba,0x0);}});const _0x41fca1=ft(_0x5dc9cf['locale'],'Restored');if(_0x1b0176['name'])_0x87d329=-0x1==_0x1b0176['name']['indexOf'](_0x41fca1)?_0x41fca1+':\x20'+_0x1b0176['name']:_0x1b0176['name'];else _0x87d329=_0x41fca1+':\x20'+(_0x1b0176['createdAt']['toLocaleDateString'](_0x5dc9cf['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1b0176['createdAt']['toLocaleTimeString'](_0x5dc9cf['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x158df2['saveRevision']({'name':_0x87d329}),_0x13696b['isReady']=!0x0,_0x5dc9cf['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};