@ckeditor/ckeditor5-revision-history 48.5.0-alpha.2 → 48.5.0-alpha.4
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
|
-
_0x306d61();var pt=class extends wt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x3edc98){super(),this['id']=_0x3edc98['id']||_0xd43831(),this['creator']=_0x3edc98['creator']||null,this['authors']=_0x3edc98['authors']||[],this['diffData']=_0x3edc98['diffData']||null,this['toVersion']=_0x3edc98['toVersion']||0x0,this['fromVersion']=_0x3edc98['fromVersion']||0x0,this['set']('name',_0x3edc98['name']||''),this['set']('createdAt',_0x3edc98['createdAt']||new Date()),this['set']('attributes',_0x3edc98['attributes']||{});}setName(_0x1fc1b8){this['_update']({'name':_0x1fc1b8});}setAttribute(_0x651ad,_0x301b86){const _0x1ee94c=_0x3ef3d4(this['attributes']);_0x499e1f(_0x1ee94c,_0x651ad,_0x301b86),this['_update']({'attributes':_0x1ee94c});}removeAttribute(_0x303989){const _0x172e45=_0x3ef3d4(this['attributes']);_0x55f1c2(_0x172e45,_0x303989),this['_update']({'attributes':_0x172e45});}_update(_0x5f1852,_0x3dcd19=!0x1){let _0xfb639e=!0x1;const _0x1b916e={'id':this['id']};for(const _0x570dc6 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x56dda1=_0x5f1852[_0x570dc6];void 0x0!==_0x56dda1&&_0x56dda1!==this[_0x570dc6]&&(this[_0x570dc6]=_0x56dda1,_0x1b916e[_0x570dc6]=_0x56dda1,_0xfb639e=!0x0);}_0xfb639e&&(_0x1b916e['authors']&&(_0x1b916e['authorsIds']=_0x1b916e['authors']['map'](_0x1362ee=>_0x1362ee['id']),delete _0x1b916e['authors']),this['fire']('_update',_0x1b916e,_0x3dcd19));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x22e412=>_0x22e412['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},yt=class extends _0x5ca6f9{['_revisions'];static get requires(){return[_0xe140c3];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x469603){super(_0x469603),this['_revisions']=new _0x17289a();}afterInit(){!async function(_0x495110){const _0x2ade2e='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x257185=0xeb829,_0x4f1fa7=0x793f8,_0x156c28={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x5e38a0(_0x271c72){const _0x3e242f=new window['Promise'](_0x54f675=>{_0x271c72['once']('ready',_0x54f675);}),_0x591aeb=window['Date']['now'](),_0x3e70f6=_0x271c72['config']['get']('licenseKey');async function _0x475fd1(){let _0x2c0ace,_0x5d3640=null,_0x39f187=null;try{return'GPL'==_0x3e70f6?'NotAllowed':(_0x2c0ace=_0x2de9a9(),_0x2c0ace?(_0x2c0ace['usageEndpoint']&&(_0x39f187=_0x1133ab(_0x2c0ace['usageEndpoint'],_0x2c0ace['jti'])),await _0x56ac49()?_0x4cea14()?_0x35f286()?'Expired':_0x302695()?('evaluation'==_0x2c0ace['licenseType']&&(_0x5d3640=_0x489759('EvaluationLimit')),await _0xea9a3c()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x35f286(){const _0x1cfe53=['evaluation','trial']['includes'](_0x2c0ace['licenseType'])?_0x591aeb/0x3e8:0xe10*_0x4f1fa7;return _0x2c0ace['exp']<_0x1cfe53;}function _0x4cea14(){const _0x3a4006=_0x2c0ace['features'];if(!_0x3a4006)return!0x1;if(_0x3a4006['includes']('*'))return!0x0;if(_0x3a4006['includes']('RH'))return!0x0;if(_0x3a4006['includes']('RRH')){if(_0x58275())return!0x0;if(_0x1fe84e()||_0x29c3aa())return!0x0;}return!0x1;}function _0x302695(){const _0x2811cf=_0x2c0ace['licensedHosts'];if(!_0x2811cf||0x0==_0x2811cf['length'])return!0x0;const {hostname:_0x36fecb}=new URL(window['location']['href']);if(_0x2811cf['includes'](_0x36fecb))return!0x0;const _0x54a178=_0x36fecb['split']('.');return _0x2811cf['filter'](_0xacb284=>_0xacb284['includes']('*'))['map'](_0x4331a1=>_0x4331a1['split']('.'))['filter'](_0xbe0afe=>_0xbe0afe['length']<=_0x54a178['length'])['map'](_0x4c2fe4=>Array(_0x54a178['length']-_0x4c2fe4['length'])['fill']('*'===_0x4c2fe4[0x0]?'*':'')['concat'](_0x4c2fe4))['some'](_0xd46374=>_0x54a178['every']((_0x1d5f4b,_0x527c8d)=>_0xd46374[_0x527c8d]===_0x1d5f4b||'*'===_0xd46374[_0x527c8d]));}function _0xea9a3c(){return _0x5d3640&&_0x39f187?new window['Promise']((_0x23dea8,_0x5e5ff6)=>{_0x5d3640['then'](_0x23dea8,_0x5e5ff6),_0x39f187['then'](_0x118d64=>{'Valid'!=_0x118d64&&_0x23dea8(_0x118d64);},_0x5e5ff6);}):_0x5d3640||_0x39f187||'Valid';}}function _0x1133ab(_0x20c7b5,_0x12d05a){return new window['Promise'](_0x53a117=>{if(_0x4d1f4e())return _0x53a117('Valid');_0xd86770(),_0x271c72['decorate']('_sendUsageRequest');let _0x207820=!0x1;const _0x477f5a=_0xd43831();function _0x3e7029(_0x47f380){return!!_0x47f380&&('object'==typeof _0x47f380||'function'==typeof _0x47f380)&&'function'==typeof _0x47f380['then']&&'function'==typeof _0x47f380['catch'];}function _0x116dcc(_0x35841e){_0x16040f(_0x35841e)['then'](_0x333188=>_0x333188&&'ok'==_0x333188['status']?_0x379319(_0xbeb176(_0x477f5a+_0x12d05a))!=_0x333188['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4bcfdc=>(_0x5d6b26(),_0x4bcfdc),()=>{const _0x444b98=_0x2c8ca6();return null==_0x444b98?(_0x5d6b26(),'Valid'):_0x591aeb-_0x444b98>0x240c8400?'UsageLimit':'Valid';})['then'](_0x53a117)['catch'](()=>{_0x53a117('UsageLimit');});const _0x41bdf0=0x36ee80;function _0x5d6b26(){const _0xa3e4ea='llct-'+_0x379319(_0xbeb176(_0x20c7b5)),_0x2fd989=_0x35319c(_0x379319(window['Math']['ceil'](_0x591aeb/_0x41bdf0)));window['localStorage']['setItem'](_0xa3e4ea,_0x2fd989);}function _0x2c8ca6(){const _0x37a463='llct-'+_0x379319(_0xbeb176(_0x20c7b5)),_0x53b47a=window['localStorage']['getItem'](_0x37a463);return _0x53b47a?window['parseInt'](_0x35319c(_0x53b47a),0x10)*_0x41bdf0:null;}function _0x16040f(_0x82a201){return new window['Promise']((_0xb5b902,_0x5031a9)=>{_0x82a201['then'](_0xb5b902,_0x5031a9),window['setTimeout'](_0x5031a9,0x1d4c0);});}}_0x271c72['on']('_sendUsageRequest',(_0x1ea1d3,_0x3fe0bc)=>{if(_0x3fe0bc[0x0]!=_0x20c7b5)return _0x53a117('UsageLimit');_0x3fe0bc[0x1]={..._0x3fe0bc[0x1],'requestId':_0x477f5a};},{'priority':'high'}),_0x271c72['on']('_sendUsageRequest',_0x443799=>{_0x3e7029(_0x443799['return'])&&(_0x207820=!0x0,_0x116dcc(_0x443799['return']));},{'priority':'low'}),_0x3e242f['then'](()=>{_0x207820||_0x53a117('UsageLimit');});});function _0x4d1f4e(){return'auto'==_0x271c72['editing']['view']['_overlayModeHint'];}function _0xd86770(){_0x271c72['editing']['view']['_overlayModeHint']='auto';}}function _0x489759(_0x7005c9){const _0x2510f3=[new window['Promise'](_0x1b6fe1=>setTimeout(_0x1b6fe1,0x93ecc)),_0x3e242f['then'](()=>new window['Promise'](_0x13155f=>{const _0x497907=0x7,_0x27a337=_0x495110['_revisions'];function _0x43d31f(){_0x27a337['length']>=_0x497907&&_0x13155f();}_0x43d31f(),_0x27a337['on']('add',_0x43d31f);})),new window['Promise'](_0x27010c=>{function _0x2d8df7(){for(const _0x58a629 in window)if(window['Number']['isNaN'](window['Number'](_0x58a629))&&window[_0x58a629]==_0x257185)return _0x27010c();'destroyed'!=_0x271c72['state']&&window['setTimeout'](_0x2d8df7,0x1388);}_0x831563('RevisionViewer')&&_0x2d8df7();})];return window['Promise']['race'](_0x2510f3)['then'](()=>_0x7005c9);}async function _0x1d3e41(){if(await _0x3e242f,_0x831563('RevisionViewer')){const _0x34e448=_0x495110['getRevision'](0x0),_0x21689e=_0x495110['getEarlierVisibleRevision'](_0x34e448['id']),_0x356239=_0x489649('RevisionViewer');return await _0x356239['compare'](_0x34e448['id'],_0x21689e?_0x21689e['id']:null,!0x0),_0x356239['unbind']('isEnabled'),_0x356239['isEnabled']=!0x1,_0x356239['compare']=_0xf52a48,void(_0x356239['_getDiff']=_0xf52a48);}if(_0x831563('RevisionTracker')){const _0x3a2b79=_0x489649('RevisionTracker');_0x3a2b79['unbind']('isEnabled'),_0x3a2b79['isEnabled']=!0x1,_0x3a2b79['update']=_0xf52a48,_0x3a2b79['saveRevision']=_0xf52a48;}_0x271c72['model']['change']=_0xf52a48,_0x271c72['model']['enqueueChange']=_0xf52a48,_0x271c72['enableReadOnlyMode']('model');}function _0x58275(){return _0x831563('WebSocketGateway')&&'connected'==_0x489649('WebSocketGateway')['state'];}function _0x1fe84e(){return _0x831563('RevisionViewerIntegration');}function _0x29c3aa(){return _0x831563('TrackChangesDataGetter');}function _0x2863c3(_0x187dee){const _0x1b569b=_0x553cca();_0x271c72[_0x1b569b]='revisionHistoryLicenseKey'+_0x187dee,_0x187dee['endsWith']('Limit')&&(window[_0x553cca()]=_0x257185),'Valid'!=_0x187dee&&_0x1d3e41();}function _0x553cca(){const _0x1da5ef=window['String'](window['performance']['now']())['replace']('.','');let _0x4633cc='N';for(let _0x4166ac=0x0;_0x4166ac<_0x1da5ef['length'];_0x4166ac+=0x2){let _0x3a639b=window['parseInt'](_0x1da5ef['substring'](_0x4166ac,_0x4166ac+0x2));_0x3a639b>=0x3e&&(_0x3a639b-=0x3e),_0x4633cc+=_0x2ade2e[_0x3a639b];}return _0x4633cc;}function _0x2de9a9(){const _0x817bc2=_0x3e70f6['split']('.');if(0x3!=_0x817bc2['length'])return null;return _0x50753d(_0x817bc2[0x1]);function _0x50753d(_0x17b275){const _0x53c824=_0xdbc1c1(_0x17b275);return _0x53c824&&_0x1c574a()?_0x53c824:null;function _0x1c574a(){const _0x3dce7d=_0x53c824['jti'],_0x1ba2c6=window['parseInt'](_0x3dce7d['substring'](_0x3dce7d['length']-0x8),0x10),_0x5379b1={..._0x53c824,'jti':_0x3dce7d['substring'](0x0,_0x3dce7d['length']-0x8)};return delete _0x5379b1['vc'],_0xbeb176(_0x5379b1)==_0x1ba2c6;}}}async function _0x56ac49(){let _0x78dbc7=!0x0;try{const [_0x53fe65,_0x38ae62,_0x71626e]=_0x3e70f6['split']('.');return _0x371a64(_0x53fe65),await _0x599b10(_0x53fe65,_0x38ae62,_0x71626e),_0x78dbc7;}catch{return!0x1;}function _0x371a64(_0x328e4a){const _0x4108f7=_0xdbc1c1(_0x328e4a);_0x4108f7&&'ES256'==_0x4108f7['alg']||(_0x78dbc7=!0x1);}async function _0x599b10(_0x3990f5,_0x4a8da7,_0x473ba4){const _0x5da5c5=window['Uint8Array']['from'](_0x10f81f(_0x473ba4),_0x2baa45=>_0x2baa45['charCodeAt'](0x0)),_0x29ebae=new window['TextEncoder']()['encode'](_0x3990f5+'.'+_0x4a8da7),_0x3f2326=window['crypto']['subtle'];if(!_0x3f2326)return;const _0x3d1468=await _0x3f2326['importKey']('jwk',_0x156c28,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3f2326['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3d1468,_0x5da5c5,_0x29ebae)||(_0x78dbc7=!0x1);}}function _0xdbc1c1(_0x1102f7){return _0x1102f7['startsWith']('ey')?JSON['parse'](_0x10f81f(_0x1102f7)):null;}function _0x10f81f(_0xe12d53){return window['atob'](_0xe12d53['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xbeb176(_0x3ea33b){let _0x26b42a=0x1505;function _0x13849c(_0x235be4){for(let _0x3b6b93=0x0;_0x3b6b93<_0x235be4['length'];_0x3b6b93++){const _0x59b454=_0x235be4['charCodeAt'](_0x3b6b93);_0x26b42a=(_0x26b42a<<0x5)+_0x26b42a+_0x59b454,_0x26b42a&=_0x26b42a;}}function _0x276861(_0x55b5a3){Array['isArray'](_0x55b5a3)?_0x55b5a3['forEach'](_0x276861):_0x55b5a3&&'object'==typeof _0x55b5a3?Object['entries'](_0x55b5a3)['sort']()['forEach'](([_0x2f0f9b,_0x253cb6])=>{_0x13849c(_0x2f0f9b),_0x276861(_0x253cb6);}):_0x13849c(window['String'](_0x55b5a3));}return _0x276861(_0x3ea33b),_0x26b42a>>>0x0;}function _0x379319(_0x4ffecd){return _0x4ffecd['toString'](0x10)['padStart'](0x8,'0');}function _0x35319c(_0x37cd44){return _0x37cd44['split']('')['reverse']()['join']('');}function _0x831563(_0x1a2a9c){return _0x271c72['plugins']['has'](_0x1a2a9c);}function _0x489649(_0x109281){return _0x271c72['plugins']['get'](_0x109281);}function _0xf52a48(){}_0x2863c3(await _0x475fd1());}_0x5e38a0(_0x495110['editor']);}(this);}createRevision(_0xbe312){const _0x267c5a=this['editor']['plugins']['get']('Users');return new pt({'id':_0xbe312['id'],'name':_0xbe312['name'],'creator':_0xbe312['creatorId']?_0x267c5a['getUser'](_0xbe312['creatorId']):null,'diffData':_0xbe312['diffData']||_0xbe312['data'],'authors':_0xbe312['authorsIds']['map'](_0x5b7279=>_0x267c5a['getUser'](_0x5b7279)),'createdAt':new Date(_0xbe312['createdAt']),'attributes':_0xbe312['attributes'],'fromVersion':_0xbe312['fromVersion'],'toVersion':_0xbe312['toVersion']});}['addRevision'](_0x32329b,_0x6e75a=0x0){this['_revisions']['add'](_0x32329b,_0x6e75a);}getRevision(_0x2acd9c){return this['_revisions']['get'](_0x2acd9c);}getRevisions(_0x3ac0fa={'toJSON':!0x1}){const _0x386d33=Array['from'](this['_revisions']);return _0x386d33['reverse'](),_0x3ac0fa['toJSON']?_0x386d33['map'](_0x1e212a=>_0x1e212a['toJSON']()):_0x386d33;}getIndex(_0x35ac75){return this['_revisions']['getIndex'](_0x35ac75);}getEarlierVisibleRevision(_0x599f03){const [,_0x4fb296]=this['getRevisionsIterator'](_0x599f03,{'direction':'earlier'});return _0x4fb296;}getLaterVisibleRevision(_0x31a91c){const [,_0x109c2c]=this['getRevisionsIterator'](_0x31a91c,{'direction':'later'});return _0x109c2c;}getRevisionsInDiff(_0x215af9){const _0x353b70=[];for(const _0x2cf486 of this['getRevisionsIterator'](_0x215af9['newRevisionId']))if(_0x353b70['push'](_0x2cf486),_0x2cf486['id']===_0x215af9['oldRevisionId'])break;return _0x353b70;}*getRevisionsIterator(_0x32f084,{direction:_0x1abb5f='earlier',filter:_0x45419c=()=>!0x0}={}){const _0xf7b65f='earlier'===_0x1abb5f?0x1:-0x1;let _0x3283e2=this['_revisions']['get'](_0x32f084),_0x4ae43e=this['getIndex'](_0x3283e2);for(yield _0x3283e2;_0x3283e2;){if(_0x4ae43e+=_0xf7b65f,_0x3283e2=this['getRevision'](_0x4ae43e),!_0x3283e2)return;_0x45419c(_0x3283e2)&&(yield _0x3283e2);}}},bt=class extends _0x5ca6f9{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1de965,'c'],[_0x691ed5,'a'],[_0x4ef025,'e'],[_0x491a29,'r'],[_0x48b554,'u']]);_typeCharToViewClass=new Map([['c',_0x1de965],['a',_0x691ed5],['e',_0x4ef025],['r',_0x491a29],['u',_0x48b554]]);async loadRevisionData(_0x125fd3,_0x277a7e){if(_0x125fd3['diffData']||!_0x277a7e)return;const _0xae6526=this['editor']['config']['get']('collaboration.channelId');_0x125fd3['diffData']=(await _0x277a7e['getRevision']({'channelId':_0xae6526,'revisionId':_0x125fd3['id']}))['diffData'];}getRevisionDocumentData(_0x3719df){const _0x16d1c9={};for(const _0x580cbd in _0x3719df['diffData']){if(_0x3719df['diffData'][_0x580cbd]['attachChange']&&!_0x3719df['diffData'][_0x580cbd]['attachChange']['isAttached'])continue;const _0xa450f8=this['_removeRevisionMarkers'](JSON['parse'](_0x3719df['diffData'][_0x580cbd]['insertions'])),_0x3f4dd5=this['editor']['editing']['view']['document'],_0x836200=new _0x5e0e74(_0x3f4dd5,_0xa450f8['map'](_0x3eab35=>this['_getViewFromDiffObj'](_0x3eab35,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x16d1c9[_0x580cbd]=this['editor']['data']['processor']['toData'](_0x836200),this['editor']['data']['processor']['useFillerType']('default');}return _0x16d1c9;}getRevisionRootsAttributes(_0x536a4f){const _0x58517d={};for(const _0x55a2ba in _0x536a4f['diffData'])_0x536a4f['diffData'][_0x55a2ba]['attachChange']&&!_0x536a4f['diffData'][_0x55a2ba]['attachChange']['isAttached']||(_0x58517d[_0x55a2ba]=_0x536a4f['diffData'][_0x55a2ba]['attributesAfter']||{});return _0x58517d;}getRevisionRootsModelElements(_0x21d6a3){const _0x45fb0c={};for(const _0x15011e in _0x21d6a3['diffData']){if(_0x21d6a3['diffData'][_0x15011e]['attachChange']&&!_0x21d6a3['diffData'][_0x15011e]['attachChange']['isAttached'])continue;const _0x49047c=_0x21d6a3['diffData'][_0x15011e]['rootElementName'];_0x49047c&&(_0x45fb0c[_0x15011e]=_0x49047c);}return _0x45fb0c;}_getTypeCharForViewElement(_0x419688){return this['_viewClassToTypeChar']['get'](_0x419688['constructor']);}_getViewFromDiffObj(_0x5f1a23,_0x8d02f8){const _0x114844=this['editor']['editing']['view']['document'];if('string'==typeof _0x5f1a23)return new _0x26b384(_0x114844,_0x5f1a23);{let _0x1e74a7,_0x5d45e0;_0x5d45e0='u'==_0x5f1a23['type']||'r'==_0x5f1a23['type']?[]:_0x5f1a23['children']['map'](_0x44f9cd=>this['_getViewFromDiffObj'](_0x44f9cd,_0x8d02f8));const _0x31e0f2=this['_typeCharToViewClass']['get'](_0x5f1a23['type'])||_0x816cc6,_0x1a8f83=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1e74a7=new _0x31e0f2(_0x114844,_0x5f1a23['name'],_0x5f1a23['attributes'],_0x5d45e0),'u'==_0x5f1a23['type']&&_0x5f1a23['children'][0x0]){const _0x4c29e6=_0x5f1a23['children'][0x0];if(_0x1e74a7['render']=function(_0x32a3b7){const _0x135975=_0x32a3b7['createElement']('div');return _0x135975['innerHTML']=_0x4c29e6,_0x135975['childNodes'][0x0];},_0x8d02f8){const _0x2d5591=new _0x5e0e74(_0x114844);_0x2d5591['_appendChild'](_0x1e74a7);const _0x54bbdb=Array['from'](_0x1a8f83['viewChildrenToDom'](_0x2d5591,{'bind':!0x1})),_0x160277=_0x1a8f83['domDocument']['createElement']('div');_0x160277['append'](..._0x54bbdb),_0x1e74a7=Array['from'](_0x1a8f83['domChildrenToView'](_0x160277))[0x0];}}else{if('r'==_0x5f1a23['type']&&_0x5f1a23['children'][0x0]){const _0x2533d6=_0x5f1a23['children'][0x0];if(_0x1e74a7['render']=function(_0x1d235c){_0x1d235c['innerHTML']=_0x2533d6;},_0x8d02f8){const _0x49a1c5=new _0x5e0e74(_0x114844);_0x49a1c5['_appendChild'](_0x1e74a7);const _0x4188eb=Array['from'](_0x1a8f83['viewChildrenToDom'](_0x49a1c5,{'bind':!0x1})),_0x309939=_0x1a8f83['domDocument']['createElement']('div');_0x309939['append'](..._0x4188eb);const _0x1af714=Array['from'](_0x1a8f83['domChildrenToView'](_0x309939));_0x1af714['length']>0x1?_0x1e74a7['_appendChild'](_0x1af714):_0x1e74a7=_0x1af714[0x0];}}}if(_0x5f1a23['customProperties']){for(const [_0x182e81,_0x25ce0b]of _0x5f1a23['customProperties'])_0x1e74a7['_setCustomProperty'](_0x182e81,_0x25ce0b);}const _0x4681b0=void 0x0===_0x5f1a23['fillerOffset']?null:_0x5f1a23['fillerOffset'];return null!==_0x4681b0&&(_0x1e74a7['getFillerOffset']=()=>_0x4681b0),_0x1e74a7;}}_makeModelFromViewString(_0xc0116,_0x411e23){const _0x475b57=JSON['parse'](_0xc0116),_0xade007=this['editor']['editing']['view']['document'],_0x4d095b=new _0x5e0e74(_0xade007,_0x475b57['map'](_0x5b7186=>this['_getViewFromDiffObj'](_0x5b7186,!0x0))),_0xe62f99=this['editor']['data']['toModel'](_0x4d095b,_0x411e23);return _0xe62f99['name']=_0x411e23,_0xe62f99;}['_removeRevisionMarkers'](_0xb35bfc){return(_0xb35bfc=_0xb35bfc['filter'](_0xcfda5=>!_0xcfda5['name']||'revision-start'!==_0xcfda5['name']&&'revision-end'!==_0xcfda5['name']))['forEach'](_0xf1166e=>{'string'!=typeof _0xf1166e&&(_0xf1166e['children']=this['_removeRevisionMarkers'](_0xf1166e['children']),_0xf1166e['attributes']=_0xf1166e['attributes']['filter'](_0x5641a2=>!_0x5641a2[0x0]['startsWith']('data-revision-')));}),_0xb35bfc;}};function Rt(_0x11a43a,_0x455112,_0x5943c7){const t=_0x11a43a['t'];switch(_0x455112){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'},_0x5943c7);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5943c7);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');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x5943c7);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x5943c7);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x5943c7);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var kt=class extends _0x5ca6f9{['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[_0xe140c3,yt,bt,_0x4dabe1];}constructor(_0x3b4624){super(_0x3b4624),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new At(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0xd1802d=_0xd43831();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0xd1802d},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 _0x535156=this['repository']['getRevision'](0x0),_0x2ce14b=_0x535156&&null===_0x535156['creator']?_0x535156:null;if(this['_continueCurrentRevision']=!!_0x2ce14b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4137d9=this['_source']['getCurrentRevisionId'](),_0x215706=this['repository']['getRevision'](_0x4137d9);if(_0x215706)this['_startingVersion']=_0x215706['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5a183f=this['_source']['history']['_operations']['find'](_0x41fcf2=>!_0x41fcf2['_isInit']),_0x30d0df=_0x5a183f?_0x5a183f['baseVersion']:this['_source']['history']['version'];_0x535156?(_0x535156['toVersion']<_0x30d0df&&_0x535156['_update']({'toVersion':_0x30d0df}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2ce14b['id'],this['_startingVersion']=_0x2ce14b['fromVersion']):(this['_startingVersion']=_0x535156['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x30d0df,this['_continueCurrentRevision']=!0x1);}}else _0x2ce14b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2ce14b['toVersion'],this['editor']['model']['document']['history']['version']),_0x2ce14b['fromVersion']===_0x2ce14b['toVersion']?(0x0!==_0x2ce14b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ce14b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ce14b['id'],this['_startingVersion']=_0x2ce14b['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',_0x11950f=>!_0x11950f),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0xb1b858=[this['editor']];for(const _0x4253ad of _0xb1b858){let _0x17733a;for(const _0x4a1796 in _0x4253ad){const _0x205617=_0x4a1796,_0x2c8b66=_0x4253ad[_0x205617];if('revisionHistoryLicenseKeyValid'==_0x2c8b66||'revisionHistoryLicenseKeyInvalid'==_0x2c8b66||'revisionHistoryLicenseKeyExpired'==_0x2c8b66||'revisionHistoryLicenseKeyDomainLimit'==_0x2c8b66||'revisionHistoryLicenseKeyNotAllowed'==_0x2c8b66||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2c8b66||'revisionHistoryLicenseKeyUsageLimit'==_0x2c8b66){delete _0x4253ad[_0x205617],_0x17733a=_0x2c8b66,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x17733a&&_0x4253ad['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x17733a&&_0x4253ad['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x17733a&&_0x4253ad['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x17733a&&_0x4253ad['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x17733a&&_0x4253ad['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x17733a&&_0x4253ad['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x20a0f1=this['repository']['getRevision'](0x0),_0x51ce8d=await this['getRevisionDocumentData'](_0x20a0f1),_0x44b6d7=await this['getRevisionRootsAttributes'](_0x20a0f1),_0xe6ef42=this['_utils']['getRevisionRootsModelElements'](_0x20a0f1);this['_replaceEditorDataWithRevisionData'](_0x51ce8d,_0x44b6d7,_0xe6ef42);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x4de89c){this['_source']=_0x4de89c;}async update(){const _0x448ecb=await this['_source']['getLatestVersion']();if(_0x448ecb>this['currentRevision']['toVersion']){await this['_loadState']();const _0x4e6900=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x448ecb});_0x4e6900['authors']=_0x4e6900['authorsIds']['map'](_0x4c7efd=>this['editor']['plugins']['get']('Users')['getUser'](_0x4c7efd)),this['currentRevision']['_update'](_0x4e6900);}}async['saveRevision'](_0x1abff1={},_0xbcf0aa=null){const _0x4a2971=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xbcf0aa>this['currentRevision']['toVersion']&&(_0xbcf0aa=null),null===_0xbcf0aa&&(_0xbcf0aa=await this['_source']['getLatestVersion']());const _0x47f088=this['_getFromVersion'](_0xbcf0aa),_0x300cad=this['buildRevisionData']({'from':_0x47f088,'to':_0xbcf0aa});if(this['currentRevision']['toVersion']<_0xbcf0aa){const _0x462f33=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xbcf0aa,'to':_0xbcf0aa});_0x462f33['authors']=[],_0x462f33['authorsIds']=[],_0x462f33['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x462f33,!0x0),delete _0x462f33['authors'],_0x4a2971['push'](_0x462f33);}const _0x5b1924={..._0x1abff1,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1abff1['name']||null,'id':_0x1abff1['id']||_0xd43831(),..._0x300cad,'attributes':{..._0x1abff1['attributes'],..._0x300cad['attributes']}},_0x1cbe51=this['addRevisionData'](_0x5b1924);_0x4a2971['push'](_0x5b1924);const _0x595e1b=this['repository']['getIndex'](_0x1cbe51);if(0x0!==_0x595e1b){const _0x1abe6e=this['repository']['getRevision'](_0x595e1b-0x1);if(_0x1abe6e['fromVersion']!==_0xbcf0aa){const _0x351299=this['_revisionDataBuilder']['getData'](_0xbcf0aa,_0x1abe6e['toVersion']),_0x79306c={'id':_0x1abe6e['id'],'diffData':_0x351299['diffData'],'authorsIds':_0x351299['authorsIds'],'authors':_0x351299['authorsIds']['map'](_0x582f6f=>this['editor']['plugins']['get']('Users')['getUser'](_0x582f6f)),'fromVersion':_0xbcf0aa};this['_stampAiAttribute'](_0x79306c,_0x1abe6e,!!_0x351299['hasAIChanges']),_0x1abe6e===this['currentRevision']&&(_0x79306c['createdAt']=new Date(_0x5b1924['createdAt']['getTime']()+0xa)),_0x1abe6e['_update'](_0x79306c,!0x0),delete _0x79306c['authors'],_0x4a2971['push'](_0x79306c);}}if(this['adapter']){for(const _0x41de6a of _0x4a2971)this['_bufferUpdate'](_0x41de6a['id'],_0x41de6a,!0x0);this['sendBufferedUpdates']();}return _0x1cbe51;}addRevisionData(_0x2b12ba){const _0x2aad45=this['repository']['createRevision'](_0x2b12ba);return this['adapter']&&_0x2aad45['on']('_update',(_0x45000a,_0xc9edeb,_0x4638a4)=>{_0x4638a4||(this['_bufferUpdate'](_0xc9edeb['id'],_0xc9edeb,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2aad45,this['_findInsertionIndex'](_0x2aad45)),_0x2aad45;}async getRevisionDocumentData(_0x287633){return await this['_utils']['loadRevisionData'](_0x287633,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x287633);}async getRevisionRootsAttributes(_0xc27d94){return await this['_utils']['loadRevisionData'](_0xc27d94,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xc27d94);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1c534c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1ef102=0x0;_0x1ef102<_0x1c534c['length'];_0x1ef102++){const _0x467f31=_0x1c534c[_0x1ef102];let _0x2cf5d6=!0x1;for(const _0x185454 of Object['keys'](_0x467f31))void 0x0===_0x467f31[_0x185454]?delete _0x467f31[_0x185454]:'id'!==_0x185454&&(_0x2cf5d6=!0x0);_0x2cf5d6||(_0x1c534c[_0x1ef102]=null);}if(_0x1c534c=_0x1c534c['filter'](_0x1fc698=>null!==_0x1fc698),!_0x1c534c['length'])return;for(let _0x505687=0x0;_0x505687<_0x1c534c['length'];_0x505687++){const _0xf76eea=_0x1c534c[_0x505687];void 0x0!==_0xf76eea['fromVersion']&&void 0x0===_0xf76eea['toVersion']&&(_0xf76eea['toVersion']=this['repository']['getRevision'](_0xf76eea['id'])['toVersion']),void 0x0!==_0xf76eea['toVersion']&&void 0x0===_0xf76eea['fromVersion']&&(_0xf76eea['fromVersion']=this['repository']['getRevision'](_0xf76eea['id'])['fromVersion']);}const _0x3f2943=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1c534c,_0x3f2943)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x47845b=>{if(_0x47845b){for(const _0x24a28c of _0x47845b)this['setRevisionData']({'id':_0x24a28c['id'],'createdAt':_0x24a28c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x4741cb,_0x188cb0,_0x424e92){if(_0x424e92===(!!_0x188cb0&&!!_0x188cb0['attributes']['@ai']))return;const _0x1fb006={..._0x188cb0?_0x188cb0['attributes']:{},..._0x4741cb['attributes']};_0x424e92?_0x1fb006['@ai']=!0x0:delete _0x1fb006['@ai'],_0x4741cb['attributes']=_0x1fb006;}buildRevisionData({revision:_0x127254=null,from:_0x4b42c6=null,to:_0x5470fb=null}){_0x4b42c6=null!==_0x4b42c6?_0x4b42c6:_0x127254['fromVersion'],_0x5470fb=null!==_0x5470fb?_0x5470fb:_0x127254['toVersion'];const _0x5f514c=this['_revisionDataBuilder']['getData'](_0x4b42c6,_0x5470fb),_0x284b37={'diffData':_0x5f514c['diffData'],'authorsIds':_0x5f514c['authorsIds'],'fromVersion':_0x4b42c6,'toVersion':_0x5470fb};if(this['_stampAiAttribute'](_0x284b37,_0x127254,!!_0x5f514c['hasAIChanges']),!_0x127254||_0x5470fb!==_0x127254['toVersion']){const _0x10404b=_0x5470fb-0x1,_0x30c5a1=this['_source']['history']['getOperation'](_0x10404b);_0x284b37['createdAt']=_0x30c5a1&&_0x30c5a1['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4b42c6===this['_loadedStateData']['fromVersion']){for(const _0x2eb128 of this['_loadedStateData']['authors'])_0x284b37['authorsIds']['includes'](_0x2eb128['id'])||_0x284b37['authorsIds']['push'](_0x2eb128['id']);}return _0x284b37;}_bufferUpdate(_0x4ad72c,_0x4dd660,_0x422b7a){if(this['_bufferedUpdates']['has'](_0x4ad72c)){const _0x32674e=this['_bufferedUpdates']['get'](_0x4ad72c);_0x4dd660=_0x422b7a?{..._0x32674e,..._0x4dd660}:{..._0x4dd660,..._0x32674e};}this['_bufferedUpdates']['set'](_0x4ad72c,_0x4dd660);}setRevisionData(_0x340376){const _0x520071=this['repository']['getRevision'](_0x340376['id']);if(_0x340376['createdAt']&&(_0x340376['createdAt']=new Date(_0x340376['createdAt'])),_0x340376['authorsIds']){const _0xfdc05e=this['editor']['plugins']['get']('Users');_0x340376['authors']=_0x340376['authorsIds']['map'](_0x1e8d93=>_0xfdc05e['getUser'](_0x1e8d93));}_0x520071['_update'](_0x340376,!0x0);}_createInitialRevision(_0x583017){const _0xd5d1bf=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xd5d1bf)this['_initialRevisionId']=_0xd5d1bf['id'];else{const _0x1bdcbf=!this['editor']['model']['document']['roots']['find'](_0x586af5=>this['editor']['model']['hasContent'](_0x586af5)),_0x2d80a5=this['editor']['plugins']['get']('Users')['me']['id'],_0x432c6a=Rt(this['editor']['locale'],_0x1bdcbf?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x583017,'to':_0x583017,'id':this['_initialRevisionId'],'name':_0x432c6a,'creatorId':_0x2d80a5});}}_createCurrentRevision(_0x639f80){const _0x596b3c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x596b3c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x639f80,'to':_0x639f80,'id':_0x596b3c,'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(_0x4106c3,_0x58c274,_0x10a2a8){const _0x257af6={},_0x7ed7ab={},_0x5f2601={},_0x11f4e7=this['editor']['config']['get']('roots')||{};for(const [_0x1d9463,_0x537c36]of Object['entries'](_0x11f4e7))_0x537c36['lazyLoad']||(_0x257af6[_0x1d9463]=_0x537c36['initialData']??'',_0x7ed7ab[_0x1d9463]=_0x537c36['modelAttributes']||{},_0x537c36['modelElement']&&(_0x5f2601[_0x1d9463]=_0x537c36['modelElement']));for(const _0xa7d2bc of this['editor']['model']['document']['getRootNames']())_0x257af6[_0xa7d2bc]??='',_0x7ed7ab[_0xa7d2bc]??={};let _0x14f23a=!0x1;const _0x2a4c4c=Object['keys'](_0x257af6),_0x26297a=Object['keys'](_0x4106c3);for(const _0x43f2a5 of _0x2a4c4c){if(_0x257af6[_0x43f2a5]!==_0x4106c3[_0x43f2a5]&&''!==_0x257af6[_0x43f2a5]['trim']()){_0x14f23a=!0x0;break;}if(!_0x17185f(_0x7ed7ab[_0x43f2a5],_0x58c274[_0x43f2a5])&&Object['keys'](_0x7ed7ab[_0x43f2a5])['length']>0x0){_0x14f23a=!0x0;break;}const _0x42dce2=_0x5f2601[_0x43f2a5],_0x481c25=_0x10a2a8[_0x43f2a5];if(_0x42dce2&&_0x481c25&&_0x42dce2!==_0x481c25){_0x14f23a=!0x0;break;}}_0x14f23a||(_0x14f23a=_0x26297a['some'](_0x5af664=>!this['editor']['model']['document']['getRoot'](_0x5af664))),_0x14f23a&&_0x4c174d('editor-initial-data-replaced-with-revision-data',{'editorData':_0x257af6,'editorRootsAttributes':_0x7ed7ab,'editorRootsModelElements':_0x5f2601,'revisionData':_0x4106c3,'revisionRootsAttributes':_0x58c274,'revisionRootsModelElements':_0x10a2a8});for(const [_0x1acdb8,_0x41eeb9]of Object['entries'](_0x4106c3))this['editor']['config']['set']('roots.'+_0x1acdb8+'.initialData',_0x41eeb9);for(const [_0x12d187,_0x7f1287]of Object['entries'](_0x58c274))this['editor']['config']['set']('roots.'+_0x12d187+'.modelAttributes',_0x7f1287);const _0x24fdda=this['editor']['model']['document'];for(const [_0x30ce34,_0x4c66a]of Object['entries'](_0x10a2a8)){this['editor']['config']['set']('roots.'+_0x30ce34+'.modelElement',_0x4c66a);const _0x39b022=_0x24fdda['getRoot'](_0x30ce34);_0x39b022&&_0x39b022['name']!==_0x4c66a&&(_0x24fdda['roots']['remove'](_0x30ce34),_0x24fdda['createRoot'](_0x4c66a,_0x30ce34));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2f68cf=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2f68cf['add'](Rt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x4e06f7){const _0x1156c1=this['repository']['getRevisions']();_0x1156c1['reverse']();let _0x28dfed=0x0;for(;_0x28dfed<_0x1156c1['length'];){const _0xe0baec=_0x1156c1[_0x28dfed];if(_0xe0baec===this['currentRevision']){_0x28dfed++;continue;}if(_0xe0baec['id']===this['_initialRevisionId'])break;const _0xa9cee6=_0x4e06f7['toVersion']-_0xe0baec['toVersion']||_0x4e06f7['fromVersion']-_0xe0baec['fromVersion'];if(_0xa9cee6>0x0)break;if(_0xa9cee6<0x0)_0x28dfed++;else{if(!_0x4e06f7['creator']&&_0xe0baec['creator'])break;if(_0xe0baec['creator']||!_0x4e06f7['creator']){if(_0x4e06f7['createdAt']>_0xe0baec['createdAt'])break;_0x28dfed++;}else _0x28dfed++;}}return _0x28dfed;}_getFromVersion(_0x22f13e){const _0xe65dcc=this['repository']['getRevisions']();_0xe65dcc['reverse'](),_0xe65dcc['shift']();const _0x586acf=_0xe65dcc['find'](_0x2057af=>_0x2057af['toVersion']<=_0x22f13e)['toVersion'];return _0x586acf<this['_startingVersion']?this['_startingVersion']:_0x586acf;}['_makeRevision']({name:_0x1fb4b5,from:_0x1031b6,to:_0x21bb09,creatorId:_0x24942e,id:_0x236c11}){const _0x445da5=this['buildRevisionData']({'from':_0x1031b6,'to':_0x21bb09});_0x445da5['name']=_0x1fb4b5,_0x445da5['creatorId']=_0x24942e,_0x445da5['id']=_0x236c11;const _0x1c3612=this['addRevisionData'](_0x445da5);return this['adapter']&&this['_bufferUpdate'](_0x445da5['id'],_0x445da5,!0x0),_0x1c3612;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},At=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x50ce88){this['editor']=_0x50ce88,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['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x161598){this['source']=_0x161598;const _0x4dc264=new Map(),_0x2e8beb=new Map(),_0x381366=this['editor']['model']['document']['roots']['map'](_0x41d027=>_0x41d027['rootName']);for(const _0x47d089 of _0x381366){const _0x32aef7=this['editor']['model']['document']['getRoot'](_0x47d089),_0x418207=It(_0x32aef7);_0x4dc264['set'](_0x47d089,_0x418207),_0x2e8beb['set'](_0x47d089,Object['fromEntries'](_0x32aef7['getAttributes']()));}const _0x33fef4=Array['from'](this['editor']['model']['markers'])['map'](_0x382043=>[_0x382043['name'],_0x382043['getRange']()]),_0x5e1fa4=this['source']['version'];this['_saveMetaData'](_0x5e1fa4,_0x4dc264,_0x33fef4,_0x2e8beb),this['_startingRevisionId']=this['_revisionId'];const _0x2f4cc9=new Map(),_0x425b7a=new Map();for(const _0x248f2a of _0x381366){const _0x17bf49=St(_0x248f2a,this['editor']['model']['document']['getRoot'](_0x248f2a)['name']);_0x2f4cc9['set'](_0x248f2a,_0x17bf49),_0x425b7a['set'](_0x248f2a,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2f4cc9,[],_0x425b7a);}getData(_0x4574c3,_0x5b8a17){if(this['_lastFrom']===_0x4574c3&&this['_lastTo']<=_0x5b8a17)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5b8a17,!0x0);else{if(!this['_savedMetaData']['has'](_0x4574c3)){const _0xacd49f=this['_getPreviousFrom'](_0x4574c3);this['_calculateMetaData'](_0xacd49f,_0x4574c3,!0x1);}this['_calculateMetaData'](_0x4574c3,_0x5b8a17,!0x0);}return this['_lastFrom']=_0x4574c3,this['_lastTo']=_0x5b8a17,this['_getState']();}loadState(_0x3f6f53){if(!this['_savedMetaData']['has'](_0x3f6f53['fromVersion'])){const _0x87dd94=this['_getPreviousFrom'](_0x3f6f53['fromVersion']);this['_calculateMetaData'](_0x87dd94,_0x3f6f53['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3f6f53['fromVersion'],_0x3f6f53['toVersion'],!0x1);const _0x23b312=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3f6f53['fromVersion'],this['_lastTo']=_0x3f6f53['toVersion'];for(const _0x6669c6 in _0x3f6f53['diffData']){const _0x559b35=_0x3f6f53['diffData'][_0x6669c6]['attachChange'],_0x267569=_0x3ef3d4(_0x3f6f53['diffData'][_0x6669c6]['attributesBefore'])||{},_0x57be58=_0x3f6f53['diffData'][_0x6669c6],_0x580fba=_0x23b312['_makeModelFromViewString'](_0x57be58['deletions'],_0x57be58['rootElementName']||'$root');_0x580fba['rootName']=_0x6669c6,_0x580fba['_isAttached']=!_0x559b35||!_0x559b35['isAttached'],_0x580fba['isAttached']=()=>_0x580fba['_isAttached'],this['_baseRoots']['set'](_0x6669c6,_0x580fba),this['_baseRootsAttributes']['set'](_0x6669c6,_0x267569),_0x559b35&&this['_touchedRoots']['set'](_0x6669c6,_0x559b35);const _0x58547d=this['_makeIdsRoot'](_0x580fba);this['_baseIdsRoots']['set'](_0x6669c6,_0x58547d);for(const [_0x554ca6,_0x25668e]of _0x580fba['markers']){if(!_0x554ca6['startsWith']('revision:'))continue;const _0x35f675=_0x554ca6['split'](':')[0x2],_0x19a584=_0x57be58['aiSources']?.[_0x554ca6]||null;for(const _0x4fc244 of _0x25668e['getWalker']({'singleCharacters':!0x0})){const _0x130a70=this['_getVidAttributeName'](_0x4fc244),_0x1870f2='elementEnd'==_0x4fc244['type']?_0x4fc244['previousPosition']['path']['slice'](0x0,-0x1):_0x4fc244['previousPosition']['path'],_0x3d7853=_0x58547d['getNodeByPath'](_0x1870f2)['getAttribute'](_0x130a70);this['_touched']['set'](_0x3d7853,{'userId':_0x35f675,'aiSource':_0x19a584});}_0x580fba['markers']['delete'](_0x554ca6);}}this['_startingRevisionId']=this['_revisionId'];const _0x440ce4=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x54b1b0=>!this['_touched']['has'](_0x54b1b0));let _0x36e363=0x0;const _0x40d14b=new Map();for(const _0x61c373 in _0x3f6f53['diffData']){const _0x2b82d3=_0x3f6f53['diffData'][_0x61c373]['attachChange'],_0x2326b2=_0x3ef3d4(_0x3f6f53['diffData'][_0x61c373]['attributesAfter'])||{},_0x3ccd44=_0x3f6f53['diffData'][_0x61c373],_0x5efdea=_0x23b312['_makeModelFromViewString'](_0x3ccd44['insertions'],_0x3ccd44['rootElementName']||'$root');_0x5efdea['rootName']=_0x61c373,_0x5efdea['_isAttached']=!_0x2b82d3||_0x2b82d3['isAttached'],_0x5efdea['isAttached']=()=>_0x5efdea['_isAttached'],this['_diffRoots']['set'](_0x61c373,_0x5efdea),this['_diffRootsAttributes']['set'](_0x61c373,_0x2326b2);const _0x271035=this['_makeIdsRoot'](_0x5efdea,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x61c373,_0x271035),_0x40d14b['set'](_0x61c373,_0x5efdea['isAttached']()?_0x2326b2:{});for(const [_0x133205,_0x2b61a0]of _0x5efdea['markers']){if(!_0x133205['startsWith']('revision:'))continue;const _0x45fa95=_0x133205['split'](':')[0x2],_0x25871b=_0x3ccd44['aiSources']?.[_0x133205]||null;for(const _0x49a1fc of _0x2b61a0['getWalker']({'singleCharacters':!0x0})){const _0x3c6bab=this['_getVidAttributeName'](_0x49a1fc),_0x3d90ef=this['_revisionId']++,_0x45a4ab='elementEnd'==_0x49a1fc['type']?_0x49a1fc['previousPosition']['path']['slice'](0x0,-0x1):_0x49a1fc['previousPosition']['path'];_0x271035['getNodeByPath'](_0x45a4ab)['_setAttribute'](_0x3c6bab,_0x3d90ef),this['_touched']['set'](_0x3d90ef,{'userId':_0x45fa95,'aiSource':_0x25871b});}_0x5efdea['markers']['delete'](_0x133205);}for(const _0x206fa1 of this['editor']['model']['createRangeIn'](_0x5efdea)['getWalker']({'singleCharacters':!0x0})){const _0x18881e=this['_getVidAttributeName'](_0x206fa1),_0xff4211='elementEnd'==_0x206fa1['type']?_0x206fa1['previousPosition']['path']['slice'](0x0,-0x1):_0x206fa1['previousPosition']['path'],_0x1672cc=_0x271035['getNodeByPath'](_0xff4211);_0x1672cc['getAttribute'](_0x18881e)>0x0||_0x1672cc['_setAttribute'](_0x18881e,_0x440ce4[_0x36e363++]);}for(const [_0x3d87f6,_0x1bb539]of _0x5efdea['markers'])_0x3d87f6['startsWith']('revision:')||this['_markers']['set'](_0x3d87f6,_0x1bb539);}const {roots:_0x525005}=this['_savedMetaData']['get'](_0x3f6f53['fromVersion']),{roots:_0x43c712}=this['_savedMetaData']['get'](_0x3f6f53['toVersion']),_0xdcbaf1=It(_0x525005['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xdcbaf1),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xdcbaf1,Number['NEGATIVE_INFINITY']));const _0x4a2416=It(_0x43c712['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x4a2416),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4a2416));const _0x52f2c4=Array['from'](this['_diffRoots'])['map'](([_0x363393,_0x1b22c1])=>[_0x363393,It(_0x1b22c1)]);this['_saveMetaData'](this['_lastTo'],_0x52f2c4,this['_markers'],_0x40d14b);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x1789e3,_0x54162f,_0x397bd3,_0x36c7fb){const _0x317d90=new Map(_0x54162f),_0x493c8c=new Map(_0x3ef3d4(_0x36c7fb)),_0x2e2368=new Map();for(const [_0x62e75a,_0x4ab433]of _0x397bd3)_0x2e2368['set'](_0x62e75a,{'start':_0x4ab433['start']['clone'](),'end':_0x4ab433['end']['clone'](),'rootName':_0x4ab433['root']['rootName']});this['_savedMetaData']['set'](_0x1789e3,{'roots':_0x317d90,'markers':_0x2e2368,'rootsAttributes':_0x493c8c});}_removeMetaData(_0x3ea5c7){this['_savedMetaData']['delete'](_0x3ea5c7);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['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(_0x2a0cda,_0x330809=null){let _0x51d3f9=null;_0x2a0cda['is']('documentFragment')||(_0x51d3f9=new _0x51c9e7(_0x2a0cda['name'],{'vid_start':null===_0x330809?this['_revisionId']++:_0x330809++}));const _0x2f15f6=[];for(const _0x3f25c0 of _0x2a0cda['getChildren']())if(_0x3f25c0['is']('element')){_0x2f15f6['push'](this['_makeIdsRoot'](_0x3f25c0,_0x330809));const _0x580e33=_0x2f15f6[_0x2f15f6['length']-0x1];null!==_0x330809&&(_0x330809=_0x580e33['is']('element','$text')?_0x580e33['getAttribute']('vid')+0x1:_0x580e33['getAttribute']('vid_end')+0x1);}else{for(let _0x3c1e79=0x0;_0x3c1e79<_0x3f25c0['offsetSize'];_0x3c1e79++)_0x2f15f6['push'](new _0x51c9e7('$text',{'vid':null===_0x330809?this['_revisionId']++:_0x330809++}));}if(_0x2a0cda['is']('documentFragment')){const _0x1da0c3=St(_0x2a0cda['rootName'],_0x2a0cda['name']);return _0x1da0c3['_insertChild'](0x0,_0x2f15f6),_0x1da0c3;}return _0x51d3f9['_setAttribute']('vid_end',null===_0x330809?this['_revisionId']++:_0x330809),_0x51d3f9['_insertChild'](0x0,_0x2f15f6),_0x51d3f9;}_calculateMetaData(_0x3fe51e,_0x10fa16,_0x47aa30){this['_reset']();const {roots:_0x163251,markers:_0x40d8b3,rootsAttributes:_0x2ba518}=this['_savedMetaData']['get'](_0x3fe51e);this['_baseRoots']=new Map(_0x163251),this['_baseRootsAttributes']=new Map(_0x3ef3d4(_0x2ba518));for(const [_0x55e388,_0x454c01]of this['_baseRoots'])if('$graveyard'!==_0x55e388&&(this['_diffRoots']['set'](_0x55e388,It(_0x454c01)),this['_diffRootsAttributes']=new Map(_0x3ef3d4(_0x2ba518)),_0x47aa30)){const _0x4ab60a=this['_revisionId'];this['_idsRoots']['set'](_0x55e388,this['_makeIdsRoot'](_0x454c01)),this['_baseIdsRoots']['set'](_0x55e388,this['_makeIdsRoot'](_0x454c01,_0x4ab60a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',It(this['_baseRoots']['get']('$graveyard'))),_0x47aa30&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x167971,_0xec34e0]of _0x40d8b3){const _0x1eba34=this['_baseRoots']['get'](_0xec34e0['rootName']),_0x57bd24=this['_diffRoots']['get'](_0xec34e0['rootName']),_0xeaf704=new _0x54cb06(_0x1ef4a1(_0xec34e0['start'],_0x1eba34),_0x1ef4a1(_0xec34e0['end'],_0x1eba34)),_0x4f72bc=_0x9e12d7(_0xeaf704,_0x57bd24);_0x1eba34['markers']['set'](_0x167971,_0xeaf704),this['_markers']['set'](_0x167971,_0x4f72bc);}this['_applyOperations'](_0x3fe51e,_0x10fa16,_0x47aa30);}_applyOperations(_0x174e19,_0x361ada,_0x508b71){for(const _0x131843 of this['source']['getOperations'](_0x174e19,_0x361ada))this['_handleOperation'](_0x131843,_0x508b71);for(const _0x25ee07 of this['_diffRoots']['values']())_0x25ee07['markers']['clear']();for(const [_0x4fd351,_0x129a6a]of this['_markers'])this['_diffRoots']['get'](_0x129a6a['root']['rootName'])['markers']['set'](_0x4fd351,_0x129a6a['clone']());const _0x5057d4=new Map(),_0x2cef01=new Map();for(const [_0x1fbb8a,_0x2c4dad]of this['_diffRoots'])_0x5057d4['set'](_0x1fbb8a,It(_0x2c4dad)),_0x2cef01['set'](_0x1fbb8a,this['_diffRootsAttributes']['get'](_0x1fbb8a));this['_saveMetaData'](_0x361ada,_0x5057d4,this['_markers'],_0x2cef01);}_getPreviousFrom(_0x901581){const _0x48df8e=Array['from'](this['_savedMetaData']['keys']());_0x48df8e['sort']((_0x5ba43f,_0x5cedb3)=>_0x5ba43f-_0x5cedb3),_0x48df8e['reverse']();for(const _0x11898f of _0x48df8e)if(_0x11898f<_0x901581)return _0x11898f;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x132051,_0x2e789d){const _0x401236=Array['from'](_0x2e789d['markers'])['map'](([_0x28e294,_0xba0ede])=>[_0x28e294,_0x9e12d7(_0xba0ede,_0x132051)]);_0x132051['markers']=new Map(_0x401236);}_transformMarkers(_0x2d6613){for(const _0x3480a0 of this['_markers']['values']()){const _0x533d8f=_0x3480a0['getTransformedByOperation'](_0x2d6613),_0x495c54=_0x54cb06['_createFromRanges'](_0x533d8f);_0x3480a0['start']=_0x495c54['start'],_0x3480a0['end']=_0x495c54['end'];}}_handleOperation(_0x5d264c,_0x15581f){if('addRoot'!=_0x5d264c['type']&&'detachRoot'!=_0x5d264c['type']){if('insert'==_0x5d264c['type']){const _0x29bda0=_0x5d264c['position']['root'],_0x410cc1=_0x29bda0['rootName'],_0x11db4d=_0x29bda0['name'];this['_diffRoots']['has'](_0x410cc1)||(this['_diffRoots']['set'](_0x410cc1,St(_0x410cc1,_0x11db4d,!0x0)),this['_diffRootsAttributes']['set'](_0x410cc1,{}),_0x15581f&&this['_idsRoots']['set'](_0x410cc1,St(_0x410cc1,_0x11db4d,!0x0)));}else{if('addRootAttribute'==_0x5d264c['type']||'removeRootAttribute'==_0x5d264c['type']||'changeRootAttribute'==_0x5d264c['type'])return void this['_handleRootAttributeOperation'](_0x5d264c);'marker'==_0x5d264c['type']&&this['_handleMarkerOperation'](_0x5d264c);}if('marker'!==_0x5d264c['type']){const _0x48f5bd=this['_cloneOperation'](_0x5d264c,this['_diffRoots']);_0x48f5bd['_execute'](),this['_transformMarkers'](_0x48f5bd);}if(_0x15581f)switch(_0x5d264c['type']){case'insert':this['_handleInsertOperation'](_0x5d264c);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5d264c);break;case'merge':this['_handleMergeOperation'](_0x5d264c);break;case'split':this['_handleSplitOperation'](_0x5d264c);}}else this['_handleRootOperation'](_0x5d264c,_0x15581f);}_cloneOperation(_0x49d1d7,_0x34885c){const _0x52f379=_0x49d1d7['clone']();return _0x52f379['_authorId']=_0x49d1d7['_authorId'],_0x52f379['_aiSource']=_0x49d1d7['_aiSource'],_0x52f379['baseVersion']=null,_0x153219(_0x52f379,_0x34885c),_0x52f379;}_getBaseVids(_0x5a5dd4){return _0x5a5dd4['map'](_0x107721=>{const _0xea3177=this['_getVidAttributeName'](_0x107721);return Number(_0x107721['item']['getAttribute'](_0xea3177));});}_generateTape(_0x434f62,_0x130118){if(_0x434f62['is']('element','$text'))_0x130118['push']({'item':_0x434f62,'type':'text'});else{_0x434f62['is']('element')&&_0x130118['push']({'item':_0x434f62,'type':'elementStart'});for(const _0x41d508 of _0x434f62['getChildren']())this['_generateTape'](_0x41d508,_0x130118);_0x434f62['is']('element')&&_0x130118['push']({'item':_0x434f62,'type':'elementEnd'});}return _0x130118;}_getState(){const _0x5e056b=new Map(this['_touched']),_0x2e592c=new Map(_0x5e056b),_0xbf3e34=new Map(),_0x56545d={'insertions':{},'deletions':{}},_0x1dd7fe={'insertions':{},'deletions':{}},_0x3c75aa=new Map(),_0x2094c2=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x18f327=new Map();_0x2094c2['delete']('$graveyard');for(const _0x468e50 of _0x2094c2){const _0x210390=(this['_diffRoots']['get'](_0x468e50)??this['_baseRoots']['get'](_0x468e50))['name'],_0x54d1d2=this['_diffRoots']['get'](_0x468e50)||St(_0x468e50,_0x210390,!0x1),_0x28ba80=this['_baseRoots']['get'](_0x468e50)||St(_0x468e50,_0x210390,!0x1);_0x54d1d2['isAttached']()||_0x28ba80['isAttached']()?(_0x18f327['set'](_0x468e50,_0x210390),_0x56545d['insertions'][_0x468e50]=It(_0x54d1d2),_0x56545d['deletions'][_0x468e50]=It(_0x28ba80),this['_copyMarkers'](_0x56545d['deletions'][_0x468e50],_0x28ba80),this['_copyMarkers'](_0x56545d['insertions'][_0x468e50],_0x54d1d2),_0x1dd7fe['insertions'][_0x468e50]=this['_generateTape'](this['_idsRoots']['get'](_0x468e50),[]),_0x1dd7fe['deletions'][_0x468e50]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x468e50)||St(_0x468e50,_0x210390,!0x1),[])):_0x2094c2['delete'](_0x468e50);}for(const _0x42dd20 of _0x2094c2){const _0xc97982=_0x1dd7fe['insertions'][_0x42dd20];for(const _0x17283a of _0xc97982){const _0x315bd2=this['_getVidAttributeName'](_0x17283a),_0xd8f632=_0x17283a['item']['getAttribute'](_0x315bd2);_0x2e592c['delete'](_0xd8f632),_0xd8f632>=this['_startingRevisionId']&&_0xbf3e34['set'](_0xd8f632,_0x5e056b['get'](_0xd8f632));}}for(const _0x10f361 of _0x2094c2){const _0x143a5f=_0x1dd7fe['insertions'][_0x10f361],_0x5a4b2a=this['_getBaseVids'](_0x1dd7fe['deletions'][_0x10f361]);let _0x5747f1=0x0;for(const _0x33b149 of _0x143a5f){const _0x298ea4=this['_getVidAttributeName'](_0x33b149),_0x21329d=_0x33b149['item']['getAttribute'](_0x298ea4);if(!_0xbf3e34['has'](_0x21329d)&&!_0x3c75aa['has'](_0x21329d)){if(_0x2e592c['has'](_0x21329d))_0x5747f1++;else{if(_0x21329d!=_0x5a4b2a[_0x5747f1]){const _0x56d0e6=_0x5e056b['get'](_0x21329d)||_0x5e056b['get'](_0x5a4b2a[_0x5747f1]);for(;_0x21329d!=_0x5a4b2a[_0x5747f1];)_0x2e592c['has'](_0x5a4b2a[_0x5747f1])||(_0x3c75aa['set'](_0x5a4b2a[_0x5747f1],_0x56d0e6),_0x5e056b['set'](_0x5a4b2a[_0x5747f1],_0x56d0e6)),_0x5747f1++;}_0x5747f1++;}}}}for(const _0x5d4c8a of _0x2094c2){const _0x12599f=_0x1dd7fe['insertions'][_0x5d4c8a];for(const _0x3b5e72 of _0x12599f){const _0xf8371a=this['_getVidAttributeName'](_0x3b5e72),_0x530fb8=_0x3b5e72['item']['getAttribute'](_0xf8371a);if(_0x3c75aa['has'](_0x530fb8)){const _0xf219c=_0x3c75aa['get'](_0x530fb8);_0x2e592c['has'](_0x530fb8)||_0x2e592c['set'](_0x530fb8,{..._0xf219c}),_0xbf3e34['set'](_0x530fb8,{..._0xf219c});}}}for(const _0x4803cf of _0x2e592c['keys']())_0x4803cf>=this['_startingRevisionId']&&_0x2e592c['delete'](_0x4803cf);const _0x42ebd3=new Map();for(const _0x4b59b5 of _0x2094c2){let _0x1b2e7e=_0x1dd7fe['insertions'][_0x4b59b5];for(const _0x45304b of _0x1b2e7e)if(_0x45304b['item']['is']('element','tableCell')){const _0xece137=this['_getVidAttributeName'](_0x45304b),_0x26cf2c=_0x45304b['item']['getAttribute'](_0xece137);if(_0xbf3e34['has'](_0x26cf2c)){const _0x4f4bd5=_0x45304b['item']['parent']['parent']['getAttribute']('vid_start'),_0x403f6c=_0xbf3e34['get'](_0x26cf2c),_0x2c24ef=_0x42ebd3['get'](_0x4f4bd5)||{'users':new Set(),'aiSource':null};_0x2c24ef['users']['add'](_0x403f6c['userId']),_0x2c24ef['aiSource']=_0x2c24ef['aiSource']||_0x403f6c['aiSource']||null,_0x42ebd3['set'](_0x4f4bd5,_0x2c24ef);}}_0x1b2e7e=_0x1dd7fe['deletions'][_0x4b59b5];for(const _0x4434b1 of _0x1b2e7e)if(_0x4434b1['item']['is']('element','tableCell')){const _0x383b3e=this['_getVidAttributeName'](_0x4434b1),_0x1281d6=_0x4434b1['item']['getAttribute'](_0x383b3e);if(_0x2e592c['has'](_0x1281d6)){const _0x4424e3=_0x4434b1['item']['parent']['parent']['getAttribute']('vid_start'),_0x1fbe39=_0x2e592c['get'](_0x1281d6),_0x311d78=_0x42ebd3['get'](_0x4424e3)||{'users':new Set(),'aiSource':null};_0x311d78['users']['add'](_0x1fbe39['userId']),_0x311d78['aiSource']=_0x311d78['aiSource']||_0x1fbe39['aiSource']||null,_0x42ebd3['set'](_0x4424e3,_0x311d78);}}for(const _0x230162 of _0x42ebd3['keys']())(_0xbf3e34['has'](_0x230162)||_0x2e592c['has'](_0x230162))&&_0x42ebd3['delete'](_0x230162);}for(const _0x377ee7 of _0x2094c2){const _0x5de934=_0x1dd7fe['insertions'][_0x377ee7];let _0x5ed98c=null,_0x513407=null,_0x43dfad=null;for(const _0x3ec71a of _0x5de934){const _0x51072a=this['_getVidAttributeName'](_0x3ec71a),_0x25b5c7=_0x3ec71a['item']['getAttribute'](_0x51072a),_0x3c0536=_0x42ebd3['get'](_0x25b5c7);if(_0x3c0536&&'elementStart'==_0x3ec71a['type']&&(_0x5ed98c=Array['from'](_0x3c0536['users'])[0x0],_0x513407=_0x3c0536['aiSource'],_0x43dfad=_0x3ec71a['item']['getAttribute']('vid_end')),_0x5ed98c){const _0x2caf62=_0x513407||_0x2e592c['get'](_0x25b5c7)?.['aiSource']||null,_0x45b545=_0x513407||_0xbf3e34['get'](_0x25b5c7)?.['aiSource']||null;_0x2e592c['set'](_0x25b5c7,{'userId':_0x5ed98c,'aiSource':_0x2caf62}),_0xbf3e34['set'](_0x25b5c7,{'userId':_0x5ed98c,'aiSource':_0x45b545});}_0x25b5c7==_0x43dfad&&(_0x5ed98c=null,_0x43dfad=null);}}const _0x350529={},_0x2e9ceb=new Set();for(const _0x51e978 of _0x2094c2){const _0x335f6c=_0x56545d['deletions'][_0x51e978],_0x4e242c=_0x56545d['insertions'][_0x51e978];for(const {userId:_0x165eaa}of this['_touchedMarkers']['values']())null!==_0x165eaa&&_0x2e9ceb['add'](_0x165eaa);for(const {userId:_0xf08642}of this['_touchedRoots']['values']())null!==_0xf08642&&_0x2e9ceb['add'](_0xf08642);const _0xa9dc76={};this['_markChanges'](_0x4e242c,_0x1dd7fe['insertions'][_0x51e978],_0xbf3e34,'insertion',_0x2e9ceb,_0xa9dc76),this['_markChanges'](_0x335f6c,_0x1dd7fe['deletions'][_0x51e978],_0x2e592c,'deletion',_0x2e9ceb,_0xa9dc76),this['_collectSuggestionAiSources'](_0x4e242c,_0xa9dc76),this['_collectSuggestionAiSources'](_0x335f6c,_0xa9dc76),_0x350529[_0x51e978]={'insertions':this['_prepareViewToSave'](_0x4e242c),'deletions':this['_prepareViewToSave'](_0x335f6c),'attachChange':this['_touchedRoots']['get'](_0x51e978)||null,'attributesBefore':_0x3ef3d4(this['_baseRootsAttributes']['get'](_0x51e978))||{},'attributesAfter':_0x3ef3d4(this['_diffRootsAttributes']['get'](_0x51e978)),'rootElementName':_0x18f327['get'](_0x51e978),'aiSources':_0xa9dc76};}const _0x3e3ac8=Array['from'](_0xbf3e34['values']())['some'](_0x1f550c=>!(!_0x1f550c||!_0x1f550c['aiSource']))||Array['from'](_0x2e592c['values']())['some'](_0x3dd418=>!(!_0x3dd418||!_0x3dd418['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x1b1a32=>this['_aiTouchedMarkers']['has'](_0x1b1a32));return{'diffData':_0x350529,'authorsIds':Array['from'](_0x2e9ceb),'hasAIChanges':_0x3e3ac8};}_collectSuggestionAiSources(_0x1ad1e3,_0x5727b6){const _0x4f5a46=_0x1ad1e3['markers'];for(const _0x5e470b of _0x4f5a46['keys']()){if(!_0x5e470b['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x5e470b))continue;const _0x292f58=this['_aiTouchedMarkers']['get'](_0x5e470b);_0x292f58&&(_0x5727b6[_0x5e470b]=_0x292f58);}}_processRootBeforeSave(_0x1c3373){for(const [,_0x3428ed]of _0x1c3373['markers']){const _0x575d71=_0x3428ed['start']['getAncestors']()['filter'](_0x36b0d0=>'tableCell'==_0x36b0d0['name']);for(const _0x1815f2 of _0x575d71)0x1==_0x1815f2['childCount']&&_0x1815f2['getChild'](0x0)['is']('element','paragraph')&&_0x1815f2['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x107d60){this['_processRootBeforeSave'](_0x107d60);const _0x450c30=this['editor']['data']['toView'](_0x107d60,{}),_0x2553a4=Array['from'](_0x450c30['getChildren']())['map'](_0xe5845c=>this['_getViewJson'](_0xe5845c));return JSON['stringify'](_0x2553a4);}_getViewJson(_0x339b0e){if(_0x339b0e['is']('$text'))return _0x339b0e['data'];{const _0x31cc67=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1b530e=_0x339b0e,_0x3483f4=this['editor']['data']['htmlProcessor']['domConverter'],_0x32d80a={'type':_0x31cc67['_getTypeCharForViewElement'](_0x1b530e),'name':_0x1b530e['name'],'attributes':Array['from'](_0x1b530e['getAttributes']()),'children':Array['from'](_0x1b530e['getChildren']())['map'](_0x58bf88=>this['_getViewJson'](_0x58bf88))};if(_0x339b0e['is']('uiElement')&&'$comment'!=_0x339b0e['name']){const _0x2c0279=_0x339b0e['render'](_0x3483f4['domDocument'],_0x3483f4);_0x32d80a['children']['push'](_0x2c0279['outerHTML']);}else{if(_0x339b0e['is']('rawElement')){const _0x4055a4=_0x3483f4['domDocument']['createElement'](_0x1b530e['name']);_0x339b0e['render'](_0x4055a4,_0x3483f4),_0x32d80a['children']['push'](_0x4055a4['innerHTML']);}}const _0x326aec=Array['from'](_0x1b530e['getCustomProperties']());_0x326aec['length']>0x0&&(_0x32d80a['customProperties']=_0x326aec);const _0x579385=_0x1b530e['getFillerOffset']();return null!==_0x579385&&(_0x32d80a['fillerOffset']=_0x579385),_0x32d80a;}}['_markChanges'](_0xbe6a2c,_0x25812a,_0xa71113,_0x266914,_0x3df8e8,_0x2fcc34){let _0x57a277=null,_0x4ecd91=null,_0x5a01c1=0x0;const _0x5a7a1c=this['editor']['model'];for(let _0x217055=0x0;_0x217055<_0x25812a['length'];_0x217055++){const _0x134afc=this['_getVidAttributeName'](_0x25812a[_0x217055]),_0x57c61b=_0x25812a[_0x217055]['item']['getAttribute'](_0x134afc),_0x3a18dd=_0xa71113['get'](_0x57c61b),_0x3966b5=_0x217055==_0x25812a['length']-0x1;!_0x57a277&&_0x3a18dd&&(_0x57a277=_0x3a18dd,_0x4ecd91=_0x25812a[_0x217055]);const _0x33ae51=!!_0x57a277&&!!_0x3a18dd&&_0x3a18dd['userId']!=_0x57a277['userId'],_0x1edb4e=!!_0x57a277&&!!_0x3a18dd&&_0x3a18dd['aiSource']!=_0x57a277['aiSource'];_0x57a277&&(!_0x3a18dd||_0x33ae51||_0x1edb4e)&&(_0x4b3094(_0x3a18dd,Et(_0x4ecd91,_0xbe6a2c,_0x5a7a1c),Et(_0x25812a[_0x217055],_0xbe6a2c,_0x5a7a1c)),_0x57a277=_0x3a18dd||null,_0x4ecd91=_0x3a18dd?_0x25812a[_0x217055]:null),_0x57a277&&_0x3966b5&&_0x4b3094(_0x3a18dd,Et(_0x4ecd91,_0xbe6a2c,_0x5a7a1c),Ot(_0x25812a[_0x217055],_0xbe6a2c,_0x5a7a1c));}function _0x4b3094(_0x15b7ec,_0x54a7ce,_0x506900){const _0x3cf19b=_0x57a277['userId'],_0x385bb2=_0x57a277['aiSource'],_0x52eaf8='revision:'+_0x266914+':'+_0x3cf19b+':'+_0x5a01c1++,_0x124010=_0x5a7a1c['createRange'](_0x54a7ce,_0x506900);_0xbe6a2c['markers']['set'](_0x52eaf8,_0x124010),_0x385bb2&&(_0x2fcc34[_0x52eaf8]=_0x385bb2),null!==_0x3cf19b&&_0x3df8e8['add'](_0x3cf19b);}}_getVidAttributeName(_0x2df8b2){switch(_0x2df8b2['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x250305){const _0x11ad12=this['_idsRoots']['get'](_0x250305['position']['root']['rootName']),_0x34b3fd=_0x1ef4a1(_0x250305['position'],_0x11ad12),_0x2fca9e=null===_0x250305['_authorId']?null:_0x250305['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x52c5b3=_0x250305['_aiSource']||null,_0x26b05d=_0x34b3fd['parent'],_0x3244d0=this['_revisionId'],_0x2f4b11=[];for(const _0x2cc5a1 of _0x250305['nodes'])if(_0x2cc5a1['is']('element'))_0x2f4b11['push'](this['_makeIdsRoot'](_0x2cc5a1));else{for(let _0x460ef7=0x0;_0x460ef7<_0x2cc5a1['offsetSize'];_0x460ef7++)_0x2f4b11['push'](new _0x51c9e7('$text',{'vid':this['_revisionId']++}));}const _0x1ce3ed=this['_revisionId'];for(let _0x30810d=_0x3244d0;_0x30810d<_0x1ce3ed;_0x30810d++)this['_touched']['set'](_0x30810d,{'userId':_0x2fca9e,'aiSource':_0x52c5b3});_0x26b05d['_insertChild'](_0x34b3fd['offset'],_0x2f4b11);}_setTouched(_0x183955,_0x270e43,_0x2b188b){this['_touched']['set'](_0x183955,{'userId':_0x270e43,'aiSource':_0x2b188b||this['_touched']['get'](_0x183955)?.['aiSource']||null});}_handleMoveOperation(_0x56efc9){(_0x56efc9=this['_cloneOperation'](_0x56efc9,this['_idsRoots']))['_execute']();const _0x1decab=null===_0x56efc9['_authorId']?null:_0x56efc9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x249318=_0x56efc9['_aiSource']||null,_0x3f8322=_0x56efc9['getMovedRangeStart'](),_0x595229=_0x3f8322['parent'],_0x197527=_0x3f8322['offset'],_0x335013=(_0x59d563,_0x2c59ef,_0x6a8684)=>{for(let _0x3aa278=_0x2c59ef;_0x3aa278<_0x6a8684;_0x3aa278++){const _0x16c0f5=_0x59d563['getChild'](_0x3aa278);_0x16c0f5['is']('element','$text')?this['_setTouched'](_0x16c0f5['getAttribute']('vid'),_0x1decab,_0x249318):(this['_setTouched'](_0x16c0f5['getAttribute']('vid_start'),_0x1decab,_0x249318),_0x335013(_0x16c0f5,0x0,_0x16c0f5['childCount']),this['_setTouched'](_0x16c0f5['getAttribute']('vid_end'),_0x1decab,_0x249318));}};_0x335013(_0x595229,_0x197527,_0x197527+_0x56efc9['howMany']);}_handleMergeOperation(_0xe4657e){const _0x566a13=null===(_0xe4657e=this['_cloneOperation'](_0xe4657e,this['_idsRoots']))['_authorId']?null:_0xe4657e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f98e7=_0xe4657e['_aiSource']||null,_0x51e478=_0xe4657e['targetPosition']['parent'],_0x2d78a2=_0xe4657e['sourcePosition']['parent'],_0x4226b9=_0x51e478['getAttribute']('vid_end'),_0x3940ae=_0x2d78a2['getAttribute']('vid_start');_0x51e478['_setAttribute']('vid_end',_0x2d78a2['getAttribute']('vid_end')),_0x2d78a2['_setAttribute']('vid_end',_0x4226b9),this['_setTouched'](_0x3940ae,_0x566a13,_0x1f98e7),this['_setTouched'](_0x4226b9,_0x566a13,_0x1f98e7),_0xe4657e['_execute']();}_handleSplitOperation(_0x2ff5af){const _0x341368=null===(_0x2ff5af=this['_cloneOperation'](_0x2ff5af,this['_idsRoots']))['_authorId']?null:_0x2ff5af['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37dc80=_0x2ff5af['_aiSource']||null,_0x1557a1=_0x2ff5af['graveyardPosition'],_0x16a100=_0x2ff5af['splitPosition']['parent'];_0x2ff5af['_execute']();const _0x2b9da0=_0x16a100['getAttribute']('vid_end'),_0x42498d=_0x2ff5af['insertionPosition']['nodeAfter'];if(_0x1557a1){const _0x4b4e56=_0x42498d['getAttribute']('vid_end'),_0x2ef88e=_0x16a100['getAttribute']('vid_end');_0x16a100['_setAttribute']('vid_end',_0x4b4e56),_0x42498d['_setAttribute']('vid_end',_0x2ef88e),this['_setTouched'](_0x16a100['getAttribute']('vid_end'),_0x341368,_0x37dc80),this['_setTouched'](_0x42498d['getAttribute']('vid_start'),_0x341368,_0x37dc80);}else{const _0x5d955e=this['_revisionId']++,_0xe1c782=this['_revisionId']++;_0x16a100['_setAttribute']('vid_end',_0x5d955e),_0x42498d['_setAttribute']('vid_start',_0xe1c782),_0x42498d['_setAttribute']('vid_end',_0x2b9da0),this['_setTouched'](_0x5d955e,_0x341368,_0x37dc80),this['_setTouched'](_0xe1c782,_0x341368,_0x37dc80);}}_handleMarkerOperation(_0x35cd1c){if(!_0x35cd1c['affectsData'])return;const _0x3b30b0=(_0x35cd1c=this['_cloneOperation'](_0x35cd1c,this['_diffRoots']))['oldRange']?_0x35cd1c['oldRange']['root']:null,_0x1e7dd5=_0x35cd1c['newRange']?_0x35cd1c['newRange']['root']:null;_0x3b30b0&&this['_markers']['delete'](_0x35cd1c['name']),_0x1e7dd5&&this['_markers']['set'](_0x35cd1c['name'],_0x35cd1c['newRange']['clone']());const _0xbc3675=null===_0x35cd1c['_authorId']?null:_0x35cd1c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1afb36=_0x35cd1c['name'];if(_0x35cd1c['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x1afb36,_0x35cd1c['_aiSource']),!this['_touchedMarkers']['has'](_0x1afb36))return void this['_touchedMarkers']['set'](_0x1afb36,{'range':_0x35cd1c['oldRange'],'userId':_0xbc3675});const _0x43ec55=this['_touchedMarkers']['get'](_0x1afb36),_0x300aaf=_0x43ec55['range'],_0x18c54a=_0x35cd1c['newRange'];null==_0x300aaf&&null==_0x18c54a||_0x300aaf&&_0x18c54a&&_0x300aaf['isEqual'](_0x18c54a)?this['_touchedMarkers']['delete'](_0x35cd1c['name']):_0x43ec55['userId']=_0xbc3675;}_handleRootOperation(_0x26dd8b,_0x134a06){this['_diffRoots']['has'](_0x26dd8b['rootName'])?this['_diffRoots']['get'](_0x26dd8b['rootName'])['_isAttached']=_0x26dd8b['isAdd']:(this['_diffRoots']['set'](_0x26dd8b['rootName'],St(_0x26dd8b['rootName'],_0x26dd8b['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x26dd8b['rootName'],{}),_0x134a06&&this['_idsRoots']['set'](_0x26dd8b['rootName'],St(_0x26dd8b['rootName'],_0x26dd8b['elementName'],!0x0)));const _0x3e494a=null===_0x26dd8b['_authorId']?null:_0x26dd8b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5a365f=this['_touchedRoots']['get'](_0x26dd8b['rootName']);_0x5a365f&&_0x5a365f['userId']===_0x3e494a?this['_touchedRoots']['delete'](_0x26dd8b['rootName']):this['_touchedRoots']['set'](_0x26dd8b['rootName'],{'userId':_0x3e494a,'isAttached':_0x26dd8b['isAdd']});}_handleRootAttributeOperation(_0x4e6ade){const _0x2fbd7f=this['_diffRootsAttributes']['get'](_0x4e6ade['root']['rootName']);null===_0x4e6ade['newValue']?delete _0x2fbd7f[_0x4e6ade['key']]:_0x2fbd7f[_0x4e6ade['key']]=_0x4e6ade['newValue'];}};function It(_0x3487d5){const _0x5a1bd1=St(_0x3487d5['rootName'],_0x3487d5['name'],_0x3487d5['isAttached']());for(const _0x5d9c33 of _0x3487d5['getChildren']()){const _0x25c170=_0x5d9c33['_clone'](!0x0);_0x5a1bd1['_appendChild'](_0x25c170);}return _0x5a1bd1;}function St(_0x358bcf,_0x2d2798,_0x1ab712=!0x0){const _0x17ba5f=new _0x3e4772();return _0x17ba5f['rootName']=_0x358bcf,_0x17ba5f['name']=_0x2d2798,_0x17ba5f['_isAttached']=_0x1ab712,_0x17ba5f['isAttached']=()=>_0x17ba5f['_isAttached'],_0x17ba5f;}function Et(_0x3752bd,_0x1b7aa6,_0x3f9cbf){const _0x117fb8='elementEnd'==_0x3752bd['type']?_0x3f9cbf['createPositionAt'](_0x3752bd['item'],'end'):_0x3f9cbf['createPositionBefore'](_0x3752bd['item']);return _0x3f9cbf['createPositionFromPath'](_0x1b7aa6,_0x117fb8['path'],_0x117fb8['stickiness']);}function Ot(_0x4b1f1c,_0x5770ee,_0x3c36b7){const _0x57b5b9='elementStart'==_0x4b1f1c['type']?_0x3c36b7['createPositionAt'](_0x4b1f1c['item'],0x0):_0x3c36b7['createPositionAfter'](_0x4b1f1c['item']);return _0x3c36b7['createPositionFromPath'](_0x5770ee,_0x57b5b9['path'],_0x57b5b9['stickiness']);}const Ct=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x306d61();var Tt=class extends Vt{['id'];author;type;data;rootName;constructor(_0x1bfb04){super(),this['id']=_0x1bfb04['id']||_0xd43831(),this['author']=_0x1bfb04['author'],this['type']=_0x1bfb04['type'],this['data']=_0x1bfb04['data']||{},this['rootName']=_0x1bfb04['rootName'],this['set']('createdAt',_0x1bfb04['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Mt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x2f4cca,_0xc7ecd9){this['newRevisionId']=_0x2f4cca,this['oldRevisionId']=_0xc7ecd9,this['changes']=new _0x17289a();}_setChanges(_0x15763d){for(const _0x22ef46 of _0x15763d)this['changes']['add'](_0x22ef46);}},Ht=class extends _0x5ca6f9{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0xe140c3,_0x408baa,yt,bt];}constructor(_0x1b97b2){super(_0x1b97b2),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',(_0x4255fb,_0x3bd92b,_0xbc4bdf)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3a0f2f=>{for(const _0x16541d of this['editor']['editing']['view']['document']['roots'])_0xbc4bdf?_0x3a0f2f['removeClass']('ck-editor__editable__overlay',_0x16541d):_0x3a0f2f['addClass']('ck-editor__editable__overlay',_0x16541d);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x522c1b=>null!==_0x522c1b),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x491798,_0x45ced7,_0x19f92d)=>_0x491798&&_0x19f92d?_0x45ced7['changes']['getIndex'](_0x19f92d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x45f6f2,_0x59fa1e)=>_0x45f6f2?_0x59fa1e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x408baa),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x5efb74=this['editor'],_0x282795=new Ft(_0x5efb74,{'direction':'backward'}),_0x2bde64=new Ft(_0x5efb74,{'direction':'forward'});_0x5efb74['commands']['add']('showPreviousChange',_0x282795),_0x5efb74['commands']['add']('showNextChange',_0x2bde64),_0x5efb74['commands']['add']('restoreRevision',new Lt(_0x5efb74)),this['on']('change:numberOfChanges',()=>{_0x282795['refresh'](),_0x2bde64['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5efb74['enableReadOnlyMode']('revision-viewer'),_0x5efb74['plugins']['has']('WidgetToolbarRepository')&&_0x5efb74['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x10f60a){return await this['_utils']['loadRevisionData'](_0x10f60a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x10f60a);}async getRevisionRootsAttributes(_0x565993){return await this['_utils']['loadRevisionData'](_0x565993,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x565993);}async['compare'](_0x2a6a96,_0x42145b,_0x451a87=!0x1){if(!this['isEnabled'])return;const _0xc8fe2b=this['diff'],_0x3d0c03=this['repository'],_0x53c1c5='string'==typeof _0x2a6a96?_0x3d0c03['getRevision'](_0x2a6a96):_0x2a6a96,_0x240ba5='string'==typeof _0x42145b?_0x3d0c03['getRevision'](_0x42145b):_0x42145b,_0x3b2ce8=_0x53c1c5['id'],_0x266aba=_0x240ba5?_0x240ba5['id']:null;if(!_0x451a87&&this['diff']&&this['diff']['newRevisionId']===_0x3b2ce8&&this['diff']['oldRevisionId']===_0x266aba)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Mt(_0x3b2ce8,_0x266aba);const _0x5dc4f7=this['_getRevisionsRange'](_0x53c1c5,_0x240ba5,!0x0)['map'](_0x176a24=>this['_utils']['loadRevisionData'](_0x176a24,this['adapter']));return _0x5dc4f7['push'](new Promise(_0x7ff036=>{setTimeout(_0x7ff036,0x14);})),Promise['all'](_0x5dc4f7)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x173cfc=this['_getDiff'](_0x3b2ce8,_0x266aba);this['_cleanUpCommentMarkers'](_0x173cfc);for(const _0x2ccc67 of _0x173cfc['changes'])this['_changeIdToChange']['set'](_0x2ccc67['id'],_0x2ccc67);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x37ae99=>{for(const _0x57618d of this['editor']['model']['document']['getRootNames']())_0x37ae99['detachRoot'](_0x57618d);for(const _0x4ca9c2 of Object['keys'](_0x173cfc['model'])){const _0x1dfa63=_0x173cfc['model'][_0x4ca9c2]['name'],_0x1f8d59=_0x37ae99['addRoot'](_0x4ca9c2,_0x1dfa63);for(const _0x1344ed of Object['keys'](_0x173cfc['attributes'][_0x4ca9c2]))_0x37ae99['setAttribute'](_0x1344ed,_0x173cfc['attributes'][_0x4ca9c2][_0x1344ed],_0x1f8d59);_0x37ae99['insert'](_0x173cfc['model'][_0x4ca9c2],_0x1f8d59,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x173cfc['changes'])),this['isReady']=!0x0;})['catch'](_0x3a0ed6=>{console['error'](_0x3a0ed6),this['_cleanUp'](),_0xc8fe2b&&(this['diff']=_0xc8fe2b),this['isReady']=!0x0;});}addRevisionData(_0x5ef84a,_0x2077c2){const _0x45492a=this['repository']['createRevision'](_0x5ef84a);return _0x45492a['on']('_update',(_0x536772,_0xdb317e,_0x306af7)=>_0x2077c2(_0xdb317e,_0x306af7,_0x45492a)),this['repository']['addRevision'](_0x45492a),_0x45492a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4749f2=>{for(const _0x32824e of this['editor']['model']['document']['getRootNames']())_0x4749f2['detachRoot'](_0x32824e);});}_cleanUpCommentMarkers(_0x411648){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x96ada1=this['_getVisibleCommentThreadIds']();for(const _0x4b38b7 of Object['values'](_0x411648['model']))for(const _0x4b1465 of Array['from'](_0x4b38b7['markers']['keys']()))_0x4b1465['startsWith']('revision-comment:')&&!_0x96ada1['has'](Pt(_0x4b1465))&&_0x4b38b7['markers']['delete'](_0x4b1465);}_sortAndFilterDiffChanges(_0xb2855){const _0xfddf79=[],_0x493463=new Map();for(const _0x1fcb5e of this['editor']['model']['document']['getRootNames']()){const _0x2bd8b0=this['editor']['editing']['view']['getDomRoot'](_0x1fcb5e);if(!_0x2bd8b0)continue;const _0x3a91e1=_0x2bd8b0['getClientRects']()['item'](0x0);_0x3a91e1&&(_0xfddf79['push'](_0x1fcb5e),_0x493463['set'](_0x1fcb5e,_0x3a91e1));}return _0xfddf79['sort']((_0x52015e,_0x282de6)=>{const _0x4033a1=_0x493463['get'](_0x52015e),_0x1887f9=_0x493463['get'](_0x282de6);return _0x4033a1['y']-_0x1887f9['y']||_0x4033a1['x']-_0x1887f9['x'];}),(_0xb2855=_0xb2855['filter'](_0x58ddca=>_0xfddf79['includes'](_0x58ddca['rootName'])))['sort']((_0x570cc6,_0x5ae820)=>_0xfddf79['indexOf'](_0x570cc6['rootName'])-_0xfddf79['indexOf'](_0x5ae820['rootName'])),_0xb2855;}['_makeTape'](_0x4be07e,_0x281512={}){const _0x1cf265=Array['from'](_0x4be07e['markers'])['filter'](([_0x37823b,_0x433c29])=>_0x37823b['startsWith']('revision:')&&!_0x433c29['isCollapsed']),_0xfa353d=Array['from'](this['editor']['model']['createRangeIn'](_0x4be07e)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1cf265['length'])for(const _0x535432 of _0xfa353d){const [_0x3be031,_0xc99d58]=_0x1cf265[0x0],[,_0x556f35,_0x19beef]=_0x3be031['split'](':'),_0x5a1126=_0x281512[_0x3be031]||null;if(_0xc99d58['end']['isEqual'](_0x535432['nextPosition'])&&_0x1cf265['shift'](),(_0x535432['previousPosition']['isEqual'](_0xc99d58['start'])||_0x535432['previousPosition']['isAfter'](_0xc99d58['start']))&&('insertion'==_0x556f35?_0x535432['isAdded']={'userId':_0x19beef,'aiSource':_0x5a1126}:'deletion'==_0x556f35&&(_0x535432['isRemoved']={'userId':_0x19beef,'aiSource':_0x5a1126})),0x0==_0x1cf265['length'])break;}return _0xfa353d;}_refreshStartEndIndex(_0x47f14c){const _0x19da0e=new Map();for(let _0x201b1c=0x0;_0x201b1c<_0x47f14c['length'];_0x201b1c++)'text'===_0x47f14c[_0x201b1c]['type']?(_0x47f14c[_0x201b1c]['item']['startIndex']=_0x201b1c,_0x47f14c[_0x201b1c]['item']['endIndex']=_0x201b1c):('elementStart'===_0x47f14c[_0x201b1c]['type']?_0x47f14c[_0x201b1c]['item']['startIndex']=_0x201b1c:'elementEnd'===_0x47f14c[_0x201b1c]['type']&&(_0x47f14c[_0x201b1c]['item']['endIndex']=_0x201b1c),_0x19da0e['set'](_0x47f14c[_0x201b1c]['id'],_0x201b1c));for(const _0x538947 of _0x19da0e['values']())'elementStart'===_0x47f14c[_0x538947]['type']?_0x47f14c[_0x538947]['item']['endIndex']=_0x19da0e['get'](_0x47f14c[_0x538947]['pairId']):'elementEnd'===_0x47f14c[_0x538947]['type']&&(_0x47f14c[_0x538947]['item']['startIndex']=_0x19da0e['get'](_0x47f14c[_0x538947]['pairId']));}['_processTape'](_0x552ace){for(let _0x3ee3b6=0x0;_0x3ee3b6<_0x552ace['length'];_0x3ee3b6++){if('elementStart'===_0x552ace[_0x3ee3b6]['type'])_0x552ace[_0x3ee3b6]['item']['startIndex']=_0x3ee3b6;else{if('elementEnd'===_0x552ace[_0x3ee3b6]['type']){_0x552ace[_0x3ee3b6]['item']['endIndex']=_0x3ee3b6;const _0x5c790c=_0x552ace[_0x3ee3b6]['item']['startIndex'];_0x552ace[_0x5c790c]['pairId']=_0x552ace[_0x3ee3b6]['id'],_0x552ace[_0x3ee3b6]['pairId']=_0x552ace[_0x5c790c]['id'];}else _0x552ace[_0x3ee3b6]['item']['startIndex']=_0x3ee3b6,_0x552ace[_0x3ee3b6]['item']['endIndex']=_0x3ee3b6,_0x552ace[_0x3ee3b6]['pairId']=null;}_0x552ace[_0x3ee3b6]['markersStart']||(_0x552ace[_0x3ee3b6]['markersStart']=[],_0x552ace[_0x3ee3b6]['markersEnd']=[]);}}_markInsertions(_0x112f9d,_0x4dfacb){const _0x377ca2=_0x112f9d['filter'](_0x2cb24c=>!_0x2cb24c['isAdded']);for(let _0x210df2=0x0;_0x210df2<_0x4dfacb['length'];_0x210df2++)_0x4dfacb[_0x210df2]['isAdded']&&(_0x377ca2[_0x210df2]['isAdded']=_0x4dfacb[_0x210df2]['isAdded']);}_getDiff(_0x53fbdb,_0x21bccc=null){const _0x73685=this['repository']['getRevision'](_0x53fbdb),_0x2c0eb0=_0x21bccc?this['repository']['getRevision'](_0x21bccc):null,_0x400932=this['_getRevisionsRange'](_0x73685,_0x2c0eb0),_0x477b57=_0x400932[_0x400932['length']-0x1],_0x4f49f0=new Map(),_0x44a752={'model':{},'attributes':{},'changes':[]},_0x29e97a=new Set(),_0x4427be=new Map();for(let _0x17ea4f=_0x400932['length']-0x1;_0x17ea4f>=0x0;_0x17ea4f--){const _0x540f08=_0x400932[_0x17ea4f];for(const _0x51d7ca of Object['keys'](_0x540f08['diffData']))if(_0x540f08['diffData'][_0x51d7ca]['attachChange']){const _0x265414=_0x540f08['diffData'][_0x51d7ca]['attachChange'];_0x265414['isAttached']?(_0x29e97a['add'](_0x51d7ca),_0x4427be['has'](_0x51d7ca)&&_0x4427be['get'](_0x51d7ca)['userId']==_0x265414['userId']?_0x4427be['delete'](_0x51d7ca):_0x4427be['set'](_0x51d7ca,_0x265414)):_0x4427be['has'](_0x51d7ca)?(_0x29e97a['delete'](_0x51d7ca),_0x4427be['delete'](_0x51d7ca)):(_0x29e97a['add'](_0x51d7ca),_0x4427be['set'](_0x51d7ca,_0x265414));}else _0x29e97a['add'](_0x51d7ca);}for(const _0x229b75 of _0x29e97a){const _0x138395=_0x4427be['has'](_0x229b75)&&!_0x4427be['get'](_0x229b75)['isAttached'];let _0x212940=_0x138395?_0x400932['length']-0x1:0x0;const _0x5c46a6=_0x138395?-0x1:0x1;for(;_0x400932[_0x212940];){const _0x570b02=_0x400932[_0x212940];if(_0x570b02['diffData'][_0x229b75]){const _0x250b61=_0x138395?_0x570b02['diffData'][_0x229b75]['attributesBefore']:_0x570b02['diffData'][_0x229b75]['attributesAfter'];_0x44a752['attributes'][_0x229b75]=_0x250b61?_0x3ef3d4(_0x250b61):{};break;}_0x212940+=_0x5c46a6;}}for(const _0x2af2b3 of _0x400932){_0x2af2b3['model']={};for(const _0x14760d of _0x2af2b3['authors'])_0x4f49f0['set'](_0x14760d['id'],_0x14760d);for(const _0x10dea5 of _0x29e97a){const _0x17eb42=_0x2af2b3['diffData'][_0x10dea5]?_0x2af2b3['diffData'][_0x10dea5]['insertions']:'[]',_0x15d276=_0x2af2b3['diffData'][_0x10dea5]?_0x2af2b3['diffData'][_0x10dea5]['deletions']:'[]',_0x1dd01e=_0x2af2b3['diffData'][_0x10dea5]?.['rootElementName']||'$root';_0x2af2b3['model'][_0x10dea5]={'insertions':this['_utils']['_makeModelFromViewString'](_0x17eb42,_0x1dd01e),'deletions':this['_utils']['_makeModelFromViewString'](_0x15d276,_0x1dd01e)};}}for(const _0x426974 of _0x29e97a){let _0x27b6c2=null,_0x540ef5=0x0;const _0x3383a2=_0x400932['map'](_0x2adfa9=>_0x2adfa9['diffData'][_0x426974]?.['rootElementName'])['find'](_0x3adc44=>void 0x0!==_0x3adc44)||'$root',_0x17e53a=new Map(Array['from'](_0x73685['model'][_0x426974]['insertions']['markers'])['filter'](([_0x3a3df9])=>!_0x3a3df9['startsWith']('revision:')));let _0x44dee0=0x0;for(const _0x5c8e0c of _0x400932){const _0x2afe9a=_0x5c8e0c['diffData'][_0x426974]?.['aiSources']||{},_0x24a950=this['_makeTape'](_0x5c8e0c['model'][_0x426974]['insertions'],_0x2afe9a);_0x5c8e0c==_0x73685?(_0x27b6c2=_0x24a950,_0x540ef5=_0x27b6c2['length'],_0x27b6c2['forEach'](_0x58df02=>{_0x58df02['id']=_0x44dee0++;}),this['_processTape'](_0x27b6c2)):this['_markInsertions'](_0x27b6c2,_0x24a950);const _0x51fa4a=_0x27b6c2['filter'](_0x583705=>!_0x583705['isAdded'])['map'](_0x387bc9=>_0x387bc9['id']);let _0x1c229c=0x0;const _0x113b8e=this['_makeTape'](_0x5c8e0c['model'][_0x426974]['deletions'],_0x2afe9a);_0x113b8e['forEach'](_0x19eec0=>{_0x19eec0['isRemoved']?_0x19eec0['id']=_0x540ef5++:_0x19eec0['id']=_0x51fa4a[_0x1c229c++];}),this['_processTape'](_0x113b8e),this['_setDistance'](_0x27b6c2,'isAdded'),this['_setDistance'](_0x113b8e,'isRemoved'),_0x5c8e0c==_0x73685&&this['_markMarkers'](_0x27b6c2,_0x17e53a),_0x27b6c2=this['_joinTapes'](_0x27b6c2,_0x113b8e),this['_refreshStartEndIndex'](_0x27b6c2),this['_setDistance'](_0x27b6c2,'isRemoved');}_0x27b6c2=_0x27b6c2['filter'](_0x2532a6=>!(_0x2532a6['isAdded']&&_0x2532a6['isRemoved']));const _0x22017d=new Map(_0x477b57['model'][_0x426974]['deletions']['markers']),_0xd5c3b0=new Set(_0x17e53a['keys']());for(const _0x451e71 of _0x22017d['keys']())_0xd5c3b0['delete'](_0x451e71);const _0xa96901=Object['assign']({},..._0x400932['map'](_0x63cbce=>_0x63cbce['diffData'][_0x426974]?.['aiSources']));this['_markSuggestions'](_0x27b6c2,_0xd5c3b0,_0xa96901),this['_fixObsoleteTags'](_0x27b6c2),_0x27b6c2=this['_removeMissingPairs'](_0x27b6c2),_0x27b6c2=this['_markMismatchedRemovedTags'](_0x27b6c2),_0x27b6c2=this['_removeUnsupportedChanges'](_0x27b6c2);const {root:_0x1add32,changes:_0x372708}=this['_makeModelFromTape'](_0x27b6c2,_0x4f49f0,_0x426974,_0x3383a2);_0x44a752['model'][_0x426974]=_0x1add32;const _0x5cb7c0=_0x4427be['get'](_0x426974);if(_0x5cb7c0){const _0x23aad8=_0x4f49f0['get'](_0x5cb7c0['userId']),_0x525a1f=new Tt({'author':_0x23aad8,'type':_0x5cb7c0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x426974});_0x372708['unshift'](_0x525a1f),_0x44a752['attributes'][_0x426974]['revisionHistoryAttachChange']=_0x525a1f['id'];}_0x44a752['changes']=_0x44a752['changes']['concat'](_0x372708);}return _0x44a752;}['_markMarkers'](_0x2bee5a,_0x5917ee){for(let _0x91fd36=0x0;_0x91fd36<_0x2bee5a['length'];_0x91fd36++)for(const [_0x8b1010,_0x3334f7]of _0x5917ee)!_0x3334f7['isCollapsed']&&_0x3334f7['start']['isEqual'](_0x2bee5a[_0x91fd36]['previousPosition'])&&_0x2bee5a[_0x91fd36]['markersStart']['push'](_0x8b1010),_0x3334f7['end']['isEqual'](_0x2bee5a[_0x91fd36]['nextPosition'])&&_0x2bee5a[_0x91fd36]['markersEnd']['push'](_0x8b1010);}['_joinTapes'](_0x5c231a,_0x27b335){let _0x1f5b5e=[],_0x3af9a2=0x0,_0x441439=0x0;for(;_0x3af9a2<_0x5c231a['length']||_0x441439<_0x27b335['length'];){const _0x788741=_0x5c231a[_0x3af9a2]||{},_0x1b7562=_0x27b335[_0x441439]||{};if(_0x788741['id']==_0x1b7562['id'])_0x3af9a2++,_0x441439++,_0x1f5b5e['push'](_0x788741);else{if(_0x1b7562['isRemoved']&&_0x788741['isAdded']){const {commonTape:_0x5eb843,iEnd:_0x3ba7b7,jEnd:_0x36e22a}=this['_threeWayMerge'](_0x5c231a,_0x3af9a2,_0x27b335,_0x441439);_0x1f5b5e=_0x1f5b5e['concat'](_0x5eb843),_0x3af9a2=_0x3ba7b7,_0x441439=_0x36e22a;}else _0x1b7562['isRemoved']?(_0x441439++,_0x1f5b5e['push'](_0x1b7562)):(_0x3af9a2++,_0x1f5b5e['push'](_0x788741));}}return _0x1f5b5e;}_markSuggestions(_0x3e2586,_0xd4010,_0x4ae35a){const _0xa9eea8=[];for(let _0x5d1fe5=0x0;_0x5d1fe5<_0x3e2586['length'];_0x5d1fe5++){for(let _0xd7abc5=0x0;_0xd7abc5<_0x3e2586[_0x5d1fe5]['markersStart']['length'];_0xd7abc5++){const _0x448d72=_0x3e2586[_0x5d1fe5]['markersStart'][_0xd7abc5];if(!_0xd4010['has'](_0x448d72))continue;const {group:_0x5a42cf,type:_0x39cb80,authorId:_0x188523}=_0x494d5f(_0x448d72);if('revision-suggestion'!=_0x5a42cf||'insertion'!=_0x39cb80&&'deletion'!=_0x39cb80)continue;const _0x517eea=_0x4ae35a['suggestion:'+_0x448d72['slice'](0x14)]||null;_0xa9eea8['unshift']({'type':_0x39cb80,'name':_0x448d72,'userId':_0x188523,'aiSource':_0x517eea}),_0x3e2586[_0x5d1fe5]['markersStart']['splice'](_0xd7abc5,0x1),_0xd7abc5--;}_0x1405af(_0x3e2586[_0x5d1fe5]);for(let _0x5cce87=0x0;_0x5cce87<_0x3e2586[_0x5d1fe5]['markersEnd']['length'];_0x5cce87++){const _0xbfa54f=_0x3e2586[_0x5d1fe5]['markersEnd'][_0x5cce87];if(!_0xd4010['has'](_0xbfa54f))continue;const {group:_0x2f55df,type:_0x10d2d3}=_0x494d5f(_0xbfa54f);if('revision-suggestion'!=_0x2f55df||'insertion'!=_0x10d2d3&&'deletion'!=_0x10d2d3)continue;_0x3e2586[_0x5d1fe5]['markersEnd']['splice'](_0x5cce87,0x1),_0x5cce87--;const _0x1d7a06=_0xa9eea8['findIndex'](_0x333554=>_0x333554['name']==_0xbfa54f);_0x1d7a06>-0x1&&_0xa9eea8['splice'](_0x1d7a06,0x1);}}function _0x494d5f(_0x4fd190){const _0x292ee5=_0x4fd190['split'](':');return{'group':_0x292ee5[0x0],'type':_0x292ee5[0x1],'subType':_0x292ee5['length']>=0x5?_0x292ee5[0x2]:null,'id':_0x292ee5['length']<0x5?_0x292ee5[0x2]:_0x292ee5[0x3],'authorId':_0x292ee5['length']<0x5?_0x292ee5[0x3]:_0x292ee5[0x4],'markerCount':0x6==_0x292ee5['length']?_0x292ee5[0x5]:null};}function _0x1405af(_0x225b73){for(let _0x9623a1=0x0;_0x9623a1<_0xa9eea8['length'];_0x9623a1++){if(_0x225b73['isAdded']&&'insertion'==_0xa9eea8[_0x9623a1]['type']&&_0x225b73['isAdded']['userId']==_0xa9eea8[_0x9623a1]['userId'])return _0x225b73['isAddSuggestion']={..._0xa9eea8[_0x9623a1],'aiSource':_0x225b73['isAdded']['aiSource']||_0xa9eea8[_0x9623a1]['aiSource']},void delete _0x225b73['isAdded'];if(!_0x225b73['isAdded']&&!_0x225b73['isRemoved']&&'deletion'==_0xa9eea8[_0x9623a1]['type'])return void(_0x225b73['isRemoveSuggestion']=_0xa9eea8[_0x9623a1]);}}}_setDistance(_0x5017c0,_0x3b39aa){let _0x12eca4=0x0,_0x4a5d3b=!0x1;const _0x51ac73=new Map();for(const _0x23a510 of _0x5017c0)_0x23a510[_0x3b39aa]?_0x4a5d3b&&(_0x12eca4++,_0x4a5d3b=!0x1):(_0x12eca4++,_0x4a5d3b=!0x0),_0x51ac73['set'](_0x23a510['id'],_0x12eca4);for(let _0x3dc580=0x0;_0x3dc580<_0x5017c0['length'];_0x3dc580++){if('isRemoved'==_0x3b39aa&&_0x5017c0[_0x3dc580]['isAdded']||'isAdded'==_0x3b39aa&&_0x5017c0[_0x3dc580]['isRemoved'])continue;if('text'==_0x5017c0[_0x3dc580]['type']){_0x5017c0[_0x3dc580]['distance']=0x0;continue;}const _0x6ce7cc=_0x51ac73['get'](_0x5017c0[_0x3dc580]['pairId']),_0x1fa19a=_0x51ac73['get'](_0x5017c0[_0x3dc580]['id']);_0x5017c0[_0x3dc580]['distance']=_0x6ce7cc-_0x1fa19a;}}_getRevisionsRange(_0xeae527,_0x472a31,_0x152c76=!0x1){const _0x22c0f7=[];let _0x1765dc=this['repository']['getIndex'](_0xeae527),_0x487662=this['repository']['getIndex'](_0x472a31);for(-0x1==_0x487662&&(_0x487662=this['repository']['_revisions']['length'],_0x152c76=!0x1);_0x1765dc<_0x487662;)_0x22c0f7['push'](this['repository']['getRevision'](_0x1765dc)),_0x1765dc++;return _0x152c76&&_0x22c0f7['push'](this['repository']['getRevision'](_0x1765dc)),_0x22c0f7;}_threeWayMerge(_0x309b3b,_0x229f8d,_0x491d54,_0x4ab7c6){const _0x31fa82=this['editor']['model']['schema'];let _0x16f75f=_0x229f8d;for(;_0x309b3b[_0x16f75f]&&_0x309b3b[_0x16f75f]['isAdded'];)_0x16f75f++;let _0x4293ed=_0x4ab7c6;for(;_0x491d54[_0x4293ed]&&_0x491d54[_0x4293ed]['isRemoved'];)_0x4293ed++;_0x2a86fd(_0x309b3b,_0x229f8d,_0x16f75f),_0x2a86fd(_0x491d54,_0x4ab7c6,_0x4293ed);const _0xa95e8=_0x491d54['slice'](_0x4ab7c6,_0x4293ed)['concat'](_0x309b3b['slice'](_0x229f8d,_0x16f75f));return _0xa95e8['sort']((_0x4b0516,_0x54b593)=>_0x4b0516['side']!=_0x54b593['side']?_0x4b0516['side']-_0x54b593['side']:_0x4b0516['level']!=_0x54b593['level']?_0x4b0516['level']-_0x54b593['level']:_0x4b0516['distance']!=_0x54b593['distance']?_0x54b593['distance']-_0x4b0516['distance']:!!_0x4b0516['isAdded']!=!!_0x54b593['isAdded']?-0x1==_0x4b0516['side']||0x0==_0x4b0516['side']?_0x4b0516['isAdded']?-0x1:0x1:_0x4b0516['isAdded']?0x1:-0x1:_0x4b0516['index']-_0x54b593['index']),{'commonTape':_0xa95e8,'iEnd':_0x16f75f,'jEnd':_0x4293ed};function _0x2a86fd(_0x113f82,_0x2ef207,_0x4f5142){let _0x2ea880=-0x1,_0x8140f5=Number['POSITIVE_INFINITY'],_0x5485cd=!0x0;for(let _0x401894=_0x2ef207;_0x401894<_0x4f5142;_0x401894++)if(_0x31fa82['isInline'](_0x113f82[_0x401894]['item'])||(_0x5485cd=!0x1),_0x113f82[_0x401894]['item']['startIndex']<_0x2ef207&&(_0x2ea880=_0x401894),_0x113f82[_0x401894]['item']['endIndex']>=_0x4f5142){_0x8140f5=_0x401894;break;}_0x5485cd&&(_0x2ea880=_0x4f5142-0x1);for(let _0x281aa5=_0x2ef207;_0x281aa5<_0x4f5142;_0x281aa5++)_0x113f82[_0x281aa5]['side']=_0x281aa5<=_0x2ea880?-0x1:_0x281aa5<_0x8140f5?0x0:0x1,_0x113f82[_0x281aa5]['index']=_0x281aa5;let _0x245160=0x0;for(let _0x3aaa41=_0x2ef207;_0x3aaa41<=_0x2ea880;_0x3aaa41++)0x0==_0x113f82[_0x3aaa41]['distance']?_0x113f82[_0x3aaa41]['level']=_0x245160:(_0x245160++,_0x113f82[_0x3aaa41]['level']=_0x245160,_0x245160++);for(let _0xd0100a=_0x2ef207;_0xd0100a<_0x4f5142;_0xd0100a++)0x0==_0x113f82[_0xd0100a]['side']&&(_0x113f82[_0xd0100a]['level']=_0x245160);_0x245160=0x0;for(let _0x26fbca=_0x4f5142-0x1;_0x26fbca>=_0x8140f5;_0x26fbca--)0x0==_0x113f82[_0x26fbca]['distance']?_0x113f82[_0x26fbca]['level']=_0x245160:(_0x245160--,_0x113f82[_0x26fbca]['level']=_0x245160,_0x245160--);}}_fixObsoleteTags(_0x19b1cd){const _0x4d0c02=new Map(),_0xf32e2e=this['editor']['model']['schema'];for(let _0x527634=0x1;_0x527634<_0x19b1cd['length'];_0x527634++){let _0x3fef55,_0xbcf522,_0x2faf05;const _0x386bc9=_0x19b1cd[_0x527634],_0x3ad566=_0x19b1cd[_0x527634-0x1];if('text'==_0x386bc9['type'])continue;if(_0x386bc9['type']!=_0x3ad566['type'])continue;if(!_0xf32e2e['isBlock'](_0x3ad566['item'])||_0xf32e2e['isLimit'](_0x3ad566['item']))continue;if(!_0xf32e2e['isBlock'](_0x386bc9['item'])||_0xf32e2e['isLimit'](_0x386bc9['item']))continue;if((_0x19b1cd[_0x527634]['isAdded']||_0x19b1cd[_0x527634]['isAddSuggestion'])&&_0x19b1cd[_0x527634-0x1]['isRemoved'])_0x3fef55=_0x19b1cd[_0x527634],_0xbcf522=_0x19b1cd[_0x527634-0x1],_0x2faf05=_0x527634-0x1;else{if(!_0x19b1cd[_0x527634]['isRemoved']||!_0x19b1cd[_0x527634-0x1]['isAdded']&&!_0x19b1cd[_0x527634-0x1]['isAddSuggestion'])continue;_0x3fef55=_0x19b1cd[_0x527634-0x1],_0xbcf522=_0x19b1cd[_0x527634],_0x2faf05=_0x527634;}const _0x3388e6=_0x3fef55['level']==_0xbcf522['level'],_0x4aa348=Math['abs'](_0x3fef55['level'])<Math['abs'](_0xbcf522['level'])&&0x0==_0xbcf522['distance'];(_0x3388e6||_0x4aa348)&&(_0x4d0c02['set'](_0xbcf522['id'],_0x3fef55['id']),_0x19b1cd['splice'](_0x2faf05,0x1),_0x527634--,_0x3fef55['isAdded']=!0x1);}for(let _0x541de6=0x0;_0x541de6<_0x19b1cd['length'];_0x541de6++)_0x4d0c02['has'](_0x19b1cd[_0x541de6]['pairId'])&&(_0x19b1cd[_0x541de6]['pairId']=_0x4d0c02['get'](_0x19b1cd[_0x541de6]['pairId']));}['_removeMissingPairs'](_0x2e22fb){const _0x18465e=new Set(_0x2e22fb['map'](_0x33cf7d=>_0x33cf7d['id']));for(let _0x5cc488=0x0;_0x5cc488<_0x2e22fb['length'];_0x5cc488++)_0x18465e['has'](_0x2e22fb[_0x5cc488]['pairId'])||0x0==_0x2e22fb[_0x5cc488]['distance']||(_0x2e22fb[_0x5cc488]['isIncorrect']=!0x0);return _0x2e22fb['filter'](_0x294ecc=>!_0x294ecc['isIncorrect']);}_markMismatchedRemovedTags(_0x500171){const _0x3c12a9=new Set();for(let _0x2123e6=0x0;_0x2123e6<_0x500171['length'];_0x2123e6++){if(_0x3c12a9['has'](_0x500171[_0x2123e6]['id'])&&_0x500171[_0x2123e6]['isRemoved']&&(_0x500171[_0x2123e6]['isIncorrect']=!0x0),_0x500171[_0x2123e6]['isIncorrect'])continue;if(0x0==_0x500171[_0x2123e6]['distance'])continue;if('elementStart'!=_0x500171[_0x2123e6]['type'])continue;if(null==_0x500171[_0x2123e6]['pairId'])continue;let _0x1d0eca=_0x2123e6+0x1,_0x5bae55=0x0;for(;_0x500171[_0x1d0eca]['id']!=_0x500171[_0x2123e6]['pairId'];)'elementStart'==_0x500171[_0x1d0eca]['type']?_0x5bae55++:'elementEnd'==_0x500171[_0x1d0eca]['type']&&_0x5bae55--,_0x1d0eca++;if(0x0!=_0x5bae55){if(_0x500171[_0x2123e6]['isRemoved'])_0x500171[_0x2123e6]['isIncorrect']=!0x0;else{for(;_0x1d0eca!=_0x2123e6;)_0x500171[_0x1d0eca]['isRemoved']&&0x0!=_0x500171[_0x1d0eca]['distance']&&(_0x500171[_0x1d0eca]['isIncorrect']=!0x0,_0x3c12a9['add'](_0x500171[_0x1d0eca]['pairId'])),_0x1d0eca--;}}}return _0x500171['filter'](_0x4e4717=>!_0x4e4717['isIncorrect']);}_removeUnsupportedChanges(_0x33ed3a){const _0x4f9bbe=this['editor']['model']['schema'];for(let _0x420790=0x0;_0x420790<_0x33ed3a['length'];_0x420790++){if(!(_0x33ed3a[_0x420790]['isAdded']||_0x33ed3a[_0x420790]['isAddSuggestion']||_0x33ed3a[_0x420790]['isRemoved']||_0x33ed3a[_0x420790]['isRemoveSuggestion']))continue;if(0x0==_0x33ed3a[_0x420790]['distance'])continue;const _0x4ee0f3=_0x33ed3a[_0x420790]['item'];_0x4f9bbe['isBlock'](_0x4ee0f3)||_0x4f9bbe['isLimit'](_0x4ee0f3)||(_0x33ed3a[_0x420790]['isAdded']&&delete _0x33ed3a[_0x420790]['isAdded'],_0x33ed3a[_0x420790]['isAddSuggestion']&&delete _0x33ed3a[_0x420790]['isAddSuggestion'],_0x33ed3a[_0x420790]['isRemoveSuggestion']&&delete _0x33ed3a[_0x420790]['isRemoveSuggestion'],_0x33ed3a[_0x420790]['isRemoved']&&(_0x33ed3a[_0x420790]['isIncorrect']=!0x0));}return _0x33ed3a['filter'](_0x4b8260=>!_0x4b8260['isIncorrect']);}['_makeModelFromTape'](_0x1803b7,_0x52b2f8,_0x51be74,_0x5ac299){const _0x242909=new _0x3e4772(),_0x3f8482=[],_0x83abdf=new Map(),_0x4fbde9=this['editor']['model'],_0x158062=_0x4fbde9['schema'],_0x3fbfe0=[_0x242909],_0x30400={},_0x46f153={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x242909['name']=_0x5ac299;let _0x16bd9d=null;const _0x4df818=[0x0];for(let _0x3a8c51=0x0;_0x3a8c51<_0x1803b7['length'];_0x3a8c51++)if('elementStart'===_0x1803b7[_0x3a8c51]['type']){_0x1803b7[_0x3a8c51]['previousPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818);const _0x32da7b=new _0x51c9e7(_0x1803b7[_0x3a8c51]['item']['name'],_0x1803b7[_0x3a8c51]['item']['getAttributes']());_0x3fbfe0[0x0]['_appendChild'](_0x32da7b),_0x4df818['push'](0x0),_0x3fbfe0['unshift'](_0x32da7b),_0x1803b7[_0x3a8c51]['nextPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818);}else'elementEnd'===_0x1803b7[_0x3a8c51]['type']?(_0x3fbfe0['shift'](),_0x1803b7[_0x3a8c51]['previousPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818),_0x4df818['pop'](),_0x4df818[_0x4df818['length']-0x1]++,_0x1803b7[_0x3a8c51]['nextPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818)):(_0x1803b7[_0x3a8c51]['previousPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818),_0x16bd9d?_0x16bd9d['_data']+=_0x1803b7[_0x3a8c51]['item']['data']:_0x16bd9d=new _0x5c3b83(_0x1803b7[_0x3a8c51]['item']['data'],_0x1803b7[_0x3a8c51]['item']['getAttributes']()),_0x1803b7[_0x3a8c51+0x1]&&'text'===_0x1803b7[_0x3a8c51+0x1]['type']&&_0x4385b3(_0x16bd9d,_0x1803b7[_0x3a8c51+0x1]['item'])||(_0x3fbfe0[0x0]['_appendChild'](_0x16bd9d),_0x16bd9d=null),_0x4df818[_0x4df818['length']-0x1]+=_0x1803b7[_0x3a8c51]['item']['offsetSize'],_0x1803b7[_0x3a8c51]['nextPosition']=_0x4fbde9['createPositionFromPath'](_0x242909,_0x4df818));for(let _0x1d9c20=0x0;_0x1d9c20<_0x1803b7['length'];_0x1d9c20++){const _0x90902c=_0x1803b7[_0x1d9c20]['previousPosition'],_0x128724=_0x1803b7[_0x1d9c20]['nextPosition'];for(const _0x2f775c of _0x1803b7[_0x1d9c20]['markersStart'])_0x83abdf['set'](_0x2f775c,{'start':_0x90902c,'end':null});_0x3bd555('isRemoveSuggestion',_0x1d9c20,_0x90902c,_0x128724),_0x3bd555('isAddSuggestion',_0x1d9c20,_0x90902c,_0x128724),_0x3bd555('isRemoved',_0x1d9c20,_0x90902c,_0x128724),_0x3bd555('isAdded',_0x1d9c20,_0x90902c,_0x128724);for(const _0x45b875 of _0x1803b7[_0x1d9c20]['markersEnd']){const _0x52839e=_0x83abdf['get'](_0x45b875);_0x52839e?_0x52839e['end']=_0x128724:_0x83abdf['set'](_0x45b875,{'start':_0x128724,'end':_0x128724});}}for(const [_0x1ab0ef,_0x41b91d]of _0x83abdf){const _0x4136f7=this['editor']['model']['createRange'](_0x41b91d['start'],_0x41b91d['end']);_0x242909['markers']['set'](_0x1ab0ef,_0x4136f7);}return _0x3f8482['sort']((_0x4baede,_0x5a1cb1)=>{const _0x4b6d4a=_0x242909['markers']['get']('revision:'+_0x4baede['id']),_0x341ed1=_0x242909['markers']['get']('revision:'+_0x5a1cb1['id']);return _0x4b6d4a['start']['isBefore'](_0x341ed1['start'])?-0x1:_0x4b6d4a['start']['isAfter'](_0x341ed1['start'])?0x1:_0x4b6d4a['end']['isBefore'](_0x341ed1['end'])?-0x1:_0x4b6d4a['end']['isAfter'](_0x341ed1['end'])?0x1:'add'===_0x4baede['type']?-0x1:0x1;}),{'root':_0x242909,'changes':_0x3f8482};function _0x3bd555(_0x1c0d9d,_0x672e5c,_0x215688,_0x13a5d7){const _0x10ee30=!!_0x1803b7[_0x672e5c][_0x1c0d9d],_0x62befe=_0x10ee30?_0x1803b7[_0x672e5c][_0x1c0d9d]['userId']:null,_0xd25f5d=_0x10ee30&&_0x1803b7[_0x672e5c][_0x1c0d9d]['aiSource']||null,_0x4ee5fc=_0x672e5c===_0x1803b7['length']-0x1,_0x2764bd=_0x46f153[_0x1c0d9d][0x0],_0xccce26=_0x158062['isObject'](_0x1803b7[_0x672e5c]['item']);!_0x30400[_0x1c0d9d]&&_0x10ee30?_0x30400[_0x1c0d9d]={'start':_0x215688,'tapeItem':_0x1803b7[_0x672e5c],'userId':_0x62befe,'aiSource':_0xd25f5d,'type':_0x1c0d9d}:_0x30400[_0x1c0d9d]&&!_0x10ee30?(_0x30400[_0x1c0d9d]['end']=_0x215688,_0x1276ab(_0x30400[_0x1c0d9d]),_0x30400[_0x1c0d9d]=null):_0x30400[_0x1c0d9d]&&_0x10ee30&&(_0x30400[_0x1c0d9d]['userId']!==_0x62befe||_0x30400[_0x1c0d9d]['aiSource']!==_0xd25f5d)&&(_0x30400[_0x1c0d9d]['end']=_0x215688,_0x2764bd&&_0x2764bd['userId']===_0x30400[_0x1c0d9d]['userId']?_0x2764bd['change']['aiSource']=_0x2764bd['change']['aiSource']||_0x30400[_0x1c0d9d]['aiSource']:_0x1276ab(_0x30400[_0x1c0d9d]),_0x30400[_0x1c0d9d]={'start':_0x215688,'tapeItem':_0x1803b7[_0x672e5c],'userId':_0x62befe,'aiSource':_0xd25f5d,'type':_0x1c0d9d}),_0x30400[_0x1c0d9d]&&_0xccce26&&('elementStart'!==_0x1803b7[_0x672e5c]['type']||_0x2764bd&&_0x2764bd['userId']===_0x62befe||_0x46f153[_0x1c0d9d]['unshift']({'userId':_0x62befe,'object':_0x1803b7[_0x672e5c]['item'],'change':_0x30400[_0x1c0d9d]}),'elementEnd'===_0x1803b7[_0x672e5c]['type']&&_0x2764bd&&_0x2764bd['object']===_0x1803b7[_0x672e5c]['item']&&(_0x46f153[_0x1c0d9d]['shift'](),_0x30400[_0x1c0d9d]=_0x2764bd['change'])),_0x30400[_0x1c0d9d]&&_0x4ee5fc&&(_0x30400[_0x1c0d9d]['end']=_0x13a5d7,_0x1276ab(_0x30400[_0x1c0d9d]),_0x30400[_0x1c0d9d]=null);}function _0x1276ab({start:_0x2232e4,end:_0x4a6a06,tapeItem:_0x62a6e4,userId:_0x5ce858,aiSource:_0x34b4f7,type:_0x3ebc37}){const _0x41d50b=_0x62a6e4['item'],_0x66fd74=_0x4fbde9['schema']['isBlock'](_0x41d50b)&&!_0x4fbde9['schema']['isLimit'](_0x41d50b),_0x10ac5b=_0x2232e4['nodeAfter']==_0x4a6a06['parent']&&_0x4a6a06['isAtStart'];if(_0x66fd74&&_0x10ac5b)return;const _0x26a148=_0x4fbde9['createRange'](_0x2232e4,_0x4a6a06),_0x3e1e3e=_0x52b2f8['get'](_0x5ce858),_0x31b0fe=new Tt({'author':_0x3e1e3e,'type':'isAdded'==_0x3ebc37||'isAddSuggestion'==_0x3ebc37?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3ebc37||'isRemoveSuggestion'==_0x3ebc37,'aiSource':_0x34b4f7||null},'createdAt':new Date(),'rootName':_0x51be74});_0x3f8482['push'](_0x31b0fe),_0x242909['markers']['set']('revision:'+_0x31b0fe['id'],_0x26a148);}function _0x4385b3(_0x1c2ee9,_0x45c813){const _0x30e2da=_0x1c2ee9['getAttributes'](),_0x34398b=_0x45c813['getAttributes']();for(const _0xf8f751 of _0x30e2da){if(_0xf8f751[0x1]!==_0x45c813['getAttribute'](_0xf8f751[0x0]))return!0x1;_0x34398b['next']();}return _0x34398b['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x190cea=>{const _0x2edeb6=_0x190cea['markerName']['split'](':')[0x1],_0x431ec9=this['_getChangeFromId'](_0x2edeb6);if(!_0x431ec9)return null;const _0x4b13dd='add'==_0x431ec9['type']?'insertion':'deletion',_0x38ef17=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4b13dd];return _0x431ec9['data']['isSuggestion']&&_0x38ef17['push']('ck-suggestion-marker-'+_0x4b13dd+'-new'),this['activeChange']==_0x431ec9&&_0x38ef17['push']('ck-suggestion-marker--active'),{'classes':_0x38ef17,'attributes':{'data-change-id':_0x2edeb6}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x46543e=>{_0x46543e['on']('element:pre',(_0x2cb75b,_0x1e31ab,_0x3e2953)=>{const _0x39d3d9=_0x1e31ab['viewItem']['getChild'](0x0);if(!_0x39d3d9||!_0x39d3d9['is']('element','code'))return;if(!_0x3e2953['consumable']['consume'](_0x39d3d9,{'attributes':['vid_start','vid_end']}))return;const _0x23278e=_0x1e31ab['modelRange']['start']['nodeAfter'];_0x3e2953['writer']['setAttribute']('vid_start',_0x39d3d9['getAttribute']('vid_start'),_0x23278e),_0x3e2953['writer']['setAttribute']('vid_end',_0x39d3d9['getAttribute']('vid_end'),_0x23278e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x301b5=>{_0x301b5['on']('element',(_0x53af13,_0x3f68ba,_0x311cb2)=>{if(!_0x311cb2['consumable']['consume'](_0x3f68ba['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3f68ba['modelRange']['isCollapsed'])return;const _0x64ea92=_0x3f68ba['modelRange']['start']['nodeAfter'];_0x64ea92['hasAttribute']('vid_start')||_0x64ea92['hasAttribute']('vid')||(_0x311cb2['writer']['setAttribute']('vid_start',_0x3f68ba['viewItem']['getAttribute']('vid_start'),_0x64ea92),_0x311cb2['writer']['setAttribute']('vid_end',_0x3f68ba['viewItem']['getAttribute']('vid_end'),_0x64ea92));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2cb1d6=>_0x2cb1d6['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4b985b,[,_0x1beff3])=>{['vid_start','vid_end','vid']['includes'](_0x1beff3)&&(_0x4b985b['return']=!0x0,_0x4b985b['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x39e0ce=>{_0x39e0ce['on']('attribute:vid',(_0x830a5a,_0x4bacf5,_0x5a3b58)=>{if('\x20'!=_0x4bacf5['item']['data']||_0x4bacf5['item']['parent']['maxOffset']>0x1)return;if(!_0x5a3b58['consumable']['consume'](_0x4bacf5['item'],_0x830a5a['name']))return;const _0x4087b2=_0x5a3b58['writer'],_0x1f68fe=_0x5a3b58['mapper']['toViewRange'](_0x4bacf5['range']);_0x4087b2['wrap'](_0x1f68fe,_0x4087b2['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x19312a){const _0x8d48e0=_0x19312a['plugins']['get']('RevisionViewer');return(_0x2fc03e,_0x349a92,_0x19bd0b)=>{const _0x3f2036=_0x349a92['markerName']['split'](':')[0x1],_0x43ba2a=_0x8d48e0['_getChangeFromId'](_0x3f2036);if(!_0x43ba2a)return null;const _0xa0c280='add'==_0x43ba2a['type']?'split':'merge';if(!_0x19bd0b['consumable']['test'](_0x349a92['markerRange'],_0x2fc03e['name']))return;const _0x372064=_0x349a92['markerRange']['getWalker'](),_0x3ffe7b=_0x349a92['markerRange']['start'],_0x22a405=_0x19312a['model']['schema'];let _0x3f0f9e=null,_0x1bb879=null,_0x2d6f15=!0x1,_0x4fe4f3=!0x1;for(const _0x11bf1a of _0x372064){const _0x3b38f5=_0x11bf1a['item'];_0x2d6f15=_0x2d6f15||_0x22a405['isContent'](_0x3b38f5);const _0x4f5184=_0x19bd0b['mapper']['toViewElement'](_0x3b38f5);if(_0x4f5184&&_0x4f5184['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x11bf1a['type']&&(_0x22a405['isBlock'](_0x3b38f5)&&!_0x22a405['isLimit'](_0x3b38f5)&&(_0x3b38f5['nextSibling']||_0x3ffe7b['isAtEnd']?_0x3f0f9e&&_0x3f0f9e['parent']==_0x3b38f5||(_0x3f0f9e=_0x3b38f5,_0x2433ae(_0x11bf1a['previousPosition']),_0x4fe4f3=!0x0):_0x1bb879=_0x1bb879||_0x11bf1a['previousPosition']));}function _0x2433ae(_0x320d6b){const _0x56d13e=_0x19bd0b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xa0c280}),_0x919b03=_0x19bd0b['mapper']['toViewPosition'](_0x320d6b);_0x43ba2a['data']['isSuggestion']&&_0x19bd0b['writer']['addClass']('ck-suggestion-marker-'+_0xa0c280+'-new',_0x56d13e),_0x8d48e0['activeChange']==_0x43ba2a&&_0x19bd0b['writer']['addClass']('ck-suggestion-marker--active',_0x56d13e),_0x19bd0b['writer']['insert'](_0x919b03,_0x56d13e),_0x19bd0b['mapper']['bindElementToMarker'](_0x56d13e,_0x349a92['markerName']);}_0x2d6f15||_0x4fe4f3||!_0x1bb879||_0x2433ae(_0x1bb879);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x18d47c,_0x41cfdb,_0x309ce4)=>{const _0x3bf5e5=_0x309ce4['mapper']['markerNameToElements'](_0x41cfdb['markerName']);if(_0x3bf5e5){for(const _0xd6b252 of _0x3bf5e5)(_0xd6b252['hasClass']('ck-suggestion-marker-split')||_0xd6b252['hasClass']('ck-suggestion-marker-merge'))&&(_0x309ce4['mapper']['unbindElementFromMarkerName'](_0xd6b252,_0x41cfdb['markerName']),_0x309ce4['writer']['remove'](_0xd6b252));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3ddd71,_0x59dfdb,_0x24de83)=>{const _0x44de86=_0x59dfdb['markerName']['split'](':')[0x1],_0x483586=this['_getChangeFromId'](_0x44de86);if(!_0x483586)return null;const _0x467f55='add'==_0x483586['type']?'split':'merge';if(_0x24de83['consumable']['test'](_0x59dfdb['markerRange'],_0x3ddd71['name']))for(const _0x4caec8 of _0x59dfdb['markerRange']['getItems']()){if(!_0x4caec8['is']('element','softBreak'))continue;const _0x301a4c=_0x24de83['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x467f55}),_0x34b790=_0x24de83['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4caec8));_0x483586['data']['isSuggestion']&&_0x24de83['writer']['addClass']('ck-suggestion-marker-'+_0x467f55+'-new',_0x301a4c),this['activeChange']==_0x483586&&_0x24de83['writer']['addClass']('ck-suggestion-marker--active',_0x301a4c),_0x24de83['writer']['insert'](_0x34b790,_0x301a4c),_0x24de83['mapper']['bindElementToMarker'](_0x301a4c,_0x59dfdb['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x262173=>{for(const _0x22bdbd of this['editor']['model']['document']['getRootNames']()){const _0x5cd19e=this['editor']['model']['document']['getRoot'](_0x22bdbd),_0x33bf45=this['editor']['editing']['view']['document']['getRoot'](_0x22bdbd);if(_0x33bf45){const _0xffc620=_0x5cd19e['getAttribute']('revisionHistoryAttachChange');if(_0x262173['removeAttribute']('data-change-id',_0x33bf45),_0x262173['removeClass']('ck-revision-history-root-add',_0x33bf45),_0x262173['removeClass']('ck-revision-history-root-remove',_0x33bf45),_0x262173['removeClass']('ck-revision-history-root--active',_0x33bf45),_0xffc620){const _0x4af723=this['_getChangeFromId'](_0xffc620);if(!_0x4af723)return null;_0x262173['setAttribute']('data-change-id',_0xffc620,_0x33bf45),_0x262173['addClass']('ck-revision-history-root-'+_0x4af723['type'],_0x33bf45),this['activeChange']==_0x4af723&&_0x262173['addClass']('ck-revision-history-root--active',_0x33bf45);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1ab457=>'revision-comment:'+_0x1ab457,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x55cc5c=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Pt(_0x55cc5c['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x246297=>'revision-suggestion:'+_0x246297,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x129a08=>({'name':'suggestion:'+_0x129a08,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x229c1d=>{const _0x4706d9=_0x229c1d['markerName']['split'](':')[0x1];return'insertion'!=_0x4706d9&&'deletion'!=_0x4706d9?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4706d9]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ut(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ut(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3a7314,_0x2f9956,_0x85210b)=>{const _0x178855=_0x85210b['mapper']['markerNameToElements'](_0x2f9956['markerName']);if(_0x178855){for(const _0x2854c4 of _0x178855)_0x2854c4['is']('uiElement')&&(_0x85210b['mapper']['unbindElementFromMarkerName'](_0x2854c4,_0x2f9956['markerName']),_0x85210b['writer']['remove'](_0x2854c4));}},{'priority':'high'});}_getChangeFromId(_0x1b8d44){return this['_changeIdToChange']['get'](_0x1b8d44);}_getViewForChange(_0x1a1f1c){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Dt(this['editor']['locale'],_0x1a1f1c,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4dc269,_0x3b8346,_0x5e117d,_0x55b864)=>{_0x55b864&&this['_balloon']['remove'](_0x55b864),_0x5e117d&&(this['_balloon']['add']({'view':_0x5e117d,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2f3736=this['editor']['editing'],_0x516856=this['_getChangeFromId'](_0x5e117d['changeId']);let _0x319f94;if(_0x516856['data']['isOnRoot']){const _0x18fa5e=_0x2f3736['view']['getDomRoot'](_0x516856['rootName']);_0x319f94=Array['from'](_0x18fa5e['getClientRects']());}else{const _0xae6380=this['editor']['model']['markers']['get']('revision:'+_0x5e117d['changeId']);_0x319f94=Array['from'](_0x2f3736['mapper']['markerNameToElements'](_0xae6380['name']))['map'](_0x2014b3=>_0x2f3736['view']['domConverter']['mapViewToDom'](_0x2014b3))['map'](_0xa2a362=>Array['from'](_0xa2a362['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x319f94['find'](_0x3a212d=>_0x3a212d['top']-0x3<=this['_activeViewTarget']['y']&&_0x3a212d['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3a212d['left']-0x3<=this['_activeViewTarget']['x']&&_0x3a212d['right']+0x3>=this['_activeViewTarget']['x'])||_0x319f94[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x274286,_0x1fd083,_0x1cdbfa,_0x1f2b0d)=>{this['activeView']=_0x1cdbfa?this['_getViewForChange'](_0x1cdbfa):null,this['editor']['model']['change'](()=>{const _0x11e3c6=this['editor']['editing'];_0x1f2b0d&&(_0x1f2b0d['data']['isOnRoot']?_0x11e3c6['view']['change'](_0x1836d6=>{_0x1836d6['removeClass']('ck-revision-history-root--active',_0x11e3c6['view']['document']['getRoot'](_0x1f2b0d['rootName']));}):_0x11e3c6['reconvertMarker']('revision:'+_0x1f2b0d['id'])),_0x1cdbfa&&(_0x1cdbfa['data']['isOnRoot']?_0x11e3c6['view']['change'](_0x52c1ee=>{_0x52c1ee['addClass']('ck-revision-history-root--active',_0x11e3c6['view']['document']['getRoot'](_0x1cdbfa['rootName']));}):_0x11e3c6['reconvertMarker']('revision:'+_0x1cdbfa['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5d31fc,_0x1173c0)=>{if(this['activeChange'])return;const _0x2caab6=this['_findChangeIdFromDomTarget'](_0x1173c0['target']),_0x1f4bc0=this['_changeIdToChange']['get'](_0x2caab6);_0x1f4bc0?(this['_activeViewTarget']={'x':_0x1173c0['domEvent']['x'],'y':_0x1173c0['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1f4bc0)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x463286,_0x552389)=>{const _0x2f228c=this['_findChangeIdFromDomTarget'](_0x552389['target']),_0x5a9232=this['_changeIdToChange']['get'](_0x2f228c);_0x5a9232?(this['_activeViewTarget']={'x':_0x552389['domEvent']['x'],'y':_0x552389['domEvent']['y']},_0x5a9232===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5a9232):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x24a11f){do{const _0x2cc784=_0x24a11f['getAttribute']('data-change-id');if(_0x2cc784)return _0x2cc784;_0x24a11f=_0x24a11f['parent'];}while(_0x24a11f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x47348f=>{for(const _0x48fe05 of this['editor']['model']['markers'])_0x47348f['removeMarker'](_0x48fe05);});}};function Pt(_0x46405d){return _0x46405d['split'](':')[0x1];}function Ut(_0x48072a,_0x414af3){return(_0x2c1dda,_0x75731,_0x103b27)=>{if(!_0x103b27['consumable']['test'](_0x75731['markerRange'],_0x2c1dda['name']))return;const _0x1c430c=_0x75731['markerRange']['getWalker'](),_0x46fdea=_0x75731['markerRange']['start'],_0x303baa=_0x48072a['model']['schema'];let _0x3f01c0=null,_0x1471e9=null,_0x518b4a=!0x1,_0x13cf43=!0x1;for(const _0x4d5994 of _0x1c430c){const _0x161318=_0x4d5994['item'];_0x518b4a=_0x518b4a||_0x303baa['isContent'](_0x161318);const _0x39ddbf=_0x103b27['mapper']['toViewElement'](_0x161318);if(_0x39ddbf&&_0x39ddbf['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4d5994['type']&&(_0x303baa['isBlock'](_0x161318)&&!_0x303baa['isLimit'](_0x161318)&&(_0x161318['nextSibling']||_0x46fdea['isAtEnd']?_0x3f01c0&&_0x3f01c0['parent']==_0x161318||(_0x3f01c0=_0x161318,_0x725605(_0x4d5994['previousPosition']),_0x13cf43=!0x0):_0x1471e9=_0x1471e9||_0x4d5994['previousPosition']));}function _0x725605(_0x546cb3){const _0x53b5d8=_0x103b27['mapper']['toViewPosition'](_0x546cb3),_0xbb3d60=_0x103b27['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x414af3});_0x103b27['writer']['insert'](_0x53b5d8,_0xbb3d60),_0x103b27['mapper']['bindElementToMarker'](_0xbb3d60,_0x75731['markerName']);}_0x518b4a||_0x13cf43||!_0x1471e9||_0x725605(_0x1471e9);};}var Lt=class extends _0x2d8dff{constructor(_0x22dfaa){super(_0x22dfaa);const _0xa7a506=_0x22dfaa['plugins']['get'](Ht);this['affectsData']=!0x1,this['listenTo'](_0xa7a506,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xa7a506,'change:isEnabled',()=>this['refresh']());}execute(){const _0x58355c=this['editor'],_0x335ee5=_0x58355c['plugins']['get'](Ht),_0x46b16e=_0x335ee5['isReady']?_0x335ee5['diff']['newRevisionId']:null;_0x58355c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x46b16e);}['refresh'](){const {isReady:_0xc3e8c0,isEnabled:_0x2dca1b,repository:_0xb1a6e9,diff:_0x5df4f2}=this['editor']['plugins']['get'](Ht),_0x36cf8d=_0x5df4f2&&_0xb1a6e9['getLaterVisibleRevision'](_0x5df4f2['newRevisionId']);this['isEnabled']=_0xc3e8c0&&_0x2dca1b&&Boolean(_0x36cf8d);}},Ft=class extends _0x2d8dff{_step;constructor(_0x3b6aa1,{direction:_0x439a65}){super(_0x3b6aa1);const _0x5bd5b6=_0x3b6aa1['plugins']['get'](Ht);this['affectsData']=!0x1,this['_step']='forward'===_0x439a65?0x1:-0x1,this['listenTo'](_0x5bd5b6,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5bd5b6,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5bd5b6,'change:activeChange',()=>this['refresh']());}execute(){const _0xf39382=this['editor'],_0x5fa021=_0xf39382['plugins']['get'](Ht),{isNavigationMode:_0x364fc0,currentChangeNumber:_0x86920f}=_0x5fa021;let _0x24d12f;if(_0x5fa021['activeChange']=_0x364fc0?_0x5fa021['diff']['changes']['get'](_0x86920f+this['_step']):_0x5fa021['diff']['changes']['first'],_0x5fa021['activeChange']['data']['isOnRoot'])_0x24d12f=_0xf39382['editing']['view']['getDomRoot'](_0x5fa021['activeChange']['rootName']);else{const _0x2c2424=_0xf39382['model']['markers']['get']('revision:'+_0x5fa021['activeChange']['id']);_0x24d12f=_0x141319(_0xf39382['editing'],_0x2c2424);}_0x51e00f({'target':_0x24d12f,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xf16361,currentChangeNumber:_0x3b50f5,numberOfChanges:_0x1b9b07,isReady:_0x52e0e3,isEnabled:_0x376007}=this['editor']['plugins']['get'](Ht);this['isEnabled']=!!(_0x376007&&_0x52e0e3&&_0x1b9b07)&&(!_0xf16361||(0x1===this['_step']?_0x3b50f5<_0x1b9b07-0x1:_0x3b50f5>0x0));}},$t=class extends ut{constructor(_0x5aec4d){super(_0x5aec4d);const _0xdf588c=this['bindTemplate'],_0x425838=new _0x18f462(_0x5aec4d),_0x5968e7=new _0x18f462(_0x5aec4d);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',(_0x3855ad,_0x5d313b)=>_0x3855ad&&_0x5d313b>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4f57be,_0x5278e8,_0x42243b,_0x23e13d)=>{if(!_0x4f57be)return Rt(_0x5aec4d,'Loading...');if(!_0x42243b)return Rt(_0x5aec4d,'No\x20changes');const _0xec4ba5=Rt(_0x5aec4d,'NUMBER_OF_CHANGES',_0x42243b);return _0x23e13d?Rt(_0x5aec4d,'X_OF_Y_CHANGES',[_0x5278e8+0x1,_0x42243b]):_0xec4ba5;}),_0x425838['set']({'label':Rt(_0x5aec4d,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1aa34a}),_0x5968e7['set']({'label':Rt(_0x5aec4d,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5735e9}),_0x425838['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5968e7['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x425838['on']('execute',()=>this['fire']('execute','backward')),_0x5968e7['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',_0xdf588c['if']('_isStatusLabelVisible','ck-hidden',_0x480705=>!_0x480705)]},'children':[{'text':_0xdf588c['to']('isNavigationMode',_0x40b3db=>_0x40b3db?Rt(_0x5aec4d,'EDIT_X_OF_Y_REVISIONS')+':\x20':Rt(_0x5aec4d,'Total')+':\x20')}]},{'text':_0xdf588c['to']('_statusText')}]},new ht(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x425838,_0x5968e7]}]});}};const Bt='ck-editor__editable__loading-overlay';var jt=class extends _0x5ca6f9{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1da51a=this['editor']['editing']['view'];_0x1da51a['change'](_0x36debd=>{for(const _0x1ecab9 of _0x1da51a['document']['roots'])_0x36debd['addClass'](Bt,_0x1ecab9);});}['hide'](){const _0x2124a2=this['editor']['editing']['view'];_0x2124a2['change'](_0x16b423=>{for(const _0x419abc of _0x2124a2['document']['roots'])_0x16b423['removeClass'](Bt,_0x419abc);});}},Gt=class extends _0x5ca6f9{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht,jt];}init(){const _0x3c4b1e=this['editor'],_0x138115=_0x3c4b1e['plugins']['get'](Ht),_0x2ff816=_0x3c4b1e['plugins']['get'](jt);_0x3c4b1e['ui']['componentFactory']['add']('exitToEditing',_0x3bf49f=>{const _0x46ee10=new _0x18f462(_0x3bf49f);return _0x46ee10['set']({'label':Rt(_0x3bf49f,'Back\x20to\x20editing'),'icon':_0x33137a,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x46ee10,'execute',()=>{_0x3c4b1e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x46ee10;}),_0x3c4b1e['ui']['componentFactory']['add']('restoreRevision',_0x2fd02d=>{const _0x25e08d=new _0x18f462(_0x2fd02d);return _0x25e08d['set']({'label':Rt(_0x2fd02d,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x25e08d['bind']('isEnabled')['to'](_0x3c4b1e['commands']['get']('restoreRevision')),this['listenTo'](_0x25e08d,'execute',()=>_0x3c4b1e['execute']('restoreRevision')),_0x25e08d;}),_0x3c4b1e['ui']['componentFactory']['add']('changesNavigation',_0x30ff59=>{const _0x3fa1f9=new $t(_0x30ff59),_0x8c03aa=_0x3c4b1e['commands']['get']('showPreviousChange'),_0x125b2f=_0x3c4b1e['commands']['get']('showNextChange');return _0x3fa1f9['bind']('isBackwardNavigationEnabled')['to'](_0x8c03aa,'isEnabled'),_0x3fa1f9['bind']('isForwardNavigationEnabled')['to'](_0x125b2f,'isEnabled'),_0x3fa1f9['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x138115),this['listenTo'](_0x3fa1f9,'execute',(_0x3d52b3,_0x443293)=>{_0x3c4b1e['execute']('forward'===_0x443293?'showNextChange':'showPreviousChange');}),_0x3fa1f9;}),_0x2ff816['show'](),_0x138115['on']('change:isReady',(_0x5ce6b0,_0x4e4df3,_0x32cbe5)=>{_0x32cbe5?_0x2ff816['hide']():_0x2ff816['show']();});}},Kt=class extends tt{['_resizeObserver']=null;constructor(_0x29149b,_0x4615d2){super(_0x29149b,_0x4615d2);const _0x28c82b=this['bindTemplate'];this['set']({'label':Rt(_0x29149b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=Rt(_0x29149b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x28c82b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1f97d9(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x429eb2=this['fieldView']['element'];this['_tooltipString']=_0x429eb2['scrollWidth']>_0x429eb2['clientWidth']&&_0x429eb2['value']||'';}},qt=class extends ut{constructor(_0x47b81a,_0x25a5e0,_0x3dccf7){super(_0x47b81a);const _0x525dd7=new _0x47b8ed();_0x525dd7['set']({'content':_0x36a883,'viewBox':'0\x200\x2011\x2010'});const _0x2b8be3=['ck','ck-revision-history-sidebar__revision-author'];_0x3dccf7&&_0x2b8be3['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1be6e0=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':Rt(_0x47b81a,_0x3dccf7?'Revision\x20creator':'Revision\x20author')},'children':[_0x525dd7,_0x25a5e0['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2b8be3},'children':_0x1be6e0});}};function Yt(_0x414a86,_0x280b9c){const _0x17b920=_0x414a86['bindTemplate'],_0x2a336a=_0x414a86['locale'],_0x243bb1=ft(_0x2a336a);_0x243bb1['panelPosition']='sw';const _0x5b7843=function(_0x439690,_0x55d400){const _0x2dcd9e=function(_0x7f82a2,_0xdd5a6a){const _0x5e2552=_0x7f82a2['locale'],_0x525716={'Compare\x20against\x20selected':Rt(_0x5e2552,'Compare\x20against\x20selected'),'Name\x20this\x20revision':Rt(_0x5e2552,'Name\x20this\x20revision'),'Restore\x20this\x20revision':Rt(_0x5e2552,'Restore\x20this\x20revision')};return _0xdd5a6a['map'](_0x2c642a=>{const _0x5ed773=_0x525716[_0x2c642a['name']];return _0x5ed773&&_0x5ed773!==_0x2c642a['name']&&(_0x2c642a['name']=_0x5ed773),_0x2c642a;});}(_0x439690,_0x55d400),_0x4aabff=new _0x17289a();for(const _0x334862 of _0x2dcd9e){const _0x1b2c89={'type':'button','model':new lt({'label':_0x334862['name'],'class':_0x334862['class'],'withText':!0x0,'role':'menuitem','_action':_0x334862['action']})};_0x1b2c89['model']['bind']('isEnabled')['to'](_0x439690,'isActionsDropdownOpen',_0x4e1c94=>'function'!=typeof _0x334862['isEnabled']||(!_0x4e1c94||_0x334862['isEnabled'](_0x439690))),_0x4aabff['add'](_0x1b2c89);}return _0x4aabff;}(_0x414a86,_0x280b9c);return _0x414a86['bind']('isActionsDropdownOpen')['to'](_0x243bb1,'isOpen'),_0x243bb1['buttonView']['set']({'label':Rt(_0x2a336a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x246cca}),_0x243bb1['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x17b920['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x17b920['to'](_0x1175ce=>_0x1175ce['stopPropagation']())}}),_0x243bb1['on']('execute',_0x3a55ee=>{_0x414a86['isReady']&&'function'==typeof _0x3a55ee['source']['_action']&&_0x3a55ee['source']['_action'](_0x414a86);}),dt(_0x243bb1,_0x5b7843,{'role':'menu'}),_0x243bb1['listenTo'](_0x414a86,'change:isActionsDropdownOpen',(_0x3901e4,_0x429bd8,_0x2f9952)=>{if(_0x2f9952)for(const _0x3b5e5a of _0x243bb1['listView']['items']){const _0x264fb9=_0x3b5e5a['children']['first'],_0x9820b=_0x280b9c['find'](_0x13e026=>_0x13e026['action']===_0x264fb9['_action'])['isVisible'];_0x3b5e5a['isVisible']=void 0x0===_0x9820b||_0x9820b(_0x414a86);}}),_0x243bb1;}const Jt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x1f314d,Collection as _0x5d63ac,ElementReplacer as _0x501994,FocusTracker as _0x1d942c,KeystrokeHandler as _0x382620,ObservableMixin as _0x15441c,ResizeObserver as _0x51ad7d,logWarning as _0x282e5f,scrollViewportToShowTarget as _0x5b1f25,uid as _0x1cb26b}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x2e1942,isEqual as _0x4c14f1,set as _0x24ed09,unset as _0x11d3f2}from'es-toolkit/compat';import{Command as _0x265df5,Editor as _0x140042,ElementApiMixin as _0x32922a,PendingActions as _0x83e39c,Plugin as _0x2dd53f}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x2b4c5c,PillView as _0x456423,Users as _0x3002ea,getMarkerDomElement as _0x5cabcc,reRootOperation as _0x22c2f9,reRootPosition as _0x1cef80,reRootRange as _0xc7b39b,sanitizeEditorConfig as _0x5c59b1}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x1c4681,ModelElement as _0x524633,ModelRange as _0x49ff12,ModelText as _0x26249d,ViewAttributeElement as _0x1333cc,ViewContainerElement as _0x204fa7,ViewDocumentFragment as _0x5dc85d,ViewElement as _0xc55704,ViewEmptyElement as _0x11cb1f,ViewRawElement as _0x1c3a68,ViewText as _0x2d3251,ViewUIElement as _0x4af6dc}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0xb2d7ef,IconChevronUp as _0xaa8312,IconHistory as _0x4d55b6,IconSparkle as _0x29e5ea,IconThreeVerticalDots as _0x1ed1ba,IconUndo as _0x38ee45,IconUser as _0x2dbbaa}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x1c0ab2,ButtonView as _0x264e1e,ContextualBalloon as _0x221f96,CssTransitionDisablerMixin as _0x273b3b,EditorUI as _0x44fd65,IconView as _0x105ea5,InlineEditableUIView as _0x1eb7a0,LabeledFieldView as tt,ListItemView as it,ListView as et,MenuBarMenuListItemButtonView as st,MenuBarMenuListItemView as nt,MenuBarMenuListView as ot,MenuBarMenuView as rt,StickyPanelView as at,ToolbarSeparatorView as ht,ToolbarView as ct,UIModel as lt,View as ut,addListToDropdown as dt,createDropdown as ft,createLabeledInputText as vt,normalizeToolbarConfig as gt,submitHandler as mt}from'@ckeditor/ckeditor5-ui';import{DateTime as _t}from'luxon';const wt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x15441c();var pt=class extends wt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x3440d0){super(),this['id']=_0x3440d0['id']||_0x1cb26b(),this['creator']=_0x3440d0['creator']||null,this['authors']=_0x3440d0['authors']||[],this['diffData']=_0x3440d0['diffData']||null,this['toVersion']=_0x3440d0['toVersion']||0x0,this['fromVersion']=_0x3440d0['fromVersion']||0x0,this['set']('name',_0x3440d0['name']||''),this['set']('createdAt',_0x3440d0['createdAt']||new Date()),this['set']('attributes',_0x3440d0['attributes']||{});}setName(_0x449fc1){this['_update']({'name':_0x449fc1});}setAttribute(_0x4a3193,_0x4cba90){const _0x2dc7fb=_0x2e1942(this['attributes']);_0x24ed09(_0x2dc7fb,_0x4a3193,_0x4cba90),this['_update']({'attributes':_0x2dc7fb});}removeAttribute(_0x106483){const _0x541f9b=_0x2e1942(this['attributes']);_0x11d3f2(_0x541f9b,_0x106483),this['_update']({'attributes':_0x541f9b});}_update(_0x5a4137,_0x103e1a=!0x1){let _0x5b2087=!0x1;const _0x4f4f4c={'id':this['id']};for(const _0x51bd8e of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1ef192=_0x5a4137[_0x51bd8e];void 0x0!==_0x1ef192&&_0x1ef192!==this[_0x51bd8e]&&(this[_0x51bd8e]=_0x1ef192,_0x4f4f4c[_0x51bd8e]=_0x1ef192,_0x5b2087=!0x0);}_0x5b2087&&(_0x4f4f4c['authors']&&(_0x4f4f4c['authorsIds']=_0x4f4f4c['authors']['map'](_0x4a6dcb=>_0x4a6dcb['id']),delete _0x4f4f4c['authors']),this['fire']('_update',_0x4f4f4c,_0x103e1a));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x8f4ff4=>_0x8f4ff4['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},yt=class extends _0x2dd53f{['_revisions'];static get requires(){return[_0x3002ea];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x516bcd){super(_0x516bcd),this['_revisions']=new _0x5d63ac();}afterInit(){!async function(_0x3bb5f8){const _0x312e28='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x354785=0xeb829,_0x5927ab=0x79428,_0x4c9281={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x409a62(_0x53ea31){const _0x3044e4=new window['Promise'](_0x47d433=>{_0x53ea31['once']('ready',_0x47d433);}),_0x403dbd=window['Date']['now'](),_0x56b12a=_0x53ea31['config']['get']('licenseKey');async function _0x4a08cd(){let _0x24e3da,_0x44c9ac=null,_0x4b3de9=null;try{return'GPL'==_0x56b12a?'NotAllowed':(_0x24e3da=_0x108b1b(),_0x24e3da?(_0x24e3da['usageEndpoint']&&(_0x4b3de9=_0x5d4c9e(_0x24e3da['usageEndpoint'],_0x24e3da['jti'])),await _0x119233()?_0x387933()?_0x4f09e5()?'Expired':_0x1d8702()?('evaluation'==_0x24e3da['licenseType']&&(_0x44c9ac=_0x1bb47e('EvaluationLimit')),await _0xa2f230()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4f09e5(){const _0xa85cab=['evaluation','trial']['includes'](_0x24e3da['licenseType'])?_0x403dbd/0x3e8:0xe10*_0x5927ab;return _0x24e3da['exp']<_0xa85cab;}function _0x387933(){const _0x462b02=_0x24e3da['features'];if(!_0x462b02)return!0x1;if(_0x462b02['includes']('*'))return!0x0;if(_0x462b02['includes']('RH'))return!0x0;if(_0x462b02['includes']('RRH')){if(_0x476f74())return!0x0;if(_0x3b2587()||_0x3363a3())return!0x0;}return!0x1;}function _0x1d8702(){const _0x4cd530=_0x24e3da['licensedHosts'];if(!_0x4cd530||0x0==_0x4cd530['length'])return!0x0;const {hostname:_0x4b804a}=new URL(window['location']['href']);if(_0x4cd530['includes'](_0x4b804a))return!0x0;const _0x18f6fb=_0x4b804a['split']('.');return _0x4cd530['filter'](_0x28057=>_0x28057['includes']('*'))['map'](_0x33f9b3=>_0x33f9b3['split']('.'))['filter'](_0x252090=>_0x252090['length']<=_0x18f6fb['length'])['map'](_0xb138b8=>Array(_0x18f6fb['length']-_0xb138b8['length'])['fill']('*'===_0xb138b8[0x0]?'*':'')['concat'](_0xb138b8))['some'](_0x3e47c3=>_0x18f6fb['every']((_0x5099d4,_0x3f76e9)=>_0x3e47c3[_0x3f76e9]===_0x5099d4||'*'===_0x3e47c3[_0x3f76e9]));}function _0xa2f230(){return _0x44c9ac&&_0x4b3de9?new window['Promise']((_0x3c6fea,_0xfa2502)=>{_0x44c9ac['then'](_0x3c6fea,_0xfa2502),_0x4b3de9['then'](_0x257e68=>{'Valid'!=_0x257e68&&_0x3c6fea(_0x257e68);},_0xfa2502);}):_0x44c9ac||_0x4b3de9||'Valid';}}function _0x5d4c9e(_0x4f61ac,_0x3dcb10){return new window['Promise'](_0x2948be=>{if(_0x1e4775())return _0x2948be('Valid');_0x1ef4bc(),_0x53ea31['decorate']('_sendUsageRequest');let _0x2f3385=!0x1;const _0x46eee4=_0x1cb26b();function _0x1aa367(_0x187eb2){return!!_0x187eb2&&('object'==typeof _0x187eb2||'function'==typeof _0x187eb2)&&'function'==typeof _0x187eb2['then']&&'function'==typeof _0x187eb2['catch'];}function _0x344b8e(_0x542341){_0x4d8030(_0x542341)['then'](_0x5c540b=>_0x5c540b&&'ok'==_0x5c540b['status']?_0x3bf5c2(_0x5bae57(_0x46eee4+_0x3dcb10))!=_0x5c540b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x305720=>(_0x58f53c(),_0x305720),()=>{const _0x1d3469=_0x3a924c();return null==_0x1d3469?(_0x58f53c(),'Valid'):_0x403dbd-_0x1d3469>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2948be)['catch'](()=>{_0x2948be('UsageLimit');});const _0x5e5bca=0x36ee80;function _0x58f53c(){const _0x48c0ba='llct-'+_0x3bf5c2(_0x5bae57(_0x4f61ac)),_0x2d47cf=_0x473d36(_0x3bf5c2(window['Math']['ceil'](_0x403dbd/_0x5e5bca)));window['localStorage']['setItem'](_0x48c0ba,_0x2d47cf);}function _0x3a924c(){const _0x486832='llct-'+_0x3bf5c2(_0x5bae57(_0x4f61ac)),_0x514b4b=window['localStorage']['getItem'](_0x486832);return _0x514b4b?window['parseInt'](_0x473d36(_0x514b4b),0x10)*_0x5e5bca:null;}function _0x4d8030(_0x43ad24){return new window['Promise']((_0x28b13d,_0x42739a)=>{_0x43ad24['then'](_0x28b13d,_0x42739a),window['setTimeout'](_0x42739a,0x1d4c0);});}}_0x53ea31['on']('_sendUsageRequest',(_0x2e536f,_0x1c131a)=>{if(_0x1c131a[0x0]!=_0x4f61ac)return _0x2948be('UsageLimit');_0x1c131a[0x1]={..._0x1c131a[0x1],'requestId':_0x46eee4};},{'priority':'high'}),_0x53ea31['on']('_sendUsageRequest',_0x3edb5f=>{_0x1aa367(_0x3edb5f['return'])&&(_0x2f3385=!0x0,_0x344b8e(_0x3edb5f['return']));},{'priority':'low'}),_0x3044e4['then'](()=>{_0x2f3385||_0x2948be('UsageLimit');});});function _0x1e4775(){return'auto'==_0x53ea31['editing']['view']['_overlayModeHint'];}function _0x1ef4bc(){_0x53ea31['editing']['view']['_overlayModeHint']='auto';}}function _0x1bb47e(_0x28fa14){const _0x348518=[new window['Promise'](_0x2884d4=>setTimeout(_0x2884d4,0x93ecc)),_0x3044e4['then'](()=>new window['Promise'](_0x327451=>{const _0x48505b=0x7,_0x4881a2=_0x3bb5f8['_revisions'];function _0x301f4c(){_0x4881a2['length']>=_0x48505b&&_0x327451();}_0x301f4c(),_0x4881a2['on']('add',_0x301f4c);})),new window['Promise'](_0x59a8cf=>{function _0x39cf82(){for(const _0x414261 in window)if(window['Number']['isNaN'](window['Number'](_0x414261))&&window[_0x414261]==_0x354785)return _0x59a8cf();'destroyed'!=_0x53ea31['state']&&window['setTimeout'](_0x39cf82,0x1388);}_0x58393f('RevisionViewer')&&_0x39cf82();})];return window['Promise']['race'](_0x348518)['then'](()=>_0x28fa14);}async function _0x3ba875(){if(await _0x3044e4,_0x58393f('RevisionViewer')){const _0x2751e1=_0x3bb5f8['getRevision'](0x0),_0x4b4662=_0x3bb5f8['getEarlierVisibleRevision'](_0x2751e1['id']),_0x515075=_0x28c59c('RevisionViewer');return await _0x515075['compare'](_0x2751e1['id'],_0x4b4662?_0x4b4662['id']:null,!0x0),_0x515075['unbind']('isEnabled'),_0x515075['isEnabled']=!0x1,_0x515075['compare']=_0xed4402,void(_0x515075['_getDiff']=_0xed4402);}if(_0x58393f('RevisionTracker')){const _0x414611=_0x28c59c('RevisionTracker');_0x414611['unbind']('isEnabled'),_0x414611['isEnabled']=!0x1,_0x414611['update']=_0xed4402,_0x414611['saveRevision']=_0xed4402;}_0x53ea31['model']['change']=_0xed4402,_0x53ea31['model']['enqueueChange']=_0xed4402,_0x53ea31['enableReadOnlyMode']('model');}function _0x476f74(){return _0x58393f('WebSocketGateway')&&'connected'==_0x28c59c('WebSocketGateway')['state'];}function _0x3b2587(){return _0x58393f('RevisionViewerIntegration');}function _0x3363a3(){return _0x58393f('TrackChangesDataGetter');}function _0x455015(_0x217de5){const _0x5978fd=_0x35c767();_0x53ea31[_0x5978fd]='revisionHistoryLicenseKey'+_0x217de5,_0x217de5['endsWith']('Limit')&&(window[_0x35c767()]=_0x354785),'Valid'!=_0x217de5&&_0x3ba875();}function _0x35c767(){const _0x1a4a87=window['String'](window['performance']['now']())['replace']('.','');let _0x2c7705='N';for(let _0x3c67af=0x0;_0x3c67af<_0x1a4a87['length'];_0x3c67af+=0x2){let _0x4f2754=window['parseInt'](_0x1a4a87['substring'](_0x3c67af,_0x3c67af+0x2));_0x4f2754>=0x3e&&(_0x4f2754-=0x3e),_0x2c7705+=_0x312e28[_0x4f2754];}return _0x2c7705;}function _0x108b1b(){const _0x28eb10=_0x56b12a['split']('.');if(0x3!=_0x28eb10['length'])return null;return _0x2653e1(_0x28eb10[0x1]);function _0x2653e1(_0x196a6c){const _0x553fce=_0x4f69ce(_0x196a6c);return _0x553fce&&_0x51f8f1()?_0x553fce:null;function _0x51f8f1(){const _0x5907be=_0x553fce['jti'],_0xc54dac=window['parseInt'](_0x5907be['substring'](_0x5907be['length']-0x8),0x10),_0x4d05fa={..._0x553fce,'jti':_0x5907be['substring'](0x0,_0x5907be['length']-0x8)};return delete _0x4d05fa['vc'],_0x5bae57(_0x4d05fa)==_0xc54dac;}}}async function _0x119233(){let _0x322d54=!0x0;try{const [_0x7e8c7,_0x196380,_0x2809d6]=_0x56b12a['split']('.');return _0x1c145c(_0x7e8c7),await _0x5e5cdc(_0x7e8c7,_0x196380,_0x2809d6),_0x322d54;}catch{return!0x1;}function _0x1c145c(_0x44c3de){const _0x5b18f6=_0x4f69ce(_0x44c3de);_0x5b18f6&&'ES256'==_0x5b18f6['alg']||(_0x322d54=!0x1);}async function _0x5e5cdc(_0x16a572,_0x349097,_0x12cb34){const _0xa684d3=window['Uint8Array']['from'](_0x26f26d(_0x12cb34),_0x15a5a8=>_0x15a5a8['charCodeAt'](0x0)),_0x25f8dc=new window['TextEncoder']()['encode'](_0x16a572+'.'+_0x349097),_0x1c75b1=window['crypto']['subtle'];if(!_0x1c75b1)return;const _0x37b972=await _0x1c75b1['importKey']('jwk',_0x4c9281,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1c75b1['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x37b972,_0xa684d3,_0x25f8dc)||(_0x322d54=!0x1);}}function _0x4f69ce(_0x5d3a92){return _0x5d3a92['startsWith']('ey')?JSON['parse'](_0x26f26d(_0x5d3a92)):null;}function _0x26f26d(_0x261efc){return window['atob'](_0x261efc['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5bae57(_0x410644){let _0x4bb7ce=0x1505;function _0x21f281(_0x557f32){for(let _0x174818=0x0;_0x174818<_0x557f32['length'];_0x174818++){const _0x2b9021=_0x557f32['charCodeAt'](_0x174818);_0x4bb7ce=(_0x4bb7ce<<0x5)+_0x4bb7ce+_0x2b9021,_0x4bb7ce&=_0x4bb7ce;}}function _0x3bd97d(_0x563094){Array['isArray'](_0x563094)?_0x563094['forEach'](_0x3bd97d):_0x563094&&'object'==typeof _0x563094?Object['entries'](_0x563094)['sort']()['forEach'](([_0x45a936,_0x512867])=>{_0x21f281(_0x45a936),_0x3bd97d(_0x512867);}):_0x21f281(window['String'](_0x563094));}return _0x3bd97d(_0x410644),_0x4bb7ce>>>0x0;}function _0x3bf5c2(_0x476498){return _0x476498['toString'](0x10)['padStart'](0x8,'0');}function _0x473d36(_0x4ba18a){return _0x4ba18a['split']('')['reverse']()['join']('');}function _0x58393f(_0x42a3f2){return _0x53ea31['plugins']['has'](_0x42a3f2);}function _0x28c59c(_0x2bb0c2){return _0x53ea31['plugins']['get'](_0x2bb0c2);}function _0xed4402(){}_0x455015(await _0x4a08cd());}_0x409a62(_0x3bb5f8['editor']);}(this);}createRevision(_0x5524ec){const _0x39607f=this['editor']['plugins']['get']('Users');return new pt({'id':_0x5524ec['id'],'name':_0x5524ec['name'],'creator':_0x5524ec['creatorId']?_0x39607f['getUser'](_0x5524ec['creatorId']):null,'diffData':_0x5524ec['diffData']||_0x5524ec['data'],'authors':_0x5524ec['authorsIds']['map'](_0x3b26ab=>_0x39607f['getUser'](_0x3b26ab)),'createdAt':new Date(_0x5524ec['createdAt']),'attributes':_0x5524ec['attributes'],'fromVersion':_0x5524ec['fromVersion'],'toVersion':_0x5524ec['toVersion']});}['addRevision'](_0x256e70,_0x230a02=0x0){this['_revisions']['add'](_0x256e70,_0x230a02);}getRevision(_0x4dff79){return this['_revisions']['get'](_0x4dff79);}getRevisions(_0x4dcaa8={'toJSON':!0x1}){const _0x264c61=Array['from'](this['_revisions']);return _0x264c61['reverse'](),_0x4dcaa8['toJSON']?_0x264c61['map'](_0x3581d0=>_0x3581d0['toJSON']()):_0x264c61;}getIndex(_0x34b834){return this['_revisions']['getIndex'](_0x34b834);}getEarlierVisibleRevision(_0x22896c){const [,_0xab6a4b]=this['getRevisionsIterator'](_0x22896c,{'direction':'earlier'});return _0xab6a4b;}getLaterVisibleRevision(_0x30431b){const [,_0x361590]=this['getRevisionsIterator'](_0x30431b,{'direction':'later'});return _0x361590;}getRevisionsInDiff(_0x31044f){const _0xa2016e=[];for(const _0x1246ab of this['getRevisionsIterator'](_0x31044f['newRevisionId']))if(_0xa2016e['push'](_0x1246ab),_0x1246ab['id']===_0x31044f['oldRevisionId'])break;return _0xa2016e;}*getRevisionsIterator(_0x1b4048,{direction:_0x59db49='earlier',filter:_0x1a35fc=()=>!0x0}={}){const _0x310985='earlier'===_0x59db49?0x1:-0x1;let _0x2ad9c5=this['_revisions']['get'](_0x1b4048),_0x5c4fbb=this['getIndex'](_0x2ad9c5);for(yield _0x2ad9c5;_0x2ad9c5;){if(_0x5c4fbb+=_0x310985,_0x2ad9c5=this['getRevision'](_0x5c4fbb),!_0x2ad9c5)return;_0x1a35fc(_0x2ad9c5)&&(yield _0x2ad9c5);}}},bt=class extends _0x2dd53f{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x204fa7,'c'],[_0x1333cc,'a'],[_0x11cb1f,'e'],[_0x1c3a68,'r'],[_0x4af6dc,'u']]);_typeCharToViewClass=new Map([['c',_0x204fa7],['a',_0x1333cc],['e',_0x11cb1f],['r',_0x1c3a68],['u',_0x4af6dc]]);async loadRevisionData(_0x10cc38,_0x4365a2){if(_0x10cc38['diffData']||!_0x4365a2)return;const _0xf511fb=this['editor']['config']['get']('collaboration.channelId');_0x10cc38['diffData']=(await _0x4365a2['getRevision']({'channelId':_0xf511fb,'revisionId':_0x10cc38['id']}))['diffData'];}getRevisionDocumentData(_0x10038b){const _0x33500f={};for(const _0x4bf08b in _0x10038b['diffData']){if(_0x10038b['diffData'][_0x4bf08b]['attachChange']&&!_0x10038b['diffData'][_0x4bf08b]['attachChange']['isAttached'])continue;const _0xd3cc4a=this['_removeRevisionMarkers'](JSON['parse'](_0x10038b['diffData'][_0x4bf08b]['insertions'])),_0x394196=this['editor']['editing']['view']['document'],_0x33938a=new _0x5dc85d(_0x394196,_0xd3cc4a['map'](_0x28b4a2=>this['_getViewFromDiffObj'](_0x28b4a2,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x33500f[_0x4bf08b]=this['editor']['data']['processor']['toData'](_0x33938a),this['editor']['data']['processor']['useFillerType']('default');}return _0x33500f;}getRevisionRootsAttributes(_0x59ec9a){const _0x427ae0={};for(const _0x454787 in _0x59ec9a['diffData'])_0x59ec9a['diffData'][_0x454787]['attachChange']&&!_0x59ec9a['diffData'][_0x454787]['attachChange']['isAttached']||(_0x427ae0[_0x454787]=_0x59ec9a['diffData'][_0x454787]['attributesAfter']||{});return _0x427ae0;}getRevisionRootsModelElements(_0x5113c7){const _0x15be4e={};for(const _0xe444c4 in _0x5113c7['diffData']){if(_0x5113c7['diffData'][_0xe444c4]['attachChange']&&!_0x5113c7['diffData'][_0xe444c4]['attachChange']['isAttached'])continue;const _0x4f569b=_0x5113c7['diffData'][_0xe444c4]['rootElementName'];_0x4f569b&&(_0x15be4e[_0xe444c4]=_0x4f569b);}return _0x15be4e;}_getTypeCharForViewElement(_0x18ff98){return this['_viewClassToTypeChar']['get'](_0x18ff98['constructor']);}_getViewFromDiffObj(_0x38e677,_0x37432d){const _0x3c751f=this['editor']['editing']['view']['document'];if('string'==typeof _0x38e677)return new _0x2d3251(_0x3c751f,_0x38e677);{let _0x2f118e,_0x4a0874;_0x4a0874='u'==_0x38e677['type']||'r'==_0x38e677['type']?[]:_0x38e677['children']['map'](_0x1113a8=>this['_getViewFromDiffObj'](_0x1113a8,_0x37432d));const _0x367d84=this['_typeCharToViewClass']['get'](_0x38e677['type'])||_0xc55704,_0x5364c6=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2f118e=new _0x367d84(_0x3c751f,_0x38e677['name'],_0x38e677['attributes'],_0x4a0874),'u'==_0x38e677['type']&&_0x38e677['children'][0x0]){const _0x247c79=_0x38e677['children'][0x0];if(_0x2f118e['render']=function(_0x109169){const _0x1d232b=_0x109169['createElement']('div');return _0x1d232b['innerHTML']=_0x247c79,_0x1d232b['childNodes'][0x0];},_0x37432d){const _0x300ff8=new _0x5dc85d(_0x3c751f);_0x300ff8['_appendChild'](_0x2f118e);const _0x295acc=Array['from'](_0x5364c6['viewChildrenToDom'](_0x300ff8,{'bind':!0x1})),_0x60217b=_0x5364c6['domDocument']['createElement']('div');_0x60217b['append'](..._0x295acc),_0x2f118e=Array['from'](_0x5364c6['domChildrenToView'](_0x60217b))[0x0];}}else{if('r'==_0x38e677['type']&&_0x38e677['children'][0x0]){const _0x3bbb53=_0x38e677['children'][0x0];if(_0x2f118e['render']=function(_0x55e657){_0x55e657['innerHTML']=_0x3bbb53;},_0x37432d){const _0x455f83=new _0x5dc85d(_0x3c751f);_0x455f83['_appendChild'](_0x2f118e);const _0x37ba00=Array['from'](_0x5364c6['viewChildrenToDom'](_0x455f83,{'bind':!0x1})),_0x3d9a01=_0x5364c6['domDocument']['createElement']('div');_0x3d9a01['append'](..._0x37ba00);const _0x17151a=Array['from'](_0x5364c6['domChildrenToView'](_0x3d9a01));_0x17151a['length']>0x1?_0x2f118e['_appendChild'](_0x17151a):_0x2f118e=_0x17151a[0x0];}}}if(_0x38e677['customProperties']){for(const [_0x44b8d0,_0x5d045a]of _0x38e677['customProperties'])_0x2f118e['_setCustomProperty'](_0x44b8d0,_0x5d045a);}const _0x3e9d08=void 0x0===_0x38e677['fillerOffset']?null:_0x38e677['fillerOffset'];return null!==_0x3e9d08&&(_0x2f118e['getFillerOffset']=()=>_0x3e9d08),_0x2f118e;}}_makeModelFromViewString(_0x2c7f61,_0x27d74b){const _0x48a7f4=JSON['parse'](_0x2c7f61),_0x7bd378=this['editor']['editing']['view']['document'],_0x4192cc=new _0x5dc85d(_0x7bd378,_0x48a7f4['map'](_0x171bb9=>this['_getViewFromDiffObj'](_0x171bb9,!0x0))),_0x11dd0b=this['editor']['data']['toModel'](_0x4192cc,_0x27d74b);return _0x11dd0b['name']=_0x27d74b,_0x11dd0b;}['_removeRevisionMarkers'](_0x1a56fd){return(_0x1a56fd=_0x1a56fd['filter'](_0x444050=>!_0x444050['name']||'revision-start'!==_0x444050['name']&&'revision-end'!==_0x444050['name']))['forEach'](_0x2f1afc=>{'string'!=typeof _0x2f1afc&&(_0x2f1afc['children']=this['_removeRevisionMarkers'](_0x2f1afc['children']),_0x2f1afc['attributes']=_0x2f1afc['attributes']['filter'](_0x1c9d62=>!_0x1c9d62[0x0]['startsWith']('data-revision-')));}),_0x1a56fd;}};function Rt(_0x36b6dd,_0x436180,_0x179009){const t=_0x36b6dd['t'];switch(_0x436180){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'},_0x179009);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x179009);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');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x179009);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x179009);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x179009);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var kt=class extends _0x2dd53f{['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[_0x3002ea,yt,bt,_0x83e39c];}constructor(_0x48fc2c){super(_0x48fc2c),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new At(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x34dd24=_0x1cb26b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x34dd24},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 _0x3e6b77=this['repository']['getRevision'](0x0),_0x348fe3=_0x3e6b77&&null===_0x3e6b77['creator']?_0x3e6b77:null;if(this['_continueCurrentRevision']=!!_0x348fe3&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5c12f4=this['_source']['getCurrentRevisionId'](),_0x4dad5f=this['repository']['getRevision'](_0x5c12f4);if(_0x4dad5f)this['_startingVersion']=_0x4dad5f['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x52b0a1=this['_source']['history']['_operations']['find'](_0x2f4b3e=>!_0x2f4b3e['_isInit']),_0x3c3ee1=_0x52b0a1?_0x52b0a1['baseVersion']:this['_source']['history']['version'];_0x3e6b77?(_0x3e6b77['toVersion']<_0x3c3ee1&&_0x3e6b77['_update']({'toVersion':_0x3c3ee1}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x348fe3['id'],this['_startingVersion']=_0x348fe3['fromVersion']):(this['_startingVersion']=_0x3e6b77['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3c3ee1,this['_continueCurrentRevision']=!0x1);}}else _0x348fe3&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x348fe3['toVersion'],this['editor']['model']['document']['history']['version']),_0x348fe3['fromVersion']===_0x348fe3['toVersion']?(0x0!==_0x348fe3['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x348fe3['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x348fe3['id'],this['_startingVersion']=_0x348fe3['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',_0x2774d6=>!_0x2774d6),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x5d878d=[this['editor']];for(const _0x2c64da of _0x5d878d){let _0x38f880;for(const _0xd3cdef in _0x2c64da){const _0x11a4d2=_0xd3cdef,_0x1a4dfd=_0x2c64da[_0x11a4d2];if('revisionHistoryLicenseKeyValid'==_0x1a4dfd||'revisionHistoryLicenseKeyInvalid'==_0x1a4dfd||'revisionHistoryLicenseKeyExpired'==_0x1a4dfd||'revisionHistoryLicenseKeyDomainLimit'==_0x1a4dfd||'revisionHistoryLicenseKeyNotAllowed'==_0x1a4dfd||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1a4dfd||'revisionHistoryLicenseKeyUsageLimit'==_0x1a4dfd){delete _0x2c64da[_0x11a4d2],_0x38f880=_0x1a4dfd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x38f880&&_0x2c64da['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x38f880&&_0x2c64da['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x38f880&&_0x2c64da['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x38f880&&_0x2c64da['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x38f880&&_0x2c64da['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x38f880&&_0x2c64da['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x2acc77=this['repository']['getRevision'](0x0),_0x53119e=await this['getRevisionDocumentData'](_0x2acc77),_0x46af87=await this['getRevisionRootsAttributes'](_0x2acc77),_0x5bac75=this['_utils']['getRevisionRootsModelElements'](_0x2acc77);this['_replaceEditorDataWithRevisionData'](_0x53119e,_0x46af87,_0x5bac75);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x337be3){this['_source']=_0x337be3;}async update(){const _0x4c36d1=await this['_source']['getLatestVersion']();if(_0x4c36d1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x24ed30=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4c36d1});_0x24ed30['authors']=_0x24ed30['authorsIds']['map'](_0x1f4826=>this['editor']['plugins']['get']('Users')['getUser'](_0x1f4826)),this['currentRevision']['_update'](_0x24ed30);}}async['saveRevision'](_0x16b6fb={},_0x3b368b=null){const _0x3884bb=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3b368b>this['currentRevision']['toVersion']&&(_0x3b368b=null),null===_0x3b368b&&(_0x3b368b=await this['_source']['getLatestVersion']());const _0x12e9f4=this['_getFromVersion'](_0x3b368b),_0x4d255d=this['buildRevisionData']({'from':_0x12e9f4,'to':_0x3b368b});if(this['currentRevision']['toVersion']<_0x3b368b){const _0x48a6a0=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3b368b,'to':_0x3b368b});_0x48a6a0['authors']=[],_0x48a6a0['authorsIds']=[],_0x48a6a0['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x48a6a0,!0x0),delete _0x48a6a0['authors'],_0x3884bb['push'](_0x48a6a0);}const _0x4e45c3={..._0x16b6fb,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x16b6fb['name']||null,'id':_0x16b6fb['id']||_0x1cb26b(),..._0x4d255d,'attributes':{..._0x16b6fb['attributes'],..._0x4d255d['attributes']}},_0x51fd82=this['addRevisionData'](_0x4e45c3);_0x3884bb['push'](_0x4e45c3);const _0x19487b=this['repository']['getIndex'](_0x51fd82);if(0x0!==_0x19487b){const _0x303fde=this['repository']['getRevision'](_0x19487b-0x1);if(_0x303fde['fromVersion']!==_0x3b368b){const _0x39832f=this['_revisionDataBuilder']['getData'](_0x3b368b,_0x303fde['toVersion']),_0x3608ab={'id':_0x303fde['id'],'diffData':_0x39832f['diffData'],'authorsIds':_0x39832f['authorsIds'],'authors':_0x39832f['authorsIds']['map'](_0x7d5c2b=>this['editor']['plugins']['get']('Users')['getUser'](_0x7d5c2b)),'fromVersion':_0x3b368b};this['_stampAiAttribute'](_0x3608ab,_0x303fde,!!_0x39832f['hasAIChanges']),_0x303fde===this['currentRevision']&&(_0x3608ab['createdAt']=new Date(_0x4e45c3['createdAt']['getTime']()+0xa)),_0x303fde['_update'](_0x3608ab,!0x0),delete _0x3608ab['authors'],_0x3884bb['push'](_0x3608ab);}}if(this['adapter']){for(const _0x1c7389 of _0x3884bb)this['_bufferUpdate'](_0x1c7389['id'],_0x1c7389,!0x0);this['sendBufferedUpdates']();}return _0x51fd82;}addRevisionData(_0x31235e){const _0x5d3d06=this['repository']['createRevision'](_0x31235e);return this['adapter']&&_0x5d3d06['on']('_update',(_0x31176a,_0x53a61a,_0x34f85a)=>{_0x34f85a||(this['_bufferUpdate'](_0x53a61a['id'],_0x53a61a,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5d3d06,this['_findInsertionIndex'](_0x5d3d06)),_0x5d3d06;}async getRevisionDocumentData(_0x1898c6){return await this['_utils']['loadRevisionData'](_0x1898c6,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1898c6);}async getRevisionRootsAttributes(_0x2f2fef){return await this['_utils']['loadRevisionData'](_0x2f2fef,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2f2fef);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x568f65=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x915805=0x0;_0x915805<_0x568f65['length'];_0x915805++){const _0x4852bc=_0x568f65[_0x915805];let _0x5659c7=!0x1;for(const _0x57b89b of Object['keys'](_0x4852bc))void 0x0===_0x4852bc[_0x57b89b]?delete _0x4852bc[_0x57b89b]:'id'!==_0x57b89b&&(_0x5659c7=!0x0);_0x5659c7||(_0x568f65[_0x915805]=null);}if(_0x568f65=_0x568f65['filter'](_0x195583=>null!==_0x195583),!_0x568f65['length'])return;for(let _0x417aa3=0x0;_0x417aa3<_0x568f65['length'];_0x417aa3++){const _0xc40670=_0x568f65[_0x417aa3];void 0x0!==_0xc40670['fromVersion']&&void 0x0===_0xc40670['toVersion']&&(_0xc40670['toVersion']=this['repository']['getRevision'](_0xc40670['id'])['toVersion']),void 0x0!==_0xc40670['toVersion']&&void 0x0===_0xc40670['fromVersion']&&(_0xc40670['fromVersion']=this['repository']['getRevision'](_0xc40670['id'])['fromVersion']);}const _0x2510aa=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x568f65,_0x2510aa)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x499777=>{if(_0x499777){for(const _0x49e166 of _0x499777)this['setRevisionData']({'id':_0x49e166['id'],'createdAt':_0x49e166['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0xca948e,_0xdbf562,_0xba8758){if(_0xba8758===(!!_0xdbf562&&!!_0xdbf562['attributes']['@ai']))return;const _0x4d42d3={..._0xdbf562?_0xdbf562['attributes']:{},..._0xca948e['attributes']};_0xba8758?_0x4d42d3['@ai']=!0x0:delete _0x4d42d3['@ai'],_0xca948e['attributes']=_0x4d42d3;}buildRevisionData({revision:_0x48fa11=null,from:_0xd8f8f7=null,to:_0x3ad4b2=null}){_0xd8f8f7=null!==_0xd8f8f7?_0xd8f8f7:_0x48fa11['fromVersion'],_0x3ad4b2=null!==_0x3ad4b2?_0x3ad4b2:_0x48fa11['toVersion'];const _0x414ff5=this['_revisionDataBuilder']['getData'](_0xd8f8f7,_0x3ad4b2),_0x4070ad={'diffData':_0x414ff5['diffData'],'authorsIds':_0x414ff5['authorsIds'],'fromVersion':_0xd8f8f7,'toVersion':_0x3ad4b2};if(this['_stampAiAttribute'](_0x4070ad,_0x48fa11,!!_0x414ff5['hasAIChanges']),!_0x48fa11||_0x3ad4b2!==_0x48fa11['toVersion']){const _0x11e3e1=_0x3ad4b2-0x1,_0x5bd00f=this['_source']['history']['getOperation'](_0x11e3e1);_0x4070ad['createdAt']=_0x5bd00f&&_0x5bd00f['createdAt']||new Date();}if(this['_loadedStateData']&&_0xd8f8f7===this['_loadedStateData']['fromVersion']){for(const _0x113cc4 of this['_loadedStateData']['authors'])_0x4070ad['authorsIds']['includes'](_0x113cc4['id'])||_0x4070ad['authorsIds']['push'](_0x113cc4['id']);}return _0x4070ad;}_bufferUpdate(_0x27522f,_0x45e846,_0x4bd99b){if(this['_bufferedUpdates']['has'](_0x27522f)){const _0x2b1b47=this['_bufferedUpdates']['get'](_0x27522f);_0x45e846=_0x4bd99b?{..._0x2b1b47,..._0x45e846}:{..._0x45e846,..._0x2b1b47};}this['_bufferedUpdates']['set'](_0x27522f,_0x45e846);}setRevisionData(_0x2759bd){const _0x4a26e5=this['repository']['getRevision'](_0x2759bd['id']);if(_0x2759bd['createdAt']&&(_0x2759bd['createdAt']=new Date(_0x2759bd['createdAt'])),_0x2759bd['authorsIds']){const _0x14a991=this['editor']['plugins']['get']('Users');_0x2759bd['authors']=_0x2759bd['authorsIds']['map'](_0x5bd2da=>_0x14a991['getUser'](_0x5bd2da));}_0x4a26e5['_update'](_0x2759bd,!0x0);}_createInitialRevision(_0x693209){const _0x1003d4=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1003d4)this['_initialRevisionId']=_0x1003d4['id'];else{const _0x225d4c=!this['editor']['model']['document']['roots']['find'](_0x459a5c=>this['editor']['model']['hasContent'](_0x459a5c)),_0x5d79be=this['editor']['plugins']['get']('Users')['me']['id'],_0xbcbee8=Rt(this['editor']['locale'],_0x225d4c?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x693209,'to':_0x693209,'id':this['_initialRevisionId'],'name':_0xbcbee8,'creatorId':_0x5d79be});}}_createCurrentRevision(_0x37a983){const _0x25f343=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x25f343),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x37a983,'to':_0x37a983,'id':_0x25f343,'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(_0x252eb0,_0x314bba,_0x126828){const _0x2ce4c5={},_0x35a2a8={},_0x1f1732={},_0x7c157a=this['editor']['config']['get']('roots')||{};for(const [_0x17a58e,_0xee15d7]of Object['entries'](_0x7c157a))_0xee15d7['lazyLoad']||(_0x2ce4c5[_0x17a58e]=_0xee15d7['initialData']??'',_0x35a2a8[_0x17a58e]=_0xee15d7['modelAttributes']||{},_0xee15d7['modelElement']&&(_0x1f1732[_0x17a58e]=_0xee15d7['modelElement']));for(const _0x6583ff of this['editor']['model']['document']['getRootNames']())_0x2ce4c5[_0x6583ff]??='',_0x35a2a8[_0x6583ff]??={};let _0x56455c=!0x1;const _0x19c7b4=Object['keys'](_0x2ce4c5),_0x262da1=Object['keys'](_0x252eb0);for(const _0x3fc7ad of _0x19c7b4){if(_0x2ce4c5[_0x3fc7ad]!==_0x252eb0[_0x3fc7ad]&&''!==_0x2ce4c5[_0x3fc7ad]['trim']()){_0x56455c=!0x0;break;}if(!_0x4c14f1(_0x35a2a8[_0x3fc7ad],_0x314bba[_0x3fc7ad])&&Object['keys'](_0x35a2a8[_0x3fc7ad])['length']>0x0){_0x56455c=!0x0;break;}const _0x59d2d9=_0x1f1732[_0x3fc7ad],_0x5006a3=_0x126828[_0x3fc7ad];if(_0x59d2d9&&_0x5006a3&&_0x59d2d9!==_0x5006a3){_0x56455c=!0x0;break;}}_0x56455c||(_0x56455c=_0x262da1['some'](_0x59204e=>!this['editor']['model']['document']['getRoot'](_0x59204e))),_0x56455c&&_0x282e5f('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2ce4c5,'editorRootsAttributes':_0x35a2a8,'editorRootsModelElements':_0x1f1732,'revisionData':_0x252eb0,'revisionRootsAttributes':_0x314bba,'revisionRootsModelElements':_0x126828});for(const [_0x20e7aa,_0x1b19f6]of Object['entries'](_0x252eb0))this['editor']['config']['set']('roots.'+_0x20e7aa+'.initialData',_0x1b19f6);for(const [_0x386176,_0x16d592]of Object['entries'](_0x314bba))this['editor']['config']['set']('roots.'+_0x386176+'.modelAttributes',_0x16d592);const _0x29fea7=this['editor']['model']['document'];for(const [_0x559e4b,_0xbd1933]of Object['entries'](_0x126828)){this['editor']['config']['set']('roots.'+_0x559e4b+'.modelElement',_0xbd1933);const _0x4e24f9=_0x29fea7['getRoot'](_0x559e4b);_0x4e24f9&&_0x4e24f9['name']!==_0xbd1933&&(_0x29fea7['roots']['remove'](_0x559e4b),_0x29fea7['createRoot'](_0xbd1933,_0x559e4b));}}_addPendingAction(){if(!this['_pendingAction']){const _0x315f93=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x315f93['add'](Rt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x10ec0e){const _0x24bf1b=this['repository']['getRevisions']();_0x24bf1b['reverse']();let _0x27b27e=0x0;for(;_0x27b27e<_0x24bf1b['length'];){const _0x2753dd=_0x24bf1b[_0x27b27e];if(_0x2753dd===this['currentRevision']){_0x27b27e++;continue;}if(_0x2753dd['id']===this['_initialRevisionId'])break;const _0x3027bc=_0x10ec0e['toVersion']-_0x2753dd['toVersion']||_0x10ec0e['fromVersion']-_0x2753dd['fromVersion'];if(_0x3027bc>0x0)break;if(_0x3027bc<0x0)_0x27b27e++;else{if(!_0x10ec0e['creator']&&_0x2753dd['creator'])break;if(_0x2753dd['creator']||!_0x10ec0e['creator']){if(_0x10ec0e['createdAt']>_0x2753dd['createdAt'])break;_0x27b27e++;}else _0x27b27e++;}}return _0x27b27e;}_getFromVersion(_0x1c4264){const _0x2dbf5c=this['repository']['getRevisions']();_0x2dbf5c['reverse'](),_0x2dbf5c['shift']();const _0x4fbf8a=_0x2dbf5c['find'](_0x22d1b4=>_0x22d1b4['toVersion']<=_0x1c4264)['toVersion'];return _0x4fbf8a<this['_startingVersion']?this['_startingVersion']:_0x4fbf8a;}['_makeRevision']({name:_0x6abb59,from:_0x2d9d34,to:_0x4a896d,creatorId:_0x219660,id:_0x3dcb57}){const _0x1b136f=this['buildRevisionData']({'from':_0x2d9d34,'to':_0x4a896d});_0x1b136f['name']=_0x6abb59,_0x1b136f['creatorId']=_0x219660,_0x1b136f['id']=_0x3dcb57;const _0xb08dd1=this['addRevisionData'](_0x1b136f);return this['adapter']&&this['_bufferUpdate'](_0x1b136f['id'],_0x1b136f,!0x0),_0xb08dd1;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},At=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x2a12e0){this['editor']=_0x2a12e0,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['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x5933e2){this['source']=_0x5933e2;const _0x91289a=new Map(),_0x12415b=new Map(),_0x140538=this['editor']['model']['document']['roots']['map'](_0x34a0fe=>_0x34a0fe['rootName']);for(const _0xd7af32 of _0x140538){const _0x46e9aa=this['editor']['model']['document']['getRoot'](_0xd7af32),_0xc68bcf=It(_0x46e9aa);_0x91289a['set'](_0xd7af32,_0xc68bcf),_0x12415b['set'](_0xd7af32,Object['fromEntries'](_0x46e9aa['getAttributes']()));}const _0x1a0b3d=Array['from'](this['editor']['model']['markers'])['map'](_0x4dca7e=>[_0x4dca7e['name'],_0x4dca7e['getRange']()]),_0x47760e=this['source']['version'];this['_saveMetaData'](_0x47760e,_0x91289a,_0x1a0b3d,_0x12415b),this['_startingRevisionId']=this['_revisionId'];const _0x435021=new Map(),_0x39e22f=new Map();for(const _0x572499 of _0x140538){const _0x3cb0b8=St(_0x572499,this['editor']['model']['document']['getRoot'](_0x572499)['name']);_0x435021['set'](_0x572499,_0x3cb0b8),_0x39e22f['set'](_0x572499,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x435021,[],_0x39e22f);}getData(_0x11b046,_0x884b82){if(this['_lastFrom']===_0x11b046&&this['_lastTo']<=_0x884b82)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x884b82,!0x0);else{if(!this['_savedMetaData']['has'](_0x11b046)){const _0x52f0d4=this['_getPreviousFrom'](_0x11b046);this['_calculateMetaData'](_0x52f0d4,_0x11b046,!0x1);}this['_calculateMetaData'](_0x11b046,_0x884b82,!0x0);}return this['_lastFrom']=_0x11b046,this['_lastTo']=_0x884b82,this['_getState']();}loadState(_0x5ee96f){if(!this['_savedMetaData']['has'](_0x5ee96f['fromVersion'])){const _0x4fdb68=this['_getPreviousFrom'](_0x5ee96f['fromVersion']);this['_calculateMetaData'](_0x4fdb68,_0x5ee96f['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5ee96f['fromVersion'],_0x5ee96f['toVersion'],!0x1);const _0x68f08=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5ee96f['fromVersion'],this['_lastTo']=_0x5ee96f['toVersion'];for(const _0x415dd6 in _0x5ee96f['diffData']){const _0x28a6a5=_0x5ee96f['diffData'][_0x415dd6]['attachChange'],_0x1f4177=_0x2e1942(_0x5ee96f['diffData'][_0x415dd6]['attributesBefore'])||{},_0x30ba7d=_0x5ee96f['diffData'][_0x415dd6],_0x2989ad=_0x68f08['_makeModelFromViewString'](_0x30ba7d['deletions'],_0x30ba7d['rootElementName']||'$root');_0x2989ad['rootName']=_0x415dd6,_0x2989ad['_isAttached']=!_0x28a6a5||!_0x28a6a5['isAttached'],_0x2989ad['isAttached']=()=>_0x2989ad['_isAttached'],this['_baseRoots']['set'](_0x415dd6,_0x2989ad),this['_baseRootsAttributes']['set'](_0x415dd6,_0x1f4177),_0x28a6a5&&this['_touchedRoots']['set'](_0x415dd6,_0x28a6a5);const _0x595ccc=this['_makeIdsRoot'](_0x2989ad);this['_baseIdsRoots']['set'](_0x415dd6,_0x595ccc);for(const [_0x56eb2f,_0xf9cf34]of _0x2989ad['markers']){if(!_0x56eb2f['startsWith']('revision:'))continue;const _0xbe4af=_0x56eb2f['split'](':')[0x2],_0xd184e4=_0x30ba7d['aiSources']?.[_0x56eb2f]||null;for(const _0x23ad2f of _0xf9cf34['getWalker']({'singleCharacters':!0x0})){const _0x3260f9=this['_getVidAttributeName'](_0x23ad2f),_0x2894e6='elementEnd'==_0x23ad2f['type']?_0x23ad2f['previousPosition']['path']['slice'](0x0,-0x1):_0x23ad2f['previousPosition']['path'],_0xafa9e5=_0x595ccc['getNodeByPath'](_0x2894e6)['getAttribute'](_0x3260f9);this['_touched']['set'](_0xafa9e5,{'userId':_0xbe4af,'aiSource':_0xd184e4});}_0x2989ad['markers']['delete'](_0x56eb2f);}}this['_startingRevisionId']=this['_revisionId'];const _0x48c95e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x47cc38=>!this['_touched']['has'](_0x47cc38));let _0x54407c=0x0;const _0x1ec854=new Map();for(const _0x3355ba in _0x5ee96f['diffData']){const _0x54b29c=_0x5ee96f['diffData'][_0x3355ba]['attachChange'],_0x2574cc=_0x2e1942(_0x5ee96f['diffData'][_0x3355ba]['attributesAfter'])||{},_0x4263b2=_0x5ee96f['diffData'][_0x3355ba],_0x492bfd=_0x68f08['_makeModelFromViewString'](_0x4263b2['insertions'],_0x4263b2['rootElementName']||'$root');_0x492bfd['rootName']=_0x3355ba,_0x492bfd['_isAttached']=!_0x54b29c||_0x54b29c['isAttached'],_0x492bfd['isAttached']=()=>_0x492bfd['_isAttached'],this['_diffRoots']['set'](_0x3355ba,_0x492bfd),this['_diffRootsAttributes']['set'](_0x3355ba,_0x2574cc);const _0x3460f5=this['_makeIdsRoot'](_0x492bfd,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x3355ba,_0x3460f5),_0x1ec854['set'](_0x3355ba,_0x492bfd['isAttached']()?_0x2574cc:{});for(const [_0x14e7f7,_0x238ad3]of _0x492bfd['markers']){if(!_0x14e7f7['startsWith']('revision:'))continue;const _0x3e89e7=_0x14e7f7['split'](':')[0x2],_0xdeba24=_0x4263b2['aiSources']?.[_0x14e7f7]||null;for(const _0x566b9b of _0x238ad3['getWalker']({'singleCharacters':!0x0})){const _0x4cd2ea=this['_getVidAttributeName'](_0x566b9b),_0x17cf53=this['_revisionId']++,_0x563253='elementEnd'==_0x566b9b['type']?_0x566b9b['previousPosition']['path']['slice'](0x0,-0x1):_0x566b9b['previousPosition']['path'];_0x3460f5['getNodeByPath'](_0x563253)['_setAttribute'](_0x4cd2ea,_0x17cf53),this['_touched']['set'](_0x17cf53,{'userId':_0x3e89e7,'aiSource':_0xdeba24});}_0x492bfd['markers']['delete'](_0x14e7f7);}for(const _0x17af32 of this['editor']['model']['createRangeIn'](_0x492bfd)['getWalker']({'singleCharacters':!0x0})){const _0x250f9e=this['_getVidAttributeName'](_0x17af32),_0x1a8252='elementEnd'==_0x17af32['type']?_0x17af32['previousPosition']['path']['slice'](0x0,-0x1):_0x17af32['previousPosition']['path'],_0x3d0193=_0x3460f5['getNodeByPath'](_0x1a8252);_0x3d0193['getAttribute'](_0x250f9e)>0x0||_0x3d0193['_setAttribute'](_0x250f9e,_0x48c95e[_0x54407c++]);}for(const [_0x2c35a9,_0x11ff9b]of _0x492bfd['markers'])_0x2c35a9['startsWith']('revision:')||this['_markers']['set'](_0x2c35a9,_0x11ff9b);}const {roots:_0x331a5b}=this['_savedMetaData']['get'](_0x5ee96f['fromVersion']),{roots:_0x4fe4ae}=this['_savedMetaData']['get'](_0x5ee96f['toVersion']),_0x3734d6=It(_0x331a5b['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x3734d6),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3734d6,Number['NEGATIVE_INFINITY']));const _0x2315d1=It(_0x4fe4ae['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2315d1),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2315d1));const _0x39cdac=Array['from'](this['_diffRoots'])['map'](([_0xb2a28a,_0x1449ff])=>[_0xb2a28a,It(_0x1449ff)]);this['_saveMetaData'](this['_lastTo'],_0x39cdac,this['_markers'],_0x1ec854);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x5893c0,_0x89b041,_0x25560a,_0x3a827b){const _0x2c8fa=new Map(_0x89b041),_0x191aec=new Map(_0x2e1942(_0x3a827b)),_0x48128a=new Map();for(const [_0x3b6ee3,_0x1c4f8a]of _0x25560a)_0x48128a['set'](_0x3b6ee3,{'start':_0x1c4f8a['start']['clone'](),'end':_0x1c4f8a['end']['clone'](),'rootName':_0x1c4f8a['root']['rootName']});this['_savedMetaData']['set'](_0x5893c0,{'roots':_0x2c8fa,'markers':_0x48128a,'rootsAttributes':_0x191aec});}_removeMetaData(_0x199a17){this['_savedMetaData']['delete'](_0x199a17);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['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(_0x3fceea,_0x32e1fe=null){let _0x435efb=null;_0x3fceea['is']('documentFragment')||(_0x435efb=new _0x524633(_0x3fceea['name'],{'vid_start':null===_0x32e1fe?this['_revisionId']++:_0x32e1fe++}));const _0x394f6a=[];for(const _0x28ba86 of _0x3fceea['getChildren']())if(_0x28ba86['is']('element')){_0x394f6a['push'](this['_makeIdsRoot'](_0x28ba86,_0x32e1fe));const _0x1ea746=_0x394f6a[_0x394f6a['length']-0x1];null!==_0x32e1fe&&(_0x32e1fe=_0x1ea746['is']('element','$text')?_0x1ea746['getAttribute']('vid')+0x1:_0x1ea746['getAttribute']('vid_end')+0x1);}else{for(let _0x1d3583=0x0;_0x1d3583<_0x28ba86['offsetSize'];_0x1d3583++)_0x394f6a['push'](new _0x524633('$text',{'vid':null===_0x32e1fe?this['_revisionId']++:_0x32e1fe++}));}if(_0x3fceea['is']('documentFragment')){const _0x9861e4=St(_0x3fceea['rootName'],_0x3fceea['name']);return _0x9861e4['_insertChild'](0x0,_0x394f6a),_0x9861e4;}return _0x435efb['_setAttribute']('vid_end',null===_0x32e1fe?this['_revisionId']++:_0x32e1fe),_0x435efb['_insertChild'](0x0,_0x394f6a),_0x435efb;}_calculateMetaData(_0x3fc78c,_0x56a800,_0x544814){this['_reset']();const {roots:_0x5a6105,markers:_0x523578,rootsAttributes:_0xb15641}=this['_savedMetaData']['get'](_0x3fc78c);this['_baseRoots']=new Map(_0x5a6105),this['_baseRootsAttributes']=new Map(_0x2e1942(_0xb15641));for(const [_0x583601,_0x37ea86]of this['_baseRoots'])if('$graveyard'!==_0x583601&&(this['_diffRoots']['set'](_0x583601,It(_0x37ea86)),this['_diffRootsAttributes']=new Map(_0x2e1942(_0xb15641)),_0x544814)){const _0x542750=this['_revisionId'];this['_idsRoots']['set'](_0x583601,this['_makeIdsRoot'](_0x37ea86)),this['_baseIdsRoots']['set'](_0x583601,this['_makeIdsRoot'](_0x37ea86,_0x542750));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',It(this['_baseRoots']['get']('$graveyard'))),_0x544814&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x21117a,_0x38d044]of _0x523578){const _0x4505f9=this['_baseRoots']['get'](_0x38d044['rootName']),_0x144bea=this['_diffRoots']['get'](_0x38d044['rootName']),_0x18aaf8=new _0x49ff12(_0x1cef80(_0x38d044['start'],_0x4505f9),_0x1cef80(_0x38d044['end'],_0x4505f9)),_0x2e1f21=_0xc7b39b(_0x18aaf8,_0x144bea);_0x4505f9['markers']['set'](_0x21117a,_0x18aaf8),this['_markers']['set'](_0x21117a,_0x2e1f21);}this['_applyOperations'](_0x3fc78c,_0x56a800,_0x544814);}_applyOperations(_0x5cd763,_0x2a9fee,_0x11c0c2){for(const _0x3379ea of this['source']['getOperations'](_0x5cd763,_0x2a9fee))this['_handleOperation'](_0x3379ea,_0x11c0c2);for(const _0x4ba06d of this['_diffRoots']['values']())_0x4ba06d['markers']['clear']();for(const [_0x361c0d,_0x4113e3]of this['_markers'])this['_diffRoots']['get'](_0x4113e3['root']['rootName'])['markers']['set'](_0x361c0d,_0x4113e3['clone']());const _0x3bf1b6=new Map(),_0x2112ff=new Map();for(const [_0x28102a,_0x518e0c]of this['_diffRoots'])_0x3bf1b6['set'](_0x28102a,It(_0x518e0c)),_0x2112ff['set'](_0x28102a,this['_diffRootsAttributes']['get'](_0x28102a));this['_saveMetaData'](_0x2a9fee,_0x3bf1b6,this['_markers'],_0x2112ff);}_getPreviousFrom(_0x2c3e04){const _0x29e241=Array['from'](this['_savedMetaData']['keys']());_0x29e241['sort']((_0x4aa302,_0x40dfd9)=>_0x4aa302-_0x40dfd9),_0x29e241['reverse']();for(const _0x48daaa of _0x29e241)if(_0x48daaa<_0x2c3e04)return _0x48daaa;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x453e6e,_0x1a4481){const _0x845015=Array['from'](_0x1a4481['markers'])['map'](([_0x278f2e,_0x1c9f75])=>[_0x278f2e,_0xc7b39b(_0x1c9f75,_0x453e6e)]);_0x453e6e['markers']=new Map(_0x845015);}_transformMarkers(_0x41177c){for(const _0x24d9ae of this['_markers']['values']()){const _0x3352cc=_0x24d9ae['getTransformedByOperation'](_0x41177c),_0x272b66=_0x49ff12['_createFromRanges'](_0x3352cc);_0x24d9ae['start']=_0x272b66['start'],_0x24d9ae['end']=_0x272b66['end'];}}_handleOperation(_0x1604df,_0x2b9507){if('addRoot'!=_0x1604df['type']&&'detachRoot'!=_0x1604df['type']){if('insert'==_0x1604df['type']){const _0x3657f8=_0x1604df['position']['root'],_0x3dd31e=_0x3657f8['rootName'],_0x2928d2=_0x3657f8['name'];this['_diffRoots']['has'](_0x3dd31e)||(this['_diffRoots']['set'](_0x3dd31e,St(_0x3dd31e,_0x2928d2,!0x0)),this['_diffRootsAttributes']['set'](_0x3dd31e,{}),_0x2b9507&&this['_idsRoots']['set'](_0x3dd31e,St(_0x3dd31e,_0x2928d2,!0x0)));}else{if('addRootAttribute'==_0x1604df['type']||'removeRootAttribute'==_0x1604df['type']||'changeRootAttribute'==_0x1604df['type'])return void this['_handleRootAttributeOperation'](_0x1604df);'marker'==_0x1604df['type']&&this['_handleMarkerOperation'](_0x1604df);}if('marker'!==_0x1604df['type']){const _0x1087fa=this['_cloneOperation'](_0x1604df,this['_diffRoots']);_0x1087fa['_execute'](),this['_transformMarkers'](_0x1087fa);}if(_0x2b9507)switch(_0x1604df['type']){case'insert':this['_handleInsertOperation'](_0x1604df);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1604df);break;case'merge':this['_handleMergeOperation'](_0x1604df);break;case'split':this['_handleSplitOperation'](_0x1604df);}}else this['_handleRootOperation'](_0x1604df,_0x2b9507);}_cloneOperation(_0x1b6caf,_0x261914){const _0x518040=_0x1b6caf['clone']();return _0x518040['_authorId']=_0x1b6caf['_authorId'],_0x518040['_aiSource']=_0x1b6caf['_aiSource'],_0x518040['baseVersion']=null,_0x22c2f9(_0x518040,_0x261914),_0x518040;}_getBaseVids(_0x255cff){return _0x255cff['map'](_0x2bbd8d=>{const _0xd96d73=this['_getVidAttributeName'](_0x2bbd8d);return Number(_0x2bbd8d['item']['getAttribute'](_0xd96d73));});}_generateTape(_0x41a333,_0x1a81a3){if(_0x41a333['is']('element','$text'))_0x1a81a3['push']({'item':_0x41a333,'type':'text'});else{_0x41a333['is']('element')&&_0x1a81a3['push']({'item':_0x41a333,'type':'elementStart'});for(const _0xf5d85b of _0x41a333['getChildren']())this['_generateTape'](_0xf5d85b,_0x1a81a3);_0x41a333['is']('element')&&_0x1a81a3['push']({'item':_0x41a333,'type':'elementEnd'});}return _0x1a81a3;}_getState(){const _0x10e959=new Map(this['_touched']),_0x342c46=new Map(_0x10e959),_0x5092aa=new Map(),_0x592bdc={'insertions':{},'deletions':{}},_0xe84068={'insertions':{},'deletions':{}},_0x25cece=new Map(),_0x38565a=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x111fe3=new Map();_0x38565a['delete']('$graveyard');for(const _0x1ceba2 of _0x38565a){const _0x473ad3=(this['_diffRoots']['get'](_0x1ceba2)??this['_baseRoots']['get'](_0x1ceba2))['name'],_0x1f3ca7=this['_diffRoots']['get'](_0x1ceba2)||St(_0x1ceba2,_0x473ad3,!0x1),_0x4430c0=this['_baseRoots']['get'](_0x1ceba2)||St(_0x1ceba2,_0x473ad3,!0x1);_0x1f3ca7['isAttached']()||_0x4430c0['isAttached']()?(_0x111fe3['set'](_0x1ceba2,_0x473ad3),_0x592bdc['insertions'][_0x1ceba2]=It(_0x1f3ca7),_0x592bdc['deletions'][_0x1ceba2]=It(_0x4430c0),this['_copyMarkers'](_0x592bdc['deletions'][_0x1ceba2],_0x4430c0),this['_copyMarkers'](_0x592bdc['insertions'][_0x1ceba2],_0x1f3ca7),_0xe84068['insertions'][_0x1ceba2]=this['_generateTape'](this['_idsRoots']['get'](_0x1ceba2),[]),_0xe84068['deletions'][_0x1ceba2]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1ceba2)||St(_0x1ceba2,_0x473ad3,!0x1),[])):_0x38565a['delete'](_0x1ceba2);}for(const _0x3a723f of _0x38565a){const _0x5c1d22=_0xe84068['insertions'][_0x3a723f];for(const _0x22e235 of _0x5c1d22){const _0x31e366=this['_getVidAttributeName'](_0x22e235),_0x3224c4=_0x22e235['item']['getAttribute'](_0x31e366);_0x342c46['delete'](_0x3224c4),_0x3224c4>=this['_startingRevisionId']&&_0x5092aa['set'](_0x3224c4,_0x10e959['get'](_0x3224c4));}}for(const _0x4414e7 of _0x38565a){const _0x17a7d6=_0xe84068['insertions'][_0x4414e7],_0x9a82e5=this['_getBaseVids'](_0xe84068['deletions'][_0x4414e7]);let _0x53193d=0x0;for(const _0x3be85e of _0x17a7d6){const _0x57ebc6=this['_getVidAttributeName'](_0x3be85e),_0x28caf8=_0x3be85e['item']['getAttribute'](_0x57ebc6);if(!_0x5092aa['has'](_0x28caf8)&&!_0x25cece['has'](_0x28caf8)){if(_0x342c46['has'](_0x28caf8))_0x53193d++;else{if(_0x28caf8!=_0x9a82e5[_0x53193d]){const _0x20b845=_0x10e959['get'](_0x28caf8)||_0x10e959['get'](_0x9a82e5[_0x53193d]);for(;_0x28caf8!=_0x9a82e5[_0x53193d];)_0x342c46['has'](_0x9a82e5[_0x53193d])||(_0x25cece['set'](_0x9a82e5[_0x53193d],_0x20b845),_0x10e959['set'](_0x9a82e5[_0x53193d],_0x20b845)),_0x53193d++;}_0x53193d++;}}}}for(const _0x3cb93b of _0x38565a){const _0x3641aa=_0xe84068['insertions'][_0x3cb93b];for(const _0x574349 of _0x3641aa){const _0x47925c=this['_getVidAttributeName'](_0x574349),_0x54726a=_0x574349['item']['getAttribute'](_0x47925c);if(_0x25cece['has'](_0x54726a)){const _0x1d43ea=_0x25cece['get'](_0x54726a);_0x342c46['has'](_0x54726a)||_0x342c46['set'](_0x54726a,{..._0x1d43ea}),_0x5092aa['set'](_0x54726a,{..._0x1d43ea});}}}for(const _0x26ae2e of _0x342c46['keys']())_0x26ae2e>=this['_startingRevisionId']&&_0x342c46['delete'](_0x26ae2e);const _0x42f316=new Map();for(const _0x5a5dcc of _0x38565a){let _0x583f0f=_0xe84068['insertions'][_0x5a5dcc];for(const _0x3c1517 of _0x583f0f)if(_0x3c1517['item']['is']('element','tableCell')){const _0x416ae7=this['_getVidAttributeName'](_0x3c1517),_0x1608ff=_0x3c1517['item']['getAttribute'](_0x416ae7);if(_0x5092aa['has'](_0x1608ff)){const _0xa9c1dd=_0x3c1517['item']['parent']['parent']['getAttribute']('vid_start'),_0x242138=_0x5092aa['get'](_0x1608ff),_0x17dada=_0x42f316['get'](_0xa9c1dd)||{'users':new Set(),'aiSource':null};_0x17dada['users']['add'](_0x242138['userId']),_0x17dada['aiSource']=_0x17dada['aiSource']||_0x242138['aiSource']||null,_0x42f316['set'](_0xa9c1dd,_0x17dada);}}_0x583f0f=_0xe84068['deletions'][_0x5a5dcc];for(const _0x2ce689 of _0x583f0f)if(_0x2ce689['item']['is']('element','tableCell')){const _0x4203a=this['_getVidAttributeName'](_0x2ce689),_0x12977b=_0x2ce689['item']['getAttribute'](_0x4203a);if(_0x342c46['has'](_0x12977b)){const _0x2aabf2=_0x2ce689['item']['parent']['parent']['getAttribute']('vid_start'),_0x30e6ed=_0x342c46['get'](_0x12977b),_0x5988a9=_0x42f316['get'](_0x2aabf2)||{'users':new Set(),'aiSource':null};_0x5988a9['users']['add'](_0x30e6ed['userId']),_0x5988a9['aiSource']=_0x5988a9['aiSource']||_0x30e6ed['aiSource']||null,_0x42f316['set'](_0x2aabf2,_0x5988a9);}}for(const _0xdd2f02 of _0x42f316['keys']())(_0x5092aa['has'](_0xdd2f02)||_0x342c46['has'](_0xdd2f02))&&_0x42f316['delete'](_0xdd2f02);}for(const _0x54d147 of _0x38565a){const _0x510741=_0xe84068['insertions'][_0x54d147];let _0x2f29eb=null,_0xc955c9=null,_0xd016e8=null;for(const _0xb187c7 of _0x510741){const _0x2d5950=this['_getVidAttributeName'](_0xb187c7),_0x5e6f2d=_0xb187c7['item']['getAttribute'](_0x2d5950),_0x27277d=_0x42f316['get'](_0x5e6f2d);if(_0x27277d&&'elementStart'==_0xb187c7['type']&&(_0x2f29eb=Array['from'](_0x27277d['users'])[0x0],_0xc955c9=_0x27277d['aiSource'],_0xd016e8=_0xb187c7['item']['getAttribute']('vid_end')),_0x2f29eb){const _0x3502ed=_0xc955c9||_0x342c46['get'](_0x5e6f2d)?.['aiSource']||null,_0x250a7c=_0xc955c9||_0x5092aa['get'](_0x5e6f2d)?.['aiSource']||null;_0x342c46['set'](_0x5e6f2d,{'userId':_0x2f29eb,'aiSource':_0x3502ed}),_0x5092aa['set'](_0x5e6f2d,{'userId':_0x2f29eb,'aiSource':_0x250a7c});}_0x5e6f2d==_0xd016e8&&(_0x2f29eb=null,_0xd016e8=null);}}const _0x36995b={},_0x3a3ca3=new Set();for(const _0x504ef6 of _0x38565a){const _0x2b7fcb=_0x592bdc['deletions'][_0x504ef6],_0x4fde78=_0x592bdc['insertions'][_0x504ef6];for(const {userId:_0x22ead3}of this['_touchedMarkers']['values']())null!==_0x22ead3&&_0x3a3ca3['add'](_0x22ead3);for(const {userId:_0x4bf17c}of this['_touchedRoots']['values']())null!==_0x4bf17c&&_0x3a3ca3['add'](_0x4bf17c);const _0x527557={};this['_markChanges'](_0x4fde78,_0xe84068['insertions'][_0x504ef6],_0x5092aa,'insertion',_0x3a3ca3,_0x527557),this['_markChanges'](_0x2b7fcb,_0xe84068['deletions'][_0x504ef6],_0x342c46,'deletion',_0x3a3ca3,_0x527557),this['_collectSuggestionAiSources'](_0x4fde78,_0x527557),this['_collectSuggestionAiSources'](_0x2b7fcb,_0x527557),_0x36995b[_0x504ef6]={'insertions':this['_prepareViewToSave'](_0x4fde78),'deletions':this['_prepareViewToSave'](_0x2b7fcb),'attachChange':this['_touchedRoots']['get'](_0x504ef6)||null,'attributesBefore':_0x2e1942(this['_baseRootsAttributes']['get'](_0x504ef6))||{},'attributesAfter':_0x2e1942(this['_diffRootsAttributes']['get'](_0x504ef6)),'rootElementName':_0x111fe3['get'](_0x504ef6),'aiSources':_0x527557};}const _0x196a45=Array['from'](_0x5092aa['values']())['some'](_0x2935e2=>!(!_0x2935e2||!_0x2935e2['aiSource']))||Array['from'](_0x342c46['values']())['some'](_0xec9ba9=>!(!_0xec9ba9||!_0xec9ba9['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x35aea4=>this['_aiTouchedMarkers']['has'](_0x35aea4));return{'diffData':_0x36995b,'authorsIds':Array['from'](_0x3a3ca3),'hasAIChanges':_0x196a45};}_collectSuggestionAiSources(_0x48d135,_0x19ee85){const _0x223a25=_0x48d135['markers'];for(const _0x11936d of _0x223a25['keys']()){if(!_0x11936d['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x11936d))continue;const _0x4ad965=this['_aiTouchedMarkers']['get'](_0x11936d);_0x4ad965&&(_0x19ee85[_0x11936d]=_0x4ad965);}}_processRootBeforeSave(_0x28e0f2){for(const [,_0x49f332]of _0x28e0f2['markers']){const _0x401210=_0x49f332['start']['getAncestors']()['filter'](_0x2e050f=>'tableCell'==_0x2e050f['name']);for(const _0x14e6bb of _0x401210)0x1==_0x14e6bb['childCount']&&_0x14e6bb['getChild'](0x0)['is']('element','paragraph')&&_0x14e6bb['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x325f05){this['_processRootBeforeSave'](_0x325f05);const _0x9d9b0b=this['editor']['data']['toView'](_0x325f05,{}),_0x3eeb47=Array['from'](_0x9d9b0b['getChildren']())['map'](_0x587bc2=>this['_getViewJson'](_0x587bc2));return JSON['stringify'](_0x3eeb47);}_getViewJson(_0x114254){if(_0x114254['is']('$text'))return _0x114254['data'];{const _0x2bf99c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x211097=_0x114254,_0x9b744c=this['editor']['data']['htmlProcessor']['domConverter'],_0x24706f={'type':_0x2bf99c['_getTypeCharForViewElement'](_0x211097),'name':_0x211097['name'],'attributes':Array['from'](_0x211097['getAttributes']()),'children':Array['from'](_0x211097['getChildren']())['map'](_0x534b13=>this['_getViewJson'](_0x534b13))};if(_0x114254['is']('uiElement')&&'$comment'!=_0x114254['name']){const _0x225412=_0x114254['render'](_0x9b744c['domDocument'],_0x9b744c);_0x24706f['children']['push'](_0x225412['outerHTML']);}else{if(_0x114254['is']('rawElement')){const _0x355a75=_0x9b744c['domDocument']['createElement'](_0x211097['name']);_0x114254['render'](_0x355a75,_0x9b744c),_0x24706f['children']['push'](_0x355a75['innerHTML']);}}const _0x1be41=Array['from'](_0x211097['getCustomProperties']());_0x1be41['length']>0x0&&(_0x24706f['customProperties']=_0x1be41);const _0x27cadf=_0x211097['getFillerOffset']();return null!==_0x27cadf&&(_0x24706f['fillerOffset']=_0x27cadf),_0x24706f;}}['_markChanges'](_0x4448ae,_0x4f0e12,_0x42326b,_0x128d23,_0x3e0bb0,_0x254a4a){let _0x4b2743=null,_0x133ba9=null,_0x24ebd6=0x0;const _0xca39ee=this['editor']['model'];for(let _0x5403c5=0x0;_0x5403c5<_0x4f0e12['length'];_0x5403c5++){const _0x1e4c15=this['_getVidAttributeName'](_0x4f0e12[_0x5403c5]),_0x51760b=_0x4f0e12[_0x5403c5]['item']['getAttribute'](_0x1e4c15),_0x599033=_0x42326b['get'](_0x51760b),_0x3ae254=_0x5403c5==_0x4f0e12['length']-0x1;!_0x4b2743&&_0x599033&&(_0x4b2743=_0x599033,_0x133ba9=_0x4f0e12[_0x5403c5]);const _0x1799fa=!!_0x4b2743&&!!_0x599033&&_0x599033['userId']!=_0x4b2743['userId'],_0x4c5b=!!_0x4b2743&&!!_0x599033&&_0x599033['aiSource']!=_0x4b2743['aiSource'];_0x4b2743&&(!_0x599033||_0x1799fa||_0x4c5b)&&(_0xc0cf29(_0x599033,Et(_0x133ba9,_0x4448ae,_0xca39ee),Et(_0x4f0e12[_0x5403c5],_0x4448ae,_0xca39ee)),_0x4b2743=_0x599033||null,_0x133ba9=_0x599033?_0x4f0e12[_0x5403c5]:null),_0x4b2743&&_0x3ae254&&_0xc0cf29(_0x599033,Et(_0x133ba9,_0x4448ae,_0xca39ee),Ot(_0x4f0e12[_0x5403c5],_0x4448ae,_0xca39ee));}function _0xc0cf29(_0xa3a206,_0x1f4a97,_0x360efb){const _0x3ec235=_0x4b2743['userId'],_0x55f7a0=_0x4b2743['aiSource'],_0x18e5dd='revision:'+_0x128d23+':'+_0x3ec235+':'+_0x24ebd6++,_0x19827d=_0xca39ee['createRange'](_0x1f4a97,_0x360efb);_0x4448ae['markers']['set'](_0x18e5dd,_0x19827d),_0x55f7a0&&(_0x254a4a[_0x18e5dd]=_0x55f7a0),null!==_0x3ec235&&_0x3e0bb0['add'](_0x3ec235);}}_getVidAttributeName(_0x416481){switch(_0x416481['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x37462f){const _0x4873f1=this['_idsRoots']['get'](_0x37462f['position']['root']['rootName']),_0x1a91c7=_0x1cef80(_0x37462f['position'],_0x4873f1),_0xab29f5=null===_0x37462f['_authorId']?null:_0x37462f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x19cc31=_0x37462f['_aiSource']||null,_0x823ea=_0x1a91c7['parent'],_0x13fc70=this['_revisionId'],_0x3da203=[];for(const _0x40efe7 of _0x37462f['nodes'])if(_0x40efe7['is']('element'))_0x3da203['push'](this['_makeIdsRoot'](_0x40efe7));else{for(let _0x388599=0x0;_0x388599<_0x40efe7['offsetSize'];_0x388599++)_0x3da203['push'](new _0x524633('$text',{'vid':this['_revisionId']++}));}const _0x4f75ce=this['_revisionId'];for(let _0x37d012=_0x13fc70;_0x37d012<_0x4f75ce;_0x37d012++)this['_touched']['set'](_0x37d012,{'userId':_0xab29f5,'aiSource':_0x19cc31});_0x823ea['_insertChild'](_0x1a91c7['offset'],_0x3da203);}_setTouched(_0x320f1f,_0x29ced0,_0x61c889){this['_touched']['set'](_0x320f1f,{'userId':_0x29ced0,'aiSource':_0x61c889||this['_touched']['get'](_0x320f1f)?.['aiSource']||null});}_handleMoveOperation(_0x36a6cd){(_0x36a6cd=this['_cloneOperation'](_0x36a6cd,this['_idsRoots']))['_execute']();const _0x18f9c2=null===_0x36a6cd['_authorId']?null:_0x36a6cd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f0e81=_0x36a6cd['_aiSource']||null,_0x565ff4=_0x36a6cd['getMovedRangeStart'](),_0x30e6a6=_0x565ff4['parent'],_0x5cbe70=_0x565ff4['offset'],_0x54351f=(_0x35fdf5,_0x2e732f,_0x53fff6)=>{for(let _0x52306b=_0x2e732f;_0x52306b<_0x53fff6;_0x52306b++){const _0x22e24d=_0x35fdf5['getChild'](_0x52306b);_0x22e24d['is']('element','$text')?this['_setTouched'](_0x22e24d['getAttribute']('vid'),_0x18f9c2,_0x4f0e81):(this['_setTouched'](_0x22e24d['getAttribute']('vid_start'),_0x18f9c2,_0x4f0e81),_0x54351f(_0x22e24d,0x0,_0x22e24d['childCount']),this['_setTouched'](_0x22e24d['getAttribute']('vid_end'),_0x18f9c2,_0x4f0e81));}};_0x54351f(_0x30e6a6,_0x5cbe70,_0x5cbe70+_0x36a6cd['howMany']);}_handleMergeOperation(_0x4d33b9){const _0x304917=null===(_0x4d33b9=this['_cloneOperation'](_0x4d33b9,this['_idsRoots']))['_authorId']?null:_0x4d33b9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f02da=_0x4d33b9['_aiSource']||null,_0x2b08d3=_0x4d33b9['targetPosition']['parent'],_0x582e2a=_0x4d33b9['sourcePosition']['parent'],_0x3c292c=_0x2b08d3['getAttribute']('vid_end'),_0x4309e1=_0x582e2a['getAttribute']('vid_start');_0x2b08d3['_setAttribute']('vid_end',_0x582e2a['getAttribute']('vid_end')),_0x582e2a['_setAttribute']('vid_end',_0x3c292c),this['_setTouched'](_0x4309e1,_0x304917,_0x1f02da),this['_setTouched'](_0x3c292c,_0x304917,_0x1f02da),_0x4d33b9['_execute']();}_handleSplitOperation(_0xd7225b){const _0x3ebc30=null===(_0xd7225b=this['_cloneOperation'](_0xd7225b,this['_idsRoots']))['_authorId']?null:_0xd7225b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3f3673=_0xd7225b['_aiSource']||null,_0x16564d=_0xd7225b['graveyardPosition'],_0x2636dc=_0xd7225b['splitPosition']['parent'];_0xd7225b['_execute']();const _0x8c620d=_0x2636dc['getAttribute']('vid_end'),_0x55ccfd=_0xd7225b['insertionPosition']['nodeAfter'];if(_0x16564d){const _0x3a973f=_0x55ccfd['getAttribute']('vid_end'),_0x3d6948=_0x2636dc['getAttribute']('vid_end');_0x2636dc['_setAttribute']('vid_end',_0x3a973f),_0x55ccfd['_setAttribute']('vid_end',_0x3d6948),this['_setTouched'](_0x2636dc['getAttribute']('vid_end'),_0x3ebc30,_0x3f3673),this['_setTouched'](_0x55ccfd['getAttribute']('vid_start'),_0x3ebc30,_0x3f3673);}else{const _0x3a93f1=this['_revisionId']++,_0x2463d5=this['_revisionId']++;_0x2636dc['_setAttribute']('vid_end',_0x3a93f1),_0x55ccfd['_setAttribute']('vid_start',_0x2463d5),_0x55ccfd['_setAttribute']('vid_end',_0x8c620d),this['_setTouched'](_0x3a93f1,_0x3ebc30,_0x3f3673),this['_setTouched'](_0x2463d5,_0x3ebc30,_0x3f3673);}}_handleMarkerOperation(_0x14a453){if(!_0x14a453['affectsData'])return;const _0x4e0f6e=(_0x14a453=this['_cloneOperation'](_0x14a453,this['_diffRoots']))['oldRange']?_0x14a453['oldRange']['root']:null,_0x56a416=_0x14a453['newRange']?_0x14a453['newRange']['root']:null;_0x4e0f6e&&this['_markers']['delete'](_0x14a453['name']),_0x56a416&&this['_markers']['set'](_0x14a453['name'],_0x14a453['newRange']['clone']());const _0x306b02=null===_0x14a453['_authorId']?null:_0x14a453['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x10c8db=_0x14a453['name'];if(_0x14a453['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x10c8db,_0x14a453['_aiSource']),!this['_touchedMarkers']['has'](_0x10c8db))return void this['_touchedMarkers']['set'](_0x10c8db,{'range':_0x14a453['oldRange'],'userId':_0x306b02});const _0x369a04=this['_touchedMarkers']['get'](_0x10c8db),_0x27950c=_0x369a04['range'],_0x1ceb8e=_0x14a453['newRange'];null==_0x27950c&&null==_0x1ceb8e||_0x27950c&&_0x1ceb8e&&_0x27950c['isEqual'](_0x1ceb8e)?this['_touchedMarkers']['delete'](_0x14a453['name']):_0x369a04['userId']=_0x306b02;}_handleRootOperation(_0x5e69c6,_0x5daaeb){this['_diffRoots']['has'](_0x5e69c6['rootName'])?this['_diffRoots']['get'](_0x5e69c6['rootName'])['_isAttached']=_0x5e69c6['isAdd']:(this['_diffRoots']['set'](_0x5e69c6['rootName'],St(_0x5e69c6['rootName'],_0x5e69c6['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5e69c6['rootName'],{}),_0x5daaeb&&this['_idsRoots']['set'](_0x5e69c6['rootName'],St(_0x5e69c6['rootName'],_0x5e69c6['elementName'],!0x0)));const _0x157220=null===_0x5e69c6['_authorId']?null:_0x5e69c6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x141f69=this['_touchedRoots']['get'](_0x5e69c6['rootName']);_0x141f69&&_0x141f69['userId']===_0x157220?this['_touchedRoots']['delete'](_0x5e69c6['rootName']):this['_touchedRoots']['set'](_0x5e69c6['rootName'],{'userId':_0x157220,'isAttached':_0x5e69c6['isAdd']});}_handleRootAttributeOperation(_0x415d29){const _0x5877cd=this['_diffRootsAttributes']['get'](_0x415d29['root']['rootName']);null===_0x415d29['newValue']?delete _0x5877cd[_0x415d29['key']]:_0x5877cd[_0x415d29['key']]=_0x415d29['newValue'];}};function It(_0x59d2eb){const _0x2e8114=St(_0x59d2eb['rootName'],_0x59d2eb['name'],_0x59d2eb['isAttached']());for(const _0x5d313e of _0x59d2eb['getChildren']()){const _0x15d7af=_0x5d313e['_clone'](!0x0);_0x2e8114['_appendChild'](_0x15d7af);}return _0x2e8114;}function St(_0x416159,_0x4ca28c,_0x2dc1a7=!0x0){const _0x109935=new _0x1c4681();return _0x109935['rootName']=_0x416159,_0x109935['name']=_0x4ca28c,_0x109935['_isAttached']=_0x2dc1a7,_0x109935['isAttached']=()=>_0x109935['_isAttached'],_0x109935;}function Et(_0x3f0dcf,_0x3d2d9d,_0x4f0fc6){const _0x120b02='elementEnd'==_0x3f0dcf['type']?_0x4f0fc6['createPositionAt'](_0x3f0dcf['item'],'end'):_0x4f0fc6['createPositionBefore'](_0x3f0dcf['item']);return _0x4f0fc6['createPositionFromPath'](_0x3d2d9d,_0x120b02['path'],_0x120b02['stickiness']);}function Ot(_0xf08d03,_0x51e929,_0x4ec74e){const _0x5e24f2='elementStart'==_0xf08d03['type']?_0x4ec74e['createPositionAt'](_0xf08d03['item'],0x0):_0x4ec74e['createPositionAfter'](_0xf08d03['item']);return _0x4ec74e['createPositionFromPath'](_0x51e929,_0x5e24f2['path'],_0x5e24f2['stickiness']);}const Ct=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x273b3b(ut);var Nt=class extends Ct{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x1aca11,_0x4249fc){super(_0x1aca11),this['focusTracker']=new _0x1d942c(),this['keystrokes']=new _0x382620(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x4249fc),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'](),mt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5b930d=_0xda7cdc=>_0xda7cdc['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5b930d),this['keystrokes']['set']('arrowleft',_0x5b930d),this['keystrokes']['set']('arrowup',_0x5b930d),this['keystrokes']['set']('arrowdown',_0x5b930d);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x5d480a){this['revisionNameInputView']['fieldView']['element']['value']=_0x5d480a['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0xb5cbb4){const _0x1540b4=new tt(this['locale'],vt),_0xea77a8=_0x1540b4['fieldView'];_0xea77a8['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4da196=Rt(this['locale'],'Name\x20of\x20the\x20revision');return!_0xb5cbb4&&(_0x4da196+='\x20('+Rt(this['locale'],'optional')+')'),(_0x1540b4['label']=_0x4da196,_0xea77a8['on']('input',()=>{this['revisionNameInputValue']=_0xea77a8['element']['value']['trim']();}),_0x1540b4);}},xt=class extends _0x2dd53f{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt];}['_saveRevisionFormView'];init(){const _0x428817=this['editor'],_0x41aa9d=_0x428817['plugins']['get']('RevisionTracker');_0x428817['ui']['componentFactory']['add']('revisionHistory',_0xcfe37=>{const _0x27e3bd=ft(_0xcfe37),_0x5cded3=_0x27e3bd['panelView']['children'],_0x4b909b=new et(_0xcfe37),_0x59abac=new it(_0xcfe37),_0x439516=this['_createSaveRevisionButton'](_0x264e1e),_0x1a77ba=new it(_0xcfe37),_0x3f2c5b=this['_createOpenRevisionButton'](_0x264e1e);return _0x27e3bd['bind']('isEnabled')['to'](_0x41aa9d,'isReady',_0x41aa9d,'isEnabled',_0x428817,'isReadOnly',(_0x3d7fe2,_0x526bd1,_0x26aee3)=>_0x3d7fe2&&_0x526bd1&&!_0x26aee3),_0x27e3bd['buttonView']['set']({'icon':_0x4d55b6,'label':Rt(_0xcfe37,'Revision\x20history'),'tooltip':!0x0}),_0x439516['set']({'withText':!0x0,'role':'menuitem'}),_0x3f2c5b['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x3f2c5b,'execute',()=>{_0x27e3bd['isOpen']=!0x1,_0x428817['editing']['view']['focus']();},{'priority':'low'}),_0x59abac['children']['add'](_0x439516),_0x1a77ba['children']['add'](_0x3f2c5b),_0x4b909b['role']='menu',_0x4b909b['items']['addMany']([_0x59abac,_0x1a77ba]),_0x5cded3['add'](_0x4b909b),_0x27e3bd;}),_0x428817['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x5ccc3b=this['editor'],_0x35666d=_0x5ccc3b['locale'],_0xa1c231=_0x5ccc3b['plugins']['get']('RevisionTracker'),_0x4d15b9=new rt(_0x35666d),_0x4f9fe4=new ot(_0x35666d);_0x4d15b9['bind']('isEnabled')['to'](_0xa1c231,'isReady',_0xa1c231,'isEnabled',_0x5ccc3b,'isReadOnly',(_0x44e152,_0x1f90c4,_0x41476d)=>_0x44e152&&_0x1f90c4&&!_0x41476d),_0x4d15b9['buttonView']['set']({'icon':_0x4d55b6,'label':Rt(_0x35666d,'Revision\x20history')});const _0x17f0bd=new nt(_0x35666d,_0x4d15b9),_0x5386ad=this['_createSaveRevisionButton'](st);_0x5386ad['delegate']('execute')['to'](_0x4d15b9),_0x17f0bd['children']['add'](_0x5386ad),_0x4f9fe4['items']['add'](_0x17f0bd);const _0x3590be=new nt(_0x35666d,_0x4d15b9),_0x10878a=this['_createOpenRevisionButton'](st);return _0x10878a['delegate']('execute')['to'](_0x4d15b9),_0x3590be['children']['add'](_0x10878a),_0x4f9fe4['items']['add'](_0x3590be),_0x4d15b9['panelView']['children']['add'](_0x4f9fe4),_0x4d15b9;}_createSaveRevisionButton(_0x13c64a){const _0x45970a=this['editor'],_0x6dca1b=_0x45970a['plugins']['get']('RevisionTracker'),_0x3d3a91=new _0x13c64a(_0x45970a['locale']);return _0x3d3a91['set']({'label':Rt(_0x45970a['locale'],'Save\x20current\x20revision')}),_0x3d3a91['bind']('isEnabled')['to'](_0x6dca1b,'isReady',_0x6dca1b,'isEnabled',_0x45970a,'isReadOnly',(_0x15181f,_0x17d27a,_0x5d9a52)=>_0x15181f&&_0x17d27a&&!_0x5d9a52),this['listenTo'](_0x3d3a91,'execute',()=>{this['_showDialog']();}),_0x3d3a91;}_createOpenRevisionButton(_0x562bcb){const _0x3c0f36=this['editor'],_0x14a427=_0x3c0f36['plugins']['get']('RevisionTracker'),_0x3ec26b=new _0x562bcb(_0x3c0f36['locale']);return _0x3ec26b['set']({'label':Rt(_0x3c0f36['locale'],'Open\x20revision\x20history')}),_0x3ec26b['bind']('isEnabled')['to'](_0x14a427,'isReady',_0x3c0f36,'isReadOnly',(_0xb2dd09,_0x1f4cbd)=>_0xb2dd09&&!_0x1f4cbd),this['listenTo'](_0x3ec26b,'execute',()=>{_0x3c0f36['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3ec26b;}['_showDialog'](){const _0x18deaf=this['editor'],_0x3419a6=_0x18deaf['locale'],_0x480d80=_0x18deaf['plugins']['get']('Dialog'),_0x7aee5d=_0x18deaf['plugins']['get']('RevisionTracker');function _0x37fe2e(_0x35cf22){_0x18deaf['config']['get']('revisionHistory.requireRevisionName')&&''===_0x35cf22['revisionName']?_0x35cf22['revisionNameInputView']['errorText']=Rt(_0x3419a6,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x18deaf['plugins']['get'](kt)['saveRevision']({'name':_0x35cf22['revisionName']}),_0x480d80['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x37fe2e(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x480d80['show']({'id':'revisionSave','title':Rt(_0x3419a6,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':Rt(_0x18deaf['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x480d80['hide']()},{'label':Rt(_0x18deaf['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x41b41c){_0x41b41c['bind']('isEnabled')['to'](_0x7aee5d,'isReady',_0x7aee5d,'isEnabled',_0x18deaf,'isReadOnly',(_0x257d34,_0x5051e9,_0x3057da)=>_0x257d34&&_0x5051e9&&!_0x3057da);},'onExecute':()=>_0x37fe2e(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x48bb77=this['editor'],_0x2d9615=_0x48bb77['locale'];this['_saveRevisionFormView']=new Nt(_0x2d9615,_0x48bb77['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Dt=class extends ut{['changeId'];['_model'];constructor(_0x3431af,_0x33fc05,_0x4b6b67=!0x1){super(_0x3431af),this['_model']=_0x33fc05,this['changeId']=_0x33fc05['id'];const _0x4769f0=this['bindTemplate'],_0x28315e=_0x4b6b67&&!!_0x33fc05['data']['aiSource'],_0x302b56=_0x28315e?this['_createAiIconView'](_0x3431af):null;this['set']('type',_0x33fc05['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4769f0['to']('type',_0xe38df2=>'ck-revision-change__'+_0xe38df2),..._0x28315e?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x28315e?[this['_createAiDescriptionView'](_0x3431af,_0x33fc05),_0x302b56]:this['_getDescriptionChildren'](_0x3431af,_0x33fc05)}]});}_getDescriptionChildren(_0x4c58c0,_0x123a6d){let _0x1d14e5='Removed\x20by';return _0x123a6d['data']['isSuggestion']?_0x1d14e5='Suggested\x20by':'add'==_0x123a6d['type']&&(_0x1d14e5='Added\x20by'),[this['_createLabel'](Rt(_0x4c58c0,_0x1d14e5)),{'text':'\x20'+_0x123a6d['author']['name']}];}_createAiDescriptionView(_0x549e95,_0x3688cb){let _0x4f7be1='AI_SOURCE_REMOVED_BY';_0x3688cb['data']['isSuggestion']?_0x4f7be1='AI_SOURCE_SUGGESTED_BY':'add'==_0x3688cb['type']&&(_0x4f7be1='AI_SOURCE_ADDED_BY');const _0x390084=new ut(_0x549e95);return _0x390084['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0x390084['render'](),_0x390084['element']['innerHTML']=Rt(_0x549e95,_0x4f7be1,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+Rt(_0x549e95,'AI_SOURCE_AI')+'</span>']),_0x390084['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x3688cb['author']['name'],_0x390084;}_createLabel(_0x303bfe){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x303bfe}]};}_createAiIconView(_0x27160f){const _0x10847f=new _0x105ea5();return _0x10847f['content']=_0x29e5ea,_0x10847f['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':Rt(_0x27160f,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x10847f;}['focus'](){this['element']['focus']();}};const Vt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x15441c();var Tt=class extends Vt{['id'];author;type;data;rootName;constructor(_0x47adc0){super(),this['id']=_0x47adc0['id']||_0x1cb26b(),this['author']=_0x47adc0['author'],this['type']=_0x47adc0['type'],this['data']=_0x47adc0['data']||{},this['rootName']=_0x47adc0['rootName'],this['set']('createdAt',_0x47adc0['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Mt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xfa165e,_0xc5da05){this['newRevisionId']=_0xfa165e,this['oldRevisionId']=_0xc5da05,this['changes']=new _0x5d63ac();}_setChanges(_0x2d3160){for(const _0x212286 of _0x2d3160)this['changes']['add'](_0x212286);}},Ht=class extends _0x2dd53f{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x3002ea,_0x221f96,yt,bt];}constructor(_0x37414c){super(_0x37414c),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',(_0x5c1628,_0x715cc0,_0x804015)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x479a6a=>{for(const _0xbfb86d of this['editor']['editing']['view']['document']['roots'])_0x804015?_0x479a6a['removeClass']('ck-editor__editable__overlay',_0xbfb86d):_0x479a6a['addClass']('ck-editor__editable__overlay',_0xbfb86d);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x23400a=>null!==_0x23400a),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1bae07,_0x320907,_0xf815a2)=>_0x1bae07&&_0xf815a2?_0x320907['changes']['getIndex'](_0xf815a2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x495d1e,_0x198fc0)=>_0x495d1e?_0x198fc0['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x221f96),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0xb35df4=this['editor'],_0x51dc20=new Ft(_0xb35df4,{'direction':'backward'}),_0x52a26b=new Ft(_0xb35df4,{'direction':'forward'});_0xb35df4['commands']['add']('showPreviousChange',_0x51dc20),_0xb35df4['commands']['add']('showNextChange',_0x52a26b),_0xb35df4['commands']['add']('restoreRevision',new Lt(_0xb35df4)),this['on']('change:numberOfChanges',()=>{_0x51dc20['refresh'](),_0x52a26b['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0xb35df4['enableReadOnlyMode']('revision-viewer'),_0xb35df4['plugins']['has']('WidgetToolbarRepository')&&_0xb35df4['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x14532d){return await this['_utils']['loadRevisionData'](_0x14532d,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x14532d);}async getRevisionRootsAttributes(_0xc34d8e){return await this['_utils']['loadRevisionData'](_0xc34d8e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xc34d8e);}async['compare'](_0x44c2c6,_0x3c80e0,_0x26671f=!0x1){if(!this['isEnabled'])return;const _0x13912e=this['diff'],_0x2a8e24=this['repository'],_0x2fe9a9='string'==typeof _0x44c2c6?_0x2a8e24['getRevision'](_0x44c2c6):_0x44c2c6,_0x4dd424='string'==typeof _0x3c80e0?_0x2a8e24['getRevision'](_0x3c80e0):_0x3c80e0,_0x38c778=_0x2fe9a9['id'],_0x49bf1f=_0x4dd424?_0x4dd424['id']:null;if(!_0x26671f&&this['diff']&&this['diff']['newRevisionId']===_0x38c778&&this['diff']['oldRevisionId']===_0x49bf1f)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Mt(_0x38c778,_0x49bf1f);const _0x9ac74a=this['_getRevisionsRange'](_0x2fe9a9,_0x4dd424,!0x0)['map'](_0x48783e=>this['_utils']['loadRevisionData'](_0x48783e,this['adapter']));return _0x9ac74a['push'](new Promise(_0x58cff7=>{setTimeout(_0x58cff7,0x14);})),Promise['all'](_0x9ac74a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x43977c=this['_getDiff'](_0x38c778,_0x49bf1f);this['_cleanUpCommentMarkers'](_0x43977c);for(const _0x46e43e of _0x43977c['changes'])this['_changeIdToChange']['set'](_0x46e43e['id'],_0x46e43e);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x58ffa8=>{for(const _0x500fee of this['editor']['model']['document']['getRootNames']())_0x58ffa8['detachRoot'](_0x500fee);for(const _0x41e7f0 of Object['keys'](_0x43977c['model'])){const _0x36c744=_0x43977c['model'][_0x41e7f0]['name'],_0x525306=_0x58ffa8['addRoot'](_0x41e7f0,_0x36c744);for(const _0x401e22 of Object['keys'](_0x43977c['attributes'][_0x41e7f0]))_0x58ffa8['setAttribute'](_0x401e22,_0x43977c['attributes'][_0x41e7f0][_0x401e22],_0x525306);_0x58ffa8['insert'](_0x43977c['model'][_0x41e7f0],_0x525306,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x43977c['changes'])),this['isReady']=!0x0;})['catch'](_0x103514=>{console['error'](_0x103514),this['_cleanUp'](),_0x13912e&&(this['diff']=_0x13912e),this['isReady']=!0x0;});}addRevisionData(_0x2628a9,_0x4b4a34){const _0x1cfae2=this['repository']['createRevision'](_0x2628a9);return _0x1cfae2['on']('_update',(_0x511139,_0x44edf3,_0x466cbd)=>_0x4b4a34(_0x44edf3,_0x466cbd,_0x1cfae2)),this['repository']['addRevision'](_0x1cfae2),_0x1cfae2;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xafda10=>{for(const _0x17a4d8 of this['editor']['model']['document']['getRootNames']())_0xafda10['detachRoot'](_0x17a4d8);});}_cleanUpCommentMarkers(_0xce2055){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x32c669=this['_getVisibleCommentThreadIds']();for(const _0x7ff7cb of Object['values'](_0xce2055['model']))for(const _0xe00c79 of Array['from'](_0x7ff7cb['markers']['keys']()))_0xe00c79['startsWith']('revision-comment:')&&!_0x32c669['has'](Pt(_0xe00c79))&&_0x7ff7cb['markers']['delete'](_0xe00c79);}_sortAndFilterDiffChanges(_0x27f896){const _0x1136d5=[],_0x4adddc=new Map();for(const _0x3461e7 of this['editor']['model']['document']['getRootNames']()){const _0x2212b4=this['editor']['editing']['view']['getDomRoot'](_0x3461e7);if(!_0x2212b4)continue;const _0x34d51d=_0x2212b4['getClientRects']()['item'](0x0);_0x34d51d&&(_0x1136d5['push'](_0x3461e7),_0x4adddc['set'](_0x3461e7,_0x34d51d));}return _0x1136d5['sort']((_0x4ae305,_0xe69aa0)=>{const _0x801ad=_0x4adddc['get'](_0x4ae305),_0x3bc2c2=_0x4adddc['get'](_0xe69aa0);return _0x801ad['y']-_0x3bc2c2['y']||_0x801ad['x']-_0x3bc2c2['x'];}),(_0x27f896=_0x27f896['filter'](_0x2bfd61=>_0x1136d5['includes'](_0x2bfd61['rootName'])))['sort']((_0x115f61,_0x165ad7)=>_0x1136d5['indexOf'](_0x115f61['rootName'])-_0x1136d5['indexOf'](_0x165ad7['rootName'])),_0x27f896;}['_makeTape'](_0x57a4fa,_0x53aee1={}){const _0x4e8b99=Array['from'](_0x57a4fa['markers'])['filter'](([_0x53d942,_0x3e9df6])=>_0x53d942['startsWith']('revision:')&&!_0x3e9df6['isCollapsed']),_0x530102=Array['from'](this['editor']['model']['createRangeIn'](_0x57a4fa)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x4e8b99['length'])for(const _0x586c9e of _0x530102){const [_0x2c2b44,_0x56a064]=_0x4e8b99[0x0],[,_0x4e1be2,_0x1190e2]=_0x2c2b44['split'](':'),_0xf12d1e=_0x53aee1[_0x2c2b44]||null;if(_0x56a064['end']['isEqual'](_0x586c9e['nextPosition'])&&_0x4e8b99['shift'](),(_0x586c9e['previousPosition']['isEqual'](_0x56a064['start'])||_0x586c9e['previousPosition']['isAfter'](_0x56a064['start']))&&('insertion'==_0x4e1be2?_0x586c9e['isAdded']={'userId':_0x1190e2,'aiSource':_0xf12d1e}:'deletion'==_0x4e1be2&&(_0x586c9e['isRemoved']={'userId':_0x1190e2,'aiSource':_0xf12d1e})),0x0==_0x4e8b99['length'])break;}return _0x530102;}_refreshStartEndIndex(_0x1e7f65){const _0x5e7b7c=new Map();for(let _0x3b9e4b=0x0;_0x3b9e4b<_0x1e7f65['length'];_0x3b9e4b++)'text'===_0x1e7f65[_0x3b9e4b]['type']?(_0x1e7f65[_0x3b9e4b]['item']['startIndex']=_0x3b9e4b,_0x1e7f65[_0x3b9e4b]['item']['endIndex']=_0x3b9e4b):('elementStart'===_0x1e7f65[_0x3b9e4b]['type']?_0x1e7f65[_0x3b9e4b]['item']['startIndex']=_0x3b9e4b:'elementEnd'===_0x1e7f65[_0x3b9e4b]['type']&&(_0x1e7f65[_0x3b9e4b]['item']['endIndex']=_0x3b9e4b),_0x5e7b7c['set'](_0x1e7f65[_0x3b9e4b]['id'],_0x3b9e4b));for(const _0xaf8bcf of _0x5e7b7c['values']())'elementStart'===_0x1e7f65[_0xaf8bcf]['type']?_0x1e7f65[_0xaf8bcf]['item']['endIndex']=_0x5e7b7c['get'](_0x1e7f65[_0xaf8bcf]['pairId']):'elementEnd'===_0x1e7f65[_0xaf8bcf]['type']&&(_0x1e7f65[_0xaf8bcf]['item']['startIndex']=_0x5e7b7c['get'](_0x1e7f65[_0xaf8bcf]['pairId']));}['_processTape'](_0x117153){for(let _0x54720b=0x0;_0x54720b<_0x117153['length'];_0x54720b++){if('elementStart'===_0x117153[_0x54720b]['type'])_0x117153[_0x54720b]['item']['startIndex']=_0x54720b;else{if('elementEnd'===_0x117153[_0x54720b]['type']){_0x117153[_0x54720b]['item']['endIndex']=_0x54720b;const _0x1acd82=_0x117153[_0x54720b]['item']['startIndex'];_0x117153[_0x1acd82]['pairId']=_0x117153[_0x54720b]['id'],_0x117153[_0x54720b]['pairId']=_0x117153[_0x1acd82]['id'];}else _0x117153[_0x54720b]['item']['startIndex']=_0x54720b,_0x117153[_0x54720b]['item']['endIndex']=_0x54720b,_0x117153[_0x54720b]['pairId']=null;}_0x117153[_0x54720b]['markersStart']||(_0x117153[_0x54720b]['markersStart']=[],_0x117153[_0x54720b]['markersEnd']=[]);}}_markInsertions(_0x59c711,_0x1adfd8){const _0x2e8cb5=_0x59c711['filter'](_0x2f3769=>!_0x2f3769['isAdded']);for(let _0x5d6136=0x0;_0x5d6136<_0x1adfd8['length'];_0x5d6136++)_0x1adfd8[_0x5d6136]['isAdded']&&(_0x2e8cb5[_0x5d6136]['isAdded']=_0x1adfd8[_0x5d6136]['isAdded']);}_getDiff(_0x656078,_0x2007b1=null){const _0x10dc06=this['repository']['getRevision'](_0x656078),_0x5b7dce=_0x2007b1?this['repository']['getRevision'](_0x2007b1):null,_0x2de8fd=this['_getRevisionsRange'](_0x10dc06,_0x5b7dce),_0x4e7252=_0x2de8fd[_0x2de8fd['length']-0x1],_0x226a68=new Map(),_0x40f6c7={'model':{},'attributes':{},'changes':[]},_0x22c00e=new Set(),_0x75d836=new Map();for(let _0x2eb600=_0x2de8fd['length']-0x1;_0x2eb600>=0x0;_0x2eb600--){const _0xb6ade6=_0x2de8fd[_0x2eb600];for(const _0x531580 of Object['keys'](_0xb6ade6['diffData']))if(_0xb6ade6['diffData'][_0x531580]['attachChange']){const _0x58365e=_0xb6ade6['diffData'][_0x531580]['attachChange'];_0x58365e['isAttached']?(_0x22c00e['add'](_0x531580),_0x75d836['has'](_0x531580)&&_0x75d836['get'](_0x531580)['userId']==_0x58365e['userId']?_0x75d836['delete'](_0x531580):_0x75d836['set'](_0x531580,_0x58365e)):_0x75d836['has'](_0x531580)?(_0x22c00e['delete'](_0x531580),_0x75d836['delete'](_0x531580)):(_0x22c00e['add'](_0x531580),_0x75d836['set'](_0x531580,_0x58365e));}else _0x22c00e['add'](_0x531580);}for(const _0x30dbf7 of _0x22c00e){const _0x8ef84e=_0x75d836['has'](_0x30dbf7)&&!_0x75d836['get'](_0x30dbf7)['isAttached'];let _0x251e4d=_0x8ef84e?_0x2de8fd['length']-0x1:0x0;const _0x2e381f=_0x8ef84e?-0x1:0x1;for(;_0x2de8fd[_0x251e4d];){const _0x23db51=_0x2de8fd[_0x251e4d];if(_0x23db51['diffData'][_0x30dbf7]){const _0x50cb7d=_0x8ef84e?_0x23db51['diffData'][_0x30dbf7]['attributesBefore']:_0x23db51['diffData'][_0x30dbf7]['attributesAfter'];_0x40f6c7['attributes'][_0x30dbf7]=_0x50cb7d?_0x2e1942(_0x50cb7d):{};break;}_0x251e4d+=_0x2e381f;}}for(const _0x2f9f95 of _0x2de8fd){_0x2f9f95['model']={};for(const _0x388bec of _0x2f9f95['authors'])_0x226a68['set'](_0x388bec['id'],_0x388bec);for(const _0x49542a of _0x22c00e){const _0x57c8f8=_0x2f9f95['diffData'][_0x49542a]?_0x2f9f95['diffData'][_0x49542a]['insertions']:'[]',_0x296136=_0x2f9f95['diffData'][_0x49542a]?_0x2f9f95['diffData'][_0x49542a]['deletions']:'[]',_0x9c6578=_0x2f9f95['diffData'][_0x49542a]?.['rootElementName']||'$root';_0x2f9f95['model'][_0x49542a]={'insertions':this['_utils']['_makeModelFromViewString'](_0x57c8f8,_0x9c6578),'deletions':this['_utils']['_makeModelFromViewString'](_0x296136,_0x9c6578)};}}for(const _0x5edbd9 of _0x22c00e){let _0x42171e=null,_0x4c8b1d=0x0;const _0xdb2327=_0x2de8fd['map'](_0x58893b=>_0x58893b['diffData'][_0x5edbd9]?.['rootElementName'])['find'](_0x507ced=>void 0x0!==_0x507ced)||'$root',_0x499b6c=new Map(Array['from'](_0x10dc06['model'][_0x5edbd9]['insertions']['markers'])['filter'](([_0x3678ab])=>!_0x3678ab['startsWith']('revision:')));let _0x436b48=0x0;for(const _0x83d037 of _0x2de8fd){const _0x3d22a5=_0x83d037['diffData'][_0x5edbd9]?.['aiSources']||{},_0x2995bd=this['_makeTape'](_0x83d037['model'][_0x5edbd9]['insertions'],_0x3d22a5);_0x83d037==_0x10dc06?(_0x42171e=_0x2995bd,_0x4c8b1d=_0x42171e['length'],_0x42171e['forEach'](_0x2c6352=>{_0x2c6352['id']=_0x436b48++;}),this['_processTape'](_0x42171e)):this['_markInsertions'](_0x42171e,_0x2995bd);const _0x1dad86=_0x42171e['filter'](_0x5a96cd=>!_0x5a96cd['isAdded'])['map'](_0x40a813=>_0x40a813['id']);let _0x17f0e7=0x0;const _0x53da45=this['_makeTape'](_0x83d037['model'][_0x5edbd9]['deletions'],_0x3d22a5);_0x53da45['forEach'](_0x315457=>{_0x315457['isRemoved']?_0x315457['id']=_0x4c8b1d++:_0x315457['id']=_0x1dad86[_0x17f0e7++];}),this['_processTape'](_0x53da45),this['_setDistance'](_0x42171e,'isAdded'),this['_setDistance'](_0x53da45,'isRemoved'),_0x83d037==_0x10dc06&&this['_markMarkers'](_0x42171e,_0x499b6c),_0x42171e=this['_joinTapes'](_0x42171e,_0x53da45),this['_refreshStartEndIndex'](_0x42171e),this['_setDistance'](_0x42171e,'isRemoved');}_0x42171e=_0x42171e['filter'](_0x4345f8=>!(_0x4345f8['isAdded']&&_0x4345f8['isRemoved']));const _0x551406=new Map(_0x4e7252['model'][_0x5edbd9]['deletions']['markers']),_0x385ea0=new Set(_0x499b6c['keys']());for(const _0x2a7c81 of _0x551406['keys']())_0x385ea0['delete'](_0x2a7c81);const _0x1914fa=Object['assign']({},..._0x2de8fd['map'](_0x56cced=>_0x56cced['diffData'][_0x5edbd9]?.['aiSources']));this['_markSuggestions'](_0x42171e,_0x385ea0,_0x1914fa),this['_fixObsoleteTags'](_0x42171e),_0x42171e=this['_removeMissingPairs'](_0x42171e),_0x42171e=this['_markMismatchedRemovedTags'](_0x42171e),_0x42171e=this['_removeUnsupportedChanges'](_0x42171e);const {root:_0x4fc2a9,changes:_0x48e0a9}=this['_makeModelFromTape'](_0x42171e,_0x226a68,_0x5edbd9,_0xdb2327);_0x40f6c7['model'][_0x5edbd9]=_0x4fc2a9;const _0x4c1715=_0x75d836['get'](_0x5edbd9);if(_0x4c1715){const _0x26561b=_0x226a68['get'](_0x4c1715['userId']),_0xde443=new Tt({'author':_0x26561b,'type':_0x4c1715['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5edbd9});_0x48e0a9['unshift'](_0xde443),_0x40f6c7['attributes'][_0x5edbd9]['revisionHistoryAttachChange']=_0xde443['id'];}_0x40f6c7['changes']=_0x40f6c7['changes']['concat'](_0x48e0a9);}return _0x40f6c7;}['_markMarkers'](_0x40ed15,_0x3274d6){for(let _0x31fae9=0x0;_0x31fae9<_0x40ed15['length'];_0x31fae9++)for(const [_0x2989c8,_0x40d837]of _0x3274d6)!_0x40d837['isCollapsed']&&_0x40d837['start']['isEqual'](_0x40ed15[_0x31fae9]['previousPosition'])&&_0x40ed15[_0x31fae9]['markersStart']['push'](_0x2989c8),_0x40d837['end']['isEqual'](_0x40ed15[_0x31fae9]['nextPosition'])&&_0x40ed15[_0x31fae9]['markersEnd']['push'](_0x2989c8);}['_joinTapes'](_0xff333b,_0x238250){let _0x589af3=[],_0x21cdf4=0x0,_0x68671a=0x0;for(;_0x21cdf4<_0xff333b['length']||_0x68671a<_0x238250['length'];){const _0x37e95a=_0xff333b[_0x21cdf4]||{},_0x23c7ac=_0x238250[_0x68671a]||{};if(_0x37e95a['id']==_0x23c7ac['id'])_0x21cdf4++,_0x68671a++,_0x589af3['push'](_0x37e95a);else{if(_0x23c7ac['isRemoved']&&_0x37e95a['isAdded']){const {commonTape:_0x5cd0ff,iEnd:_0x5b7d37,jEnd:_0x5e7887}=this['_threeWayMerge'](_0xff333b,_0x21cdf4,_0x238250,_0x68671a);_0x589af3=_0x589af3['concat'](_0x5cd0ff),_0x21cdf4=_0x5b7d37,_0x68671a=_0x5e7887;}else _0x23c7ac['isRemoved']?(_0x68671a++,_0x589af3['push'](_0x23c7ac)):(_0x21cdf4++,_0x589af3['push'](_0x37e95a));}}return _0x589af3;}_markSuggestions(_0x598a22,_0x9f7089,_0x4ca45a){const _0x5c3088=[];for(let _0x5c423e=0x0;_0x5c423e<_0x598a22['length'];_0x5c423e++){for(let _0x617d05=0x0;_0x617d05<_0x598a22[_0x5c423e]['markersStart']['length'];_0x617d05++){const _0x2d7ab1=_0x598a22[_0x5c423e]['markersStart'][_0x617d05];if(!_0x9f7089['has'](_0x2d7ab1))continue;const {group:_0x36a344,type:_0x310913,authorId:_0x50b859}=_0x5e531a(_0x2d7ab1);if('revision-suggestion'!=_0x36a344||'insertion'!=_0x310913&&'deletion'!=_0x310913)continue;const _0x530eda=_0x4ca45a['suggestion:'+_0x2d7ab1['slice'](0x14)]||null;_0x5c3088['unshift']({'type':_0x310913,'name':_0x2d7ab1,'userId':_0x50b859,'aiSource':_0x530eda}),_0x598a22[_0x5c423e]['markersStart']['splice'](_0x617d05,0x1),_0x617d05--;}_0x54b00e(_0x598a22[_0x5c423e]);for(let _0x443227=0x0;_0x443227<_0x598a22[_0x5c423e]['markersEnd']['length'];_0x443227++){const _0x303be3=_0x598a22[_0x5c423e]['markersEnd'][_0x443227];if(!_0x9f7089['has'](_0x303be3))continue;const {group:_0x210f65,type:_0x4e3cc2}=_0x5e531a(_0x303be3);if('revision-suggestion'!=_0x210f65||'insertion'!=_0x4e3cc2&&'deletion'!=_0x4e3cc2)continue;_0x598a22[_0x5c423e]['markersEnd']['splice'](_0x443227,0x1),_0x443227--;const _0x5019b4=_0x5c3088['findIndex'](_0x66637d=>_0x66637d['name']==_0x303be3);_0x5019b4>-0x1&&_0x5c3088['splice'](_0x5019b4,0x1);}}function _0x5e531a(_0x2647cd){const _0x3132a7=_0x2647cd['split'](':');return{'group':_0x3132a7[0x0],'type':_0x3132a7[0x1],'subType':_0x3132a7['length']>=0x5?_0x3132a7[0x2]:null,'id':_0x3132a7['length']<0x5?_0x3132a7[0x2]:_0x3132a7[0x3],'authorId':_0x3132a7['length']<0x5?_0x3132a7[0x3]:_0x3132a7[0x4],'markerCount':0x6==_0x3132a7['length']?_0x3132a7[0x5]:null};}function _0x54b00e(_0x382dea){for(let _0x3b75dc=0x0;_0x3b75dc<_0x5c3088['length'];_0x3b75dc++){if(_0x382dea['isAdded']&&'insertion'==_0x5c3088[_0x3b75dc]['type']&&_0x382dea['isAdded']['userId']==_0x5c3088[_0x3b75dc]['userId'])return _0x382dea['isAddSuggestion']={..._0x5c3088[_0x3b75dc],'aiSource':_0x382dea['isAdded']['aiSource']||_0x5c3088[_0x3b75dc]['aiSource']},void delete _0x382dea['isAdded'];if(!_0x382dea['isAdded']&&!_0x382dea['isRemoved']&&'deletion'==_0x5c3088[_0x3b75dc]['type'])return void(_0x382dea['isRemoveSuggestion']=_0x5c3088[_0x3b75dc]);}}}_setDistance(_0x23ae90,_0x1ef04f){let _0x1fe18f=0x0,_0x4b65b1=!0x1;const _0x5484b2=new Map();for(const _0x3f9263 of _0x23ae90)_0x3f9263[_0x1ef04f]?_0x4b65b1&&(_0x1fe18f++,_0x4b65b1=!0x1):(_0x1fe18f++,_0x4b65b1=!0x0),_0x5484b2['set'](_0x3f9263['id'],_0x1fe18f);for(let _0x3a56bc=0x0;_0x3a56bc<_0x23ae90['length'];_0x3a56bc++){if('isRemoved'==_0x1ef04f&&_0x23ae90[_0x3a56bc]['isAdded']||'isAdded'==_0x1ef04f&&_0x23ae90[_0x3a56bc]['isRemoved'])continue;if('text'==_0x23ae90[_0x3a56bc]['type']){_0x23ae90[_0x3a56bc]['distance']=0x0;continue;}const _0x2aa889=_0x5484b2['get'](_0x23ae90[_0x3a56bc]['pairId']),_0x1f1a88=_0x5484b2['get'](_0x23ae90[_0x3a56bc]['id']);_0x23ae90[_0x3a56bc]['distance']=_0x2aa889-_0x1f1a88;}}_getRevisionsRange(_0x23c2dd,_0x565a2e,_0x7e0c5b=!0x1){const _0x33022c=[];let _0x40d117=this['repository']['getIndex'](_0x23c2dd),_0xdf9b5a=this['repository']['getIndex'](_0x565a2e);for(-0x1==_0xdf9b5a&&(_0xdf9b5a=this['repository']['_revisions']['length'],_0x7e0c5b=!0x1);_0x40d117<_0xdf9b5a;)_0x33022c['push'](this['repository']['getRevision'](_0x40d117)),_0x40d117++;return _0x7e0c5b&&_0x33022c['push'](this['repository']['getRevision'](_0x40d117)),_0x33022c;}_threeWayMerge(_0x23c9ff,_0x23e975,_0x5273b2,_0x37e1a9){const _0x48932e=this['editor']['model']['schema'];let _0x4edb2a=_0x23e975;for(;_0x23c9ff[_0x4edb2a]&&_0x23c9ff[_0x4edb2a]['isAdded'];)_0x4edb2a++;let _0xa90ae6=_0x37e1a9;for(;_0x5273b2[_0xa90ae6]&&_0x5273b2[_0xa90ae6]['isRemoved'];)_0xa90ae6++;_0x250259(_0x23c9ff,_0x23e975,_0x4edb2a),_0x250259(_0x5273b2,_0x37e1a9,_0xa90ae6);const _0x18114d=_0x5273b2['slice'](_0x37e1a9,_0xa90ae6)['concat'](_0x23c9ff['slice'](_0x23e975,_0x4edb2a));return _0x18114d['sort']((_0x8d54a2,_0x4ecd11)=>_0x8d54a2['side']!=_0x4ecd11['side']?_0x8d54a2['side']-_0x4ecd11['side']:_0x8d54a2['level']!=_0x4ecd11['level']?_0x8d54a2['level']-_0x4ecd11['level']:_0x8d54a2['distance']!=_0x4ecd11['distance']?_0x4ecd11['distance']-_0x8d54a2['distance']:!!_0x8d54a2['isAdded']!=!!_0x4ecd11['isAdded']?-0x1==_0x8d54a2['side']||0x0==_0x8d54a2['side']?_0x8d54a2['isAdded']?-0x1:0x1:_0x8d54a2['isAdded']?0x1:-0x1:_0x8d54a2['index']-_0x4ecd11['index']),{'commonTape':_0x18114d,'iEnd':_0x4edb2a,'jEnd':_0xa90ae6};function _0x250259(_0x489f42,_0x578fd5,_0x2b94ad){let _0x2d1124=-0x1,_0x23dbf1=Number['POSITIVE_INFINITY'],_0x4430c5=!0x0;for(let _0x4d67a6=_0x578fd5;_0x4d67a6<_0x2b94ad;_0x4d67a6++)if(_0x48932e['isInline'](_0x489f42[_0x4d67a6]['item'])||(_0x4430c5=!0x1),_0x489f42[_0x4d67a6]['item']['startIndex']<_0x578fd5&&(_0x2d1124=_0x4d67a6),_0x489f42[_0x4d67a6]['item']['endIndex']>=_0x2b94ad){_0x23dbf1=_0x4d67a6;break;}_0x4430c5&&(_0x2d1124=_0x2b94ad-0x1);for(let _0x51ac0d=_0x578fd5;_0x51ac0d<_0x2b94ad;_0x51ac0d++)_0x489f42[_0x51ac0d]['side']=_0x51ac0d<=_0x2d1124?-0x1:_0x51ac0d<_0x23dbf1?0x0:0x1,_0x489f42[_0x51ac0d]['index']=_0x51ac0d;let _0x3ac126=0x0;for(let _0x2dd2ad=_0x578fd5;_0x2dd2ad<=_0x2d1124;_0x2dd2ad++)0x0==_0x489f42[_0x2dd2ad]['distance']?_0x489f42[_0x2dd2ad]['level']=_0x3ac126:(_0x3ac126++,_0x489f42[_0x2dd2ad]['level']=_0x3ac126,_0x3ac126++);for(let _0x3e94f9=_0x578fd5;_0x3e94f9<_0x2b94ad;_0x3e94f9++)0x0==_0x489f42[_0x3e94f9]['side']&&(_0x489f42[_0x3e94f9]['level']=_0x3ac126);_0x3ac126=0x0;for(let _0x4ca952=_0x2b94ad-0x1;_0x4ca952>=_0x23dbf1;_0x4ca952--)0x0==_0x489f42[_0x4ca952]['distance']?_0x489f42[_0x4ca952]['level']=_0x3ac126:(_0x3ac126--,_0x489f42[_0x4ca952]['level']=_0x3ac126,_0x3ac126--);}}_fixObsoleteTags(_0xa659bd){const _0x3938d2=new Map(),_0x4365e7=this['editor']['model']['schema'];for(let _0x17070f=0x1;_0x17070f<_0xa659bd['length'];_0x17070f++){let _0x2cb025,_0x2558e2,_0xdf71d1;const _0x202ac2=_0xa659bd[_0x17070f],_0x415524=_0xa659bd[_0x17070f-0x1];if('text'==_0x202ac2['type'])continue;if(_0x202ac2['type']!=_0x415524['type'])continue;if(!_0x4365e7['isBlock'](_0x415524['item'])||_0x4365e7['isLimit'](_0x415524['item']))continue;if(!_0x4365e7['isBlock'](_0x202ac2['item'])||_0x4365e7['isLimit'](_0x202ac2['item']))continue;if((_0xa659bd[_0x17070f]['isAdded']||_0xa659bd[_0x17070f]['isAddSuggestion'])&&_0xa659bd[_0x17070f-0x1]['isRemoved'])_0x2cb025=_0xa659bd[_0x17070f],_0x2558e2=_0xa659bd[_0x17070f-0x1],_0xdf71d1=_0x17070f-0x1;else{if(!_0xa659bd[_0x17070f]['isRemoved']||!_0xa659bd[_0x17070f-0x1]['isAdded']&&!_0xa659bd[_0x17070f-0x1]['isAddSuggestion'])continue;_0x2cb025=_0xa659bd[_0x17070f-0x1],_0x2558e2=_0xa659bd[_0x17070f],_0xdf71d1=_0x17070f;}const _0x2b04fb=_0x2cb025['level']==_0x2558e2['level'],_0x1fa23b=Math['abs'](_0x2cb025['level'])<Math['abs'](_0x2558e2['level'])&&0x0==_0x2558e2['distance'];(_0x2b04fb||_0x1fa23b)&&(_0x3938d2['set'](_0x2558e2['id'],_0x2cb025['id']),_0xa659bd['splice'](_0xdf71d1,0x1),_0x17070f--,_0x2cb025['isAdded']=!0x1);}for(let _0xa09e93=0x0;_0xa09e93<_0xa659bd['length'];_0xa09e93++)_0x3938d2['has'](_0xa659bd[_0xa09e93]['pairId'])&&(_0xa659bd[_0xa09e93]['pairId']=_0x3938d2['get'](_0xa659bd[_0xa09e93]['pairId']));}['_removeMissingPairs'](_0xf903ec){const _0x704efa=new Set(_0xf903ec['map'](_0x2e9170=>_0x2e9170['id']));for(let _0x36e067=0x0;_0x36e067<_0xf903ec['length'];_0x36e067++)_0x704efa['has'](_0xf903ec[_0x36e067]['pairId'])||0x0==_0xf903ec[_0x36e067]['distance']||(_0xf903ec[_0x36e067]['isIncorrect']=!0x0);return _0xf903ec['filter'](_0x4f0209=>!_0x4f0209['isIncorrect']);}_markMismatchedRemovedTags(_0x51ba73){const _0x3f4f53=new Set();for(let _0x3df746=0x0;_0x3df746<_0x51ba73['length'];_0x3df746++){if(_0x3f4f53['has'](_0x51ba73[_0x3df746]['id'])&&_0x51ba73[_0x3df746]['isRemoved']&&(_0x51ba73[_0x3df746]['isIncorrect']=!0x0),_0x51ba73[_0x3df746]['isIncorrect'])continue;if(0x0==_0x51ba73[_0x3df746]['distance'])continue;if('elementStart'!=_0x51ba73[_0x3df746]['type'])continue;if(null==_0x51ba73[_0x3df746]['pairId'])continue;let _0x461e60=_0x3df746+0x1,_0xa059f8=0x0;for(;_0x51ba73[_0x461e60]['id']!=_0x51ba73[_0x3df746]['pairId'];)'elementStart'==_0x51ba73[_0x461e60]['type']?_0xa059f8++:'elementEnd'==_0x51ba73[_0x461e60]['type']&&_0xa059f8--,_0x461e60++;if(0x0!=_0xa059f8){if(_0x51ba73[_0x3df746]['isRemoved'])_0x51ba73[_0x3df746]['isIncorrect']=!0x0;else{for(;_0x461e60!=_0x3df746;)_0x51ba73[_0x461e60]['isRemoved']&&0x0!=_0x51ba73[_0x461e60]['distance']&&(_0x51ba73[_0x461e60]['isIncorrect']=!0x0,_0x3f4f53['add'](_0x51ba73[_0x461e60]['pairId'])),_0x461e60--;}}}return _0x51ba73['filter'](_0x24779a=>!_0x24779a['isIncorrect']);}_removeUnsupportedChanges(_0x222707){const _0x5e86a8=this['editor']['model']['schema'];for(let _0x3b5027=0x0;_0x3b5027<_0x222707['length'];_0x3b5027++){if(!(_0x222707[_0x3b5027]['isAdded']||_0x222707[_0x3b5027]['isAddSuggestion']||_0x222707[_0x3b5027]['isRemoved']||_0x222707[_0x3b5027]['isRemoveSuggestion']))continue;if(0x0==_0x222707[_0x3b5027]['distance'])continue;const _0x5f2162=_0x222707[_0x3b5027]['item'];_0x5e86a8['isBlock'](_0x5f2162)||_0x5e86a8['isLimit'](_0x5f2162)||(_0x222707[_0x3b5027]['isAdded']&&delete _0x222707[_0x3b5027]['isAdded'],_0x222707[_0x3b5027]['isAddSuggestion']&&delete _0x222707[_0x3b5027]['isAddSuggestion'],_0x222707[_0x3b5027]['isRemoveSuggestion']&&delete _0x222707[_0x3b5027]['isRemoveSuggestion'],_0x222707[_0x3b5027]['isRemoved']&&(_0x222707[_0x3b5027]['isIncorrect']=!0x0));}return _0x222707['filter'](_0x4e8b02=>!_0x4e8b02['isIncorrect']);}['_makeModelFromTape'](_0x49f6ea,_0x38fc6c,_0x55baf1,_0x12d045){const _0x168b96=new _0x1c4681(),_0x364c23=[],_0x5a2505=new Map(),_0x2630c9=this['editor']['model'],_0x296c1c=_0x2630c9['schema'],_0x56151f=[_0x168b96],_0x51e873={},_0x5ca1f1={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x168b96['name']=_0x12d045;let _0x3445ed=null;const _0x13d31d=[0x0];for(let _0x4acf58=0x0;_0x4acf58<_0x49f6ea['length'];_0x4acf58++)if('elementStart'===_0x49f6ea[_0x4acf58]['type']){_0x49f6ea[_0x4acf58]['previousPosition']=_0x2630c9['createPositionFromPath'](_0x168b96,_0x13d31d);const _0x4fe362=new _0x524633(_0x49f6ea[_0x4acf58]['item']['name'],_0x49f6ea[_0x4acf58]['item']['getAttributes']());_0x56151f[0x0]['_appendChild'](_0x4fe362),_0x13d31d['push'](0x0),_0x56151f['unshift'](_0x4fe362),_0x49f6ea[_0x4acf58]['nextPosition']=_0x2630c9['createPositionFromPath'](_0x168b96,_0x13d31d);}else'elementEnd'===_0x49f6ea[_0x4acf58]['type']?(_0x56151f['shift'](),_0x49f6ea[_0x4acf58]['previousPosition']=_0x2630c9['createPositionFromPath'](_0x168b96,_0x13d31d),_0x13d31d['pop'](),_0x13d31d[_0x13d31d['length']-0x1]++,_0x49f6ea[_0x4acf58]['nextPosition']=_0x2630c9['createPositionFromPath'](_0x168b96,_0x13d31d)):(_0x49f6ea[_0x4acf58]['previousPosition']=_0x2630c9['createPositionFromPath'](_0x168b96,_0x13d31d),_0x3445ed?_0x3445ed['_data']+=_0x49f6ea[_0x4acf58]['item']['data']:_0x3445ed=new _0x26249d(_0x49f6ea[_0x4acf58]['item']['data'],_0x49f6ea[_0x4acf58]['item']['getAttributes']()),_0x49f6ea[_0x4acf58+0x1]&&'text'===_0x49f6ea[_0x4acf58+0x1]['type']&&_0x4ba8d3(_0x3445ed,_0x49f6ea[_0x4acf58+0x1]['item'])||(_0x56151f[0x0]['_appendChild'](_0x3445ed),_0x3445ed=null),_0x13d31d[_0x13d31d['length']-0x1]+=_0x49f6ea[_0x4acf58]['item']['offsetSize'],_0x49f6ea[_0x4acf58]['nextPosition']=_0x2630c9['createPositionFromPath'](_0x168b96,_0x13d31d));for(let _0x22b4c1=0x0;_0x22b4c1<_0x49f6ea['length'];_0x22b4c1++){const _0x16a597=_0x49f6ea[_0x22b4c1]['previousPosition'],_0x130214=_0x49f6ea[_0x22b4c1]['nextPosition'];for(const _0x197769 of _0x49f6ea[_0x22b4c1]['markersStart'])_0x5a2505['set'](_0x197769,{'start':_0x16a597,'end':null});_0x1049ab('isRemoveSuggestion',_0x22b4c1,_0x16a597,_0x130214),_0x1049ab('isAddSuggestion',_0x22b4c1,_0x16a597,_0x130214),_0x1049ab('isRemoved',_0x22b4c1,_0x16a597,_0x130214),_0x1049ab('isAdded',_0x22b4c1,_0x16a597,_0x130214);for(const _0x437013 of _0x49f6ea[_0x22b4c1]['markersEnd']){const _0x3bb08a=_0x5a2505['get'](_0x437013);_0x3bb08a?_0x3bb08a['end']=_0x130214:_0x5a2505['set'](_0x437013,{'start':_0x130214,'end':_0x130214});}}for(const [_0xb637df,_0x45b728]of _0x5a2505){const _0xc1556c=this['editor']['model']['createRange'](_0x45b728['start'],_0x45b728['end']);_0x168b96['markers']['set'](_0xb637df,_0xc1556c);}return _0x364c23['sort']((_0x2d55ee,_0xb80201)=>{const _0x299a86=_0x168b96['markers']['get']('revision:'+_0x2d55ee['id']),_0x42da45=_0x168b96['markers']['get']('revision:'+_0xb80201['id']);return _0x299a86['start']['isBefore'](_0x42da45['start'])?-0x1:_0x299a86['start']['isAfter'](_0x42da45['start'])?0x1:_0x299a86['end']['isBefore'](_0x42da45['end'])?-0x1:_0x299a86['end']['isAfter'](_0x42da45['end'])?0x1:'add'===_0x2d55ee['type']?-0x1:0x1;}),{'root':_0x168b96,'changes':_0x364c23};function _0x1049ab(_0x5c9d8b,_0xae1895,_0x206379,_0x24ee9b){const _0x2cc9a7=!!_0x49f6ea[_0xae1895][_0x5c9d8b],_0x41a721=_0x2cc9a7?_0x49f6ea[_0xae1895][_0x5c9d8b]['userId']:null,_0x10c1a8=_0x2cc9a7&&_0x49f6ea[_0xae1895][_0x5c9d8b]['aiSource']||null,_0x325d68=_0xae1895===_0x49f6ea['length']-0x1,_0x21d410=_0x5ca1f1[_0x5c9d8b][0x0],_0x211223=_0x296c1c['isObject'](_0x49f6ea[_0xae1895]['item']);!_0x51e873[_0x5c9d8b]&&_0x2cc9a7?_0x51e873[_0x5c9d8b]={'start':_0x206379,'tapeItem':_0x49f6ea[_0xae1895],'userId':_0x41a721,'aiSource':_0x10c1a8,'type':_0x5c9d8b}:_0x51e873[_0x5c9d8b]&&!_0x2cc9a7?(_0x51e873[_0x5c9d8b]['end']=_0x206379,_0x545526(_0x51e873[_0x5c9d8b]),_0x51e873[_0x5c9d8b]=null):_0x51e873[_0x5c9d8b]&&_0x2cc9a7&&(_0x51e873[_0x5c9d8b]['userId']!==_0x41a721||_0x51e873[_0x5c9d8b]['aiSource']!==_0x10c1a8)&&(_0x51e873[_0x5c9d8b]['end']=_0x206379,_0x21d410&&_0x21d410['userId']===_0x51e873[_0x5c9d8b]['userId']?_0x21d410['change']['aiSource']=_0x21d410['change']['aiSource']||_0x51e873[_0x5c9d8b]['aiSource']:_0x545526(_0x51e873[_0x5c9d8b]),_0x51e873[_0x5c9d8b]={'start':_0x206379,'tapeItem':_0x49f6ea[_0xae1895],'userId':_0x41a721,'aiSource':_0x10c1a8,'type':_0x5c9d8b}),_0x51e873[_0x5c9d8b]&&_0x211223&&('elementStart'!==_0x49f6ea[_0xae1895]['type']||_0x21d410&&_0x21d410['userId']===_0x41a721||_0x5ca1f1[_0x5c9d8b]['unshift']({'userId':_0x41a721,'object':_0x49f6ea[_0xae1895]['item'],'change':_0x51e873[_0x5c9d8b]}),'elementEnd'===_0x49f6ea[_0xae1895]['type']&&_0x21d410&&_0x21d410['object']===_0x49f6ea[_0xae1895]['item']&&(_0x5ca1f1[_0x5c9d8b]['shift'](),_0x51e873[_0x5c9d8b]=_0x21d410['change'])),_0x51e873[_0x5c9d8b]&&_0x325d68&&(_0x51e873[_0x5c9d8b]['end']=_0x24ee9b,_0x545526(_0x51e873[_0x5c9d8b]),_0x51e873[_0x5c9d8b]=null);}function _0x545526({start:_0x1efaaf,end:_0x19bfc3,tapeItem:_0x5ba3ed,userId:_0x55f8a9,aiSource:_0xdb6c73,type:_0x5bbf20}){const _0x4b6ff2=_0x5ba3ed['item'],_0x126d3a=_0x2630c9['schema']['isBlock'](_0x4b6ff2)&&!_0x2630c9['schema']['isLimit'](_0x4b6ff2),_0x276241=_0x1efaaf['nodeAfter']==_0x19bfc3['parent']&&_0x19bfc3['isAtStart'];if(_0x126d3a&&_0x276241)return;const _0x3c2515=_0x2630c9['createRange'](_0x1efaaf,_0x19bfc3),_0x49b629=_0x38fc6c['get'](_0x55f8a9),_0x523973=new Tt({'author':_0x49b629,'type':'isAdded'==_0x5bbf20||'isAddSuggestion'==_0x5bbf20?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5bbf20||'isRemoveSuggestion'==_0x5bbf20,'aiSource':_0xdb6c73||null},'createdAt':new Date(),'rootName':_0x55baf1});_0x364c23['push'](_0x523973),_0x168b96['markers']['set']('revision:'+_0x523973['id'],_0x3c2515);}function _0x4ba8d3(_0x390372,_0x52c1f2){const _0x1473b7=_0x390372['getAttributes'](),_0x1a9d15=_0x52c1f2['getAttributes']();for(const _0x41e709 of _0x1473b7){if(_0x41e709[0x1]!==_0x52c1f2['getAttribute'](_0x41e709[0x0]))return!0x1;_0x1a9d15['next']();}return _0x1a9d15['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x53a44f=>{const _0x50ece1=_0x53a44f['markerName']['split'](':')[0x1],_0x4907d2=this['_getChangeFromId'](_0x50ece1);if(!_0x4907d2)return null;const _0x48725d='add'==_0x4907d2['type']?'insertion':'deletion',_0x16848a=['ck-suggestion-marker','ck-suggestion-marker-'+_0x48725d];return _0x4907d2['data']['isSuggestion']&&_0x16848a['push']('ck-suggestion-marker-'+_0x48725d+'-new'),this['activeChange']==_0x4907d2&&_0x16848a['push']('ck-suggestion-marker--active'),{'classes':_0x16848a,'attributes':{'data-change-id':_0x50ece1}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1f27a5=>{_0x1f27a5['on']('element:pre',(_0x257fb3,_0x5992ac,_0x27948)=>{const _0x2a7764=_0x5992ac['viewItem']['getChild'](0x0);if(!_0x2a7764||!_0x2a7764['is']('element','code'))return;if(!_0x27948['consumable']['consume'](_0x2a7764,{'attributes':['vid_start','vid_end']}))return;const _0x152db1=_0x5992ac['modelRange']['start']['nodeAfter'];_0x27948['writer']['setAttribute']('vid_start',_0x2a7764['getAttribute']('vid_start'),_0x152db1),_0x27948['writer']['setAttribute']('vid_end',_0x2a7764['getAttribute']('vid_end'),_0x152db1);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0xe6504=>{_0xe6504['on']('element',(_0x52f609,_0x36812a,_0x59613f)=>{if(!_0x59613f['consumable']['consume'](_0x36812a['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x36812a['modelRange']['isCollapsed'])return;const _0x3dd278=_0x36812a['modelRange']['start']['nodeAfter'];_0x3dd278['hasAttribute']('vid_start')||_0x3dd278['hasAttribute']('vid')||(_0x59613f['writer']['setAttribute']('vid_start',_0x36812a['viewItem']['getAttribute']('vid_start'),_0x3dd278),_0x59613f['writer']['setAttribute']('vid_end',_0x36812a['viewItem']['getAttribute']('vid_end'),_0x3dd278));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x55b88d=>_0x55b88d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x2b8b50,[,_0x48ae2c])=>{['vid_start','vid_end','vid']['includes'](_0x48ae2c)&&(_0x2b8b50['return']=!0x0,_0x2b8b50['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5db759=>{_0x5db759['on']('attribute:vid',(_0x8b6535,_0xd1bc84,_0x183b42)=>{if('\x20'!=_0xd1bc84['item']['data']||_0xd1bc84['item']['parent']['maxOffset']>0x1)return;if(!_0x183b42['consumable']['consume'](_0xd1bc84['item'],_0x8b6535['name']))return;const _0x337cd8=_0x183b42['writer'],_0x38e11d=_0x183b42['mapper']['toViewRange'](_0xd1bc84['range']);_0x337cd8['wrap'](_0x38e11d,_0x337cd8['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x6ad1c7){const _0x5984c8=_0x6ad1c7['plugins']['get']('RevisionViewer');return(_0x5223ce,_0x41c510,_0x10ea1b)=>{const _0x4a4305=_0x41c510['markerName']['split'](':')[0x1],_0x55f4b0=_0x5984c8['_getChangeFromId'](_0x4a4305);if(!_0x55f4b0)return null;const _0x4dfa24='add'==_0x55f4b0['type']?'split':'merge';if(!_0x10ea1b['consumable']['test'](_0x41c510['markerRange'],_0x5223ce['name']))return;const _0x4e1417=_0x41c510['markerRange']['getWalker'](),_0x5b6229=_0x41c510['markerRange']['start'],_0x1f8709=_0x6ad1c7['model']['schema'];let _0x33c645=null,_0x140260=null,_0xf8cfb2=!0x1,_0x317496=!0x1;for(const _0x502483 of _0x4e1417){const _0x4d959=_0x502483['item'];_0xf8cfb2=_0xf8cfb2||_0x1f8709['isContent'](_0x4d959);const _0xc0ca10=_0x10ea1b['mapper']['toViewElement'](_0x4d959);if(_0xc0ca10&&_0xc0ca10['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x502483['type']&&(_0x1f8709['isBlock'](_0x4d959)&&!_0x1f8709['isLimit'](_0x4d959)&&(_0x4d959['nextSibling']||_0x5b6229['isAtEnd']?_0x33c645&&_0x33c645['parent']==_0x4d959||(_0x33c645=_0x4d959,_0x39d7ff(_0x502483['previousPosition']),_0x317496=!0x0):_0x140260=_0x140260||_0x502483['previousPosition']));}function _0x39d7ff(_0x54d9b4){const _0x3df690=_0x10ea1b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4dfa24}),_0x3ec6d1=_0x10ea1b['mapper']['toViewPosition'](_0x54d9b4);_0x55f4b0['data']['isSuggestion']&&_0x10ea1b['writer']['addClass']('ck-suggestion-marker-'+_0x4dfa24+'-new',_0x3df690),_0x5984c8['activeChange']==_0x55f4b0&&_0x10ea1b['writer']['addClass']('ck-suggestion-marker--active',_0x3df690),_0x10ea1b['writer']['insert'](_0x3ec6d1,_0x3df690),_0x10ea1b['mapper']['bindElementToMarker'](_0x3df690,_0x41c510['markerName']);}_0xf8cfb2||_0x317496||!_0x140260||_0x39d7ff(_0x140260);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x4d4a2f,_0x567c59,_0x19d32b)=>{const _0x6b8691=_0x19d32b['mapper']['markerNameToElements'](_0x567c59['markerName']);if(_0x6b8691){for(const _0x3915a3 of _0x6b8691)(_0x3915a3['hasClass']('ck-suggestion-marker-split')||_0x3915a3['hasClass']('ck-suggestion-marker-merge'))&&(_0x19d32b['mapper']['unbindElementFromMarkerName'](_0x3915a3,_0x567c59['markerName']),_0x19d32b['writer']['remove'](_0x3915a3));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x5261f9,_0x484c12,_0x57aba2)=>{const _0x4677cc=_0x484c12['markerName']['split'](':')[0x1],_0x24ad15=this['_getChangeFromId'](_0x4677cc);if(!_0x24ad15)return null;const _0x465c83='add'==_0x24ad15['type']?'split':'merge';if(_0x57aba2['consumable']['test'](_0x484c12['markerRange'],_0x5261f9['name']))for(const _0x344378 of _0x484c12['markerRange']['getItems']()){if(!_0x344378['is']('element','softBreak'))continue;const _0x4d11c9=_0x57aba2['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x465c83}),_0x45b0ac=_0x57aba2['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x344378));_0x24ad15['data']['isSuggestion']&&_0x57aba2['writer']['addClass']('ck-suggestion-marker-'+_0x465c83+'-new',_0x4d11c9),this['activeChange']==_0x24ad15&&_0x57aba2['writer']['addClass']('ck-suggestion-marker--active',_0x4d11c9),_0x57aba2['writer']['insert'](_0x45b0ac,_0x4d11c9),_0x57aba2['mapper']['bindElementToMarker'](_0x4d11c9,_0x484c12['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x13a22c=>{for(const _0x2383e8 of this['editor']['model']['document']['getRootNames']()){const _0x513ff=this['editor']['model']['document']['getRoot'](_0x2383e8),_0xc21e9a=this['editor']['editing']['view']['document']['getRoot'](_0x2383e8);if(_0xc21e9a){const _0x32b68c=_0x513ff['getAttribute']('revisionHistoryAttachChange');if(_0x13a22c['removeAttribute']('data-change-id',_0xc21e9a),_0x13a22c['removeClass']('ck-revision-history-root-add',_0xc21e9a),_0x13a22c['removeClass']('ck-revision-history-root-remove',_0xc21e9a),_0x13a22c['removeClass']('ck-revision-history-root--active',_0xc21e9a),_0x32b68c){const _0x203147=this['_getChangeFromId'](_0x32b68c);if(!_0x203147)return null;_0x13a22c['setAttribute']('data-change-id',_0x32b68c,_0xc21e9a),_0x13a22c['addClass']('ck-revision-history-root-'+_0x203147['type'],_0xc21e9a),this['activeChange']==_0x203147&&_0x13a22c['addClass']('ck-revision-history-root--active',_0xc21e9a);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4d885f=>'revision-comment:'+_0x4d885f,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x325336=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Pt(_0x325336['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2d3895=>'revision-suggestion:'+_0x2d3895,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x21b0d5=>({'name':'suggestion:'+_0x21b0d5,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4f6338=>{const _0x3892fa=_0x4f6338['markerName']['split'](':')[0x1];return'insertion'!=_0x3892fa&&'deletion'!=_0x3892fa?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3892fa]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ut(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ut(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x15971d,_0x3f3034,_0x6413b9)=>{const _0x1e5537=_0x6413b9['mapper']['markerNameToElements'](_0x3f3034['markerName']);if(_0x1e5537){for(const _0xc39315 of _0x1e5537)_0xc39315['is']('uiElement')&&(_0x6413b9['mapper']['unbindElementFromMarkerName'](_0xc39315,_0x3f3034['markerName']),_0x6413b9['writer']['remove'](_0xc39315));}},{'priority':'high'});}_getChangeFromId(_0x39a7c0){return this['_changeIdToChange']['get'](_0x39a7c0);}_getViewForChange(_0x36f746){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Dt(this['editor']['locale'],_0x36f746,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x529cd2,_0x473b29,_0x4d8860,_0x103c8b)=>{_0x103c8b&&this['_balloon']['remove'](_0x103c8b),_0x4d8860&&(this['_balloon']['add']({'view':_0x4d8860,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x47e200=this['editor']['editing'],_0xdb3c33=this['_getChangeFromId'](_0x4d8860['changeId']);let _0x6ec2bb;if(_0xdb3c33['data']['isOnRoot']){const _0x3128a8=_0x47e200['view']['getDomRoot'](_0xdb3c33['rootName']);_0x6ec2bb=Array['from'](_0x3128a8['getClientRects']());}else{const _0x32bc5a=this['editor']['model']['markers']['get']('revision:'+_0x4d8860['changeId']);_0x6ec2bb=Array['from'](_0x47e200['mapper']['markerNameToElements'](_0x32bc5a['name']))['map'](_0x28dfdc=>_0x47e200['view']['domConverter']['mapViewToDom'](_0x28dfdc))['map'](_0x13272f=>Array['from'](_0x13272f['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x6ec2bb['find'](_0x376f35=>_0x376f35['top']-0x3<=this['_activeViewTarget']['y']&&_0x376f35['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x376f35['left']-0x3<=this['_activeViewTarget']['x']&&_0x376f35['right']+0x3>=this['_activeViewTarget']['x'])||_0x6ec2bb[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2bdec1,_0x4f66f1,_0x3a9130,_0x100f0f)=>{this['activeView']=_0x3a9130?this['_getViewForChange'](_0x3a9130):null,this['editor']['model']['change'](()=>{const _0x4ab83d=this['editor']['editing'];_0x100f0f&&(_0x100f0f['data']['isOnRoot']?_0x4ab83d['view']['change'](_0x34c3f5=>{_0x34c3f5['removeClass']('ck-revision-history-root--active',_0x4ab83d['view']['document']['getRoot'](_0x100f0f['rootName']));}):_0x4ab83d['reconvertMarker']('revision:'+_0x100f0f['id'])),_0x3a9130&&(_0x3a9130['data']['isOnRoot']?_0x4ab83d['view']['change'](_0x176c95=>{_0x176c95['addClass']('ck-revision-history-root--active',_0x4ab83d['view']['document']['getRoot'](_0x3a9130['rootName']));}):_0x4ab83d['reconvertMarker']('revision:'+_0x3a9130['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3d819b,_0x2bb23b)=>{if(this['activeChange'])return;const _0x49b88d=this['_findChangeIdFromDomTarget'](_0x2bb23b['target']),_0x41973d=this['_changeIdToChange']['get'](_0x49b88d);_0x41973d?(this['_activeViewTarget']={'x':_0x2bb23b['domEvent']['x'],'y':_0x2bb23b['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x41973d)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4d12b3,_0x8fabe1)=>{const _0x453ce5=this['_findChangeIdFromDomTarget'](_0x8fabe1['target']),_0x1e2d85=this['_changeIdToChange']['get'](_0x453ce5);_0x1e2d85?(this['_activeViewTarget']={'x':_0x8fabe1['domEvent']['x'],'y':_0x8fabe1['domEvent']['y']},_0x1e2d85===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1e2d85):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x13c762){do{const _0x4eeccd=_0x13c762['getAttribute']('data-change-id');if(_0x4eeccd)return _0x4eeccd;_0x13c762=_0x13c762['parent'];}while(_0x13c762);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x2d73ef=>{for(const _0x8a164f of this['editor']['model']['markers'])_0x2d73ef['removeMarker'](_0x8a164f);});}};function Pt(_0x24b9e1){return _0x24b9e1['split'](':')[0x1];}function Ut(_0x32b421,_0x5b24b6){return(_0x4568a7,_0x446602,_0x5373ef)=>{if(!_0x5373ef['consumable']['test'](_0x446602['markerRange'],_0x4568a7['name']))return;const _0x2cad54=_0x446602['markerRange']['getWalker'](),_0x4da953=_0x446602['markerRange']['start'],_0xf5197=_0x32b421['model']['schema'];let _0x552434=null,_0x1fb939=null,_0x3f7710=!0x1,_0x341e12=!0x1;for(const _0x5b6f55 of _0x2cad54){const _0x298839=_0x5b6f55['item'];_0x3f7710=_0x3f7710||_0xf5197['isContent'](_0x298839);const _0x27eed5=_0x5373ef['mapper']['toViewElement'](_0x298839);if(_0x27eed5&&_0x27eed5['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5b6f55['type']&&(_0xf5197['isBlock'](_0x298839)&&!_0xf5197['isLimit'](_0x298839)&&(_0x298839['nextSibling']||_0x4da953['isAtEnd']?_0x552434&&_0x552434['parent']==_0x298839||(_0x552434=_0x298839,_0x39c785(_0x5b6f55['previousPosition']),_0x341e12=!0x0):_0x1fb939=_0x1fb939||_0x5b6f55['previousPosition']));}function _0x39c785(_0x4e3b47){const _0xceea61=_0x5373ef['mapper']['toViewPosition'](_0x4e3b47),_0x3a3214=_0x5373ef['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5b24b6});_0x5373ef['writer']['insert'](_0xceea61,_0x3a3214),_0x5373ef['mapper']['bindElementToMarker'](_0x3a3214,_0x446602['markerName']);}_0x3f7710||_0x341e12||!_0x1fb939||_0x39c785(_0x1fb939);};}var Lt=class extends _0x265df5{constructor(_0x467445){super(_0x467445);const _0x2996f3=_0x467445['plugins']['get'](Ht);this['affectsData']=!0x1,this['listenTo'](_0x2996f3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2996f3,'change:isEnabled',()=>this['refresh']());}execute(){const _0x617cc8=this['editor'],_0xa5332a=_0x617cc8['plugins']['get'](Ht),_0x7908f9=_0xa5332a['isReady']?_0xa5332a['diff']['newRevisionId']:null;_0x617cc8['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x7908f9);}['refresh'](){const {isReady:_0x209a0b,isEnabled:_0x56715e,repository:_0x323fba,diff:_0x5de14b}=this['editor']['plugins']['get'](Ht),_0x570693=_0x5de14b&&_0x323fba['getLaterVisibleRevision'](_0x5de14b['newRevisionId']);this['isEnabled']=_0x209a0b&&_0x56715e&&Boolean(_0x570693);}},Ft=class extends _0x265df5{_step;constructor(_0x15258a,{direction:_0x177965}){super(_0x15258a);const _0x5a3964=_0x15258a['plugins']['get'](Ht);this['affectsData']=!0x1,this['_step']='forward'===_0x177965?0x1:-0x1,this['listenTo'](_0x5a3964,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5a3964,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5a3964,'change:activeChange',()=>this['refresh']());}execute(){const _0x38529c=this['editor'],_0x2a498c=_0x38529c['plugins']['get'](Ht),{isNavigationMode:_0xcb4c42,currentChangeNumber:_0x4d51cc}=_0x2a498c;let _0x1ccc8a;if(_0x2a498c['activeChange']=_0xcb4c42?_0x2a498c['diff']['changes']['get'](_0x4d51cc+this['_step']):_0x2a498c['diff']['changes']['first'],_0x2a498c['activeChange']['data']['isOnRoot'])_0x1ccc8a=_0x38529c['editing']['view']['getDomRoot'](_0x2a498c['activeChange']['rootName']);else{const _0x50e6cf=_0x38529c['model']['markers']['get']('revision:'+_0x2a498c['activeChange']['id']);_0x1ccc8a=_0x5cabcc(_0x38529c['editing'],_0x50e6cf);}_0x5b1f25({'target':_0x1ccc8a,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x364ad0,currentChangeNumber:_0x31dd6e,numberOfChanges:_0x5e0269,isReady:_0x5df5ac,isEnabled:_0x1da5e7}=this['editor']['plugins']['get'](Ht);this['isEnabled']=!!(_0x1da5e7&&_0x5df5ac&&_0x5e0269)&&(!_0x364ad0||(0x1===this['_step']?_0x31dd6e<_0x5e0269-0x1:_0x31dd6e>0x0));}},$t=class extends ut{constructor(_0xd72735){super(_0xd72735);const _0x29575e=this['bindTemplate'],_0x31fe68=new _0x264e1e(_0xd72735),_0x1d9050=new _0x264e1e(_0xd72735);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',(_0x22527b,_0x543a3e)=>_0x22527b&&_0x543a3e>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3d2172,_0x223a24,_0x23f557,_0x46409c)=>{if(!_0x3d2172)return Rt(_0xd72735,'Loading...');if(!_0x23f557)return Rt(_0xd72735,'No\x20changes');const _0x3c9b45=Rt(_0xd72735,'NUMBER_OF_CHANGES',_0x23f557);return _0x46409c?Rt(_0xd72735,'X_OF_Y_CHANGES',[_0x223a24+0x1,_0x23f557]):_0x3c9b45;}),_0x31fe68['set']({'label':Rt(_0xd72735,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0xaa8312}),_0x1d9050['set']({'label':Rt(_0xd72735,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xb2d7ef}),_0x31fe68['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1d9050['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x31fe68['on']('execute',()=>this['fire']('execute','backward')),_0x1d9050['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',_0x29575e['if']('_isStatusLabelVisible','ck-hidden',_0x352128=>!_0x352128)]},'children':[{'text':_0x29575e['to']('isNavigationMode',_0x1faa61=>_0x1faa61?Rt(_0xd72735,'EDIT_X_OF_Y_REVISIONS')+':\x20':Rt(_0xd72735,'Total')+':\x20')}]},{'text':_0x29575e['to']('_statusText')}]},new ht(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x31fe68,_0x1d9050]}]});}};const Bt='ck-editor__editable__loading-overlay';var jt=class extends _0x2dd53f{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x491a70=this['editor']['editing']['view'];_0x491a70['change'](_0x4dc962=>{for(const _0xdcf979 of _0x491a70['document']['roots'])_0x4dc962['addClass'](Bt,_0xdcf979);});}['hide'](){const _0x5120c5=this['editor']['editing']['view'];_0x5120c5['change'](_0x481bb3=>{for(const _0x5423d6 of _0x5120c5['document']['roots'])_0x481bb3['removeClass'](Bt,_0x5423d6);});}},Gt=class extends _0x2dd53f{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht,jt];}init(){const _0x2fcc02=this['editor'],_0x609d22=_0x2fcc02['plugins']['get'](Ht),_0x1a1cd7=_0x2fcc02['plugins']['get'](jt);_0x2fcc02['ui']['componentFactory']['add']('exitToEditing',_0x3a8980=>{const _0x3a5bcf=new _0x264e1e(_0x3a8980);return _0x3a5bcf['set']({'label':Rt(_0x3a8980,'Back\x20to\x20editing'),'icon':_0x38ee45,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3a5bcf,'execute',()=>{_0x2fcc02['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3a5bcf;}),_0x2fcc02['ui']['componentFactory']['add']('restoreRevision',_0x2bfbad=>{const _0x33f640=new _0x264e1e(_0x2bfbad);return _0x33f640['set']({'label':Rt(_0x2bfbad,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x33f640['bind']('isEnabled')['to'](_0x2fcc02['commands']['get']('restoreRevision')),this['listenTo'](_0x33f640,'execute',()=>_0x2fcc02['execute']('restoreRevision')),_0x33f640;}),_0x2fcc02['ui']['componentFactory']['add']('changesNavigation',_0x29104d=>{const _0x1503c1=new $t(_0x29104d),_0x262589=_0x2fcc02['commands']['get']('showPreviousChange'),_0x4d85f6=_0x2fcc02['commands']['get']('showNextChange');return _0x1503c1['bind']('isBackwardNavigationEnabled')['to'](_0x262589,'isEnabled'),_0x1503c1['bind']('isForwardNavigationEnabled')['to'](_0x4d85f6,'isEnabled'),_0x1503c1['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x609d22),this['listenTo'](_0x1503c1,'execute',(_0x2b1b56,_0x26a9be)=>{_0x2fcc02['execute']('forward'===_0x26a9be?'showNextChange':'showPreviousChange');}),_0x1503c1;}),_0x1a1cd7['show'](),_0x609d22['on']('change:isReady',(_0x4da7c8,_0x5681e4,_0x3a1237)=>{_0x3a1237?_0x1a1cd7['hide']():_0x1a1cd7['show']();});}},Kt=class extends tt{['_resizeObserver']=null;constructor(_0x971438,_0x547761){super(_0x971438,_0x547761);const _0x1c5f1f=this['bindTemplate'];this['set']({'label':Rt(_0x971438,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=Rt(_0x971438,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x1c5f1f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x51ad7d(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x29c457=this['fieldView']['element'];this['_tooltipString']=_0x29c457['scrollWidth']>_0x29c457['clientWidth']&&_0x29c457['value']||'';}},qt=class extends ut{constructor(_0xb67b5d,_0x342093,_0xaa7a15){super(_0xb67b5d);const _0x1c530d=new _0x105ea5();_0x1c530d['set']({'content':_0x2dbbaa,'viewBox':'0\x200\x2011\x2010'});const _0x3f5f24=['ck','ck-revision-history-sidebar__revision-author'];_0xaa7a15&&_0x3f5f24['push']('ck-revision-history-sidebar__revision-author_creator');const _0x4d942c=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':Rt(_0xb67b5d,_0xaa7a15?'Revision\x20creator':'Revision\x20author')},'children':[_0x1c530d,_0x342093['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x3f5f24},'children':_0x4d942c});}};function Yt(_0x35fda5,_0x4e7ddb){const _0x20fe1a=_0x35fda5['bindTemplate'],_0x2ae755=_0x35fda5['locale'],_0x14966e=ft(_0x2ae755);_0x14966e['panelPosition']='sw';const _0x276970=function(_0x5a64a9,_0x5952b8){const _0xb92c6a=function(_0x3271b4,_0x2bba0a){const _0x4fa3d9=_0x3271b4['locale'],_0xae0de1={'Compare\x20against\x20selected':Rt(_0x4fa3d9,'Compare\x20against\x20selected'),'Name\x20this\x20revision':Rt(_0x4fa3d9,'Name\x20this\x20revision'),'Restore\x20this\x20revision':Rt(_0x4fa3d9,'Restore\x20this\x20revision')};return _0x2bba0a['map'](_0x17134a=>{const _0x1e1f77=_0xae0de1[_0x17134a['name']];return _0x1e1f77&&_0x1e1f77!==_0x17134a['name']&&(_0x17134a['name']=_0x1e1f77),_0x17134a;});}(_0x5a64a9,_0x5952b8),_0x1a2ef7=new _0x5d63ac();for(const _0x3757c1 of _0xb92c6a){const _0x372d5d={'type':'button','model':new lt({'label':_0x3757c1['name'],'class':_0x3757c1['class'],'withText':!0x0,'role':'menuitem','_action':_0x3757c1['action']})};_0x372d5d['model']['bind']('isEnabled')['to'](_0x5a64a9,'isActionsDropdownOpen',_0x342fe7=>'function'!=typeof _0x3757c1['isEnabled']||(!_0x342fe7||_0x3757c1['isEnabled'](_0x5a64a9))),_0x1a2ef7['add'](_0x372d5d);}return _0x1a2ef7;}(_0x35fda5,_0x4e7ddb);return _0x35fda5['bind']('isActionsDropdownOpen')['to'](_0x14966e,'isOpen'),_0x14966e['buttonView']['set']({'label':Rt(_0x2ae755,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1ed1ba}),_0x14966e['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x20fe1a['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x20fe1a['to'](_0x4f3efc=>_0x4f3efc['stopPropagation']())}}),_0x14966e['on']('execute',_0x5bcde0=>{_0x35fda5['isReady']&&'function'==typeof _0x5bcde0['source']['_action']&&_0x5bcde0['source']['_action'](_0x35fda5);}),dt(_0x14966e,_0x276970,{'role':'menu'}),_0x14966e['listenTo'](_0x35fda5,'change:isActionsDropdownOpen',(_0x5e4561,_0x45fdf3,_0x298686)=>{if(_0x298686)for(const _0x176a6a of _0x14966e['listView']['items']){const _0x4ed2b4=_0x176a6a['children']['first'],_0x3fbb74=_0x4e7ddb['find'](_0x2256ff=>_0x2256ff['action']===_0x4ed2b4['_action'])['isVisible'];_0x176a6a['isVisible']=void 0x0===_0x3fbb74||_0x3fbb74(_0x35fda5);}}),_0x14966e;}const Jt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x2b4c5c(ut);var Wt=class extends Jt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0x44d4f3,_0x4b4263,_0xfecc72,_0x1e9a54,_0x4afbd9=!0x1){super(_0x44d4f3);const _0x37c092=this['bindTemplate'],_0x14572d=function(_0x5c76d1,_0x1ddcf5){const _0x3cfd42=Array['from'](_0x1ddcf5['authors'])['filter'](_0x5c0dd5=>_0x5c0dd5!=_0x1ddcf5['creator']);return _0x1ddcf5['creator']&&_0x3cfd42['unshift'](_0x1ddcf5['creator']),_0x3cfd42['map'](_0x32eeec=>new qt(_0x5c76d1,_0x32eeec,_0x32eeec==_0x1ddcf5['creator']));}(_0x44d4f3,_0x4b4263);this['id']=_0x4b4263['id'],this['_revision']=_0x4b4263,this['_requireRevisionName']=_0x1e9a54,this['bind']('_isAiGenerated')['to'](_0x4b4263,'attributes',_0x551123=>!(!_0x551123||!_0x551123['@ai'])),this['bind']('name','createdAt')['to'](_0x4b4263),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1b8bda=>{return _0x449ee3=_0x44d4f3['uiLanguage'],(_0x32435d=_0x1b8bda)['toLocaleDateString'](_0x449ee3,{'month':'long','day':'numeric'})+',\x20'+_0x32435d['toLocaleTimeString'](_0x449ee3,{'hour':'numeric','minute':'numeric'});var _0x449ee3,_0x32435d;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Kt(_0x44d4f3,vt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x1b4d15=>_0x1b4d15||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x271393,_0x2fbf5f)=>_0x271393&&_0x2fbf5f),this['revisionActionsView']=_0xfecc72&&_0xfecc72['length']?Yt(this,_0xfecc72):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x4afbd9?this['_createAiPillView'](_0x44d4f3):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x37c092['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x37c092['if']('isEnabled','ck-disabled',_0x443530=>!_0x443530),_0x37c092['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x37c092['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x37c092['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':_0x37c092['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':_0x14572d}]},..._0x4afbd9?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x37c092['if']('_isAiGenerated','ck-hidden',_0x33f21e=>!_0x33f21e)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x37c092['to'](_0x40a1ed=>{_0x40a1ed['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x4a539c){const _0x5b713f=new _0x456423(_0x4a539c);return _0x5b713f['set']({'icon':_0x29e5ea,'label':Rt(_0x4a539c,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':Rt(_0x4a539c,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','class':'ck-pill_ai'}),_0x5b713f['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x5b713f;}['render'](){super['render']();const _0x469d47=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x469d47,'change',()=>{this['_requireRevisionName']&&!_0x469d47['value']||this['fire']('setName',{'id':this['id'],'name':_0x469d47['value']}),_0x469d47['value']||(_0x469d47['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Xt(_0x297dbc,_0x3ca425){const _0xe547ec=_t['fromJSDate'](_0x297dbc)['setLocale'](_0x3ca425),_0x17b534=_t['local'](),_0x56b929=_0x17b534['minus']({'days':0x1})['startOf']('day');let _0x4d8b22,_0x487ce9;return _0xe547ec['hasSame'](_0x17b534,'day')?(_0x4d8b22=_0xe547ec['startOf']('day')['toJSDate'](),_0x487ce9=_0xe547ec['toRelativeCalendar']()):_0xe547ec['hasSame'](_0x56b929,'day')?(_0x4d8b22=_0x56b929['toJSDate'](),_0x487ce9=_0xe547ec['toRelativeCalendar']()):_0xe547ec['hasSame'](_0x17b534,'week')?(_0x4d8b22=_0xe547ec['startOf']('week')['toJSDate'](),_0x487ce9=_0xe547ec['weekdayLong']||''):_0xe547ec['hasSame'](_0x17b534,'year')?(_0x4d8b22=_0xe547ec['startOf']('month')['toJSDate'](),_0x487ce9=_0xe547ec['monthLong']||''):(_0x4d8b22=_0xe547ec['startOf']('year')['toJSDate'](),_0x487ce9=String(_0xe547ec['year'])),{'startDate':_0x4d8b22,'localizedPeriodName':_0x487ce9};}var Qt=class extends ut{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x5a7428,_0x29067b,_0xd0cdc1,_0x263a7,_0x4b7cb2){super(_0x5a7428);const _0x5123d5=Xt(_0x29067b,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x29067b,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xd0cdc1,this['_requireRevisionName']=_0x263a7,this['_showAISource']=_0x4b7cb2,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':_0x5123d5}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x243f7d){const _0x3babcc=new Wt(this['locale'],_0x243f7d,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x3babcc);}['removeRevision'](_0x2cd963){const _0x7660bc=this['revisionViews']['find'](_0x45aef4=>_0x45aef4['id']===_0x2cd963['id']);this['revisionViews']['remove'](_0x7660bc);}},zt=class extends ut{constructor(_0x2b8638){super(_0x2b8638);const _0x229d1c=new _0x105ea5();_0x229d1c['content']=_0x4d55b6,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x229d1c,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[Rt(_0x2b8638,'Revision\x20history')]}]});}},Zt=class extends ut{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x48bb09,_0x35f657,_0x4abf3d,_0x46e51a,_0x4d5518){super(_0x48bb09);const _0x2f5c01=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x35f657,this['_revisionActions']=_0x4abf3d,this['_requireRevisionName']=_0x46e51a,this['_showAISource']=_0x4d5518,this['on']('select',(_0x533d2c,_0x1cf341)=>{this['fire']('revisionSelected',_0x1cf341);}),this['on']('setName',(_0x10bb7d,_0x283e79)=>{this['fire']('revisionSetName',_0x283e79);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new zt(_0x48bb09),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x2f5c01['if']('isEnabled','ck-disabled',_0x516d24=>!_0x516d24)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x2cacad of this['_revisions'])this['_addRevision'](_0x2cacad);this['_revisions']['on']('add',(_0xee6fb5,_0x369ae6)=>{this['_addRevision'](_0x369ae6);}),this['_revisions']['on']('remove',(_0x3941d4,_0x1074b2)=>{this['_removeRevision'](_0x1074b2);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x39d07d=>_0x39d07d['revisionViews']['map'](_0x33c563=>_0x33c563))['flat']();}selectRevision(_0x4720bf){for(const _0x196adf of this['revisionViews'])_0x4720bf&&_0x4720bf['id']===_0x196adf['id']?_0x196adf['select']():_0x196adf['deselect']();}highlightRevisions(_0x24d179){for(const _0x3962bc of this['revisionViews'])_0x24d179['some'](({id:_0x51a0bb})=>_0x51a0bb===_0x3962bc['id'])?_0x3962bc['highlight']():_0x3962bc['unhighlight']();}['_addRevision'](_0x1ec507){const _0x172ed0=Xt(_0x1ec507['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x421876=this['_getTimePeriodViewByStartDate'](_0x172ed0);_0x421876||(_0x421876=new Qt(this['locale'],_0x172ed0,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x421876)),_0x421876['addRevision'](_0x1ec507);}['_removeRevision'](_0x417ee5){const _0x4a813f=Xt(_0x417ee5['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4a813f)['removeRevision'](_0x417ee5);}_getTimePeriodViewByStartDate(_0x58dd6a){return this['timePeriodViews']['find'](_0x48eafa=>_0x48eafa['startDate']['getTime']()===_0x58dd6a['getTime']());}},ti=class RevisionsSidebar extends _0x2dd53f{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ii();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht];}constructor(
|
|
30
|
-
_0x57bb09(_0x50f53c);var oi=class extends ni{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x50093f,_0x39c59a){super(_0x39c59a),this['sourceElement']=_0x50093f,this['model']['document']['createRoot']();const _0x4140d4=new si(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ei(this,_0x4140d4);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x4be916,_0x35c2eb){const _0x35911b=new this(_0x4be916,_0x35c2eb);return await _0x35911b['initPlugins'](),await _0x35911b['ui']['init'](_0x4be916),await _0x35911b['data']['init'](_0x35911b['config']['get']('initialData')||''),_0x35911b['fire']('ready'),_0x35911b;}};const ri=['RevisionHistoryUI','RestrictedEditingMode'];var ai=class extends _0x5ca6f9{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3da13d){super(_0x3da13d),this['result']='end',_0x3da13d['editing']['view']['_overlayModeHint']='auto',_0x3da13d['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},hi=class extends _0x5ca6f9{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt,xt];}constructor(_0x440389){if(super(_0x440389),!this['editor']['config']['get']('revisionHistory'))throw new _0x5c9921('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xf9323e=>this['_showRevisionViewer']({..._0xf9323e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2d07e9=>this['_closeRevisionViewer'](_0x2d07e9)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x29e579=>this['_restoreRevision'](_0x29e579)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x522228){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x522228;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x932455){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x932455);}getRevision(_0x3179b8){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3179b8);}getRevisions(_0x945ebc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x945ebc||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x5ce967=this['editor'],_0x5c576d=_0x481f7a(_0x5ce967,ri),_0x2195a9=_0x5ce967['plugins']['get']('RevisionTracker'),_0x167afb=_0x5ce967['plugins']['get'](_0xe140c3)['users'];return _0x5c576d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5c576d['lazyRoots'],(_0x5c576d['plugins']['push'](ai,Ht,Gt,class RevisionViewerInit extends _0x5ca6f9{static get requires(){return[Ht,_0xe140c3];}init(){const _0x3fa89e=this['editor']['plugins']['get'](_0xe140c3);for(const _0x3290bb of _0x167afb)_0x3290bb['isAnonymous']||_0x3fa89e['getUser'](_0x3290bb['id'])||_0x3fa89e['addUser'](_0x3290bb);const _0x4110a6=_0x2195a9['repository']['getRevisions']();let _0xc4f93e=null;const _0x3dc206=this['editor']['plugins']['get']('RevisionViewer');if(_0x3dc206['adapter']=_0x2195a9['adapter'],_0x3dc206['bind']('isEnabled')['to'](_0x2195a9),_0x5ce967['plugins']['has']('CommentsRepository')){const _0x197d0f=_0x5ce967['plugins']['get']('CommentsRepository');_0x3dc206['_getVisibleCommentThreadIds']=()=>new Set(_0x197d0f['getCommentThreads']()['filter'](_0x2b3a9b=>!_0x2b3a9b['isResolved'])['map'](_0x10b729=>_0x10b729['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x5ce967,'isReadOnly',_0x53c71c=>!_0x53c71c);for(const _0x1dc230 of _0x4110a6){const _0x218b65=null===_0x1dc230['creator'];if(_0x218b65&&_0x1dc230['toVersion']===_0x1dc230['fromVersion'])continue;const _0x2f7877=_0x1dc230['toJSON']();_0x3dc206['addRevisionData'](_0x2f7877,(_0x1f7f02,_0x5e2fc3,_0xc28263)=>{if(_0x218b65){if(_0xc4f93e)_0xc4f93e['_update'](_0x1f7f02,_0x5e2fc3);else{if(!_0x5e2fc3){const _0xedce97=_0xc28263['toJSON']();_0xedce97['id']=_0xd43831(),_0x2195a9['saveRevision'](_0xedce97,_0xc28263['toVersion'])['then'](_0x226d5e=>{_0xc4f93e=_0x226d5e;});}}}else _0x1dc230['_update'](_0x1f7f02,_0x5e2fc3);});}}},ti),_0x5c576d);}['_enhanceShowRevisionViewerCallback'](){const _0x56819b=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2cdb73=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x2cdb73['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x52f1df=this['editor']['plugins']['get']('Dialog');_0x52f1df['isOpen']&&_0x52f1df['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x4a6ad9=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x13b701 of _0x4a6ad9)_0x13b701['class']=_0x13b701['class']?_0x13b701['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x34fa31=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x34fa31&&_0x34fa31['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3fe715=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3fe715&&_0x3fe715['setAttribute']('tabindex','-1');}}const _0x42d87e=this['_getRevisionViewerEditorConfig']();return _0x56819b(_0x42d87e)['then'](_0x2a7b20=>(this['_viewerEditor']=_0x2a7b20,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'),_0x2a7b20))['catch'](_0x27f0eb=>(console['error'](_0x27f0eb),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x518103=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 _0x4033b5=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1e9e15 of _0x4033b5)_0x1e9e15['class']='ck-tab-panel_disabled'===_0x1e9e15['class']?'':_0x1e9e15['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x227116=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x227116&&_0x227116['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x242322=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x242322&&_0x242322['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x518103(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4a942a=this['editor']['plugins']['get']('Annotations');_0x4a942a['refreshVisibility'](),_0x4a942a['refreshPositioning']();}});});}['_showRevisionViewer'](_0x2c944d){const _0x8b827c=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xaada79=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x21ab70=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return oi['create'](_0x21ab70,_0x2c944d)['then'](_0x3198d8=>(_0xaada79['style']['display']='block',_0x8b827c['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3198d8));}['_closeRevisionViewer'](_0x5c7a4a){const _0x5cc087=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5cc087['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x5c7a4a['destroy']();}async _restoreRevision(_0x47f45d){const _0x4a3381=this['editor'],_0x173661=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x9c199d=_0x4a3381['plugins']['get']('RevisionTracker'),_0x21796f=_0x4a3381['plugins']['get']('RevisionHistoryUtils'),_0x2e2342=_0x173661['repository']['getRevision'](_0x47f45d);let _0x4095a6,_0x2a9043,_0x11562b;try{await _0x21796f['loadRevisionData'](_0x2e2342,this['adapter']),_0x4095a6=_0x21796f['getRevisionDocumentData'](_0x2e2342),_0x2a9043=_0x21796f['getRevisionRootsAttributes'](_0x2e2342);}catch(_0x42baa3){return void console['error'](_0x42baa3);}_0x4a3381['model']['change'](_0x3fac6a=>{for(const _0x1b1668 of Array['from'](_0x4a3381['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x3fac6a['removeMarker'](_0x1b1668);}),_0x173661['isReady']=!0x1,_0x4a3381['model']['enqueueChange'](_0x56db47=>{_0x56db47['setSelection'](null),_0x56db47['removeSelectionAttribute'](_0x4a3381['model']['document']['selection']['getAttributeKeys']());const _0x31ce9d=Object['keys'](_0x4095a6);for(const _0x202cec of _0x4a3381['model']['document']['roots'])'$graveyard'!=_0x202cec['rootName']&&_0x202cec['isAttached']()&&!_0x31ce9d['includes'](_0x202cec['rootName'])&&_0x56db47['detachRoot'](_0x202cec);for(const _0x2af8d2 of _0x31ce9d){let _0x3b38da=_0x4a3381['model']['document']['getRoot'](_0x2af8d2);if(!_0x3b38da||!_0x3b38da['isAttached']()){const _0x324a7f=_0x2e2342['diffData']?.[_0x2af8d2]?.['rootElementName']||'$root';_0x3b38da=_0x56db47['addRoot'](_0x2af8d2,_0x324a7f);}const _0x1e063a=_0x2a9043[_0x2af8d2],_0x4acfa4=Object['keys'](_0x1e063a),_0x4aff9b=_0x4095a6[_0x2af8d2];for(const _0x542186 of _0x3b38da['getAttributeKeys']())_0x4acfa4['includes'](_0x542186)||_0x56db47['removeAttribute'](_0x542186,_0x3b38da);for(const _0x544f17 of _0x4acfa4)_0x56db47['setAttribute'](_0x544f17,_0x2a9043[_0x2af8d2][_0x544f17],_0x3b38da);_0x56db47['remove'](_0x56db47['createRangeIn'](_0x3b38da)),_0x56db47['insert'](_0x4a3381['data']['parse'](_0x4aff9b,_0x3b38da),_0x3b38da,0x0);}});const _0x5cebc4=Rt(_0x4a3381['locale'],'Restored');if(_0x2e2342['name'])_0x11562b=-0x1==_0x2e2342['name']['indexOf'](_0x5cebc4)?_0x5cebc4+':\x20'+_0x2e2342['name']:_0x2e2342['name'];else _0x11562b=_0x5cebc4+':\x20'+(_0x2e2342['createdAt']['toLocaleDateString'](_0x4a3381['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2e2342['createdAt']['toLocaleTimeString'](_0x4a3381['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x9c199d['saveRevision']({'name':_0x11562b}),_0x173661['isReady']=!0x0,_0x4a3381['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Lt as RestoreRevisionCommand,pt as Revision,hi as RevisionHistory,xt as RevisionHistoryUI,bt as RevisionHistoryUtils,kt as RevisionTracker,Ht as RevisionViewer,oi as RevisionViewerEditor,ai as RevisionViewerIntegration,jt as RevisionViewerLoadingOverlay,Gt as RevisionViewerUI,yt as RevisionsRepository,ti as RevisionsSidebar,Ft as ShowChangeCommand};
|
|
29
|
+
ii();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht];}constructor(_0x30deef){super(_0x30deef),this['_revisionViewer']=_0x30deef['plugins']['get'](Ht),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x469a55=this['_revisionsRepository']['_revisions'],_0x4978d7=this['_createRevisionActions'](),_0x2de3ed=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Zt(this['editor']['locale'],_0x469a55,_0x4978d7,this['editor']['config']['get']('revisionHistory.requireRevisionName'),'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),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',(_0x503db0,_0x23f42a)=>{_0x23f42a['revisionViews']['on']('add',(_0x161a61,_0x192176)=>{_0x192176['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)),_0x2de3ed['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x4095d5=this['_revisionsRepository']['getRevision'](0x0);if(_0x4095d5){const _0x493ec0=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4095d5['id']);this['_revisionViewer']['compare'](_0x4095d5,_0x493ec0);}}_handleRevisionSelected(_0x33af78,_0x292e87){const _0x5090ac=this['_revisionsRepository']['getRevision'](_0x292e87['id']),_0x38f790=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5090ac['id']);this['_revisionViewer']['compare'](_0x5090ac,_0x38f790);}_handleRevisionSetName(_0x207a91,_0x12cd17){this['_revisionsRepository']['getRevision'](_0x12cd17['id'])['setName'](_0x12cd17['name']);}['_handleDiffChange'](_0x19b04f,_0x466a8b,_0x3d7c91){const _0xb54757=this['_revisionsRepository']['getRevisionsInDiff'](_0x3d7c91);_0xb54757['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xb54757),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xb54757[0x0]));}_createRevisionActions(){const _0x5119ac=this['editor'],_0x2657e0=RevisionsSidebar['availableRevisionActions'],_0x28fcdc=_0x5119ac['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x28fcdc['length'])return _0x28fcdc['map'](_0x1617db=>{const _0x159a49='string'==typeof _0x1617db?Object['assign']({},_0x2657e0[_0x1617db]):_0x1617db;return _0x159a49['action']=_0x159a49['action']['bind'](this,_0x5119ac),_0x159a49['isVisible']&&(_0x159a49['isVisible']=_0x159a49['isVisible']['bind'](this,_0x5119ac)),_0x159a49;});}};function ii(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1b2ed1},_0x15dcd8)=>{const _0x17deeb=_0x1b2ed1['get'](Ht),_0x16c9aa=_0x17deeb['repository'];let _0x275d21=_0x17deeb['diff']['newRevisionId'],_0x1ec54a=_0x15dcd8['id'];_0x16c9aa['getIndex'](_0x275d21)>_0x16c9aa['getIndex'](_0x1ec54a)&&([_0x275d21,_0x1ec54a]=[_0x1ec54a,_0x275d21]),_0x17deeb['compare'](_0x275d21,_0x1ec54a);},'isVisible':({plugins:_0x1350e9},_0x53d1f3)=>{const _0x28cd96=_0x1350e9['get'](Ht);return!(_0x28cd96['repository']['getRevisionsInDiff'](_0x28cd96['diff'])['length']>0x2)&&!_0x53d1f3['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x27940a,{id:_0xea4fee})=>{_0x27940a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xea4fee);},'isVisible':({plugins:_0x448198},_0x1be5cb)=>!!_0x448198['get'](Ht)['repository']['getLaterVisibleRevision'](_0x1be5cb['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x17338e},{id:_0xf7cdf4,revisionNameView:_0x4f50cf})=>{const _0x248f51=_0x17338e['get'](Ht),_0x5d4d55=_0x248f51['repository']['getEarlierVisibleRevision'](_0xf7cdf4);_0x248f51['compare'](_0xf7cdf4,_0x5d4d55),_0x4f50cf['focus'](),_0x4f50cf['fieldView']['select']();}}};}var ei=class extends _0x44fd65{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x1cac97,_0x5c9396){super(_0x1cac97),this['_view']=_0x5c9396,this['_toolbarConfig']=gt(_0x1cac97['config']['get']('toolbar')),this['_elementReplacer']=new _0x501994();}get element(){return this['view']['element'];}init(_0x55add6){const _0x4a95ac=this['editor'],_0x133fbf=this['view'],_0x52182c=_0x4a95ac['editing']['view'],_0xcd60d2=_0x133fbf['editable'];_0xcd60d2['name']=_0x52182c['document']['getRoot']()['rootName'],_0x133fbf['render']();const _0x4f36b8=_0xcd60d2['element'];this['setEditableElement'](_0xcd60d2['name'],_0x4f36b8),_0x133fbf['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x52182c['attachDomRoot'](_0x4f36b8),this['_elementReplacer']['replace'](_0x55add6,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x40a602=this['view'],_0x127899=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x127899['detachDomRoot'](_0x40a602['editable']['name']),_0x40a602['destroy']();}_initToolbar(){const _0x52d525=this['view'];_0x52d525['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x52d525['stickyPanel']['limiterElement']=_0x52d525['element'],_0x52d525['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x48caf7})=>_0x48caf7),_0x52d525['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x52d525['toolbar']);}},si=class extends _0x1c0ab2{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x1cf777,_0x431724,_0x2e3af6={}){super(_0x1cf777),this['stickyPanel']=new at(_0x1cf777),this['toolbar']=new ct(_0x1cf777,{'shouldGroupWhenFull':_0x2e3af6['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x1eb7a0(_0x1cf777,_0x431724);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const ni=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x32922a(_0x140042);var oi=class extends ni{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x53331d,_0x3e7398){super(_0x3e7398),this['sourceElement']=_0x53331d,this['model']['document']['createRoot']();const _0x3e104f=new si(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ei(this,_0x3e104f);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x358cd8,_0x3e0fc3){const _0x45aed3=new this(_0x358cd8,_0x3e0fc3);return await _0x45aed3['initPlugins'](),await _0x45aed3['ui']['init'](_0x358cd8),await _0x45aed3['data']['init'](_0x45aed3['config']['get']('initialData')||''),_0x45aed3['fire']('ready'),_0x45aed3;}};const ri=['RevisionHistoryUI','RestrictedEditingMode'];var ai=class extends _0x2dd53f{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf20f34){super(_0xf20f34),this['result']='end',_0xf20f34['editing']['view']['_overlayModeHint']='auto',_0xf20f34['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},hi=class extends _0x2dd53f{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt,xt];}constructor(_0x426768){if(super(_0x426768),!this['editor']['config']['get']('revisionHistory'))throw new _0x1f314d('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x39b33e=>this['_showRevisionViewer']({..._0x39b33e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x294200=>this['_closeRevisionViewer'](_0x294200)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1f4008=>this['_restoreRevision'](_0x1f4008)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x1cfc1e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x1cfc1e;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x403719){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x403719);}getRevision(_0x4ce4fc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4ce4fc);}getRevisions(_0x496eaf){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x496eaf||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x5823b5=this['editor'],_0x5e98af=_0x5c59b1(_0x5823b5,ri),_0x10e025=_0x5823b5['plugins']['get']('RevisionTracker'),_0x4a5c83=_0x5823b5['plugins']['get'](_0x3002ea)['users'];return _0x5e98af['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5e98af['lazyRoots'],(_0x5e98af['plugins']['push'](ai,Ht,Gt,class RevisionViewerInit extends _0x2dd53f{static get requires(){return[Ht,_0x3002ea];}init(){const _0x30de57=this['editor']['plugins']['get'](_0x3002ea);for(const _0x55d3df of _0x4a5c83)_0x55d3df['isAnonymous']||_0x30de57['getUser'](_0x55d3df['id'])||_0x30de57['addUser'](_0x55d3df);const _0x43e397=_0x10e025['repository']['getRevisions']();let _0x368871=null;const _0x2a12a3=this['editor']['plugins']['get']('RevisionViewer');if(_0x2a12a3['adapter']=_0x10e025['adapter'],_0x2a12a3['bind']('isEnabled')['to'](_0x10e025),_0x5823b5['plugins']['has']('CommentsRepository')){const _0x58691e=_0x5823b5['plugins']['get']('CommentsRepository');_0x2a12a3['_getVisibleCommentThreadIds']=()=>new Set(_0x58691e['getCommentThreads']()['filter'](_0x5ce51f=>!_0x5ce51f['isResolved'])['map'](_0x38a20d=>_0x38a20d['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x5823b5,'isReadOnly',_0x23584f=>!_0x23584f);for(const _0x33ea7c of _0x43e397){const _0x3d2b45=null===_0x33ea7c['creator'];if(_0x3d2b45&&_0x33ea7c['toVersion']===_0x33ea7c['fromVersion'])continue;const _0xa75a14=_0x33ea7c['toJSON']();_0x2a12a3['addRevisionData'](_0xa75a14,(_0x4719c2,_0x2eb5a0,_0x231349)=>{if(_0x3d2b45){if(_0x368871)_0x368871['_update'](_0x4719c2,_0x2eb5a0);else{if(!_0x2eb5a0){const _0x11f5b5=_0x231349['toJSON']();_0x11f5b5['id']=_0x1cb26b(),_0x10e025['saveRevision'](_0x11f5b5,_0x231349['toVersion'])['then'](_0x3894c7=>{_0x368871=_0x3894c7;});}}}else _0x33ea7c['_update'](_0x4719c2,_0x2eb5a0);});}}},ti),_0x5e98af);}['_enhanceShowRevisionViewerCallback'](){const _0x2e0af8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4074f7=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4074f7['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x39a760=this['editor']['plugins']['get']('Dialog');_0x39a760['isOpen']&&_0x39a760['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x491ff0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x18a65b of _0x491ff0)_0x18a65b['class']=_0x18a65b['class']?_0x18a65b['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x13bad0=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x13bad0&&_0x13bad0['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x231c54=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x231c54&&_0x231c54['setAttribute']('tabindex','-1');}}const _0x4ce400=this['_getRevisionViewerEditorConfig']();return _0x2e0af8(_0x4ce400)['then'](_0x1f9ed6=>(this['_viewerEditor']=_0x1f9ed6,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'),_0x1f9ed6))['catch'](_0x51ad90=>(console['error'](_0x51ad90),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3eb659=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 _0x119923=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x6b8bb3 of _0x119923)_0x6b8bb3['class']='ck-tab-panel_disabled'===_0x6b8bb3['class']?'':_0x6b8bb3['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x547308=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x547308&&_0x547308['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x42def8=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x42def8&&_0x42def8['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3eb659(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4b42a6=this['editor']['plugins']['get']('Annotations');_0x4b42a6['refreshVisibility'](),_0x4b42a6['refreshPositioning']();}});});}['_showRevisionViewer'](_0x128e6d){const _0x380e0b=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x456e00=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4dbf8b=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return oi['create'](_0x4dbf8b,_0x128e6d)['then'](_0x2c2186=>(_0x456e00['style']['display']='block',_0x380e0b['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2c2186));}['_closeRevisionViewer'](_0x4218be){const _0x19f512=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x19f512['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4218be['destroy']();}async _restoreRevision(_0xb0725){const _0x39f9cd=this['editor'],_0x50cabb=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xaf4efd=_0x39f9cd['plugins']['get']('RevisionTracker'),_0x4fb6aa=_0x39f9cd['plugins']['get']('RevisionHistoryUtils'),_0xd169bf=_0x50cabb['repository']['getRevision'](_0xb0725);let _0x1c2655,_0x46aa3b,_0x30a6dd;try{await _0x4fb6aa['loadRevisionData'](_0xd169bf,this['adapter']),_0x1c2655=_0x4fb6aa['getRevisionDocumentData'](_0xd169bf),_0x46aa3b=_0x4fb6aa['getRevisionRootsAttributes'](_0xd169bf);}catch(_0x56a189){return void console['error'](_0x56a189);}_0x39f9cd['model']['change'](_0x3b39d0=>{for(const _0xe782ec of Array['from'](_0x39f9cd['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x3b39d0['removeMarker'](_0xe782ec);}),_0x50cabb['isReady']=!0x1,_0x39f9cd['model']['enqueueChange'](_0x5e0c62=>{_0x5e0c62['setSelection'](null),_0x5e0c62['removeSelectionAttribute'](_0x39f9cd['model']['document']['selection']['getAttributeKeys']());const _0x2a04cd=Object['keys'](_0x1c2655);for(const _0x287c4a of _0x39f9cd['model']['document']['roots'])'$graveyard'!=_0x287c4a['rootName']&&_0x287c4a['isAttached']()&&!_0x2a04cd['includes'](_0x287c4a['rootName'])&&_0x5e0c62['detachRoot'](_0x287c4a);for(const _0x41c6ed of _0x2a04cd){let _0x4dd12b=_0x39f9cd['model']['document']['getRoot'](_0x41c6ed);if(!_0x4dd12b||!_0x4dd12b['isAttached']()){const _0xa7308f=_0xd169bf['diffData']?.[_0x41c6ed]?.['rootElementName']||'$root';_0x4dd12b=_0x5e0c62['addRoot'](_0x41c6ed,_0xa7308f);}const _0x21719f=_0x46aa3b[_0x41c6ed],_0x52fd23=Object['keys'](_0x21719f),_0xb51f8f=_0x1c2655[_0x41c6ed];for(const _0x471520 of _0x4dd12b['getAttributeKeys']())_0x52fd23['includes'](_0x471520)||_0x5e0c62['removeAttribute'](_0x471520,_0x4dd12b);for(const _0x4f3e6e of _0x52fd23)_0x5e0c62['setAttribute'](_0x4f3e6e,_0x46aa3b[_0x41c6ed][_0x4f3e6e],_0x4dd12b);_0x5e0c62['remove'](_0x5e0c62['createRangeIn'](_0x4dd12b)),_0x5e0c62['insert'](_0x39f9cd['data']['parse'](_0xb51f8f,_0x4dd12b),_0x4dd12b,0x0);}});const _0x3a4a1a=Rt(_0x39f9cd['locale'],'Restored');if(_0xd169bf['name'])_0x30a6dd=-0x1==_0xd169bf['name']['indexOf'](_0x3a4a1a)?_0x3a4a1a+':\x20'+_0xd169bf['name']:_0xd169bf['name'];else _0x30a6dd=_0x3a4a1a+':\x20'+(_0xd169bf['createdAt']['toLocaleDateString'](_0x39f9cd['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xd169bf['createdAt']['toLocaleTimeString'](_0x39f9cd['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xaf4efd['saveRevision']({'name':_0x30a6dd}),_0x50cabb['isReady']=!0x0,_0x39f9cd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Lt as RestoreRevisionCommand,pt as Revision,hi as RevisionHistory,xt as RevisionHistoryUI,bt as RevisionHistoryUtils,kt as RevisionTracker,Ht as RevisionViewer,oi as RevisionViewerEditor,ai as RevisionViewerIntegration,jt as RevisionViewerLoadingOverlay,Gt as RevisionViewerUI,yt as RevisionsRepository,ti as RevisionsSidebar,Ft as ShowChangeCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-revision-history",
|
|
3
|
-
"version": "48.5.0-alpha.
|
|
3
|
+
"version": "48.5.0-alpha.4",
|
|
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.5.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-collaboration-core": "48.5.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-comments": "48.5.0-alpha.
|
|
40
|
-
"@ckeditor/ckeditor5-core": "48.5.0-alpha.
|
|
41
|
-
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.
|
|
42
|
-
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.
|
|
43
|
-
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.
|
|
44
|
-
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.
|
|
45
|
-
"@ckeditor/ckeditor5-widget": "48.5.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-autosave": "48.5.0-alpha.4",
|
|
38
|
+
"@ckeditor/ckeditor5-collaboration-core": "48.5.0-alpha.4",
|
|
39
|
+
"@ckeditor/ckeditor5-comments": "48.5.0-alpha.4",
|
|
40
|
+
"@ckeditor/ckeditor5-core": "48.5.0-alpha.4",
|
|
41
|
+
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.4",
|
|
42
|
+
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.4",
|
|
43
|
+
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.4",
|
|
44
|
+
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.4",
|
|
45
|
+
"@ckeditor/ckeditor5-widget": "48.5.0-alpha.4",
|
|
46
46
|
"@types/luxon": "3.6.2",
|
|
47
47
|
"es-toolkit": "1.45.1",
|
|
48
48
|
"luxon": "3.6.1"
|