@ckeditor/ckeditor5-revision-history 49.0.0-alpha.4 → 49.0.0-alpha.5
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
|
-
_0x5a3a2d();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x7c0c58){super(),this['id']=_0x7c0c58['id']||_0x37fc40(),this['creator']=_0x7c0c58['creator']||null,this['authors']=_0x7c0c58['authors']||[],this['diffData']=_0x7c0c58['diffData']||null,this['toVersion']=_0x7c0c58['toVersion']||0x0,this['fromVersion']=_0x7c0c58['fromVersion']||0x0,this['set']('name',_0x7c0c58['name']||''),this['set']('createdAt',_0x7c0c58['createdAt']||new Date()),this['set']('attributes',_0x7c0c58['attributes']||{});}setName(_0x22b577){this['_update']({'name':_0x22b577});}setAttribute(_0x36ad87,_0xc9fb13){const _0x56273b=_0x1ebade(this['attributes']);_0x5a115b(_0x56273b,_0x36ad87,_0xc9fb13),this['_update']({'attributes':_0x56273b});}removeAttribute(_0x431ecf){const _0x7476a1=_0x1ebade(this['attributes']);_0x125751(_0x7476a1,_0x431ecf),this['_update']({'attributes':_0x7476a1});}_update(_0x448eff,_0x5141ca=!0x1){let _0x6e3b8c=!0x1;const _0x3adc2a={'id':this['id']};for(const _0x4ef0a3 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x37eb00=_0x448eff[_0x4ef0a3];void 0x0!==_0x37eb00&&_0x37eb00!==this[_0x4ef0a3]&&(this[_0x4ef0a3]=_0x37eb00,_0x3adc2a[_0x4ef0a3]=_0x37eb00,_0x6e3b8c=!0x0);}_0x6e3b8c&&(_0x3adc2a['authors']&&(_0x3adc2a['authorsIds']=_0x3adc2a['authors']['map'](_0x256489=>_0x256489['id']),delete _0x3adc2a['authors']),this['fire']('_update',_0x3adc2a,_0x5141ca));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x51cfa9=>_0x51cfa9['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x20938f{['_revisions'];static get requires(){return[_0x410d48];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x3c9e87){super(_0x3c9e87),this['_revisions']=new _0x374b4a();}afterInit(){!async function(_0x52b406){const _0x463341='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x42006f=0xeb829,_0x33cc5a=0x79770,_0x30c9d0={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x54d41a(_0x5c8cc4){const _0x1d0a00=new window['Promise'](_0x455e6c=>{_0x5c8cc4['once']('ready',_0x455e6c);}),_0x43a225=window['Date']['now'](),_0x1d3d4d=_0x5c8cc4['config']['get']('licenseKey');async function _0x5a2060(){let _0x3b4b68,_0x1ee3f8=null,_0x3cffc9=null;try{return'GPL'==_0x1d3d4d?'NotAllowed':(_0x3b4b68=_0x2e243e(),_0x3b4b68?(_0x3b4b68['usageEndpoint']&&(_0x3cffc9=_0x433fbe(_0x3b4b68['usageEndpoint'],_0x3b4b68['jti'])),await _0x200701()?_0x1629e0()?_0x6bb42f()?'Expired':_0xb70dc5()?('evaluation'==_0x3b4b68['licenseType']&&(_0x1ee3f8=_0x37cc98('EvaluationLimit')),await _0x4f4703()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x6bb42f(){const _0x37c320=['evaluation','trial']['includes'](_0x3b4b68['licenseType'])?_0x43a225/0x3e8:0xe10*_0x33cc5a;return _0x3b4b68['exp']<_0x37c320;}function _0x1629e0(){const _0x5dd680=_0x3b4b68['features'];if(!_0x5dd680)return!0x1;if(_0x5dd680['includes']('*'))return!0x0;if(_0x5dd680['includes']('RH'))return!0x0;if(_0x5dd680['includes']('RRH')){if(_0x2dd851())return!0x0;if(_0x56a0b3()||_0x3a2018())return!0x0;}return!0x1;}function _0xb70dc5(){const _0x12f4cc=_0x3b4b68['licensedHosts'];if(!_0x12f4cc||0x0==_0x12f4cc['length'])return!0x0;const {hostname:_0x1871a1}=new URL(window['location']['href']);if(_0x12f4cc['includes'](_0x1871a1))return!0x0;const _0x39089d=_0x1871a1['split']('.');return _0x12f4cc['filter'](_0x62574f=>_0x62574f['includes']('*'))['map'](_0x3aaa3d=>_0x3aaa3d['split']('.'))['filter'](_0x25eeba=>_0x25eeba['length']<=_0x39089d['length'])['map'](_0x490cde=>Array(_0x39089d['length']-_0x490cde['length'])['fill']('*'===_0x490cde[0x0]?'*':'')['concat'](_0x490cde))['some'](_0x2761ab=>_0x39089d['every']((_0x11aa0a,_0x1ecc72)=>_0x2761ab[_0x1ecc72]===_0x11aa0a||'*'===_0x2761ab[_0x1ecc72]));}function _0x4f4703(){return _0x1ee3f8&&_0x3cffc9?new window['Promise']((_0x288c6e,_0xb15ab6)=>{_0x1ee3f8['then'](_0x288c6e,_0xb15ab6),_0x3cffc9['then'](_0x5e9812=>{'Valid'!=_0x5e9812&&_0x288c6e(_0x5e9812);},_0xb15ab6);}):_0x1ee3f8||_0x3cffc9||'Valid';}}function _0x433fbe(_0xe09679,_0x59bedd){return new window['Promise'](_0x59c5cf=>{if(_0x122fbe())return _0x59c5cf('Valid');_0x16d9f6(),_0x5c8cc4['decorate']('_sendUsageRequest');let _0x10c4ee=!0x1;const _0x254ac0=_0x37fc40();function _0x59d9af(_0x183d39){return!!_0x183d39&&('object'==typeof _0x183d39||'function'==typeof _0x183d39)&&'function'==typeof _0x183d39['then']&&'function'==typeof _0x183d39['catch'];}function _0x485818(_0x1ef5fc){_0xfc8328(_0x1ef5fc)['then'](_0x2e7d52=>_0x2e7d52&&'ok'==_0x2e7d52['status']?_0x17b4e2(_0x2f9933(_0x254ac0+_0x59bedd))!=_0x2e7d52['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x3e04c3=>(_0x4655b6(),_0x3e04c3),()=>{const _0x5bc6d3=_0x18525d();return null==_0x5bc6d3?(_0x4655b6(),'Valid'):_0x43a225-_0x5bc6d3>0x240c8400?'UsageLimit':'Valid';})['then'](_0x59c5cf)['catch'](()=>{_0x59c5cf('UsageLimit');});const _0x1d8a0f=0x36ee80;function _0x4655b6(){const _0x3eee86='llct-'+_0x17b4e2(_0x2f9933(_0xe09679)),_0x37ebbd=_0x38476d(_0x17b4e2(window['Math']['ceil'](_0x43a225/_0x1d8a0f)));window['localStorage']['setItem'](_0x3eee86,_0x37ebbd);}function _0x18525d(){const _0x4cb2bc='llct-'+_0x17b4e2(_0x2f9933(_0xe09679)),_0x308634=window['localStorage']['getItem'](_0x4cb2bc);return _0x308634?window['parseInt'](_0x38476d(_0x308634),0x10)*_0x1d8a0f:null;}function _0xfc8328(_0x35cde8){return new window['Promise']((_0x3797ad,_0x588b10)=>{_0x35cde8['then'](_0x3797ad,_0x588b10),window['setTimeout'](_0x588b10,0x1d4c0);});}}_0x5c8cc4['on']('_sendUsageRequest',(_0x1a2359,_0xe36125)=>{if(_0xe36125[0x0]!=_0xe09679)return _0x59c5cf('UsageLimit');_0xe36125[0x1]={..._0xe36125[0x1],'requestId':_0x254ac0};},{'priority':'high'}),_0x5c8cc4['on']('_sendUsageRequest',_0x44ac82=>{_0x59d9af(_0x44ac82['return'])&&(_0x10c4ee=!0x0,_0x485818(_0x44ac82['return']));},{'priority':'low'}),_0x1d0a00['then'](()=>{_0x10c4ee||_0x59c5cf('UsageLimit');});});function _0x122fbe(){return'auto'==_0x5c8cc4['editing']['view']['_overlayModeHint'];}function _0x16d9f6(){_0x5c8cc4['editing']['view']['_overlayModeHint']='auto';}}function _0x37cc98(_0x20c562){const _0x242809=[new window['Promise'](_0x4dafbe=>setTimeout(_0x4dafbe,0x93ecc)),_0x1d0a00['then'](()=>new window['Promise'](_0x2f6b22=>{const _0x420b6c=0x7,_0x2af553=_0x52b406['_revisions'];function _0xca1d91(){_0x2af553['length']>=_0x420b6c&&_0x2f6b22();}_0xca1d91(),_0x2af553['on']('add',_0xca1d91);})),new window['Promise'](_0x3a8613=>{function _0x28b294(){for(const _0x53d308 in window)if(window['Number']['isNaN'](window['Number'](_0x53d308))&&window[_0x53d308]==_0x42006f)return _0x3a8613();'destroyed'!=_0x5c8cc4['state']&&window['setTimeout'](_0x28b294,0x1388);}_0x553d62('RevisionViewer')&&_0x28b294();})];return window['Promise']['race'](_0x242809)['then'](()=>_0x20c562);}async function _0x3d5542(){if(await _0x1d0a00,_0x553d62('RevisionViewer')){const _0x52363f=_0x52b406['getRevision'](0x0),_0xc96cb3=_0x52b406['getEarlierVisibleRevision'](_0x52363f['id']),_0x1f3043=_0x1a0003('RevisionViewer');return await _0x1f3043['compare'](_0x52363f['id'],_0xc96cb3?_0xc96cb3['id']:null,!0x0),_0x1f3043['unbind']('isEnabled'),_0x1f3043['isEnabled']=!0x1,_0x1f3043['compare']=_0x2cd6f0,void(_0x1f3043['_getDiff']=_0x2cd6f0);}if(_0x553d62('RevisionTracker')){const _0xfe23e3=_0x1a0003('RevisionTracker');_0xfe23e3['unbind']('isEnabled'),_0xfe23e3['isEnabled']=!0x1,_0xfe23e3['update']=_0x2cd6f0,_0xfe23e3['saveRevision']=_0x2cd6f0;}_0x5c8cc4['model']['change']=_0x2cd6f0,_0x5c8cc4['model']['enqueueChange']=_0x2cd6f0,_0x5c8cc4['enableReadOnlyMode']('model');}function _0x2dd851(){return _0x553d62('WebSocketGateway')&&'connected'==_0x1a0003('WebSocketGateway')['state'];}function _0x56a0b3(){return _0x553d62('RevisionViewerIntegration');}function _0x3a2018(){return _0x553d62('TrackChangesDataGetter');}function _0xc898(_0x5ae58d){const _0x2091ed=_0x1e79c5();_0x5c8cc4[_0x2091ed]='revisionHistoryLicenseKey'+_0x5ae58d,_0x5ae58d['endsWith']('Limit')&&(window[_0x1e79c5()]=_0x42006f),'Valid'!=_0x5ae58d&&_0x3d5542();}function _0x1e79c5(){const _0x1a073f=window['String'](window['performance']['now']())['replace']('.','');let _0x185af0='N';for(let _0x520e63=0x0;_0x520e63<_0x1a073f['length'];_0x520e63+=0x2){let _0x378b50=window['parseInt'](_0x1a073f['substring'](_0x520e63,_0x520e63+0x2));_0x378b50>=0x3e&&(_0x378b50-=0x3e),_0x185af0+=_0x463341[_0x378b50];}return _0x185af0;}function _0x2e243e(){const _0x33e78a=_0x1d3d4d['split']('.');if(0x3!=_0x33e78a['length'])return null;return _0xf9df7d(_0x33e78a[0x1]);function _0xf9df7d(_0x1a8b1a){const _0x9986ce=_0x408944(_0x1a8b1a);return _0x9986ce&&_0x103c3e()?_0x9986ce:null;function _0x103c3e(){const _0x2f1b50=_0x9986ce['jti'],_0x805db4=window['parseInt'](_0x2f1b50['substring'](_0x2f1b50['length']-0x8),0x10),_0x46ca98={..._0x9986ce,'jti':_0x2f1b50['substring'](0x0,_0x2f1b50['length']-0x8)};return delete _0x46ca98['vc'],_0x2f9933(_0x46ca98)==_0x805db4;}}}async function _0x200701(){let _0x109edd=!0x0;try{const [_0x3dc63a,_0x331650,_0x67830e]=_0x1d3d4d['split']('.');return _0x2eeef8(_0x3dc63a),await _0x31f8b9(_0x3dc63a,_0x331650,_0x67830e),_0x109edd;}catch{return!0x1;}function _0x2eeef8(_0x2c5a40){const _0x28706c=_0x408944(_0x2c5a40);_0x28706c&&'ES256'==_0x28706c['alg']||(_0x109edd=!0x1);}async function _0x31f8b9(_0x1b0e4a,_0x1bb119,_0x37442b){const _0x4586ea=window['Uint8Array']['from'](_0x1143cd(_0x37442b),_0x3ae863=>_0x3ae863['charCodeAt'](0x0)),_0x258b2e=new window['TextEncoder']()['encode'](_0x1b0e4a+'.'+_0x1bb119),_0x3d91d3=window['crypto']['subtle'];if(!_0x3d91d3)return;const _0x3ee2dd=await _0x3d91d3['importKey']('jwk',_0x30c9d0,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3d91d3['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3ee2dd,_0x4586ea,_0x258b2e)||(_0x109edd=!0x1);}}function _0x408944(_0x1ca50a){return _0x1ca50a['startsWith']('ey')?JSON['parse'](_0x1143cd(_0x1ca50a)):null;}function _0x1143cd(_0x18732e){return window['atob'](_0x18732e['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2f9933(_0x14b425){let _0xbe489=0x1505;function _0x5b5f0a(_0x1e8cb8){for(let _0x3e56c4=0x0;_0x3e56c4<_0x1e8cb8['length'];_0x3e56c4++){const _0x2f409c=_0x1e8cb8['charCodeAt'](_0x3e56c4);_0xbe489=(_0xbe489<<0x5)+_0xbe489+_0x2f409c,_0xbe489&=_0xbe489;}}function _0x1fc405(_0x4521ac){Array['isArray'](_0x4521ac)?_0x4521ac['forEach'](_0x1fc405):_0x4521ac&&'object'==typeof _0x4521ac?Object['entries'](_0x4521ac)['sort']()['forEach'](([_0x417d84,_0x2a691e])=>{_0x5b5f0a(_0x417d84),_0x1fc405(_0x2a691e);}):_0x5b5f0a(window['String'](_0x4521ac));}return _0x1fc405(_0x14b425),_0xbe489>>>0x0;}function _0x17b4e2(_0x2ffe7a){return _0x2ffe7a['toString'](0x10)['padStart'](0x8,'0');}function _0x38476d(_0x3b0105){return _0x3b0105['split']('')['reverse']()['join']('');}function _0x553d62(_0x47bf54){return _0x5c8cc4['plugins']['has'](_0x47bf54);}function _0x1a0003(_0x63d93b){return _0x5c8cc4['plugins']['get'](_0x63d93b);}function _0x2cd6f0(){}_0xc898(await _0x5a2060());}_0x54d41a(_0x52b406['editor']);}(this);}createRevision(_0x48b870){const _0x1a9071=this['editor']['plugins']['get']('Users');return new yt({'id':_0x48b870['id'],'name':_0x48b870['name'],'creator':_0x48b870['creatorId']?_0x1a9071['getUser'](_0x48b870['creatorId']):null,'diffData':_0x48b870['diffData']||_0x48b870['data'],'authors':_0x48b870['authorsIds']['map'](_0x5ac76f=>_0x1a9071['getUser'](_0x5ac76f)),'createdAt':new Date(_0x48b870['createdAt']),'attributes':_0x48b870['attributes'],'fromVersion':_0x48b870['fromVersion'],'toVersion':_0x48b870['toVersion']});}['addRevision'](_0xbce82d,_0x169e4a=0x0){this['_revisions']['add'](_0xbce82d,_0x169e4a);}getRevision(_0x14f708){return this['_revisions']['get'](_0x14f708);}getRevisions(_0x59505a={'toJSON':!0x1}){const _0xc65675=Array['from'](this['_revisions']);return _0xc65675['reverse'](),_0x59505a['toJSON']?_0xc65675['map'](_0x514d77=>_0x514d77['toJSON']()):_0xc65675;}getIndex(_0x2b918a){return this['_revisions']['getIndex'](_0x2b918a);}getEarlierVisibleRevision(_0x1cc6d3){const [,_0x286c09]=this['getRevisionsIterator'](_0x1cc6d3,{'direction':'earlier'});return _0x286c09;}getLaterVisibleRevision(_0x2641e4){const [,_0x2a9926]=this['getRevisionsIterator'](_0x2641e4,{'direction':'later'});return _0x2a9926;}getRevisionsInDiff(_0x37afde){const _0x22e2cb=[];for(const _0x123ec2 of this['getRevisionsIterator'](_0x37afde['newRevisionId']))if(_0x22e2cb['push'](_0x123ec2),_0x123ec2['id']===_0x37afde['oldRevisionId'])break;return _0x22e2cb;}*getRevisionsIterator(_0x2c80d9,{direction:_0x3fcc5f='earlier',filter:_0x5ad91c=()=>!0x0}={}){const _0x266553='earlier'===_0x3fcc5f?0x1:-0x1;let _0x17c47f=this['_revisions']['get'](_0x2c80d9),_0x201419=this['getIndex'](_0x17c47f);for(yield _0x17c47f;_0x17c47f;){if(_0x201419+=_0x266553,_0x17c47f=this['getRevision'](_0x201419),!_0x17c47f)return;_0x5ad91c(_0x17c47f)&&(yield _0x17c47f);}}},Rt=class extends _0x20938f{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0xf13054,'c'],[_0x4c2c4a,'a'],[_0x2cb063,'e'],[_0x1165c8,'r'],[_0x171be4,'u']]);_typeCharToViewClass=new Map([['c',_0xf13054],['a',_0x4c2c4a],['e',_0x2cb063],['r',_0x1165c8],['u',_0x171be4]]);async loadRevisionData(_0x411740,_0xa33c1d){if(_0x411740['diffData']||!_0xa33c1d)return;const _0x518dd4=this['editor']['config']['get']('collaboration.channelId');_0x411740['diffData']=(await _0xa33c1d['getRevision']({'channelId':_0x518dd4,'revisionId':_0x411740['id']}))['diffData'];}getRevisionDocumentData(_0x17ed0f){const _0x499611={};for(const _0x16f4b4 in _0x17ed0f['diffData']){if(_0x17ed0f['diffData'][_0x16f4b4]['attachChange']&&!_0x17ed0f['diffData'][_0x16f4b4]['attachChange']['isAttached'])continue;const _0x4a5522=this['_removeRevisionMarkers'](JSON['parse'](_0x17ed0f['diffData'][_0x16f4b4]['insertions'])),_0x14e891=this['editor']['editing']['view']['document'],_0x3ccd03=new _0x3e0e5f(_0x14e891,_0x4a5522['map'](_0x253b8b=>this['_getViewFromDiffObj'](_0x253b8b,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x499611[_0x16f4b4]=this['editor']['data']['processor']['toData'](_0x3ccd03),this['editor']['data']['processor']['useFillerType']('default');}return _0x499611;}getRevisionRootsAttributes(_0x393108){const _0x108c59={};for(const _0xb2552d in _0x393108['diffData'])_0x393108['diffData'][_0xb2552d]['attachChange']&&!_0x393108['diffData'][_0xb2552d]['attachChange']['isAttached']||(_0x108c59[_0xb2552d]=_0x393108['diffData'][_0xb2552d]['attributesAfter']||{});return _0x108c59;}getRevisionRootsModelElements(_0x296684){const _0x134c6e={};for(const _0x350f83 in _0x296684['diffData']){if(_0x296684['diffData'][_0x350f83]['attachChange']&&!_0x296684['diffData'][_0x350f83]['attachChange']['isAttached'])continue;const _0x54d08f=_0x296684['diffData'][_0x350f83]['rootElementName'];_0x54d08f&&(_0x134c6e[_0x350f83]=_0x54d08f);}return _0x134c6e;}_getTypeCharForViewElement(_0x131b5f){return this['_viewClassToTypeChar']['get'](_0x131b5f['constructor']);}_getViewFromDiffObj(_0x147271,_0xb2615d){const _0x33fe0b=this['editor']['editing']['view']['document'];if('string'==typeof _0x147271)return new _0x2d3da(_0x33fe0b,_0x147271);{let _0x569196,_0x542bf4;_0x542bf4='u'==_0x147271['type']||'r'==_0x147271['type']?[]:_0x147271['children']['map'](_0x30b8b9=>this['_getViewFromDiffObj'](_0x30b8b9,_0xb2615d));const _0x21d192=this['_typeCharToViewClass']['get'](_0x147271['type'])||_0x30ba26,_0x5ac358=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x569196=new _0x21d192(_0x33fe0b,_0x147271['name'],_0x147271['attributes'],_0x542bf4),'u'==_0x147271['type']&&_0x147271['children'][0x0]){const _0x18653d=_0x147271['children'][0x0];if(_0x569196['render']=function(_0x5b8c99){const _0x203c6e=_0x5b8c99['createElement']('div');return _0x203c6e['innerHTML']=_0x17b295(_0x18653d),_0x203c6e['childNodes'][0x0];},_0xb2615d){const _0x46e25b=new _0x3e0e5f(_0x33fe0b);_0x46e25b['_appendChild'](_0x569196);const _0x23d644=Array['from'](_0x5ac358['viewChildrenToDom'](_0x46e25b,{'bind':!0x1})),_0x4dd9cd=_0x5ac358['domDocument']['createElement']('div');_0x4dd9cd['append'](..._0x23d644),_0x569196=Array['from'](_0x5ac358['domChildrenToView'](_0x4dd9cd))[0x0];}}else{if('r'==_0x147271['type']&&_0x147271['children'][0x0]){const _0x52da84=_0x147271['children'][0x0];if(_0x569196['render']=function(_0x25a367){_0x25a367['innerHTML']=_0x17b295(_0x52da84);},_0xb2615d){const _0x3614d2=new _0x3e0e5f(_0x33fe0b);_0x3614d2['_appendChild'](_0x569196);const _0x4b54fd=Array['from'](_0x5ac358['viewChildrenToDom'](_0x3614d2,{'bind':!0x1})),_0x24ff9f=_0x5ac358['domDocument']['createElement']('div');_0x24ff9f['append'](..._0x4b54fd);const _0x462d49=Array['from'](_0x5ac358['domChildrenToView'](_0x24ff9f));_0x462d49['length']>0x1?_0x569196['_appendChild'](_0x462d49):_0x569196=_0x462d49[0x0];}}}if(_0x147271['customProperties']){for(const [_0x533115,_0x85dcd2]of _0x147271['customProperties'])_0x569196['_setCustomProperty'](_0x533115,_0x85dcd2);}const _0x231927=void 0x0===_0x147271['fillerOffset']?null:_0x147271['fillerOffset'];return null!==_0x231927&&(_0x569196['getFillerOffset']=()=>_0x231927),_0x569196;}}_makeModelFromViewString(_0x290570,_0x1334cf){const _0xed911f=JSON['parse'](_0x290570),_0x444b08=this['editor']['editing']['view']['document'],_0x590370=new _0x3e0e5f(_0x444b08,_0xed911f['map'](_0x42a87c=>this['_getViewFromDiffObj'](_0x42a87c,!0x0))),_0x3613e7=this['editor']['data']['toModel'](_0x590370,_0x1334cf);return _0x3613e7['name']=_0x1334cf,_0x3613e7;}['_removeRevisionMarkers'](_0x471c03){return(_0x471c03=_0x471c03['filter'](_0x59fcd0=>!_0x59fcd0['name']||'revision-start'!==_0x59fcd0['name']&&'revision-end'!==_0x59fcd0['name']))['forEach'](_0x173152=>{'string'!=typeof _0x173152&&(_0x173152['children']=this['_removeRevisionMarkers'](_0x173152['children']),_0x173152['attributes']=_0x173152['attributes']['filter'](_0x404be9=>!_0x404be9[0x0]['startsWith']('data-revision-')));}),_0x471c03;}};function kt(_0x19b376,_0x30f2f6,_0xf8513a){const t=_0x19b376['t'];switch(_0x30f2f6){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'},_0xf8513a);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xf8513a);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'},_0xf8513a);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0xf8513a);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0xf8513a);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x20938f{['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[_0x410d48,bt,Rt,_0x10cae8];}constructor(_0x108e1e){super(_0x108e1e),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1203a4=_0x37fc40();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1203a4},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 _0x262033=this['repository']['getRevision'](0x0),_0xf53642=_0x262033&&null===_0x262033['creator']?_0x262033:null;if(this['_continueCurrentRevision']=!!_0xf53642&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x53dd4a=this['_source']['getCurrentRevisionId'](),_0x1c0352=this['repository']['getRevision'](_0x53dd4a);if(_0x1c0352)this['_startingVersion']=_0x1c0352['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x2a7321=this['_source']['history']['_operations']['find'](_0x4bfd08=>!_0x4bfd08['_isInit']),_0x272469=_0x2a7321?_0x2a7321['baseVersion']:this['_source']['history']['version'];_0x262033?(_0x262033['toVersion']<_0x272469&&_0x262033['_update']({'toVersion':_0x272469}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xf53642['id'],this['_startingVersion']=_0xf53642['fromVersion']):(this['_startingVersion']=_0x262033['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x272469,this['_continueCurrentRevision']=!0x1);}}else _0xf53642&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xf53642['toVersion'],this['editor']['model']['document']['history']['version']),_0xf53642['fromVersion']===_0xf53642['toVersion']?(0x0!==_0xf53642['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xf53642['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xf53642['id'],this['_startingVersion']=_0xf53642['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',_0x4bee55=>!_0x4bee55),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x36dd0e=[this['editor']];for(const _0x2ec073 of _0x36dd0e){let _0x1e7049;for(const _0x1f9cd2 in _0x2ec073){const _0x503b06=_0x1f9cd2,_0x4d712b=_0x2ec073[_0x503b06];if('revisionHistoryLicenseKeyValid'==_0x4d712b||'revisionHistoryLicenseKeyInvalid'==_0x4d712b||'revisionHistoryLicenseKeyExpired'==_0x4d712b||'revisionHistoryLicenseKeyDomainLimit'==_0x4d712b||'revisionHistoryLicenseKeyNotAllowed'==_0x4d712b||'revisionHistoryLicenseKeyEvaluationLimit'==_0x4d712b||'revisionHistoryLicenseKeyUsageLimit'==_0x4d712b){delete _0x2ec073[_0x503b06],_0x1e7049=_0x4d712b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1e7049&&_0x2ec073['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1e7049&&_0x2ec073['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1e7049&&_0x2ec073['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1e7049&&_0x2ec073['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1e7049&&_0x2ec073['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1e7049&&_0x2ec073['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x2f3e3b=this['repository']['getRevision'](0x0),_0x172189=await this['getRevisionDocumentData'](_0x2f3e3b),_0x14faca=await this['getRevisionRootsAttributes'](_0x2f3e3b),_0x19c6f8=this['_utils']['getRevisionRootsModelElements'](_0x2f3e3b);this['_replaceEditorDataWithRevisionData'](_0x172189,_0x14faca,_0x19c6f8);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x126c7b){this['_source']=_0x126c7b;}async update(){const _0x5dce57=await this['_source']['getLatestVersion']();if(_0x5dce57>this['currentRevision']['toVersion']){await this['_loadState']();const _0x8860e0=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5dce57});_0x8860e0['authors']=_0x8860e0['authorsIds']['map'](_0x1a47b8=>this['editor']['plugins']['get']('Users')['getUser'](_0x1a47b8)),this['currentRevision']['_update'](_0x8860e0);}}async['saveRevision'](_0x3b90c5={},_0x976d2=null){const _0x2ab4f0=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x976d2>this['currentRevision']['toVersion']&&(_0x976d2=null),null===_0x976d2&&(_0x976d2=await this['_source']['getLatestVersion']());const _0x34f04b=this['_getFromVersion'](_0x976d2),_0x1d7da5=this['buildRevisionData']({'from':_0x34f04b,'to':_0x976d2});if(this['currentRevision']['toVersion']<_0x976d2){const _0x587abd=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x976d2,'to':_0x976d2});_0x587abd['authors']=[],_0x587abd['authorsIds']=[],_0x587abd['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x587abd,!0x0),delete _0x587abd['authors'],_0x2ab4f0['push'](_0x587abd);}const _0x4ec353={..._0x3b90c5,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x3b90c5['name']||null,'id':_0x3b90c5['id']||_0x37fc40(),..._0x1d7da5,'attributes':{..._0x3b90c5['attributes'],..._0x1d7da5['attributes']}},_0x39fa39=this['addRevisionData'](_0x4ec353);_0x2ab4f0['push'](_0x4ec353);const _0x26c565=this['repository']['getIndex'](_0x39fa39);if(0x0!==_0x26c565){const _0x38950e=this['repository']['getRevision'](_0x26c565-0x1);if(_0x38950e['fromVersion']!==_0x976d2){const _0xafed94=this['_revisionDataBuilder']['getData'](_0x976d2,_0x38950e['toVersion']),_0x1f5140={'id':_0x38950e['id'],'diffData':_0xafed94['diffData'],'authorsIds':_0xafed94['authorsIds'],'authors':_0xafed94['authorsIds']['map'](_0x2c732b=>this['editor']['plugins']['get']('Users')['getUser'](_0x2c732b)),'fromVersion':_0x976d2};this['_stampAiAttribute'](_0x1f5140,_0x38950e,!!_0xafed94['hasAIChanges']),_0x38950e===this['currentRevision']&&(_0x1f5140['createdAt']=new Date(_0x4ec353['createdAt']['getTime']()+0xa)),_0x38950e['_update'](_0x1f5140,!0x0),delete _0x1f5140['authors'],_0x2ab4f0['push'](_0x1f5140);}}if(this['adapter']){for(const _0x5e38cc of _0x2ab4f0)this['_bufferUpdate'](_0x5e38cc['id'],_0x5e38cc,!0x0);this['sendBufferedUpdates']();}return _0x39fa39;}addRevisionData(_0x57477e){const _0x2fa02a=this['repository']['createRevision'](_0x57477e);return this['adapter']&&_0x2fa02a['on']('_update',(_0x15de5d,_0x571aa4,_0x507eea)=>{_0x507eea||(this['_bufferUpdate'](_0x571aa4['id'],_0x571aa4,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2fa02a,this['_findInsertionIndex'](_0x2fa02a)),_0x2fa02a;}async getRevisionDocumentData(_0x21465b){return await this['_utils']['loadRevisionData'](_0x21465b,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x21465b);}async getRevisionRootsAttributes(_0x31c931){return await this['_utils']['loadRevisionData'](_0x31c931,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x31c931);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x53fa7f=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x10b63b=0x0;_0x10b63b<_0x53fa7f['length'];_0x10b63b++){const _0x86df9d=_0x53fa7f[_0x10b63b];let _0x231e4b=!0x1;for(const _0x1a43b6 of Object['keys'](_0x86df9d))void 0x0===_0x86df9d[_0x1a43b6]?delete _0x86df9d[_0x1a43b6]:'id'!==_0x1a43b6&&(_0x231e4b=!0x0);_0x231e4b||(_0x53fa7f[_0x10b63b]=null);}if(_0x53fa7f=_0x53fa7f['filter'](_0x59ec14=>null!==_0x59ec14),!_0x53fa7f['length'])return;for(let _0x585963=0x0;_0x585963<_0x53fa7f['length'];_0x585963++){const _0x538bb3=_0x53fa7f[_0x585963];void 0x0!==_0x538bb3['fromVersion']&&void 0x0===_0x538bb3['toVersion']&&(_0x538bb3['toVersion']=this['repository']['getRevision'](_0x538bb3['id'])['toVersion']),void 0x0!==_0x538bb3['toVersion']&&void 0x0===_0x538bb3['fromVersion']&&(_0x538bb3['fromVersion']=this['repository']['getRevision'](_0x538bb3['id'])['fromVersion']);}const _0x256958=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x53fa7f,_0x256958)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x310c4d=>{if(_0x310c4d){for(const _0x15b503 of _0x310c4d)this['setRevisionData']({'id':_0x15b503['id'],'createdAt':_0x15b503['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x13595f,_0x3e4ad,_0x4af7e4){if(_0x4af7e4===(!!_0x3e4ad&&!!_0x3e4ad['attributes']['@ai']))return;const _0x11a4b8={..._0x3e4ad?_0x3e4ad['attributes']:{},..._0x13595f['attributes']};_0x4af7e4?_0x11a4b8['@ai']=!0x0:delete _0x11a4b8['@ai'],_0x13595f['attributes']=_0x11a4b8;}buildRevisionData({revision:_0x21052=null,from:_0x47d127=null,to:_0x1c0c59=null}){_0x47d127=null!==_0x47d127?_0x47d127:_0x21052['fromVersion'],_0x1c0c59=null!==_0x1c0c59?_0x1c0c59:_0x21052['toVersion'];const _0x515d57=this['_revisionDataBuilder']['getData'](_0x47d127,_0x1c0c59),_0x363aee={'diffData':_0x515d57['diffData'],'authorsIds':_0x515d57['authorsIds'],'fromVersion':_0x47d127,'toVersion':_0x1c0c59};if(this['_stampAiAttribute'](_0x363aee,_0x21052,!!_0x515d57['hasAIChanges']),!_0x21052||_0x1c0c59!==_0x21052['toVersion']){const _0x4a560f=_0x1c0c59-0x1,_0x22a6b0=this['_source']['history']['getOperation'](_0x4a560f);_0x363aee['createdAt']=_0x22a6b0&&_0x22a6b0['createdAt']||new Date();}if(this['_loadedStateData']&&_0x47d127===this['_loadedStateData']['fromVersion']){for(const _0x50ca13 of this['_loadedStateData']['authors'])_0x363aee['authorsIds']['includes'](_0x50ca13['id'])||_0x363aee['authorsIds']['push'](_0x50ca13['id']);}return _0x363aee;}_bufferUpdate(_0x1b9653,_0x137abb,_0x1cc3a0){if(this['_bufferedUpdates']['has'](_0x1b9653)){const _0x2a0982=this['_bufferedUpdates']['get'](_0x1b9653);_0x137abb=_0x1cc3a0?{..._0x2a0982,..._0x137abb}:{..._0x137abb,..._0x2a0982};}this['_bufferedUpdates']['set'](_0x1b9653,_0x137abb);}setRevisionData(_0xdbdf1c){const _0x5d3192=this['repository']['getRevision'](_0xdbdf1c['id']);if(_0xdbdf1c['createdAt']&&(_0xdbdf1c['createdAt']=new Date(_0xdbdf1c['createdAt'])),_0xdbdf1c['authorsIds']){const _0x21d591=this['editor']['plugins']['get']('Users');_0xdbdf1c['authors']=_0xdbdf1c['authorsIds']['map'](_0x3e9b44=>_0x21d591['getUser'](_0x3e9b44));}_0x5d3192['_update'](_0xdbdf1c,!0x0);}_createInitialRevision(_0x4be21a){const _0x48a986=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x48a986)this['_initialRevisionId']=_0x48a986['id'];else{const _0x172091=!this['editor']['model']['document']['roots']['find'](_0x538ace=>this['editor']['model']['hasContent'](_0x538ace)),_0x10f3d8=this['editor']['plugins']['get']('Users')['me']['id'],_0xf3f997=kt(this['editor']['locale'],_0x172091?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4be21a,'to':_0x4be21a,'id':this['_initialRevisionId'],'name':_0xf3f997,'creatorId':_0x10f3d8});}}_createCurrentRevision(_0x1cdd67){const _0x27f978=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x27f978),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1cdd67,'to':_0x1cdd67,'id':_0x27f978,'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(_0x1b4d6c,_0x396d66,_0x270626){const _0x10cb8b={},_0x49d9ce={},_0x261cd9={},_0x47689e=this['editor']['config']['get']('roots')||{};for(const [_0x4f9ba3,_0x5640f6]of Object['entries'](_0x47689e))_0x5640f6['lazyLoad']||(_0x10cb8b[_0x4f9ba3]=_0x5640f6['initialData']??'',_0x49d9ce[_0x4f9ba3]=_0x5640f6['modelAttributes']||{},_0x5640f6['modelElement']&&(_0x261cd9[_0x4f9ba3]=_0x5640f6['modelElement']));for(const _0x640847 of this['editor']['model']['document']['getRootNames']())_0x10cb8b[_0x640847]??='',_0x49d9ce[_0x640847]??={};let _0x5a468c=!0x1;const _0x469d36=Object['keys'](_0x10cb8b),_0x2dc589=Object['keys'](_0x1b4d6c);for(const _0x1e167e of _0x469d36){if(_0x10cb8b[_0x1e167e]!==_0x1b4d6c[_0x1e167e]&&''!==_0x10cb8b[_0x1e167e]['trim']()){_0x5a468c=!0x0;break;}if(!_0x5278fa(_0x49d9ce[_0x1e167e],_0x396d66[_0x1e167e])&&Object['keys'](_0x49d9ce[_0x1e167e])['length']>0x0){_0x5a468c=!0x0;break;}const _0x7e4575=_0x261cd9[_0x1e167e],_0x3dc19c=_0x270626[_0x1e167e];if(_0x7e4575&&_0x3dc19c&&_0x7e4575!==_0x3dc19c){_0x5a468c=!0x0;break;}}_0x5a468c||(_0x5a468c=_0x2dc589['some'](_0x560492=>!this['editor']['model']['document']['getRoot'](_0x560492))),_0x5a468c&&_0x156ae5('editor-initial-data-replaced-with-revision-data',{'editorData':_0x10cb8b,'editorRootsAttributes':_0x49d9ce,'editorRootsModelElements':_0x261cd9,'revisionData':_0x1b4d6c,'revisionRootsAttributes':_0x396d66,'revisionRootsModelElements':_0x270626});for(const [_0x56c944,_0x3e932d]of Object['entries'](_0x1b4d6c))this['editor']['config']['set']('roots.'+_0x56c944+'.initialData',_0x3e932d);for(const [_0x44d051,_0x52d500]of Object['entries'](_0x396d66))this['editor']['config']['set']('roots.'+_0x44d051+'.modelAttributes',_0x52d500);const _0xdace2=this['editor']['model']['document'];for(const [_0x5debbc,_0x2574be]of Object['entries'](_0x270626)){this['editor']['config']['set']('roots.'+_0x5debbc+'.modelElement',_0x2574be);const _0x333ea1=_0xdace2['getRoot'](_0x5debbc);_0x333ea1&&_0x333ea1['name']!==_0x2574be&&(_0xdace2['roots']['remove'](_0x5debbc),_0xdace2['createRoot'](_0x2574be,_0x5debbc));}}_addPendingAction(){if(!this['_pendingAction']){const _0x372b44=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x372b44['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x535ad9){const _0x3073ee=this['repository']['getRevisions']();_0x3073ee['reverse']();let _0x52bcc6=0x0;for(;_0x52bcc6<_0x3073ee['length'];){const _0x55c92e=_0x3073ee[_0x52bcc6];if(_0x55c92e===this['currentRevision']){_0x52bcc6++;continue;}if(_0x55c92e['id']===this['_initialRevisionId'])break;const _0x31ee37=_0x535ad9['toVersion']-_0x55c92e['toVersion']||_0x535ad9['fromVersion']-_0x55c92e['fromVersion'];if(_0x31ee37>0x0)break;if(_0x31ee37<0x0)_0x52bcc6++;else{if(!_0x535ad9['creator']&&_0x55c92e['creator'])break;if(_0x55c92e['creator']||!_0x535ad9['creator']){if(_0x535ad9['createdAt']>_0x55c92e['createdAt'])break;_0x52bcc6++;}else _0x52bcc6++;}}return _0x52bcc6;}_getFromVersion(_0x35ebce){const _0x22baf6=this['repository']['getRevisions']();_0x22baf6['reverse'](),_0x22baf6['shift']();const _0x28fc60=_0x22baf6['find'](_0x276e99=>_0x276e99['toVersion']<=_0x35ebce)['toVersion'];return _0x28fc60<this['_startingVersion']?this['_startingVersion']:_0x28fc60;}['_makeRevision']({name:_0x47ef5a,from:_0x1269c4,to:_0x347bdb,creatorId:_0x1291a6,id:_0x5d898f}){const _0x37ee4a=this['buildRevisionData']({'from':_0x1269c4,'to':_0x347bdb});_0x37ee4a['name']=_0x47ef5a,_0x37ee4a['creatorId']=_0x1291a6,_0x37ee4a['id']=_0x5d898f;const _0x203979=this['addRevisionData'](_0x37ee4a);return this['adapter']&&this['_bufferUpdate'](_0x37ee4a['id'],_0x37ee4a,!0x0),_0x203979;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x576832){this['editor']=_0x576832,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(_0x257a38){this['source']=_0x257a38;const _0x3dc3c4=new Map(),_0x5c3c42=new Map(),_0x2ac20b=this['editor']['model']['document']['roots']['map'](_0xad5747=>_0xad5747['rootName']);for(const _0x22f2f5 of _0x2ac20b){const _0x4e4c2b=this['editor']['model']['document']['getRoot'](_0x22f2f5),_0xd82071=St(_0x4e4c2b);_0x3dc3c4['set'](_0x22f2f5,_0xd82071),_0x5c3c42['set'](_0x22f2f5,Object['fromEntries'](_0x4e4c2b['getAttributes']()));}const _0x157626=Array['from'](this['editor']['model']['markers'])['map'](_0x13c8c4=>[_0x13c8c4['name'],_0x13c8c4['getRange']()]),_0x12bc39=this['source']['version'];this['_saveMetaData'](_0x12bc39,_0x3dc3c4,_0x157626,_0x5c3c42),this['_startingRevisionId']=this['_revisionId'];const _0x1b54d6=new Map(),_0x64035e=new Map();for(const _0x10cc4b of _0x2ac20b){const _0x1b4b6e=Et(_0x10cc4b,this['editor']['model']['document']['getRoot'](_0x10cc4b)['name']);_0x1b54d6['set'](_0x10cc4b,_0x1b4b6e),_0x64035e['set'](_0x10cc4b,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1b54d6,[],_0x64035e);}getData(_0x2e9111,_0xbb0eb6){if(this['_lastFrom']===_0x2e9111&&this['_lastTo']<=_0xbb0eb6)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xbb0eb6,!0x0);else{if(!this['_savedMetaData']['has'](_0x2e9111)){const _0x59c0c7=this['_getPreviousFrom'](_0x2e9111);this['_calculateMetaData'](_0x59c0c7,_0x2e9111,!0x1);}this['_calculateMetaData'](_0x2e9111,_0xbb0eb6,!0x0);}return this['_lastFrom']=_0x2e9111,this['_lastTo']=_0xbb0eb6,this['_getState']();}loadState(_0x4a8687){if(!this['_savedMetaData']['has'](_0x4a8687['fromVersion'])){const _0x4b88d3=this['_getPreviousFrom'](_0x4a8687['fromVersion']);this['_calculateMetaData'](_0x4b88d3,_0x4a8687['fromVersion'],!0x1);}this['_calculateMetaData'](_0x4a8687['fromVersion'],_0x4a8687['toVersion'],!0x1);const _0x16243d=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4a8687['fromVersion'],this['_lastTo']=_0x4a8687['toVersion'];for(const _0x151fe5 in _0x4a8687['diffData']){const _0x3106fe=_0x4a8687['diffData'][_0x151fe5]['attachChange'],_0x43005e=_0x1ebade(_0x4a8687['diffData'][_0x151fe5]['attributesBefore'])||{},_0xfc1df2=_0x4a8687['diffData'][_0x151fe5],_0x1fcb0b=_0x16243d['_makeModelFromViewString'](_0xfc1df2['deletions'],_0xfc1df2['rootElementName']||'$root');_0x1fcb0b['rootName']=_0x151fe5,_0x1fcb0b['_isAttached']=!_0x3106fe||!_0x3106fe['isAttached'],_0x1fcb0b['isAttached']=()=>_0x1fcb0b['_isAttached'],this['_baseRoots']['set'](_0x151fe5,_0x1fcb0b),this['_baseRootsAttributes']['set'](_0x151fe5,_0x43005e),_0x3106fe&&this['_touchedRoots']['set'](_0x151fe5,_0x3106fe);const _0x204906=this['_makeIdsRoot'](_0x1fcb0b);this['_baseIdsRoots']['set'](_0x151fe5,_0x204906);for(const [_0x401521,_0x341b49]of _0x1fcb0b['markers']){if(!_0x401521['startsWith']('revision:'))continue;const _0x5305ea=_0x401521['split'](':')[0x2],_0x3cabe=_0xfc1df2['aiSources']?.[_0x401521]||null;for(const _0x42b508 of _0x341b49['getWalker']({'singleCharacters':!0x0})){const _0x32c9ba=this['_getVidAttributeName'](_0x42b508),_0xdcac6b='elementEnd'==_0x42b508['type']?_0x42b508['previousPosition']['path']['slice'](0x0,-0x1):_0x42b508['previousPosition']['path'],_0x2bce00=_0x204906['getNodeByPath'](_0xdcac6b)['getAttribute'](_0x32c9ba);this['_touched']['set'](_0x2bce00,{'userId':_0x5305ea,'aiSource':_0x3cabe});}_0x1fcb0b['markers']['delete'](_0x401521);}}this['_startingRevisionId']=this['_revisionId'];const _0x447def=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5329ae=>!this['_touched']['has'](_0x5329ae));let _0x23d710=0x0;const _0x3ba2ef=new Map();for(const _0x362848 in _0x4a8687['diffData']){const _0x18fe00=_0x4a8687['diffData'][_0x362848]['attachChange'],_0x50d110=_0x1ebade(_0x4a8687['diffData'][_0x362848]['attributesAfter'])||{},_0x2b672c=_0x4a8687['diffData'][_0x362848],_0x389604=_0x16243d['_makeModelFromViewString'](_0x2b672c['insertions'],_0x2b672c['rootElementName']||'$root');_0x389604['rootName']=_0x362848,_0x389604['_isAttached']=!_0x18fe00||_0x18fe00['isAttached'],_0x389604['isAttached']=()=>_0x389604['_isAttached'],this['_diffRoots']['set'](_0x362848,_0x389604),this['_diffRootsAttributes']['set'](_0x362848,_0x50d110);const _0x33335c=this['_makeIdsRoot'](_0x389604,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x362848,_0x33335c),_0x3ba2ef['set'](_0x362848,_0x389604['isAttached']()?_0x50d110:{});for(const [_0x3b002b,_0x189ce1]of _0x389604['markers']){if(!_0x3b002b['startsWith']('revision:'))continue;const _0x25588e=_0x3b002b['split'](':')[0x2],_0x157876=_0x2b672c['aiSources']?.[_0x3b002b]||null;for(const _0x3620ab of _0x189ce1['getWalker']({'singleCharacters':!0x0})){const _0x64a7ce=this['_getVidAttributeName'](_0x3620ab),_0x32bb54=this['_revisionId']++,_0x29ed70='elementEnd'==_0x3620ab['type']?_0x3620ab['previousPosition']['path']['slice'](0x0,-0x1):_0x3620ab['previousPosition']['path'];_0x33335c['getNodeByPath'](_0x29ed70)['_setAttribute'](_0x64a7ce,_0x32bb54),this['_touched']['set'](_0x32bb54,{'userId':_0x25588e,'aiSource':_0x157876});}_0x389604['markers']['delete'](_0x3b002b);}for(const _0x1aa2fe of this['editor']['model']['createRangeIn'](_0x389604)['getWalker']({'singleCharacters':!0x0})){const _0x26277d=this['_getVidAttributeName'](_0x1aa2fe),_0x40a254='elementEnd'==_0x1aa2fe['type']?_0x1aa2fe['previousPosition']['path']['slice'](0x0,-0x1):_0x1aa2fe['previousPosition']['path'],_0x14f5d5=_0x33335c['getNodeByPath'](_0x40a254);_0x14f5d5['getAttribute'](_0x26277d)>0x0||_0x14f5d5['_setAttribute'](_0x26277d,_0x447def[_0x23d710++]);}for(const [_0x3900b5,_0x552972]of _0x389604['markers'])_0x3900b5['startsWith']('revision:')||this['_markers']['set'](_0x3900b5,_0x552972);}const {roots:_0x138b0f}=this['_savedMetaData']['get'](_0x4a8687['fromVersion']),{roots:_0x24e2bf}=this['_savedMetaData']['get'](_0x4a8687['toVersion']),_0x25dcff=St(_0x138b0f['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x25dcff),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x25dcff,Number['NEGATIVE_INFINITY']));const _0x58c6c2=St(_0x24e2bf['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x58c6c2),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x58c6c2));const _0x49c445=Array['from'](this['_diffRoots'])['map'](([_0x1c3d40,_0x2c2d02])=>[_0x1c3d40,St(_0x2c2d02)]);this['_saveMetaData'](this['_lastTo'],_0x49c445,this['_markers'],_0x3ba2ef);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x4aab16,_0xf72183,_0xc6fa01,_0x80630b){const _0x48dca0=new Map(_0xf72183),_0x3ffaec=new Map(_0x1ebade(_0x80630b)),_0x22da7f=new Map();for(const [_0x47697d,_0x1567a1]of _0xc6fa01)_0x22da7f['set'](_0x47697d,{'start':_0x1567a1['start']['clone'](),'end':_0x1567a1['end']['clone'](),'rootName':_0x1567a1['root']['rootName']});this['_savedMetaData']['set'](_0x4aab16,{'roots':_0x48dca0,'markers':_0x22da7f,'rootsAttributes':_0x3ffaec});}_removeMetaData(_0x1a1d03){this['_savedMetaData']['delete'](_0x1a1d03);}_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(_0x31ab9c,_0x3c3375=null){let _0x53f830=null;_0x31ab9c['is']('documentFragment')||(_0x53f830=new _0xf48e9f(_0x31ab9c['name'],{'vid_start':null===_0x3c3375?this['_revisionId']++:_0x3c3375++}));const _0x141cd1=[];for(const _0x46ff3c of _0x31ab9c['getChildren']())if(_0x46ff3c['is']('element')){_0x141cd1['push'](this['_makeIdsRoot'](_0x46ff3c,_0x3c3375));const _0x442126=_0x141cd1[_0x141cd1['length']-0x1];null!==_0x3c3375&&(_0x3c3375=_0x442126['is']('element','$text')?_0x442126['getAttribute']('vid')+0x1:_0x442126['getAttribute']('vid_end')+0x1);}else{for(let _0x4e7f05=0x0;_0x4e7f05<_0x46ff3c['offsetSize'];_0x4e7f05++)_0x141cd1['push'](new _0xf48e9f('$text',{'vid':null===_0x3c3375?this['_revisionId']++:_0x3c3375++}));}if(_0x31ab9c['is']('documentFragment')){const _0x1d01d0=Et(_0x31ab9c['rootName'],_0x31ab9c['name']);return _0x1d01d0['_insertChild'](0x0,_0x141cd1),_0x1d01d0;}return _0x53f830['_setAttribute']('vid_end',null===_0x3c3375?this['_revisionId']++:_0x3c3375),_0x53f830['_insertChild'](0x0,_0x141cd1),_0x53f830;}_calculateMetaData(_0x299554,_0x5d5fe1,_0x449301){this['_reset']();const {roots:_0x5e13bb,markers:_0x381c1d,rootsAttributes:_0x580154}=this['_savedMetaData']['get'](_0x299554);this['_baseRoots']=new Map(_0x5e13bb),this['_baseRootsAttributes']=new Map(_0x1ebade(_0x580154));for(const [_0x92b8ca,_0x1a66ea]of this['_baseRoots'])if('$graveyard'!==_0x92b8ca&&(this['_diffRoots']['set'](_0x92b8ca,St(_0x1a66ea)),this['_diffRootsAttributes']=new Map(_0x1ebade(_0x580154)),_0x449301)){const _0x1e69cb=this['_revisionId'];this['_idsRoots']['set'](_0x92b8ca,this['_makeIdsRoot'](_0x1a66ea)),this['_baseIdsRoots']['set'](_0x92b8ca,this['_makeIdsRoot'](_0x1a66ea,_0x1e69cb));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x449301&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x319995,_0x2a48d1]of _0x381c1d){const _0x80fc87=this['_baseRoots']['get'](_0x2a48d1['rootName']),_0x191a99=this['_diffRoots']['get'](_0x2a48d1['rootName']),_0x385675=new _0x2ea5f(_0x21a19e(_0x2a48d1['start'],_0x80fc87),_0x21a19e(_0x2a48d1['end'],_0x80fc87)),_0x32ac9d=_0x46d417(_0x385675,_0x191a99);_0x80fc87['markers']['set'](_0x319995,_0x385675),this['_markers']['set'](_0x319995,_0x32ac9d);}this['_applyOperations'](_0x299554,_0x5d5fe1,_0x449301);}_applyOperations(_0xe56e07,_0x2c1f18,_0xfe92b3){for(const _0x58502c of this['source']['getOperations'](_0xe56e07,_0x2c1f18))this['_handleOperation'](_0x58502c,_0xfe92b3);for(const _0x385ab8 of this['_diffRoots']['values']())_0x385ab8['markers']['clear']();for(const [_0xb713c,_0x146a75]of this['_markers'])this['_diffRoots']['get'](_0x146a75['root']['rootName'])['markers']['set'](_0xb713c,_0x146a75['clone']());const _0x1d4169=new Map(),_0x5011d9=new Map();for(const [_0x1aa833,_0x2d3028]of this['_diffRoots'])_0x1d4169['set'](_0x1aa833,St(_0x2d3028)),_0x5011d9['set'](_0x1aa833,this['_diffRootsAttributes']['get'](_0x1aa833));this['_saveMetaData'](_0x2c1f18,_0x1d4169,this['_markers'],_0x5011d9);}_getPreviousFrom(_0x15eb3b){const _0x559ce3=Array['from'](this['_savedMetaData']['keys']());_0x559ce3['sort']((_0x3a604a,_0x50233b)=>_0x3a604a-_0x50233b),_0x559ce3['reverse']();for(const _0x42ca11 of _0x559ce3)if(_0x42ca11<_0x15eb3b)return _0x42ca11;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x447f0c,_0x26a21a){const _0xb54cea=Array['from'](_0x26a21a['markers'])['map'](([_0xee69c1,_0x1dbc05])=>[_0xee69c1,_0x46d417(_0x1dbc05,_0x447f0c)]);_0x447f0c['markers']=new Map(_0xb54cea);}_transformMarkers(_0x28faeb){for(const _0x74d632 of this['_markers']['values']()){const _0x5b84b8=_0x74d632['getTransformedByOperation'](_0x28faeb),_0x2b021b=_0x2ea5f['_createFromRanges'](_0x5b84b8);_0x74d632['start']=_0x2b021b['start'],_0x74d632['end']=_0x2b021b['end'];}}_handleOperation(_0x47f402,_0x156028){if('addRoot'!=_0x47f402['type']&&'detachRoot'!=_0x47f402['type']){if('insert'==_0x47f402['type']){const _0x83a5dd=_0x47f402['position']['root'],_0x19ec9f=_0x83a5dd['rootName'],_0x5b108f=_0x83a5dd['name'];this['_diffRoots']['has'](_0x19ec9f)||(this['_diffRoots']['set'](_0x19ec9f,Et(_0x19ec9f,_0x5b108f,!0x0)),this['_diffRootsAttributes']['set'](_0x19ec9f,{}),_0x156028&&this['_idsRoots']['set'](_0x19ec9f,Et(_0x19ec9f,_0x5b108f,!0x0)));}else{if('addRootAttribute'==_0x47f402['type']||'removeRootAttribute'==_0x47f402['type']||'changeRootAttribute'==_0x47f402['type'])return void this['_handleRootAttributeOperation'](_0x47f402);'marker'==_0x47f402['type']&&this['_handleMarkerOperation'](_0x47f402);}if('marker'!==_0x47f402['type']){const _0x102ae5=this['_cloneOperation'](_0x47f402,this['_diffRoots']);_0x102ae5['_execute'](),this['_transformMarkers'](_0x102ae5);}if(_0x156028)switch(_0x47f402['type']){case'insert':this['_handleInsertOperation'](_0x47f402);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x47f402);break;case'merge':this['_handleMergeOperation'](_0x47f402);break;case'split':this['_handleSplitOperation'](_0x47f402);}}else this['_handleRootOperation'](_0x47f402,_0x156028);}_cloneOperation(_0x14c037,_0x5765cb){const _0x4f129b=_0x14c037['clone']();return _0x4f129b['_authorId']=_0x14c037['_authorId'],_0x4f129b['_aiSource']=_0x14c037['_aiSource'],_0x4f129b['baseVersion']=null,_0x5d5705(_0x4f129b,_0x5765cb),_0x4f129b;}_getBaseVids(_0x1bba74){return _0x1bba74['map'](_0x3cae15=>{const _0x235e93=this['_getVidAttributeName'](_0x3cae15);return Number(_0x3cae15['item']['getAttribute'](_0x235e93));});}_generateTape(_0x5b9b04,_0xec90ce){if(_0x5b9b04['is']('element','$text'))_0xec90ce['push']({'item':_0x5b9b04,'type':'text'});else{_0x5b9b04['is']('element')&&_0xec90ce['push']({'item':_0x5b9b04,'type':'elementStart'});for(const _0x1ab50c of _0x5b9b04['getChildren']())this['_generateTape'](_0x1ab50c,_0xec90ce);_0x5b9b04['is']('element')&&_0xec90ce['push']({'item':_0x5b9b04,'type':'elementEnd'});}return _0xec90ce;}_getState(){const _0x5b7783=new Map(this['_touched']),_0x253733=new Map(_0x5b7783),_0x5d0b2a=new Map(),_0x1f1647={'insertions':{},'deletions':{}},_0x15839e={'insertions':{},'deletions':{}},_0x48473b=new Map(),_0x57a5ec=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1d2cf4=new Map();_0x57a5ec['delete']('$graveyard');for(const _0xc1cd84 of _0x57a5ec){const _0x1bb597=(this['_diffRoots']['get'](_0xc1cd84)??this['_baseRoots']['get'](_0xc1cd84))['name'],_0xc45fc3=this['_diffRoots']['get'](_0xc1cd84)||Et(_0xc1cd84,_0x1bb597,!0x1),_0x4265e7=this['_baseRoots']['get'](_0xc1cd84)||Et(_0xc1cd84,_0x1bb597,!0x1);_0xc45fc3['isAttached']()||_0x4265e7['isAttached']()?(_0x1d2cf4['set'](_0xc1cd84,_0x1bb597),_0x1f1647['insertions'][_0xc1cd84]=St(_0xc45fc3),_0x1f1647['deletions'][_0xc1cd84]=St(_0x4265e7),this['_copyMarkers'](_0x1f1647['deletions'][_0xc1cd84],_0x4265e7),this['_copyMarkers'](_0x1f1647['insertions'][_0xc1cd84],_0xc45fc3),_0x15839e['insertions'][_0xc1cd84]=this['_generateTape'](this['_idsRoots']['get'](_0xc1cd84),[]),_0x15839e['deletions'][_0xc1cd84]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xc1cd84)||Et(_0xc1cd84,_0x1bb597,!0x1),[])):_0x57a5ec['delete'](_0xc1cd84);}for(const _0xbcb21 of _0x57a5ec){const _0x63e470=_0x15839e['insertions'][_0xbcb21];for(const _0x5ef9fc of _0x63e470){const _0xca41f9=this['_getVidAttributeName'](_0x5ef9fc),_0x2c3e40=_0x5ef9fc['item']['getAttribute'](_0xca41f9);_0x253733['delete'](_0x2c3e40),_0x2c3e40>=this['_startingRevisionId']&&_0x5d0b2a['set'](_0x2c3e40,_0x5b7783['get'](_0x2c3e40));}}for(const _0x59f0ec of _0x57a5ec){const _0x19e277=_0x15839e['insertions'][_0x59f0ec],_0x2c41f8=this['_getBaseVids'](_0x15839e['deletions'][_0x59f0ec]);let _0x111dfd=0x0;for(const _0x20f378 of _0x19e277){const _0xdcf597=this['_getVidAttributeName'](_0x20f378),_0x2c4c6a=_0x20f378['item']['getAttribute'](_0xdcf597);if(!_0x5d0b2a['has'](_0x2c4c6a)&&!_0x48473b['has'](_0x2c4c6a)){if(_0x253733['has'](_0x2c4c6a))_0x111dfd++;else{if(_0x2c4c6a!=_0x2c41f8[_0x111dfd]){const _0x46c8dc=_0x5b7783['get'](_0x2c4c6a)||_0x5b7783['get'](_0x2c41f8[_0x111dfd]);for(;_0x2c4c6a!=_0x2c41f8[_0x111dfd];)_0x253733['has'](_0x2c41f8[_0x111dfd])||(_0x48473b['set'](_0x2c41f8[_0x111dfd],_0x46c8dc),_0x5b7783['set'](_0x2c41f8[_0x111dfd],_0x46c8dc)),_0x111dfd++;}_0x111dfd++;}}}}for(const _0x182643 of _0x57a5ec){const _0x17d181=_0x15839e['insertions'][_0x182643];for(const _0x271d16 of _0x17d181){const _0x23003f=this['_getVidAttributeName'](_0x271d16),_0x3907fc=_0x271d16['item']['getAttribute'](_0x23003f);if(_0x48473b['has'](_0x3907fc)){const _0x4facd2=_0x48473b['get'](_0x3907fc);_0x253733['has'](_0x3907fc)||_0x253733['set'](_0x3907fc,{..._0x4facd2}),_0x5d0b2a['set'](_0x3907fc,{..._0x4facd2});}}}for(const _0x25a8b9 of _0x253733['keys']())_0x25a8b9>=this['_startingRevisionId']&&_0x253733['delete'](_0x25a8b9);const _0x40adb3=new Map();for(const _0x1491cb of _0x57a5ec){let _0x23d14c=_0x15839e['insertions'][_0x1491cb];for(const _0x2df14b of _0x23d14c)if(_0x2df14b['item']['is']('element','tableCell')){const _0x4464a7=this['_getVidAttributeName'](_0x2df14b),_0x443322=_0x2df14b['item']['getAttribute'](_0x4464a7);if(_0x5d0b2a['has'](_0x443322)){const _0x372213=_0x2df14b['item']['parent']['parent']['getAttribute']('vid_start'),_0x237cfe=_0x5d0b2a['get'](_0x443322),_0x47b8a5=_0x40adb3['get'](_0x372213)||{'users':new Set(),'aiSource':null};_0x47b8a5['users']['add'](_0x237cfe['userId']),_0x47b8a5['aiSource']=_0x47b8a5['aiSource']||_0x237cfe['aiSource']||null,_0x40adb3['set'](_0x372213,_0x47b8a5);}}_0x23d14c=_0x15839e['deletions'][_0x1491cb];for(const _0x265a83 of _0x23d14c)if(_0x265a83['item']['is']('element','tableCell')){const _0xc1f97e=this['_getVidAttributeName'](_0x265a83),_0x5a21a8=_0x265a83['item']['getAttribute'](_0xc1f97e);if(_0x253733['has'](_0x5a21a8)){const _0x4c3101=_0x265a83['item']['parent']['parent']['getAttribute']('vid_start'),_0x5dd653=_0x253733['get'](_0x5a21a8),_0x22166c=_0x40adb3['get'](_0x4c3101)||{'users':new Set(),'aiSource':null};_0x22166c['users']['add'](_0x5dd653['userId']),_0x22166c['aiSource']=_0x22166c['aiSource']||_0x5dd653['aiSource']||null,_0x40adb3['set'](_0x4c3101,_0x22166c);}}for(const _0xb5d579 of _0x40adb3['keys']())(_0x5d0b2a['has'](_0xb5d579)||_0x253733['has'](_0xb5d579))&&_0x40adb3['delete'](_0xb5d579);}for(const _0x4f1947 of _0x57a5ec){const _0x184d2d=_0x15839e['insertions'][_0x4f1947];let _0x772e53=null,_0x5b3216=null,_0x5a02a1=null;for(const _0x28f734 of _0x184d2d){const _0x37e038=this['_getVidAttributeName'](_0x28f734),_0x36ff34=_0x28f734['item']['getAttribute'](_0x37e038),_0x370a92=_0x40adb3['get'](_0x36ff34);if(_0x370a92&&'elementStart'==_0x28f734['type']&&(_0x772e53=Array['from'](_0x370a92['users'])[0x0],_0x5b3216=_0x370a92['aiSource'],_0x5a02a1=_0x28f734['item']['getAttribute']('vid_end')),_0x772e53){const _0x4551a2=_0x5b3216||_0x253733['get'](_0x36ff34)?.['aiSource']||null,_0x5bc68f=_0x5b3216||_0x5d0b2a['get'](_0x36ff34)?.['aiSource']||null;_0x253733['set'](_0x36ff34,{'userId':_0x772e53,'aiSource':_0x4551a2}),_0x5d0b2a['set'](_0x36ff34,{'userId':_0x772e53,'aiSource':_0x5bc68f});}_0x36ff34==_0x5a02a1&&(_0x772e53=null,_0x5a02a1=null);}}const _0x2c1428={},_0x4f7aa3=new Set();for(const _0x3253b8 of _0x57a5ec){const _0x222e83=_0x1f1647['deletions'][_0x3253b8],_0x34ddd1=_0x1f1647['insertions'][_0x3253b8];for(const {userId:_0x1bbd20}of this['_touchedMarkers']['values']())null!==_0x1bbd20&&_0x4f7aa3['add'](_0x1bbd20);for(const {userId:_0x5a28e0}of this['_touchedRoots']['values']())null!==_0x5a28e0&&_0x4f7aa3['add'](_0x5a28e0);const _0x47709a={};this['_markChanges'](_0x34ddd1,_0x15839e['insertions'][_0x3253b8],_0x5d0b2a,'insertion',_0x4f7aa3,_0x47709a),this['_markChanges'](_0x222e83,_0x15839e['deletions'][_0x3253b8],_0x253733,'deletion',_0x4f7aa3,_0x47709a),this['_collectSuggestionAiSources'](_0x34ddd1,_0x47709a),this['_collectSuggestionAiSources'](_0x222e83,_0x47709a),_0x2c1428[_0x3253b8]={'insertions':this['_prepareViewToSave'](_0x34ddd1),'deletions':this['_prepareViewToSave'](_0x222e83),'attachChange':this['_touchedRoots']['get'](_0x3253b8)||null,'attributesBefore':_0x1ebade(this['_baseRootsAttributes']['get'](_0x3253b8))||{},'attributesAfter':_0x1ebade(this['_diffRootsAttributes']['get'](_0x3253b8)),'rootElementName':_0x1d2cf4['get'](_0x3253b8),'aiSources':_0x47709a};}const _0x47c829=Array['from'](_0x5d0b2a['values']())['some'](_0x1671de=>!(!_0x1671de||!_0x1671de['aiSource']))||Array['from'](_0x253733['values']())['some'](_0x38c516=>!(!_0x38c516||!_0x38c516['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x35fe18=>this['_aiTouchedMarkers']['has'](_0x35fe18));return{'diffData':_0x2c1428,'authorsIds':Array['from'](_0x4f7aa3),'hasAIChanges':_0x47c829};}_collectSuggestionAiSources(_0x5255de,_0xfe0b02){const _0x1cf2fe=_0x5255de['markers'];for(const _0x1b9b98 of _0x1cf2fe['keys']()){if(!_0x1b9b98['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x1b9b98))continue;const _0x23a479=this['_aiTouchedMarkers']['get'](_0x1b9b98);_0x23a479&&(_0xfe0b02[_0x1b9b98]=_0x23a479);}}_processRootBeforeSave(_0x1e2a5b){for(const [,_0x1de366]of _0x1e2a5b['markers']){const _0x2c66ee=_0x1de366['start']['getAncestors']()['filter'](_0x144de6=>'tableCell'==_0x144de6['name']);for(const _0x165cc1 of _0x2c66ee)0x1==_0x165cc1['childCount']&&_0x165cc1['getChild'](0x0)['is']('element','paragraph')&&_0x165cc1['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x12d4ca){this['_processRootBeforeSave'](_0x12d4ca);const _0x53be3c=this['editor']['data']['toView'](_0x12d4ca,{}),_0x1b2ac8=Array['from'](_0x53be3c['getChildren']())['map'](_0x2457ee=>this['_getViewJson'](_0x2457ee));return JSON['stringify'](_0x1b2ac8);}_getViewJson(_0xc9a1e6){if(_0xc9a1e6['is']('$text'))return _0xc9a1e6['data'];{const _0x26b6ad=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5e30f7=_0xc9a1e6,_0x5dc891=this['editor']['data']['htmlProcessor']['domConverter'],_0x1c03a7={'type':_0x26b6ad['_getTypeCharForViewElement'](_0x5e30f7),'name':_0x5e30f7['name'],'attributes':Array['from'](_0x5e30f7['getAttributes']()),'children':Array['from'](_0x5e30f7['getChildren']())['map'](_0x10db89=>this['_getViewJson'](_0x10db89))};if(_0xc9a1e6['is']('uiElement')&&'$comment'!=_0xc9a1e6['name']){const _0x4989f4=_0xc9a1e6['render'](_0x5dc891['domDocument'],_0x5dc891);_0x1c03a7['children']['push'](_0x4989f4['outerHTML']);}else{if(_0xc9a1e6['is']('rawElement')){const _0x518e77=_0x5dc891['domDocument']['createElement'](_0x5e30f7['name']);_0xc9a1e6['render'](_0x518e77,_0x5dc891),_0x1c03a7['children']['push'](_0x518e77['innerHTML']);}}const _0x46a4ed=Array['from'](_0x5e30f7['getCustomProperties']());_0x46a4ed['length']>0x0&&(_0x1c03a7['customProperties']=_0x46a4ed);const _0x57375b=_0x5e30f7['getFillerOffset']();return null!==_0x57375b&&(_0x1c03a7['fillerOffset']=_0x57375b),_0x1c03a7;}}['_markChanges'](_0x402815,_0x2de0fa,_0x5d06ac,_0x12126c,_0x7fe86c,_0x204817){let _0xd33c8=null,_0x421fdb=null,_0xe63a47=0x0;const _0x2b5ca9=this['editor']['model'];for(let _0x2e7c6e=0x0;_0x2e7c6e<_0x2de0fa['length'];_0x2e7c6e++){const _0x1972ef=this['_getVidAttributeName'](_0x2de0fa[_0x2e7c6e]),_0x351c71=_0x2de0fa[_0x2e7c6e]['item']['getAttribute'](_0x1972ef),_0xfd37c0=_0x5d06ac['get'](_0x351c71),_0x2ba8e8=_0x2e7c6e==_0x2de0fa['length']-0x1;!_0xd33c8&&_0xfd37c0&&(_0xd33c8=_0xfd37c0,_0x421fdb=_0x2de0fa[_0x2e7c6e]);const _0x2d4844=!!_0xd33c8&&!!_0xfd37c0&&_0xfd37c0['userId']!=_0xd33c8['userId'],_0x4141ce=!!_0xd33c8&&!!_0xfd37c0&&_0xfd37c0['aiSource']!=_0xd33c8['aiSource'];_0xd33c8&&(!_0xfd37c0||_0x2d4844||_0x4141ce)&&(_0x3c8de3(_0xfd37c0,Ot(_0x421fdb,_0x402815,_0x2b5ca9),Ot(_0x2de0fa[_0x2e7c6e],_0x402815,_0x2b5ca9)),_0xd33c8=_0xfd37c0||null,_0x421fdb=_0xfd37c0?_0x2de0fa[_0x2e7c6e]:null),_0xd33c8&&_0x2ba8e8&&_0x3c8de3(_0xfd37c0,Ot(_0x421fdb,_0x402815,_0x2b5ca9),Ct(_0x2de0fa[_0x2e7c6e],_0x402815,_0x2b5ca9));}function _0x3c8de3(_0x377801,_0x33e5b6,_0x56fe95){const _0xd633c7=_0xd33c8['userId'],_0x4972e3=_0xd33c8['aiSource'],_0x3a7fe1='revision:'+_0x12126c+':'+_0xd633c7+':'+_0xe63a47++,_0x54b5a9=_0x2b5ca9['createRange'](_0x33e5b6,_0x56fe95);_0x402815['markers']['set'](_0x3a7fe1,_0x54b5a9),_0x4972e3&&(_0x204817[_0x3a7fe1]=_0x4972e3),null!==_0xd633c7&&_0x7fe86c['add'](_0xd633c7);}}_getVidAttributeName(_0x5dde23){switch(_0x5dde23['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x112c81){const _0x5d8291=this['_idsRoots']['get'](_0x112c81['position']['root']['rootName']),_0x3cdb44=_0x21a19e(_0x112c81['position'],_0x5d8291),_0x4d738c=null===_0x112c81['_authorId']?null:_0x112c81['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x574914=_0x112c81['_aiSource']||null,_0x104331=_0x3cdb44['parent'],_0x1710c4=this['_revisionId'],_0x51e5a1=[];for(const _0x4ab7e1 of _0x112c81['nodes'])if(_0x4ab7e1['is']('element'))_0x51e5a1['push'](this['_makeIdsRoot'](_0x4ab7e1));else{for(let _0x388cdd=0x0;_0x388cdd<_0x4ab7e1['offsetSize'];_0x388cdd++)_0x51e5a1['push'](new _0xf48e9f('$text',{'vid':this['_revisionId']++}));}const _0x104f2c=this['_revisionId'];for(let _0x181cf0=_0x1710c4;_0x181cf0<_0x104f2c;_0x181cf0++)this['_touched']['set'](_0x181cf0,{'userId':_0x4d738c,'aiSource':_0x574914});_0x104331['_insertChild'](_0x3cdb44['offset'],_0x51e5a1);}_setTouched(_0x33a47f,_0x1afc23,_0x191f35){this['_touched']['set'](_0x33a47f,{'userId':_0x1afc23,'aiSource':_0x191f35||this['_touched']['get'](_0x33a47f)?.['aiSource']||null});}_handleMoveOperation(_0x25ad3c){(_0x25ad3c=this['_cloneOperation'](_0x25ad3c,this['_idsRoots']))['_execute']();const _0x28fcb6=null===_0x25ad3c['_authorId']?null:_0x25ad3c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5d008a=_0x25ad3c['_aiSource']||null,_0xbcba37=_0x25ad3c['getMovedRangeStart'](),_0x5eb0cf=_0xbcba37['parent'],_0xe19030=_0xbcba37['offset'],_0x2dd6ac=(_0x411b4f,_0xad5010,_0x5a7c35)=>{for(let _0x292024=_0xad5010;_0x292024<_0x5a7c35;_0x292024++){const _0x58f38a=_0x411b4f['getChild'](_0x292024);_0x58f38a['is']('element','$text')?this['_setTouched'](_0x58f38a['getAttribute']('vid'),_0x28fcb6,_0x5d008a):(this['_setTouched'](_0x58f38a['getAttribute']('vid_start'),_0x28fcb6,_0x5d008a),_0x2dd6ac(_0x58f38a,0x0,_0x58f38a['childCount']),this['_setTouched'](_0x58f38a['getAttribute']('vid_end'),_0x28fcb6,_0x5d008a));}};_0x2dd6ac(_0x5eb0cf,_0xe19030,_0xe19030+_0x25ad3c['howMany']);}_handleMergeOperation(_0x11f411){const _0x2226a1=null===(_0x11f411=this['_cloneOperation'](_0x11f411,this['_idsRoots']))['_authorId']?null:_0x11f411['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x36a398=_0x11f411['_aiSource']||null,_0x51855d=_0x11f411['targetPosition']['parent'],_0x5240d1=_0x11f411['sourcePosition']['parent'],_0x37d090=_0x51855d['getAttribute']('vid_end'),_0x2d91c4=_0x5240d1['getAttribute']('vid_start');_0x51855d['_setAttribute']('vid_end',_0x5240d1['getAttribute']('vid_end')),_0x5240d1['_setAttribute']('vid_end',_0x37d090),this['_setTouched'](_0x2d91c4,_0x2226a1,_0x36a398),this['_setTouched'](_0x37d090,_0x2226a1,_0x36a398),_0x11f411['_execute']();}_handleSplitOperation(_0x2751db){const _0x4a9156=null===(_0x2751db=this['_cloneOperation'](_0x2751db,this['_idsRoots']))['_authorId']?null:_0x2751db['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4636c2=_0x2751db['_aiSource']||null,_0x45ed23=_0x2751db['graveyardPosition'],_0x2f20b4=_0x2751db['splitPosition']['parent'];_0x2751db['_execute']();const _0x37e13b=_0x2f20b4['getAttribute']('vid_end'),_0x46389c=_0x2751db['insertionPosition']['nodeAfter'];if(_0x45ed23){const _0x3c8b28=_0x46389c['getAttribute']('vid_end'),_0x5c02b9=_0x2f20b4['getAttribute']('vid_end');_0x2f20b4['_setAttribute']('vid_end',_0x3c8b28),_0x46389c['_setAttribute']('vid_end',_0x5c02b9),this['_setTouched'](_0x2f20b4['getAttribute']('vid_end'),_0x4a9156,_0x4636c2),this['_setTouched'](_0x46389c['getAttribute']('vid_start'),_0x4a9156,_0x4636c2);}else{const _0x3fb54a=this['_revisionId']++,_0x4bd67d=this['_revisionId']++;_0x2f20b4['_setAttribute']('vid_end',_0x3fb54a),_0x46389c['_setAttribute']('vid_start',_0x4bd67d),_0x46389c['_setAttribute']('vid_end',_0x37e13b),this['_setTouched'](_0x3fb54a,_0x4a9156,_0x4636c2),this['_setTouched'](_0x4bd67d,_0x4a9156,_0x4636c2);}}_handleMarkerOperation(_0x4b1fa5){if(!_0x4b1fa5['affectsData'])return;const _0x2985ac=(_0x4b1fa5=this['_cloneOperation'](_0x4b1fa5,this['_diffRoots']))['oldRange']?_0x4b1fa5['oldRange']['root']:null,_0x2f0c33=_0x4b1fa5['newRange']?_0x4b1fa5['newRange']['root']:null;_0x2985ac&&this['_markers']['delete'](_0x4b1fa5['name']),_0x2f0c33&&this['_markers']['set'](_0x4b1fa5['name'],_0x4b1fa5['newRange']['clone']());const _0x4087f6=null===_0x4b1fa5['_authorId']?null:_0x4b1fa5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb3a4b0=_0x4b1fa5['name'];if(_0x4b1fa5['_aiSource']&&this['_aiTouchedMarkers']['set'](_0xb3a4b0,_0x4b1fa5['_aiSource']),!this['_touchedMarkers']['has'](_0xb3a4b0))return void this['_touchedMarkers']['set'](_0xb3a4b0,{'range':_0x4b1fa5['oldRange'],'userId':_0x4087f6});const _0x799f19=this['_touchedMarkers']['get'](_0xb3a4b0),_0xfd948=_0x799f19['range'],_0x73b697=_0x4b1fa5['newRange'];null==_0xfd948&&null==_0x73b697||_0xfd948&&_0x73b697&&_0xfd948['isEqual'](_0x73b697)?this['_touchedMarkers']['delete'](_0x4b1fa5['name']):_0x799f19['userId']=_0x4087f6;}_handleRootOperation(_0x12559f,_0x12caa0){this['_diffRoots']['has'](_0x12559f['rootName'])?this['_diffRoots']['get'](_0x12559f['rootName'])['_isAttached']=_0x12559f['isAdd']:(this['_diffRoots']['set'](_0x12559f['rootName'],Et(_0x12559f['rootName'],_0x12559f['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x12559f['rootName'],{}),_0x12caa0&&this['_idsRoots']['set'](_0x12559f['rootName'],Et(_0x12559f['rootName'],_0x12559f['elementName'],!0x0)));const _0x111545=null===_0x12559f['_authorId']?null:_0x12559f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4afc17=this['_touchedRoots']['get'](_0x12559f['rootName']);_0x4afc17&&_0x4afc17['userId']===_0x111545?this['_touchedRoots']['delete'](_0x12559f['rootName']):this['_touchedRoots']['set'](_0x12559f['rootName'],{'userId':_0x111545,'isAttached':_0x12559f['isAdd']});}_handleRootAttributeOperation(_0x1a79ef){const _0x346499=this['_diffRootsAttributes']['get'](_0x1a79ef['root']['rootName']);null===_0x1a79ef['newValue']?delete _0x346499[_0x1a79ef['key']]:_0x346499[_0x1a79ef['key']]=_0x1a79ef['newValue'];}};function St(_0x561ef7){const _0x8dc3f5=Et(_0x561ef7['rootName'],_0x561ef7['name'],_0x561ef7['isAttached']());for(const _0x9e29f1 of _0x561ef7['getChildren']()){const _0x142840=_0x9e29f1['_clone'](!0x0);_0x8dc3f5['_appendChild'](_0x142840);}return _0x8dc3f5;}function Et(_0x2f33aa,_0x1d636a,_0x4b78d3=!0x0){const _0x30bc00=new _0x49656a();return _0x30bc00['rootName']=_0x2f33aa,_0x30bc00['name']=_0x1d636a,_0x30bc00['_isAttached']=_0x4b78d3,_0x30bc00['isAttached']=()=>_0x30bc00['_isAttached'],_0x30bc00;}function Ot(_0x5383fa,_0x20a679,_0x374f4b){const _0x5b38af='elementEnd'==_0x5383fa['type']?_0x374f4b['createPositionAt'](_0x5383fa['item'],'end'):_0x374f4b['createPositionBefore'](_0x5383fa['item']);return _0x374f4b['createPositionFromPath'](_0x20a679,_0x5b38af['path'],_0x5b38af['stickiness']);}function Ct(_0x342440,_0x30357a,_0x74d4c4){const _0x4de84f='elementStart'==_0x342440['type']?_0x74d4c4['createPositionAt'](_0x342440['item'],0x0):_0x74d4c4['createPositionAfter'](_0x342440['item']);return _0x74d4c4['createPositionFromPath'](_0x30357a,_0x4de84f['path'],_0x4de84f['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x5a3a2d();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x1b847d){super(),this['id']=_0x1b847d['id']||_0x37fc40(),this['author']=_0x1b847d['author'],this['type']=_0x1b847d['type'],this['data']=_0x1b847d['data']||{},this['rootName']=_0x1b847d['rootName'],this['set']('createdAt',_0x1b847d['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x257f21,_0x2cc5f1){this['newRevisionId']=_0x257f21,this['oldRevisionId']=_0x2cc5f1,this['changes']=new _0x374b4a();}_setChanges(_0xd9f150){for(const _0x5dc1bc of _0xd9f150)this['changes']['add'](_0x5dc1bc);}},Pt=class extends _0x20938f{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[_0x410d48,_0x4aa69b,bt,Rt];}constructor(_0x47c2ad){super(_0x47c2ad),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',(_0x3a0620,_0x2c64a1,_0xa8c8db)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x243eba=>{for(const _0x5dc502 of this['editor']['editing']['view']['document']['roots'])_0xa8c8db?_0x243eba['removeClass']('ck-editor__editable__overlay',_0x5dc502):_0x243eba['addClass']('ck-editor__editable__overlay',_0x5dc502);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x451a73=>null!==_0x451a73),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x55a5ed,_0x3814e6,_0xe1764e)=>_0x55a5ed&&_0xe1764e?_0x3814e6['changes']['getIndex'](_0xe1764e):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x26c0dc,_0x2dd738)=>_0x26c0dc?_0x2dd738['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x4aa69b),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x1be060=this['editor'],_0xcdeda8=new $t(_0x1be060,{'direction':'backward'}),_0x137733=new $t(_0x1be060,{'direction':'forward'});_0x1be060['commands']['add']('showPreviousChange',_0xcdeda8),_0x1be060['commands']['add']('showNextChange',_0x137733),_0x1be060['commands']['add']('restoreRevision',new Ft(_0x1be060)),this['on']('change:numberOfChanges',()=>{_0xcdeda8['refresh'](),_0x137733['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1be060['enableReadOnlyMode']('revision-viewer'),_0x1be060['plugins']['has']('WidgetToolbarRepository')&&_0x1be060['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x1e65ce){return await this['_utils']['loadRevisionData'](_0x1e65ce,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1e65ce);}async getRevisionRootsAttributes(_0x2c690a){return await this['_utils']['loadRevisionData'](_0x2c690a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2c690a);}async['compare'](_0x4bae93,_0x461db8,_0x15dc69=!0x1){if(!this['isEnabled'])return;const _0x2db491=this['diff'],_0x30d1a1=this['repository'],_0x4be0c4='string'==typeof _0x4bae93?_0x30d1a1['getRevision'](_0x4bae93):_0x4bae93,_0x382a9d='string'==typeof _0x461db8?_0x30d1a1['getRevision'](_0x461db8):_0x461db8,_0x507137=_0x4be0c4['id'],_0x30f7a9=_0x382a9d?_0x382a9d['id']:null;if(!_0x15dc69&&this['diff']&&this['diff']['newRevisionId']===_0x507137&&this['diff']['oldRevisionId']===_0x30f7a9)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x507137,_0x30f7a9);const _0x2547ce=this['_getRevisionsRange'](_0x4be0c4,_0x382a9d,!0x0)['map'](_0x45a84d=>this['_utils']['loadRevisionData'](_0x45a84d,this['adapter']));return _0x2547ce['push'](new Promise(_0x4556b1=>{setTimeout(_0x4556b1,0x14);})),Promise['all'](_0x2547ce)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x694a76=this['_getDiff'](_0x507137,_0x30f7a9);this['_cleanUpCommentMarkers'](_0x694a76);for(const _0x4126d4 of _0x694a76['changes'])this['_changeIdToChange']['set'](_0x4126d4['id'],_0x4126d4);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2cb5cc=>{for(const _0x35e9e1 of this['editor']['model']['document']['getRootNames']())_0x2cb5cc['detachRoot'](_0x35e9e1);for(const _0x979364 of Object['keys'](_0x694a76['model'])){const _0x2b09fd=_0x694a76['model'][_0x979364]['name'],_0x2c61b2=_0x2cb5cc['addRoot'](_0x979364,_0x2b09fd);for(const _0x4fd357 of Object['keys'](_0x694a76['attributes'][_0x979364]))_0x2cb5cc['setAttribute'](_0x4fd357,_0x694a76['attributes'][_0x979364][_0x4fd357],_0x2c61b2);_0x2cb5cc['insert'](_0x694a76['model'][_0x979364],_0x2c61b2,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x694a76['changes'])),this['isReady']=!0x0;})['catch'](_0x93ca92=>{console['error'](_0x93ca92),this['_cleanUp'](),_0x2db491&&(this['diff']=_0x2db491),this['isReady']=!0x0;});}addRevisionData(_0x2e371f,_0x13abd1){const _0x5d395e=this['repository']['createRevision'](_0x2e371f);return _0x5d395e['on']('_update',(_0x4fab35,_0x5d9ded,_0x465c18)=>_0x13abd1(_0x5d9ded,_0x465c18,_0x5d395e)),this['repository']['addRevision'](_0x5d395e),_0x5d395e;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5d542f=>{for(const _0x342abd of this['editor']['model']['document']['getRootNames']())_0x5d542f['detachRoot'](_0x342abd);});}_cleanUpCommentMarkers(_0xcf648a){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0xd28727=this['_getVisibleCommentThreadIds']();for(const _0x184d7c of Object['values'](_0xcf648a['model']))for(const _0x51fd65 of Array['from'](_0x184d7c['markers']['keys']()))_0x51fd65['startsWith']('revision-comment:')&&!_0xd28727['has'](Ut(_0x51fd65))&&_0x184d7c['markers']['delete'](_0x51fd65);}_sortAndFilterDiffChanges(_0x43841b){const _0x4a7711=[],_0x3e12d2=new Map();for(const _0x2738f3 of this['editor']['model']['document']['getRootNames']()){const _0x2c2fcd=this['editor']['editing']['view']['getDomRoot'](_0x2738f3);if(!_0x2c2fcd)continue;const _0x569225=_0x2c2fcd['getClientRects']()['item'](0x0);_0x569225&&(_0x4a7711['push'](_0x2738f3),_0x3e12d2['set'](_0x2738f3,_0x569225));}return _0x4a7711['sort']((_0x53ff85,_0x581573)=>{const _0x30f534=_0x3e12d2['get'](_0x53ff85),_0x2b3747=_0x3e12d2['get'](_0x581573);return _0x30f534['y']-_0x2b3747['y']||_0x30f534['x']-_0x2b3747['x'];}),(_0x43841b=_0x43841b['filter'](_0x2006db=>_0x4a7711['includes'](_0x2006db['rootName'])))['sort']((_0x485f4f,_0x542140)=>_0x4a7711['indexOf'](_0x485f4f['rootName'])-_0x4a7711['indexOf'](_0x542140['rootName'])),_0x43841b;}['_makeTape'](_0x1a35bd,_0x230072={}){const _0x55294a=Array['from'](_0x1a35bd['markers'])['filter'](([_0x3e0c50,_0x2387e4])=>_0x3e0c50['startsWith']('revision:')&&!_0x2387e4['isCollapsed']),_0x4f9c2f=Array['from'](this['editor']['model']['createRangeIn'](_0x1a35bd)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x55294a['length'])for(const _0x5c44b0 of _0x4f9c2f){const [_0x1a0c8b,_0x354eb7]=_0x55294a[0x0],[,_0x37ad7b,_0x22942f]=_0x1a0c8b['split'](':'),_0x5d92c0=_0x230072[_0x1a0c8b]||null;if(_0x354eb7['end']['isEqual'](_0x5c44b0['nextPosition'])&&_0x55294a['shift'](),(_0x5c44b0['previousPosition']['isEqual'](_0x354eb7['start'])||_0x5c44b0['previousPosition']['isAfter'](_0x354eb7['start']))&&('insertion'==_0x37ad7b?_0x5c44b0['isAdded']={'userId':_0x22942f,'aiSource':_0x5d92c0}:'deletion'==_0x37ad7b&&(_0x5c44b0['isRemoved']={'userId':_0x22942f,'aiSource':_0x5d92c0})),0x0==_0x55294a['length'])break;}return _0x4f9c2f;}_refreshStartEndIndex(_0x4ef047){const _0x227824=new Map();for(let _0x1172f5=0x0;_0x1172f5<_0x4ef047['length'];_0x1172f5++)'text'===_0x4ef047[_0x1172f5]['type']?(_0x4ef047[_0x1172f5]['item']['startIndex']=_0x1172f5,_0x4ef047[_0x1172f5]['item']['endIndex']=_0x1172f5):('elementStart'===_0x4ef047[_0x1172f5]['type']?_0x4ef047[_0x1172f5]['item']['startIndex']=_0x1172f5:'elementEnd'===_0x4ef047[_0x1172f5]['type']&&(_0x4ef047[_0x1172f5]['item']['endIndex']=_0x1172f5),_0x227824['set'](_0x4ef047[_0x1172f5]['id'],_0x1172f5));for(const _0x56fadb of _0x227824['values']())'elementStart'===_0x4ef047[_0x56fadb]['type']?_0x4ef047[_0x56fadb]['item']['endIndex']=_0x227824['get'](_0x4ef047[_0x56fadb]['pairId']):'elementEnd'===_0x4ef047[_0x56fadb]['type']&&(_0x4ef047[_0x56fadb]['item']['startIndex']=_0x227824['get'](_0x4ef047[_0x56fadb]['pairId']));}['_processTape'](_0xc9eccc){for(let _0x3485d2=0x0;_0x3485d2<_0xc9eccc['length'];_0x3485d2++){if('elementStart'===_0xc9eccc[_0x3485d2]['type'])_0xc9eccc[_0x3485d2]['item']['startIndex']=_0x3485d2;else{if('elementEnd'===_0xc9eccc[_0x3485d2]['type']){_0xc9eccc[_0x3485d2]['item']['endIndex']=_0x3485d2;const _0x2d1714=_0xc9eccc[_0x3485d2]['item']['startIndex'];_0xc9eccc[_0x2d1714]['pairId']=_0xc9eccc[_0x3485d2]['id'],_0xc9eccc[_0x3485d2]['pairId']=_0xc9eccc[_0x2d1714]['id'];}else _0xc9eccc[_0x3485d2]['item']['startIndex']=_0x3485d2,_0xc9eccc[_0x3485d2]['item']['endIndex']=_0x3485d2,_0xc9eccc[_0x3485d2]['pairId']=null;}_0xc9eccc[_0x3485d2]['markersStart']||(_0xc9eccc[_0x3485d2]['markersStart']=[],_0xc9eccc[_0x3485d2]['markersEnd']=[]);}}_markInsertions(_0x319825,_0x2cfa4e){const _0x12f77c=_0x319825['filter'](_0x464973=>!_0x464973['isAdded']);for(let _0x4b5f1c=0x0;_0x4b5f1c<_0x2cfa4e['length'];_0x4b5f1c++)_0x2cfa4e[_0x4b5f1c]['isAdded']&&(_0x12f77c[_0x4b5f1c]['isAdded']=_0x2cfa4e[_0x4b5f1c]['isAdded']);}_getDiff(_0x4d4052,_0x2fa46f=null){const _0x11b80f=this['repository']['getRevision'](_0x4d4052),_0x42fcec=_0x2fa46f?this['repository']['getRevision'](_0x2fa46f):null,_0x467387=this['_getRevisionsRange'](_0x11b80f,_0x42fcec),_0x164c84=_0x467387[_0x467387['length']-0x1],_0x3d86cf=new Map(),_0x176bb0={'model':{},'attributes':{},'changes':[]},_0x3ce5ee=new Set(),_0x5786f6=new Map();for(let _0x2a3a20=_0x467387['length']-0x1;_0x2a3a20>=0x0;_0x2a3a20--){const _0x590ebf=_0x467387[_0x2a3a20];for(const _0x489fbf of Object['keys'](_0x590ebf['diffData']))if(_0x590ebf['diffData'][_0x489fbf]['attachChange']){const _0x571ceb=_0x590ebf['diffData'][_0x489fbf]['attachChange'];_0x571ceb['isAttached']?(_0x3ce5ee['add'](_0x489fbf),_0x5786f6['has'](_0x489fbf)&&_0x5786f6['get'](_0x489fbf)['userId']==_0x571ceb['userId']?_0x5786f6['delete'](_0x489fbf):_0x5786f6['set'](_0x489fbf,_0x571ceb)):_0x5786f6['has'](_0x489fbf)?(_0x3ce5ee['delete'](_0x489fbf),_0x5786f6['delete'](_0x489fbf)):(_0x3ce5ee['add'](_0x489fbf),_0x5786f6['set'](_0x489fbf,_0x571ceb));}else _0x3ce5ee['add'](_0x489fbf);}for(const _0x39d862 of _0x3ce5ee){const _0x44999f=_0x5786f6['has'](_0x39d862)&&!_0x5786f6['get'](_0x39d862)['isAttached'];let _0x5383fb=_0x44999f?_0x467387['length']-0x1:0x0;const _0x3f92db=_0x44999f?-0x1:0x1;for(;_0x467387[_0x5383fb];){const _0x456bca=_0x467387[_0x5383fb];if(_0x456bca['diffData'][_0x39d862]){const _0x3453c1=_0x44999f?_0x456bca['diffData'][_0x39d862]['attributesBefore']:_0x456bca['diffData'][_0x39d862]['attributesAfter'];_0x176bb0['attributes'][_0x39d862]=_0x3453c1?_0x1ebade(_0x3453c1):{};break;}_0x5383fb+=_0x3f92db;}}for(const _0x2535f2 of _0x467387){_0x2535f2['model']={};for(const _0x30fd40 of _0x2535f2['authors'])_0x3d86cf['set'](_0x30fd40['id'],_0x30fd40);for(const _0x3c3f39 of _0x3ce5ee){const _0x754d6b=_0x2535f2['diffData'][_0x3c3f39]?_0x2535f2['diffData'][_0x3c3f39]['insertions']:'[]',_0x10dd3c=_0x2535f2['diffData'][_0x3c3f39]?_0x2535f2['diffData'][_0x3c3f39]['deletions']:'[]',_0x467c17=_0x2535f2['diffData'][_0x3c3f39]?.['rootElementName']||'$root';_0x2535f2['model'][_0x3c3f39]={'insertions':this['_utils']['_makeModelFromViewString'](_0x754d6b,_0x467c17),'deletions':this['_utils']['_makeModelFromViewString'](_0x10dd3c,_0x467c17)};}}for(const _0x53ad40 of _0x3ce5ee){let _0x59419f=null,_0x5679cd=0x0;const _0x25568e=_0x467387['map'](_0x19fd75=>_0x19fd75['diffData'][_0x53ad40]?.['rootElementName'])['find'](_0x3e9ac6=>void 0x0!==_0x3e9ac6)||'$root',_0x5bb2b7=new Map(Array['from'](_0x11b80f['model'][_0x53ad40]['insertions']['markers'])['filter'](([_0x41e33a])=>!_0x41e33a['startsWith']('revision:')));let _0x55247d=0x0;for(const _0x37e5a1 of _0x467387){const _0x53b97a=_0x37e5a1['diffData'][_0x53ad40]?.['aiSources']||{},_0x4e77d3=this['_makeTape'](_0x37e5a1['model'][_0x53ad40]['insertions'],_0x53b97a);_0x37e5a1==_0x11b80f?(_0x59419f=_0x4e77d3,_0x5679cd=_0x59419f['length'],_0x59419f['forEach'](_0x35d1b6=>{_0x35d1b6['id']=_0x55247d++;}),this['_processTape'](_0x59419f)):this['_markInsertions'](_0x59419f,_0x4e77d3);const _0x1795a4=_0x59419f['filter'](_0x124c64=>!_0x124c64['isAdded'])['map'](_0x4603f0=>_0x4603f0['id']);let _0x54232a=0x0;const _0xb5c3a7=this['_makeTape'](_0x37e5a1['model'][_0x53ad40]['deletions'],_0x53b97a);_0xb5c3a7['forEach'](_0x9191a4=>{_0x9191a4['isRemoved']?_0x9191a4['id']=_0x5679cd++:_0x9191a4['id']=_0x1795a4[_0x54232a++];}),this['_processTape'](_0xb5c3a7),this['_setDistance'](_0x59419f,'isAdded'),this['_setDistance'](_0xb5c3a7,'isRemoved'),_0x37e5a1==_0x11b80f&&this['_markMarkers'](_0x59419f,_0x5bb2b7),_0x59419f=this['_joinTapes'](_0x59419f,_0xb5c3a7),this['_refreshStartEndIndex'](_0x59419f),this['_setDistance'](_0x59419f,'isRemoved');}_0x59419f=_0x59419f['filter'](_0x1c5eb4=>!(_0x1c5eb4['isAdded']&&_0x1c5eb4['isRemoved']));const _0x2deea7=new Map(_0x164c84['model'][_0x53ad40]['deletions']['markers']),_0x298036=new Set(_0x5bb2b7['keys']());for(const _0x549ff5 of _0x2deea7['keys']())_0x298036['delete'](_0x549ff5);const _0x1236aa=Object['assign']({},..._0x467387['map'](_0x4a9049=>_0x4a9049['diffData'][_0x53ad40]?.['aiSources']));this['_markSuggestions'](_0x59419f,_0x298036,_0x1236aa),this['_fixObsoleteTags'](_0x59419f),_0x59419f=this['_removeMissingPairs'](_0x59419f),_0x59419f=this['_markMismatchedRemovedTags'](_0x59419f),_0x59419f=this['_removeUnsupportedChanges'](_0x59419f);const {root:_0x4de46a,changes:_0x16f39d}=this['_makeModelFromTape'](_0x59419f,_0x3d86cf,_0x53ad40,_0x25568e);_0x176bb0['model'][_0x53ad40]=_0x4de46a;const _0x2662fc=_0x5786f6['get'](_0x53ad40);if(_0x2662fc){const _0x118774=_0x3d86cf['get'](_0x2662fc['userId']),_0xcd21a6=new Mt({'author':_0x118774,'type':_0x2662fc['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x53ad40});_0x16f39d['unshift'](_0xcd21a6),_0x176bb0['attributes'][_0x53ad40]['revisionHistoryAttachChange']=_0xcd21a6['id'];}_0x176bb0['changes']=_0x176bb0['changes']['concat'](_0x16f39d);}return _0x176bb0;}['_markMarkers'](_0x26b89a,_0x223414){for(let _0x2261bf=0x0;_0x2261bf<_0x26b89a['length'];_0x2261bf++)for(const [_0x2b35c5,_0x38fdff]of _0x223414)!_0x38fdff['isCollapsed']&&_0x38fdff['start']['isEqual'](_0x26b89a[_0x2261bf]['previousPosition'])&&_0x26b89a[_0x2261bf]['markersStart']['push'](_0x2b35c5),_0x38fdff['end']['isEqual'](_0x26b89a[_0x2261bf]['nextPosition'])&&_0x26b89a[_0x2261bf]['markersEnd']['push'](_0x2b35c5);}['_joinTapes'](_0xfa9a1,_0x2221c3){let _0x3f948a=[],_0x2362ed=0x0,_0xe988a4=0x0;for(;_0x2362ed<_0xfa9a1['length']||_0xe988a4<_0x2221c3['length'];){const _0x2f9d92=_0xfa9a1[_0x2362ed]||{},_0x322186=_0x2221c3[_0xe988a4]||{};if(_0x2f9d92['id']==_0x322186['id'])_0x2362ed++,_0xe988a4++,_0x3f948a['push'](_0x2f9d92);else{if(_0x322186['isRemoved']&&_0x2f9d92['isAdded']){const {commonTape:_0x398710,iEnd:_0x8ae0a8,jEnd:_0xbe19a4}=this['_threeWayMerge'](_0xfa9a1,_0x2362ed,_0x2221c3,_0xe988a4);_0x3f948a=_0x3f948a['concat'](_0x398710),_0x2362ed=_0x8ae0a8,_0xe988a4=_0xbe19a4;}else _0x322186['isRemoved']?(_0xe988a4++,_0x3f948a['push'](_0x322186)):(_0x2362ed++,_0x3f948a['push'](_0x2f9d92));}}return _0x3f948a;}_markSuggestions(_0x4168aa,_0xbf9893,_0x4e7810){const _0x13e628=[];for(let _0x375b60=0x0;_0x375b60<_0x4168aa['length'];_0x375b60++){for(let _0x3be4f7=0x0;_0x3be4f7<_0x4168aa[_0x375b60]['markersStart']['length'];_0x3be4f7++){const _0x317fad=_0x4168aa[_0x375b60]['markersStart'][_0x3be4f7];if(!_0xbf9893['has'](_0x317fad))continue;const {group:_0x434dbd,type:_0x577af1,authorId:_0x555f1a}=_0x212d8d(_0x317fad);if('revision-suggestion'!=_0x434dbd||'insertion'!=_0x577af1&&'deletion'!=_0x577af1)continue;const _0x439b62=_0x4e7810['suggestion:'+_0x317fad['slice'](0x14)]||null;_0x13e628['unshift']({'type':_0x577af1,'name':_0x317fad,'userId':_0x555f1a,'aiSource':_0x439b62}),_0x4168aa[_0x375b60]['markersStart']['splice'](_0x3be4f7,0x1),_0x3be4f7--;}_0x16e0ac(_0x4168aa[_0x375b60]);for(let _0x922f26=0x0;_0x922f26<_0x4168aa[_0x375b60]['markersEnd']['length'];_0x922f26++){const _0x3570ff=_0x4168aa[_0x375b60]['markersEnd'][_0x922f26];if(!_0xbf9893['has'](_0x3570ff))continue;const {group:_0x30de37,type:_0x383ecd}=_0x212d8d(_0x3570ff);if('revision-suggestion'!=_0x30de37||'insertion'!=_0x383ecd&&'deletion'!=_0x383ecd)continue;_0x4168aa[_0x375b60]['markersEnd']['splice'](_0x922f26,0x1),_0x922f26--;const _0x1a5ab7=_0x13e628['findIndex'](_0x3a44b0=>_0x3a44b0['name']==_0x3570ff);_0x1a5ab7>-0x1&&_0x13e628['splice'](_0x1a5ab7,0x1);}}function _0x212d8d(_0x3c8024){const _0x7be001=_0x3c8024['split'](':');return{'group':_0x7be001[0x0],'type':_0x7be001[0x1],'subType':_0x7be001['length']>=0x5?_0x7be001[0x2]:null,'id':_0x7be001['length']<0x5?_0x7be001[0x2]:_0x7be001[0x3],'authorId':_0x7be001['length']<0x5?_0x7be001[0x3]:_0x7be001[0x4],'markerCount':0x6==_0x7be001['length']?_0x7be001[0x5]:null};}function _0x16e0ac(_0x1389b7){for(let _0x2b600f=0x0;_0x2b600f<_0x13e628['length'];_0x2b600f++){if(_0x1389b7['isAdded']&&'insertion'==_0x13e628[_0x2b600f]['type']&&_0x1389b7['isAdded']['userId']==_0x13e628[_0x2b600f]['userId'])return _0x1389b7['isAddSuggestion']={..._0x13e628[_0x2b600f],'aiSource':_0x1389b7['isAdded']['aiSource']||_0x13e628[_0x2b600f]['aiSource']},void delete _0x1389b7['isAdded'];if(!_0x1389b7['isAdded']&&!_0x1389b7['isRemoved']&&'deletion'==_0x13e628[_0x2b600f]['type'])return void(_0x1389b7['isRemoveSuggestion']=_0x13e628[_0x2b600f]);}}}_setDistance(_0x530ab9,_0x599aba){let _0x3476fc=0x0,_0x9582aa=!0x1;const _0x50b165=new Map();for(const _0x132b6f of _0x530ab9)_0x132b6f[_0x599aba]?_0x9582aa&&(_0x3476fc++,_0x9582aa=!0x1):(_0x3476fc++,_0x9582aa=!0x0),_0x50b165['set'](_0x132b6f['id'],_0x3476fc);for(let _0x2e5e72=0x0;_0x2e5e72<_0x530ab9['length'];_0x2e5e72++){if('isRemoved'==_0x599aba&&_0x530ab9[_0x2e5e72]['isAdded']||'isAdded'==_0x599aba&&_0x530ab9[_0x2e5e72]['isRemoved'])continue;if('text'==_0x530ab9[_0x2e5e72]['type']){_0x530ab9[_0x2e5e72]['distance']=0x0;continue;}const _0x1ce8a8=_0x50b165['get'](_0x530ab9[_0x2e5e72]['pairId']),_0x17e58c=_0x50b165['get'](_0x530ab9[_0x2e5e72]['id']);_0x530ab9[_0x2e5e72]['distance']=_0x1ce8a8-_0x17e58c;}}_getRevisionsRange(_0x161f07,_0x1d6cd3,_0x39ef60=!0x1){const _0x34c453=[];let _0x482887=this['repository']['getIndex'](_0x161f07),_0x5eaf7e=this['repository']['getIndex'](_0x1d6cd3);for(-0x1==_0x5eaf7e&&(_0x5eaf7e=this['repository']['_revisions']['length'],_0x39ef60=!0x1);_0x482887<_0x5eaf7e;)_0x34c453['push'](this['repository']['getRevision'](_0x482887)),_0x482887++;return _0x39ef60&&_0x34c453['push'](this['repository']['getRevision'](_0x482887)),_0x34c453;}_threeWayMerge(_0x40ea91,_0x4bec68,_0x32f2b2,_0x203a92){const _0x417a24=this['editor']['model']['schema'];let _0x46f666=_0x4bec68;for(;_0x40ea91[_0x46f666]&&_0x40ea91[_0x46f666]['isAdded'];)_0x46f666++;let _0x24c57d=_0x203a92;for(;_0x32f2b2[_0x24c57d]&&_0x32f2b2[_0x24c57d]['isRemoved'];)_0x24c57d++;_0x50c7e5(_0x40ea91,_0x4bec68,_0x46f666),_0x50c7e5(_0x32f2b2,_0x203a92,_0x24c57d);const _0x3b1b82=_0x32f2b2['slice'](_0x203a92,_0x24c57d)['concat'](_0x40ea91['slice'](_0x4bec68,_0x46f666));return _0x3b1b82['sort']((_0x5b87b2,_0x49a551)=>_0x5b87b2['side']!=_0x49a551['side']?_0x5b87b2['side']-_0x49a551['side']:_0x5b87b2['level']!=_0x49a551['level']?_0x5b87b2['level']-_0x49a551['level']:_0x5b87b2['distance']!=_0x49a551['distance']?_0x49a551['distance']-_0x5b87b2['distance']:!!_0x5b87b2['isAdded']!=!!_0x49a551['isAdded']?-0x1==_0x5b87b2['side']||0x0==_0x5b87b2['side']?_0x5b87b2['isAdded']?-0x1:0x1:_0x5b87b2['isAdded']?0x1:-0x1:_0x5b87b2['index']-_0x49a551['index']),{'commonTape':_0x3b1b82,'iEnd':_0x46f666,'jEnd':_0x24c57d};function _0x50c7e5(_0x4b28eb,_0x289f81,_0x351112){let _0x267de6=-0x1,_0x59009f=Number['POSITIVE_INFINITY'],_0x5d5d12=!0x0;for(let _0x2e9a30=_0x289f81;_0x2e9a30<_0x351112;_0x2e9a30++)if(_0x417a24['isInline'](_0x4b28eb[_0x2e9a30]['item'])||(_0x5d5d12=!0x1),_0x4b28eb[_0x2e9a30]['item']['startIndex']<_0x289f81&&(_0x267de6=_0x2e9a30),_0x4b28eb[_0x2e9a30]['item']['endIndex']>=_0x351112){_0x59009f=_0x2e9a30;break;}_0x5d5d12&&(_0x267de6=_0x351112-0x1);for(let _0xb11850=_0x289f81;_0xb11850<_0x351112;_0xb11850++)_0x4b28eb[_0xb11850]['side']=_0xb11850<=_0x267de6?-0x1:_0xb11850<_0x59009f?0x0:0x1,_0x4b28eb[_0xb11850]['index']=_0xb11850;let _0x1c8ba3=0x0;for(let _0xffe27c=_0x289f81;_0xffe27c<=_0x267de6;_0xffe27c++)0x0==_0x4b28eb[_0xffe27c]['distance']?_0x4b28eb[_0xffe27c]['level']=_0x1c8ba3:(_0x1c8ba3++,_0x4b28eb[_0xffe27c]['level']=_0x1c8ba3,_0x1c8ba3++);for(let _0xd5bdcd=_0x289f81;_0xd5bdcd<_0x351112;_0xd5bdcd++)0x0==_0x4b28eb[_0xd5bdcd]['side']&&(_0x4b28eb[_0xd5bdcd]['level']=_0x1c8ba3);_0x1c8ba3=0x0;for(let _0x28b23a=_0x351112-0x1;_0x28b23a>=_0x59009f;_0x28b23a--)0x0==_0x4b28eb[_0x28b23a]['distance']?_0x4b28eb[_0x28b23a]['level']=_0x1c8ba3:(_0x1c8ba3--,_0x4b28eb[_0x28b23a]['level']=_0x1c8ba3,_0x1c8ba3--);}}_fixObsoleteTags(_0x4956e1){const _0x2fdf71=new Map(),_0xb21a23=this['editor']['model']['schema'];for(let _0x182f02=0x1;_0x182f02<_0x4956e1['length'];_0x182f02++){let _0x96507c,_0x3e3bee,_0x5d644c;const _0x134923=_0x4956e1[_0x182f02],_0x51a28d=_0x4956e1[_0x182f02-0x1];if('text'==_0x134923['type'])continue;if(_0x134923['type']!=_0x51a28d['type'])continue;if(!_0xb21a23['isBlock'](_0x51a28d['item'])||_0xb21a23['isLimit'](_0x51a28d['item']))continue;if(!_0xb21a23['isBlock'](_0x134923['item'])||_0xb21a23['isLimit'](_0x134923['item']))continue;if((_0x4956e1[_0x182f02]['isAdded']||_0x4956e1[_0x182f02]['isAddSuggestion'])&&_0x4956e1[_0x182f02-0x1]['isRemoved'])_0x96507c=_0x4956e1[_0x182f02],_0x3e3bee=_0x4956e1[_0x182f02-0x1],_0x5d644c=_0x182f02-0x1;else{if(!_0x4956e1[_0x182f02]['isRemoved']||!_0x4956e1[_0x182f02-0x1]['isAdded']&&!_0x4956e1[_0x182f02-0x1]['isAddSuggestion'])continue;_0x96507c=_0x4956e1[_0x182f02-0x1],_0x3e3bee=_0x4956e1[_0x182f02],_0x5d644c=_0x182f02;}const _0x571082=_0x96507c['level']==_0x3e3bee['level'],_0x39211d=Math['abs'](_0x96507c['level'])<Math['abs'](_0x3e3bee['level'])&&0x0==_0x3e3bee['distance'];(_0x571082||_0x39211d)&&(_0x2fdf71['set'](_0x3e3bee['id'],_0x96507c['id']),_0x4956e1['splice'](_0x5d644c,0x1),_0x182f02--,_0x96507c['isAdded']=!0x1);}for(let _0x400922=0x0;_0x400922<_0x4956e1['length'];_0x400922++)_0x2fdf71['has'](_0x4956e1[_0x400922]['pairId'])&&(_0x4956e1[_0x400922]['pairId']=_0x2fdf71['get'](_0x4956e1[_0x400922]['pairId']));}['_removeMissingPairs'](_0x11abdf){const _0xda0a11=new Set(_0x11abdf['map'](_0x188d82=>_0x188d82['id']));for(let _0x1af0f8=0x0;_0x1af0f8<_0x11abdf['length'];_0x1af0f8++)_0xda0a11['has'](_0x11abdf[_0x1af0f8]['pairId'])||0x0==_0x11abdf[_0x1af0f8]['distance']||(_0x11abdf[_0x1af0f8]['isIncorrect']=!0x0);return _0x11abdf['filter'](_0x351cd5=>!_0x351cd5['isIncorrect']);}_markMismatchedRemovedTags(_0x51c066){const _0x17480f=new Set();for(let _0x4ccaf1=0x0;_0x4ccaf1<_0x51c066['length'];_0x4ccaf1++){if(_0x17480f['has'](_0x51c066[_0x4ccaf1]['id'])&&_0x51c066[_0x4ccaf1]['isRemoved']&&(_0x51c066[_0x4ccaf1]['isIncorrect']=!0x0),_0x51c066[_0x4ccaf1]['isIncorrect'])continue;if(0x0==_0x51c066[_0x4ccaf1]['distance'])continue;if('elementStart'!=_0x51c066[_0x4ccaf1]['type'])continue;if(null==_0x51c066[_0x4ccaf1]['pairId'])continue;let _0x57bd9c=_0x4ccaf1+0x1,_0x319692=0x0;for(;_0x51c066[_0x57bd9c]['id']!=_0x51c066[_0x4ccaf1]['pairId'];)'elementStart'==_0x51c066[_0x57bd9c]['type']?_0x319692++:'elementEnd'==_0x51c066[_0x57bd9c]['type']&&_0x319692--,_0x57bd9c++;if(0x0!=_0x319692){if(_0x51c066[_0x4ccaf1]['isRemoved'])_0x51c066[_0x4ccaf1]['isIncorrect']=!0x0;else{for(;_0x57bd9c!=_0x4ccaf1;)_0x51c066[_0x57bd9c]['isRemoved']&&0x0!=_0x51c066[_0x57bd9c]['distance']&&(_0x51c066[_0x57bd9c]['isIncorrect']=!0x0,_0x17480f['add'](_0x51c066[_0x57bd9c]['pairId'])),_0x57bd9c--;}}}return _0x51c066['filter'](_0x385035=>!_0x385035['isIncorrect']);}_removeUnsupportedChanges(_0x35f652){const _0x2aca18=this['editor']['model']['schema'];for(let _0x52d368=0x0;_0x52d368<_0x35f652['length'];_0x52d368++){if(!(_0x35f652[_0x52d368]['isAdded']||_0x35f652[_0x52d368]['isAddSuggestion']||_0x35f652[_0x52d368]['isRemoved']||_0x35f652[_0x52d368]['isRemoveSuggestion']))continue;if(0x0==_0x35f652[_0x52d368]['distance'])continue;const _0x197d1c=_0x35f652[_0x52d368]['item'];_0x2aca18['isBlock'](_0x197d1c)||_0x2aca18['isLimit'](_0x197d1c)||(_0x35f652[_0x52d368]['isAdded']&&delete _0x35f652[_0x52d368]['isAdded'],_0x35f652[_0x52d368]['isAddSuggestion']&&delete _0x35f652[_0x52d368]['isAddSuggestion'],_0x35f652[_0x52d368]['isRemoveSuggestion']&&delete _0x35f652[_0x52d368]['isRemoveSuggestion'],_0x35f652[_0x52d368]['isRemoved']&&(_0x35f652[_0x52d368]['isIncorrect']=!0x0));}return _0x35f652['filter'](_0x3184b0=>!_0x3184b0['isIncorrect']);}['_makeModelFromTape'](_0x4b39f5,_0x3126eb,_0x3d4e65,_0x9eaa74){const _0xfe6f4b=new _0x49656a(),_0x1229bb=[],_0x54028b=new Map(),_0x16ed4d=this['editor']['model'],_0x32dff7=_0x16ed4d['schema'],_0x4db71a=[_0xfe6f4b],_0x2960bc={},_0x38a984={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0xfe6f4b['name']=_0x9eaa74;let _0x2e518e=null;const _0x1c9cc9=[0x0];for(let _0x382cd2=0x0;_0x382cd2<_0x4b39f5['length'];_0x382cd2++)if('elementStart'===_0x4b39f5[_0x382cd2]['type']){_0x4b39f5[_0x382cd2]['previousPosition']=_0x16ed4d['createPositionFromPath'](_0xfe6f4b,_0x1c9cc9);const _0x577929=new _0xf48e9f(_0x4b39f5[_0x382cd2]['item']['name'],_0x4b39f5[_0x382cd2]['item']['getAttributes']());_0x4db71a[0x0]['_appendChild'](_0x577929),_0x1c9cc9['push'](0x0),_0x4db71a['unshift'](_0x577929),_0x4b39f5[_0x382cd2]['nextPosition']=_0x16ed4d['createPositionFromPath'](_0xfe6f4b,_0x1c9cc9);}else'elementEnd'===_0x4b39f5[_0x382cd2]['type']?(_0x4db71a['shift'](),_0x4b39f5[_0x382cd2]['previousPosition']=_0x16ed4d['createPositionFromPath'](_0xfe6f4b,_0x1c9cc9),_0x1c9cc9['pop'](),_0x1c9cc9[_0x1c9cc9['length']-0x1]++,_0x4b39f5[_0x382cd2]['nextPosition']=_0x16ed4d['createPositionFromPath'](_0xfe6f4b,_0x1c9cc9)):(_0x4b39f5[_0x382cd2]['previousPosition']=_0x16ed4d['createPositionFromPath'](_0xfe6f4b,_0x1c9cc9),_0x2e518e?_0x2e518e['_data']+=_0x4b39f5[_0x382cd2]['item']['data']:_0x2e518e=new _0x339e9d(_0x4b39f5[_0x382cd2]['item']['data'],_0x4b39f5[_0x382cd2]['item']['getAttributes']()),_0x4b39f5[_0x382cd2+0x1]&&'text'===_0x4b39f5[_0x382cd2+0x1]['type']&&_0x49914e(_0x2e518e,_0x4b39f5[_0x382cd2+0x1]['item'])||(_0x4db71a[0x0]['_appendChild'](_0x2e518e),_0x2e518e=null),_0x1c9cc9[_0x1c9cc9['length']-0x1]+=_0x4b39f5[_0x382cd2]['item']['offsetSize'],_0x4b39f5[_0x382cd2]['nextPosition']=_0x16ed4d['createPositionFromPath'](_0xfe6f4b,_0x1c9cc9));for(let _0x52534f=0x0;_0x52534f<_0x4b39f5['length'];_0x52534f++){const _0xb67c0f=_0x4b39f5[_0x52534f]['previousPosition'],_0xc1d29e=_0x4b39f5[_0x52534f]['nextPosition'];for(const _0xfb8946 of _0x4b39f5[_0x52534f]['markersStart'])_0x54028b['set'](_0xfb8946,{'start':_0xb67c0f,'end':null});_0x3a2d50('isRemoveSuggestion',_0x52534f,_0xb67c0f,_0xc1d29e),_0x3a2d50('isAddSuggestion',_0x52534f,_0xb67c0f,_0xc1d29e),_0x3a2d50('isRemoved',_0x52534f,_0xb67c0f,_0xc1d29e),_0x3a2d50('isAdded',_0x52534f,_0xb67c0f,_0xc1d29e);for(const _0x22d00e of _0x4b39f5[_0x52534f]['markersEnd']){const _0xc2b40b=_0x54028b['get'](_0x22d00e);_0xc2b40b?_0xc2b40b['end']=_0xc1d29e:_0x54028b['set'](_0x22d00e,{'start':_0xc1d29e,'end':_0xc1d29e});}}for(const [_0x4d55bb,_0x51da79]of _0x54028b){const _0x4859f4=this['editor']['model']['createRange'](_0x51da79['start'],_0x51da79['end']);_0xfe6f4b['markers']['set'](_0x4d55bb,_0x4859f4);}return _0x1229bb['sort']((_0x4d8c4c,_0x4461fe)=>{const _0x25e85b=_0xfe6f4b['markers']['get']('revision:'+_0x4d8c4c['id']),_0x938cdc=_0xfe6f4b['markers']['get']('revision:'+_0x4461fe['id']);return _0x25e85b['start']['isBefore'](_0x938cdc['start'])?-0x1:_0x25e85b['start']['isAfter'](_0x938cdc['start'])?0x1:_0x25e85b['end']['isBefore'](_0x938cdc['end'])?-0x1:_0x25e85b['end']['isAfter'](_0x938cdc['end'])?0x1:'add'===_0x4d8c4c['type']?-0x1:0x1;}),{'root':_0xfe6f4b,'changes':_0x1229bb};function _0x3a2d50(_0x5d8b49,_0x465edd,_0x48e460,_0x2e75f2){const _0x137e9c=!!_0x4b39f5[_0x465edd][_0x5d8b49],_0x44883d=_0x137e9c?_0x4b39f5[_0x465edd][_0x5d8b49]['userId']:null,_0x378814=_0x137e9c&&_0x4b39f5[_0x465edd][_0x5d8b49]['aiSource']||null,_0xc12155=_0x465edd===_0x4b39f5['length']-0x1,_0x1060ea=_0x38a984[_0x5d8b49][0x0],_0x15eefd=_0x32dff7['isObject'](_0x4b39f5[_0x465edd]['item']);!_0x2960bc[_0x5d8b49]&&_0x137e9c?_0x2960bc[_0x5d8b49]={'start':_0x48e460,'tapeItem':_0x4b39f5[_0x465edd],'userId':_0x44883d,'aiSource':_0x378814,'type':_0x5d8b49}:_0x2960bc[_0x5d8b49]&&!_0x137e9c?(_0x2960bc[_0x5d8b49]['end']=_0x48e460,_0x2f2dbd(_0x2960bc[_0x5d8b49]),_0x2960bc[_0x5d8b49]=null):_0x2960bc[_0x5d8b49]&&_0x137e9c&&(_0x2960bc[_0x5d8b49]['userId']!==_0x44883d||_0x2960bc[_0x5d8b49]['aiSource']!==_0x378814)&&(_0x2960bc[_0x5d8b49]['end']=_0x48e460,_0x1060ea&&_0x1060ea['userId']===_0x2960bc[_0x5d8b49]['userId']?_0x1060ea['change']['aiSource']=_0x1060ea['change']['aiSource']||_0x2960bc[_0x5d8b49]['aiSource']:_0x2f2dbd(_0x2960bc[_0x5d8b49]),_0x2960bc[_0x5d8b49]={'start':_0x48e460,'tapeItem':_0x4b39f5[_0x465edd],'userId':_0x44883d,'aiSource':_0x378814,'type':_0x5d8b49}),_0x2960bc[_0x5d8b49]&&_0x15eefd&&('elementStart'!==_0x4b39f5[_0x465edd]['type']||_0x1060ea&&_0x1060ea['userId']===_0x44883d||_0x38a984[_0x5d8b49]['unshift']({'userId':_0x44883d,'object':_0x4b39f5[_0x465edd]['item'],'change':_0x2960bc[_0x5d8b49]}),'elementEnd'===_0x4b39f5[_0x465edd]['type']&&_0x1060ea&&_0x1060ea['object']===_0x4b39f5[_0x465edd]['item']&&(_0x38a984[_0x5d8b49]['shift'](),_0x2960bc[_0x5d8b49]=_0x1060ea['change'])),_0x2960bc[_0x5d8b49]&&_0xc12155&&(_0x2960bc[_0x5d8b49]['end']=_0x2e75f2,_0x2f2dbd(_0x2960bc[_0x5d8b49]),_0x2960bc[_0x5d8b49]=null);}function _0x2f2dbd({start:_0x333b02,end:_0x493b3e,tapeItem:_0x2145df,userId:_0x6ccc10,aiSource:_0x4a4b21,type:_0x3d5d5b}){const _0x4ce36a=_0x2145df['item'],_0x2d3c03=_0x16ed4d['schema']['isBlock'](_0x4ce36a)&&!_0x16ed4d['schema']['isLimit'](_0x4ce36a),_0x3a58f4=_0x333b02['nodeAfter']==_0x493b3e['parent']&&_0x493b3e['isAtStart'];if(_0x2d3c03&&_0x3a58f4)return;const _0x6a2449=_0x16ed4d['createRange'](_0x333b02,_0x493b3e),_0x11181d=_0x3126eb['get'](_0x6ccc10),_0x4c4062=new Mt({'author':_0x11181d,'type':'isAdded'==_0x3d5d5b||'isAddSuggestion'==_0x3d5d5b?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3d5d5b||'isRemoveSuggestion'==_0x3d5d5b,'aiSource':_0x4a4b21||null},'createdAt':new Date(),'rootName':_0x3d4e65});_0x1229bb['push'](_0x4c4062),_0xfe6f4b['markers']['set']('revision:'+_0x4c4062['id'],_0x6a2449);}function _0x49914e(_0x41d7cd,_0x45ad5f){const _0x4623f1=_0x41d7cd['getAttributes'](),_0x26f96a=_0x45ad5f['getAttributes']();for(const _0x5e3c51 of _0x4623f1){if(_0x5e3c51[0x1]!==_0x45ad5f['getAttribute'](_0x5e3c51[0x0]))return!0x1;_0x26f96a['next']();}return _0x26f96a['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x345139=>{const _0x190d19=_0x345139['markerName']['split'](':')[0x1],_0x9ed92c=this['_getChangeFromId'](_0x190d19);if(!_0x9ed92c)return null;const _0x30b39a='add'==_0x9ed92c['type']?'insertion':'deletion',_0x3763b4=['ck-suggestion-marker','ck-suggestion-marker-'+_0x30b39a];return _0x9ed92c['data']['isSuggestion']&&_0x3763b4['push']('ck-suggestion-marker-'+_0x30b39a+'-new'),this['activeChange']==_0x9ed92c&&_0x3763b4['push']('ck-suggestion-marker--active'),{'classes':_0x3763b4,'attributes':{'data-change-id':_0x190d19}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x622943=>{_0x622943['on']('element:pre',(_0xf25128,_0x462500,_0x3ace47)=>{const _0x3734c7=_0x462500['viewItem']['getChild'](0x0);if(!_0x3734c7||!_0x3734c7['is']('element','code'))return;if(!_0x3ace47['consumable']['consume'](_0x3734c7,{'attributes':['vid_start','vid_end']}))return;const _0x14a375=_0x462500['modelRange']['start']['nodeAfter'];_0x3ace47['writer']['setAttribute']('vid_start',_0x3734c7['getAttribute']('vid_start'),_0x14a375),_0x3ace47['writer']['setAttribute']('vid_end',_0x3734c7['getAttribute']('vid_end'),_0x14a375);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x108035=>{_0x108035['on']('element',(_0x26b1a6,_0x5bd226,_0x2ccc23)=>{if(!_0x2ccc23['consumable']['consume'](_0x5bd226['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5bd226['modelRange']['isCollapsed'])return;const _0xcb2d7b=_0x5bd226['modelRange']['start']['nodeAfter'];_0xcb2d7b['hasAttribute']('vid_start')||_0xcb2d7b['hasAttribute']('vid')||(_0x2ccc23['writer']['setAttribute']('vid_start',_0x5bd226['viewItem']['getAttribute']('vid_start'),_0xcb2d7b),_0x2ccc23['writer']['setAttribute']('vid_end',_0x5bd226['viewItem']['getAttribute']('vid_end'),_0xcb2d7b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x43bb36=>_0x43bb36['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x6b642c,[,_0x5c4f84])=>{['vid_start','vid_end','vid']['includes'](_0x5c4f84)&&(_0x6b642c['return']=!0x0,_0x6b642c['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3963a8=>{_0x3963a8['on']('attribute:vid',(_0x2516e4,_0x2fbb64,_0x1a80bf)=>{if('\x20'!=_0x2fbb64['item']['data']||_0x2fbb64['item']['parent']['maxOffset']>0x1)return;if(!_0x1a80bf['consumable']['consume'](_0x2fbb64['item'],_0x2516e4['name']))return;const _0x5cda11=_0x1a80bf['writer'],_0x22a1c0=_0x1a80bf['mapper']['toViewRange'](_0x2fbb64['range']);_0x5cda11['wrap'](_0x22a1c0,_0x5cda11['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1d4421){const _0x11e43f=_0x1d4421['plugins']['get']('RevisionViewer');return(_0x93453b,_0x2ac4a2,_0x5424e1)=>{const _0x5e1a70=_0x2ac4a2['markerName']['split'](':')[0x1],_0x43f010=_0x11e43f['_getChangeFromId'](_0x5e1a70);if(!_0x43f010)return null;const _0x2a8650='add'==_0x43f010['type']?'split':'merge';if(!_0x5424e1['consumable']['test'](_0x2ac4a2['markerRange'],_0x93453b['name']))return;const _0x537d58=_0x2ac4a2['markerRange']['getWalker'](),_0x449c5e=_0x2ac4a2['markerRange']['start'],_0x832dcf=_0x1d4421['model']['schema'];let _0x14a84c=null,_0x541b60=null,_0x395aed=!0x1,_0x2361d5=!0x1;for(const _0x4b7650 of _0x537d58){const _0x3bf6db=_0x4b7650['item'];_0x395aed=_0x395aed||_0x832dcf['isContent'](_0x3bf6db);const _0x5d5068=_0x5424e1['mapper']['toViewElement'](_0x3bf6db);if(_0x5d5068&&_0x5d5068['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4b7650['type']&&(_0x832dcf['isBlock'](_0x3bf6db)&&!_0x832dcf['isLimit'](_0x3bf6db)&&(_0x3bf6db['nextSibling']||_0x449c5e['isAtEnd']?_0x14a84c&&_0x14a84c['parent']==_0x3bf6db||(_0x14a84c=_0x3bf6db,_0x38347b(_0x4b7650['previousPosition']),_0x2361d5=!0x0):_0x541b60=_0x541b60||_0x4b7650['previousPosition']));}function _0x38347b(_0x1dad00){const _0x5e8b6c=_0x5424e1['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2a8650}),_0x167703=_0x5424e1['mapper']['toViewPosition'](_0x1dad00);_0x43f010['data']['isSuggestion']&&_0x5424e1['writer']['addClass']('ck-suggestion-marker-'+_0x2a8650+'-new',_0x5e8b6c),_0x11e43f['activeChange']==_0x43f010&&_0x5424e1['writer']['addClass']('ck-suggestion-marker--active',_0x5e8b6c),_0x5424e1['writer']['insert'](_0x167703,_0x5e8b6c),_0x5424e1['mapper']['bindElementToMarker'](_0x5e8b6c,_0x2ac4a2['markerName']);}_0x395aed||_0x2361d5||!_0x541b60||_0x38347b(_0x541b60);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x111e80,_0x26e8f4,_0x4cf99b)=>{const _0x588b46=_0x4cf99b['mapper']['markerNameToElements'](_0x26e8f4['markerName']);if(_0x588b46){for(const _0xb42d2 of _0x588b46)(_0xb42d2['hasClass']('ck-suggestion-marker-split')||_0xb42d2['hasClass']('ck-suggestion-marker-merge'))&&(_0x4cf99b['mapper']['unbindElementFromMarkerName'](_0xb42d2,_0x26e8f4['markerName']),_0x4cf99b['writer']['remove'](_0xb42d2));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x352f53,_0x485931,_0x16e4e4)=>{const _0x1b0a07=_0x485931['markerName']['split'](':')[0x1],_0x3b1841=this['_getChangeFromId'](_0x1b0a07);if(!_0x3b1841)return null;const _0x48d731='add'==_0x3b1841['type']?'split':'merge';if(_0x16e4e4['consumable']['test'](_0x485931['markerRange'],_0x352f53['name']))for(const _0x10dd4a of _0x485931['markerRange']['getItems']()){if(!_0x10dd4a['is']('element','softBreak'))continue;const _0x45a51e=_0x16e4e4['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x48d731}),_0x25e738=_0x16e4e4['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x10dd4a));_0x3b1841['data']['isSuggestion']&&_0x16e4e4['writer']['addClass']('ck-suggestion-marker-'+_0x48d731+'-new',_0x45a51e),this['activeChange']==_0x3b1841&&_0x16e4e4['writer']['addClass']('ck-suggestion-marker--active',_0x45a51e),_0x16e4e4['writer']['insert'](_0x25e738,_0x45a51e),_0x16e4e4['mapper']['bindElementToMarker'](_0x45a51e,_0x485931['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x39a34f=>{for(const _0x5203b6 of this['editor']['model']['document']['getRootNames']()){const _0xd54f54=this['editor']['model']['document']['getRoot'](_0x5203b6),_0x8f1b73=this['editor']['editing']['view']['document']['getRoot'](_0x5203b6);if(_0x8f1b73){const _0x42c0fb=_0xd54f54['getAttribute']('revisionHistoryAttachChange');if(_0x39a34f['removeAttribute']('data-change-id',_0x8f1b73),_0x39a34f['removeClass']('ck-revision-history-root-add',_0x8f1b73),_0x39a34f['removeClass']('ck-revision-history-root-remove',_0x8f1b73),_0x39a34f['removeClass']('ck-revision-history-root--active',_0x8f1b73),_0x42c0fb){const _0x332ccf=this['_getChangeFromId'](_0x42c0fb);if(!_0x332ccf)return null;_0x39a34f['setAttribute']('data-change-id',_0x42c0fb,_0x8f1b73),_0x39a34f['addClass']('ck-revision-history-root-'+_0x332ccf['type'],_0x8f1b73),this['activeChange']==_0x332ccf&&_0x39a34f['addClass']('ck-revision-history-root--active',_0x8f1b73);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1677a6=>'revision-comment:'+_0x1677a6,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x4f9516=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x4f9516['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x49889b=>'revision-suggestion:'+_0x49889b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x26edb1=>({'name':'suggestion:'+_0x26edb1,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5b1dd0=>{const _0x4c6c4d=_0x5b1dd0['markerName']['split'](':')[0x1];return'insertion'!=_0x4c6c4d&&'deletion'!=_0x4c6c4d?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4c6c4d]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x4ba268,_0x21b1f7,_0x30c4ca)=>{const _0x4ab847=_0x30c4ca['mapper']['markerNameToElements'](_0x21b1f7['markerName']);if(_0x4ab847){for(const _0x41ec85 of _0x4ab847)_0x41ec85['is']('uiElement')&&(_0x30c4ca['mapper']['unbindElementFromMarkerName'](_0x41ec85,_0x21b1f7['markerName']),_0x30c4ca['writer']['remove'](_0x41ec85));}},{'priority':'high'});}_getChangeFromId(_0x32b618){return this['_changeIdToChange']['get'](_0x32b618);}_getViewForChange(_0x41a2b5){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x41a2b5,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x594645,_0x22c2cc,_0x4a86c6,_0x2cab2d)=>{_0x2cab2d&&this['_balloon']['remove'](_0x2cab2d),_0x4a86c6&&(this['_balloon']['add']({'view':_0x4a86c6,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0xb77098=this['editor']['editing'],_0x353cee=this['_getChangeFromId'](_0x4a86c6['changeId']);let _0xf6abc7;if(_0x353cee['data']['isOnRoot']){const _0x347069=_0xb77098['view']['getDomRoot'](_0x353cee['rootName']);_0xf6abc7=Array['from'](_0x347069['getClientRects']());}else{const _0x14b898=this['editor']['model']['markers']['get']('revision:'+_0x4a86c6['changeId']);_0xf6abc7=Array['from'](_0xb77098['mapper']['markerNameToElements'](_0x14b898['name']))['map'](_0x1c3b90=>_0xb77098['view']['domConverter']['mapViewToDom'](_0x1c3b90))['map'](_0x59ee3c=>Array['from'](_0x59ee3c['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0xf6abc7['find'](_0x5b64ed=>_0x5b64ed['top']-0x3<=this['_activeViewTarget']['y']&&_0x5b64ed['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x5b64ed['left']-0x3<=this['_activeViewTarget']['x']&&_0x5b64ed['right']+0x3>=this['_activeViewTarget']['x'])||_0xf6abc7[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0xb1b9f8,_0x4a1e3c,_0x2ceca6,_0x3fbcd)=>{this['activeView']=_0x2ceca6?this['_getViewForChange'](_0x2ceca6):null,this['editor']['model']['change'](()=>{const _0x474da5=this['editor']['editing'];_0x3fbcd&&(_0x3fbcd['data']['isOnRoot']?_0x474da5['view']['change'](_0x344a3e=>{_0x344a3e['removeClass']('ck-revision-history-root--active',_0x474da5['view']['document']['getRoot'](_0x3fbcd['rootName']));}):_0x474da5['reconvertMarker']('revision:'+_0x3fbcd['id'])),_0x2ceca6&&(_0x2ceca6['data']['isOnRoot']?_0x474da5['view']['change'](_0x1732e9=>{_0x1732e9['addClass']('ck-revision-history-root--active',_0x474da5['view']['document']['getRoot'](_0x2ceca6['rootName']));}):_0x474da5['reconvertMarker']('revision:'+_0x2ceca6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x418831,_0x22a938)=>{if(this['activeChange'])return;const _0x59c17e=this['_findChangeIdFromDomTarget'](_0x22a938['target']),_0x540c30=this['_changeIdToChange']['get'](_0x59c17e);_0x540c30?(this['_activeViewTarget']={'x':_0x22a938['domEvent']['x'],'y':_0x22a938['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x540c30)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x533bd4,_0x53ceec)=>{const _0x388467=this['_findChangeIdFromDomTarget'](_0x53ceec['target']),_0x16c6cc=this['_changeIdToChange']['get'](_0x388467);_0x16c6cc?(this['_activeViewTarget']={'x':_0x53ceec['domEvent']['x'],'y':_0x53ceec['domEvent']['y']},_0x16c6cc===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x16c6cc):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x8fdeeb){do{const _0x59913f=_0x8fdeeb['getAttribute']('data-change-id');if(_0x59913f)return _0x59913f;_0x8fdeeb=_0x8fdeeb['parent'];}while(_0x8fdeeb);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x3246e7=>{for(const _0x216435 of this['editor']['model']['markers'])_0x3246e7['removeMarker'](_0x216435);});}};function Ut(_0x196665){return _0x196665['split'](':')[0x1];}function Lt(_0x31f4c6,_0x11b641){return(_0x5390a3,_0x2149b1,_0x1bd616)=>{if(!_0x1bd616['consumable']['test'](_0x2149b1['markerRange'],_0x5390a3['name']))return;const _0x4a2dd5=_0x2149b1['markerRange']['getWalker'](),_0xea215c=_0x2149b1['markerRange']['start'],_0x5cbd5a=_0x31f4c6['model']['schema'];let _0x444f2c=null,_0x5bcd6c=null,_0x483cdc=!0x1,_0x1dc2d6=!0x1;for(const _0x82143 of _0x4a2dd5){const _0x2d93c1=_0x82143['item'];_0x483cdc=_0x483cdc||_0x5cbd5a['isContent'](_0x2d93c1);const _0x20d33e=_0x1bd616['mapper']['toViewElement'](_0x2d93c1);if(_0x20d33e&&_0x20d33e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x82143['type']&&(_0x5cbd5a['isBlock'](_0x2d93c1)&&!_0x5cbd5a['isLimit'](_0x2d93c1)&&(_0x2d93c1['nextSibling']||_0xea215c['isAtEnd']?_0x444f2c&&_0x444f2c['parent']==_0x2d93c1||(_0x444f2c=_0x2d93c1,_0x76818f(_0x82143['previousPosition']),_0x1dc2d6=!0x0):_0x5bcd6c=_0x5bcd6c||_0x82143['previousPosition']));}function _0x76818f(_0x3120ef){const _0x3aacff=_0x1bd616['mapper']['toViewPosition'](_0x3120ef),_0x749051=_0x1bd616['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x11b641});_0x1bd616['writer']['insert'](_0x3aacff,_0x749051),_0x1bd616['mapper']['bindElementToMarker'](_0x749051,_0x2149b1['markerName']);}_0x483cdc||_0x1dc2d6||!_0x5bcd6c||_0x76818f(_0x5bcd6c);};}var Ft=class extends _0x321013{constructor(_0x345f58){super(_0x345f58);const _0x3d2c65=_0x345f58['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x3d2c65,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3d2c65,'change:isEnabled',()=>this['refresh']());}execute(){const _0x1bda4a=this['editor'],_0x15cd81=_0x1bda4a['plugins']['get'](Pt),_0x12f377=_0x15cd81['isReady']?_0x15cd81['diff']['newRevisionId']:null;_0x1bda4a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x12f377);}['refresh'](){const {isReady:_0x514985,isEnabled:_0x3e4803,repository:_0x351cd7,diff:_0x154b25}=this['editor']['plugins']['get'](Pt),_0x4d468f=_0x154b25&&_0x351cd7['getLaterVisibleRevision'](_0x154b25['newRevisionId']);this['isEnabled']=_0x514985&&_0x3e4803&&Boolean(_0x4d468f);}},$t=class extends _0x321013{_step;constructor(_0x13ea60,{direction:_0x510023}){super(_0x13ea60);const _0x146475=_0x13ea60['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x510023?0x1:-0x1,this['listenTo'](_0x146475,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x146475,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x146475,'change:activeChange',()=>this['refresh']());}execute(){const _0x4e7f6d=this['editor'],_0x4dccf8=_0x4e7f6d['plugins']['get'](Pt),{isNavigationMode:_0x2f0db3,currentChangeNumber:_0x149c53}=_0x4dccf8;let _0x481200;if(_0x4dccf8['activeChange']=_0x2f0db3?_0x4dccf8['diff']['changes']['get'](_0x149c53+this['_step']):_0x4dccf8['diff']['changes']['first'],_0x4dccf8['activeChange']['data']['isOnRoot'])_0x481200=_0x4e7f6d['editing']['view']['getDomRoot'](_0x4dccf8['activeChange']['rootName']);else{const _0x9bf710=_0x4e7f6d['model']['markers']['get']('revision:'+_0x4dccf8['activeChange']['id']);_0x481200=_0x445e6f(_0x4e7f6d['editing'],_0x9bf710);}_0x273e11({'target':_0x481200,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x50bfb6,currentChangeNumber:_0x166899,numberOfChanges:_0x5cd554,isReady:_0x49e64e,isEnabled:_0x2e239e}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x2e239e&&_0x49e64e&&_0x5cd554)&&(!_0x50bfb6||(0x1===this['_step']?_0x166899<_0x5cd554-0x1:_0x166899>0x0));}},Bt=class extends dt{constructor(_0x3708d9){super(_0x3708d9);const _0x1c8bb4=this['bindTemplate'],_0xb7243a=new _0x17c303(_0x3708d9),_0xcae676=new _0x17c303(_0x3708d9);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',(_0x1190dd,_0x1f1966)=>_0x1190dd&&_0x1f1966>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4eaee6,_0x103158,_0x4a2dfd,_0x18363e)=>{if(!_0x4eaee6)return kt(_0x3708d9,'Loading...');if(!_0x4a2dfd)return kt(_0x3708d9,'No\x20changes');const _0x4ca68e=kt(_0x3708d9,'NUMBER_OF_CHANGES',_0x4a2dfd);return _0x18363e?kt(_0x3708d9,'X_OF_Y_CHANGES',[_0x103158+0x1,_0x4a2dfd]):_0x4ca68e;}),_0xb7243a['set']({'label':kt(_0x3708d9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1e827e}),_0xcae676['set']({'label':kt(_0x3708d9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xec47db}),_0xb7243a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0xcae676['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xb7243a['on']('execute',()=>this['fire']('execute','backward')),_0xcae676['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',_0x1c8bb4['if']('_isStatusLabelVisible','ck-hidden',_0x2a0802=>!_0x2a0802)]},'children':[{'text':_0x1c8bb4['to']('isNavigationMode',_0x41445d=>_0x41445d?kt(_0x3708d9,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x3708d9,'Total')+':\x20')}]},{'text':_0x1c8bb4['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xb7243a,_0xcae676]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x20938f{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5a0929=this['editor']['editing']['view'];_0x5a0929['change'](_0x44862c=>{for(const _0x3b5200 of _0x5a0929['document']['roots'])_0x44862c['addClass'](jt,_0x3b5200);});}['hide'](){const _0x1e0f20=this['editor']['editing']['view'];_0x1e0f20['change'](_0x5a7db6=>{for(const _0x58eec0 of _0x1e0f20['document']['roots'])_0x5a7db6['removeClass'](jt,_0x58eec0);});}},Kt=class extends _0x20938f{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x5569a9=this['editor'],_0x4f6bc4=_0x5569a9['plugins']['get'](Pt),_0x468371=_0x5569a9['plugins']['get'](Gt);_0x5569a9['ui']['componentFactory']['add']('exitToEditing',_0x54a01d=>{const _0x295834=new _0x17c303(_0x54a01d);return _0x295834['set']({'label':kt(_0x54a01d,'Back\x20to\x20editing'),'icon':_0x174cc5,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x295834,'execute',()=>{_0x5569a9['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x295834;}),_0x5569a9['ui']['componentFactory']['add']('restoreRevision',_0x1939d9=>{const _0x2baf37=new _0x17c303(_0x1939d9);return _0x2baf37['set']({'label':kt(_0x1939d9,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2baf37['bind']('isEnabled')['to'](_0x5569a9['commands']['get']('restoreRevision')),this['listenTo'](_0x2baf37,'execute',()=>_0x5569a9['execute']('restoreRevision')),_0x2baf37;}),_0x5569a9['ui']['componentFactory']['add']('changesNavigation',_0x43c4f3=>{const _0x1d22e9=new Bt(_0x43c4f3),_0x49da97=_0x5569a9['commands']['get']('showPreviousChange'),_0x7e9a36=_0x5569a9['commands']['get']('showNextChange');return _0x1d22e9['bind']('isBackwardNavigationEnabled')['to'](_0x49da97,'isEnabled'),_0x1d22e9['bind']('isForwardNavigationEnabled')['to'](_0x7e9a36,'isEnabled'),_0x1d22e9['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4f6bc4),this['listenTo'](_0x1d22e9,'execute',(_0x2053ae,_0x50d0e0)=>{_0x5569a9['execute']('forward'===_0x50d0e0?'showNextChange':'showPreviousChange');}),_0x1d22e9;}),_0x468371['show'](),_0x4f6bc4['on']('change:isReady',(_0x113ff6,_0x3f0ad3,_0x4ca0b8)=>{_0x4ca0b8?_0x468371['hide']():_0x468371['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x4b7862,_0x561daa){super(_0x4b7862,_0x561daa);const _0x1d2012=this['bindTemplate'];this['set']({'label':kt(_0x4b7862,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x4b7862,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x1d2012['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1952cf(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0xeca549=this['fieldView']['element'];this['_tooltipString']=_0xeca549['scrollWidth']>_0xeca549['clientWidth']&&_0xeca549['value']||'';}},Yt=class extends dt{constructor(_0x4a2be6,_0x3d36be,_0x127000){super(_0x4a2be6);const _0x1c5ad0=new _0x1af692();_0x1c5ad0['set']({'content':_0x329dc5,'viewBox':'0\x200\x2011\x2010'});const _0x2a182e=['ck','ck-revision-history-sidebar__revision-author'];_0x127000&&_0x2a182e['push']('ck-revision-history-sidebar__revision-author_creator');const _0x4fc5d6=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x4a2be6,_0x127000?'Revision\x20creator':'Revision\x20author')},'children':[_0x1c5ad0,_0x3d36be['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2a182e},'children':_0x4fc5d6});}};function Jt(_0x3daade,_0x555730){const _0x2a6464=_0x3daade['bindTemplate'],_0xc0946c=_0x3daade['locale'],_0x1b89ed=vt(_0xc0946c);_0x1b89ed['panelPosition']='sw';const _0x23c5af=function(_0x84ef7f,_0x2f902e){const _0x46280c=function(_0x14f80a,_0x46bc26){const _0x34e4d7=_0x14f80a['locale'],_0x175444={'Compare\x20against\x20selected':kt(_0x34e4d7,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x34e4d7,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x34e4d7,'Restore\x20this\x20revision')};return _0x46bc26['map'](_0x86f970=>{const _0x10f332=_0x175444[_0x86f970['name']];return _0x10f332&&_0x10f332!==_0x86f970['name']&&(_0x86f970['name']=_0x10f332),_0x86f970;});}(_0x84ef7f,_0x2f902e),_0x47feab=new _0x374b4a();for(const _0x108835 of _0x46280c){const _0x4a523a={'type':'button','model':new ut({'label':_0x108835['name'],'class':_0x108835['class'],'withText':!0x0,'role':'menuitem','_action':_0x108835['action']})};_0x4a523a['model']['bind']('isEnabled')['to'](_0x84ef7f,'isActionsDropdownOpen',_0x35d0d9=>'function'!=typeof _0x108835['isEnabled']||(!_0x35d0d9||_0x108835['isEnabled'](_0x84ef7f))),_0x47feab['add'](_0x4a523a);}return _0x47feab;}(_0x3daade,_0x555730);return _0x3daade['bind']('isActionsDropdownOpen')['to'](_0x1b89ed,'isOpen'),_0x1b89ed['buttonView']['set']({'label':kt(_0xc0946c,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x35fa28}),_0x1b89ed['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2a6464['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2a6464['to'](_0x49c6e0=>_0x49c6e0['stopPropagation']())}}),_0x1b89ed['on']('execute',_0x1bc7aa=>{_0x3daade['isReady']&&'function'==typeof _0x1bc7aa['source']['_action']&&_0x1bc7aa['source']['_action'](_0x3daade);}),ft(_0x1b89ed,_0x23c5af,{'role':'menu'}),_0x1b89ed['listenTo'](_0x3daade,'change:isActionsDropdownOpen',(_0x5f0fd0,_0x559557,_0x29b252)=>{if(_0x29b252)for(const _0x1a0412 of _0x1b89ed['listView']['items']){const _0x1cb65a=_0x1a0412['children']['first'],_0x3c93fa=_0x555730['find'](_0x5667eb=>_0x5667eb['action']===_0x1cb65a['_action'])['isVisible'];_0x1a0412['isVisible']=void 0x0===_0x3c93fa||_0x3c93fa(_0x3daade);}}),_0x1b89ed;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x49b9ef,Collection as _0x1e053f,ElementReplacer as _0x259faf,FocusTracker as _0x4034d8,KeystrokeHandler as _0x222ccc,ObservableMixin as _0xf057d,ResizeObserver as _0xaab6cb,logWarning as _0x7d4db2,scrollViewportToShowTarget as _0x266468,trustedHtml as _0x29dae5,uid as _0x326452}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x4e6cfd,isEqual as _0x483d70,set as _0x29f44a,unset as _0x1c679a}from'es-toolkit/compat';import{Command as _0x94b04,Editor as _0x185c86,ElementApiMixin as _0x547b8f,PendingActions as _0x396caa,Plugin as _0x34a844}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x1409f6,PillView as _0x17a6ee,Users as _0x23e92a,getMarkerDomElement as _0x4916df,reRootOperation as _0x5199b1,reRootPosition as _0x26b89f,reRootRange as _0xc3abd6,sanitizeEditorConfig as _0x2e51b0}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x692490,ModelElement as _0x359124,ModelRange as _0x547e09,ModelText as _0x3a83c7,ViewAttributeElement as _0x380dc3,ViewContainerElement as _0x5d7fba,ViewDocumentFragment as _0x564c35,ViewElement as _0x26a1cb,ViewEmptyElement as _0x57c188,ViewRawElement as _0x3a1377,ViewText as _0xec11f2,ViewUIElement as _0x10c230}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x15e836,IconChevronUp as _0x2e4b52,IconHistory as _0x3cf8e9,IconSparkle as _0x587443,IconThreeVerticalDots as _0x256c1a,IconUndo as _0x1395d3,IconUser as _0x4934a2}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x1ce5c2,ButtonView as _0x2c5d24,ContextualBalloon as _0x29d110,CssTransitionDisablerMixin as _0xce83c1,EditorUI as _0x28d53c,IconView as _0x58acf7,InlineEditableUIView as tt,LabeledFieldView as it,ListItemView as et,ListView as st,MenuBarMenuListItemButtonView as nt,MenuBarMenuListItemView as ot,MenuBarMenuListView as rt,MenuBarMenuView as at,StickyPanelView as ht,ToolbarSeparatorView as ct,ToolbarView as lt,UIModel as ut,View as dt,addListToDropdown as ft,createDropdown as vt,createLabeledInputText as gt,normalizeToolbarConfig as mt,submitHandler as _t}from'@ckeditor/ckeditor5-ui';import{DateTime as wt}from'luxon';const pt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xf057d();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x564562){super(),this['id']=_0x564562['id']||_0x326452(),this['creator']=_0x564562['creator']||null,this['authors']=_0x564562['authors']||[],this['diffData']=_0x564562['diffData']||null,this['toVersion']=_0x564562['toVersion']||0x0,this['fromVersion']=_0x564562['fromVersion']||0x0,this['set']('name',_0x564562['name']||''),this['set']('createdAt',_0x564562['createdAt']||new Date()),this['set']('attributes',_0x564562['attributes']||{});}setName(_0x2a61ba){this['_update']({'name':_0x2a61ba});}setAttribute(_0x136eba,_0x54d1f5){const _0x15ca6f=_0x4e6cfd(this['attributes']);_0x29f44a(_0x15ca6f,_0x136eba,_0x54d1f5),this['_update']({'attributes':_0x15ca6f});}removeAttribute(_0x422add){const _0x1c97ee=_0x4e6cfd(this['attributes']);_0x1c679a(_0x1c97ee,_0x422add),this['_update']({'attributes':_0x1c97ee});}_update(_0x2d73cb,_0x1024b4=!0x1){let _0x359a23=!0x1;const _0x5b7060={'id':this['id']};for(const _0x182c5d of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x5a4a37=_0x2d73cb[_0x182c5d];void 0x0!==_0x5a4a37&&_0x5a4a37!==this[_0x182c5d]&&(this[_0x182c5d]=_0x5a4a37,_0x5b7060[_0x182c5d]=_0x5a4a37,_0x359a23=!0x0);}_0x359a23&&(_0x5b7060['authors']&&(_0x5b7060['authorsIds']=_0x5b7060['authors']['map'](_0x51f829=>_0x51f829['id']),delete _0x5b7060['authors']),this['fire']('_update',_0x5b7060,_0x1024b4));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4cb80e=>_0x4cb80e['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x34a844{['_revisions'];static get requires(){return[_0x23e92a];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x2370a9){super(_0x2370a9),this['_revisions']=new _0x1e053f();}afterInit(){!async function(_0x306252){const _0x2d55b1='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x16b6cb=0xeb829,_0x2b9b05=0x79788,_0x4c8bc8={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x4930d0(_0x468835){const _0x4e4286=new window['Promise'](_0x45d11f=>{_0x468835['once']('ready',_0x45d11f);}),_0x49460d=window['Date']['now'](),_0x6fe3f5=_0x468835['config']['get']('licenseKey');async function _0x38adde(){let _0x26f4c5,_0x53b753=null,_0x2b3952=null;try{return'GPL'==_0x6fe3f5?'NotAllowed':(_0x26f4c5=_0x4946c0(),_0x26f4c5?(_0x26f4c5['usageEndpoint']&&(_0x2b3952=_0x2f8b28(_0x26f4c5['usageEndpoint'],_0x26f4c5['jti'])),await _0x33b0e0()?_0xdd68df()?_0x22ed17()?'Expired':_0x1a0aec()?('evaluation'==_0x26f4c5['licenseType']&&(_0x53b753=_0x521312('EvaluationLimit')),await _0x30c35e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x22ed17(){const _0x4f664f=['evaluation','trial']['includes'](_0x26f4c5['licenseType'])?_0x49460d/0x3e8:0xe10*_0x2b9b05;return _0x26f4c5['exp']<_0x4f664f;}function _0xdd68df(){const _0x332a41=_0x26f4c5['features'];if(!_0x332a41)return!0x1;if(_0x332a41['includes']('*'))return!0x0;if(_0x332a41['includes']('RH'))return!0x0;if(_0x332a41['includes']('RRH')){if(_0x48d899())return!0x0;if(_0x2ecb52()||_0x183d18())return!0x0;}return!0x1;}function _0x1a0aec(){const _0x86b3cc=_0x26f4c5['licensedHosts'];if(!_0x86b3cc||0x0==_0x86b3cc['length'])return!0x0;const {hostname:_0x5d1235}=new URL(window['location']['href']);if(_0x86b3cc['includes'](_0x5d1235))return!0x0;const _0x4d08fb=_0x5d1235['split']('.');return _0x86b3cc['filter'](_0x210819=>_0x210819['includes']('*'))['map'](_0x1a58b4=>_0x1a58b4['split']('.'))['filter'](_0x468e46=>_0x468e46['length']<=_0x4d08fb['length'])['map'](_0x5018ff=>Array(_0x4d08fb['length']-_0x5018ff['length'])['fill']('*'===_0x5018ff[0x0]?'*':'')['concat'](_0x5018ff))['some'](_0x2848ef=>_0x4d08fb['every']((_0x4c9104,_0x5f4c1b)=>_0x2848ef[_0x5f4c1b]===_0x4c9104||'*'===_0x2848ef[_0x5f4c1b]));}function _0x30c35e(){return _0x53b753&&_0x2b3952?new window['Promise']((_0x215f00,_0x883a8b)=>{_0x53b753['then'](_0x215f00,_0x883a8b),_0x2b3952['then'](_0x6a38e1=>{'Valid'!=_0x6a38e1&&_0x215f00(_0x6a38e1);},_0x883a8b);}):_0x53b753||_0x2b3952||'Valid';}}function _0x2f8b28(_0x5aebeb,_0x13368b){return new window['Promise'](_0x597098=>{if(_0x199b24())return _0x597098('Valid');_0x4b5527(),_0x468835['decorate']('_sendUsageRequest');let _0x910995=!0x1;const _0x2b0455=_0x326452();function _0x48d387(_0x243ae3){return!!_0x243ae3&&('object'==typeof _0x243ae3||'function'==typeof _0x243ae3)&&'function'==typeof _0x243ae3['then']&&'function'==typeof _0x243ae3['catch'];}function _0x20dc31(_0x16e046){_0x566c4e(_0x16e046)['then'](_0x34dbca=>_0x34dbca&&'ok'==_0x34dbca['status']?_0x1e6618(_0x54f173(_0x2b0455+_0x13368b))!=_0x34dbca['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0xe13764=>(_0x31c974(),_0xe13764),()=>{const _0x108da8=_0x169296();return null==_0x108da8?(_0x31c974(),'Valid'):_0x49460d-_0x108da8>0x240c8400?'UsageLimit':'Valid';})['then'](_0x597098)['catch'](()=>{_0x597098('UsageLimit');});const _0x3f53d2=0x36ee80;function _0x31c974(){const _0x43589f='llct-'+_0x1e6618(_0x54f173(_0x5aebeb)),_0xd92c92=_0x45d151(_0x1e6618(window['Math']['ceil'](_0x49460d/_0x3f53d2)));window['localStorage']['setItem'](_0x43589f,_0xd92c92);}function _0x169296(){const _0x48308d='llct-'+_0x1e6618(_0x54f173(_0x5aebeb)),_0x46e108=window['localStorage']['getItem'](_0x48308d);return _0x46e108?window['parseInt'](_0x45d151(_0x46e108),0x10)*_0x3f53d2:null;}function _0x566c4e(_0x457cd9){return new window['Promise']((_0x1cd2f6,_0x29eee5)=>{_0x457cd9['then'](_0x1cd2f6,_0x29eee5),window['setTimeout'](_0x29eee5,0x1d4c0);});}}_0x468835['on']('_sendUsageRequest',(_0x4e6eb,_0x360da6)=>{if(_0x360da6[0x0]!=_0x5aebeb)return _0x597098('UsageLimit');_0x360da6[0x1]={..._0x360da6[0x1],'requestId':_0x2b0455};},{'priority':'high'}),_0x468835['on']('_sendUsageRequest',_0x59b2c3=>{_0x48d387(_0x59b2c3['return'])&&(_0x910995=!0x0,_0x20dc31(_0x59b2c3['return']));},{'priority':'low'}),_0x4e4286['then'](()=>{_0x910995||_0x597098('UsageLimit');});});function _0x199b24(){return'auto'==_0x468835['editing']['view']['_overlayModeHint'];}function _0x4b5527(){_0x468835['editing']['view']['_overlayModeHint']='auto';}}function _0x521312(_0x44f868){const _0x4aef2f=[new window['Promise'](_0x36a5be=>setTimeout(_0x36a5be,0x93ecc)),_0x4e4286['then'](()=>new window['Promise'](_0x3eb8bd=>{const _0x4ee94e=0x7,_0x45e2e8=_0x306252['_revisions'];function _0xdc3500(){_0x45e2e8['length']>=_0x4ee94e&&_0x3eb8bd();}_0xdc3500(),_0x45e2e8['on']('add',_0xdc3500);})),new window['Promise'](_0x26f98c=>{function _0x1bbdc1(){for(const _0x56ab72 in window)if(window['Number']['isNaN'](window['Number'](_0x56ab72))&&window[_0x56ab72]==_0x16b6cb)return _0x26f98c();'destroyed'!=_0x468835['state']&&window['setTimeout'](_0x1bbdc1,0x1388);}_0x206018('RevisionViewer')&&_0x1bbdc1();})];return window['Promise']['race'](_0x4aef2f)['then'](()=>_0x44f868);}async function _0x16cc0c(){if(await _0x4e4286,_0x206018('RevisionViewer')){const _0x12eb2b=_0x306252['getRevision'](0x0),_0x1325bb=_0x306252['getEarlierVisibleRevision'](_0x12eb2b['id']),_0x2b59fc=_0x5edd01('RevisionViewer');return await _0x2b59fc['compare'](_0x12eb2b['id'],_0x1325bb?_0x1325bb['id']:null,!0x0),_0x2b59fc['unbind']('isEnabled'),_0x2b59fc['isEnabled']=!0x1,_0x2b59fc['compare']=_0xa05d82,void(_0x2b59fc['_getDiff']=_0xa05d82);}if(_0x206018('RevisionTracker')){const _0x50e699=_0x5edd01('RevisionTracker');_0x50e699['unbind']('isEnabled'),_0x50e699['isEnabled']=!0x1,_0x50e699['update']=_0xa05d82,_0x50e699['saveRevision']=_0xa05d82;}_0x468835['model']['change']=_0xa05d82,_0x468835['model']['enqueueChange']=_0xa05d82,_0x468835['enableReadOnlyMode']('model');}function _0x48d899(){return _0x206018('WebSocketGateway')&&'connected'==_0x5edd01('WebSocketGateway')['state'];}function _0x2ecb52(){return _0x206018('RevisionViewerIntegration');}function _0x183d18(){return _0x206018('TrackChangesDataGetter');}function _0x43c1d0(_0x214810){const _0x26270c=_0x456a9f();_0x468835[_0x26270c]='revisionHistoryLicenseKey'+_0x214810,_0x214810['endsWith']('Limit')&&(window[_0x456a9f()]=_0x16b6cb),'Valid'!=_0x214810&&_0x16cc0c();}function _0x456a9f(){const _0x5e44e9=window['String'](window['performance']['now']())['replace']('.','');let _0x2d9da1='N';for(let _0xec702e=0x0;_0xec702e<_0x5e44e9['length'];_0xec702e+=0x2){let _0x40e1bb=window['parseInt'](_0x5e44e9['substring'](_0xec702e,_0xec702e+0x2));_0x40e1bb>=0x3e&&(_0x40e1bb-=0x3e),_0x2d9da1+=_0x2d55b1[_0x40e1bb];}return _0x2d9da1;}function _0x4946c0(){const _0x47e629=_0x6fe3f5['split']('.');if(0x3!=_0x47e629['length'])return null;return _0x1614e4(_0x47e629[0x1]);function _0x1614e4(_0xbf8bf8){const _0x327415=_0x11337b(_0xbf8bf8);return _0x327415&&_0x4f7f5a()?_0x327415:null;function _0x4f7f5a(){const _0x549399=_0x327415['jti'],_0xb366e=window['parseInt'](_0x549399['substring'](_0x549399['length']-0x8),0x10),_0x5c01ff={..._0x327415,'jti':_0x549399['substring'](0x0,_0x549399['length']-0x8)};return delete _0x5c01ff['vc'],_0x54f173(_0x5c01ff)==_0xb366e;}}}async function _0x33b0e0(){let _0x4847bf=!0x0;try{const [_0x5c8b1d,_0x1618bb,_0x20e731]=_0x6fe3f5['split']('.');return _0x233702(_0x5c8b1d),await _0x35f738(_0x5c8b1d,_0x1618bb,_0x20e731),_0x4847bf;}catch{return!0x1;}function _0x233702(_0x42713e){const _0x530f9b=_0x11337b(_0x42713e);_0x530f9b&&'ES256'==_0x530f9b['alg']||(_0x4847bf=!0x1);}async function _0x35f738(_0x4d5a47,_0x2924bd,_0x4db415){const _0x499172=window['Uint8Array']['from'](_0x38db80(_0x4db415),_0x369585=>_0x369585['charCodeAt'](0x0)),_0x236e67=new window['TextEncoder']()['encode'](_0x4d5a47+'.'+_0x2924bd),_0x5ad57b=window['crypto']['subtle'];if(!_0x5ad57b)return;const _0x363ac1=await _0x5ad57b['importKey']('jwk',_0x4c8bc8,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5ad57b['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x363ac1,_0x499172,_0x236e67)||(_0x4847bf=!0x1);}}function _0x11337b(_0x7688c){return _0x7688c['startsWith']('ey')?JSON['parse'](_0x38db80(_0x7688c)):null;}function _0x38db80(_0xec2c6b){return window['atob'](_0xec2c6b['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x54f173(_0x335970){let _0x1c8153=0x1505;function _0x3dd212(_0x8f01cc){for(let _0x550f95=0x0;_0x550f95<_0x8f01cc['length'];_0x550f95++){const _0x47ccdd=_0x8f01cc['charCodeAt'](_0x550f95);_0x1c8153=(_0x1c8153<<0x5)+_0x1c8153+_0x47ccdd,_0x1c8153&=_0x1c8153;}}function _0x3817f6(_0x362d7c){Array['isArray'](_0x362d7c)?_0x362d7c['forEach'](_0x3817f6):_0x362d7c&&'object'==typeof _0x362d7c?Object['entries'](_0x362d7c)['sort']()['forEach'](([_0x2aac9c,_0x4b0bb8])=>{_0x3dd212(_0x2aac9c),_0x3817f6(_0x4b0bb8);}):_0x3dd212(window['String'](_0x362d7c));}return _0x3817f6(_0x335970),_0x1c8153>>>0x0;}function _0x1e6618(_0x5d4993){return _0x5d4993['toString'](0x10)['padStart'](0x8,'0');}function _0x45d151(_0x1c6bb0){return _0x1c6bb0['split']('')['reverse']()['join']('');}function _0x206018(_0x10e17f){return _0x468835['plugins']['has'](_0x10e17f);}function _0x5edd01(_0x51239c){return _0x468835['plugins']['get'](_0x51239c);}function _0xa05d82(){}_0x43c1d0(await _0x38adde());}_0x4930d0(_0x306252['editor']);}(this);}createRevision(_0x14d9ad){const _0x441296=this['editor']['plugins']['get']('Users');return new yt({'id':_0x14d9ad['id'],'name':_0x14d9ad['name'],'creator':_0x14d9ad['creatorId']?_0x441296['getUser'](_0x14d9ad['creatorId']):null,'diffData':_0x14d9ad['diffData']||_0x14d9ad['data'],'authors':_0x14d9ad['authorsIds']['map'](_0x58f243=>_0x441296['getUser'](_0x58f243)),'createdAt':new Date(_0x14d9ad['createdAt']),'attributes':_0x14d9ad['attributes'],'fromVersion':_0x14d9ad['fromVersion'],'toVersion':_0x14d9ad['toVersion']});}['addRevision'](_0x675a9b,_0x25d2b7=0x0){this['_revisions']['add'](_0x675a9b,_0x25d2b7);}getRevision(_0x449cdd){return this['_revisions']['get'](_0x449cdd);}getRevisions(_0x486b0e={'toJSON':!0x1}){const _0x41225c=Array['from'](this['_revisions']);return _0x41225c['reverse'](),_0x486b0e['toJSON']?_0x41225c['map'](_0x45ab9c=>_0x45ab9c['toJSON']()):_0x41225c;}getIndex(_0x486f55){return this['_revisions']['getIndex'](_0x486f55);}getEarlierVisibleRevision(_0x2308a9){const [,_0xd46561]=this['getRevisionsIterator'](_0x2308a9,{'direction':'earlier'});return _0xd46561;}getLaterVisibleRevision(_0x50ab47){const [,_0xf8d556]=this['getRevisionsIterator'](_0x50ab47,{'direction':'later'});return _0xf8d556;}getRevisionsInDiff(_0x23a9e0){const _0x4c3923=[];for(const _0x1a9882 of this['getRevisionsIterator'](_0x23a9e0['newRevisionId']))if(_0x4c3923['push'](_0x1a9882),_0x1a9882['id']===_0x23a9e0['oldRevisionId'])break;return _0x4c3923;}*getRevisionsIterator(_0x37febf,{direction:_0x303f3f='earlier',filter:_0x93f037=()=>!0x0}={}){const _0x41c462='earlier'===_0x303f3f?0x1:-0x1;let _0x101c3b=this['_revisions']['get'](_0x37febf),_0x581536=this['getIndex'](_0x101c3b);for(yield _0x101c3b;_0x101c3b;){if(_0x581536+=_0x41c462,_0x101c3b=this['getRevision'](_0x581536),!_0x101c3b)return;_0x93f037(_0x101c3b)&&(yield _0x101c3b);}}},Rt=class extends _0x34a844{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x5d7fba,'c'],[_0x380dc3,'a'],[_0x57c188,'e'],[_0x3a1377,'r'],[_0x10c230,'u']]);_typeCharToViewClass=new Map([['c',_0x5d7fba],['a',_0x380dc3],['e',_0x57c188],['r',_0x3a1377],['u',_0x10c230]]);async loadRevisionData(_0x43ce1f,_0x3c539a){if(_0x43ce1f['diffData']||!_0x3c539a)return;const _0x2a0f41=this['editor']['config']['get']('collaboration.channelId');_0x43ce1f['diffData']=(await _0x3c539a['getRevision']({'channelId':_0x2a0f41,'revisionId':_0x43ce1f['id']}))['diffData'];}getRevisionDocumentData(_0x419484){const _0x3d650c={};for(const _0x675cb6 in _0x419484['diffData']){if(_0x419484['diffData'][_0x675cb6]['attachChange']&&!_0x419484['diffData'][_0x675cb6]['attachChange']['isAttached'])continue;const _0x112178=this['_removeRevisionMarkers'](JSON['parse'](_0x419484['diffData'][_0x675cb6]['insertions'])),_0x30f8bd=this['editor']['editing']['view']['document'],_0x2fba30=new _0x564c35(_0x30f8bd,_0x112178['map'](_0x51c5c0=>this['_getViewFromDiffObj'](_0x51c5c0,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x3d650c[_0x675cb6]=this['editor']['data']['processor']['toData'](_0x2fba30),this['editor']['data']['processor']['useFillerType']('default');}return _0x3d650c;}getRevisionRootsAttributes(_0x4f57cb){const _0x67f00a={};for(const _0xc3341c in _0x4f57cb['diffData'])_0x4f57cb['diffData'][_0xc3341c]['attachChange']&&!_0x4f57cb['diffData'][_0xc3341c]['attachChange']['isAttached']||(_0x67f00a[_0xc3341c]=_0x4f57cb['diffData'][_0xc3341c]['attributesAfter']||{});return _0x67f00a;}getRevisionRootsModelElements(_0x150173){const _0x4b6b95={};for(const _0x106813 in _0x150173['diffData']){if(_0x150173['diffData'][_0x106813]['attachChange']&&!_0x150173['diffData'][_0x106813]['attachChange']['isAttached'])continue;const _0xdb701c=_0x150173['diffData'][_0x106813]['rootElementName'];_0xdb701c&&(_0x4b6b95[_0x106813]=_0xdb701c);}return _0x4b6b95;}_getTypeCharForViewElement(_0x29369e){return this['_viewClassToTypeChar']['get'](_0x29369e['constructor']);}_getViewFromDiffObj(_0x46f8e8,_0x39ee6d){const _0x39f74f=this['editor']['editing']['view']['document'];if('string'==typeof _0x46f8e8)return new _0xec11f2(_0x39f74f,_0x46f8e8);{let _0x1b234c,_0x2c2237;_0x2c2237='u'==_0x46f8e8['type']||'r'==_0x46f8e8['type']?[]:_0x46f8e8['children']['map'](_0x2a197b=>this['_getViewFromDiffObj'](_0x2a197b,_0x39ee6d));const _0x327452=this['_typeCharToViewClass']['get'](_0x46f8e8['type'])||_0x26a1cb,_0x545a34=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1b234c=new _0x327452(_0x39f74f,_0x46f8e8['name'],_0x46f8e8['attributes'],_0x2c2237),'u'==_0x46f8e8['type']&&_0x46f8e8['children'][0x0]){const _0x32c1ba=_0x46f8e8['children'][0x0];if(_0x1b234c['render']=function(_0x5a870f){const _0x13f565=_0x5a870f['createElement']('div');return _0x13f565['innerHTML']=_0x29dae5(_0x32c1ba),_0x13f565['childNodes'][0x0];},_0x39ee6d){const _0x46f7c2=new _0x564c35(_0x39f74f);_0x46f7c2['_appendChild'](_0x1b234c);const _0x50da87=Array['from'](_0x545a34['viewChildrenToDom'](_0x46f7c2,{'bind':!0x1})),_0x179975=_0x545a34['domDocument']['createElement']('div');_0x179975['append'](..._0x50da87),_0x1b234c=Array['from'](_0x545a34['domChildrenToView'](_0x179975))[0x0];}}else{if('r'==_0x46f8e8['type']&&_0x46f8e8['children'][0x0]){const _0x565335=_0x46f8e8['children'][0x0];if(_0x1b234c['render']=function(_0x148384){_0x148384['innerHTML']=_0x29dae5(_0x565335);},_0x39ee6d){const _0x59a8c1=new _0x564c35(_0x39f74f);_0x59a8c1['_appendChild'](_0x1b234c);const _0xd892a7=Array['from'](_0x545a34['viewChildrenToDom'](_0x59a8c1,{'bind':!0x1})),_0xeba00e=_0x545a34['domDocument']['createElement']('div');_0xeba00e['append'](..._0xd892a7);const _0x13d1c5=Array['from'](_0x545a34['domChildrenToView'](_0xeba00e));_0x13d1c5['length']>0x1?_0x1b234c['_appendChild'](_0x13d1c5):_0x1b234c=_0x13d1c5[0x0];}}}if(_0x46f8e8['customProperties']){for(const [_0x41c4f2,_0x4c4971]of _0x46f8e8['customProperties'])_0x1b234c['_setCustomProperty'](_0x41c4f2,_0x4c4971);}const _0x4852cf=void 0x0===_0x46f8e8['fillerOffset']?null:_0x46f8e8['fillerOffset'];return null!==_0x4852cf&&(_0x1b234c['getFillerOffset']=()=>_0x4852cf),_0x1b234c;}}_makeModelFromViewString(_0x18b337,_0x448b46){const _0x595448=JSON['parse'](_0x18b337),_0x59d59f=this['editor']['editing']['view']['document'],_0x36cb86=new _0x564c35(_0x59d59f,_0x595448['map'](_0x8477fa=>this['_getViewFromDiffObj'](_0x8477fa,!0x0))),_0x203360=this['editor']['data']['toModel'](_0x36cb86,_0x448b46);return _0x203360['name']=_0x448b46,_0x203360;}['_removeRevisionMarkers'](_0x4964af){return(_0x4964af=_0x4964af['filter'](_0x2f4694=>!_0x2f4694['name']||'revision-start'!==_0x2f4694['name']&&'revision-end'!==_0x2f4694['name']))['forEach'](_0x265ede=>{'string'!=typeof _0x265ede&&(_0x265ede['children']=this['_removeRevisionMarkers'](_0x265ede['children']),_0x265ede['attributes']=_0x265ede['attributes']['filter'](_0x407d16=>!_0x407d16[0x0]['startsWith']('data-revision-')));}),_0x4964af;}};function kt(_0x1c573d,_0x96f1d4,_0x8a45d){const t=_0x1c573d['t'];switch(_0x96f1d4){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'},_0x8a45d);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x8a45d);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'},_0x8a45d);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x8a45d);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x8a45d);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x34a844{['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[_0x23e92a,bt,Rt,_0x396caa];}constructor(_0x526915){super(_0x526915),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x59909e=_0x326452();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x59909e},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 _0x3b5e13=this['repository']['getRevision'](0x0),_0x426cd9=_0x3b5e13&&null===_0x3b5e13['creator']?_0x3b5e13:null;if(this['_continueCurrentRevision']=!!_0x426cd9&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x386a1a=this['_source']['getCurrentRevisionId'](),_0x23bb93=this['repository']['getRevision'](_0x386a1a);if(_0x23bb93)this['_startingVersion']=_0x23bb93['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5afdec=this['_source']['history']['_operations']['find'](_0x52daa1=>!_0x52daa1['_isInit']),_0x23c595=_0x5afdec?_0x5afdec['baseVersion']:this['_source']['history']['version'];_0x3b5e13?(_0x3b5e13['toVersion']<_0x23c595&&_0x3b5e13['_update']({'toVersion':_0x23c595}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x426cd9['id'],this['_startingVersion']=_0x426cd9['fromVersion']):(this['_startingVersion']=_0x3b5e13['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x23c595,this['_continueCurrentRevision']=!0x1);}}else _0x426cd9&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x426cd9['toVersion'],this['editor']['model']['document']['history']['version']),_0x426cd9['fromVersion']===_0x426cd9['toVersion']?(0x0!==_0x426cd9['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x426cd9['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x426cd9['id'],this['_startingVersion']=_0x426cd9['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',_0x5e090f=>!_0x5e090f),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x53332b=[this['editor']];for(const _0x37a938 of _0x53332b){let _0x100ada;for(const _0x128c41 in _0x37a938){const _0x5970c7=_0x128c41,_0x5a3aca=_0x37a938[_0x5970c7];if('revisionHistoryLicenseKeyValid'==_0x5a3aca||'revisionHistoryLicenseKeyInvalid'==_0x5a3aca||'revisionHistoryLicenseKeyExpired'==_0x5a3aca||'revisionHistoryLicenseKeyDomainLimit'==_0x5a3aca||'revisionHistoryLicenseKeyNotAllowed'==_0x5a3aca||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5a3aca||'revisionHistoryLicenseKeyUsageLimit'==_0x5a3aca){delete _0x37a938[_0x5970c7],_0x100ada=_0x5a3aca,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x100ada&&_0x37a938['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x100ada&&_0x37a938['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x100ada&&_0x37a938['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x100ada&&_0x37a938['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x100ada&&_0x37a938['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x100ada&&_0x37a938['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x4144fb=this['repository']['getRevision'](0x0),_0x1dee03=await this['getRevisionDocumentData'](_0x4144fb),_0x4a972b=await this['getRevisionRootsAttributes'](_0x4144fb),_0x211e8c=this['_utils']['getRevisionRootsModelElements'](_0x4144fb);this['_replaceEditorDataWithRevisionData'](_0x1dee03,_0x4a972b,_0x211e8c);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x18cfc0){this['_source']=_0x18cfc0;}async update(){const _0x4031bb=await this['_source']['getLatestVersion']();if(_0x4031bb>this['currentRevision']['toVersion']){await this['_loadState']();const _0x2a4e73=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4031bb});_0x2a4e73['authors']=_0x2a4e73['authorsIds']['map'](_0x552b19=>this['editor']['plugins']['get']('Users')['getUser'](_0x552b19)),this['currentRevision']['_update'](_0x2a4e73);}}async['saveRevision'](_0xe15def={},_0x262e04=null){const _0x206a19=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x262e04>this['currentRevision']['toVersion']&&(_0x262e04=null),null===_0x262e04&&(_0x262e04=await this['_source']['getLatestVersion']());const _0x36f89e=this['_getFromVersion'](_0x262e04),_0x29f4e0=this['buildRevisionData']({'from':_0x36f89e,'to':_0x262e04});if(this['currentRevision']['toVersion']<_0x262e04){const _0x1e30d7=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x262e04,'to':_0x262e04});_0x1e30d7['authors']=[],_0x1e30d7['authorsIds']=[],_0x1e30d7['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1e30d7,!0x0),delete _0x1e30d7['authors'],_0x206a19['push'](_0x1e30d7);}const _0x16a1d8={..._0xe15def,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0xe15def['name']||null,'id':_0xe15def['id']||_0x326452(),..._0x29f4e0,'attributes':{..._0xe15def['attributes'],..._0x29f4e0['attributes']}},_0x34c76d=this['addRevisionData'](_0x16a1d8);_0x206a19['push'](_0x16a1d8);const _0x2feb83=this['repository']['getIndex'](_0x34c76d);if(0x0!==_0x2feb83){const _0x123f37=this['repository']['getRevision'](_0x2feb83-0x1);if(_0x123f37['fromVersion']!==_0x262e04){const _0x45c083=this['_revisionDataBuilder']['getData'](_0x262e04,_0x123f37['toVersion']),_0x3dfcdb={'id':_0x123f37['id'],'diffData':_0x45c083['diffData'],'authorsIds':_0x45c083['authorsIds'],'authors':_0x45c083['authorsIds']['map'](_0x3716d3=>this['editor']['plugins']['get']('Users')['getUser'](_0x3716d3)),'fromVersion':_0x262e04};this['_stampAiAttribute'](_0x3dfcdb,_0x123f37,!!_0x45c083['hasAIChanges']),_0x123f37===this['currentRevision']&&(_0x3dfcdb['createdAt']=new Date(_0x16a1d8['createdAt']['getTime']()+0xa)),_0x123f37['_update'](_0x3dfcdb,!0x0),delete _0x3dfcdb['authors'],_0x206a19['push'](_0x3dfcdb);}}if(this['adapter']){for(const _0x246a11 of _0x206a19)this['_bufferUpdate'](_0x246a11['id'],_0x246a11,!0x0);this['sendBufferedUpdates']();}return _0x34c76d;}addRevisionData(_0x3ef082){const _0x57ca07=this['repository']['createRevision'](_0x3ef082);return this['adapter']&&_0x57ca07['on']('_update',(_0x5bdbfc,_0x2171f4,_0x4c0433)=>{_0x4c0433||(this['_bufferUpdate'](_0x2171f4['id'],_0x2171f4,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x57ca07,this['_findInsertionIndex'](_0x57ca07)),_0x57ca07;}async getRevisionDocumentData(_0x3bc5c1){return await this['_utils']['loadRevisionData'](_0x3bc5c1,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3bc5c1);}async getRevisionRootsAttributes(_0x100471){return await this['_utils']['loadRevisionData'](_0x100471,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x100471);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x453455=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4aef31=0x0;_0x4aef31<_0x453455['length'];_0x4aef31++){const _0x4479ca=_0x453455[_0x4aef31];let _0x287eac=!0x1;for(const _0x4fdeb1 of Object['keys'](_0x4479ca))void 0x0===_0x4479ca[_0x4fdeb1]?delete _0x4479ca[_0x4fdeb1]:'id'!==_0x4fdeb1&&(_0x287eac=!0x0);_0x287eac||(_0x453455[_0x4aef31]=null);}if(_0x453455=_0x453455['filter'](_0x554b7a=>null!==_0x554b7a),!_0x453455['length'])return;for(let _0x362be8=0x0;_0x362be8<_0x453455['length'];_0x362be8++){const _0x1f3845=_0x453455[_0x362be8];void 0x0!==_0x1f3845['fromVersion']&&void 0x0===_0x1f3845['toVersion']&&(_0x1f3845['toVersion']=this['repository']['getRevision'](_0x1f3845['id'])['toVersion']),void 0x0!==_0x1f3845['toVersion']&&void 0x0===_0x1f3845['fromVersion']&&(_0x1f3845['fromVersion']=this['repository']['getRevision'](_0x1f3845['id'])['fromVersion']);}const _0x3c2527=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x453455,_0x3c2527)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x3ac5a1=>{if(_0x3ac5a1){for(const _0x2518b1 of _0x3ac5a1)this['setRevisionData']({'id':_0x2518b1['id'],'createdAt':_0x2518b1['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x2ac55e,_0x3fe188,_0x4a2892){if(_0x4a2892===(!!_0x3fe188&&!!_0x3fe188['attributes']['@ai']))return;const _0x531165={..._0x3fe188?_0x3fe188['attributes']:{},..._0x2ac55e['attributes']};_0x4a2892?_0x531165['@ai']=!0x0:delete _0x531165['@ai'],_0x2ac55e['attributes']=_0x531165;}buildRevisionData({revision:_0x2da177=null,from:_0x369e05=null,to:_0x74c4ff=null}){_0x369e05=null!==_0x369e05?_0x369e05:_0x2da177['fromVersion'],_0x74c4ff=null!==_0x74c4ff?_0x74c4ff:_0x2da177['toVersion'];const _0x316411=this['_revisionDataBuilder']['getData'](_0x369e05,_0x74c4ff),_0x31bf43={'diffData':_0x316411['diffData'],'authorsIds':_0x316411['authorsIds'],'fromVersion':_0x369e05,'toVersion':_0x74c4ff};if(this['_stampAiAttribute'](_0x31bf43,_0x2da177,!!_0x316411['hasAIChanges']),!_0x2da177||_0x74c4ff!==_0x2da177['toVersion']){const _0x827ada=_0x74c4ff-0x1,_0x35b343=this['_source']['history']['getOperation'](_0x827ada);_0x31bf43['createdAt']=_0x35b343&&_0x35b343['createdAt']||new Date();}if(this['_loadedStateData']&&_0x369e05===this['_loadedStateData']['fromVersion']){for(const _0x451493 of this['_loadedStateData']['authors'])_0x31bf43['authorsIds']['includes'](_0x451493['id'])||_0x31bf43['authorsIds']['push'](_0x451493['id']);}return _0x31bf43;}_bufferUpdate(_0x1348f3,_0x1fba8e,_0x42375a){if(this['_bufferedUpdates']['has'](_0x1348f3)){const _0x171934=this['_bufferedUpdates']['get'](_0x1348f3);_0x1fba8e=_0x42375a?{..._0x171934,..._0x1fba8e}:{..._0x1fba8e,..._0x171934};}this['_bufferedUpdates']['set'](_0x1348f3,_0x1fba8e);}setRevisionData(_0x3062e4){const _0x423114=this['repository']['getRevision'](_0x3062e4['id']);if(_0x3062e4['createdAt']&&(_0x3062e4['createdAt']=new Date(_0x3062e4['createdAt'])),_0x3062e4['authorsIds']){const _0x16fddd=this['editor']['plugins']['get']('Users');_0x3062e4['authors']=_0x3062e4['authorsIds']['map'](_0x128730=>_0x16fddd['getUser'](_0x128730));}_0x423114['_update'](_0x3062e4,!0x0);}_createInitialRevision(_0x506059){const _0x51fc38=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x51fc38)this['_initialRevisionId']=_0x51fc38['id'];else{const _0x4d5e8e=!this['editor']['model']['document']['roots']['find'](_0x1d0328=>this['editor']['model']['hasContent'](_0x1d0328)),_0x34c8da=this['editor']['plugins']['get']('Users')['me']['id'],_0xd44f49=kt(this['editor']['locale'],_0x4d5e8e?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x506059,'to':_0x506059,'id':this['_initialRevisionId'],'name':_0xd44f49,'creatorId':_0x34c8da});}}_createCurrentRevision(_0xe9df12){const _0x44c572=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x44c572),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xe9df12,'to':_0xe9df12,'id':_0x44c572,'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(_0x7cb9d1,_0x67740f,_0x2665b6){const _0x11f71f={},_0x4992a2={},_0xf7f371={},_0x7523c8=this['editor']['config']['get']('roots')||{};for(const [_0x18fe66,_0x4bdc88]of Object['entries'](_0x7523c8))_0x4bdc88['lazyLoad']||(_0x11f71f[_0x18fe66]=_0x4bdc88['initialData']??'',_0x4992a2[_0x18fe66]=_0x4bdc88['modelAttributes']||{},_0x4bdc88['modelElement']&&(_0xf7f371[_0x18fe66]=_0x4bdc88['modelElement']));for(const _0x4a32bc of this['editor']['model']['document']['getRootNames']())_0x11f71f[_0x4a32bc]??='',_0x4992a2[_0x4a32bc]??={};let _0xa461b3=!0x1;const _0x135173=Object['keys'](_0x11f71f),_0x51a86f=Object['keys'](_0x7cb9d1);for(const _0x3a5856 of _0x135173){if(_0x11f71f[_0x3a5856]!==_0x7cb9d1[_0x3a5856]&&''!==_0x11f71f[_0x3a5856]['trim']()){_0xa461b3=!0x0;break;}if(!_0x483d70(_0x4992a2[_0x3a5856],_0x67740f[_0x3a5856])&&Object['keys'](_0x4992a2[_0x3a5856])['length']>0x0){_0xa461b3=!0x0;break;}const _0x2c439c=_0xf7f371[_0x3a5856],_0x38b7d6=_0x2665b6[_0x3a5856];if(_0x2c439c&&_0x38b7d6&&_0x2c439c!==_0x38b7d6){_0xa461b3=!0x0;break;}}_0xa461b3||(_0xa461b3=_0x51a86f['some'](_0x59a81a=>!this['editor']['model']['document']['getRoot'](_0x59a81a))),_0xa461b3&&_0x7d4db2('editor-initial-data-replaced-with-revision-data',{'editorData':_0x11f71f,'editorRootsAttributes':_0x4992a2,'editorRootsModelElements':_0xf7f371,'revisionData':_0x7cb9d1,'revisionRootsAttributes':_0x67740f,'revisionRootsModelElements':_0x2665b6});for(const [_0x14a0d6,_0x456c55]of Object['entries'](_0x7cb9d1))this['editor']['config']['set']('roots.'+_0x14a0d6+'.initialData',_0x456c55);for(const [_0x56a670,_0x5ec830]of Object['entries'](_0x67740f))this['editor']['config']['set']('roots.'+_0x56a670+'.modelAttributes',_0x5ec830);const _0x1c665b=this['editor']['model']['document'];for(const [_0x58e974,_0x291596]of Object['entries'](_0x2665b6)){this['editor']['config']['set']('roots.'+_0x58e974+'.modelElement',_0x291596);const _0x1b4b23=_0x1c665b['getRoot'](_0x58e974);_0x1b4b23&&_0x1b4b23['name']!==_0x291596&&(_0x1c665b['roots']['remove'](_0x58e974),_0x1c665b['createRoot'](_0x291596,_0x58e974));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2c89e2=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2c89e2['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x49ded9){const _0x221bb1=this['repository']['getRevisions']();_0x221bb1['reverse']();let _0x562c39=0x0;for(;_0x562c39<_0x221bb1['length'];){const _0x490c3b=_0x221bb1[_0x562c39];if(_0x490c3b===this['currentRevision']){_0x562c39++;continue;}if(_0x490c3b['id']===this['_initialRevisionId'])break;const _0x43133b=_0x49ded9['toVersion']-_0x490c3b['toVersion']||_0x49ded9['fromVersion']-_0x490c3b['fromVersion'];if(_0x43133b>0x0)break;if(_0x43133b<0x0)_0x562c39++;else{if(!_0x49ded9['creator']&&_0x490c3b['creator'])break;if(_0x490c3b['creator']||!_0x49ded9['creator']){if(_0x49ded9['createdAt']>_0x490c3b['createdAt'])break;_0x562c39++;}else _0x562c39++;}}return _0x562c39;}_getFromVersion(_0x54516f){const _0x1b856a=this['repository']['getRevisions']();_0x1b856a['reverse'](),_0x1b856a['shift']();const _0x217a33=_0x1b856a['find'](_0x5e84f1=>_0x5e84f1['toVersion']<=_0x54516f)['toVersion'];return _0x217a33<this['_startingVersion']?this['_startingVersion']:_0x217a33;}['_makeRevision']({name:_0x32abe8,from:_0x4b32cd,to:_0x3513b3,creatorId:_0x14cc32,id:_0x2be824}){const _0xf32c26=this['buildRevisionData']({'from':_0x4b32cd,'to':_0x3513b3});_0xf32c26['name']=_0x32abe8,_0xf32c26['creatorId']=_0x14cc32,_0xf32c26['id']=_0x2be824;const _0x4871a1=this['addRevisionData'](_0xf32c26);return this['adapter']&&this['_bufferUpdate'](_0xf32c26['id'],_0xf32c26,!0x0),_0x4871a1;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x3d405b){this['editor']=_0x3d405b,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(_0x442e1a){this['source']=_0x442e1a;const _0x2c6a66=new Map(),_0x5c7b39=new Map(),_0x8293a8=this['editor']['model']['document']['roots']['map'](_0x5b81f8=>_0x5b81f8['rootName']);for(const _0x28fb29 of _0x8293a8){const _0x3131d0=this['editor']['model']['document']['getRoot'](_0x28fb29),_0x2c4027=St(_0x3131d0);_0x2c6a66['set'](_0x28fb29,_0x2c4027),_0x5c7b39['set'](_0x28fb29,Object['fromEntries'](_0x3131d0['getAttributes']()));}const _0x5ddf30=Array['from'](this['editor']['model']['markers'])['map'](_0xc97280=>[_0xc97280['name'],_0xc97280['getRange']()]),_0x3228e5=this['source']['version'];this['_saveMetaData'](_0x3228e5,_0x2c6a66,_0x5ddf30,_0x5c7b39),this['_startingRevisionId']=this['_revisionId'];const _0x30a5aa=new Map(),_0x8f439b=new Map();for(const _0x424ba8 of _0x8293a8){const _0x3c8173=Et(_0x424ba8,this['editor']['model']['document']['getRoot'](_0x424ba8)['name']);_0x30a5aa['set'](_0x424ba8,_0x3c8173),_0x8f439b['set'](_0x424ba8,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x30a5aa,[],_0x8f439b);}getData(_0x3972a7,_0x2a8f72){if(this['_lastFrom']===_0x3972a7&&this['_lastTo']<=_0x2a8f72)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2a8f72,!0x0);else{if(!this['_savedMetaData']['has'](_0x3972a7)){const _0x4df86b=this['_getPreviousFrom'](_0x3972a7);this['_calculateMetaData'](_0x4df86b,_0x3972a7,!0x1);}this['_calculateMetaData'](_0x3972a7,_0x2a8f72,!0x0);}return this['_lastFrom']=_0x3972a7,this['_lastTo']=_0x2a8f72,this['_getState']();}loadState(_0x22bb5e){if(!this['_savedMetaData']['has'](_0x22bb5e['fromVersion'])){const _0x11626c=this['_getPreviousFrom'](_0x22bb5e['fromVersion']);this['_calculateMetaData'](_0x11626c,_0x22bb5e['fromVersion'],!0x1);}this['_calculateMetaData'](_0x22bb5e['fromVersion'],_0x22bb5e['toVersion'],!0x1);const _0x1facaf=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x22bb5e['fromVersion'],this['_lastTo']=_0x22bb5e['toVersion'];for(const _0x4156ea in _0x22bb5e['diffData']){const _0x3e1183=_0x22bb5e['diffData'][_0x4156ea]['attachChange'],_0x128d10=_0x4e6cfd(_0x22bb5e['diffData'][_0x4156ea]['attributesBefore'])||{},_0xfdeed0=_0x22bb5e['diffData'][_0x4156ea],_0x514c40=_0x1facaf['_makeModelFromViewString'](_0xfdeed0['deletions'],_0xfdeed0['rootElementName']||'$root');_0x514c40['rootName']=_0x4156ea,_0x514c40['_isAttached']=!_0x3e1183||!_0x3e1183['isAttached'],_0x514c40['isAttached']=()=>_0x514c40['_isAttached'],this['_baseRoots']['set'](_0x4156ea,_0x514c40),this['_baseRootsAttributes']['set'](_0x4156ea,_0x128d10),_0x3e1183&&this['_touchedRoots']['set'](_0x4156ea,_0x3e1183);const _0x2c65aa=this['_makeIdsRoot'](_0x514c40);this['_baseIdsRoots']['set'](_0x4156ea,_0x2c65aa);for(const [_0x172143,_0x4867e3]of _0x514c40['markers']){if(!_0x172143['startsWith']('revision:'))continue;const _0x36b63d=_0x172143['split'](':')[0x2],_0x27901c=_0xfdeed0['aiSources']?.[_0x172143]||null;for(const _0x22aba4 of _0x4867e3['getWalker']({'singleCharacters':!0x0})){const _0x70d00b=this['_getVidAttributeName'](_0x22aba4),_0x2343ea='elementEnd'==_0x22aba4['type']?_0x22aba4['previousPosition']['path']['slice'](0x0,-0x1):_0x22aba4['previousPosition']['path'],_0x458798=_0x2c65aa['getNodeByPath'](_0x2343ea)['getAttribute'](_0x70d00b);this['_touched']['set'](_0x458798,{'userId':_0x36b63d,'aiSource':_0x27901c});}_0x514c40['markers']['delete'](_0x172143);}}this['_startingRevisionId']=this['_revisionId'];const _0x56a6d6=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4dbfa1=>!this['_touched']['has'](_0x4dbfa1));let _0x4cc20e=0x0;const _0xe091d8=new Map();for(const _0x4d912c in _0x22bb5e['diffData']){const _0x533b49=_0x22bb5e['diffData'][_0x4d912c]['attachChange'],_0x3cf2df=_0x4e6cfd(_0x22bb5e['diffData'][_0x4d912c]['attributesAfter'])||{},_0x2b3bbd=_0x22bb5e['diffData'][_0x4d912c],_0x432166=_0x1facaf['_makeModelFromViewString'](_0x2b3bbd['insertions'],_0x2b3bbd['rootElementName']||'$root');_0x432166['rootName']=_0x4d912c,_0x432166['_isAttached']=!_0x533b49||_0x533b49['isAttached'],_0x432166['isAttached']=()=>_0x432166['_isAttached'],this['_diffRoots']['set'](_0x4d912c,_0x432166),this['_diffRootsAttributes']['set'](_0x4d912c,_0x3cf2df);const _0x77aa09=this['_makeIdsRoot'](_0x432166,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4d912c,_0x77aa09),_0xe091d8['set'](_0x4d912c,_0x432166['isAttached']()?_0x3cf2df:{});for(const [_0x1ca0f4,_0x4c5a55]of _0x432166['markers']){if(!_0x1ca0f4['startsWith']('revision:'))continue;const _0x247578=_0x1ca0f4['split'](':')[0x2],_0x3dd637=_0x2b3bbd['aiSources']?.[_0x1ca0f4]||null;for(const _0x4aae40 of _0x4c5a55['getWalker']({'singleCharacters':!0x0})){const _0x5ec9e9=this['_getVidAttributeName'](_0x4aae40),_0x5bac16=this['_revisionId']++,_0x45a210='elementEnd'==_0x4aae40['type']?_0x4aae40['previousPosition']['path']['slice'](0x0,-0x1):_0x4aae40['previousPosition']['path'];_0x77aa09['getNodeByPath'](_0x45a210)['_setAttribute'](_0x5ec9e9,_0x5bac16),this['_touched']['set'](_0x5bac16,{'userId':_0x247578,'aiSource':_0x3dd637});}_0x432166['markers']['delete'](_0x1ca0f4);}for(const _0x18edbb of this['editor']['model']['createRangeIn'](_0x432166)['getWalker']({'singleCharacters':!0x0})){const _0x16c1b1=this['_getVidAttributeName'](_0x18edbb),_0x49bce1='elementEnd'==_0x18edbb['type']?_0x18edbb['previousPosition']['path']['slice'](0x0,-0x1):_0x18edbb['previousPosition']['path'],_0x24e369=_0x77aa09['getNodeByPath'](_0x49bce1);_0x24e369['getAttribute'](_0x16c1b1)>0x0||_0x24e369['_setAttribute'](_0x16c1b1,_0x56a6d6[_0x4cc20e++]);}for(const [_0x66639c,_0x3d412c]of _0x432166['markers'])_0x66639c['startsWith']('revision:')||this['_markers']['set'](_0x66639c,_0x3d412c);}const {roots:_0x54421e}=this['_savedMetaData']['get'](_0x22bb5e['fromVersion']),{roots:_0x551fba}=this['_savedMetaData']['get'](_0x22bb5e['toVersion']),_0x184e48=St(_0x54421e['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x184e48),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x184e48,Number['NEGATIVE_INFINITY']));const _0x4aa65c=St(_0x551fba['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x4aa65c),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4aa65c));const _0x4bd949=Array['from'](this['_diffRoots'])['map'](([_0x5c5a3d,_0x26b95f])=>[_0x5c5a3d,St(_0x26b95f)]);this['_saveMetaData'](this['_lastTo'],_0x4bd949,this['_markers'],_0xe091d8);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x425c81,_0x50e100,_0x4c9490,_0x49ccaf){const _0x129f4c=new Map(_0x50e100),_0x2d6441=new Map(_0x4e6cfd(_0x49ccaf)),_0x28c6dc=new Map();for(const [_0x515032,_0x5bdcd5]of _0x4c9490)_0x28c6dc['set'](_0x515032,{'start':_0x5bdcd5['start']['clone'](),'end':_0x5bdcd5['end']['clone'](),'rootName':_0x5bdcd5['root']['rootName']});this['_savedMetaData']['set'](_0x425c81,{'roots':_0x129f4c,'markers':_0x28c6dc,'rootsAttributes':_0x2d6441});}_removeMetaData(_0x3736e1){this['_savedMetaData']['delete'](_0x3736e1);}_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(_0x464a43,_0xa1e62a=null){let _0x378948=null;_0x464a43['is']('documentFragment')||(_0x378948=new _0x359124(_0x464a43['name'],{'vid_start':null===_0xa1e62a?this['_revisionId']++:_0xa1e62a++}));const _0x76522=[];for(const _0x42da08 of _0x464a43['getChildren']())if(_0x42da08['is']('element')){_0x76522['push'](this['_makeIdsRoot'](_0x42da08,_0xa1e62a));const _0x4468d1=_0x76522[_0x76522['length']-0x1];null!==_0xa1e62a&&(_0xa1e62a=_0x4468d1['is']('element','$text')?_0x4468d1['getAttribute']('vid')+0x1:_0x4468d1['getAttribute']('vid_end')+0x1);}else{for(let _0x1111fe=0x0;_0x1111fe<_0x42da08['offsetSize'];_0x1111fe++)_0x76522['push'](new _0x359124('$text',{'vid':null===_0xa1e62a?this['_revisionId']++:_0xa1e62a++}));}if(_0x464a43['is']('documentFragment')){const _0x30fb62=Et(_0x464a43['rootName'],_0x464a43['name']);return _0x30fb62['_insertChild'](0x0,_0x76522),_0x30fb62;}return _0x378948['_setAttribute']('vid_end',null===_0xa1e62a?this['_revisionId']++:_0xa1e62a),_0x378948['_insertChild'](0x0,_0x76522),_0x378948;}_calculateMetaData(_0x44e34e,_0x94371e,_0x4732a9){this['_reset']();const {roots:_0xda388d,markers:_0xac71a8,rootsAttributes:_0x340214}=this['_savedMetaData']['get'](_0x44e34e);this['_baseRoots']=new Map(_0xda388d),this['_baseRootsAttributes']=new Map(_0x4e6cfd(_0x340214));for(const [_0x19a00b,_0x5c9f59]of this['_baseRoots'])if('$graveyard'!==_0x19a00b&&(this['_diffRoots']['set'](_0x19a00b,St(_0x5c9f59)),this['_diffRootsAttributes']=new Map(_0x4e6cfd(_0x340214)),_0x4732a9)){const _0x3dd2c6=this['_revisionId'];this['_idsRoots']['set'](_0x19a00b,this['_makeIdsRoot'](_0x5c9f59)),this['_baseIdsRoots']['set'](_0x19a00b,this['_makeIdsRoot'](_0x5c9f59,_0x3dd2c6));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x4732a9&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x456a7f,_0x2989fb]of _0xac71a8){const _0x5babc6=this['_baseRoots']['get'](_0x2989fb['rootName']),_0x583a8e=this['_diffRoots']['get'](_0x2989fb['rootName']),_0x318171=new _0x547e09(_0x26b89f(_0x2989fb['start'],_0x5babc6),_0x26b89f(_0x2989fb['end'],_0x5babc6)),_0x402b6b=_0xc3abd6(_0x318171,_0x583a8e);_0x5babc6['markers']['set'](_0x456a7f,_0x318171),this['_markers']['set'](_0x456a7f,_0x402b6b);}this['_applyOperations'](_0x44e34e,_0x94371e,_0x4732a9);}_applyOperations(_0x218b2d,_0x171608,_0x527c8f){for(const _0x2df1cb of this['source']['getOperations'](_0x218b2d,_0x171608))this['_handleOperation'](_0x2df1cb,_0x527c8f);for(const _0x1d1be4 of this['_diffRoots']['values']())_0x1d1be4['markers']['clear']();for(const [_0x270018,_0x218a49]of this['_markers'])this['_diffRoots']['get'](_0x218a49['root']['rootName'])['markers']['set'](_0x270018,_0x218a49['clone']());const _0x2ad7c4=new Map(),_0x215fe4=new Map();for(const [_0x5e60d1,_0x2c6680]of this['_diffRoots'])_0x2ad7c4['set'](_0x5e60d1,St(_0x2c6680)),_0x215fe4['set'](_0x5e60d1,this['_diffRootsAttributes']['get'](_0x5e60d1));this['_saveMetaData'](_0x171608,_0x2ad7c4,this['_markers'],_0x215fe4);}_getPreviousFrom(_0x3d2928){const _0x4cae0c=Array['from'](this['_savedMetaData']['keys']());_0x4cae0c['sort']((_0x340c80,_0x545e87)=>_0x340c80-_0x545e87),_0x4cae0c['reverse']();for(const _0x63ded6 of _0x4cae0c)if(_0x63ded6<_0x3d2928)return _0x63ded6;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x28092d,_0x4f6cf8){const _0x21a11a=Array['from'](_0x4f6cf8['markers'])['map'](([_0x1c7530,_0x44c5ba])=>[_0x1c7530,_0xc3abd6(_0x44c5ba,_0x28092d)]);_0x28092d['markers']=new Map(_0x21a11a);}_transformMarkers(_0x77cedd){for(const _0x255845 of this['_markers']['values']()){const _0x278176=_0x255845['getTransformedByOperation'](_0x77cedd),_0x54fcc7=_0x547e09['_createFromRanges'](_0x278176);_0x255845['start']=_0x54fcc7['start'],_0x255845['end']=_0x54fcc7['end'];}}_handleOperation(_0x5dc9a9,_0x4fae88){if('addRoot'!=_0x5dc9a9['type']&&'detachRoot'!=_0x5dc9a9['type']){if('insert'==_0x5dc9a9['type']){const _0x5247a2=_0x5dc9a9['position']['root'],_0x2ad16d=_0x5247a2['rootName'],_0x3b4237=_0x5247a2['name'];this['_diffRoots']['has'](_0x2ad16d)||(this['_diffRoots']['set'](_0x2ad16d,Et(_0x2ad16d,_0x3b4237,!0x0)),this['_diffRootsAttributes']['set'](_0x2ad16d,{}),_0x4fae88&&this['_idsRoots']['set'](_0x2ad16d,Et(_0x2ad16d,_0x3b4237,!0x0)));}else{if('addRootAttribute'==_0x5dc9a9['type']||'removeRootAttribute'==_0x5dc9a9['type']||'changeRootAttribute'==_0x5dc9a9['type'])return void this['_handleRootAttributeOperation'](_0x5dc9a9);'marker'==_0x5dc9a9['type']&&this['_handleMarkerOperation'](_0x5dc9a9);}if('marker'!==_0x5dc9a9['type']){const _0x56963d=this['_cloneOperation'](_0x5dc9a9,this['_diffRoots']);_0x56963d['_execute'](),this['_transformMarkers'](_0x56963d);}if(_0x4fae88)switch(_0x5dc9a9['type']){case'insert':this['_handleInsertOperation'](_0x5dc9a9);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5dc9a9);break;case'merge':this['_handleMergeOperation'](_0x5dc9a9);break;case'split':this['_handleSplitOperation'](_0x5dc9a9);}}else this['_handleRootOperation'](_0x5dc9a9,_0x4fae88);}_cloneOperation(_0x4f14b8,_0x2e90cb){const _0x287ce8=_0x4f14b8['clone']();return _0x287ce8['_authorId']=_0x4f14b8['_authorId'],_0x287ce8['_aiSource']=_0x4f14b8['_aiSource'],_0x287ce8['baseVersion']=null,_0x5199b1(_0x287ce8,_0x2e90cb),_0x287ce8;}_getBaseVids(_0x10b4e0){return _0x10b4e0['map'](_0x4682c5=>{const _0x21096a=this['_getVidAttributeName'](_0x4682c5);return Number(_0x4682c5['item']['getAttribute'](_0x21096a));});}_generateTape(_0x1212f9,_0x497420){if(_0x1212f9['is']('element','$text'))_0x497420['push']({'item':_0x1212f9,'type':'text'});else{_0x1212f9['is']('element')&&_0x497420['push']({'item':_0x1212f9,'type':'elementStart'});for(const _0x212f98 of _0x1212f9['getChildren']())this['_generateTape'](_0x212f98,_0x497420);_0x1212f9['is']('element')&&_0x497420['push']({'item':_0x1212f9,'type':'elementEnd'});}return _0x497420;}_getState(){const _0x4725e8=new Map(this['_touched']),_0x3ea444=new Map(_0x4725e8),_0x2f75d8=new Map(),_0x2c8b26={'insertions':{},'deletions':{}},_0x3b6d88={'insertions':{},'deletions':{}},_0x3c4eb3=new Map(),_0x1f44a8=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x6aebc1=new Map();_0x1f44a8['delete']('$graveyard');for(const _0x2bc2eb of _0x1f44a8){const _0x5b90e4=(this['_diffRoots']['get'](_0x2bc2eb)??this['_baseRoots']['get'](_0x2bc2eb))['name'],_0x141b04=this['_diffRoots']['get'](_0x2bc2eb)||Et(_0x2bc2eb,_0x5b90e4,!0x1),_0xa8d733=this['_baseRoots']['get'](_0x2bc2eb)||Et(_0x2bc2eb,_0x5b90e4,!0x1);_0x141b04['isAttached']()||_0xa8d733['isAttached']()?(_0x6aebc1['set'](_0x2bc2eb,_0x5b90e4),_0x2c8b26['insertions'][_0x2bc2eb]=St(_0x141b04),_0x2c8b26['deletions'][_0x2bc2eb]=St(_0xa8d733),this['_copyMarkers'](_0x2c8b26['deletions'][_0x2bc2eb],_0xa8d733),this['_copyMarkers'](_0x2c8b26['insertions'][_0x2bc2eb],_0x141b04),_0x3b6d88['insertions'][_0x2bc2eb]=this['_generateTape'](this['_idsRoots']['get'](_0x2bc2eb),[]),_0x3b6d88['deletions'][_0x2bc2eb]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x2bc2eb)||Et(_0x2bc2eb,_0x5b90e4,!0x1),[])):_0x1f44a8['delete'](_0x2bc2eb);}for(const _0x3c8afd of _0x1f44a8){const _0x41d50a=_0x3b6d88['insertions'][_0x3c8afd];for(const _0x44deae of _0x41d50a){const _0x1f9083=this['_getVidAttributeName'](_0x44deae),_0x57af42=_0x44deae['item']['getAttribute'](_0x1f9083);_0x3ea444['delete'](_0x57af42),_0x57af42>=this['_startingRevisionId']&&_0x2f75d8['set'](_0x57af42,_0x4725e8['get'](_0x57af42));}}for(const _0x2ecac1 of _0x1f44a8){const _0x2bdee9=_0x3b6d88['insertions'][_0x2ecac1],_0x2cd183=this['_getBaseVids'](_0x3b6d88['deletions'][_0x2ecac1]);let _0x1bd48e=0x0;for(const _0x1a9b43 of _0x2bdee9){const _0x4916cc=this['_getVidAttributeName'](_0x1a9b43),_0x4b2886=_0x1a9b43['item']['getAttribute'](_0x4916cc);if(!_0x2f75d8['has'](_0x4b2886)&&!_0x3c4eb3['has'](_0x4b2886)){if(_0x3ea444['has'](_0x4b2886))_0x1bd48e++;else{if(_0x4b2886!=_0x2cd183[_0x1bd48e]){const _0x52ad4f=_0x4725e8['get'](_0x4b2886)||_0x4725e8['get'](_0x2cd183[_0x1bd48e]);for(;_0x4b2886!=_0x2cd183[_0x1bd48e];)_0x3ea444['has'](_0x2cd183[_0x1bd48e])||(_0x3c4eb3['set'](_0x2cd183[_0x1bd48e],_0x52ad4f),_0x4725e8['set'](_0x2cd183[_0x1bd48e],_0x52ad4f)),_0x1bd48e++;}_0x1bd48e++;}}}}for(const _0x3810f8 of _0x1f44a8){const _0x1f4b1c=_0x3b6d88['insertions'][_0x3810f8];for(const _0x5e3121 of _0x1f4b1c){const _0x4092fe=this['_getVidAttributeName'](_0x5e3121),_0x5dfb17=_0x5e3121['item']['getAttribute'](_0x4092fe);if(_0x3c4eb3['has'](_0x5dfb17)){const _0x4cea80=_0x3c4eb3['get'](_0x5dfb17);_0x3ea444['has'](_0x5dfb17)||_0x3ea444['set'](_0x5dfb17,{..._0x4cea80}),_0x2f75d8['set'](_0x5dfb17,{..._0x4cea80});}}}for(const _0x5b44e9 of _0x3ea444['keys']())_0x5b44e9>=this['_startingRevisionId']&&_0x3ea444['delete'](_0x5b44e9);const _0x2e98f8=new Map();for(const _0x483fdb of _0x1f44a8){let _0x11f8b4=_0x3b6d88['insertions'][_0x483fdb];for(const _0x1de2b3 of _0x11f8b4)if(_0x1de2b3['item']['is']('element','tableCell')){const _0x37b639=this['_getVidAttributeName'](_0x1de2b3),_0x377e80=_0x1de2b3['item']['getAttribute'](_0x37b639);if(_0x2f75d8['has'](_0x377e80)){const _0x1a6ae3=_0x1de2b3['item']['parent']['parent']['getAttribute']('vid_start'),_0x180798=_0x2f75d8['get'](_0x377e80),_0x1527eb=_0x2e98f8['get'](_0x1a6ae3)||{'users':new Set(),'aiSource':null};_0x1527eb['users']['add'](_0x180798['userId']),_0x1527eb['aiSource']=_0x1527eb['aiSource']||_0x180798['aiSource']||null,_0x2e98f8['set'](_0x1a6ae3,_0x1527eb);}}_0x11f8b4=_0x3b6d88['deletions'][_0x483fdb];for(const _0x19dadc of _0x11f8b4)if(_0x19dadc['item']['is']('element','tableCell')){const _0x513856=this['_getVidAttributeName'](_0x19dadc),_0x387645=_0x19dadc['item']['getAttribute'](_0x513856);if(_0x3ea444['has'](_0x387645)){const _0x514718=_0x19dadc['item']['parent']['parent']['getAttribute']('vid_start'),_0xc279c=_0x3ea444['get'](_0x387645),_0x340000=_0x2e98f8['get'](_0x514718)||{'users':new Set(),'aiSource':null};_0x340000['users']['add'](_0xc279c['userId']),_0x340000['aiSource']=_0x340000['aiSource']||_0xc279c['aiSource']||null,_0x2e98f8['set'](_0x514718,_0x340000);}}for(const _0x422e9f of _0x2e98f8['keys']())(_0x2f75d8['has'](_0x422e9f)||_0x3ea444['has'](_0x422e9f))&&_0x2e98f8['delete'](_0x422e9f);}for(const _0x4d59b2 of _0x1f44a8){const _0x2fd74b=_0x3b6d88['insertions'][_0x4d59b2];let _0x20da28=null,_0x5d62e8=null,_0x4f5a73=null;for(const _0x343884 of _0x2fd74b){const _0x236745=this['_getVidAttributeName'](_0x343884),_0x4af675=_0x343884['item']['getAttribute'](_0x236745),_0x342a0a=_0x2e98f8['get'](_0x4af675);if(_0x342a0a&&'elementStart'==_0x343884['type']&&(_0x20da28=Array['from'](_0x342a0a['users'])[0x0],_0x5d62e8=_0x342a0a['aiSource'],_0x4f5a73=_0x343884['item']['getAttribute']('vid_end')),_0x20da28){const _0x535b52=_0x5d62e8||_0x3ea444['get'](_0x4af675)?.['aiSource']||null,_0x2b2f2a=_0x5d62e8||_0x2f75d8['get'](_0x4af675)?.['aiSource']||null;_0x3ea444['set'](_0x4af675,{'userId':_0x20da28,'aiSource':_0x535b52}),_0x2f75d8['set'](_0x4af675,{'userId':_0x20da28,'aiSource':_0x2b2f2a});}_0x4af675==_0x4f5a73&&(_0x20da28=null,_0x4f5a73=null);}}const _0x45813f={},_0x1e9dcd=new Set();for(const _0x4bbd9a of _0x1f44a8){const _0x367a5f=_0x2c8b26['deletions'][_0x4bbd9a],_0x44bb95=_0x2c8b26['insertions'][_0x4bbd9a];for(const {userId:_0x22565c}of this['_touchedMarkers']['values']())null!==_0x22565c&&_0x1e9dcd['add'](_0x22565c);for(const {userId:_0x462012}of this['_touchedRoots']['values']())null!==_0x462012&&_0x1e9dcd['add'](_0x462012);const _0x17859c={};this['_markChanges'](_0x44bb95,_0x3b6d88['insertions'][_0x4bbd9a],_0x2f75d8,'insertion',_0x1e9dcd,_0x17859c),this['_markChanges'](_0x367a5f,_0x3b6d88['deletions'][_0x4bbd9a],_0x3ea444,'deletion',_0x1e9dcd,_0x17859c),this['_collectSuggestionAiSources'](_0x44bb95,_0x17859c),this['_collectSuggestionAiSources'](_0x367a5f,_0x17859c),_0x45813f[_0x4bbd9a]={'insertions':this['_prepareViewToSave'](_0x44bb95),'deletions':this['_prepareViewToSave'](_0x367a5f),'attachChange':this['_touchedRoots']['get'](_0x4bbd9a)||null,'attributesBefore':_0x4e6cfd(this['_baseRootsAttributes']['get'](_0x4bbd9a))||{},'attributesAfter':_0x4e6cfd(this['_diffRootsAttributes']['get'](_0x4bbd9a)),'rootElementName':_0x6aebc1['get'](_0x4bbd9a),'aiSources':_0x17859c};}const _0x4e628a=Array['from'](_0x2f75d8['values']())['some'](_0x1f5bc3=>!(!_0x1f5bc3||!_0x1f5bc3['aiSource']))||Array['from'](_0x3ea444['values']())['some'](_0x1adeab=>!(!_0x1adeab||!_0x1adeab['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x25a3b8=>this['_aiTouchedMarkers']['has'](_0x25a3b8));return{'diffData':_0x45813f,'authorsIds':Array['from'](_0x1e9dcd),'hasAIChanges':_0x4e628a};}_collectSuggestionAiSources(_0x2e55a3,_0x257eb7){const _0x20cb9f=_0x2e55a3['markers'];for(const _0x35dc9e of _0x20cb9f['keys']()){if(!_0x35dc9e['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x35dc9e))continue;const _0x115044=this['_aiTouchedMarkers']['get'](_0x35dc9e);_0x115044&&(_0x257eb7[_0x35dc9e]=_0x115044);}}_processRootBeforeSave(_0x43e487){for(const [,_0x40e2c1]of _0x43e487['markers']){const _0x200b5e=_0x40e2c1['start']['getAncestors']()['filter'](_0x23a697=>'tableCell'==_0x23a697['name']);for(const _0xbe301b of _0x200b5e)0x1==_0xbe301b['childCount']&&_0xbe301b['getChild'](0x0)['is']('element','paragraph')&&_0xbe301b['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1fb83c){this['_processRootBeforeSave'](_0x1fb83c);const _0x10401e=this['editor']['data']['toView'](_0x1fb83c,{}),_0x3cdc23=Array['from'](_0x10401e['getChildren']())['map'](_0xe0196c=>this['_getViewJson'](_0xe0196c));return JSON['stringify'](_0x3cdc23);}_getViewJson(_0x36a706){if(_0x36a706['is']('$text'))return _0x36a706['data'];{const _0x2030bd=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xd0c594=_0x36a706,_0xbb9e55=this['editor']['data']['htmlProcessor']['domConverter'],_0x584ad3={'type':_0x2030bd['_getTypeCharForViewElement'](_0xd0c594),'name':_0xd0c594['name'],'attributes':Array['from'](_0xd0c594['getAttributes']()),'children':Array['from'](_0xd0c594['getChildren']())['map'](_0x2fe3ff=>this['_getViewJson'](_0x2fe3ff))};if(_0x36a706['is']('uiElement')&&'$comment'!=_0x36a706['name']){const _0x586b82=_0x36a706['render'](_0xbb9e55['domDocument'],_0xbb9e55);_0x584ad3['children']['push'](_0x586b82['outerHTML']);}else{if(_0x36a706['is']('rawElement')){const _0x5b0d01=_0xbb9e55['domDocument']['createElement'](_0xd0c594['name']);_0x36a706['render'](_0x5b0d01,_0xbb9e55),_0x584ad3['children']['push'](_0x5b0d01['innerHTML']);}}const _0xc4aaec=Array['from'](_0xd0c594['getCustomProperties']());_0xc4aaec['length']>0x0&&(_0x584ad3['customProperties']=_0xc4aaec);const _0x5e7819=_0xd0c594['getFillerOffset']();return null!==_0x5e7819&&(_0x584ad3['fillerOffset']=_0x5e7819),_0x584ad3;}}['_markChanges'](_0x39575a,_0x4ae461,_0x5890fb,_0x2541b5,_0x55bb91,_0x12f138){let _0x4ab14b=null,_0x5e210a=null,_0x5b946c=0x0;const _0x5a99a0=this['editor']['model'];for(let _0x16fe23=0x0;_0x16fe23<_0x4ae461['length'];_0x16fe23++){const _0x3c666b=this['_getVidAttributeName'](_0x4ae461[_0x16fe23]),_0x27c191=_0x4ae461[_0x16fe23]['item']['getAttribute'](_0x3c666b),_0x2c2357=_0x5890fb['get'](_0x27c191),_0x4bfb17=_0x16fe23==_0x4ae461['length']-0x1;!_0x4ab14b&&_0x2c2357&&(_0x4ab14b=_0x2c2357,_0x5e210a=_0x4ae461[_0x16fe23]);const _0x4a2e89=!!_0x4ab14b&&!!_0x2c2357&&_0x2c2357['userId']!=_0x4ab14b['userId'],_0x521ac7=!!_0x4ab14b&&!!_0x2c2357&&_0x2c2357['aiSource']!=_0x4ab14b['aiSource'];_0x4ab14b&&(!_0x2c2357||_0x4a2e89||_0x521ac7)&&(_0xdb2186(_0x2c2357,Ot(_0x5e210a,_0x39575a,_0x5a99a0),Ot(_0x4ae461[_0x16fe23],_0x39575a,_0x5a99a0)),_0x4ab14b=_0x2c2357||null,_0x5e210a=_0x2c2357?_0x4ae461[_0x16fe23]:null),_0x4ab14b&&_0x4bfb17&&_0xdb2186(_0x2c2357,Ot(_0x5e210a,_0x39575a,_0x5a99a0),Ct(_0x4ae461[_0x16fe23],_0x39575a,_0x5a99a0));}function _0xdb2186(_0x31c549,_0x158321,_0x368337){const _0x20ff03=_0x4ab14b['userId'],_0x49aedf=_0x4ab14b['aiSource'],_0x457310='revision:'+_0x2541b5+':'+_0x20ff03+':'+_0x5b946c++,_0x138857=_0x5a99a0['createRange'](_0x158321,_0x368337);_0x39575a['markers']['set'](_0x457310,_0x138857),_0x49aedf&&(_0x12f138[_0x457310]=_0x49aedf),null!==_0x20ff03&&_0x55bb91['add'](_0x20ff03);}}_getVidAttributeName(_0xf5309d){switch(_0xf5309d['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x12c612){const _0x3a043e=this['_idsRoots']['get'](_0x12c612['position']['root']['rootName']),_0x2d38ec=_0x26b89f(_0x12c612['position'],_0x3a043e),_0x58876e=null===_0x12c612['_authorId']?null:_0x12c612['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x555703=_0x12c612['_aiSource']||null,_0x4f844b=_0x2d38ec['parent'],_0x59cbc7=this['_revisionId'],_0x23346c=[];for(const _0x47a4da of _0x12c612['nodes'])if(_0x47a4da['is']('element'))_0x23346c['push'](this['_makeIdsRoot'](_0x47a4da));else{for(let _0x1c1f04=0x0;_0x1c1f04<_0x47a4da['offsetSize'];_0x1c1f04++)_0x23346c['push'](new _0x359124('$text',{'vid':this['_revisionId']++}));}const _0x14a730=this['_revisionId'];for(let _0x2011b5=_0x59cbc7;_0x2011b5<_0x14a730;_0x2011b5++)this['_touched']['set'](_0x2011b5,{'userId':_0x58876e,'aiSource':_0x555703});_0x4f844b['_insertChild'](_0x2d38ec['offset'],_0x23346c);}_setTouched(_0x42bce1,_0x2ddfda,_0x4180db){this['_touched']['set'](_0x42bce1,{'userId':_0x2ddfda,'aiSource':_0x4180db||this['_touched']['get'](_0x42bce1)?.['aiSource']||null});}_handleMoveOperation(_0x496a2f){(_0x496a2f=this['_cloneOperation'](_0x496a2f,this['_idsRoots']))['_execute']();const _0x20f463=null===_0x496a2f['_authorId']?null:_0x496a2f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1e2af3=_0x496a2f['_aiSource']||null,_0x1d5651=_0x496a2f['getMovedRangeStart'](),_0x33a296=_0x1d5651['parent'],_0x294fea=_0x1d5651['offset'],_0x4f1b11=(_0x87edec,_0x56375f,_0x47b3b9)=>{for(let _0x3cb385=_0x56375f;_0x3cb385<_0x47b3b9;_0x3cb385++){const _0x273333=_0x87edec['getChild'](_0x3cb385);_0x273333['is']('element','$text')?this['_setTouched'](_0x273333['getAttribute']('vid'),_0x20f463,_0x1e2af3):(this['_setTouched'](_0x273333['getAttribute']('vid_start'),_0x20f463,_0x1e2af3),_0x4f1b11(_0x273333,0x0,_0x273333['childCount']),this['_setTouched'](_0x273333['getAttribute']('vid_end'),_0x20f463,_0x1e2af3));}};_0x4f1b11(_0x33a296,_0x294fea,_0x294fea+_0x496a2f['howMany']);}_handleMergeOperation(_0x3ab623){const _0xda1cca=null===(_0x3ab623=this['_cloneOperation'](_0x3ab623,this['_idsRoots']))['_authorId']?null:_0x3ab623['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x54e14e=_0x3ab623['_aiSource']||null,_0x1ec12c=_0x3ab623['targetPosition']['parent'],_0x4f3fc9=_0x3ab623['sourcePosition']['parent'],_0x3edf3e=_0x1ec12c['getAttribute']('vid_end'),_0x19a236=_0x4f3fc9['getAttribute']('vid_start');_0x1ec12c['_setAttribute']('vid_end',_0x4f3fc9['getAttribute']('vid_end')),_0x4f3fc9['_setAttribute']('vid_end',_0x3edf3e),this['_setTouched'](_0x19a236,_0xda1cca,_0x54e14e),this['_setTouched'](_0x3edf3e,_0xda1cca,_0x54e14e),_0x3ab623['_execute']();}_handleSplitOperation(_0x543c1){const _0x31ecdd=null===(_0x543c1=this['_cloneOperation'](_0x543c1,this['_idsRoots']))['_authorId']?null:_0x543c1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d6b4d=_0x543c1['_aiSource']||null,_0x588f4e=_0x543c1['graveyardPosition'],_0x55aa1f=_0x543c1['splitPosition']['parent'];_0x543c1['_execute']();const _0x4dfbad=_0x55aa1f['getAttribute']('vid_end'),_0x4ba76e=_0x543c1['insertionPosition']['nodeAfter'];if(_0x588f4e){const _0x3e2ec5=_0x4ba76e['getAttribute']('vid_end'),_0x4282ca=_0x55aa1f['getAttribute']('vid_end');_0x55aa1f['_setAttribute']('vid_end',_0x3e2ec5),_0x4ba76e['_setAttribute']('vid_end',_0x4282ca),this['_setTouched'](_0x55aa1f['getAttribute']('vid_end'),_0x31ecdd,_0x4d6b4d),this['_setTouched'](_0x4ba76e['getAttribute']('vid_start'),_0x31ecdd,_0x4d6b4d);}else{const _0x52c701=this['_revisionId']++,_0x2248b7=this['_revisionId']++;_0x55aa1f['_setAttribute']('vid_end',_0x52c701),_0x4ba76e['_setAttribute']('vid_start',_0x2248b7),_0x4ba76e['_setAttribute']('vid_end',_0x4dfbad),this['_setTouched'](_0x52c701,_0x31ecdd,_0x4d6b4d),this['_setTouched'](_0x2248b7,_0x31ecdd,_0x4d6b4d);}}_handleMarkerOperation(_0x5419e6){if(!_0x5419e6['affectsData'])return;const _0x5e1ffd=(_0x5419e6=this['_cloneOperation'](_0x5419e6,this['_diffRoots']))['oldRange']?_0x5419e6['oldRange']['root']:null,_0x16aa8f=_0x5419e6['newRange']?_0x5419e6['newRange']['root']:null;_0x5e1ffd&&this['_markers']['delete'](_0x5419e6['name']),_0x16aa8f&&this['_markers']['set'](_0x5419e6['name'],_0x5419e6['newRange']['clone']());const _0x135309=null===_0x5419e6['_authorId']?null:_0x5419e6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3580b6=_0x5419e6['name'];if(_0x5419e6['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x3580b6,_0x5419e6['_aiSource']),!this['_touchedMarkers']['has'](_0x3580b6))return void this['_touchedMarkers']['set'](_0x3580b6,{'range':_0x5419e6['oldRange'],'userId':_0x135309});const _0x344945=this['_touchedMarkers']['get'](_0x3580b6),_0x2e7a6c=_0x344945['range'],_0x50926c=_0x5419e6['newRange'];null==_0x2e7a6c&&null==_0x50926c||_0x2e7a6c&&_0x50926c&&_0x2e7a6c['isEqual'](_0x50926c)?this['_touchedMarkers']['delete'](_0x5419e6['name']):_0x344945['userId']=_0x135309;}_handleRootOperation(_0x412f57,_0x46736b){this['_diffRoots']['has'](_0x412f57['rootName'])?this['_diffRoots']['get'](_0x412f57['rootName'])['_isAttached']=_0x412f57['isAdd']:(this['_diffRoots']['set'](_0x412f57['rootName'],Et(_0x412f57['rootName'],_0x412f57['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x412f57['rootName'],{}),_0x46736b&&this['_idsRoots']['set'](_0x412f57['rootName'],Et(_0x412f57['rootName'],_0x412f57['elementName'],!0x0)));const _0x53ddaa=null===_0x412f57['_authorId']?null:_0x412f57['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ec674=this['_touchedRoots']['get'](_0x412f57['rootName']);_0x4ec674&&_0x4ec674['userId']===_0x53ddaa?this['_touchedRoots']['delete'](_0x412f57['rootName']):this['_touchedRoots']['set'](_0x412f57['rootName'],{'userId':_0x53ddaa,'isAttached':_0x412f57['isAdd']});}_handleRootAttributeOperation(_0x3bb297){const _0x274a90=this['_diffRootsAttributes']['get'](_0x3bb297['root']['rootName']);null===_0x3bb297['newValue']?delete _0x274a90[_0x3bb297['key']]:_0x274a90[_0x3bb297['key']]=_0x3bb297['newValue'];}};function St(_0xcb21f6){const _0x34307c=Et(_0xcb21f6['rootName'],_0xcb21f6['name'],_0xcb21f6['isAttached']());for(const _0x6ec2b6 of _0xcb21f6['getChildren']()){const _0x234faf=_0x6ec2b6['_clone'](!0x0);_0x34307c['_appendChild'](_0x234faf);}return _0x34307c;}function Et(_0x184aaa,_0x101264,_0x5d4547=!0x0){const _0x8a018d=new _0x692490();return _0x8a018d['rootName']=_0x184aaa,_0x8a018d['name']=_0x101264,_0x8a018d['_isAttached']=_0x5d4547,_0x8a018d['isAttached']=()=>_0x8a018d['_isAttached'],_0x8a018d;}function Ot(_0x584f11,_0x378665,_0x631f6f){const _0x2a4ec5='elementEnd'==_0x584f11['type']?_0x631f6f['createPositionAt'](_0x584f11['item'],'end'):_0x631f6f['createPositionBefore'](_0x584f11['item']);return _0x631f6f['createPositionFromPath'](_0x378665,_0x2a4ec5['path'],_0x2a4ec5['stickiness']);}function Ct(_0x212412,_0x28bc03,_0x10b135){const _0x45e089='elementStart'==_0x212412['type']?_0x10b135['createPositionAt'](_0x212412['item'],0x0):_0x10b135['createPositionAfter'](_0x212412['item']);return _0x10b135['createPositionFromPath'](_0x28bc03,_0x45e089['path'],_0x45e089['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xce83c1(dt);var xt=class extends Nt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0xa6d082,_0x35d4d1){super(_0xa6d082),this['focusTracker']=new _0x4034d8(),this['keystrokes']=new _0x222ccc(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x35d4d1),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'](),_t({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5dfaa1=_0x57d37e=>_0x57d37e['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5dfaa1),this['keystrokes']['set']('arrowleft',_0x5dfaa1),this['keystrokes']['set']('arrowup',_0x5dfaa1),this['keystrokes']['set']('arrowdown',_0x5dfaa1);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xd90056){this['revisionNameInputView']['fieldView']['element']['value']=_0xd90056['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x950f6e){const _0x30b843=new it(this['locale'],gt),_0x3b1b4d=_0x30b843['fieldView'];_0x3b1b4d['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4db798=kt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x950f6e&&(_0x4db798+='\x20('+kt(this['locale'],'optional')+')'),(_0x30b843['label']=_0x4db798,_0x3b1b4d['on']('input',()=>{this['revisionNameInputValue']=_0x3b1b4d['element']['value']['trim']();}),_0x30b843);}},Dt=class extends _0x34a844{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At];}['_saveRevisionFormView'];init(){const _0x8b4d68=this['editor'],_0x167a2a=_0x8b4d68['plugins']['get']('RevisionTracker');_0x8b4d68['ui']['componentFactory']['add']('revisionHistory',_0x13d073=>{const _0x554dc2=vt(_0x13d073),_0x28b361=_0x554dc2['panelView']['children'],_0x19462f=new st(_0x13d073),_0x3298ca=new et(_0x13d073),_0x42236b=this['_createSaveRevisionButton'](_0x2c5d24),_0x1086ed=new et(_0x13d073),_0x300a9f=this['_createOpenRevisionButton'](_0x2c5d24);return _0x554dc2['bind']('isEnabled')['to'](_0x167a2a,'isReady',_0x167a2a,'isEnabled',_0x8b4d68,'isReadOnly',(_0x3e0fa0,_0x1b6d1a,_0x19c1c4)=>_0x3e0fa0&&_0x1b6d1a&&!_0x19c1c4),_0x554dc2['buttonView']['set']({'icon':_0x3cf8e9,'label':kt(_0x13d073,'Revision\x20history'),'tooltip':!0x0}),_0x42236b['set']({'withText':!0x0,'role':'menuitem'}),_0x300a9f['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x300a9f,'execute',()=>{_0x554dc2['isOpen']=!0x1,_0x8b4d68['editing']['view']['focus']();},{'priority':'low'}),_0x3298ca['children']['add'](_0x42236b),_0x1086ed['children']['add'](_0x300a9f),_0x19462f['role']='menu',_0x19462f['items']['addMany']([_0x3298ca,_0x1086ed]),_0x28b361['add'](_0x19462f),_0x554dc2;}),_0x8b4d68['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0xdfdb93=this['editor'],_0x1a6bea=_0xdfdb93['locale'],_0x2b37a2=_0xdfdb93['plugins']['get']('RevisionTracker'),_0x4c0fe2=new at(_0x1a6bea),_0xe17ad=new rt(_0x1a6bea);_0x4c0fe2['bind']('isEnabled')['to'](_0x2b37a2,'isReady',_0x2b37a2,'isEnabled',_0xdfdb93,'isReadOnly',(_0x4116a7,_0x2b04f2,_0x5e4211)=>_0x4116a7&&_0x2b04f2&&!_0x5e4211),_0x4c0fe2['buttonView']['set']({'icon':_0x3cf8e9,'label':kt(_0x1a6bea,'Revision\x20history')});const _0x533745=new ot(_0x1a6bea,_0x4c0fe2),_0x492d12=this['_createSaveRevisionButton'](nt);_0x492d12['delegate']('execute')['to'](_0x4c0fe2),_0x533745['children']['add'](_0x492d12),_0xe17ad['items']['add'](_0x533745);const _0x37bbb0=new ot(_0x1a6bea,_0x4c0fe2),_0x16c2ac=this['_createOpenRevisionButton'](nt);return _0x16c2ac['delegate']('execute')['to'](_0x4c0fe2),_0x37bbb0['children']['add'](_0x16c2ac),_0xe17ad['items']['add'](_0x37bbb0),_0x4c0fe2['panelView']['children']['add'](_0xe17ad),_0x4c0fe2;}_createSaveRevisionButton(_0x5df2ad){const _0x4b1252=this['editor'],_0x1d2d89=_0x4b1252['plugins']['get']('RevisionTracker'),_0x24010b=new _0x5df2ad(_0x4b1252['locale']);return _0x24010b['set']({'label':kt(_0x4b1252['locale'],'Save\x20current\x20revision')}),_0x24010b['bind']('isEnabled')['to'](_0x1d2d89,'isReady',_0x1d2d89,'isEnabled',_0x4b1252,'isReadOnly',(_0x51867a,_0x26aa5c,_0x487787)=>_0x51867a&&_0x26aa5c&&!_0x487787),this['listenTo'](_0x24010b,'execute',()=>{this['_showDialog']();}),_0x24010b;}_createOpenRevisionButton(_0x551ee0){const _0x1a1ac8=this['editor'],_0x105324=_0x1a1ac8['plugins']['get']('RevisionTracker'),_0x1aa34e=new _0x551ee0(_0x1a1ac8['locale']);return _0x1aa34e['set']({'label':kt(_0x1a1ac8['locale'],'Open\x20revision\x20history')}),_0x1aa34e['bind']('isEnabled')['to'](_0x105324,'isReady',_0x1a1ac8,'isReadOnly',(_0x24e4cd,_0x390b23)=>_0x24e4cd&&!_0x390b23),this['listenTo'](_0x1aa34e,'execute',()=>{_0x1a1ac8['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1aa34e;}['_showDialog'](){const _0x52d975=this['editor'],_0x4ac40e=_0x52d975['locale'],_0x111c33=_0x52d975['plugins']['get']('Dialog'),_0x179d70=_0x52d975['plugins']['get']('RevisionTracker');function _0x22359e(_0x59f16a){_0x52d975['config']['get']('revisionHistory.requireRevisionName')&&''===_0x59f16a['revisionName']?_0x59f16a['revisionNameInputView']['errorText']=kt(_0x4ac40e,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x52d975['plugins']['get'](At)['saveRevision']({'name':_0x59f16a['revisionName']}),_0x111c33['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x22359e(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x111c33['show']({'id':'revisionSave','title':kt(_0x4ac40e,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':kt(_0x52d975['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x111c33['hide']()},{'label':kt(_0x52d975['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5ada19){_0x5ada19['bind']('isEnabled')['to'](_0x179d70,'isReady',_0x179d70,'isEnabled',_0x52d975,'isReadOnly',(_0x102ddd,_0x2c0546,_0x948b59)=>_0x102ddd&&_0x2c0546&&!_0x948b59);},'onExecute':()=>_0x22359e(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x510f00=this['editor'],_0x206a8b=_0x510f00['locale'];this['_saveRevisionFormView']=new xt(_0x206a8b,_0x510f00['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Vt=class extends dt{['changeId'];['_model'];constructor(_0x5aa3f2,_0x3574fe,_0x19084a=!0x1){super(_0x5aa3f2),this['_model']=_0x3574fe,this['changeId']=_0x3574fe['id'];const _0x30f070=this['bindTemplate'],_0x30fbe2=_0x19084a&&!!_0x3574fe['data']['aiSource'],_0x5e66b7=_0x30fbe2?this['_createAiIconView'](_0x5aa3f2):null;this['set']('type',_0x3574fe['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x30f070['to']('type',_0x3dfcc7=>'ck-revision-change__'+_0x3dfcc7),..._0x30fbe2?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x30fbe2?[this['_createAiDescriptionView'](_0x5aa3f2,_0x3574fe),_0x5e66b7]:this['_getDescriptionChildren'](_0x5aa3f2,_0x3574fe)}]});}_getDescriptionChildren(_0x512910,_0x1b04a3){let _0x47bda6='Removed\x20by';return _0x1b04a3['data']['isSuggestion']?_0x47bda6='Suggested\x20by':'add'==_0x1b04a3['type']&&(_0x47bda6='Added\x20by'),[this['_createLabel'](kt(_0x512910,_0x47bda6)),{'text':'\x20'+_0x1b04a3['author']['name']}];}_createAiDescriptionView(_0x3d1cea,_0x6a1601){let _0x38e98f='AI_SOURCE_REMOVED_BY';_0x6a1601['data']['isSuggestion']?_0x38e98f='AI_SOURCE_SUGGESTED_BY':'add'==_0x6a1601['type']&&(_0x38e98f='AI_SOURCE_ADDED_BY');const _0x13d939=new dt(_0x3d1cea);return _0x13d939['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0x13d939['render'](),_0x13d939['element']['innerHTML']=_0x29dae5(kt(_0x3d1cea,_0x38e98f,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+kt(_0x3d1cea,'AI_SOURCE_AI')+'</span>'])),_0x13d939['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x6a1601['author']['name'],_0x13d939;}_createLabel(_0x6c4805){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x6c4805}]};}_createAiIconView(_0x1e64ec){const _0x4719b9=new _0x58acf7();return _0x4719b9['content']=_0x587443,_0x4719b9['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':kt(_0x1e64ec,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x4719b9;}['focus'](){this['element']['focus']();}};const Tt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0xf057d();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x3a20dc){super(),this['id']=_0x3a20dc['id']||_0x326452(),this['author']=_0x3a20dc['author'],this['type']=_0x3a20dc['type'],this['data']=_0x3a20dc['data']||{},this['rootName']=_0x3a20dc['rootName'],this['set']('createdAt',_0x3a20dc['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x4f1df8,_0x20e771){this['newRevisionId']=_0x4f1df8,this['oldRevisionId']=_0x20e771,this['changes']=new _0x1e053f();}_setChanges(_0x3e4c19){for(const _0x3dfbc7 of _0x3e4c19)this['changes']['add'](_0x3dfbc7);}},Pt=class extends _0x34a844{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[_0x23e92a,_0x29d110,bt,Rt];}constructor(_0x4e0bcc){super(_0x4e0bcc),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',(_0x1743ac,_0x42149a,_0x45fd5a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x32989f=>{for(const _0x5971bf of this['editor']['editing']['view']['document']['roots'])_0x45fd5a?_0x32989f['removeClass']('ck-editor__editable__overlay',_0x5971bf):_0x32989f['addClass']('ck-editor__editable__overlay',_0x5971bf);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x20905d=>null!==_0x20905d),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3b9040,_0x291397,_0x5139a4)=>_0x3b9040&&_0x5139a4?_0x291397['changes']['getIndex'](_0x5139a4):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x30e942,_0x196953)=>_0x30e942?_0x196953['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x29d110),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x415a9b=this['editor'],_0x186ac4=new $t(_0x415a9b,{'direction':'backward'}),_0x3ab6f4=new $t(_0x415a9b,{'direction':'forward'});_0x415a9b['commands']['add']('showPreviousChange',_0x186ac4),_0x415a9b['commands']['add']('showNextChange',_0x3ab6f4),_0x415a9b['commands']['add']('restoreRevision',new Ft(_0x415a9b)),this['on']('change:numberOfChanges',()=>{_0x186ac4['refresh'](),_0x3ab6f4['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x415a9b['enableReadOnlyMode']('revision-viewer'),_0x415a9b['plugins']['has']('WidgetToolbarRepository')&&_0x415a9b['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x932422){return await this['_utils']['loadRevisionData'](_0x932422,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x932422);}async getRevisionRootsAttributes(_0x850d20){return await this['_utils']['loadRevisionData'](_0x850d20,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x850d20);}async['compare'](_0x1c21a7,_0x11fd61,_0x2a1cc2=!0x1){if(!this['isEnabled'])return;const _0x423e99=this['diff'],_0x1a30d9=this['repository'],_0x28aef1='string'==typeof _0x1c21a7?_0x1a30d9['getRevision'](_0x1c21a7):_0x1c21a7,_0x213b6b='string'==typeof _0x11fd61?_0x1a30d9['getRevision'](_0x11fd61):_0x11fd61,_0x3ef0fb=_0x28aef1['id'],_0x1c5bd2=_0x213b6b?_0x213b6b['id']:null;if(!_0x2a1cc2&&this['diff']&&this['diff']['newRevisionId']===_0x3ef0fb&&this['diff']['oldRevisionId']===_0x1c5bd2)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x3ef0fb,_0x1c5bd2);const _0x159fbc=this['_getRevisionsRange'](_0x28aef1,_0x213b6b,!0x0)['map'](_0x364069=>this['_utils']['loadRevisionData'](_0x364069,this['adapter']));return _0x159fbc['push'](new Promise(_0x111953=>{setTimeout(_0x111953,0x14);})),Promise['all'](_0x159fbc)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2d1602=this['_getDiff'](_0x3ef0fb,_0x1c5bd2);this['_cleanUpCommentMarkers'](_0x2d1602);for(const _0x331a4c of _0x2d1602['changes'])this['_changeIdToChange']['set'](_0x331a4c['id'],_0x331a4c);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5d76ac=>{for(const _0x399880 of this['editor']['model']['document']['getRootNames']())_0x5d76ac['detachRoot'](_0x399880);for(const _0x30ad34 of Object['keys'](_0x2d1602['model'])){const _0x1673da=_0x2d1602['model'][_0x30ad34]['name'],_0x4bf6c2=_0x5d76ac['addRoot'](_0x30ad34,_0x1673da);for(const _0x486ce5 of Object['keys'](_0x2d1602['attributes'][_0x30ad34]))_0x5d76ac['setAttribute'](_0x486ce5,_0x2d1602['attributes'][_0x30ad34][_0x486ce5],_0x4bf6c2);_0x5d76ac['insert'](_0x2d1602['model'][_0x30ad34],_0x4bf6c2,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2d1602['changes'])),this['isReady']=!0x0;})['catch'](_0xfe5637=>{console['error'](_0xfe5637),this['_cleanUp'](),_0x423e99&&(this['diff']=_0x423e99),this['isReady']=!0x0;});}addRevisionData(_0x27ed4b,_0xf5f27b){const _0x235a3e=this['repository']['createRevision'](_0x27ed4b);return _0x235a3e['on']('_update',(_0x42e445,_0x4b8b36,_0x21d992)=>_0xf5f27b(_0x4b8b36,_0x21d992,_0x235a3e)),this['repository']['addRevision'](_0x235a3e),_0x235a3e;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x57b9f6=>{for(const _0xf464ec of this['editor']['model']['document']['getRootNames']())_0x57b9f6['detachRoot'](_0xf464ec);});}_cleanUpCommentMarkers(_0x3be7f0){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x2eb2ba=this['_getVisibleCommentThreadIds']();for(const _0x932725 of Object['values'](_0x3be7f0['model']))for(const _0x228897 of Array['from'](_0x932725['markers']['keys']()))_0x228897['startsWith']('revision-comment:')&&!_0x2eb2ba['has'](Ut(_0x228897))&&_0x932725['markers']['delete'](_0x228897);}_sortAndFilterDiffChanges(_0x5617bd){const _0x102e5d=[],_0x3d7678=new Map();for(const _0x3d465d of this['editor']['model']['document']['getRootNames']()){const _0x4f5973=this['editor']['editing']['view']['getDomRoot'](_0x3d465d);if(!_0x4f5973)continue;const _0x2231f3=_0x4f5973['getClientRects']()['item'](0x0);_0x2231f3&&(_0x102e5d['push'](_0x3d465d),_0x3d7678['set'](_0x3d465d,_0x2231f3));}return _0x102e5d['sort']((_0x4d946b,_0x1f3882)=>{const _0x19c2bf=_0x3d7678['get'](_0x4d946b),_0xd40b90=_0x3d7678['get'](_0x1f3882);return _0x19c2bf['y']-_0xd40b90['y']||_0x19c2bf['x']-_0xd40b90['x'];}),(_0x5617bd=_0x5617bd['filter'](_0x3ae169=>_0x102e5d['includes'](_0x3ae169['rootName'])))['sort']((_0x52ab21,_0x4ead81)=>_0x102e5d['indexOf'](_0x52ab21['rootName'])-_0x102e5d['indexOf'](_0x4ead81['rootName'])),_0x5617bd;}['_makeTape'](_0x5950d7,_0x1fba30={}){const _0x420c10=Array['from'](_0x5950d7['markers'])['filter'](([_0x17403c,_0x2cbe47])=>_0x17403c['startsWith']('revision:')&&!_0x2cbe47['isCollapsed']),_0x900bc3=Array['from'](this['editor']['model']['createRangeIn'](_0x5950d7)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x420c10['length'])for(const _0x257883 of _0x900bc3){const [_0x448b3b,_0x419ec2]=_0x420c10[0x0],[,_0x530a7b,_0x3dae08]=_0x448b3b['split'](':'),_0x4a26a8=_0x1fba30[_0x448b3b]||null;if(_0x419ec2['end']['isEqual'](_0x257883['nextPosition'])&&_0x420c10['shift'](),(_0x257883['previousPosition']['isEqual'](_0x419ec2['start'])||_0x257883['previousPosition']['isAfter'](_0x419ec2['start']))&&('insertion'==_0x530a7b?_0x257883['isAdded']={'userId':_0x3dae08,'aiSource':_0x4a26a8}:'deletion'==_0x530a7b&&(_0x257883['isRemoved']={'userId':_0x3dae08,'aiSource':_0x4a26a8})),0x0==_0x420c10['length'])break;}return _0x900bc3;}_refreshStartEndIndex(_0x40a872){const _0x55bb87=new Map();for(let _0x825333=0x0;_0x825333<_0x40a872['length'];_0x825333++)'text'===_0x40a872[_0x825333]['type']?(_0x40a872[_0x825333]['item']['startIndex']=_0x825333,_0x40a872[_0x825333]['item']['endIndex']=_0x825333):('elementStart'===_0x40a872[_0x825333]['type']?_0x40a872[_0x825333]['item']['startIndex']=_0x825333:'elementEnd'===_0x40a872[_0x825333]['type']&&(_0x40a872[_0x825333]['item']['endIndex']=_0x825333),_0x55bb87['set'](_0x40a872[_0x825333]['id'],_0x825333));for(const _0x4bd969 of _0x55bb87['values']())'elementStart'===_0x40a872[_0x4bd969]['type']?_0x40a872[_0x4bd969]['item']['endIndex']=_0x55bb87['get'](_0x40a872[_0x4bd969]['pairId']):'elementEnd'===_0x40a872[_0x4bd969]['type']&&(_0x40a872[_0x4bd969]['item']['startIndex']=_0x55bb87['get'](_0x40a872[_0x4bd969]['pairId']));}['_processTape'](_0x57c3a2){for(let _0x5c36c1=0x0;_0x5c36c1<_0x57c3a2['length'];_0x5c36c1++){if('elementStart'===_0x57c3a2[_0x5c36c1]['type'])_0x57c3a2[_0x5c36c1]['item']['startIndex']=_0x5c36c1;else{if('elementEnd'===_0x57c3a2[_0x5c36c1]['type']){_0x57c3a2[_0x5c36c1]['item']['endIndex']=_0x5c36c1;const _0x408ba6=_0x57c3a2[_0x5c36c1]['item']['startIndex'];_0x57c3a2[_0x408ba6]['pairId']=_0x57c3a2[_0x5c36c1]['id'],_0x57c3a2[_0x5c36c1]['pairId']=_0x57c3a2[_0x408ba6]['id'];}else _0x57c3a2[_0x5c36c1]['item']['startIndex']=_0x5c36c1,_0x57c3a2[_0x5c36c1]['item']['endIndex']=_0x5c36c1,_0x57c3a2[_0x5c36c1]['pairId']=null;}_0x57c3a2[_0x5c36c1]['markersStart']||(_0x57c3a2[_0x5c36c1]['markersStart']=[],_0x57c3a2[_0x5c36c1]['markersEnd']=[]);}}_markInsertions(_0x2ff56a,_0x2cfb5b){const _0x3d1ae3=_0x2ff56a['filter'](_0x291833=>!_0x291833['isAdded']);for(let _0x328de6=0x0;_0x328de6<_0x2cfb5b['length'];_0x328de6++)_0x2cfb5b[_0x328de6]['isAdded']&&(_0x3d1ae3[_0x328de6]['isAdded']=_0x2cfb5b[_0x328de6]['isAdded']);}_getDiff(_0xf83114,_0x32329f=null){const _0x12cfc8=this['repository']['getRevision'](_0xf83114),_0x1f4414=_0x32329f?this['repository']['getRevision'](_0x32329f):null,_0x25c07b=this['_getRevisionsRange'](_0x12cfc8,_0x1f4414),_0x3e8fad=_0x25c07b[_0x25c07b['length']-0x1],_0x323eab=new Map(),_0x386963={'model':{},'attributes':{},'changes':[]},_0x2d64f1=new Set(),_0x16ba42=new Map();for(let _0x36aeb8=_0x25c07b['length']-0x1;_0x36aeb8>=0x0;_0x36aeb8--){const _0x385006=_0x25c07b[_0x36aeb8];for(const _0x48434b of Object['keys'](_0x385006['diffData']))if(_0x385006['diffData'][_0x48434b]['attachChange']){const _0x277975=_0x385006['diffData'][_0x48434b]['attachChange'];_0x277975['isAttached']?(_0x2d64f1['add'](_0x48434b),_0x16ba42['has'](_0x48434b)&&_0x16ba42['get'](_0x48434b)['userId']==_0x277975['userId']?_0x16ba42['delete'](_0x48434b):_0x16ba42['set'](_0x48434b,_0x277975)):_0x16ba42['has'](_0x48434b)?(_0x2d64f1['delete'](_0x48434b),_0x16ba42['delete'](_0x48434b)):(_0x2d64f1['add'](_0x48434b),_0x16ba42['set'](_0x48434b,_0x277975));}else _0x2d64f1['add'](_0x48434b);}for(const _0x4808de of _0x2d64f1){const _0x6031f3=_0x16ba42['has'](_0x4808de)&&!_0x16ba42['get'](_0x4808de)['isAttached'];let _0x31a677=_0x6031f3?_0x25c07b['length']-0x1:0x0;const _0x344f0e=_0x6031f3?-0x1:0x1;for(;_0x25c07b[_0x31a677];){const _0xdcb396=_0x25c07b[_0x31a677];if(_0xdcb396['diffData'][_0x4808de]){const _0x17f65e=_0x6031f3?_0xdcb396['diffData'][_0x4808de]['attributesBefore']:_0xdcb396['diffData'][_0x4808de]['attributesAfter'];_0x386963['attributes'][_0x4808de]=_0x17f65e?_0x4e6cfd(_0x17f65e):{};break;}_0x31a677+=_0x344f0e;}}for(const _0x272522 of _0x25c07b){_0x272522['model']={};for(const _0x5746ed of _0x272522['authors'])_0x323eab['set'](_0x5746ed['id'],_0x5746ed);for(const _0x4f527a of _0x2d64f1){const _0x3c1e31=_0x272522['diffData'][_0x4f527a]?_0x272522['diffData'][_0x4f527a]['insertions']:'[]',_0x3ebe0a=_0x272522['diffData'][_0x4f527a]?_0x272522['diffData'][_0x4f527a]['deletions']:'[]',_0x3bc36e=_0x272522['diffData'][_0x4f527a]?.['rootElementName']||'$root';_0x272522['model'][_0x4f527a]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3c1e31,_0x3bc36e),'deletions':this['_utils']['_makeModelFromViewString'](_0x3ebe0a,_0x3bc36e)};}}for(const _0x11e54f of _0x2d64f1){let _0x2c277b=null,_0x461b2d=0x0;const _0x5ccbb7=_0x25c07b['map'](_0x257f83=>_0x257f83['diffData'][_0x11e54f]?.['rootElementName'])['find'](_0x279b56=>void 0x0!==_0x279b56)||'$root',_0x2dda8e=new Map(Array['from'](_0x12cfc8['model'][_0x11e54f]['insertions']['markers'])['filter'](([_0x53e196])=>!_0x53e196['startsWith']('revision:')));let _0x32ed63=0x0;for(const _0x575e6e of _0x25c07b){const _0x4225be=_0x575e6e['diffData'][_0x11e54f]?.['aiSources']||{},_0x1cd421=this['_makeTape'](_0x575e6e['model'][_0x11e54f]['insertions'],_0x4225be);_0x575e6e==_0x12cfc8?(_0x2c277b=_0x1cd421,_0x461b2d=_0x2c277b['length'],_0x2c277b['forEach'](_0x1170ce=>{_0x1170ce['id']=_0x32ed63++;}),this['_processTape'](_0x2c277b)):this['_markInsertions'](_0x2c277b,_0x1cd421);const _0x1b2a6a=_0x2c277b['filter'](_0x1f082b=>!_0x1f082b['isAdded'])['map'](_0x40a617=>_0x40a617['id']);let _0x40ff6e=0x0;const _0x3b2518=this['_makeTape'](_0x575e6e['model'][_0x11e54f]['deletions'],_0x4225be);_0x3b2518['forEach'](_0xb51b05=>{_0xb51b05['isRemoved']?_0xb51b05['id']=_0x461b2d++:_0xb51b05['id']=_0x1b2a6a[_0x40ff6e++];}),this['_processTape'](_0x3b2518),this['_setDistance'](_0x2c277b,'isAdded'),this['_setDistance'](_0x3b2518,'isRemoved'),_0x575e6e==_0x12cfc8&&this['_markMarkers'](_0x2c277b,_0x2dda8e),_0x2c277b=this['_joinTapes'](_0x2c277b,_0x3b2518),this['_refreshStartEndIndex'](_0x2c277b),this['_setDistance'](_0x2c277b,'isRemoved');}_0x2c277b=_0x2c277b['filter'](_0x21bb30=>!(_0x21bb30['isAdded']&&_0x21bb30['isRemoved']));const _0x4451f4=new Map(_0x3e8fad['model'][_0x11e54f]['deletions']['markers']),_0x5f27ab=new Set(_0x2dda8e['keys']());for(const _0x5842d0 of _0x4451f4['keys']())_0x5f27ab['delete'](_0x5842d0);const _0x4557d1=Object['assign']({},..._0x25c07b['map'](_0x42ce8d=>_0x42ce8d['diffData'][_0x11e54f]?.['aiSources']));this['_markSuggestions'](_0x2c277b,_0x5f27ab,_0x4557d1),this['_fixObsoleteTags'](_0x2c277b),_0x2c277b=this['_removeMissingPairs'](_0x2c277b),_0x2c277b=this['_markMismatchedRemovedTags'](_0x2c277b),_0x2c277b=this['_removeUnsupportedChanges'](_0x2c277b);const {root:_0x1a7fa0,changes:_0x13e760}=this['_makeModelFromTape'](_0x2c277b,_0x323eab,_0x11e54f,_0x5ccbb7);_0x386963['model'][_0x11e54f]=_0x1a7fa0;const _0x6298d0=_0x16ba42['get'](_0x11e54f);if(_0x6298d0){const _0x4a896b=_0x323eab['get'](_0x6298d0['userId']),_0x3bb8d1=new Mt({'author':_0x4a896b,'type':_0x6298d0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x11e54f});_0x13e760['unshift'](_0x3bb8d1),_0x386963['attributes'][_0x11e54f]['revisionHistoryAttachChange']=_0x3bb8d1['id'];}_0x386963['changes']=_0x386963['changes']['concat'](_0x13e760);}return _0x386963;}['_markMarkers'](_0x1eaf6b,_0x3c6eb4){for(let _0x54916f=0x0;_0x54916f<_0x1eaf6b['length'];_0x54916f++)for(const [_0x11ae89,_0x5909b8]of _0x3c6eb4)!_0x5909b8['isCollapsed']&&_0x5909b8['start']['isEqual'](_0x1eaf6b[_0x54916f]['previousPosition'])&&_0x1eaf6b[_0x54916f]['markersStart']['push'](_0x11ae89),_0x5909b8['end']['isEqual'](_0x1eaf6b[_0x54916f]['nextPosition'])&&_0x1eaf6b[_0x54916f]['markersEnd']['push'](_0x11ae89);}['_joinTapes'](_0x3ad2c1,_0x5af356){let _0x3174a0=[],_0x3beb59=0x0,_0x204320=0x0;for(;_0x3beb59<_0x3ad2c1['length']||_0x204320<_0x5af356['length'];){const _0x5b3753=_0x3ad2c1[_0x3beb59]||{},_0x102d96=_0x5af356[_0x204320]||{};if(_0x5b3753['id']==_0x102d96['id'])_0x3beb59++,_0x204320++,_0x3174a0['push'](_0x5b3753);else{if(_0x102d96['isRemoved']&&_0x5b3753['isAdded']){const {commonTape:_0x44fa24,iEnd:_0x55b5f5,jEnd:_0x49aefa}=this['_threeWayMerge'](_0x3ad2c1,_0x3beb59,_0x5af356,_0x204320);_0x3174a0=_0x3174a0['concat'](_0x44fa24),_0x3beb59=_0x55b5f5,_0x204320=_0x49aefa;}else _0x102d96['isRemoved']?(_0x204320++,_0x3174a0['push'](_0x102d96)):(_0x3beb59++,_0x3174a0['push'](_0x5b3753));}}return _0x3174a0;}_markSuggestions(_0x4f9a6c,_0x2336aa,_0xe968c1){const _0x83298c=[];for(let _0x4cacc1=0x0;_0x4cacc1<_0x4f9a6c['length'];_0x4cacc1++){for(let _0x2b896f=0x0;_0x2b896f<_0x4f9a6c[_0x4cacc1]['markersStart']['length'];_0x2b896f++){const _0x45040e=_0x4f9a6c[_0x4cacc1]['markersStart'][_0x2b896f];if(!_0x2336aa['has'](_0x45040e))continue;const {group:_0x401a7d,type:_0x1b8117,authorId:_0x5136c7}=_0x2225e4(_0x45040e);if('revision-suggestion'!=_0x401a7d||'insertion'!=_0x1b8117&&'deletion'!=_0x1b8117)continue;const _0x4e6fec=_0xe968c1['suggestion:'+_0x45040e['slice'](0x14)]||null;_0x83298c['unshift']({'type':_0x1b8117,'name':_0x45040e,'userId':_0x5136c7,'aiSource':_0x4e6fec}),_0x4f9a6c[_0x4cacc1]['markersStart']['splice'](_0x2b896f,0x1),_0x2b896f--;}_0x465605(_0x4f9a6c[_0x4cacc1]);for(let _0x4460ac=0x0;_0x4460ac<_0x4f9a6c[_0x4cacc1]['markersEnd']['length'];_0x4460ac++){const _0x18846b=_0x4f9a6c[_0x4cacc1]['markersEnd'][_0x4460ac];if(!_0x2336aa['has'](_0x18846b))continue;const {group:_0x1ba9e6,type:_0x2a35ba}=_0x2225e4(_0x18846b);if('revision-suggestion'!=_0x1ba9e6||'insertion'!=_0x2a35ba&&'deletion'!=_0x2a35ba)continue;_0x4f9a6c[_0x4cacc1]['markersEnd']['splice'](_0x4460ac,0x1),_0x4460ac--;const _0x229d53=_0x83298c['findIndex'](_0x33d390=>_0x33d390['name']==_0x18846b);_0x229d53>-0x1&&_0x83298c['splice'](_0x229d53,0x1);}}function _0x2225e4(_0x3d5ddc){const _0x5e59d8=_0x3d5ddc['split'](':');return{'group':_0x5e59d8[0x0],'type':_0x5e59d8[0x1],'subType':_0x5e59d8['length']>=0x5?_0x5e59d8[0x2]:null,'id':_0x5e59d8['length']<0x5?_0x5e59d8[0x2]:_0x5e59d8[0x3],'authorId':_0x5e59d8['length']<0x5?_0x5e59d8[0x3]:_0x5e59d8[0x4],'markerCount':0x6==_0x5e59d8['length']?_0x5e59d8[0x5]:null};}function _0x465605(_0x1f76c7){for(let _0x147d46=0x0;_0x147d46<_0x83298c['length'];_0x147d46++){if(_0x1f76c7['isAdded']&&'insertion'==_0x83298c[_0x147d46]['type']&&_0x1f76c7['isAdded']['userId']==_0x83298c[_0x147d46]['userId'])return _0x1f76c7['isAddSuggestion']={..._0x83298c[_0x147d46],'aiSource':_0x1f76c7['isAdded']['aiSource']||_0x83298c[_0x147d46]['aiSource']},void delete _0x1f76c7['isAdded'];if(!_0x1f76c7['isAdded']&&!_0x1f76c7['isRemoved']&&'deletion'==_0x83298c[_0x147d46]['type'])return void(_0x1f76c7['isRemoveSuggestion']=_0x83298c[_0x147d46]);}}}_setDistance(_0x3898ba,_0x51444e){let _0x510180=0x0,_0x29d6e3=!0x1;const _0x276dc1=new Map();for(const _0x285c0d of _0x3898ba)_0x285c0d[_0x51444e]?_0x29d6e3&&(_0x510180++,_0x29d6e3=!0x1):(_0x510180++,_0x29d6e3=!0x0),_0x276dc1['set'](_0x285c0d['id'],_0x510180);for(let _0x1f6049=0x0;_0x1f6049<_0x3898ba['length'];_0x1f6049++){if('isRemoved'==_0x51444e&&_0x3898ba[_0x1f6049]['isAdded']||'isAdded'==_0x51444e&&_0x3898ba[_0x1f6049]['isRemoved'])continue;if('text'==_0x3898ba[_0x1f6049]['type']){_0x3898ba[_0x1f6049]['distance']=0x0;continue;}const _0x5a0a30=_0x276dc1['get'](_0x3898ba[_0x1f6049]['pairId']),_0x219e31=_0x276dc1['get'](_0x3898ba[_0x1f6049]['id']);_0x3898ba[_0x1f6049]['distance']=_0x5a0a30-_0x219e31;}}_getRevisionsRange(_0x2932dd,_0x41b4de,_0x26abf4=!0x1){const _0x5e3601=[];let _0x4569fa=this['repository']['getIndex'](_0x2932dd),_0x1cef3b=this['repository']['getIndex'](_0x41b4de);for(-0x1==_0x1cef3b&&(_0x1cef3b=this['repository']['_revisions']['length'],_0x26abf4=!0x1);_0x4569fa<_0x1cef3b;)_0x5e3601['push'](this['repository']['getRevision'](_0x4569fa)),_0x4569fa++;return _0x26abf4&&_0x5e3601['push'](this['repository']['getRevision'](_0x4569fa)),_0x5e3601;}_threeWayMerge(_0x17fad3,_0x13b657,_0x122bdc,_0x544ae5){const _0x118c69=this['editor']['model']['schema'];let _0x157837=_0x13b657;for(;_0x17fad3[_0x157837]&&_0x17fad3[_0x157837]['isAdded'];)_0x157837++;let _0x24c39f=_0x544ae5;for(;_0x122bdc[_0x24c39f]&&_0x122bdc[_0x24c39f]['isRemoved'];)_0x24c39f++;_0x31228d(_0x17fad3,_0x13b657,_0x157837),_0x31228d(_0x122bdc,_0x544ae5,_0x24c39f);const _0x522f8c=_0x122bdc['slice'](_0x544ae5,_0x24c39f)['concat'](_0x17fad3['slice'](_0x13b657,_0x157837));return _0x522f8c['sort']((_0x1bb3b,_0x321ec8)=>_0x1bb3b['side']!=_0x321ec8['side']?_0x1bb3b['side']-_0x321ec8['side']:_0x1bb3b['level']!=_0x321ec8['level']?_0x1bb3b['level']-_0x321ec8['level']:_0x1bb3b['distance']!=_0x321ec8['distance']?_0x321ec8['distance']-_0x1bb3b['distance']:!!_0x1bb3b['isAdded']!=!!_0x321ec8['isAdded']?-0x1==_0x1bb3b['side']||0x0==_0x1bb3b['side']?_0x1bb3b['isAdded']?-0x1:0x1:_0x1bb3b['isAdded']?0x1:-0x1:_0x1bb3b['index']-_0x321ec8['index']),{'commonTape':_0x522f8c,'iEnd':_0x157837,'jEnd':_0x24c39f};function _0x31228d(_0x1a218b,_0x35674a,_0x31c720){let _0x116760=-0x1,_0x10d940=Number['POSITIVE_INFINITY'],_0x58c5a7=!0x0;for(let _0x254e0e=_0x35674a;_0x254e0e<_0x31c720;_0x254e0e++)if(_0x118c69['isInline'](_0x1a218b[_0x254e0e]['item'])||(_0x58c5a7=!0x1),_0x1a218b[_0x254e0e]['item']['startIndex']<_0x35674a&&(_0x116760=_0x254e0e),_0x1a218b[_0x254e0e]['item']['endIndex']>=_0x31c720){_0x10d940=_0x254e0e;break;}_0x58c5a7&&(_0x116760=_0x31c720-0x1);for(let _0x5964bf=_0x35674a;_0x5964bf<_0x31c720;_0x5964bf++)_0x1a218b[_0x5964bf]['side']=_0x5964bf<=_0x116760?-0x1:_0x5964bf<_0x10d940?0x0:0x1,_0x1a218b[_0x5964bf]['index']=_0x5964bf;let _0x110585=0x0;for(let _0x33854a=_0x35674a;_0x33854a<=_0x116760;_0x33854a++)0x0==_0x1a218b[_0x33854a]['distance']?_0x1a218b[_0x33854a]['level']=_0x110585:(_0x110585++,_0x1a218b[_0x33854a]['level']=_0x110585,_0x110585++);for(let _0x246c39=_0x35674a;_0x246c39<_0x31c720;_0x246c39++)0x0==_0x1a218b[_0x246c39]['side']&&(_0x1a218b[_0x246c39]['level']=_0x110585);_0x110585=0x0;for(let _0x323e98=_0x31c720-0x1;_0x323e98>=_0x10d940;_0x323e98--)0x0==_0x1a218b[_0x323e98]['distance']?_0x1a218b[_0x323e98]['level']=_0x110585:(_0x110585--,_0x1a218b[_0x323e98]['level']=_0x110585,_0x110585--);}}_fixObsoleteTags(_0x1dbe2d){const _0x4549d6=new Map(),_0x5d8cc9=this['editor']['model']['schema'];for(let _0x28c367=0x1;_0x28c367<_0x1dbe2d['length'];_0x28c367++){let _0x2f6a06,_0x202169,_0x177861;const _0x2d8f50=_0x1dbe2d[_0x28c367],_0x521eb3=_0x1dbe2d[_0x28c367-0x1];if('text'==_0x2d8f50['type'])continue;if(_0x2d8f50['type']!=_0x521eb3['type'])continue;if(!_0x5d8cc9['isBlock'](_0x521eb3['item'])||_0x5d8cc9['isLimit'](_0x521eb3['item']))continue;if(!_0x5d8cc9['isBlock'](_0x2d8f50['item'])||_0x5d8cc9['isLimit'](_0x2d8f50['item']))continue;if((_0x1dbe2d[_0x28c367]['isAdded']||_0x1dbe2d[_0x28c367]['isAddSuggestion'])&&_0x1dbe2d[_0x28c367-0x1]['isRemoved'])_0x2f6a06=_0x1dbe2d[_0x28c367],_0x202169=_0x1dbe2d[_0x28c367-0x1],_0x177861=_0x28c367-0x1;else{if(!_0x1dbe2d[_0x28c367]['isRemoved']||!_0x1dbe2d[_0x28c367-0x1]['isAdded']&&!_0x1dbe2d[_0x28c367-0x1]['isAddSuggestion'])continue;_0x2f6a06=_0x1dbe2d[_0x28c367-0x1],_0x202169=_0x1dbe2d[_0x28c367],_0x177861=_0x28c367;}const _0x149338=_0x2f6a06['level']==_0x202169['level'],_0x28bd24=Math['abs'](_0x2f6a06['level'])<Math['abs'](_0x202169['level'])&&0x0==_0x202169['distance'];(_0x149338||_0x28bd24)&&(_0x4549d6['set'](_0x202169['id'],_0x2f6a06['id']),_0x1dbe2d['splice'](_0x177861,0x1),_0x28c367--,_0x2f6a06['isAdded']=!0x1);}for(let _0x536d93=0x0;_0x536d93<_0x1dbe2d['length'];_0x536d93++)_0x4549d6['has'](_0x1dbe2d[_0x536d93]['pairId'])&&(_0x1dbe2d[_0x536d93]['pairId']=_0x4549d6['get'](_0x1dbe2d[_0x536d93]['pairId']));}['_removeMissingPairs'](_0x2a314e){const _0x4e6db7=new Set(_0x2a314e['map'](_0x46264b=>_0x46264b['id']));for(let _0x306034=0x0;_0x306034<_0x2a314e['length'];_0x306034++)_0x4e6db7['has'](_0x2a314e[_0x306034]['pairId'])||0x0==_0x2a314e[_0x306034]['distance']||(_0x2a314e[_0x306034]['isIncorrect']=!0x0);return _0x2a314e['filter'](_0x35f3bb=>!_0x35f3bb['isIncorrect']);}_markMismatchedRemovedTags(_0x3e390e){const _0x297a6d=new Set();for(let _0x32ab57=0x0;_0x32ab57<_0x3e390e['length'];_0x32ab57++){if(_0x297a6d['has'](_0x3e390e[_0x32ab57]['id'])&&_0x3e390e[_0x32ab57]['isRemoved']&&(_0x3e390e[_0x32ab57]['isIncorrect']=!0x0),_0x3e390e[_0x32ab57]['isIncorrect'])continue;if(0x0==_0x3e390e[_0x32ab57]['distance'])continue;if('elementStart'!=_0x3e390e[_0x32ab57]['type'])continue;if(null==_0x3e390e[_0x32ab57]['pairId'])continue;let _0x528d43=_0x32ab57+0x1,_0x3d4770=0x0;for(;_0x3e390e[_0x528d43]['id']!=_0x3e390e[_0x32ab57]['pairId'];)'elementStart'==_0x3e390e[_0x528d43]['type']?_0x3d4770++:'elementEnd'==_0x3e390e[_0x528d43]['type']&&_0x3d4770--,_0x528d43++;if(0x0!=_0x3d4770){if(_0x3e390e[_0x32ab57]['isRemoved'])_0x3e390e[_0x32ab57]['isIncorrect']=!0x0;else{for(;_0x528d43!=_0x32ab57;)_0x3e390e[_0x528d43]['isRemoved']&&0x0!=_0x3e390e[_0x528d43]['distance']&&(_0x3e390e[_0x528d43]['isIncorrect']=!0x0,_0x297a6d['add'](_0x3e390e[_0x528d43]['pairId'])),_0x528d43--;}}}return _0x3e390e['filter'](_0x66e04b=>!_0x66e04b['isIncorrect']);}_removeUnsupportedChanges(_0x41bf7a){const _0x4c703e=this['editor']['model']['schema'];for(let _0x1f71b9=0x0;_0x1f71b9<_0x41bf7a['length'];_0x1f71b9++){if(!(_0x41bf7a[_0x1f71b9]['isAdded']||_0x41bf7a[_0x1f71b9]['isAddSuggestion']||_0x41bf7a[_0x1f71b9]['isRemoved']||_0x41bf7a[_0x1f71b9]['isRemoveSuggestion']))continue;if(0x0==_0x41bf7a[_0x1f71b9]['distance'])continue;const _0x19d412=_0x41bf7a[_0x1f71b9]['item'];_0x4c703e['isBlock'](_0x19d412)||_0x4c703e['isLimit'](_0x19d412)||(_0x41bf7a[_0x1f71b9]['isAdded']&&delete _0x41bf7a[_0x1f71b9]['isAdded'],_0x41bf7a[_0x1f71b9]['isAddSuggestion']&&delete _0x41bf7a[_0x1f71b9]['isAddSuggestion'],_0x41bf7a[_0x1f71b9]['isRemoveSuggestion']&&delete _0x41bf7a[_0x1f71b9]['isRemoveSuggestion'],_0x41bf7a[_0x1f71b9]['isRemoved']&&(_0x41bf7a[_0x1f71b9]['isIncorrect']=!0x0));}return _0x41bf7a['filter'](_0x26ffea=>!_0x26ffea['isIncorrect']);}['_makeModelFromTape'](_0x3c0dce,_0x2874a5,_0x4e2b17,_0x2a9bbf){const _0x19eac6=new _0x692490(),_0x182af6=[],_0x48fc16=new Map(),_0x54f756=this['editor']['model'],_0x59d987=_0x54f756['schema'],_0x181552=[_0x19eac6],_0x448873={},_0x307278={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x19eac6['name']=_0x2a9bbf;let _0x381807=null;const _0x445415=[0x0];for(let _0x215722=0x0;_0x215722<_0x3c0dce['length'];_0x215722++)if('elementStart'===_0x3c0dce[_0x215722]['type']){_0x3c0dce[_0x215722]['previousPosition']=_0x54f756['createPositionFromPath'](_0x19eac6,_0x445415);const _0x5b9ca7=new _0x359124(_0x3c0dce[_0x215722]['item']['name'],_0x3c0dce[_0x215722]['item']['getAttributes']());_0x181552[0x0]['_appendChild'](_0x5b9ca7),_0x445415['push'](0x0),_0x181552['unshift'](_0x5b9ca7),_0x3c0dce[_0x215722]['nextPosition']=_0x54f756['createPositionFromPath'](_0x19eac6,_0x445415);}else'elementEnd'===_0x3c0dce[_0x215722]['type']?(_0x181552['shift'](),_0x3c0dce[_0x215722]['previousPosition']=_0x54f756['createPositionFromPath'](_0x19eac6,_0x445415),_0x445415['pop'](),_0x445415[_0x445415['length']-0x1]++,_0x3c0dce[_0x215722]['nextPosition']=_0x54f756['createPositionFromPath'](_0x19eac6,_0x445415)):(_0x3c0dce[_0x215722]['previousPosition']=_0x54f756['createPositionFromPath'](_0x19eac6,_0x445415),_0x381807?_0x381807['_data']+=_0x3c0dce[_0x215722]['item']['data']:_0x381807=new _0x3a83c7(_0x3c0dce[_0x215722]['item']['data'],_0x3c0dce[_0x215722]['item']['getAttributes']()),_0x3c0dce[_0x215722+0x1]&&'text'===_0x3c0dce[_0x215722+0x1]['type']&&_0x44670e(_0x381807,_0x3c0dce[_0x215722+0x1]['item'])||(_0x181552[0x0]['_appendChild'](_0x381807),_0x381807=null),_0x445415[_0x445415['length']-0x1]+=_0x3c0dce[_0x215722]['item']['offsetSize'],_0x3c0dce[_0x215722]['nextPosition']=_0x54f756['createPositionFromPath'](_0x19eac6,_0x445415));for(let _0x2b40db=0x0;_0x2b40db<_0x3c0dce['length'];_0x2b40db++){const _0x20b094=_0x3c0dce[_0x2b40db]['previousPosition'],_0x370452=_0x3c0dce[_0x2b40db]['nextPosition'];for(const _0x5a8c10 of _0x3c0dce[_0x2b40db]['markersStart'])_0x48fc16['set'](_0x5a8c10,{'start':_0x20b094,'end':null});_0x1f875c('isRemoveSuggestion',_0x2b40db,_0x20b094,_0x370452),_0x1f875c('isAddSuggestion',_0x2b40db,_0x20b094,_0x370452),_0x1f875c('isRemoved',_0x2b40db,_0x20b094,_0x370452),_0x1f875c('isAdded',_0x2b40db,_0x20b094,_0x370452);for(const _0x54573a of _0x3c0dce[_0x2b40db]['markersEnd']){const _0x37f8a1=_0x48fc16['get'](_0x54573a);_0x37f8a1?_0x37f8a1['end']=_0x370452:_0x48fc16['set'](_0x54573a,{'start':_0x370452,'end':_0x370452});}}for(const [_0x13c7ab,_0x51c573]of _0x48fc16){const _0x570f21=this['editor']['model']['createRange'](_0x51c573['start'],_0x51c573['end']);_0x19eac6['markers']['set'](_0x13c7ab,_0x570f21);}return _0x182af6['sort']((_0x4ceaa4,_0x1c7c9c)=>{const _0x2063c9=_0x19eac6['markers']['get']('revision:'+_0x4ceaa4['id']),_0x537d88=_0x19eac6['markers']['get']('revision:'+_0x1c7c9c['id']);return _0x2063c9['start']['isBefore'](_0x537d88['start'])?-0x1:_0x2063c9['start']['isAfter'](_0x537d88['start'])?0x1:_0x2063c9['end']['isBefore'](_0x537d88['end'])?-0x1:_0x2063c9['end']['isAfter'](_0x537d88['end'])?0x1:'add'===_0x4ceaa4['type']?-0x1:0x1;}),{'root':_0x19eac6,'changes':_0x182af6};function _0x1f875c(_0x41b7eb,_0x64d99f,_0x53c758,_0x1cd706){const _0x39345c=!!_0x3c0dce[_0x64d99f][_0x41b7eb],_0x50e014=_0x39345c?_0x3c0dce[_0x64d99f][_0x41b7eb]['userId']:null,_0x3f0508=_0x39345c&&_0x3c0dce[_0x64d99f][_0x41b7eb]['aiSource']||null,_0x81be14=_0x64d99f===_0x3c0dce['length']-0x1,_0x5e2832=_0x307278[_0x41b7eb][0x0],_0x540112=_0x59d987['isObject'](_0x3c0dce[_0x64d99f]['item']);!_0x448873[_0x41b7eb]&&_0x39345c?_0x448873[_0x41b7eb]={'start':_0x53c758,'tapeItem':_0x3c0dce[_0x64d99f],'userId':_0x50e014,'aiSource':_0x3f0508,'type':_0x41b7eb}:_0x448873[_0x41b7eb]&&!_0x39345c?(_0x448873[_0x41b7eb]['end']=_0x53c758,_0x4468fe(_0x448873[_0x41b7eb]),_0x448873[_0x41b7eb]=null):_0x448873[_0x41b7eb]&&_0x39345c&&(_0x448873[_0x41b7eb]['userId']!==_0x50e014||_0x448873[_0x41b7eb]['aiSource']!==_0x3f0508)&&(_0x448873[_0x41b7eb]['end']=_0x53c758,_0x5e2832&&_0x5e2832['userId']===_0x448873[_0x41b7eb]['userId']?_0x5e2832['change']['aiSource']=_0x5e2832['change']['aiSource']||_0x448873[_0x41b7eb]['aiSource']:_0x4468fe(_0x448873[_0x41b7eb]),_0x448873[_0x41b7eb]={'start':_0x53c758,'tapeItem':_0x3c0dce[_0x64d99f],'userId':_0x50e014,'aiSource':_0x3f0508,'type':_0x41b7eb}),_0x448873[_0x41b7eb]&&_0x540112&&('elementStart'!==_0x3c0dce[_0x64d99f]['type']||_0x5e2832&&_0x5e2832['userId']===_0x50e014||_0x307278[_0x41b7eb]['unshift']({'userId':_0x50e014,'object':_0x3c0dce[_0x64d99f]['item'],'change':_0x448873[_0x41b7eb]}),'elementEnd'===_0x3c0dce[_0x64d99f]['type']&&_0x5e2832&&_0x5e2832['object']===_0x3c0dce[_0x64d99f]['item']&&(_0x307278[_0x41b7eb]['shift'](),_0x448873[_0x41b7eb]=_0x5e2832['change'])),_0x448873[_0x41b7eb]&&_0x81be14&&(_0x448873[_0x41b7eb]['end']=_0x1cd706,_0x4468fe(_0x448873[_0x41b7eb]),_0x448873[_0x41b7eb]=null);}function _0x4468fe({start:_0x3365ee,end:_0x40dd69,tapeItem:_0x285b3f,userId:_0x451285,aiSource:_0x554a11,type:_0x923713}){const _0x5925e7=_0x285b3f['item'],_0x567fc9=_0x54f756['schema']['isBlock'](_0x5925e7)&&!_0x54f756['schema']['isLimit'](_0x5925e7),_0x195993=_0x3365ee['nodeAfter']==_0x40dd69['parent']&&_0x40dd69['isAtStart'];if(_0x567fc9&&_0x195993)return;const _0x3ab50d=_0x54f756['createRange'](_0x3365ee,_0x40dd69),_0x245800=_0x2874a5['get'](_0x451285),_0x4bd242=new Mt({'author':_0x245800,'type':'isAdded'==_0x923713||'isAddSuggestion'==_0x923713?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x923713||'isRemoveSuggestion'==_0x923713,'aiSource':_0x554a11||null},'createdAt':new Date(),'rootName':_0x4e2b17});_0x182af6['push'](_0x4bd242),_0x19eac6['markers']['set']('revision:'+_0x4bd242['id'],_0x3ab50d);}function _0x44670e(_0x4e58ee,_0x23e71b){const _0x9df644=_0x4e58ee['getAttributes'](),_0x16d199=_0x23e71b['getAttributes']();for(const _0x48d793 of _0x9df644){if(_0x48d793[0x1]!==_0x23e71b['getAttribute'](_0x48d793[0x0]))return!0x1;_0x16d199['next']();}return _0x16d199['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x385466=>{const _0x1125f4=_0x385466['markerName']['split'](':')[0x1],_0x37b8c8=this['_getChangeFromId'](_0x1125f4);if(!_0x37b8c8)return null;const _0x5aee4f='add'==_0x37b8c8['type']?'insertion':'deletion',_0x19bdaa=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5aee4f];return _0x37b8c8['data']['isSuggestion']&&_0x19bdaa['push']('ck-suggestion-marker-'+_0x5aee4f+'-new'),this['activeChange']==_0x37b8c8&&_0x19bdaa['push']('ck-suggestion-marker--active'),{'classes':_0x19bdaa,'attributes':{'data-change-id':_0x1125f4}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x496e8a=>{_0x496e8a['on']('element:pre',(_0x274bfe,_0x2ff24c,_0x219896)=>{const _0x7507a9=_0x2ff24c['viewItem']['getChild'](0x0);if(!_0x7507a9||!_0x7507a9['is']('element','code'))return;if(!_0x219896['consumable']['consume'](_0x7507a9,{'attributes':['vid_start','vid_end']}))return;const _0x881124=_0x2ff24c['modelRange']['start']['nodeAfter'];_0x219896['writer']['setAttribute']('vid_start',_0x7507a9['getAttribute']('vid_start'),_0x881124),_0x219896['writer']['setAttribute']('vid_end',_0x7507a9['getAttribute']('vid_end'),_0x881124);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x148b21=>{_0x148b21['on']('element',(_0x537a98,_0x740d71,_0x31fb32)=>{if(!_0x31fb32['consumable']['consume'](_0x740d71['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x740d71['modelRange']['isCollapsed'])return;const _0x4ebf24=_0x740d71['modelRange']['start']['nodeAfter'];_0x4ebf24['hasAttribute']('vid_start')||_0x4ebf24['hasAttribute']('vid')||(_0x31fb32['writer']['setAttribute']('vid_start',_0x740d71['viewItem']['getAttribute']('vid_start'),_0x4ebf24),_0x31fb32['writer']['setAttribute']('vid_end',_0x740d71['viewItem']['getAttribute']('vid_end'),_0x4ebf24));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1b825c=>_0x1b825c['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x436fd0,[,_0x3db3d5])=>{['vid_start','vid_end','vid']['includes'](_0x3db3d5)&&(_0x436fd0['return']=!0x0,_0x436fd0['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x40b769=>{_0x40b769['on']('attribute:vid',(_0x46d53f,_0x31e36f,_0x19364d)=>{if('\x20'!=_0x31e36f['item']['data']||_0x31e36f['item']['parent']['maxOffset']>0x1)return;if(!_0x19364d['consumable']['consume'](_0x31e36f['item'],_0x46d53f['name']))return;const _0x165b1c=_0x19364d['writer'],_0x1faa8b=_0x19364d['mapper']['toViewRange'](_0x31e36f['range']);_0x165b1c['wrap'](_0x1faa8b,_0x165b1c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x448859){const _0x28005a=_0x448859['plugins']['get']('RevisionViewer');return(_0x5e3b0e,_0x29a1ef,_0x318b7e)=>{const _0x18216a=_0x29a1ef['markerName']['split'](':')[0x1],_0x4b5814=_0x28005a['_getChangeFromId'](_0x18216a);if(!_0x4b5814)return null;const _0x4731bb='add'==_0x4b5814['type']?'split':'merge';if(!_0x318b7e['consumable']['test'](_0x29a1ef['markerRange'],_0x5e3b0e['name']))return;const _0x3cfb7c=_0x29a1ef['markerRange']['getWalker'](),_0x59431a=_0x29a1ef['markerRange']['start'],_0x38559e=_0x448859['model']['schema'];let _0x55aade=null,_0x32bcfc=null,_0x45f804=!0x1,_0x2bfd99=!0x1;for(const _0x200b02 of _0x3cfb7c){const _0x8eef7f=_0x200b02['item'];_0x45f804=_0x45f804||_0x38559e['isContent'](_0x8eef7f);const _0x1f39e2=_0x318b7e['mapper']['toViewElement'](_0x8eef7f);if(_0x1f39e2&&_0x1f39e2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x200b02['type']&&(_0x38559e['isBlock'](_0x8eef7f)&&!_0x38559e['isLimit'](_0x8eef7f)&&(_0x8eef7f['nextSibling']||_0x59431a['isAtEnd']?_0x55aade&&_0x55aade['parent']==_0x8eef7f||(_0x55aade=_0x8eef7f,_0x626b56(_0x200b02['previousPosition']),_0x2bfd99=!0x0):_0x32bcfc=_0x32bcfc||_0x200b02['previousPosition']));}function _0x626b56(_0x18c5a2){const _0x95560=_0x318b7e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4731bb}),_0x4deb4f=_0x318b7e['mapper']['toViewPosition'](_0x18c5a2);_0x4b5814['data']['isSuggestion']&&_0x318b7e['writer']['addClass']('ck-suggestion-marker-'+_0x4731bb+'-new',_0x95560),_0x28005a['activeChange']==_0x4b5814&&_0x318b7e['writer']['addClass']('ck-suggestion-marker--active',_0x95560),_0x318b7e['writer']['insert'](_0x4deb4f,_0x95560),_0x318b7e['mapper']['bindElementToMarker'](_0x95560,_0x29a1ef['markerName']);}_0x45f804||_0x2bfd99||!_0x32bcfc||_0x626b56(_0x32bcfc);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x338bac,_0x584213,_0x65ade8)=>{const _0x2f5067=_0x65ade8['mapper']['markerNameToElements'](_0x584213['markerName']);if(_0x2f5067){for(const _0x43271f of _0x2f5067)(_0x43271f['hasClass']('ck-suggestion-marker-split')||_0x43271f['hasClass']('ck-suggestion-marker-merge'))&&(_0x65ade8['mapper']['unbindElementFromMarkerName'](_0x43271f,_0x584213['markerName']),_0x65ade8['writer']['remove'](_0x43271f));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1338f2,_0x341958,_0x211eaa)=>{const _0x4568a6=_0x341958['markerName']['split'](':')[0x1],_0x2b2305=this['_getChangeFromId'](_0x4568a6);if(!_0x2b2305)return null;const _0x1c16d1='add'==_0x2b2305['type']?'split':'merge';if(_0x211eaa['consumable']['test'](_0x341958['markerRange'],_0x1338f2['name']))for(const _0x35844c of _0x341958['markerRange']['getItems']()){if(!_0x35844c['is']('element','softBreak'))continue;const _0x3367a5=_0x211eaa['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1c16d1}),_0x3c93a7=_0x211eaa['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x35844c));_0x2b2305['data']['isSuggestion']&&_0x211eaa['writer']['addClass']('ck-suggestion-marker-'+_0x1c16d1+'-new',_0x3367a5),this['activeChange']==_0x2b2305&&_0x211eaa['writer']['addClass']('ck-suggestion-marker--active',_0x3367a5),_0x211eaa['writer']['insert'](_0x3c93a7,_0x3367a5),_0x211eaa['mapper']['bindElementToMarker'](_0x3367a5,_0x341958['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x210173=>{for(const _0x58b3d1 of this['editor']['model']['document']['getRootNames']()){const _0x32987c=this['editor']['model']['document']['getRoot'](_0x58b3d1),_0x119461=this['editor']['editing']['view']['document']['getRoot'](_0x58b3d1);if(_0x119461){const _0x1366db=_0x32987c['getAttribute']('revisionHistoryAttachChange');if(_0x210173['removeAttribute']('data-change-id',_0x119461),_0x210173['removeClass']('ck-revision-history-root-add',_0x119461),_0x210173['removeClass']('ck-revision-history-root-remove',_0x119461),_0x210173['removeClass']('ck-revision-history-root--active',_0x119461),_0x1366db){const _0x30057b=this['_getChangeFromId'](_0x1366db);if(!_0x30057b)return null;_0x210173['setAttribute']('data-change-id',_0x1366db,_0x119461),_0x210173['addClass']('ck-revision-history-root-'+_0x30057b['type'],_0x119461),this['activeChange']==_0x30057b&&_0x210173['addClass']('ck-revision-history-root--active',_0x119461);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3e5bea=>'revision-comment:'+_0x3e5bea,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x36e765=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x36e765['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x7118fb=>'revision-suggestion:'+_0x7118fb,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x465b01=>({'name':'suggestion:'+_0x465b01,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5cb8fa=>{const _0x52b28f=_0x5cb8fa['markerName']['split'](':')[0x1];return'insertion'!=_0x52b28f&&'deletion'!=_0x52b28f?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x52b28f]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x36ec9b,_0x251b57,_0x3423fb)=>{const _0x7fb69b=_0x3423fb['mapper']['markerNameToElements'](_0x251b57['markerName']);if(_0x7fb69b){for(const _0xa5dbf1 of _0x7fb69b)_0xa5dbf1['is']('uiElement')&&(_0x3423fb['mapper']['unbindElementFromMarkerName'](_0xa5dbf1,_0x251b57['markerName']),_0x3423fb['writer']['remove'](_0xa5dbf1));}},{'priority':'high'});}_getChangeFromId(_0x2ca4aa){return this['_changeIdToChange']['get'](_0x2ca4aa);}_getViewForChange(_0xdfd9c5){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0xdfd9c5,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x3f2755,_0x327b06,_0x570059,_0x42c073)=>{_0x42c073&&this['_balloon']['remove'](_0x42c073),_0x570059&&(this['_balloon']['add']({'view':_0x570059,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1f89ce=this['editor']['editing'],_0x24efae=this['_getChangeFromId'](_0x570059['changeId']);let _0x1da9e8;if(_0x24efae['data']['isOnRoot']){const _0x14bc33=_0x1f89ce['view']['getDomRoot'](_0x24efae['rootName']);_0x1da9e8=Array['from'](_0x14bc33['getClientRects']());}else{const _0x13bd71=this['editor']['model']['markers']['get']('revision:'+_0x570059['changeId']);_0x1da9e8=Array['from'](_0x1f89ce['mapper']['markerNameToElements'](_0x13bd71['name']))['map'](_0x443723=>_0x1f89ce['view']['domConverter']['mapViewToDom'](_0x443723))['map'](_0x1b0eee=>Array['from'](_0x1b0eee['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x1da9e8['find'](_0x1d7247=>_0x1d7247['top']-0x3<=this['_activeViewTarget']['y']&&_0x1d7247['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1d7247['left']-0x3<=this['_activeViewTarget']['x']&&_0x1d7247['right']+0x3>=this['_activeViewTarget']['x'])||_0x1da9e8[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x29a105,_0x495000,_0x52ef1e,_0xa5f1ba)=>{this['activeView']=_0x52ef1e?this['_getViewForChange'](_0x52ef1e):null,this['editor']['model']['change'](()=>{const _0x4d23bd=this['editor']['editing'];_0xa5f1ba&&(_0xa5f1ba['data']['isOnRoot']?_0x4d23bd['view']['change'](_0xa337d4=>{_0xa337d4['removeClass']('ck-revision-history-root--active',_0x4d23bd['view']['document']['getRoot'](_0xa5f1ba['rootName']));}):_0x4d23bd['reconvertMarker']('revision:'+_0xa5f1ba['id'])),_0x52ef1e&&(_0x52ef1e['data']['isOnRoot']?_0x4d23bd['view']['change'](_0x32423c=>{_0x32423c['addClass']('ck-revision-history-root--active',_0x4d23bd['view']['document']['getRoot'](_0x52ef1e['rootName']));}):_0x4d23bd['reconvertMarker']('revision:'+_0x52ef1e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5ba745,_0x4e1040)=>{if(this['activeChange'])return;const _0x74484b=this['_findChangeIdFromDomTarget'](_0x4e1040['target']),_0x110db8=this['_changeIdToChange']['get'](_0x74484b);_0x110db8?(this['_activeViewTarget']={'x':_0x4e1040['domEvent']['x'],'y':_0x4e1040['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x110db8)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4687e9,_0x169656)=>{const _0x7af1e8=this['_findChangeIdFromDomTarget'](_0x169656['target']),_0x69b181=this['_changeIdToChange']['get'](_0x7af1e8);_0x69b181?(this['_activeViewTarget']={'x':_0x169656['domEvent']['x'],'y':_0x169656['domEvent']['y']},_0x69b181===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x69b181):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x3a6cba){do{const _0x13ec2d=_0x3a6cba['getAttribute']('data-change-id');if(_0x13ec2d)return _0x13ec2d;_0x3a6cba=_0x3a6cba['parent'];}while(_0x3a6cba);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x2e2aef=>{for(const _0x1ef847 of this['editor']['model']['markers'])_0x2e2aef['removeMarker'](_0x1ef847);});}};function Ut(_0x2ec3a){return _0x2ec3a['split'](':')[0x1];}function Lt(_0x588adb,_0x15abf7){return(_0x5beb40,_0x2a110e,_0x319436)=>{if(!_0x319436['consumable']['test'](_0x2a110e['markerRange'],_0x5beb40['name']))return;const _0x1b90d2=_0x2a110e['markerRange']['getWalker'](),_0x2ea6b7=_0x2a110e['markerRange']['start'],_0x4a04bd=_0x588adb['model']['schema'];let _0x50b17e=null,_0x51d5fd=null,_0x1d7491=!0x1,_0x5d10a9=!0x1;for(const _0x429208 of _0x1b90d2){const _0xb2e3b7=_0x429208['item'];_0x1d7491=_0x1d7491||_0x4a04bd['isContent'](_0xb2e3b7);const _0x126274=_0x319436['mapper']['toViewElement'](_0xb2e3b7);if(_0x126274&&_0x126274['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x429208['type']&&(_0x4a04bd['isBlock'](_0xb2e3b7)&&!_0x4a04bd['isLimit'](_0xb2e3b7)&&(_0xb2e3b7['nextSibling']||_0x2ea6b7['isAtEnd']?_0x50b17e&&_0x50b17e['parent']==_0xb2e3b7||(_0x50b17e=_0xb2e3b7,_0x283afb(_0x429208['previousPosition']),_0x5d10a9=!0x0):_0x51d5fd=_0x51d5fd||_0x429208['previousPosition']));}function _0x283afb(_0x14474b){const _0x10f565=_0x319436['mapper']['toViewPosition'](_0x14474b),_0x4adca9=_0x319436['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x15abf7});_0x319436['writer']['insert'](_0x10f565,_0x4adca9),_0x319436['mapper']['bindElementToMarker'](_0x4adca9,_0x2a110e['markerName']);}_0x1d7491||_0x5d10a9||!_0x51d5fd||_0x283afb(_0x51d5fd);};}var Ft=class extends _0x94b04{constructor(_0x195bdc){super(_0x195bdc);const _0x1291da=_0x195bdc['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x1291da,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1291da,'change:isEnabled',()=>this['refresh']());}execute(){const _0x5681fb=this['editor'],_0x19020e=_0x5681fb['plugins']['get'](Pt),_0x5758d4=_0x19020e['isReady']?_0x19020e['diff']['newRevisionId']:null;_0x5681fb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5758d4);}['refresh'](){const {isReady:_0x39da44,isEnabled:_0xfe578b,repository:_0x114d7f,diff:_0x433517}=this['editor']['plugins']['get'](Pt),_0x34410f=_0x433517&&_0x114d7f['getLaterVisibleRevision'](_0x433517['newRevisionId']);this['isEnabled']=_0x39da44&&_0xfe578b&&Boolean(_0x34410f);}},$t=class extends _0x94b04{_step;constructor(_0x4a64fd,{direction:_0x294a3c}){super(_0x4a64fd);const _0x1fee25=_0x4a64fd['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x294a3c?0x1:-0x1,this['listenTo'](_0x1fee25,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1fee25,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1fee25,'change:activeChange',()=>this['refresh']());}execute(){const _0x1fddad=this['editor'],_0x416917=_0x1fddad['plugins']['get'](Pt),{isNavigationMode:_0x27cd73,currentChangeNumber:_0x4f071c}=_0x416917;let _0x164e33;if(_0x416917['activeChange']=_0x27cd73?_0x416917['diff']['changes']['get'](_0x4f071c+this['_step']):_0x416917['diff']['changes']['first'],_0x416917['activeChange']['data']['isOnRoot'])_0x164e33=_0x1fddad['editing']['view']['getDomRoot'](_0x416917['activeChange']['rootName']);else{const _0x1430d3=_0x1fddad['model']['markers']['get']('revision:'+_0x416917['activeChange']['id']);_0x164e33=_0x4916df(_0x1fddad['editing'],_0x1430d3);}_0x266468({'target':_0x164e33,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x23cdc8,currentChangeNumber:_0x1bba88,numberOfChanges:_0x5ccec3,isReady:_0x2a86ab,isEnabled:_0x14eec1}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x14eec1&&_0x2a86ab&&_0x5ccec3)&&(!_0x23cdc8||(0x1===this['_step']?_0x1bba88<_0x5ccec3-0x1:_0x1bba88>0x0));}},Bt=class extends dt{constructor(_0x1c201b){super(_0x1c201b);const _0x2e2220=this['bindTemplate'],_0x2ddd5b=new _0x2c5d24(_0x1c201b),_0x33b4cc=new _0x2c5d24(_0x1c201b);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',(_0x4cddda,_0x5e4a9f)=>_0x4cddda&&_0x5e4a9f>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x34f700,_0x4fa773,_0x2211fb,_0x4fb34d)=>{if(!_0x34f700)return kt(_0x1c201b,'Loading...');if(!_0x2211fb)return kt(_0x1c201b,'No\x20changes');const _0xe19f70=kt(_0x1c201b,'NUMBER_OF_CHANGES',_0x2211fb);return _0x4fb34d?kt(_0x1c201b,'X_OF_Y_CHANGES',[_0x4fa773+0x1,_0x2211fb]):_0xe19f70;}),_0x2ddd5b['set']({'label':kt(_0x1c201b,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2e4b52}),_0x33b4cc['set']({'label':kt(_0x1c201b,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x15e836}),_0x2ddd5b['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x33b4cc['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2ddd5b['on']('execute',()=>this['fire']('execute','backward')),_0x33b4cc['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',_0x2e2220['if']('_isStatusLabelVisible','ck-hidden',_0x3ed8b5=>!_0x3ed8b5)]},'children':[{'text':_0x2e2220['to']('isNavigationMode',_0xf95085=>_0xf95085?kt(_0x1c201b,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x1c201b,'Total')+':\x20')}]},{'text':_0x2e2220['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2ddd5b,_0x33b4cc]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x34a844{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x49dd20=this['editor']['editing']['view'];_0x49dd20['change'](_0xbb0d70=>{for(const _0x3e7af1 of _0x49dd20['document']['roots'])_0xbb0d70['addClass'](jt,_0x3e7af1);});}['hide'](){const _0x1e4594=this['editor']['editing']['view'];_0x1e4594['change'](_0x6ec5cf=>{for(const _0x562bf9 of _0x1e4594['document']['roots'])_0x6ec5cf['removeClass'](jt,_0x562bf9);});}},Kt=class extends _0x34a844{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x3cf447=this['editor'],_0x450d63=_0x3cf447['plugins']['get'](Pt),_0x3e0eed=_0x3cf447['plugins']['get'](Gt);_0x3cf447['ui']['componentFactory']['add']('exitToEditing',_0x52dc8d=>{const _0x30609c=new _0x2c5d24(_0x52dc8d);return _0x30609c['set']({'label':kt(_0x52dc8d,'Back\x20to\x20editing'),'icon':_0x1395d3,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x30609c,'execute',()=>{_0x3cf447['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x30609c;}),_0x3cf447['ui']['componentFactory']['add']('restoreRevision',_0x28ccbf=>{const _0x8312cc=new _0x2c5d24(_0x28ccbf);return _0x8312cc['set']({'label':kt(_0x28ccbf,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x8312cc['bind']('isEnabled')['to'](_0x3cf447['commands']['get']('restoreRevision')),this['listenTo'](_0x8312cc,'execute',()=>_0x3cf447['execute']('restoreRevision')),_0x8312cc;}),_0x3cf447['ui']['componentFactory']['add']('changesNavigation',_0x75d82e=>{const _0x41af25=new Bt(_0x75d82e),_0x2a605b=_0x3cf447['commands']['get']('showPreviousChange'),_0x47774e=_0x3cf447['commands']['get']('showNextChange');return _0x41af25['bind']('isBackwardNavigationEnabled')['to'](_0x2a605b,'isEnabled'),_0x41af25['bind']('isForwardNavigationEnabled')['to'](_0x47774e,'isEnabled'),_0x41af25['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x450d63),this['listenTo'](_0x41af25,'execute',(_0x5eced6,_0x818a03)=>{_0x3cf447['execute']('forward'===_0x818a03?'showNextChange':'showPreviousChange');}),_0x41af25;}),_0x3e0eed['show'](),_0x450d63['on']('change:isReady',(_0x48615d,_0x72a8e5,_0x5033ce)=>{_0x5033ce?_0x3e0eed['hide']():_0x3e0eed['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x1cb84c,_0x34d9b3){super(_0x1cb84c,_0x34d9b3);const _0x3b0524=this['bindTemplate'];this['set']({'label':kt(_0x1cb84c,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x1cb84c,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3b0524['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0xaab6cb(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0xcdf381=this['fieldView']['element'];this['_tooltipString']=_0xcdf381['scrollWidth']>_0xcdf381['clientWidth']&&_0xcdf381['value']||'';}},Yt=class extends dt{constructor(_0x517f78,_0x13a9ea,_0x663c6){super(_0x517f78);const _0x24da5c=new _0x58acf7();_0x24da5c['set']({'content':_0x4934a2,'viewBox':'0\x200\x2011\x2010'});const _0x40b4e3=['ck','ck-revision-history-sidebar__revision-author'];_0x663c6&&_0x40b4e3['push']('ck-revision-history-sidebar__revision-author_creator');const _0x25c190=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x517f78,_0x663c6?'Revision\x20creator':'Revision\x20author')},'children':[_0x24da5c,_0x13a9ea['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x40b4e3},'children':_0x25c190});}};function Jt(_0x35f0f1,_0x5bd349){const _0x3a4982=_0x35f0f1['bindTemplate'],_0x468cda=_0x35f0f1['locale'],_0x403322=vt(_0x468cda);_0x403322['panelPosition']='sw';const _0x94e32a=function(_0xd46eb,_0x420cca){const _0x1a78de=function(_0x36eabb,_0x327ced){const _0x18454e=_0x36eabb['locale'],_0xf85e90={'Compare\x20against\x20selected':kt(_0x18454e,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x18454e,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x18454e,'Restore\x20this\x20revision')};return _0x327ced['map'](_0x3c8486=>{const _0x1b3663=_0xf85e90[_0x3c8486['name']];return _0x1b3663&&_0x1b3663!==_0x3c8486['name']&&(_0x3c8486['name']=_0x1b3663),_0x3c8486;});}(_0xd46eb,_0x420cca),_0x1a3e27=new _0x1e053f();for(const _0x18d981 of _0x1a78de){const _0x23721a={'type':'button','model':new ut({'label':_0x18d981['name'],'class':_0x18d981['class'],'withText':!0x0,'role':'menuitem','_action':_0x18d981['action']})};_0x23721a['model']['bind']('isEnabled')['to'](_0xd46eb,'isActionsDropdownOpen',_0x1753f6=>'function'!=typeof _0x18d981['isEnabled']||(!_0x1753f6||_0x18d981['isEnabled'](_0xd46eb))),_0x1a3e27['add'](_0x23721a);}return _0x1a3e27;}(_0x35f0f1,_0x5bd349);return _0x35f0f1['bind']('isActionsDropdownOpen')['to'](_0x403322,'isOpen'),_0x403322['buttonView']['set']({'label':kt(_0x468cda,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x256c1a}),_0x403322['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3a4982['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3a4982['to'](_0x14132e=>_0x14132e['stopPropagation']())}}),_0x403322['on']('execute',_0x38a04e=>{_0x35f0f1['isReady']&&'function'==typeof _0x38a04e['source']['_action']&&_0x38a04e['source']['_action'](_0x35f0f1);}),ft(_0x403322,_0x94e32a,{'role':'menu'}),_0x403322['listenTo'](_0x35f0f1,'change:isActionsDropdownOpen',(_0x4012a5,_0x3a33bf,_0x5da2b0)=>{if(_0x5da2b0)for(const _0x38ab0c of _0x403322['listView']['items']){const _0x2e7569=_0x38ab0c['children']['first'],_0x4c5201=_0x5bd349['find'](_0x2314ec=>_0x2314ec['action']===_0x2e7569['_action'])['isVisible'];_0x38ab0c['isVisible']=void 0x0===_0x4c5201||_0x4c5201(_0x35f0f1);}}),_0x403322;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x1409f6(dt);var Xt=class extends Wt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0x1e0314,_0x572d95,_0x2cdbae,_0x2f15d8,_0x37162d=!0x1){super(_0x1e0314);const _0x45f33f=this['bindTemplate'],_0x2c888b=function(_0x4daf9d,_0x488c4f){const _0x1b2e4c=Array['from'](_0x488c4f['authors'])['filter'](_0x209e54=>_0x209e54!=_0x488c4f['creator']);return _0x488c4f['creator']&&_0x1b2e4c['unshift'](_0x488c4f['creator']),_0x1b2e4c['map'](_0x1f6005=>new Yt(_0x4daf9d,_0x1f6005,_0x1f6005==_0x488c4f['creator']));}(_0x1e0314,_0x572d95);this['id']=_0x572d95['id'],this['_revision']=_0x572d95,this['_requireRevisionName']=_0x2f15d8,this['bind']('_isAiGenerated')['to'](_0x572d95,'attributes',_0x5519ad=>!(!_0x5519ad||!_0x5519ad['@ai'])),this['bind']('name','createdAt')['to'](_0x572d95),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x347ae4=>{return _0x4afef9=_0x1e0314['uiLanguage'],(_0x4268e5=_0x347ae4)['toLocaleDateString'](_0x4afef9,{'month':'long','day':'numeric'})+',\x20'+_0x4268e5['toLocaleTimeString'](_0x4afef9,{'hour':'numeric','minute':'numeric'});var _0x4afef9,_0x4268e5;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new qt(_0x1e0314,gt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4f488e=>_0x4f488e||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x3d243f,_0xbadc7a)=>_0x3d243f&&_0xbadc7a),this['revisionActionsView']=_0x2cdbae&&_0x2cdbae['length']?Jt(this,_0x2cdbae):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x37162d?this['_createAiPillView'](_0x1e0314):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x45f33f['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x45f33f['if']('isEnabled','ck-disabled',_0x3b366a=>!_0x3b366a),_0x45f33f['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x45f33f['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x45f33f['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':_0x45f33f['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':_0x2c888b}]},..._0x37162d?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x45f33f['if']('_isAiGenerated','ck-hidden',_0x1cd5ac=>!_0x1cd5ac)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x45f33f['to'](_0x409f61=>{_0x409f61['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x2f4200){const _0x9c74ad=new _0x17a6ee(_0x2f4200);return _0x9c74ad['set']({'icon':_0x587443,'label':kt(_0x2f4200,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':kt(_0x2f4200,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x9c74ad['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x9c74ad;}['render'](){super['render']();const _0x12b295=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x12b295,'change',()=>{this['_requireRevisionName']&&!_0x12b295['value']||this['fire']('setName',{'id':this['id'],'name':_0x12b295['value']}),_0x12b295['value']||(_0x12b295['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Qt(_0x27be73,_0x8abd94){const _0x19f776=wt['fromJSDate'](_0x27be73)['setLocale'](_0x8abd94),_0x3f62c9=wt['local'](),_0xfddca3=_0x3f62c9['minus']({'days':0x1})['startOf']('day');let _0x596ccc,_0x2754ca;return _0x19f776['hasSame'](_0x3f62c9,'day')?(_0x596ccc=_0x19f776['startOf']('day')['toJSDate'](),_0x2754ca=_0x19f776['toRelativeCalendar']()):_0x19f776['hasSame'](_0xfddca3,'day')?(_0x596ccc=_0xfddca3['toJSDate'](),_0x2754ca=_0x19f776['toRelativeCalendar']()):_0x19f776['hasSame'](_0x3f62c9,'week')?(_0x596ccc=_0x19f776['startOf']('week')['toJSDate'](),_0x2754ca=_0x19f776['weekdayLong']||''):_0x19f776['hasSame'](_0x3f62c9,'year')?(_0x596ccc=_0x19f776['startOf']('month')['toJSDate'](),_0x2754ca=_0x19f776['monthLong']||''):(_0x596ccc=_0x19f776['startOf']('year')['toJSDate'](),_0x2754ca=String(_0x19f776['year'])),{'startDate':_0x596ccc,'localizedPeriodName':_0x2754ca};}var zt=class extends dt{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x387d71,_0x2f106e,_0x1aab08,_0x1da27e,_0x42c3dc){super(_0x387d71);const _0x24537b=Qt(_0x2f106e,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x2f106e,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1aab08,this['_requireRevisionName']=_0x1da27e,this['_showAISource']=_0x42c3dc,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':_0x24537b}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x3d9491){const _0x4bd0b=new Xt(this['locale'],_0x3d9491,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x4bd0b);}['removeRevision'](_0x5dd937){const _0x13bf5b=this['revisionViews']['find'](_0x3f4f67=>_0x3f4f67['id']===_0x5dd937['id']);this['revisionViews']['remove'](_0x13bf5b);}},Zt=class extends dt{constructor(_0x11627c){super(_0x11627c);const _0x500dc9=new _0x58acf7();_0x500dc9['content']=_0x3cf8e9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x500dc9,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[kt(_0x11627c,'Revision\x20history')]}]});}},ti=class extends dt{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x3edac3,_0x5d7b87,_0x1fa6c5,_0x4a7ba7,_0x3707a5){super(_0x3edac3);const _0x5e477a=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x5d7b87,this['_revisionActions']=_0x1fa6c5,this['_requireRevisionName']=_0x4a7ba7,this['_showAISource']=_0x3707a5,this['on']('select',(_0x446628,_0xeb6401)=>{this['fire']('revisionSelected',_0xeb6401);}),this['on']('setName',(_0x5bf9cb,_0x230adf)=>{this['fire']('revisionSetName',_0x230adf);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Zt(_0x3edac3),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x5e477a['if']('isEnabled','ck-disabled',_0x2ba6b4=>!_0x2ba6b4)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x4fe0cb of this['_revisions'])this['_addRevision'](_0x4fe0cb);this['_revisions']['on']('add',(_0x9d3a04,_0x4a0e06)=>{this['_addRevision'](_0x4a0e06);}),this['_revisions']['on']('remove',(_0x3c0fa,_0x39b936)=>{this['_removeRevision'](_0x39b936);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x16ff94=>_0x16ff94['revisionViews']['map'](_0x42ba49=>_0x42ba49))['flat']();}selectRevision(_0xab3330){for(const _0x394ce2 of this['revisionViews'])_0xab3330&&_0xab3330['id']===_0x394ce2['id']?_0x394ce2['select']():_0x394ce2['deselect']();}highlightRevisions(_0x446464){for(const _0x1d69ef of this['revisionViews'])_0x446464['some'](({id:_0x5aec41})=>_0x5aec41===_0x1d69ef['id'])?_0x1d69ef['highlight']():_0x1d69ef['unhighlight']();}['_addRevision'](_0x414644){const _0x3e3a27=Qt(_0x414644['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x30b497=this['_getTimePeriodViewByStartDate'](_0x3e3a27);_0x30b497||(_0x30b497=new zt(this['locale'],_0x3e3a27,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x30b497)),_0x30b497['addRevision'](_0x414644);}['_removeRevision'](_0x44664f){const _0x294df5=Qt(_0x44664f['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x294df5)['removeRevision'](_0x44664f);}_getTimePeriodViewByStartDate(_0x98f1a7){return this['timePeriodViews']['find'](_0x10f8f7=>_0x10f8f7['startDate']['getTime']()===_0x98f1a7['getTime']());}},ii=class RevisionsSidebar extends _0x34a844{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(
|
|
30
|
-
_0x2cc9cf(_0xf023ba);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x483dd1,_0x56c4f){super(_0x56c4f),this['sourceElement']=_0x483dd1,this['model']['document']['createRoot']();const _0x42cd89=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x42cd89);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x4702fd,_0x1f0b42){const _0x4dbd84=new this(_0x4702fd,_0x1f0b42);return await _0x4dbd84['initPlugins'](),await _0x4dbd84['ui']['init'](_0x4702fd),await _0x4dbd84['data']['init'](_0x4dbd84['config']['get']('initialData')||''),_0x4dbd84['fire']('ready'),_0x4dbd84;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x20938f{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e4362){super(_0x1e4362),this['result']='end',_0x1e4362['editing']['view']['_overlayModeHint']='auto',_0x1e4362['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x20938f{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x1bdde4){if(super(_0x1bdde4),!this['editor']['config']['get']('revisionHistory'))throw new _0x3b4618('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x18692a=>this['_showRevisionViewer']({..._0x18692a,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x34a23c=>this['_closeRevisionViewer'](_0x34a23c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x123c7f=>this['_restoreRevision'](_0x123c7f)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x37f47a){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x37f47a;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x36a647){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x36a647);}getRevision(_0x5249e1){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5249e1);}getRevisions(_0x39fb28){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x39fb28||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x520df4=this['editor'],_0x501ae0=_0x41f144(_0x520df4,ai),_0x2edad=_0x520df4['plugins']['get']('RevisionTracker'),_0x46050d=_0x520df4['plugins']['get'](_0x410d48)['users'];return _0x501ae0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x501ae0['lazyRoots'],(_0x501ae0['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x20938f{static get requires(){return[Pt,_0x410d48];}init(){const _0x474ea0=this['editor']['plugins']['get'](_0x410d48);for(const _0x3d7fc5 of _0x46050d)_0x3d7fc5['isAnonymous']||_0x474ea0['getUser'](_0x3d7fc5['id'])||_0x474ea0['addUser'](_0x3d7fc5);const _0x57036b=_0x2edad['repository']['getRevisions']();let _0x5d16df=null;const _0x431cba=this['editor']['plugins']['get']('RevisionViewer');if(_0x431cba['adapter']=_0x2edad['adapter'],_0x431cba['bind']('isEnabled')['to'](_0x2edad),_0x520df4['plugins']['has']('CommentsRepository')){const _0x502e2b=_0x520df4['plugins']['get']('CommentsRepository');_0x431cba['_getVisibleCommentThreadIds']=()=>new Set(_0x502e2b['getCommentThreads']()['filter'](_0x27e0a1=>!_0x27e0a1['isResolved'])['map'](_0x16f592=>_0x16f592['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x520df4,'isReadOnly',_0x100831=>!_0x100831);for(const _0x4c81b0 of _0x57036b){const _0x1bcdc8=null===_0x4c81b0['creator'];if(_0x1bcdc8&&_0x4c81b0['toVersion']===_0x4c81b0['fromVersion'])continue;const _0x384363=_0x4c81b0['toJSON']();_0x431cba['addRevisionData'](_0x384363,(_0x560e01,_0x280667,_0x54b947)=>{if(_0x1bcdc8){if(_0x5d16df)_0x5d16df['_update'](_0x560e01,_0x280667);else{if(!_0x280667){const _0x514e86=_0x54b947['toJSON']();_0x514e86['id']=_0x37fc40(),_0x2edad['saveRevision'](_0x514e86,_0x54b947['toVersion'])['then'](_0x4736da=>{_0x5d16df=_0x4736da;});}}}else _0x4c81b0['_update'](_0x560e01,_0x280667);});}}},ii),_0x501ae0);}['_enhanceShowRevisionViewerCallback'](){const _0x21dc96=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x587b62=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x587b62['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5ec0cc=this['editor']['plugins']['get']('Dialog');_0x5ec0cc['isOpen']&&_0x5ec0cc['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x41bfad=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x43dfc7 of _0x41bfad)_0x43dfc7['class']=_0x43dfc7['class']?_0x43dfc7['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x18b1d1=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x18b1d1&&_0x18b1d1['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x574438=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x574438&&_0x574438['setAttribute']('tabindex','-1');}}const _0x2a2765=this['_getRevisionViewerEditorConfig']();return _0x21dc96(_0x2a2765)['then'](_0x5ae022=>(this['_viewerEditor']=_0x5ae022,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'),_0x5ae022))['catch'](_0x591fb8=>(console['error'](_0x591fb8),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x51606d=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 _0x738be=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1cd623 of _0x738be)_0x1cd623['class']='ck-tab-panel_disabled'===_0x1cd623['class']?'':_0x1cd623['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x32232f=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x32232f&&_0x32232f['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x576ce8=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x576ce8&&_0x576ce8['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x51606d(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x15746e=this['editor']['plugins']['get']('Annotations');_0x15746e['refreshVisibility'](),_0x15746e['refreshPositioning']();}});});}['_showRevisionViewer'](_0x50a63c){const _0x156e20=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3fd983=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x292405=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x292405,_0x50a63c)['then'](_0x173066=>(_0x3fd983['style']['display']='block',_0x156e20['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x173066));}['_closeRevisionViewer'](_0x103625){const _0x35aa95=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x35aa95['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x103625['destroy']();}async _restoreRevision(_0x3c09b7){const _0x4c1e29=this['editor'],_0x4603b2=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x40c610=_0x4c1e29['plugins']['get']('RevisionTracker'),_0x2cfae1=_0x4c1e29['plugins']['get']('RevisionHistoryUtils'),_0x40bb40=_0x4603b2['repository']['getRevision'](_0x3c09b7);let _0x26aa57,_0x4e1002,_0x3d0d6e;try{await _0x2cfae1['loadRevisionData'](_0x40bb40,this['adapter']),_0x26aa57=_0x2cfae1['getRevisionDocumentData'](_0x40bb40),_0x4e1002=_0x2cfae1['getRevisionRootsAttributes'](_0x40bb40);}catch(_0x413ac2){return void console['error'](_0x413ac2);}_0x4c1e29['model']['change'](_0x518821=>{for(const _0x5b8b96 of Array['from'](_0x4c1e29['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x518821['removeMarker'](_0x5b8b96);}),_0x4603b2['isReady']=!0x1,_0x4c1e29['model']['enqueueChange'](_0x1a7d1e=>{_0x1a7d1e['setSelection'](null),_0x1a7d1e['removeSelectionAttribute'](_0x4c1e29['model']['document']['selection']['getAttributeKeys']());const _0x468309=Object['keys'](_0x26aa57);for(const _0x58e88e of _0x4c1e29['model']['document']['roots'])'$graveyard'!=_0x58e88e['rootName']&&_0x58e88e['isAttached']()&&!_0x468309['includes'](_0x58e88e['rootName'])&&_0x1a7d1e['detachRoot'](_0x58e88e);for(const _0x2e7c1b of _0x468309){let _0x958a9c=_0x4c1e29['model']['document']['getRoot'](_0x2e7c1b);if(!_0x958a9c||!_0x958a9c['isAttached']()){const _0x1417c2=_0x40bb40['diffData']?.[_0x2e7c1b]?.['rootElementName']||'$root';_0x958a9c=_0x1a7d1e['addRoot'](_0x2e7c1b,_0x1417c2);}const _0xec8ad4=_0x4e1002[_0x2e7c1b],_0x4b7399=Object['keys'](_0xec8ad4),_0x548e73=_0x26aa57[_0x2e7c1b];for(const _0x21c946 of _0x958a9c['getAttributeKeys']())_0x4b7399['includes'](_0x21c946)||_0x1a7d1e['removeAttribute'](_0x21c946,_0x958a9c);for(const _0x14c043 of _0x4b7399)_0x1a7d1e['setAttribute'](_0x14c043,_0x4e1002[_0x2e7c1b][_0x14c043],_0x958a9c);_0x1a7d1e['remove'](_0x1a7d1e['createRangeIn'](_0x958a9c)),_0x1a7d1e['insert'](_0x4c1e29['data']['parse'](_0x548e73,_0x958a9c),_0x958a9c,0x0);}});const _0x9ee743=kt(_0x4c1e29['locale'],'Restored');if(_0x40bb40['name'])_0x3d0d6e=-0x1==_0x40bb40['name']['indexOf'](_0x9ee743)?_0x9ee743+':\x20'+_0x40bb40['name']:_0x40bb40['name'];else _0x3d0d6e=_0x9ee743+':\x20'+(_0x40bb40['createdAt']['toLocaleDateString'](_0x4c1e29['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x40bb40['createdAt']['toLocaleTimeString'](_0x4c1e29['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x40c610['saveRevision']({'name':_0x3d0d6e}),_0x4603b2['isReady']=!0x0,_0x4c1e29['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|
|
29
|
+
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(_0x3ee738){super(_0x3ee738),this['_revisionViewer']=_0x3ee738['plugins']['get'](Pt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x2b8000=this['_revisionsRepository']['_revisions'],_0x419f38=this['_createRevisionActions'](),_0x26a1c4=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ti(this['editor']['locale'],_0x2b8000,_0x419f38,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',(_0x167300,_0x3038ce)=>{_0x3038ce['revisionViews']['on']('add',(_0x10c8c5,_0x3ce2d1)=>{_0x3ce2d1['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)),_0x26a1c4['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x4b2a6d=this['_revisionsRepository']['getRevision'](0x0);if(_0x4b2a6d){const _0x2e22cf=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4b2a6d['id']);this['_revisionViewer']['compare'](_0x4b2a6d,_0x2e22cf);}}_handleRevisionSelected(_0x2f7cf6,_0x31ac7c){const _0x4bbcc6=this['_revisionsRepository']['getRevision'](_0x31ac7c['id']),_0x5d678a=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4bbcc6['id']);this['_revisionViewer']['compare'](_0x4bbcc6,_0x5d678a);}_handleRevisionSetName(_0x3ac704,_0x29eac5){this['_revisionsRepository']['getRevision'](_0x29eac5['id'])['setName'](_0x29eac5['name']);}['_handleDiffChange'](_0x44b1c7,_0x1c8da5,_0x157beb){const _0x358926=this['_revisionsRepository']['getRevisionsInDiff'](_0x157beb);_0x358926['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x358926),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x358926[0x0]));}_createRevisionActions(){const _0x3c76f1=this['editor'],_0x2eaad2=RevisionsSidebar['availableRevisionActions'],_0xa7e339=_0x3c76f1['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0xa7e339['length'])return _0xa7e339['map'](_0x273f34=>{const _0x574da6='string'==typeof _0x273f34?Object['assign']({},_0x2eaad2[_0x273f34]):_0x273f34;return _0x574da6['action']=_0x574da6['action']['bind'](this,_0x3c76f1),_0x574da6['isVisible']&&(_0x574da6['isVisible']=_0x574da6['isVisible']['bind'](this,_0x3c76f1)),_0x574da6;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x362808},_0x5ee3a1)=>{const _0x35f335=_0x362808['get'](Pt),_0x42b105=_0x35f335['repository'];let _0x877984=_0x35f335['diff']['newRevisionId'],_0x3850fb=_0x5ee3a1['id'];_0x42b105['getIndex'](_0x877984)>_0x42b105['getIndex'](_0x3850fb)&&([_0x877984,_0x3850fb]=[_0x3850fb,_0x877984]),_0x35f335['compare'](_0x877984,_0x3850fb);},'isVisible':({plugins:_0x247a4b},_0x333f05)=>{const _0x1dd53f=_0x247a4b['get'](Pt);return!(_0x1dd53f['repository']['getRevisionsInDiff'](_0x1dd53f['diff'])['length']>0x2)&&!_0x333f05['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x35a77d,{id:_0x231c22})=>{_0x35a77d['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x231c22);},'isVisible':({plugins:_0xdd98b5},_0x570d84)=>!!_0xdd98b5['get'](Pt)['repository']['getLaterVisibleRevision'](_0x570d84['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x59f4fc},{id:_0x531e60,revisionNameView:_0x5976c5})=>{const _0x499763=_0x59f4fc['get'](Pt),_0x57f74f=_0x499763['repository']['getEarlierVisibleRevision'](_0x531e60);_0x499763['compare'](_0x531e60,_0x57f74f),_0x5976c5['focus'](),_0x5976c5['fieldView']['select']();}}};}var si=class extends _0x28d53c{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x3f34f2,_0x196529){super(_0x3f34f2),this['_view']=_0x196529,this['_toolbarConfig']=mt(_0x3f34f2['config']['get']('toolbar')),this['_elementReplacer']=new _0x259faf();}get element(){return this['view']['element'];}init(_0x5566ac){const _0x528fc2=this['editor'],_0x559783=this['view'],_0x6e9997=_0x528fc2['editing']['view'],_0x54ba64=_0x559783['editable'];_0x54ba64['name']=_0x6e9997['document']['getRoot']()['rootName'],_0x559783['render']();const _0x36a0c4=_0x54ba64['element'];this['setEditableElement'](_0x54ba64['name'],_0x36a0c4),_0x559783['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x6e9997['attachDomRoot'](_0x36a0c4),this['_elementReplacer']['replace'](_0x5566ac,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x1bb736=this['view'],_0x9ec262=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x9ec262['detachDomRoot'](_0x1bb736['editable']['name']),_0x1bb736['destroy']();}_initToolbar(){const _0x426c56=this['view'];_0x426c56['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x426c56['stickyPanel']['limiterElement']=_0x426c56['element'],_0x426c56['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x181761})=>_0x181761),_0x426c56['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x426c56['toolbar']);}},ni=class extends _0x1ce5c2{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x487285,_0x457dba,_0x45cb72={}){super(_0x487285),this['stickyPanel']=new ht(_0x487285),this['toolbar']=new lt(_0x487285,{'shouldGroupWhenFull':_0x45cb72['shouldToolbarGroupWhenFull']}),this['_editable']=new tt(_0x487285,_0x457dba);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const oi=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x547b8f(_0x185c86);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1fb235,_0x3b336a){super(_0x3b336a),this['sourceElement']=_0x1fb235,this['model']['document']['createRoot']();const _0x2324b6=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x2324b6);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x39ebba,_0x4882d7){const _0x6f6497=new this(_0x39ebba,_0x4882d7);return await _0x6f6497['initPlugins'](),await _0x6f6497['ui']['init'](_0x39ebba),await _0x6f6497['data']['init'](_0x6f6497['config']['get']('initialData')||''),_0x6f6497['fire']('ready'),_0x6f6497;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x34a844{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5cabdf){super(_0x5cabdf),this['result']='end',_0x5cabdf['editing']['view']['_overlayModeHint']='auto',_0x5cabdf['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x34a844{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0xa29e84){if(super(_0xa29e84),!this['editor']['config']['get']('revisionHistory'))throw new _0x49b9ef('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2463aa=>this['_showRevisionViewer']({..._0x2463aa,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x35fc82=>this['_closeRevisionViewer'](_0x35fc82)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x240b66=>this['_restoreRevision'](_0x240b66)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x2aa23c){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2aa23c;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x12d3f6){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x12d3f6);}getRevision(_0x37c19f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x37c19f);}getRevisions(_0x26911c){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x26911c||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0xa3171a=this['editor'],_0x44b4b0=_0x2e51b0(_0xa3171a,ai),_0x272f56=_0xa3171a['plugins']['get']('RevisionTracker'),_0x1b6b82=_0xa3171a['plugins']['get'](_0x23e92a)['users'];return _0x44b4b0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x44b4b0['lazyRoots'],(_0x44b4b0['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x34a844{static get requires(){return[Pt,_0x23e92a];}init(){const _0x3f4cc5=this['editor']['plugins']['get'](_0x23e92a);for(const _0x2ff35b of _0x1b6b82)_0x2ff35b['isAnonymous']||_0x3f4cc5['getUser'](_0x2ff35b['id'])||_0x3f4cc5['addUser'](_0x2ff35b);const _0x432b82=_0x272f56['repository']['getRevisions']();let _0xfce518=null;const _0x418b31=this['editor']['plugins']['get']('RevisionViewer');if(_0x418b31['adapter']=_0x272f56['adapter'],_0x418b31['bind']('isEnabled')['to'](_0x272f56),_0xa3171a['plugins']['has']('CommentsRepository')){const _0x30a513=_0xa3171a['plugins']['get']('CommentsRepository');_0x418b31['_getVisibleCommentThreadIds']=()=>new Set(_0x30a513['getCommentThreads']()['filter'](_0x10874c=>!_0x10874c['isResolved'])['map'](_0x5011b9=>_0x5011b9['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xa3171a,'isReadOnly',_0x5d24fb=>!_0x5d24fb);for(const _0x3ade30 of _0x432b82){const _0x49485c=null===_0x3ade30['creator'];if(_0x49485c&&_0x3ade30['toVersion']===_0x3ade30['fromVersion'])continue;const _0x318d6b=_0x3ade30['toJSON']();_0x418b31['addRevisionData'](_0x318d6b,(_0x17702b,_0x1e55c3,_0x19d757)=>{if(_0x49485c){if(_0xfce518)_0xfce518['_update'](_0x17702b,_0x1e55c3);else{if(!_0x1e55c3){const _0x4d4e9f=_0x19d757['toJSON']();_0x4d4e9f['id']=_0x326452(),_0x272f56['saveRevision'](_0x4d4e9f,_0x19d757['toVersion'])['then'](_0x383b03=>{_0xfce518=_0x383b03;});}}}else _0x3ade30['_update'](_0x17702b,_0x1e55c3);});}}},ii),_0x44b4b0);}['_enhanceShowRevisionViewerCallback'](){const _0x83274d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xb0a8c3=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0xb0a8c3['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x194dc9=this['editor']['plugins']['get']('Dialog');_0x194dc9['isOpen']&&_0x194dc9['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x1acc57=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x31956f of _0x1acc57)_0x31956f['class']=_0x31956f['class']?_0x31956f['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x40a4bc=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x40a4bc&&_0x40a4bc['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x8c752d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x8c752d&&_0x8c752d['setAttribute']('tabindex','-1');}}const _0x49aee9=this['_getRevisionViewerEditorConfig']();return _0x83274d(_0x49aee9)['then'](_0x38c829=>(this['_viewerEditor']=_0x38c829,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'),_0x38c829))['catch'](_0x374540=>(console['error'](_0x374540),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4b1455=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 _0x350a32=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x401007 of _0x350a32)_0x401007['class']='ck-tab-panel_disabled'===_0x401007['class']?'':_0x401007['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0xa8e26a=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xa8e26a&&_0xa8e26a['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4a09e5=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4a09e5&&_0x4a09e5['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4b1455(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x312b90=this['editor']['plugins']['get']('Annotations');_0x312b90['refreshVisibility'](),_0x312b90['refreshPositioning']();}});});}['_showRevisionViewer'](_0x1961f0){const _0x27ba4e=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2aaf29=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1f155e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x1f155e,_0x1961f0)['then'](_0x43a9f2=>(_0x2aaf29['style']['display']='block',_0x27ba4e['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x43a9f2));}['_closeRevisionViewer'](_0x80c2e9){const _0x546440=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x546440['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x80c2e9['destroy']();}async _restoreRevision(_0x5456e8){const _0x36936e=this['editor'],_0x5352e1=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x596294=_0x36936e['plugins']['get']('RevisionTracker'),_0x27b57d=_0x36936e['plugins']['get']('RevisionHistoryUtils'),_0xf3f25c=_0x5352e1['repository']['getRevision'](_0x5456e8);let _0xa6d800,_0x4b844d,_0x3859c5;try{await _0x27b57d['loadRevisionData'](_0xf3f25c,this['adapter']),_0xa6d800=_0x27b57d['getRevisionDocumentData'](_0xf3f25c),_0x4b844d=_0x27b57d['getRevisionRootsAttributes'](_0xf3f25c);}catch(_0xdd9049){return void console['error'](_0xdd9049);}_0x36936e['model']['change'](_0xe47d71=>{for(const _0xedbcc9 of Array['from'](_0x36936e['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xe47d71['removeMarker'](_0xedbcc9);}),_0x5352e1['isReady']=!0x1,_0x36936e['model']['enqueueChange'](_0x5b1e51=>{_0x5b1e51['setSelection'](null),_0x5b1e51['removeSelectionAttribute'](_0x36936e['model']['document']['selection']['getAttributeKeys']());const _0x385340=Object['keys'](_0xa6d800);for(const _0x1509cb of _0x36936e['model']['document']['roots'])'$graveyard'!=_0x1509cb['rootName']&&_0x1509cb['isAttached']()&&!_0x385340['includes'](_0x1509cb['rootName'])&&_0x5b1e51['detachRoot'](_0x1509cb);for(const _0x19ff96 of _0x385340){let _0xbfd2e=_0x36936e['model']['document']['getRoot'](_0x19ff96);if(!_0xbfd2e||!_0xbfd2e['isAttached']()){const _0x44c3c2=_0xf3f25c['diffData']?.[_0x19ff96]?.['rootElementName']||'$root';_0xbfd2e=_0x5b1e51['addRoot'](_0x19ff96,_0x44c3c2);}const _0x221e3f=_0x4b844d[_0x19ff96],_0x4ee456=Object['keys'](_0x221e3f),_0x837f36=_0xa6d800[_0x19ff96];for(const _0x1e03c6 of _0xbfd2e['getAttributeKeys']())_0x4ee456['includes'](_0x1e03c6)||_0x5b1e51['removeAttribute'](_0x1e03c6,_0xbfd2e);for(const _0x3687c4 of _0x4ee456)_0x5b1e51['setAttribute'](_0x3687c4,_0x4b844d[_0x19ff96][_0x3687c4],_0xbfd2e);_0x5b1e51['remove'](_0x5b1e51['createRangeIn'](_0xbfd2e)),_0x5b1e51['insert'](_0x36936e['data']['parse'](_0x837f36,_0xbfd2e),_0xbfd2e,0x0);}});const _0x611c80=kt(_0x36936e['locale'],'Restored');if(_0xf3f25c['name'])_0x3859c5=-0x1==_0xf3f25c['name']['indexOf'](_0x611c80)?_0x611c80+':\x20'+_0xf3f25c['name']:_0xf3f25c['name'];else _0x3859c5=_0x611c80+':\x20'+(_0xf3f25c['createdAt']['toLocaleDateString'](_0x36936e['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xf3f25c['createdAt']['toLocaleTimeString'](_0x36936e['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x596294['saveRevision']({'name':_0x3859c5}),_0x5352e1['isReady']=!0x0,_0x36936e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-revision-history",
|
|
3
|
-
"version": "49.0.0-alpha.
|
|
3
|
+
"version": "49.0.0-alpha.5",
|
|
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": "49.0.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-collaboration-core": "49.0.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-comments": "49.0.0-alpha.
|
|
40
|
-
"@ckeditor/ckeditor5-core": "49.0.0-alpha.
|
|
41
|
-
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.
|
|
42
|
-
"@ckeditor/ckeditor5-icons": "49.0.0-alpha.
|
|
43
|
-
"@ckeditor/ckeditor5-ui": "49.0.0-alpha.
|
|
44
|
-
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.
|
|
45
|
-
"@ckeditor/ckeditor5-widget": "49.0.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-autosave": "49.0.0-alpha.5",
|
|
38
|
+
"@ckeditor/ckeditor5-collaboration-core": "49.0.0-alpha.5",
|
|
39
|
+
"@ckeditor/ckeditor5-comments": "49.0.0-alpha.5",
|
|
40
|
+
"@ckeditor/ckeditor5-core": "49.0.0-alpha.5",
|
|
41
|
+
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.5",
|
|
42
|
+
"@ckeditor/ckeditor5-icons": "49.0.0-alpha.5",
|
|
43
|
+
"@ckeditor/ckeditor5-ui": "49.0.0-alpha.5",
|
|
44
|
+
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.5",
|
|
45
|
+
"@ckeditor/ckeditor5-widget": "49.0.0-alpha.5",
|
|
46
46
|
"@types/luxon": "3.6.2",
|
|
47
47
|
"es-toolkit": "1.52.0",
|
|
48
48
|
"luxon": "3.6.1"
|