@ckeditor/ckeditor5-revision-history 38.0.1 → 38.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/package.json +13 -11
- package/src/augmentation.d.ts +25 -25
- package/src/changeitem.d.ts +57 -57
- package/src/changeitem.js +1 -1
- package/src/editor/revisionviewereditor.d.ts +27 -27
- package/src/editor/revisionviewereditor.js +1 -1
- package/src/editor/revisionviewereditorui.d.ts +28 -28
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.d.ts +43 -43
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.d.ts +11 -10
- package/src/revision.d.ts +153 -153
- package/src/revision.js +1 -1
- package/src/revisiondiff.d.ts +20 -20
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.d.ts +95 -93
- package/src/revisionhistory.js +1 -1
- package/src/revisionhistoryadapter.d.ts +60 -60
- package/src/revisionhistoryconfig.d.ts +60 -60
- package/src/revisionsrepository.d.ts +48 -43
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.d.ts +77 -72
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.d.ts +21 -21
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.d.ts +9 -9
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.d.ts +4 -4
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.d.ts +4 -4
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.d.ts +91 -91
- package/src/ui/revision/revisionview.js +1 -1
- package/src/ui/revision/subrevisioncollapserview.d.ts +17 -17
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.d.ts +30 -30
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.d.ts +4 -4
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +80 -80
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.d.ts +22 -21
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.d.ts +40 -39
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +4 -4
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +25 -25
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.d.ts +40 -40
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.d.ts +8 -8
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.d.ts +18 -18
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.d.ts +36 -36
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +22 -22
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.d.ts +24 -22
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.d.ts +7 -7
- package/src/utils/common-translations.js +1 -1
package/src/revisiontracker.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x3e95=['$graveyard','_handleRootOperation','RevisionTracker','includes','_touchedRoots','_getViewJson','deletions','createRevision','revisionHistory.resumeUnsavedRevision','_source','_removePendingAction','getTransformedByOperation','version','length','getCurrentRevisionId','data','markers','model','_revisionDataBuilder','children','_getPreviousFrom','_reset','marked','_generateTape','markerToData','createRangeIn','affectsData','targetPosition','_pendingAction','start','_isAttached','insertion','ready','insert','editing','_removeMetaData','slice','collaboration.channelId','clone','getAttributes','size','newValue','_fixPosition','_diffRootsAttributes','_lastFrom','parse','isAttached','name','end','merge','createPositionFromPath','_baseIdsRoots','_setConversion','rootsAttributes','_fixRange','requires','_makeModelFromViewString','_markers','getRoot','marker','_saveMetaData','item','stickiness','startsWith','string','reverse','buildRevisionData','newRange','howMany','_processRootBeforeSave','dataDowncast','getRevisions','_handleRootAttributeOperation','_update','previousPosition','filter','userId','addRootAttribute','_findInsertionIndex','for','getAncestors','view','_bufferUpdate','getLatestVersion','clear','getAttribute','oldRange','keepParagraph','_handleInsertOperation','resolve','getRevision','diffData','RealTimeCollaborationClient','adapter','_baseRoots','document','getTime','getWalker','loadState','sort','_cloneOperation','then','_diffRoots','_createInitialRevision','bind','data-revision-','reInit','rootName','getChild','_execute','getRootNames','detachRoot','createdAt','_isInit','childCount','_idsRoots','_getState','source','vid','setSource','_baseRootsAttributes','elementEnd','_applyOperations','setRevisionData','_setAttribute','_handleSplitOperation','_copyMarkers','_getBaseVids','_fixOperation','elementStart','currentRevision','_removeRevisionMarkers','_touchedMarkers','updateRevisions','_touched','pluginName','_lastTo','isReady','parent','initialData','conversion','_initialRevisionId','attributesAfter','from','get','insertionPosition','editor-initial-data-replaced-with-revision-data','_authorId','RevisionsRepository','_handleMergeOperation','creator','removeRootAttribute','$text','update','_makeRevision','getNodeByPath','path','_startingRevisionId','some','root','creatorId','roots','_markChanges','plugins','sendBufferedUpdates','revision-start','_handleMarkerOperation','isEqual','default','position','createPositionAt','map','add','splitPosition','revision-end','values','toVersion','getUser','upcast','hasContent','define','_loadState','_initialRoots','vid_end','NEGATIVE_INFINITY','find','_loadedStateData','init','_revisionId','_handleMoveOperation','addRevisionData','Initial\x20revision','baseVersion','attributesBefore','revision:','_continueCurrentRevision','deletion','authors','nodes','processor','attributes','getRevisionRootsAttributes','_createCurrentRevision','_calculateMetaData','_getFromVersion','dataToMarker','_makeIdsRoot','_addPendingAction','_loadRevisionData','useFillerType','offsetSize','toModel','authorsIds','_getVidAttributeName','forEach','getData','history','editor','key','_startingVersion','initial','offset','getOperations','repository','fromEntries','vid_start','set','graveyardPosition','Users','fromVersion','createPositionAfter','saveRevision','config','_handleOperation','_replaceEditorDataWithRevisionData','PendingActions','_savedMetaData','_isPendingUpdate','getChildren','toData','keys','paragraph','_operations','addRoot','changeRootAttribute','tableCell','getOperation','isAdd','_transformMarkers','_createFromRanges','createRange','split','push','_prepareViewToSave','delete','type','insertions','_bufferedUpdates','attachChange','documentFragment','_insertChild','nodeAfter','remove','_clone','element','toView','reinsert','has','revision'];(function(_0x4845d8,_0x3e9517){const _0x329c48=function(_0x4e1869){while(--_0x4e1869){_0x4845d8['push'](_0x4845d8['shift']());}};_0x329c48(++_0x3e9517);}(_0x3e95,0x193));const _0x329c=function(_0x4845d8,_0x3e9517){_0x4845d8=_0x4845d8-0x0;let _0x329c48=_0x3e95[_0x4845d8];return _0x329c48;};import{Users as _0x7aae2f}from'ckeditor5-collaboration/src/collaboration-core';import{Plugin as _0xc96d0e,PendingActions as _0x107c7e}from'ckeditor5/src/core';import{logWarning as _0x2aa93e,uid as _0x18bbc3}from'ckeditor5/src/utils';import{Position as _0x12f2d2,Range as _0x60a973,Element as _0x48a53c,DocumentFragment as _0x16b774,ViewText as _0x5b422c,ViewElement as _0x37da6a,ViewContainerElement as _0x5c7608,ViewAttributeElement as _0x5bd2d2,ViewEmptyElement as _0x2db38c,ViewRawElement as _0x4dfacf,ViewUIElement as _0x34694d,ViewDocumentFragment as _0x4fcb82}from'ckeditor5/src/engine';import _0x495a00 from'./revisionsrepository';import{getTranslation as _0x573f70}from'./utils/common-translations';import{cloneDeep as _0x45e264,isEqual as _0xb522f9}from'lodash-es';const j={'c':_0x5c7608,'a':_0x5bd2d2,'e':_0x2db38c,'r':_0x4dfacf,'u':_0x34694d};export default class l extends _0xc96d0e{static get[_0x329c('0x1')](){return _0x329c('0x89');}static get[_0x329c('0xbe')](){return[_0x7aae2f,_0x495a00,_0x107c7e];}constructor(_0x3d8b20){super(_0x3d8b20),this[_0x329c('0xe4')]=null,this[_0x329c('0x109')]=null,this[_0x329c('0x99')]=new T(this[_0x329c('0x53')]),this['_initialRevisionId']=this[_0x329c('0x53')][_0x329c('0x62')][_0x329c('0xa')](_0x329c('0xac'))||_0x329c('0x56'),this[_0x329c('0x7b')]=new Map(),this[_0x329c('0x34')]=null;const _0x14d9c2=_0x18bbc3();this[_0x329c('0x90')]={'history':this[_0x329c('0x53')][_0x329c('0x98')][_0x329c('0xe6')][_0x329c('0x52')],'getLatestVersion':()=>Promise[_0x329c('0xe0')](this[_0x329c('0x53')][_0x329c('0x98')]['document'][_0x329c('0x93')]),'getCurrentRevisionId':()=>_0x14d9c2},this['set'](_0x329c('0x3'),!0x1),this[_0x329c('0x5c')]('isEnabled',!0x0),this[_0x329c('0x5c')](_0x329c('0x67'),!0x1),this[_0x329c('0x53')][_0x329c('0x62')][_0x329c('0x2e')](_0x329c('0x8f'),!0x0),this['editor'][_0x329c('0x6')][_0x329c('0xd6')](_0x329c('0x2c'))[_0x329c('0x47')]({'view':_0x329c('0x86')});}[_0x329c('0x35')](){this['repository']=this[_0x329c('0x53')][_0x329c('0x1d')][_0x329c('0xa')](_0x329c('0xe')),this[_0x329c('0xbb')](),this[_0x329c('0x53')][_0x329c('0x96')]['on'](_0x329c('0xa7'),()=>{const _0x5a6d72=this[_0x329c('0x59')][_0x329c('0xe1')](0x0),_0x17a16d=_0x5a6d72&&null===_0x5a6d72[_0x329c('0x10')]?_0x5a6d72:null;if(this[_0x329c('0x3d')]=!!_0x17a16d&&this['editor'][_0x329c('0x62')][_0x329c('0xa')](_0x329c('0x8f')),this['editor']['plugins'][_0x329c('0x85')](_0x329c('0xe3'))){const _0x2cced8=this[_0x329c('0x90')][_0x329c('0x95')](),_0x182912=this[_0x329c('0x59')][_0x329c('0xe1')](_0x2cced8);if(_0x182912)this[_0x329c('0x55')]=_0x182912[_0x329c('0x5f')],this[_0x329c('0x3d')]=!0x1;else{const _0x248a11=this[_0x329c('0x90')]['history'][_0x329c('0x6c')][_0x329c('0x33')](_0x35cd4c=>!_0x35cd4c[_0x329c('0xf8')]),_0x58a6b0=_0x248a11?_0x248a11[_0x329c('0x3a')]:this['_source'][_0x329c('0x52')][_0x329c('0x93')];_0x5a6d72?(_0x5a6d72[_0x329c('0x2a')]<_0x58a6b0&&_0x5a6d72[_0x329c('0xd0')]({'toVersion':_0x58a6b0}),this[_0x329c('0x3d')]?(this[_0x329c('0x90')][_0x329c('0x95')]=()=>_0x17a16d['id'],this[_0x329c('0x55')]=_0x17a16d['fromVersion']):(this[_0x329c('0x55')]=_0x5a6d72[_0x329c('0x2a')],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x58a6b0,this[_0x329c('0x3d')]=!0x1);}}else _0x17a16d&&(this[_0x329c('0x53')][_0x329c('0x98')][_0x329c('0xe6')][_0x329c('0x52')][_0x329c('0x93')]=Math['max'](_0x17a16d['toVersion'],this[_0x329c('0x53')][_0x329c('0x98')][_0x329c('0xe6')]['history'][_0x329c('0x93')]),_0x17a16d[_0x329c('0x5f')]===_0x17a16d[_0x329c('0x2a')]?(0x0!==_0x17a16d[_0x329c('0x5f')]&&(this[_0x329c('0x90')][_0x329c('0x95')]=()=>_0x17a16d['id']),this[_0x329c('0x3d')]=!0x1):this[_0x329c('0x3d')]&&(this[_0x329c('0x90')][_0x329c('0x95')]=()=>_0x17a16d['id'],this['_startingVersion']=_0x17a16d[_0x329c('0x5f')])),this[_0x329c('0x3d')]||(this['_startingVersion']=this[_0x329c('0x53')]['model'][_0x329c('0xe6')][_0x329c('0x93')]);this['_revisionDataBuilder'][_0x329c('0x35')](this[_0x329c('0x90')][_0x329c('0x52')]),this[_0x329c('0xee')](this[_0x329c('0x55')]),this[_0x329c('0x44')](this[_0x329c('0x55')]),this[_0x329c('0xe4')]&&this['sendBufferedUpdates']();}),this[_0x329c('0xef')](_0x329c('0x3'))['to'](this,'_isPendingUpdate',_0x33142d=>!_0x33142d);}async['afterInit'](){if(this[_0x329c('0x59')][_0x329c('0x94')]>0x0){const _0x3af537=this[_0x329c('0x59')][_0x329c('0xe1')](0x0),_0x577ae1=await this['getRevisionDocumentData'](_0x3af537),_0x12b0ed=await this[_0x329c('0x43')](_0x3af537);this['_replaceEditorDataWithRevisionData'](_0x577ae1,_0x12b0ed);}}[_0x329c('0xfe')](_0x419fb1){this[_0x329c('0x90')]=_0x419fb1;}async[_0x329c('0x13')](){const _0x2afc37=await this[_0x329c('0x90')][_0x329c('0xda')]();if(_0x2afc37>this[_0x329c('0x109')][_0x329c('0x2a')]){await this[_0x329c('0x2f')]();const _0x3c80f8=this[_0x329c('0xc9')]({'revision':this[_0x329c('0x109')],'to':_0x2afc37});_0x3c80f8[_0x329c('0x3f')]=_0x3c80f8[_0x329c('0x4e')][_0x329c('0x25')](_0x3d6ea4=>this[_0x329c('0x53')]['plugins'][_0x329c('0xa')](_0x329c('0x5e'))['getUser'](_0x3d6ea4)),this['currentRevision']['_update'](_0x3c80f8);}}async[_0x329c('0x2f')](){this[_0x329c('0x3d')]&&!this[_0x329c('0x34')]&&(await this[_0x329c('0x4a')](this['currentRevision']),this[_0x329c('0x99')][_0x329c('0xe9')](this['currentRevision']),this[_0x329c('0x34')]={'fromVersion':this['currentRevision']['fromVersion'],'authors':this[_0x329c('0x109')][_0x329c('0x3f')][_0x329c('0xab')]()});}async[_0x329c('0x61')](_0x405ea9={},_0x93437b=null){const _0x20c804=[];await this[_0x329c('0x2f')](),this['_continueCurrentRevision']=!0x1,_0x93437b>this[_0x329c('0x109')][_0x329c('0x2a')]&&(_0x93437b=null),null===_0x93437b&&(_0x93437b=await this['_source'][_0x329c('0xda')]());const _0x2bb285=this[_0x329c('0x46')](_0x93437b),_0x45fb8c=this[_0x329c('0xc9')]({'from':_0x2bb285,'to':_0x93437b});if(this[_0x329c('0x109')][_0x329c('0x2a')]<_0x93437b){const _0x4bfa0b=this[_0x329c('0xc9')]({'revision':this[_0x329c('0x109')],'from':_0x93437b,'to':_0x93437b});_0x4bfa0b[_0x329c('0x3f')]=[],_0x4bfa0b[_0x329c('0x4e')]=[],_0x4bfa0b['id']=this[_0x329c('0x109')]['id'],this[_0x329c('0x109')][_0x329c('0xd0')](_0x4bfa0b,!0x0),delete _0x4bfa0b[_0x329c('0x3f')],_0x20c804['push'](_0x4bfa0b);}_0x405ea9[_0x329c('0x1a')]=this[_0x329c('0x53')]['plugins']['get'](_0x329c('0x5e'))['me']['id'],_0x405ea9[_0x329c('0xb6')]=_0x405ea9['name']||null,_0x405ea9['id']=_0x405ea9['id']||_0x18bbc3(),_0x405ea9={..._0x405ea9,..._0x45fb8c};const _0x5d10a2=this[_0x329c('0x38')](_0x405ea9);_0x20c804['push'](_0x405ea9);const _0x34f21c=this['repository']['getIndex'](_0x5d10a2);if(0x0!==_0x34f21c){const _0x1f57b7=this[_0x329c('0x59')][_0x329c('0xe1')](_0x34f21c-0x1);if(_0x1f57b7[_0x329c('0x5f')]!==_0x93437b){const _0x1716cb=this['_revisionDataBuilder']['getData'](_0x93437b,_0x1f57b7[_0x329c('0x2a')]),_0x4c64cf={'id':_0x1f57b7['id'],'diffData':_0x1716cb[_0x329c('0xe2')],'authorsIds':_0x1716cb[_0x329c('0x4e')],'authors':_0x1716cb[_0x329c('0x4e')]['map'](_0x50a123=>this['editor']['plugins'][_0x329c('0xa')](_0x329c('0x5e'))[_0x329c('0x2b')](_0x50a123)),'fromVersion':_0x93437b};_0x1f57b7===this[_0x329c('0x109')]&&(_0x4c64cf[_0x329c('0xf7')]=new Date(_0x405ea9[_0x329c('0xf7')][_0x329c('0xe7')]()+0xa)),_0x1f57b7['_update'](_0x4c64cf,!0x0),delete _0x4c64cf[_0x329c('0x3f')],_0x20c804[_0x329c('0x76')](_0x4c64cf);}}if(this['adapter']){for(const _0x35135b of _0x20c804)this[_0x329c('0xd9')](_0x35135b['id'],_0x35135b,!0x0);this[_0x329c('0x1e')]();}return _0x5d10a2;}[_0x329c('0x38')](_0x3d8b0f){const _0x500d80=this[_0x329c('0x59')][_0x329c('0x8e')](_0x3d8b0f);return this[_0x329c('0xe4')]&&_0x500d80['on'](_0x329c('0xd0'),(_0x5a860c,_0x4158ff,_0x49d931)=>{_0x49d931||(this['_bufferUpdate'](_0x4158ff['id'],_0x4158ff,!0x0),this[_0x329c('0x1e')]());}),this['repository']['addRevision'](_0x500d80,this[_0x329c('0xd5')](_0x500d80)),_0x500d80;}async['getRevisionDocumentData'](_0x43f4f2){await this[_0x329c('0x4a')](_0x43f4f2);const _0x1b189c={};for(const _0x253cf4 in _0x43f4f2[_0x329c('0xe2')]){if(_0x43f4f2[_0x329c('0xe2')][_0x253cf4][_0x329c('0x7c')]&&!_0x43f4f2[_0x329c('0xe2')][_0x253cf4][_0x329c('0x7c')][_0x329c('0xb5')])continue;const _0x54514e=this[_0x329c('0x10a')](JSON[_0x329c('0xb4')](_0x43f4f2['diffData'][_0x253cf4]['insertions'])),_0x17fa0a=this[_0x329c('0x53')][_0x329c('0xa9')]['view'][_0x329c('0xe6')],_0x3ec9ef=new _0x4fcb82(_0x17fa0a,_0x54514e[_0x329c('0x25')](_0x35131d=>F(_0x35131d,this['editor'])));this[_0x329c('0x53')][_0x329c('0x96')][_0x329c('0x41')][_0x329c('0x4b')](_0x329c('0x9d')),_0x1b189c[_0x253cf4]=this['editor'][_0x329c('0x96')]['processor'][_0x329c('0x69')](_0x3ec9ef),this[_0x329c('0x53')][_0x329c('0x96')][_0x329c('0x41')]['useFillerType'](_0x329c('0x22'));}return _0x1b189c;}async[_0x329c('0x43')](_0xbb6c9a){await this[_0x329c('0x4a')](_0xbb6c9a);const _0x2b05af={};for(const _0x9d0e18 in _0xbb6c9a[_0x329c('0xe2')])_0xbb6c9a[_0x329c('0xe2')][_0x9d0e18][_0x329c('0x7c')]&&!_0xbb6c9a[_0x329c('0xe2')][_0x9d0e18][_0x329c('0x7c')][_0x329c('0xb5')]||(_0x2b05af[_0x9d0e18]=_0xbb6c9a[_0x329c('0xe2')][_0x9d0e18]['attributesAfter']||{});return _0x2b05af;}[_0x329c('0x1e')](){if(0x0===this[_0x329c('0x7b')][_0x329c('0xaf')])return;if(this[_0x329c('0x67')])return;let _0x3b97a4=Array['from'](this[_0x329c('0x7b')][_0x329c('0x29')]());this[_0x329c('0x7b')][_0x329c('0xdb')]();for(let _0x14c03f=0x0;_0x14c03f<_0x3b97a4[_0x329c('0x94')];_0x14c03f++){const _0x4fd26a=_0x3b97a4[_0x14c03f];let _0x10141d=!0x1;for(const _0x97f878 of Object[_0x329c('0x6a')](_0x4fd26a))void 0x0===_0x4fd26a[_0x97f878]?delete _0x4fd26a[_0x97f878]:'id'!==_0x97f878&&(_0x10141d=!0x0);_0x10141d||(_0x3b97a4[_0x14c03f]=null);}if(_0x3b97a4=_0x3b97a4[_0x329c('0xd2')](_0x2f8a42=>null!==_0x2f8a42),!_0x3b97a4[_0x329c('0x94')])return;for(let _0x205f65=0x0;_0x205f65<_0x3b97a4['length'];_0x205f65++){const _0x184feb=_0x3b97a4[_0x205f65];void 0x0!==_0x184feb[_0x329c('0x5f')]&&void 0x0===_0x184feb[_0x329c('0x2a')]&&(_0x184feb[_0x329c('0x2a')]=this['repository'][_0x329c('0xe1')](_0x184feb['id'])[_0x329c('0x2a')]),void 0x0!==_0x184feb['toVersion']&&void 0x0===_0x184feb[_0x329c('0x5f')]&&(_0x184feb['fromVersion']=this[_0x329c('0x59')][_0x329c('0xe1')](_0x184feb['id'])[_0x329c('0x5f')]);}const _0x361a20=this[_0x329c('0x53')][_0x329c('0x62')]['get'](_0x329c('0xac'));this['_isPendingUpdate']=!0x0,this[_0x329c('0x49')](),this['adapter'][_0x329c('0x10c')](_0x3b97a4,_0x361a20)['finally'](()=>{this[_0x329c('0x67')]=!0x1;})['then'](_0x1fd03d=>{if(_0x1fd03d)for(const _0xa56b77 of _0x1fd03d)this['setRevisionData']({'id':_0xa56b77['id'],'createdAt':_0xa56b77[_0x329c('0xf7')]});this['_removePendingAction'](),this[_0x329c('0x1e')]();});}[_0x329c('0x64')](_0xe533e1,_0x55eab6){let _0x19f0b0=this['editor'][_0x329c('0x62')]['get'](_0x329c('0x5')),_0x480c6b=this[_0x329c('0x53')][_0x329c('0x62')][_0x329c('0xa')](_0x329c('0xbc'));if(void 0x0===_0x19f0b0){_0x19f0b0={};for(const _0x43c1d5 of this['editor']['model'][_0x329c('0xe6')][_0x329c('0xf5')]())_0x19f0b0[_0x43c1d5]='';}if(_0x329c('0xc7')==typeof _0x19f0b0&&(_0x19f0b0={'main':_0x19f0b0}),void 0x0===_0x480c6b){_0x480c6b={};for(const _0x38476b of this[_0x329c('0x53')][_0x329c('0x98')]['document'][_0x329c('0xf5')]())_0x480c6b[_0x38476b]={};}let _0xaf1438=!0x1;const _0x1d2190=Object[_0x329c('0x6a')](_0x19f0b0),_0x163534=Object[_0x329c('0x6a')](_0xe533e1);for(const _0x456dc3 of _0x1d2190){if(_0x19f0b0[_0x456dc3]!==_0xe533e1[_0x456dc3]&&''!==_0x19f0b0[_0x456dc3]['trim']()){_0xaf1438=!0x0;break;}if(!_0xb522f9(_0x480c6b[_0x456dc3],_0x55eab6[_0x456dc3])&&Object[_0x329c('0x6a')](_0x480c6b[_0x456dc3])[_0x329c('0x94')]>0x0){_0xaf1438=!0x0;break;}}_0xaf1438||(_0xaf1438=_0x163534[_0x329c('0x18')](_0xc7a3a7=>!_0x1d2190[_0x329c('0x8a')](_0xc7a3a7))),_0xaf1438&&_0x2aa93e(_0x329c('0xc'),{'editorData':_0x19f0b0,'editorRootsAttributes':_0x480c6b,'revisionData':_0xe533e1,'revisionRootsAttributes':_0x55eab6}),this[_0x329c('0x53')]['config'][_0x329c('0x5c')]('initialData',_0xe533e1),this[_0x329c('0x53')][_0x329c('0x62')][_0x329c('0x5c')](_0x329c('0xbc'),_0x55eab6);}[_0x329c('0x49')](){if(!this[_0x329c('0xa3')]){const _0x49a31f=this[_0x329c('0x53')][_0x329c('0x1d')][_0x329c('0xa')]('PendingActions');this[_0x329c('0xa3')]=_0x49a31f[_0x329c('0x26')](_0x573f70(this[_0x329c('0x53')]['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}[_0x329c('0x91')](){this[_0x329c('0xa3')]&&(this[_0x329c('0x53')][_0x329c('0x1d')][_0x329c('0xa')](_0x329c('0x65'))[_0x329c('0x80')](this['_pendingAction']),this[_0x329c('0xa3')]=null);}['_findInsertionIndex'](_0x1439c6){const _0x2b543f=this[_0x329c('0x59')][_0x329c('0xce')]();_0x2b543f[_0x329c('0xc8')]();let _0x4a92a9=0x0;for(;_0x4a92a9<_0x2b543f[_0x329c('0x94')];){const _0x483490=_0x2b543f[_0x4a92a9];if(_0x483490===this[_0x329c('0x109')]){_0x4a92a9++;continue;}if(_0x483490['id']===this[_0x329c('0x7')])break;const _0x24c06c=_0x1439c6[_0x329c('0x2a')]-_0x483490[_0x329c('0x2a')]||_0x1439c6[_0x329c('0x5f')]-_0x483490[_0x329c('0x5f')];if(_0x24c06c>0x0)break;if(_0x24c06c<0x0)_0x4a92a9++;else{if(!_0x1439c6[_0x329c('0x10')]&&_0x483490[_0x329c('0x10')])break;if(_0x483490['creator']||!_0x1439c6[_0x329c('0x10')]){if(_0x1439c6[_0x329c('0xf7')]>_0x483490['createdAt'])break;_0x4a92a9++;}else _0x4a92a9++;}}return _0x4a92a9;}[_0x329c('0x102')](_0x95549c){const _0x37569c=this[_0x329c('0x59')][_0x329c('0xe1')](_0x95549c['id']);if(_0x95549c[_0x329c('0xf7')]&&(_0x95549c['createdAt']=new Date(_0x95549c[_0x329c('0xf7')])),_0x95549c[_0x329c('0x4e')]){const _0xde62eb=this[_0x329c('0x53')][_0x329c('0x1d')][_0x329c('0xa')](_0x329c('0x5e'));_0x95549c[_0x329c('0x3f')]=_0x95549c['authorsIds']['map'](_0x284ddd=>_0xde62eb[_0x329c('0x2b')](_0x284ddd));}_0x37569c[_0x329c('0xd0')](_0x95549c,!0x0);}['buildRevisionData']({revision:_0x52cea3=null,from:_0x16374b=null,to:_0x119740=null}){_0x16374b=null!==_0x16374b?_0x16374b:_0x52cea3[_0x329c('0x5f')],_0x119740=null!==_0x119740?_0x119740:_0x52cea3[_0x329c('0x2a')];const _0x527cc8=this['_revisionDataBuilder'][_0x329c('0x51')](_0x16374b,_0x119740),_0x386025={'diffData':_0x527cc8[_0x329c('0xe2')],'authorsIds':_0x527cc8[_0x329c('0x4e')],'fromVersion':_0x16374b,'toVersion':_0x119740};if(!_0x52cea3||_0x119740!==_0x52cea3['toVersion']){const _0x1fa0d0=_0x119740-0x1,_0x22109f=this['_source'][_0x329c('0x52')][_0x329c('0x70')](_0x1fa0d0);_0x386025[_0x329c('0xf7')]=_0x22109f&&_0x22109f[_0x329c('0xf7')]||new Date();}if(this[_0x329c('0x34')]&&_0x16374b===this[_0x329c('0x34')][_0x329c('0x5f')])for(const _0x104ae8 of this[_0x329c('0x34')][_0x329c('0x3f')])_0x386025[_0x329c('0x4e')][_0x329c('0x8a')](_0x104ae8['id'])||_0x386025[_0x329c('0x4e')]['push'](_0x104ae8['id']);return _0x386025;}[_0x329c('0x4a')](_0x29ac98){if(!_0x29ac98||_0x29ac98[_0x329c('0xe2')])return Promise[_0x329c('0xe0')]();{const _0x5c7aa8=this[_0x329c('0x53')][_0x329c('0x62')]['get']('collaboration.channelId');return this['adapter'][_0x329c('0xe1')]({'channelId':_0x5c7aa8,'revisionId':_0x29ac98['id']})[_0x329c('0xec')](_0x3d0b56=>{_0x29ac98[_0x329c('0xe2')]=_0x3d0b56[_0x329c('0xe2')];});}}[_0x329c('0xd9')](_0x436da5,_0x17086d,_0x9e82a2){if(this[_0x329c('0x7b')][_0x329c('0x85')](_0x436da5)){const _0x10f227=this[_0x329c('0x7b')][_0x329c('0xa')](_0x436da5);_0x17086d=_0x9e82a2?{..._0x10f227,..._0x17086d}:{..._0x17086d,..._0x10f227};}this['_bufferedUpdates'][_0x329c('0x5c')](_0x436da5,_0x17086d);}[_0x329c('0x46')](_0x21eb57){const _0x4230be=this['repository'][_0x329c('0xce')]();_0x4230be[_0x329c('0xc8')](),_0x4230be['shift']();const _0xc36ba7=_0x4230be['find'](_0x1582a2=>_0x1582a2[_0x329c('0x2a')]<=_0x21eb57)['toVersion'];return _0xc36ba7<this[_0x329c('0x55')]?this['_startingVersion']:_0xc36ba7;}[_0x329c('0xee')](_0x1332dc){const _0x29fc0f=this[_0x329c('0x59')][_0x329c('0xe1')](this[_0x329c('0x59')][_0x329c('0x94')]-0x1);if(_0x29fc0f)this[_0x329c('0x7')]=_0x29fc0f['id'];else{const _0x5c2c84=!this[_0x329c('0x53')][_0x329c('0x98')][_0x329c('0xe6')][_0x329c('0x1b')][_0x329c('0x33')](_0x54960b=>this['editor'][_0x329c('0x98')][_0x329c('0x2d')](_0x54960b)),_0x249401=this['editor'][_0x329c('0x1d')][_0x329c('0xa')](_0x329c('0x5e'))['me']['id'],_0x8faaaa=_0x573f70(this[_0x329c('0x53')]['locale'],_0x5c2c84?'Empty\x20document':_0x329c('0x39'));this['_makeRevision']({'from':_0x1332dc,'to':_0x1332dc,'id':this[_0x329c('0x7')],'name':_0x8faaaa,'creatorId':_0x249401});}}[_0x329c('0x44')](_0x58fb13){const _0x23ca8d=this[_0x329c('0x90')][_0x329c('0x95')]();this['currentRevision']=this[_0x329c('0x59')][_0x329c('0xe1')](_0x23ca8d),this[_0x329c('0x109')]||(this[_0x329c('0x109')]=this['_makeRevision']({'from':_0x58fb13,'to':_0x58fb13,'id':_0x23ca8d,'name':'','creatorId':null}));}[_0x329c('0x14')]({name:_0xc06ecc,from:_0x49fa4d,to:_0x31649d,creatorId:_0x39bca8,id:_0x53b4e8}){const _0x29a5e5=this[_0x329c('0xc9')]({'from':_0x49fa4d,'to':_0x31649d});_0x29a5e5[_0x329c('0xb6')]=_0xc06ecc,_0x29a5e5[_0x329c('0x1a')]=_0x39bca8,_0x29a5e5['id']=_0x53b4e8;const _0x3bc945=this['addRevisionData'](_0x29a5e5);return this['adapter']&&this['_bufferUpdate'](_0x29a5e5['id'],_0x29a5e5,!0x0),_0x3bc945;}[_0x329c('0xbb')](){this[_0x329c('0x53')][_0x329c('0x6')][_0x329c('0xd6')](_0x329c('0xcd'))[_0x329c('0x9f')]({'model':'revision'});}[_0x329c('0x10a')](_0x5e3564){return(_0x5e3564=_0x5e3564[_0x329c('0xd2')](_0x33decf=>!_0x33decf[_0x329c('0xb6')]||_0x329c('0x1f')!==_0x33decf[_0x329c('0xb6')]&&_0x329c('0x28')!==_0x33decf[_0x329c('0xb6')]))[_0x329c('0x50')](_0xc29fb7=>{'string'!=typeof _0xc29fb7&&(_0xc29fb7[_0x329c('0x9a')]=this['_removeRevisionMarkers'](_0xc29fb7['children']),_0xc29fb7['attributes']=_0xc29fb7[_0x329c('0x42')]['filter'](_0x4000cc=>!_0x4000cc[0x0][_0x329c('0xc6')](_0x329c('0xf0'))));}),_0x5e3564;}}function F(_0x5e73ef,_0x21a8a0){const _0x3876a2=_0x21a8a0[_0x329c('0xa9')][_0x329c('0xd8')][_0x329c('0xe6')];if(_0x329c('0xc7')==typeof _0x5e73ef)return new _0x5b422c(_0x3876a2,_0x5e73ef);{const _0x37ed8e=_0x5e73ef[_0x329c('0x9a')]['map'](_0x2b5ae6=>F(_0x2b5ae6,_0x21a8a0));return new(j[_0x5e73ef['type']]||_0x37da6a)(_0x3876a2,_0x5e73ef['name'],_0x5e73ef[_0x329c('0x42')],_0x37ed8e);}}class T{constructor(_0x2ae105){this['editor']=_0x2ae105,this[_0x329c('0x66')]=new Map(),this[_0x329c('0xb3')]=-0x1,this['_lastTo']=-0x1,this[_0x329c('0xc0')]=new Map(),this[_0x329c('0xed')]=new Map(),this['_diffRootsAttributes']=new Map(),this[_0x329c('0xe5')]=new Map(),this['_baseRootsAttributes']=new Map(),this[_0x329c('0xfa')]=new Map(),this['_baseIdsRoots']=new Map(),this[_0x329c('0x0')]=new Map(),this['_touchedMarkers']=new Map(),this[_0x329c('0x8b')]=new Map(),this[_0x329c('0x36')]=0x1,this[_0x329c('0x30')]=this['editor'][_0x329c('0x98')][_0x329c('0xe6')][_0x329c('0xf5')](),this[_0x329c('0x30')][_0x329c('0x76')](_0x329c('0x87'));}[_0x329c('0x35')](_0x397bfb){this[_0x329c('0xfc')]=_0x397bfb;const _0x2bc98b=new Map(),_0xe4ccc4=new Map(),_0x239ef4=this[_0x329c('0x53')][_0x329c('0x98')][_0x329c('0xe6')]['getRootNames'](!0x0);_0x239ef4[_0x329c('0x76')]('$graveyard');for(const _0x5811cb of _0x239ef4){const _0x22c975=this[_0x329c('0x53')]['model']['document'][_0x329c('0xc1')](_0x5811cb),_0x109a42=B(_0x22c975);_0x2bc98b[_0x329c('0x5c')](_0x5811cb,_0x109a42),_0xe4ccc4['set'](_0x5811cb,Object[_0x329c('0x5a')](_0x22c975[_0x329c('0xae')]()));}const _0x34dea5=Array[_0x329c('0x9')](this[_0x329c('0x53')]['model']['markers'])[_0x329c('0x25')](_0x5a2ae7=>[_0x5a2ae7[_0x329c('0xb6')],_0x5a2ae7['getRange']()]),_0x187188=this[_0x329c('0xfc')][_0x329c('0x93')];this['_saveMetaData'](_0x187188,_0x2bc98b,_0x34dea5,_0xe4ccc4),this[_0x329c('0x17')]=this['_revisionId'];const _0x361439=new Map(),_0x12ec95=new Map();for(const _0x1a6b3b of this[_0x329c('0x30')]){const _0x132819=J(_0x1a6b3b);_0x361439[_0x329c('0x5c')](_0x1a6b3b,_0x132819),_0x12ec95['set'](_0x1a6b3b,{});}this['_saveMetaData'](Number[_0x329c('0x32')],_0x361439,[],_0x12ec95);}['getData'](_0x43ec89,_0x2d2a68){if(this[_0x329c('0xb3')]===_0x43ec89&&this[_0x329c('0x2')]<=_0x2d2a68)this['_savedMetaData']['size']>0x1&&this[_0x329c('0xaa')](this[_0x329c('0x2')]),this[_0x329c('0x101')](this[_0x329c('0x2')],_0x2d2a68,!0x0);else{if(!this[_0x329c('0x66')][_0x329c('0x85')](_0x43ec89)){const _0x136491=this['_getPreviousFrom'](_0x43ec89);this[_0x329c('0x45')](_0x136491,_0x43ec89,!0x1);}this['_calculateMetaData'](_0x43ec89,_0x2d2a68,!0x0);}return this['_lastFrom']=_0x43ec89,this[_0x329c('0x2')]=_0x2d2a68,this['_getState']();}['loadState'](_0x12ff0b){this[_0x329c('0x9c')](),this[_0x329c('0xb3')]=_0x12ff0b[_0x329c('0x5f')],this[_0x329c('0x2')]=_0x12ff0b[_0x329c('0x2a')];for(const _0x2f6f4c in _0x12ff0b['diffData']){const _0x3ab911=_0x12ff0b[_0x329c('0xe2')][_0x2f6f4c][_0x329c('0x7c')],_0x565b94=_0x45e264(_0x12ff0b[_0x329c('0xe2')][_0x2f6f4c][_0x329c('0x3b')])||{},_0x2b7401=this['_makeModelFromViewString'](_0x12ff0b[_0x329c('0xe2')][_0x2f6f4c][_0x329c('0x8d')]);_0x2b7401[_0x329c('0xf2')]=_0x2f6f4c,_0x2b7401[_0x329c('0xa5')]=!_0x3ab911||!_0x3ab911[_0x329c('0xb5')],_0x2b7401[_0x329c('0xb5')]=()=>_0x2b7401[_0x329c('0xa5')],this[_0x329c('0xe5')][_0x329c('0x5c')](_0x2f6f4c,_0x2b7401),this[_0x329c('0xff')][_0x329c('0x5c')](_0x2f6f4c,_0x565b94),_0x3ab911&&this['_touchedRoots'][_0x329c('0x5c')](_0x2f6f4c,_0x3ab911);const _0x739818=this[_0x329c('0x48')](_0x2b7401);this['_baseIdsRoots'][_0x329c('0x5c')](_0x2f6f4c,_0x739818);for(const [_0xcaacfb,_0x58c9b2]of _0x2b7401[_0x329c('0x97')]){if(!_0xcaacfb['startsWith'](_0x329c('0x3c')))continue;const _0x4b72c0=_0xcaacfb['split'](':')[0x2];for(const _0x1612ec of _0x58c9b2['getWalker']({'singleCharacters':!0x0})){const _0x357081=this[_0x329c('0x4f')](_0x1612ec),_0x22617b=_0x329c('0x100')==_0x1612ec['type']?_0x1612ec[_0x329c('0xd1')][_0x329c('0x16')][_0x329c('0xab')](0x0,-0x1):_0x1612ec[_0x329c('0xd1')][_0x329c('0x16')],_0x3cf471=_0x739818[_0x329c('0x15')](_0x22617b)['getAttribute'](_0x357081);this[_0x329c('0x0')][_0x329c('0x5c')](_0x3cf471,{'userId':_0x4b72c0});}}}this[_0x329c('0x17')]=this[_0x329c('0x36')];const _0x3f86fc=[...Array(this['_revisionId'])[_0x329c('0x6a')]()][_0x329c('0xab')](0x1)[_0x329c('0xd2')](_0xc22462=>!this[_0x329c('0x0')]['has'](_0xc22462));let _0x4e2af9=0x0;const _0x165b3f=new Map();for(const _0x5d6844 in _0x12ff0b[_0x329c('0xe2')]){const _0x5d76fa=_0x12ff0b[_0x329c('0xe2')][_0x5d6844][_0x329c('0x7c')],_0x5c157a=_0x45e264(_0x12ff0b['diffData'][_0x5d6844][_0x329c('0x8')])||{},_0x2171ee=this[_0x329c('0xbf')](_0x12ff0b[_0x329c('0xe2')][_0x5d6844]['insertions']);_0x2171ee[_0x329c('0xf2')]=_0x5d6844,_0x2171ee[_0x329c('0xa5')]=!_0x5d76fa||_0x5d76fa[_0x329c('0xb5')],_0x2171ee['isAttached']=()=>_0x2171ee[_0x329c('0xa5')],this[_0x329c('0xed')][_0x329c('0x5c')](_0x5d6844,_0x2171ee),this['_diffRootsAttributes'][_0x329c('0x5c')](_0x5d6844,_0x5c157a);const _0xe0955b=this[_0x329c('0x48')](_0x2171ee,Number[_0x329c('0x32')]);this[_0x329c('0xfa')][_0x329c('0x5c')](_0x5d6844,_0xe0955b),_0x165b3f[_0x329c('0x5c')](_0x5d6844,_0x2171ee[_0x329c('0xb5')]()?_0x5c157a:{});for(const [_0x51af4d,_0x64b5fe]of _0x2171ee[_0x329c('0x97')]){if(!_0x51af4d[_0x329c('0xc6')]('revision:'))continue;const _0x5a64b0=_0x51af4d['split'](':')[0x2];for(const _0x5ba466 of _0x64b5fe[_0x329c('0xe8')]({'singleCharacters':!0x0})){const _0x4f6269=this[_0x329c('0x4f')](_0x5ba466),_0x5c114d=this[_0x329c('0x36')]++,_0xb5ab47='elementEnd'==_0x5ba466['type']?_0x5ba466[_0x329c('0xd1')][_0x329c('0x16')]['slice'](0x0,-0x1):_0x5ba466[_0x329c('0xd1')][_0x329c('0x16')];_0xe0955b[_0x329c('0x15')](_0xb5ab47)[_0x329c('0x103')](_0x4f6269,_0x5c114d),this[_0x329c('0x0')]['set'](_0x5c114d,{'userId':_0x5a64b0});}}for(const _0x50fd27 of this[_0x329c('0x53')]['model'][_0x329c('0xa0')](_0x2171ee)[_0x329c('0xe8')]({'singleCharacters':!0x0})){const _0x687af5=this['_getVidAttributeName'](_0x50fd27),_0x216260=_0x329c('0x100')==_0x50fd27[_0x329c('0x79')]?_0x50fd27[_0x329c('0xd1')][_0x329c('0x16')]['slice'](0x0,-0x1):_0x50fd27['previousPosition'][_0x329c('0x16')],_0x2d5f87=_0xe0955b[_0x329c('0x15')](_0x216260);_0x2d5f87[_0x329c('0xdc')](_0x687af5)>0x0||_0x2d5f87['_setAttribute'](_0x687af5,_0x3f86fc[_0x4e2af9++]);}for(const [_0x51a815,_0x3c66c5]of _0x2171ee[_0x329c('0x97')])_0x51a815[_0x329c('0xc6')](_0x329c('0x3c'))||this[_0x329c('0xc0')][_0x329c('0x5c')](_0x51a815,_0x3c66c5);}const _0x20de89=J(_0x329c('0x87'));this[_0x329c('0xe5')]['set'](_0x329c('0x87'),_0x20de89),this[_0x329c('0xba')][_0x329c('0x5c')]('$graveyard',this[_0x329c('0x48')](_0x20de89,0x1));const _0xcaeff=J(_0x329c('0x87'));this[_0x329c('0xed')]['set'](_0x329c('0x87'),_0xcaeff),this[_0x329c('0xfa')][_0x329c('0x5c')](_0x329c('0x87'),this[_0x329c('0x48')](_0xcaeff,0x1));const _0x3cd5a7=Array['from'](this[_0x329c('0xed')])['map'](([_0xb49d02,_0x4813da])=>[_0xb49d02,B(_0x4813da)]);this[_0x329c('0xc3')](this[_0x329c('0x2')],_0x3cd5a7,this[_0x329c('0xc0')],_0x165b3f);}[_0x329c('0xbf')](_0x47e6cb){const _0x2d0aeb=JSON[_0x329c('0xb4')](_0x47e6cb),_0xd502a8=this[_0x329c('0x53')][_0x329c('0xa9')][_0x329c('0xd8')][_0x329c('0xe6')],_0x1768c0=new _0x4fcb82(_0xd502a8,_0x2d0aeb[_0x329c('0x25')](_0x1093a7=>F(_0x1093a7,this['editor'])));return this[_0x329c('0x53')][_0x329c('0x96')][_0x329c('0x4d')](_0x1768c0);}[_0x329c('0xc3')](_0x372a3b,_0x49e14b,_0x1ed2b2,_0x2cd0f8){const _0x163dea=new Map(_0x49e14b),_0x35a406=new Map(_0x45e264(_0x2cd0f8)),_0x3a56d3=new Map();for(const [_0x2a5f42,_0x220d7a]of _0x1ed2b2)_0x3a56d3['set'](_0x2a5f42,{'start':_0x220d7a['start'][_0x329c('0xad')](),'end':_0x220d7a[_0x329c('0xb7')][_0x329c('0xad')](),'rootName':_0x220d7a[_0x329c('0x19')][_0x329c('0xf2')]});this[_0x329c('0x66')][_0x329c('0x5c')](_0x372a3b,{'roots':_0x163dea,'markers':_0x3a56d3,'rootsAttributes':_0x35a406});}[_0x329c('0xaa')](_0x5c653f){this['_savedMetaData'][_0x329c('0x78')](_0x5c653f);}[_0x329c('0xf1')](){this[_0x329c('0x9c')](),this[_0x329c('0xb3')]=-0x1,this[_0x329c('0x2')]=-0x1,this[_0x329c('0x66')][_0x329c('0xdb')](),this[_0x329c('0x35')](this[_0x329c('0xfc')]);}['_reset'](){this['_touched']['clear'](),this[_0x329c('0x10b')]['clear'](),this[_0x329c('0x8b')][_0x329c('0xdb')](),this[_0x329c('0xed')]['clear'](),this['_diffRootsAttributes'][_0x329c('0xdb')](),this[_0x329c('0xe5')][_0x329c('0xdb')](),this[_0x329c('0xff')][_0x329c('0xdb')](),this[_0x329c('0xfa')]['clear'](),this[_0x329c('0xba')][_0x329c('0xdb')](),this[_0x329c('0xc0')][_0x329c('0xdb')](),this[_0x329c('0x36')]=0x1,this['_startingRevisionId']=this['_revisionId'];}[_0x329c('0x48')](_0x4ffcf3,_0x52001a=null){let _0x81feed=null;_0x4ffcf3['is'](_0x329c('0x7d'))||(_0x81feed=new _0x48a53c(_0x4ffcf3[_0x329c('0xb6')],{'vid_start':null===_0x52001a?this[_0x329c('0x36')]++:_0x52001a++}));const _0x7c18b=[];for(const _0x14a60f of _0x4ffcf3[_0x329c('0x68')]())if(_0x14a60f['is'](_0x329c('0x82'))){_0x7c18b['push'](this[_0x329c('0x48')](_0x14a60f,_0x52001a));const _0x39d11a=_0x7c18b[_0x7c18b[_0x329c('0x94')]-0x1];null!==_0x52001a&&(_0x52001a=_0x39d11a['is'](_0x329c('0x82'),_0x329c('0x12'))?_0x39d11a[_0x329c('0xdc')](_0x329c('0xfd'))+0x1:_0x39d11a[_0x329c('0xdc')](_0x329c('0x31'))+0x1);}else for(let _0x2d1b10=0x0;_0x2d1b10<_0x14a60f['offsetSize'];_0x2d1b10++)_0x7c18b[_0x329c('0x76')](new _0x48a53c(_0x329c('0x12'),{'vid':null===_0x52001a?this[_0x329c('0x36')]++:_0x52001a++}));if(_0x4ffcf3['is'](_0x329c('0x7d'))){const _0x21526b=J(_0x4ffcf3[_0x329c('0xf2')]);return _0x21526b[_0x329c('0x7e')](0x0,_0x7c18b),_0x21526b;}return _0x81feed[_0x329c('0x103')](_0x329c('0x31'),null===_0x52001a?this[_0x329c('0x36')]++:_0x52001a++),_0x81feed[_0x329c('0x7e')](0x0,_0x7c18b),_0x81feed;}[_0x329c('0x45')](_0x59215d,_0x696f99,_0xac37cb){this[_0x329c('0x9c')]();const {roots:_0x1b6c9a,markers:_0x390f4e,rootsAttributes:_0x154651}=this[_0x329c('0x66')][_0x329c('0xa')](_0x59215d);this[_0x329c('0xe5')]=new Map(_0x1b6c9a),this[_0x329c('0xff')]=new Map(_0x45e264(_0x154651));for(const [_0x1747b2,_0x4eb81a]of this[_0x329c('0xe5')])if(_0x329c('0x87')!==_0x1747b2&&(this[_0x329c('0xed')]['set'](_0x1747b2,B(_0x4eb81a)),this[_0x329c('0xb2')]=new Map(_0x45e264(_0x154651)),_0xac37cb)){const _0x4b11c9=this[_0x329c('0x36')];this[_0x329c('0xfa')][_0x329c('0x5c')](_0x1747b2,this[_0x329c('0x48')](_0x4eb81a)),this['_baseIdsRoots'][_0x329c('0x5c')](_0x1747b2,this[_0x329c('0x48')](_0x4eb81a,_0x4b11c9));}this[_0x329c('0x17')]=this['_revisionId'],this['_diffRoots'][_0x329c('0x5c')](_0x329c('0x87'),B(this[_0x329c('0xe5')][_0x329c('0xa')]('$graveyard'))),_0xac37cb&&this[_0x329c('0xfa')]['set'](_0x329c('0x87'),this['_makeIdsRoot'](this[_0x329c('0xe5')][_0x329c('0xa')]('$graveyard')));for(const [_0x3bd48e,_0x5ebcf3]of _0x390f4e){const _0x23e178=this['_baseRoots'][_0x329c('0xa')](_0x5ebcf3[_0x329c('0xf2')]),_0x16abc7=this[_0x329c('0xed')]['get'](_0x5ebcf3['rootName']),_0x2172a4=new _0x60a973(this[_0x329c('0xb1')](_0x5ebcf3[_0x329c('0xa4')],_0x23e178),this[_0x329c('0xb1')](_0x5ebcf3[_0x329c('0xb7')],_0x23e178)),_0x2c56f5=this['_fixRange'](_0x2172a4,_0x16abc7);_0x23e178[_0x329c('0x97')][_0x329c('0x5c')](_0x3bd48e,_0x2172a4),this[_0x329c('0xc0')][_0x329c('0x5c')](_0x3bd48e,_0x2c56f5);}this['_applyOperations'](_0x59215d,_0x696f99,_0xac37cb);}[_0x329c('0x101')](_0x2613a9,_0x4d974b,_0x484b9f){for(const _0x46b2fc of this['source'][_0x329c('0x58')](_0x2613a9,_0x4d974b))this['_handleOperation'](_0x46b2fc,_0x484b9f);for(const _0x3632b8 of this[_0x329c('0xed')][_0x329c('0x29')]())_0x3632b8[_0x329c('0x97')][_0x329c('0xdb')]();for(const [_0x494b92,_0x433663]of this[_0x329c('0xc0')]){this[_0x329c('0xed')][_0x329c('0xa')](_0x433663[_0x329c('0x19')][_0x329c('0xf2')])['markers'][_0x329c('0x5c')](_0x494b92,_0x433663['clone']());}const _0x138846=new Map(),_0x3a0df8=new Map();for(const [_0x2869e3,_0x4a944c]of this['_diffRoots'])_0x138846[_0x329c('0x5c')](_0x2869e3,B(_0x4a944c)),_0x3a0df8[_0x329c('0x5c')](_0x2869e3,this[_0x329c('0xb2')]['get'](_0x2869e3));this[_0x329c('0xc3')](_0x4d974b,_0x138846,this[_0x329c('0xc0')],_0x3a0df8);}[_0x329c('0x9b')](_0x1b0a79){const _0x1f73a6=Array[_0x329c('0x9')](this[_0x329c('0x66')][_0x329c('0x6a')]());_0x1f73a6[_0x329c('0xea')]((_0x7dc89,_0x52ba8e)=>_0x7dc89-_0x52ba8e),_0x1f73a6[_0x329c('0xc8')]();for(const _0x11325f of _0x1f73a6)if(_0x11325f<_0x1b0a79)return _0x11325f;return Number[_0x329c('0x32')];}['_copyMarkers'](_0x77a810,_0x53feb2){const _0x104d44=Array[_0x329c('0x9')](_0x53feb2['markers'])[_0x329c('0x25')](([_0x57bc78,_0x39cc4a])=>[_0x57bc78,this[_0x329c('0xbd')](_0x39cc4a,_0x77a810)]);_0x77a810[_0x329c('0x97')]=new Map(_0x104d44);}[_0x329c('0x72')](_0x5eb941){for(const _0x1f321e of this[_0x329c('0xc0')][_0x329c('0x29')]()){const _0x1ac057=_0x1f321e[_0x329c('0x92')](_0x5eb941),_0x4283ec=_0x60a973[_0x329c('0x73')](_0x1ac057);_0x1f321e[_0x329c('0xa4')]=_0x4283ec[_0x329c('0xa4')],_0x1f321e['end']=_0x4283ec[_0x329c('0xb7')];}}[_0x329c('0x63')](_0x579fe0,_0x3b5b01){if(_0x329c('0x6d')==_0x579fe0[_0x329c('0x79')]||_0x329c('0xf6')==_0x579fe0[_0x329c('0x79')])return void this[_0x329c('0x88')](_0x579fe0,_0x3b5b01);if(_0x329c('0xa8')==_0x579fe0[_0x329c('0x79')]){const _0x1692da=_0x579fe0[_0x329c('0x23')]['root'][_0x329c('0xf2')];this[_0x329c('0xed')]['has'](_0x1692da)||(this[_0x329c('0xed')]['set'](_0x1692da,J(_0x1692da,!0x0)),this[_0x329c('0xb2')][_0x329c('0x5c')](_0x1692da,{}),_0x3b5b01&&this['_idsRoots']['set'](_0x1692da,J(_0x1692da,!0x0)));}if(_0x329c('0xd4')==_0x579fe0[_0x329c('0x79')]||_0x329c('0x11')==_0x579fe0['type']||_0x329c('0x6e')==_0x579fe0[_0x329c('0x79')])return void this[_0x329c('0xcf')](_0x579fe0);const _0x8950cf=this[_0x329c('0xeb')](_0x579fe0,this['_diffRoots']);if(_0x329c('0xc2')!==_0x579fe0[_0x329c('0x79')]&&(_0x8950cf[_0x329c('0xf4')](),this[_0x329c('0x72')](_0x8950cf)),_0x3b5b01)switch(_0x8950cf[_0x329c('0x79')]){case'insert':this[_0x329c('0xdf')](_0x579fe0);break;case'move':case _0x329c('0x80'):case _0x329c('0x84'):this['_handleMoveOperation'](_0x579fe0);break;case _0x329c('0xb8'):this[_0x329c('0xf')](_0x579fe0);break;case _0x329c('0x75'):this['_handleSplitOperation'](_0x579fe0);break;case _0x329c('0xc2'):this[_0x329c('0x20')](_0x579fe0);}}[_0x329c('0xeb')](_0x397729,_0xc50bf1){const _0x210eda=_0x397729[_0x329c('0xad')]();return _0x210eda['_authorId']=_0x397729[_0x329c('0xd')],this['_fixOperation'](_0x210eda,_0xc50bf1),_0x210eda;}[_0x329c('0x106')](_0x492a6b){return _0x492a6b['map'](_0xfd310c=>{const _0xb187bb=this[_0x329c('0x4f')](_0xfd310c);return Number(_0xfd310c['item'][_0x329c('0xdc')](_0xb187bb));});}['_generateTape'](_0x1afd7a,_0x4c97f2){if(_0x1afd7a['is'](_0x329c('0x82'),_0x329c('0x12')))_0x4c97f2[_0x329c('0x76')]({'item':_0x1afd7a,'type':'text'});else{_0x1afd7a['is']('element')&&_0x4c97f2['push']({'item':_0x1afd7a,'type':_0x329c('0x108')});for(const _0xe51a03 of _0x1afd7a[_0x329c('0x68')]())this['_generateTape'](_0xe51a03,_0x4c97f2);_0x1afd7a['is'](_0x329c('0x82'))&&_0x4c97f2['push']({'item':_0x1afd7a,'type':_0x329c('0x100')});}return _0x4c97f2;}[_0x329c('0xfb')](){const _0x5c7795=new Map(this['_touched']),_0x2b4f40=new Map(_0x5c7795),_0x46e516=new Map(),_0x34ec91={'insertions':{},'deletions':{}},_0x49214e={'insertions':{},'deletions':{}},_0xc54a7c=new Map(),_0x1d7137=new Set([...this['_baseRoots'][_0x329c('0x6a')](),...this[_0x329c('0xed')][_0x329c('0x6a')]()]);_0x1d7137[_0x329c('0x78')](_0x329c('0x87'));for(const _0x1a655e of _0x1d7137){const _0x2b1100=this['_diffRoots']['get'](_0x1a655e)||J(_0x1a655e,!0x1),_0x34cac6=this[_0x329c('0xe5')][_0x329c('0xa')](_0x1a655e)||J(_0x1a655e,!0x1);_0x2b1100[_0x329c('0xb5')]()||_0x34cac6[_0x329c('0xb5')]()?(_0x34ec91[_0x329c('0x7a')][_0x1a655e]=B(_0x2b1100),_0x34ec91[_0x329c('0x8d')][_0x1a655e]=B(_0x34cac6),this[_0x329c('0x105')](_0x34ec91[_0x329c('0x8d')][_0x1a655e],_0x34cac6),this[_0x329c('0x105')](_0x34ec91[_0x329c('0x7a')][_0x1a655e],_0x2b1100),_0x49214e[_0x329c('0x7a')][_0x1a655e]=this['_generateTape'](this[_0x329c('0xfa')][_0x329c('0xa')](_0x1a655e),[]),_0x49214e['deletions'][_0x1a655e]=this[_0x329c('0x9e')](this[_0x329c('0xba')][_0x329c('0xa')](_0x1a655e)||J(_0x1a655e,!0x1),[])):_0x1d7137['delete'](_0x1a655e);}for(const _0x30cb6e of _0x1d7137){const _0x524c31=_0x49214e[_0x329c('0x7a')][_0x30cb6e];for(const _0x57e01a of _0x524c31){const _0x379ae1=this[_0x329c('0x4f')](_0x57e01a),_0x68b47e=_0x57e01a[_0x329c('0xc4')][_0x329c('0xdc')](_0x379ae1);_0x2b4f40[_0x329c('0x78')](_0x68b47e),_0x68b47e>=this[_0x329c('0x17')]&&_0x46e516[_0x329c('0x5c')](_0x68b47e,_0x5c7795[_0x329c('0xa')](_0x68b47e));}}for(const _0x11fede of _0x1d7137){const _0xbf741f=_0x49214e['insertions'][_0x11fede],_0x33542e=this[_0x329c('0x106')](_0x49214e[_0x329c('0x8d')][_0x11fede]);let _0x31b4b4=0x0;for(const _0x459c45 of _0xbf741f){const _0x126c76=this[_0x329c('0x4f')](_0x459c45),_0x23654e=_0x459c45['item'][_0x329c('0xdc')](_0x126c76);if(!_0x46e516[_0x329c('0x85')](_0x23654e)&&!_0xc54a7c[_0x329c('0x85')](_0x23654e)){if(_0x2b4f40[_0x329c('0x85')](_0x23654e))_0x31b4b4++;else{if(_0x23654e!=_0x33542e[_0x31b4b4]){const _0x489123=_0x5c7795[_0x329c('0xa')](_0x23654e)||_0x5c7795[_0x329c('0xa')](_0x33542e[_0x31b4b4]);for(;_0x23654e!=_0x33542e[_0x31b4b4];)_0x2b4f40[_0x329c('0x85')](_0x33542e[_0x31b4b4])||(_0xc54a7c['set'](_0x33542e[_0x31b4b4],_0x489123),_0x5c7795[_0x329c('0x5c')](_0x33542e[_0x31b4b4],_0x489123)),_0x31b4b4++;}_0x31b4b4++;}}}}for(const _0x57a745 of _0x1d7137){const _0x49657d=_0x49214e['insertions'][_0x57a745];for(const _0x360665 of _0x49657d){const _0x524ffe=this[_0x329c('0x4f')](_0x360665),_0x3bffb0=_0x360665[_0x329c('0xc4')]['getAttribute'](_0x524ffe);if(_0xc54a7c[_0x329c('0x85')](_0x3bffb0)){const _0x37409c=_0xc54a7c[_0x329c('0xa')](_0x3bffb0);_0x2b4f40[_0x329c('0x85')](_0x3bffb0)||_0x2b4f40[_0x329c('0x5c')](_0x3bffb0,{..._0x37409c}),_0x46e516['set'](_0x3bffb0,{..._0x37409c});}}}for(const _0x766dd7 of _0x2b4f40[_0x329c('0x6a')]())_0x766dd7>=this[_0x329c('0x17')]&&_0x2b4f40[_0x329c('0x78')](_0x766dd7);const _0x3c336d=new Map();for(const _0x2b17a0 of _0x1d7137){let _0x58780c=_0x49214e[_0x329c('0x7a')][_0x2b17a0];for(const _0x5e1aae of _0x58780c)if(_0x5e1aae['item']['is']('element','tableCell')){const _0x5e1ac8=this[_0x329c('0x4f')](_0x5e1aae),_0x20f4b8=_0x5e1aae[_0x329c('0xc4')][_0x329c('0xdc')](_0x5e1ac8);if(_0x46e516[_0x329c('0x85')](_0x20f4b8)){const _0x39dbb1=_0x5e1aae[_0x329c('0xc4')][_0x329c('0x4')][_0x329c('0x4')][_0x329c('0xdc')](_0x329c('0x5b')),_0x3e043f=_0x3c336d['get'](_0x39dbb1)||new Set();_0x3e043f[_0x329c('0x26')](_0x46e516[_0x329c('0xa')](_0x20f4b8)[_0x329c('0xd3')]),_0x3c336d['set'](_0x39dbb1,_0x3e043f);}}_0x58780c=_0x49214e[_0x329c('0x8d')][_0x2b17a0];for(const _0x3b0a90 of _0x58780c)if(_0x3b0a90['item']['is'](_0x329c('0x82'),'tableCell')){const _0x4509cc=this[_0x329c('0x4f')](_0x3b0a90),_0x35ef4c=_0x3b0a90[_0x329c('0xc4')]['getAttribute'](_0x4509cc);if(_0x2b4f40[_0x329c('0x85')](_0x35ef4c)){const _0x459641=_0x3b0a90[_0x329c('0xc4')][_0x329c('0x4')]['parent'][_0x329c('0xdc')]('vid_start'),_0x322b30=_0x3c336d[_0x329c('0xa')](_0x459641)||new Set();_0x322b30[_0x329c('0x26')](_0x2b4f40[_0x329c('0xa')](_0x35ef4c)[_0x329c('0xd3')]),_0x3c336d[_0x329c('0x5c')](_0x459641,_0x322b30);}}for(const _0x59e331 of _0x3c336d[_0x329c('0x6a')]())(_0x46e516['has'](_0x59e331)||_0x2b4f40[_0x329c('0x85')](_0x59e331))&&_0x3c336d[_0x329c('0x78')](_0x59e331);}for(const _0x270568 of _0x1d7137){const _0x18068d=_0x49214e[_0x329c('0x7a')][_0x270568];let _0x2e89ca=null,_0x143fb7=null;for(const _0x1824e0 of _0x18068d){const _0x110fad=this['_getVidAttributeName'](_0x1824e0),_0x5f214f=_0x1824e0[_0x329c('0xc4')][_0x329c('0xdc')](_0x110fad),_0xc89377=_0x3c336d['get'](_0x5f214f);_0xc89377&&_0x329c('0x108')==_0x1824e0['type']&&(_0x2e89ca=Array['from'](_0xc89377)[0x0],_0x143fb7=_0x1824e0[_0x329c('0xc4')]['getAttribute'](_0x329c('0x31'))),_0x2e89ca&&(_0x2b4f40[_0x329c('0x5c')](_0x5f214f,{'userId':_0x2e89ca}),_0x46e516[_0x329c('0x5c')](_0x5f214f,{'userId':_0x2e89ca})),_0x5f214f==_0x143fb7&&(_0x2e89ca=null,_0x143fb7=null);}}const _0x19b44b={},_0x50e224=new Set();for(const _0x4549a7 of _0x1d7137){const _0x270af1=_0x34ec91['deletions'][_0x4549a7],_0x9f0048=_0x34ec91[_0x329c('0x7a')][_0x4549a7];for(const {userId:_0x3cb5f6}of this[_0x329c('0x10b')]['values']())null!==_0x3cb5f6&&_0x50e224[_0x329c('0x26')](_0x3cb5f6);for(const {userId:_0x5b9d22}of this[_0x329c('0x8b')][_0x329c('0x29')]())null!==_0x5b9d22&&_0x50e224[_0x329c('0x26')](_0x5b9d22);this[_0x329c('0x1c')](_0x9f0048,_0x49214e[_0x329c('0x7a')][_0x4549a7],_0x46e516,_0x329c('0xa6'),_0x50e224),this[_0x329c('0x1c')](_0x270af1,_0x49214e[_0x329c('0x8d')][_0x4549a7],_0x2b4f40,_0x329c('0x3e'),_0x50e224),_0x19b44b[_0x4549a7]={'insertions':this['_prepareViewToSave'](_0x9f0048),'deletions':this[_0x329c('0x77')](_0x270af1),'attachChange':this['_touchedRoots'][_0x329c('0xa')](_0x4549a7)||null,'attributesBefore':_0x45e264(this[_0x329c('0xff')][_0x329c('0xa')](_0x4549a7))||{},'attributesAfter':_0x45e264(this['_diffRootsAttributes'][_0x329c('0xa')](_0x4549a7))};}return{'diffData':_0x19b44b,'authorsIds':Array['from'](_0x50e224)};}[_0x329c('0xcc')](_0x1617f6){for(const [,_0x5ad3f9]of _0x1617f6[_0x329c('0x97')]){const _0xec1f68=_0x5ad3f9[_0x329c('0xa4')][_0x329c('0xd7')]()[_0x329c('0xd2')](_0x4d8436=>_0x329c('0x6f')==_0x4d8436[_0x329c('0xb6')]);for(const _0x314f99 of _0xec1f68)0x1==_0x314f99[_0x329c('0xf9')]&&_0x314f99[_0x329c('0xf3')](0x0)['is']('element',_0x329c('0x6b'))&&_0x314f99[_0x329c('0xf3')](0x0)['_setAttribute'](_0x329c('0xde'),!0x0);}}[_0x329c('0x77')](_0x232066){this[_0x329c('0xcc')](_0x232066);const _0x4bc55c=this[_0x329c('0x53')][_0x329c('0x96')][_0x329c('0x83')](_0x232066,{}),_0x2b24d9=Array['from'](_0x4bc55c[_0x329c('0x68')]())['map'](_0x5a1e6b=>this[_0x329c('0x8c')](_0x5a1e6b));return JSON['stringify'](_0x2b24d9);}['_getViewJson'](_0x4a9948){if(_0x4a9948['is'](_0x329c('0x12')))return _0x4a9948[_0x329c('0x96')];{const _0x3de209=_0x4a9948;return{'type':Object[_0x329c('0x6a')](j)[_0x329c('0x33')](_0x40fc8b=>_0x4a9948 instanceof j[_0x40fc8b]),'name':_0x3de209[_0x329c('0xb6')],'attributes':Array[_0x329c('0x9')](_0x3de209['getAttributes']()),'children':Array['from'](_0x3de209[_0x329c('0x68')]())[_0x329c('0x25')](_0x28d6a0=>this[_0x329c('0x8c')](_0x28d6a0))};}}['_markChanges'](_0x2f1795,_0x15d7cf,_0x1fe3ee,_0x81f58f,_0x1fc717){let _0x358a6e=null,_0x1cb087=null,_0x2373dc=0x0;const _0x533bcd=this[_0x329c('0x53')][_0x329c('0x98')];for(let _0x4a7982=0x0;_0x4a7982<_0x15d7cf[_0x329c('0x94')];_0x4a7982++){const _0x28ac9a=this['_getVidAttributeName'](_0x15d7cf[_0x4a7982]),_0x5c0832=_0x15d7cf[_0x4a7982][_0x329c('0xc4')][_0x329c('0xdc')](_0x28ac9a),_0x204909=_0x1fe3ee[_0x329c('0xa')](_0x5c0832),_0x314c25=_0x4a7982==_0x15d7cf['length']-0x1;(!_0x358a6e&&_0x204909&&(_0x358a6e=_0x204909,_0x1cb087=_0x15d7cf[_0x4a7982]),_0x358a6e&&(!_0x204909||_0x204909[_0x329c('0xd3')]!=_0x358a6e[_0x329c('0xd3')]))&&(_0x190d01(_0x204909,H(_0x1cb087,_0x2f1795,_0x533bcd),H(_0x15d7cf[_0x4a7982],_0x2f1795,_0x533bcd)),_0x358a6e=_0x204909||null,_0x1cb087=_0x204909?_0x15d7cf[_0x4a7982]:null),_0x358a6e&&_0x314c25&&_0x190d01(_0x204909,H(_0x1cb087,_0x2f1795,_0x533bcd),q(_0x15d7cf[_0x4a7982],_0x2f1795,_0x533bcd));}function _0x190d01(_0xdd183f,_0x395a8b,_0x10b1ef){const _0xdd04ed=_0x358a6e[_0x329c('0xd3')],_0x3b9a67=_0x329c('0x3c')+_0x81f58f+':'+_0xdd04ed+':'+_0x2373dc++,_0x40db84=_0x533bcd[_0x329c('0x74')](_0x395a8b,_0x10b1ef);_0x2f1795[_0x329c('0x97')][_0x329c('0x5c')](_0x3b9a67,_0x40db84),null!==_0xdd04ed&&_0x1fc717['add'](_0xdd04ed);}}['_getVidAttributeName'](_0x1affb8){switch(_0x1affb8[_0x329c('0x79')]){case _0x329c('0x108'):return _0x329c('0x5b');case _0x329c('0x100'):return _0x329c('0x31');default:return _0x329c('0xfd');}}[_0x329c('0x107')](_0x287266,_0x4662c3){_0x287266[_0x329c('0x3a')]=null;for(const _0xe36f7f in _0x287266){const _0x49ad31=_0x287266[_0xe36f7f];if(_0x49ad31 instanceof _0x12f2d2){const _0x53be32=_0x4662c3[_0x329c('0xa')](_0x49ad31[_0x329c('0x19')]['rootName']);_0x287266[_0xe36f7f]=this[_0x329c('0xb1')](_0x49ad31,_0x53be32);}if(_0x49ad31 instanceof _0x60a973){const _0x500880=_0x4662c3[_0x329c('0xa')](_0x49ad31[_0x329c('0x19')]['rootName']);_0x287266[_0xe36f7f]=this[_0x329c('0xbd')](_0x49ad31,_0x500880);}'root'===_0xe36f7f&&(_0x287266[_0x329c('0x19')]=_0x4662c3['get'](_0x287266[_0x329c('0x19')]['rootName']));}}[_0x329c('0xbd')](_0x42f21b,_0xdd3f57){return this[_0x329c('0x53')]['model'][_0x329c('0x74')](this[_0x329c('0xb1')](_0x42f21b[_0x329c('0xa4')],_0xdd3f57),this[_0x329c('0xb1')](_0x42f21b[_0x329c('0xb7')],_0xdd3f57));}[_0x329c('0xb1')](_0x22bb68,_0x30243c){return this[_0x329c('0x53')][_0x329c('0x98')][_0x329c('0xb9')](_0x30243c,_0x22bb68[_0x329c('0x16')],_0x22bb68[_0x329c('0xc5')]);}[_0x329c('0xdf')](_0x28abcf){const _0x5d4392=this[_0x329c('0xfa')][_0x329c('0xa')](_0x28abcf[_0x329c('0x23')][_0x329c('0x19')][_0x329c('0xf2')]),_0x44b30a=this[_0x329c('0xb1')](_0x28abcf['position'],_0x5d4392),_0xc57edb=null===_0x28abcf[_0x329c('0xd')]?null:_0x28abcf['_authorId']||this[_0x329c('0x53')]['plugins']['get']('Users')['me']['id'],_0x51110b=_0x44b30a[_0x329c('0x4')],_0x3aac5a=this[_0x329c('0x36')],_0x152f6a=[];for(const _0x38dbd7 of _0x28abcf[_0x329c('0x40')])if(_0x38dbd7['is'](_0x329c('0x82')))_0x152f6a[_0x329c('0x76')](this['_makeIdsRoot'](_0x38dbd7));else for(let _0x30b01a=0x0;_0x30b01a<_0x38dbd7[_0x329c('0x4c')];_0x30b01a++)_0x152f6a['push'](new _0x48a53c(_0x329c('0x12'),{'vid':this[_0x329c('0x36')]++}));const _0x36df05=this[_0x329c('0x36')];for(let _0x2b2de3=_0x3aac5a;_0x2b2de3<_0x36df05;_0x2b2de3++)this[_0x329c('0x0')][_0x329c('0x5c')](_0x2b2de3,{'userId':_0xc57edb});_0x51110b[_0x329c('0x7e')](_0x44b30a[_0x329c('0x57')],_0x152f6a);}[_0x329c('0x37')](_0x4ac22a){(_0x4ac22a=this[_0x329c('0xeb')](_0x4ac22a,this['_idsRoots']))[_0x329c('0xf4')]();const _0x32b62c=null===_0x4ac22a[_0x329c('0xd')]?null:_0x4ac22a['_authorId']||this['editor']['plugins'][_0x329c('0xa')](_0x329c('0x5e'))['me']['id'],_0x4d4199=_0x4ac22a['getMovedRangeStart'](),_0x42c36a=_0x4d4199[_0x329c('0x4')],_0x20f1ec=_0x4d4199[_0x329c('0x57')];!function _0x2c68c6(_0x52e81f,_0x3d0a13,_0x2e63d1,_0x2c7cbe){for(let _0xa75097=_0x2e63d1;_0xa75097<_0x2c7cbe;_0xa75097++){const _0x1bddd4=_0x3d0a13[_0x329c('0xf3')](_0xa75097);_0x1bddd4['is'](_0x329c('0x82'),'$text')?_0x52e81f[_0x329c('0x5c')](_0x1bddd4[_0x329c('0xdc')](_0x329c('0xfd')),{'userId':_0x32b62c}):(_0x52e81f[_0x329c('0x5c')](_0x1bddd4[_0x329c('0xdc')](_0x329c('0x5b')),{'userId':_0x32b62c}),_0x2c68c6(_0x52e81f,_0x1bddd4,0x0,_0x1bddd4[_0x329c('0xf9')]),_0x52e81f[_0x329c('0x5c')](_0x1bddd4[_0x329c('0xdc')](_0x329c('0x31')),{'userId':_0x32b62c}));}}(this[_0x329c('0x0')],_0x42c36a,_0x20f1ec,_0x20f1ec+_0x4ac22a[_0x329c('0xcb')]);}['_handleMergeOperation'](_0x40dedf){const _0x5c911b=null===(_0x40dedf=this[_0x329c('0xeb')](_0x40dedf,this[_0x329c('0xfa')]))[_0x329c('0xd')]?null:_0x40dedf['_authorId']||this['editor'][_0x329c('0x1d')]['get'](_0x329c('0x5e'))['me']['id'],_0x110c4b=_0x40dedf[_0x329c('0xa2')][_0x329c('0x4')],_0x549426=_0x40dedf['sourcePosition']['parent'],_0xa6c09e=_0x110c4b[_0x329c('0xdc')](_0x329c('0x31')),_0x2bd2ff=_0x549426[_0x329c('0xdc')](_0x329c('0x5b'));_0x110c4b[_0x329c('0x103')](_0x329c('0x31'),_0x549426[_0x329c('0xdc')](_0x329c('0x31'))),_0x549426[_0x329c('0x103')](_0x329c('0x31'),_0xa6c09e),this[_0x329c('0x0')][_0x329c('0x5c')](_0x2bd2ff,{'userId':_0x5c911b}),this[_0x329c('0x0')]['set'](_0xa6c09e,{'userId':_0x5c911b}),_0x40dedf[_0x329c('0xf4')]();}[_0x329c('0x104')](_0x38ab63){const _0x1d9919=null===(_0x38ab63=this['_cloneOperation'](_0x38ab63,this[_0x329c('0xfa')]))[_0x329c('0xd')]?null:_0x38ab63[_0x329c('0xd')]||this[_0x329c('0x53')][_0x329c('0x1d')]['get']('Users')['me']['id'],_0x4edf1c=_0x38ab63[_0x329c('0x5d')],_0x22fe9f=_0x38ab63[_0x329c('0x27')][_0x329c('0x4')];_0x38ab63[_0x329c('0xf4')]();const _0x237a77=_0x22fe9f[_0x329c('0xdc')](_0x329c('0x31')),_0x4fd179=_0x38ab63[_0x329c('0xb')][_0x329c('0x7f')];if(_0x4edf1c){const _0x35d30b=_0x4fd179[_0x329c('0xdc')]('vid_end'),_0x4cabb1=_0x22fe9f[_0x329c('0xdc')]('vid_end');_0x22fe9f[_0x329c('0x103')](_0x329c('0x31'),_0x35d30b),_0x4fd179[_0x329c('0x103')](_0x329c('0x31'),_0x4cabb1),this[_0x329c('0x0')][_0x329c('0x5c')](_0x22fe9f[_0x329c('0xdc')](_0x329c('0x31')),{'userId':_0x1d9919}),this[_0x329c('0x0')][_0x329c('0x5c')](_0x4fd179['getAttribute'](_0x329c('0x5b')),{'userId':_0x1d9919});}else{const _0x53ef8b=this[_0x329c('0x36')]++,_0x317157=this['_revisionId']++;_0x22fe9f[_0x329c('0x103')](_0x329c('0x31'),_0x53ef8b),_0x4fd179[_0x329c('0x103')](_0x329c('0x5b'),_0x317157),_0x4fd179[_0x329c('0x103')](_0x329c('0x31'),_0x237a77),this['_touched']['set'](_0x53ef8b,{'userId':_0x1d9919}),this[_0x329c('0x0')]['set'](_0x317157,{'userId':_0x1d9919});}}[_0x329c('0x20')](_0x1cb15e){if(!_0x1cb15e[_0x329c('0xa1')])return;const _0x50bd57=(_0x1cb15e=this['_cloneOperation'](_0x1cb15e,this['_diffRoots']))[_0x329c('0xdd')]?_0x1cb15e[_0x329c('0xdd')]['root']:null,_0x56a72e=_0x1cb15e['newRange']?_0x1cb15e[_0x329c('0xca')][_0x329c('0x19')]:null;_0x50bd57&&this[_0x329c('0xc0')]['delete'](_0x1cb15e[_0x329c('0xb6')]),_0x56a72e&&this[_0x329c('0xc0')][_0x329c('0x5c')](_0x1cb15e[_0x329c('0xb6')],_0x1cb15e[_0x329c('0xca')][_0x329c('0xad')]());const _0x37cf21=null===_0x1cb15e[_0x329c('0xd')]?null:_0x1cb15e['_authorId']||this[_0x329c('0x53')][_0x329c('0x1d')][_0x329c('0xa')](_0x329c('0x5e'))['me']['id'],_0x226890=_0x1cb15e[_0x329c('0xb6')];if(!this[_0x329c('0x10b')][_0x329c('0x85')](_0x226890))return void this[_0x329c('0x10b')][_0x329c('0x5c')](_0x226890,{'range':_0x1cb15e[_0x329c('0xdd')],'userId':_0x37cf21});const _0x52dea2=this[_0x329c('0x10b')][_0x329c('0xa')](_0x226890),_0x35b525=_0x52dea2['range'],_0x500066=_0x1cb15e[_0x329c('0xca')];null==_0x35b525&&null==_0x500066||_0x35b525&&_0x500066&&_0x35b525[_0x329c('0x21')](_0x500066)?this[_0x329c('0x10b')]['delete'](_0x1cb15e[_0x329c('0xb6')]):_0x52dea2[_0x329c('0xd3')]=_0x37cf21;}[_0x329c('0x88')](_0x53f6c4,_0x3b08f2){this['_diffRoots'][_0x329c('0x85')](_0x53f6c4[_0x329c('0xf2')])?this[_0x329c('0xed')]['get'](_0x53f6c4['rootName'])[_0x329c('0xa5')]=_0x53f6c4[_0x329c('0x71')]:(this[_0x329c('0xed')]['set'](_0x53f6c4[_0x329c('0xf2')],J(_0x53f6c4[_0x329c('0xf2')],!0x0)),this[_0x329c('0xb2')][_0x329c('0x5c')](_0x53f6c4['rootName'],{}),_0x3b08f2&&this['_idsRoots'][_0x329c('0x5c')](_0x53f6c4[_0x329c('0xf2')],J(_0x53f6c4[_0x329c('0xf2')],!0x0)));const _0x19c641=null===_0x53f6c4[_0x329c('0xd')]?null:_0x53f6c4['_authorId']||this[_0x329c('0x53')]['plugins']['get'](_0x329c('0x5e'))['me']['id'],_0x14c431=this[_0x329c('0x8b')][_0x329c('0xa')](_0x53f6c4[_0x329c('0xf2')]);_0x14c431&&_0x14c431[_0x329c('0xd3')]===_0x19c641?this[_0x329c('0x8b')][_0x329c('0x78')](_0x53f6c4[_0x329c('0xf2')]):this['_touchedRoots'][_0x329c('0x5c')](_0x53f6c4[_0x329c('0xf2')],{'userId':_0x19c641,'isAttached':_0x53f6c4[_0x329c('0x71')]});}[_0x329c('0xcf')](_0x57d021){const _0x46c981=this[_0x329c('0xb2')][_0x329c('0xa')](_0x57d021[_0x329c('0x19')][_0x329c('0xf2')]);null===_0x57d021['newValue']?delete _0x46c981[_0x57d021[_0x329c('0x54')]]:_0x46c981[_0x57d021['key']]=_0x57d021[_0x329c('0xb0')];}}function B(_0x31a87b){const _0x52ee78=J(_0x31a87b[_0x329c('0xf2')],_0x31a87b[_0x329c('0xb5')]());for(const _0x274df1 of _0x31a87b[_0x329c('0x68')]()){const _0x8aa975=_0x274df1[_0x329c('0x81')](!0x0);_0x52ee78['_appendChild'](_0x8aa975);}return _0x52ee78;}function J(_0x3b0208,_0x4bd1b2=!0x0){const _0xd1ec1c=new _0x16b774();return _0xd1ec1c[_0x329c('0xf2')]=_0x3b0208,_0xd1ec1c['_isAttached']=_0x4bd1b2,_0xd1ec1c[_0x329c('0xb5')]=()=>_0xd1ec1c[_0x329c('0xa5')],_0xd1ec1c;}function H(_0x574dec,_0x28163b,_0x5b5fc2){const _0x1cd772=_0x329c('0x100')==_0x574dec[_0x329c('0x79')]?_0x5b5fc2[_0x329c('0x24')](_0x574dec[_0x329c('0xc4')],'end'):_0x5b5fc2['createPositionBefore'](_0x574dec[_0x329c('0xc4')]);return _0x5b5fc2[_0x329c('0xb9')](_0x28163b,_0x1cd772[_0x329c('0x16')],_0x1cd772['stickiness']);}function q(_0x194b49,_0x383955,_0xb9cf4f){const _0x2ab0a5=_0x329c('0x108')==_0x194b49[_0x329c('0x79')]?_0xb9cf4f[_0x329c('0x24')](_0x194b49['item'],0x0):_0xb9cf4f[_0x329c('0x60')](_0x194b49[_0x329c('0xc4')]);return _0xb9cf4f['createPositionFromPath'](_0x383955,_0x2ab0a5['path'],_0x2ab0a5[_0x329c('0xc5')]);}
|
|
23
|
+
const _0x1327=['RevisionTracker','hasContent','_bufferedUpdates','loadState','_markers','define','_execute','createRange','data-revision-','_applyOperations','isEqual','isAttached','path','_setConversion','default','_isPendingUpdate','_handleMoveOperation','slice','_initialRoots','Users','_idsRoots','_authorId','attributes','_transformMarkers','_handleSplitOperation','marker','getRevisionDocumentData','_getViewJson','get','insertions','$graveyard','_handleRootOperation','type','_loadedStateData','getData','resolve','map','createPositionAt','_cloneOperation','size','clone','Empty\x20document','_diffRoots','source','toVersion','NEGATIVE_INFINITY','nodes','editor','getCurrentRevisionId','initial','editor-initial-data-replaced-with-revision-data','data','rootsAttributes','getTime','currentRevision','_pendingAction','userId','stickiness','getNodeByPath','some','sourcePosition','addRevision','from','startsWith','getWalker','buildRevisionData','_loadState','_prepareViewToSave','_getBaseVids','repository','getRootNames','authors','_isInit','_source','_lastTo','ready','_handleInsertOperation','revisionHistory.resumeUnsavedRevision','collaboration.channelId','newValue','getUser','revision-end','getAncestors','_removeRevisionMarkers','afterInit','RevisionsRepository','getChild','init','reInit','$text','markerToData','targetPosition','_baseRoots','roots','_calculateMetaData','_handleMarkerOperation','set','insertion','_getFromVersion','getChildren','_startingRevisionId','initialData','addRevisionData','root','_removePendingAction','creator','_revisionDataBuilder','rootName','item','getRevisions','_baseIdsRoots','range','length','_touched','delete','end','key','plugins','_handleMergeOperation','createPositionFromPath','revision-start','getAttributes','_getState','_startingVersion','_fixPosition','name','_markChanges','getRevisionRootsAttributes','getOperation','updateRevisions','history','revision:','addRootAttribute','_saveMetaData','diffData','_continueCurrentRevision','_insertChild','_reset','graveyardPosition','markers','editing','update','start','upcast','add','getMovedRangeStart','_handleOperation','trim','vid_start','toView','createdAt','getRevision','toModel','position','_baseRootsAttributes','_copyMarkers','useFillerType','getRange','_lastFrom','offsetSize','isReady','newRange','includes','childCount','getAttribute','then','baseVersion','_findInsertionIndex','getRoot','_fixRange','_removeMetaData','adapter','_addPendingAction','for','_touchedMarkers','_savedMetaData','_makeModelFromViewString','isEnabled','getLatestVersion','attachChange','_update','_revisionId','_diffRootsAttributes','_generateTape','dataToMarker','elementStart','saveRevision','element','revision','isAdd','max','_getPreviousFrom','tableCell','keepParagraph','nodeAfter','filter','_fixOperation','howMany','documentFragment','clear','addRoot','toData','keys','getIndex','splitPosition','_isAttached','fromEntries','PendingActions','_loadRevisionData','offset','version','marked','authorsIds','_getVidAttributeName','deletions','reverse','document','parent','_processRootBeforeSave','has','insert','bind','processor','setRevisionData','parse','find','config','previousPosition','pluginName','creatorId','vid','RealTimeCollaborationClient','_makeRevision','_createFromRanges','_initialRevisionId','setSource','createRangeIn','oldRange','model','_bufferUpdate','remove','values','text','paragraph','_setAttribute','vid_end','requires','_appendChild','finally','_createCurrentRevision','_clone','string','detachRoot','view','_makeIdsRoot','split','conversion','dataDowncast','children','_createInitialRevision','_touchedRoots','sendBufferedUpdates','elementEnd','push','locale','fromVersion','_replaceEditorDataWithRevisionData'];(function(_0x5c9e41,_0x1327bc){const _0x2bff69=function(_0x50e378){while(--_0x50e378){_0x5c9e41['push'](_0x5c9e41['shift']());}};_0x2bff69(++_0x1327bc);}(_0x1327,0x1e9));const _0x2bff=function(_0x5c9e41,_0x1327bc){_0x5c9e41=_0x5c9e41-0x0;let _0x2bff69=_0x1327[_0x5c9e41];return _0x2bff69;};import{Users as _0x4997b2}from'ckeditor5-collaboration/src/collaboration-core';import{Plugin as _0x271fcb,PendingActions as _0x26b5e6}from'ckeditor5/src/core';import{logWarning as _0x1c3677,uid as _0x3271ad}from'ckeditor5/src/utils';import{Position as _0x28d65f,Range as _0x3ae9d1,Element as _0x296fc7,DocumentFragment as _0x1aa4f2,ViewText as _0x5c4f49,ViewElement as _0x560467,ViewContainerElement as _0x5e475c,ViewAttributeElement as _0x11e9f7,ViewEmptyElement as _0x4b5be2,ViewRawElement as _0x369c57,ViewUIElement as _0x140d33,ViewDocumentFragment as _0x27dc10}from'ckeditor5/src/engine';import _0x41a7fa from'./revisionsrepository';import{getTranslation as _0xdbf272}from'./utils/common-translations';import{cloneDeep as _0x57291b,isEqual as _0xdf99e7}from'lodash-es';const F={'c':_0x5e475c,'a':_0x11e9f7,'e':_0x4b5be2,'r':_0x369c57,'u':_0x140d33};export default class u extends _0x271fcb{static get[_0x2bff('0x6')](){return _0x2bff('0x2d');}static get[_0x2bff('0x18')](){return[_0x4997b2,_0x41a7fa,_0x26b5e6];}constructor(_0x5888dd){super(_0x5888dd),this[_0x2bff('0xd8')]=null,this['currentRevision']=null,this[_0x2bff('0x97')]=new B(this[_0x2bff('0x5c')]),this[_0x2bff('0xc')]=this['editor'][_0x2bff('0x4')][_0x2bff('0x49')](_0x2bff('0x7b'))||_0x2bff('0x5e'),this[_0x2bff('0x2f')]=new Map(),this[_0x2bff('0x4e')]=null;const _0x9d3753=_0x3271ad();this['_source']={'history':this[_0x2bff('0x5c')][_0x2bff('0x10')][_0x2bff('0x105')]['history'],'getLatestVersion':()=>Promise[_0x2bff('0x50')](this[_0x2bff('0x5c')][_0x2bff('0x10')]['document'][_0x2bff('0xff')]),'getCurrentRevisionId':()=>_0x9d3753},this['set'](_0x2bff('0xcd'),!0x1),this[_0x2bff('0x8d')](_0x2bff('0xde'),!0x0),this[_0x2bff('0x8d')](_0x2bff('0x3c'),!0x1),this[_0x2bff('0x5c')]['config'][_0x2bff('0x32')](_0x2bff('0x7a'),!0x0),this['editor'][_0x2bff('0x22')][_0x2bff('0xda')](_0x2bff('0xbc'))[_0x2bff('0xe5')]({'view':_0x2bff('0xe9')});}['init'](){this[_0x2bff('0x72')]=this[_0x2bff('0x5c')][_0x2bff('0xa2')]['get'](_0x2bff('0x82')),this[_0x2bff('0x3a')](),this['editor'][_0x2bff('0x60')]['on'](_0x2bff('0x78'),()=>{const _0x592dde=this[_0x2bff('0x72')][_0x2bff('0xc4')](0x0),_0x2867b4=_0x592dde&&null===_0x592dde[_0x2bff('0x96')]?_0x592dde:null;if(this[_0x2bff('0xb4')]=!!_0x2867b4&&this[_0x2bff('0x5c')][_0x2bff('0x4')][_0x2bff('0x49')](_0x2bff('0x7a')),this['editor'][_0x2bff('0xa2')][_0x2bff('0x108')](_0x2bff('0x9'))){const _0x2aed3e=this[_0x2bff('0x76')][_0x2bff('0x5d')](),_0x2daef2=this[_0x2bff('0x72')][_0x2bff('0xc4')](_0x2aed3e);if(_0x2daef2)this['_startingVersion']=_0x2daef2[_0x2bff('0x2b')],this[_0x2bff('0xb4')]=!0x1;else{const _0x37196c=this['_source'][_0x2bff('0xaf')]['_operations'][_0x2bff('0x3')](_0x760743=>!_0x760743[_0x2bff('0x75')]),_0x19a33c=_0x37196c?_0x37196c[_0x2bff('0xd3')]:this[_0x2bff('0x76')][_0x2bff('0xaf')][_0x2bff('0xff')];_0x592dde?(_0x592dde[_0x2bff('0x59')]<_0x19a33c&&_0x592dde[_0x2bff('0xe1')]({'toVersion':_0x19a33c}),this[_0x2bff('0xb4')]?(this[_0x2bff('0x76')][_0x2bff('0x5d')]=()=>_0x2867b4['id'],this[_0x2bff('0xa8')]=_0x2867b4['fromVersion']):(this[_0x2bff('0xa8')]=_0x592dde['toVersion'],this[_0x2bff('0xb4')]=!0x1)):(this[_0x2bff('0xa8')]=_0x19a33c,this[_0x2bff('0xb4')]=!0x1);}}else _0x2867b4&&(this[_0x2bff('0x5c')][_0x2bff('0x10')]['document'][_0x2bff('0xaf')]['version']=Math[_0x2bff('0xeb')](_0x2867b4[_0x2bff('0x59')],this[_0x2bff('0x5c')][_0x2bff('0x10')][_0x2bff('0x105')][_0x2bff('0xaf')]['version']),_0x2867b4['fromVersion']===_0x2867b4[_0x2bff('0x59')]?(0x0!==_0x2867b4[_0x2bff('0x2b')]&&(this['_source'][_0x2bff('0x5d')]=()=>_0x2867b4['id']),this['_continueCurrentRevision']=!0x1):this[_0x2bff('0xb4')]&&(this[_0x2bff('0x76')][_0x2bff('0x5d')]=()=>_0x2867b4['id'],this['_startingVersion']=_0x2867b4['fromVersion'])),this[_0x2bff('0xb4')]||(this['_startingVersion']=this[_0x2bff('0x5c')]['model'][_0x2bff('0x105')][_0x2bff('0xff')]);this['_revisionDataBuilder']['init'](this['_source'][_0x2bff('0xaf')]),this['_createInitialRevision'](this[_0x2bff('0xa8')]),this[_0x2bff('0x1b')](this[_0x2bff('0xa8')]),this['adapter']&&this[_0x2bff('0x27')]();}),this[_0x2bff('0x10a')](_0x2bff('0xcd'))['to'](this,_0x2bff('0x3c'),_0x3a2813=>!_0x3a2813);}async[_0x2bff('0x81')](){if(this['repository'][_0x2bff('0x9d')]>0x0){const _0x3c2fe7=this[_0x2bff('0x72')][_0x2bff('0xc4')](0x0),_0x376381=await this[_0x2bff('0x47')](_0x3c2fe7),_0x1713eb=await this[_0x2bff('0xac')](_0x3c2fe7);this['_replaceEditorDataWithRevisionData'](_0x376381,_0x1713eb);}}[_0x2bff('0xd')](_0x1d7922){this[_0x2bff('0x76')]=_0x1d7922;}async[_0x2bff('0xba')](){const _0xd10db9=await this[_0x2bff('0x76')][_0x2bff('0xdf')]();if(_0xd10db9>this[_0x2bff('0x63')][_0x2bff('0x59')]){await this[_0x2bff('0x6f')]();const _0x5b1b96=this[_0x2bff('0x6e')]({'revision':this[_0x2bff('0x63')],'to':_0xd10db9});_0x5b1b96[_0x2bff('0x74')]=_0x5b1b96['authorsIds'][_0x2bff('0x51')](_0x324465=>this['editor'][_0x2bff('0xa2')][_0x2bff('0x49')](_0x2bff('0x40'))[_0x2bff('0x7d')](_0x324465)),this[_0x2bff('0x63')][_0x2bff('0xe1')](_0x5b1b96);}}async['_loadState'](){this[_0x2bff('0xb4')]&&!this[_0x2bff('0x4e')]&&(await this[_0x2bff('0xfd')](this[_0x2bff('0x63')]),this[_0x2bff('0x97')][_0x2bff('0x30')](this[_0x2bff('0x63')]),this['_loadedStateData']={'fromVersion':this[_0x2bff('0x63')]['fromVersion'],'authors':this['currentRevision'][_0x2bff('0x74')]['slice']()});}async[_0x2bff('0xe7')](_0x3a7a39={},_0x1bdaec=null){const _0x3a65b9=[];await this[_0x2bff('0x6f')](),this[_0x2bff('0xb4')]=!0x1,_0x1bdaec>this['currentRevision'][_0x2bff('0x59')]&&(_0x1bdaec=null),null===_0x1bdaec&&(_0x1bdaec=await this[_0x2bff('0x76')]['getLatestVersion']());const _0x374cb0=this[_0x2bff('0x8f')](_0x1bdaec),_0x5baa8d=this['buildRevisionData']({'from':_0x374cb0,'to':_0x1bdaec});if(this[_0x2bff('0x63')]['toVersion']<_0x1bdaec){const _0x11606c=this[_0x2bff('0x6e')]({'revision':this[_0x2bff('0x63')],'from':_0x1bdaec,'to':_0x1bdaec});_0x11606c['authors']=[],_0x11606c[_0x2bff('0x101')]=[],_0x11606c['id']=this['currentRevision']['id'],this[_0x2bff('0x63')][_0x2bff('0xe1')](_0x11606c,!0x0),delete _0x11606c[_0x2bff('0x74')],_0x3a65b9[_0x2bff('0x29')](_0x11606c);}_0x3a7a39[_0x2bff('0x7')]=this['editor'][_0x2bff('0xa2')][_0x2bff('0x49')](_0x2bff('0x40'))['me']['id'],_0x3a7a39[_0x2bff('0xaa')]=_0x3a7a39['name']||null,_0x3a7a39['id']=_0x3a7a39['id']||_0x3271ad(),_0x3a7a39={..._0x3a7a39,..._0x5baa8d};const _0x5b56f0=this['addRevisionData'](_0x3a7a39);_0x3a65b9['push'](_0x3a7a39);const _0x2e1262=this[_0x2bff('0x72')][_0x2bff('0xf8')](_0x5b56f0);if(0x0!==_0x2e1262){const _0x333b28=this['repository'][_0x2bff('0xc4')](_0x2e1262-0x1);if(_0x333b28[_0x2bff('0x2b')]!==_0x1bdaec){const _0x18802a=this[_0x2bff('0x97')][_0x2bff('0x4f')](_0x1bdaec,_0x333b28[_0x2bff('0x59')]),_0x2a8670={'id':_0x333b28['id'],'diffData':_0x18802a['diffData'],'authorsIds':_0x18802a['authorsIds'],'authors':_0x18802a[_0x2bff('0x101')][_0x2bff('0x51')](_0x216217=>this[_0x2bff('0x5c')][_0x2bff('0xa2')][_0x2bff('0x49')]('Users')[_0x2bff('0x7d')](_0x216217)),'fromVersion':_0x1bdaec};_0x333b28===this['currentRevision']&&(_0x2a8670[_0x2bff('0xc3')]=new Date(_0x3a7a39[_0x2bff('0xc3')][_0x2bff('0x62')]()+0xa)),_0x333b28[_0x2bff('0xe1')](_0x2a8670,!0x0),delete _0x2a8670['authors'],_0x3a65b9[_0x2bff('0x29')](_0x2a8670);}}if(this[_0x2bff('0xd8')]){for(const _0x7cb497 of _0x3a65b9)this['_bufferUpdate'](_0x7cb497['id'],_0x7cb497,!0x0);this[_0x2bff('0x27')]();}return _0x5b56f0;}[_0x2bff('0x93')](_0x283ce5){const _0x3257eb=this[_0x2bff('0x72')]['createRevision'](_0x283ce5);return this[_0x2bff('0xd8')]&&_0x3257eb['on'](_0x2bff('0xe1'),(_0x35e664,_0x494860,_0x22e3b6)=>{_0x22e3b6||(this['_bufferUpdate'](_0x494860['id'],_0x494860,!0x0),this[_0x2bff('0x27')]());}),this[_0x2bff('0x72')][_0x2bff('0x6a')](_0x3257eb,this['_findInsertionIndex'](_0x3257eb)),_0x3257eb;}async[_0x2bff('0x47')](_0x9822fe){await this[_0x2bff('0xfd')](_0x9822fe);const _0x2e456e={};for(const _0x64000a in _0x9822fe['diffData']){if(_0x9822fe['diffData'][_0x64000a][_0x2bff('0xe0')]&&!_0x9822fe['diffData'][_0x64000a][_0x2bff('0xe0')][_0x2bff('0x38')])continue;const _0x206bb0=this[_0x2bff('0x80')](JSON[_0x2bff('0x2')](_0x9822fe[_0x2bff('0xb3')][_0x64000a]['insertions'])),_0x269d66=this[_0x2bff('0x5c')][_0x2bff('0xb9')][_0x2bff('0x1f')][_0x2bff('0x105')],_0x29507d=new _0x27dc10(_0x269d66,_0x206bb0[_0x2bff('0x51')](_0x2cf328=>T(_0x2cf328,this[_0x2bff('0x5c')])));this['editor'][_0x2bff('0x60')][_0x2bff('0x0')][_0x2bff('0xc9')](_0x2bff('0x100')),_0x2e456e[_0x64000a]=this[_0x2bff('0x5c')][_0x2bff('0x60')][_0x2bff('0x0')][_0x2bff('0xf6')](_0x29507d),this[_0x2bff('0x5c')][_0x2bff('0x60')][_0x2bff('0x0')][_0x2bff('0xc9')](_0x2bff('0x3b'));}return _0x2e456e;}async[_0x2bff('0xac')](_0x542070){await this[_0x2bff('0xfd')](_0x542070);const _0x26f8b0={};for(const _0x20ae01 in _0x542070[_0x2bff('0xb3')])_0x542070['diffData'][_0x20ae01][_0x2bff('0xe0')]&&!_0x542070[_0x2bff('0xb3')][_0x20ae01]['attachChange'][_0x2bff('0x38')]||(_0x26f8b0[_0x20ae01]=_0x542070['diffData'][_0x20ae01]['attributesAfter']||{});return _0x26f8b0;}['sendBufferedUpdates'](){if(0x0===this[_0x2bff('0x2f')][_0x2bff('0x54')])return;if(this['_isPendingUpdate'])return;let _0xe21fc7=Array[_0x2bff('0x6b')](this['_bufferedUpdates'][_0x2bff('0x13')]());this[_0x2bff('0x2f')]['clear']();for(let _0x5d1f8e=0x0;_0x5d1f8e<_0xe21fc7[_0x2bff('0x9d')];_0x5d1f8e++){const _0x392475=_0xe21fc7[_0x5d1f8e];let _0x1a1a8f=!0x1;for(const _0xfa175 of Object[_0x2bff('0xf7')](_0x392475))void 0x0===_0x392475[_0xfa175]?delete _0x392475[_0xfa175]:'id'!==_0xfa175&&(_0x1a1a8f=!0x0);_0x1a1a8f||(_0xe21fc7[_0x5d1f8e]=null);}if(_0xe21fc7=_0xe21fc7[_0x2bff('0xf0')](_0x40cc28=>null!==_0x40cc28),!_0xe21fc7[_0x2bff('0x9d')])return;for(let _0x1f6f57=0x0;_0x1f6f57<_0xe21fc7[_0x2bff('0x9d')];_0x1f6f57++){const _0x51c25a=_0xe21fc7[_0x1f6f57];void 0x0!==_0x51c25a[_0x2bff('0x2b')]&&void 0x0===_0x51c25a[_0x2bff('0x59')]&&(_0x51c25a['toVersion']=this[_0x2bff('0x72')][_0x2bff('0xc4')](_0x51c25a['id'])[_0x2bff('0x59')]),void 0x0!==_0x51c25a[_0x2bff('0x59')]&&void 0x0===_0x51c25a[_0x2bff('0x2b')]&&(_0x51c25a['fromVersion']=this[_0x2bff('0x72')][_0x2bff('0xc4')](_0x51c25a['id'])[_0x2bff('0x2b')]);}const _0x3c4101=this[_0x2bff('0x5c')][_0x2bff('0x4')][_0x2bff('0x49')](_0x2bff('0x7b'));this['_isPendingUpdate']=!0x0,this[_0x2bff('0xd9')](),this[_0x2bff('0xd8')][_0x2bff('0xae')](_0xe21fc7,_0x3c4101)[_0x2bff('0x1a')](()=>{this[_0x2bff('0x3c')]=!0x1;})[_0x2bff('0xd2')](_0x3ed60a=>{if(_0x3ed60a)for(const _0x1c653a of _0x3ed60a)this[_0x2bff('0x1')]({'id':_0x1c653a['id'],'createdAt':_0x1c653a[_0x2bff('0xc3')]});this[_0x2bff('0x95')](),this[_0x2bff('0x27')]();});}[_0x2bff('0x2c')](_0x3dc37a,_0x811fd6){let _0x13202a=this['editor'][_0x2bff('0x4')][_0x2bff('0x49')]('initialData'),_0x2b4da0=this[_0x2bff('0x5c')][_0x2bff('0x4')][_0x2bff('0x49')](_0x2bff('0x61'));if(void 0x0===_0x13202a){_0x13202a={};for(const _0x109668 of this[_0x2bff('0x5c')][_0x2bff('0x10')][_0x2bff('0x105')][_0x2bff('0x73')]())_0x13202a[_0x109668]='';}if(_0x2bff('0x1d')==typeof _0x13202a&&(_0x13202a={'main':_0x13202a}),void 0x0===_0x2b4da0){_0x2b4da0={};for(const _0x1b547b of this[_0x2bff('0x5c')]['model'][_0x2bff('0x105')][_0x2bff('0x73')]())_0x2b4da0[_0x1b547b]={};}let _0xceb6ee=!0x1;const _0x5b24ee=Object[_0x2bff('0xf7')](_0x13202a),_0x318f25=Object['keys'](_0x3dc37a);for(const _0x261e30 of _0x5b24ee){if(_0x13202a[_0x261e30]!==_0x3dc37a[_0x261e30]&&''!==_0x13202a[_0x261e30][_0x2bff('0xc0')]()){_0xceb6ee=!0x0;break;}if(!_0xdf99e7(_0x2b4da0[_0x261e30],_0x811fd6[_0x261e30])&&Object[_0x2bff('0xf7')](_0x2b4da0[_0x261e30])['length']>0x0){_0xceb6ee=!0x0;break;}}_0xceb6ee||(_0xceb6ee=_0x318f25[_0x2bff('0x68')](_0x5d3797=>!_0x5b24ee['includes'](_0x5d3797))),_0xceb6ee&&_0x1c3677(_0x2bff('0x5f'),{'editorData':_0x13202a,'editorRootsAttributes':_0x2b4da0,'revisionData':_0x3dc37a,'revisionRootsAttributes':_0x811fd6}),this[_0x2bff('0x5c')]['config'][_0x2bff('0x8d')](_0x2bff('0x92'),_0x3dc37a),this[_0x2bff('0x5c')][_0x2bff('0x4')][_0x2bff('0x8d')](_0x2bff('0x61'),_0x811fd6);}[_0x2bff('0xd9')](){if(!this['_pendingAction']){const _0x36423d=this['editor'][_0x2bff('0xa2')]['get'](_0x2bff('0xfc'));this[_0x2bff('0x64')]=_0x36423d['add'](_0xdbf272(this['editor'][_0x2bff('0x2a')],'PENDING_ACTION_REVISION_HISTORY'));}}[_0x2bff('0x95')](){this['_pendingAction']&&(this[_0x2bff('0x5c')]['plugins'][_0x2bff('0x49')](_0x2bff('0xfc'))['remove'](this[_0x2bff('0x64')]),this[_0x2bff('0x64')]=null);}[_0x2bff('0xd4')](_0x11b5d4){const _0x4f4f2a=this['repository'][_0x2bff('0x9a')]();_0x4f4f2a[_0x2bff('0x104')]();let _0x473031=0x0;for(;_0x473031<_0x4f4f2a[_0x2bff('0x9d')];){const _0x29cf70=_0x4f4f2a[_0x473031];if(_0x29cf70===this['currentRevision']){_0x473031++;continue;}if(_0x29cf70['id']===this['_initialRevisionId'])break;const _0x59f273=_0x11b5d4[_0x2bff('0x59')]-_0x29cf70['toVersion']||_0x11b5d4[_0x2bff('0x2b')]-_0x29cf70['fromVersion'];if(_0x59f273>0x0)break;if(_0x59f273<0x0)_0x473031++;else{if(!_0x11b5d4[_0x2bff('0x96')]&&_0x29cf70[_0x2bff('0x96')])break;if(_0x29cf70['creator']||!_0x11b5d4[_0x2bff('0x96')]){if(_0x11b5d4[_0x2bff('0xc3')]>_0x29cf70[_0x2bff('0xc3')])break;_0x473031++;}else _0x473031++;}}return _0x473031;}[_0x2bff('0x1')](_0x2cc2fc){const _0x524082=this[_0x2bff('0x72')][_0x2bff('0xc4')](_0x2cc2fc['id']);if(_0x2cc2fc[_0x2bff('0xc3')]&&(_0x2cc2fc[_0x2bff('0xc3')]=new Date(_0x2cc2fc[_0x2bff('0xc3')])),_0x2cc2fc['authorsIds']){const _0x19c802=this[_0x2bff('0x5c')][_0x2bff('0xa2')][_0x2bff('0x49')](_0x2bff('0x40'));_0x2cc2fc[_0x2bff('0x74')]=_0x2cc2fc[_0x2bff('0x101')][_0x2bff('0x51')](_0x4b5837=>_0x19c802['getUser'](_0x4b5837));}_0x524082[_0x2bff('0xe1')](_0x2cc2fc,!0x0);}[_0x2bff('0x6e')]({revision:_0x5ba9ca=null,from:_0x3a762f=null,to:_0x5677dc=null}){_0x3a762f=null!==_0x3a762f?_0x3a762f:_0x5ba9ca[_0x2bff('0x2b')],_0x5677dc=null!==_0x5677dc?_0x5677dc:_0x5ba9ca[_0x2bff('0x59')];const _0xe6fcaa=this['_revisionDataBuilder'][_0x2bff('0x4f')](_0x3a762f,_0x5677dc),_0x269092={'diffData':_0xe6fcaa[_0x2bff('0xb3')],'authorsIds':_0xe6fcaa[_0x2bff('0x101')],'fromVersion':_0x3a762f,'toVersion':_0x5677dc};if(!_0x5ba9ca||_0x5677dc!==_0x5ba9ca[_0x2bff('0x59')]){const _0xaff65f=_0x5677dc-0x1,_0x5cd028=this[_0x2bff('0x76')][_0x2bff('0xaf')][_0x2bff('0xad')](_0xaff65f);_0x269092[_0x2bff('0xc3')]=_0x5cd028&&_0x5cd028['createdAt']||new Date();}if(this[_0x2bff('0x4e')]&&_0x3a762f===this['_loadedStateData'][_0x2bff('0x2b')])for(const _0x5e0796 of this[_0x2bff('0x4e')][_0x2bff('0x74')])_0x269092[_0x2bff('0x101')][_0x2bff('0xcf')](_0x5e0796['id'])||_0x269092[_0x2bff('0x101')][_0x2bff('0x29')](_0x5e0796['id']);return _0x269092;}['_loadRevisionData'](_0xe5fb1f){if(!_0xe5fb1f||_0xe5fb1f[_0x2bff('0xb3')])return Promise[_0x2bff('0x50')]();{const _0x301cd3=this[_0x2bff('0x5c')][_0x2bff('0x4')][_0x2bff('0x49')](_0x2bff('0x7b'));return this['adapter'][_0x2bff('0xc4')]({'channelId':_0x301cd3,'revisionId':_0xe5fb1f['id']})[_0x2bff('0xd2')](_0x583555=>{_0xe5fb1f[_0x2bff('0xb3')]=_0x583555[_0x2bff('0xb3')];});}}['_bufferUpdate'](_0x290476,_0x23fc82,_0x143ab6){if(this[_0x2bff('0x2f')][_0x2bff('0x108')](_0x290476)){const _0x480b3e=this[_0x2bff('0x2f')][_0x2bff('0x49')](_0x290476);_0x23fc82=_0x143ab6?{..._0x480b3e,..._0x23fc82}:{..._0x23fc82,..._0x480b3e};}this[_0x2bff('0x2f')][_0x2bff('0x8d')](_0x290476,_0x23fc82);}['_getFromVersion'](_0x5807e6){const _0x5777a8=this['repository'][_0x2bff('0x9a')]();_0x5777a8[_0x2bff('0x104')](),_0x5777a8['shift']();const _0x219231=_0x5777a8[_0x2bff('0x3')](_0x34baf1=>_0x34baf1[_0x2bff('0x59')]<=_0x5807e6)['toVersion'];return _0x219231<this[_0x2bff('0xa8')]?this[_0x2bff('0xa8')]:_0x219231;}[_0x2bff('0x25')](_0x30bbe9){const _0x2f6407=this[_0x2bff('0x72')][_0x2bff('0xc4')](this[_0x2bff('0x72')][_0x2bff('0x9d')]-0x1);if(_0x2f6407)this[_0x2bff('0xc')]=_0x2f6407['id'];else{const _0x1814f0=!this[_0x2bff('0x5c')]['model'][_0x2bff('0x105')][_0x2bff('0x8a')][_0x2bff('0x3')](_0x13eea5=>this['editor'][_0x2bff('0x10')][_0x2bff('0x2e')](_0x13eea5)),_0x3a6a7a=this['editor']['plugins']['get'](_0x2bff('0x40'))['me']['id'],_0x5e0fc9=_0xdbf272(this['editor'][_0x2bff('0x2a')],_0x1814f0?_0x2bff('0x56'):'Initial\x20revision');this[_0x2bff('0xa')]({'from':_0x30bbe9,'to':_0x30bbe9,'id':this[_0x2bff('0xc')],'name':_0x5e0fc9,'creatorId':_0x3a6a7a});}}[_0x2bff('0x1b')](_0x6dad7c){const _0x2150a2=this['_source']['getCurrentRevisionId']();this[_0x2bff('0x63')]=this[_0x2bff('0x72')][_0x2bff('0xc4')](_0x2150a2),this[_0x2bff('0x63')]||(this[_0x2bff('0x63')]=this[_0x2bff('0xa')]({'from':_0x6dad7c,'to':_0x6dad7c,'id':_0x2150a2,'name':'','creatorId':null}));}['_makeRevision']({name:_0x25038d,from:_0x1dfc8f,to:_0x34d816,creatorId:_0x14ac66,id:_0x5b7aee}){const _0x5ba43e=this['buildRevisionData']({'from':_0x1dfc8f,'to':_0x34d816});_0x5ba43e[_0x2bff('0xaa')]=_0x25038d,_0x5ba43e[_0x2bff('0x7')]=_0x14ac66,_0x5ba43e['id']=_0x5b7aee;const _0x26a188=this[_0x2bff('0x93')](_0x5ba43e);return this[_0x2bff('0xd8')]&&this[_0x2bff('0x11')](_0x5ba43e['id'],_0x5ba43e,!0x0),_0x26a188;}[_0x2bff('0x3a')](){this[_0x2bff('0x5c')][_0x2bff('0x22')][_0x2bff('0xda')](_0x2bff('0x23'))[_0x2bff('0x87')]({'model':_0x2bff('0xe9')});}['_removeRevisionMarkers'](_0x5829f3){return(_0x5829f3=_0x5829f3[_0x2bff('0xf0')](_0x56171f=>!_0x56171f['name']||_0x2bff('0xa5')!==_0x56171f[_0x2bff('0xaa')]&&_0x2bff('0x7e')!==_0x56171f['name']))['forEach'](_0x3d9f6c=>{_0x2bff('0x1d')!=typeof _0x3d9f6c&&(_0x3d9f6c[_0x2bff('0x24')]=this['_removeRevisionMarkers'](_0x3d9f6c['children']),_0x3d9f6c['attributes']=_0x3d9f6c['attributes'][_0x2bff('0xf0')](_0x4253fd=>!_0x4253fd[0x0][_0x2bff('0x6c')](_0x2bff('0x35'))));}),_0x5829f3;}}function T(_0x4ac189,_0x2fb510){const _0x1c1ab5=_0x2fb510[_0x2bff('0xb9')][_0x2bff('0x1f')][_0x2bff('0x105')];if(_0x2bff('0x1d')==typeof _0x4ac189)return new _0x5c4f49(_0x1c1ab5,_0x4ac189);{const _0x3e8418=_0x4ac189[_0x2bff('0x24')][_0x2bff('0x51')](_0x5442ad=>T(_0x5442ad,_0x2fb510));return new(F[_0x4ac189[(_0x2bff('0x4d'))]]||_0x560467)(_0x1c1ab5,_0x4ac189['name'],_0x4ac189[_0x2bff('0x43')],_0x3e8418);}}class B{constructor(_0x222f1c){this[_0x2bff('0x5c')]=_0x222f1c,this[_0x2bff('0xdc')]=new Map(),this[_0x2bff('0xcb')]=-0x1,this[_0x2bff('0x77')]=-0x1,this[_0x2bff('0x31')]=new Map(),this[_0x2bff('0x57')]=new Map(),this[_0x2bff('0xe3')]=new Map(),this[_0x2bff('0x89')]=new Map(),this[_0x2bff('0xc7')]=new Map(),this[_0x2bff('0x41')]=new Map(),this[_0x2bff('0x9b')]=new Map(),this['_touched']=new Map(),this[_0x2bff('0xdb')]=new Map(),this[_0x2bff('0x26')]=new Map(),this[_0x2bff('0xe2')]=0x1,this['_initialRoots']=this[_0x2bff('0x5c')]['model']['document'][_0x2bff('0x73')](),this[_0x2bff('0x3f')][_0x2bff('0x29')](_0x2bff('0x4b'));}['init'](_0x76f509){this[_0x2bff('0x58')]=_0x76f509;const _0x1c6240=new Map(),_0x31e8cc=new Map(),_0x321e1f=this[_0x2bff('0x5c')][_0x2bff('0x10')]['document'][_0x2bff('0x73')](!0x0);_0x321e1f[_0x2bff('0x29')](_0x2bff('0x4b'));for(const _0x4c730d of _0x321e1f){const _0x5b1616=this[_0x2bff('0x5c')][_0x2bff('0x10')]['document'][_0x2bff('0xd5')](_0x4c730d),_0x2a4d54=J(_0x5b1616);_0x1c6240[_0x2bff('0x8d')](_0x4c730d,_0x2a4d54),_0x31e8cc['set'](_0x4c730d,Object[_0x2bff('0xfb')](_0x5b1616[_0x2bff('0xa6')]()));}const _0x102d70=Array[_0x2bff('0x6b')](this[_0x2bff('0x5c')][_0x2bff('0x10')]['markers'])['map'](_0x2c4e73=>[_0x2c4e73['name'],_0x2c4e73[_0x2bff('0xca')]()]),_0x1bbfd3=this[_0x2bff('0x58')][_0x2bff('0xff')];this[_0x2bff('0xb2')](_0x1bbfd3,_0x1c6240,_0x102d70,_0x31e8cc),this[_0x2bff('0x91')]=this[_0x2bff('0xe2')];const _0x1904fa=new Map(),_0x52267e=new Map();for(const _0x50a785 of this[_0x2bff('0x3f')]){const _0x401821=H(_0x50a785);_0x1904fa[_0x2bff('0x8d')](_0x50a785,_0x401821),_0x52267e['set'](_0x50a785,{});}this[_0x2bff('0xb2')](Number[_0x2bff('0x5a')],_0x1904fa,[],_0x52267e);}[_0x2bff('0x4f')](_0x430383,_0x28d3b7){if(this[_0x2bff('0xcb')]===_0x430383&&this[_0x2bff('0x77')]<=_0x28d3b7)this[_0x2bff('0xdc')][_0x2bff('0x54')]>0x1&&this[_0x2bff('0xd7')](this[_0x2bff('0x77')]),this[_0x2bff('0x36')](this[_0x2bff('0x77')],_0x28d3b7,!0x0);else{if(!this[_0x2bff('0xdc')]['has'](_0x430383)){const _0x56e032=this[_0x2bff('0xec')](_0x430383);this['_calculateMetaData'](_0x56e032,_0x430383,!0x1);}this[_0x2bff('0x8b')](_0x430383,_0x28d3b7,!0x0);}return this[_0x2bff('0xcb')]=_0x430383,this[_0x2bff('0x77')]=_0x28d3b7,this[_0x2bff('0xa7')]();}[_0x2bff('0x30')](_0x3bd52a){this[_0x2bff('0xb6')](),this['_lastFrom']=_0x3bd52a[_0x2bff('0x2b')],this['_lastTo']=_0x3bd52a[_0x2bff('0x59')];for(const _0x5817a3 in _0x3bd52a[_0x2bff('0xb3')]){const _0x188cc5=_0x3bd52a[_0x2bff('0xb3')][_0x5817a3]['attachChange'],_0x8cd625=_0x57291b(_0x3bd52a[_0x2bff('0xb3')][_0x5817a3]['attributesBefore'])||{},_0x454b0c=this['_makeModelFromViewString'](_0x3bd52a[_0x2bff('0xb3')][_0x5817a3][_0x2bff('0x103')]);_0x454b0c[_0x2bff('0x98')]=_0x5817a3,_0x454b0c[_0x2bff('0xfa')]=!_0x188cc5||!_0x188cc5[_0x2bff('0x38')],_0x454b0c['isAttached']=()=>_0x454b0c['_isAttached'],this[_0x2bff('0x89')][_0x2bff('0x8d')](_0x5817a3,_0x454b0c),this[_0x2bff('0xc7')][_0x2bff('0x8d')](_0x5817a3,_0x8cd625),_0x188cc5&&this[_0x2bff('0x26')][_0x2bff('0x8d')](_0x5817a3,_0x188cc5);const _0x5cfe81=this[_0x2bff('0x20')](_0x454b0c);this[_0x2bff('0x9b')][_0x2bff('0x8d')](_0x5817a3,_0x5cfe81);for(const [_0x4049df,_0x478323]of _0x454b0c[_0x2bff('0xb8')]){if(!_0x4049df[_0x2bff('0x6c')](_0x2bff('0xb0')))continue;const _0x141d7e=_0x4049df[_0x2bff('0x21')](':')[0x2];for(const _0x489f6d of _0x478323[_0x2bff('0x6d')]({'singleCharacters':!0x0})){const _0x39efd2=this[_0x2bff('0x102')](_0x489f6d),_0xc655b9=_0x2bff('0x28')==_0x489f6d[_0x2bff('0x4d')]?_0x489f6d[_0x2bff('0x5')][_0x2bff('0x39')][_0x2bff('0x3e')](0x0,-0x1):_0x489f6d[_0x2bff('0x5')][_0x2bff('0x39')],_0x213bb6=_0x5cfe81[_0x2bff('0x67')](_0xc655b9)[_0x2bff('0xd1')](_0x39efd2);this[_0x2bff('0x9e')]['set'](_0x213bb6,{'userId':_0x141d7e});}}}this[_0x2bff('0x91')]=this[_0x2bff('0xe2')];const _0x3be559=[...Array(this[_0x2bff('0xe2')])[_0x2bff('0xf7')]()][_0x2bff('0x3e')](0x1)[_0x2bff('0xf0')](_0x2048a5=>!this[_0x2bff('0x9e')]['has'](_0x2048a5));let _0x17e5f5=0x0;const _0x41bbce=new Map();for(const _0x51e87a in _0x3bd52a['diffData']){const _0x1f1698=_0x3bd52a[_0x2bff('0xb3')][_0x51e87a]['attachChange'],_0x37801b=_0x57291b(_0x3bd52a[_0x2bff('0xb3')][_0x51e87a]['attributesAfter'])||{},_0x49de24=this[_0x2bff('0xdd')](_0x3bd52a['diffData'][_0x51e87a][_0x2bff('0x4a')]);_0x49de24[_0x2bff('0x98')]=_0x51e87a,_0x49de24[_0x2bff('0xfa')]=!_0x1f1698||_0x1f1698[_0x2bff('0x38')],_0x49de24['isAttached']=()=>_0x49de24['_isAttached'],this[_0x2bff('0x57')]['set'](_0x51e87a,_0x49de24),this['_diffRootsAttributes'][_0x2bff('0x8d')](_0x51e87a,_0x37801b);const _0x3e2e18=this['_makeIdsRoot'](_0x49de24,Number[_0x2bff('0x5a')]);this['_idsRoots'][_0x2bff('0x8d')](_0x51e87a,_0x3e2e18),_0x41bbce['set'](_0x51e87a,_0x49de24[_0x2bff('0x38')]()?_0x37801b:{});for(const [_0x2d9aa3,_0x3c5bc5]of _0x49de24[_0x2bff('0xb8')]){if(!_0x2d9aa3[_0x2bff('0x6c')](_0x2bff('0xb0')))continue;const _0x2daf86=_0x2d9aa3['split'](':')[0x2];for(const _0x3ce587 of _0x3c5bc5['getWalker']({'singleCharacters':!0x0})){const _0x5e64f4=this['_getVidAttributeName'](_0x3ce587),_0x54217a=this[_0x2bff('0xe2')]++,_0x198654='elementEnd'==_0x3ce587['type']?_0x3ce587[_0x2bff('0x5')][_0x2bff('0x39')][_0x2bff('0x3e')](0x0,-0x1):_0x3ce587['previousPosition']['path'];_0x3e2e18[_0x2bff('0x67')](_0x198654)[_0x2bff('0x16')](_0x5e64f4,_0x54217a),this[_0x2bff('0x9e')][_0x2bff('0x8d')](_0x54217a,{'userId':_0x2daf86});}}for(const _0x4862dc of this[_0x2bff('0x5c')][_0x2bff('0x10')][_0x2bff('0xe')](_0x49de24)['getWalker']({'singleCharacters':!0x0})){const _0x354c5c=this[_0x2bff('0x102')](_0x4862dc),_0x132cbe=_0x2bff('0x28')==_0x4862dc[_0x2bff('0x4d')]?_0x4862dc['previousPosition'][_0x2bff('0x39')][_0x2bff('0x3e')](0x0,-0x1):_0x4862dc[_0x2bff('0x5')][_0x2bff('0x39')],_0x126c0f=_0x3e2e18[_0x2bff('0x67')](_0x132cbe);_0x126c0f[_0x2bff('0xd1')](_0x354c5c)>0x0||_0x126c0f[_0x2bff('0x16')](_0x354c5c,_0x3be559[_0x17e5f5++]);}for(const [_0x2c6b58,_0x10fc14]of _0x49de24[_0x2bff('0xb8')])_0x2c6b58[_0x2bff('0x6c')]('revision:')||this[_0x2bff('0x31')]['set'](_0x2c6b58,_0x10fc14);}const _0xee88e3=H(_0x2bff('0x4b'));this[_0x2bff('0x89')][_0x2bff('0x8d')]('$graveyard',_0xee88e3),this['_baseIdsRoots'][_0x2bff('0x8d')](_0x2bff('0x4b'),this[_0x2bff('0x20')](_0xee88e3,0x1));const _0x489549=H(_0x2bff('0x4b'));this['_diffRoots'][_0x2bff('0x8d')]('$graveyard',_0x489549),this[_0x2bff('0x41')][_0x2bff('0x8d')](_0x2bff('0x4b'),this[_0x2bff('0x20')](_0x489549,0x1));const _0x2533ff=Array['from'](this[_0x2bff('0x57')])[_0x2bff('0x51')](([_0x2c9d0e,_0x18da51])=>[_0x2c9d0e,J(_0x18da51)]);this[_0x2bff('0xb2')](this[_0x2bff('0x77')],_0x2533ff,this[_0x2bff('0x31')],_0x41bbce);}['_makeModelFromViewString'](_0x18351e){const _0x31a654=JSON['parse'](_0x18351e),_0x32d43d=this['editor'][_0x2bff('0xb9')][_0x2bff('0x1f')]['document'],_0x4d51b7=new _0x27dc10(_0x32d43d,_0x31a654[_0x2bff('0x51')](_0x1ca08a=>T(_0x1ca08a,this['editor'])));return this[_0x2bff('0x5c')]['data'][_0x2bff('0xc5')](_0x4d51b7);}[_0x2bff('0xb2')](_0x548277,_0xe9bc97,_0x11ddac,_0x2be308){const _0x39e698=new Map(_0xe9bc97),_0x2bd015=new Map(_0x57291b(_0x2be308)),_0x123be7=new Map();for(const [_0x1effca,_0x2cbcd6]of _0x11ddac)_0x123be7['set'](_0x1effca,{'start':_0x2cbcd6[_0x2bff('0xbb')][_0x2bff('0x55')](),'end':_0x2cbcd6[_0x2bff('0xa0')][_0x2bff('0x55')](),'rootName':_0x2cbcd6[_0x2bff('0x94')][_0x2bff('0x98')]});this[_0x2bff('0xdc')][_0x2bff('0x8d')](_0x548277,{'roots':_0x39e698,'markers':_0x123be7,'rootsAttributes':_0x2bd015});}[_0x2bff('0xd7')](_0x3df6df){this[_0x2bff('0xdc')][_0x2bff('0x9f')](_0x3df6df);}[_0x2bff('0x85')](){this[_0x2bff('0xb6')](),this['_lastFrom']=-0x1,this[_0x2bff('0x77')]=-0x1,this['_savedMetaData'][_0x2bff('0xf4')](),this[_0x2bff('0x84')](this[_0x2bff('0x58')]);}['_reset'](){this[_0x2bff('0x9e')]['clear'](),this[_0x2bff('0xdb')][_0x2bff('0xf4')](),this[_0x2bff('0x26')][_0x2bff('0xf4')](),this['_diffRoots']['clear'](),this[_0x2bff('0xe3')][_0x2bff('0xf4')](),this['_baseRoots']['clear'](),this[_0x2bff('0xc7')][_0x2bff('0xf4')](),this[_0x2bff('0x41')]['clear'](),this[_0x2bff('0x9b')][_0x2bff('0xf4')](),this[_0x2bff('0x31')][_0x2bff('0xf4')](),this[_0x2bff('0xe2')]=0x1,this[_0x2bff('0x91')]=this[_0x2bff('0xe2')];}[_0x2bff('0x20')](_0x2a3795,_0x141e1d=null){let _0x3a2e23=null;_0x2a3795['is'](_0x2bff('0xf3'))||(_0x3a2e23=new _0x296fc7(_0x2a3795[_0x2bff('0xaa')],{'vid_start':null===_0x141e1d?this['_revisionId']++:_0x141e1d++}));const _0x3e9bf1=[];for(const _0x938b01 of _0x2a3795[_0x2bff('0x90')]())if(_0x938b01['is'](_0x2bff('0xe8'))){_0x3e9bf1[_0x2bff('0x29')](this[_0x2bff('0x20')](_0x938b01,_0x141e1d));const _0x57ff64=_0x3e9bf1[_0x3e9bf1['length']-0x1];null!==_0x141e1d&&(_0x141e1d=_0x57ff64['is']('element',_0x2bff('0x86'))?_0x57ff64['getAttribute'](_0x2bff('0x8'))+0x1:_0x57ff64[_0x2bff('0xd1')](_0x2bff('0x17'))+0x1);}else for(let _0x39b758=0x0;_0x39b758<_0x938b01[_0x2bff('0xcc')];_0x39b758++)_0x3e9bf1[_0x2bff('0x29')](new _0x296fc7(_0x2bff('0x86'),{'vid':null===_0x141e1d?this[_0x2bff('0xe2')]++:_0x141e1d++}));if(_0x2a3795['is'](_0x2bff('0xf3'))){const _0x3a5e50=H(_0x2a3795['rootName']);return _0x3a5e50['_insertChild'](0x0,_0x3e9bf1),_0x3a5e50;}return _0x3a2e23['_setAttribute']('vid_end',null===_0x141e1d?this['_revisionId']++:_0x141e1d++),_0x3a2e23[_0x2bff('0xb5')](0x0,_0x3e9bf1),_0x3a2e23;}['_calculateMetaData'](_0x3e3c75,_0x21b964,_0x3a64ad){this['_reset']();const {roots:_0x33b8f2,markers:_0x7c909f,rootsAttributes:_0x5a0306}=this['_savedMetaData']['get'](_0x3e3c75);this[_0x2bff('0x89')]=new Map(_0x33b8f2),this[_0x2bff('0xc7')]=new Map(_0x57291b(_0x5a0306));for(const [_0x2fd3bd,_0x130f95]of this[_0x2bff('0x89')])if(_0x2bff('0x4b')!==_0x2fd3bd&&(this['_diffRoots'][_0x2bff('0x8d')](_0x2fd3bd,J(_0x130f95)),this['_diffRootsAttributes']=new Map(_0x57291b(_0x5a0306)),_0x3a64ad)){const _0x194c3e=this['_revisionId'];this[_0x2bff('0x41')][_0x2bff('0x8d')](_0x2fd3bd,this[_0x2bff('0x20')](_0x130f95)),this[_0x2bff('0x9b')]['set'](_0x2fd3bd,this['_makeIdsRoot'](_0x130f95,_0x194c3e));}this['_startingRevisionId']=this[_0x2bff('0xe2')],this[_0x2bff('0x57')]['set']('$graveyard',J(this['_baseRoots'][_0x2bff('0x49')]('$graveyard'))),_0x3a64ad&&this[_0x2bff('0x41')][_0x2bff('0x8d')](_0x2bff('0x4b'),this['_makeIdsRoot'](this[_0x2bff('0x89')][_0x2bff('0x49')](_0x2bff('0x4b'))));for(const [_0x4dda52,_0x11a078]of _0x7c909f){const _0x3145ad=this[_0x2bff('0x89')][_0x2bff('0x49')](_0x11a078[_0x2bff('0x98')]),_0x2fbfe6=this[_0x2bff('0x57')][_0x2bff('0x49')](_0x11a078[_0x2bff('0x98')]),_0x340263=new _0x3ae9d1(this[_0x2bff('0xa9')](_0x11a078[_0x2bff('0xbb')],_0x3145ad),this[_0x2bff('0xa9')](_0x11a078['end'],_0x3145ad)),_0x19f52b=this['_fixRange'](_0x340263,_0x2fbfe6);_0x3145ad[_0x2bff('0xb8')]['set'](_0x4dda52,_0x340263),this[_0x2bff('0x31')][_0x2bff('0x8d')](_0x4dda52,_0x19f52b);}this['_applyOperations'](_0x3e3c75,_0x21b964,_0x3a64ad);}[_0x2bff('0x36')](_0x41e6f3,_0x5bf3fb,_0x55f5dd){for(const _0x5bc3aa of this['source']['getOperations'](_0x41e6f3,_0x5bf3fb))this[_0x2bff('0xbf')](_0x5bc3aa,_0x55f5dd);for(const _0x4340b6 of this['_diffRoots'][_0x2bff('0x13')]())_0x4340b6[_0x2bff('0xb8')][_0x2bff('0xf4')]();for(const [_0x4648e2,_0x54b10b]of this['_markers']){this[_0x2bff('0x57')][_0x2bff('0x49')](_0x54b10b[_0x2bff('0x94')][_0x2bff('0x98')])[_0x2bff('0xb8')][_0x2bff('0x8d')](_0x4648e2,_0x54b10b[_0x2bff('0x55')]());}const _0x48df9d=new Map(),_0x130b4f=new Map();for(const [_0x1d096b,_0x3b2b66]of this['_diffRoots'])_0x48df9d[_0x2bff('0x8d')](_0x1d096b,J(_0x3b2b66)),_0x130b4f['set'](_0x1d096b,this[_0x2bff('0xe3')]['get'](_0x1d096b));this[_0x2bff('0xb2')](_0x5bf3fb,_0x48df9d,this[_0x2bff('0x31')],_0x130b4f);}[_0x2bff('0xec')](_0x3a4ac4){const _0x17f282=Array['from'](this[_0x2bff('0xdc')][_0x2bff('0xf7')]());_0x17f282['sort']((_0x145a9d,_0xc65902)=>_0x145a9d-_0xc65902),_0x17f282['reverse']();for(const _0x47d3dd of _0x17f282)if(_0x47d3dd<_0x3a4ac4)return _0x47d3dd;return Number[_0x2bff('0x5a')];}[_0x2bff('0xc8')](_0x2eca8c,_0x1f7e70){const _0x3dd10e=Array[_0x2bff('0x6b')](_0x1f7e70[_0x2bff('0xb8')])[_0x2bff('0x51')](([_0x3b3df3,_0x4843fd])=>[_0x3b3df3,this[_0x2bff('0xd6')](_0x4843fd,_0x2eca8c)]);_0x2eca8c[_0x2bff('0xb8')]=new Map(_0x3dd10e);}[_0x2bff('0x44')](_0xd32332){for(const _0x363507 of this['_markers'][_0x2bff('0x13')]()){const _0x3e8fd5=_0x363507['getTransformedByOperation'](_0xd32332),_0x15dc12=_0x3ae9d1[_0x2bff('0xb')](_0x3e8fd5);_0x363507['start']=_0x15dc12[_0x2bff('0xbb')],_0x363507[_0x2bff('0xa0')]=_0x15dc12[_0x2bff('0xa0')];}}['_handleOperation'](_0x1b8d4d,_0x3f96db){if(_0x2bff('0xf5')==_0x1b8d4d[_0x2bff('0x4d')]||_0x2bff('0x1e')==_0x1b8d4d['type'])return void this[_0x2bff('0x4c')](_0x1b8d4d,_0x3f96db);if('insert'==_0x1b8d4d[_0x2bff('0x4d')]){const _0x5c5595=_0x1b8d4d['position'][_0x2bff('0x94')][_0x2bff('0x98')];this[_0x2bff('0x57')][_0x2bff('0x108')](_0x5c5595)||(this[_0x2bff('0x57')]['set'](_0x5c5595,H(_0x5c5595,!0x0)),this[_0x2bff('0xe3')][_0x2bff('0x8d')](_0x5c5595,{}),_0x3f96db&&this[_0x2bff('0x41')][_0x2bff('0x8d')](_0x5c5595,H(_0x5c5595,!0x0)));}if(_0x2bff('0xb1')==_0x1b8d4d['type']||'removeRootAttribute'==_0x1b8d4d['type']||'changeRootAttribute'==_0x1b8d4d[_0x2bff('0x4d')])return void this['_handleRootAttributeOperation'](_0x1b8d4d);const _0x43edff=this['_cloneOperation'](_0x1b8d4d,this[_0x2bff('0x57')]);if(_0x2bff('0x46')!==_0x1b8d4d[_0x2bff('0x4d')]&&(_0x43edff['_execute'](),this[_0x2bff('0x44')](_0x43edff)),_0x3f96db)switch(_0x43edff[_0x2bff('0x4d')]){case _0x2bff('0x109'):this[_0x2bff('0x79')](_0x1b8d4d);break;case'move':case _0x2bff('0x12'):case'reinsert':this[_0x2bff('0x3d')](_0x1b8d4d);break;case'merge':this[_0x2bff('0xa3')](_0x1b8d4d);break;case'split':this[_0x2bff('0x45')](_0x1b8d4d);break;case _0x2bff('0x46'):this[_0x2bff('0x8c')](_0x1b8d4d);}}[_0x2bff('0x53')](_0x5d17d9,_0x4784f6){const _0x457ff2=_0x5d17d9['clone']();return _0x457ff2[_0x2bff('0x42')]=_0x5d17d9[_0x2bff('0x42')],this[_0x2bff('0xf1')](_0x457ff2,_0x4784f6),_0x457ff2;}[_0x2bff('0x71')](_0x8587ed){return _0x8587ed[_0x2bff('0x51')](_0x559087=>{const _0x404b56=this[_0x2bff('0x102')](_0x559087);return Number(_0x559087[_0x2bff('0x99')][_0x2bff('0xd1')](_0x404b56));});}[_0x2bff('0xe4')](_0x38b67f,_0x2dda43){if(_0x38b67f['is']('element',_0x2bff('0x86')))_0x2dda43[_0x2bff('0x29')]({'item':_0x38b67f,'type':_0x2bff('0x14')});else{_0x38b67f['is'](_0x2bff('0xe8'))&&_0x2dda43[_0x2bff('0x29')]({'item':_0x38b67f,'type':_0x2bff('0xe6')});for(const _0x21daa2 of _0x38b67f[_0x2bff('0x90')]())this[_0x2bff('0xe4')](_0x21daa2,_0x2dda43);_0x38b67f['is'](_0x2bff('0xe8'))&&_0x2dda43[_0x2bff('0x29')]({'item':_0x38b67f,'type':_0x2bff('0x28')});}return _0x2dda43;}[_0x2bff('0xa7')](){const _0x1bcf6f=new Map(this[_0x2bff('0x9e')]),_0x508343=new Map(_0x1bcf6f),_0x3d2049=new Map(),_0x489b21={'insertions':{},'deletions':{}},_0xfcbfad={'insertions':{},'deletions':{}},_0x38be8d=new Map(),_0x41f4e2=new Set([...this[_0x2bff('0x89')][_0x2bff('0xf7')](),...this[_0x2bff('0x57')]['keys']()]);_0x41f4e2[_0x2bff('0x9f')](_0x2bff('0x4b'));for(const _0x4cb505 of _0x41f4e2){const _0x147526=this[_0x2bff('0x57')]['get'](_0x4cb505)||H(_0x4cb505,!0x1),_0xa7560=this[_0x2bff('0x89')][_0x2bff('0x49')](_0x4cb505)||H(_0x4cb505,!0x1);_0x147526[_0x2bff('0x38')]()||_0xa7560[_0x2bff('0x38')]()?(_0x489b21['insertions'][_0x4cb505]=J(_0x147526),_0x489b21[_0x2bff('0x103')][_0x4cb505]=J(_0xa7560),this[_0x2bff('0xc8')](_0x489b21[_0x2bff('0x103')][_0x4cb505],_0xa7560),this['_copyMarkers'](_0x489b21[_0x2bff('0x4a')][_0x4cb505],_0x147526),_0xfcbfad[_0x2bff('0x4a')][_0x4cb505]=this['_generateTape'](this[_0x2bff('0x41')]['get'](_0x4cb505),[]),_0xfcbfad[_0x2bff('0x103')][_0x4cb505]=this[_0x2bff('0xe4')](this[_0x2bff('0x9b')][_0x2bff('0x49')](_0x4cb505)||H(_0x4cb505,!0x1),[])):_0x41f4e2[_0x2bff('0x9f')](_0x4cb505);}for(const _0x17d980 of _0x41f4e2){const _0x477ff1=_0xfcbfad['insertions'][_0x17d980];for(const _0x3ffdcc of _0x477ff1){const _0xb8e1e7=this[_0x2bff('0x102')](_0x3ffdcc),_0x5e4b65=_0x3ffdcc[_0x2bff('0x99')][_0x2bff('0xd1')](_0xb8e1e7);_0x508343['delete'](_0x5e4b65),_0x5e4b65>=this['_startingRevisionId']&&_0x3d2049[_0x2bff('0x8d')](_0x5e4b65,_0x1bcf6f['get'](_0x5e4b65));}}for(const _0x2bd62d of _0x41f4e2){const _0x5b38d9=_0xfcbfad[_0x2bff('0x4a')][_0x2bd62d],_0x9a71b9=this[_0x2bff('0x71')](_0xfcbfad[_0x2bff('0x103')][_0x2bd62d]);let _0x430377=0x0;for(const _0x442edf of _0x5b38d9){const _0x5d6240=this['_getVidAttributeName'](_0x442edf),_0x342adf=_0x442edf[_0x2bff('0x99')][_0x2bff('0xd1')](_0x5d6240);if(!_0x3d2049['has'](_0x342adf)&&!_0x38be8d['has'](_0x342adf)){if(_0x508343['has'](_0x342adf))_0x430377++;else{if(_0x342adf!=_0x9a71b9[_0x430377]){const _0x211063=_0x1bcf6f[_0x2bff('0x49')](_0x342adf)||_0x1bcf6f[_0x2bff('0x49')](_0x9a71b9[_0x430377]);for(;_0x342adf!=_0x9a71b9[_0x430377];)_0x508343['has'](_0x9a71b9[_0x430377])||(_0x38be8d[_0x2bff('0x8d')](_0x9a71b9[_0x430377],_0x211063),_0x1bcf6f[_0x2bff('0x8d')](_0x9a71b9[_0x430377],_0x211063)),_0x430377++;}_0x430377++;}}}}for(const _0x238ff2 of _0x41f4e2){const _0x1207f8=_0xfcbfad[_0x2bff('0x4a')][_0x238ff2];for(const _0x725a72 of _0x1207f8){const _0x2cd62b=this[_0x2bff('0x102')](_0x725a72),_0x3f88d0=_0x725a72[_0x2bff('0x99')][_0x2bff('0xd1')](_0x2cd62b);if(_0x38be8d[_0x2bff('0x108')](_0x3f88d0)){const _0x3dc9f7=_0x38be8d[_0x2bff('0x49')](_0x3f88d0);_0x508343[_0x2bff('0x108')](_0x3f88d0)||_0x508343[_0x2bff('0x8d')](_0x3f88d0,{..._0x3dc9f7}),_0x3d2049[_0x2bff('0x8d')](_0x3f88d0,{..._0x3dc9f7});}}}for(const _0x1e4ad3 of _0x508343[_0x2bff('0xf7')]())_0x1e4ad3>=this[_0x2bff('0x91')]&&_0x508343['delete'](_0x1e4ad3);const _0x389eb8=new Map();for(const _0x20b800 of _0x41f4e2){let _0x34732b=_0xfcbfad[_0x2bff('0x4a')][_0x20b800];for(const _0x5b5a16 of _0x34732b)if(_0x5b5a16[_0x2bff('0x99')]['is'](_0x2bff('0xe8'),_0x2bff('0xed'))){const _0x32935c=this[_0x2bff('0x102')](_0x5b5a16),_0x12c887=_0x5b5a16[_0x2bff('0x99')]['getAttribute'](_0x32935c);if(_0x3d2049[_0x2bff('0x108')](_0x12c887)){const _0x8752b4=_0x5b5a16[_0x2bff('0x99')]['parent'][_0x2bff('0x106')][_0x2bff('0xd1')](_0x2bff('0xc1')),_0xebeb4a=_0x389eb8['get'](_0x8752b4)||new Set();_0xebeb4a['add'](_0x3d2049['get'](_0x12c887)[_0x2bff('0x65')]),_0x389eb8[_0x2bff('0x8d')](_0x8752b4,_0xebeb4a);}}_0x34732b=_0xfcbfad[_0x2bff('0x103')][_0x20b800];for(const _0x27e6b9 of _0x34732b)if(_0x27e6b9[_0x2bff('0x99')]['is']('element',_0x2bff('0xed'))){const _0x276001=this['_getVidAttributeName'](_0x27e6b9),_0x15a98a=_0x27e6b9[_0x2bff('0x99')][_0x2bff('0xd1')](_0x276001);if(_0x508343[_0x2bff('0x108')](_0x15a98a)){const _0x19868a=_0x27e6b9[_0x2bff('0x99')][_0x2bff('0x106')][_0x2bff('0x106')]['getAttribute'](_0x2bff('0xc1')),_0x56ba6b=_0x389eb8[_0x2bff('0x49')](_0x19868a)||new Set();_0x56ba6b['add'](_0x508343[_0x2bff('0x49')](_0x15a98a)[_0x2bff('0x65')]),_0x389eb8[_0x2bff('0x8d')](_0x19868a,_0x56ba6b);}}for(const _0x3b5983 of _0x389eb8[_0x2bff('0xf7')]())(_0x3d2049['has'](_0x3b5983)||_0x508343[_0x2bff('0x108')](_0x3b5983))&&_0x389eb8[_0x2bff('0x9f')](_0x3b5983);}for(const _0x66a0e4 of _0x41f4e2){const _0x38371b=_0xfcbfad['insertions'][_0x66a0e4];let _0x24ae05=null,_0x37104a=null;for(const _0x24baec of _0x38371b){const _0x1c7cf8=this[_0x2bff('0x102')](_0x24baec),_0x4f22c7=_0x24baec['item'][_0x2bff('0xd1')](_0x1c7cf8),_0x1f1815=_0x389eb8[_0x2bff('0x49')](_0x4f22c7);_0x1f1815&&_0x2bff('0xe6')==_0x24baec[_0x2bff('0x4d')]&&(_0x24ae05=Array[_0x2bff('0x6b')](_0x1f1815)[0x0],_0x37104a=_0x24baec['item'][_0x2bff('0xd1')](_0x2bff('0x17'))),_0x24ae05&&(_0x508343[_0x2bff('0x8d')](_0x4f22c7,{'userId':_0x24ae05}),_0x3d2049[_0x2bff('0x8d')](_0x4f22c7,{'userId':_0x24ae05})),_0x4f22c7==_0x37104a&&(_0x24ae05=null,_0x37104a=null);}}const _0x51de9b={},_0x1ac578=new Set();for(const _0x15fb6c of _0x41f4e2){const _0x89b120=_0x489b21[_0x2bff('0x103')][_0x15fb6c],_0x3039ec=_0x489b21[_0x2bff('0x4a')][_0x15fb6c];for(const {userId:_0x348ce5}of this[_0x2bff('0xdb')]['values']())null!==_0x348ce5&&_0x1ac578[_0x2bff('0xbd')](_0x348ce5);for(const {userId:_0x15023e}of this[_0x2bff('0x26')]['values']())null!==_0x15023e&&_0x1ac578[_0x2bff('0xbd')](_0x15023e);this['_markChanges'](_0x3039ec,_0xfcbfad['insertions'][_0x15fb6c],_0x3d2049,_0x2bff('0x8e'),_0x1ac578),this[_0x2bff('0xab')](_0x89b120,_0xfcbfad[_0x2bff('0x103')][_0x15fb6c],_0x508343,'deletion',_0x1ac578),_0x51de9b[_0x15fb6c]={'insertions':this[_0x2bff('0x70')](_0x3039ec),'deletions':this['_prepareViewToSave'](_0x89b120),'attachChange':this['_touchedRoots'][_0x2bff('0x49')](_0x15fb6c)||null,'attributesBefore':_0x57291b(this['_baseRootsAttributes'][_0x2bff('0x49')](_0x15fb6c))||{},'attributesAfter':_0x57291b(this[_0x2bff('0xe3')][_0x2bff('0x49')](_0x15fb6c))};}return{'diffData':_0x51de9b,'authorsIds':Array['from'](_0x1ac578)};}[_0x2bff('0x107')](_0x5ea67e){for(const [,_0x2c7ec0]of _0x5ea67e[_0x2bff('0xb8')]){const _0x391f7a=_0x2c7ec0['start'][_0x2bff('0x7f')]()[_0x2bff('0xf0')](_0x1e332e=>_0x2bff('0xed')==_0x1e332e[_0x2bff('0xaa')]);for(const _0x166d6f of _0x391f7a)0x1==_0x166d6f[_0x2bff('0xd0')]&&_0x166d6f[_0x2bff('0x83')](0x0)['is'](_0x2bff('0xe8'),_0x2bff('0x15'))&&_0x166d6f[_0x2bff('0x83')](0x0)[_0x2bff('0x16')](_0x2bff('0xee'),!0x0);}}[_0x2bff('0x70')](_0x1b7eb2){this[_0x2bff('0x107')](_0x1b7eb2);const _0xd20345=this[_0x2bff('0x5c')][_0x2bff('0x60')][_0x2bff('0xc2')](_0x1b7eb2,{}),_0x34868d=Array[_0x2bff('0x6b')](_0xd20345['getChildren']())[_0x2bff('0x51')](_0x39b33e=>this[_0x2bff('0x48')](_0x39b33e));return JSON['stringify'](_0x34868d);}['_getViewJson'](_0x44155c){if(_0x44155c['is']('$text'))return _0x44155c[_0x2bff('0x60')];{const _0x44e75d=_0x44155c;return{'type':Object['keys'](F)['find'](_0xfdb620=>_0x44155c instanceof F[_0xfdb620]),'name':_0x44e75d[_0x2bff('0xaa')],'attributes':Array[_0x2bff('0x6b')](_0x44e75d['getAttributes']()),'children':Array[_0x2bff('0x6b')](_0x44e75d[_0x2bff('0x90')]())['map'](_0x52262e=>this[_0x2bff('0x48')](_0x52262e))};}}['_markChanges'](_0xf6473,_0x28da88,_0x464773,_0x4c9cb0,_0x4bb602){let _0x4030cb=null,_0x17a066=null,_0x1314cc=0x0;const _0x186117=this[_0x2bff('0x5c')][_0x2bff('0x10')];for(let _0x2e6832=0x0;_0x2e6832<_0x28da88[_0x2bff('0x9d')];_0x2e6832++){const _0x4b3f4a=this['_getVidAttributeName'](_0x28da88[_0x2e6832]),_0x9b4917=_0x28da88[_0x2e6832][_0x2bff('0x99')][_0x2bff('0xd1')](_0x4b3f4a),_0x151dfd=_0x464773[_0x2bff('0x49')](_0x9b4917),_0x56090e=_0x2e6832==_0x28da88['length']-0x1;(!_0x4030cb&&_0x151dfd&&(_0x4030cb=_0x151dfd,_0x17a066=_0x28da88[_0x2e6832]),_0x4030cb&&(!_0x151dfd||_0x151dfd['userId']!=_0x4030cb[_0x2bff('0x65')]))&&(_0x337b79(_0x151dfd,q(_0x17a066,_0xf6473,_0x186117),q(_0x28da88[_0x2e6832],_0xf6473,_0x186117)),_0x4030cb=_0x151dfd||null,_0x17a066=_0x151dfd?_0x28da88[_0x2e6832]:null),_0x4030cb&&_0x56090e&&_0x337b79(_0x151dfd,q(_0x17a066,_0xf6473,_0x186117),G(_0x28da88[_0x2e6832],_0xf6473,_0x186117));}function _0x337b79(_0x502b53,_0x1db8f0,_0x34d086){const _0x17017f=_0x4030cb[_0x2bff('0x65')],_0x1784c1='revision:'+_0x4c9cb0+':'+_0x17017f+':'+_0x1314cc++,_0x59bbc6=_0x186117[_0x2bff('0x34')](_0x1db8f0,_0x34d086);_0xf6473['markers'][_0x2bff('0x8d')](_0x1784c1,_0x59bbc6),null!==_0x17017f&&_0x4bb602['add'](_0x17017f);}}['_getVidAttributeName'](_0x506e0e){switch(_0x506e0e['type']){case _0x2bff('0xe6'):return _0x2bff('0xc1');case _0x2bff('0x28'):return'vid_end';default:return'vid';}}[_0x2bff('0xf1')](_0x22dfd6,_0x508bc9){_0x22dfd6['baseVersion']=null;for(const _0x38e42c in _0x22dfd6){const _0x177311=_0x22dfd6[_0x38e42c];if(_0x177311 instanceof _0x28d65f){const _0x2eddb5=_0x508bc9[_0x2bff('0x49')](_0x177311['root']['rootName']);_0x22dfd6[_0x38e42c]=this[_0x2bff('0xa9')](_0x177311,_0x2eddb5);}if(_0x177311 instanceof _0x3ae9d1){const _0x57ef39=_0x508bc9['get'](_0x177311[_0x2bff('0x94')][_0x2bff('0x98')]);_0x22dfd6[_0x38e42c]=this[_0x2bff('0xd6')](_0x177311,_0x57ef39);}_0x2bff('0x94')===_0x38e42c&&(_0x22dfd6['root']=_0x508bc9[_0x2bff('0x49')](_0x22dfd6[_0x2bff('0x94')][_0x2bff('0x98')]));}}[_0x2bff('0xd6')](_0x5dffdd,_0x2f82c2){return this['editor']['model'][_0x2bff('0x34')](this[_0x2bff('0xa9')](_0x5dffdd[_0x2bff('0xbb')],_0x2f82c2),this[_0x2bff('0xa9')](_0x5dffdd['end'],_0x2f82c2));}[_0x2bff('0xa9')](_0x159d4e,_0x23d4c2){return this[_0x2bff('0x5c')][_0x2bff('0x10')][_0x2bff('0xa4')](_0x23d4c2,_0x159d4e[_0x2bff('0x39')],_0x159d4e[_0x2bff('0x66')]);}['_handleInsertOperation'](_0xeb6c97){const _0x133938=this[_0x2bff('0x41')][_0x2bff('0x49')](_0xeb6c97['position']['root'][_0x2bff('0x98')]),_0x2fe1a4=this['_fixPosition'](_0xeb6c97[_0x2bff('0xc6')],_0x133938),_0x2bb475=null===_0xeb6c97['_authorId']?null:_0xeb6c97['_authorId']||this[_0x2bff('0x5c')][_0x2bff('0xa2')][_0x2bff('0x49')](_0x2bff('0x40'))['me']['id'],_0x4ebf5c=_0x2fe1a4['parent'],_0x533794=this[_0x2bff('0xe2')],_0x2fff9e=[];for(const _0xc3ba0d of _0xeb6c97[_0x2bff('0x5b')])if(_0xc3ba0d['is']('element'))_0x2fff9e['push'](this[_0x2bff('0x20')](_0xc3ba0d));else for(let _0x1e9033=0x0;_0x1e9033<_0xc3ba0d[_0x2bff('0xcc')];_0x1e9033++)_0x2fff9e[_0x2bff('0x29')](new _0x296fc7(_0x2bff('0x86'),{'vid':this['_revisionId']++}));const _0x478199=this[_0x2bff('0xe2')];for(let _0x24ead3=_0x533794;_0x24ead3<_0x478199;_0x24ead3++)this[_0x2bff('0x9e')]['set'](_0x24ead3,{'userId':_0x2bb475});_0x4ebf5c[_0x2bff('0xb5')](_0x2fe1a4[_0x2bff('0xfe')],_0x2fff9e);}[_0x2bff('0x3d')](_0x599a18){(_0x599a18=this[_0x2bff('0x53')](_0x599a18,this[_0x2bff('0x41')]))['_execute']();const _0x2b9f23=null===_0x599a18[_0x2bff('0x42')]?null:_0x599a18[_0x2bff('0x42')]||this[_0x2bff('0x5c')][_0x2bff('0xa2')][_0x2bff('0x49')](_0x2bff('0x40'))['me']['id'],_0x56ddba=_0x599a18[_0x2bff('0xbe')](),_0x5b39bd=_0x56ddba[_0x2bff('0x106')],_0x1f8233=_0x56ddba['offset'];!function _0x3df1de(_0x24c466,_0x3508c8,_0x5cf600,_0x62aa6e){for(let _0x52cf0a=_0x5cf600;_0x52cf0a<_0x62aa6e;_0x52cf0a++){const _0x2f256b=_0x3508c8['getChild'](_0x52cf0a);_0x2f256b['is'](_0x2bff('0xe8'),_0x2bff('0x86'))?_0x24c466['set'](_0x2f256b[_0x2bff('0xd1')]('vid'),{'userId':_0x2b9f23}):(_0x24c466[_0x2bff('0x8d')](_0x2f256b['getAttribute'](_0x2bff('0xc1')),{'userId':_0x2b9f23}),_0x3df1de(_0x24c466,_0x2f256b,0x0,_0x2f256b[_0x2bff('0xd0')]),_0x24c466['set'](_0x2f256b[_0x2bff('0xd1')](_0x2bff('0x17')),{'userId':_0x2b9f23}));}}(this[_0x2bff('0x9e')],_0x5b39bd,_0x1f8233,_0x1f8233+_0x599a18[_0x2bff('0xf2')]);}['_handleMergeOperation'](_0xc517ce){const _0x2f6602=null===(_0xc517ce=this['_cloneOperation'](_0xc517ce,this[_0x2bff('0x41')]))['_authorId']?null:_0xc517ce['_authorId']||this['editor'][_0x2bff('0xa2')][_0x2bff('0x49')](_0x2bff('0x40'))['me']['id'],_0x57d6c5=_0xc517ce[_0x2bff('0x88')][_0x2bff('0x106')],_0x5cc533=_0xc517ce[_0x2bff('0x69')][_0x2bff('0x106')],_0x2fd0f6=_0x57d6c5[_0x2bff('0xd1')](_0x2bff('0x17')),_0x57601d=_0x5cc533[_0x2bff('0xd1')](_0x2bff('0xc1'));_0x57d6c5[_0x2bff('0x16')](_0x2bff('0x17'),_0x5cc533[_0x2bff('0xd1')](_0x2bff('0x17'))),_0x5cc533[_0x2bff('0x16')]('vid_end',_0x2fd0f6),this[_0x2bff('0x9e')][_0x2bff('0x8d')](_0x57601d,{'userId':_0x2f6602}),this[_0x2bff('0x9e')][_0x2bff('0x8d')](_0x2fd0f6,{'userId':_0x2f6602}),_0xc517ce[_0x2bff('0x33')]();}[_0x2bff('0x45')](_0x23aeec){const _0x57df7d=null===(_0x23aeec=this[_0x2bff('0x53')](_0x23aeec,this[_0x2bff('0x41')]))[_0x2bff('0x42')]?null:_0x23aeec['_authorId']||this[_0x2bff('0x5c')]['plugins'][_0x2bff('0x49')](_0x2bff('0x40'))['me']['id'],_0x19e77c=_0x23aeec[_0x2bff('0xb7')],_0x1cbd74=_0x23aeec[_0x2bff('0xf9')][_0x2bff('0x106')];_0x23aeec['_execute']();const _0x10ef22=_0x1cbd74['getAttribute'](_0x2bff('0x17')),_0x4e0df8=_0x23aeec['insertionPosition'][_0x2bff('0xef')];if(_0x19e77c){const _0x3eef90=_0x4e0df8[_0x2bff('0xd1')](_0x2bff('0x17')),_0x1553ad=_0x1cbd74[_0x2bff('0xd1')](_0x2bff('0x17'));_0x1cbd74[_0x2bff('0x16')]('vid_end',_0x3eef90),_0x4e0df8[_0x2bff('0x16')]('vid_end',_0x1553ad),this[_0x2bff('0x9e')]['set'](_0x1cbd74[_0x2bff('0xd1')](_0x2bff('0x17')),{'userId':_0x57df7d}),this['_touched']['set'](_0x4e0df8[_0x2bff('0xd1')](_0x2bff('0xc1')),{'userId':_0x57df7d});}else{const _0x117fa9=this[_0x2bff('0xe2')]++,_0x279c37=this[_0x2bff('0xe2')]++;_0x1cbd74[_0x2bff('0x16')](_0x2bff('0x17'),_0x117fa9),_0x4e0df8['_setAttribute'](_0x2bff('0xc1'),_0x279c37),_0x4e0df8['_setAttribute'](_0x2bff('0x17'),_0x10ef22),this['_touched'][_0x2bff('0x8d')](_0x117fa9,{'userId':_0x57df7d}),this[_0x2bff('0x9e')][_0x2bff('0x8d')](_0x279c37,{'userId':_0x57df7d});}}['_handleMarkerOperation'](_0x19c526){if(!_0x19c526['affectsData'])return;const _0x3fe391=(_0x19c526=this[_0x2bff('0x53')](_0x19c526,this['_diffRoots']))[_0x2bff('0xf')]?_0x19c526[_0x2bff('0xf')]['root']:null,_0x5e7c3e=_0x19c526[_0x2bff('0xce')]?_0x19c526[_0x2bff('0xce')][_0x2bff('0x94')]:null;_0x3fe391&&this[_0x2bff('0x31')][_0x2bff('0x9f')](_0x19c526[_0x2bff('0xaa')]),_0x5e7c3e&&this['_markers']['set'](_0x19c526['name'],_0x19c526[_0x2bff('0xce')]['clone']());const _0x1a81b5=null===_0x19c526[_0x2bff('0x42')]?null:_0x19c526[_0x2bff('0x42')]||this[_0x2bff('0x5c')][_0x2bff('0xa2')][_0x2bff('0x49')](_0x2bff('0x40'))['me']['id'],_0x164bc6=_0x19c526[_0x2bff('0xaa')];if(!this[_0x2bff('0xdb')]['has'](_0x164bc6))return void this['_touchedMarkers'][_0x2bff('0x8d')](_0x164bc6,{'range':_0x19c526['oldRange'],'userId':_0x1a81b5});const _0x48a71e=this['_touchedMarkers'][_0x2bff('0x49')](_0x164bc6),_0x5b9735=_0x48a71e[_0x2bff('0x9c')],_0x3526d9=_0x19c526['newRange'];null==_0x5b9735&&null==_0x3526d9||_0x5b9735&&_0x3526d9&&_0x5b9735[_0x2bff('0x37')](_0x3526d9)?this['_touchedMarkers'][_0x2bff('0x9f')](_0x19c526[_0x2bff('0xaa')]):_0x48a71e[_0x2bff('0x65')]=_0x1a81b5;}[_0x2bff('0x4c')](_0x4bb76b,_0x20cda1){this[_0x2bff('0x57')][_0x2bff('0x108')](_0x4bb76b[_0x2bff('0x98')])?this[_0x2bff('0x57')][_0x2bff('0x49')](_0x4bb76b['rootName'])[_0x2bff('0xfa')]=_0x4bb76b[_0x2bff('0xea')]:(this[_0x2bff('0x57')][_0x2bff('0x8d')](_0x4bb76b[_0x2bff('0x98')],H(_0x4bb76b[_0x2bff('0x98')],!0x0)),this[_0x2bff('0xe3')]['set'](_0x4bb76b['rootName'],{}),_0x20cda1&&this[_0x2bff('0x41')][_0x2bff('0x8d')](_0x4bb76b[_0x2bff('0x98')],H(_0x4bb76b[_0x2bff('0x98')],!0x0)));const _0x45632f=null===_0x4bb76b[_0x2bff('0x42')]?null:_0x4bb76b['_authorId']||this[_0x2bff('0x5c')][_0x2bff('0xa2')][_0x2bff('0x49')](_0x2bff('0x40'))['me']['id'],_0x309a44=this[_0x2bff('0x26')][_0x2bff('0x49')](_0x4bb76b[_0x2bff('0x98')]);_0x309a44&&_0x309a44[_0x2bff('0x65')]===_0x45632f?this['_touchedRoots']['delete'](_0x4bb76b[_0x2bff('0x98')]):this[_0x2bff('0x26')][_0x2bff('0x8d')](_0x4bb76b[_0x2bff('0x98')],{'userId':_0x45632f,'isAttached':_0x4bb76b['isAdd']});}['_handleRootAttributeOperation'](_0x480607){const _0x17cd1b=this[_0x2bff('0xe3')][_0x2bff('0x49')](_0x480607[_0x2bff('0x94')]['rootName']);null===_0x480607[_0x2bff('0x7c')]?delete _0x17cd1b[_0x480607['key']]:_0x17cd1b[_0x480607[_0x2bff('0xa1')]]=_0x480607['newValue'];}}function J(_0x25147d){const _0x2ae4c7=H(_0x25147d['rootName'],_0x25147d[_0x2bff('0x38')]());for(const _0x4e759b of _0x25147d[_0x2bff('0x90')]()){const _0x2f2205=_0x4e759b[_0x2bff('0x1c')](!0x0);_0x2ae4c7[_0x2bff('0x19')](_0x2f2205);}return _0x2ae4c7;}function H(_0x1b50ff,_0x113737=!0x0){const _0x3450f9=new _0x1aa4f2();return _0x3450f9[_0x2bff('0x98')]=_0x1b50ff,_0x3450f9[_0x2bff('0xfa')]=_0x113737,_0x3450f9[_0x2bff('0x38')]=()=>_0x3450f9['_isAttached'],_0x3450f9;}function q(_0x16ff66,_0x4d0bd5,_0xe0174f){const _0x3a243e='elementEnd'==_0x16ff66[_0x2bff('0x4d')]?_0xe0174f[_0x2bff('0x52')](_0x16ff66['item'],_0x2bff('0xa0')):_0xe0174f['createPositionBefore'](_0x16ff66[_0x2bff('0x99')]);return _0xe0174f[_0x2bff('0xa4')](_0x4d0bd5,_0x3a243e['path'],_0x3a243e[_0x2bff('0x66')]);}function G(_0x2f76a7,_0x218d5c,_0x4769be){const _0x3f368c=_0x2bff('0xe6')==_0x2f76a7[_0x2bff('0x4d')]?_0x4769be[_0x2bff('0x52')](_0x2f76a7[_0x2bff('0x99')],0x0):_0x4769be['createPositionAfter'](_0x2f76a7[_0x2bff('0x99')]);return _0x4769be[_0x2bff('0xa4')](_0x218d5c,_0x3f368c['path'],_0x3f368c[_0x2bff('0x66')]);}
|
package/src/revisionviewer.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import '../theme/revisionviewer.css';
|
|
2
|
-
/**
|
|
3
|
-
function printTape( tape ) {
|
|
4
|
-
const elements = tape.map(
|
|
5
|
-
item => item.item.data ? item.item.data : item.type == 'elementStart' ? '<' + item.item.name + '>' : '</' + item.item.name + '>'
|
|
6
|
-
).join( '' );
|
|
7
|
-
|
|
8
|
-
const signs = tape.map( v => {
|
|
9
|
-
const item = v.item;
|
|
10
|
-
const sign = ( v.isAdded || v.isAddSuggestion ) ? v.isRemoved ? '=' : '+' : v.isRemoved ? '-' : ' ';
|
|
11
|
-
const len = item.data ? item.data.length : v.type == 'elementStart' ? item.name.length + 2 : item.name.length + 3;
|
|
12
|
-
|
|
13
|
-
return sign.repeat( len );
|
|
14
|
-
} ).join( '' );
|
|
15
|
-
|
|
16
|
-
console.log( elements );
|
|
17
|
-
console.log( signs );
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
window.printTape = printTape;
|
|
21
|
-
/**/
|
|
1
|
+
import '../theme/revisionviewer.css';
|
|
2
|
+
/**
|
|
3
|
+
function printTape( tape ) {
|
|
4
|
+
const elements = tape.map(
|
|
5
|
+
item => item.item.data ? item.item.data : item.type == 'elementStart' ? '<' + item.item.name + '>' : '</' + item.item.name + '>'
|
|
6
|
+
).join( '' );
|
|
7
|
+
|
|
8
|
+
const signs = tape.map( v => {
|
|
9
|
+
const item = v.item;
|
|
10
|
+
const sign = ( v.isAdded || v.isAddSuggestion ) ? v.isRemoved ? '=' : '+' : v.isRemoved ? '-' : ' ';
|
|
11
|
+
const len = item.data ? item.data.length : v.type == 'elementStart' ? item.name.length + 2 : item.name.length + 3;
|
|
12
|
+
|
|
13
|
+
return sign.repeat( len );
|
|
14
|
+
} ).join( '' );
|
|
15
|
+
|
|
16
|
+
console.log( elements );
|
|
17
|
+
console.log( signs );
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
window.printTape = printTape;
|
|
21
|
+
/**/
|