@ckeditor/ckeditor5-revision-history 48.3.1-alpha.0 → 48.3.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0x3f4f43();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0xe095ea){super(),this['id']=_0xe095ea['id']||_0x574201(),this['creator']=_0xe095ea['creator']||null,this['authors']=_0xe095ea['authors']||[],this['diffData']=_0xe095ea['diffData']||null,this['toVersion']=_0xe095ea['toVersion']||0x0,this['fromVersion']=_0xe095ea['fromVersion']||0x0,this['set']('name',_0xe095ea['name']||''),this['set']('createdAt',_0xe095ea['createdAt']||new Date()),this['set']('attributes',_0xe095ea['attributes']||{});}['setName'](_0x4bebc2){this['_update']({'name':_0x4bebc2});}['setAttribute'](_0x3a2f77,_0x198cdd){const _0xb72f26=_0xbd471f(this['attributes']);_0x522063(_0xb72f26,_0x3a2f77,_0x198cdd),this['_update']({'attributes':_0xb72f26});}['removeAttribute'](_0x1d15b3){const _0x4a64b9=_0xbd471f(this['attributes']);_0x1415cf(_0x4a64b9,_0x1d15b3),this['_update']({'attributes':_0x4a64b9});}['_update'](_0x56a69f,_0x39220a=!0x1){let _0x5ee10f=!0x1;const _0x535945={'id':this['id']};for(const _0x3dedca of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x5558d1=_0x56a69f[_0x3dedca];void 0x0!==_0x5558d1&&_0x5558d1!==this[_0x3dedca]&&(this[_0x3dedca]=_0x5558d1,_0x535945[_0x3dedca]=_0x5558d1,_0x5ee10f=!0x0);}_0x5ee10f&&(_0x535945['authors']&&(_0x535945['authorsIds']=_0x535945['authors']['map'](_0x1963dd=>_0x1963dd['id']),delete _0x535945['authors']),this['fire']('_update',_0x535945,_0x39220a));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x44d6cf=>_0x44d6cf['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x1dd727{['_revisions'];static get['requires'](){return[_0x1eaf94];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x307b56){super(_0x307b56),this['_revisions']=new _0x4f0ec3();}['afterInit'](){!async function(_0x2474a3){const _0x342860='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x26aa37=0xeb829,_0x52ce72=0x78fa8,_0x377d25=window['Date']['now'](),_0x5aa52c=_0x2474a3['editor'],_0x3cadc6=new window['Promise'](_0x2fd217=>{_0x5aa52c['once']('ready',_0x2fd217);}),_0x4efec7={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x327319=_0x5aa52c['config']['get']('licenseKey');async function _0x14d334(){let _0x44f5f8,_0x362454=null,_0x43a102=null;try{return'GPL'==_0x327319?'NotAllowed':(_0x44f5f8=_0x39d198(),_0x44f5f8?(_0x44f5f8['usageEndpoint']&&(_0x43a102=_0x44efed(_0x44f5f8['usageEndpoint'],_0x44f5f8['jti'])),await _0x1b9e9b()?_0x3e01ce()?_0xc9b3c4()?'Expired':_0x46b983()?('evaluation'==_0x44f5f8['licenseType']&&(_0x362454=_0x3c3422('EvaluationLimit')),await _0x341d3f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0xc9b3c4(){const _0x4cc77a=['evaluation','trial']['includes'](_0x44f5f8['licenseType'])?_0x377d25/0x3e8:0xe10*_0x52ce72;return _0x44f5f8['exp']<_0x4cc77a;}function _0x3e01ce(){const _0x6eebd1=_0x44f5f8['features'];if(!_0x6eebd1)return!0x1;if(_0x6eebd1['includes']('*'))return!0x0;if(_0x6eebd1['includes']('RH'))return!0x0;if(_0x6eebd1['includes']('RRH')){if(_0x13e73c())return!0x0;if(_0x142631()||_0x3ea97f())return!0x0;}return!0x1;}function _0x46b983(){const _0x5ce3bd=_0x44f5f8['licensedHosts'];if(!_0x5ce3bd||0x0==_0x5ce3bd['length'])return!0x0;const {hostname:_0x279e8b}=new URL(window['location']['href']);if(_0x5ce3bd['includes'](_0x279e8b))return!0x0;const _0xd4f51d=_0x279e8b['split']('.');return _0x5ce3bd['filter'](_0x385ae9=>_0x385ae9['includes']('*'))['map'](_0x10bb75=>_0x10bb75['split']('.'))['filter'](_0x1e80d8=>_0x1e80d8['length']<=_0xd4f51d['length'])['map'](_0x2e973a=>Array(_0xd4f51d['length']-_0x2e973a['length'])['fill']('*'===_0x2e973a[0x0]?'*':'')['concat'](_0x2e973a))['some'](_0x4571bb=>_0xd4f51d['every']((_0x22a10b,_0x509def)=>_0x4571bb[_0x509def]===_0x22a10b||'*'===_0x4571bb[_0x509def]));}function _0x341d3f(){return _0x362454&&_0x43a102?new window['Promise']((_0x40929b,_0x6ea630)=>{_0x362454['then'](_0x40929b,_0x6ea630),_0x43a102['then'](_0x4d2251=>{'Valid'!=_0x4d2251&&_0x40929b(_0x4d2251);},_0x6ea630);}):_0x362454||_0x43a102||'Valid';}}function _0x44efed(_0x310e69,_0x3742aa){return new window['Promise'](_0x5df892=>{if(_0x1c8901())return _0x5df892('Valid');_0x1130db(),_0x5aa52c['decorate']('_sendUsageRequest');let _0x310050=!0x1;const _0x1e67dd=_0x574201();function _0x2c761e(_0x1ede14){return!!_0x1ede14&&('object'==typeof _0x1ede14||'function'==typeof _0x1ede14)&&'function'==typeof _0x1ede14['then']&&'function'==typeof _0x1ede14['catch'];}function _0x439172(_0x7a2f7){_0x28fcf1(_0x7a2f7)['then'](_0x2f7655=>_0x2f7655&&'ok'==_0x2f7655['status']?_0x58b416(_0x2842cf(_0x1e67dd+_0x3742aa))!=_0x2f7655['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4874f2=>(_0x151e56(),_0x4874f2),()=>{const _0x46a3d1=_0x54d84b();return null==_0x46a3d1?(_0x151e56(),'Valid'):_0x377d25-_0x46a3d1>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5df892)['catch'](()=>{_0x5df892('UsageLimit');});const _0x26c66c=0x36ee80;function _0x151e56(){const _0x37a051='llct-'+_0x58b416(_0x2842cf(_0x310e69)),_0x1a9c41=_0x2996f3(_0x58b416(window['Math']['ceil'](_0x377d25/_0x26c66c)));window['localStorage']['setItem'](_0x37a051,_0x1a9c41);}function _0x54d84b(){const _0x50233e='llct-'+_0x58b416(_0x2842cf(_0x310e69)),_0x35b416=window['localStorage']['getItem'](_0x50233e);return _0x35b416?window['parseInt'](_0x2996f3(_0x35b416),0x10)*_0x26c66c:null;}function _0x28fcf1(_0x1a41ee){return new window['Promise']((_0x42a801,_0x454b9e)=>{_0x1a41ee['then'](_0x42a801,_0x454b9e),window['setTimeout'](_0x454b9e,0x1d4c0);});}}_0x5aa52c['on']('_sendUsageRequest',(_0xfb2ae9,_0x732655)=>{if(_0x732655[0x0]!=_0x310e69)return _0x5df892('UsageLimit');_0x732655[0x1]={..._0x732655[0x1],'requestId':_0x1e67dd};},{'priority':'high'}),_0x5aa52c['on']('_sendUsageRequest',_0x2f6edd=>{_0x2c761e(_0x2f6edd['return'])&&(_0x310050=!0x0,_0x439172(_0x2f6edd['return']));},{'priority':'low'}),_0x3cadc6['then'](()=>{_0x310050||_0x5df892('UsageLimit');});});function _0x1c8901(){return'auto'==_0x5aa52c['editing']['view']['_overlayModeHint'];}function _0x1130db(){_0x5aa52c['editing']['view']['_overlayModeHint']='auto';}}function _0x3c3422(_0x5c3b7f){const _0x513015=[new window['Promise'](_0x3f14f4=>setTimeout(_0x3f14f4,0x93ecc)),_0x3cadc6['then'](()=>new window['Promise'](_0xc5b650=>{const _0x11cbdb=0x7,_0x2612ff=_0x2474a3['_revisions'];function _0x4c3ee3(){_0x2612ff['length']>=_0x11cbdb&&_0xc5b650();}_0x4c3ee3(),_0x2612ff['on']('add',_0x4c3ee3);})),new window['Promise'](_0x24e665=>{function _0x2064f9(){for(const _0x3ad8ea in window)if(window['Number']['isNaN'](window['Number'](_0x3ad8ea))&&window[_0x3ad8ea]==_0x26aa37)return _0x24e665();'destroyed'!=_0x5aa52c['state']&&window['setTimeout'](_0x2064f9,0x1388);}_0x46fca4('RevisionViewer')&&_0x2064f9();})];return window['Promise']['race'](_0x513015)['then'](()=>_0x5c3b7f);}async function _0x434e7a(){if(await _0x3cadc6,_0x46fca4('RevisionViewer')){const _0x559fd4=_0x2474a3['getRevision'](0x0),_0x21a40e=_0x2474a3['getEarlierVisibleRevision'](_0x559fd4['id']),_0x3b2e16=_0x3fc4c7('RevisionViewer');return await _0x3b2e16['compare'](_0x559fd4['id'],_0x21a40e?_0x21a40e['id']:null,!0x0),_0x3b2e16['unbind']('isEnabled'),_0x3b2e16['isEnabled']=!0x1,_0x3b2e16['compare']=_0x291f3a,void(_0x3b2e16['_getDiff']=_0x291f3a);}if(_0x46fca4('RevisionTracker')){const _0x1c571e=_0x3fc4c7('RevisionTracker');_0x1c571e['unbind']('isEnabled'),_0x1c571e['isEnabled']=!0x1,_0x1c571e['update']=_0x291f3a,_0x1c571e['saveRevision']=_0x291f3a;}_0x5aa52c['model']['change']=_0x291f3a,_0x5aa52c['model']['enqueueChange']=_0x291f3a,_0x5aa52c['enableReadOnlyMode']('model');}function _0x13e73c(){return _0x46fca4('WebSocketGateway')&&'connected'==_0x3fc4c7('WebSocketGateway')['state'];}function _0x142631(){return _0x46fca4('RevisionViewerIntegration');}function _0x3ea97f(){return _0x46fca4('TrackChangesDataGetter');}function _0x15b967(_0x45ead5){const _0x1d061b=_0x35427a();_0x5aa52c[_0x1d061b]='revisionHistoryLicenseKey'+_0x45ead5,_0x45ead5['endsWith']('Limit')&&(window[_0x35427a()]=_0x26aa37),'Valid'!=_0x45ead5&&_0x434e7a();}function _0x35427a(){const _0x3143bd=window['String'](window['performance']['now']())['replace']('.','');let _0x224f1d='v';for(let _0xec9d03=0x0;_0xec9d03<_0x3143bd['length'];_0xec9d03+=0x2){let _0x4a3ea0=window['parseInt'](_0x3143bd['substring'](_0xec9d03,_0xec9d03+0x2));_0x4a3ea0>=0x3e&&(_0x4a3ea0-=0x3e),_0x224f1d+=_0x342860[_0x4a3ea0];}return _0x224f1d;}function _0x39d198(){const _0x3ea4c3=_0x327319['split']('.');if(0x3!=_0x3ea4c3['length'])return null;return _0x4675ac(_0x3ea4c3[0x1]);function _0x4675ac(_0x21de18){const _0x1a2134=_0x5540b3(_0x21de18);return _0x1a2134&&_0x563ad9()?_0x1a2134:null;function _0x563ad9(){const _0x5b470b=_0x1a2134['jti'],_0x347869=window['parseInt'](_0x5b470b['substring'](_0x5b470b['length']-0x8),0x10),_0x23d443={..._0x1a2134,'jti':_0x5b470b['substring'](0x0,_0x5b470b['length']-0x8)};return delete _0x23d443['vc'],_0x2842cf(_0x23d443)==_0x347869;}}}async function _0x1b9e9b(){let _0x5953ed=!0x0;try{const [_0x3faa7b,_0x35b6a4,_0x568863]=_0x327319['split']('.');return _0x473d49(_0x3faa7b),await _0x775e1d(_0x3faa7b,_0x35b6a4,_0x568863),_0x5953ed;}catch{return!0x1;}function _0x473d49(_0x9a4509){const _0x39528d=_0x5540b3(_0x9a4509);_0x39528d&&'ES256'==_0x39528d['alg']||(_0x5953ed=!0x1);}async function _0x775e1d(_0x389ca9,_0x568f7c,_0x533ec5){const _0x9d1bfd=window['Uint8Array']['from'](_0x398e0f(_0x533ec5),_0x65ad35=>_0x65ad35['charCodeAt'](0x0)),_0x91dcc3=new window['TextEncoder']()['encode'](_0x389ca9+'.'+_0x568f7c),_0x72c3da=window['crypto']['subtle'];if(!_0x72c3da)return;const _0x30a46f=await _0x72c3da['importKey']('jwk',_0x4efec7,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x72c3da['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x30a46f,_0x9d1bfd,_0x91dcc3)||(_0x5953ed=!0x1);}}function _0x5540b3(_0xb000d1){return _0xb000d1['startsWith']('ey')?JSON['parse'](_0x398e0f(_0xb000d1)):null;}function _0x398e0f(_0x210c73){return window['atob'](_0x210c73['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2842cf(_0x37ee9c){let _0x4db18d=0x1505;function _0x316e66(_0x87c91b){for(let _0x4ef985=0x0;_0x4ef985<_0x87c91b['length'];_0x4ef985++){const _0x3fc391=_0x87c91b['charCodeAt'](_0x4ef985);_0x4db18d=(_0x4db18d<<0x5)+_0x4db18d+_0x3fc391,_0x4db18d&=_0x4db18d;}}function _0x13e6e2(_0x360191){Array['isArray'](_0x360191)?_0x360191['forEach'](_0x13e6e2):_0x360191&&'object'==typeof _0x360191?Object['entries'](_0x360191)['sort']()['forEach'](([_0x46bb83,_0x321754])=>{_0x316e66(_0x46bb83),_0x13e6e2(_0x321754);}):_0x316e66(window['String'](_0x360191));}return _0x13e6e2(_0x37ee9c),_0x4db18d>>>0x0;}function _0x58b416(_0x56a65c){return _0x56a65c['toString'](0x10)['padStart'](0x8,'0');}function _0x2996f3(_0x27a346){return _0x27a346['split']('')['reverse']()['join']('');}function _0x46fca4(_0x2bcaa5){return _0x5aa52c['plugins']['has'](_0x2bcaa5);}function _0x3fc4c7(_0x49f5aa){return _0x5aa52c['plugins']['get'](_0x49f5aa);}function _0x291f3a(){}_0x15b967(await _0x14d334());}(this);}['createRevision'](_0x25bd17){const _0xe574=this['editor']['plugins']['get']('Users');return new gt({'id':_0x25bd17['id'],'name':_0x25bd17['name'],'creator':_0x25bd17['creatorId']?_0xe574['getUser'](_0x25bd17['creatorId']):null,'diffData':_0x25bd17['diffData']||_0x25bd17['data'],'authors':_0x25bd17['authorsIds']['map'](_0x3b3352=>_0xe574['getUser'](_0x3b3352)),'createdAt':new Date(_0x25bd17['createdAt']),'attributes':_0x25bd17['attributes'],'fromVersion':_0x25bd17['fromVersion'],'toVersion':_0x25bd17['toVersion']});}['addRevision'](_0x475550,_0x349f79=0x0){this['_revisions']['add'](_0x475550,_0x349f79);}['getRevision'](_0x291393){return this['_revisions']['get'](_0x291393);}['getRevisions'](_0x1c9500={'toJSON':!0x1}){const _0x1c2d1b=Array['from'](this['_revisions']);return _0x1c2d1b['reverse'](),_0x1c9500['toJSON']?_0x1c2d1b['map'](_0x376f0f=>_0x376f0f['toJSON']()):_0x1c2d1b;}['getIndex'](_0x2d9de7){return this['_revisions']['getIndex'](_0x2d9de7);}['getEarlierVisibleRevision'](_0x22b45a){const [,_0x5ac0de]=this['getRevisionsIterator'](_0x22b45a,{'direction':'earlier'});return _0x5ac0de;}['getLaterVisibleRevision'](_0x2da88e){const [,_0x38dece]=this['getRevisionsIterator'](_0x2da88e,{'direction':'later'});return _0x38dece;}['getRevisionsInDiff'](_0x59f1d1){const _0x571d91=[];for(const _0x2251e2 of this['getRevisionsIterator'](_0x59f1d1['newRevisionId']))if(_0x571d91['push'](_0x2251e2),_0x2251e2['id']===_0x59f1d1['oldRevisionId'])break;return _0x571d91;}*['getRevisionsIterator'](_0x1d9f3d,{direction:_0x209942='earlier',filter:_0x40485e=()=>!0x0}={}){const _0x37d84a='earlier'===_0x209942?0x1:-0x1;let _0x5ced0d=this['_revisions']['get'](_0x1d9f3d),_0x4089de=this['getIndex'](_0x5ced0d);for(yield _0x5ced0d;_0x5ced0d;){if(_0x4089de+=_0x37d84a,_0x5ced0d=this['getRevision'](_0x4089de),!_0x5ced0d)return;_0x40485e(_0x5ced0d)&&(yield _0x5ced0d);}}},wt=class extends _0x1dd727{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3294d2,'c'],[_0x27a950,'a'],[_0x1af968,'e'],[_0x4ef65e,'r'],[_0x30b54d,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3294d2],['a',_0x27a950],['e',_0x1af968],['r',_0x4ef65e],['u',_0x30b54d]]);async['loadRevisionData'](_0x4f6fa8,_0x1ca543){if(_0x4f6fa8['diffData']||!_0x1ca543)return;const _0x442869=this['editor']['config']['get']('collaboration.channelId');_0x4f6fa8['diffData']=(await _0x1ca543['getRevision']({'channelId':_0x442869,'revisionId':_0x4f6fa8['id']}))['diffData'];}['getRevisionDocumentData'](_0x51da29){const _0x1df3aa={};for(const _0x5994f3 in _0x51da29['diffData']){if(_0x51da29['diffData'][_0x5994f3]['attachChange']&&!_0x51da29['diffData'][_0x5994f3]['attachChange']['isAttached'])continue;const _0x48123b=this['_removeRevisionMarkers'](JSON['parse'](_0x51da29['diffData'][_0x5994f3]['insertions'])),_0x21af17=this['editor']['editing']['view']['document'],_0x4b44a8=new _0x1e3c1c(_0x21af17,_0x48123b['map'](_0x59c1e4=>this['_getViewFromDiffObj'](_0x59c1e4,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1df3aa[_0x5994f3]=this['editor']['data']['processor']['toData'](_0x4b44a8),this['editor']['data']['processor']['useFillerType']('default');}return _0x1df3aa;}['getRevisionRootsAttributes'](_0x1cf2bc){const _0x2f3f72={};for(const _0x3c04a5 in _0x1cf2bc['diffData'])_0x1cf2bc['diffData'][_0x3c04a5]['attachChange']&&!_0x1cf2bc['diffData'][_0x3c04a5]['attachChange']['isAttached']||(_0x2f3f72[_0x3c04a5]=_0x1cf2bc['diffData'][_0x3c04a5]['attributesAfter']||{});return _0x2f3f72;}['getRevisionRootsModelElements'](_0xd50f3b){const _0x2b088a={};for(const _0x2d268a in _0xd50f3b['diffData']){if(_0xd50f3b['diffData'][_0x2d268a]['attachChange']&&!_0xd50f3b['diffData'][_0x2d268a]['attachChange']['isAttached'])continue;const _0x29adcc=_0xd50f3b['diffData'][_0x2d268a]['rootElementName'];_0x29adcc&&(_0x2b088a[_0x2d268a]=_0x29adcc);}return _0x2b088a;}['_getTypeCharForViewElement'](_0x27f851){return this['_viewClassToTypeChar']['get'](_0x27f851['constructor']);}['_getViewFromDiffObj'](_0x2d8813,_0x456363){const _0x1afe67=this['editor']['editing']['view']['document'];if('string'==typeof _0x2d8813)return new _0x9b1326(_0x1afe67,_0x2d8813);{let _0x10106d,_0x4c3cff;_0x4c3cff='u'==_0x2d8813['type']||'r'==_0x2d8813['type']?[]:_0x2d8813['children']['map'](_0xc6fd82=>this['_getViewFromDiffObj'](_0xc6fd82,_0x456363));const _0xeb7726=this['_typeCharToViewClass']['get'](_0x2d8813['type'])||_0x5a0df2,_0x3d9159=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x10106d=new _0xeb7726(_0x1afe67,_0x2d8813['name'],_0x2d8813['attributes'],_0x4c3cff),'u'==_0x2d8813['type']&&_0x2d8813['children'][0x0]){const _0x51df57=_0x2d8813['children'][0x0];if(_0x10106d['render']=function(_0x4bffa3){const _0x3e1ea4=_0x4bffa3['createElement']('div');return _0x3e1ea4['innerHTML']=_0x51df57,_0x3e1ea4['childNodes'][0x0];},_0x456363){const _0x3875c8=new _0x1e3c1c(_0x1afe67);_0x3875c8['_appendChild'](_0x10106d);const _0x20eb93=Array['from'](_0x3d9159['viewChildrenToDom'](_0x3875c8,{'bind':!0x1})),_0x38e038=_0x3d9159['domDocument']['createElement']('div');_0x38e038['append'](..._0x20eb93),_0x10106d=Array['from'](_0x3d9159['domChildrenToView'](_0x38e038))[0x0];}}else{if('r'==_0x2d8813['type']&&_0x2d8813['children'][0x0]){const _0x4e5665=_0x2d8813['children'][0x0];if(_0x10106d['render']=function(_0x48ab9){_0x48ab9['innerHTML']=_0x4e5665;},_0x456363){const _0x3cff63=new _0x1e3c1c(_0x1afe67);_0x3cff63['_appendChild'](_0x10106d);const _0x5c2702=Array['from'](_0x3d9159['viewChildrenToDom'](_0x3cff63,{'bind':!0x1})),_0x3ed851=_0x3d9159['domDocument']['createElement']('div');_0x3ed851['append'](..._0x5c2702);const _0x346fe4=Array['from'](_0x3d9159['domChildrenToView'](_0x3ed851));_0x346fe4['length']>0x1?_0x10106d['_appendChild'](_0x346fe4):_0x10106d=_0x346fe4[0x0];}}}if(_0x2d8813['customProperties']){for(const [_0x2515d7,_0x85b3b0]of _0x2d8813['customProperties'])_0x10106d['_setCustomProperty'](_0x2515d7,_0x85b3b0);}const _0x6a78aa=void 0x0===_0x2d8813['fillerOffset']?null:_0x2d8813['fillerOffset'];return null!==_0x6a78aa&&(_0x10106d['getFillerOffset']=()=>_0x6a78aa),_0x10106d;}}['_makeModelFromViewString'](_0xbb53bf,_0x2ff00e){const _0xe54aef=JSON['parse'](_0xbb53bf),_0x191c32=this['editor']['editing']['view']['document'],_0xd24e=new _0x1e3c1c(_0x191c32,_0xe54aef['map'](_0xb5a8b1=>this['_getViewFromDiffObj'](_0xb5a8b1,!0x0))),_0x594754=this['editor']['data']['toModel'](_0xd24e,_0x2ff00e);return _0x594754['name']=_0x2ff00e,_0x594754;}['_removeRevisionMarkers'](_0x8b6bd4){return(_0x8b6bd4=_0x8b6bd4['filter'](_0x11b635=>!_0x11b635['name']||'revision-start'!==_0x11b635['name']&&'revision-end'!==_0x11b635['name']))['forEach'](_0xc2d8df=>{'string'!=typeof _0xc2d8df&&(_0xc2d8df['children']=this['_removeRevisionMarkers'](_0xc2d8df['children']),_0xc2d8df['attributes']=_0xc2d8df['attributes']['filter'](_0x2e6957=>!_0x2e6957[0x0]['startsWith']('data-revision-')));}),_0x8b6bd4;}};function pt(_0x11e98e,_0x3d261d,_0x29cab1){const t=_0x11e98e['t'];switch(_0x3d261d){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x29cab1);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x29cab1);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}var _t=class extends _0x1dd727{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1eaf94,mt,wt,_0x207189];}constructor(_0x17cc31){super(_0x17cc31),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x35f55c=_0x574201();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x35f55c},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x201ca6=this['repository']['getRevision'](0x0),_0x202e9c=_0x201ca6&&null===_0x201ca6['creator']?_0x201ca6:null;if(this['_continueCurrentRevision']=!!_0x202e9c&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3af8e2=this['_source']['getCurrentRevisionId'](),_0x2e69a9=this['repository']['getRevision'](_0x3af8e2);if(_0x2e69a9)this['_startingVersion']=_0x2e69a9['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x594993=this['_source']['history']['_operations']['find'](_0x24152d=>!_0x24152d['_isInit']),_0x556295=_0x594993?_0x594993['baseVersion']:this['_source']['history']['version'];_0x201ca6?(_0x201ca6['toVersion']<_0x556295&&_0x201ca6['_update']({'toVersion':_0x556295}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x202e9c['id'],this['_startingVersion']=_0x202e9c['fromVersion']):(this['_startingVersion']=_0x201ca6['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x556295,this['_continueCurrentRevision']=!0x1);}}else _0x202e9c&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x202e9c['toVersion'],this['editor']['model']['document']['history']['version']),_0x202e9c['fromVersion']===_0x202e9c['toVersion']?(0x0!==_0x202e9c['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x202e9c['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x202e9c['id'],this['_startingVersion']=_0x202e9c['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x27381e=>!_0x27381e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3b8ed5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x199a6c;for(const _0x2d2d33 in _0x3b8ed5){const _0x1eec2e=_0x2d2d33,_0x85d78d=_0x3b8ed5[_0x1eec2e];if('revisionHistoryLicenseKeyValid'==_0x85d78d||'revisionHistoryLicenseKeyInvalid'==_0x85d78d||'revisionHistoryLicenseKeyExpired'==_0x85d78d||'revisionHistoryLicenseKeyDomainLimit'==_0x85d78d||'revisionHistoryLicenseKeyNotAllowed'==_0x85d78d||'revisionHistoryLicenseKeyEvaluationLimit'==_0x85d78d||'revisionHistoryLicenseKeyUsageLimit'==_0x85d78d){delete _0x3b8ed5[_0x1eec2e],_0x199a6c=_0x85d78d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x199a6c&&_0x3b8ed5['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x199a6c&&_0x3b8ed5['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x199a6c&&_0x3b8ed5['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x199a6c&&_0x3b8ed5['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x199a6c&&_0x3b8ed5['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x199a6c&&_0x3b8ed5['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x59b301=this['repository']['getRevision'](0x0),_0x2cf7eb=await this['getRevisionDocumentData'](_0x59b301),_0x13e368=await this['getRevisionRootsAttributes'](_0x59b301),_0x56fae2=this['_utils']['getRevisionRootsModelElements'](_0x59b301);this['_replaceEditorDataWithRevisionData'](_0x2cf7eb,_0x13e368,_0x56fae2);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x366739){this['_source']=_0x366739;}async['update'](){const _0x56401b=await this['_source']['getLatestVersion']();if(_0x56401b>this['currentRevision']['toVersion']){await this['_loadState']();const _0x92223a=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x56401b});_0x92223a['authors']=_0x92223a['authorsIds']['map'](_0x230921=>this['editor']['plugins']['get']('Users')['getUser'](_0x230921)),this['currentRevision']['_update'](_0x92223a);}}async['saveRevision'](_0x1f160f={},_0x2565f0=null){const _0x91bf8f=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2565f0>this['currentRevision']['toVersion']&&(_0x2565f0=null),null===_0x2565f0&&(_0x2565f0=await this['_source']['getLatestVersion']());const _0x746994=this['_getFromVersion'](_0x2565f0),_0x50d3c5=this['buildRevisionData']({'from':_0x746994,'to':_0x2565f0});if(this['currentRevision']['toVersion']<_0x2565f0){const _0x295e23=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2565f0,'to':_0x2565f0});_0x295e23['authors']=[],_0x295e23['authorsIds']=[],_0x295e23['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x295e23,!0x0),delete _0x295e23['authors'],_0x91bf8f['push'](_0x295e23);}_0x1f160f['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1f160f['name']=_0x1f160f['name']||null,_0x1f160f['id']=_0x1f160f['id']||_0x574201(),_0x1f160f={..._0x1f160f,..._0x50d3c5};const _0x132694=this['addRevisionData'](_0x1f160f);_0x91bf8f['push'](_0x1f160f);const _0x5cf52e=this['repository']['getIndex'](_0x132694);if(0x0!==_0x5cf52e){const _0x167c47=this['repository']['getRevision'](_0x5cf52e-0x1);if(_0x167c47['fromVersion']!==_0x2565f0){const _0x1d0bd6=this['_revisionDataBuilder']['getData'](_0x2565f0,_0x167c47['toVersion']),_0x342ad4={'id':_0x167c47['id'],'diffData':_0x1d0bd6['diffData'],'authorsIds':_0x1d0bd6['authorsIds'],'authors':_0x1d0bd6['authorsIds']['map'](_0xb5d47=>this['editor']['plugins']['get']('Users')['getUser'](_0xb5d47)),'fromVersion':_0x2565f0};_0x167c47===this['currentRevision']&&(_0x342ad4['createdAt']=new Date(_0x1f160f['createdAt']['getTime']()+0xa)),_0x167c47['_update'](_0x342ad4,!0x0),delete _0x342ad4['authors'],_0x91bf8f['push'](_0x342ad4);}}if(this['adapter']){for(const _0x1aad52 of _0x91bf8f)this['_bufferUpdate'](_0x1aad52['id'],_0x1aad52,!0x0);this['sendBufferedUpdates']();}return _0x132694;}['addRevisionData'](_0x3f2deb){const _0x3d613c=this['repository']['createRevision'](_0x3f2deb);return this['adapter']&&_0x3d613c['on']('_update',(_0x413262,_0x437be7,_0x3d1d18)=>{_0x3d1d18||(this['_bufferUpdate'](_0x437be7['id'],_0x437be7,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3d613c,this['_findInsertionIndex'](_0x3d613c)),_0x3d613c;}async['getRevisionDocumentData'](_0x42a159){return await this['_utils']['loadRevisionData'](_0x42a159,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x42a159);}async['getRevisionRootsAttributes'](_0x2010dc){return await this['_utils']['loadRevisionData'](_0x2010dc,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2010dc);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5c387f=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x328180=0x0;_0x328180<_0x5c387f['length'];_0x328180++){const _0x39bfa7=_0x5c387f[_0x328180];let _0x108364=!0x1;for(const _0xc5aeae of Object['keys'](_0x39bfa7))void 0x0===_0x39bfa7[_0xc5aeae]?delete _0x39bfa7[_0xc5aeae]:'id'!==_0xc5aeae&&(_0x108364=!0x0);_0x108364||(_0x5c387f[_0x328180]=null);}if(_0x5c387f=_0x5c387f['filter'](_0xd3dbbb=>null!==_0xd3dbbb),!_0x5c387f['length'])return;for(let _0x23287c=0x0;_0x23287c<_0x5c387f['length'];_0x23287c++){const _0x89d3e3=_0x5c387f[_0x23287c];void 0x0!==_0x89d3e3['fromVersion']&&void 0x0===_0x89d3e3['toVersion']&&(_0x89d3e3['toVersion']=this['repository']['getRevision'](_0x89d3e3['id'])['toVersion']),void 0x0!==_0x89d3e3['toVersion']&&void 0x0===_0x89d3e3['fromVersion']&&(_0x89d3e3['fromVersion']=this['repository']['getRevision'](_0x89d3e3['id'])['fromVersion']);}const _0xe0897c=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5c387f,_0xe0897c)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0xbcf545=>{if(_0xbcf545){for(const _0x4b711a of _0xbcf545)this['setRevisionData']({'id':_0x4b711a['id'],'createdAt':_0x4b711a['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x2e88e8=null,from:_0x227ae4=null,to:_0x20a8e1=null}){_0x227ae4=null!==_0x227ae4?_0x227ae4:_0x2e88e8['fromVersion'],_0x20a8e1=null!==_0x20a8e1?_0x20a8e1:_0x2e88e8['toVersion'];const _0x512222=this['_revisionDataBuilder']['getData'](_0x227ae4,_0x20a8e1),_0x3f192d={'diffData':_0x512222['diffData'],'authorsIds':_0x512222['authorsIds'],'fromVersion':_0x227ae4,'toVersion':_0x20a8e1};if(!_0x2e88e8||_0x20a8e1!==_0x2e88e8['toVersion']){const _0x1e94f8=_0x20a8e1-0x1,_0x97fa85=this['_source']['history']['getOperation'](_0x1e94f8);_0x3f192d['createdAt']=_0x97fa85&&_0x97fa85['createdAt']||new Date();}if(this['_loadedStateData']&&_0x227ae4===this['_loadedStateData']['fromVersion']){for(const _0x1de8be of this['_loadedStateData']['authors'])_0x3f192d['authorsIds']['includes'](_0x1de8be['id'])||_0x3f192d['authorsIds']['push'](_0x1de8be['id']);}return _0x3f192d;}['_bufferUpdate'](_0x4e1543,_0x1a9357,_0x3af393){if(this['_bufferedUpdates']['has'](_0x4e1543)){const _0x19cb25=this['_bufferedUpdates']['get'](_0x4e1543);_0x1a9357=_0x3af393?{..._0x19cb25,..._0x1a9357}:{..._0x1a9357,..._0x19cb25};}this['_bufferedUpdates']['set'](_0x4e1543,_0x1a9357);}['setRevisionData'](_0x27c8aa){const _0x4f7ea9=this['repository']['getRevision'](_0x27c8aa['id']);if(_0x27c8aa['createdAt']&&(_0x27c8aa['createdAt']=new Date(_0x27c8aa['createdAt'])),_0x27c8aa['authorsIds']){const _0x4cec87=this['editor']['plugins']['get']('Users');_0x27c8aa['authors']=_0x27c8aa['authorsIds']['map'](_0x12b952=>_0x4cec87['getUser'](_0x12b952));}_0x4f7ea9['_update'](_0x27c8aa,!0x0);}['_createInitialRevision'](_0x5621f0){const _0x30d8ba=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x30d8ba)this['_initialRevisionId']=_0x30d8ba['id'];else{const _0xf92eb8=!this['editor']['model']['document']['roots']['find'](_0x919a31=>this['editor']['model']['hasContent'](_0x919a31)),_0x4f49e4=this['editor']['plugins']['get']('Users')['me']['id'],_0x4036d3=pt(this['editor']['locale'],_0xf92eb8?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5621f0,'to':_0x5621f0,'id':this['_initialRevisionId'],'name':_0x4036d3,'creatorId':_0x4f49e4});}}['_createCurrentRevision'](_0x2c707d){const _0x28409d=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x28409d),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2c707d,'to':_0x2c707d,'id':_0x28409d,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x18144b,_0x5caa58,_0x54b488){const _0x5d3f08={},_0x2b3c4c={},_0x495fb1={},_0x303e41=this['editor']['config']['get']('roots')||{};for(const [_0x4c5975,_0x348628]of Object['entries'](_0x303e41))_0x348628['lazyLoad']||(_0x5d3f08[_0x4c5975]=_0x348628['initialData']??'',_0x2b3c4c[_0x4c5975]=_0x348628['modelAttributes']||{},_0x348628['modelElement']&&(_0x495fb1[_0x4c5975]=_0x348628['modelElement']));for(const _0x4ad110 of this['editor']['model']['document']['getRootNames']())_0x5d3f08[_0x4ad110]??='',_0x2b3c4c[_0x4ad110]??={};let _0x14992c=!0x1;const _0x453b7b=Object['keys'](_0x5d3f08),_0x592726=Object['keys'](_0x18144b);for(const _0xc9ba54 of _0x453b7b){if(_0x5d3f08[_0xc9ba54]!==_0x18144b[_0xc9ba54]&&''!==_0x5d3f08[_0xc9ba54]['trim']()){_0x14992c=!0x0;break;}if(!_0x51c4e1(_0x2b3c4c[_0xc9ba54],_0x5caa58[_0xc9ba54])&&Object['keys'](_0x2b3c4c[_0xc9ba54])['length']>0x0){_0x14992c=!0x0;break;}const _0x42d15f=_0x495fb1[_0xc9ba54],_0x3c1249=_0x54b488[_0xc9ba54];if(_0x42d15f&&_0x3c1249&&_0x42d15f!==_0x3c1249){_0x14992c=!0x0;break;}}_0x14992c||(_0x14992c=_0x592726['some'](_0x58aa50=>!this['editor']['model']['document']['getRoot'](_0x58aa50))),_0x14992c&&_0x5426fd('editor-initial-data-replaced-with-revision-data',{'editorData':_0x5d3f08,'editorRootsAttributes':_0x2b3c4c,'editorRootsModelElements':_0x495fb1,'revisionData':_0x18144b,'revisionRootsAttributes':_0x5caa58,'revisionRootsModelElements':_0x54b488});for(const [_0x5e682e,_0x7d0a23]of Object['entries'](_0x18144b))this['editor']['config']['set']('roots.'+_0x5e682e+'.initialData',_0x7d0a23);for(const [_0x34b6ac,_0x2fcb03]of Object['entries'](_0x5caa58))this['editor']['config']['set']('roots.'+_0x34b6ac+'.modelAttributes',_0x2fcb03);const _0x506bb5=this['editor']['model']['document'];for(const [_0x22f01c,_0x6be9c1]of Object['entries'](_0x54b488)){this['editor']['config']['set']('roots.'+_0x22f01c+'.modelElement',_0x6be9c1);const _0x19ee55=_0x506bb5['getRoot'](_0x22f01c);_0x19ee55&&_0x19ee55['name']!==_0x6be9c1&&(_0x506bb5['roots']['remove'](_0x22f01c),_0x506bb5['createRoot'](_0x6be9c1,_0x22f01c));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5ec7f0=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5ec7f0['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x5f43ba){const _0x54ffb9=this['repository']['getRevisions']();_0x54ffb9['reverse']();let _0x57df24=0x0;for(;_0x57df24<_0x54ffb9['length'];){const _0x11e232=_0x54ffb9[_0x57df24];if(_0x11e232===this['currentRevision']){_0x57df24++;continue;}if(_0x11e232['id']===this['_initialRevisionId'])break;const _0x2cd0eb=_0x5f43ba['toVersion']-_0x11e232['toVersion']||_0x5f43ba['fromVersion']-_0x11e232['fromVersion'];if(_0x2cd0eb>0x0)break;if(_0x2cd0eb<0x0)_0x57df24++;else{if(!_0x5f43ba['creator']&&_0x11e232['creator'])break;if(_0x11e232['creator']||!_0x5f43ba['creator']){if(_0x5f43ba['createdAt']>_0x11e232['createdAt'])break;_0x57df24++;}else _0x57df24++;}}return _0x57df24;}['_getFromVersion'](_0x3666bc){const _0x32cb21=this['repository']['getRevisions']();_0x32cb21['reverse'](),_0x32cb21['shift']();const _0x5ca8dc=_0x32cb21['find'](_0x3a4f83=>_0x3a4f83['toVersion']<=_0x3666bc)['toVersion'];return _0x5ca8dc<this['_startingVersion']?this['_startingVersion']:_0x5ca8dc;}['_makeRevision']({name:_0x49db9a,from:_0x429628,to:_0x325617,creatorId:_0x3530a9,id:_0x222dd2}){const _0x43f3e1=this['buildRevisionData']({'from':_0x429628,'to':_0x325617});_0x43f3e1['name']=_0x49db9a,_0x43f3e1['creatorId']=_0x3530a9,_0x43f3e1['id']=_0x222dd2;const _0x5ae8c1=this['addRevisionData'](_0x43f3e1);return this['adapter']&&this['_bufferUpdate'](_0x43f3e1['id'],_0x43f3e1,!0x0),_0x5ae8c1;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x55fed7){this['editor']=_0x55fed7,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x18e87a){this['source']=_0x18e87a;const _0x1ec964=new Map(),_0xeb5bb8=new Map(),_0xb5e612=this['editor']['model']['document']['roots']['map'](_0x369055=>_0x369055['rootName']);for(const _0x533e26 of _0xb5e612){const _0x32dce0=this['editor']['model']['document']['getRoot'](_0x533e26),_0x457b87=bt(_0x32dce0);_0x1ec964['set'](_0x533e26,_0x457b87),_0xeb5bb8['set'](_0x533e26,Object['fromEntries'](_0x32dce0['getAttributes']()));}const _0x524bb2=Array['from'](this['editor']['model']['markers'])['map'](_0xae03b=>[_0xae03b['name'],_0xae03b['getRange']()]),_0x2b172a=this['source']['version'];this['_saveMetaData'](_0x2b172a,_0x1ec964,_0x524bb2,_0xeb5bb8),this['_startingRevisionId']=this['_revisionId'];const _0x471162=new Map(),_0x4c7c3c=new Map();for(const _0x173141 of _0xb5e612){const _0x38f18d=Rt(_0x173141,this['editor']['model']['document']['getRoot'](_0x173141)['name']);_0x471162['set'](_0x173141,_0x38f18d),_0x4c7c3c['set'](_0x173141,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x471162,[],_0x4c7c3c);}['getData'](_0x22888f,_0x1875ea){if(this['_lastFrom']===_0x22888f&&this['_lastTo']<=_0x1875ea)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1875ea,!0x0);else{if(!this['_savedMetaData']['has'](_0x22888f)){const _0x3fcb76=this['_getPreviousFrom'](_0x22888f);this['_calculateMetaData'](_0x3fcb76,_0x22888f,!0x1);}this['_calculateMetaData'](_0x22888f,_0x1875ea,!0x0);}return this['_lastFrom']=_0x22888f,this['_lastTo']=_0x1875ea,this['_getState']();}['loadState'](_0x1594de){if(!this['_savedMetaData']['has'](_0x1594de['fromVersion'])){const _0xdbbc45=this['_getPreviousFrom'](_0x1594de['fromVersion']);this['_calculateMetaData'](_0xdbbc45,_0x1594de['fromVersion'],!0x1);}this['_calculateMetaData'](_0x1594de['fromVersion'],_0x1594de['toVersion'],!0x1);const _0x17e057=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1594de['fromVersion'],this['_lastTo']=_0x1594de['toVersion'];for(const _0x15380e in _0x1594de['diffData']){const _0x3d977b=_0x1594de['diffData'][_0x15380e]['attachChange'],_0xc421b1=_0xbd471f(_0x1594de['diffData'][_0x15380e]['attributesBefore'])||{},_0x4edba5=_0x1594de['diffData'][_0x15380e],_0x2eeae3=_0x17e057['_makeModelFromViewString'](_0x4edba5['deletions'],_0x4edba5['rootElementName']||'$root');_0x2eeae3['rootName']=_0x15380e,_0x2eeae3['_isAttached']=!_0x3d977b||!_0x3d977b['isAttached'],_0x2eeae3['isAttached']=()=>_0x2eeae3['_isAttached'],this['_baseRoots']['set'](_0x15380e,_0x2eeae3),this['_baseRootsAttributes']['set'](_0x15380e,_0xc421b1),_0x3d977b&&this['_touchedRoots']['set'](_0x15380e,_0x3d977b);const _0x137ec5=this['_makeIdsRoot'](_0x2eeae3);this['_baseIdsRoots']['set'](_0x15380e,_0x137ec5);for(const [_0x4dbbca,_0x2c9cd5]of _0x2eeae3['markers']){if(!_0x4dbbca['startsWith']('revision:'))continue;const _0x372a14=_0x4dbbca['split'](':')[0x2];for(const _0x526f8a of _0x2c9cd5['getWalker']({'singleCharacters':!0x0})){const _0x4986de=this['_getVidAttributeName'](_0x526f8a),_0x37ba7e='elementEnd'==_0x526f8a['type']?_0x526f8a['previousPosition']['path']['slice'](0x0,-0x1):_0x526f8a['previousPosition']['path'],_0x1c1c6c=_0x137ec5['getNodeByPath'](_0x37ba7e)['getAttribute'](_0x4986de);this['_touched']['set'](_0x1c1c6c,{'userId':_0x372a14});}_0x2eeae3['markers']['delete'](_0x4dbbca);}}this['_startingRevisionId']=this['_revisionId'];const _0x591795=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x220a11=>!this['_touched']['has'](_0x220a11));let _0x23da0d=0x0;const _0x3d559b=new Map();for(const _0x22de4d in _0x1594de['diffData']){const _0x2be57f=_0x1594de['diffData'][_0x22de4d]['attachChange'],_0x4e92c6=_0xbd471f(_0x1594de['diffData'][_0x22de4d]['attributesAfter'])||{},_0x2d8352=_0x1594de['diffData'][_0x22de4d],_0x519c75=_0x17e057['_makeModelFromViewString'](_0x2d8352['insertions'],_0x2d8352['rootElementName']||'$root');_0x519c75['rootName']=_0x22de4d,_0x519c75['_isAttached']=!_0x2be57f||_0x2be57f['isAttached'],_0x519c75['isAttached']=()=>_0x519c75['_isAttached'],this['_diffRoots']['set'](_0x22de4d,_0x519c75),this['_diffRootsAttributes']['set'](_0x22de4d,_0x4e92c6);const _0x322825=this['_makeIdsRoot'](_0x519c75,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x22de4d,_0x322825),_0x3d559b['set'](_0x22de4d,_0x519c75['isAttached']()?_0x4e92c6:{});for(const [_0x4ff094,_0x19ce81]of _0x519c75['markers']){if(!_0x4ff094['startsWith']('revision:'))continue;const _0x298c38=_0x4ff094['split'](':')[0x2];for(const _0x26a429 of _0x19ce81['getWalker']({'singleCharacters':!0x0})){const _0x35c2c5=this['_getVidAttributeName'](_0x26a429),_0x1d7310=this['_revisionId']++,_0x429c77='elementEnd'==_0x26a429['type']?_0x26a429['previousPosition']['path']['slice'](0x0,-0x1):_0x26a429['previousPosition']['path'];_0x322825['getNodeByPath'](_0x429c77)['_setAttribute'](_0x35c2c5,_0x1d7310),this['_touched']['set'](_0x1d7310,{'userId':_0x298c38});}_0x519c75['markers']['delete'](_0x4ff094);}for(const _0x17138b of this['editor']['model']['createRangeIn'](_0x519c75)['getWalker']({'singleCharacters':!0x0})){const _0x2f0756=this['_getVidAttributeName'](_0x17138b),_0x55b40b='elementEnd'==_0x17138b['type']?_0x17138b['previousPosition']['path']['slice'](0x0,-0x1):_0x17138b['previousPosition']['path'],_0xde2436=_0x322825['getNodeByPath'](_0x55b40b);_0xde2436['getAttribute'](_0x2f0756)>0x0||_0xde2436['_setAttribute'](_0x2f0756,_0x591795[_0x23da0d++]);}for(const [_0x1818c6,_0x3c6eaa]of _0x519c75['markers'])_0x1818c6['startsWith']('revision:')||this['_markers']['set'](_0x1818c6,_0x3c6eaa);}const {roots:_0x422557}=this['_savedMetaData']['get'](_0x1594de['fromVersion']),{roots:_0xae1d7b}=this['_savedMetaData']['get'](_0x1594de['toVersion']),_0x23f5df=bt(_0x422557['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x23f5df),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x23f5df,Number['NEGATIVE_INFINITY']));const _0x55fca8=bt(_0xae1d7b['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x55fca8),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x55fca8));const _0xddd050=Array['from'](this['_diffRoots'])['map'](([_0x312140,_0x171e8c])=>[_0x312140,bt(_0x171e8c)]);this['_saveMetaData'](this['_lastTo'],_0xddd050,this['_markers'],_0x3d559b);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x2971c7,_0x325333,_0x2c3f3d,_0xaa3b31){const _0x244e01=new Map(_0x325333),_0x2f70bf=new Map(_0xbd471f(_0xaa3b31)),_0x184dad=new Map();for(const [_0x309b6a,_0x4c75a7]of _0x2c3f3d)_0x184dad['set'](_0x309b6a,{'start':_0x4c75a7['start']['clone'](),'end':_0x4c75a7['end']['clone'](),'rootName':_0x4c75a7['root']['rootName']});this['_savedMetaData']['set'](_0x2971c7,{'roots':_0x244e01,'markers':_0x184dad,'rootsAttributes':_0x2f70bf});}['_removeMetaData'](_0x292aff){this['_savedMetaData']['delete'](_0x292aff);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0xff3e9c,_0x239785=null){let _0x1ed6fb=null;_0xff3e9c['is']('documentFragment')||(_0x1ed6fb=new _0xf70166(_0xff3e9c['name'],{'vid_start':null===_0x239785?this['_revisionId']++:_0x239785++}));const _0x28b5fa=[];for(const _0x681a7b of _0xff3e9c['getChildren']())if(_0x681a7b['is']('element')){_0x28b5fa['push'](this['_makeIdsRoot'](_0x681a7b,_0x239785));const _0x332a63=_0x28b5fa[_0x28b5fa['length']-0x1];null!==_0x239785&&(_0x239785=_0x332a63['is']('element','$text')?_0x332a63['getAttribute']('vid')+0x1:_0x332a63['getAttribute']('vid_end')+0x1);}else{for(let _0x18ab98=0x0;_0x18ab98<_0x681a7b['offsetSize'];_0x18ab98++)_0x28b5fa['push'](new _0xf70166('$text',{'vid':null===_0x239785?this['_revisionId']++:_0x239785++}));}if(_0xff3e9c['is']('documentFragment')){const _0xe467a3=Rt(_0xff3e9c['rootName'],_0xff3e9c['name']);return _0xe467a3['_insertChild'](0x0,_0x28b5fa),_0xe467a3;}return _0x1ed6fb['_setAttribute']('vid_end',null===_0x239785?this['_revisionId']++:_0x239785++),_0x1ed6fb['_insertChild'](0x0,_0x28b5fa),_0x1ed6fb;}['_calculateMetaData'](_0x4672c4,_0x31e701,_0x5af334){this['_reset']();const {roots:_0x40a909,markers:_0x329b67,rootsAttributes:_0x2b8537}=this['_savedMetaData']['get'](_0x4672c4);this['_baseRoots']=new Map(_0x40a909),this['_baseRootsAttributes']=new Map(_0xbd471f(_0x2b8537));for(const [_0x53878d,_0x39c6ca]of this['_baseRoots'])if('$graveyard'!==_0x53878d&&(this['_diffRoots']['set'](_0x53878d,bt(_0x39c6ca)),this['_diffRootsAttributes']=new Map(_0xbd471f(_0x2b8537)),_0x5af334)){const _0x3517f6=this['_revisionId'];this['_idsRoots']['set'](_0x53878d,this['_makeIdsRoot'](_0x39c6ca)),this['_baseIdsRoots']['set'](_0x53878d,this['_makeIdsRoot'](_0x39c6ca,_0x3517f6));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x5af334&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x451c46,_0x336f32]of _0x329b67){const _0x23b948=this['_baseRoots']['get'](_0x336f32['rootName']),_0x1616cb=this['_diffRoots']['get'](_0x336f32['rootName']),_0x27c7bd=new _0x1f5a67(this['_fixPosition'](_0x336f32['start'],_0x23b948),this['_fixPosition'](_0x336f32['end'],_0x23b948)),_0x5443da=this['_fixRange'](_0x27c7bd,_0x1616cb);_0x23b948['markers']['set'](_0x451c46,_0x27c7bd),this['_markers']['set'](_0x451c46,_0x5443da);}this['_applyOperations'](_0x4672c4,_0x31e701,_0x5af334);}['_applyOperations'](_0x21733b,_0x4c6a2f,_0x2a0406){for(const _0x4ed9cb of this['source']['getOperations'](_0x21733b,_0x4c6a2f))this['_handleOperation'](_0x4ed9cb,_0x2a0406);for(const _0x23fb51 of this['_diffRoots']['values']())_0x23fb51['markers']['clear']();for(const [_0x1a3089,_0x3369c1]of this['_markers'])this['_diffRoots']['get'](_0x3369c1['root']['rootName'])['markers']['set'](_0x1a3089,_0x3369c1['clone']());const _0x336b71=new Map(),_0x11c43d=new Map();for(const [_0x1aa7e2,_0x433a71]of this['_diffRoots'])_0x336b71['set'](_0x1aa7e2,bt(_0x433a71)),_0x11c43d['set'](_0x1aa7e2,this['_diffRootsAttributes']['get'](_0x1aa7e2));this['_saveMetaData'](_0x4c6a2f,_0x336b71,this['_markers'],_0x11c43d);}['_getPreviousFrom'](_0x2c0b9d){const _0x26d40a=Array['from'](this['_savedMetaData']['keys']());_0x26d40a['sort']((_0xa509af,_0x1f0e5f)=>_0xa509af-_0x1f0e5f),_0x26d40a['reverse']();for(const _0x4b91da of _0x26d40a)if(_0x4b91da<_0x2c0b9d)return _0x4b91da;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x3038b3,_0x325c69){const _0xa8217=Array['from'](_0x325c69['markers'])['map'](([_0x293d65,_0x122614])=>[_0x293d65,this['_fixRange'](_0x122614,_0x3038b3)]);_0x3038b3['markers']=new Map(_0xa8217);}['_transformMarkers'](_0x416534){for(const _0x6a06dd of this['_markers']['values']()){const _0x1d1ec3=_0x6a06dd['getTransformedByOperation'](_0x416534),_0xf9f34=_0x1f5a67['_createFromRanges'](_0x1d1ec3);_0x6a06dd['start']=_0xf9f34['start'],_0x6a06dd['end']=_0xf9f34['end'];}}['_handleOperation'](_0x20b6ff,_0x25f873){if('addRoot'!=_0x20b6ff['type']&&'detachRoot'!=_0x20b6ff['type']){if('insert'==_0x20b6ff['type']){const _0x56009f=_0x20b6ff['position']['root'],_0x46628b=_0x56009f['rootName'],_0x1392d8=_0x56009f['name'];this['_diffRoots']['has'](_0x46628b)||(this['_diffRoots']['set'](_0x46628b,Rt(_0x46628b,_0x1392d8,!0x0)),this['_diffRootsAttributes']['set'](_0x46628b,{}),_0x25f873&&this['_idsRoots']['set'](_0x46628b,Rt(_0x46628b,_0x1392d8,!0x0)));}else{if('addRootAttribute'==_0x20b6ff['type']||'removeRootAttribute'==_0x20b6ff['type']||'changeRootAttribute'==_0x20b6ff['type'])return void this['_handleRootAttributeOperation'](_0x20b6ff);'marker'==_0x20b6ff['type']&&this['_handleMarkerOperation'](_0x20b6ff);}if('marker'!==_0x20b6ff['type']){const _0x43d499=this['_cloneOperation'](_0x20b6ff,this['_diffRoots']);_0x43d499['_execute'](),this['_transformMarkers'](_0x43d499);}if(_0x25f873)switch(_0x20b6ff['type']){case'insert':this['_handleInsertOperation'](_0x20b6ff);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x20b6ff);break;case'merge':this['_handleMergeOperation'](_0x20b6ff);break;case'split':this['_handleSplitOperation'](_0x20b6ff);}}else this['_handleRootOperation'](_0x20b6ff,_0x25f873);}['_cloneOperation'](_0x3e3d4f,_0x3e57d9){const _0xa2860=_0x3e3d4f['clone']();return _0xa2860['_authorId']=_0x3e3d4f['_authorId'],this['_fixOperation'](_0xa2860,_0x3e57d9),_0xa2860;}['_getBaseVids'](_0x233841){return _0x233841['map'](_0x5910f7=>{const _0x17c330=this['_getVidAttributeName'](_0x5910f7);return Number(_0x5910f7['item']['getAttribute'](_0x17c330));});}['_generateTape'](_0x2dbb14,_0x5072e1){if(_0x2dbb14['is']('element','$text'))_0x5072e1['push']({'item':_0x2dbb14,'type':'text'});else{_0x2dbb14['is']('element')&&_0x5072e1['push']({'item':_0x2dbb14,'type':'elementStart'});for(const _0x2373ab of _0x2dbb14['getChildren']())this['_generateTape'](_0x2373ab,_0x5072e1);_0x2dbb14['is']('element')&&_0x5072e1['push']({'item':_0x2dbb14,'type':'elementEnd'});}return _0x5072e1;}['_getState'](){const _0x448009=new Map(this['_touched']),_0x24a5cf=new Map(_0x448009),_0xbb13ab=new Map(),_0x4b360c={'insertions':{},'deletions':{}},_0x5469e4={'insertions':{},'deletions':{}},_0x4db938=new Map(),_0x2a9b4d=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x18831d=new Map();_0x2a9b4d['delete']('$graveyard');for(const _0x38eb76 of _0x2a9b4d){const _0x537fcb=(this['_diffRoots']['get'](_0x38eb76)??this['_baseRoots']['get'](_0x38eb76))['name'],_0x45bd13=this['_diffRoots']['get'](_0x38eb76)||Rt(_0x38eb76,_0x537fcb,!0x1),_0x24a51d=this['_baseRoots']['get'](_0x38eb76)||Rt(_0x38eb76,_0x537fcb,!0x1);_0x45bd13['isAttached']()||_0x24a51d['isAttached']()?(_0x18831d['set'](_0x38eb76,_0x537fcb),_0x4b360c['insertions'][_0x38eb76]=bt(_0x45bd13),_0x4b360c['deletions'][_0x38eb76]=bt(_0x24a51d),this['_copyMarkers'](_0x4b360c['deletions'][_0x38eb76],_0x24a51d),this['_copyMarkers'](_0x4b360c['insertions'][_0x38eb76],_0x45bd13),_0x5469e4['insertions'][_0x38eb76]=this['_generateTape'](this['_idsRoots']['get'](_0x38eb76),[]),_0x5469e4['deletions'][_0x38eb76]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x38eb76)||Rt(_0x38eb76,_0x537fcb,!0x1),[])):_0x2a9b4d['delete'](_0x38eb76);}for(const _0x8037cd of _0x2a9b4d){const _0x5bc917=_0x5469e4['insertions'][_0x8037cd];for(const _0x52f98a of _0x5bc917){const _0x5e5e98=this['_getVidAttributeName'](_0x52f98a),_0x1218fa=_0x52f98a['item']['getAttribute'](_0x5e5e98);_0x24a5cf['delete'](_0x1218fa),_0x1218fa>=this['_startingRevisionId']&&_0xbb13ab['set'](_0x1218fa,_0x448009['get'](_0x1218fa));}}for(const _0x4384dd of _0x2a9b4d){const _0xc82a81=_0x5469e4['insertions'][_0x4384dd],_0x3c20da=this['_getBaseVids'](_0x5469e4['deletions'][_0x4384dd]);let _0x2d0e3e=0x0;for(const _0x127a97 of _0xc82a81){const _0x193778=this['_getVidAttributeName'](_0x127a97),_0x160b45=_0x127a97['item']['getAttribute'](_0x193778);if(!_0xbb13ab['has'](_0x160b45)&&!_0x4db938['has'](_0x160b45)){if(_0x24a5cf['has'](_0x160b45))_0x2d0e3e++;else{if(_0x160b45!=_0x3c20da[_0x2d0e3e]){const _0x163abe=_0x448009['get'](_0x160b45)||_0x448009['get'](_0x3c20da[_0x2d0e3e]);for(;_0x160b45!=_0x3c20da[_0x2d0e3e];)_0x24a5cf['has'](_0x3c20da[_0x2d0e3e])||(_0x4db938['set'](_0x3c20da[_0x2d0e3e],_0x163abe),_0x448009['set'](_0x3c20da[_0x2d0e3e],_0x163abe)),_0x2d0e3e++;}_0x2d0e3e++;}}}}for(const _0x5d35a3 of _0x2a9b4d){const _0xe69d4=_0x5469e4['insertions'][_0x5d35a3];for(const _0x447923 of _0xe69d4){const _0x15a491=this['_getVidAttributeName'](_0x447923),_0x4be39b=_0x447923['item']['getAttribute'](_0x15a491);if(_0x4db938['has'](_0x4be39b)){const _0x518d56=_0x4db938['get'](_0x4be39b);_0x24a5cf['has'](_0x4be39b)||_0x24a5cf['set'](_0x4be39b,{..._0x518d56}),_0xbb13ab['set'](_0x4be39b,{..._0x518d56});}}}for(const _0x2d4b8c of _0x24a5cf['keys']())_0x2d4b8c>=this['_startingRevisionId']&&_0x24a5cf['delete'](_0x2d4b8c);const _0x1ba4be=new Map();for(const _0x564967 of _0x2a9b4d){let _0x20d1e6=_0x5469e4['insertions'][_0x564967];for(const _0x9d6742 of _0x20d1e6)if(_0x9d6742['item']['is']('element','tableCell')){const _0x2d258f=this['_getVidAttributeName'](_0x9d6742),_0x322a5d=_0x9d6742['item']['getAttribute'](_0x2d258f);if(_0xbb13ab['has'](_0x322a5d)){const _0x208bdf=_0x9d6742['item']['parent']['parent']['getAttribute']('vid_start'),_0x29469d=_0x1ba4be['get'](_0x208bdf)||new Set();_0x29469d['add'](_0xbb13ab['get'](_0x322a5d)['userId']),_0x1ba4be['set'](_0x208bdf,_0x29469d);}}_0x20d1e6=_0x5469e4['deletions'][_0x564967];for(const _0x1cbac6 of _0x20d1e6)if(_0x1cbac6['item']['is']('element','tableCell')){const _0x220279=this['_getVidAttributeName'](_0x1cbac6),_0x3eb6ff=_0x1cbac6['item']['getAttribute'](_0x220279);if(_0x24a5cf['has'](_0x3eb6ff)){const _0x5aae40=_0x1cbac6['item']['parent']['parent']['getAttribute']('vid_start'),_0x2cfcfd=_0x1ba4be['get'](_0x5aae40)||new Set();_0x2cfcfd['add'](_0x24a5cf['get'](_0x3eb6ff)['userId']),_0x1ba4be['set'](_0x5aae40,_0x2cfcfd);}}for(const _0x3b03e0 of _0x1ba4be['keys']())(_0xbb13ab['has'](_0x3b03e0)||_0x24a5cf['has'](_0x3b03e0))&&_0x1ba4be['delete'](_0x3b03e0);}for(const _0x2e7dc5 of _0x2a9b4d){const _0x17283c=_0x5469e4['insertions'][_0x2e7dc5];let _0x355947=null,_0x5c7769=null;for(const _0xb883a4 of _0x17283c){const _0x290531=this['_getVidAttributeName'](_0xb883a4),_0xdd2a5a=_0xb883a4['item']['getAttribute'](_0x290531),_0x5c2e7f=_0x1ba4be['get'](_0xdd2a5a);_0x5c2e7f&&'elementStart'==_0xb883a4['type']&&(_0x355947=Array['from'](_0x5c2e7f)[0x0],_0x5c7769=_0xb883a4['item']['getAttribute']('vid_end')),_0x355947&&(_0x24a5cf['set'](_0xdd2a5a,{'userId':_0x355947}),_0xbb13ab['set'](_0xdd2a5a,{'userId':_0x355947})),_0xdd2a5a==_0x5c7769&&(_0x355947=null,_0x5c7769=null);}}const _0x186f93={},_0x4ba5ec=new Set();for(const _0x3050aa of _0x2a9b4d){const _0x145a95=_0x4b360c['deletions'][_0x3050aa],_0x17f6ea=_0x4b360c['insertions'][_0x3050aa];for(const {userId:_0x138129}of this['_touchedMarkers']['values']())null!==_0x138129&&_0x4ba5ec['add'](_0x138129);for(const {userId:_0x497453}of this['_touchedRoots']['values']())null!==_0x497453&&_0x4ba5ec['add'](_0x497453);this['_markChanges'](_0x17f6ea,_0x5469e4['insertions'][_0x3050aa],_0xbb13ab,'insertion',_0x4ba5ec),this['_markChanges'](_0x145a95,_0x5469e4['deletions'][_0x3050aa],_0x24a5cf,'deletion',_0x4ba5ec),_0x186f93[_0x3050aa]={'insertions':this['_prepareViewToSave'](_0x17f6ea),'deletions':this['_prepareViewToSave'](_0x145a95),'attachChange':this['_touchedRoots']['get'](_0x3050aa)||null,'attributesBefore':_0xbd471f(this['_baseRootsAttributes']['get'](_0x3050aa))||{},'attributesAfter':_0xbd471f(this['_diffRootsAttributes']['get'](_0x3050aa)),'rootElementName':_0x18831d['get'](_0x3050aa)};}return{'diffData':_0x186f93,'authorsIds':Array['from'](_0x4ba5ec)};}['_processRootBeforeSave'](_0x54eeb9){for(const [,_0x5c396a]of _0x54eeb9['markers']){const _0x43a886=_0x5c396a['start']['getAncestors']()['filter'](_0x5ec968=>'tableCell'==_0x5ec968['name']);for(const _0x196b66 of _0x43a886)0x1==_0x196b66['childCount']&&_0x196b66['getChild'](0x0)['is']('element','paragraph')&&_0x196b66['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x61b8fb){this['_processRootBeforeSave'](_0x61b8fb);const _0x1b6b4c=this['editor']['data']['toView'](_0x61b8fb,{}),_0x1ddd97=Array['from'](_0x1b6b4c['getChildren']())['map'](_0x3a3dfa=>this['_getViewJson'](_0x3a3dfa));return JSON['stringify'](_0x1ddd97);}['_getViewJson'](_0x280a38){if(_0x280a38['is']('$text'))return _0x280a38['data'];{const _0x3a2683=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x2b1255=_0x280a38,_0x16c9ae=this['editor']['data']['htmlProcessor']['domConverter'],_0x2ac56f={'type':_0x3a2683['_getTypeCharForViewElement'](_0x2b1255),'name':_0x2b1255['name'],'attributes':Array['from'](_0x2b1255['getAttributes']()),'children':Array['from'](_0x2b1255['getChildren']())['map'](_0x3915dc=>this['_getViewJson'](_0x3915dc))};if(_0x280a38['is']('uiElement')&&'$comment'!=_0x280a38['name']){const _0x1e8d8e=_0x280a38['render'](_0x16c9ae['domDocument'],_0x16c9ae);_0x2ac56f['children']['push'](_0x1e8d8e['outerHTML']);}else{if(_0x280a38['is']('rawElement')){const _0x282f9c=_0x16c9ae['domDocument']['createElement'](_0x2b1255['name']);_0x280a38['render'](_0x282f9c,_0x16c9ae),_0x2ac56f['children']['push'](_0x282f9c['innerHTML']);}}const _0x5615c1=Array['from'](_0x2b1255['getCustomProperties']());_0x5615c1['length']>0x0&&(_0x2ac56f['customProperties']=_0x5615c1);const _0x3e5b11=_0x2b1255['getFillerOffset']();return null!==_0x3e5b11&&(_0x2ac56f['fillerOffset']=_0x3e5b11),_0x2ac56f;}}['_markChanges'](_0x2dfeb4,_0x428278,_0x283d8a,_0x542fa0,_0xa7930f){let _0x3d56f1=null,_0x53a101=null,_0x42dc6e=0x0;const _0x2c7a0a=this['editor']['model'];for(let _0x58aae1=0x0;_0x58aae1<_0x428278['length'];_0x58aae1++){const _0x3b0e9a=this['_getVidAttributeName'](_0x428278[_0x58aae1]),_0x3efd6d=_0x428278[_0x58aae1]['item']['getAttribute'](_0x3b0e9a),_0x554eb7=_0x283d8a['get'](_0x3efd6d),_0x401a59=_0x58aae1==_0x428278['length']-0x1;!_0x3d56f1&&_0x554eb7&&(_0x3d56f1=_0x554eb7,_0x53a101=_0x428278[_0x58aae1]),!_0x3d56f1||_0x554eb7&&_0x554eb7['userId']==_0x3d56f1['userId']||(_0xe6eaa3(_0x554eb7,kt(_0x53a101,_0x2dfeb4,_0x2c7a0a),kt(_0x428278[_0x58aae1],_0x2dfeb4,_0x2c7a0a)),_0x3d56f1=_0x554eb7||null,_0x53a101=_0x554eb7?_0x428278[_0x58aae1]:null),_0x3d56f1&&_0x401a59&&_0xe6eaa3(_0x554eb7,kt(_0x53a101,_0x2dfeb4,_0x2c7a0a),At(_0x428278[_0x58aae1],_0x2dfeb4,_0x2c7a0a));}function _0xe6eaa3(_0x42820,_0x831eff,_0x34bbfc){const _0x500f94=_0x3d56f1['userId'],_0x5840b3='revision:'+_0x542fa0+':'+_0x500f94+':'+_0x42dc6e++,_0x7dd636=_0x2c7a0a['createRange'](_0x831eff,_0x34bbfc);_0x2dfeb4['markers']['set'](_0x5840b3,_0x7dd636),null!==_0x500f94&&_0xa7930f['add'](_0x500f94);}}['_getVidAttributeName'](_0x2850fc){switch(_0x2850fc['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0xb34295,_0x117e29){_0xb34295['baseVersion']=null;for(const _0x2b6bbe in _0xb34295){const _0x52c416=_0xb34295[_0x2b6bbe];if(_0x52c416 instanceof _0xb3efc5){const _0x1071ff=_0x117e29['get'](_0x52c416['root']['rootName']);_0xb34295[_0x2b6bbe]=this['_fixPosition'](_0x52c416,_0x1071ff);}if(_0x52c416 instanceof _0x1f5a67){const _0x3e9fe1=_0x117e29['get'](_0x52c416['root']['rootName']);_0xb34295[_0x2b6bbe]=this['_fixRange'](_0x52c416,_0x3e9fe1);}'root'===_0x2b6bbe&&(_0xb34295['root']=_0x117e29['get'](_0xb34295['root']['rootName']));}}['_fixRange'](_0x537a11,_0x183731){return this['editor']['model']['createRange'](this['_fixPosition'](_0x537a11['start'],_0x183731),this['_fixPosition'](_0x537a11['end'],_0x183731));}['_fixPosition'](_0x554dfe,_0x25e00b){return this['editor']['model']['createPositionFromPath'](_0x25e00b,_0x554dfe['path'],_0x554dfe['stickiness']);}['_handleInsertOperation'](_0x13f84e){const _0x39c3f8=this['_idsRoots']['get'](_0x13f84e['position']['root']['rootName']),_0x3efcc8=this['_fixPosition'](_0x13f84e['position'],_0x39c3f8),_0x5161ef=null===_0x13f84e['_authorId']?null:_0x13f84e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31b2fb=_0x3efcc8['parent'],_0x157a9d=this['_revisionId'],_0x5c86db=[];for(const _0x2bb447 of _0x13f84e['nodes'])if(_0x2bb447['is']('element'))_0x5c86db['push'](this['_makeIdsRoot'](_0x2bb447));else{for(let _0x5747a3=0x0;_0x5747a3<_0x2bb447['offsetSize'];_0x5747a3++)_0x5c86db['push'](new _0xf70166('$text',{'vid':this['_revisionId']++}));}const _0x148f35=this['_revisionId'];for(let _0x26f202=_0x157a9d;_0x26f202<_0x148f35;_0x26f202++)this['_touched']['set'](_0x26f202,{'userId':_0x5161ef});_0x31b2fb['_insertChild'](_0x3efcc8['offset'],_0x5c86db);}['_handleMoveOperation'](_0x804d77){(_0x804d77=this['_cloneOperation'](_0x804d77,this['_idsRoots']))['_execute']();const _0x1282ca=null===_0x804d77['_authorId']?null:_0x804d77['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x457b7e=_0x804d77['getMovedRangeStart'](),_0x25213b=_0x457b7e['parent'],_0x463914=_0x457b7e['offset'];!function _0x2d6633(_0x38e509,_0x17a625,_0x5dea4b,_0x1436ba){for(let _0x29e096=_0x5dea4b;_0x29e096<_0x1436ba;_0x29e096++){const _0x4d4959=_0x17a625['getChild'](_0x29e096);_0x4d4959['is']('element','$text')?_0x38e509['set'](_0x4d4959['getAttribute']('vid'),{'userId':_0x1282ca}):(_0x38e509['set'](_0x4d4959['getAttribute']('vid_start'),{'userId':_0x1282ca}),_0x2d6633(_0x38e509,_0x4d4959,0x0,_0x4d4959['childCount']),_0x38e509['set'](_0x4d4959['getAttribute']('vid_end'),{'userId':_0x1282ca}));}}(this['_touched'],_0x25213b,_0x463914,_0x463914+_0x804d77['howMany']);}['_handleMergeOperation'](_0x18bee7){const _0x2a8d93=null===(_0x18bee7=this['_cloneOperation'](_0x18bee7,this['_idsRoots']))['_authorId']?null:_0x18bee7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2cfaaa=_0x18bee7['targetPosition']['parent'],_0x27c196=_0x18bee7['sourcePosition']['parent'],_0x498562=_0x2cfaaa['getAttribute']('vid_end'),_0x4221cc=_0x27c196['getAttribute']('vid_start');_0x2cfaaa['_setAttribute']('vid_end',_0x27c196['getAttribute']('vid_end')),_0x27c196['_setAttribute']('vid_end',_0x498562),this['_touched']['set'](_0x4221cc,{'userId':_0x2a8d93}),this['_touched']['set'](_0x498562,{'userId':_0x2a8d93}),_0x18bee7['_execute']();}['_handleSplitOperation'](_0x157f58){const _0x3e39dd=null===(_0x157f58=this['_cloneOperation'](_0x157f58,this['_idsRoots']))['_authorId']?null:_0x157f58['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2570bd=_0x157f58['graveyardPosition'],_0x132395=_0x157f58['splitPosition']['parent'];_0x157f58['_execute']();const _0x546c69=_0x132395['getAttribute']('vid_end'),_0x7c34cd=_0x157f58['insertionPosition']['nodeAfter'];if(_0x2570bd){const _0xdcd4f=_0x7c34cd['getAttribute']('vid_end'),_0x4e2f54=_0x132395['getAttribute']('vid_end');_0x132395['_setAttribute']('vid_end',_0xdcd4f),_0x7c34cd['_setAttribute']('vid_end',_0x4e2f54),this['_touched']['set'](_0x132395['getAttribute']('vid_end'),{'userId':_0x3e39dd}),this['_touched']['set'](_0x7c34cd['getAttribute']('vid_start'),{'userId':_0x3e39dd});}else{const _0x241b49=this['_revisionId']++,_0x5bb34e=this['_revisionId']++;_0x132395['_setAttribute']('vid_end',_0x241b49),_0x7c34cd['_setAttribute']('vid_start',_0x5bb34e),_0x7c34cd['_setAttribute']('vid_end',_0x546c69),this['_touched']['set'](_0x241b49,{'userId':_0x3e39dd}),this['_touched']['set'](_0x5bb34e,{'userId':_0x3e39dd});}}['_handleMarkerOperation'](_0x206e1a){if(!_0x206e1a['affectsData'])return;const _0x325eec=(_0x206e1a=this['_cloneOperation'](_0x206e1a,this['_diffRoots']))['oldRange']?_0x206e1a['oldRange']['root']:null,_0x4d57e7=_0x206e1a['newRange']?_0x206e1a['newRange']['root']:null;_0x325eec&&this['_markers']['delete'](_0x206e1a['name']),_0x4d57e7&&this['_markers']['set'](_0x206e1a['name'],_0x206e1a['newRange']['clone']());const _0x2cf596=null===_0x206e1a['_authorId']?null:_0x206e1a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x478442=_0x206e1a['name'];if(!this['_touchedMarkers']['has'](_0x478442))return void this['_touchedMarkers']['set'](_0x478442,{'range':_0x206e1a['oldRange'],'userId':_0x2cf596});const _0x548f0d=this['_touchedMarkers']['get'](_0x478442),_0x2f6aa8=_0x548f0d['range'],_0x5a1d83=_0x206e1a['newRange'];null==_0x2f6aa8&&null==_0x5a1d83||_0x2f6aa8&&_0x5a1d83&&_0x2f6aa8['isEqual'](_0x5a1d83)?this['_touchedMarkers']['delete'](_0x206e1a['name']):_0x548f0d['userId']=_0x2cf596;}['_handleRootOperation'](_0x1e9112,_0x6c125b){this['_diffRoots']['has'](_0x1e9112['rootName'])?this['_diffRoots']['get'](_0x1e9112['rootName'])['_isAttached']=_0x1e9112['isAdd']:(this['_diffRoots']['set'](_0x1e9112['rootName'],Rt(_0x1e9112['rootName'],_0x1e9112['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1e9112['rootName'],{}),_0x6c125b&&this['_idsRoots']['set'](_0x1e9112['rootName'],Rt(_0x1e9112['rootName'],_0x1e9112['elementName'],!0x0)));const _0x46293d=null===_0x1e9112['_authorId']?null:_0x1e9112['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x34a604=this['_touchedRoots']['get'](_0x1e9112['rootName']);_0x34a604&&_0x34a604['userId']===_0x46293d?this['_touchedRoots']['delete'](_0x1e9112['rootName']):this['_touchedRoots']['set'](_0x1e9112['rootName'],{'userId':_0x46293d,'isAttached':_0x1e9112['isAdd']});}['_handleRootAttributeOperation'](_0x5e08fd){const _0x4da66b=this['_diffRootsAttributes']['get'](_0x5e08fd['root']['rootName']);null===_0x5e08fd['newValue']?delete _0x4da66b[_0x5e08fd['key']]:_0x4da66b[_0x5e08fd['key']]=_0x5e08fd['newValue'];}};function bt(_0x3edcb6){const _0xb69d1a=Rt(_0x3edcb6['rootName'],_0x3edcb6['name'],_0x3edcb6['isAttached']());for(const _0x5c97e1 of _0x3edcb6['getChildren']()){const _0x54989d=_0x5c97e1['_clone'](!0x0);_0xb69d1a['_appendChild'](_0x54989d);}return _0xb69d1a;}function Rt(_0x4bdec9,_0x2dc546,_0x835905=!0x0){const _0x43fc16=new _0x4b5896();return _0x43fc16['rootName']=_0x4bdec9,_0x43fc16['name']=_0x2dc546,_0x43fc16['_isAttached']=_0x835905,_0x43fc16['isAttached']=()=>_0x43fc16['_isAttached'],_0x43fc16;}function kt(_0x3a1772,_0xc93495,_0x199207){const _0x5975b7='elementEnd'==_0x3a1772['type']?_0x199207['createPositionAt'](_0x3a1772['item'],'end'):_0x199207['createPositionBefore'](_0x3a1772['item']);return _0x199207['createPositionFromPath'](_0xc93495,_0x5975b7['path'],_0x5975b7['stickiness']);}function At(_0x309218,_0x35b7aa,_0x49bbe2){const _0x44fcf5='elementStart'==_0x309218['type']?_0x49bbe2['createPositionAt'](_0x309218['item'],0x0):_0x49bbe2['createPositionAfter'](_0x309218['item']);return _0x49bbe2['createPositionFromPath'](_0x35b7aa,_0x44fcf5['path'],_0x44fcf5['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x3f4f43();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x531a32){super(),this['id']=_0x531a32['id']||_0x574201(),this['author']=_0x531a32['author'],this['type']=_0x531a32['type'],this['data']=_0x531a32['data']||{},this['rootName']=_0x531a32['rootName'],this['set']('createdAt',_0x531a32['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x4b852a,_0x139b28){this['newRevisionId']=_0x4b852a,this['oldRevisionId']=_0x139b28,this['changes']=new _0x4f0ec3();}['_setChanges'](_0x28e5d7){for(const _0x4e2d32 of _0x28e5d7)this['changes']['add'](_0x4e2d32);}},Mt=class extends _0x1dd727{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1eaf94,_0x5894ea,mt,wt];}constructor(_0x377f4b){super(_0x377f4b),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x37f1dd,_0x103992,_0x586b21)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x83a266=>{for(const _0x44af80 of this['editor']['editing']['view']['document']['roots'])_0x586b21?_0x83a266['removeClass']('ck-editor__editable__overlay',_0x44af80):_0x83a266['addClass']('ck-editor__editable__overlay',_0x44af80);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5bb74c=>null!==_0x5bb74c),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x238d35,_0x2b395c,_0x5a84f2)=>_0x238d35&&_0x5a84f2?_0x2b395c['changes']['getIndex'](_0x5a84f2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x198248,_0x3af247)=>_0x198248?_0x3af247['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5894ea);}['init'](){const _0x445141=this['editor'],_0x4927cd=new Tt(_0x445141,{'direction':'backward'}),_0x794728=new Tt(_0x445141,{'direction':'forward'});_0x445141['commands']['add']('showPreviousChange',_0x4927cd),_0x445141['commands']['add']('showNextChange',_0x794728),_0x445141['commands']['add']('restoreRevision',new Dt(_0x445141)),this['on']('change:numberOfChanges',()=>{_0x4927cd['refresh'](),_0x794728['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x445141['enableReadOnlyMode']('revision-viewer'),_0x445141['plugins']['has']('WidgetToolbarRepository')&&_0x445141['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x31bbf4){return await this['_utils']['loadRevisionData'](_0x31bbf4,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x31bbf4);}async['getRevisionRootsAttributes'](_0x11a598){return await this['_utils']['loadRevisionData'](_0x11a598,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x11a598);}async['compare'](_0x93f19a,_0x272e96,_0x5e7529=!0x1){if(!this['isEnabled'])return;const _0x34ed26=this['diff'],_0x4c1fa3=this['repository'],_0x2f2cb4='string'==typeof _0x93f19a?_0x4c1fa3['getRevision'](_0x93f19a):_0x93f19a,_0x5b2924='string'==typeof _0x272e96?_0x4c1fa3['getRevision'](_0x272e96):_0x272e96,_0x323ce9=_0x2f2cb4['id'],_0xc1de42=_0x5b2924?_0x5b2924['id']:null;if(!_0x5e7529&&this['diff']&&this['diff']['newRevisionId']===_0x323ce9&&this['diff']['oldRevisionId']===_0xc1de42)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x323ce9,_0xc1de42);const _0x4fa775=this['_getRevisionsRange'](_0x2f2cb4,_0x5b2924,!0x0)['map'](_0x356db2=>this['_utils']['loadRevisionData'](_0x356db2,this['adapter']));return _0x4fa775['push'](new Promise(_0x5f5b13=>{setTimeout(_0x5f5b13,0x14);})),Promise['all'](_0x4fa775)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0xaebd6=this['_getDiff'](_0x323ce9,_0xc1de42);for(const _0x595e70 of _0xaebd6['changes'])this['_changeIdToChange']['set'](_0x595e70['id'],_0x595e70);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2cb085=>{for(const _0xe071b1 of this['editor']['model']['document']['getRootNames']())_0x2cb085['detachRoot'](_0xe071b1);for(const _0x1586c7 of Object['keys'](_0xaebd6['model'])){const _0x2d4354=_0xaebd6['model'][_0x1586c7]['name'],_0x1a1d7d=_0x2cb085['addRoot'](_0x1586c7,_0x2d4354);for(const _0x37bbb2 of Object['keys'](_0xaebd6['attributes'][_0x1586c7]))_0x2cb085['setAttribute'](_0x37bbb2,_0xaebd6['attributes'][_0x1586c7][_0x37bbb2],_0x1a1d7d);_0x2cb085['insert'](_0xaebd6['model'][_0x1586c7],_0x1a1d7d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0xaebd6['changes'])),this['isReady']=!0x0;})['catch'](_0x31b957=>{console['error'](_0x31b957),this['_cleanUp'](),_0x34ed26&&(this['diff']=_0x34ed26),this['isReady']=!0x0;});}['addRevisionData'](_0x4a5402,_0x31dd1e){const _0x3cd85f=this['repository']['createRevision'](_0x4a5402);return _0x3cd85f['on']('_update',(_0xb99c84,_0x37ea78,_0x53c607)=>_0x31dd1e(_0x37ea78,_0x53c607,_0x3cd85f)),this['repository']['addRevision'](_0x3cd85f),_0x3cd85f;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4daa02=>{for(const _0x5e7228 of this['editor']['model']['document']['getRootNames']())_0x4daa02['detachRoot'](_0x5e7228);});}['_sortAndFilterDiffChanges'](_0x1cb6c5){const _0xe3a603=[],_0x19a9e8=new Map();for(const _0x1fb350 of this['editor']['model']['document']['getRootNames']()){const _0xac3e12=this['editor']['editing']['view']['getDomRoot'](_0x1fb350);if(!_0xac3e12)continue;const _0x2b55a9=_0xac3e12['getClientRects']()['item'](0x0);_0x2b55a9&&(_0xe3a603['push'](_0x1fb350),_0x19a9e8['set'](_0x1fb350,_0x2b55a9));}return _0xe3a603['sort']((_0x59254f,_0xcd8379)=>{const _0x249796=_0x19a9e8['get'](_0x59254f),_0x47d0fe=_0x19a9e8['get'](_0xcd8379);return _0x249796['y']-_0x47d0fe['y']||_0x249796['x']-_0x47d0fe['x'];}),(_0x1cb6c5=_0x1cb6c5['filter'](_0x5aa0b3=>_0xe3a603['includes'](_0x5aa0b3['rootName'])))['sort']((_0x1d70e3,_0x439074)=>_0xe3a603['indexOf'](_0x1d70e3['rootName'])-_0xe3a603['indexOf'](_0x439074['rootName'])),_0x1cb6c5;}['_makeTape'](_0x587e20){const _0x4ae65a=Array['from'](_0x587e20['markers'])['filter'](([_0xe3483d,_0x1436f5])=>_0xe3483d['startsWith']('revision:')&&!_0x1436f5['isCollapsed']),_0x455d6b=Array['from'](this['editor']['model']['createRangeIn'](_0x587e20)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x4ae65a['length'])for(const _0xd33306 of _0x455d6b){const [_0x207c14,_0x2ecc15]=_0x4ae65a[0x0],[,_0x333278,_0xca4c26]=_0x207c14['split'](':');if(_0x2ecc15['end']['isEqual'](_0xd33306['nextPosition'])&&_0x4ae65a['shift'](),(_0xd33306['previousPosition']['isEqual'](_0x2ecc15['start'])||_0xd33306['previousPosition']['isAfter'](_0x2ecc15['start']))&&('insertion'==_0x333278?_0xd33306['isAdded']={'userId':_0xca4c26}:'deletion'==_0x333278&&(_0xd33306['isRemoved']={'userId':_0xca4c26})),0x0==_0x4ae65a['length'])break;}return _0x455d6b;}['_refreshStartEndIndex'](_0xe22904){const _0x504904=new Map();for(let _0x555d8b=0x0;_0x555d8b<_0xe22904['length'];_0x555d8b++)'text'===_0xe22904[_0x555d8b]['type']?(_0xe22904[_0x555d8b]['item']['startIndex']=_0x555d8b,_0xe22904[_0x555d8b]['item']['endIndex']=_0x555d8b):('elementStart'===_0xe22904[_0x555d8b]['type']?_0xe22904[_0x555d8b]['item']['startIndex']=_0x555d8b:'elementEnd'===_0xe22904[_0x555d8b]['type']&&(_0xe22904[_0x555d8b]['item']['endIndex']=_0x555d8b),_0x504904['set'](_0xe22904[_0x555d8b]['id'],_0x555d8b));for(const _0x4480bf of _0x504904['values']())'elementStart'===_0xe22904[_0x4480bf]['type']?_0xe22904[_0x4480bf]['item']['endIndex']=_0x504904['get'](_0xe22904[_0x4480bf]['pairId']):'elementEnd'===_0xe22904[_0x4480bf]['type']&&(_0xe22904[_0x4480bf]['item']['startIndex']=_0x504904['get'](_0xe22904[_0x4480bf]['pairId']));}['_processTape'](_0xd5b3ec){for(let _0x80edc0=0x0;_0x80edc0<_0xd5b3ec['length'];_0x80edc0++){if('elementStart'===_0xd5b3ec[_0x80edc0]['type'])_0xd5b3ec[_0x80edc0]['item']['startIndex']=_0x80edc0;else{if('elementEnd'===_0xd5b3ec[_0x80edc0]['type']){_0xd5b3ec[_0x80edc0]['item']['endIndex']=_0x80edc0;const _0x33abb0=_0xd5b3ec[_0x80edc0]['item']['startIndex'];_0xd5b3ec[_0x33abb0]['pairId']=_0xd5b3ec[_0x80edc0]['id'],_0xd5b3ec[_0x80edc0]['pairId']=_0xd5b3ec[_0x33abb0]['id'];}else _0xd5b3ec[_0x80edc0]['item']['startIndex']=_0x80edc0,_0xd5b3ec[_0x80edc0]['item']['endIndex']=_0x80edc0,_0xd5b3ec[_0x80edc0]['pairId']=null;}_0xd5b3ec[_0x80edc0]['markersStart']||(_0xd5b3ec[_0x80edc0]['markersStart']=[],_0xd5b3ec[_0x80edc0]['markersEnd']=[]);}}['_markInsertions'](_0x43a44e,_0x5e9bde){const _0x23ee1d=_0x43a44e['filter'](_0x41fc34=>!_0x41fc34['isAdded']);for(let _0x371ea2=0x0;_0x371ea2<_0x5e9bde['length'];_0x371ea2++)_0x5e9bde[_0x371ea2]['isAdded']&&(_0x23ee1d[_0x371ea2]['isAdded']=_0x5e9bde[_0x371ea2]['isAdded']);}['_getDiff'](_0x5e514f,_0x10bb3b=null){const _0x13380b=this['repository']['getRevision'](_0x5e514f),_0x130dbd=_0x10bb3b?this['repository']['getRevision'](_0x10bb3b):null,_0x3cc0f4=this['_getRevisionsRange'](_0x13380b,_0x130dbd),_0x213e63=_0x3cc0f4[_0x3cc0f4['length']-0x1],_0x3b171e=new Map(),_0x4004ec={'model':{},'attributes':{},'changes':[]},_0x61f019=new Set(),_0x5c8795=new Map();for(let _0xffb5b8=_0x3cc0f4['length']-0x1;_0xffb5b8>=0x0;_0xffb5b8--){const _0x18be82=_0x3cc0f4[_0xffb5b8];for(const _0x4c5f82 of Object['keys'](_0x18be82['diffData']))if(_0x18be82['diffData'][_0x4c5f82]['attachChange']){const _0x4b20c7=_0x18be82['diffData'][_0x4c5f82]['attachChange'];_0x4b20c7['isAttached']?(_0x61f019['add'](_0x4c5f82),_0x5c8795['has'](_0x4c5f82)&&_0x5c8795['get'](_0x4c5f82)['userId']==_0x4b20c7['userId']?_0x5c8795['delete'](_0x4c5f82):_0x5c8795['set'](_0x4c5f82,_0x4b20c7)):_0x5c8795['has'](_0x4c5f82)?(_0x61f019['delete'](_0x4c5f82),_0x5c8795['delete'](_0x4c5f82)):(_0x61f019['add'](_0x4c5f82),_0x5c8795['set'](_0x4c5f82,_0x4b20c7));}else _0x61f019['add'](_0x4c5f82);}for(const _0x2881c1 of _0x61f019){const _0x485f34=_0x5c8795['has'](_0x2881c1)&&!_0x5c8795['get'](_0x2881c1)['isAttached'];let _0x419266=_0x485f34?_0x3cc0f4['length']-0x1:0x0;const _0x29758d=_0x485f34?-0x1:0x1;for(;_0x3cc0f4[_0x419266];){const _0x1bded3=_0x3cc0f4[_0x419266];if(_0x1bded3['diffData'][_0x2881c1]){const _0x5ea2de=_0x485f34?_0x1bded3['diffData'][_0x2881c1]['attributesBefore']:_0x1bded3['diffData'][_0x2881c1]['attributesAfter'];_0x4004ec['attributes'][_0x2881c1]=_0x5ea2de?_0xbd471f(_0x5ea2de):{};break;}_0x419266+=_0x29758d;}}for(const _0x14ff74 of _0x3cc0f4){_0x14ff74['model']={};for(const _0x1ee104 of _0x14ff74['authors'])_0x3b171e['set'](_0x1ee104['id'],_0x1ee104);for(const _0x195916 of _0x61f019){const _0xa2a9bd=_0x14ff74['diffData'][_0x195916]?_0x14ff74['diffData'][_0x195916]['insertions']:'[]',_0x14e1a5=_0x14ff74['diffData'][_0x195916]?_0x14ff74['diffData'][_0x195916]['deletions']:'[]',_0x30dedd=_0x14ff74['diffData'][_0x195916]?.['rootElementName']||'$root';_0x14ff74['model'][_0x195916]={'insertions':this['_utils']['_makeModelFromViewString'](_0xa2a9bd,_0x30dedd),'deletions':this['_utils']['_makeModelFromViewString'](_0x14e1a5,_0x30dedd)};}}for(const _0x395e9b of _0x61f019){let _0x57fcb3=null,_0x149a83=0x0;const _0x13745b=_0x3cc0f4['map'](_0x433cad=>_0x433cad['diffData'][_0x395e9b]?.['rootElementName'])['find'](_0x23fac7=>void 0x0!==_0x23fac7)||'$root',_0x28b50f=new Map(Array['from'](_0x13380b['model'][_0x395e9b]['insertions']['markers'])['filter'](([_0x1353dd])=>!_0x1353dd['startsWith']('revision:')));let _0x47f8da=0x0;for(const _0x3d6a5a of _0x3cc0f4){const _0x480873=this['_makeTape'](_0x3d6a5a['model'][_0x395e9b]['insertions']);_0x3d6a5a==_0x13380b?(_0x57fcb3=_0x480873,_0x149a83=_0x57fcb3['length'],_0x57fcb3['forEach'](_0x3296f9=>{_0x3296f9['id']=_0x47f8da++;}),this['_processTape'](_0x57fcb3)):this['_markInsertions'](_0x57fcb3,_0x480873);const _0x10801f=_0x57fcb3['filter'](_0x5ef340=>!_0x5ef340['isAdded'])['map'](_0x3d7a5a=>_0x3d7a5a['id']);let _0x2b82bd=0x0;const _0x2312e4=this['_makeTape'](_0x3d6a5a['model'][_0x395e9b]['deletions']);_0x2312e4['forEach'](_0x45c9ec=>{_0x45c9ec['isRemoved']?_0x45c9ec['id']=_0x149a83++:_0x45c9ec['id']=_0x10801f[_0x2b82bd++];}),this['_processTape'](_0x2312e4),this['_setDistance'](_0x57fcb3,'isAdded'),this['_setDistance'](_0x2312e4,'isRemoved'),_0x3d6a5a==_0x13380b&&this['_markMarkers'](_0x57fcb3,_0x28b50f),_0x57fcb3=this['_joinTapes'](_0x57fcb3,_0x2312e4),this['_refreshStartEndIndex'](_0x57fcb3),this['_setDistance'](_0x57fcb3,'isRemoved');}_0x57fcb3=_0x57fcb3['filter'](_0x3fc51a=>!(_0x3fc51a['isAdded']&&_0x3fc51a['isRemoved']));const _0x13f56b=new Map(_0x213e63['model'][_0x395e9b]['deletions']['markers']),_0x11c6d3=new Set(_0x28b50f['keys']());for(const _0x48ad24 of _0x13f56b['keys']())_0x11c6d3['delete'](_0x48ad24);this['_markSuggestions'](_0x57fcb3,_0x11c6d3),this['_fixObsoleteTags'](_0x57fcb3),_0x57fcb3=this['_removeMissingPairs'](_0x57fcb3),_0x57fcb3=this['_markMismatchedRemovedTags'](_0x57fcb3),_0x57fcb3=this['_removeUnsupportedChanges'](_0x57fcb3);const {root:_0x18e813,changes:_0x541099}=this['_makeModelFromTape'](_0x57fcb3,_0x3b171e,_0x395e9b,_0x13745b);_0x4004ec['model'][_0x395e9b]=_0x18e813;const _0x261fa1=_0x5c8795['get'](_0x395e9b);if(_0x261fa1){const _0x111146=new Ot({'author':_0x3b171e['get'](_0x261fa1['userId']),'type':_0x261fa1['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x395e9b});_0x541099['unshift'](_0x111146),_0x4004ec['attributes'][_0x395e9b]['revisionHistoryAttachChange']=_0x111146['id'];}_0x4004ec['changes']=_0x4004ec['changes']['concat'](_0x541099);}return _0x4004ec;}['_markMarkers'](_0x544c08,_0x4d90cf){for(let _0x37bc45=0x0;_0x37bc45<_0x544c08['length'];_0x37bc45++)for(const [_0x58e0a5,_0xbcc7a8]of _0x4d90cf)!_0xbcc7a8['isCollapsed']&&_0xbcc7a8['start']['isEqual'](_0x544c08[_0x37bc45]['previousPosition'])&&_0x544c08[_0x37bc45]['markersStart']['push'](_0x58e0a5),_0xbcc7a8['end']['isEqual'](_0x544c08[_0x37bc45]['nextPosition'])&&_0x544c08[_0x37bc45]['markersEnd']['push'](_0x58e0a5);}['_joinTapes'](_0x29e173,_0xd296){let _0xd302b=[],_0x25b53c=0x0,_0x1d443c=0x0;for(;_0x25b53c<_0x29e173['length']||_0x1d443c<_0xd296['length'];){const _0xce042d=_0x29e173[_0x25b53c]||{},_0x3fde84=_0xd296[_0x1d443c]||{};if(_0xce042d['id']==_0x3fde84['id'])_0x25b53c++,_0x1d443c++,_0xd302b['push'](_0xce042d);else{if(_0x3fde84['isRemoved']&&_0xce042d['isAdded']){const {commonTape:_0x541996,iEnd:_0x55bbd7,jEnd:_0x9c6e1f}=this['_threeWayMerge'](_0x29e173,_0x25b53c,_0xd296,_0x1d443c);_0xd302b=_0xd302b['concat'](_0x541996),_0x25b53c=_0x55bbd7,_0x1d443c=_0x9c6e1f;}else _0x3fde84['isRemoved']?(_0x1d443c++,_0xd302b['push'](_0x3fde84)):(_0x25b53c++,_0xd302b['push'](_0xce042d));}}return _0xd302b;}['_markSuggestions'](_0xb01762,_0x1b1762){const _0x2a31a2=[];for(let _0x2338ae=0x0;_0x2338ae<_0xb01762['length'];_0x2338ae++){for(let _0x55e00a=0x0;_0x55e00a<_0xb01762[_0x2338ae]['markersStart']['length'];_0x55e00a++){const _0xc26ae4=_0xb01762[_0x2338ae]['markersStart'][_0x55e00a];if(!_0x1b1762['has'](_0xc26ae4))continue;const {group:_0xca15e6,type:_0xf123a,authorId:_0x29bbad}=_0x164d0b(_0xc26ae4);'revision-suggestion'!=_0xca15e6||'insertion'!=_0xf123a&&'deletion'!=_0xf123a||(_0x2a31a2['unshift']({'type':_0xf123a,'name':_0xc26ae4,'userId':_0x29bbad}),_0xb01762[_0x2338ae]['markersStart']['splice'](_0x55e00a,0x1),_0x55e00a--);}_0x4d9d0b(_0xb01762[_0x2338ae]);for(let _0x521d9d=0x0;_0x521d9d<_0xb01762[_0x2338ae]['markersEnd']['length'];_0x521d9d++){const _0x58bf3f=_0xb01762[_0x2338ae]['markersEnd'][_0x521d9d];if(!_0x1b1762['has'](_0x58bf3f))continue;const {group:_0x1816e1,type:_0x47297e}=_0x164d0b(_0x58bf3f);if('revision-suggestion'!=_0x1816e1||'insertion'!=_0x47297e&&'deletion'!=_0x47297e)continue;_0xb01762[_0x2338ae]['markersEnd']['splice'](_0x521d9d,0x1),_0x521d9d--;const _0x4d1722=_0x2a31a2['findIndex'](_0xa44d9b=>_0xa44d9b['name']==_0x58bf3f);_0x4d1722>-0x1&&_0x2a31a2['splice'](_0x4d1722,0x1);}}function _0x164d0b(_0x588459){const _0x17649d=_0x588459['split'](':');return{'group':_0x17649d[0x0],'type':_0x17649d[0x1],'subType':_0x17649d['length']>=0x5?_0x17649d[0x2]:null,'id':_0x17649d['length']<0x5?_0x17649d[0x2]:_0x17649d[0x3],'authorId':_0x17649d['length']<0x5?_0x17649d[0x3]:_0x17649d[0x4],'markerCount':0x6==_0x17649d['length']?_0x17649d[0x5]:null};}function _0x4d9d0b(_0x17c989){for(let _0x57599c=0x0;_0x57599c<_0x2a31a2['length'];_0x57599c++){if(_0x17c989['isAdded']&&'insertion'==_0x2a31a2[_0x57599c]['type']&&_0x17c989['isAdded']['userId']==_0x2a31a2[_0x57599c]['userId'])return _0x17c989['isAddSuggestion']=_0x2a31a2[_0x57599c],void delete _0x17c989['isAdded'];if(!_0x17c989['isAdded']&&!_0x17c989['isRemoved']&&'deletion'==_0x2a31a2[_0x57599c]['type'])return void(_0x17c989['isRemoveSuggestion']=_0x2a31a2[_0x57599c]);}}}['_setDistance'](_0x5ed0b3,_0x1d58d0){let _0x46a393=0x0,_0x1bf57e=!0x1;const _0x26818e=new Map();for(const _0x33c440 of _0x5ed0b3)_0x33c440[_0x1d58d0]?_0x1bf57e&&(_0x46a393++,_0x1bf57e=!0x1):(_0x46a393++,_0x1bf57e=!0x0),_0x26818e['set'](_0x33c440['id'],_0x46a393);for(let _0x1e4c6d=0x0;_0x1e4c6d<_0x5ed0b3['length'];_0x1e4c6d++){if('isRemoved'==_0x1d58d0&&_0x5ed0b3[_0x1e4c6d]['isAdded']||'isAdded'==_0x1d58d0&&_0x5ed0b3[_0x1e4c6d]['isRemoved'])continue;if('text'==_0x5ed0b3[_0x1e4c6d]['type']){_0x5ed0b3[_0x1e4c6d]['distance']=0x0;continue;}const _0x57838b=_0x26818e['get'](_0x5ed0b3[_0x1e4c6d]['pairId']),_0x9d104a=_0x26818e['get'](_0x5ed0b3[_0x1e4c6d]['id']);_0x5ed0b3[_0x1e4c6d]['distance']=_0x57838b-_0x9d104a;}}['_getRevisionsRange'](_0x5ef67b,_0x211d98,_0x704c7f=!0x1){const _0x1fd0b3=[];let _0x4d832c=this['repository']['getIndex'](_0x5ef67b),_0x25a536=this['repository']['getIndex'](_0x211d98);for(-0x1==_0x25a536&&(_0x25a536=this['repository']['_revisions']['length'],_0x704c7f=!0x1);_0x4d832c<_0x25a536;)_0x1fd0b3['push'](this['repository']['getRevision'](_0x4d832c)),_0x4d832c++;return _0x704c7f&&_0x1fd0b3['push'](this['repository']['getRevision'](_0x4d832c)),_0x1fd0b3;}['_threeWayMerge'](_0x3febc4,_0x507486,_0x6df770,_0x5c0eeb){const _0x3adf52=this['editor']['model']['schema'];let _0x3759d3=_0x507486;for(;_0x3febc4[_0x3759d3]&&_0x3febc4[_0x3759d3]['isAdded'];)_0x3759d3++;let _0x43da16=_0x5c0eeb;for(;_0x6df770[_0x43da16]&&_0x6df770[_0x43da16]['isRemoved'];)_0x43da16++;_0x1fcdfb(_0x3febc4,_0x507486,_0x3759d3),_0x1fcdfb(_0x6df770,_0x5c0eeb,_0x43da16);const _0x5404e0=_0x6df770['slice'](_0x5c0eeb,_0x43da16)['concat'](_0x3febc4['slice'](_0x507486,_0x3759d3));return _0x5404e0['sort']((_0x540924,_0x528afe)=>_0x540924['side']!=_0x528afe['side']?_0x540924['side']-_0x528afe['side']:_0x540924['level']!=_0x528afe['level']?_0x540924['level']-_0x528afe['level']:_0x540924['distance']!=_0x528afe['distance']?_0x528afe['distance']-_0x540924['distance']:!!_0x540924['isAdded']!=!!_0x528afe['isAdded']?-0x1==_0x540924['side']||0x0==_0x540924['side']?_0x540924['isAdded']?-0x1:0x1:_0x540924['isAdded']?0x1:-0x1:_0x540924['index']-_0x528afe['index']),{'commonTape':_0x5404e0,'iEnd':_0x3759d3,'jEnd':_0x43da16};function _0x1fcdfb(_0x2d7c7c,_0x444e49,_0x450bac){let _0x1e2865=-0x1,_0x3ab9f1=Number['POSITIVE_INFINITY'],_0xb3f3a8=!0x0;for(let _0x37b7ce=_0x444e49;_0x37b7ce<_0x450bac;_0x37b7ce++)if(_0x3adf52['isInline'](_0x2d7c7c[_0x37b7ce]['item'])||(_0xb3f3a8=!0x1),_0x2d7c7c[_0x37b7ce]['item']['startIndex']<_0x444e49&&(_0x1e2865=_0x37b7ce),_0x2d7c7c[_0x37b7ce]['item']['endIndex']>=_0x450bac){_0x3ab9f1=_0x37b7ce;break;}_0xb3f3a8&&(_0x1e2865=_0x450bac-0x1);for(let _0x22804a=_0x444e49;_0x22804a<_0x450bac;_0x22804a++)_0x2d7c7c[_0x22804a]['side']=_0x22804a<=_0x1e2865?-0x1:_0x22804a<_0x3ab9f1?0x0:0x1,_0x2d7c7c[_0x22804a]['index']=_0x22804a;let _0x1e4da2=0x0;for(let _0x5ec691=_0x444e49;_0x5ec691<=_0x1e2865;_0x5ec691++)0x0==_0x2d7c7c[_0x5ec691]['distance']?_0x2d7c7c[_0x5ec691]['level']=_0x1e4da2:(_0x1e4da2++,_0x2d7c7c[_0x5ec691]['level']=_0x1e4da2,_0x1e4da2++);for(let _0x10dfa0=_0x444e49;_0x10dfa0<_0x450bac;_0x10dfa0++)0x0==_0x2d7c7c[_0x10dfa0]['side']&&(_0x2d7c7c[_0x10dfa0]['level']=_0x1e4da2);_0x1e4da2=0x0;for(let _0x273b51=_0x450bac-0x1;_0x273b51>=_0x3ab9f1;_0x273b51--)0x0==_0x2d7c7c[_0x273b51]['distance']?_0x2d7c7c[_0x273b51]['level']=_0x1e4da2:(_0x1e4da2--,_0x2d7c7c[_0x273b51]['level']=_0x1e4da2,_0x1e4da2--);}}['_fixObsoleteTags'](_0x5f4772){const _0x3c5d56=new Map(),_0x4fd983=this['editor']['model']['schema'];for(let _0x1087cd=0x1;_0x1087cd<_0x5f4772['length'];_0x1087cd++){let _0x173bb7,_0x112813,_0x49e099;const _0x82b334=_0x5f4772[_0x1087cd],_0x57f099=_0x5f4772[_0x1087cd-0x1];if('text'==_0x82b334['type'])continue;if(_0x82b334['type']!=_0x57f099['type'])continue;if(!_0x4fd983['isBlock'](_0x57f099['item'])||_0x4fd983['isLimit'](_0x57f099['item']))continue;if(!_0x4fd983['isBlock'](_0x82b334['item'])||_0x4fd983['isLimit'](_0x82b334['item']))continue;if((_0x5f4772[_0x1087cd]['isAdded']||_0x5f4772[_0x1087cd]['isAddSuggestion'])&&_0x5f4772[_0x1087cd-0x1]['isRemoved'])_0x173bb7=_0x5f4772[_0x1087cd],_0x112813=_0x5f4772[_0x1087cd-0x1],_0x49e099=_0x1087cd-0x1;else{if(!_0x5f4772[_0x1087cd]['isRemoved']||!_0x5f4772[_0x1087cd-0x1]['isAdded']&&!_0x5f4772[_0x1087cd-0x1]['isAddSuggestion'])continue;_0x173bb7=_0x5f4772[_0x1087cd-0x1],_0x112813=_0x5f4772[_0x1087cd],_0x49e099=_0x1087cd;}const _0x12f772=_0x173bb7['level']==_0x112813['level'],_0x3d6f34=Math['abs'](_0x173bb7['level'])<Math['abs'](_0x112813['level'])&&0x0==_0x112813['distance'];(_0x12f772||_0x3d6f34)&&(_0x3c5d56['set'](_0x112813['id'],_0x173bb7['id']),_0x5f4772['splice'](_0x49e099,0x1),_0x1087cd--,_0x173bb7['isAdded']=!0x1);}for(let _0x13c42f=0x0;_0x13c42f<_0x5f4772['length'];_0x13c42f++)_0x3c5d56['has'](_0x5f4772[_0x13c42f]['pairId'])&&(_0x5f4772[_0x13c42f]['pairId']=_0x3c5d56['get'](_0x5f4772[_0x13c42f]['pairId']));}['_removeMissingPairs'](_0x338d49){const _0x17e7d8=new Set(_0x338d49['map'](_0x1668e4=>_0x1668e4['id']));for(let _0x4ed201=0x0;_0x4ed201<_0x338d49['length'];_0x4ed201++)_0x17e7d8['has'](_0x338d49[_0x4ed201]['pairId'])||0x0==_0x338d49[_0x4ed201]['distance']||(_0x338d49[_0x4ed201]['isIncorrect']=!0x0);return _0x338d49['filter'](_0x46640c=>!_0x46640c['isIncorrect']);}['_markMismatchedRemovedTags'](_0x9f8f84){const _0x8f7f49=new Set();for(let _0x2b4ae2=0x0;_0x2b4ae2<_0x9f8f84['length'];_0x2b4ae2++){if(_0x8f7f49['has'](_0x9f8f84[_0x2b4ae2]['id'])&&_0x9f8f84[_0x2b4ae2]['isRemoved']&&(_0x9f8f84[_0x2b4ae2]['isIncorrect']=!0x0),_0x9f8f84[_0x2b4ae2]['isIncorrect'])continue;if(0x0==_0x9f8f84[_0x2b4ae2]['distance'])continue;if('elementStart'!=_0x9f8f84[_0x2b4ae2]['type'])continue;if(null==_0x9f8f84[_0x2b4ae2]['pairId'])continue;let _0x1982c8=_0x2b4ae2+0x1,_0x5d9431=0x0;for(;_0x9f8f84[_0x1982c8]['id']!=_0x9f8f84[_0x2b4ae2]['pairId'];)'elementStart'==_0x9f8f84[_0x1982c8]['type']?_0x5d9431++:'elementEnd'==_0x9f8f84[_0x1982c8]['type']&&_0x5d9431--,_0x1982c8++;if(0x0!=_0x5d9431){if(_0x9f8f84[_0x2b4ae2]['isRemoved'])_0x9f8f84[_0x2b4ae2]['isIncorrect']=!0x0;else{for(;_0x1982c8!=_0x2b4ae2;)_0x9f8f84[_0x1982c8]['isRemoved']&&0x0!=_0x9f8f84[_0x1982c8]['distance']&&(_0x9f8f84[_0x1982c8]['isIncorrect']=!0x0,_0x8f7f49['add'](_0x9f8f84[_0x1982c8]['pairId'])),_0x1982c8--;}}}return _0x9f8f84['filter'](_0x13547a=>!_0x13547a['isIncorrect']);}['_removeUnsupportedChanges'](_0x550177){const _0x13fe28=this['editor']['model']['schema'];for(let _0x54033f=0x0;_0x54033f<_0x550177['length'];_0x54033f++){if(!(_0x550177[_0x54033f]['isAdded']||_0x550177[_0x54033f]['isAddSuggestion']||_0x550177[_0x54033f]['isRemoved']||_0x550177[_0x54033f]['isRemoveSuggestion']))continue;if(0x0==_0x550177[_0x54033f]['distance'])continue;const _0x571202=_0x550177[_0x54033f]['item'];_0x13fe28['isBlock'](_0x571202)||_0x13fe28['isLimit'](_0x571202)||(_0x550177[_0x54033f]['isAdded']&&delete _0x550177[_0x54033f]['isAdded'],_0x550177[_0x54033f]['isAddSuggestion']&&delete _0x550177[_0x54033f]['isAddSuggestion'],_0x550177[_0x54033f]['isRemoveSuggestion']&&delete _0x550177[_0x54033f]['isRemoveSuggestion'],_0x550177[_0x54033f]['isRemoved']&&(_0x550177[_0x54033f]['isIncorrect']=!0x0));}return _0x550177['filter'](_0x3c80a1=>!_0x3c80a1['isIncorrect']);}['_makeModelFromTape'](_0x27525d,_0x1212cd,_0x351c8e,_0x431410){const _0x4f1f90=new _0x4b5896(),_0x3a1581=[],_0x33cd18=new Map(),_0x4efc72=this['editor']['model'],_0x4d1f70=_0x4efc72['schema'],_0x59fb6c=[_0x4f1f90],_0x3ee8b6={},_0x18c148={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x4f1f90['name']=_0x431410;let _0xd18a6a=null;const _0x3ffb97=[0x0];for(let _0x393f4b=0x0;_0x393f4b<_0x27525d['length'];_0x393f4b++)if('elementStart'===_0x27525d[_0x393f4b]['type']){_0x27525d[_0x393f4b]['previousPosition']=_0x4efc72['createPositionFromPath'](_0x4f1f90,_0x3ffb97);const _0x177e8c=new _0xf70166(_0x27525d[_0x393f4b]['item']['name'],_0x27525d[_0x393f4b]['item']['getAttributes']());_0x59fb6c[0x0]['_appendChild'](_0x177e8c),_0x3ffb97['push'](0x0),_0x59fb6c['unshift'](_0x177e8c),_0x27525d[_0x393f4b]['nextPosition']=_0x4efc72['createPositionFromPath'](_0x4f1f90,_0x3ffb97);}else'elementEnd'===_0x27525d[_0x393f4b]['type']?(_0x59fb6c['shift'](),_0x27525d[_0x393f4b]['previousPosition']=_0x4efc72['createPositionFromPath'](_0x4f1f90,_0x3ffb97),_0x3ffb97['pop'](),_0x3ffb97[_0x3ffb97['length']-0x1]++,_0x27525d[_0x393f4b]['nextPosition']=_0x4efc72['createPositionFromPath'](_0x4f1f90,_0x3ffb97)):(_0x27525d[_0x393f4b]['previousPosition']=_0x4efc72['createPositionFromPath'](_0x4f1f90,_0x3ffb97),_0xd18a6a?_0xd18a6a['_data']+=_0x27525d[_0x393f4b]['item']['data']:_0xd18a6a=new _0x4a311b(_0x27525d[_0x393f4b]['item']['data'],_0x27525d[_0x393f4b]['item']['getAttributes']()),_0x27525d[_0x393f4b+0x1]&&'text'===_0x27525d[_0x393f4b+0x1]['type']&&_0x59b2da(_0xd18a6a,_0x27525d[_0x393f4b+0x1]['item'])||(_0x59fb6c[0x0]['_appendChild'](_0xd18a6a),_0xd18a6a=null),_0x3ffb97[_0x3ffb97['length']-0x1]+=_0x27525d[_0x393f4b]['item']['offsetSize'],_0x27525d[_0x393f4b]['nextPosition']=_0x4efc72['createPositionFromPath'](_0x4f1f90,_0x3ffb97));for(let _0x29a949=0x0;_0x29a949<_0x27525d['length'];_0x29a949++){const _0x213816=_0x27525d[_0x29a949]['previousPosition'],_0x56d06c=_0x27525d[_0x29a949]['nextPosition'];for(const _0x796bf of _0x27525d[_0x29a949]['markersStart'])_0x33cd18['set'](_0x796bf,{'start':_0x213816,'end':null});_0x4ecafd('isRemoveSuggestion',_0x29a949,_0x213816,_0x56d06c),_0x4ecafd('isAddSuggestion',_0x29a949,_0x213816,_0x56d06c),_0x4ecafd('isRemoved',_0x29a949,_0x213816,_0x56d06c),_0x4ecafd('isAdded',_0x29a949,_0x213816,_0x56d06c);for(const _0x14a696 of _0x27525d[_0x29a949]['markersEnd']){const _0x319477=_0x33cd18['get'](_0x14a696);_0x319477?_0x319477['end']=_0x56d06c:_0x33cd18['set'](_0x14a696,{'start':_0x56d06c,'end':_0x56d06c});}}for(const [_0x5ee8e9,_0x774692]of _0x33cd18){const _0x190bce=this['editor']['model']['createRange'](_0x774692['start'],_0x774692['end']);_0x4f1f90['markers']['set'](_0x5ee8e9,_0x190bce);}return _0x3a1581['sort']((_0x11c428,_0x5adc94)=>{const _0x511ab3=_0x4f1f90['markers']['get']('revision:'+_0x11c428['id']),_0x5b92a8=_0x4f1f90['markers']['get']('revision:'+_0x5adc94['id']);return _0x511ab3['start']['isBefore'](_0x5b92a8['start'])?-0x1:_0x511ab3['start']['isAfter'](_0x5b92a8['start'])?0x1:_0x511ab3['end']['isBefore'](_0x5b92a8['end'])?-0x1:_0x511ab3['end']['isAfter'](_0x5b92a8['end'])?0x1:'add'===_0x11c428['type']?-0x1:0x1;}),{'root':_0x4f1f90,'changes':_0x3a1581};function _0x4ecafd(_0x106795,_0x33bd23,_0x387164,_0x3b456f){const _0x5deb1e=!!_0x27525d[_0x33bd23][_0x106795],_0x17b507=_0x5deb1e?_0x27525d[_0x33bd23][_0x106795]['userId']:null,_0x100ba6=_0x33bd23===_0x27525d['length']-0x1,_0x3141f5=_0x18c148[_0x106795][0x0],_0x51f2a5=_0x4d1f70['isObject'](_0x27525d[_0x33bd23]['item']);!_0x3ee8b6[_0x106795]&&_0x5deb1e?_0x3ee8b6[_0x106795]={'start':_0x387164,'tapeItem':_0x27525d[_0x33bd23],'userId':_0x17b507,'type':_0x106795}:_0x3ee8b6[_0x106795]&&!_0x5deb1e?(_0x3ee8b6[_0x106795]['end']=_0x387164,_0x6aaf30(_0x3ee8b6[_0x106795]),_0x3ee8b6[_0x106795]=null):_0x3ee8b6[_0x106795]&&_0x5deb1e&&_0x3ee8b6[_0x106795]['userId']!==_0x17b507&&(_0x3ee8b6[_0x106795]['end']=_0x387164,_0x3141f5&&_0x3141f5['userId']===_0x3ee8b6[_0x106795]['userId']||_0x6aaf30(_0x3ee8b6[_0x106795]),_0x3ee8b6[_0x106795]={'start':_0x387164,'tapeItem':_0x27525d[_0x33bd23],'userId':_0x17b507,'type':_0x106795}),_0x3ee8b6[_0x106795]&&_0x51f2a5&&('elementStart'!==_0x27525d[_0x33bd23]['type']||_0x3141f5&&_0x3141f5['userId']===_0x17b507||_0x18c148[_0x106795]['unshift']({'userId':_0x17b507,'object':_0x27525d[_0x33bd23]['item'],'change':_0x3ee8b6[_0x106795]}),'elementEnd'===_0x27525d[_0x33bd23]['type']&&_0x3141f5&&_0x3141f5['object']===_0x27525d[_0x33bd23]['item']&&(_0x18c148[_0x106795]['shift'](),_0x3ee8b6[_0x106795]=_0x3141f5['change'])),_0x3ee8b6[_0x106795]&&_0x100ba6&&(_0x3ee8b6[_0x106795]['end']=_0x3b456f,_0x6aaf30(_0x3ee8b6[_0x106795]),_0x3ee8b6[_0x106795]=null);}function _0x6aaf30({start:_0x1321e5,end:_0x268de1,tapeItem:_0x16f0d7,userId:_0x5d3ec1,type:_0x3de554}){const _0x3a89ba=_0x16f0d7['item'],_0x1b4ef9=_0x4efc72['schema']['isBlock'](_0x3a89ba)&&!_0x4efc72['schema']['isLimit'](_0x3a89ba),_0x54f7b1=_0x1321e5['nodeAfter']==_0x268de1['parent']&&_0x268de1['isAtStart'];if(_0x1b4ef9&&_0x54f7b1)return;const _0x1699bb=_0x4efc72['createRange'](_0x1321e5,_0x268de1),_0xcf7b3b=new Ot({'author':_0x1212cd['get'](_0x5d3ec1),'type':'isAdded'==_0x3de554||'isAddSuggestion'==_0x3de554?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3de554||'isRemoveSuggestion'==_0x3de554},'createdAt':new Date(),'rootName':_0x351c8e});_0x3a1581['push'](_0xcf7b3b),_0x4f1f90['markers']['set']('revision:'+_0xcf7b3b['id'],_0x1699bb);}function _0x59b2da(_0x2c3dea,_0x4e0a07){const _0x39c445=_0x2c3dea['getAttributes'](),_0x3f1bc3=_0x4e0a07['getAttributes']();for(const _0xa7a695 of _0x39c445){if(_0xa7a695[0x1]!==_0x4e0a07['getAttribute'](_0xa7a695[0x0]))return!0x1;_0x3f1bc3['next']();}return _0x3f1bc3['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5dbc63=>{const _0x74593a=_0x5dbc63['markerName']['split'](':')[0x1],_0x4148f9=this['_getChangeFromId'](_0x74593a);if(!_0x4148f9)return null;const _0x21a70a='add'==_0x4148f9['type']?'insertion':'deletion',_0x156f82=['ck-suggestion-marker','ck-suggestion-marker-'+_0x21a70a];return _0x4148f9['data']['isSuggestion']&&_0x156f82['push']('ck-suggestion-marker-'+_0x21a70a+'-new'),this['activeChange']==_0x4148f9&&_0x156f82['push']('ck-suggestion-marker--active'),{'classes':_0x156f82,'attributes':{'data-change-id':_0x74593a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x48aff7=>{_0x48aff7['on']('element:pre',(_0x1d4554,_0x447eee,_0x648fd8)=>{const _0x5d58d7=_0x447eee['viewItem']['getChild'](0x0);if(!_0x5d58d7||!_0x5d58d7['is']('element','code'))return;if(!_0x648fd8['consumable']['consume'](_0x5d58d7,{'attributes':['vid_start','vid_end']}))return;const _0x36d9bb=_0x447eee['modelRange']['start']['nodeAfter'];_0x648fd8['writer']['setAttribute']('vid_start',_0x5d58d7['getAttribute']('vid_start'),_0x36d9bb),_0x648fd8['writer']['setAttribute']('vid_end',_0x5d58d7['getAttribute']('vid_end'),_0x36d9bb);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x4ba425=>{_0x4ba425['on']('element',(_0x337930,_0x19d7f1,_0x4832)=>{if(!_0x4832['consumable']['consume'](_0x19d7f1['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x19d7f1['modelRange']['isCollapsed'])return;const _0x362146=_0x19d7f1['modelRange']['start']['nodeAfter'];_0x362146['hasAttribute']('vid_start')||_0x362146['hasAttribute']('vid')||(_0x4832['writer']['setAttribute']('vid_start',_0x19d7f1['viewItem']['getAttribute']('vid_start'),_0x362146),_0x4832['writer']['setAttribute']('vid_end',_0x19d7f1['viewItem']['getAttribute']('vid_end'),_0x362146));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3237a8=>_0x3237a8['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3df0bc,[,_0x1bce6b])=>{['vid_start','vid_end','vid']['includes'](_0x1bce6b)&&(_0x3df0bc['return']=!0x0,_0x3df0bc['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1a2a34=>{_0x1a2a34['on']('attribute:vid',(_0x3e4eae,_0x581acf,_0x4655a8)=>{if('\x20'!=_0x581acf['item']['data']||_0x581acf['item']['parent']['maxOffset']>0x1)return;if(!_0x4655a8['consumable']['consume'](_0x581acf['item'],_0x3e4eae['name']))return;const _0x43aed0=_0x4655a8['writer'],_0x603cb6=_0x4655a8['mapper']['toViewRange'](_0x581acf['range']);_0x43aed0['wrap'](_0x603cb6,_0x43aed0['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5c0634){const _0x47aa1c=_0x5c0634['plugins']['get']('RevisionViewer');return(_0x493b80,_0x313d10,_0x567caf)=>{const _0x53ef8c=_0x313d10['markerName']['split'](':')[0x1],_0x4edca0=_0x47aa1c['_getChangeFromId'](_0x53ef8c);if(!_0x4edca0)return null;const _0x51ef23='add'==_0x4edca0['type']?'split':'merge';if(!_0x567caf['consumable']['test'](_0x313d10['markerRange'],_0x493b80['name']))return;const _0x5a3f77=_0x313d10['markerRange']['getWalker'](),_0x2a37ad=_0x313d10['markerRange']['start'],_0x3dc85a=_0x5c0634['model']['schema'];let _0x4e3535=null,_0xa072ac=null,_0x111af6=!0x1,_0x3adc81=!0x1;for(const _0x662335 of _0x5a3f77){const _0xd2a4fc=_0x662335['item'];_0x111af6=_0x111af6||_0x3dc85a['isContent'](_0xd2a4fc);const _0x515dc2=_0x567caf['mapper']['toViewElement'](_0xd2a4fc);if(_0x515dc2&&_0x515dc2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x662335['type']&&(_0x3dc85a['isBlock'](_0xd2a4fc)&&!_0x3dc85a['isLimit'](_0xd2a4fc)&&(_0xd2a4fc['nextSibling']||_0x2a37ad['isAtEnd']?_0x4e3535&&_0x4e3535['parent']==_0xd2a4fc||(_0x4e3535=_0xd2a4fc,_0x3e1382(_0x662335['previousPosition']),_0x3adc81=!0x0):_0xa072ac=_0xa072ac||_0x662335['previousPosition']));}function _0x3e1382(_0x4d86b6){const _0x26249c=_0x567caf['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x51ef23}),_0x23d236=_0x567caf['mapper']['toViewPosition'](_0x4d86b6);_0x4edca0['data']['isSuggestion']&&_0x567caf['writer']['addClass']('ck-suggestion-marker-'+_0x51ef23+'-new',_0x26249c),_0x47aa1c['activeChange']==_0x4edca0&&_0x567caf['writer']['addClass']('ck-suggestion-marker--active',_0x26249c),_0x567caf['writer']['insert'](_0x23d236,_0x26249c),_0x567caf['mapper']['bindElementToMarker'](_0x26249c,_0x313d10['markerName']);}_0x111af6||_0x3adc81||!_0xa072ac||_0x3e1382(_0xa072ac);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3cc34b,_0x20f391,_0x503b5c)=>{const _0x30ce02=_0x503b5c['mapper']['markerNameToElements'](_0x20f391['markerName']);if(_0x30ce02){for(const _0x1ad059 of _0x30ce02)(_0x1ad059['hasClass']('ck-suggestion-marker-split')||_0x1ad059['hasClass']('ck-suggestion-marker-merge'))&&(_0x503b5c['mapper']['unbindElementFromMarkerName'](_0x1ad059,_0x20f391['markerName']),_0x503b5c['writer']['remove'](_0x1ad059));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x18149b,_0x18808b,_0x20c7f2)=>{const _0x2428c0=_0x18808b['markerName']['split'](':')[0x1],_0x32b8ef=this['_getChangeFromId'](_0x2428c0);if(!_0x32b8ef)return null;const _0x32016a='add'==_0x32b8ef['type']?'split':'merge';if(_0x20c7f2['consumable']['test'](_0x18808b['markerRange'],_0x18149b['name']))for(const _0x4d7ec7 of _0x18808b['markerRange']['getItems']()){if(!_0x4d7ec7['is']('element','softBreak'))continue;const _0x293862=_0x20c7f2['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x32016a}),_0xeae3da=_0x20c7f2['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4d7ec7));_0x32b8ef['data']['isSuggestion']&&_0x20c7f2['writer']['addClass']('ck-suggestion-marker-'+_0x32016a+'-new',_0x293862),this['activeChange']==_0x32b8ef&&_0x20c7f2['writer']['addClass']('ck-suggestion-marker--active',_0x293862),_0x20c7f2['writer']['insert'](_0xeae3da,_0x293862),_0x20c7f2['mapper']['bindElementToMarker'](_0x293862,_0x18808b['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x43ac55=>{for(const _0x3fac80 of this['editor']['model']['document']['getRootNames']()){const _0x2c6609=this['editor']['model']['document']['getRoot'](_0x3fac80),_0x2cafd=this['editor']['editing']['view']['document']['getRoot'](_0x3fac80);if(_0x2cafd){const _0x4f1d7f=_0x2c6609['getAttribute']('revisionHistoryAttachChange');if(_0x43ac55['removeAttribute']('data-change-id',_0x2cafd),_0x43ac55['removeClass']('ck-revision-history-root-add',_0x2cafd),_0x43ac55['removeClass']('ck-revision-history-root-remove',_0x2cafd),_0x43ac55['removeClass']('ck-revision-history-root--active',_0x2cafd),_0x4f1d7f){const _0x549033=this['_getChangeFromId'](_0x4f1d7f);if(!_0x549033)return null;_0x43ac55['setAttribute']('data-change-id',_0x4f1d7f,_0x2cafd),_0x43ac55['addClass']('ck-revision-history-root-'+_0x549033['type'],_0x2cafd),this['activeChange']==_0x549033&&_0x43ac55['addClass']('ck-revision-history-root--active',_0x2cafd);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xec0c2a=>'revision-comment:'+_0xec0c2a,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3a9d41=>'revision-suggestion:'+_0x3a9d41,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3cdd68=>({'name':'suggestion:'+_0x3cdd68,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4e225e=>{const _0x76753d=_0x4e225e['markerName']['split'](':')[0x1];return'insertion'!=_0x76753d&&'deletion'!=_0x76753d?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x76753d]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x422e64,_0x1a6ed9,_0x1e04e7)=>{const _0x2bb56c=_0x1e04e7['mapper']['markerNameToElements'](_0x1a6ed9['markerName']);if(_0x2bb56c){for(const _0x4915e2 of _0x2bb56c)_0x4915e2['is']('uiElement')&&(_0x1e04e7['mapper']['unbindElementFromMarkerName'](_0x4915e2,_0x1a6ed9['markerName']),_0x1e04e7['writer']['remove'](_0x4915e2));}},{'priority':'high'});}['_getChangeFromId'](_0x1fe66f){return this['_changeIdToChange']['get'](_0x1fe66f);}['_getViewForChange'](_0x4de22f){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x4de22f),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2c221f,_0x16fd27,_0x4a6a31,_0x85725a)=>{_0x85725a&&this['_balloon']['remove'](_0x85725a),_0x4a6a31&&(this['_balloon']['add']({'view':_0x4a6a31,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x38290a=this['editor']['editing'],_0x22afa2=this['_getChangeFromId'](_0x4a6a31['changeId']);let _0x5da3b8;if(_0x22afa2['data']['isOnRoot']){const _0x40f773=_0x38290a['view']['getDomRoot'](_0x22afa2['rootName']);_0x5da3b8=Array['from'](_0x40f773['getClientRects']());}else{const _0x27e2ab=this['editor']['model']['markers']['get']('revision:'+_0x4a6a31['changeId']);_0x5da3b8=Array['from'](_0x38290a['mapper']['markerNameToElements'](_0x27e2ab['name']))['map'](_0x413766=>_0x38290a['view']['domConverter']['mapViewToDom'](_0x413766))['map'](_0x4cda6d=>Array['from'](_0x4cda6d['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x5da3b8['find'](_0x20f383=>_0x20f383['top']-0x3<=this['_activeViewTarget']['y']&&_0x20f383['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x20f383['left']-0x3<=this['_activeViewTarget']['x']&&_0x20f383['right']+0x3>=this['_activeViewTarget']['x'])||_0x5da3b8[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x217121,_0x1a6252,_0x3df24c,_0x943b4a)=>{this['activeView']=_0x3df24c?this['_getViewForChange'](_0x3df24c):null,this['editor']['model']['change'](()=>{const _0x53c277=this['editor']['editing'];_0x943b4a&&(_0x943b4a['data']['isOnRoot']?_0x53c277['view']['change'](_0xe1ccdb=>{_0xe1ccdb['removeClass']('ck-revision-history-root--active',_0x53c277['view']['document']['getRoot'](_0x943b4a['rootName']));}):_0x53c277['reconvertMarker']('revision:'+_0x943b4a['id'])),_0x3df24c&&(_0x3df24c['data']['isOnRoot']?_0x53c277['view']['change'](_0x449131=>{_0x449131['addClass']('ck-revision-history-root--active',_0x53c277['view']['document']['getRoot'](_0x3df24c['rootName']));}):_0x53c277['reconvertMarker']('revision:'+_0x3df24c['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x238abf,_0x287557)=>{if(this['activeChange'])return;const _0x26af39=this['_findChangeIdFromDomTarget'](_0x287557['target']),_0x20cfe8=this['_changeIdToChange']['get'](_0x26af39);_0x20cfe8?(this['_activeViewTarget']={'x':_0x287557['domEvent']['x'],'y':_0x287557['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x20cfe8)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x5abf05,_0x1e76d7)=>{const _0x4e58a4=this['_findChangeIdFromDomTarget'](_0x1e76d7['target']),_0x3fc1ee=this['_changeIdToChange']['get'](_0x4e58a4);_0x3fc1ee?(this['_activeViewTarget']={'x':_0x1e76d7['domEvent']['x'],'y':_0x1e76d7['domEvent']['y']},_0x3fc1ee===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x3fc1ee):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xf8f2e8){do{const _0x56c7e2=_0xf8f2e8['getAttribute']('data-change-id');if(_0x56c7e2)return _0x56c7e2;_0xf8f2e8=_0xf8f2e8['parent'];}while(_0xf8f2e8);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1a6e75=>{for(const _0x696130 of this['editor']['model']['markers'])_0x1a6e75['removeMarker'](_0x696130);});}};function Vt(_0x2ea4b8,_0x2b84be){return(_0x40a50d,_0xdf0ab5,_0x8c4606)=>{if(!_0x8c4606['consumable']['test'](_0xdf0ab5['markerRange'],_0x40a50d['name']))return;const _0x48f878=_0xdf0ab5['markerRange']['getWalker'](),_0x275129=_0xdf0ab5['markerRange']['start'],_0x717d1a=_0x2ea4b8['model']['schema'];let _0x17428a=null,_0x329145=null,_0x9d1f18=!0x1,_0x2ef730=!0x1;for(const _0x54f6bd of _0x48f878){const _0x54cab6=_0x54f6bd['item'];_0x9d1f18=_0x9d1f18||_0x717d1a['isContent'](_0x54cab6);const _0x2446d3=_0x8c4606['mapper']['toViewElement'](_0x54cab6);if(_0x2446d3&&_0x2446d3['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x54f6bd['type']&&(_0x717d1a['isBlock'](_0x54cab6)&&!_0x717d1a['isLimit'](_0x54cab6)&&(_0x54cab6['nextSibling']||_0x275129['isAtEnd']?_0x17428a&&_0x17428a['parent']==_0x54cab6||(_0x17428a=_0x54cab6,_0x36d2d4(_0x54f6bd['previousPosition']),_0x2ef730=!0x0):_0x329145=_0x329145||_0x54f6bd['previousPosition']));}function _0x36d2d4(_0x106fbf){const _0x42859e=_0x8c4606['mapper']['toViewPosition'](_0x106fbf),_0x194af6=_0x8c4606['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2b84be});_0x8c4606['writer']['insert'](_0x42859e,_0x194af6),_0x8c4606['mapper']['bindElementToMarker'](_0x194af6,_0xdf0ab5['markerName']);}_0x9d1f18||_0x2ef730||!_0x329145||_0x36d2d4(_0x329145);};}var Dt=class extends _0x2307a1{constructor(_0x1a1b14){super(_0x1a1b14);const _0x33817b=_0x1a1b14['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x33817b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x33817b,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3d6b40=this['editor'],_0x11b636=_0x3d6b40['plugins']['get'](Mt),_0x53d731=_0x11b636['isReady']?_0x11b636['diff']['newRevisionId']:null;_0x3d6b40['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x53d731);}['refresh'](){const {isReady:_0x2ba3af,isEnabled:_0x308c96,repository:_0x399f27,diff:_0x2180fe}=this['editor']['plugins']['get'](Mt),_0x163e3f=_0x2180fe&&_0x399f27['getLaterVisibleRevision'](_0x2180fe['newRevisionId']);this['isEnabled']=_0x2ba3af&&_0x308c96&&Boolean(_0x163e3f);}},Tt=class extends _0x2307a1{['_step'];constructor(_0x3d46de,{direction:_0x419dc6}){super(_0x3d46de);const _0x467ac8=_0x3d46de['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x419dc6?0x1:-0x1,this['listenTo'](_0x467ac8,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x467ac8,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x467ac8,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x57e60c=this['editor'],_0x4d4ddd=_0x57e60c['plugins']['get'](Mt),{isNavigationMode:_0x333beb,currentChangeNumber:_0x3cb07d}=_0x4d4ddd;let _0x387f50;if(_0x4d4ddd['activeChange']=_0x333beb?_0x4d4ddd['diff']['changes']['get'](_0x3cb07d+this['_step']):_0x4d4ddd['diff']['changes']['first'],_0x4d4ddd['activeChange']['data']['isOnRoot'])_0x387f50=_0x57e60c['editing']['view']['getDomRoot'](_0x4d4ddd['activeChange']['rootName']);else{const _0x557777=_0x57e60c['model']['markers']['get']('revision:'+_0x4d4ddd['activeChange']['id']);_0x387f50=_0x57d06b(_0x57e60c['editing'],_0x557777);}_0x3e096b({'target':_0x387f50,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x548172,currentChangeNumber:_0x11c6b6,numberOfChanges:_0x407ac3,isReady:_0x31cd93,isEnabled:_0x4cac9a}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x4cac9a&&_0x31cd93&&_0x407ac3)&&(!_0x548172||(0x1===this['_step']?_0x11c6b6<_0x407ac3-0x1:_0x11c6b6>0x0));}},Ht=class extends at{constructor(_0x4d322d){super(_0x4d322d);const _0x285f03=this['bindTemplate'],_0xf59cdb=new _0x14f0fe(_0x4d322d),_0x1d8fa7=new _0x14f0fe(_0x4d322d);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0x11ea0e,_0x240867)=>_0x11ea0e&&_0x240867>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1d80be,_0x51c92c,_0x4402a1,_0x59dac7)=>{if(!_0x1d80be)return pt(_0x4d322d,'Loading...');if(!_0x4402a1)return pt(_0x4d322d,'No\x20changes');const _0x3ee4ba=pt(_0x4d322d,'NUMBER_OF_CHANGES',_0x4402a1);return _0x59dac7?pt(_0x4d322d,'X_OF_Y_CHANGES',[_0x51c92c+0x1,_0x4402a1]):_0x3ee4ba;}),_0xf59cdb['set']({'label':pt(_0x4d322d,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x18b13c}),_0x1d8fa7['set']({'label':pt(_0x4d322d,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x216a9e}),_0xf59cdb['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1d8fa7['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xf59cdb['on']('execute',()=>this['fire']('execute','backward')),_0x1d8fa7['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x285f03['if']('_isStatusLabelVisible','ck-hidden',_0x50dbba=>!_0x50dbba)]},'children':[{'text':_0x285f03['to']('isNavigationMode',_0x5c5f99=>_0x5c5f99?pt(_0x4d322d,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x4d322d,'Total')+':\x20')}]},{'text':_0x285f03['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xf59cdb,_0x1d8fa7]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x1dd727{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1c2324=this['editor']['editing']['view'];_0x1c2324['change'](_0x2be5=>{for(const _0x3e0045 of _0x1c2324['document']['roots'])_0x2be5['addClass'](Pt,_0x3e0045);});}['hide'](){const _0x519dd7=this['editor']['editing']['view'];_0x519dd7['change'](_0x500525=>{for(const _0x592807 of _0x519dd7['document']['roots'])_0x500525['removeClass'](Pt,_0x592807);});}},Lt=class extends _0x1dd727{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x4e7d32=this['editor'],_0x9ed940=_0x4e7d32['plugins']['get'](Mt),_0x47fe0c=_0x4e7d32['plugins']['get'](Ut);_0x4e7d32['ui']['componentFactory']['add']('exitToEditing',_0x1df805=>{const _0x3f322a=new _0x14f0fe(_0x1df805);return _0x3f322a['set']({'label':pt(_0x1df805,'Back\x20to\x20editing'),'icon':_0x4077c6,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3f322a,'execute',()=>{_0x4e7d32['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3f322a;}),_0x4e7d32['ui']['componentFactory']['add']('restoreRevision',_0x16c69c=>{const _0x3deeca=new _0x14f0fe(_0x16c69c);return _0x3deeca['set']({'label':pt(_0x16c69c,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3deeca['bind']('isEnabled')['to'](_0x4e7d32['commands']['get']('restoreRevision')),this['listenTo'](_0x3deeca,'execute',()=>_0x4e7d32['execute']('restoreRevision')),_0x3deeca;}),_0x4e7d32['ui']['componentFactory']['add']('changesNavigation',_0x399975=>{const _0x5753b9=new Ht(_0x399975),_0x4a7d30=_0x4e7d32['commands']['get']('showPreviousChange'),_0x2485a5=_0x4e7d32['commands']['get']('showNextChange');return _0x5753b9['bind']('isBackwardNavigationEnabled')['to'](_0x4a7d30,'isEnabled'),_0x5753b9['bind']('isForwardNavigationEnabled')['to'](_0x2485a5,'isEnabled'),_0x5753b9['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x9ed940),this['listenTo'](_0x5753b9,'execute',(_0xc16736,_0x3bab83)=>{_0x4e7d32['execute']('forward'===_0x3bab83?'showNextChange':'showPreviousChange');}),_0x5753b9;}),_0x47fe0c['show'](),_0x9ed940['on']('change:isReady',(_0x3b7b33,_0x6f8b86,_0x7063d9)=>{_0x7063d9?_0x47fe0c['hide']():_0x47fe0c['show']();});}},Ft=class extends _0x433d19{['_resizeObserver']=null;constructor(_0x590f41,_0x2f3f0f){super(_0x590f41,_0x2f3f0f);const _0x2819a3=this['bindTemplate'];this['set']({'label':pt(_0x590f41,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x590f41,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x2819a3['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x21dcac(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5ea732=this['fieldView']['element'];this['_tooltipString']=_0x5ea732['scrollWidth']>_0x5ea732['clientWidth']&&_0x5ea732['value']||'';}},$t=class extends at{constructor(_0xa89502,_0x18a30a,_0xa71da3){super(_0xa89502);const _0x4c5acb=new _0x20be6f();_0x4c5acb['set']({'content':_0x1d361e,'viewBox':'0\x200\x2011\x2010'});const _0x435cd7=['ck','ck-revision-history-sidebar__revision-author'];_0xa71da3&&_0x435cd7['push']('ck-revision-history-sidebar__revision-author_creator');const _0x215384=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0xa89502,_0xa71da3?'Revision\x20creator':'Revision\x20author')},'children':[_0x4c5acb,_0x18a30a['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x435cd7},'children':_0x215384});}};function jt(_0xd53222,_0x787bc){const _0x57acb0=_0xd53222['bindTemplate'],_0xa214e6=_0xd53222['locale'],_0x158625=ct(_0xa214e6);_0x158625['panelPosition']='sw';const _0x2a047e=function(_0x443358,_0x51c09d){const _0x2751ba=function(_0x354108,_0x41c6dd){const _0x3ec7f8=_0x354108['locale'],_0x405018={'Compare\x20against\x20selected':pt(_0x3ec7f8,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x3ec7f8,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x3ec7f8,'Restore\x20this\x20revision')};return _0x41c6dd['map'](_0x3859b9=>{const _0x2e6e36=_0x405018[_0x3859b9['name']];return _0x2e6e36&&_0x2e6e36!==_0x3859b9['name']&&(_0x3859b9['name']=_0x2e6e36),_0x3859b9;});}(_0x443358,_0x51c09d),_0x4c213d=new _0x4f0ec3();for(const _0x2aa1a9 of _0x2751ba){const _0x116eb8={'type':'button','model':new rt({'label':_0x2aa1a9['name'],'class':_0x2aa1a9['class'],'withText':!0x0,'role':'menuitem','_action':_0x2aa1a9['action']})};_0x116eb8['model']['bind']('isEnabled')['to'](_0x443358,'isActionsDropdownOpen',_0x2d2cf7=>'function'!=typeof _0x2aa1a9['isEnabled']||(!_0x2d2cf7||_0x2aa1a9['isEnabled'](_0x443358))),_0x4c213d['add'](_0x116eb8);}return _0x4c213d;}(_0xd53222,_0x787bc);return _0xd53222['bind']('isActionsDropdownOpen')['to'](_0x158625,'isOpen'),_0x158625['buttonView']['set']({'label':pt(_0xa214e6,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x292ef0}),_0x158625['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x57acb0['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x57acb0['to'](_0x558617=>_0x558617['stopPropagation']())}}),_0x158625['on']('execute',_0xfea4f0=>{_0xd53222['isReady']&&'function'==typeof _0xfea4f0['source']['_action']&&_0xfea4f0['source']['_action'](_0xd53222);}),ht(_0x158625,_0x2a047e,{'role':'menu'}),_0x158625['listenTo'](_0xd53222,'change:isActionsDropdownOpen',(_0x276d7a,_0x2144a1,_0x3dfcce)=>{if(_0x3dfcce)for(const _0x1dd5a8 of _0x158625['listView']['items']){const _0x2e9847=_0x1dd5a8['children']['first'],_0x58b560=_0x787bc['find'](_0x920d61=>_0x920d61['action']===_0x2e9847['_action'])['isVisible'];_0x1dd5a8['isVisible']=void 0x0===_0x58b560||_0x58b560(_0xd53222);}}),_0x158625;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x135cf0,Collection as _0x453cd2,ElementReplacer as _0x3440e3,FocusTracker as _0x321da2,KeystrokeHandler as _0x32815b,ObservableMixin as _0x4e64c6,ResizeObserver as _0x5490e3,logWarning as _0x4ac5cd,scrollViewportToShowTarget as _0x269e7a,uid as _0x3001b8}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x201516,isEqual as _0x14a458,set as _0x13863d,unset as _0x5a2c4b}from'es-toolkit/compat';import{Command as _0x2702e2,Editor as _0x36c4f1,ElementApiMixin as _0x15a34e,PendingActions as _0x2e33f3,Plugin as _0x73140e}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x55aae2,Users as _0x1a8e81,getMarkerDomElement as _0x293709,sanitizeEditorConfig as _0x583072}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x75e513,ModelElement as _0xe6fd24,ModelPosition as _0x51b10c,ModelRange as _0x32e9fa,ModelText as _0x1e0d67,ViewAttributeElement as _0x4ba13c,ViewContainerElement as _0x19913c,ViewDocumentFragment as _0x3bcecd,ViewElement as _0x134973,ViewEmptyElement as _0x5b3d97,ViewRawElement as _0x23aa6d,ViewText as _0x290400,ViewUIElement as _0x5bd25c}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x420769,IconChevronUp as _0x1ce83c,IconHistory as _0x52e288,IconThreeVerticalDots as _0x1cdb41,IconUndo as _0x4781ac,IconUser as _0x38a6c8}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x3b7457,ButtonView as _0x178003,ContextualBalloon as _0x3176ee,CssTransitionDisablerMixin as _0x4ef663,EditorUI as _0x5ad29c,IconView as _0x3cc9fe,InlineEditableUIView as _0xe50b03,LabeledFieldView as _0x469ef1,ListItemView as _0x5082de,ListView as _0x4ae715,MenuBarMenuListItemButtonView as _0x552109,MenuBarMenuListItemView as tt,MenuBarMenuListView as it,MenuBarMenuView as et,StickyPanelView as st,ToolbarSeparatorView as nt,ToolbarView as ot,UIModel as rt,View as at,addListToDropdown as ht,createDropdown as ct,createLabeledInputText as lt,normalizeToolbarConfig as ut,submitHandler as dt}from'@ckeditor/ckeditor5-ui';import{DateTime as ft}from'luxon';const vt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4e64c6();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1f4a7b){super(),this['id']=_0x1f4a7b['id']||_0x3001b8(),this['creator']=_0x1f4a7b['creator']||null,this['authors']=_0x1f4a7b['authors']||[],this['diffData']=_0x1f4a7b['diffData']||null,this['toVersion']=_0x1f4a7b['toVersion']||0x0,this['fromVersion']=_0x1f4a7b['fromVersion']||0x0,this['set']('name',_0x1f4a7b['name']||''),this['set']('createdAt',_0x1f4a7b['createdAt']||new Date()),this['set']('attributes',_0x1f4a7b['attributes']||{});}['setName'](_0x16aec0){this['_update']({'name':_0x16aec0});}['setAttribute'](_0x3fc4ba,_0x493892){const _0x5457ed=_0x201516(this['attributes']);_0x13863d(_0x5457ed,_0x3fc4ba,_0x493892),this['_update']({'attributes':_0x5457ed});}['removeAttribute'](_0x48aa99){const _0x49bd09=_0x201516(this['attributes']);_0x5a2c4b(_0x49bd09,_0x48aa99),this['_update']({'attributes':_0x49bd09});}['_update'](_0x222aba,_0x2d6ec2=!0x1){let _0x45c723=!0x1;const _0x3035a8={'id':this['id']};for(const _0x8eb745 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x331ffe=_0x222aba[_0x8eb745];void 0x0!==_0x331ffe&&_0x331ffe!==this[_0x8eb745]&&(this[_0x8eb745]=_0x331ffe,_0x3035a8[_0x8eb745]=_0x331ffe,_0x45c723=!0x0);}_0x45c723&&(_0x3035a8['authors']&&(_0x3035a8['authorsIds']=_0x3035a8['authors']['map'](_0x138213=>_0x138213['id']),delete _0x3035a8['authors']),this['fire']('_update',_0x3035a8,_0x2d6ec2));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x10d774=>_0x10d774['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x73140e{['_revisions'];static get['requires'](){return[_0x1a8e81];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2588ce){super(_0x2588ce),this['_revisions']=new _0x453cd2();}['afterInit'](){!async function(_0x56b98a){const _0x1a850f='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x549625=0xeb829,_0x5260a3=0x78fc0,_0x40d1d8=window['Date']['now'](),_0xd2485=_0x56b98a['editor'],_0x26e7c6=new window['Promise'](_0x477d58=>{_0xd2485['once']('ready',_0x477d58);}),_0x5d59b4={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x86eca1=_0xd2485['config']['get']('licenseKey');async function _0x5d0131(){let _0x300bbd,_0x559cb0=null,_0x3b64a9=null;try{return'GPL'==_0x86eca1?'NotAllowed':(_0x300bbd=_0x48c3eb(),_0x300bbd?(_0x300bbd['usageEndpoint']&&(_0x3b64a9=_0x251936(_0x300bbd['usageEndpoint'],_0x300bbd['jti'])),await _0x5d244a()?_0x4f6862()?_0x556021()?'Expired':_0x124484()?('evaluation'==_0x300bbd['licenseType']&&(_0x559cb0=_0x4c9c19('EvaluationLimit')),await _0x13122d()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x556021(){const _0x2488ee=['evaluation','trial']['includes'](_0x300bbd['licenseType'])?_0x40d1d8/0x3e8:0xe10*_0x5260a3;return _0x300bbd['exp']<_0x2488ee;}function _0x4f6862(){const _0x5a85a2=_0x300bbd['features'];if(!_0x5a85a2)return!0x1;if(_0x5a85a2['includes']('*'))return!0x0;if(_0x5a85a2['includes']('RH'))return!0x0;if(_0x5a85a2['includes']('RRH')){if(_0xc0298d())return!0x0;if(_0x2746c7()||_0x45dbc7())return!0x0;}return!0x1;}function _0x124484(){const _0x48ad4b=_0x300bbd['licensedHosts'];if(!_0x48ad4b||0x0==_0x48ad4b['length'])return!0x0;const {hostname:_0x3e61d4}=new URL(window['location']['href']);if(_0x48ad4b['includes'](_0x3e61d4))return!0x0;const _0x313463=_0x3e61d4['split']('.');return _0x48ad4b['filter'](_0x52b010=>_0x52b010['includes']('*'))['map'](_0x4e1b86=>_0x4e1b86['split']('.'))['filter'](_0x3f68cd=>_0x3f68cd['length']<=_0x313463['length'])['map'](_0x38f93b=>Array(_0x313463['length']-_0x38f93b['length'])['fill']('*'===_0x38f93b[0x0]?'*':'')['concat'](_0x38f93b))['some'](_0x2285f4=>_0x313463['every']((_0x4bf753,_0x34097b)=>_0x2285f4[_0x34097b]===_0x4bf753||'*'===_0x2285f4[_0x34097b]));}function _0x13122d(){return _0x559cb0&&_0x3b64a9?new window['Promise']((_0x4fbdf6,_0x336ff5)=>{_0x559cb0['then'](_0x4fbdf6,_0x336ff5),_0x3b64a9['then'](_0x5d0239=>{'Valid'!=_0x5d0239&&_0x4fbdf6(_0x5d0239);},_0x336ff5);}):_0x559cb0||_0x3b64a9||'Valid';}}function _0x251936(_0x176a1c,_0x28d13b){return new window['Promise'](_0x5a75b8=>{if(_0x41db72())return _0x5a75b8('Valid');_0x1c0d65(),_0xd2485['decorate']('_sendUsageRequest');let _0x3da89e=!0x1;const _0x3f3de2=_0x3001b8();function _0x7e4b3f(_0x4fc601){return!!_0x4fc601&&('object'==typeof _0x4fc601||'function'==typeof _0x4fc601)&&'function'==typeof _0x4fc601['then']&&'function'==typeof _0x4fc601['catch'];}function _0x541e3a(_0x17c690){_0x22c0b1(_0x17c690)['then'](_0x274e8f=>_0x274e8f&&'ok'==_0x274e8f['status']?_0x1e6a5a(_0x3c8ce1(_0x3f3de2+_0x28d13b))!=_0x274e8f['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x50cccb=>(_0x51787b(),_0x50cccb),()=>{const _0x1de09a=_0x5dda70();return null==_0x1de09a?(_0x51787b(),'Valid'):_0x40d1d8-_0x1de09a>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5a75b8)['catch'](()=>{_0x5a75b8('UsageLimit');});const _0xbd6a54=0x36ee80;function _0x51787b(){const _0x3fd592='llct-'+_0x1e6a5a(_0x3c8ce1(_0x176a1c)),_0x169ffa=_0x4279f5(_0x1e6a5a(window['Math']['ceil'](_0x40d1d8/_0xbd6a54)));window['localStorage']['setItem'](_0x3fd592,_0x169ffa);}function _0x5dda70(){const _0x4d66e1='llct-'+_0x1e6a5a(_0x3c8ce1(_0x176a1c)),_0x8c378e=window['localStorage']['getItem'](_0x4d66e1);return _0x8c378e?window['parseInt'](_0x4279f5(_0x8c378e),0x10)*_0xbd6a54:null;}function _0x22c0b1(_0x59a251){return new window['Promise']((_0x1e6d5e,_0x3fe71d)=>{_0x59a251['then'](_0x1e6d5e,_0x3fe71d),window['setTimeout'](_0x3fe71d,0x1d4c0);});}}_0xd2485['on']('_sendUsageRequest',(_0x5629a0,_0x5ea536)=>{if(_0x5ea536[0x0]!=_0x176a1c)return _0x5a75b8('UsageLimit');_0x5ea536[0x1]={..._0x5ea536[0x1],'requestId':_0x3f3de2};},{'priority':'high'}),_0xd2485['on']('_sendUsageRequest',_0xaaffa0=>{_0x7e4b3f(_0xaaffa0['return'])&&(_0x3da89e=!0x0,_0x541e3a(_0xaaffa0['return']));},{'priority':'low'}),_0x26e7c6['then'](()=>{_0x3da89e||_0x5a75b8('UsageLimit');});});function _0x41db72(){return'auto'==_0xd2485['editing']['view']['_overlayModeHint'];}function _0x1c0d65(){_0xd2485['editing']['view']['_overlayModeHint']='auto';}}function _0x4c9c19(_0x3bcaa0){const _0x47f699=[new window['Promise'](_0x2ae699=>setTimeout(_0x2ae699,0x93ecc)),_0x26e7c6['then'](()=>new window['Promise'](_0x1e6188=>{const _0x37226f=0x7,_0x5851ab=_0x56b98a['_revisions'];function _0x4d4631(){_0x5851ab['length']>=_0x37226f&&_0x1e6188();}_0x4d4631(),_0x5851ab['on']('add',_0x4d4631);})),new window['Promise'](_0x2ed82e=>{function _0x1b4f30(){for(const _0x566204 in window)if(window['Number']['isNaN'](window['Number'](_0x566204))&&window[_0x566204]==_0x549625)return _0x2ed82e();'destroyed'!=_0xd2485['state']&&window['setTimeout'](_0x1b4f30,0x1388);}_0x5152a1('RevisionViewer')&&_0x1b4f30();})];return window['Promise']['race'](_0x47f699)['then'](()=>_0x3bcaa0);}async function _0x425039(){if(await _0x26e7c6,_0x5152a1('RevisionViewer')){const _0x2d4ad3=_0x56b98a['getRevision'](0x0),_0x111fa3=_0x56b98a['getEarlierVisibleRevision'](_0x2d4ad3['id']),_0x584f56=_0x25e75f('RevisionViewer');return await _0x584f56['compare'](_0x2d4ad3['id'],_0x111fa3?_0x111fa3['id']:null,!0x0),_0x584f56['unbind']('isEnabled'),_0x584f56['isEnabled']=!0x1,_0x584f56['compare']=_0x374785,void(_0x584f56['_getDiff']=_0x374785);}if(_0x5152a1('RevisionTracker')){const _0x29d279=_0x25e75f('RevisionTracker');_0x29d279['unbind']('isEnabled'),_0x29d279['isEnabled']=!0x1,_0x29d279['update']=_0x374785,_0x29d279['saveRevision']=_0x374785;}_0xd2485['model']['change']=_0x374785,_0xd2485['model']['enqueueChange']=_0x374785,_0xd2485['enableReadOnlyMode']('model');}function _0xc0298d(){return _0x5152a1('WebSocketGateway')&&'connected'==_0x25e75f('WebSocketGateway')['state'];}function _0x2746c7(){return _0x5152a1('RevisionViewerIntegration');}function _0x45dbc7(){return _0x5152a1('TrackChangesDataGetter');}function _0x26f605(_0x13bc81){const _0x2d3766=_0x181794();_0xd2485[_0x2d3766]='revisionHistoryLicenseKey'+_0x13bc81,_0x13bc81['endsWith']('Limit')&&(window[_0x181794()]=_0x549625),'Valid'!=_0x13bc81&&_0x425039();}function _0x181794(){const _0x35f024=window['String'](window['performance']['now']())['replace']('.','');let _0x56eb95='v';for(let _0x1fed8c=0x0;_0x1fed8c<_0x35f024['length'];_0x1fed8c+=0x2){let _0x11cc02=window['parseInt'](_0x35f024['substring'](_0x1fed8c,_0x1fed8c+0x2));_0x11cc02>=0x3e&&(_0x11cc02-=0x3e),_0x56eb95+=_0x1a850f[_0x11cc02];}return _0x56eb95;}function _0x48c3eb(){const _0x50c04a=_0x86eca1['split']('.');if(0x3!=_0x50c04a['length'])return null;return _0x309b82(_0x50c04a[0x1]);function _0x309b82(_0xf8a28a){const _0x3d19e4=_0x104768(_0xf8a28a);return _0x3d19e4&&_0x5d8a2a()?_0x3d19e4:null;function _0x5d8a2a(){const _0x204968=_0x3d19e4['jti'],_0x5e73bd=window['parseInt'](_0x204968['substring'](_0x204968['length']-0x8),0x10),_0x33aa7a={..._0x3d19e4,'jti':_0x204968['substring'](0x0,_0x204968['length']-0x8)};return delete _0x33aa7a['vc'],_0x3c8ce1(_0x33aa7a)==_0x5e73bd;}}}async function _0x5d244a(){let _0x3506bc=!0x0;try{const [_0x23a036,_0x59dbe4,_0x317d34]=_0x86eca1['split']('.');return _0x5acd63(_0x23a036),await _0x348303(_0x23a036,_0x59dbe4,_0x317d34),_0x3506bc;}catch{return!0x1;}function _0x5acd63(_0x19571b){const _0x3eb420=_0x104768(_0x19571b);_0x3eb420&&'ES256'==_0x3eb420['alg']||(_0x3506bc=!0x1);}async function _0x348303(_0x28c061,_0x49ee4e,_0x31562b){const _0x332670=window['Uint8Array']['from'](_0x33ef43(_0x31562b),_0x38f1a6=>_0x38f1a6['charCodeAt'](0x0)),_0x2125c5=new window['TextEncoder']()['encode'](_0x28c061+'.'+_0x49ee4e),_0x1f84df=window['crypto']['subtle'];if(!_0x1f84df)return;const _0xd3c3fc=await _0x1f84df['importKey']('jwk',_0x5d59b4,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1f84df['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xd3c3fc,_0x332670,_0x2125c5)||(_0x3506bc=!0x1);}}function _0x104768(_0x103d07){return _0x103d07['startsWith']('ey')?JSON['parse'](_0x33ef43(_0x103d07)):null;}function _0x33ef43(_0x3e5abc){return window['atob'](_0x3e5abc['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3c8ce1(_0x13bf4d){let _0x1abacf=0x1505;function _0x5686d2(_0x437523){for(let _0x578209=0x0;_0x578209<_0x437523['length'];_0x578209++){const _0x5c6000=_0x437523['charCodeAt'](_0x578209);_0x1abacf=(_0x1abacf<<0x5)+_0x1abacf+_0x5c6000,_0x1abacf&=_0x1abacf;}}function _0x6d2747(_0x1dc7f6){Array['isArray'](_0x1dc7f6)?_0x1dc7f6['forEach'](_0x6d2747):_0x1dc7f6&&'object'==typeof _0x1dc7f6?Object['entries'](_0x1dc7f6)['sort']()['forEach'](([_0x1750a6,_0x470a94])=>{_0x5686d2(_0x1750a6),_0x6d2747(_0x470a94);}):_0x5686d2(window['String'](_0x1dc7f6));}return _0x6d2747(_0x13bf4d),_0x1abacf>>>0x0;}function _0x1e6a5a(_0x4b5eab){return _0x4b5eab['toString'](0x10)['padStart'](0x8,'0');}function _0x4279f5(_0x522764){return _0x522764['split']('')['reverse']()['join']('');}function _0x5152a1(_0x50a8ad){return _0xd2485['plugins']['has'](_0x50a8ad);}function _0x25e75f(_0x112d45){return _0xd2485['plugins']['get'](_0x112d45);}function _0x374785(){}_0x26f605(await _0x5d0131());}(this);}['createRevision'](_0x1694be){const _0x187d33=this['editor']['plugins']['get']('Users');return new gt({'id':_0x1694be['id'],'name':_0x1694be['name'],'creator':_0x1694be['creatorId']?_0x187d33['getUser'](_0x1694be['creatorId']):null,'diffData':_0x1694be['diffData']||_0x1694be['data'],'authors':_0x1694be['authorsIds']['map'](_0x1c3392=>_0x187d33['getUser'](_0x1c3392)),'createdAt':new Date(_0x1694be['createdAt']),'attributes':_0x1694be['attributes'],'fromVersion':_0x1694be['fromVersion'],'toVersion':_0x1694be['toVersion']});}['addRevision'](_0x494528,_0x57fcad=0x0){this['_revisions']['add'](_0x494528,_0x57fcad);}['getRevision'](_0x5cc1e6){return this['_revisions']['get'](_0x5cc1e6);}['getRevisions'](_0x12c352={'toJSON':!0x1}){const _0x251c69=Array['from'](this['_revisions']);return _0x251c69['reverse'](),_0x12c352['toJSON']?_0x251c69['map'](_0x3dcae8=>_0x3dcae8['toJSON']()):_0x251c69;}['getIndex'](_0x20e176){return this['_revisions']['getIndex'](_0x20e176);}['getEarlierVisibleRevision'](_0x12bcb1){const [,_0x3681fd]=this['getRevisionsIterator'](_0x12bcb1,{'direction':'earlier'});return _0x3681fd;}['getLaterVisibleRevision'](_0x3531a8){const [,_0x2bfd70]=this['getRevisionsIterator'](_0x3531a8,{'direction':'later'});return _0x2bfd70;}['getRevisionsInDiff'](_0x12694d){const _0x4f7b2e=[];for(const _0x82690f of this['getRevisionsIterator'](_0x12694d['newRevisionId']))if(_0x4f7b2e['push'](_0x82690f),_0x82690f['id']===_0x12694d['oldRevisionId'])break;return _0x4f7b2e;}*['getRevisionsIterator'](_0x5089f1,{direction:_0x4deaa1='earlier',filter:_0x548224=()=>!0x0}={}){const _0x1d6be8='earlier'===_0x4deaa1?0x1:-0x1;let _0x2b9716=this['_revisions']['get'](_0x5089f1),_0x4676de=this['getIndex'](_0x2b9716);for(yield _0x2b9716;_0x2b9716;){if(_0x4676de+=_0x1d6be8,_0x2b9716=this['getRevision'](_0x4676de),!_0x2b9716)return;_0x548224(_0x2b9716)&&(yield _0x2b9716);}}},wt=class extends _0x73140e{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x19913c,'c'],[_0x4ba13c,'a'],[_0x5b3d97,'e'],[_0x23aa6d,'r'],[_0x5bd25c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x19913c],['a',_0x4ba13c],['e',_0x5b3d97],['r',_0x23aa6d],['u',_0x5bd25c]]);async['loadRevisionData'](_0x2b7ead,_0x28f853){if(_0x2b7ead['diffData']||!_0x28f853)return;const _0x4973dd=this['editor']['config']['get']('collaboration.channelId');_0x2b7ead['diffData']=(await _0x28f853['getRevision']({'channelId':_0x4973dd,'revisionId':_0x2b7ead['id']}))['diffData'];}['getRevisionDocumentData'](_0x23739c){const _0x48e2ca={};for(const _0xf4d017 in _0x23739c['diffData']){if(_0x23739c['diffData'][_0xf4d017]['attachChange']&&!_0x23739c['diffData'][_0xf4d017]['attachChange']['isAttached'])continue;const _0x325db5=this['_removeRevisionMarkers'](JSON['parse'](_0x23739c['diffData'][_0xf4d017]['insertions'])),_0xf0f242=this['editor']['editing']['view']['document'],_0x5ec3a4=new _0x3bcecd(_0xf0f242,_0x325db5['map'](_0x4715ec=>this['_getViewFromDiffObj'](_0x4715ec,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x48e2ca[_0xf4d017]=this['editor']['data']['processor']['toData'](_0x5ec3a4),this['editor']['data']['processor']['useFillerType']('default');}return _0x48e2ca;}['getRevisionRootsAttributes'](_0x213f1f){const _0x33dce5={};for(const _0x44a74c in _0x213f1f['diffData'])_0x213f1f['diffData'][_0x44a74c]['attachChange']&&!_0x213f1f['diffData'][_0x44a74c]['attachChange']['isAttached']||(_0x33dce5[_0x44a74c]=_0x213f1f['diffData'][_0x44a74c]['attributesAfter']||{});return _0x33dce5;}['getRevisionRootsModelElements'](_0x2e7970){const _0x3c0448={};for(const _0x317b74 in _0x2e7970['diffData']){if(_0x2e7970['diffData'][_0x317b74]['attachChange']&&!_0x2e7970['diffData'][_0x317b74]['attachChange']['isAttached'])continue;const _0x4da4c7=_0x2e7970['diffData'][_0x317b74]['rootElementName'];_0x4da4c7&&(_0x3c0448[_0x317b74]=_0x4da4c7);}return _0x3c0448;}['_getTypeCharForViewElement'](_0x1b9941){return this['_viewClassToTypeChar']['get'](_0x1b9941['constructor']);}['_getViewFromDiffObj'](_0xc72688,_0x373e5c){const _0x36a36d=this['editor']['editing']['view']['document'];if('string'==typeof _0xc72688)return new _0x290400(_0x36a36d,_0xc72688);{let _0x2360b0,_0x43efd6;_0x43efd6='u'==_0xc72688['type']||'r'==_0xc72688['type']?[]:_0xc72688['children']['map'](_0x2e8532=>this['_getViewFromDiffObj'](_0x2e8532,_0x373e5c));const _0x45937a=this['_typeCharToViewClass']['get'](_0xc72688['type'])||_0x134973,_0x2d5639=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2360b0=new _0x45937a(_0x36a36d,_0xc72688['name'],_0xc72688['attributes'],_0x43efd6),'u'==_0xc72688['type']&&_0xc72688['children'][0x0]){const _0x312927=_0xc72688['children'][0x0];if(_0x2360b0['render']=function(_0x19c1ba){const _0x126ac2=_0x19c1ba['createElement']('div');return _0x126ac2['innerHTML']=_0x312927,_0x126ac2['childNodes'][0x0];},_0x373e5c){const _0x346077=new _0x3bcecd(_0x36a36d);_0x346077['_appendChild'](_0x2360b0);const _0x4c9e36=Array['from'](_0x2d5639['viewChildrenToDom'](_0x346077,{'bind':!0x1})),_0x232d50=_0x2d5639['domDocument']['createElement']('div');_0x232d50['append'](..._0x4c9e36),_0x2360b0=Array['from'](_0x2d5639['domChildrenToView'](_0x232d50))[0x0];}}else{if('r'==_0xc72688['type']&&_0xc72688['children'][0x0]){const _0x509d42=_0xc72688['children'][0x0];if(_0x2360b0['render']=function(_0x23d868){_0x23d868['innerHTML']=_0x509d42;},_0x373e5c){const _0x299fc0=new _0x3bcecd(_0x36a36d);_0x299fc0['_appendChild'](_0x2360b0);const _0x14244c=Array['from'](_0x2d5639['viewChildrenToDom'](_0x299fc0,{'bind':!0x1})),_0x47a47e=_0x2d5639['domDocument']['createElement']('div');_0x47a47e['append'](..._0x14244c);const _0x4fd242=Array['from'](_0x2d5639['domChildrenToView'](_0x47a47e));_0x4fd242['length']>0x1?_0x2360b0['_appendChild'](_0x4fd242):_0x2360b0=_0x4fd242[0x0];}}}if(_0xc72688['customProperties']){for(const [_0xaa0e3b,_0x213a65]of _0xc72688['customProperties'])_0x2360b0['_setCustomProperty'](_0xaa0e3b,_0x213a65);}const _0x3e8808=void 0x0===_0xc72688['fillerOffset']?null:_0xc72688['fillerOffset'];return null!==_0x3e8808&&(_0x2360b0['getFillerOffset']=()=>_0x3e8808),_0x2360b0;}}['_makeModelFromViewString'](_0x490d05,_0x543923){const _0x1be7d8=JSON['parse'](_0x490d05),_0x8972f9=this['editor']['editing']['view']['document'],_0x1ff843=new _0x3bcecd(_0x8972f9,_0x1be7d8['map'](_0x5a4906=>this['_getViewFromDiffObj'](_0x5a4906,!0x0))),_0x57a47c=this['editor']['data']['toModel'](_0x1ff843,_0x543923);return _0x57a47c['name']=_0x543923,_0x57a47c;}['_removeRevisionMarkers'](_0x478022){return(_0x478022=_0x478022['filter'](_0x5d45d8=>!_0x5d45d8['name']||'revision-start'!==_0x5d45d8['name']&&'revision-end'!==_0x5d45d8['name']))['forEach'](_0x545c82=>{'string'!=typeof _0x545c82&&(_0x545c82['children']=this['_removeRevisionMarkers'](_0x545c82['children']),_0x545c82['attributes']=_0x545c82['attributes']['filter'](_0xb94d85=>!_0xb94d85[0x0]['startsWith']('data-revision-')));}),_0x478022;}};function pt(_0x2b545f,_0x2f5967,_0xbdc018){const t=_0x2b545f['t'];switch(_0x2f5967){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0xbdc018);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xbdc018);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}var _t=class extends _0x73140e{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1a8e81,mt,wt,_0x2e33f3];}constructor(_0x3999d3){super(_0x3999d3),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x328ec9=_0x3001b8();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x328ec9},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x328629=this['repository']['getRevision'](0x0),_0x1da7ba=_0x328629&&null===_0x328629['creator']?_0x328629:null;if(this['_continueCurrentRevision']=!!_0x1da7ba&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x303d6=this['_source']['getCurrentRevisionId'](),_0xad9d1b=this['repository']['getRevision'](_0x303d6);if(_0xad9d1b)this['_startingVersion']=_0xad9d1b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1b662b=this['_source']['history']['_operations']['find'](_0x14d754=>!_0x14d754['_isInit']),_0x489d74=_0x1b662b?_0x1b662b['baseVersion']:this['_source']['history']['version'];_0x328629?(_0x328629['toVersion']<_0x489d74&&_0x328629['_update']({'toVersion':_0x489d74}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x1da7ba['id'],this['_startingVersion']=_0x1da7ba['fromVersion']):(this['_startingVersion']=_0x328629['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x489d74,this['_continueCurrentRevision']=!0x1);}}else _0x1da7ba&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x1da7ba['toVersion'],this['editor']['model']['document']['history']['version']),_0x1da7ba['fromVersion']===_0x1da7ba['toVersion']?(0x0!==_0x1da7ba['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x1da7ba['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x1da7ba['id'],this['_startingVersion']=_0x1da7ba['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x1abf26=>!_0x1abf26),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3765ca=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2cefa6;for(const _0x2e8413 in _0x3765ca){const _0x5d3e63=_0x2e8413,_0x30971d=_0x3765ca[_0x5d3e63];if('revisionHistoryLicenseKeyValid'==_0x30971d||'revisionHistoryLicenseKeyInvalid'==_0x30971d||'revisionHistoryLicenseKeyExpired'==_0x30971d||'revisionHistoryLicenseKeyDomainLimit'==_0x30971d||'revisionHistoryLicenseKeyNotAllowed'==_0x30971d||'revisionHistoryLicenseKeyEvaluationLimit'==_0x30971d||'revisionHistoryLicenseKeyUsageLimit'==_0x30971d){delete _0x3765ca[_0x5d3e63],_0x2cefa6=_0x30971d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2cefa6&&_0x3765ca['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2cefa6&&_0x3765ca['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2cefa6&&_0x3765ca['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2cefa6&&_0x3765ca['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2cefa6&&_0x3765ca['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2cefa6&&_0x3765ca['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x1e1f4a=this['repository']['getRevision'](0x0),_0x4537b5=await this['getRevisionDocumentData'](_0x1e1f4a),_0x3af90b=await this['getRevisionRootsAttributes'](_0x1e1f4a),_0x5b0df1=this['_utils']['getRevisionRootsModelElements'](_0x1e1f4a);this['_replaceEditorDataWithRevisionData'](_0x4537b5,_0x3af90b,_0x5b0df1);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1cf51f){this['_source']=_0x1cf51f;}async['update'](){const _0x2a056c=await this['_source']['getLatestVersion']();if(_0x2a056c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x21d84c=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x2a056c});_0x21d84c['authors']=_0x21d84c['authorsIds']['map'](_0x200003=>this['editor']['plugins']['get']('Users')['getUser'](_0x200003)),this['currentRevision']['_update'](_0x21d84c);}}async['saveRevision'](_0x423f5c={},_0xeee83e=null){const _0x3e6d9b=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xeee83e>this['currentRevision']['toVersion']&&(_0xeee83e=null),null===_0xeee83e&&(_0xeee83e=await this['_source']['getLatestVersion']());const _0x266e43=this['_getFromVersion'](_0xeee83e),_0x180193=this['buildRevisionData']({'from':_0x266e43,'to':_0xeee83e});if(this['currentRevision']['toVersion']<_0xeee83e){const _0x1a7723=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xeee83e,'to':_0xeee83e});_0x1a7723['authors']=[],_0x1a7723['authorsIds']=[],_0x1a7723['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1a7723,!0x0),delete _0x1a7723['authors'],_0x3e6d9b['push'](_0x1a7723);}_0x423f5c['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x423f5c['name']=_0x423f5c['name']||null,_0x423f5c['id']=_0x423f5c['id']||_0x3001b8(),_0x423f5c={..._0x423f5c,..._0x180193};const _0x47b49f=this['addRevisionData'](_0x423f5c);_0x3e6d9b['push'](_0x423f5c);const _0x2735a6=this['repository']['getIndex'](_0x47b49f);if(0x0!==_0x2735a6){const _0x15c197=this['repository']['getRevision'](_0x2735a6-0x1);if(_0x15c197['fromVersion']!==_0xeee83e){const _0x2df1a7=this['_revisionDataBuilder']['getData'](_0xeee83e,_0x15c197['toVersion']),_0x7437c9={'id':_0x15c197['id'],'diffData':_0x2df1a7['diffData'],'authorsIds':_0x2df1a7['authorsIds'],'authors':_0x2df1a7['authorsIds']['map'](_0x4fe507=>this['editor']['plugins']['get']('Users')['getUser'](_0x4fe507)),'fromVersion':_0xeee83e};_0x15c197===this['currentRevision']&&(_0x7437c9['createdAt']=new Date(_0x423f5c['createdAt']['getTime']()+0xa)),_0x15c197['_update'](_0x7437c9,!0x0),delete _0x7437c9['authors'],_0x3e6d9b['push'](_0x7437c9);}}if(this['adapter']){for(const _0x4e6557 of _0x3e6d9b)this['_bufferUpdate'](_0x4e6557['id'],_0x4e6557,!0x0);this['sendBufferedUpdates']();}return _0x47b49f;}['addRevisionData'](_0x37c920){const _0x411afa=this['repository']['createRevision'](_0x37c920);return this['adapter']&&_0x411afa['on']('_update',(_0x237316,_0x49471c,_0x450e4f)=>{_0x450e4f||(this['_bufferUpdate'](_0x49471c['id'],_0x49471c,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x411afa,this['_findInsertionIndex'](_0x411afa)),_0x411afa;}async['getRevisionDocumentData'](_0x11d591){return await this['_utils']['loadRevisionData'](_0x11d591,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x11d591);}async['getRevisionRootsAttributes'](_0xcbe6b5){return await this['_utils']['loadRevisionData'](_0xcbe6b5,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xcbe6b5);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5043ab=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x19b20c=0x0;_0x19b20c<_0x5043ab['length'];_0x19b20c++){const _0x3713b8=_0x5043ab[_0x19b20c];let _0x517d31=!0x1;for(const _0xc772a0 of Object['keys'](_0x3713b8))void 0x0===_0x3713b8[_0xc772a0]?delete _0x3713b8[_0xc772a0]:'id'!==_0xc772a0&&(_0x517d31=!0x0);_0x517d31||(_0x5043ab[_0x19b20c]=null);}if(_0x5043ab=_0x5043ab['filter'](_0x5e08a6=>null!==_0x5e08a6),!_0x5043ab['length'])return;for(let _0x51767a=0x0;_0x51767a<_0x5043ab['length'];_0x51767a++){const _0x106f9a=_0x5043ab[_0x51767a];void 0x0!==_0x106f9a['fromVersion']&&void 0x0===_0x106f9a['toVersion']&&(_0x106f9a['toVersion']=this['repository']['getRevision'](_0x106f9a['id'])['toVersion']),void 0x0!==_0x106f9a['toVersion']&&void 0x0===_0x106f9a['fromVersion']&&(_0x106f9a['fromVersion']=this['repository']['getRevision'](_0x106f9a['id'])['fromVersion']);}const _0xae7d6=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5043ab,_0xae7d6)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1d438f=>{if(_0x1d438f){for(const _0x1e17c7 of _0x1d438f)this['setRevisionData']({'id':_0x1e17c7['id'],'createdAt':_0x1e17c7['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x518dab=null,from:_0x544580=null,to:_0x4a249d=null}){_0x544580=null!==_0x544580?_0x544580:_0x518dab['fromVersion'],_0x4a249d=null!==_0x4a249d?_0x4a249d:_0x518dab['toVersion'];const _0x640ca4=this['_revisionDataBuilder']['getData'](_0x544580,_0x4a249d),_0x5cd9e4={'diffData':_0x640ca4['diffData'],'authorsIds':_0x640ca4['authorsIds'],'fromVersion':_0x544580,'toVersion':_0x4a249d};if(!_0x518dab||_0x4a249d!==_0x518dab['toVersion']){const _0x4e126a=_0x4a249d-0x1,_0x37583f=this['_source']['history']['getOperation'](_0x4e126a);_0x5cd9e4['createdAt']=_0x37583f&&_0x37583f['createdAt']||new Date();}if(this['_loadedStateData']&&_0x544580===this['_loadedStateData']['fromVersion']){for(const _0x5b25dd of this['_loadedStateData']['authors'])_0x5cd9e4['authorsIds']['includes'](_0x5b25dd['id'])||_0x5cd9e4['authorsIds']['push'](_0x5b25dd['id']);}return _0x5cd9e4;}['_bufferUpdate'](_0x2b43ae,_0xedc11a,_0x5317a4){if(this['_bufferedUpdates']['has'](_0x2b43ae)){const _0x52ea15=this['_bufferedUpdates']['get'](_0x2b43ae);_0xedc11a=_0x5317a4?{..._0x52ea15,..._0xedc11a}:{..._0xedc11a,..._0x52ea15};}this['_bufferedUpdates']['set'](_0x2b43ae,_0xedc11a);}['setRevisionData'](_0x53fc28){const _0x2137fa=this['repository']['getRevision'](_0x53fc28['id']);if(_0x53fc28['createdAt']&&(_0x53fc28['createdAt']=new Date(_0x53fc28['createdAt'])),_0x53fc28['authorsIds']){const _0xb0baf1=this['editor']['plugins']['get']('Users');_0x53fc28['authors']=_0x53fc28['authorsIds']['map'](_0x5d0f57=>_0xb0baf1['getUser'](_0x5d0f57));}_0x2137fa['_update'](_0x53fc28,!0x0);}['_createInitialRevision'](_0x4438a3){const _0x44bba4=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x44bba4)this['_initialRevisionId']=_0x44bba4['id'];else{const _0x43d25e=!this['editor']['model']['document']['roots']['find'](_0x46a2f0=>this['editor']['model']['hasContent'](_0x46a2f0)),_0x2a0d5e=this['editor']['plugins']['get']('Users')['me']['id'],_0x23de51=pt(this['editor']['locale'],_0x43d25e?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4438a3,'to':_0x4438a3,'id':this['_initialRevisionId'],'name':_0x23de51,'creatorId':_0x2a0d5e});}}['_createCurrentRevision'](_0x124db0){const _0x4cafb4=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4cafb4),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x124db0,'to':_0x124db0,'id':_0x4cafb4,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x4eeee1,_0x45552b,_0xa025c1){const _0x475871={},_0x286d8d={},_0x5ece07={},_0xdd74c2=this['editor']['config']['get']('roots')||{};for(const [_0x40b365,_0x98e4ba]of Object['entries'](_0xdd74c2))_0x98e4ba['lazyLoad']||(_0x475871[_0x40b365]=_0x98e4ba['initialData']??'',_0x286d8d[_0x40b365]=_0x98e4ba['modelAttributes']||{},_0x98e4ba['modelElement']&&(_0x5ece07[_0x40b365]=_0x98e4ba['modelElement']));for(const _0x2af1e4 of this['editor']['model']['document']['getRootNames']())_0x475871[_0x2af1e4]??='',_0x286d8d[_0x2af1e4]??={};let _0x47d553=!0x1;const _0x4e4bc2=Object['keys'](_0x475871),_0x4165fd=Object['keys'](_0x4eeee1);for(const _0x443e6f of _0x4e4bc2){if(_0x475871[_0x443e6f]!==_0x4eeee1[_0x443e6f]&&''!==_0x475871[_0x443e6f]['trim']()){_0x47d553=!0x0;break;}if(!_0x14a458(_0x286d8d[_0x443e6f],_0x45552b[_0x443e6f])&&Object['keys'](_0x286d8d[_0x443e6f])['length']>0x0){_0x47d553=!0x0;break;}const _0x35e909=_0x5ece07[_0x443e6f],_0x1591bb=_0xa025c1[_0x443e6f];if(_0x35e909&&_0x1591bb&&_0x35e909!==_0x1591bb){_0x47d553=!0x0;break;}}_0x47d553||(_0x47d553=_0x4165fd['some'](_0x3de439=>!this['editor']['model']['document']['getRoot'](_0x3de439))),_0x47d553&&_0x4ac5cd('editor-initial-data-replaced-with-revision-data',{'editorData':_0x475871,'editorRootsAttributes':_0x286d8d,'editorRootsModelElements':_0x5ece07,'revisionData':_0x4eeee1,'revisionRootsAttributes':_0x45552b,'revisionRootsModelElements':_0xa025c1});for(const [_0x4b4181,_0x4a3726]of Object['entries'](_0x4eeee1))this['editor']['config']['set']('roots.'+_0x4b4181+'.initialData',_0x4a3726);for(const [_0x4a1c42,_0x192542]of Object['entries'](_0x45552b))this['editor']['config']['set']('roots.'+_0x4a1c42+'.modelAttributes',_0x192542);const _0x218478=this['editor']['model']['document'];for(const [_0x250fcc,_0x2791ab]of Object['entries'](_0xa025c1)){this['editor']['config']['set']('roots.'+_0x250fcc+'.modelElement',_0x2791ab);const _0x2a9821=_0x218478['getRoot'](_0x250fcc);_0x2a9821&&_0x2a9821['name']!==_0x2791ab&&(_0x218478['roots']['remove'](_0x250fcc),_0x218478['createRoot'](_0x2791ab,_0x250fcc));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5eb2c8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5eb2c8['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x3be022){const _0x52bc0d=this['repository']['getRevisions']();_0x52bc0d['reverse']();let _0x60ecd7=0x0;for(;_0x60ecd7<_0x52bc0d['length'];){const _0xbdd4f7=_0x52bc0d[_0x60ecd7];if(_0xbdd4f7===this['currentRevision']){_0x60ecd7++;continue;}if(_0xbdd4f7['id']===this['_initialRevisionId'])break;const _0x22c015=_0x3be022['toVersion']-_0xbdd4f7['toVersion']||_0x3be022['fromVersion']-_0xbdd4f7['fromVersion'];if(_0x22c015>0x0)break;if(_0x22c015<0x0)_0x60ecd7++;else{if(!_0x3be022['creator']&&_0xbdd4f7['creator'])break;if(_0xbdd4f7['creator']||!_0x3be022['creator']){if(_0x3be022['createdAt']>_0xbdd4f7['createdAt'])break;_0x60ecd7++;}else _0x60ecd7++;}}return _0x60ecd7;}['_getFromVersion'](_0x5cd152){const _0x44e1d7=this['repository']['getRevisions']();_0x44e1d7['reverse'](),_0x44e1d7['shift']();const _0x1db30f=_0x44e1d7['find'](_0x31b1ff=>_0x31b1ff['toVersion']<=_0x5cd152)['toVersion'];return _0x1db30f<this['_startingVersion']?this['_startingVersion']:_0x1db30f;}['_makeRevision']({name:_0x37013d,from:_0x265915,to:_0x17aac8,creatorId:_0x282e02,id:_0x40a30e}){const _0x98a183=this['buildRevisionData']({'from':_0x265915,'to':_0x17aac8});_0x98a183['name']=_0x37013d,_0x98a183['creatorId']=_0x282e02,_0x98a183['id']=_0x40a30e;const _0x4e87fb=this['addRevisionData'](_0x98a183);return this['adapter']&&this['_bufferUpdate'](_0x98a183['id'],_0x98a183,!0x0),_0x4e87fb;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0xff23ab){this['editor']=_0xff23ab,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0xc22114){this['source']=_0xc22114;const _0x59085c=new Map(),_0x105051=new Map(),_0x74c008=this['editor']['model']['document']['roots']['map'](_0x3626cb=>_0x3626cb['rootName']);for(const _0x562aad of _0x74c008){const _0x37426e=this['editor']['model']['document']['getRoot'](_0x562aad),_0x140c3a=bt(_0x37426e);_0x59085c['set'](_0x562aad,_0x140c3a),_0x105051['set'](_0x562aad,Object['fromEntries'](_0x37426e['getAttributes']()));}const _0x395786=Array['from'](this['editor']['model']['markers'])['map'](_0x6126c8=>[_0x6126c8['name'],_0x6126c8['getRange']()]),_0x5a04d1=this['source']['version'];this['_saveMetaData'](_0x5a04d1,_0x59085c,_0x395786,_0x105051),this['_startingRevisionId']=this['_revisionId'];const _0x16209c=new Map(),_0x1930ac=new Map();for(const _0x370a9d of _0x74c008){const _0x1bbd13=Rt(_0x370a9d,this['editor']['model']['document']['getRoot'](_0x370a9d)['name']);_0x16209c['set'](_0x370a9d,_0x1bbd13),_0x1930ac['set'](_0x370a9d,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x16209c,[],_0x1930ac);}['getData'](_0x45321c,_0x3b8227){if(this['_lastFrom']===_0x45321c&&this['_lastTo']<=_0x3b8227)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3b8227,!0x0);else{if(!this['_savedMetaData']['has'](_0x45321c)){const _0x311576=this['_getPreviousFrom'](_0x45321c);this['_calculateMetaData'](_0x311576,_0x45321c,!0x1);}this['_calculateMetaData'](_0x45321c,_0x3b8227,!0x0);}return this['_lastFrom']=_0x45321c,this['_lastTo']=_0x3b8227,this['_getState']();}['loadState'](_0x5889c9){if(!this['_savedMetaData']['has'](_0x5889c9['fromVersion'])){const _0x2829bf=this['_getPreviousFrom'](_0x5889c9['fromVersion']);this['_calculateMetaData'](_0x2829bf,_0x5889c9['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5889c9['fromVersion'],_0x5889c9['toVersion'],!0x1);const _0x298e52=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5889c9['fromVersion'],this['_lastTo']=_0x5889c9['toVersion'];for(const _0xa98da in _0x5889c9['diffData']){const _0x1d98f5=_0x5889c9['diffData'][_0xa98da]['attachChange'],_0x2bcd27=_0x201516(_0x5889c9['diffData'][_0xa98da]['attributesBefore'])||{},_0x3f45a2=_0x5889c9['diffData'][_0xa98da],_0xd40c21=_0x298e52['_makeModelFromViewString'](_0x3f45a2['deletions'],_0x3f45a2['rootElementName']||'$root');_0xd40c21['rootName']=_0xa98da,_0xd40c21['_isAttached']=!_0x1d98f5||!_0x1d98f5['isAttached'],_0xd40c21['isAttached']=()=>_0xd40c21['_isAttached'],this['_baseRoots']['set'](_0xa98da,_0xd40c21),this['_baseRootsAttributes']['set'](_0xa98da,_0x2bcd27),_0x1d98f5&&this['_touchedRoots']['set'](_0xa98da,_0x1d98f5);const _0x1ff511=this['_makeIdsRoot'](_0xd40c21);this['_baseIdsRoots']['set'](_0xa98da,_0x1ff511);for(const [_0x1cacf4,_0x38512c]of _0xd40c21['markers']){if(!_0x1cacf4['startsWith']('revision:'))continue;const _0x181997=_0x1cacf4['split'](':')[0x2];for(const _0x5b1aaa of _0x38512c['getWalker']({'singleCharacters':!0x0})){const _0x4ab445=this['_getVidAttributeName'](_0x5b1aaa),_0x362a90='elementEnd'==_0x5b1aaa['type']?_0x5b1aaa['previousPosition']['path']['slice'](0x0,-0x1):_0x5b1aaa['previousPosition']['path'],_0x2cff36=_0x1ff511['getNodeByPath'](_0x362a90)['getAttribute'](_0x4ab445);this['_touched']['set'](_0x2cff36,{'userId':_0x181997});}_0xd40c21['markers']['delete'](_0x1cacf4);}}this['_startingRevisionId']=this['_revisionId'];const _0x3ef076=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x123b2=>!this['_touched']['has'](_0x123b2));let _0x3cfc62=0x0;const _0x11f410=new Map();for(const _0x50a482 in _0x5889c9['diffData']){const _0x50931a=_0x5889c9['diffData'][_0x50a482]['attachChange'],_0x5d113f=_0x201516(_0x5889c9['diffData'][_0x50a482]['attributesAfter'])||{},_0x3d0acd=_0x5889c9['diffData'][_0x50a482],_0xc9f445=_0x298e52['_makeModelFromViewString'](_0x3d0acd['insertions'],_0x3d0acd['rootElementName']||'$root');_0xc9f445['rootName']=_0x50a482,_0xc9f445['_isAttached']=!_0x50931a||_0x50931a['isAttached'],_0xc9f445['isAttached']=()=>_0xc9f445['_isAttached'],this['_diffRoots']['set'](_0x50a482,_0xc9f445),this['_diffRootsAttributes']['set'](_0x50a482,_0x5d113f);const _0x18559a=this['_makeIdsRoot'](_0xc9f445,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x50a482,_0x18559a),_0x11f410['set'](_0x50a482,_0xc9f445['isAttached']()?_0x5d113f:{});for(const [_0x2278cd,_0x438cef]of _0xc9f445['markers']){if(!_0x2278cd['startsWith']('revision:'))continue;const _0x19e8e9=_0x2278cd['split'](':')[0x2];for(const _0x16b09c of _0x438cef['getWalker']({'singleCharacters':!0x0})){const _0x53263f=this['_getVidAttributeName'](_0x16b09c),_0x405a31=this['_revisionId']++,_0x3c8599='elementEnd'==_0x16b09c['type']?_0x16b09c['previousPosition']['path']['slice'](0x0,-0x1):_0x16b09c['previousPosition']['path'];_0x18559a['getNodeByPath'](_0x3c8599)['_setAttribute'](_0x53263f,_0x405a31),this['_touched']['set'](_0x405a31,{'userId':_0x19e8e9});}_0xc9f445['markers']['delete'](_0x2278cd);}for(const _0x547bea of this['editor']['model']['createRangeIn'](_0xc9f445)['getWalker']({'singleCharacters':!0x0})){const _0x21a2c6=this['_getVidAttributeName'](_0x547bea),_0x41b248='elementEnd'==_0x547bea['type']?_0x547bea['previousPosition']['path']['slice'](0x0,-0x1):_0x547bea['previousPosition']['path'],_0x2743a5=_0x18559a['getNodeByPath'](_0x41b248);_0x2743a5['getAttribute'](_0x21a2c6)>0x0||_0x2743a5['_setAttribute'](_0x21a2c6,_0x3ef076[_0x3cfc62++]);}for(const [_0x44c1ac,_0x32ce0e]of _0xc9f445['markers'])_0x44c1ac['startsWith']('revision:')||this['_markers']['set'](_0x44c1ac,_0x32ce0e);}const {roots:_0x313af9}=this['_savedMetaData']['get'](_0x5889c9['fromVersion']),{roots:_0x38f2d3}=this['_savedMetaData']['get'](_0x5889c9['toVersion']),_0x290556=bt(_0x313af9['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x290556),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x290556,Number['NEGATIVE_INFINITY']));const _0x3c6e85=bt(_0x38f2d3['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x3c6e85),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3c6e85));const _0x4be9be=Array['from'](this['_diffRoots'])['map'](([_0x975d70,_0x1284cc])=>[_0x975d70,bt(_0x1284cc)]);this['_saveMetaData'](this['_lastTo'],_0x4be9be,this['_markers'],_0x11f410);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x28c3d3,_0xe2d9e2,_0x34382e,_0x4f9237){const _0x300636=new Map(_0xe2d9e2),_0x317ef9=new Map(_0x201516(_0x4f9237)),_0x474faf=new Map();for(const [_0x2e3bd3,_0x892835]of _0x34382e)_0x474faf['set'](_0x2e3bd3,{'start':_0x892835['start']['clone'](),'end':_0x892835['end']['clone'](),'rootName':_0x892835['root']['rootName']});this['_savedMetaData']['set'](_0x28c3d3,{'roots':_0x300636,'markers':_0x474faf,'rootsAttributes':_0x317ef9});}['_removeMetaData'](_0x467c78){this['_savedMetaData']['delete'](_0x467c78);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x1af78b,_0x40a9e2=null){let _0x59dd5d=null;_0x1af78b['is']('documentFragment')||(_0x59dd5d=new _0xe6fd24(_0x1af78b['name'],{'vid_start':null===_0x40a9e2?this['_revisionId']++:_0x40a9e2++}));const _0x5ab5ed=[];for(const _0x3f1ec9 of _0x1af78b['getChildren']())if(_0x3f1ec9['is']('element')){_0x5ab5ed['push'](this['_makeIdsRoot'](_0x3f1ec9,_0x40a9e2));const _0x303551=_0x5ab5ed[_0x5ab5ed['length']-0x1];null!==_0x40a9e2&&(_0x40a9e2=_0x303551['is']('element','$text')?_0x303551['getAttribute']('vid')+0x1:_0x303551['getAttribute']('vid_end')+0x1);}else{for(let _0x933827=0x0;_0x933827<_0x3f1ec9['offsetSize'];_0x933827++)_0x5ab5ed['push'](new _0xe6fd24('$text',{'vid':null===_0x40a9e2?this['_revisionId']++:_0x40a9e2++}));}if(_0x1af78b['is']('documentFragment')){const _0x1e9c1d=Rt(_0x1af78b['rootName'],_0x1af78b['name']);return _0x1e9c1d['_insertChild'](0x0,_0x5ab5ed),_0x1e9c1d;}return _0x59dd5d['_setAttribute']('vid_end',null===_0x40a9e2?this['_revisionId']++:_0x40a9e2++),_0x59dd5d['_insertChild'](0x0,_0x5ab5ed),_0x59dd5d;}['_calculateMetaData'](_0x1dacf2,_0x5cab50,_0xb88652){this['_reset']();const {roots:_0x24ae43,markers:_0x1e6dcb,rootsAttributes:_0x3b04c6}=this['_savedMetaData']['get'](_0x1dacf2);this['_baseRoots']=new Map(_0x24ae43),this['_baseRootsAttributes']=new Map(_0x201516(_0x3b04c6));for(const [_0x367f30,_0x2b64fd]of this['_baseRoots'])if('$graveyard'!==_0x367f30&&(this['_diffRoots']['set'](_0x367f30,bt(_0x2b64fd)),this['_diffRootsAttributes']=new Map(_0x201516(_0x3b04c6)),_0xb88652)){const _0x3ba042=this['_revisionId'];this['_idsRoots']['set'](_0x367f30,this['_makeIdsRoot'](_0x2b64fd)),this['_baseIdsRoots']['set'](_0x367f30,this['_makeIdsRoot'](_0x2b64fd,_0x3ba042));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0xb88652&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4000c8,_0x48c1b2]of _0x1e6dcb){const _0x144558=this['_baseRoots']['get'](_0x48c1b2['rootName']),_0x32fabc=this['_diffRoots']['get'](_0x48c1b2['rootName']),_0x20b187=new _0x32e9fa(this['_fixPosition'](_0x48c1b2['start'],_0x144558),this['_fixPosition'](_0x48c1b2['end'],_0x144558)),_0x224e87=this['_fixRange'](_0x20b187,_0x32fabc);_0x144558['markers']['set'](_0x4000c8,_0x20b187),this['_markers']['set'](_0x4000c8,_0x224e87);}this['_applyOperations'](_0x1dacf2,_0x5cab50,_0xb88652);}['_applyOperations'](_0x500fe3,_0x46de4e,_0x23414b){for(const _0x30a4cb of this['source']['getOperations'](_0x500fe3,_0x46de4e))this['_handleOperation'](_0x30a4cb,_0x23414b);for(const _0x60ed9d of this['_diffRoots']['values']())_0x60ed9d['markers']['clear']();for(const [_0x2cbd4b,_0x25ee55]of this['_markers'])this['_diffRoots']['get'](_0x25ee55['root']['rootName'])['markers']['set'](_0x2cbd4b,_0x25ee55['clone']());const _0x4c0e14=new Map(),_0x3f3faa=new Map();for(const [_0x17e0c7,_0x5631a4]of this['_diffRoots'])_0x4c0e14['set'](_0x17e0c7,bt(_0x5631a4)),_0x3f3faa['set'](_0x17e0c7,this['_diffRootsAttributes']['get'](_0x17e0c7));this['_saveMetaData'](_0x46de4e,_0x4c0e14,this['_markers'],_0x3f3faa);}['_getPreviousFrom'](_0x59adba){const _0x5746b9=Array['from'](this['_savedMetaData']['keys']());_0x5746b9['sort']((_0x2b2c37,_0x1dcf47)=>_0x2b2c37-_0x1dcf47),_0x5746b9['reverse']();for(const _0x246d89 of _0x5746b9)if(_0x246d89<_0x59adba)return _0x246d89;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x16b899,_0x1c3854){const _0x6125e6=Array['from'](_0x1c3854['markers'])['map'](([_0x2dc1c2,_0x47b69c])=>[_0x2dc1c2,this['_fixRange'](_0x47b69c,_0x16b899)]);_0x16b899['markers']=new Map(_0x6125e6);}['_transformMarkers'](_0x976b9e){for(const _0x180106 of this['_markers']['values']()){const _0x525d5b=_0x180106['getTransformedByOperation'](_0x976b9e),_0x2ffb7d=_0x32e9fa['_createFromRanges'](_0x525d5b);_0x180106['start']=_0x2ffb7d['start'],_0x180106['end']=_0x2ffb7d['end'];}}['_handleOperation'](_0xe56421,_0x115633){if('addRoot'!=_0xe56421['type']&&'detachRoot'!=_0xe56421['type']){if('insert'==_0xe56421['type']){const _0x57bc80=_0xe56421['position']['root'],_0x5b787b=_0x57bc80['rootName'],_0x349b6a=_0x57bc80['name'];this['_diffRoots']['has'](_0x5b787b)||(this['_diffRoots']['set'](_0x5b787b,Rt(_0x5b787b,_0x349b6a,!0x0)),this['_diffRootsAttributes']['set'](_0x5b787b,{}),_0x115633&&this['_idsRoots']['set'](_0x5b787b,Rt(_0x5b787b,_0x349b6a,!0x0)));}else{if('addRootAttribute'==_0xe56421['type']||'removeRootAttribute'==_0xe56421['type']||'changeRootAttribute'==_0xe56421['type'])return void this['_handleRootAttributeOperation'](_0xe56421);'marker'==_0xe56421['type']&&this['_handleMarkerOperation'](_0xe56421);}if('marker'!==_0xe56421['type']){const _0x13d400=this['_cloneOperation'](_0xe56421,this['_diffRoots']);_0x13d400['_execute'](),this['_transformMarkers'](_0x13d400);}if(_0x115633)switch(_0xe56421['type']){case'insert':this['_handleInsertOperation'](_0xe56421);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xe56421);break;case'merge':this['_handleMergeOperation'](_0xe56421);break;case'split':this['_handleSplitOperation'](_0xe56421);}}else this['_handleRootOperation'](_0xe56421,_0x115633);}['_cloneOperation'](_0x3b12fb,_0x1059fb){const _0x131c4a=_0x3b12fb['clone']();return _0x131c4a['_authorId']=_0x3b12fb['_authorId'],this['_fixOperation'](_0x131c4a,_0x1059fb),_0x131c4a;}['_getBaseVids'](_0x469cf4){return _0x469cf4['map'](_0x1aa4b9=>{const _0x10fb92=this['_getVidAttributeName'](_0x1aa4b9);return Number(_0x1aa4b9['item']['getAttribute'](_0x10fb92));});}['_generateTape'](_0x1d8eca,_0x10fbf0){if(_0x1d8eca['is']('element','$text'))_0x10fbf0['push']({'item':_0x1d8eca,'type':'text'});else{_0x1d8eca['is']('element')&&_0x10fbf0['push']({'item':_0x1d8eca,'type':'elementStart'});for(const _0x331f1e of _0x1d8eca['getChildren']())this['_generateTape'](_0x331f1e,_0x10fbf0);_0x1d8eca['is']('element')&&_0x10fbf0['push']({'item':_0x1d8eca,'type':'elementEnd'});}return _0x10fbf0;}['_getState'](){const _0x40d650=new Map(this['_touched']),_0xa31e6e=new Map(_0x40d650),_0x208fa2=new Map(),_0x5546aa={'insertions':{},'deletions':{}},_0x1ab717={'insertions':{},'deletions':{}},_0x19d285=new Map(),_0xe1e4c9=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1b7599=new Map();_0xe1e4c9['delete']('$graveyard');for(const _0x2ddc36 of _0xe1e4c9){const _0x38a2ea=(this['_diffRoots']['get'](_0x2ddc36)??this['_baseRoots']['get'](_0x2ddc36))['name'],_0x3ae2d5=this['_diffRoots']['get'](_0x2ddc36)||Rt(_0x2ddc36,_0x38a2ea,!0x1),_0x70ac25=this['_baseRoots']['get'](_0x2ddc36)||Rt(_0x2ddc36,_0x38a2ea,!0x1);_0x3ae2d5['isAttached']()||_0x70ac25['isAttached']()?(_0x1b7599['set'](_0x2ddc36,_0x38a2ea),_0x5546aa['insertions'][_0x2ddc36]=bt(_0x3ae2d5),_0x5546aa['deletions'][_0x2ddc36]=bt(_0x70ac25),this['_copyMarkers'](_0x5546aa['deletions'][_0x2ddc36],_0x70ac25),this['_copyMarkers'](_0x5546aa['insertions'][_0x2ddc36],_0x3ae2d5),_0x1ab717['insertions'][_0x2ddc36]=this['_generateTape'](this['_idsRoots']['get'](_0x2ddc36),[]),_0x1ab717['deletions'][_0x2ddc36]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x2ddc36)||Rt(_0x2ddc36,_0x38a2ea,!0x1),[])):_0xe1e4c9['delete'](_0x2ddc36);}for(const _0xeee03 of _0xe1e4c9){const _0x488d87=_0x1ab717['insertions'][_0xeee03];for(const _0x6483d of _0x488d87){const _0x265c67=this['_getVidAttributeName'](_0x6483d),_0xe14333=_0x6483d['item']['getAttribute'](_0x265c67);_0xa31e6e['delete'](_0xe14333),_0xe14333>=this['_startingRevisionId']&&_0x208fa2['set'](_0xe14333,_0x40d650['get'](_0xe14333));}}for(const _0x2eedee of _0xe1e4c9){const _0x41c55a=_0x1ab717['insertions'][_0x2eedee],_0x4ab2c4=this['_getBaseVids'](_0x1ab717['deletions'][_0x2eedee]);let _0x3382e9=0x0;for(const _0x41aedd of _0x41c55a){const _0x3b2c8b=this['_getVidAttributeName'](_0x41aedd),_0x2f4e69=_0x41aedd['item']['getAttribute'](_0x3b2c8b);if(!_0x208fa2['has'](_0x2f4e69)&&!_0x19d285['has'](_0x2f4e69)){if(_0xa31e6e['has'](_0x2f4e69))_0x3382e9++;else{if(_0x2f4e69!=_0x4ab2c4[_0x3382e9]){const _0x5e3c13=_0x40d650['get'](_0x2f4e69)||_0x40d650['get'](_0x4ab2c4[_0x3382e9]);for(;_0x2f4e69!=_0x4ab2c4[_0x3382e9];)_0xa31e6e['has'](_0x4ab2c4[_0x3382e9])||(_0x19d285['set'](_0x4ab2c4[_0x3382e9],_0x5e3c13),_0x40d650['set'](_0x4ab2c4[_0x3382e9],_0x5e3c13)),_0x3382e9++;}_0x3382e9++;}}}}for(const _0x319e8f of _0xe1e4c9){const _0xa2473d=_0x1ab717['insertions'][_0x319e8f];for(const _0xd4038c of _0xa2473d){const _0x16094a=this['_getVidAttributeName'](_0xd4038c),_0x5ec1a3=_0xd4038c['item']['getAttribute'](_0x16094a);if(_0x19d285['has'](_0x5ec1a3)){const _0x328c2d=_0x19d285['get'](_0x5ec1a3);_0xa31e6e['has'](_0x5ec1a3)||_0xa31e6e['set'](_0x5ec1a3,{..._0x328c2d}),_0x208fa2['set'](_0x5ec1a3,{..._0x328c2d});}}}for(const _0x3a4084 of _0xa31e6e['keys']())_0x3a4084>=this['_startingRevisionId']&&_0xa31e6e['delete'](_0x3a4084);const _0x2d1018=new Map();for(const _0x1d42a1 of _0xe1e4c9){let _0x5a22d7=_0x1ab717['insertions'][_0x1d42a1];for(const _0x226a82 of _0x5a22d7)if(_0x226a82['item']['is']('element','tableCell')){const _0x487aa9=this['_getVidAttributeName'](_0x226a82),_0x53969d=_0x226a82['item']['getAttribute'](_0x487aa9);if(_0x208fa2['has'](_0x53969d)){const _0x563179=_0x226a82['item']['parent']['parent']['getAttribute']('vid_start'),_0x3bb410=_0x2d1018['get'](_0x563179)||new Set();_0x3bb410['add'](_0x208fa2['get'](_0x53969d)['userId']),_0x2d1018['set'](_0x563179,_0x3bb410);}}_0x5a22d7=_0x1ab717['deletions'][_0x1d42a1];for(const _0x192814 of _0x5a22d7)if(_0x192814['item']['is']('element','tableCell')){const _0x23da3e=this['_getVidAttributeName'](_0x192814),_0x1c68e2=_0x192814['item']['getAttribute'](_0x23da3e);if(_0xa31e6e['has'](_0x1c68e2)){const _0x3ad114=_0x192814['item']['parent']['parent']['getAttribute']('vid_start'),_0x4a4ccc=_0x2d1018['get'](_0x3ad114)||new Set();_0x4a4ccc['add'](_0xa31e6e['get'](_0x1c68e2)['userId']),_0x2d1018['set'](_0x3ad114,_0x4a4ccc);}}for(const _0x299e06 of _0x2d1018['keys']())(_0x208fa2['has'](_0x299e06)||_0xa31e6e['has'](_0x299e06))&&_0x2d1018['delete'](_0x299e06);}for(const _0x533940 of _0xe1e4c9){const _0x124346=_0x1ab717['insertions'][_0x533940];let _0x4e697d=null,_0x5d2b65=null;for(const _0x22a9a1 of _0x124346){const _0x273393=this['_getVidAttributeName'](_0x22a9a1),_0x42bac6=_0x22a9a1['item']['getAttribute'](_0x273393),_0x10300a=_0x2d1018['get'](_0x42bac6);_0x10300a&&'elementStart'==_0x22a9a1['type']&&(_0x4e697d=Array['from'](_0x10300a)[0x0],_0x5d2b65=_0x22a9a1['item']['getAttribute']('vid_end')),_0x4e697d&&(_0xa31e6e['set'](_0x42bac6,{'userId':_0x4e697d}),_0x208fa2['set'](_0x42bac6,{'userId':_0x4e697d})),_0x42bac6==_0x5d2b65&&(_0x4e697d=null,_0x5d2b65=null);}}const _0x3553aa={},_0x33ef5b=new Set();for(const _0x522c75 of _0xe1e4c9){const _0x212ce2=_0x5546aa['deletions'][_0x522c75],_0x513dc7=_0x5546aa['insertions'][_0x522c75];for(const {userId:_0x32d988}of this['_touchedMarkers']['values']())null!==_0x32d988&&_0x33ef5b['add'](_0x32d988);for(const {userId:_0x5584b8}of this['_touchedRoots']['values']())null!==_0x5584b8&&_0x33ef5b['add'](_0x5584b8);this['_markChanges'](_0x513dc7,_0x1ab717['insertions'][_0x522c75],_0x208fa2,'insertion',_0x33ef5b),this['_markChanges'](_0x212ce2,_0x1ab717['deletions'][_0x522c75],_0xa31e6e,'deletion',_0x33ef5b),_0x3553aa[_0x522c75]={'insertions':this['_prepareViewToSave'](_0x513dc7),'deletions':this['_prepareViewToSave'](_0x212ce2),'attachChange':this['_touchedRoots']['get'](_0x522c75)||null,'attributesBefore':_0x201516(this['_baseRootsAttributes']['get'](_0x522c75))||{},'attributesAfter':_0x201516(this['_diffRootsAttributes']['get'](_0x522c75)),'rootElementName':_0x1b7599['get'](_0x522c75)};}return{'diffData':_0x3553aa,'authorsIds':Array['from'](_0x33ef5b)};}['_processRootBeforeSave'](_0x6d7c5e){for(const [,_0x3bd106]of _0x6d7c5e['markers']){const _0x34f927=_0x3bd106['start']['getAncestors']()['filter'](_0x7c7517=>'tableCell'==_0x7c7517['name']);for(const _0x539e71 of _0x34f927)0x1==_0x539e71['childCount']&&_0x539e71['getChild'](0x0)['is']('element','paragraph')&&_0x539e71['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x269f57){this['_processRootBeforeSave'](_0x269f57);const _0x15fa55=this['editor']['data']['toView'](_0x269f57,{}),_0x751b47=Array['from'](_0x15fa55['getChildren']())['map'](_0x328765=>this['_getViewJson'](_0x328765));return JSON['stringify'](_0x751b47);}['_getViewJson'](_0xed40d3){if(_0xed40d3['is']('$text'))return _0xed40d3['data'];{const _0x20b51f=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4d1db8=_0xed40d3,_0x56a127=this['editor']['data']['htmlProcessor']['domConverter'],_0x34de54={'type':_0x20b51f['_getTypeCharForViewElement'](_0x4d1db8),'name':_0x4d1db8['name'],'attributes':Array['from'](_0x4d1db8['getAttributes']()),'children':Array['from'](_0x4d1db8['getChildren']())['map'](_0x5aa492=>this['_getViewJson'](_0x5aa492))};if(_0xed40d3['is']('uiElement')&&'$comment'!=_0xed40d3['name']){const _0x5be1cb=_0xed40d3['render'](_0x56a127['domDocument'],_0x56a127);_0x34de54['children']['push'](_0x5be1cb['outerHTML']);}else{if(_0xed40d3['is']('rawElement')){const _0x1fa119=_0x56a127['domDocument']['createElement'](_0x4d1db8['name']);_0xed40d3['render'](_0x1fa119,_0x56a127),_0x34de54['children']['push'](_0x1fa119['innerHTML']);}}const _0x5114dd=Array['from'](_0x4d1db8['getCustomProperties']());_0x5114dd['length']>0x0&&(_0x34de54['customProperties']=_0x5114dd);const _0x4ca5c2=_0x4d1db8['getFillerOffset']();return null!==_0x4ca5c2&&(_0x34de54['fillerOffset']=_0x4ca5c2),_0x34de54;}}['_markChanges'](_0x2164c9,_0x1693e5,_0x5d23e1,_0x369200,_0xb7fa48){let _0x58ecac=null,_0x20afd6=null,_0x1f56f1=0x0;const _0x3c9e6d=this['editor']['model'];for(let _0x398d29=0x0;_0x398d29<_0x1693e5['length'];_0x398d29++){const _0x11b11f=this['_getVidAttributeName'](_0x1693e5[_0x398d29]),_0xb6409c=_0x1693e5[_0x398d29]['item']['getAttribute'](_0x11b11f),_0x564e54=_0x5d23e1['get'](_0xb6409c),_0x36faf0=_0x398d29==_0x1693e5['length']-0x1;!_0x58ecac&&_0x564e54&&(_0x58ecac=_0x564e54,_0x20afd6=_0x1693e5[_0x398d29]),!_0x58ecac||_0x564e54&&_0x564e54['userId']==_0x58ecac['userId']||(_0x1b08c3(_0x564e54,kt(_0x20afd6,_0x2164c9,_0x3c9e6d),kt(_0x1693e5[_0x398d29],_0x2164c9,_0x3c9e6d)),_0x58ecac=_0x564e54||null,_0x20afd6=_0x564e54?_0x1693e5[_0x398d29]:null),_0x58ecac&&_0x36faf0&&_0x1b08c3(_0x564e54,kt(_0x20afd6,_0x2164c9,_0x3c9e6d),At(_0x1693e5[_0x398d29],_0x2164c9,_0x3c9e6d));}function _0x1b08c3(_0x2263fe,_0x4de94c,_0x287212){const _0x5b73e4=_0x58ecac['userId'],_0x424be7='revision:'+_0x369200+':'+_0x5b73e4+':'+_0x1f56f1++,_0x4ed791=_0x3c9e6d['createRange'](_0x4de94c,_0x287212);_0x2164c9['markers']['set'](_0x424be7,_0x4ed791),null!==_0x5b73e4&&_0xb7fa48['add'](_0x5b73e4);}}['_getVidAttributeName'](_0x44812e){switch(_0x44812e['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x11139f,_0x4ba48a){_0x11139f['baseVersion']=null;for(const _0xae5277 in _0x11139f){const _0x1723e=_0x11139f[_0xae5277];if(_0x1723e instanceof _0x51b10c){const _0x2cae67=_0x4ba48a['get'](_0x1723e['root']['rootName']);_0x11139f[_0xae5277]=this['_fixPosition'](_0x1723e,_0x2cae67);}if(_0x1723e instanceof _0x32e9fa){const _0x561932=_0x4ba48a['get'](_0x1723e['root']['rootName']);_0x11139f[_0xae5277]=this['_fixRange'](_0x1723e,_0x561932);}'root'===_0xae5277&&(_0x11139f['root']=_0x4ba48a['get'](_0x11139f['root']['rootName']));}}['_fixRange'](_0x57e9a6,_0xab82d6){return this['editor']['model']['createRange'](this['_fixPosition'](_0x57e9a6['start'],_0xab82d6),this['_fixPosition'](_0x57e9a6['end'],_0xab82d6));}['_fixPosition'](_0x429554,_0x582d87){return this['editor']['model']['createPositionFromPath'](_0x582d87,_0x429554['path'],_0x429554['stickiness']);}['_handleInsertOperation'](_0x535566){const _0x189310=this['_idsRoots']['get'](_0x535566['position']['root']['rootName']),_0x5e6fb8=this['_fixPosition'](_0x535566['position'],_0x189310),_0x518fba=null===_0x535566['_authorId']?null:_0x535566['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x9740e9=_0x5e6fb8['parent'],_0x412f56=this['_revisionId'],_0x5272f7=[];for(const _0x4ed2a2 of _0x535566['nodes'])if(_0x4ed2a2['is']('element'))_0x5272f7['push'](this['_makeIdsRoot'](_0x4ed2a2));else{for(let _0x29a3af=0x0;_0x29a3af<_0x4ed2a2['offsetSize'];_0x29a3af++)_0x5272f7['push'](new _0xe6fd24('$text',{'vid':this['_revisionId']++}));}const _0x5bb5c3=this['_revisionId'];for(let _0x1b0f27=_0x412f56;_0x1b0f27<_0x5bb5c3;_0x1b0f27++)this['_touched']['set'](_0x1b0f27,{'userId':_0x518fba});_0x9740e9['_insertChild'](_0x5e6fb8['offset'],_0x5272f7);}['_handleMoveOperation'](_0x354e74){(_0x354e74=this['_cloneOperation'](_0x354e74,this['_idsRoots']))['_execute']();const _0xea9cfc=null===_0x354e74['_authorId']?null:_0x354e74['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x678c37=_0x354e74['getMovedRangeStart'](),_0x338c06=_0x678c37['parent'],_0x4b3a0a=_0x678c37['offset'];!function _0x44ca1e(_0x3da153,_0x311d31,_0x5335e4,_0x13f4d2){for(let _0x49987c=_0x5335e4;_0x49987c<_0x13f4d2;_0x49987c++){const _0x56ad9d=_0x311d31['getChild'](_0x49987c);_0x56ad9d['is']('element','$text')?_0x3da153['set'](_0x56ad9d['getAttribute']('vid'),{'userId':_0xea9cfc}):(_0x3da153['set'](_0x56ad9d['getAttribute']('vid_start'),{'userId':_0xea9cfc}),_0x44ca1e(_0x3da153,_0x56ad9d,0x0,_0x56ad9d['childCount']),_0x3da153['set'](_0x56ad9d['getAttribute']('vid_end'),{'userId':_0xea9cfc}));}}(this['_touched'],_0x338c06,_0x4b3a0a,_0x4b3a0a+_0x354e74['howMany']);}['_handleMergeOperation'](_0x148d35){const _0x1e9b50=null===(_0x148d35=this['_cloneOperation'](_0x148d35,this['_idsRoots']))['_authorId']?null:_0x148d35['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d6211=_0x148d35['targetPosition']['parent'],_0x1b79eb=_0x148d35['sourcePosition']['parent'],_0x13720e=_0x4d6211['getAttribute']('vid_end'),_0xab8938=_0x1b79eb['getAttribute']('vid_start');_0x4d6211['_setAttribute']('vid_end',_0x1b79eb['getAttribute']('vid_end')),_0x1b79eb['_setAttribute']('vid_end',_0x13720e),this['_touched']['set'](_0xab8938,{'userId':_0x1e9b50}),this['_touched']['set'](_0x13720e,{'userId':_0x1e9b50}),_0x148d35['_execute']();}['_handleSplitOperation'](_0x286ad0){const _0x4ff806=null===(_0x286ad0=this['_cloneOperation'](_0x286ad0,this['_idsRoots']))['_authorId']?null:_0x286ad0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x28d15f=_0x286ad0['graveyardPosition'],_0x26e9a1=_0x286ad0['splitPosition']['parent'];_0x286ad0['_execute']();const _0xdfac6b=_0x26e9a1['getAttribute']('vid_end'),_0x332f18=_0x286ad0['insertionPosition']['nodeAfter'];if(_0x28d15f){const _0x39a2c8=_0x332f18['getAttribute']('vid_end'),_0x237bd5=_0x26e9a1['getAttribute']('vid_end');_0x26e9a1['_setAttribute']('vid_end',_0x39a2c8),_0x332f18['_setAttribute']('vid_end',_0x237bd5),this['_touched']['set'](_0x26e9a1['getAttribute']('vid_end'),{'userId':_0x4ff806}),this['_touched']['set'](_0x332f18['getAttribute']('vid_start'),{'userId':_0x4ff806});}else{const _0x455a49=this['_revisionId']++,_0x2b9cf3=this['_revisionId']++;_0x26e9a1['_setAttribute']('vid_end',_0x455a49),_0x332f18['_setAttribute']('vid_start',_0x2b9cf3),_0x332f18['_setAttribute']('vid_end',_0xdfac6b),this['_touched']['set'](_0x455a49,{'userId':_0x4ff806}),this['_touched']['set'](_0x2b9cf3,{'userId':_0x4ff806});}}['_handleMarkerOperation'](_0x1d06e8){if(!_0x1d06e8['affectsData'])return;const _0x1889d5=(_0x1d06e8=this['_cloneOperation'](_0x1d06e8,this['_diffRoots']))['oldRange']?_0x1d06e8['oldRange']['root']:null,_0x1499e2=_0x1d06e8['newRange']?_0x1d06e8['newRange']['root']:null;_0x1889d5&&this['_markers']['delete'](_0x1d06e8['name']),_0x1499e2&&this['_markers']['set'](_0x1d06e8['name'],_0x1d06e8['newRange']['clone']());const _0x32b0fb=null===_0x1d06e8['_authorId']?null:_0x1d06e8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5e4069=_0x1d06e8['name'];if(!this['_touchedMarkers']['has'](_0x5e4069))return void this['_touchedMarkers']['set'](_0x5e4069,{'range':_0x1d06e8['oldRange'],'userId':_0x32b0fb});const _0x1a80f9=this['_touchedMarkers']['get'](_0x5e4069),_0x34cf17=_0x1a80f9['range'],_0x1d84d3=_0x1d06e8['newRange'];null==_0x34cf17&&null==_0x1d84d3||_0x34cf17&&_0x1d84d3&&_0x34cf17['isEqual'](_0x1d84d3)?this['_touchedMarkers']['delete'](_0x1d06e8['name']):_0x1a80f9['userId']=_0x32b0fb;}['_handleRootOperation'](_0x3fe22e,_0x9aebd1){this['_diffRoots']['has'](_0x3fe22e['rootName'])?this['_diffRoots']['get'](_0x3fe22e['rootName'])['_isAttached']=_0x3fe22e['isAdd']:(this['_diffRoots']['set'](_0x3fe22e['rootName'],Rt(_0x3fe22e['rootName'],_0x3fe22e['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3fe22e['rootName'],{}),_0x9aebd1&&this['_idsRoots']['set'](_0x3fe22e['rootName'],Rt(_0x3fe22e['rootName'],_0x3fe22e['elementName'],!0x0)));const _0x21b804=null===_0x3fe22e['_authorId']?null:_0x3fe22e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x56a7d1=this['_touchedRoots']['get'](_0x3fe22e['rootName']);_0x56a7d1&&_0x56a7d1['userId']===_0x21b804?this['_touchedRoots']['delete'](_0x3fe22e['rootName']):this['_touchedRoots']['set'](_0x3fe22e['rootName'],{'userId':_0x21b804,'isAttached':_0x3fe22e['isAdd']});}['_handleRootAttributeOperation'](_0x2d9003){const _0x5ae983=this['_diffRootsAttributes']['get'](_0x2d9003['root']['rootName']);null===_0x2d9003['newValue']?delete _0x5ae983[_0x2d9003['key']]:_0x5ae983[_0x2d9003['key']]=_0x2d9003['newValue'];}};function bt(_0x45bafe){const _0x1a2b7c=Rt(_0x45bafe['rootName'],_0x45bafe['name'],_0x45bafe['isAttached']());for(const _0x193581 of _0x45bafe['getChildren']()){const _0x24d947=_0x193581['_clone'](!0x0);_0x1a2b7c['_appendChild'](_0x24d947);}return _0x1a2b7c;}function Rt(_0x448118,_0x1ac97f,_0xe57b29=!0x0){const _0x123a72=new _0x75e513();return _0x123a72['rootName']=_0x448118,_0x123a72['name']=_0x1ac97f,_0x123a72['_isAttached']=_0xe57b29,_0x123a72['isAttached']=()=>_0x123a72['_isAttached'],_0x123a72;}function kt(_0x3b6ddf,_0x2acf57,_0x426c27){const _0xabbce5='elementEnd'==_0x3b6ddf['type']?_0x426c27['createPositionAt'](_0x3b6ddf['item'],'end'):_0x426c27['createPositionBefore'](_0x3b6ddf['item']);return _0x426c27['createPositionFromPath'](_0x2acf57,_0xabbce5['path'],_0xabbce5['stickiness']);}function At(_0x49b1aa,_0x28bf69,_0x500e8b){const _0xa60d87='elementStart'==_0x49b1aa['type']?_0x500e8b['createPositionAt'](_0x49b1aa['item'],0x0):_0x500e8b['createPositionAfter'](_0x49b1aa['item']);return _0x500e8b['createPositionFromPath'](_0x28bf69,_0xa60d87['path'],_0xa60d87['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4ef663(at);var Et=class extends It{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x32cb46,_0x1ad1e3){super(_0x32cb46),this['focusTracker']=new _0x321da2(),this['keystrokes']=new _0x32815b(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1ad1e3),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),dt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x494718=_0x325741=>_0x325741['stopPropagation']();this['keystrokes']['set']('arrowright',_0x494718),this['keystrokes']['set']('arrowleft',_0x494718),this['keystrokes']['set']('arrowup',_0x494718),this['keystrokes']['set']('arrowdown',_0x494718);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x154c03){this['revisionNameInputView']['fieldView']['element']['value']=_0x154c03['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x546bb6){const _0x1ba929=new _0x469ef1(this['locale'],lt),_0x87bc34=_0x1ba929['fieldView'];_0x87bc34['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x27c268=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x546bb6&&(_0x27c268+='\x20('+pt(this['locale'],'optional')+')'),(_0x1ba929['label']=_0x27c268,_0x87bc34['on']('input',()=>{this['revisionNameInputValue']=_0x87bc34['element']['value']['trim']();}),_0x1ba929);}},St=class extends _0x73140e{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t];}['_saveRevisionFormView'];['init'](){const _0x4d35dc=this['editor'],_0x329cd7=_0x4d35dc['plugins']['get']('RevisionTracker');_0x4d35dc['ui']['componentFactory']['add']('revisionHistory',_0x5bdc21=>{const _0x17f2ed=ct(_0x5bdc21),_0x2eab4e=_0x17f2ed['panelView']['children'],_0x52df3d=new _0x4ae715(_0x5bdc21),_0x261b20=new _0x5082de(_0x5bdc21),_0x26509f=this['_createSaveRevisionButton'](_0x178003),_0x40baac=new _0x5082de(_0x5bdc21),_0x4e69b8=this['_createOpenRevisionButton'](_0x178003);return _0x17f2ed['bind']('isEnabled')['to'](_0x329cd7,'isReady',_0x329cd7,'isEnabled',_0x4d35dc,'isReadOnly',(_0x1dc45f,_0x22b6e5,_0x127923)=>_0x1dc45f&&_0x22b6e5&&!_0x127923),_0x17f2ed['buttonView']['set']({'icon':_0x52e288,'label':pt(_0x5bdc21,'Revision\x20history'),'tooltip':!0x0}),_0x26509f['set']({'withText':!0x0,'role':'menuitem'}),_0x4e69b8['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x4e69b8,'execute',()=>{_0x17f2ed['isOpen']=!0x1,_0x4d35dc['editing']['view']['focus']();},{'priority':'low'}),_0x261b20['children']['add'](_0x26509f),_0x40baac['children']['add'](_0x4e69b8),_0x52df3d['role']='menu',_0x52df3d['items']['addMany']([_0x261b20,_0x40baac]),_0x2eab4e['add'](_0x52df3d),_0x17f2ed;}),_0x4d35dc['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x255958=this['editor'],_0x214f8a=_0x255958['locale'],_0x3965a9=_0x255958['plugins']['get']('RevisionTracker'),_0x1f216b=new et(_0x214f8a),_0x26ffd1=new it(_0x214f8a);_0x1f216b['bind']('isEnabled')['to'](_0x3965a9,'isReady',_0x3965a9,'isEnabled',_0x255958,'isReadOnly',(_0x3f0a97,_0x326370,_0x21cfa1)=>_0x3f0a97&&_0x326370&&!_0x21cfa1),_0x1f216b['buttonView']['set']({'icon':_0x52e288,'label':pt(_0x214f8a,'Revision\x20history')});const _0x111232=new tt(_0x214f8a,_0x1f216b),_0x503f6f=this['_createSaveRevisionButton'](_0x552109);_0x503f6f['delegate']('execute')['to'](_0x1f216b),_0x111232['children']['add'](_0x503f6f),_0x26ffd1['items']['add'](_0x111232);const _0x2867ea=new tt(_0x214f8a,_0x1f216b),_0x532b55=this['_createOpenRevisionButton'](_0x552109);return _0x532b55['delegate']('execute')['to'](_0x1f216b),_0x2867ea['children']['add'](_0x532b55),_0x26ffd1['items']['add'](_0x2867ea),_0x1f216b['panelView']['children']['add'](_0x26ffd1),_0x1f216b;}['_createSaveRevisionButton'](_0x29a9f8){const _0x168860=this['editor'],_0x5d3eb0=_0x168860['plugins']['get']('RevisionTracker'),_0x4c3283=new _0x29a9f8(_0x168860['locale']);return _0x4c3283['set']({'label':pt(_0x168860['locale'],'Save\x20current\x20revision')}),_0x4c3283['bind']('isEnabled')['to'](_0x5d3eb0,'isReady',_0x5d3eb0,'isEnabled',_0x168860,'isReadOnly',(_0x35f24d,_0x16d9c9,_0x1c7881)=>_0x35f24d&&_0x16d9c9&&!_0x1c7881),this['listenTo'](_0x4c3283,'execute',()=>{this['_showDialog']();}),_0x4c3283;}['_createOpenRevisionButton'](_0x55eba6){const _0x280dc5=this['editor'],_0x21057e=_0x280dc5['plugins']['get']('RevisionTracker'),_0x3c6da8=new _0x55eba6(_0x280dc5['locale']);return _0x3c6da8['set']({'label':pt(_0x280dc5['locale'],'Open\x20revision\x20history')}),_0x3c6da8['bind']('isEnabled')['to'](_0x21057e,'isReady',_0x280dc5,'isReadOnly',(_0x31629f,_0x89be92)=>_0x31629f&&!_0x89be92),this['listenTo'](_0x3c6da8,'execute',()=>{_0x280dc5['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3c6da8;}['_showDialog'](){const _0x4a1566=this['editor'],_0x3de5ab=_0x4a1566['locale'],_0x3239bf=_0x4a1566['plugins']['get']('Dialog'),_0x2a4a2b=_0x4a1566['plugins']['get']('RevisionTracker');function _0x5ba8e2(_0x1228ef){_0x4a1566['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1228ef['revisionName']?_0x1228ef['revisionNameInputView']['errorText']=pt(_0x3de5ab,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4a1566['plugins']['get'](_t)['saveRevision']({'name':_0x1228ef['revisionName']}),_0x3239bf['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5ba8e2(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3239bf['show']({'id':'revisionSave','title':pt(_0x3de5ab,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x4a1566['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3239bf['hide']()},{'label':pt(_0x4a1566['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3ccf78){_0x3ccf78['bind']('isEnabled')['to'](_0x2a4a2b,'isReady',_0x2a4a2b,'isEnabled',_0x4a1566,'isReadOnly',(_0x30dda6,_0x409a7d,_0x50d8a2)=>_0x30dda6&&_0x409a7d&&!_0x50d8a2);},'onExecute':()=>_0x5ba8e2(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x14e177=this['editor'],_0x3714f3=_0x14e177['locale'];this['_saveRevisionFormView']=new Et(_0x3714f3,_0x14e177['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x4a96e9,_0x44cc4){super(_0x4a96e9),this['_model']=_0x44cc4,this['changeId']=_0x44cc4['id'];const _0x5cbf8b=this['bindTemplate'],_0x5f476a=pt(_0x4a96e9,_0x44cc4['data']['isSuggestion']?'Suggested\x20by':'add'==_0x44cc4['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x44cc4['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5cbf8b['to']('type',_0x555276=>'ck-revision-change__'+_0x555276)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5f476a}]},{'text':'\x20'+_0x44cc4['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x4e64c6();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x33036f){super(),this['id']=_0x33036f['id']||_0x3001b8(),this['author']=_0x33036f['author'],this['type']=_0x33036f['type'],this['data']=_0x33036f['data']||{},this['rootName']=_0x33036f['rootName'],this['set']('createdAt',_0x33036f['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x253f16,_0x37f48c){this['newRevisionId']=_0x253f16,this['oldRevisionId']=_0x37f48c,this['changes']=new _0x453cd2();}['_setChanges'](_0x4bbac1){for(const _0x584b50 of _0x4bbac1)this['changes']['add'](_0x584b50);}},Mt=class extends _0x73140e{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1a8e81,_0x3176ee,mt,wt];}constructor(_0x242016){super(_0x242016),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x57ae16,_0x13d58e,_0x458666)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x39ee61=>{for(const _0x57addd of this['editor']['editing']['view']['document']['roots'])_0x458666?_0x39ee61['removeClass']('ck-editor__editable__overlay',_0x57addd):_0x39ee61['addClass']('ck-editor__editable__overlay',_0x57addd);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5377a8=>null!==_0x5377a8),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3626b7,_0x7d80a0,_0x105c0d)=>_0x3626b7&&_0x105c0d?_0x7d80a0['changes']['getIndex'](_0x105c0d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x21255d,_0x390319)=>_0x21255d?_0x390319['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3176ee);}['init'](){const _0x620940=this['editor'],_0x127a98=new Tt(_0x620940,{'direction':'backward'}),_0x2fd40a=new Tt(_0x620940,{'direction':'forward'});_0x620940['commands']['add']('showPreviousChange',_0x127a98),_0x620940['commands']['add']('showNextChange',_0x2fd40a),_0x620940['commands']['add']('restoreRevision',new Dt(_0x620940)),this['on']('change:numberOfChanges',()=>{_0x127a98['refresh'](),_0x2fd40a['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x620940['enableReadOnlyMode']('revision-viewer'),_0x620940['plugins']['has']('WidgetToolbarRepository')&&_0x620940['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x485fbe){return await this['_utils']['loadRevisionData'](_0x485fbe,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x485fbe);}async['getRevisionRootsAttributes'](_0x27ceb0){return await this['_utils']['loadRevisionData'](_0x27ceb0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x27ceb0);}async['compare'](_0x1c8852,_0x3e36b0,_0x3349c4=!0x1){if(!this['isEnabled'])return;const _0x58d889=this['diff'],_0x32b05b=this['repository'],_0x182537='string'==typeof _0x1c8852?_0x32b05b['getRevision'](_0x1c8852):_0x1c8852,_0x50c583='string'==typeof _0x3e36b0?_0x32b05b['getRevision'](_0x3e36b0):_0x3e36b0,_0x157484=_0x182537['id'],_0x3d4192=_0x50c583?_0x50c583['id']:null;if(!_0x3349c4&&this['diff']&&this['diff']['newRevisionId']===_0x157484&&this['diff']['oldRevisionId']===_0x3d4192)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x157484,_0x3d4192);const _0xa9fca4=this['_getRevisionsRange'](_0x182537,_0x50c583,!0x0)['map'](_0x406ce3=>this['_utils']['loadRevisionData'](_0x406ce3,this['adapter']));return _0xa9fca4['push'](new Promise(_0x59b224=>{setTimeout(_0x59b224,0x14);})),Promise['all'](_0xa9fca4)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x34c259=this['_getDiff'](_0x157484,_0x3d4192);for(const _0xe2463 of _0x34c259['changes'])this['_changeIdToChange']['set'](_0xe2463['id'],_0xe2463);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x27802f=>{for(const _0x324a7d of this['editor']['model']['document']['getRootNames']())_0x27802f['detachRoot'](_0x324a7d);for(const _0x5ba535 of Object['keys'](_0x34c259['model'])){const _0x3c3878=_0x34c259['model'][_0x5ba535]['name'],_0x3022ec=_0x27802f['addRoot'](_0x5ba535,_0x3c3878);for(const _0x37d071 of Object['keys'](_0x34c259['attributes'][_0x5ba535]))_0x27802f['setAttribute'](_0x37d071,_0x34c259['attributes'][_0x5ba535][_0x37d071],_0x3022ec);_0x27802f['insert'](_0x34c259['model'][_0x5ba535],_0x3022ec,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x34c259['changes'])),this['isReady']=!0x0;})['catch'](_0x3cf647=>{console['error'](_0x3cf647),this['_cleanUp'](),_0x58d889&&(this['diff']=_0x58d889),this['isReady']=!0x0;});}['addRevisionData'](_0x4a38f6,_0x5412b7){const _0x6a8293=this['repository']['createRevision'](_0x4a38f6);return _0x6a8293['on']('_update',(_0x2613cc,_0x438679,_0x248a91)=>_0x5412b7(_0x438679,_0x248a91,_0x6a8293)),this['repository']['addRevision'](_0x6a8293),_0x6a8293;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x613971=>{for(const _0x3d9ea6 of this['editor']['model']['document']['getRootNames']())_0x613971['detachRoot'](_0x3d9ea6);});}['_sortAndFilterDiffChanges'](_0x2260fe){const _0x50babd=[],_0x26ba58=new Map();for(const _0x376b67 of this['editor']['model']['document']['getRootNames']()){const _0x384cbf=this['editor']['editing']['view']['getDomRoot'](_0x376b67);if(!_0x384cbf)continue;const _0x111191=_0x384cbf['getClientRects']()['item'](0x0);_0x111191&&(_0x50babd['push'](_0x376b67),_0x26ba58['set'](_0x376b67,_0x111191));}return _0x50babd['sort']((_0x2b89f3,_0x2522d7)=>{const _0x21a46e=_0x26ba58['get'](_0x2b89f3),_0x550e46=_0x26ba58['get'](_0x2522d7);return _0x21a46e['y']-_0x550e46['y']||_0x21a46e['x']-_0x550e46['x'];}),(_0x2260fe=_0x2260fe['filter'](_0x43bec6=>_0x50babd['includes'](_0x43bec6['rootName'])))['sort']((_0x4d03e8,_0x3c9498)=>_0x50babd['indexOf'](_0x4d03e8['rootName'])-_0x50babd['indexOf'](_0x3c9498['rootName'])),_0x2260fe;}['_makeTape'](_0x403b97){const _0x5705cf=Array['from'](_0x403b97['markers'])['filter'](([_0x33943e,_0x3eec4e])=>_0x33943e['startsWith']('revision:')&&!_0x3eec4e['isCollapsed']),_0x33dc2f=Array['from'](this['editor']['model']['createRangeIn'](_0x403b97)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x5705cf['length'])for(const _0x207273 of _0x33dc2f){const [_0x6dd610,_0x1f037f]=_0x5705cf[0x0],[,_0x55b5e2,_0x1f0734]=_0x6dd610['split'](':');if(_0x1f037f['end']['isEqual'](_0x207273['nextPosition'])&&_0x5705cf['shift'](),(_0x207273['previousPosition']['isEqual'](_0x1f037f['start'])||_0x207273['previousPosition']['isAfter'](_0x1f037f['start']))&&('insertion'==_0x55b5e2?_0x207273['isAdded']={'userId':_0x1f0734}:'deletion'==_0x55b5e2&&(_0x207273['isRemoved']={'userId':_0x1f0734})),0x0==_0x5705cf['length'])break;}return _0x33dc2f;}['_refreshStartEndIndex'](_0x577683){const _0x5895f9=new Map();for(let _0x3dc35b=0x0;_0x3dc35b<_0x577683['length'];_0x3dc35b++)'text'===_0x577683[_0x3dc35b]['type']?(_0x577683[_0x3dc35b]['item']['startIndex']=_0x3dc35b,_0x577683[_0x3dc35b]['item']['endIndex']=_0x3dc35b):('elementStart'===_0x577683[_0x3dc35b]['type']?_0x577683[_0x3dc35b]['item']['startIndex']=_0x3dc35b:'elementEnd'===_0x577683[_0x3dc35b]['type']&&(_0x577683[_0x3dc35b]['item']['endIndex']=_0x3dc35b),_0x5895f9['set'](_0x577683[_0x3dc35b]['id'],_0x3dc35b));for(const _0x298ba5 of _0x5895f9['values']())'elementStart'===_0x577683[_0x298ba5]['type']?_0x577683[_0x298ba5]['item']['endIndex']=_0x5895f9['get'](_0x577683[_0x298ba5]['pairId']):'elementEnd'===_0x577683[_0x298ba5]['type']&&(_0x577683[_0x298ba5]['item']['startIndex']=_0x5895f9['get'](_0x577683[_0x298ba5]['pairId']));}['_processTape'](_0x504cef){for(let _0x56f410=0x0;_0x56f410<_0x504cef['length'];_0x56f410++){if('elementStart'===_0x504cef[_0x56f410]['type'])_0x504cef[_0x56f410]['item']['startIndex']=_0x56f410;else{if('elementEnd'===_0x504cef[_0x56f410]['type']){_0x504cef[_0x56f410]['item']['endIndex']=_0x56f410;const _0x87d65d=_0x504cef[_0x56f410]['item']['startIndex'];_0x504cef[_0x87d65d]['pairId']=_0x504cef[_0x56f410]['id'],_0x504cef[_0x56f410]['pairId']=_0x504cef[_0x87d65d]['id'];}else _0x504cef[_0x56f410]['item']['startIndex']=_0x56f410,_0x504cef[_0x56f410]['item']['endIndex']=_0x56f410,_0x504cef[_0x56f410]['pairId']=null;}_0x504cef[_0x56f410]['markersStart']||(_0x504cef[_0x56f410]['markersStart']=[],_0x504cef[_0x56f410]['markersEnd']=[]);}}['_markInsertions'](_0x402e93,_0x10ef12){const _0x51432e=_0x402e93['filter'](_0x15631a=>!_0x15631a['isAdded']);for(let _0x2d32c4=0x0;_0x2d32c4<_0x10ef12['length'];_0x2d32c4++)_0x10ef12[_0x2d32c4]['isAdded']&&(_0x51432e[_0x2d32c4]['isAdded']=_0x10ef12[_0x2d32c4]['isAdded']);}['_getDiff'](_0x191fbb,_0x1b60f7=null){const _0x3e37fc=this['repository']['getRevision'](_0x191fbb),_0x53fc99=_0x1b60f7?this['repository']['getRevision'](_0x1b60f7):null,_0x5d377b=this['_getRevisionsRange'](_0x3e37fc,_0x53fc99),_0x416236=_0x5d377b[_0x5d377b['length']-0x1],_0x46a533=new Map(),_0xf269b6={'model':{},'attributes':{},'changes':[]},_0x47108d=new Set(),_0x2a0e76=new Map();for(let _0x3b7978=_0x5d377b['length']-0x1;_0x3b7978>=0x0;_0x3b7978--){const _0x5a17d6=_0x5d377b[_0x3b7978];for(const _0x282048 of Object['keys'](_0x5a17d6['diffData']))if(_0x5a17d6['diffData'][_0x282048]['attachChange']){const _0x24069b=_0x5a17d6['diffData'][_0x282048]['attachChange'];_0x24069b['isAttached']?(_0x47108d['add'](_0x282048),_0x2a0e76['has'](_0x282048)&&_0x2a0e76['get'](_0x282048)['userId']==_0x24069b['userId']?_0x2a0e76['delete'](_0x282048):_0x2a0e76['set'](_0x282048,_0x24069b)):_0x2a0e76['has'](_0x282048)?(_0x47108d['delete'](_0x282048),_0x2a0e76['delete'](_0x282048)):(_0x47108d['add'](_0x282048),_0x2a0e76['set'](_0x282048,_0x24069b));}else _0x47108d['add'](_0x282048);}for(const _0x535a58 of _0x47108d){const _0x53a654=_0x2a0e76['has'](_0x535a58)&&!_0x2a0e76['get'](_0x535a58)['isAttached'];let _0x3163ff=_0x53a654?_0x5d377b['length']-0x1:0x0;const _0x405e5d=_0x53a654?-0x1:0x1;for(;_0x5d377b[_0x3163ff];){const _0x3bba58=_0x5d377b[_0x3163ff];if(_0x3bba58['diffData'][_0x535a58]){const _0x31fc18=_0x53a654?_0x3bba58['diffData'][_0x535a58]['attributesBefore']:_0x3bba58['diffData'][_0x535a58]['attributesAfter'];_0xf269b6['attributes'][_0x535a58]=_0x31fc18?_0x201516(_0x31fc18):{};break;}_0x3163ff+=_0x405e5d;}}for(const _0x2785b1 of _0x5d377b){_0x2785b1['model']={};for(const _0x1e3f93 of _0x2785b1['authors'])_0x46a533['set'](_0x1e3f93['id'],_0x1e3f93);for(const _0x38c2a7 of _0x47108d){const _0x29735c=_0x2785b1['diffData'][_0x38c2a7]?_0x2785b1['diffData'][_0x38c2a7]['insertions']:'[]',_0xe2e321=_0x2785b1['diffData'][_0x38c2a7]?_0x2785b1['diffData'][_0x38c2a7]['deletions']:'[]',_0x66f4de=_0x2785b1['diffData'][_0x38c2a7]?.['rootElementName']||'$root';_0x2785b1['model'][_0x38c2a7]={'insertions':this['_utils']['_makeModelFromViewString'](_0x29735c,_0x66f4de),'deletions':this['_utils']['_makeModelFromViewString'](_0xe2e321,_0x66f4de)};}}for(const _0x1581e5 of _0x47108d){let _0x11942c=null,_0x431f58=0x0;const _0x22c4c9=_0x5d377b['map'](_0x69009f=>_0x69009f['diffData'][_0x1581e5]?.['rootElementName'])['find'](_0x35ccad=>void 0x0!==_0x35ccad)||'$root',_0x4504c7=new Map(Array['from'](_0x3e37fc['model'][_0x1581e5]['insertions']['markers'])['filter'](([_0x1f0143])=>!_0x1f0143['startsWith']('revision:')));let _0x55ef34=0x0;for(const _0x3cc7e9 of _0x5d377b){const _0x50cb8b=this['_makeTape'](_0x3cc7e9['model'][_0x1581e5]['insertions']);_0x3cc7e9==_0x3e37fc?(_0x11942c=_0x50cb8b,_0x431f58=_0x11942c['length'],_0x11942c['forEach'](_0x10a87b=>{_0x10a87b['id']=_0x55ef34++;}),this['_processTape'](_0x11942c)):this['_markInsertions'](_0x11942c,_0x50cb8b);const _0x5606a6=_0x11942c['filter'](_0x48d84a=>!_0x48d84a['isAdded'])['map'](_0x47e4ff=>_0x47e4ff['id']);let _0xa08c84=0x0;const _0x5d685c=this['_makeTape'](_0x3cc7e9['model'][_0x1581e5]['deletions']);_0x5d685c['forEach'](_0x1595b5=>{_0x1595b5['isRemoved']?_0x1595b5['id']=_0x431f58++:_0x1595b5['id']=_0x5606a6[_0xa08c84++];}),this['_processTape'](_0x5d685c),this['_setDistance'](_0x11942c,'isAdded'),this['_setDistance'](_0x5d685c,'isRemoved'),_0x3cc7e9==_0x3e37fc&&this['_markMarkers'](_0x11942c,_0x4504c7),_0x11942c=this['_joinTapes'](_0x11942c,_0x5d685c),this['_refreshStartEndIndex'](_0x11942c),this['_setDistance'](_0x11942c,'isRemoved');}_0x11942c=_0x11942c['filter'](_0x3535fa=>!(_0x3535fa['isAdded']&&_0x3535fa['isRemoved']));const _0x1078dc=new Map(_0x416236['model'][_0x1581e5]['deletions']['markers']),_0x140cfb=new Set(_0x4504c7['keys']());for(const _0x324557 of _0x1078dc['keys']())_0x140cfb['delete'](_0x324557);this['_markSuggestions'](_0x11942c,_0x140cfb),this['_fixObsoleteTags'](_0x11942c),_0x11942c=this['_removeMissingPairs'](_0x11942c),_0x11942c=this['_markMismatchedRemovedTags'](_0x11942c),_0x11942c=this['_removeUnsupportedChanges'](_0x11942c);const {root:_0x226ae8,changes:_0x45986c}=this['_makeModelFromTape'](_0x11942c,_0x46a533,_0x1581e5,_0x22c4c9);_0xf269b6['model'][_0x1581e5]=_0x226ae8;const _0x280b1e=_0x2a0e76['get'](_0x1581e5);if(_0x280b1e){const _0xa057c0=new Ot({'author':_0x46a533['get'](_0x280b1e['userId']),'type':_0x280b1e['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x1581e5});_0x45986c['unshift'](_0xa057c0),_0xf269b6['attributes'][_0x1581e5]['revisionHistoryAttachChange']=_0xa057c0['id'];}_0xf269b6['changes']=_0xf269b6['changes']['concat'](_0x45986c);}return _0xf269b6;}['_markMarkers'](_0x3e0476,_0x104b81){for(let _0x591117=0x0;_0x591117<_0x3e0476['length'];_0x591117++)for(const [_0x3b81b7,_0x3fbc8a]of _0x104b81)!_0x3fbc8a['isCollapsed']&&_0x3fbc8a['start']['isEqual'](_0x3e0476[_0x591117]['previousPosition'])&&_0x3e0476[_0x591117]['markersStart']['push'](_0x3b81b7),_0x3fbc8a['end']['isEqual'](_0x3e0476[_0x591117]['nextPosition'])&&_0x3e0476[_0x591117]['markersEnd']['push'](_0x3b81b7);}['_joinTapes'](_0x2e9c52,_0x19c0b2){let _0x1bf81b=[],_0x285a55=0x0,_0x15f46d=0x0;for(;_0x285a55<_0x2e9c52['length']||_0x15f46d<_0x19c0b2['length'];){const _0x39e417=_0x2e9c52[_0x285a55]||{},_0x355a30=_0x19c0b2[_0x15f46d]||{};if(_0x39e417['id']==_0x355a30['id'])_0x285a55++,_0x15f46d++,_0x1bf81b['push'](_0x39e417);else{if(_0x355a30['isRemoved']&&_0x39e417['isAdded']){const {commonTape:_0x404fb7,iEnd:_0x25dcd8,jEnd:_0x4bfb79}=this['_threeWayMerge'](_0x2e9c52,_0x285a55,_0x19c0b2,_0x15f46d);_0x1bf81b=_0x1bf81b['concat'](_0x404fb7),_0x285a55=_0x25dcd8,_0x15f46d=_0x4bfb79;}else _0x355a30['isRemoved']?(_0x15f46d++,_0x1bf81b['push'](_0x355a30)):(_0x285a55++,_0x1bf81b['push'](_0x39e417));}}return _0x1bf81b;}['_markSuggestions'](_0x290b53,_0xa87d66){const _0x56756c=[];for(let _0x3ab4b6=0x0;_0x3ab4b6<_0x290b53['length'];_0x3ab4b6++){for(let _0x4876ae=0x0;_0x4876ae<_0x290b53[_0x3ab4b6]['markersStart']['length'];_0x4876ae++){const _0x33c9d1=_0x290b53[_0x3ab4b6]['markersStart'][_0x4876ae];if(!_0xa87d66['has'](_0x33c9d1))continue;const {group:_0x14a010,type:_0x2a8ce3,authorId:_0x3046d3}=_0x10a345(_0x33c9d1);'revision-suggestion'!=_0x14a010||'insertion'!=_0x2a8ce3&&'deletion'!=_0x2a8ce3||(_0x56756c['unshift']({'type':_0x2a8ce3,'name':_0x33c9d1,'userId':_0x3046d3}),_0x290b53[_0x3ab4b6]['markersStart']['splice'](_0x4876ae,0x1),_0x4876ae--);}_0x5064c5(_0x290b53[_0x3ab4b6]);for(let _0x202a24=0x0;_0x202a24<_0x290b53[_0x3ab4b6]['markersEnd']['length'];_0x202a24++){const _0x5c3e64=_0x290b53[_0x3ab4b6]['markersEnd'][_0x202a24];if(!_0xa87d66['has'](_0x5c3e64))continue;const {group:_0x39bd76,type:_0xb9119}=_0x10a345(_0x5c3e64);if('revision-suggestion'!=_0x39bd76||'insertion'!=_0xb9119&&'deletion'!=_0xb9119)continue;_0x290b53[_0x3ab4b6]['markersEnd']['splice'](_0x202a24,0x1),_0x202a24--;const _0xfce01=_0x56756c['findIndex'](_0x53f416=>_0x53f416['name']==_0x5c3e64);_0xfce01>-0x1&&_0x56756c['splice'](_0xfce01,0x1);}}function _0x10a345(_0x58c601){const _0x18f203=_0x58c601['split'](':');return{'group':_0x18f203[0x0],'type':_0x18f203[0x1],'subType':_0x18f203['length']>=0x5?_0x18f203[0x2]:null,'id':_0x18f203['length']<0x5?_0x18f203[0x2]:_0x18f203[0x3],'authorId':_0x18f203['length']<0x5?_0x18f203[0x3]:_0x18f203[0x4],'markerCount':0x6==_0x18f203['length']?_0x18f203[0x5]:null};}function _0x5064c5(_0x3f7fb4){for(let _0x4feb47=0x0;_0x4feb47<_0x56756c['length'];_0x4feb47++){if(_0x3f7fb4['isAdded']&&'insertion'==_0x56756c[_0x4feb47]['type']&&_0x3f7fb4['isAdded']['userId']==_0x56756c[_0x4feb47]['userId'])return _0x3f7fb4['isAddSuggestion']=_0x56756c[_0x4feb47],void delete _0x3f7fb4['isAdded'];if(!_0x3f7fb4['isAdded']&&!_0x3f7fb4['isRemoved']&&'deletion'==_0x56756c[_0x4feb47]['type'])return void(_0x3f7fb4['isRemoveSuggestion']=_0x56756c[_0x4feb47]);}}}['_setDistance'](_0x1f444b,_0xf8e04c){let _0x482927=0x0,_0x22d265=!0x1;const _0xbd9407=new Map();for(const _0x54cff2 of _0x1f444b)_0x54cff2[_0xf8e04c]?_0x22d265&&(_0x482927++,_0x22d265=!0x1):(_0x482927++,_0x22d265=!0x0),_0xbd9407['set'](_0x54cff2['id'],_0x482927);for(let _0x4df136=0x0;_0x4df136<_0x1f444b['length'];_0x4df136++){if('isRemoved'==_0xf8e04c&&_0x1f444b[_0x4df136]['isAdded']||'isAdded'==_0xf8e04c&&_0x1f444b[_0x4df136]['isRemoved'])continue;if('text'==_0x1f444b[_0x4df136]['type']){_0x1f444b[_0x4df136]['distance']=0x0;continue;}const _0x238436=_0xbd9407['get'](_0x1f444b[_0x4df136]['pairId']),_0x20c931=_0xbd9407['get'](_0x1f444b[_0x4df136]['id']);_0x1f444b[_0x4df136]['distance']=_0x238436-_0x20c931;}}['_getRevisionsRange'](_0x4514ca,_0x24456a,_0x440769=!0x1){const _0x416ee0=[];let _0x4224aa=this['repository']['getIndex'](_0x4514ca),_0x4f5bad=this['repository']['getIndex'](_0x24456a);for(-0x1==_0x4f5bad&&(_0x4f5bad=this['repository']['_revisions']['length'],_0x440769=!0x1);_0x4224aa<_0x4f5bad;)_0x416ee0['push'](this['repository']['getRevision'](_0x4224aa)),_0x4224aa++;return _0x440769&&_0x416ee0['push'](this['repository']['getRevision'](_0x4224aa)),_0x416ee0;}['_threeWayMerge'](_0x2189f4,_0x8fe0d3,_0x6807ac,_0x3c5e02){const _0x3cb40a=this['editor']['model']['schema'];let _0x22b06c=_0x8fe0d3;for(;_0x2189f4[_0x22b06c]&&_0x2189f4[_0x22b06c]['isAdded'];)_0x22b06c++;let _0x1115f3=_0x3c5e02;for(;_0x6807ac[_0x1115f3]&&_0x6807ac[_0x1115f3]['isRemoved'];)_0x1115f3++;_0x164b80(_0x2189f4,_0x8fe0d3,_0x22b06c),_0x164b80(_0x6807ac,_0x3c5e02,_0x1115f3);const _0x5957f9=_0x6807ac['slice'](_0x3c5e02,_0x1115f3)['concat'](_0x2189f4['slice'](_0x8fe0d3,_0x22b06c));return _0x5957f9['sort']((_0x1d6e97,_0x289ce4)=>_0x1d6e97['side']!=_0x289ce4['side']?_0x1d6e97['side']-_0x289ce4['side']:_0x1d6e97['level']!=_0x289ce4['level']?_0x1d6e97['level']-_0x289ce4['level']:_0x1d6e97['distance']!=_0x289ce4['distance']?_0x289ce4['distance']-_0x1d6e97['distance']:!!_0x1d6e97['isAdded']!=!!_0x289ce4['isAdded']?-0x1==_0x1d6e97['side']||0x0==_0x1d6e97['side']?_0x1d6e97['isAdded']?-0x1:0x1:_0x1d6e97['isAdded']?0x1:-0x1:_0x1d6e97['index']-_0x289ce4['index']),{'commonTape':_0x5957f9,'iEnd':_0x22b06c,'jEnd':_0x1115f3};function _0x164b80(_0x7511a2,_0x5cb21d,_0x472830){let _0xdffaf6=-0x1,_0x87dcb7=Number['POSITIVE_INFINITY'],_0x46e6e6=!0x0;for(let _0x306280=_0x5cb21d;_0x306280<_0x472830;_0x306280++)if(_0x3cb40a['isInline'](_0x7511a2[_0x306280]['item'])||(_0x46e6e6=!0x1),_0x7511a2[_0x306280]['item']['startIndex']<_0x5cb21d&&(_0xdffaf6=_0x306280),_0x7511a2[_0x306280]['item']['endIndex']>=_0x472830){_0x87dcb7=_0x306280;break;}_0x46e6e6&&(_0xdffaf6=_0x472830-0x1);for(let _0x114331=_0x5cb21d;_0x114331<_0x472830;_0x114331++)_0x7511a2[_0x114331]['side']=_0x114331<=_0xdffaf6?-0x1:_0x114331<_0x87dcb7?0x0:0x1,_0x7511a2[_0x114331]['index']=_0x114331;let _0x1adccc=0x0;for(let _0x28bfbb=_0x5cb21d;_0x28bfbb<=_0xdffaf6;_0x28bfbb++)0x0==_0x7511a2[_0x28bfbb]['distance']?_0x7511a2[_0x28bfbb]['level']=_0x1adccc:(_0x1adccc++,_0x7511a2[_0x28bfbb]['level']=_0x1adccc,_0x1adccc++);for(let _0x2119d9=_0x5cb21d;_0x2119d9<_0x472830;_0x2119d9++)0x0==_0x7511a2[_0x2119d9]['side']&&(_0x7511a2[_0x2119d9]['level']=_0x1adccc);_0x1adccc=0x0;for(let _0x27e501=_0x472830-0x1;_0x27e501>=_0x87dcb7;_0x27e501--)0x0==_0x7511a2[_0x27e501]['distance']?_0x7511a2[_0x27e501]['level']=_0x1adccc:(_0x1adccc--,_0x7511a2[_0x27e501]['level']=_0x1adccc,_0x1adccc--);}}['_fixObsoleteTags'](_0x332510){const _0x51123f=new Map(),_0xa344f0=this['editor']['model']['schema'];for(let _0x53050a=0x1;_0x53050a<_0x332510['length'];_0x53050a++){let _0x44df82,_0x3b5b41,_0x2c1b6d;const _0xd8fb8=_0x332510[_0x53050a],_0x352354=_0x332510[_0x53050a-0x1];if('text'==_0xd8fb8['type'])continue;if(_0xd8fb8['type']!=_0x352354['type'])continue;if(!_0xa344f0['isBlock'](_0x352354['item'])||_0xa344f0['isLimit'](_0x352354['item']))continue;if(!_0xa344f0['isBlock'](_0xd8fb8['item'])||_0xa344f0['isLimit'](_0xd8fb8['item']))continue;if((_0x332510[_0x53050a]['isAdded']||_0x332510[_0x53050a]['isAddSuggestion'])&&_0x332510[_0x53050a-0x1]['isRemoved'])_0x44df82=_0x332510[_0x53050a],_0x3b5b41=_0x332510[_0x53050a-0x1],_0x2c1b6d=_0x53050a-0x1;else{if(!_0x332510[_0x53050a]['isRemoved']||!_0x332510[_0x53050a-0x1]['isAdded']&&!_0x332510[_0x53050a-0x1]['isAddSuggestion'])continue;_0x44df82=_0x332510[_0x53050a-0x1],_0x3b5b41=_0x332510[_0x53050a],_0x2c1b6d=_0x53050a;}const _0x3c3d84=_0x44df82['level']==_0x3b5b41['level'],_0x4dbe77=Math['abs'](_0x44df82['level'])<Math['abs'](_0x3b5b41['level'])&&0x0==_0x3b5b41['distance'];(_0x3c3d84||_0x4dbe77)&&(_0x51123f['set'](_0x3b5b41['id'],_0x44df82['id']),_0x332510['splice'](_0x2c1b6d,0x1),_0x53050a--,_0x44df82['isAdded']=!0x1);}for(let _0x124749=0x0;_0x124749<_0x332510['length'];_0x124749++)_0x51123f['has'](_0x332510[_0x124749]['pairId'])&&(_0x332510[_0x124749]['pairId']=_0x51123f['get'](_0x332510[_0x124749]['pairId']));}['_removeMissingPairs'](_0x277351){const _0x5e14a4=new Set(_0x277351['map'](_0x16c876=>_0x16c876['id']));for(let _0x238351=0x0;_0x238351<_0x277351['length'];_0x238351++)_0x5e14a4['has'](_0x277351[_0x238351]['pairId'])||0x0==_0x277351[_0x238351]['distance']||(_0x277351[_0x238351]['isIncorrect']=!0x0);return _0x277351['filter'](_0x11b82a=>!_0x11b82a['isIncorrect']);}['_markMismatchedRemovedTags'](_0x965016){const _0xb196fe=new Set();for(let _0x3a3da0=0x0;_0x3a3da0<_0x965016['length'];_0x3a3da0++){if(_0xb196fe['has'](_0x965016[_0x3a3da0]['id'])&&_0x965016[_0x3a3da0]['isRemoved']&&(_0x965016[_0x3a3da0]['isIncorrect']=!0x0),_0x965016[_0x3a3da0]['isIncorrect'])continue;if(0x0==_0x965016[_0x3a3da0]['distance'])continue;if('elementStart'!=_0x965016[_0x3a3da0]['type'])continue;if(null==_0x965016[_0x3a3da0]['pairId'])continue;let _0x5c9c62=_0x3a3da0+0x1,_0x47d54a=0x0;for(;_0x965016[_0x5c9c62]['id']!=_0x965016[_0x3a3da0]['pairId'];)'elementStart'==_0x965016[_0x5c9c62]['type']?_0x47d54a++:'elementEnd'==_0x965016[_0x5c9c62]['type']&&_0x47d54a--,_0x5c9c62++;if(0x0!=_0x47d54a){if(_0x965016[_0x3a3da0]['isRemoved'])_0x965016[_0x3a3da0]['isIncorrect']=!0x0;else{for(;_0x5c9c62!=_0x3a3da0;)_0x965016[_0x5c9c62]['isRemoved']&&0x0!=_0x965016[_0x5c9c62]['distance']&&(_0x965016[_0x5c9c62]['isIncorrect']=!0x0,_0xb196fe['add'](_0x965016[_0x5c9c62]['pairId'])),_0x5c9c62--;}}}return _0x965016['filter'](_0x4562cd=>!_0x4562cd['isIncorrect']);}['_removeUnsupportedChanges'](_0x339a5c){const _0x103416=this['editor']['model']['schema'];for(let _0x2a5406=0x0;_0x2a5406<_0x339a5c['length'];_0x2a5406++){if(!(_0x339a5c[_0x2a5406]['isAdded']||_0x339a5c[_0x2a5406]['isAddSuggestion']||_0x339a5c[_0x2a5406]['isRemoved']||_0x339a5c[_0x2a5406]['isRemoveSuggestion']))continue;if(0x0==_0x339a5c[_0x2a5406]['distance'])continue;const _0x5ad5ec=_0x339a5c[_0x2a5406]['item'];_0x103416['isBlock'](_0x5ad5ec)||_0x103416['isLimit'](_0x5ad5ec)||(_0x339a5c[_0x2a5406]['isAdded']&&delete _0x339a5c[_0x2a5406]['isAdded'],_0x339a5c[_0x2a5406]['isAddSuggestion']&&delete _0x339a5c[_0x2a5406]['isAddSuggestion'],_0x339a5c[_0x2a5406]['isRemoveSuggestion']&&delete _0x339a5c[_0x2a5406]['isRemoveSuggestion'],_0x339a5c[_0x2a5406]['isRemoved']&&(_0x339a5c[_0x2a5406]['isIncorrect']=!0x0));}return _0x339a5c['filter'](_0x7ec0=>!_0x7ec0['isIncorrect']);}['_makeModelFromTape'](_0x235e98,_0x24bdf7,_0x1d7910,_0x3443d7){const _0x20dfde=new _0x75e513(),_0x3510d1=[],_0x5696a5=new Map(),_0x1bd004=this['editor']['model'],_0x395d3d=_0x1bd004['schema'],_0x2f88c0=[_0x20dfde],_0x4503bb={},_0x330f80={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x20dfde['name']=_0x3443d7;let _0x298253=null;const _0x4e1725=[0x0];for(let _0x3fd62b=0x0;_0x3fd62b<_0x235e98['length'];_0x3fd62b++)if('elementStart'===_0x235e98[_0x3fd62b]['type']){_0x235e98[_0x3fd62b]['previousPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725);const _0x2a49cf=new _0xe6fd24(_0x235e98[_0x3fd62b]['item']['name'],_0x235e98[_0x3fd62b]['item']['getAttributes']());_0x2f88c0[0x0]['_appendChild'](_0x2a49cf),_0x4e1725['push'](0x0),_0x2f88c0['unshift'](_0x2a49cf),_0x235e98[_0x3fd62b]['nextPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725);}else'elementEnd'===_0x235e98[_0x3fd62b]['type']?(_0x2f88c0['shift'](),_0x235e98[_0x3fd62b]['previousPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725),_0x4e1725['pop'](),_0x4e1725[_0x4e1725['length']-0x1]++,_0x235e98[_0x3fd62b]['nextPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725)):(_0x235e98[_0x3fd62b]['previousPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725),_0x298253?_0x298253['_data']+=_0x235e98[_0x3fd62b]['item']['data']:_0x298253=new _0x1e0d67(_0x235e98[_0x3fd62b]['item']['data'],_0x235e98[_0x3fd62b]['item']['getAttributes']()),_0x235e98[_0x3fd62b+0x1]&&'text'===_0x235e98[_0x3fd62b+0x1]['type']&&_0x5346dc(_0x298253,_0x235e98[_0x3fd62b+0x1]['item'])||(_0x2f88c0[0x0]['_appendChild'](_0x298253),_0x298253=null),_0x4e1725[_0x4e1725['length']-0x1]+=_0x235e98[_0x3fd62b]['item']['offsetSize'],_0x235e98[_0x3fd62b]['nextPosition']=_0x1bd004['createPositionFromPath'](_0x20dfde,_0x4e1725));for(let _0x4777be=0x0;_0x4777be<_0x235e98['length'];_0x4777be++){const _0x52aa3d=_0x235e98[_0x4777be]['previousPosition'],_0x3a9cbf=_0x235e98[_0x4777be]['nextPosition'];for(const _0x5190ff of _0x235e98[_0x4777be]['markersStart'])_0x5696a5['set'](_0x5190ff,{'start':_0x52aa3d,'end':null});_0x362444('isRemoveSuggestion',_0x4777be,_0x52aa3d,_0x3a9cbf),_0x362444('isAddSuggestion',_0x4777be,_0x52aa3d,_0x3a9cbf),_0x362444('isRemoved',_0x4777be,_0x52aa3d,_0x3a9cbf),_0x362444('isAdded',_0x4777be,_0x52aa3d,_0x3a9cbf);for(const _0x5edc35 of _0x235e98[_0x4777be]['markersEnd']){const _0x388fa8=_0x5696a5['get'](_0x5edc35);_0x388fa8?_0x388fa8['end']=_0x3a9cbf:_0x5696a5['set'](_0x5edc35,{'start':_0x3a9cbf,'end':_0x3a9cbf});}}for(const [_0x4a20b0,_0x500c24]of _0x5696a5){const _0x7031a2=this['editor']['model']['createRange'](_0x500c24['start'],_0x500c24['end']);_0x20dfde['markers']['set'](_0x4a20b0,_0x7031a2);}return _0x3510d1['sort']((_0x1fa475,_0x18fb44)=>{const _0x29445b=_0x20dfde['markers']['get']('revision:'+_0x1fa475['id']),_0x5d683a=_0x20dfde['markers']['get']('revision:'+_0x18fb44['id']);return _0x29445b['start']['isBefore'](_0x5d683a['start'])?-0x1:_0x29445b['start']['isAfter'](_0x5d683a['start'])?0x1:_0x29445b['end']['isBefore'](_0x5d683a['end'])?-0x1:_0x29445b['end']['isAfter'](_0x5d683a['end'])?0x1:'add'===_0x1fa475['type']?-0x1:0x1;}),{'root':_0x20dfde,'changes':_0x3510d1};function _0x362444(_0x19ca0e,_0x27581c,_0x6ad47b,_0x2f492b){const _0x9f277b=!!_0x235e98[_0x27581c][_0x19ca0e],_0x32d23a=_0x9f277b?_0x235e98[_0x27581c][_0x19ca0e]['userId']:null,_0x11cd80=_0x27581c===_0x235e98['length']-0x1,_0x323e5b=_0x330f80[_0x19ca0e][0x0],_0x17d07e=_0x395d3d['isObject'](_0x235e98[_0x27581c]['item']);!_0x4503bb[_0x19ca0e]&&_0x9f277b?_0x4503bb[_0x19ca0e]={'start':_0x6ad47b,'tapeItem':_0x235e98[_0x27581c],'userId':_0x32d23a,'type':_0x19ca0e}:_0x4503bb[_0x19ca0e]&&!_0x9f277b?(_0x4503bb[_0x19ca0e]['end']=_0x6ad47b,_0x46fdd8(_0x4503bb[_0x19ca0e]),_0x4503bb[_0x19ca0e]=null):_0x4503bb[_0x19ca0e]&&_0x9f277b&&_0x4503bb[_0x19ca0e]['userId']!==_0x32d23a&&(_0x4503bb[_0x19ca0e]['end']=_0x6ad47b,_0x323e5b&&_0x323e5b['userId']===_0x4503bb[_0x19ca0e]['userId']||_0x46fdd8(_0x4503bb[_0x19ca0e]),_0x4503bb[_0x19ca0e]={'start':_0x6ad47b,'tapeItem':_0x235e98[_0x27581c],'userId':_0x32d23a,'type':_0x19ca0e}),_0x4503bb[_0x19ca0e]&&_0x17d07e&&('elementStart'!==_0x235e98[_0x27581c]['type']||_0x323e5b&&_0x323e5b['userId']===_0x32d23a||_0x330f80[_0x19ca0e]['unshift']({'userId':_0x32d23a,'object':_0x235e98[_0x27581c]['item'],'change':_0x4503bb[_0x19ca0e]}),'elementEnd'===_0x235e98[_0x27581c]['type']&&_0x323e5b&&_0x323e5b['object']===_0x235e98[_0x27581c]['item']&&(_0x330f80[_0x19ca0e]['shift'](),_0x4503bb[_0x19ca0e]=_0x323e5b['change'])),_0x4503bb[_0x19ca0e]&&_0x11cd80&&(_0x4503bb[_0x19ca0e]['end']=_0x2f492b,_0x46fdd8(_0x4503bb[_0x19ca0e]),_0x4503bb[_0x19ca0e]=null);}function _0x46fdd8({start:_0x38ee84,end:_0x247268,tapeItem:_0x191cd5,userId:_0x219534,type:_0x4c34bf}){const _0x58bff9=_0x191cd5['item'],_0x195246=_0x1bd004['schema']['isBlock'](_0x58bff9)&&!_0x1bd004['schema']['isLimit'](_0x58bff9),_0x4b4368=_0x38ee84['nodeAfter']==_0x247268['parent']&&_0x247268['isAtStart'];if(_0x195246&&_0x4b4368)return;const _0x28bc26=_0x1bd004['createRange'](_0x38ee84,_0x247268),_0x3bd7b5=new Ot({'author':_0x24bdf7['get'](_0x219534),'type':'isAdded'==_0x4c34bf||'isAddSuggestion'==_0x4c34bf?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4c34bf||'isRemoveSuggestion'==_0x4c34bf},'createdAt':new Date(),'rootName':_0x1d7910});_0x3510d1['push'](_0x3bd7b5),_0x20dfde['markers']['set']('revision:'+_0x3bd7b5['id'],_0x28bc26);}function _0x5346dc(_0x2cb55f,_0x108c0e){const _0x14c66b=_0x2cb55f['getAttributes'](),_0x17e9c8=_0x108c0e['getAttributes']();for(const _0x1fff09 of _0x14c66b){if(_0x1fff09[0x1]!==_0x108c0e['getAttribute'](_0x1fff09[0x0]))return!0x1;_0x17e9c8['next']();}return _0x17e9c8['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x56ba0d=>{const _0x476cad=_0x56ba0d['markerName']['split'](':')[0x1],_0x43e902=this['_getChangeFromId'](_0x476cad);if(!_0x43e902)return null;const _0x331c85='add'==_0x43e902['type']?'insertion':'deletion',_0x5d825a=['ck-suggestion-marker','ck-suggestion-marker-'+_0x331c85];return _0x43e902['data']['isSuggestion']&&_0x5d825a['push']('ck-suggestion-marker-'+_0x331c85+'-new'),this['activeChange']==_0x43e902&&_0x5d825a['push']('ck-suggestion-marker--active'),{'classes':_0x5d825a,'attributes':{'data-change-id':_0x476cad}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x21dc57=>{_0x21dc57['on']('element:pre',(_0x328572,_0x3cacfa,_0x1fdfe1)=>{const _0x3bc854=_0x3cacfa['viewItem']['getChild'](0x0);if(!_0x3bc854||!_0x3bc854['is']('element','code'))return;if(!_0x1fdfe1['consumable']['consume'](_0x3bc854,{'attributes':['vid_start','vid_end']}))return;const _0x43e89d=_0x3cacfa['modelRange']['start']['nodeAfter'];_0x1fdfe1['writer']['setAttribute']('vid_start',_0x3bc854['getAttribute']('vid_start'),_0x43e89d),_0x1fdfe1['writer']['setAttribute']('vid_end',_0x3bc854['getAttribute']('vid_end'),_0x43e89d);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x356670=>{_0x356670['on']('element',(_0x3cf5ea,_0x16533e,_0x3c431b)=>{if(!_0x3c431b['consumable']['consume'](_0x16533e['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x16533e['modelRange']['isCollapsed'])return;const _0x773277=_0x16533e['modelRange']['start']['nodeAfter'];_0x773277['hasAttribute']('vid_start')||_0x773277['hasAttribute']('vid')||(_0x3c431b['writer']['setAttribute']('vid_start',_0x16533e['viewItem']['getAttribute']('vid_start'),_0x773277),_0x3c431b['writer']['setAttribute']('vid_end',_0x16533e['viewItem']['getAttribute']('vid_end'),_0x773277));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1db906=>_0x1db906['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x26d25e,[,_0xfdc9c3])=>{['vid_start','vid_end','vid']['includes'](_0xfdc9c3)&&(_0x26d25e['return']=!0x0,_0x26d25e['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1f3289=>{_0x1f3289['on']('attribute:vid',(_0x5017dc,_0x3de8e1,_0x2f02a4)=>{if('\x20'!=_0x3de8e1['item']['data']||_0x3de8e1['item']['parent']['maxOffset']>0x1)return;if(!_0x2f02a4['consumable']['consume'](_0x3de8e1['item'],_0x5017dc['name']))return;const _0x4aa388=_0x2f02a4['writer'],_0x5b034b=_0x2f02a4['mapper']['toViewRange'](_0x3de8e1['range']);_0x4aa388['wrap'](_0x5b034b,_0x4aa388['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4392ef){const _0x5ba89a=_0x4392ef['plugins']['get']('RevisionViewer');return(_0x308d9b,_0x330aa6,_0x4f3442)=>{const _0x49b10b=_0x330aa6['markerName']['split'](':')[0x1],_0x3890f3=_0x5ba89a['_getChangeFromId'](_0x49b10b);if(!_0x3890f3)return null;const _0x21155c='add'==_0x3890f3['type']?'split':'merge';if(!_0x4f3442['consumable']['test'](_0x330aa6['markerRange'],_0x308d9b['name']))return;const _0x49cea7=_0x330aa6['markerRange']['getWalker'](),_0xe7dba3=_0x330aa6['markerRange']['start'],_0x1ee543=_0x4392ef['model']['schema'];let _0x4ba166=null,_0x5b5603=null,_0x266d0a=!0x1,_0x395d8f=!0x1;for(const _0x4fa04f of _0x49cea7){const _0x29de6a=_0x4fa04f['item'];_0x266d0a=_0x266d0a||_0x1ee543['isContent'](_0x29de6a);const _0x573758=_0x4f3442['mapper']['toViewElement'](_0x29de6a);if(_0x573758&&_0x573758['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4fa04f['type']&&(_0x1ee543['isBlock'](_0x29de6a)&&!_0x1ee543['isLimit'](_0x29de6a)&&(_0x29de6a['nextSibling']||_0xe7dba3['isAtEnd']?_0x4ba166&&_0x4ba166['parent']==_0x29de6a||(_0x4ba166=_0x29de6a,_0x14c173(_0x4fa04f['previousPosition']),_0x395d8f=!0x0):_0x5b5603=_0x5b5603||_0x4fa04f['previousPosition']));}function _0x14c173(_0x5b7f7a){const _0x400ded=_0x4f3442['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x21155c}),_0x15f104=_0x4f3442['mapper']['toViewPosition'](_0x5b7f7a);_0x3890f3['data']['isSuggestion']&&_0x4f3442['writer']['addClass']('ck-suggestion-marker-'+_0x21155c+'-new',_0x400ded),_0x5ba89a['activeChange']==_0x3890f3&&_0x4f3442['writer']['addClass']('ck-suggestion-marker--active',_0x400ded),_0x4f3442['writer']['insert'](_0x15f104,_0x400ded),_0x4f3442['mapper']['bindElementToMarker'](_0x400ded,_0x330aa6['markerName']);}_0x266d0a||_0x395d8f||!_0x5b5603||_0x14c173(_0x5b5603);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x6219c4,_0x254296,_0x4e50ac)=>{const _0x58c52d=_0x4e50ac['mapper']['markerNameToElements'](_0x254296['markerName']);if(_0x58c52d){for(const _0x3f6ea8 of _0x58c52d)(_0x3f6ea8['hasClass']('ck-suggestion-marker-split')||_0x3f6ea8['hasClass']('ck-suggestion-marker-merge'))&&(_0x4e50ac['mapper']['unbindElementFromMarkerName'](_0x3f6ea8,_0x254296['markerName']),_0x4e50ac['writer']['remove'](_0x3f6ea8));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x166e6f,_0x2f423c,_0x58fd6b)=>{const _0x5372bf=_0x2f423c['markerName']['split'](':')[0x1],_0x4d9819=this['_getChangeFromId'](_0x5372bf);if(!_0x4d9819)return null;const _0x292e66='add'==_0x4d9819['type']?'split':'merge';if(_0x58fd6b['consumable']['test'](_0x2f423c['markerRange'],_0x166e6f['name']))for(const _0x5348b7 of _0x2f423c['markerRange']['getItems']()){if(!_0x5348b7['is']('element','softBreak'))continue;const _0x470777=_0x58fd6b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x292e66}),_0x13fdf9=_0x58fd6b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5348b7));_0x4d9819['data']['isSuggestion']&&_0x58fd6b['writer']['addClass']('ck-suggestion-marker-'+_0x292e66+'-new',_0x470777),this['activeChange']==_0x4d9819&&_0x58fd6b['writer']['addClass']('ck-suggestion-marker--active',_0x470777),_0x58fd6b['writer']['insert'](_0x13fdf9,_0x470777),_0x58fd6b['mapper']['bindElementToMarker'](_0x470777,_0x2f423c['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x222b1c=>{for(const _0x3a8aca of this['editor']['model']['document']['getRootNames']()){const _0x17248f=this['editor']['model']['document']['getRoot'](_0x3a8aca),_0x38d81c=this['editor']['editing']['view']['document']['getRoot'](_0x3a8aca);if(_0x38d81c){const _0x111b5d=_0x17248f['getAttribute']('revisionHistoryAttachChange');if(_0x222b1c['removeAttribute']('data-change-id',_0x38d81c),_0x222b1c['removeClass']('ck-revision-history-root-add',_0x38d81c),_0x222b1c['removeClass']('ck-revision-history-root-remove',_0x38d81c),_0x222b1c['removeClass']('ck-revision-history-root--active',_0x38d81c),_0x111b5d){const _0x2048e8=this['_getChangeFromId'](_0x111b5d);if(!_0x2048e8)return null;_0x222b1c['setAttribute']('data-change-id',_0x111b5d,_0x38d81c),_0x222b1c['addClass']('ck-revision-history-root-'+_0x2048e8['type'],_0x38d81c),this['activeChange']==_0x2048e8&&_0x222b1c['addClass']('ck-revision-history-root--active',_0x38d81c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4beda1=>'revision-comment:'+_0x4beda1,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xfcc0bb=>'revision-suggestion:'+_0xfcc0bb,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x58f1b7=>({'name':'suggestion:'+_0x58f1b7,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3c7c4d=>{const _0x496a4d=_0x3c7c4d['markerName']['split'](':')[0x1];return'insertion'!=_0x496a4d&&'deletion'!=_0x496a4d?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x496a4d]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x7eb1cc,_0xb62c97,_0x2840ab)=>{const _0x38ec3b=_0x2840ab['mapper']['markerNameToElements'](_0xb62c97['markerName']);if(_0x38ec3b){for(const _0x29b124 of _0x38ec3b)_0x29b124['is']('uiElement')&&(_0x2840ab['mapper']['unbindElementFromMarkerName'](_0x29b124,_0xb62c97['markerName']),_0x2840ab['writer']['remove'](_0x29b124));}},{'priority':'high'});}['_getChangeFromId'](_0xeed832){return this['_changeIdToChange']['get'](_0xeed832);}['_getViewForChange'](_0x22ac4d){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x22ac4d),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x34b388,_0x4e05d5,_0x3b8178,_0x45cba7)=>{_0x45cba7&&this['_balloon']['remove'](_0x45cba7),_0x3b8178&&(this['_balloon']['add']({'view':_0x3b8178,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2fdf4a=this['editor']['editing'],_0x585008=this['_getChangeFromId'](_0x3b8178['changeId']);let _0x16d000;if(_0x585008['data']['isOnRoot']){const _0x3a6489=_0x2fdf4a['view']['getDomRoot'](_0x585008['rootName']);_0x16d000=Array['from'](_0x3a6489['getClientRects']());}else{const _0x228b4e=this['editor']['model']['markers']['get']('revision:'+_0x3b8178['changeId']);_0x16d000=Array['from'](_0x2fdf4a['mapper']['markerNameToElements'](_0x228b4e['name']))['map'](_0xcd6806=>_0x2fdf4a['view']['domConverter']['mapViewToDom'](_0xcd6806))['map'](_0x261ff1=>Array['from'](_0x261ff1['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x16d000['find'](_0x3174e2=>_0x3174e2['top']-0x3<=this['_activeViewTarget']['y']&&_0x3174e2['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3174e2['left']-0x3<=this['_activeViewTarget']['x']&&_0x3174e2['right']+0x3>=this['_activeViewTarget']['x'])||_0x16d000[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5e1c23,_0xca5751,_0xfee0e,_0x5993f2)=>{this['activeView']=_0xfee0e?this['_getViewForChange'](_0xfee0e):null,this['editor']['model']['change'](()=>{const _0xe19ec6=this['editor']['editing'];_0x5993f2&&(_0x5993f2['data']['isOnRoot']?_0xe19ec6['view']['change'](_0x269ebe=>{_0x269ebe['removeClass']('ck-revision-history-root--active',_0xe19ec6['view']['document']['getRoot'](_0x5993f2['rootName']));}):_0xe19ec6['reconvertMarker']('revision:'+_0x5993f2['id'])),_0xfee0e&&(_0xfee0e['data']['isOnRoot']?_0xe19ec6['view']['change'](_0x177024=>{_0x177024['addClass']('ck-revision-history-root--active',_0xe19ec6['view']['document']['getRoot'](_0xfee0e['rootName']));}):_0xe19ec6['reconvertMarker']('revision:'+_0xfee0e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3105d7,_0x101508)=>{if(this['activeChange'])return;const _0x57cc39=this['_findChangeIdFromDomTarget'](_0x101508['target']),_0x190715=this['_changeIdToChange']['get'](_0x57cc39);_0x190715?(this['_activeViewTarget']={'x':_0x101508['domEvent']['x'],'y':_0x101508['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x190715)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0xa435d,_0x126d0b)=>{const _0x87b971=this['_findChangeIdFromDomTarget'](_0x126d0b['target']),_0xff3503=this['_changeIdToChange']['get'](_0x87b971);_0xff3503?(this['_activeViewTarget']={'x':_0x126d0b['domEvent']['x'],'y':_0x126d0b['domEvent']['y']},_0xff3503===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0xff3503):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xc33017){do{const _0x36e027=_0xc33017['getAttribute']('data-change-id');if(_0x36e027)return _0x36e027;_0xc33017=_0xc33017['parent'];}while(_0xc33017);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1ed35d=>{for(const _0x1d0cc4 of this['editor']['model']['markers'])_0x1ed35d['removeMarker'](_0x1d0cc4);});}};function Vt(_0x4af6f1,_0x44a006){return(_0x2afd93,_0x5d91f5,_0x3d47bb)=>{if(!_0x3d47bb['consumable']['test'](_0x5d91f5['markerRange'],_0x2afd93['name']))return;const _0x576771=_0x5d91f5['markerRange']['getWalker'](),_0x5e2b73=_0x5d91f5['markerRange']['start'],_0x14fdd7=_0x4af6f1['model']['schema'];let _0x5f0a01=null,_0x14e350=null,_0x1f83da=!0x1,_0x124b24=!0x1;for(const _0x764634 of _0x576771){const _0x218488=_0x764634['item'];_0x1f83da=_0x1f83da||_0x14fdd7['isContent'](_0x218488);const _0x5355fa=_0x3d47bb['mapper']['toViewElement'](_0x218488);if(_0x5355fa&&_0x5355fa['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x764634['type']&&(_0x14fdd7['isBlock'](_0x218488)&&!_0x14fdd7['isLimit'](_0x218488)&&(_0x218488['nextSibling']||_0x5e2b73['isAtEnd']?_0x5f0a01&&_0x5f0a01['parent']==_0x218488||(_0x5f0a01=_0x218488,_0x266ece(_0x764634['previousPosition']),_0x124b24=!0x0):_0x14e350=_0x14e350||_0x764634['previousPosition']));}function _0x266ece(_0x2b1a4d){const _0x37b96e=_0x3d47bb['mapper']['toViewPosition'](_0x2b1a4d),_0x43e50b=_0x3d47bb['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x44a006});_0x3d47bb['writer']['insert'](_0x37b96e,_0x43e50b),_0x3d47bb['mapper']['bindElementToMarker'](_0x43e50b,_0x5d91f5['markerName']);}_0x1f83da||_0x124b24||!_0x14e350||_0x266ece(_0x14e350);};}var Dt=class extends _0x2702e2{constructor(_0x4118e6){super(_0x4118e6);const _0x2c9d3a=_0x4118e6['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x2c9d3a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2c9d3a,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4ad630=this['editor'],_0x412068=_0x4ad630['plugins']['get'](Mt),_0xbcd263=_0x412068['isReady']?_0x412068['diff']['newRevisionId']:null;_0x4ad630['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xbcd263);}['refresh'](){const {isReady:_0x3bc113,isEnabled:_0x1df16c,repository:_0x4bf337,diff:_0x2be20d}=this['editor']['plugins']['get'](Mt),_0x51e638=_0x2be20d&&_0x4bf337['getLaterVisibleRevision'](_0x2be20d['newRevisionId']);this['isEnabled']=_0x3bc113&&_0x1df16c&&Boolean(_0x51e638);}},Tt=class extends _0x2702e2{['_step'];constructor(_0x1cb93f,{direction:_0x51490f}){super(_0x1cb93f);const _0x3691f1=_0x1cb93f['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x51490f?0x1:-0x1,this['listenTo'](_0x3691f1,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3691f1,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3691f1,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x5c5c10=this['editor'],_0xf76632=_0x5c5c10['plugins']['get'](Mt),{isNavigationMode:_0x4ecfcd,currentChangeNumber:_0x54d716}=_0xf76632;let _0x352b6d;if(_0xf76632['activeChange']=_0x4ecfcd?_0xf76632['diff']['changes']['get'](_0x54d716+this['_step']):_0xf76632['diff']['changes']['first'],_0xf76632['activeChange']['data']['isOnRoot'])_0x352b6d=_0x5c5c10['editing']['view']['getDomRoot'](_0xf76632['activeChange']['rootName']);else{const _0xdf0a0=_0x5c5c10['model']['markers']['get']('revision:'+_0xf76632['activeChange']['id']);_0x352b6d=_0x293709(_0x5c5c10['editing'],_0xdf0a0);}_0x269e7a({'target':_0x352b6d,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x1c8390,currentChangeNumber:_0x4d8c4a,numberOfChanges:_0x4902a1,isReady:_0x224d16,isEnabled:_0x5d2aa2}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x5d2aa2&&_0x224d16&&_0x4902a1)&&(!_0x1c8390||(0x1===this['_step']?_0x4d8c4a<_0x4902a1-0x1:_0x4d8c4a>0x0));}},Ht=class extends at{constructor(_0x4774b8){super(_0x4774b8);const _0x2c6e4b=this['bindTemplate'],_0x377a05=new _0x178003(_0x4774b8),_0x5e1dc4=new _0x178003(_0x4774b8);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0x49ee98,_0x32a0ad)=>_0x49ee98&&_0x32a0ad>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3956d3,_0x4c9a93,_0x11b04c,_0x337544)=>{if(!_0x3956d3)return pt(_0x4774b8,'Loading...');if(!_0x11b04c)return pt(_0x4774b8,'No\x20changes');const _0x278e9b=pt(_0x4774b8,'NUMBER_OF_CHANGES',_0x11b04c);return _0x337544?pt(_0x4774b8,'X_OF_Y_CHANGES',[_0x4c9a93+0x1,_0x11b04c]):_0x278e9b;}),_0x377a05['set']({'label':pt(_0x4774b8,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1ce83c}),_0x5e1dc4['set']({'label':pt(_0x4774b8,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x420769}),_0x377a05['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5e1dc4['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x377a05['on']('execute',()=>this['fire']('execute','backward')),_0x5e1dc4['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x2c6e4b['if']('_isStatusLabelVisible','ck-hidden',_0x14e5e0=>!_0x14e5e0)]},'children':[{'text':_0x2c6e4b['to']('isNavigationMode',_0x3c9522=>_0x3c9522?pt(_0x4774b8,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x4774b8,'Total')+':\x20')}]},{'text':_0x2c6e4b['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x377a05,_0x5e1dc4]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x73140e{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x3909d4=this['editor']['editing']['view'];_0x3909d4['change'](_0x132097=>{for(const _0xc805d4 of _0x3909d4['document']['roots'])_0x132097['addClass'](Pt,_0xc805d4);});}['hide'](){const _0x13f6d6=this['editor']['editing']['view'];_0x13f6d6['change'](_0x5837fe=>{for(const _0x12bbdf of _0x13f6d6['document']['roots'])_0x5837fe['removeClass'](Pt,_0x12bbdf);});}},Lt=class extends _0x73140e{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x2b3f5a=this['editor'],_0x3258a3=_0x2b3f5a['plugins']['get'](Mt),_0x144559=_0x2b3f5a['plugins']['get'](Ut);_0x2b3f5a['ui']['componentFactory']['add']('exitToEditing',_0x359274=>{const _0x2ec463=new _0x178003(_0x359274);return _0x2ec463['set']({'label':pt(_0x359274,'Back\x20to\x20editing'),'icon':_0x4781ac,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2ec463,'execute',()=>{_0x2b3f5a['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2ec463;}),_0x2b3f5a['ui']['componentFactory']['add']('restoreRevision',_0x3beb17=>{const _0x32c672=new _0x178003(_0x3beb17);return _0x32c672['set']({'label':pt(_0x3beb17,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x32c672['bind']('isEnabled')['to'](_0x2b3f5a['commands']['get']('restoreRevision')),this['listenTo'](_0x32c672,'execute',()=>_0x2b3f5a['execute']('restoreRevision')),_0x32c672;}),_0x2b3f5a['ui']['componentFactory']['add']('changesNavigation',_0x56989f=>{const _0x28caff=new Ht(_0x56989f),_0x348979=_0x2b3f5a['commands']['get']('showPreviousChange'),_0x214c11=_0x2b3f5a['commands']['get']('showNextChange');return _0x28caff['bind']('isBackwardNavigationEnabled')['to'](_0x348979,'isEnabled'),_0x28caff['bind']('isForwardNavigationEnabled')['to'](_0x214c11,'isEnabled'),_0x28caff['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3258a3),this['listenTo'](_0x28caff,'execute',(_0x1b12c6,_0x34965b)=>{_0x2b3f5a['execute']('forward'===_0x34965b?'showNextChange':'showPreviousChange');}),_0x28caff;}),_0x144559['show'](),_0x3258a3['on']('change:isReady',(_0x1f0cb5,_0x13f1c1,_0x106c9a)=>{_0x106c9a?_0x144559['hide']():_0x144559['show']();});}},Ft=class extends _0x469ef1{['_resizeObserver']=null;constructor(_0x375796,_0x1edb31){super(_0x375796,_0x1edb31);const _0x395598=this['bindTemplate'];this['set']({'label':pt(_0x375796,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x375796,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x395598['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x5490e3(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4a6526=this['fieldView']['element'];this['_tooltipString']=_0x4a6526['scrollWidth']>_0x4a6526['clientWidth']&&_0x4a6526['value']||'';}},$t=class extends at{constructor(_0x151aac,_0x32b294,_0x65ed39){super(_0x151aac);const _0x46af59=new _0x3cc9fe();_0x46af59['set']({'content':_0x38a6c8,'viewBox':'0\x200\x2011\x2010'});const _0xf38bec=['ck','ck-revision-history-sidebar__revision-author'];_0x65ed39&&_0xf38bec['push']('ck-revision-history-sidebar__revision-author_creator');const _0x140f1c=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x151aac,_0x65ed39?'Revision\x20creator':'Revision\x20author')},'children':[_0x46af59,_0x32b294['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xf38bec},'children':_0x140f1c});}};function jt(_0x2d1782,_0x551a59){const _0x36791c=_0x2d1782['bindTemplate'],_0x394f44=_0x2d1782['locale'],_0x56beef=ct(_0x394f44);_0x56beef['panelPosition']='sw';const _0x52f380=function(_0x1e60a7,_0x49e395){const _0x46c982=function(_0x320dae,_0x2ec03d){const _0x39f307=_0x320dae['locale'],_0x342c89={'Compare\x20against\x20selected':pt(_0x39f307,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x39f307,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x39f307,'Restore\x20this\x20revision')};return _0x2ec03d['map'](_0x1daabc=>{const _0x1a1840=_0x342c89[_0x1daabc['name']];return _0x1a1840&&_0x1a1840!==_0x1daabc['name']&&(_0x1daabc['name']=_0x1a1840),_0x1daabc;});}(_0x1e60a7,_0x49e395),_0x38d42f=new _0x453cd2();for(const _0x2babc6 of _0x46c982){const _0x476968={'type':'button','model':new rt({'label':_0x2babc6['name'],'class':_0x2babc6['class'],'withText':!0x0,'role':'menuitem','_action':_0x2babc6['action']})};_0x476968['model']['bind']('isEnabled')['to'](_0x1e60a7,'isActionsDropdownOpen',_0x2f5e91=>'function'!=typeof _0x2babc6['isEnabled']||(!_0x2f5e91||_0x2babc6['isEnabled'](_0x1e60a7))),_0x38d42f['add'](_0x476968);}return _0x38d42f;}(_0x2d1782,_0x551a59);return _0x2d1782['bind']('isActionsDropdownOpen')['to'](_0x56beef,'isOpen'),_0x56beef['buttonView']['set']({'label':pt(_0x394f44,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1cdb41}),_0x56beef['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x36791c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x36791c['to'](_0x498f8a=>_0x498f8a['stopPropagation']())}}),_0x56beef['on']('execute',_0x51402b=>{_0x2d1782['isReady']&&'function'==typeof _0x51402b['source']['_action']&&_0x51402b['source']['_action'](_0x2d1782);}),ht(_0x56beef,_0x52f380,{'role':'menu'}),_0x56beef['listenTo'](_0x2d1782,'change:isActionsDropdownOpen',(_0x443316,_0x55f6b7,_0x15d029)=>{if(_0x15d029)for(const _0x38d07c of _0x56beef['listView']['items']){const _0x2f3dbf=_0x38d07c['children']['first'],_0x264e9e=_0x551a59['find'](_0x4bc16e=>_0x4bc16e['action']===_0x2f3dbf['_action'])['isVisible'];_0x38d07c['isVisible']=void 0x0===_0x264e9e||_0x264e9e(_0x2d1782);}}),_0x56beef;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x55aae2(at);var Kt=class extends Bt{['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x4db4de,_0x3cea79,_0x982a3f,_0x100e7a){super(_0x4db4de);const _0x5eb72b=this['bindTemplate'],_0x1fdfd5=function(_0x15ec8a,_0x4a1fff){const _0x13c772=Array['from'](_0x4a1fff['authors'])['filter'](_0x424b5a=>_0x424b5a!=_0x4a1fff['creator']);return _0x4a1fff['creator']&&_0x13c772['unshift'](_0x4a1fff['creator']),_0x13c772['map'](_0x34c883=>new $t(_0x15ec8a,_0x34c883,_0x34c883==_0x4a1fff['creator']));}(_0x4db4de,_0x3cea79);this['id']=_0x3cea79['id'],this['_revision']=_0x3cea79,this['_requireRevisionName']=_0x100e7a,this['bind']('name','createdAt')['to'](_0x3cea79),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x40c39f=>{return _0x5df443=_0x4db4de['uiLanguage'],(_0x5b7872=_0x40c39f)['toLocaleDateString'](_0x5df443,{'month':'long','day':'numeric'})+',\x20'+_0x5b7872['toLocaleTimeString'](_0x5df443,{'hour':'numeric','minute':'numeric'});var _0x5df443,_0x5b7872;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x4db4de,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x5c31ba=>_0x5c31ba||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x28e9b5,_0x1be101)=>_0x28e9b5&&_0x1be101),this['revisionActionsView']=_0x982a3f&&_0x982a3f['length']?jt(this,_0x982a3f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x5eb72b['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x5eb72b['if']('isEnabled','ck-disabled',_0x26393e=>!_0x26393e),_0x5eb72b['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x5eb72b['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x5eb72b['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x5eb72b['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x1fdfd5}]},this['revisionActionsView']],'on':{'click':_0x5eb72b['to'](_0xef86a3=>{_0xef86a3['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x32de54=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x32de54,'change',()=>{this['_requireRevisionName']&&!_0x32de54['value']||this['fire']('setName',{'id':this['id'],'name':_0x32de54['value']}),_0x32de54['value']||(_0x32de54['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}};function qt(_0x2c007e,_0x260ceb){const _0x4fc9ac=ft['fromJSDate'](_0x2c007e)['setLocale'](_0x260ceb),_0x492a1c=ft['local'](),_0x907e9c=_0x492a1c['minus']({'days':0x1})['startOf']('day');let _0x5b68df,_0x10e855;return _0x4fc9ac['hasSame'](_0x492a1c,'day')?(_0x5b68df=_0x4fc9ac['startOf']('day')['toJSDate'](),_0x10e855=_0x4fc9ac['toRelativeCalendar']()):_0x4fc9ac['hasSame'](_0x907e9c,'day')?(_0x5b68df=_0x907e9c['toJSDate'](),_0x10e855=_0x4fc9ac['toRelativeCalendar']()):_0x4fc9ac['hasSame'](_0x492a1c,'week')?(_0x5b68df=_0x4fc9ac['startOf']('week')['toJSDate'](),_0x10e855=_0x4fc9ac['weekdayLong']||''):_0x4fc9ac['hasSame'](_0x492a1c,'year')?(_0x5b68df=_0x4fc9ac['startOf']('month')['toJSDate'](),_0x10e855=_0x4fc9ac['monthLong']||''):(_0x5b68df=_0x4fc9ac['startOf']('year')['toJSDate'](),_0x10e855=String(_0x4fc9ac['year'])),{'startDate':_0x5b68df,'localizedPeriodName':_0x10e855};}var Gt=class extends at{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x452167,_0x12aabf,_0x5b87ea,_0x220e88){super(_0x452167);const _0x80f2e6=qt(_0x12aabf,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x12aabf,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x5b87ea,this['_requireRevisionName']=_0x220e88,this['revisionViews']['delegate']('select')['to'](this),this['revisionViews']['delegate']('setName')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period']},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__label']},'children':[{'text':_0x80f2e6}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1803a0){const _0x1c5bd2=new Kt(this['locale'],_0x1803a0,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1c5bd2);}['removeRevision'](_0xef4626){const _0x223f50=this['revisionViews']['find'](_0x332216=>_0x332216['id']===_0xef4626['id']);this['revisionViews']['remove'](_0x223f50);}},Jt=class extends at{constructor(_0x4a3fcf){super(_0x4a3fcf);const _0x337adc=new _0x3cc9fe();_0x337adc['content']=_0x52e288,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x337adc,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x4a3fcf,'Revision\x20history')]}]});}},Wt=class extends at{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x52519f,_0x14c502,_0x44188a,_0x3f37d0){super(_0x52519f);const _0x41603c=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x14c502,this['_revisionActions']=_0x44188a,this['_requireRevisionName']=_0x3f37d0,this['on']('select',(_0x1fc828,_0x1fa83c)=>{this['fire']('revisionSelected',_0x1fa83c);}),this['on']('setName',(_0x255dec,_0x53075d)=>{this['fire']('revisionSetName',_0x53075d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x52519f),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x41603c['if']('isEnabled','ck-disabled',_0x2de54b=>!_0x2de54b)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3de58c of this['_revisions'])this['_addRevision'](_0x3de58c);this['_revisions']['on']('add',(_0x241d50,_0xcdca8)=>{this['_addRevision'](_0xcdca8);}),this['_revisions']['on']('remove',(_0x585d2c,_0x2e894a)=>{this['_removeRevision'](_0x2e894a);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x34db78=>_0x34db78['revisionViews']['map'](_0x1d845c=>_0x1d845c))['flat']();}['selectRevision'](_0x89bd82){for(const _0x41524b of this['revisionViews'])_0x89bd82&&_0x89bd82['id']===_0x41524b['id']?_0x41524b['select']():_0x41524b['deselect']();}['highlightRevisions'](_0x5aba23){for(const _0x52a5e2 of this['revisionViews'])_0x5aba23['some'](({id:_0xc934fa})=>_0xc934fa===_0x52a5e2['id'])?_0x52a5e2['highlight']():_0x52a5e2['unhighlight']();}['_addRevision'](_0x29a1bf){const _0x429c84=qt(_0x29a1bf['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1aafeb=this['_getTimePeriodViewByStartDate'](_0x429c84);_0x1aafeb||(_0x1aafeb=new Gt(this['locale'],_0x429c84,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x1aafeb)),_0x1aafeb['addRevision'](_0x29a1bf);}['_removeRevision'](_0x3154a3){const _0x5be586=qt(_0x3154a3['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x5be586)['removeRevision'](_0x3154a3);}['_getTimePeriodViewByStartDate'](_0xfc1458){return this['timePeriodViews']['find'](_0x279396=>_0x279396['startDate']['getTime']()===_0xfc1458['getTime']());}},Yt=class RevisionsSidebar extends _0x73140e{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt];}constructor(
|
|
30
|
-
_0x423f55(_0x1eb09f);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x26aff3,_0x3bfeea){super(_0x3bfeea),this['sourceElement']=_0x26aff3,this['model']['document']['createRoot']();const _0x233f9e=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x233f9e);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x460074,_0x12b6a8){const _0x4e2577=new this(_0x460074,_0x12b6a8);return await _0x4e2577['initPlugins'](),await _0x4e2577['ui']['init'](_0x460074),await _0x4e2577['data']['init'](_0x4e2577['config']['get']('initialData')||''),_0x4e2577['fire']('ready'),_0x4e2577;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x1dd727{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2fd2f1){super(_0x2fd2f1),this['result']='end',_0x2fd2f1['editing']['view']['_overlayModeHint']='auto',_0x2fd2f1['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x1dd727{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x5d6c00){if(super(_0x5d6c00),!this['editor']['config']['get']('revisionHistory'))throw new _0x24439b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x34570c=>this['_showRevisionViewer']({..._0x34570c,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x512be9=>this['_closeRevisionViewer'](_0x512be9)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x5d4115=>this['_restoreRevision'](_0x5d4115)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x340d9a){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x340d9a;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3eeeeb){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3eeeeb);}['getRevision'](_0x58a325){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x58a325);}['getRevisions'](_0x3a113){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3a113||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x27b717=this['editor'],_0x4236c5=_0x1738dd(_0x27b717,ii),_0xf0b0bf=_0x27b717['plugins']['get']('RevisionTracker'),_0x405f6b=_0x27b717['plugins']['get'](_0x1eaf94)['users'];return _0x4236c5['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4236c5['lazyRoots'],(_0x4236c5['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x1dd727{static get['requires'](){return[Mt,_0x1eaf94];}['init'](){const _0x10f06a=this['editor']['plugins']['get'](_0x1eaf94);for(const _0x16f9f0 of _0x405f6b)_0x16f9f0['isAnonymous']||_0x10f06a['getUser'](_0x16f9f0['id'])||_0x10f06a['addUser'](_0x16f9f0);const _0x2d1615=_0xf0b0bf['repository']['getRevisions']();let _0x41f2a7=null;const _0x32dc33=this['editor']['plugins']['get']('RevisionViewer');_0x32dc33['adapter']=_0xf0b0bf['adapter'],_0x32dc33['bind']('isEnabled')['to'](_0xf0b0bf),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x27b717,'isReadOnly',_0x5c76f1=>!_0x5c76f1);for(const _0x10926d of _0x2d1615){const _0x1963f7=null===_0x10926d['creator'];if(_0x1963f7&&_0x10926d['toVersion']===_0x10926d['fromVersion'])continue;const _0x46138e=_0x10926d['toJSON']();_0x32dc33['addRevisionData'](_0x46138e,(_0xee6d8e,_0x75c456,_0x25bc28)=>{if(_0x1963f7){if(_0x41f2a7)_0x41f2a7['_update'](_0xee6d8e,_0x75c456);else{if(!_0x75c456){const _0x318bae=_0x25bc28['toJSON']();_0x318bae['id']=_0x574201(),_0xf0b0bf['saveRevision'](_0x318bae,_0x25bc28['toVersion'])['then'](_0x4c8ced=>{_0x41f2a7=_0x4c8ced;});}}}else _0x10926d['_update'](_0xee6d8e,_0x75c456);});}}},Yt),_0x4236c5);}['_enhanceShowRevisionViewerCallback'](){const _0x5bc215=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x33ebd5=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x33ebd5['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x254ff7=this['editor']['plugins']['get']('Dialog');_0x254ff7['isOpen']&&_0x254ff7['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x4cb370=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x375de5 of _0x4cb370)_0x375de5['class']=_0x375de5['class']?_0x375de5['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x3935f0=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3935f0&&_0x3935f0['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1b8949=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1b8949&&_0x1b8949['setAttribute']('tabindex','-1');}}return _0x5bc215(this['_getRevisionViewerEditorConfig']())['then'](_0x202eab=>(this['_viewerEditor']=_0x202eab,this['editor']['plugins']['has']('Annotations')&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x202eab))['catch'](_0x596d46=>(console['error'](_0x596d46),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x235e22=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x479821=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1a8f84 of _0x479821)_0x1a8f84['class']='ck-tab-panel_disabled'===_0x1a8f84['class']?'':_0x1a8f84['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5e7788=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5e7788&&_0x5e7788['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x2b13dd=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x2b13dd&&_0x2b13dd['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x235e22(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2352ad=this['editor']['plugins']['get']('Annotations');_0x2352ad['refreshVisibility'](),_0x2352ad['refreshPositioning']();}});});}['_showRevisionViewer'](_0x24a271){const _0x273cac=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4b2097=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4238eb=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x4238eb,_0x24a271)['then'](_0xe5de72=>(_0x4b2097['style']['display']='block',_0x273cac['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0xe5de72));}['_closeRevisionViewer'](_0x151a5d){const _0x559ad7=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x559ad7['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x151a5d['destroy']();}async['_restoreRevision'](_0x30c05e){const _0x3b9d89=this['editor'],_0x5d5200=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x430bcd=_0x3b9d89['plugins']['get']('RevisionTracker'),_0x4fb7e3=_0x3b9d89['plugins']['get']('RevisionHistoryUtils'),_0x16a14e=_0x5d5200['repository']['getRevision'](_0x30c05e);let _0xf8169c,_0x55b269,_0xc0a114;try{await _0x4fb7e3['loadRevisionData'](_0x16a14e,this['adapter']),_0xf8169c=_0x4fb7e3['getRevisionDocumentData'](_0x16a14e),_0x55b269=_0x4fb7e3['getRevisionRootsAttributes'](_0x16a14e);}catch(_0x300602){return void console['error'](_0x300602);}_0x3b9d89['model']['change'](_0x5b2394=>{for(const _0x2c7839 of Array['from'](_0x3b9d89['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5b2394['removeMarker'](_0x2c7839);}),_0x5d5200['isReady']=!0x1,_0x3b9d89['model']['enqueueChange'](_0x554a5a=>{_0x554a5a['setSelection'](null),_0x554a5a['removeSelectionAttribute'](_0x3b9d89['model']['document']['selection']['getAttributeKeys']());const _0x1f7c0b=Object['keys'](_0xf8169c);for(const _0xc4c1ba of _0x3b9d89['model']['document']['roots'])'$graveyard'!=_0xc4c1ba['rootName']&&_0xc4c1ba['isAttached']()&&!_0x1f7c0b['includes'](_0xc4c1ba['rootName'])&&_0x554a5a['detachRoot'](_0xc4c1ba);for(const _0x1cbd51 of _0x1f7c0b){let _0x1f5455=_0x3b9d89['model']['document']['getRoot'](_0x1cbd51);if(!_0x1f5455||!_0x1f5455['isAttached']()){const _0x78a77a=_0x16a14e['diffData']?.[_0x1cbd51]?.['rootElementName']||'$root';_0x1f5455=_0x554a5a['addRoot'](_0x1cbd51,_0x78a77a);}const _0x2e7347=_0x55b269[_0x1cbd51],_0x4ce51a=Object['keys'](_0x2e7347),_0x34a5ad=_0xf8169c[_0x1cbd51];for(const _0x1222f0 of _0x1f5455['getAttributeKeys']())_0x4ce51a['includes'](_0x1222f0)||_0x554a5a['removeAttribute'](_0x1222f0,_0x1f5455);for(const _0x4dff0d of _0x4ce51a)_0x554a5a['setAttribute'](_0x4dff0d,_0x55b269[_0x1cbd51][_0x4dff0d],_0x1f5455);_0x554a5a['remove'](_0x554a5a['createRangeIn'](_0x1f5455)),_0x554a5a['insert'](_0x3b9d89['data']['parse'](_0x34a5ad,_0x1f5455),_0x1f5455,0x0);}});const _0xcde624=pt(_0x3b9d89['locale'],'Restored');if(_0x16a14e['name'])_0xc0a114=-0x1==_0x16a14e['name']['indexOf'](_0xcde624)?_0xcde624+':\x20'+_0x16a14e['name']:_0x16a14e['name'];else _0xc0a114=_0xcde624+':\x20'+(_0x16a14e['createdAt']['toLocaleDateString'](_0x3b9d89['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x16a14e['createdAt']['toLocaleTimeString'](_0x3b9d89['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x430bcd['saveRevision']({'name':_0xc0a114}),_0x5d5200['isReady']=!0x0,_0x3b9d89['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
|
|
29
|
+
Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt];}constructor(_0x48f707){super(_0x48f707),this['_revisionViewer']=_0x48f707['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2bd80e=this['_revisionsRepository']['_revisions'],_0x137df6=this['_createRevisionActions'](),_0x269e0b=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x2bd80e,_0x137df6,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x2b90f3,_0x337661)=>{_0x337661['revisionViews']['on']('add',(_0x46ede3,_0x429c3f)=>{_0x429c3f['bind']('isEnabled','isReady')['to'](this['_revisionViewer']);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor']['data'],'ready',this['_handleEditorDataReady']['bind'](this)),this['listenTo'](this['_revisionViewer'],'change:diff',this['_handleDiffChange']['bind'](this)),_0x269e0b['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x51baf0=this['_revisionsRepository']['getRevision'](0x0);if(_0x51baf0){const _0xce3938=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x51baf0['id']);this['_revisionViewer']['compare'](_0x51baf0,_0xce3938);}}['_handleRevisionSelected'](_0x56f614,_0x1a3a1c){const _0x5975ec=this['_revisionsRepository']['getRevision'](_0x1a3a1c['id']),_0x33efe1=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5975ec['id']);this['_revisionViewer']['compare'](_0x5975ec,_0x33efe1);}['_handleRevisionSetName'](_0x7c78f4,_0x32943e){this['_revisionsRepository']['getRevision'](_0x32943e['id'])['setName'](_0x32943e['name']);}['_handleDiffChange'](_0x2dea53,_0x3b5eda,_0x3fef6){const _0x36e8ee=this['_revisionsRepository']['getRevisionsInDiff'](_0x3fef6);_0x36e8ee['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x36e8ee),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x36e8ee[0x0]));}['_createRevisionActions'](){const _0xf2224d=this['editor'],_0x39c6f4=RevisionsSidebar['availableRevisionActions'],_0x153eb4=_0xf2224d['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x153eb4['length'])return _0x153eb4['map'](_0x305bf9=>{const _0x32c9bf='string'==typeof _0x305bf9?Object['assign']({},_0x39c6f4[_0x305bf9]):_0x305bf9;return _0x32c9bf['action']=_0x32c9bf['action']['bind'](this,_0xf2224d),_0x32c9bf['isVisible']&&(_0x32c9bf['isVisible']=_0x32c9bf['isVisible']['bind'](this,_0xf2224d)),_0x32c9bf;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4086ed},_0x44d0d1)=>{const _0x32fe1a=_0x4086ed['get'](Mt),_0x18be72=_0x32fe1a['repository'];let _0x55c384=_0x32fe1a['diff']['newRevisionId'],_0x3a130c=_0x44d0d1['id'];_0x18be72['getIndex'](_0x55c384)>_0x18be72['getIndex'](_0x3a130c)&&([_0x55c384,_0x3a130c]=[_0x3a130c,_0x55c384]),_0x32fe1a['compare'](_0x55c384,_0x3a130c);},'isVisible':({plugins:_0x5a23ab},_0x5e814a)=>{const _0x201fb4=_0x5a23ab['get'](Mt);return!(_0x201fb4['repository']['getRevisionsInDiff'](_0x201fb4['diff'])['length']>0x2)&&!_0x5e814a['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x69349a,{id:_0x315a8c})=>{_0x69349a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x315a8c);},'isVisible':({plugins:_0x2ea78d},_0x554981)=>!!_0x2ea78d['get'](Mt)['repository']['getLaterVisibleRevision'](_0x554981['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x563110},{id:_0x5117b5,revisionNameView:_0x269a9c})=>{const _0x3f5c71=_0x563110['get'](Mt),_0x123e64=_0x3f5c71['repository']['getEarlierVisibleRevision'](_0x5117b5);_0x3f5c71['compare'](_0x5117b5,_0x123e64),_0x269a9c['focus'](),_0x269a9c['fieldView']['select']();}}};}var Qt=class extends _0x5ad29c{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x11d6e6,_0x1c10d6){super(_0x11d6e6),this['_view']=_0x1c10d6,this['_toolbarConfig']=ut(_0x11d6e6['config']['get']('toolbar')),this['_elementReplacer']=new _0x3440e3();}get['element'](){return this['view']['element'];}['init'](_0x5dea42){const _0x5a9d9a=this['editor'],_0x13c592=this['view'],_0xeeb7e8=_0x5a9d9a['editing']['view'],_0x3f645c=_0x13c592['editable'];_0x3f645c['name']=_0xeeb7e8['document']['getRoot']()['rootName'],_0x13c592['render']();const _0x3e9e71=_0x3f645c['element'];this['setEditableElement'](_0x3f645c['name'],_0x3e9e71),_0x13c592['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xeeb7e8['attachDomRoot'](_0x3e9e71),this['_elementReplacer']['replace'](_0x5dea42,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x900272=this['view'],_0x5b46f9=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5b46f9['detachDomRoot'](_0x900272['editable']['name']),_0x900272['destroy']();}['_initToolbar'](){const _0x83c1c1=this['view'];_0x83c1c1['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x83c1c1['stickyPanel']['limiterElement']=_0x83c1c1['element'],_0x83c1c1['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xfd81b})=>_0xfd81b),_0x83c1c1['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x83c1c1['toolbar']);}},zt=class extends _0x3b7457{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x41a31f,_0x5251fe,_0x3181c3={}){super(_0x41a31f),this['stickyPanel']=new st(_0x41a31f),this['toolbar']=new ot(_0x41a31f,{'shouldGroupWhenFull':_0x3181c3['shouldToolbarGroupWhenFull']}),this['_editable']=new _0xe50b03(_0x41a31f,_0x5251fe);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x15a34e(_0x36c4f1);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2820be,_0x43a6a7){super(_0x43a6a7),this['sourceElement']=_0x2820be,this['model']['document']['createRoot']();const _0x36f2b7=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x36f2b7);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x54b298,_0x8502da){const _0x1662fb=new this(_0x54b298,_0x8502da);return await _0x1662fb['initPlugins'](),await _0x1662fb['ui']['init'](_0x54b298),await _0x1662fb['data']['init'](_0x1662fb['config']['get']('initialData')||''),_0x1662fb['fire']('ready'),_0x1662fb;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x73140e{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x25cb56){super(_0x25cb56),this['result']='end',_0x25cb56['editing']['view']['_overlayModeHint']='auto',_0x25cb56['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x73140e{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x4d1562){if(super(_0x4d1562),!this['editor']['config']['get']('revisionHistory'))throw new _0x135cf0('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4c8bb=>this['_showRevisionViewer']({..._0x4c8bb,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x102af9=>this['_closeRevisionViewer'](_0x102af9)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x43c1dd=>this['_restoreRevision'](_0x43c1dd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x394c3a){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x394c3a;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3ee8cb){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3ee8cb);}['getRevision'](_0x257c69){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x257c69);}['getRevisions'](_0x14f4b9){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x14f4b9||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x1acb8c=this['editor'],_0x90f88c=_0x583072(_0x1acb8c,ii),_0x44ee06=_0x1acb8c['plugins']['get']('RevisionTracker'),_0x440412=_0x1acb8c['plugins']['get'](_0x1a8e81)['users'];return _0x90f88c['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x90f88c['lazyRoots'],(_0x90f88c['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x73140e{static get['requires'](){return[Mt,_0x1a8e81];}['init'](){const _0x463559=this['editor']['plugins']['get'](_0x1a8e81);for(const _0x372ef6 of _0x440412)_0x372ef6['isAnonymous']||_0x463559['getUser'](_0x372ef6['id'])||_0x463559['addUser'](_0x372ef6);const _0x14d39a=_0x44ee06['repository']['getRevisions']();let _0x34f745=null;const _0x1bdac2=this['editor']['plugins']['get']('RevisionViewer');_0x1bdac2['adapter']=_0x44ee06['adapter'],_0x1bdac2['bind']('isEnabled')['to'](_0x44ee06),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x1acb8c,'isReadOnly',_0x39db0c=>!_0x39db0c);for(const _0x3b9cec of _0x14d39a){const _0xe41309=null===_0x3b9cec['creator'];if(_0xe41309&&_0x3b9cec['toVersion']===_0x3b9cec['fromVersion'])continue;const _0x30e871=_0x3b9cec['toJSON']();_0x1bdac2['addRevisionData'](_0x30e871,(_0x3b5871,_0x479f51,_0x5babac)=>{if(_0xe41309){if(_0x34f745)_0x34f745['_update'](_0x3b5871,_0x479f51);else{if(!_0x479f51){const _0x365ea4=_0x5babac['toJSON']();_0x365ea4['id']=_0x3001b8(),_0x44ee06['saveRevision'](_0x365ea4,_0x5babac['toVersion'])['then'](_0xadd02c=>{_0x34f745=_0xadd02c;});}}}else _0x3b9cec['_update'](_0x3b5871,_0x479f51);});}}},Yt),_0x90f88c);}['_enhanceShowRevisionViewerCallback'](){const _0x44b636=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xec16a3=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0xec16a3['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5debfd=this['editor']['plugins']['get']('Dialog');_0x5debfd['isOpen']&&_0x5debfd['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xceb9a7=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x238740 of _0xceb9a7)_0x238740['class']=_0x238740['class']?_0x238740['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x4b9188=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4b9188&&_0x4b9188['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4fdcd2=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4fdcd2&&_0x4fdcd2['setAttribute']('tabindex','-1');}}return _0x44b636(this['_getRevisionViewerEditorConfig']())['then'](_0x2922c3=>(this['_viewerEditor']=_0x2922c3,this['editor']['plugins']['has']('Annotations')&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x2922c3))['catch'](_0x5de884=>(console['error'](_0x5de884),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x31a3f2=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x46ce15=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1e93f7 of _0x46ce15)_0x1e93f7['class']='ck-tab-panel_disabled'===_0x1e93f7['class']?'':_0x1e93f7['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x236acf=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x236acf&&_0x236acf['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x439873=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x439873&&_0x439873['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x31a3f2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3be399=this['editor']['plugins']['get']('Annotations');_0x3be399['refreshVisibility'](),_0x3be399['refreshPositioning']();}});});}['_showRevisionViewer'](_0x22ce69){const _0x2df671=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x109bdf=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xf01906=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0xf01906,_0x22ce69)['then'](_0xcc64d0=>(_0x109bdf['style']['display']='block',_0x2df671['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0xcc64d0));}['_closeRevisionViewer'](_0x36c5ef){const _0x312964=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x312964['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x36c5ef['destroy']();}async['_restoreRevision'](_0x4a0d4f){const _0x575e73=this['editor'],_0x33b5ed=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x45ef76=_0x575e73['plugins']['get']('RevisionTracker'),_0x4c47ac=_0x575e73['plugins']['get']('RevisionHistoryUtils'),_0x28fe94=_0x33b5ed['repository']['getRevision'](_0x4a0d4f);let _0x3bc6f4,_0x543f91,_0x559f41;try{await _0x4c47ac['loadRevisionData'](_0x28fe94,this['adapter']),_0x3bc6f4=_0x4c47ac['getRevisionDocumentData'](_0x28fe94),_0x543f91=_0x4c47ac['getRevisionRootsAttributes'](_0x28fe94);}catch(_0xd08db5){return void console['error'](_0xd08db5);}_0x575e73['model']['change'](_0x2820d5=>{for(const _0x58540a of Array['from'](_0x575e73['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2820d5['removeMarker'](_0x58540a);}),_0x33b5ed['isReady']=!0x1,_0x575e73['model']['enqueueChange'](_0x325a1d=>{_0x325a1d['setSelection'](null),_0x325a1d['removeSelectionAttribute'](_0x575e73['model']['document']['selection']['getAttributeKeys']());const _0x5aa200=Object['keys'](_0x3bc6f4);for(const _0x18cee8 of _0x575e73['model']['document']['roots'])'$graveyard'!=_0x18cee8['rootName']&&_0x18cee8['isAttached']()&&!_0x5aa200['includes'](_0x18cee8['rootName'])&&_0x325a1d['detachRoot'](_0x18cee8);for(const _0x3ab1f3 of _0x5aa200){let _0x569270=_0x575e73['model']['document']['getRoot'](_0x3ab1f3);if(!_0x569270||!_0x569270['isAttached']()){const _0xc657de=_0x28fe94['diffData']?.[_0x3ab1f3]?.['rootElementName']||'$root';_0x569270=_0x325a1d['addRoot'](_0x3ab1f3,_0xc657de);}const _0x1ca3c4=_0x543f91[_0x3ab1f3],_0x5094b7=Object['keys'](_0x1ca3c4),_0x26bfab=_0x3bc6f4[_0x3ab1f3];for(const _0x582292 of _0x569270['getAttributeKeys']())_0x5094b7['includes'](_0x582292)||_0x325a1d['removeAttribute'](_0x582292,_0x569270);for(const _0x1d079a of _0x5094b7)_0x325a1d['setAttribute'](_0x1d079a,_0x543f91[_0x3ab1f3][_0x1d079a],_0x569270);_0x325a1d['remove'](_0x325a1d['createRangeIn'](_0x569270)),_0x325a1d['insert'](_0x575e73['data']['parse'](_0x26bfab,_0x569270),_0x569270,0x0);}});const _0x51a291=pt(_0x575e73['locale'],'Restored');if(_0x28fe94['name'])_0x559f41=-0x1==_0x28fe94['name']['indexOf'](_0x51a291)?_0x51a291+':\x20'+_0x28fe94['name']:_0x28fe94['name'];else _0x559f41=_0x51a291+':\x20'+(_0x28fe94['createdAt']['toLocaleDateString'](_0x575e73['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x28fe94['createdAt']['toLocaleTimeString'](_0x575e73['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x45ef76['saveRevision']({'name':_0x559f41}),_0x33b5ed['isReady']=!0x0,_0x575e73['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-revision-history",
|
|
3
|
-
"version": "48.3.1-alpha.
|
|
3
|
+
"version": "48.3.1-alpha.1",
|
|
4
4
|
"description": "Document revision history feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ckeditor/ckeditor5-autosave": "48.3.1-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-collaboration-core": "48.3.1-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-comments": "48.3.1-alpha.
|
|
40
|
-
"@ckeditor/ckeditor5-core": "48.3.1-alpha.
|
|
41
|
-
"@ckeditor/ckeditor5-engine": "48.3.1-alpha.
|
|
42
|
-
"@ckeditor/ckeditor5-icons": "48.3.1-alpha.
|
|
43
|
-
"@ckeditor/ckeditor5-ui": "48.3.1-alpha.
|
|
44
|
-
"@ckeditor/ckeditor5-utils": "48.3.1-alpha.
|
|
45
|
-
"@ckeditor/ckeditor5-widget": "48.3.1-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-autosave": "48.3.1-alpha.1",
|
|
38
|
+
"@ckeditor/ckeditor5-collaboration-core": "48.3.1-alpha.1",
|
|
39
|
+
"@ckeditor/ckeditor5-comments": "48.3.1-alpha.1",
|
|
40
|
+
"@ckeditor/ckeditor5-core": "48.3.1-alpha.1",
|
|
41
|
+
"@ckeditor/ckeditor5-engine": "48.3.1-alpha.1",
|
|
42
|
+
"@ckeditor/ckeditor5-icons": "48.3.1-alpha.1",
|
|
43
|
+
"@ckeditor/ckeditor5-ui": "48.3.1-alpha.1",
|
|
44
|
+
"@ckeditor/ckeditor5-utils": "48.3.1-alpha.1",
|
|
45
|
+
"@ckeditor/ckeditor5-widget": "48.3.1-alpha.1",
|
|
46
46
|
"@types/luxon": "3.6.2",
|
|
47
47
|
"es-toolkit": "1.45.1",
|
|
48
48
|
"luxon": "3.6.1"
|