@ckeditor/ckeditor5-revision-history 48.4.0-alpha.1 → 48.4.0-alpha.2
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/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- 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
|
-
_0x47a3a3();var gt=class extends vt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x372f55){super(),this['id']=_0x372f55['id']||_0x49a83a(),this['creator']=_0x372f55['creator']||null,this['authors']=_0x372f55['authors']||[],this['diffData']=_0x372f55['diffData']||null,this['toVersion']=_0x372f55['toVersion']||0x0,this['fromVersion']=_0x372f55['fromVersion']||0x0,this['set']('name',_0x372f55['name']||''),this['set']('createdAt',_0x372f55['createdAt']||new Date()),this['set']('attributes',_0x372f55['attributes']||{});}setName(_0x2967d9){this['_update']({'name':_0x2967d9});}setAttribute(_0x48a16a,_0x4aff30){const _0x1fe9ab=_0x2c6e4c(this['attributes']);_0x5df15a(_0x1fe9ab,_0x48a16a,_0x4aff30),this['_update']({'attributes':_0x1fe9ab});}removeAttribute(_0xb91981){const _0x3798cc=_0x2c6e4c(this['attributes']);_0x382a2c(_0x3798cc,_0xb91981),this['_update']({'attributes':_0x3798cc});}_update(_0x2b44e5,_0x653f1e=!0x1){let _0x43840d=!0x1;const _0x522fde={'id':this['id']};for(const _0x50d117 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x370f3a=_0x2b44e5[_0x50d117];void 0x0!==_0x370f3a&&_0x370f3a!==this[_0x50d117]&&(this[_0x50d117]=_0x370f3a,_0x522fde[_0x50d117]=_0x370f3a,_0x43840d=!0x0);}_0x43840d&&(_0x522fde['authors']&&(_0x522fde['authorsIds']=_0x522fde['authors']['map'](_0x5b9812=>_0x5b9812['id']),delete _0x522fde['authors']),this['fire']('_update',_0x522fde,_0x653f1e));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2396ca=>_0x2396ca['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x3bf7c2{['_revisions'];static get requires(){return[_0x403926];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x45ce47){super(_0x45ce47),this['_revisions']=new _0x15d7e8();}afterInit(){!async function(_0x3bdbe9){const _0x42c797='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x309624=0xeb829,_0x30b0c7=0x79140,_0x116586=window['Date']['now'](),_0x6047b2=_0x3bdbe9['editor'],_0x281f91=new window['Promise'](_0x4f0bc0=>{_0x6047b2['once']('ready',_0x4f0bc0);}),_0x1f34e9={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x460aa8=_0x6047b2['config']['get']('licenseKey');async function _0x58e5af(){let _0x466008,_0x19e372=null,_0x135b22=null;try{return'GPL'==_0x460aa8?'NotAllowed':(_0x466008=_0x43afce(),_0x466008?(_0x466008['usageEndpoint']&&(_0x135b22=_0x95ac2c(_0x466008['usageEndpoint'],_0x466008['jti'])),await _0x260489()?_0x4cb9ed()?_0x5046f4()?'Expired':_0x329d14()?('evaluation'==_0x466008['licenseType']&&(_0x19e372=_0x77e732('EvaluationLimit')),await _0xb01c9e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5046f4(){const _0x3f9964=['evaluation','trial']['includes'](_0x466008['licenseType'])?_0x116586/0x3e8:0xe10*_0x30b0c7;return _0x466008['exp']<_0x3f9964;}function _0x4cb9ed(){const _0x40c490=_0x466008['features'];if(!_0x40c490)return!0x1;if(_0x40c490['includes']('*'))return!0x0;if(_0x40c490['includes']('RH'))return!0x0;if(_0x40c490['includes']('RRH')){if(_0x40b107())return!0x0;if(_0x58011b()||_0x476ef8())return!0x0;}return!0x1;}function _0x329d14(){const _0x214668=_0x466008['licensedHosts'];if(!_0x214668||0x0==_0x214668['length'])return!0x0;const {hostname:_0x1f5767}=new URL(window['location']['href']);if(_0x214668['includes'](_0x1f5767))return!0x0;const _0x3861d8=_0x1f5767['split']('.');return _0x214668['filter'](_0x7df736=>_0x7df736['includes']('*'))['map'](_0x2639ef=>_0x2639ef['split']('.'))['filter'](_0xaa4f7=>_0xaa4f7['length']<=_0x3861d8['length'])['map'](_0xe8314=>Array(_0x3861d8['length']-_0xe8314['length'])['fill']('*'===_0xe8314[0x0]?'*':'')['concat'](_0xe8314))['some'](_0x2d8e58=>_0x3861d8['every']((_0x42ffff,_0x55d3fc)=>_0x2d8e58[_0x55d3fc]===_0x42ffff||'*'===_0x2d8e58[_0x55d3fc]));}function _0xb01c9e(){return _0x19e372&&_0x135b22?new window['Promise']((_0x4e3c6a,_0x295f3b)=>{_0x19e372['then'](_0x4e3c6a,_0x295f3b),_0x135b22['then'](_0x100e81=>{'Valid'!=_0x100e81&&_0x4e3c6a(_0x100e81);},_0x295f3b);}):_0x19e372||_0x135b22||'Valid';}}function _0x95ac2c(_0x1096f4,_0x55a25d){return new window['Promise'](_0x9146da=>{if(_0x458b13())return _0x9146da('Valid');_0x29e711(),_0x6047b2['decorate']('_sendUsageRequest');let _0x3cd39a=!0x1;const _0x5c74e6=_0x49a83a();function _0x21765e(_0x35c059){return!!_0x35c059&&('object'==typeof _0x35c059||'function'==typeof _0x35c059)&&'function'==typeof _0x35c059['then']&&'function'==typeof _0x35c059['catch'];}function _0x9dfbd(_0x11b623){_0x352d5e(_0x11b623)['then'](_0x1901ac=>_0x1901ac&&'ok'==_0x1901ac['status']?_0xcab5a5(_0x176965(_0x5c74e6+_0x55a25d))!=_0x1901ac['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x58311d=>(_0x2f19ca(),_0x58311d),()=>{const _0xdbe178=_0x87fdde();return null==_0xdbe178?(_0x2f19ca(),'Valid'):_0x116586-_0xdbe178>0x240c8400?'UsageLimit':'Valid';})['then'](_0x9146da)['catch'](()=>{_0x9146da('UsageLimit');});const _0x2b3c43=0x36ee80;function _0x2f19ca(){const _0x4243f9='llct-'+_0xcab5a5(_0x176965(_0x1096f4)),_0x2e4e75=_0x544ff5(_0xcab5a5(window['Math']['ceil'](_0x116586/_0x2b3c43)));window['localStorage']['setItem'](_0x4243f9,_0x2e4e75);}function _0x87fdde(){const _0x5cd534='llct-'+_0xcab5a5(_0x176965(_0x1096f4)),_0x322668=window['localStorage']['getItem'](_0x5cd534);return _0x322668?window['parseInt'](_0x544ff5(_0x322668),0x10)*_0x2b3c43:null;}function _0x352d5e(_0x37a373){return new window['Promise']((_0x4ac5c0,_0x685311)=>{_0x37a373['then'](_0x4ac5c0,_0x685311),window['setTimeout'](_0x685311,0x1d4c0);});}}_0x6047b2['on']('_sendUsageRequest',(_0x136fb2,_0x10a476)=>{if(_0x10a476[0x0]!=_0x1096f4)return _0x9146da('UsageLimit');_0x10a476[0x1]={..._0x10a476[0x1],'requestId':_0x5c74e6};},{'priority':'high'}),_0x6047b2['on']('_sendUsageRequest',_0x463131=>{_0x21765e(_0x463131['return'])&&(_0x3cd39a=!0x0,_0x9dfbd(_0x463131['return']));},{'priority':'low'}),_0x281f91['then'](()=>{_0x3cd39a||_0x9146da('UsageLimit');});});function _0x458b13(){return'auto'==_0x6047b2['editing']['view']['_overlayModeHint'];}function _0x29e711(){_0x6047b2['editing']['view']['_overlayModeHint']='auto';}}function _0x77e732(_0x2d3fd0){const _0x1bc5db=[new window['Promise'](_0x5ab398=>setTimeout(_0x5ab398,0x93ecc)),_0x281f91['then'](()=>new window['Promise'](_0x22635c=>{const _0x503c82=0x7,_0x334d63=_0x3bdbe9['_revisions'];function _0x5a71a4(){_0x334d63['length']>=_0x503c82&&_0x22635c();}_0x5a71a4(),_0x334d63['on']('add',_0x5a71a4);})),new window['Promise'](_0x433367=>{function _0x58cefd(){for(const _0x3a1b2f in window)if(window['Number']['isNaN'](window['Number'](_0x3a1b2f))&&window[_0x3a1b2f]==_0x309624)return _0x433367();'destroyed'!=_0x6047b2['state']&&window['setTimeout'](_0x58cefd,0x1388);}_0x30bfea('RevisionViewer')&&_0x58cefd();})];return window['Promise']['race'](_0x1bc5db)['then'](()=>_0x2d3fd0);}async function _0x498128(){if(await _0x281f91,_0x30bfea('RevisionViewer')){const _0x2e4af2=_0x3bdbe9['getRevision'](0x0),_0x317f90=_0x3bdbe9['getEarlierVisibleRevision'](_0x2e4af2['id']),_0x5b589f=_0x18f498('RevisionViewer');return await _0x5b589f['compare'](_0x2e4af2['id'],_0x317f90?_0x317f90['id']:null,!0x0),_0x5b589f['unbind']('isEnabled'),_0x5b589f['isEnabled']=!0x1,_0x5b589f['compare']=_0xbc5ca4,void(_0x5b589f['_getDiff']=_0xbc5ca4);}if(_0x30bfea('RevisionTracker')){const _0x5acbe0=_0x18f498('RevisionTracker');_0x5acbe0['unbind']('isEnabled'),_0x5acbe0['isEnabled']=!0x1,_0x5acbe0['update']=_0xbc5ca4,_0x5acbe0['saveRevision']=_0xbc5ca4;}_0x6047b2['model']['change']=_0xbc5ca4,_0x6047b2['model']['enqueueChange']=_0xbc5ca4,_0x6047b2['enableReadOnlyMode']('model');}function _0x40b107(){return _0x30bfea('WebSocketGateway')&&'connected'==_0x18f498('WebSocketGateway')['state'];}function _0x58011b(){return _0x30bfea('RevisionViewerIntegration');}function _0x476ef8(){return _0x30bfea('TrackChangesDataGetter');}function _0x3d1ed7(_0x343670){const _0x5ac0ae=_0x5c9728();_0x6047b2[_0x5ac0ae]='revisionHistoryLicenseKey'+_0x343670,_0x343670['endsWith']('Limit')&&(window[_0x5c9728()]=_0x309624),'Valid'!=_0x343670&&_0x498128();}function _0x5c9728(){const _0x38ff0b=window['String'](window['performance']['now']())['replace']('.','');let _0x365dca='v';for(let _0x377ea7=0x0;_0x377ea7<_0x38ff0b['length'];_0x377ea7+=0x2){let _0x40c8c5=window['parseInt'](_0x38ff0b['substring'](_0x377ea7,_0x377ea7+0x2));_0x40c8c5>=0x3e&&(_0x40c8c5-=0x3e),_0x365dca+=_0x42c797[_0x40c8c5];}return _0x365dca;}function _0x43afce(){const _0x3b71a3=_0x460aa8['split']('.');if(0x3!=_0x3b71a3['length'])return null;return _0x271325(_0x3b71a3[0x1]);function _0x271325(_0x5ae3e9){const _0x4f5bd3=_0x19cb63(_0x5ae3e9);return _0x4f5bd3&&_0x44be7f()?_0x4f5bd3:null;function _0x44be7f(){const _0x57eb5f=_0x4f5bd3['jti'],_0x5a2eb5=window['parseInt'](_0x57eb5f['substring'](_0x57eb5f['length']-0x8),0x10),_0x100130={..._0x4f5bd3,'jti':_0x57eb5f['substring'](0x0,_0x57eb5f['length']-0x8)};return delete _0x100130['vc'],_0x176965(_0x100130)==_0x5a2eb5;}}}async function _0x260489(){let _0x19d322=!0x0;try{const [_0x33d89e,_0xabc524,_0x174755]=_0x460aa8['split']('.');return _0x192ce0(_0x33d89e),await _0x10afdf(_0x33d89e,_0xabc524,_0x174755),_0x19d322;}catch{return!0x1;}function _0x192ce0(_0x4555a9){const _0x16dc87=_0x19cb63(_0x4555a9);_0x16dc87&&'ES256'==_0x16dc87['alg']||(_0x19d322=!0x1);}async function _0x10afdf(_0x345a91,_0x3cf83f,_0x1c519e){const _0xffc014=window['Uint8Array']['from'](_0x534847(_0x1c519e),_0x46280c=>_0x46280c['charCodeAt'](0x0)),_0x367e33=new window['TextEncoder']()['encode'](_0x345a91+'.'+_0x3cf83f),_0x675c98=window['crypto']['subtle'];if(!_0x675c98)return;const _0x47e873=await _0x675c98['importKey']('jwk',_0x1f34e9,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x675c98['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x47e873,_0xffc014,_0x367e33)||(_0x19d322=!0x1);}}function _0x19cb63(_0x15edba){return _0x15edba['startsWith']('ey')?JSON['parse'](_0x534847(_0x15edba)):null;}function _0x534847(_0x52206c){return window['atob'](_0x52206c['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x176965(_0x4a0fc4){let _0x589def=0x1505;function _0x10c0a5(_0xba2de8){for(let _0x5078bc=0x0;_0x5078bc<_0xba2de8['length'];_0x5078bc++){const _0x55cf4d=_0xba2de8['charCodeAt'](_0x5078bc);_0x589def=(_0x589def<<0x5)+_0x589def+_0x55cf4d,_0x589def&=_0x589def;}}function _0x133840(_0x4ff664){Array['isArray'](_0x4ff664)?_0x4ff664['forEach'](_0x133840):_0x4ff664&&'object'==typeof _0x4ff664?Object['entries'](_0x4ff664)['sort']()['forEach'](([_0x3618b4,_0x541fda])=>{_0x10c0a5(_0x3618b4),_0x133840(_0x541fda);}):_0x10c0a5(window['String'](_0x4ff664));}return _0x133840(_0x4a0fc4),_0x589def>>>0x0;}function _0xcab5a5(_0x493998){return _0x493998['toString'](0x10)['padStart'](0x8,'0');}function _0x544ff5(_0x517de0){return _0x517de0['split']('')['reverse']()['join']('');}function _0x30bfea(_0x2e779d){return _0x6047b2['plugins']['has'](_0x2e779d);}function _0x18f498(_0x161a17){return _0x6047b2['plugins']['get'](_0x161a17);}function _0xbc5ca4(){}_0x3d1ed7(await _0x58e5af());}(this);}createRevision(_0x3bb54c){const _0x4bd20f=this['editor']['plugins']['get']('Users');return new gt({'id':_0x3bb54c['id'],'name':_0x3bb54c['name'],'creator':_0x3bb54c['creatorId']?_0x4bd20f['getUser'](_0x3bb54c['creatorId']):null,'diffData':_0x3bb54c['diffData']||_0x3bb54c['data'],'authors':_0x3bb54c['authorsIds']['map'](_0x142cb3=>_0x4bd20f['getUser'](_0x142cb3)),'createdAt':new Date(_0x3bb54c['createdAt']),'attributes':_0x3bb54c['attributes'],'fromVersion':_0x3bb54c['fromVersion'],'toVersion':_0x3bb54c['toVersion']});}['addRevision'](_0x48d69a,_0x46f820=0x0){this['_revisions']['add'](_0x48d69a,_0x46f820);}getRevision(_0x14f46d){return this['_revisions']['get'](_0x14f46d);}getRevisions(_0x5cd18c={'toJSON':!0x1}){const _0x5eb523=Array['from'](this['_revisions']);return _0x5eb523['reverse'](),_0x5cd18c['toJSON']?_0x5eb523['map'](_0x45759c=>_0x45759c['toJSON']()):_0x5eb523;}getIndex(_0x509723){return this['_revisions']['getIndex'](_0x509723);}getEarlierVisibleRevision(_0x340157){const [,_0x39809a]=this['getRevisionsIterator'](_0x340157,{'direction':'earlier'});return _0x39809a;}getLaterVisibleRevision(_0x9e3416){const [,_0x17f1e3]=this['getRevisionsIterator'](_0x9e3416,{'direction':'later'});return _0x17f1e3;}getRevisionsInDiff(_0x28530e){const _0x4f8385=[];for(const _0x33b557 of this['getRevisionsIterator'](_0x28530e['newRevisionId']))if(_0x4f8385['push'](_0x33b557),_0x33b557['id']===_0x28530e['oldRevisionId'])break;return _0x4f8385;}*getRevisionsIterator(_0x183093,{direction:_0x5a6056='earlier',filter:_0x3d79ec=()=>!0x0}={}){const _0xb4fb49='earlier'===_0x5a6056?0x1:-0x1;let _0x23c40e=this['_revisions']['get'](_0x183093),_0x2e2e99=this['getIndex'](_0x23c40e);for(yield _0x23c40e;_0x23c40e;){if(_0x2e2e99+=_0xb4fb49,_0x23c40e=this['getRevision'](_0x2e2e99),!_0x23c40e)return;_0x3d79ec(_0x23c40e)&&(yield _0x23c40e);}}},wt=class extends _0x3bf7c2{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x317372,'c'],[_0x596ed8,'a'],[_0x483da7,'e'],[_0x29795f,'r'],[_0x48fa78,'u']]);_typeCharToViewClass=new Map([['c',_0x317372],['a',_0x596ed8],['e',_0x483da7],['r',_0x29795f],['u',_0x48fa78]]);async loadRevisionData(_0x5bc3a6,_0x4c0d4a){if(_0x5bc3a6['diffData']||!_0x4c0d4a)return;const _0x1a8cc=this['editor']['config']['get']('collaboration.channelId');_0x5bc3a6['diffData']=(await _0x4c0d4a['getRevision']({'channelId':_0x1a8cc,'revisionId':_0x5bc3a6['id']}))['diffData'];}getRevisionDocumentData(_0x4d35a5){const _0x263a04={};for(const _0x12e566 in _0x4d35a5['diffData']){if(_0x4d35a5['diffData'][_0x12e566]['attachChange']&&!_0x4d35a5['diffData'][_0x12e566]['attachChange']['isAttached'])continue;const _0x5c38c6=this['_removeRevisionMarkers'](JSON['parse'](_0x4d35a5['diffData'][_0x12e566]['insertions'])),_0x49c7b2=this['editor']['editing']['view']['document'],_0x3e986c=new _0x3ef835(_0x49c7b2,_0x5c38c6['map'](_0x36166b=>this['_getViewFromDiffObj'](_0x36166b,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x263a04[_0x12e566]=this['editor']['data']['processor']['toData'](_0x3e986c),this['editor']['data']['processor']['useFillerType']('default');}return _0x263a04;}getRevisionRootsAttributes(_0x2233c6){const _0x14bbda={};for(const _0x28a9f7 in _0x2233c6['diffData'])_0x2233c6['diffData'][_0x28a9f7]['attachChange']&&!_0x2233c6['diffData'][_0x28a9f7]['attachChange']['isAttached']||(_0x14bbda[_0x28a9f7]=_0x2233c6['diffData'][_0x28a9f7]['attributesAfter']||{});return _0x14bbda;}getRevisionRootsModelElements(_0x35adbe){const _0x1d6326={};for(const _0x24c94a in _0x35adbe['diffData']){if(_0x35adbe['diffData'][_0x24c94a]['attachChange']&&!_0x35adbe['diffData'][_0x24c94a]['attachChange']['isAttached'])continue;const _0x5c8985=_0x35adbe['diffData'][_0x24c94a]['rootElementName'];_0x5c8985&&(_0x1d6326[_0x24c94a]=_0x5c8985);}return _0x1d6326;}_getTypeCharForViewElement(_0x36cd91){return this['_viewClassToTypeChar']['get'](_0x36cd91['constructor']);}_getViewFromDiffObj(_0x4b2e13,_0x493855){const _0x3b8a5a=this['editor']['editing']['view']['document'];if('string'==typeof _0x4b2e13)return new _0x142cdb(_0x3b8a5a,_0x4b2e13);{let _0x57464b,_0x30d78b;_0x30d78b='u'==_0x4b2e13['type']||'r'==_0x4b2e13['type']?[]:_0x4b2e13['children']['map'](_0x4cadf6=>this['_getViewFromDiffObj'](_0x4cadf6,_0x493855));const _0x1c9794=this['_typeCharToViewClass']['get'](_0x4b2e13['type'])||_0x21c0f2,_0x47ae15=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x57464b=new _0x1c9794(_0x3b8a5a,_0x4b2e13['name'],_0x4b2e13['attributes'],_0x30d78b),'u'==_0x4b2e13['type']&&_0x4b2e13['children'][0x0]){const _0x5d1f14=_0x4b2e13['children'][0x0];if(_0x57464b['render']=function(_0x200873){const _0x1f8569=_0x200873['createElement']('div');return _0x1f8569['innerHTML']=_0x5d1f14,_0x1f8569['childNodes'][0x0];},_0x493855){const _0x519926=new _0x3ef835(_0x3b8a5a);_0x519926['_appendChild'](_0x57464b);const _0x41e27c=Array['from'](_0x47ae15['viewChildrenToDom'](_0x519926,{'bind':!0x1})),_0x2fdfe1=_0x47ae15['domDocument']['createElement']('div');_0x2fdfe1['append'](..._0x41e27c),_0x57464b=Array['from'](_0x47ae15['domChildrenToView'](_0x2fdfe1))[0x0];}}else{if('r'==_0x4b2e13['type']&&_0x4b2e13['children'][0x0]){const _0x1157e2=_0x4b2e13['children'][0x0];if(_0x57464b['render']=function(_0x5a6489){_0x5a6489['innerHTML']=_0x1157e2;},_0x493855){const _0x56868c=new _0x3ef835(_0x3b8a5a);_0x56868c['_appendChild'](_0x57464b);const _0x2b177a=Array['from'](_0x47ae15['viewChildrenToDom'](_0x56868c,{'bind':!0x1})),_0x4af74e=_0x47ae15['domDocument']['createElement']('div');_0x4af74e['append'](..._0x2b177a);const _0x2e579d=Array['from'](_0x47ae15['domChildrenToView'](_0x4af74e));_0x2e579d['length']>0x1?_0x57464b['_appendChild'](_0x2e579d):_0x57464b=_0x2e579d[0x0];}}}if(_0x4b2e13['customProperties']){for(const [_0x2ba30c,_0x2be2af]of _0x4b2e13['customProperties'])_0x57464b['_setCustomProperty'](_0x2ba30c,_0x2be2af);}const _0x889866=void 0x0===_0x4b2e13['fillerOffset']?null:_0x4b2e13['fillerOffset'];return null!==_0x889866&&(_0x57464b['getFillerOffset']=()=>_0x889866),_0x57464b;}}_makeModelFromViewString(_0x482517,_0x4062a5){const _0x31d177=JSON['parse'](_0x482517),_0x5c56f2=this['editor']['editing']['view']['document'],_0x5a420c=new _0x3ef835(_0x5c56f2,_0x31d177['map'](_0x1c1e64=>this['_getViewFromDiffObj'](_0x1c1e64,!0x0))),_0x31e8d5=this['editor']['data']['toModel'](_0x5a420c,_0x4062a5);return _0x31e8d5['name']=_0x4062a5,_0x31e8d5;}['_removeRevisionMarkers'](_0x106ad7){return(_0x106ad7=_0x106ad7['filter'](_0x22316f=>!_0x22316f['name']||'revision-start'!==_0x22316f['name']&&'revision-end'!==_0x22316f['name']))['forEach'](_0x552e8b=>{'string'!=typeof _0x552e8b&&(_0x552e8b['children']=this['_removeRevisionMarkers'](_0x552e8b['children']),_0x552e8b['attributes']=_0x552e8b['attributes']['filter'](_0xb4158=>!_0xb4158[0x0]['startsWith']('data-revision-')));}),_0x106ad7;}};function pt(_0x28715d,_0x5194ec,_0x2954bc){const t=_0x28715d['t'];switch(_0x5194ec){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'},_0x2954bc);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2954bc);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}var _t=class extends _0x3bf7c2{['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[_0x403926,mt,wt,_0xcc311a];}constructor(_0x5780a5){super(_0x5780a5),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2c70b6=_0x49a83a();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2c70b6},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 _0x27eae3=this['repository']['getRevision'](0x0),_0x3f21f7=_0x27eae3&&null===_0x27eae3['creator']?_0x27eae3:null;if(this['_continueCurrentRevision']=!!_0x3f21f7&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x499c89=this['_source']['getCurrentRevisionId'](),_0x52be44=this['repository']['getRevision'](_0x499c89);if(_0x52be44)this['_startingVersion']=_0x52be44['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x46599d=this['_source']['history']['_operations']['find'](_0x41698c=>!_0x41698c['_isInit']),_0x45c985=_0x46599d?_0x46599d['baseVersion']:this['_source']['history']['version'];_0x27eae3?(_0x27eae3['toVersion']<_0x45c985&&_0x27eae3['_update']({'toVersion':_0x45c985}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3f21f7['id'],this['_startingVersion']=_0x3f21f7['fromVersion']):(this['_startingVersion']=_0x27eae3['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x45c985,this['_continueCurrentRevision']=!0x1);}}else _0x3f21f7&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3f21f7['toVersion'],this['editor']['model']['document']['history']['version']),_0x3f21f7['fromVersion']===_0x3f21f7['toVersion']?(0x0!==_0x3f21f7['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3f21f7['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3f21f7['id'],this['_startingVersion']=_0x3f21f7['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',_0x42c49e=>!_0x42c49e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x193eaa=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x36a898;for(const _0x4abba4 in _0x193eaa){const _0x2087fa=_0x4abba4,_0x1215c2=_0x193eaa[_0x2087fa];if('revisionHistoryLicenseKeyValid'==_0x1215c2||'revisionHistoryLicenseKeyInvalid'==_0x1215c2||'revisionHistoryLicenseKeyExpired'==_0x1215c2||'revisionHistoryLicenseKeyDomainLimit'==_0x1215c2||'revisionHistoryLicenseKeyNotAllowed'==_0x1215c2||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1215c2||'revisionHistoryLicenseKeyUsageLimit'==_0x1215c2){delete _0x193eaa[_0x2087fa],_0x36a898=_0x1215c2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x36a898&&_0x193eaa['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x36a898&&_0x193eaa['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x36a898&&_0x193eaa['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x36a898&&_0x193eaa['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x36a898&&_0x193eaa['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x36a898&&_0x193eaa['_showLicenseError']('usageLimit');},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x43ec4a=this['repository']['getRevision'](0x0),_0x7be893=await this['getRevisionDocumentData'](_0x43ec4a),_0x4d93d7=await this['getRevisionRootsAttributes'](_0x43ec4a),_0x18952f=this['_utils']['getRevisionRootsModelElements'](_0x43ec4a);this['_replaceEditorDataWithRevisionData'](_0x7be893,_0x4d93d7,_0x18952f);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x3c4fdb){this['_source']=_0x3c4fdb;}async update(){const _0x240d05=await this['_source']['getLatestVersion']();if(_0x240d05>this['currentRevision']['toVersion']){await this['_loadState']();const _0x23fa98=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x240d05});_0x23fa98['authors']=_0x23fa98['authorsIds']['map'](_0x57986f=>this['editor']['plugins']['get']('Users')['getUser'](_0x57986f)),this['currentRevision']['_update'](_0x23fa98);}}async['saveRevision'](_0x33c675={},_0x168563=null){const _0x3db5df=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x168563>this['currentRevision']['toVersion']&&(_0x168563=null),null===_0x168563&&(_0x168563=await this['_source']['getLatestVersion']());const _0x78d787=this['_getFromVersion'](_0x168563),_0x3a8ea0=this['buildRevisionData']({'from':_0x78d787,'to':_0x168563});if(this['currentRevision']['toVersion']<_0x168563){const _0x31f377=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x168563,'to':_0x168563});_0x31f377['authors']=[],_0x31f377['authorsIds']=[],_0x31f377['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x31f377,!0x0),delete _0x31f377['authors'],_0x3db5df['push'](_0x31f377);}_0x33c675['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x33c675['name']=_0x33c675['name']||null,_0x33c675['id']=_0x33c675['id']||_0x49a83a(),_0x33c675={..._0x33c675,..._0x3a8ea0};const _0x43ec96=this['addRevisionData'](_0x33c675);_0x3db5df['push'](_0x33c675);const _0x1cc93b=this['repository']['getIndex'](_0x43ec96);if(0x0!==_0x1cc93b){const _0x1ce11a=this['repository']['getRevision'](_0x1cc93b-0x1);if(_0x1ce11a['fromVersion']!==_0x168563){const _0xb2ad97=this['_revisionDataBuilder']['getData'](_0x168563,_0x1ce11a['toVersion']),_0x8a2b8={'id':_0x1ce11a['id'],'diffData':_0xb2ad97['diffData'],'authorsIds':_0xb2ad97['authorsIds'],'authors':_0xb2ad97['authorsIds']['map'](_0x4f7c63=>this['editor']['plugins']['get']('Users')['getUser'](_0x4f7c63)),'fromVersion':_0x168563};_0x1ce11a===this['currentRevision']&&(_0x8a2b8['createdAt']=new Date(_0x33c675['createdAt']['getTime']()+0xa)),_0x1ce11a['_update'](_0x8a2b8,!0x0),delete _0x8a2b8['authors'],_0x3db5df['push'](_0x8a2b8);}}if(this['adapter']){for(const _0xe09ee2 of _0x3db5df)this['_bufferUpdate'](_0xe09ee2['id'],_0xe09ee2,!0x0);this['sendBufferedUpdates']();}return _0x43ec96;}addRevisionData(_0x3a7fd8){const _0x3d03e3=this['repository']['createRevision'](_0x3a7fd8);return this['adapter']&&_0x3d03e3['on']('_update',(_0x2b40f4,_0x5bb65b,_0x39c43c)=>{_0x39c43c||(this['_bufferUpdate'](_0x5bb65b['id'],_0x5bb65b,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3d03e3,this['_findInsertionIndex'](_0x3d03e3)),_0x3d03e3;}async getRevisionDocumentData(_0x56d506){return await this['_utils']['loadRevisionData'](_0x56d506,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x56d506);}async getRevisionRootsAttributes(_0x4f81fb){return await this['_utils']['loadRevisionData'](_0x4f81fb,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4f81fb);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x37f609=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5285b9=0x0;_0x5285b9<_0x37f609['length'];_0x5285b9++){const _0x5b113a=_0x37f609[_0x5285b9];let _0x297038=!0x1;for(const _0x27deec of Object['keys'](_0x5b113a))void 0x0===_0x5b113a[_0x27deec]?delete _0x5b113a[_0x27deec]:'id'!==_0x27deec&&(_0x297038=!0x0);_0x297038||(_0x37f609[_0x5285b9]=null);}if(_0x37f609=_0x37f609['filter'](_0x3f6c1c=>null!==_0x3f6c1c),!_0x37f609['length'])return;for(let _0x3c70df=0x0;_0x3c70df<_0x37f609['length'];_0x3c70df++){const _0x3ecfc9=_0x37f609[_0x3c70df];void 0x0!==_0x3ecfc9['fromVersion']&&void 0x0===_0x3ecfc9['toVersion']&&(_0x3ecfc9['toVersion']=this['repository']['getRevision'](_0x3ecfc9['id'])['toVersion']),void 0x0!==_0x3ecfc9['toVersion']&&void 0x0===_0x3ecfc9['fromVersion']&&(_0x3ecfc9['fromVersion']=this['repository']['getRevision'](_0x3ecfc9['id'])['fromVersion']);}const _0x4b9f24=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x37f609,_0x4b9f24)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x3e0590=>{if(_0x3e0590){for(const _0x1182a3 of _0x3e0590)this['setRevisionData']({'id':_0x1182a3['id'],'createdAt':_0x1182a3['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}buildRevisionData({revision:_0x11a146=null,from:_0x5263f9=null,to:_0x502c87=null}){_0x5263f9=null!==_0x5263f9?_0x5263f9:_0x11a146['fromVersion'],_0x502c87=null!==_0x502c87?_0x502c87:_0x11a146['toVersion'];const _0x5b860c=this['_revisionDataBuilder']['getData'](_0x5263f9,_0x502c87),_0x14fd5d={'diffData':_0x5b860c['diffData'],'authorsIds':_0x5b860c['authorsIds'],'fromVersion':_0x5263f9,'toVersion':_0x502c87};if(!_0x11a146||_0x502c87!==_0x11a146['toVersion']){const _0x3f8579=_0x502c87-0x1,_0x42f960=this['_source']['history']['getOperation'](_0x3f8579);_0x14fd5d['createdAt']=_0x42f960&&_0x42f960['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5263f9===this['_loadedStateData']['fromVersion']){for(const _0x598012 of this['_loadedStateData']['authors'])_0x14fd5d['authorsIds']['includes'](_0x598012['id'])||_0x14fd5d['authorsIds']['push'](_0x598012['id']);}return _0x14fd5d;}_bufferUpdate(_0xf663d8,_0x2778db,_0x16ed59){if(this['_bufferedUpdates']['has'](_0xf663d8)){const _0x392f36=this['_bufferedUpdates']['get'](_0xf663d8);_0x2778db=_0x16ed59?{..._0x392f36,..._0x2778db}:{..._0x2778db,..._0x392f36};}this['_bufferedUpdates']['set'](_0xf663d8,_0x2778db);}setRevisionData(_0x19da76){const _0x8f2e54=this['repository']['getRevision'](_0x19da76['id']);if(_0x19da76['createdAt']&&(_0x19da76['createdAt']=new Date(_0x19da76['createdAt'])),_0x19da76['authorsIds']){const _0x700ac4=this['editor']['plugins']['get']('Users');_0x19da76['authors']=_0x19da76['authorsIds']['map'](_0x21bf0b=>_0x700ac4['getUser'](_0x21bf0b));}_0x8f2e54['_update'](_0x19da76,!0x0);}_createInitialRevision(_0x5bda8b){const _0xb00e8e=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xb00e8e)this['_initialRevisionId']=_0xb00e8e['id'];else{const _0x6eed80=!this['editor']['model']['document']['roots']['find'](_0x2505d9=>this['editor']['model']['hasContent'](_0x2505d9)),_0x5c5f9a=this['editor']['plugins']['get']('Users')['me']['id'],_0xfea6ed=pt(this['editor']['locale'],_0x6eed80?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5bda8b,'to':_0x5bda8b,'id':this['_initialRevisionId'],'name':_0xfea6ed,'creatorId':_0x5c5f9a});}}_createCurrentRevision(_0x10c799){const _0x35e6c0=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x35e6c0),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x10c799,'to':_0x10c799,'id':_0x35e6c0,'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(_0x42f2a7,_0x5585d1,_0x4a0f1f){const _0x4f5ff5={},_0x1cec7c={},_0xa0eae2={},_0x2cab6a=this['editor']['config']['get']('roots')||{};for(const [_0x3ad893,_0x1f3de0]of Object['entries'](_0x2cab6a))_0x1f3de0['lazyLoad']||(_0x4f5ff5[_0x3ad893]=_0x1f3de0['initialData']??'',_0x1cec7c[_0x3ad893]=_0x1f3de0['modelAttributes']||{},_0x1f3de0['modelElement']&&(_0xa0eae2[_0x3ad893]=_0x1f3de0['modelElement']));for(const _0x6c6e51 of this['editor']['model']['document']['getRootNames']())_0x4f5ff5[_0x6c6e51]??='',_0x1cec7c[_0x6c6e51]??={};let _0x1cd916=!0x1;const _0x360e94=Object['keys'](_0x4f5ff5),_0x148615=Object['keys'](_0x42f2a7);for(const _0x1718c2 of _0x360e94){if(_0x4f5ff5[_0x1718c2]!==_0x42f2a7[_0x1718c2]&&''!==_0x4f5ff5[_0x1718c2]['trim']()){_0x1cd916=!0x0;break;}if(!_0xf60b63(_0x1cec7c[_0x1718c2],_0x5585d1[_0x1718c2])&&Object['keys'](_0x1cec7c[_0x1718c2])['length']>0x0){_0x1cd916=!0x0;break;}const _0x1f7cfb=_0xa0eae2[_0x1718c2],_0x481480=_0x4a0f1f[_0x1718c2];if(_0x1f7cfb&&_0x481480&&_0x1f7cfb!==_0x481480){_0x1cd916=!0x0;break;}}_0x1cd916||(_0x1cd916=_0x148615['some'](_0x4c991f=>!this['editor']['model']['document']['getRoot'](_0x4c991f))),_0x1cd916&&_0x584982('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4f5ff5,'editorRootsAttributes':_0x1cec7c,'editorRootsModelElements':_0xa0eae2,'revisionData':_0x42f2a7,'revisionRootsAttributes':_0x5585d1,'revisionRootsModelElements':_0x4a0f1f});for(const [_0x58e82e,_0x391284]of Object['entries'](_0x42f2a7))this['editor']['config']['set']('roots.'+_0x58e82e+'.initialData',_0x391284);for(const [_0x569aa5,_0x3d747c]of Object['entries'](_0x5585d1))this['editor']['config']['set']('roots.'+_0x569aa5+'.modelAttributes',_0x3d747c);const _0x5067f1=this['editor']['model']['document'];for(const [_0x4a45d5,_0x27e327]of Object['entries'](_0x4a0f1f)){this['editor']['config']['set']('roots.'+_0x4a45d5+'.modelElement',_0x27e327);const _0x3e0897=_0x5067f1['getRoot'](_0x4a45d5);_0x3e0897&&_0x3e0897['name']!==_0x27e327&&(_0x5067f1['roots']['remove'](_0x4a45d5),_0x5067f1['createRoot'](_0x27e327,_0x4a45d5));}}_addPendingAction(){if(!this['_pendingAction']){const _0x4365a6=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4365a6['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x1e679a){const _0x48cad6=this['repository']['getRevisions']();_0x48cad6['reverse']();let _0x1bcccf=0x0;for(;_0x1bcccf<_0x48cad6['length'];){const _0x362301=_0x48cad6[_0x1bcccf];if(_0x362301===this['currentRevision']){_0x1bcccf++;continue;}if(_0x362301['id']===this['_initialRevisionId'])break;const _0x401f22=_0x1e679a['toVersion']-_0x362301['toVersion']||_0x1e679a['fromVersion']-_0x362301['fromVersion'];if(_0x401f22>0x0)break;if(_0x401f22<0x0)_0x1bcccf++;else{if(!_0x1e679a['creator']&&_0x362301['creator'])break;if(_0x362301['creator']||!_0x1e679a['creator']){if(_0x1e679a['createdAt']>_0x362301['createdAt'])break;_0x1bcccf++;}else _0x1bcccf++;}}return _0x1bcccf;}_getFromVersion(_0x2689f7){const _0x3c1fef=this['repository']['getRevisions']();_0x3c1fef['reverse'](),_0x3c1fef['shift']();const _0x583029=_0x3c1fef['find'](_0x2e67d6=>_0x2e67d6['toVersion']<=_0x2689f7)['toVersion'];return _0x583029<this['_startingVersion']?this['_startingVersion']:_0x583029;}['_makeRevision']({name:_0x12ff19,from:_0x37f074,to:_0x537b27,creatorId:_0x2a6741,id:_0x2c2874}){const _0x2792f0=this['buildRevisionData']({'from':_0x37f074,'to':_0x537b27});_0x2792f0['name']=_0x12ff19,_0x2792f0['creatorId']=_0x2a6741,_0x2792f0['id']=_0x2c2874;const _0x1c844f=this['addRevisionData'](_0x2792f0);return this['adapter']&&this['_bufferUpdate'](_0x2792f0['id'],_0x2792f0,!0x0),_0x1c844f;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x509144){this['editor']=_0x509144,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x11cf2e){this['source']=_0x11cf2e;const _0x1c52bb=new Map(),_0x5b3483=new Map(),_0x2ae537=this['editor']['model']['document']['roots']['map'](_0x1d50d4=>_0x1d50d4['rootName']);for(const _0x3a1315 of _0x2ae537){const _0x1b4cea=this['editor']['model']['document']['getRoot'](_0x3a1315),_0x147b84=bt(_0x1b4cea);_0x1c52bb['set'](_0x3a1315,_0x147b84),_0x5b3483['set'](_0x3a1315,Object['fromEntries'](_0x1b4cea['getAttributes']()));}const _0x27d169=Array['from'](this['editor']['model']['markers'])['map'](_0x49e5c6=>[_0x49e5c6['name'],_0x49e5c6['getRange']()]),_0x48cbcc=this['source']['version'];this['_saveMetaData'](_0x48cbcc,_0x1c52bb,_0x27d169,_0x5b3483),this['_startingRevisionId']=this['_revisionId'];const _0x5759b1=new Map(),_0x1b8c5d=new Map();for(const _0x16d89f of _0x2ae537){const _0xfc1f5d=Rt(_0x16d89f,this['editor']['model']['document']['getRoot'](_0x16d89f)['name']);_0x5759b1['set'](_0x16d89f,_0xfc1f5d),_0x1b8c5d['set'](_0x16d89f,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5759b1,[],_0x1b8c5d);}getData(_0x380d36,_0x4afc18){if(this['_lastFrom']===_0x380d36&&this['_lastTo']<=_0x4afc18)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4afc18,!0x0);else{if(!this['_savedMetaData']['has'](_0x380d36)){const _0x2b10d6=this['_getPreviousFrom'](_0x380d36);this['_calculateMetaData'](_0x2b10d6,_0x380d36,!0x1);}this['_calculateMetaData'](_0x380d36,_0x4afc18,!0x0);}return this['_lastFrom']=_0x380d36,this['_lastTo']=_0x4afc18,this['_getState']();}loadState(_0x21f08b){if(!this['_savedMetaData']['has'](_0x21f08b['fromVersion'])){const _0x524021=this['_getPreviousFrom'](_0x21f08b['fromVersion']);this['_calculateMetaData'](_0x524021,_0x21f08b['fromVersion'],!0x1);}this['_calculateMetaData'](_0x21f08b['fromVersion'],_0x21f08b['toVersion'],!0x1);const _0x17c58c=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x21f08b['fromVersion'],this['_lastTo']=_0x21f08b['toVersion'];for(const _0x2feeba in _0x21f08b['diffData']){const _0x3767f0=_0x21f08b['diffData'][_0x2feeba]['attachChange'],_0x23ffd0=_0x2c6e4c(_0x21f08b['diffData'][_0x2feeba]['attributesBefore'])||{},_0x1d0dc2=_0x21f08b['diffData'][_0x2feeba],_0x28710b=_0x17c58c['_makeModelFromViewString'](_0x1d0dc2['deletions'],_0x1d0dc2['rootElementName']||'$root');_0x28710b['rootName']=_0x2feeba,_0x28710b['_isAttached']=!_0x3767f0||!_0x3767f0['isAttached'],_0x28710b['isAttached']=()=>_0x28710b['_isAttached'],this['_baseRoots']['set'](_0x2feeba,_0x28710b),this['_baseRootsAttributes']['set'](_0x2feeba,_0x23ffd0),_0x3767f0&&this['_touchedRoots']['set'](_0x2feeba,_0x3767f0);const _0x5d0d9b=this['_makeIdsRoot'](_0x28710b);this['_baseIdsRoots']['set'](_0x2feeba,_0x5d0d9b);for(const [_0x3a5692,_0x3ec371]of _0x28710b['markers']){if(!_0x3a5692['startsWith']('revision:'))continue;const _0x349c1d=_0x3a5692['split'](':')[0x2];for(const _0xdf8269 of _0x3ec371['getWalker']({'singleCharacters':!0x0})){const _0x285ccf=this['_getVidAttributeName'](_0xdf8269),_0x1ada75='elementEnd'==_0xdf8269['type']?_0xdf8269['previousPosition']['path']['slice'](0x0,-0x1):_0xdf8269['previousPosition']['path'],_0x1c4538=_0x5d0d9b['getNodeByPath'](_0x1ada75)['getAttribute'](_0x285ccf);this['_touched']['set'](_0x1c4538,{'userId':_0x349c1d});}_0x28710b['markers']['delete'](_0x3a5692);}}this['_startingRevisionId']=this['_revisionId'];const _0x46dde=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x49d8de=>!this['_touched']['has'](_0x49d8de));let _0x13a183=0x0;const _0x32ab57=new Map();for(const _0x4df85f in _0x21f08b['diffData']){const _0x4dbd6c=_0x21f08b['diffData'][_0x4df85f]['attachChange'],_0x58a4bf=_0x2c6e4c(_0x21f08b['diffData'][_0x4df85f]['attributesAfter'])||{},_0x18a687=_0x21f08b['diffData'][_0x4df85f],_0x45d467=_0x17c58c['_makeModelFromViewString'](_0x18a687['insertions'],_0x18a687['rootElementName']||'$root');_0x45d467['rootName']=_0x4df85f,_0x45d467['_isAttached']=!_0x4dbd6c||_0x4dbd6c['isAttached'],_0x45d467['isAttached']=()=>_0x45d467['_isAttached'],this['_diffRoots']['set'](_0x4df85f,_0x45d467),this['_diffRootsAttributes']['set'](_0x4df85f,_0x58a4bf);const _0x117082=this['_makeIdsRoot'](_0x45d467,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4df85f,_0x117082),_0x32ab57['set'](_0x4df85f,_0x45d467['isAttached']()?_0x58a4bf:{});for(const [_0x1d118a,_0x2abcc6]of _0x45d467['markers']){if(!_0x1d118a['startsWith']('revision:'))continue;const _0x223794=_0x1d118a['split'](':')[0x2];for(const _0x480bdd of _0x2abcc6['getWalker']({'singleCharacters':!0x0})){const _0x213aa3=this['_getVidAttributeName'](_0x480bdd),_0xbf433d=this['_revisionId']++,_0x9ca260='elementEnd'==_0x480bdd['type']?_0x480bdd['previousPosition']['path']['slice'](0x0,-0x1):_0x480bdd['previousPosition']['path'];_0x117082['getNodeByPath'](_0x9ca260)['_setAttribute'](_0x213aa3,_0xbf433d),this['_touched']['set'](_0xbf433d,{'userId':_0x223794});}_0x45d467['markers']['delete'](_0x1d118a);}for(const _0x5dde3e of this['editor']['model']['createRangeIn'](_0x45d467)['getWalker']({'singleCharacters':!0x0})){const _0x101c3b=this['_getVidAttributeName'](_0x5dde3e),_0x4cad4a='elementEnd'==_0x5dde3e['type']?_0x5dde3e['previousPosition']['path']['slice'](0x0,-0x1):_0x5dde3e['previousPosition']['path'],_0x125d9f=_0x117082['getNodeByPath'](_0x4cad4a);_0x125d9f['getAttribute'](_0x101c3b)>0x0||_0x125d9f['_setAttribute'](_0x101c3b,_0x46dde[_0x13a183++]);}for(const [_0x24ab26,_0x4c9380]of _0x45d467['markers'])_0x24ab26['startsWith']('revision:')||this['_markers']['set'](_0x24ab26,_0x4c9380);}const {roots:_0xc07945}=this['_savedMetaData']['get'](_0x21f08b['fromVersion']),{roots:_0x249b03}=this['_savedMetaData']['get'](_0x21f08b['toVersion']),_0x25d909=bt(_0xc07945['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x25d909),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x25d909,Number['NEGATIVE_INFINITY']));const _0xf2532b=bt(_0x249b03['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0xf2532b),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xf2532b));const _0x322491=Array['from'](this['_diffRoots'])['map'](([_0xc8e212,_0x27c7c9])=>[_0xc8e212,bt(_0x27c7c9)]);this['_saveMetaData'](this['_lastTo'],_0x322491,this['_markers'],_0x32ab57);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x536ea8,_0x485ed0,_0x25deea,_0x5a42d9){const _0x4b6283=new Map(_0x485ed0),_0x10d9d9=new Map(_0x2c6e4c(_0x5a42d9)),_0x3292ce=new Map();for(const [_0x5edf89,_0x6a1962]of _0x25deea)_0x3292ce['set'](_0x5edf89,{'start':_0x6a1962['start']['clone'](),'end':_0x6a1962['end']['clone'](),'rootName':_0x6a1962['root']['rootName']});this['_savedMetaData']['set'](_0x536ea8,{'roots':_0x4b6283,'markers':_0x3292ce,'rootsAttributes':_0x10d9d9});}_removeMetaData(_0x5342b9){this['_savedMetaData']['delete'](_0x5342b9);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}_makeIdsRoot(_0x32b485,_0x3060f3=null){let _0x3e938c=null;_0x32b485['is']('documentFragment')||(_0x3e938c=new _0x1da96f(_0x32b485['name'],{'vid_start':null===_0x3060f3?this['_revisionId']++:_0x3060f3++}));const _0x43684c=[];for(const _0x1c2627 of _0x32b485['getChildren']())if(_0x1c2627['is']('element')){_0x43684c['push'](this['_makeIdsRoot'](_0x1c2627,_0x3060f3));const _0x5e1aa4=_0x43684c[_0x43684c['length']-0x1];null!==_0x3060f3&&(_0x3060f3=_0x5e1aa4['is']('element','$text')?_0x5e1aa4['getAttribute']('vid')+0x1:_0x5e1aa4['getAttribute']('vid_end')+0x1);}else{for(let _0xd7f6f4=0x0;_0xd7f6f4<_0x1c2627['offsetSize'];_0xd7f6f4++)_0x43684c['push'](new _0x1da96f('$text',{'vid':null===_0x3060f3?this['_revisionId']++:_0x3060f3++}));}if(_0x32b485['is']('documentFragment')){const _0x328268=Rt(_0x32b485['rootName'],_0x32b485['name']);return _0x328268['_insertChild'](0x0,_0x43684c),_0x328268;}return _0x3e938c['_setAttribute']('vid_end',null===_0x3060f3?this['_revisionId']++:_0x3060f3),_0x3e938c['_insertChild'](0x0,_0x43684c),_0x3e938c;}_calculateMetaData(_0x3f696e,_0x4c89ec,_0x3ac02b){this['_reset']();const {roots:_0x4186ed,markers:_0x13b251,rootsAttributes:_0x5aa7fd}=this['_savedMetaData']['get'](_0x3f696e);this['_baseRoots']=new Map(_0x4186ed),this['_baseRootsAttributes']=new Map(_0x2c6e4c(_0x5aa7fd));for(const [_0x811af2,_0x2268e6]of this['_baseRoots'])if('$graveyard'!==_0x811af2&&(this['_diffRoots']['set'](_0x811af2,bt(_0x2268e6)),this['_diffRootsAttributes']=new Map(_0x2c6e4c(_0x5aa7fd)),_0x3ac02b)){const _0x506183=this['_revisionId'];this['_idsRoots']['set'](_0x811af2,this['_makeIdsRoot'](_0x2268e6)),this['_baseIdsRoots']['set'](_0x811af2,this['_makeIdsRoot'](_0x2268e6,_0x506183));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x3ac02b&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1633e9,_0x55fc11]of _0x13b251){const _0x37da80=this['_baseRoots']['get'](_0x55fc11['rootName']),_0x406793=this['_diffRoots']['get'](_0x55fc11['rootName']),_0x1da9fc=new _0x2b908e(this['_fixPosition'](_0x55fc11['start'],_0x37da80),this['_fixPosition'](_0x55fc11['end'],_0x37da80)),_0x5207e0=this['_fixRange'](_0x1da9fc,_0x406793);_0x37da80['markers']['set'](_0x1633e9,_0x1da9fc),this['_markers']['set'](_0x1633e9,_0x5207e0);}this['_applyOperations'](_0x3f696e,_0x4c89ec,_0x3ac02b);}_applyOperations(_0x2558e6,_0x44a2ad,_0x3889ee){for(const _0x53b1b1 of this['source']['getOperations'](_0x2558e6,_0x44a2ad))this['_handleOperation'](_0x53b1b1,_0x3889ee);for(const _0x32ecc4 of this['_diffRoots']['values']())_0x32ecc4['markers']['clear']();for(const [_0x274d6b,_0x566cd0]of this['_markers'])this['_diffRoots']['get'](_0x566cd0['root']['rootName'])['markers']['set'](_0x274d6b,_0x566cd0['clone']());const _0x3bb9ce=new Map(),_0x4b7a81=new Map();for(const [_0x4cd7d9,_0xf57a11]of this['_diffRoots'])_0x3bb9ce['set'](_0x4cd7d9,bt(_0xf57a11)),_0x4b7a81['set'](_0x4cd7d9,this['_diffRootsAttributes']['get'](_0x4cd7d9));this['_saveMetaData'](_0x44a2ad,_0x3bb9ce,this['_markers'],_0x4b7a81);}_getPreviousFrom(_0x4c2793){const _0x56955f=Array['from'](this['_savedMetaData']['keys']());_0x56955f['sort']((_0x2aac11,_0x452220)=>_0x2aac11-_0x452220),_0x56955f['reverse']();for(const _0x3cabe4 of _0x56955f)if(_0x3cabe4<_0x4c2793)return _0x3cabe4;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x82b7a2,_0x1601db){const _0x5e7113=Array['from'](_0x1601db['markers'])['map'](([_0x503ff1,_0x40aca9])=>[_0x503ff1,this['_fixRange'](_0x40aca9,_0x82b7a2)]);_0x82b7a2['markers']=new Map(_0x5e7113);}_transformMarkers(_0x596f30){for(const _0x224e7a of this['_markers']['values']()){const _0x1593a1=_0x224e7a['getTransformedByOperation'](_0x596f30),_0x34b7b8=_0x2b908e['_createFromRanges'](_0x1593a1);_0x224e7a['start']=_0x34b7b8['start'],_0x224e7a['end']=_0x34b7b8['end'];}}_handleOperation(_0x4733ab,_0x2ad281){if('addRoot'!=_0x4733ab['type']&&'detachRoot'!=_0x4733ab['type']){if('insert'==_0x4733ab['type']){const _0x260688=_0x4733ab['position']['root'],_0x1490d3=_0x260688['rootName'],_0xb70d78=_0x260688['name'];this['_diffRoots']['has'](_0x1490d3)||(this['_diffRoots']['set'](_0x1490d3,Rt(_0x1490d3,_0xb70d78,!0x0)),this['_diffRootsAttributes']['set'](_0x1490d3,{}),_0x2ad281&&this['_idsRoots']['set'](_0x1490d3,Rt(_0x1490d3,_0xb70d78,!0x0)));}else{if('addRootAttribute'==_0x4733ab['type']||'removeRootAttribute'==_0x4733ab['type']||'changeRootAttribute'==_0x4733ab['type'])return void this['_handleRootAttributeOperation'](_0x4733ab);'marker'==_0x4733ab['type']&&this['_handleMarkerOperation'](_0x4733ab);}if('marker'!==_0x4733ab['type']){const _0x514681=this['_cloneOperation'](_0x4733ab,this['_diffRoots']);_0x514681['_execute'](),this['_transformMarkers'](_0x514681);}if(_0x2ad281)switch(_0x4733ab['type']){case'insert':this['_handleInsertOperation'](_0x4733ab);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4733ab);break;case'merge':this['_handleMergeOperation'](_0x4733ab);break;case'split':this['_handleSplitOperation'](_0x4733ab);}}else this['_handleRootOperation'](_0x4733ab,_0x2ad281);}_cloneOperation(_0x191b95,_0xed72ab){const _0xbc79bf=_0x191b95['clone']();return _0xbc79bf['_authorId']=_0x191b95['_authorId'],this['_fixOperation'](_0xbc79bf,_0xed72ab),_0xbc79bf;}_getBaseVids(_0x125d33){return _0x125d33['map'](_0x1673af=>{const _0x455fca=this['_getVidAttributeName'](_0x1673af);return Number(_0x1673af['item']['getAttribute'](_0x455fca));});}_generateTape(_0x4624c1,_0x3fec8c){if(_0x4624c1['is']('element','$text'))_0x3fec8c['push']({'item':_0x4624c1,'type':'text'});else{_0x4624c1['is']('element')&&_0x3fec8c['push']({'item':_0x4624c1,'type':'elementStart'});for(const _0x2558ea of _0x4624c1['getChildren']())this['_generateTape'](_0x2558ea,_0x3fec8c);_0x4624c1['is']('element')&&_0x3fec8c['push']({'item':_0x4624c1,'type':'elementEnd'});}return _0x3fec8c;}_getState(){const _0xe7dcdb=new Map(this['_touched']),_0x34ae08=new Map(_0xe7dcdb),_0x54b0f9=new Map(),_0x392d00={'insertions':{},'deletions':{}},_0x5752ce={'insertions':{},'deletions':{}},_0x5e5d4e=new Map(),_0x1d83b8=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x3a85f0=new Map();_0x1d83b8['delete']('$graveyard');for(const _0x227028 of _0x1d83b8){const _0x1a4726=(this['_diffRoots']['get'](_0x227028)??this['_baseRoots']['get'](_0x227028))['name'],_0x2793dc=this['_diffRoots']['get'](_0x227028)||Rt(_0x227028,_0x1a4726,!0x1),_0x45f1b0=this['_baseRoots']['get'](_0x227028)||Rt(_0x227028,_0x1a4726,!0x1);_0x2793dc['isAttached']()||_0x45f1b0['isAttached']()?(_0x3a85f0['set'](_0x227028,_0x1a4726),_0x392d00['insertions'][_0x227028]=bt(_0x2793dc),_0x392d00['deletions'][_0x227028]=bt(_0x45f1b0),this['_copyMarkers'](_0x392d00['deletions'][_0x227028],_0x45f1b0),this['_copyMarkers'](_0x392d00['insertions'][_0x227028],_0x2793dc),_0x5752ce['insertions'][_0x227028]=this['_generateTape'](this['_idsRoots']['get'](_0x227028),[]),_0x5752ce['deletions'][_0x227028]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x227028)||Rt(_0x227028,_0x1a4726,!0x1),[])):_0x1d83b8['delete'](_0x227028);}for(const _0x333d8e of _0x1d83b8){const _0x59c9d6=_0x5752ce['insertions'][_0x333d8e];for(const _0x5861a9 of _0x59c9d6){const _0x3e1cc3=this['_getVidAttributeName'](_0x5861a9),_0x11e86f=_0x5861a9['item']['getAttribute'](_0x3e1cc3);_0x34ae08['delete'](_0x11e86f),_0x11e86f>=this['_startingRevisionId']&&_0x54b0f9['set'](_0x11e86f,_0xe7dcdb['get'](_0x11e86f));}}for(const _0x2ea6dc of _0x1d83b8){const _0xa33fe8=_0x5752ce['insertions'][_0x2ea6dc],_0x5049eb=this['_getBaseVids'](_0x5752ce['deletions'][_0x2ea6dc]);let _0x14482a=0x0;for(const _0x312d23 of _0xa33fe8){const _0x5301d9=this['_getVidAttributeName'](_0x312d23),_0x121a19=_0x312d23['item']['getAttribute'](_0x5301d9);if(!_0x54b0f9['has'](_0x121a19)&&!_0x5e5d4e['has'](_0x121a19)){if(_0x34ae08['has'](_0x121a19))_0x14482a++;else{if(_0x121a19!=_0x5049eb[_0x14482a]){const _0x45c258=_0xe7dcdb['get'](_0x121a19)||_0xe7dcdb['get'](_0x5049eb[_0x14482a]);for(;_0x121a19!=_0x5049eb[_0x14482a];)_0x34ae08['has'](_0x5049eb[_0x14482a])||(_0x5e5d4e['set'](_0x5049eb[_0x14482a],_0x45c258),_0xe7dcdb['set'](_0x5049eb[_0x14482a],_0x45c258)),_0x14482a++;}_0x14482a++;}}}}for(const _0xcf878f of _0x1d83b8){const _0x4c647e=_0x5752ce['insertions'][_0xcf878f];for(const _0x26f789 of _0x4c647e){const _0xb8e66b=this['_getVidAttributeName'](_0x26f789),_0x204519=_0x26f789['item']['getAttribute'](_0xb8e66b);if(_0x5e5d4e['has'](_0x204519)){const _0x1b9559=_0x5e5d4e['get'](_0x204519);_0x34ae08['has'](_0x204519)||_0x34ae08['set'](_0x204519,{..._0x1b9559}),_0x54b0f9['set'](_0x204519,{..._0x1b9559});}}}for(const _0x5bae19 of _0x34ae08['keys']())_0x5bae19>=this['_startingRevisionId']&&_0x34ae08['delete'](_0x5bae19);const _0x4180eb=new Map();for(const _0xca59dd of _0x1d83b8){let _0x471d53=_0x5752ce['insertions'][_0xca59dd];for(const _0x14e502 of _0x471d53)if(_0x14e502['item']['is']('element','tableCell')){const _0x1f66fd=this['_getVidAttributeName'](_0x14e502),_0x335346=_0x14e502['item']['getAttribute'](_0x1f66fd);if(_0x54b0f9['has'](_0x335346)){const _0x1d7ff5=_0x14e502['item']['parent']['parent']['getAttribute']('vid_start'),_0x34030a=_0x4180eb['get'](_0x1d7ff5)||new Set();_0x34030a['add'](_0x54b0f9['get'](_0x335346)['userId']),_0x4180eb['set'](_0x1d7ff5,_0x34030a);}}_0x471d53=_0x5752ce['deletions'][_0xca59dd];for(const _0x1e7baf of _0x471d53)if(_0x1e7baf['item']['is']('element','tableCell')){const _0x1b563e=this['_getVidAttributeName'](_0x1e7baf),_0x5307cf=_0x1e7baf['item']['getAttribute'](_0x1b563e);if(_0x34ae08['has'](_0x5307cf)){const _0x3fdc2b=_0x1e7baf['item']['parent']['parent']['getAttribute']('vid_start'),_0x572fbc=_0x4180eb['get'](_0x3fdc2b)||new Set();_0x572fbc['add'](_0x34ae08['get'](_0x5307cf)['userId']),_0x4180eb['set'](_0x3fdc2b,_0x572fbc);}}for(const _0x43b38f of _0x4180eb['keys']())(_0x54b0f9['has'](_0x43b38f)||_0x34ae08['has'](_0x43b38f))&&_0x4180eb['delete'](_0x43b38f);}for(const _0x118bbd of _0x1d83b8){const _0x1cde43=_0x5752ce['insertions'][_0x118bbd];let _0x2ae32c=null,_0x1aa268=null;for(const _0x46621f of _0x1cde43){const _0x17947e=this['_getVidAttributeName'](_0x46621f),_0x4c1a3c=_0x46621f['item']['getAttribute'](_0x17947e),_0x46021a=_0x4180eb['get'](_0x4c1a3c);_0x46021a&&'elementStart'==_0x46621f['type']&&(_0x2ae32c=Array['from'](_0x46021a)[0x0],_0x1aa268=_0x46621f['item']['getAttribute']('vid_end')),_0x2ae32c&&(_0x34ae08['set'](_0x4c1a3c,{'userId':_0x2ae32c}),_0x54b0f9['set'](_0x4c1a3c,{'userId':_0x2ae32c})),_0x4c1a3c==_0x1aa268&&(_0x2ae32c=null,_0x1aa268=null);}}const _0x3072fa={},_0x51d4a6=new Set();for(const _0x5d507f of _0x1d83b8){const _0x3569bd=_0x392d00['deletions'][_0x5d507f],_0x2d7e54=_0x392d00['insertions'][_0x5d507f];for(const {userId:_0x55fb12}of this['_touchedMarkers']['values']())null!==_0x55fb12&&_0x51d4a6['add'](_0x55fb12);for(const {userId:_0x2cf0e1}of this['_touchedRoots']['values']())null!==_0x2cf0e1&&_0x51d4a6['add'](_0x2cf0e1);this['_markChanges'](_0x2d7e54,_0x5752ce['insertions'][_0x5d507f],_0x54b0f9,'insertion',_0x51d4a6),this['_markChanges'](_0x3569bd,_0x5752ce['deletions'][_0x5d507f],_0x34ae08,'deletion',_0x51d4a6),_0x3072fa[_0x5d507f]={'insertions':this['_prepareViewToSave'](_0x2d7e54),'deletions':this['_prepareViewToSave'](_0x3569bd),'attachChange':this['_touchedRoots']['get'](_0x5d507f)||null,'attributesBefore':_0x2c6e4c(this['_baseRootsAttributes']['get'](_0x5d507f))||{},'attributesAfter':_0x2c6e4c(this['_diffRootsAttributes']['get'](_0x5d507f)),'rootElementName':_0x3a85f0['get'](_0x5d507f)};}return{'diffData':_0x3072fa,'authorsIds':Array['from'](_0x51d4a6)};}_processRootBeforeSave(_0x138cc6){for(const [,_0x28ebc3]of _0x138cc6['markers']){const _0x3367f1=_0x28ebc3['start']['getAncestors']()['filter'](_0x3e1e19=>'tableCell'==_0x3e1e19['name']);for(const _0x3fbc04 of _0x3367f1)0x1==_0x3fbc04['childCount']&&_0x3fbc04['getChild'](0x0)['is']('element','paragraph')&&_0x3fbc04['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2b3bee){this['_processRootBeforeSave'](_0x2b3bee);const _0x217e0c=this['editor']['data']['toView'](_0x2b3bee,{}),_0x5190f6=Array['from'](_0x217e0c['getChildren']())['map'](_0x1dc7ca=>this['_getViewJson'](_0x1dc7ca));return JSON['stringify'](_0x5190f6);}_getViewJson(_0x71909d){if(_0x71909d['is']('$text'))return _0x71909d['data'];{const _0x48ad7b=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xf41124=_0x71909d,_0x3c29f1=this['editor']['data']['htmlProcessor']['domConverter'],_0x5e1f7e={'type':_0x48ad7b['_getTypeCharForViewElement'](_0xf41124),'name':_0xf41124['name'],'attributes':Array['from'](_0xf41124['getAttributes']()),'children':Array['from'](_0xf41124['getChildren']())['map'](_0x55a224=>this['_getViewJson'](_0x55a224))};if(_0x71909d['is']('uiElement')&&'$comment'!=_0x71909d['name']){const _0x4fe1ba=_0x71909d['render'](_0x3c29f1['domDocument'],_0x3c29f1);_0x5e1f7e['children']['push'](_0x4fe1ba['outerHTML']);}else{if(_0x71909d['is']('rawElement')){const _0x163f5e=_0x3c29f1['domDocument']['createElement'](_0xf41124['name']);_0x71909d['render'](_0x163f5e,_0x3c29f1),_0x5e1f7e['children']['push'](_0x163f5e['innerHTML']);}}const _0x2f3129=Array['from'](_0xf41124['getCustomProperties']());_0x2f3129['length']>0x0&&(_0x5e1f7e['customProperties']=_0x2f3129);const _0x9970ab=_0xf41124['getFillerOffset']();return null!==_0x9970ab&&(_0x5e1f7e['fillerOffset']=_0x9970ab),_0x5e1f7e;}}['_markChanges'](_0x4ee9b6,_0x396f51,_0x470f92,_0x238681,_0xe55754){let _0x3913c7=null,_0x54e1e3=null,_0x7c5108=0x0;const _0x516106=this['editor']['model'];for(let _0x380e63=0x0;_0x380e63<_0x396f51['length'];_0x380e63++){const _0x134303=this['_getVidAttributeName'](_0x396f51[_0x380e63]),_0x452c68=_0x396f51[_0x380e63]['item']['getAttribute'](_0x134303),_0xd66675=_0x470f92['get'](_0x452c68),_0x3eaada=_0x380e63==_0x396f51['length']-0x1;!_0x3913c7&&_0xd66675&&(_0x3913c7=_0xd66675,_0x54e1e3=_0x396f51[_0x380e63]),!_0x3913c7||_0xd66675&&_0xd66675['userId']==_0x3913c7['userId']||(_0x1c25df(_0xd66675,kt(_0x54e1e3,_0x4ee9b6,_0x516106),kt(_0x396f51[_0x380e63],_0x4ee9b6,_0x516106)),_0x3913c7=_0xd66675||null,_0x54e1e3=_0xd66675?_0x396f51[_0x380e63]:null),_0x3913c7&&_0x3eaada&&_0x1c25df(_0xd66675,kt(_0x54e1e3,_0x4ee9b6,_0x516106),At(_0x396f51[_0x380e63],_0x4ee9b6,_0x516106));}function _0x1c25df(_0x3dd7f1,_0x3feea6,_0x502d30){const _0xc19d9f=_0x3913c7['userId'],_0xda8a4='revision:'+_0x238681+':'+_0xc19d9f+':'+_0x7c5108++,_0xb1409a=_0x516106['createRange'](_0x3feea6,_0x502d30);_0x4ee9b6['markers']['set'](_0xda8a4,_0xb1409a),null!==_0xc19d9f&&_0xe55754['add'](_0xc19d9f);}}_getVidAttributeName(_0x39bc11){switch(_0x39bc11['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_fixOperation(_0x2b2cf2,_0x4cf8ba){_0x2b2cf2['baseVersion']=null;for(const _0x43732a in _0x2b2cf2){const _0x5f580b=_0x2b2cf2[_0x43732a];if(_0x5f580b instanceof _0x397840){const _0x4a062f=_0x4cf8ba['get'](_0x5f580b['root']['rootName']);_0x2b2cf2[_0x43732a]=this['_fixPosition'](_0x5f580b,_0x4a062f);}if(_0x5f580b instanceof _0x2b908e){const _0x3dd139=_0x4cf8ba['get'](_0x5f580b['root']['rootName']);_0x2b2cf2[_0x43732a]=this['_fixRange'](_0x5f580b,_0x3dd139);}'root'===_0x43732a&&(_0x2b2cf2['root']=_0x4cf8ba['get'](_0x2b2cf2['root']['rootName']));}}['_fixRange'](_0x5c7c68,_0x43cc01){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5c7c68['start'],_0x43cc01),this['_fixPosition'](_0x5c7c68['end'],_0x43cc01));}_fixPosition(_0x1ef3a4,_0x39ef21){return this['editor']['model']['createPositionFromPath'](_0x39ef21,_0x1ef3a4['path'],_0x1ef3a4['stickiness']);}_handleInsertOperation(_0x2d3913){const _0x3e53cc=this['_idsRoots']['get'](_0x2d3913['position']['root']['rootName']),_0x263cf4=this['_fixPosition'](_0x2d3913['position'],_0x3e53cc),_0x31b4e9=null===_0x2d3913['_authorId']?null:_0x2d3913['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5b297e=_0x263cf4['parent'],_0x3bae83=this['_revisionId'],_0x59cb03=[];for(const _0x2e584e of _0x2d3913['nodes'])if(_0x2e584e['is']('element'))_0x59cb03['push'](this['_makeIdsRoot'](_0x2e584e));else{for(let _0x4f1795=0x0;_0x4f1795<_0x2e584e['offsetSize'];_0x4f1795++)_0x59cb03['push'](new _0x1da96f('$text',{'vid':this['_revisionId']++}));}const _0x4c517d=this['_revisionId'];for(let _0x2fc69e=_0x3bae83;_0x2fc69e<_0x4c517d;_0x2fc69e++)this['_touched']['set'](_0x2fc69e,{'userId':_0x31b4e9});_0x5b297e['_insertChild'](_0x263cf4['offset'],_0x59cb03);}_handleMoveOperation(_0x266b02){(_0x266b02=this['_cloneOperation'](_0x266b02,this['_idsRoots']))['_execute']();const _0x59a5df=null===_0x266b02['_authorId']?null:_0x266b02['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3355ab=_0x266b02['getMovedRangeStart'](),_0x5287b9=_0x3355ab['parent'],_0x47747f=_0x3355ab['offset'];!function _0x334261(_0x3449e0,_0x25c1cb,_0x455e14,_0x1601a1){for(let _0x4d2964=_0x455e14;_0x4d2964<_0x1601a1;_0x4d2964++){const _0x7bd18f=_0x25c1cb['getChild'](_0x4d2964);_0x7bd18f['is']('element','$text')?_0x3449e0['set'](_0x7bd18f['getAttribute']('vid'),{'userId':_0x59a5df}):(_0x3449e0['set'](_0x7bd18f['getAttribute']('vid_start'),{'userId':_0x59a5df}),_0x334261(_0x3449e0,_0x7bd18f,0x0,_0x7bd18f['childCount']),_0x3449e0['set'](_0x7bd18f['getAttribute']('vid_end'),{'userId':_0x59a5df}));}}(this['_touched'],_0x5287b9,_0x47747f,_0x47747f+_0x266b02['howMany']);}_handleMergeOperation(_0xa084d2){const _0x626b6a=null===(_0xa084d2=this['_cloneOperation'](_0xa084d2,this['_idsRoots']))['_authorId']?null:_0xa084d2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x38b9e4=_0xa084d2['targetPosition']['parent'],_0x21a9a7=_0xa084d2['sourcePosition']['parent'],_0x462c56=_0x38b9e4['getAttribute']('vid_end'),_0x1fae24=_0x21a9a7['getAttribute']('vid_start');_0x38b9e4['_setAttribute']('vid_end',_0x21a9a7['getAttribute']('vid_end')),_0x21a9a7['_setAttribute']('vid_end',_0x462c56),this['_touched']['set'](_0x1fae24,{'userId':_0x626b6a}),this['_touched']['set'](_0x462c56,{'userId':_0x626b6a}),_0xa084d2['_execute']();}_handleSplitOperation(_0xd29165){const _0x17c604=null===(_0xd29165=this['_cloneOperation'](_0xd29165,this['_idsRoots']))['_authorId']?null:_0xd29165['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43ac29=_0xd29165['graveyardPosition'],_0x57c318=_0xd29165['splitPosition']['parent'];_0xd29165['_execute']();const _0x40c57a=_0x57c318['getAttribute']('vid_end'),_0x5c5c55=_0xd29165['insertionPosition']['nodeAfter'];if(_0x43ac29){const _0x29a418=_0x5c5c55['getAttribute']('vid_end'),_0x1f2b5d=_0x57c318['getAttribute']('vid_end');_0x57c318['_setAttribute']('vid_end',_0x29a418),_0x5c5c55['_setAttribute']('vid_end',_0x1f2b5d),this['_touched']['set'](_0x57c318['getAttribute']('vid_end'),{'userId':_0x17c604}),this['_touched']['set'](_0x5c5c55['getAttribute']('vid_start'),{'userId':_0x17c604});}else{const _0x4ee960=this['_revisionId']++,_0x28512f=this['_revisionId']++;_0x57c318['_setAttribute']('vid_end',_0x4ee960),_0x5c5c55['_setAttribute']('vid_start',_0x28512f),_0x5c5c55['_setAttribute']('vid_end',_0x40c57a),this['_touched']['set'](_0x4ee960,{'userId':_0x17c604}),this['_touched']['set'](_0x28512f,{'userId':_0x17c604});}}_handleMarkerOperation(_0x552fd6){if(!_0x552fd6['affectsData'])return;const _0x376d20=(_0x552fd6=this['_cloneOperation'](_0x552fd6,this['_diffRoots']))['oldRange']?_0x552fd6['oldRange']['root']:null,_0x2b77e9=_0x552fd6['newRange']?_0x552fd6['newRange']['root']:null;_0x376d20&&this['_markers']['delete'](_0x552fd6['name']),_0x2b77e9&&this['_markers']['set'](_0x552fd6['name'],_0x552fd6['newRange']['clone']());const _0x3c3af6=null===_0x552fd6['_authorId']?null:_0x552fd6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c1b25=_0x552fd6['name'];if(!this['_touchedMarkers']['has'](_0x4c1b25))return void this['_touchedMarkers']['set'](_0x4c1b25,{'range':_0x552fd6['oldRange'],'userId':_0x3c3af6});const _0xb39743=this['_touchedMarkers']['get'](_0x4c1b25),_0x20cff0=_0xb39743['range'],_0x4e3783=_0x552fd6['newRange'];null==_0x20cff0&&null==_0x4e3783||_0x20cff0&&_0x4e3783&&_0x20cff0['isEqual'](_0x4e3783)?this['_touchedMarkers']['delete'](_0x552fd6['name']):_0xb39743['userId']=_0x3c3af6;}_handleRootOperation(_0x483e73,_0x17d342){this['_diffRoots']['has'](_0x483e73['rootName'])?this['_diffRoots']['get'](_0x483e73['rootName'])['_isAttached']=_0x483e73['isAdd']:(this['_diffRoots']['set'](_0x483e73['rootName'],Rt(_0x483e73['rootName'],_0x483e73['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x483e73['rootName'],{}),_0x17d342&&this['_idsRoots']['set'](_0x483e73['rootName'],Rt(_0x483e73['rootName'],_0x483e73['elementName'],!0x0)));const _0xb403a8=null===_0x483e73['_authorId']?null:_0x483e73['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cc6df=this['_touchedRoots']['get'](_0x483e73['rootName']);_0x1cc6df&&_0x1cc6df['userId']===_0xb403a8?this['_touchedRoots']['delete'](_0x483e73['rootName']):this['_touchedRoots']['set'](_0x483e73['rootName'],{'userId':_0xb403a8,'isAttached':_0x483e73['isAdd']});}_handleRootAttributeOperation(_0x111b5a){const _0x37dfd7=this['_diffRootsAttributes']['get'](_0x111b5a['root']['rootName']);null===_0x111b5a['newValue']?delete _0x37dfd7[_0x111b5a['key']]:_0x37dfd7[_0x111b5a['key']]=_0x111b5a['newValue'];}};function bt(_0x5ee32d){const _0x6f0a8e=Rt(_0x5ee32d['rootName'],_0x5ee32d['name'],_0x5ee32d['isAttached']());for(const _0x595184 of _0x5ee32d['getChildren']()){const _0x22b2e3=_0x595184['_clone'](!0x0);_0x6f0a8e['_appendChild'](_0x22b2e3);}return _0x6f0a8e;}function Rt(_0x21a97c,_0x516752,_0x2d0059=!0x0){const _0x536a77=new _0x4f04f1();return _0x536a77['rootName']=_0x21a97c,_0x536a77['name']=_0x516752,_0x536a77['_isAttached']=_0x2d0059,_0x536a77['isAttached']=()=>_0x536a77['_isAttached'],_0x536a77;}function kt(_0xf15017,_0x3f98e7,_0x5b1c48){const _0x405528='elementEnd'==_0xf15017['type']?_0x5b1c48['createPositionAt'](_0xf15017['item'],'end'):_0x5b1c48['createPositionBefore'](_0xf15017['item']);return _0x5b1c48['createPositionFromPath'](_0x3f98e7,_0x405528['path'],_0x405528['stickiness']);}function At(_0x1430ae,_0x4d05bd,_0xb8e360){const _0x5010f6='elementStart'==_0x1430ae['type']?_0xb8e360['createPositionAt'](_0x1430ae['item'],0x0):_0xb8e360['createPositionAfter'](_0x1430ae['item']);return _0xb8e360['createPositionFromPath'](_0x4d05bd,_0x5010f6['path'],_0x5010f6['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x47a3a3();var Ot=class extends xt{['id'];author;type;data;rootName;constructor(_0x1f97d0){super(),this['id']=_0x1f97d0['id']||_0x49a83a(),this['author']=_0x1f97d0['author'],this['type']=_0x1f97d0['type'],this['data']=_0x1f97d0['data']||{},this['rootName']=_0x1f97d0['rootName'],this['set']('createdAt',_0x1f97d0['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xfc8f05,_0x5510df){this['newRevisionId']=_0xfc8f05,this['oldRevisionId']=_0x5510df,this['changes']=new _0x15d7e8();}_setChanges(_0x34644e){for(const _0x5c62f7 of _0x34644e)this['changes']['add'](_0x5c62f7);}},Mt=class extends _0x3bf7c2{repository;adapter=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x403926,_0x8479c5,mt,wt];}constructor(_0x2b744c){super(_0x2b744c),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',(_0x7b6ea,_0x490f79,_0x151619)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x227e0d=>{for(const _0x143444 of this['editor']['editing']['view']['document']['roots'])_0x151619?_0x227e0d['removeClass']('ck-editor__editable__overlay',_0x143444):_0x227e0d['addClass']('ck-editor__editable__overlay',_0x143444);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x10743f=>null!==_0x10743f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3561e2,_0x46b6e7,_0x2da44d)=>_0x3561e2&&_0x2da44d?_0x46b6e7['changes']['getIndex'](_0x2da44d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3b9b5a,_0x2e9928)=>_0x3b9b5a?_0x2e9928['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x8479c5);}init(){const _0x31999e=this['editor'],_0x2084d9=new Tt(_0x31999e,{'direction':'backward'}),_0x5b6782=new Tt(_0x31999e,{'direction':'forward'});_0x31999e['commands']['add']('showPreviousChange',_0x2084d9),_0x31999e['commands']['add']('showNextChange',_0x5b6782),_0x31999e['commands']['add']('restoreRevision',new Dt(_0x31999e)),this['on']('change:numberOfChanges',()=>{_0x2084d9['refresh'](),_0x5b6782['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x31999e['enableReadOnlyMode']('revision-viewer'),_0x31999e['plugins']['has']('WidgetToolbarRepository')&&_0x31999e['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0xf1a6cf){return await this['_utils']['loadRevisionData'](_0xf1a6cf,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xf1a6cf);}async getRevisionRootsAttributes(_0x22a138){return await this['_utils']['loadRevisionData'](_0x22a138,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x22a138);}async['compare'](_0x49c1e6,_0x50cafb,_0x1758f0=!0x1){if(!this['isEnabled'])return;const _0x59f78c=this['diff'],_0xc5ee5=this['repository'],_0x2df978='string'==typeof _0x49c1e6?_0xc5ee5['getRevision'](_0x49c1e6):_0x49c1e6,_0x71820='string'==typeof _0x50cafb?_0xc5ee5['getRevision'](_0x50cafb):_0x50cafb,_0x7c18b0=_0x2df978['id'],_0x1405f3=_0x71820?_0x71820['id']:null;if(!_0x1758f0&&this['diff']&&this['diff']['newRevisionId']===_0x7c18b0&&this['diff']['oldRevisionId']===_0x1405f3)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x7c18b0,_0x1405f3);const _0x14d848=this['_getRevisionsRange'](_0x2df978,_0x71820,!0x0)['map'](_0x18b133=>this['_utils']['loadRevisionData'](_0x18b133,this['adapter']));return _0x14d848['push'](new Promise(_0x2c15e=>{setTimeout(_0x2c15e,0x14);})),Promise['all'](_0x14d848)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x55c7e9=this['_getDiff'](_0x7c18b0,_0x1405f3);for(const _0x33c26d of _0x55c7e9['changes'])this['_changeIdToChange']['set'](_0x33c26d['id'],_0x33c26d);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x31f747=>{for(const _0x55bac8 of this['editor']['model']['document']['getRootNames']())_0x31f747['detachRoot'](_0x55bac8);for(const _0x484cd8 of Object['keys'](_0x55c7e9['model'])){const _0x2cc38e=_0x55c7e9['model'][_0x484cd8]['name'],_0x2b7f17=_0x31f747['addRoot'](_0x484cd8,_0x2cc38e);for(const _0x5ac2d9 of Object['keys'](_0x55c7e9['attributes'][_0x484cd8]))_0x31f747['setAttribute'](_0x5ac2d9,_0x55c7e9['attributes'][_0x484cd8][_0x5ac2d9],_0x2b7f17);_0x31f747['insert'](_0x55c7e9['model'][_0x484cd8],_0x2b7f17,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x55c7e9['changes'])),this['isReady']=!0x0;})['catch'](_0x38cafc=>{console['error'](_0x38cafc),this['_cleanUp'](),_0x59f78c&&(this['diff']=_0x59f78c),this['isReady']=!0x0;});}addRevisionData(_0x7b0007,_0x43b9eb){const _0x8373c2=this['repository']['createRevision'](_0x7b0007);return _0x8373c2['on']('_update',(_0xa2a9b8,_0x46f3ad,_0x250fb2)=>_0x43b9eb(_0x46f3ad,_0x250fb2,_0x8373c2)),this['repository']['addRevision'](_0x8373c2),_0x8373c2;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1fde2a=>{for(const _0x241ccc of this['editor']['model']['document']['getRootNames']())_0x1fde2a['detachRoot'](_0x241ccc);});}_sortAndFilterDiffChanges(_0x4acf24){const _0x3cc0ac=[],_0x30e05b=new Map();for(const _0x2484f7 of this['editor']['model']['document']['getRootNames']()){const _0x305ff4=this['editor']['editing']['view']['getDomRoot'](_0x2484f7);if(!_0x305ff4)continue;const _0x5565b3=_0x305ff4['getClientRects']()['item'](0x0);_0x5565b3&&(_0x3cc0ac['push'](_0x2484f7),_0x30e05b['set'](_0x2484f7,_0x5565b3));}return _0x3cc0ac['sort']((_0x637f9c,_0x571a9d)=>{const _0x2e6697=_0x30e05b['get'](_0x637f9c),_0x196847=_0x30e05b['get'](_0x571a9d);return _0x2e6697['y']-_0x196847['y']||_0x2e6697['x']-_0x196847['x'];}),(_0x4acf24=_0x4acf24['filter'](_0x53d11c=>_0x3cc0ac['includes'](_0x53d11c['rootName'])))['sort']((_0x469370,_0xffc654)=>_0x3cc0ac['indexOf'](_0x469370['rootName'])-_0x3cc0ac['indexOf'](_0xffc654['rootName'])),_0x4acf24;}['_makeTape'](_0x52e24f){const _0x12b412=Array['from'](_0x52e24f['markers'])['filter'](([_0xe77ea3,_0x29cd33])=>_0xe77ea3['startsWith']('revision:')&&!_0x29cd33['isCollapsed']),_0x217089=Array['from'](this['editor']['model']['createRangeIn'](_0x52e24f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x12b412['length'])for(const _0x58dbd9 of _0x217089){const [_0x1698d4,_0x75f500]=_0x12b412[0x0],[,_0xe7c120,_0x3c7c34]=_0x1698d4['split'](':');if(_0x75f500['end']['isEqual'](_0x58dbd9['nextPosition'])&&_0x12b412['shift'](),(_0x58dbd9['previousPosition']['isEqual'](_0x75f500['start'])||_0x58dbd9['previousPosition']['isAfter'](_0x75f500['start']))&&('insertion'==_0xe7c120?_0x58dbd9['isAdded']={'userId':_0x3c7c34}:'deletion'==_0xe7c120&&(_0x58dbd9['isRemoved']={'userId':_0x3c7c34})),0x0==_0x12b412['length'])break;}return _0x217089;}_refreshStartEndIndex(_0x216178){const _0x2790e8=new Map();for(let _0x232fa7=0x0;_0x232fa7<_0x216178['length'];_0x232fa7++)'text'===_0x216178[_0x232fa7]['type']?(_0x216178[_0x232fa7]['item']['startIndex']=_0x232fa7,_0x216178[_0x232fa7]['item']['endIndex']=_0x232fa7):('elementStart'===_0x216178[_0x232fa7]['type']?_0x216178[_0x232fa7]['item']['startIndex']=_0x232fa7:'elementEnd'===_0x216178[_0x232fa7]['type']&&(_0x216178[_0x232fa7]['item']['endIndex']=_0x232fa7),_0x2790e8['set'](_0x216178[_0x232fa7]['id'],_0x232fa7));for(const _0x367e4a of _0x2790e8['values']())'elementStart'===_0x216178[_0x367e4a]['type']?_0x216178[_0x367e4a]['item']['endIndex']=_0x2790e8['get'](_0x216178[_0x367e4a]['pairId']):'elementEnd'===_0x216178[_0x367e4a]['type']&&(_0x216178[_0x367e4a]['item']['startIndex']=_0x2790e8['get'](_0x216178[_0x367e4a]['pairId']));}['_processTape'](_0x4edd80){for(let _0x7e917f=0x0;_0x7e917f<_0x4edd80['length'];_0x7e917f++){if('elementStart'===_0x4edd80[_0x7e917f]['type'])_0x4edd80[_0x7e917f]['item']['startIndex']=_0x7e917f;else{if('elementEnd'===_0x4edd80[_0x7e917f]['type']){_0x4edd80[_0x7e917f]['item']['endIndex']=_0x7e917f;const _0x2c1d39=_0x4edd80[_0x7e917f]['item']['startIndex'];_0x4edd80[_0x2c1d39]['pairId']=_0x4edd80[_0x7e917f]['id'],_0x4edd80[_0x7e917f]['pairId']=_0x4edd80[_0x2c1d39]['id'];}else _0x4edd80[_0x7e917f]['item']['startIndex']=_0x7e917f,_0x4edd80[_0x7e917f]['item']['endIndex']=_0x7e917f,_0x4edd80[_0x7e917f]['pairId']=null;}_0x4edd80[_0x7e917f]['markersStart']||(_0x4edd80[_0x7e917f]['markersStart']=[],_0x4edd80[_0x7e917f]['markersEnd']=[]);}}_markInsertions(_0x3caf86,_0x15de16){const _0xc58ab3=_0x3caf86['filter'](_0x16cbd8=>!_0x16cbd8['isAdded']);for(let _0x362179=0x0;_0x362179<_0x15de16['length'];_0x362179++)_0x15de16[_0x362179]['isAdded']&&(_0xc58ab3[_0x362179]['isAdded']=_0x15de16[_0x362179]['isAdded']);}_getDiff(_0x36ded3,_0x6c0211=null){const _0x31a199=this['repository']['getRevision'](_0x36ded3),_0x229c17=_0x6c0211?this['repository']['getRevision'](_0x6c0211):null,_0x1d6324=this['_getRevisionsRange'](_0x31a199,_0x229c17),_0x1f5b70=_0x1d6324[_0x1d6324['length']-0x1],_0xc0f08b=new Map(),_0x2c9edc={'model':{},'attributes':{},'changes':[]},_0x449fdc=new Set(),_0xc27315=new Map();for(let _0x1b3ec4=_0x1d6324['length']-0x1;_0x1b3ec4>=0x0;_0x1b3ec4--){const _0x578e8a=_0x1d6324[_0x1b3ec4];for(const _0x1b4caf of Object['keys'](_0x578e8a['diffData']))if(_0x578e8a['diffData'][_0x1b4caf]['attachChange']){const _0x25e50a=_0x578e8a['diffData'][_0x1b4caf]['attachChange'];_0x25e50a['isAttached']?(_0x449fdc['add'](_0x1b4caf),_0xc27315['has'](_0x1b4caf)&&_0xc27315['get'](_0x1b4caf)['userId']==_0x25e50a['userId']?_0xc27315['delete'](_0x1b4caf):_0xc27315['set'](_0x1b4caf,_0x25e50a)):_0xc27315['has'](_0x1b4caf)?(_0x449fdc['delete'](_0x1b4caf),_0xc27315['delete'](_0x1b4caf)):(_0x449fdc['add'](_0x1b4caf),_0xc27315['set'](_0x1b4caf,_0x25e50a));}else _0x449fdc['add'](_0x1b4caf);}for(const _0x5e6b75 of _0x449fdc){const _0x1a3f4d=_0xc27315['has'](_0x5e6b75)&&!_0xc27315['get'](_0x5e6b75)['isAttached'];let _0x211c5f=_0x1a3f4d?_0x1d6324['length']-0x1:0x0;const _0x1aab7b=_0x1a3f4d?-0x1:0x1;for(;_0x1d6324[_0x211c5f];){const _0x13c533=_0x1d6324[_0x211c5f];if(_0x13c533['diffData'][_0x5e6b75]){const _0x285a79=_0x1a3f4d?_0x13c533['diffData'][_0x5e6b75]['attributesBefore']:_0x13c533['diffData'][_0x5e6b75]['attributesAfter'];_0x2c9edc['attributes'][_0x5e6b75]=_0x285a79?_0x2c6e4c(_0x285a79):{};break;}_0x211c5f+=_0x1aab7b;}}for(const _0x317ffa of _0x1d6324){_0x317ffa['model']={};for(const _0x22882b of _0x317ffa['authors'])_0xc0f08b['set'](_0x22882b['id'],_0x22882b);for(const _0x334477 of _0x449fdc){const _0x1a9f41=_0x317ffa['diffData'][_0x334477]?_0x317ffa['diffData'][_0x334477]['insertions']:'[]',_0x175ed9=_0x317ffa['diffData'][_0x334477]?_0x317ffa['diffData'][_0x334477]['deletions']:'[]',_0x2dd34b=_0x317ffa['diffData'][_0x334477]?.['rootElementName']||'$root';_0x317ffa['model'][_0x334477]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1a9f41,_0x2dd34b),'deletions':this['_utils']['_makeModelFromViewString'](_0x175ed9,_0x2dd34b)};}}for(const _0x5c098f of _0x449fdc){let _0x4e324f=null,_0x353b21=0x0;const _0x52812d=_0x1d6324['map'](_0xfea46b=>_0xfea46b['diffData'][_0x5c098f]?.['rootElementName'])['find'](_0x241022=>void 0x0!==_0x241022)||'$root',_0x1a1347=new Map(Array['from'](_0x31a199['model'][_0x5c098f]['insertions']['markers'])['filter'](([_0x3900a4])=>!_0x3900a4['startsWith']('revision:')));let _0x18a55b=0x0;for(const _0x39f518 of _0x1d6324){const _0x5f135b=this['_makeTape'](_0x39f518['model'][_0x5c098f]['insertions']);_0x39f518==_0x31a199?(_0x4e324f=_0x5f135b,_0x353b21=_0x4e324f['length'],_0x4e324f['forEach'](_0x5af739=>{_0x5af739['id']=_0x18a55b++;}),this['_processTape'](_0x4e324f)):this['_markInsertions'](_0x4e324f,_0x5f135b);const _0x3bc98b=_0x4e324f['filter'](_0x575b4e=>!_0x575b4e['isAdded'])['map'](_0x25c31b=>_0x25c31b['id']);let _0x374a86=0x0;const _0x579942=this['_makeTape'](_0x39f518['model'][_0x5c098f]['deletions']);_0x579942['forEach'](_0x1e6a75=>{_0x1e6a75['isRemoved']?_0x1e6a75['id']=_0x353b21++:_0x1e6a75['id']=_0x3bc98b[_0x374a86++];}),this['_processTape'](_0x579942),this['_setDistance'](_0x4e324f,'isAdded'),this['_setDistance'](_0x579942,'isRemoved'),_0x39f518==_0x31a199&&this['_markMarkers'](_0x4e324f,_0x1a1347),_0x4e324f=this['_joinTapes'](_0x4e324f,_0x579942),this['_refreshStartEndIndex'](_0x4e324f),this['_setDistance'](_0x4e324f,'isRemoved');}_0x4e324f=_0x4e324f['filter'](_0x466511=>!(_0x466511['isAdded']&&_0x466511['isRemoved']));const _0x26f5e9=new Map(_0x1f5b70['model'][_0x5c098f]['deletions']['markers']),_0x14b84a=new Set(_0x1a1347['keys']());for(const _0xe1dbea of _0x26f5e9['keys']())_0x14b84a['delete'](_0xe1dbea);this['_markSuggestions'](_0x4e324f,_0x14b84a),this['_fixObsoleteTags'](_0x4e324f),_0x4e324f=this['_removeMissingPairs'](_0x4e324f),_0x4e324f=this['_markMismatchedRemovedTags'](_0x4e324f),_0x4e324f=this['_removeUnsupportedChanges'](_0x4e324f);const {root:_0x56eb8e,changes:_0x40ae86}=this['_makeModelFromTape'](_0x4e324f,_0xc0f08b,_0x5c098f,_0x52812d);_0x2c9edc['model'][_0x5c098f]=_0x56eb8e;const _0x289e2f=_0xc27315['get'](_0x5c098f);if(_0x289e2f){const _0x911324=new Ot({'author':_0xc0f08b['get'](_0x289e2f['userId']),'type':_0x289e2f['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5c098f});_0x40ae86['unshift'](_0x911324),_0x2c9edc['attributes'][_0x5c098f]['revisionHistoryAttachChange']=_0x911324['id'];}_0x2c9edc['changes']=_0x2c9edc['changes']['concat'](_0x40ae86);}return _0x2c9edc;}['_markMarkers'](_0x13b9e9,_0x543fb7){for(let _0x583f74=0x0;_0x583f74<_0x13b9e9['length'];_0x583f74++)for(const [_0x155118,_0x34fb26]of _0x543fb7)!_0x34fb26['isCollapsed']&&_0x34fb26['start']['isEqual'](_0x13b9e9[_0x583f74]['previousPosition'])&&_0x13b9e9[_0x583f74]['markersStart']['push'](_0x155118),_0x34fb26['end']['isEqual'](_0x13b9e9[_0x583f74]['nextPosition'])&&_0x13b9e9[_0x583f74]['markersEnd']['push'](_0x155118);}['_joinTapes'](_0x3d0bdb,_0x2da125){let _0x4c4d89=[],_0x592f5c=0x0,_0x3b0290=0x0;for(;_0x592f5c<_0x3d0bdb['length']||_0x3b0290<_0x2da125['length'];){const _0x2494a2=_0x3d0bdb[_0x592f5c]||{},_0x126858=_0x2da125[_0x3b0290]||{};if(_0x2494a2['id']==_0x126858['id'])_0x592f5c++,_0x3b0290++,_0x4c4d89['push'](_0x2494a2);else{if(_0x126858['isRemoved']&&_0x2494a2['isAdded']){const {commonTape:_0x265ccd,iEnd:_0x57f1ab,jEnd:_0x411550}=this['_threeWayMerge'](_0x3d0bdb,_0x592f5c,_0x2da125,_0x3b0290);_0x4c4d89=_0x4c4d89['concat'](_0x265ccd),_0x592f5c=_0x57f1ab,_0x3b0290=_0x411550;}else _0x126858['isRemoved']?(_0x3b0290++,_0x4c4d89['push'](_0x126858)):(_0x592f5c++,_0x4c4d89['push'](_0x2494a2));}}return _0x4c4d89;}_markSuggestions(_0xf2c5e6,_0x22f80c){const _0xd5bc52=[];for(let _0x59f4f2=0x0;_0x59f4f2<_0xf2c5e6['length'];_0x59f4f2++){for(let _0x17c585=0x0;_0x17c585<_0xf2c5e6[_0x59f4f2]['markersStart']['length'];_0x17c585++){const _0x16f041=_0xf2c5e6[_0x59f4f2]['markersStart'][_0x17c585];if(!_0x22f80c['has'](_0x16f041))continue;const {group:_0x7823eb,type:_0x237592,authorId:_0x4c9232}=_0x569d70(_0x16f041);'revision-suggestion'!=_0x7823eb||'insertion'!=_0x237592&&'deletion'!=_0x237592||(_0xd5bc52['unshift']({'type':_0x237592,'name':_0x16f041,'userId':_0x4c9232}),_0xf2c5e6[_0x59f4f2]['markersStart']['splice'](_0x17c585,0x1),_0x17c585--);}_0x47c363(_0xf2c5e6[_0x59f4f2]);for(let _0x1f3041=0x0;_0x1f3041<_0xf2c5e6[_0x59f4f2]['markersEnd']['length'];_0x1f3041++){const _0x5bb9fd=_0xf2c5e6[_0x59f4f2]['markersEnd'][_0x1f3041];if(!_0x22f80c['has'](_0x5bb9fd))continue;const {group:_0x4ae1e3,type:_0x32e52a}=_0x569d70(_0x5bb9fd);if('revision-suggestion'!=_0x4ae1e3||'insertion'!=_0x32e52a&&'deletion'!=_0x32e52a)continue;_0xf2c5e6[_0x59f4f2]['markersEnd']['splice'](_0x1f3041,0x1),_0x1f3041--;const _0x37c3a4=_0xd5bc52['findIndex'](_0x238c80=>_0x238c80['name']==_0x5bb9fd);_0x37c3a4>-0x1&&_0xd5bc52['splice'](_0x37c3a4,0x1);}}function _0x569d70(_0x479fc2){const _0x13e424=_0x479fc2['split'](':');return{'group':_0x13e424[0x0],'type':_0x13e424[0x1],'subType':_0x13e424['length']>=0x5?_0x13e424[0x2]:null,'id':_0x13e424['length']<0x5?_0x13e424[0x2]:_0x13e424[0x3],'authorId':_0x13e424['length']<0x5?_0x13e424[0x3]:_0x13e424[0x4],'markerCount':0x6==_0x13e424['length']?_0x13e424[0x5]:null};}function _0x47c363(_0x157241){for(let _0xe3a09d=0x0;_0xe3a09d<_0xd5bc52['length'];_0xe3a09d++){if(_0x157241['isAdded']&&'insertion'==_0xd5bc52[_0xe3a09d]['type']&&_0x157241['isAdded']['userId']==_0xd5bc52[_0xe3a09d]['userId'])return _0x157241['isAddSuggestion']=_0xd5bc52[_0xe3a09d],void delete _0x157241['isAdded'];if(!_0x157241['isAdded']&&!_0x157241['isRemoved']&&'deletion'==_0xd5bc52[_0xe3a09d]['type'])return void(_0x157241['isRemoveSuggestion']=_0xd5bc52[_0xe3a09d]);}}}_setDistance(_0x533879,_0xd65c0a){let _0x4c98be=0x0,_0x4a07dc=!0x1;const _0x3747a2=new Map();for(const _0x4a86ff of _0x533879)_0x4a86ff[_0xd65c0a]?_0x4a07dc&&(_0x4c98be++,_0x4a07dc=!0x1):(_0x4c98be++,_0x4a07dc=!0x0),_0x3747a2['set'](_0x4a86ff['id'],_0x4c98be);for(let _0x2c8dcb=0x0;_0x2c8dcb<_0x533879['length'];_0x2c8dcb++){if('isRemoved'==_0xd65c0a&&_0x533879[_0x2c8dcb]['isAdded']||'isAdded'==_0xd65c0a&&_0x533879[_0x2c8dcb]['isRemoved'])continue;if('text'==_0x533879[_0x2c8dcb]['type']){_0x533879[_0x2c8dcb]['distance']=0x0;continue;}const _0x563da4=_0x3747a2['get'](_0x533879[_0x2c8dcb]['pairId']),_0x74f909=_0x3747a2['get'](_0x533879[_0x2c8dcb]['id']);_0x533879[_0x2c8dcb]['distance']=_0x563da4-_0x74f909;}}_getRevisionsRange(_0x3e95e8,_0x4df6b9,_0x1f1687=!0x1){const _0x1dce40=[];let _0xf03d69=this['repository']['getIndex'](_0x3e95e8),_0x9f4214=this['repository']['getIndex'](_0x4df6b9);for(-0x1==_0x9f4214&&(_0x9f4214=this['repository']['_revisions']['length'],_0x1f1687=!0x1);_0xf03d69<_0x9f4214;)_0x1dce40['push'](this['repository']['getRevision'](_0xf03d69)),_0xf03d69++;return _0x1f1687&&_0x1dce40['push'](this['repository']['getRevision'](_0xf03d69)),_0x1dce40;}_threeWayMerge(_0x34de53,_0xe7caed,_0x46c604,_0x34bcc8){const _0x51e128=this['editor']['model']['schema'];let _0x5d6569=_0xe7caed;for(;_0x34de53[_0x5d6569]&&_0x34de53[_0x5d6569]['isAdded'];)_0x5d6569++;let _0x339579=_0x34bcc8;for(;_0x46c604[_0x339579]&&_0x46c604[_0x339579]['isRemoved'];)_0x339579++;_0xe82388(_0x34de53,_0xe7caed,_0x5d6569),_0xe82388(_0x46c604,_0x34bcc8,_0x339579);const _0x28a6f3=_0x46c604['slice'](_0x34bcc8,_0x339579)['concat'](_0x34de53['slice'](_0xe7caed,_0x5d6569));return _0x28a6f3['sort']((_0x2aaacf,_0xc55d58)=>_0x2aaacf['side']!=_0xc55d58['side']?_0x2aaacf['side']-_0xc55d58['side']:_0x2aaacf['level']!=_0xc55d58['level']?_0x2aaacf['level']-_0xc55d58['level']:_0x2aaacf['distance']!=_0xc55d58['distance']?_0xc55d58['distance']-_0x2aaacf['distance']:!!_0x2aaacf['isAdded']!=!!_0xc55d58['isAdded']?-0x1==_0x2aaacf['side']||0x0==_0x2aaacf['side']?_0x2aaacf['isAdded']?-0x1:0x1:_0x2aaacf['isAdded']?0x1:-0x1:_0x2aaacf['index']-_0xc55d58['index']),{'commonTape':_0x28a6f3,'iEnd':_0x5d6569,'jEnd':_0x339579};function _0xe82388(_0x37e3fc,_0x54c3c0,_0x42f0e4){let _0x30dd5d=-0x1,_0x11de9a=Number['POSITIVE_INFINITY'],_0x2aa6c5=!0x0;for(let _0x4c2ff6=_0x54c3c0;_0x4c2ff6<_0x42f0e4;_0x4c2ff6++)if(_0x51e128['isInline'](_0x37e3fc[_0x4c2ff6]['item'])||(_0x2aa6c5=!0x1),_0x37e3fc[_0x4c2ff6]['item']['startIndex']<_0x54c3c0&&(_0x30dd5d=_0x4c2ff6),_0x37e3fc[_0x4c2ff6]['item']['endIndex']>=_0x42f0e4){_0x11de9a=_0x4c2ff6;break;}_0x2aa6c5&&(_0x30dd5d=_0x42f0e4-0x1);for(let _0x45b8f5=_0x54c3c0;_0x45b8f5<_0x42f0e4;_0x45b8f5++)_0x37e3fc[_0x45b8f5]['side']=_0x45b8f5<=_0x30dd5d?-0x1:_0x45b8f5<_0x11de9a?0x0:0x1,_0x37e3fc[_0x45b8f5]['index']=_0x45b8f5;let _0x406665=0x0;for(let _0x301e39=_0x54c3c0;_0x301e39<=_0x30dd5d;_0x301e39++)0x0==_0x37e3fc[_0x301e39]['distance']?_0x37e3fc[_0x301e39]['level']=_0x406665:(_0x406665++,_0x37e3fc[_0x301e39]['level']=_0x406665,_0x406665++);for(let _0x112e15=_0x54c3c0;_0x112e15<_0x42f0e4;_0x112e15++)0x0==_0x37e3fc[_0x112e15]['side']&&(_0x37e3fc[_0x112e15]['level']=_0x406665);_0x406665=0x0;for(let _0x559927=_0x42f0e4-0x1;_0x559927>=_0x11de9a;_0x559927--)0x0==_0x37e3fc[_0x559927]['distance']?_0x37e3fc[_0x559927]['level']=_0x406665:(_0x406665--,_0x37e3fc[_0x559927]['level']=_0x406665,_0x406665--);}}_fixObsoleteTags(_0x20de39){const _0xf22168=new Map(),_0x54d930=this['editor']['model']['schema'];for(let _0x37b1d9=0x1;_0x37b1d9<_0x20de39['length'];_0x37b1d9++){let _0x40f95c,_0x17c891,_0x5a7d89;const _0xa77677=_0x20de39[_0x37b1d9],_0x2e8252=_0x20de39[_0x37b1d9-0x1];if('text'==_0xa77677['type'])continue;if(_0xa77677['type']!=_0x2e8252['type'])continue;if(!_0x54d930['isBlock'](_0x2e8252['item'])||_0x54d930['isLimit'](_0x2e8252['item']))continue;if(!_0x54d930['isBlock'](_0xa77677['item'])||_0x54d930['isLimit'](_0xa77677['item']))continue;if((_0x20de39[_0x37b1d9]['isAdded']||_0x20de39[_0x37b1d9]['isAddSuggestion'])&&_0x20de39[_0x37b1d9-0x1]['isRemoved'])_0x40f95c=_0x20de39[_0x37b1d9],_0x17c891=_0x20de39[_0x37b1d9-0x1],_0x5a7d89=_0x37b1d9-0x1;else{if(!_0x20de39[_0x37b1d9]['isRemoved']||!_0x20de39[_0x37b1d9-0x1]['isAdded']&&!_0x20de39[_0x37b1d9-0x1]['isAddSuggestion'])continue;_0x40f95c=_0x20de39[_0x37b1d9-0x1],_0x17c891=_0x20de39[_0x37b1d9],_0x5a7d89=_0x37b1d9;}const _0x3efae3=_0x40f95c['level']==_0x17c891['level'],_0x4a5719=Math['abs'](_0x40f95c['level'])<Math['abs'](_0x17c891['level'])&&0x0==_0x17c891['distance'];(_0x3efae3||_0x4a5719)&&(_0xf22168['set'](_0x17c891['id'],_0x40f95c['id']),_0x20de39['splice'](_0x5a7d89,0x1),_0x37b1d9--,_0x40f95c['isAdded']=!0x1);}for(let _0x5bfede=0x0;_0x5bfede<_0x20de39['length'];_0x5bfede++)_0xf22168['has'](_0x20de39[_0x5bfede]['pairId'])&&(_0x20de39[_0x5bfede]['pairId']=_0xf22168['get'](_0x20de39[_0x5bfede]['pairId']));}['_removeMissingPairs'](_0x1568c9){const _0x35b7a5=new Set(_0x1568c9['map'](_0x5de852=>_0x5de852['id']));for(let _0x479d44=0x0;_0x479d44<_0x1568c9['length'];_0x479d44++)_0x35b7a5['has'](_0x1568c9[_0x479d44]['pairId'])||0x0==_0x1568c9[_0x479d44]['distance']||(_0x1568c9[_0x479d44]['isIncorrect']=!0x0);return _0x1568c9['filter'](_0x29c264=>!_0x29c264['isIncorrect']);}_markMismatchedRemovedTags(_0x536ba8){const _0x5e64b7=new Set();for(let _0x4fe5ca=0x0;_0x4fe5ca<_0x536ba8['length'];_0x4fe5ca++){if(_0x5e64b7['has'](_0x536ba8[_0x4fe5ca]['id'])&&_0x536ba8[_0x4fe5ca]['isRemoved']&&(_0x536ba8[_0x4fe5ca]['isIncorrect']=!0x0),_0x536ba8[_0x4fe5ca]['isIncorrect'])continue;if(0x0==_0x536ba8[_0x4fe5ca]['distance'])continue;if('elementStart'!=_0x536ba8[_0x4fe5ca]['type'])continue;if(null==_0x536ba8[_0x4fe5ca]['pairId'])continue;let _0x1620f1=_0x4fe5ca+0x1,_0x20c092=0x0;for(;_0x536ba8[_0x1620f1]['id']!=_0x536ba8[_0x4fe5ca]['pairId'];)'elementStart'==_0x536ba8[_0x1620f1]['type']?_0x20c092++:'elementEnd'==_0x536ba8[_0x1620f1]['type']&&_0x20c092--,_0x1620f1++;if(0x0!=_0x20c092){if(_0x536ba8[_0x4fe5ca]['isRemoved'])_0x536ba8[_0x4fe5ca]['isIncorrect']=!0x0;else{for(;_0x1620f1!=_0x4fe5ca;)_0x536ba8[_0x1620f1]['isRemoved']&&0x0!=_0x536ba8[_0x1620f1]['distance']&&(_0x536ba8[_0x1620f1]['isIncorrect']=!0x0,_0x5e64b7['add'](_0x536ba8[_0x1620f1]['pairId'])),_0x1620f1--;}}}return _0x536ba8['filter'](_0x2282ac=>!_0x2282ac['isIncorrect']);}_removeUnsupportedChanges(_0x48ff8f){const _0x54758b=this['editor']['model']['schema'];for(let _0x2cdea4=0x0;_0x2cdea4<_0x48ff8f['length'];_0x2cdea4++){if(!(_0x48ff8f[_0x2cdea4]['isAdded']||_0x48ff8f[_0x2cdea4]['isAddSuggestion']||_0x48ff8f[_0x2cdea4]['isRemoved']||_0x48ff8f[_0x2cdea4]['isRemoveSuggestion']))continue;if(0x0==_0x48ff8f[_0x2cdea4]['distance'])continue;const _0x155ba3=_0x48ff8f[_0x2cdea4]['item'];_0x54758b['isBlock'](_0x155ba3)||_0x54758b['isLimit'](_0x155ba3)||(_0x48ff8f[_0x2cdea4]['isAdded']&&delete _0x48ff8f[_0x2cdea4]['isAdded'],_0x48ff8f[_0x2cdea4]['isAddSuggestion']&&delete _0x48ff8f[_0x2cdea4]['isAddSuggestion'],_0x48ff8f[_0x2cdea4]['isRemoveSuggestion']&&delete _0x48ff8f[_0x2cdea4]['isRemoveSuggestion'],_0x48ff8f[_0x2cdea4]['isRemoved']&&(_0x48ff8f[_0x2cdea4]['isIncorrect']=!0x0));}return _0x48ff8f['filter'](_0x353d3d=>!_0x353d3d['isIncorrect']);}['_makeModelFromTape'](_0x4af27,_0x4067f9,_0x320aa8,_0x5043dd){const _0x2cbb3b=new _0x4f04f1(),_0x5f3c27=[],_0x336949=new Map(),_0x4d7d5f=this['editor']['model'],_0x261ee0=_0x4d7d5f['schema'],_0x58ae19=[_0x2cbb3b],_0x84d76b={},_0x1a1951={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2cbb3b['name']=_0x5043dd;let _0x2d3369=null;const _0x3c8ddd=[0x0];for(let _0x519bd6=0x0;_0x519bd6<_0x4af27['length'];_0x519bd6++)if('elementStart'===_0x4af27[_0x519bd6]['type']){_0x4af27[_0x519bd6]['previousPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd);const _0x35a00e=new _0x1da96f(_0x4af27[_0x519bd6]['item']['name'],_0x4af27[_0x519bd6]['item']['getAttributes']());_0x58ae19[0x0]['_appendChild'](_0x35a00e),_0x3c8ddd['push'](0x0),_0x58ae19['unshift'](_0x35a00e),_0x4af27[_0x519bd6]['nextPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd);}else'elementEnd'===_0x4af27[_0x519bd6]['type']?(_0x58ae19['shift'](),_0x4af27[_0x519bd6]['previousPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd),_0x3c8ddd['pop'](),_0x3c8ddd[_0x3c8ddd['length']-0x1]++,_0x4af27[_0x519bd6]['nextPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd)):(_0x4af27[_0x519bd6]['previousPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd),_0x2d3369?_0x2d3369['_data']+=_0x4af27[_0x519bd6]['item']['data']:_0x2d3369=new _0x1594e5(_0x4af27[_0x519bd6]['item']['data'],_0x4af27[_0x519bd6]['item']['getAttributes']()),_0x4af27[_0x519bd6+0x1]&&'text'===_0x4af27[_0x519bd6+0x1]['type']&&_0x50427c(_0x2d3369,_0x4af27[_0x519bd6+0x1]['item'])||(_0x58ae19[0x0]['_appendChild'](_0x2d3369),_0x2d3369=null),_0x3c8ddd[_0x3c8ddd['length']-0x1]+=_0x4af27[_0x519bd6]['item']['offsetSize'],_0x4af27[_0x519bd6]['nextPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd));for(let _0x2e1d13=0x0;_0x2e1d13<_0x4af27['length'];_0x2e1d13++){const _0x3465a2=_0x4af27[_0x2e1d13]['previousPosition'],_0x51ac11=_0x4af27[_0x2e1d13]['nextPosition'];for(const _0x6fad85 of _0x4af27[_0x2e1d13]['markersStart'])_0x336949['set'](_0x6fad85,{'start':_0x3465a2,'end':null});_0x2b1549('isRemoveSuggestion',_0x2e1d13,_0x3465a2,_0x51ac11),_0x2b1549('isAddSuggestion',_0x2e1d13,_0x3465a2,_0x51ac11),_0x2b1549('isRemoved',_0x2e1d13,_0x3465a2,_0x51ac11),_0x2b1549('isAdded',_0x2e1d13,_0x3465a2,_0x51ac11);for(const _0x3f1dcd of _0x4af27[_0x2e1d13]['markersEnd']){const _0x4e2c9d=_0x336949['get'](_0x3f1dcd);_0x4e2c9d?_0x4e2c9d['end']=_0x51ac11:_0x336949['set'](_0x3f1dcd,{'start':_0x51ac11,'end':_0x51ac11});}}for(const [_0x471b2a,_0x5c7d4a]of _0x336949){const _0x56e554=this['editor']['model']['createRange'](_0x5c7d4a['start'],_0x5c7d4a['end']);_0x2cbb3b['markers']['set'](_0x471b2a,_0x56e554);}return _0x5f3c27['sort']((_0x23b040,_0x1bb51a)=>{const _0x17a3e0=_0x2cbb3b['markers']['get']('revision:'+_0x23b040['id']),_0x4f014b=_0x2cbb3b['markers']['get']('revision:'+_0x1bb51a['id']);return _0x17a3e0['start']['isBefore'](_0x4f014b['start'])?-0x1:_0x17a3e0['start']['isAfter'](_0x4f014b['start'])?0x1:_0x17a3e0['end']['isBefore'](_0x4f014b['end'])?-0x1:_0x17a3e0['end']['isAfter'](_0x4f014b['end'])?0x1:'add'===_0x23b040['type']?-0x1:0x1;}),{'root':_0x2cbb3b,'changes':_0x5f3c27};function _0x2b1549(_0x328de9,_0x2dbf46,_0x120484,_0x139bbf){const _0x5b9b4e=!!_0x4af27[_0x2dbf46][_0x328de9],_0x4778aa=_0x5b9b4e?_0x4af27[_0x2dbf46][_0x328de9]['userId']:null,_0xf0332c=_0x2dbf46===_0x4af27['length']-0x1,_0x5c0e2c=_0x1a1951[_0x328de9][0x0],_0x3a33c6=_0x261ee0['isObject'](_0x4af27[_0x2dbf46]['item']);!_0x84d76b[_0x328de9]&&_0x5b9b4e?_0x84d76b[_0x328de9]={'start':_0x120484,'tapeItem':_0x4af27[_0x2dbf46],'userId':_0x4778aa,'type':_0x328de9}:_0x84d76b[_0x328de9]&&!_0x5b9b4e?(_0x84d76b[_0x328de9]['end']=_0x120484,_0x4f1a60(_0x84d76b[_0x328de9]),_0x84d76b[_0x328de9]=null):_0x84d76b[_0x328de9]&&_0x5b9b4e&&_0x84d76b[_0x328de9]['userId']!==_0x4778aa&&(_0x84d76b[_0x328de9]['end']=_0x120484,_0x5c0e2c&&_0x5c0e2c['userId']===_0x84d76b[_0x328de9]['userId']||_0x4f1a60(_0x84d76b[_0x328de9]),_0x84d76b[_0x328de9]={'start':_0x120484,'tapeItem':_0x4af27[_0x2dbf46],'userId':_0x4778aa,'type':_0x328de9}),_0x84d76b[_0x328de9]&&_0x3a33c6&&('elementStart'!==_0x4af27[_0x2dbf46]['type']||_0x5c0e2c&&_0x5c0e2c['userId']===_0x4778aa||_0x1a1951[_0x328de9]['unshift']({'userId':_0x4778aa,'object':_0x4af27[_0x2dbf46]['item'],'change':_0x84d76b[_0x328de9]}),'elementEnd'===_0x4af27[_0x2dbf46]['type']&&_0x5c0e2c&&_0x5c0e2c['object']===_0x4af27[_0x2dbf46]['item']&&(_0x1a1951[_0x328de9]['shift'](),_0x84d76b[_0x328de9]=_0x5c0e2c['change'])),_0x84d76b[_0x328de9]&&_0xf0332c&&(_0x84d76b[_0x328de9]['end']=_0x139bbf,_0x4f1a60(_0x84d76b[_0x328de9]),_0x84d76b[_0x328de9]=null);}function _0x4f1a60({start:_0x16ae03,end:_0x1a205b,tapeItem:_0x1a29a6,userId:_0x5eb150,type:_0x2b8930}){const _0x454673=_0x1a29a6['item'],_0x3eb4d5=_0x4d7d5f['schema']['isBlock'](_0x454673)&&!_0x4d7d5f['schema']['isLimit'](_0x454673),_0x5da8bc=_0x16ae03['nodeAfter']==_0x1a205b['parent']&&_0x1a205b['isAtStart'];if(_0x3eb4d5&&_0x5da8bc)return;const _0x5e5433=_0x4d7d5f['createRange'](_0x16ae03,_0x1a205b),_0x22ecb8=new Ot({'author':_0x4067f9['get'](_0x5eb150),'type':'isAdded'==_0x2b8930||'isAddSuggestion'==_0x2b8930?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2b8930||'isRemoveSuggestion'==_0x2b8930},'createdAt':new Date(),'rootName':_0x320aa8});_0x5f3c27['push'](_0x22ecb8),_0x2cbb3b['markers']['set']('revision:'+_0x22ecb8['id'],_0x5e5433);}function _0x50427c(_0x1123ae,_0x85cdee){const _0x48ee14=_0x1123ae['getAttributes'](),_0x57ccd0=_0x85cdee['getAttributes']();for(const _0x440af9 of _0x48ee14){if(_0x440af9[0x1]!==_0x85cdee['getAttribute'](_0x440af9[0x0]))return!0x1;_0x57ccd0['next']();}return _0x57ccd0['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1339f5=>{const _0x20dbee=_0x1339f5['markerName']['split'](':')[0x1],_0x9f3565=this['_getChangeFromId'](_0x20dbee);if(!_0x9f3565)return null;const _0x4ec442='add'==_0x9f3565['type']?'insertion':'deletion',_0x3f58c1=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4ec442];return _0x9f3565['data']['isSuggestion']&&_0x3f58c1['push']('ck-suggestion-marker-'+_0x4ec442+'-new'),this['activeChange']==_0x9f3565&&_0x3f58c1['push']('ck-suggestion-marker--active'),{'classes':_0x3f58c1,'attributes':{'data-change-id':_0x20dbee}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x396615=>{_0x396615['on']('element:pre',(_0x2f6916,_0x5d4191,_0x4453c0)=>{const _0x355493=_0x5d4191['viewItem']['getChild'](0x0);if(!_0x355493||!_0x355493['is']('element','code'))return;if(!_0x4453c0['consumable']['consume'](_0x355493,{'attributes':['vid_start','vid_end']}))return;const _0x9bc719=_0x5d4191['modelRange']['start']['nodeAfter'];_0x4453c0['writer']['setAttribute']('vid_start',_0x355493['getAttribute']('vid_start'),_0x9bc719),_0x4453c0['writer']['setAttribute']('vid_end',_0x355493['getAttribute']('vid_end'),_0x9bc719);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x482edd=>{_0x482edd['on']('element',(_0x5e58ba,_0x752dff,_0x516605)=>{if(!_0x516605['consumable']['consume'](_0x752dff['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x752dff['modelRange']['isCollapsed'])return;const _0x541dd0=_0x752dff['modelRange']['start']['nodeAfter'];_0x541dd0['hasAttribute']('vid_start')||_0x541dd0['hasAttribute']('vid')||(_0x516605['writer']['setAttribute']('vid_start',_0x752dff['viewItem']['getAttribute']('vid_start'),_0x541dd0),_0x516605['writer']['setAttribute']('vid_end',_0x752dff['viewItem']['getAttribute']('vid_end'),_0x541dd0));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1b4b07=>_0x1b4b07['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1885e1,[,_0x489ce3])=>{['vid_start','vid_end','vid']['includes'](_0x489ce3)&&(_0x1885e1['return']=!0x0,_0x1885e1['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xceb526=>{_0xceb526['on']('attribute:vid',(_0x354131,_0x4338fe,_0x36c70f)=>{if('\x20'!=_0x4338fe['item']['data']||_0x4338fe['item']['parent']['maxOffset']>0x1)return;if(!_0x36c70f['consumable']['consume'](_0x4338fe['item'],_0x354131['name']))return;const _0x198ae5=_0x36c70f['writer'],_0x1e9382=_0x36c70f['mapper']['toViewRange'](_0x4338fe['range']);_0x198ae5['wrap'](_0x1e9382,_0x198ae5['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x55e50c){const _0x3e987a=_0x55e50c['plugins']['get']('RevisionViewer');return(_0x3541c8,_0x4abca8,_0x4cae6c)=>{const _0x1de81e=_0x4abca8['markerName']['split'](':')[0x1],_0x2a88ec=_0x3e987a['_getChangeFromId'](_0x1de81e);if(!_0x2a88ec)return null;const _0x3e1ca7='add'==_0x2a88ec['type']?'split':'merge';if(!_0x4cae6c['consumable']['test'](_0x4abca8['markerRange'],_0x3541c8['name']))return;const _0x35f0d6=_0x4abca8['markerRange']['getWalker'](),_0x55b49a=_0x4abca8['markerRange']['start'],_0x45a44f=_0x55e50c['model']['schema'];let _0x2d1886=null,_0x285916=null,_0xfaf3cc=!0x1,_0x442d0c=!0x1;for(const _0x174c1f of _0x35f0d6){const _0x3c7c60=_0x174c1f['item'];_0xfaf3cc=_0xfaf3cc||_0x45a44f['isContent'](_0x3c7c60);const _0x2582a2=_0x4cae6c['mapper']['toViewElement'](_0x3c7c60);if(_0x2582a2&&_0x2582a2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x174c1f['type']&&(_0x45a44f['isBlock'](_0x3c7c60)&&!_0x45a44f['isLimit'](_0x3c7c60)&&(_0x3c7c60['nextSibling']||_0x55b49a['isAtEnd']?_0x2d1886&&_0x2d1886['parent']==_0x3c7c60||(_0x2d1886=_0x3c7c60,_0x8d7495(_0x174c1f['previousPosition']),_0x442d0c=!0x0):_0x285916=_0x285916||_0x174c1f['previousPosition']));}function _0x8d7495(_0x297ee2){const _0x4aa857=_0x4cae6c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3e1ca7}),_0x1cdc6f=_0x4cae6c['mapper']['toViewPosition'](_0x297ee2);_0x2a88ec['data']['isSuggestion']&&_0x4cae6c['writer']['addClass']('ck-suggestion-marker-'+_0x3e1ca7+'-new',_0x4aa857),_0x3e987a['activeChange']==_0x2a88ec&&_0x4cae6c['writer']['addClass']('ck-suggestion-marker--active',_0x4aa857),_0x4cae6c['writer']['insert'](_0x1cdc6f,_0x4aa857),_0x4cae6c['mapper']['bindElementToMarker'](_0x4aa857,_0x4abca8['markerName']);}_0xfaf3cc||_0x442d0c||!_0x285916||_0x8d7495(_0x285916);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1065af,_0x1b0873,_0x358d26)=>{const _0x5d41cd=_0x358d26['mapper']['markerNameToElements'](_0x1b0873['markerName']);if(_0x5d41cd){for(const _0x153003 of _0x5d41cd)(_0x153003['hasClass']('ck-suggestion-marker-split')||_0x153003['hasClass']('ck-suggestion-marker-merge'))&&(_0x358d26['mapper']['unbindElementFromMarkerName'](_0x153003,_0x1b0873['markerName']),_0x358d26['writer']['remove'](_0x153003));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1cf523,_0x5ac030,_0x25c4de)=>{const _0x2db2d9=_0x5ac030['markerName']['split'](':')[0x1],_0xaba77d=this['_getChangeFromId'](_0x2db2d9);if(!_0xaba77d)return null;const _0x5834ff='add'==_0xaba77d['type']?'split':'merge';if(_0x25c4de['consumable']['test'](_0x5ac030['markerRange'],_0x1cf523['name']))for(const _0xd633c2 of _0x5ac030['markerRange']['getItems']()){if(!_0xd633c2['is']('element','softBreak'))continue;const _0x39170b=_0x25c4de['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5834ff}),_0x3c6e0b=_0x25c4de['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xd633c2));_0xaba77d['data']['isSuggestion']&&_0x25c4de['writer']['addClass']('ck-suggestion-marker-'+_0x5834ff+'-new',_0x39170b),this['activeChange']==_0xaba77d&&_0x25c4de['writer']['addClass']('ck-suggestion-marker--active',_0x39170b),_0x25c4de['writer']['insert'](_0x3c6e0b,_0x39170b),_0x25c4de['mapper']['bindElementToMarker'](_0x39170b,_0x5ac030['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3e0cc3=>{for(const _0x3fbf4d of this['editor']['model']['document']['getRootNames']()){const _0x312c56=this['editor']['model']['document']['getRoot'](_0x3fbf4d),_0x2c15ca=this['editor']['editing']['view']['document']['getRoot'](_0x3fbf4d);if(_0x2c15ca){const _0xdef88a=_0x312c56['getAttribute']('revisionHistoryAttachChange');if(_0x3e0cc3['removeAttribute']('data-change-id',_0x2c15ca),_0x3e0cc3['removeClass']('ck-revision-history-root-add',_0x2c15ca),_0x3e0cc3['removeClass']('ck-revision-history-root-remove',_0x2c15ca),_0x3e0cc3['removeClass']('ck-revision-history-root--active',_0x2c15ca),_0xdef88a){const _0xeb43de=this['_getChangeFromId'](_0xdef88a);if(!_0xeb43de)return null;_0x3e0cc3['setAttribute']('data-change-id',_0xdef88a,_0x2c15ca),_0x3e0cc3['addClass']('ck-revision-history-root-'+_0xeb43de['type'],_0x2c15ca),this['activeChange']==_0xeb43de&&_0x3e0cc3['addClass']('ck-revision-history-root--active',_0x2c15ca);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xe6192d=>'revision-comment:'+_0xe6192d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4c54df=>'revision-suggestion:'+_0x4c54df,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x34c056=>({'name':'suggestion:'+_0x34c056,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x278faa=>{const _0x1c8ad5=_0x278faa['markerName']['split'](':')[0x1];return'insertion'!=_0x1c8ad5&&'deletion'!=_0x1c8ad5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1c8ad5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x363958,_0x45d855,_0x4df7f6)=>{const _0x335624=_0x4df7f6['mapper']['markerNameToElements'](_0x45d855['markerName']);if(_0x335624){for(const _0x55f6ef of _0x335624)_0x55f6ef['is']('uiElement')&&(_0x4df7f6['mapper']['unbindElementFromMarkerName'](_0x55f6ef,_0x45d855['markerName']),_0x4df7f6['writer']['remove'](_0x55f6ef));}},{'priority':'high'});}_getChangeFromId(_0x4cf7be){return this['_changeIdToChange']['get'](_0x4cf7be);}_getViewForChange(_0xfe5dd0){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0xfe5dd0),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1c4584,_0x371935,_0x25483c,_0x411a8d)=>{_0x411a8d&&this['_balloon']['remove'](_0x411a8d),_0x25483c&&(this['_balloon']['add']({'view':_0x25483c,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x39a577=this['editor']['editing'],_0x13513f=this['_getChangeFromId'](_0x25483c['changeId']);let _0x146786;if(_0x13513f['data']['isOnRoot']){const _0x46370c=_0x39a577['view']['getDomRoot'](_0x13513f['rootName']);_0x146786=Array['from'](_0x46370c['getClientRects']());}else{const _0xcd53bb=this['editor']['model']['markers']['get']('revision:'+_0x25483c['changeId']);_0x146786=Array['from'](_0x39a577['mapper']['markerNameToElements'](_0xcd53bb['name']))['map'](_0x1fc182=>_0x39a577['view']['domConverter']['mapViewToDom'](_0x1fc182))['map'](_0x4ea5d2=>Array['from'](_0x4ea5d2['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x146786['find'](_0x528e68=>_0x528e68['top']-0x3<=this['_activeViewTarget']['y']&&_0x528e68['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x528e68['left']-0x3<=this['_activeViewTarget']['x']&&_0x528e68['right']+0x3>=this['_activeViewTarget']['x'])||_0x146786[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x514034,_0x56e50f,_0x194442,_0x75f498)=>{this['activeView']=_0x194442?this['_getViewForChange'](_0x194442):null,this['editor']['model']['change'](()=>{const _0x5cfed5=this['editor']['editing'];_0x75f498&&(_0x75f498['data']['isOnRoot']?_0x5cfed5['view']['change'](_0x239012=>{_0x239012['removeClass']('ck-revision-history-root--active',_0x5cfed5['view']['document']['getRoot'](_0x75f498['rootName']));}):_0x5cfed5['reconvertMarker']('revision:'+_0x75f498['id'])),_0x194442&&(_0x194442['data']['isOnRoot']?_0x5cfed5['view']['change'](_0x3da06c=>{_0x3da06c['addClass']('ck-revision-history-root--active',_0x5cfed5['view']['document']['getRoot'](_0x194442['rootName']));}):_0x5cfed5['reconvertMarker']('revision:'+_0x194442['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x157ff6,_0x30b151)=>{if(this['activeChange'])return;const _0x19de25=this['_findChangeIdFromDomTarget'](_0x30b151['target']),_0x83c3eb=this['_changeIdToChange']['get'](_0x19de25);_0x83c3eb?(this['_activeViewTarget']={'x':_0x30b151['domEvent']['x'],'y':_0x30b151['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x83c3eb)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x39baa2,_0x2d9c84)=>{const _0x4862a3=this['_findChangeIdFromDomTarget'](_0x2d9c84['target']),_0x2f7f04=this['_changeIdToChange']['get'](_0x4862a3);_0x2f7f04?(this['_activeViewTarget']={'x':_0x2d9c84['domEvent']['x'],'y':_0x2d9c84['domEvent']['y']},_0x2f7f04===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2f7f04):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x4307ed){do{const _0x969662=_0x4307ed['getAttribute']('data-change-id');if(_0x969662)return _0x969662;_0x4307ed=_0x4307ed['parent'];}while(_0x4307ed);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1da709=>{for(const _0x2b6e9d of this['editor']['model']['markers'])_0x1da709['removeMarker'](_0x2b6e9d);});}};function Vt(_0x3a85d8,_0x3fda37){return(_0x19e6c5,_0xe87266,_0x56d259)=>{if(!_0x56d259['consumable']['test'](_0xe87266['markerRange'],_0x19e6c5['name']))return;const _0x30aabe=_0xe87266['markerRange']['getWalker'](),_0x30b742=_0xe87266['markerRange']['start'],_0x199d7d=_0x3a85d8['model']['schema'];let _0x5c87a5=null,_0x426a9f=null,_0x113293=!0x1,_0xbf6c55=!0x1;for(const _0x4453f7 of _0x30aabe){const _0x130767=_0x4453f7['item'];_0x113293=_0x113293||_0x199d7d['isContent'](_0x130767);const _0x5345fb=_0x56d259['mapper']['toViewElement'](_0x130767);if(_0x5345fb&&_0x5345fb['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4453f7['type']&&(_0x199d7d['isBlock'](_0x130767)&&!_0x199d7d['isLimit'](_0x130767)&&(_0x130767['nextSibling']||_0x30b742['isAtEnd']?_0x5c87a5&&_0x5c87a5['parent']==_0x130767||(_0x5c87a5=_0x130767,_0x2e0d8c(_0x4453f7['previousPosition']),_0xbf6c55=!0x0):_0x426a9f=_0x426a9f||_0x4453f7['previousPosition']));}function _0x2e0d8c(_0x33b066){const _0x2496e9=_0x56d259['mapper']['toViewPosition'](_0x33b066),_0x4db6c2=_0x56d259['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3fda37});_0x56d259['writer']['insert'](_0x2496e9,_0x4db6c2),_0x56d259['mapper']['bindElementToMarker'](_0x4db6c2,_0xe87266['markerName']);}_0x113293||_0xbf6c55||!_0x426a9f||_0x2e0d8c(_0x426a9f);};}var Dt=class extends _0x26de09{constructor(_0x4aa7a3){super(_0x4aa7a3);const _0x4d8e02=_0x4aa7a3['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x4d8e02,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4d8e02,'change:isEnabled',()=>this['refresh']());}execute(){const _0x5a1e22=this['editor'],_0x37b54f=_0x5a1e22['plugins']['get'](Mt),_0x281b1d=_0x37b54f['isReady']?_0x37b54f['diff']['newRevisionId']:null;_0x5a1e22['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x281b1d);}['refresh'](){const {isReady:_0x505382,isEnabled:_0x163cb6,repository:_0x2b317b,diff:_0x12e08d}=this['editor']['plugins']['get'](Mt),_0x572ed9=_0x12e08d&&_0x2b317b['getLaterVisibleRevision'](_0x12e08d['newRevisionId']);this['isEnabled']=_0x505382&&_0x163cb6&&Boolean(_0x572ed9);}},Tt=class extends _0x26de09{_step;constructor(_0x13c36a,{direction:_0x453370}){super(_0x13c36a);const _0xd5af6e=_0x13c36a['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x453370?0x1:-0x1,this['listenTo'](_0xd5af6e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xd5af6e,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xd5af6e,'change:activeChange',()=>this['refresh']());}execute(){const _0xdaecb6=this['editor'],_0x1901c9=_0xdaecb6['plugins']['get'](Mt),{isNavigationMode:_0x3c127a,currentChangeNumber:_0x3d27d4}=_0x1901c9;let _0x1eb8b6;if(_0x1901c9['activeChange']=_0x3c127a?_0x1901c9['diff']['changes']['get'](_0x3d27d4+this['_step']):_0x1901c9['diff']['changes']['first'],_0x1901c9['activeChange']['data']['isOnRoot'])_0x1eb8b6=_0xdaecb6['editing']['view']['getDomRoot'](_0x1901c9['activeChange']['rootName']);else{const _0x197860=_0xdaecb6['model']['markers']['get']('revision:'+_0x1901c9['activeChange']['id']);_0x1eb8b6=_0xb537ad(_0xdaecb6['editing'],_0x197860);}_0x191225({'target':_0x1eb8b6,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x8d9bcb,currentChangeNumber:_0x3df906,numberOfChanges:_0x34a2cd,isReady:_0x126904,isEnabled:_0x345d39}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x345d39&&_0x126904&&_0x34a2cd)&&(!_0x8d9bcb||(0x1===this['_step']?_0x3df906<_0x34a2cd-0x1:_0x3df906>0x0));}},Ht=class extends at{constructor(_0x583677){super(_0x583677);const _0x113ff5=this['bindTemplate'],_0x1aca70=new _0x2fc172(_0x583677),_0x38b529=new _0x2fc172(_0x583677);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',(_0x1a82ca,_0x5f1c65)=>_0x1a82ca&&_0x5f1c65>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0xc4bbc3,_0x39507f,_0x531075,_0x792fee)=>{if(!_0xc4bbc3)return pt(_0x583677,'Loading...');if(!_0x531075)return pt(_0x583677,'No\x20changes');const _0x2408df=pt(_0x583677,'NUMBER_OF_CHANGES',_0x531075);return _0x792fee?pt(_0x583677,'X_OF_Y_CHANGES',[_0x39507f+0x1,_0x531075]):_0x2408df;}),_0x1aca70['set']({'label':pt(_0x583677,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3b4514}),_0x38b529['set']({'label':pt(_0x583677,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x298151}),_0x1aca70['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x38b529['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1aca70['on']('execute',()=>this['fire']('execute','backward')),_0x38b529['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',_0x113ff5['if']('_isStatusLabelVisible','ck-hidden',_0x395e14=>!_0x395e14)]},'children':[{'text':_0x113ff5['to']('isNavigationMode',_0x11ba93=>_0x11ba93?pt(_0x583677,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x583677,'Total')+':\x20')}]},{'text':_0x113ff5['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1aca70,_0x38b529]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x3bf7c2{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x594c4d=this['editor']['editing']['view'];_0x594c4d['change'](_0x589eba=>{for(const _0x36dc1a of _0x594c4d['document']['roots'])_0x589eba['addClass'](Pt,_0x36dc1a);});}['hide'](){const _0x93bdb4=this['editor']['editing']['view'];_0x93bdb4['change'](_0x199b52=>{for(const _0x413640 of _0x93bdb4['document']['roots'])_0x199b52['removeClass'](Pt,_0x413640);});}},Lt=class extends _0x3bf7c2{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt,Ut];}init(){const _0x39426b=this['editor'],_0x488ade=_0x39426b['plugins']['get'](Mt),_0x3b7332=_0x39426b['plugins']['get'](Ut);_0x39426b['ui']['componentFactory']['add']('exitToEditing',_0x25fc94=>{const _0x276477=new _0x2fc172(_0x25fc94);return _0x276477['set']({'label':pt(_0x25fc94,'Back\x20to\x20editing'),'icon':_0x27ad47,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x276477,'execute',()=>{_0x39426b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x276477;}),_0x39426b['ui']['componentFactory']['add']('restoreRevision',_0x2b1e98=>{const _0x3dc443=new _0x2fc172(_0x2b1e98);return _0x3dc443['set']({'label':pt(_0x2b1e98,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3dc443['bind']('isEnabled')['to'](_0x39426b['commands']['get']('restoreRevision')),this['listenTo'](_0x3dc443,'execute',()=>_0x39426b['execute']('restoreRevision')),_0x3dc443;}),_0x39426b['ui']['componentFactory']['add']('changesNavigation',_0xa44923=>{const _0x548f37=new Ht(_0xa44923),_0x49d861=_0x39426b['commands']['get']('showPreviousChange'),_0x19d919=_0x39426b['commands']['get']('showNextChange');return _0x548f37['bind']('isBackwardNavigationEnabled')['to'](_0x49d861,'isEnabled'),_0x548f37['bind']('isForwardNavigationEnabled')['to'](_0x19d919,'isEnabled'),_0x548f37['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x488ade),this['listenTo'](_0x548f37,'execute',(_0x4b25c7,_0x360abd)=>{_0x39426b['execute']('forward'===_0x360abd?'showNextChange':'showPreviousChange');}),_0x548f37;}),_0x3b7332['show'](),_0x488ade['on']('change:isReady',(_0x524bc3,_0x50a309,_0x2bba43)=>{_0x2bba43?_0x3b7332['hide']():_0x3b7332['show']();});}},Ft=class extends _0x3d2f09{['_resizeObserver']=null;constructor(_0x2b451b,_0x2982f1){super(_0x2b451b,_0x2982f1);const _0x57a06a=this['bindTemplate'];this['set']({'label':pt(_0x2b451b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x2b451b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x57a06a['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1097fd(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x50cdc3=this['fieldView']['element'];this['_tooltipString']=_0x50cdc3['scrollWidth']>_0x50cdc3['clientWidth']&&_0x50cdc3['value']||'';}},$t=class extends at{constructor(_0xca1808,_0x3f6416,_0x310b03){super(_0xca1808);const _0xa42b2c=new _0x10e7c7();_0xa42b2c['set']({'content':_0x5a257d,'viewBox':'0\x200\x2011\x2010'});const _0x34120e=['ck','ck-revision-history-sidebar__revision-author'];_0x310b03&&_0x34120e['push']('ck-revision-history-sidebar__revision-author_creator');const _0x54ca1e=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0xca1808,_0x310b03?'Revision\x20creator':'Revision\x20author')},'children':[_0xa42b2c,_0x3f6416['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x34120e},'children':_0x54ca1e});}};function jt(_0x11ed1e,_0x53083f){const _0x48c092=_0x11ed1e['bindTemplate'],_0x273ebd=_0x11ed1e['locale'],_0xf30cf4=ct(_0x273ebd);_0xf30cf4['panelPosition']='sw';const _0x4e057b=function(_0xbbeda2,_0x3b184e){const _0x1202d4=function(_0x48a42a,_0x17652f){const _0x4a95ba=_0x48a42a['locale'],_0x8947ab={'Compare\x20against\x20selected':pt(_0x4a95ba,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x4a95ba,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x4a95ba,'Restore\x20this\x20revision')};return _0x17652f['map'](_0x5eeffd=>{const _0x22868b=_0x8947ab[_0x5eeffd['name']];return _0x22868b&&_0x22868b!==_0x5eeffd['name']&&(_0x5eeffd['name']=_0x22868b),_0x5eeffd;});}(_0xbbeda2,_0x3b184e),_0x37cc4b=new _0x15d7e8();for(const _0x1a808d of _0x1202d4){const _0x256215={'type':'button','model':new rt({'label':_0x1a808d['name'],'class':_0x1a808d['class'],'withText':!0x0,'role':'menuitem','_action':_0x1a808d['action']})};_0x256215['model']['bind']('isEnabled')['to'](_0xbbeda2,'isActionsDropdownOpen',_0x4548ef=>'function'!=typeof _0x1a808d['isEnabled']||(!_0x4548ef||_0x1a808d['isEnabled'](_0xbbeda2))),_0x37cc4b['add'](_0x256215);}return _0x37cc4b;}(_0x11ed1e,_0x53083f);return _0x11ed1e['bind']('isActionsDropdownOpen')['to'](_0xf30cf4,'isOpen'),_0xf30cf4['buttonView']['set']({'label':pt(_0x273ebd,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x34bdf8}),_0xf30cf4['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x48c092['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x48c092['to'](_0xe4c187=>_0xe4c187['stopPropagation']())}}),_0xf30cf4['on']('execute',_0x5d0f39=>{_0x11ed1e['isReady']&&'function'==typeof _0x5d0f39['source']['_action']&&_0x5d0f39['source']['_action'](_0x11ed1e);}),ht(_0xf30cf4,_0x4e057b,{'role':'menu'}),_0xf30cf4['listenTo'](_0x11ed1e,'change:isActionsDropdownOpen',(_0x2a4828,_0x5f42de,_0x3aefaa)=>{if(_0x3aefaa)for(const _0x597877 of _0xf30cf4['listView']['items']){const _0x23fa87=_0x597877['children']['first'],_0x3abfef=_0x53083f['find'](_0x2d5e2d=>_0x2d5e2d['action']===_0x23fa87['_action'])['isVisible'];_0x597877['isVisible']=void 0x0===_0x3abfef||_0x3abfef(_0x11ed1e);}}),_0xf30cf4;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x5234db,Collection as _0x4a1e3f,ElementReplacer as _0xa15115,FocusTracker as _0xf10848,KeystrokeHandler as _0x43e974,ObservableMixin as _0x43b55f,ResizeObserver as _0x2261be,logWarning as _0x48ed8f,scrollViewportToShowTarget as _0x2382f3,uid as _0xb49d28}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x38b022,isEqual as _0x273684,set as _0x41ae1f,unset as _0x240de0}from'es-toolkit/compat';import{Command as _0x29f6e0,Editor as _0xd42421,ElementApiMixin as _0x4842fe,PendingActions as _0x488f20,Plugin as _0x57c795}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x5d1660,Users as _0x3e15a4,getMarkerDomElement as _0x4a37b2,sanitizeEditorConfig as _0x2d8a3c}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0xdc5c7c,ModelElement as _0x8d1ceb,ModelPosition as _0x1a4c85,ModelRange as _0x26b117,ModelText as _0x1ad521,ViewAttributeElement as _0x4525a0,ViewContainerElement as _0x2fdda5,ViewDocumentFragment as _0x3b5424,ViewElement as _0x17ffd0,ViewEmptyElement as _0x3cc4cb,ViewRawElement as _0x85adaa,ViewText as _0x5d7152,ViewUIElement as _0x49300b}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x4eb334,IconChevronUp as _0x70c06a,IconHistory as _0x116443,IconThreeVerticalDots as _0x482ded,IconUndo as _0x3ba824,IconUser as _0x51cd25}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x3b2c1e,ButtonView as _0x112eb0,ContextualBalloon as _0x1329e2,CssTransitionDisablerMixin as _0x59bd54,EditorUI as _0x3893d1,IconView as _0x56e938,InlineEditableUIView as _0x4c416b,LabeledFieldView as _0xd50028,ListItemView as _0x283521,ListView as _0x4fa40b,MenuBarMenuListItemButtonView as _0x5782cb,MenuBarMenuListItemView as tt,MenuBarMenuListView as it,MenuBarMenuView as et,StickyPanelView as st,ToolbarSeparatorView as nt,ToolbarView as ot,UIModel as rt,View as at,addListToDropdown as ht,createDropdown as ct,createLabeledInputText as lt,normalizeToolbarConfig as ut,submitHandler as dt}from'@ckeditor/ckeditor5-ui';import{DateTime as ft}from'luxon';const vt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x43b55f();var gt=class extends vt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x424454){super(),this['id']=_0x424454['id']||_0xb49d28(),this['creator']=_0x424454['creator']||null,this['authors']=_0x424454['authors']||[],this['diffData']=_0x424454['diffData']||null,this['toVersion']=_0x424454['toVersion']||0x0,this['fromVersion']=_0x424454['fromVersion']||0x0,this['set']('name',_0x424454['name']||''),this['set']('createdAt',_0x424454['createdAt']||new Date()),this['set']('attributes',_0x424454['attributes']||{});}setName(_0x1bdd46){this['_update']({'name':_0x1bdd46});}setAttribute(_0x475206,_0x5e1772){const _0x258a1c=_0x38b022(this['attributes']);_0x41ae1f(_0x258a1c,_0x475206,_0x5e1772),this['_update']({'attributes':_0x258a1c});}removeAttribute(_0x503e6c){const _0x823e3=_0x38b022(this['attributes']);_0x240de0(_0x823e3,_0x503e6c),this['_update']({'attributes':_0x823e3});}_update(_0x3f9be5,_0x59e30=!0x1){let _0x413114=!0x1;const _0x472082={'id':this['id']};for(const _0x5e4fe1 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x26101e=_0x3f9be5[_0x5e4fe1];void 0x0!==_0x26101e&&_0x26101e!==this[_0x5e4fe1]&&(this[_0x5e4fe1]=_0x26101e,_0x472082[_0x5e4fe1]=_0x26101e,_0x413114=!0x0);}_0x413114&&(_0x472082['authors']&&(_0x472082['authorsIds']=_0x472082['authors']['map'](_0x5cb43e=>_0x5cb43e['id']),delete _0x472082['authors']),this['fire']('_update',_0x472082,_0x59e30));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x432f91=>_0x432f91['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x57c795{['_revisions'];static get requires(){return[_0x3e15a4];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x4790a1){super(_0x4790a1),this['_revisions']=new _0x4a1e3f();}afterInit(){!async function(_0x122ad0){const _0x3a8cce='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x316ef8=0xeb829,_0x2365d8=0x79158,_0xd87f38=window['Date']['now'](),_0x56e427=_0x122ad0['editor'],_0x20ead9=new window['Promise'](_0x1a2036=>{_0x56e427['once']('ready',_0x1a2036);}),_0x45ffbd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x461742=_0x56e427['config']['get']('licenseKey');async function _0x1d9271(){let _0xa5b407,_0x2c6b1d=null,_0x5a2f29=null;try{return'GPL'==_0x461742?'NotAllowed':(_0xa5b407=_0x3eb31f(),_0xa5b407?(_0xa5b407['usageEndpoint']&&(_0x5a2f29=_0x2de707(_0xa5b407['usageEndpoint'],_0xa5b407['jti'])),await _0x1a0c3e()?_0xa74293()?_0x576d60()?'Expired':_0x3116c0()?('evaluation'==_0xa5b407['licenseType']&&(_0x2c6b1d=_0x2adcd6('EvaluationLimit')),await _0x46acd8()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x576d60(){const _0x4543f4=['evaluation','trial']['includes'](_0xa5b407['licenseType'])?_0xd87f38/0x3e8:0xe10*_0x2365d8;return _0xa5b407['exp']<_0x4543f4;}function _0xa74293(){const _0x4b2e96=_0xa5b407['features'];if(!_0x4b2e96)return!0x1;if(_0x4b2e96['includes']('*'))return!0x0;if(_0x4b2e96['includes']('RH'))return!0x0;if(_0x4b2e96['includes']('RRH')){if(_0x5c1703())return!0x0;if(_0x1ac10f()||_0x24696c())return!0x0;}return!0x1;}function _0x3116c0(){const _0x3196da=_0xa5b407['licensedHosts'];if(!_0x3196da||0x0==_0x3196da['length'])return!0x0;const {hostname:_0x290c56}=new URL(window['location']['href']);if(_0x3196da['includes'](_0x290c56))return!0x0;const _0x4e4ecf=_0x290c56['split']('.');return _0x3196da['filter'](_0x5ed869=>_0x5ed869['includes']('*'))['map'](_0x5451a6=>_0x5451a6['split']('.'))['filter'](_0x4eb6b7=>_0x4eb6b7['length']<=_0x4e4ecf['length'])['map'](_0x34f33b=>Array(_0x4e4ecf['length']-_0x34f33b['length'])['fill']('*'===_0x34f33b[0x0]?'*':'')['concat'](_0x34f33b))['some'](_0x517650=>_0x4e4ecf['every']((_0x494952,_0x19e81b)=>_0x517650[_0x19e81b]===_0x494952||'*'===_0x517650[_0x19e81b]));}function _0x46acd8(){return _0x2c6b1d&&_0x5a2f29?new window['Promise']((_0x583943,_0x3e5ee8)=>{_0x2c6b1d['then'](_0x583943,_0x3e5ee8),_0x5a2f29['then'](_0x25ecac=>{'Valid'!=_0x25ecac&&_0x583943(_0x25ecac);},_0x3e5ee8);}):_0x2c6b1d||_0x5a2f29||'Valid';}}function _0x2de707(_0x52257a,_0x11cd41){return new window['Promise'](_0x41ffbb=>{if(_0x524dee())return _0x41ffbb('Valid');_0xbcfa57(),_0x56e427['decorate']('_sendUsageRequest');let _0x54ebf1=!0x1;const _0x186abd=_0xb49d28();function _0x3743ec(_0x932f63){return!!_0x932f63&&('object'==typeof _0x932f63||'function'==typeof _0x932f63)&&'function'==typeof _0x932f63['then']&&'function'==typeof _0x932f63['catch'];}function _0x382a23(_0x3619b8){_0x4779d0(_0x3619b8)['then'](_0x1a02c9=>_0x1a02c9&&'ok'==_0x1a02c9['status']?_0x24778e(_0x58bc68(_0x186abd+_0x11cd41))!=_0x1a02c9['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x35ffe8=>(_0xc7520(),_0x35ffe8),()=>{const _0x246cdf=_0x2f93c4();return null==_0x246cdf?(_0xc7520(),'Valid'):_0xd87f38-_0x246cdf>0x240c8400?'UsageLimit':'Valid';})['then'](_0x41ffbb)['catch'](()=>{_0x41ffbb('UsageLimit');});const _0x302585=0x36ee80;function _0xc7520(){const _0x23a5f5='llct-'+_0x24778e(_0x58bc68(_0x52257a)),_0x4aa14a=_0x13a69b(_0x24778e(window['Math']['ceil'](_0xd87f38/_0x302585)));window['localStorage']['setItem'](_0x23a5f5,_0x4aa14a);}function _0x2f93c4(){const _0x3ad23e='llct-'+_0x24778e(_0x58bc68(_0x52257a)),_0xcd6bd7=window['localStorage']['getItem'](_0x3ad23e);return _0xcd6bd7?window['parseInt'](_0x13a69b(_0xcd6bd7),0x10)*_0x302585:null;}function _0x4779d0(_0x341407){return new window['Promise']((_0x5125a6,_0x317354)=>{_0x341407['then'](_0x5125a6,_0x317354),window['setTimeout'](_0x317354,0x1d4c0);});}}_0x56e427['on']('_sendUsageRequest',(_0x5c4367,_0x4b5b61)=>{if(_0x4b5b61[0x0]!=_0x52257a)return _0x41ffbb('UsageLimit');_0x4b5b61[0x1]={..._0x4b5b61[0x1],'requestId':_0x186abd};},{'priority':'high'}),_0x56e427['on']('_sendUsageRequest',_0x5570ea=>{_0x3743ec(_0x5570ea['return'])&&(_0x54ebf1=!0x0,_0x382a23(_0x5570ea['return']));},{'priority':'low'}),_0x20ead9['then'](()=>{_0x54ebf1||_0x41ffbb('UsageLimit');});});function _0x524dee(){return'auto'==_0x56e427['editing']['view']['_overlayModeHint'];}function _0xbcfa57(){_0x56e427['editing']['view']['_overlayModeHint']='auto';}}function _0x2adcd6(_0x371d19){const _0x211fbb=[new window['Promise'](_0x485b51=>setTimeout(_0x485b51,0x93ecc)),_0x20ead9['then'](()=>new window['Promise'](_0x4dbd60=>{const _0x1abda4=0x7,_0x319491=_0x122ad0['_revisions'];function _0x299060(){_0x319491['length']>=_0x1abda4&&_0x4dbd60();}_0x299060(),_0x319491['on']('add',_0x299060);})),new window['Promise'](_0x1ad441=>{function _0x25e352(){for(const _0x8faf23 in window)if(window['Number']['isNaN'](window['Number'](_0x8faf23))&&window[_0x8faf23]==_0x316ef8)return _0x1ad441();'destroyed'!=_0x56e427['state']&&window['setTimeout'](_0x25e352,0x1388);}_0x8a0de6('RevisionViewer')&&_0x25e352();})];return window['Promise']['race'](_0x211fbb)['then'](()=>_0x371d19);}async function _0x106f13(){if(await _0x20ead9,_0x8a0de6('RevisionViewer')){const _0x5bac92=_0x122ad0['getRevision'](0x0),_0x49a835=_0x122ad0['getEarlierVisibleRevision'](_0x5bac92['id']),_0x3ac73b=_0x43a0b2('RevisionViewer');return await _0x3ac73b['compare'](_0x5bac92['id'],_0x49a835?_0x49a835['id']:null,!0x0),_0x3ac73b['unbind']('isEnabled'),_0x3ac73b['isEnabled']=!0x1,_0x3ac73b['compare']=_0x333146,void(_0x3ac73b['_getDiff']=_0x333146);}if(_0x8a0de6('RevisionTracker')){const _0x4f2c7f=_0x43a0b2('RevisionTracker');_0x4f2c7f['unbind']('isEnabled'),_0x4f2c7f['isEnabled']=!0x1,_0x4f2c7f['update']=_0x333146,_0x4f2c7f['saveRevision']=_0x333146;}_0x56e427['model']['change']=_0x333146,_0x56e427['model']['enqueueChange']=_0x333146,_0x56e427['enableReadOnlyMode']('model');}function _0x5c1703(){return _0x8a0de6('WebSocketGateway')&&'connected'==_0x43a0b2('WebSocketGateway')['state'];}function _0x1ac10f(){return _0x8a0de6('RevisionViewerIntegration');}function _0x24696c(){return _0x8a0de6('TrackChangesDataGetter');}function _0x1f096f(_0x17ac49){const _0x1e39f0=_0x1c9482();_0x56e427[_0x1e39f0]='revisionHistoryLicenseKey'+_0x17ac49,_0x17ac49['endsWith']('Limit')&&(window[_0x1c9482()]=_0x316ef8),'Valid'!=_0x17ac49&&_0x106f13();}function _0x1c9482(){const _0x555c88=window['String'](window['performance']['now']())['replace']('.','');let _0x4dc4f9='v';for(let _0x89e78d=0x0;_0x89e78d<_0x555c88['length'];_0x89e78d+=0x2){let _0x1fe753=window['parseInt'](_0x555c88['substring'](_0x89e78d,_0x89e78d+0x2));_0x1fe753>=0x3e&&(_0x1fe753-=0x3e),_0x4dc4f9+=_0x3a8cce[_0x1fe753];}return _0x4dc4f9;}function _0x3eb31f(){const _0x4fa34d=_0x461742['split']('.');if(0x3!=_0x4fa34d['length'])return null;return _0x460d7b(_0x4fa34d[0x1]);function _0x460d7b(_0x2e4017){const _0x53bb1a=_0x10ee65(_0x2e4017);return _0x53bb1a&&_0x2fa2f8()?_0x53bb1a:null;function _0x2fa2f8(){const _0x2c1709=_0x53bb1a['jti'],_0x3986e4=window['parseInt'](_0x2c1709['substring'](_0x2c1709['length']-0x8),0x10),_0x2805fc={..._0x53bb1a,'jti':_0x2c1709['substring'](0x0,_0x2c1709['length']-0x8)};return delete _0x2805fc['vc'],_0x58bc68(_0x2805fc)==_0x3986e4;}}}async function _0x1a0c3e(){let _0x278111=!0x0;try{const [_0x2a7970,_0x4ab4d5,_0x157676]=_0x461742['split']('.');return _0x4a108a(_0x2a7970),await _0x6705bf(_0x2a7970,_0x4ab4d5,_0x157676),_0x278111;}catch{return!0x1;}function _0x4a108a(_0x2563cb){const _0x1d18cd=_0x10ee65(_0x2563cb);_0x1d18cd&&'ES256'==_0x1d18cd['alg']||(_0x278111=!0x1);}async function _0x6705bf(_0xd20c1b,_0x372159,_0x2ba61b){const _0xf0aa95=window['Uint8Array']['from'](_0x49fa8f(_0x2ba61b),_0x5d93ba=>_0x5d93ba['charCodeAt'](0x0)),_0x44d6f5=new window['TextEncoder']()['encode'](_0xd20c1b+'.'+_0x372159),_0x55a4c6=window['crypto']['subtle'];if(!_0x55a4c6)return;const _0x1ed171=await _0x55a4c6['importKey']('jwk',_0x45ffbd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x55a4c6['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x1ed171,_0xf0aa95,_0x44d6f5)||(_0x278111=!0x1);}}function _0x10ee65(_0x1bc92a){return _0x1bc92a['startsWith']('ey')?JSON['parse'](_0x49fa8f(_0x1bc92a)):null;}function _0x49fa8f(_0x5f4511){return window['atob'](_0x5f4511['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x58bc68(_0x371d35){let _0x39693f=0x1505;function _0x31023f(_0x3501ee){for(let _0x1e178d=0x0;_0x1e178d<_0x3501ee['length'];_0x1e178d++){const _0x82f256=_0x3501ee['charCodeAt'](_0x1e178d);_0x39693f=(_0x39693f<<0x5)+_0x39693f+_0x82f256,_0x39693f&=_0x39693f;}}function _0x2c288b(_0x375d5f){Array['isArray'](_0x375d5f)?_0x375d5f['forEach'](_0x2c288b):_0x375d5f&&'object'==typeof _0x375d5f?Object['entries'](_0x375d5f)['sort']()['forEach'](([_0x12d543,_0x13ff05])=>{_0x31023f(_0x12d543),_0x2c288b(_0x13ff05);}):_0x31023f(window['String'](_0x375d5f));}return _0x2c288b(_0x371d35),_0x39693f>>>0x0;}function _0x24778e(_0x2ac054){return _0x2ac054['toString'](0x10)['padStart'](0x8,'0');}function _0x13a69b(_0x5f0a56){return _0x5f0a56['split']('')['reverse']()['join']('');}function _0x8a0de6(_0x5d4cbd){return _0x56e427['plugins']['has'](_0x5d4cbd);}function _0x43a0b2(_0x303793){return _0x56e427['plugins']['get'](_0x303793);}function _0x333146(){}_0x1f096f(await _0x1d9271());}(this);}createRevision(_0x4974b0){const _0x2c82ec=this['editor']['plugins']['get']('Users');return new gt({'id':_0x4974b0['id'],'name':_0x4974b0['name'],'creator':_0x4974b0['creatorId']?_0x2c82ec['getUser'](_0x4974b0['creatorId']):null,'diffData':_0x4974b0['diffData']||_0x4974b0['data'],'authors':_0x4974b0['authorsIds']['map'](_0x1c915f=>_0x2c82ec['getUser'](_0x1c915f)),'createdAt':new Date(_0x4974b0['createdAt']),'attributes':_0x4974b0['attributes'],'fromVersion':_0x4974b0['fromVersion'],'toVersion':_0x4974b0['toVersion']});}['addRevision'](_0x2436ee,_0x56b6b1=0x0){this['_revisions']['add'](_0x2436ee,_0x56b6b1);}getRevision(_0x366eb4){return this['_revisions']['get'](_0x366eb4);}getRevisions(_0x2b2603={'toJSON':!0x1}){const _0x774d4a=Array['from'](this['_revisions']);return _0x774d4a['reverse'](),_0x2b2603['toJSON']?_0x774d4a['map'](_0x3aa120=>_0x3aa120['toJSON']()):_0x774d4a;}getIndex(_0x233fba){return this['_revisions']['getIndex'](_0x233fba);}getEarlierVisibleRevision(_0x237c81){const [,_0x27d9f1]=this['getRevisionsIterator'](_0x237c81,{'direction':'earlier'});return _0x27d9f1;}getLaterVisibleRevision(_0x5b8dd2){const [,_0x8d3690]=this['getRevisionsIterator'](_0x5b8dd2,{'direction':'later'});return _0x8d3690;}getRevisionsInDiff(_0x461bdb){const _0x248ec8=[];for(const _0x354e49 of this['getRevisionsIterator'](_0x461bdb['newRevisionId']))if(_0x248ec8['push'](_0x354e49),_0x354e49['id']===_0x461bdb['oldRevisionId'])break;return _0x248ec8;}*getRevisionsIterator(_0x33bd82,{direction:_0x2c7a2f='earlier',filter:_0x5d05f0=()=>!0x0}={}){const _0x41e705='earlier'===_0x2c7a2f?0x1:-0x1;let _0xf78a4c=this['_revisions']['get'](_0x33bd82),_0x39f42e=this['getIndex'](_0xf78a4c);for(yield _0xf78a4c;_0xf78a4c;){if(_0x39f42e+=_0x41e705,_0xf78a4c=this['getRevision'](_0x39f42e),!_0xf78a4c)return;_0x5d05f0(_0xf78a4c)&&(yield _0xf78a4c);}}},wt=class extends _0x57c795{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2fdda5,'c'],[_0x4525a0,'a'],[_0x3cc4cb,'e'],[_0x85adaa,'r'],[_0x49300b,'u']]);_typeCharToViewClass=new Map([['c',_0x2fdda5],['a',_0x4525a0],['e',_0x3cc4cb],['r',_0x85adaa],['u',_0x49300b]]);async loadRevisionData(_0x1a573f,_0x1b8ddd){if(_0x1a573f['diffData']||!_0x1b8ddd)return;const _0x53158d=this['editor']['config']['get']('collaboration.channelId');_0x1a573f['diffData']=(await _0x1b8ddd['getRevision']({'channelId':_0x53158d,'revisionId':_0x1a573f['id']}))['diffData'];}getRevisionDocumentData(_0x571ec2){const _0xbdce3b={};for(const _0x1390cf in _0x571ec2['diffData']){if(_0x571ec2['diffData'][_0x1390cf]['attachChange']&&!_0x571ec2['diffData'][_0x1390cf]['attachChange']['isAttached'])continue;const _0x3bbb16=this['_removeRevisionMarkers'](JSON['parse'](_0x571ec2['diffData'][_0x1390cf]['insertions'])),_0x1a8287=this['editor']['editing']['view']['document'],_0x35db5e=new _0x3b5424(_0x1a8287,_0x3bbb16['map'](_0x548fb7=>this['_getViewFromDiffObj'](_0x548fb7,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xbdce3b[_0x1390cf]=this['editor']['data']['processor']['toData'](_0x35db5e),this['editor']['data']['processor']['useFillerType']('default');}return _0xbdce3b;}getRevisionRootsAttributes(_0x8a0abf){const _0x70f1f9={};for(const _0x50c2d0 in _0x8a0abf['diffData'])_0x8a0abf['diffData'][_0x50c2d0]['attachChange']&&!_0x8a0abf['diffData'][_0x50c2d0]['attachChange']['isAttached']||(_0x70f1f9[_0x50c2d0]=_0x8a0abf['diffData'][_0x50c2d0]['attributesAfter']||{});return _0x70f1f9;}getRevisionRootsModelElements(_0x139dc8){const _0x1ad5bc={};for(const _0x4b8375 in _0x139dc8['diffData']){if(_0x139dc8['diffData'][_0x4b8375]['attachChange']&&!_0x139dc8['diffData'][_0x4b8375]['attachChange']['isAttached'])continue;const _0xb522ec=_0x139dc8['diffData'][_0x4b8375]['rootElementName'];_0xb522ec&&(_0x1ad5bc[_0x4b8375]=_0xb522ec);}return _0x1ad5bc;}_getTypeCharForViewElement(_0x54a31c){return this['_viewClassToTypeChar']['get'](_0x54a31c['constructor']);}_getViewFromDiffObj(_0x31b2ee,_0x3ce787){const _0xe3a86e=this['editor']['editing']['view']['document'];if('string'==typeof _0x31b2ee)return new _0x5d7152(_0xe3a86e,_0x31b2ee);{let _0x2654ba,_0x17f99b;_0x17f99b='u'==_0x31b2ee['type']||'r'==_0x31b2ee['type']?[]:_0x31b2ee['children']['map'](_0x2fd176=>this['_getViewFromDiffObj'](_0x2fd176,_0x3ce787));const _0x353197=this['_typeCharToViewClass']['get'](_0x31b2ee['type'])||_0x17ffd0,_0x47b992=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2654ba=new _0x353197(_0xe3a86e,_0x31b2ee['name'],_0x31b2ee['attributes'],_0x17f99b),'u'==_0x31b2ee['type']&&_0x31b2ee['children'][0x0]){const _0x22602a=_0x31b2ee['children'][0x0];if(_0x2654ba['render']=function(_0x6e3bdf){const _0x56fb02=_0x6e3bdf['createElement']('div');return _0x56fb02['innerHTML']=_0x22602a,_0x56fb02['childNodes'][0x0];},_0x3ce787){const _0x57b23f=new _0x3b5424(_0xe3a86e);_0x57b23f['_appendChild'](_0x2654ba);const _0x4b9a31=Array['from'](_0x47b992['viewChildrenToDom'](_0x57b23f,{'bind':!0x1})),_0x4b558d=_0x47b992['domDocument']['createElement']('div');_0x4b558d['append'](..._0x4b9a31),_0x2654ba=Array['from'](_0x47b992['domChildrenToView'](_0x4b558d))[0x0];}}else{if('r'==_0x31b2ee['type']&&_0x31b2ee['children'][0x0]){const _0x550beb=_0x31b2ee['children'][0x0];if(_0x2654ba['render']=function(_0x1bfd04){_0x1bfd04['innerHTML']=_0x550beb;},_0x3ce787){const _0xfd9f0=new _0x3b5424(_0xe3a86e);_0xfd9f0['_appendChild'](_0x2654ba);const _0x4944d7=Array['from'](_0x47b992['viewChildrenToDom'](_0xfd9f0,{'bind':!0x1})),_0x1f3aee=_0x47b992['domDocument']['createElement']('div');_0x1f3aee['append'](..._0x4944d7);const _0x55c011=Array['from'](_0x47b992['domChildrenToView'](_0x1f3aee));_0x55c011['length']>0x1?_0x2654ba['_appendChild'](_0x55c011):_0x2654ba=_0x55c011[0x0];}}}if(_0x31b2ee['customProperties']){for(const [_0x29d12d,_0x2d138f]of _0x31b2ee['customProperties'])_0x2654ba['_setCustomProperty'](_0x29d12d,_0x2d138f);}const _0x25ee4a=void 0x0===_0x31b2ee['fillerOffset']?null:_0x31b2ee['fillerOffset'];return null!==_0x25ee4a&&(_0x2654ba['getFillerOffset']=()=>_0x25ee4a),_0x2654ba;}}_makeModelFromViewString(_0x25ba26,_0x586936){const _0x274064=JSON['parse'](_0x25ba26),_0x4136f9=this['editor']['editing']['view']['document'],_0x47af0b=new _0x3b5424(_0x4136f9,_0x274064['map'](_0x40e7ea=>this['_getViewFromDiffObj'](_0x40e7ea,!0x0))),_0x1eec51=this['editor']['data']['toModel'](_0x47af0b,_0x586936);return _0x1eec51['name']=_0x586936,_0x1eec51;}['_removeRevisionMarkers'](_0x328106){return(_0x328106=_0x328106['filter'](_0x22473a=>!_0x22473a['name']||'revision-start'!==_0x22473a['name']&&'revision-end'!==_0x22473a['name']))['forEach'](_0xdf8ffd=>{'string'!=typeof _0xdf8ffd&&(_0xdf8ffd['children']=this['_removeRevisionMarkers'](_0xdf8ffd['children']),_0xdf8ffd['attributes']=_0xdf8ffd['attributes']['filter'](_0x23f146=>!_0x23f146[0x0]['startsWith']('data-revision-')));}),_0x328106;}};function pt(_0xebccf,_0x190423,_0x248b53){const t=_0xebccf['t'];switch(_0x190423){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'},_0x248b53);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x248b53);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}var _t=class extends _0x57c795{['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[_0x3e15a4,mt,wt,_0x488f20];}constructor(_0x50968a){super(_0x50968a),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x52a409=_0xb49d28();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x52a409},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 _0x1fc8e2=this['repository']['getRevision'](0x0),_0x3fec8b=_0x1fc8e2&&null===_0x1fc8e2['creator']?_0x1fc8e2:null;if(this['_continueCurrentRevision']=!!_0x3fec8b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x150335=this['_source']['getCurrentRevisionId'](),_0x122336=this['repository']['getRevision'](_0x150335);if(_0x122336)this['_startingVersion']=_0x122336['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x382d0d=this['_source']['history']['_operations']['find'](_0x3a811c=>!_0x3a811c['_isInit']),_0x11bd42=_0x382d0d?_0x382d0d['baseVersion']:this['_source']['history']['version'];_0x1fc8e2?(_0x1fc8e2['toVersion']<_0x11bd42&&_0x1fc8e2['_update']({'toVersion':_0x11bd42}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3fec8b['id'],this['_startingVersion']=_0x3fec8b['fromVersion']):(this['_startingVersion']=_0x1fc8e2['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x11bd42,this['_continueCurrentRevision']=!0x1);}}else _0x3fec8b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3fec8b['toVersion'],this['editor']['model']['document']['history']['version']),_0x3fec8b['fromVersion']===_0x3fec8b['toVersion']?(0x0!==_0x3fec8b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3fec8b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3fec8b['id'],this['_startingVersion']=_0x3fec8b['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',_0x563b4e=>!_0x563b4e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x47298a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4c4af5;for(const _0x2b28f7 in _0x47298a){const _0x4b4a5f=_0x2b28f7,_0x17ffc4=_0x47298a[_0x4b4a5f];if('revisionHistoryLicenseKeyValid'==_0x17ffc4||'revisionHistoryLicenseKeyInvalid'==_0x17ffc4||'revisionHistoryLicenseKeyExpired'==_0x17ffc4||'revisionHistoryLicenseKeyDomainLimit'==_0x17ffc4||'revisionHistoryLicenseKeyNotAllowed'==_0x17ffc4||'revisionHistoryLicenseKeyEvaluationLimit'==_0x17ffc4||'revisionHistoryLicenseKeyUsageLimit'==_0x17ffc4){delete _0x47298a[_0x4b4a5f],_0x4c4af5=_0x17ffc4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4c4af5&&_0x47298a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4c4af5&&_0x47298a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4c4af5&&_0x47298a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4c4af5&&_0x47298a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4c4af5&&_0x47298a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4c4af5&&_0x47298a['_showLicenseError']('usageLimit');},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x5a437b=this['repository']['getRevision'](0x0),_0x1b25c7=await this['getRevisionDocumentData'](_0x5a437b),_0x1c030f=await this['getRevisionRootsAttributes'](_0x5a437b),_0x482223=this['_utils']['getRevisionRootsModelElements'](_0x5a437b);this['_replaceEditorDataWithRevisionData'](_0x1b25c7,_0x1c030f,_0x482223);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x451dbc){this['_source']=_0x451dbc;}async update(){const _0x22cae1=await this['_source']['getLatestVersion']();if(_0x22cae1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x384d9c=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x22cae1});_0x384d9c['authors']=_0x384d9c['authorsIds']['map'](_0x396529=>this['editor']['plugins']['get']('Users')['getUser'](_0x396529)),this['currentRevision']['_update'](_0x384d9c);}}async['saveRevision'](_0x3e61f4={},_0x564c33=null){const _0x40d76d=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x564c33>this['currentRevision']['toVersion']&&(_0x564c33=null),null===_0x564c33&&(_0x564c33=await this['_source']['getLatestVersion']());const _0x409f52=this['_getFromVersion'](_0x564c33),_0x458960=this['buildRevisionData']({'from':_0x409f52,'to':_0x564c33});if(this['currentRevision']['toVersion']<_0x564c33){const _0x51664b=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x564c33,'to':_0x564c33});_0x51664b['authors']=[],_0x51664b['authorsIds']=[],_0x51664b['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x51664b,!0x0),delete _0x51664b['authors'],_0x40d76d['push'](_0x51664b);}_0x3e61f4['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x3e61f4['name']=_0x3e61f4['name']||null,_0x3e61f4['id']=_0x3e61f4['id']||_0xb49d28(),_0x3e61f4={..._0x3e61f4,..._0x458960};const _0x58ecc8=this['addRevisionData'](_0x3e61f4);_0x40d76d['push'](_0x3e61f4);const _0x5050f9=this['repository']['getIndex'](_0x58ecc8);if(0x0!==_0x5050f9){const _0x360a68=this['repository']['getRevision'](_0x5050f9-0x1);if(_0x360a68['fromVersion']!==_0x564c33){const _0x420510=this['_revisionDataBuilder']['getData'](_0x564c33,_0x360a68['toVersion']),_0x587dca={'id':_0x360a68['id'],'diffData':_0x420510['diffData'],'authorsIds':_0x420510['authorsIds'],'authors':_0x420510['authorsIds']['map'](_0x2d7e7d=>this['editor']['plugins']['get']('Users')['getUser'](_0x2d7e7d)),'fromVersion':_0x564c33};_0x360a68===this['currentRevision']&&(_0x587dca['createdAt']=new Date(_0x3e61f4['createdAt']['getTime']()+0xa)),_0x360a68['_update'](_0x587dca,!0x0),delete _0x587dca['authors'],_0x40d76d['push'](_0x587dca);}}if(this['adapter']){for(const _0x948441 of _0x40d76d)this['_bufferUpdate'](_0x948441['id'],_0x948441,!0x0);this['sendBufferedUpdates']();}return _0x58ecc8;}addRevisionData(_0x35b8fa){const _0x17ef1d=this['repository']['createRevision'](_0x35b8fa);return this['adapter']&&_0x17ef1d['on']('_update',(_0x19a07c,_0x2f7a5b,_0x1fe844)=>{_0x1fe844||(this['_bufferUpdate'](_0x2f7a5b['id'],_0x2f7a5b,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x17ef1d,this['_findInsertionIndex'](_0x17ef1d)),_0x17ef1d;}async getRevisionDocumentData(_0x3231ec){return await this['_utils']['loadRevisionData'](_0x3231ec,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3231ec);}async getRevisionRootsAttributes(_0x25b01e){return await this['_utils']['loadRevisionData'](_0x25b01e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x25b01e);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x403956=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x2440a0=0x0;_0x2440a0<_0x403956['length'];_0x2440a0++){const _0xf213c0=_0x403956[_0x2440a0];let _0x471c55=!0x1;for(const _0x2bcd45 of Object['keys'](_0xf213c0))void 0x0===_0xf213c0[_0x2bcd45]?delete _0xf213c0[_0x2bcd45]:'id'!==_0x2bcd45&&(_0x471c55=!0x0);_0x471c55||(_0x403956[_0x2440a0]=null);}if(_0x403956=_0x403956['filter'](_0x19d0f1=>null!==_0x19d0f1),!_0x403956['length'])return;for(let _0x2ca214=0x0;_0x2ca214<_0x403956['length'];_0x2ca214++){const _0x5bffe5=_0x403956[_0x2ca214];void 0x0!==_0x5bffe5['fromVersion']&&void 0x0===_0x5bffe5['toVersion']&&(_0x5bffe5['toVersion']=this['repository']['getRevision'](_0x5bffe5['id'])['toVersion']),void 0x0!==_0x5bffe5['toVersion']&&void 0x0===_0x5bffe5['fromVersion']&&(_0x5bffe5['fromVersion']=this['repository']['getRevision'](_0x5bffe5['id'])['fromVersion']);}const _0xefafcc=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x403956,_0xefafcc)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x355497=>{if(_0x355497){for(const _0x21072c of _0x355497)this['setRevisionData']({'id':_0x21072c['id'],'createdAt':_0x21072c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}buildRevisionData({revision:_0x393bd2=null,from:_0x57075d=null,to:_0x39c59b=null}){_0x57075d=null!==_0x57075d?_0x57075d:_0x393bd2['fromVersion'],_0x39c59b=null!==_0x39c59b?_0x39c59b:_0x393bd2['toVersion'];const _0xd635b7=this['_revisionDataBuilder']['getData'](_0x57075d,_0x39c59b),_0x406fe6={'diffData':_0xd635b7['diffData'],'authorsIds':_0xd635b7['authorsIds'],'fromVersion':_0x57075d,'toVersion':_0x39c59b};if(!_0x393bd2||_0x39c59b!==_0x393bd2['toVersion']){const _0x43c17f=_0x39c59b-0x1,_0x3cecc0=this['_source']['history']['getOperation'](_0x43c17f);_0x406fe6['createdAt']=_0x3cecc0&&_0x3cecc0['createdAt']||new Date();}if(this['_loadedStateData']&&_0x57075d===this['_loadedStateData']['fromVersion']){for(const _0x40e0e5 of this['_loadedStateData']['authors'])_0x406fe6['authorsIds']['includes'](_0x40e0e5['id'])||_0x406fe6['authorsIds']['push'](_0x40e0e5['id']);}return _0x406fe6;}_bufferUpdate(_0x10be0f,_0x511bf5,_0x46327a){if(this['_bufferedUpdates']['has'](_0x10be0f)){const _0x26d208=this['_bufferedUpdates']['get'](_0x10be0f);_0x511bf5=_0x46327a?{..._0x26d208,..._0x511bf5}:{..._0x511bf5,..._0x26d208};}this['_bufferedUpdates']['set'](_0x10be0f,_0x511bf5);}setRevisionData(_0x3a9b21){const _0x2ee026=this['repository']['getRevision'](_0x3a9b21['id']);if(_0x3a9b21['createdAt']&&(_0x3a9b21['createdAt']=new Date(_0x3a9b21['createdAt'])),_0x3a9b21['authorsIds']){const _0x42490b=this['editor']['plugins']['get']('Users');_0x3a9b21['authors']=_0x3a9b21['authorsIds']['map'](_0x3d07a7=>_0x42490b['getUser'](_0x3d07a7));}_0x2ee026['_update'](_0x3a9b21,!0x0);}_createInitialRevision(_0x3b23b2){const _0xf82a68=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xf82a68)this['_initialRevisionId']=_0xf82a68['id'];else{const _0x3cccab=!this['editor']['model']['document']['roots']['find'](_0x3953cb=>this['editor']['model']['hasContent'](_0x3953cb)),_0x464854=this['editor']['plugins']['get']('Users')['me']['id'],_0x5f3e16=pt(this['editor']['locale'],_0x3cccab?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3b23b2,'to':_0x3b23b2,'id':this['_initialRevisionId'],'name':_0x5f3e16,'creatorId':_0x464854});}}_createCurrentRevision(_0x59126a){const _0x64feb=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x64feb),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x59126a,'to':_0x59126a,'id':_0x64feb,'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(_0x4160cd,_0x3b555c,_0x43148a){const _0x20c33f={},_0x40d667={},_0x55d273={},_0x3de260=this['editor']['config']['get']('roots')||{};for(const [_0xdbb740,_0x191b05]of Object['entries'](_0x3de260))_0x191b05['lazyLoad']||(_0x20c33f[_0xdbb740]=_0x191b05['initialData']??'',_0x40d667[_0xdbb740]=_0x191b05['modelAttributes']||{},_0x191b05['modelElement']&&(_0x55d273[_0xdbb740]=_0x191b05['modelElement']));for(const _0x4d6882 of this['editor']['model']['document']['getRootNames']())_0x20c33f[_0x4d6882]??='',_0x40d667[_0x4d6882]??={};let _0x5f2fc9=!0x1;const _0x454c56=Object['keys'](_0x20c33f),_0x4b8e69=Object['keys'](_0x4160cd);for(const _0xdce7ee of _0x454c56){if(_0x20c33f[_0xdce7ee]!==_0x4160cd[_0xdce7ee]&&''!==_0x20c33f[_0xdce7ee]['trim']()){_0x5f2fc9=!0x0;break;}if(!_0x273684(_0x40d667[_0xdce7ee],_0x3b555c[_0xdce7ee])&&Object['keys'](_0x40d667[_0xdce7ee])['length']>0x0){_0x5f2fc9=!0x0;break;}const _0x4838c0=_0x55d273[_0xdce7ee],_0x4c05f4=_0x43148a[_0xdce7ee];if(_0x4838c0&&_0x4c05f4&&_0x4838c0!==_0x4c05f4){_0x5f2fc9=!0x0;break;}}_0x5f2fc9||(_0x5f2fc9=_0x4b8e69['some'](_0x13c669=>!this['editor']['model']['document']['getRoot'](_0x13c669))),_0x5f2fc9&&_0x48ed8f('editor-initial-data-replaced-with-revision-data',{'editorData':_0x20c33f,'editorRootsAttributes':_0x40d667,'editorRootsModelElements':_0x55d273,'revisionData':_0x4160cd,'revisionRootsAttributes':_0x3b555c,'revisionRootsModelElements':_0x43148a});for(const [_0x3adeeb,_0x3e313d]of Object['entries'](_0x4160cd))this['editor']['config']['set']('roots.'+_0x3adeeb+'.initialData',_0x3e313d);for(const [_0x26e07e,_0x89c536]of Object['entries'](_0x3b555c))this['editor']['config']['set']('roots.'+_0x26e07e+'.modelAttributes',_0x89c536);const _0x878068=this['editor']['model']['document'];for(const [_0x431e19,_0x2cc8e6]of Object['entries'](_0x43148a)){this['editor']['config']['set']('roots.'+_0x431e19+'.modelElement',_0x2cc8e6);const _0x191fee=_0x878068['getRoot'](_0x431e19);_0x191fee&&_0x191fee['name']!==_0x2cc8e6&&(_0x878068['roots']['remove'](_0x431e19),_0x878068['createRoot'](_0x2cc8e6,_0x431e19));}}_addPendingAction(){if(!this['_pendingAction']){const _0xfd3504=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0xfd3504['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0xb3b86d){const _0x3cb7b1=this['repository']['getRevisions']();_0x3cb7b1['reverse']();let _0x19cf3c=0x0;for(;_0x19cf3c<_0x3cb7b1['length'];){const _0x1e8ba2=_0x3cb7b1[_0x19cf3c];if(_0x1e8ba2===this['currentRevision']){_0x19cf3c++;continue;}if(_0x1e8ba2['id']===this['_initialRevisionId'])break;const _0x2e5dbd=_0xb3b86d['toVersion']-_0x1e8ba2['toVersion']||_0xb3b86d['fromVersion']-_0x1e8ba2['fromVersion'];if(_0x2e5dbd>0x0)break;if(_0x2e5dbd<0x0)_0x19cf3c++;else{if(!_0xb3b86d['creator']&&_0x1e8ba2['creator'])break;if(_0x1e8ba2['creator']||!_0xb3b86d['creator']){if(_0xb3b86d['createdAt']>_0x1e8ba2['createdAt'])break;_0x19cf3c++;}else _0x19cf3c++;}}return _0x19cf3c;}_getFromVersion(_0x52e2f2){const _0x1b731c=this['repository']['getRevisions']();_0x1b731c['reverse'](),_0x1b731c['shift']();const _0x1c3ae9=_0x1b731c['find'](_0x5b2e8f=>_0x5b2e8f['toVersion']<=_0x52e2f2)['toVersion'];return _0x1c3ae9<this['_startingVersion']?this['_startingVersion']:_0x1c3ae9;}['_makeRevision']({name:_0x2c6c3e,from:_0x4dae6b,to:_0x3360ba,creatorId:_0x5ca308,id:_0x1eb8db}){const _0x4fb26a=this['buildRevisionData']({'from':_0x4dae6b,'to':_0x3360ba});_0x4fb26a['name']=_0x2c6c3e,_0x4fb26a['creatorId']=_0x5ca308,_0x4fb26a['id']=_0x1eb8db;const _0x483bfe=this['addRevisionData'](_0x4fb26a);return this['adapter']&&this['_bufferUpdate'](_0x4fb26a['id'],_0x4fb26a,!0x0),_0x483bfe;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x275b2f){this['editor']=_0x275b2f,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x12be92){this['source']=_0x12be92;const _0x3fb6a8=new Map(),_0x5a34f8=new Map(),_0x1fbe69=this['editor']['model']['document']['roots']['map'](_0x341195=>_0x341195['rootName']);for(const _0x91075b of _0x1fbe69){const _0x5a2a14=this['editor']['model']['document']['getRoot'](_0x91075b),_0x1a8efb=bt(_0x5a2a14);_0x3fb6a8['set'](_0x91075b,_0x1a8efb),_0x5a34f8['set'](_0x91075b,Object['fromEntries'](_0x5a2a14['getAttributes']()));}const _0x2f8954=Array['from'](this['editor']['model']['markers'])['map'](_0x4bb85a=>[_0x4bb85a['name'],_0x4bb85a['getRange']()]),_0x58ab78=this['source']['version'];this['_saveMetaData'](_0x58ab78,_0x3fb6a8,_0x2f8954,_0x5a34f8),this['_startingRevisionId']=this['_revisionId'];const _0x3e0e83=new Map(),_0x15561b=new Map();for(const _0x5b648a of _0x1fbe69){const _0xfcef9f=Rt(_0x5b648a,this['editor']['model']['document']['getRoot'](_0x5b648a)['name']);_0x3e0e83['set'](_0x5b648a,_0xfcef9f),_0x15561b['set'](_0x5b648a,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3e0e83,[],_0x15561b);}getData(_0x2a1567,_0x2a1801){if(this['_lastFrom']===_0x2a1567&&this['_lastTo']<=_0x2a1801)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2a1801,!0x0);else{if(!this['_savedMetaData']['has'](_0x2a1567)){const _0x14b172=this['_getPreviousFrom'](_0x2a1567);this['_calculateMetaData'](_0x14b172,_0x2a1567,!0x1);}this['_calculateMetaData'](_0x2a1567,_0x2a1801,!0x0);}return this['_lastFrom']=_0x2a1567,this['_lastTo']=_0x2a1801,this['_getState']();}loadState(_0x53f4de){if(!this['_savedMetaData']['has'](_0x53f4de['fromVersion'])){const _0x340717=this['_getPreviousFrom'](_0x53f4de['fromVersion']);this['_calculateMetaData'](_0x340717,_0x53f4de['fromVersion'],!0x1);}this['_calculateMetaData'](_0x53f4de['fromVersion'],_0x53f4de['toVersion'],!0x1);const _0x3cd06d=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x53f4de['fromVersion'],this['_lastTo']=_0x53f4de['toVersion'];for(const _0x490db3 in _0x53f4de['diffData']){const _0x4f9332=_0x53f4de['diffData'][_0x490db3]['attachChange'],_0x36af83=_0x38b022(_0x53f4de['diffData'][_0x490db3]['attributesBefore'])||{},_0x4c229b=_0x53f4de['diffData'][_0x490db3],_0x34b6a7=_0x3cd06d['_makeModelFromViewString'](_0x4c229b['deletions'],_0x4c229b['rootElementName']||'$root');_0x34b6a7['rootName']=_0x490db3,_0x34b6a7['_isAttached']=!_0x4f9332||!_0x4f9332['isAttached'],_0x34b6a7['isAttached']=()=>_0x34b6a7['_isAttached'],this['_baseRoots']['set'](_0x490db3,_0x34b6a7),this['_baseRootsAttributes']['set'](_0x490db3,_0x36af83),_0x4f9332&&this['_touchedRoots']['set'](_0x490db3,_0x4f9332);const _0x2f23fe=this['_makeIdsRoot'](_0x34b6a7);this['_baseIdsRoots']['set'](_0x490db3,_0x2f23fe);for(const [_0x3dc04f,_0x3da8ba]of _0x34b6a7['markers']){if(!_0x3dc04f['startsWith']('revision:'))continue;const _0x2cbd8e=_0x3dc04f['split'](':')[0x2];for(const _0x51e77d of _0x3da8ba['getWalker']({'singleCharacters':!0x0})){const _0x14d0d3=this['_getVidAttributeName'](_0x51e77d),_0x25c0b1='elementEnd'==_0x51e77d['type']?_0x51e77d['previousPosition']['path']['slice'](0x0,-0x1):_0x51e77d['previousPosition']['path'],_0x434362=_0x2f23fe['getNodeByPath'](_0x25c0b1)['getAttribute'](_0x14d0d3);this['_touched']['set'](_0x434362,{'userId':_0x2cbd8e});}_0x34b6a7['markers']['delete'](_0x3dc04f);}}this['_startingRevisionId']=this['_revisionId'];const _0x39d04e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3058d3=>!this['_touched']['has'](_0x3058d3));let _0x1fb79c=0x0;const _0x2d87ad=new Map();for(const _0x1a84d4 in _0x53f4de['diffData']){const _0xf9fc82=_0x53f4de['diffData'][_0x1a84d4]['attachChange'],_0x1e0e4e=_0x38b022(_0x53f4de['diffData'][_0x1a84d4]['attributesAfter'])||{},_0x5da782=_0x53f4de['diffData'][_0x1a84d4],_0x394867=_0x3cd06d['_makeModelFromViewString'](_0x5da782['insertions'],_0x5da782['rootElementName']||'$root');_0x394867['rootName']=_0x1a84d4,_0x394867['_isAttached']=!_0xf9fc82||_0xf9fc82['isAttached'],_0x394867['isAttached']=()=>_0x394867['_isAttached'],this['_diffRoots']['set'](_0x1a84d4,_0x394867),this['_diffRootsAttributes']['set'](_0x1a84d4,_0x1e0e4e);const _0x3027c5=this['_makeIdsRoot'](_0x394867,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1a84d4,_0x3027c5),_0x2d87ad['set'](_0x1a84d4,_0x394867['isAttached']()?_0x1e0e4e:{});for(const [_0xf7c159,_0x531ceb]of _0x394867['markers']){if(!_0xf7c159['startsWith']('revision:'))continue;const _0x33758a=_0xf7c159['split'](':')[0x2];for(const _0xfa74d1 of _0x531ceb['getWalker']({'singleCharacters':!0x0})){const _0x3abeb8=this['_getVidAttributeName'](_0xfa74d1),_0x2f89e5=this['_revisionId']++,_0x53a4e5='elementEnd'==_0xfa74d1['type']?_0xfa74d1['previousPosition']['path']['slice'](0x0,-0x1):_0xfa74d1['previousPosition']['path'];_0x3027c5['getNodeByPath'](_0x53a4e5)['_setAttribute'](_0x3abeb8,_0x2f89e5),this['_touched']['set'](_0x2f89e5,{'userId':_0x33758a});}_0x394867['markers']['delete'](_0xf7c159);}for(const _0x5c12a3 of this['editor']['model']['createRangeIn'](_0x394867)['getWalker']({'singleCharacters':!0x0})){const _0x538802=this['_getVidAttributeName'](_0x5c12a3),_0x362252='elementEnd'==_0x5c12a3['type']?_0x5c12a3['previousPosition']['path']['slice'](0x0,-0x1):_0x5c12a3['previousPosition']['path'],_0x2e0147=_0x3027c5['getNodeByPath'](_0x362252);_0x2e0147['getAttribute'](_0x538802)>0x0||_0x2e0147['_setAttribute'](_0x538802,_0x39d04e[_0x1fb79c++]);}for(const [_0x54f9ea,_0x1c7b95]of _0x394867['markers'])_0x54f9ea['startsWith']('revision:')||this['_markers']['set'](_0x54f9ea,_0x1c7b95);}const {roots:_0x532b10}=this['_savedMetaData']['get'](_0x53f4de['fromVersion']),{roots:_0x478281}=this['_savedMetaData']['get'](_0x53f4de['toVersion']),_0x4d7a15=bt(_0x532b10['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4d7a15),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4d7a15,Number['NEGATIVE_INFINITY']));const _0x56a0f2=bt(_0x478281['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x56a0f2),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x56a0f2));const _0x118bba=Array['from'](this['_diffRoots'])['map'](([_0x2f48b9,_0x43e0bd])=>[_0x2f48b9,bt(_0x43e0bd)]);this['_saveMetaData'](this['_lastTo'],_0x118bba,this['_markers'],_0x2d87ad);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x2ca722,_0x142a45,_0x2af6fa,_0x4e224b){const _0xa6c3ec=new Map(_0x142a45),_0x35e649=new Map(_0x38b022(_0x4e224b)),_0x17939f=new Map();for(const [_0x541ba5,_0x1f7adc]of _0x2af6fa)_0x17939f['set'](_0x541ba5,{'start':_0x1f7adc['start']['clone'](),'end':_0x1f7adc['end']['clone'](),'rootName':_0x1f7adc['root']['rootName']});this['_savedMetaData']['set'](_0x2ca722,{'roots':_0xa6c3ec,'markers':_0x17939f,'rootsAttributes':_0x35e649});}_removeMetaData(_0x22e311){this['_savedMetaData']['delete'](_0x22e311);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}_makeIdsRoot(_0x1b9ea9,_0x1f6cdf=null){let _0x5abd72=null;_0x1b9ea9['is']('documentFragment')||(_0x5abd72=new _0x8d1ceb(_0x1b9ea9['name'],{'vid_start':null===_0x1f6cdf?this['_revisionId']++:_0x1f6cdf++}));const _0x30cded=[];for(const _0x3dc44c of _0x1b9ea9['getChildren']())if(_0x3dc44c['is']('element')){_0x30cded['push'](this['_makeIdsRoot'](_0x3dc44c,_0x1f6cdf));const _0x625c25=_0x30cded[_0x30cded['length']-0x1];null!==_0x1f6cdf&&(_0x1f6cdf=_0x625c25['is']('element','$text')?_0x625c25['getAttribute']('vid')+0x1:_0x625c25['getAttribute']('vid_end')+0x1);}else{for(let _0x5be419=0x0;_0x5be419<_0x3dc44c['offsetSize'];_0x5be419++)_0x30cded['push'](new _0x8d1ceb('$text',{'vid':null===_0x1f6cdf?this['_revisionId']++:_0x1f6cdf++}));}if(_0x1b9ea9['is']('documentFragment')){const _0xcfcee2=Rt(_0x1b9ea9['rootName'],_0x1b9ea9['name']);return _0xcfcee2['_insertChild'](0x0,_0x30cded),_0xcfcee2;}return _0x5abd72['_setAttribute']('vid_end',null===_0x1f6cdf?this['_revisionId']++:_0x1f6cdf),_0x5abd72['_insertChild'](0x0,_0x30cded),_0x5abd72;}_calculateMetaData(_0x223169,_0x4132f9,_0x5683a8){this['_reset']();const {roots:_0x133fd7,markers:_0x274967,rootsAttributes:_0x291f9b}=this['_savedMetaData']['get'](_0x223169);this['_baseRoots']=new Map(_0x133fd7),this['_baseRootsAttributes']=new Map(_0x38b022(_0x291f9b));for(const [_0x20bd3f,_0x1a8761]of this['_baseRoots'])if('$graveyard'!==_0x20bd3f&&(this['_diffRoots']['set'](_0x20bd3f,bt(_0x1a8761)),this['_diffRootsAttributes']=new Map(_0x38b022(_0x291f9b)),_0x5683a8)){const _0x2ec4aa=this['_revisionId'];this['_idsRoots']['set'](_0x20bd3f,this['_makeIdsRoot'](_0x1a8761)),this['_baseIdsRoots']['set'](_0x20bd3f,this['_makeIdsRoot'](_0x1a8761,_0x2ec4aa));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x5683a8&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2a6644,_0x4e35ac]of _0x274967){const _0x192d00=this['_baseRoots']['get'](_0x4e35ac['rootName']),_0x3b9b5f=this['_diffRoots']['get'](_0x4e35ac['rootName']),_0x2b4fac=new _0x26b117(this['_fixPosition'](_0x4e35ac['start'],_0x192d00),this['_fixPosition'](_0x4e35ac['end'],_0x192d00)),_0x2c3331=this['_fixRange'](_0x2b4fac,_0x3b9b5f);_0x192d00['markers']['set'](_0x2a6644,_0x2b4fac),this['_markers']['set'](_0x2a6644,_0x2c3331);}this['_applyOperations'](_0x223169,_0x4132f9,_0x5683a8);}_applyOperations(_0x3d2222,_0x419c80,_0x28c0e1){for(const _0x79ddb0 of this['source']['getOperations'](_0x3d2222,_0x419c80))this['_handleOperation'](_0x79ddb0,_0x28c0e1);for(const _0x4ad38d of this['_diffRoots']['values']())_0x4ad38d['markers']['clear']();for(const [_0xf52c13,_0x2b30b9]of this['_markers'])this['_diffRoots']['get'](_0x2b30b9['root']['rootName'])['markers']['set'](_0xf52c13,_0x2b30b9['clone']());const _0xb81d08=new Map(),_0x316b53=new Map();for(const [_0x1aaa6a,_0x1e640c]of this['_diffRoots'])_0xb81d08['set'](_0x1aaa6a,bt(_0x1e640c)),_0x316b53['set'](_0x1aaa6a,this['_diffRootsAttributes']['get'](_0x1aaa6a));this['_saveMetaData'](_0x419c80,_0xb81d08,this['_markers'],_0x316b53);}_getPreviousFrom(_0x297662){const _0x10ff2d=Array['from'](this['_savedMetaData']['keys']());_0x10ff2d['sort']((_0x561fba,_0x42f0ae)=>_0x561fba-_0x42f0ae),_0x10ff2d['reverse']();for(const _0x1cab79 of _0x10ff2d)if(_0x1cab79<_0x297662)return _0x1cab79;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5b8398,_0x551bc5){const _0x18e11d=Array['from'](_0x551bc5['markers'])['map'](([_0x340013,_0x32269c])=>[_0x340013,this['_fixRange'](_0x32269c,_0x5b8398)]);_0x5b8398['markers']=new Map(_0x18e11d);}_transformMarkers(_0x36b9d1){for(const _0x547709 of this['_markers']['values']()){const _0x1b8225=_0x547709['getTransformedByOperation'](_0x36b9d1),_0x2374c2=_0x26b117['_createFromRanges'](_0x1b8225);_0x547709['start']=_0x2374c2['start'],_0x547709['end']=_0x2374c2['end'];}}_handleOperation(_0x2b5ee7,_0x5d30e9){if('addRoot'!=_0x2b5ee7['type']&&'detachRoot'!=_0x2b5ee7['type']){if('insert'==_0x2b5ee7['type']){const _0x5c3abb=_0x2b5ee7['position']['root'],_0x43efb6=_0x5c3abb['rootName'],_0x33277e=_0x5c3abb['name'];this['_diffRoots']['has'](_0x43efb6)||(this['_diffRoots']['set'](_0x43efb6,Rt(_0x43efb6,_0x33277e,!0x0)),this['_diffRootsAttributes']['set'](_0x43efb6,{}),_0x5d30e9&&this['_idsRoots']['set'](_0x43efb6,Rt(_0x43efb6,_0x33277e,!0x0)));}else{if('addRootAttribute'==_0x2b5ee7['type']||'removeRootAttribute'==_0x2b5ee7['type']||'changeRootAttribute'==_0x2b5ee7['type'])return void this['_handleRootAttributeOperation'](_0x2b5ee7);'marker'==_0x2b5ee7['type']&&this['_handleMarkerOperation'](_0x2b5ee7);}if('marker'!==_0x2b5ee7['type']){const _0x182fa0=this['_cloneOperation'](_0x2b5ee7,this['_diffRoots']);_0x182fa0['_execute'](),this['_transformMarkers'](_0x182fa0);}if(_0x5d30e9)switch(_0x2b5ee7['type']){case'insert':this['_handleInsertOperation'](_0x2b5ee7);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2b5ee7);break;case'merge':this['_handleMergeOperation'](_0x2b5ee7);break;case'split':this['_handleSplitOperation'](_0x2b5ee7);}}else this['_handleRootOperation'](_0x2b5ee7,_0x5d30e9);}_cloneOperation(_0x2fc01c,_0x931c89){const _0x1454d6=_0x2fc01c['clone']();return _0x1454d6['_authorId']=_0x2fc01c['_authorId'],this['_fixOperation'](_0x1454d6,_0x931c89),_0x1454d6;}_getBaseVids(_0x5e0601){return _0x5e0601['map'](_0x3da195=>{const _0x13faed=this['_getVidAttributeName'](_0x3da195);return Number(_0x3da195['item']['getAttribute'](_0x13faed));});}_generateTape(_0x2ccc10,_0xa7b9f0){if(_0x2ccc10['is']('element','$text'))_0xa7b9f0['push']({'item':_0x2ccc10,'type':'text'});else{_0x2ccc10['is']('element')&&_0xa7b9f0['push']({'item':_0x2ccc10,'type':'elementStart'});for(const _0x3a2edf of _0x2ccc10['getChildren']())this['_generateTape'](_0x3a2edf,_0xa7b9f0);_0x2ccc10['is']('element')&&_0xa7b9f0['push']({'item':_0x2ccc10,'type':'elementEnd'});}return _0xa7b9f0;}_getState(){const _0x10348a=new Map(this['_touched']),_0x2c37fd=new Map(_0x10348a),_0x5ec32d=new Map(),_0x2b837c={'insertions':{},'deletions':{}},_0x4ab229={'insertions':{},'deletions':{}},_0x29741a=new Map(),_0x21ef22=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x5d1eca=new Map();_0x21ef22['delete']('$graveyard');for(const _0xc771ec of _0x21ef22){const _0x9d61f=(this['_diffRoots']['get'](_0xc771ec)??this['_baseRoots']['get'](_0xc771ec))['name'],_0xf35c0c=this['_diffRoots']['get'](_0xc771ec)||Rt(_0xc771ec,_0x9d61f,!0x1),_0x4387b8=this['_baseRoots']['get'](_0xc771ec)||Rt(_0xc771ec,_0x9d61f,!0x1);_0xf35c0c['isAttached']()||_0x4387b8['isAttached']()?(_0x5d1eca['set'](_0xc771ec,_0x9d61f),_0x2b837c['insertions'][_0xc771ec]=bt(_0xf35c0c),_0x2b837c['deletions'][_0xc771ec]=bt(_0x4387b8),this['_copyMarkers'](_0x2b837c['deletions'][_0xc771ec],_0x4387b8),this['_copyMarkers'](_0x2b837c['insertions'][_0xc771ec],_0xf35c0c),_0x4ab229['insertions'][_0xc771ec]=this['_generateTape'](this['_idsRoots']['get'](_0xc771ec),[]),_0x4ab229['deletions'][_0xc771ec]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xc771ec)||Rt(_0xc771ec,_0x9d61f,!0x1),[])):_0x21ef22['delete'](_0xc771ec);}for(const _0x425a2c of _0x21ef22){const _0x1ff215=_0x4ab229['insertions'][_0x425a2c];for(const _0x25552e of _0x1ff215){const _0x145ca2=this['_getVidAttributeName'](_0x25552e),_0x20ed6a=_0x25552e['item']['getAttribute'](_0x145ca2);_0x2c37fd['delete'](_0x20ed6a),_0x20ed6a>=this['_startingRevisionId']&&_0x5ec32d['set'](_0x20ed6a,_0x10348a['get'](_0x20ed6a));}}for(const _0x18db55 of _0x21ef22){const _0x319e25=_0x4ab229['insertions'][_0x18db55],_0x3f9dee=this['_getBaseVids'](_0x4ab229['deletions'][_0x18db55]);let _0x4d8b4a=0x0;for(const _0x2328c7 of _0x319e25){const _0x403544=this['_getVidAttributeName'](_0x2328c7),_0x5d39d8=_0x2328c7['item']['getAttribute'](_0x403544);if(!_0x5ec32d['has'](_0x5d39d8)&&!_0x29741a['has'](_0x5d39d8)){if(_0x2c37fd['has'](_0x5d39d8))_0x4d8b4a++;else{if(_0x5d39d8!=_0x3f9dee[_0x4d8b4a]){const _0x1e42b5=_0x10348a['get'](_0x5d39d8)||_0x10348a['get'](_0x3f9dee[_0x4d8b4a]);for(;_0x5d39d8!=_0x3f9dee[_0x4d8b4a];)_0x2c37fd['has'](_0x3f9dee[_0x4d8b4a])||(_0x29741a['set'](_0x3f9dee[_0x4d8b4a],_0x1e42b5),_0x10348a['set'](_0x3f9dee[_0x4d8b4a],_0x1e42b5)),_0x4d8b4a++;}_0x4d8b4a++;}}}}for(const _0x44f336 of _0x21ef22){const _0x41c2f9=_0x4ab229['insertions'][_0x44f336];for(const _0x27fcc7 of _0x41c2f9){const _0x2e8afc=this['_getVidAttributeName'](_0x27fcc7),_0x4d34c9=_0x27fcc7['item']['getAttribute'](_0x2e8afc);if(_0x29741a['has'](_0x4d34c9)){const _0x349ba5=_0x29741a['get'](_0x4d34c9);_0x2c37fd['has'](_0x4d34c9)||_0x2c37fd['set'](_0x4d34c9,{..._0x349ba5}),_0x5ec32d['set'](_0x4d34c9,{..._0x349ba5});}}}for(const _0x54ce90 of _0x2c37fd['keys']())_0x54ce90>=this['_startingRevisionId']&&_0x2c37fd['delete'](_0x54ce90);const _0x56afac=new Map();for(const _0x2c2668 of _0x21ef22){let _0x4a745a=_0x4ab229['insertions'][_0x2c2668];for(const _0x1fbe80 of _0x4a745a)if(_0x1fbe80['item']['is']('element','tableCell')){const _0x40bcc4=this['_getVidAttributeName'](_0x1fbe80),_0x5807b9=_0x1fbe80['item']['getAttribute'](_0x40bcc4);if(_0x5ec32d['has'](_0x5807b9)){const _0x4fbe96=_0x1fbe80['item']['parent']['parent']['getAttribute']('vid_start'),_0x5deed9=_0x56afac['get'](_0x4fbe96)||new Set();_0x5deed9['add'](_0x5ec32d['get'](_0x5807b9)['userId']),_0x56afac['set'](_0x4fbe96,_0x5deed9);}}_0x4a745a=_0x4ab229['deletions'][_0x2c2668];for(const _0x424dc5 of _0x4a745a)if(_0x424dc5['item']['is']('element','tableCell')){const _0x406a82=this['_getVidAttributeName'](_0x424dc5),_0x561202=_0x424dc5['item']['getAttribute'](_0x406a82);if(_0x2c37fd['has'](_0x561202)){const _0x30ed13=_0x424dc5['item']['parent']['parent']['getAttribute']('vid_start'),_0x3797cb=_0x56afac['get'](_0x30ed13)||new Set();_0x3797cb['add'](_0x2c37fd['get'](_0x561202)['userId']),_0x56afac['set'](_0x30ed13,_0x3797cb);}}for(const _0x1819d2 of _0x56afac['keys']())(_0x5ec32d['has'](_0x1819d2)||_0x2c37fd['has'](_0x1819d2))&&_0x56afac['delete'](_0x1819d2);}for(const _0x3294f5 of _0x21ef22){const _0x3599bb=_0x4ab229['insertions'][_0x3294f5];let _0x3aad51=null,_0x1313df=null;for(const _0x1d5d08 of _0x3599bb){const _0x29021b=this['_getVidAttributeName'](_0x1d5d08),_0x5fc1b3=_0x1d5d08['item']['getAttribute'](_0x29021b),_0x50daa7=_0x56afac['get'](_0x5fc1b3);_0x50daa7&&'elementStart'==_0x1d5d08['type']&&(_0x3aad51=Array['from'](_0x50daa7)[0x0],_0x1313df=_0x1d5d08['item']['getAttribute']('vid_end')),_0x3aad51&&(_0x2c37fd['set'](_0x5fc1b3,{'userId':_0x3aad51}),_0x5ec32d['set'](_0x5fc1b3,{'userId':_0x3aad51})),_0x5fc1b3==_0x1313df&&(_0x3aad51=null,_0x1313df=null);}}const _0x4b5f41={},_0xf80e78=new Set();for(const _0xbdb1a8 of _0x21ef22){const _0x28b95e=_0x2b837c['deletions'][_0xbdb1a8],_0x18eb37=_0x2b837c['insertions'][_0xbdb1a8];for(const {userId:_0x3d1b91}of this['_touchedMarkers']['values']())null!==_0x3d1b91&&_0xf80e78['add'](_0x3d1b91);for(const {userId:_0x2f1464}of this['_touchedRoots']['values']())null!==_0x2f1464&&_0xf80e78['add'](_0x2f1464);this['_markChanges'](_0x18eb37,_0x4ab229['insertions'][_0xbdb1a8],_0x5ec32d,'insertion',_0xf80e78),this['_markChanges'](_0x28b95e,_0x4ab229['deletions'][_0xbdb1a8],_0x2c37fd,'deletion',_0xf80e78),_0x4b5f41[_0xbdb1a8]={'insertions':this['_prepareViewToSave'](_0x18eb37),'deletions':this['_prepareViewToSave'](_0x28b95e),'attachChange':this['_touchedRoots']['get'](_0xbdb1a8)||null,'attributesBefore':_0x38b022(this['_baseRootsAttributes']['get'](_0xbdb1a8))||{},'attributesAfter':_0x38b022(this['_diffRootsAttributes']['get'](_0xbdb1a8)),'rootElementName':_0x5d1eca['get'](_0xbdb1a8)};}return{'diffData':_0x4b5f41,'authorsIds':Array['from'](_0xf80e78)};}_processRootBeforeSave(_0x2cdbe0){for(const [,_0x24b0d5]of _0x2cdbe0['markers']){const _0x52a740=_0x24b0d5['start']['getAncestors']()['filter'](_0x5e7d3a=>'tableCell'==_0x5e7d3a['name']);for(const _0x3ca271 of _0x52a740)0x1==_0x3ca271['childCount']&&_0x3ca271['getChild'](0x0)['is']('element','paragraph')&&_0x3ca271['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1f4116){this['_processRootBeforeSave'](_0x1f4116);const _0xc64fcd=this['editor']['data']['toView'](_0x1f4116,{}),_0x1880ae=Array['from'](_0xc64fcd['getChildren']())['map'](_0x4aeaca=>this['_getViewJson'](_0x4aeaca));return JSON['stringify'](_0x1880ae);}_getViewJson(_0x341274){if(_0x341274['is']('$text'))return _0x341274['data'];{const _0x522011=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x2f4543=_0x341274,_0x1d8ce7=this['editor']['data']['htmlProcessor']['domConverter'],_0x31dba9={'type':_0x522011['_getTypeCharForViewElement'](_0x2f4543),'name':_0x2f4543['name'],'attributes':Array['from'](_0x2f4543['getAttributes']()),'children':Array['from'](_0x2f4543['getChildren']())['map'](_0x3868ba=>this['_getViewJson'](_0x3868ba))};if(_0x341274['is']('uiElement')&&'$comment'!=_0x341274['name']){const _0x21ec2a=_0x341274['render'](_0x1d8ce7['domDocument'],_0x1d8ce7);_0x31dba9['children']['push'](_0x21ec2a['outerHTML']);}else{if(_0x341274['is']('rawElement')){const _0x555cc2=_0x1d8ce7['domDocument']['createElement'](_0x2f4543['name']);_0x341274['render'](_0x555cc2,_0x1d8ce7),_0x31dba9['children']['push'](_0x555cc2['innerHTML']);}}const _0x4539aa=Array['from'](_0x2f4543['getCustomProperties']());_0x4539aa['length']>0x0&&(_0x31dba9['customProperties']=_0x4539aa);const _0x2dceca=_0x2f4543['getFillerOffset']();return null!==_0x2dceca&&(_0x31dba9['fillerOffset']=_0x2dceca),_0x31dba9;}}['_markChanges'](_0x115956,_0x8293dd,_0x48df36,_0x1a029e,_0x454ba9){let _0x158ea7=null,_0x176c47=null,_0x33f187=0x0;const _0x3a48f0=this['editor']['model'];for(let _0x567314=0x0;_0x567314<_0x8293dd['length'];_0x567314++){const _0x5e36c7=this['_getVidAttributeName'](_0x8293dd[_0x567314]),_0x298603=_0x8293dd[_0x567314]['item']['getAttribute'](_0x5e36c7),_0x201f00=_0x48df36['get'](_0x298603),_0x49917a=_0x567314==_0x8293dd['length']-0x1;!_0x158ea7&&_0x201f00&&(_0x158ea7=_0x201f00,_0x176c47=_0x8293dd[_0x567314]),!_0x158ea7||_0x201f00&&_0x201f00['userId']==_0x158ea7['userId']||(_0x23c859(_0x201f00,kt(_0x176c47,_0x115956,_0x3a48f0),kt(_0x8293dd[_0x567314],_0x115956,_0x3a48f0)),_0x158ea7=_0x201f00||null,_0x176c47=_0x201f00?_0x8293dd[_0x567314]:null),_0x158ea7&&_0x49917a&&_0x23c859(_0x201f00,kt(_0x176c47,_0x115956,_0x3a48f0),At(_0x8293dd[_0x567314],_0x115956,_0x3a48f0));}function _0x23c859(_0x2f3f3c,_0x4a2d89,_0x19c925){const _0x915eca=_0x158ea7['userId'],_0x516e16='revision:'+_0x1a029e+':'+_0x915eca+':'+_0x33f187++,_0x52dd12=_0x3a48f0['createRange'](_0x4a2d89,_0x19c925);_0x115956['markers']['set'](_0x516e16,_0x52dd12),null!==_0x915eca&&_0x454ba9['add'](_0x915eca);}}_getVidAttributeName(_0x361da4){switch(_0x361da4['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_fixOperation(_0x1c524e,_0x1af9a1){_0x1c524e['baseVersion']=null;for(const _0x1e2c28 in _0x1c524e){const _0x169ce9=_0x1c524e[_0x1e2c28];if(_0x169ce9 instanceof _0x1a4c85){const _0x1d4b51=_0x1af9a1['get'](_0x169ce9['root']['rootName']);_0x1c524e[_0x1e2c28]=this['_fixPosition'](_0x169ce9,_0x1d4b51);}if(_0x169ce9 instanceof _0x26b117){const _0x363453=_0x1af9a1['get'](_0x169ce9['root']['rootName']);_0x1c524e[_0x1e2c28]=this['_fixRange'](_0x169ce9,_0x363453);}'root'===_0x1e2c28&&(_0x1c524e['root']=_0x1af9a1['get'](_0x1c524e['root']['rootName']));}}['_fixRange'](_0x582fca,_0x49d024){return this['editor']['model']['createRange'](this['_fixPosition'](_0x582fca['start'],_0x49d024),this['_fixPosition'](_0x582fca['end'],_0x49d024));}_fixPosition(_0x534de0,_0xea0131){return this['editor']['model']['createPositionFromPath'](_0xea0131,_0x534de0['path'],_0x534de0['stickiness']);}_handleInsertOperation(_0xab936d){const _0x1d956b=this['_idsRoots']['get'](_0xab936d['position']['root']['rootName']),_0x3f5733=this['_fixPosition'](_0xab936d['position'],_0x1d956b),_0x50734f=null===_0xab936d['_authorId']?null:_0xab936d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4454c3=_0x3f5733['parent'],_0x1c7437=this['_revisionId'],_0x5d3e63=[];for(const _0x21175b of _0xab936d['nodes'])if(_0x21175b['is']('element'))_0x5d3e63['push'](this['_makeIdsRoot'](_0x21175b));else{for(let _0x15becf=0x0;_0x15becf<_0x21175b['offsetSize'];_0x15becf++)_0x5d3e63['push'](new _0x8d1ceb('$text',{'vid':this['_revisionId']++}));}const _0x5553c3=this['_revisionId'];for(let _0x8fd70f=_0x1c7437;_0x8fd70f<_0x5553c3;_0x8fd70f++)this['_touched']['set'](_0x8fd70f,{'userId':_0x50734f});_0x4454c3['_insertChild'](_0x3f5733['offset'],_0x5d3e63);}_handleMoveOperation(_0x43be9d){(_0x43be9d=this['_cloneOperation'](_0x43be9d,this['_idsRoots']))['_execute']();const _0x333ec9=null===_0x43be9d['_authorId']?null:_0x43be9d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x197088=_0x43be9d['getMovedRangeStart'](),_0x5f549b=_0x197088['parent'],_0x22ebf9=_0x197088['offset'];!function _0x324452(_0x229904,_0x3ccc4a,_0x225e62,_0x31c8ac){for(let _0x262841=_0x225e62;_0x262841<_0x31c8ac;_0x262841++){const _0x415ff6=_0x3ccc4a['getChild'](_0x262841);_0x415ff6['is']('element','$text')?_0x229904['set'](_0x415ff6['getAttribute']('vid'),{'userId':_0x333ec9}):(_0x229904['set'](_0x415ff6['getAttribute']('vid_start'),{'userId':_0x333ec9}),_0x324452(_0x229904,_0x415ff6,0x0,_0x415ff6['childCount']),_0x229904['set'](_0x415ff6['getAttribute']('vid_end'),{'userId':_0x333ec9}));}}(this['_touched'],_0x5f549b,_0x22ebf9,_0x22ebf9+_0x43be9d['howMany']);}_handleMergeOperation(_0x5e36f9){const _0x109ac8=null===(_0x5e36f9=this['_cloneOperation'](_0x5e36f9,this['_idsRoots']))['_authorId']?null:_0x5e36f9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5a9da8=_0x5e36f9['targetPosition']['parent'],_0x35521d=_0x5e36f9['sourcePosition']['parent'],_0x2a4ffd=_0x5a9da8['getAttribute']('vid_end'),_0x523d56=_0x35521d['getAttribute']('vid_start');_0x5a9da8['_setAttribute']('vid_end',_0x35521d['getAttribute']('vid_end')),_0x35521d['_setAttribute']('vid_end',_0x2a4ffd),this['_touched']['set'](_0x523d56,{'userId':_0x109ac8}),this['_touched']['set'](_0x2a4ffd,{'userId':_0x109ac8}),_0x5e36f9['_execute']();}_handleSplitOperation(_0x1e65af){const _0x1773a2=null===(_0x1e65af=this['_cloneOperation'](_0x1e65af,this['_idsRoots']))['_authorId']?null:_0x1e65af['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3d0bb7=_0x1e65af['graveyardPosition'],_0x576cae=_0x1e65af['splitPosition']['parent'];_0x1e65af['_execute']();const _0x49c1db=_0x576cae['getAttribute']('vid_end'),_0x570d75=_0x1e65af['insertionPosition']['nodeAfter'];if(_0x3d0bb7){const _0x233c3e=_0x570d75['getAttribute']('vid_end'),_0x361fb2=_0x576cae['getAttribute']('vid_end');_0x576cae['_setAttribute']('vid_end',_0x233c3e),_0x570d75['_setAttribute']('vid_end',_0x361fb2),this['_touched']['set'](_0x576cae['getAttribute']('vid_end'),{'userId':_0x1773a2}),this['_touched']['set'](_0x570d75['getAttribute']('vid_start'),{'userId':_0x1773a2});}else{const _0x502ff9=this['_revisionId']++,_0x166ec9=this['_revisionId']++;_0x576cae['_setAttribute']('vid_end',_0x502ff9),_0x570d75['_setAttribute']('vid_start',_0x166ec9),_0x570d75['_setAttribute']('vid_end',_0x49c1db),this['_touched']['set'](_0x502ff9,{'userId':_0x1773a2}),this['_touched']['set'](_0x166ec9,{'userId':_0x1773a2});}}_handleMarkerOperation(_0x1a70e0){if(!_0x1a70e0['affectsData'])return;const _0xc42f59=(_0x1a70e0=this['_cloneOperation'](_0x1a70e0,this['_diffRoots']))['oldRange']?_0x1a70e0['oldRange']['root']:null,_0x148e85=_0x1a70e0['newRange']?_0x1a70e0['newRange']['root']:null;_0xc42f59&&this['_markers']['delete'](_0x1a70e0['name']),_0x148e85&&this['_markers']['set'](_0x1a70e0['name'],_0x1a70e0['newRange']['clone']());const _0x2c1d89=null===_0x1a70e0['_authorId']?null:_0x1a70e0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x10f878=_0x1a70e0['name'];if(!this['_touchedMarkers']['has'](_0x10f878))return void this['_touchedMarkers']['set'](_0x10f878,{'range':_0x1a70e0['oldRange'],'userId':_0x2c1d89});const _0x1044da=this['_touchedMarkers']['get'](_0x10f878),_0x567878=_0x1044da['range'],_0x5393be=_0x1a70e0['newRange'];null==_0x567878&&null==_0x5393be||_0x567878&&_0x5393be&&_0x567878['isEqual'](_0x5393be)?this['_touchedMarkers']['delete'](_0x1a70e0['name']):_0x1044da['userId']=_0x2c1d89;}_handleRootOperation(_0x56e311,_0x262b40){this['_diffRoots']['has'](_0x56e311['rootName'])?this['_diffRoots']['get'](_0x56e311['rootName'])['_isAttached']=_0x56e311['isAdd']:(this['_diffRoots']['set'](_0x56e311['rootName'],Rt(_0x56e311['rootName'],_0x56e311['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x56e311['rootName'],{}),_0x262b40&&this['_idsRoots']['set'](_0x56e311['rootName'],Rt(_0x56e311['rootName'],_0x56e311['elementName'],!0x0)));const _0x5e492d=null===_0x56e311['_authorId']?null:_0x56e311['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x348d11=this['_touchedRoots']['get'](_0x56e311['rootName']);_0x348d11&&_0x348d11['userId']===_0x5e492d?this['_touchedRoots']['delete'](_0x56e311['rootName']):this['_touchedRoots']['set'](_0x56e311['rootName'],{'userId':_0x5e492d,'isAttached':_0x56e311['isAdd']});}_handleRootAttributeOperation(_0x40a75e){const _0x4c1f93=this['_diffRootsAttributes']['get'](_0x40a75e['root']['rootName']);null===_0x40a75e['newValue']?delete _0x4c1f93[_0x40a75e['key']]:_0x4c1f93[_0x40a75e['key']]=_0x40a75e['newValue'];}};function bt(_0x6718fa){const _0x21233f=Rt(_0x6718fa['rootName'],_0x6718fa['name'],_0x6718fa['isAttached']());for(const _0x3c3c04 of _0x6718fa['getChildren']()){const _0x52195b=_0x3c3c04['_clone'](!0x0);_0x21233f['_appendChild'](_0x52195b);}return _0x21233f;}function Rt(_0x4c34e9,_0x2de8e4,_0x3b274b=!0x0){const _0x459893=new _0xdc5c7c();return _0x459893['rootName']=_0x4c34e9,_0x459893['name']=_0x2de8e4,_0x459893['_isAttached']=_0x3b274b,_0x459893['isAttached']=()=>_0x459893['_isAttached'],_0x459893;}function kt(_0x52f811,_0x5419c5,_0x56ea06){const _0x3953b8='elementEnd'==_0x52f811['type']?_0x56ea06['createPositionAt'](_0x52f811['item'],'end'):_0x56ea06['createPositionBefore'](_0x52f811['item']);return _0x56ea06['createPositionFromPath'](_0x5419c5,_0x3953b8['path'],_0x3953b8['stickiness']);}function At(_0x50e0e0,_0x3a17b9,_0x3640d5){const _0x5545b5='elementStart'==_0x50e0e0['type']?_0x3640d5['createPositionAt'](_0x50e0e0['item'],0x0):_0x3640d5['createPositionAfter'](_0x50e0e0['item']);return _0x3640d5['createPositionFromPath'](_0x3a17b9,_0x5545b5['path'],_0x5545b5['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x59bd54(at);var Et=class extends It{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x2da9ab,_0x31a512){super(_0x2da9ab),this['focusTracker']=new _0xf10848(),this['keystrokes']=new _0x43e974(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x31a512),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),dt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x42cad5=_0x38bf42=>_0x38bf42['stopPropagation']();this['keystrokes']['set']('arrowright',_0x42cad5),this['keystrokes']['set']('arrowleft',_0x42cad5),this['keystrokes']['set']('arrowup',_0x42cad5),this['keystrokes']['set']('arrowdown',_0x42cad5);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2ba065){this['revisionNameInputView']['fieldView']['element']['value']=_0x2ba065['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x14366a){const _0x121b6c=new _0xd50028(this['locale'],lt),_0x51eb46=_0x121b6c['fieldView'];_0x51eb46['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x152f81=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x14366a&&(_0x152f81+='\x20('+pt(this['locale'],'optional')+')'),(_0x121b6c['label']=_0x152f81,_0x51eb46['on']('input',()=>{this['revisionNameInputValue']=_0x51eb46['element']['value']['trim']();}),_0x121b6c);}},St=class extends _0x57c795{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_t];}['_saveRevisionFormView'];init(){const _0x3c3775=this['editor'],_0x317cc4=_0x3c3775['plugins']['get']('RevisionTracker');_0x3c3775['ui']['componentFactory']['add']('revisionHistory',_0x2b4a53=>{const _0x378752=ct(_0x2b4a53),_0xf549ed=_0x378752['panelView']['children'],_0x17b702=new _0x4fa40b(_0x2b4a53),_0x1629c8=new _0x283521(_0x2b4a53),_0x36f00d=this['_createSaveRevisionButton'](_0x112eb0),_0x26877a=new _0x283521(_0x2b4a53),_0x120a4b=this['_createOpenRevisionButton'](_0x112eb0);return _0x378752['bind']('isEnabled')['to'](_0x317cc4,'isReady',_0x317cc4,'isEnabled',_0x3c3775,'isReadOnly',(_0x150865,_0x3ce3bf,_0x4dc600)=>_0x150865&&_0x3ce3bf&&!_0x4dc600),_0x378752['buttonView']['set']({'icon':_0x116443,'label':pt(_0x2b4a53,'Revision\x20history'),'tooltip':!0x0}),_0x36f00d['set']({'withText':!0x0,'role':'menuitem'}),_0x120a4b['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x120a4b,'execute',()=>{_0x378752['isOpen']=!0x1,_0x3c3775['editing']['view']['focus']();},{'priority':'low'}),_0x1629c8['children']['add'](_0x36f00d),_0x26877a['children']['add'](_0x120a4b),_0x17b702['role']='menu',_0x17b702['items']['addMany']([_0x1629c8,_0x26877a]),_0xf549ed['add'](_0x17b702),_0x378752;}),_0x3c3775['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0xd5e014=this['editor'],_0x59ccea=_0xd5e014['locale'],_0x1b998a=_0xd5e014['plugins']['get']('RevisionTracker'),_0x1600da=new et(_0x59ccea),_0x84be97=new it(_0x59ccea);_0x1600da['bind']('isEnabled')['to'](_0x1b998a,'isReady',_0x1b998a,'isEnabled',_0xd5e014,'isReadOnly',(_0x56ac4b,_0x592777,_0x34ee8e)=>_0x56ac4b&&_0x592777&&!_0x34ee8e),_0x1600da['buttonView']['set']({'icon':_0x116443,'label':pt(_0x59ccea,'Revision\x20history')});const _0x48dc53=new tt(_0x59ccea,_0x1600da),_0x558765=this['_createSaveRevisionButton'](_0x5782cb);_0x558765['delegate']('execute')['to'](_0x1600da),_0x48dc53['children']['add'](_0x558765),_0x84be97['items']['add'](_0x48dc53);const _0x4e3820=new tt(_0x59ccea,_0x1600da),_0x2c5cc7=this['_createOpenRevisionButton'](_0x5782cb);return _0x2c5cc7['delegate']('execute')['to'](_0x1600da),_0x4e3820['children']['add'](_0x2c5cc7),_0x84be97['items']['add'](_0x4e3820),_0x1600da['panelView']['children']['add'](_0x84be97),_0x1600da;}_createSaveRevisionButton(_0x1709b3){const _0x1b5b77=this['editor'],_0x4cdc12=_0x1b5b77['plugins']['get']('RevisionTracker'),_0x5745e2=new _0x1709b3(_0x1b5b77['locale']);return _0x5745e2['set']({'label':pt(_0x1b5b77['locale'],'Save\x20current\x20revision')}),_0x5745e2['bind']('isEnabled')['to'](_0x4cdc12,'isReady',_0x4cdc12,'isEnabled',_0x1b5b77,'isReadOnly',(_0x283e45,_0x436660,_0x535916)=>_0x283e45&&_0x436660&&!_0x535916),this['listenTo'](_0x5745e2,'execute',()=>{this['_showDialog']();}),_0x5745e2;}_createOpenRevisionButton(_0xd0004d){const _0x214247=this['editor'],_0x1317ff=_0x214247['plugins']['get']('RevisionTracker'),_0x4830a3=new _0xd0004d(_0x214247['locale']);return _0x4830a3['set']({'label':pt(_0x214247['locale'],'Open\x20revision\x20history')}),_0x4830a3['bind']('isEnabled')['to'](_0x1317ff,'isReady',_0x214247,'isReadOnly',(_0x5433ec,_0x4d0609)=>_0x5433ec&&!_0x4d0609),this['listenTo'](_0x4830a3,'execute',()=>{_0x214247['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x4830a3;}['_showDialog'](){const _0x31b786=this['editor'],_0xaf0e29=_0x31b786['locale'],_0x50518b=_0x31b786['plugins']['get']('Dialog'),_0x577331=_0x31b786['plugins']['get']('RevisionTracker');function _0x3531f3(_0x1d0865){_0x31b786['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1d0865['revisionName']?_0x1d0865['revisionNameInputView']['errorText']=pt(_0xaf0e29,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x31b786['plugins']['get'](_t)['saveRevision']({'name':_0x1d0865['revisionName']}),_0x50518b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3531f3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x50518b['show']({'id':'revisionSave','title':pt(_0xaf0e29,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x31b786['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x50518b['hide']()},{'label':pt(_0x31b786['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x11e7e3){_0x11e7e3['bind']('isEnabled')['to'](_0x577331,'isReady',_0x577331,'isEnabled',_0x31b786,'isReadOnly',(_0x278746,_0x3b1216,_0x1cbf9d)=>_0x278746&&_0x3b1216&&!_0x1cbf9d);},'onExecute':()=>_0x3531f3(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x2235a3=this['editor'],_0x1f466e=_0x2235a3['locale'];this['_saveRevisionFormView']=new Et(_0x1f466e,_0x2235a3['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x2c9805,_0x6693aa){super(_0x2c9805),this['_model']=_0x6693aa,this['changeId']=_0x6693aa['id'];const _0x3092f0=this['bindTemplate'],_0x2c38d3=pt(_0x2c9805,_0x6693aa['data']['isSuggestion']?'Suggested\x20by':'add'==_0x6693aa['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x6693aa['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3092f0['to']('type',_0x1d7914=>'ck-revision-change__'+_0x1d7914)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2c38d3}]},{'text':'\x20'+_0x6693aa['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x43b55f();var Ot=class extends xt{['id'];author;type;data;rootName;constructor(_0x4e6cf3){super(),this['id']=_0x4e6cf3['id']||_0xb49d28(),this['author']=_0x4e6cf3['author'],this['type']=_0x4e6cf3['type'],this['data']=_0x4e6cf3['data']||{},this['rootName']=_0x4e6cf3['rootName'],this['set']('createdAt',_0x4e6cf3['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x31e7ae,_0x35051f){this['newRevisionId']=_0x31e7ae,this['oldRevisionId']=_0x35051f,this['changes']=new _0x4a1e3f();}_setChanges(_0x3f2fda){for(const _0x529e67 of _0x3f2fda)this['changes']['add'](_0x529e67);}},Mt=class extends _0x57c795{repository;adapter=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x3e15a4,_0x1329e2,mt,wt];}constructor(_0x468768){super(_0x468768),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',(_0x18f9ff,_0x29aeb5,_0x2be556)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x465c3a=>{for(const _0x4b8fa4 of this['editor']['editing']['view']['document']['roots'])_0x2be556?_0x465c3a['removeClass']('ck-editor__editable__overlay',_0x4b8fa4):_0x465c3a['addClass']('ck-editor__editable__overlay',_0x4b8fa4);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4697a2=>null!==_0x4697a2),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2414c7,_0x1c3539,_0x50afda)=>_0x2414c7&&_0x50afda?_0x1c3539['changes']['getIndex'](_0x50afda):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x327c3c,_0x594c65)=>_0x327c3c?_0x594c65['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1329e2);}init(){const _0x346e80=this['editor'],_0x594b44=new Tt(_0x346e80,{'direction':'backward'}),_0x1e86f8=new Tt(_0x346e80,{'direction':'forward'});_0x346e80['commands']['add']('showPreviousChange',_0x594b44),_0x346e80['commands']['add']('showNextChange',_0x1e86f8),_0x346e80['commands']['add']('restoreRevision',new Dt(_0x346e80)),this['on']('change:numberOfChanges',()=>{_0x594b44['refresh'](),_0x1e86f8['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x346e80['enableReadOnlyMode']('revision-viewer'),_0x346e80['plugins']['has']('WidgetToolbarRepository')&&_0x346e80['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x5137b2){return await this['_utils']['loadRevisionData'](_0x5137b2,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5137b2);}async getRevisionRootsAttributes(_0xa044a){return await this['_utils']['loadRevisionData'](_0xa044a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xa044a);}async['compare'](_0x774f62,_0x5bd2ce,_0xaa28de=!0x1){if(!this['isEnabled'])return;const _0x4ea301=this['diff'],_0x250d51=this['repository'],_0x546e57='string'==typeof _0x774f62?_0x250d51['getRevision'](_0x774f62):_0x774f62,_0x14031b='string'==typeof _0x5bd2ce?_0x250d51['getRevision'](_0x5bd2ce):_0x5bd2ce,_0x9f1ade=_0x546e57['id'],_0x402794=_0x14031b?_0x14031b['id']:null;if(!_0xaa28de&&this['diff']&&this['diff']['newRevisionId']===_0x9f1ade&&this['diff']['oldRevisionId']===_0x402794)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x9f1ade,_0x402794);const _0x36b7a2=this['_getRevisionsRange'](_0x546e57,_0x14031b,!0x0)['map'](_0x5b36e=>this['_utils']['loadRevisionData'](_0x5b36e,this['adapter']));return _0x36b7a2['push'](new Promise(_0x34692f=>{setTimeout(_0x34692f,0x14);})),Promise['all'](_0x36b7a2)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x389d72=this['_getDiff'](_0x9f1ade,_0x402794);for(const _0x5a70dd of _0x389d72['changes'])this['_changeIdToChange']['set'](_0x5a70dd['id'],_0x5a70dd);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3adaea=>{for(const _0x390092 of this['editor']['model']['document']['getRootNames']())_0x3adaea['detachRoot'](_0x390092);for(const _0x3e6db of Object['keys'](_0x389d72['model'])){const _0xce1716=_0x389d72['model'][_0x3e6db]['name'],_0x1a2417=_0x3adaea['addRoot'](_0x3e6db,_0xce1716);for(const _0x197b08 of Object['keys'](_0x389d72['attributes'][_0x3e6db]))_0x3adaea['setAttribute'](_0x197b08,_0x389d72['attributes'][_0x3e6db][_0x197b08],_0x1a2417);_0x3adaea['insert'](_0x389d72['model'][_0x3e6db],_0x1a2417,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x389d72['changes'])),this['isReady']=!0x0;})['catch'](_0x34e254=>{console['error'](_0x34e254),this['_cleanUp'](),_0x4ea301&&(this['diff']=_0x4ea301),this['isReady']=!0x0;});}addRevisionData(_0x3086a3,_0x57f0d7){const _0x58285f=this['repository']['createRevision'](_0x3086a3);return _0x58285f['on']('_update',(_0x3b1d21,_0x1d7a54,_0x571199)=>_0x57f0d7(_0x1d7a54,_0x571199,_0x58285f)),this['repository']['addRevision'](_0x58285f),_0x58285f;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x439d14=>{for(const _0x17afea of this['editor']['model']['document']['getRootNames']())_0x439d14['detachRoot'](_0x17afea);});}_sortAndFilterDiffChanges(_0x177f70){const _0xdd123a=[],_0x23f17a=new Map();for(const _0x15d641 of this['editor']['model']['document']['getRootNames']()){const _0x29cb8c=this['editor']['editing']['view']['getDomRoot'](_0x15d641);if(!_0x29cb8c)continue;const _0x245924=_0x29cb8c['getClientRects']()['item'](0x0);_0x245924&&(_0xdd123a['push'](_0x15d641),_0x23f17a['set'](_0x15d641,_0x245924));}return _0xdd123a['sort']((_0x75dbc9,_0x3f2422)=>{const _0x333323=_0x23f17a['get'](_0x75dbc9),_0x88d456=_0x23f17a['get'](_0x3f2422);return _0x333323['y']-_0x88d456['y']||_0x333323['x']-_0x88d456['x'];}),(_0x177f70=_0x177f70['filter'](_0x461037=>_0xdd123a['includes'](_0x461037['rootName'])))['sort']((_0x5ccfd4,_0x26acb4)=>_0xdd123a['indexOf'](_0x5ccfd4['rootName'])-_0xdd123a['indexOf'](_0x26acb4['rootName'])),_0x177f70;}['_makeTape'](_0x32788f){const _0x511325=Array['from'](_0x32788f['markers'])['filter'](([_0x584fe1,_0x4ba5ef])=>_0x584fe1['startsWith']('revision:')&&!_0x4ba5ef['isCollapsed']),_0x23160c=Array['from'](this['editor']['model']['createRangeIn'](_0x32788f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x511325['length'])for(const _0x4f296d of _0x23160c){const [_0x65c915,_0x1d2652]=_0x511325[0x0],[,_0x40116a,_0x293557]=_0x65c915['split'](':');if(_0x1d2652['end']['isEqual'](_0x4f296d['nextPosition'])&&_0x511325['shift'](),(_0x4f296d['previousPosition']['isEqual'](_0x1d2652['start'])||_0x4f296d['previousPosition']['isAfter'](_0x1d2652['start']))&&('insertion'==_0x40116a?_0x4f296d['isAdded']={'userId':_0x293557}:'deletion'==_0x40116a&&(_0x4f296d['isRemoved']={'userId':_0x293557})),0x0==_0x511325['length'])break;}return _0x23160c;}_refreshStartEndIndex(_0x4029ec){const _0x4f83dc=new Map();for(let _0x373bcc=0x0;_0x373bcc<_0x4029ec['length'];_0x373bcc++)'text'===_0x4029ec[_0x373bcc]['type']?(_0x4029ec[_0x373bcc]['item']['startIndex']=_0x373bcc,_0x4029ec[_0x373bcc]['item']['endIndex']=_0x373bcc):('elementStart'===_0x4029ec[_0x373bcc]['type']?_0x4029ec[_0x373bcc]['item']['startIndex']=_0x373bcc:'elementEnd'===_0x4029ec[_0x373bcc]['type']&&(_0x4029ec[_0x373bcc]['item']['endIndex']=_0x373bcc),_0x4f83dc['set'](_0x4029ec[_0x373bcc]['id'],_0x373bcc));for(const _0x505777 of _0x4f83dc['values']())'elementStart'===_0x4029ec[_0x505777]['type']?_0x4029ec[_0x505777]['item']['endIndex']=_0x4f83dc['get'](_0x4029ec[_0x505777]['pairId']):'elementEnd'===_0x4029ec[_0x505777]['type']&&(_0x4029ec[_0x505777]['item']['startIndex']=_0x4f83dc['get'](_0x4029ec[_0x505777]['pairId']));}['_processTape'](_0x5061a6){for(let _0x3d6564=0x0;_0x3d6564<_0x5061a6['length'];_0x3d6564++){if('elementStart'===_0x5061a6[_0x3d6564]['type'])_0x5061a6[_0x3d6564]['item']['startIndex']=_0x3d6564;else{if('elementEnd'===_0x5061a6[_0x3d6564]['type']){_0x5061a6[_0x3d6564]['item']['endIndex']=_0x3d6564;const _0x2e00cc=_0x5061a6[_0x3d6564]['item']['startIndex'];_0x5061a6[_0x2e00cc]['pairId']=_0x5061a6[_0x3d6564]['id'],_0x5061a6[_0x3d6564]['pairId']=_0x5061a6[_0x2e00cc]['id'];}else _0x5061a6[_0x3d6564]['item']['startIndex']=_0x3d6564,_0x5061a6[_0x3d6564]['item']['endIndex']=_0x3d6564,_0x5061a6[_0x3d6564]['pairId']=null;}_0x5061a6[_0x3d6564]['markersStart']||(_0x5061a6[_0x3d6564]['markersStart']=[],_0x5061a6[_0x3d6564]['markersEnd']=[]);}}_markInsertions(_0x1ab229,_0x131cc3){const _0x517b92=_0x1ab229['filter'](_0x4934b7=>!_0x4934b7['isAdded']);for(let _0x268db9=0x0;_0x268db9<_0x131cc3['length'];_0x268db9++)_0x131cc3[_0x268db9]['isAdded']&&(_0x517b92[_0x268db9]['isAdded']=_0x131cc3[_0x268db9]['isAdded']);}_getDiff(_0x520783,_0x20e296=null){const _0x3b36cd=this['repository']['getRevision'](_0x520783),_0x2891cf=_0x20e296?this['repository']['getRevision'](_0x20e296):null,_0x2e24a4=this['_getRevisionsRange'](_0x3b36cd,_0x2891cf),_0x520d5b=_0x2e24a4[_0x2e24a4['length']-0x1],_0x19b9a4=new Map(),_0x80f42={'model':{},'attributes':{},'changes':[]},_0x383f99=new Set(),_0x1a1909=new Map();for(let _0x43397d=_0x2e24a4['length']-0x1;_0x43397d>=0x0;_0x43397d--){const _0x1fc1ae=_0x2e24a4[_0x43397d];for(const _0x4d01c8 of Object['keys'](_0x1fc1ae['diffData']))if(_0x1fc1ae['diffData'][_0x4d01c8]['attachChange']){const _0x38ff6a=_0x1fc1ae['diffData'][_0x4d01c8]['attachChange'];_0x38ff6a['isAttached']?(_0x383f99['add'](_0x4d01c8),_0x1a1909['has'](_0x4d01c8)&&_0x1a1909['get'](_0x4d01c8)['userId']==_0x38ff6a['userId']?_0x1a1909['delete'](_0x4d01c8):_0x1a1909['set'](_0x4d01c8,_0x38ff6a)):_0x1a1909['has'](_0x4d01c8)?(_0x383f99['delete'](_0x4d01c8),_0x1a1909['delete'](_0x4d01c8)):(_0x383f99['add'](_0x4d01c8),_0x1a1909['set'](_0x4d01c8,_0x38ff6a));}else _0x383f99['add'](_0x4d01c8);}for(const _0x292ba3 of _0x383f99){const _0x319fea=_0x1a1909['has'](_0x292ba3)&&!_0x1a1909['get'](_0x292ba3)['isAttached'];let _0x3953c3=_0x319fea?_0x2e24a4['length']-0x1:0x0;const _0xb6836c=_0x319fea?-0x1:0x1;for(;_0x2e24a4[_0x3953c3];){const _0x500bd1=_0x2e24a4[_0x3953c3];if(_0x500bd1['diffData'][_0x292ba3]){const _0x5da335=_0x319fea?_0x500bd1['diffData'][_0x292ba3]['attributesBefore']:_0x500bd1['diffData'][_0x292ba3]['attributesAfter'];_0x80f42['attributes'][_0x292ba3]=_0x5da335?_0x38b022(_0x5da335):{};break;}_0x3953c3+=_0xb6836c;}}for(const _0x493701 of _0x2e24a4){_0x493701['model']={};for(const _0x4608ff of _0x493701['authors'])_0x19b9a4['set'](_0x4608ff['id'],_0x4608ff);for(const _0x12c306 of _0x383f99){const _0xeb3edc=_0x493701['diffData'][_0x12c306]?_0x493701['diffData'][_0x12c306]['insertions']:'[]',_0x25d397=_0x493701['diffData'][_0x12c306]?_0x493701['diffData'][_0x12c306]['deletions']:'[]',_0x50ac78=_0x493701['diffData'][_0x12c306]?.['rootElementName']||'$root';_0x493701['model'][_0x12c306]={'insertions':this['_utils']['_makeModelFromViewString'](_0xeb3edc,_0x50ac78),'deletions':this['_utils']['_makeModelFromViewString'](_0x25d397,_0x50ac78)};}}for(const _0x4dce26 of _0x383f99){let _0x3d381b=null,_0x1321d8=0x0;const _0x4a9ca5=_0x2e24a4['map'](_0x131bac=>_0x131bac['diffData'][_0x4dce26]?.['rootElementName'])['find'](_0x35749e=>void 0x0!==_0x35749e)||'$root',_0x158ccc=new Map(Array['from'](_0x3b36cd['model'][_0x4dce26]['insertions']['markers'])['filter'](([_0x4c674a])=>!_0x4c674a['startsWith']('revision:')));let _0x1ba3e4=0x0;for(const _0x430b71 of _0x2e24a4){const _0x1a78a1=this['_makeTape'](_0x430b71['model'][_0x4dce26]['insertions']);_0x430b71==_0x3b36cd?(_0x3d381b=_0x1a78a1,_0x1321d8=_0x3d381b['length'],_0x3d381b['forEach'](_0x376b72=>{_0x376b72['id']=_0x1ba3e4++;}),this['_processTape'](_0x3d381b)):this['_markInsertions'](_0x3d381b,_0x1a78a1);const _0x386633=_0x3d381b['filter'](_0xd8fd8c=>!_0xd8fd8c['isAdded'])['map'](_0x3d6e9f=>_0x3d6e9f['id']);let _0x597480=0x0;const _0x3b4b15=this['_makeTape'](_0x430b71['model'][_0x4dce26]['deletions']);_0x3b4b15['forEach'](_0x344d58=>{_0x344d58['isRemoved']?_0x344d58['id']=_0x1321d8++:_0x344d58['id']=_0x386633[_0x597480++];}),this['_processTape'](_0x3b4b15),this['_setDistance'](_0x3d381b,'isAdded'),this['_setDistance'](_0x3b4b15,'isRemoved'),_0x430b71==_0x3b36cd&&this['_markMarkers'](_0x3d381b,_0x158ccc),_0x3d381b=this['_joinTapes'](_0x3d381b,_0x3b4b15),this['_refreshStartEndIndex'](_0x3d381b),this['_setDistance'](_0x3d381b,'isRemoved');}_0x3d381b=_0x3d381b['filter'](_0x183725=>!(_0x183725['isAdded']&&_0x183725['isRemoved']));const _0x5766c6=new Map(_0x520d5b['model'][_0x4dce26]['deletions']['markers']),_0x384035=new Set(_0x158ccc['keys']());for(const _0x2a83fc of _0x5766c6['keys']())_0x384035['delete'](_0x2a83fc);this['_markSuggestions'](_0x3d381b,_0x384035),this['_fixObsoleteTags'](_0x3d381b),_0x3d381b=this['_removeMissingPairs'](_0x3d381b),_0x3d381b=this['_markMismatchedRemovedTags'](_0x3d381b),_0x3d381b=this['_removeUnsupportedChanges'](_0x3d381b);const {root:_0x427722,changes:_0x2cc663}=this['_makeModelFromTape'](_0x3d381b,_0x19b9a4,_0x4dce26,_0x4a9ca5);_0x80f42['model'][_0x4dce26]=_0x427722;const _0x1ecceb=_0x1a1909['get'](_0x4dce26);if(_0x1ecceb){const _0x4b20e8=new Ot({'author':_0x19b9a4['get'](_0x1ecceb['userId']),'type':_0x1ecceb['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4dce26});_0x2cc663['unshift'](_0x4b20e8),_0x80f42['attributes'][_0x4dce26]['revisionHistoryAttachChange']=_0x4b20e8['id'];}_0x80f42['changes']=_0x80f42['changes']['concat'](_0x2cc663);}return _0x80f42;}['_markMarkers'](_0x4d33c3,_0x1a14da){for(let _0x1132ee=0x0;_0x1132ee<_0x4d33c3['length'];_0x1132ee++)for(const [_0x2c9b4b,_0xb9e7a6]of _0x1a14da)!_0xb9e7a6['isCollapsed']&&_0xb9e7a6['start']['isEqual'](_0x4d33c3[_0x1132ee]['previousPosition'])&&_0x4d33c3[_0x1132ee]['markersStart']['push'](_0x2c9b4b),_0xb9e7a6['end']['isEqual'](_0x4d33c3[_0x1132ee]['nextPosition'])&&_0x4d33c3[_0x1132ee]['markersEnd']['push'](_0x2c9b4b);}['_joinTapes'](_0x19b331,_0xf422f0){let _0x15a267=[],_0x24368d=0x0,_0x2f2676=0x0;for(;_0x24368d<_0x19b331['length']||_0x2f2676<_0xf422f0['length'];){const _0x51f8f5=_0x19b331[_0x24368d]||{},_0x1a15eb=_0xf422f0[_0x2f2676]||{};if(_0x51f8f5['id']==_0x1a15eb['id'])_0x24368d++,_0x2f2676++,_0x15a267['push'](_0x51f8f5);else{if(_0x1a15eb['isRemoved']&&_0x51f8f5['isAdded']){const {commonTape:_0x47424e,iEnd:_0xc9afd8,jEnd:_0x4cb79d}=this['_threeWayMerge'](_0x19b331,_0x24368d,_0xf422f0,_0x2f2676);_0x15a267=_0x15a267['concat'](_0x47424e),_0x24368d=_0xc9afd8,_0x2f2676=_0x4cb79d;}else _0x1a15eb['isRemoved']?(_0x2f2676++,_0x15a267['push'](_0x1a15eb)):(_0x24368d++,_0x15a267['push'](_0x51f8f5));}}return _0x15a267;}_markSuggestions(_0x2c7e3c,_0x1dfd2f){const _0x5a2b03=[];for(let _0x18e561=0x0;_0x18e561<_0x2c7e3c['length'];_0x18e561++){for(let _0x4037df=0x0;_0x4037df<_0x2c7e3c[_0x18e561]['markersStart']['length'];_0x4037df++){const _0x4b8a20=_0x2c7e3c[_0x18e561]['markersStart'][_0x4037df];if(!_0x1dfd2f['has'](_0x4b8a20))continue;const {group:_0x330083,type:_0x1d5809,authorId:_0x30a0b5}=_0x2bea53(_0x4b8a20);'revision-suggestion'!=_0x330083||'insertion'!=_0x1d5809&&'deletion'!=_0x1d5809||(_0x5a2b03['unshift']({'type':_0x1d5809,'name':_0x4b8a20,'userId':_0x30a0b5}),_0x2c7e3c[_0x18e561]['markersStart']['splice'](_0x4037df,0x1),_0x4037df--);}_0x3e73a4(_0x2c7e3c[_0x18e561]);for(let _0x29ad82=0x0;_0x29ad82<_0x2c7e3c[_0x18e561]['markersEnd']['length'];_0x29ad82++){const _0x2c86e3=_0x2c7e3c[_0x18e561]['markersEnd'][_0x29ad82];if(!_0x1dfd2f['has'](_0x2c86e3))continue;const {group:_0x27e5d1,type:_0x13e85e}=_0x2bea53(_0x2c86e3);if('revision-suggestion'!=_0x27e5d1||'insertion'!=_0x13e85e&&'deletion'!=_0x13e85e)continue;_0x2c7e3c[_0x18e561]['markersEnd']['splice'](_0x29ad82,0x1),_0x29ad82--;const _0xc37ae=_0x5a2b03['findIndex'](_0x341068=>_0x341068['name']==_0x2c86e3);_0xc37ae>-0x1&&_0x5a2b03['splice'](_0xc37ae,0x1);}}function _0x2bea53(_0x294999){const _0x342d3f=_0x294999['split'](':');return{'group':_0x342d3f[0x0],'type':_0x342d3f[0x1],'subType':_0x342d3f['length']>=0x5?_0x342d3f[0x2]:null,'id':_0x342d3f['length']<0x5?_0x342d3f[0x2]:_0x342d3f[0x3],'authorId':_0x342d3f['length']<0x5?_0x342d3f[0x3]:_0x342d3f[0x4],'markerCount':0x6==_0x342d3f['length']?_0x342d3f[0x5]:null};}function _0x3e73a4(_0x4c43a2){for(let _0x13f74d=0x0;_0x13f74d<_0x5a2b03['length'];_0x13f74d++){if(_0x4c43a2['isAdded']&&'insertion'==_0x5a2b03[_0x13f74d]['type']&&_0x4c43a2['isAdded']['userId']==_0x5a2b03[_0x13f74d]['userId'])return _0x4c43a2['isAddSuggestion']=_0x5a2b03[_0x13f74d],void delete _0x4c43a2['isAdded'];if(!_0x4c43a2['isAdded']&&!_0x4c43a2['isRemoved']&&'deletion'==_0x5a2b03[_0x13f74d]['type'])return void(_0x4c43a2['isRemoveSuggestion']=_0x5a2b03[_0x13f74d]);}}}_setDistance(_0x228423,_0x216b94){let _0x229963=0x0,_0x7ce979=!0x1;const _0x46d192=new Map();for(const _0x4c6518 of _0x228423)_0x4c6518[_0x216b94]?_0x7ce979&&(_0x229963++,_0x7ce979=!0x1):(_0x229963++,_0x7ce979=!0x0),_0x46d192['set'](_0x4c6518['id'],_0x229963);for(let _0x214c92=0x0;_0x214c92<_0x228423['length'];_0x214c92++){if('isRemoved'==_0x216b94&&_0x228423[_0x214c92]['isAdded']||'isAdded'==_0x216b94&&_0x228423[_0x214c92]['isRemoved'])continue;if('text'==_0x228423[_0x214c92]['type']){_0x228423[_0x214c92]['distance']=0x0;continue;}const _0x1d1062=_0x46d192['get'](_0x228423[_0x214c92]['pairId']),_0x215815=_0x46d192['get'](_0x228423[_0x214c92]['id']);_0x228423[_0x214c92]['distance']=_0x1d1062-_0x215815;}}_getRevisionsRange(_0x211283,_0x307db1,_0x108d0b=!0x1){const _0x33a237=[];let _0x32dc8b=this['repository']['getIndex'](_0x211283),_0x1603d1=this['repository']['getIndex'](_0x307db1);for(-0x1==_0x1603d1&&(_0x1603d1=this['repository']['_revisions']['length'],_0x108d0b=!0x1);_0x32dc8b<_0x1603d1;)_0x33a237['push'](this['repository']['getRevision'](_0x32dc8b)),_0x32dc8b++;return _0x108d0b&&_0x33a237['push'](this['repository']['getRevision'](_0x32dc8b)),_0x33a237;}_threeWayMerge(_0x29b7c6,_0x2674b9,_0x96e2b5,_0x3d0bf4){const _0xeac20f=this['editor']['model']['schema'];let _0x579802=_0x2674b9;for(;_0x29b7c6[_0x579802]&&_0x29b7c6[_0x579802]['isAdded'];)_0x579802++;let _0x433a2f=_0x3d0bf4;for(;_0x96e2b5[_0x433a2f]&&_0x96e2b5[_0x433a2f]['isRemoved'];)_0x433a2f++;_0x199d3f(_0x29b7c6,_0x2674b9,_0x579802),_0x199d3f(_0x96e2b5,_0x3d0bf4,_0x433a2f);const _0x4baadd=_0x96e2b5['slice'](_0x3d0bf4,_0x433a2f)['concat'](_0x29b7c6['slice'](_0x2674b9,_0x579802));return _0x4baadd['sort']((_0x1997d7,_0x83b5ff)=>_0x1997d7['side']!=_0x83b5ff['side']?_0x1997d7['side']-_0x83b5ff['side']:_0x1997d7['level']!=_0x83b5ff['level']?_0x1997d7['level']-_0x83b5ff['level']:_0x1997d7['distance']!=_0x83b5ff['distance']?_0x83b5ff['distance']-_0x1997d7['distance']:!!_0x1997d7['isAdded']!=!!_0x83b5ff['isAdded']?-0x1==_0x1997d7['side']||0x0==_0x1997d7['side']?_0x1997d7['isAdded']?-0x1:0x1:_0x1997d7['isAdded']?0x1:-0x1:_0x1997d7['index']-_0x83b5ff['index']),{'commonTape':_0x4baadd,'iEnd':_0x579802,'jEnd':_0x433a2f};function _0x199d3f(_0x2700f4,_0x34e309,_0x144cb0){let _0x28897e=-0x1,_0x3b245b=Number['POSITIVE_INFINITY'],_0x142bfb=!0x0;for(let _0x1b9ada=_0x34e309;_0x1b9ada<_0x144cb0;_0x1b9ada++)if(_0xeac20f['isInline'](_0x2700f4[_0x1b9ada]['item'])||(_0x142bfb=!0x1),_0x2700f4[_0x1b9ada]['item']['startIndex']<_0x34e309&&(_0x28897e=_0x1b9ada),_0x2700f4[_0x1b9ada]['item']['endIndex']>=_0x144cb0){_0x3b245b=_0x1b9ada;break;}_0x142bfb&&(_0x28897e=_0x144cb0-0x1);for(let _0x4da596=_0x34e309;_0x4da596<_0x144cb0;_0x4da596++)_0x2700f4[_0x4da596]['side']=_0x4da596<=_0x28897e?-0x1:_0x4da596<_0x3b245b?0x0:0x1,_0x2700f4[_0x4da596]['index']=_0x4da596;let _0x5561e7=0x0;for(let _0x5aecdd=_0x34e309;_0x5aecdd<=_0x28897e;_0x5aecdd++)0x0==_0x2700f4[_0x5aecdd]['distance']?_0x2700f4[_0x5aecdd]['level']=_0x5561e7:(_0x5561e7++,_0x2700f4[_0x5aecdd]['level']=_0x5561e7,_0x5561e7++);for(let _0x28b615=_0x34e309;_0x28b615<_0x144cb0;_0x28b615++)0x0==_0x2700f4[_0x28b615]['side']&&(_0x2700f4[_0x28b615]['level']=_0x5561e7);_0x5561e7=0x0;for(let _0x3f9f83=_0x144cb0-0x1;_0x3f9f83>=_0x3b245b;_0x3f9f83--)0x0==_0x2700f4[_0x3f9f83]['distance']?_0x2700f4[_0x3f9f83]['level']=_0x5561e7:(_0x5561e7--,_0x2700f4[_0x3f9f83]['level']=_0x5561e7,_0x5561e7--);}}_fixObsoleteTags(_0x94c8e3){const _0x47bf8f=new Map(),_0x34ab96=this['editor']['model']['schema'];for(let _0x55eae2=0x1;_0x55eae2<_0x94c8e3['length'];_0x55eae2++){let _0x520ee7,_0x30502a,_0x10af5;const _0x3b37ec=_0x94c8e3[_0x55eae2],_0x17d853=_0x94c8e3[_0x55eae2-0x1];if('text'==_0x3b37ec['type'])continue;if(_0x3b37ec['type']!=_0x17d853['type'])continue;if(!_0x34ab96['isBlock'](_0x17d853['item'])||_0x34ab96['isLimit'](_0x17d853['item']))continue;if(!_0x34ab96['isBlock'](_0x3b37ec['item'])||_0x34ab96['isLimit'](_0x3b37ec['item']))continue;if((_0x94c8e3[_0x55eae2]['isAdded']||_0x94c8e3[_0x55eae2]['isAddSuggestion'])&&_0x94c8e3[_0x55eae2-0x1]['isRemoved'])_0x520ee7=_0x94c8e3[_0x55eae2],_0x30502a=_0x94c8e3[_0x55eae2-0x1],_0x10af5=_0x55eae2-0x1;else{if(!_0x94c8e3[_0x55eae2]['isRemoved']||!_0x94c8e3[_0x55eae2-0x1]['isAdded']&&!_0x94c8e3[_0x55eae2-0x1]['isAddSuggestion'])continue;_0x520ee7=_0x94c8e3[_0x55eae2-0x1],_0x30502a=_0x94c8e3[_0x55eae2],_0x10af5=_0x55eae2;}const _0x89f986=_0x520ee7['level']==_0x30502a['level'],_0x786e5c=Math['abs'](_0x520ee7['level'])<Math['abs'](_0x30502a['level'])&&0x0==_0x30502a['distance'];(_0x89f986||_0x786e5c)&&(_0x47bf8f['set'](_0x30502a['id'],_0x520ee7['id']),_0x94c8e3['splice'](_0x10af5,0x1),_0x55eae2--,_0x520ee7['isAdded']=!0x1);}for(let _0x41ca9e=0x0;_0x41ca9e<_0x94c8e3['length'];_0x41ca9e++)_0x47bf8f['has'](_0x94c8e3[_0x41ca9e]['pairId'])&&(_0x94c8e3[_0x41ca9e]['pairId']=_0x47bf8f['get'](_0x94c8e3[_0x41ca9e]['pairId']));}['_removeMissingPairs'](_0x38e547){const _0x2a4a84=new Set(_0x38e547['map'](_0x425947=>_0x425947['id']));for(let _0xd67b87=0x0;_0xd67b87<_0x38e547['length'];_0xd67b87++)_0x2a4a84['has'](_0x38e547[_0xd67b87]['pairId'])||0x0==_0x38e547[_0xd67b87]['distance']||(_0x38e547[_0xd67b87]['isIncorrect']=!0x0);return _0x38e547['filter'](_0x5a01f0=>!_0x5a01f0['isIncorrect']);}_markMismatchedRemovedTags(_0x5205db){const _0x1c9680=new Set();for(let _0x285be3=0x0;_0x285be3<_0x5205db['length'];_0x285be3++){if(_0x1c9680['has'](_0x5205db[_0x285be3]['id'])&&_0x5205db[_0x285be3]['isRemoved']&&(_0x5205db[_0x285be3]['isIncorrect']=!0x0),_0x5205db[_0x285be3]['isIncorrect'])continue;if(0x0==_0x5205db[_0x285be3]['distance'])continue;if('elementStart'!=_0x5205db[_0x285be3]['type'])continue;if(null==_0x5205db[_0x285be3]['pairId'])continue;let _0x4ac566=_0x285be3+0x1,_0x5c4fab=0x0;for(;_0x5205db[_0x4ac566]['id']!=_0x5205db[_0x285be3]['pairId'];)'elementStart'==_0x5205db[_0x4ac566]['type']?_0x5c4fab++:'elementEnd'==_0x5205db[_0x4ac566]['type']&&_0x5c4fab--,_0x4ac566++;if(0x0!=_0x5c4fab){if(_0x5205db[_0x285be3]['isRemoved'])_0x5205db[_0x285be3]['isIncorrect']=!0x0;else{for(;_0x4ac566!=_0x285be3;)_0x5205db[_0x4ac566]['isRemoved']&&0x0!=_0x5205db[_0x4ac566]['distance']&&(_0x5205db[_0x4ac566]['isIncorrect']=!0x0,_0x1c9680['add'](_0x5205db[_0x4ac566]['pairId'])),_0x4ac566--;}}}return _0x5205db['filter'](_0xd492da=>!_0xd492da['isIncorrect']);}_removeUnsupportedChanges(_0x4c50fe){const _0x45cd32=this['editor']['model']['schema'];for(let _0x4cabe0=0x0;_0x4cabe0<_0x4c50fe['length'];_0x4cabe0++){if(!(_0x4c50fe[_0x4cabe0]['isAdded']||_0x4c50fe[_0x4cabe0]['isAddSuggestion']||_0x4c50fe[_0x4cabe0]['isRemoved']||_0x4c50fe[_0x4cabe0]['isRemoveSuggestion']))continue;if(0x0==_0x4c50fe[_0x4cabe0]['distance'])continue;const _0x44391e=_0x4c50fe[_0x4cabe0]['item'];_0x45cd32['isBlock'](_0x44391e)||_0x45cd32['isLimit'](_0x44391e)||(_0x4c50fe[_0x4cabe0]['isAdded']&&delete _0x4c50fe[_0x4cabe0]['isAdded'],_0x4c50fe[_0x4cabe0]['isAddSuggestion']&&delete _0x4c50fe[_0x4cabe0]['isAddSuggestion'],_0x4c50fe[_0x4cabe0]['isRemoveSuggestion']&&delete _0x4c50fe[_0x4cabe0]['isRemoveSuggestion'],_0x4c50fe[_0x4cabe0]['isRemoved']&&(_0x4c50fe[_0x4cabe0]['isIncorrect']=!0x0));}return _0x4c50fe['filter'](_0x53fff8=>!_0x53fff8['isIncorrect']);}['_makeModelFromTape'](_0x13c67e,_0x57cf38,_0x4f24a1,_0x5d4c3f){const _0x48efb6=new _0xdc5c7c(),_0x41a1c8=[],_0x3fb3f7=new Map(),_0x224d2d=this['editor']['model'],_0x232bc5=_0x224d2d['schema'],_0x2d4956=[_0x48efb6],_0x5d3d3a={},_0x1fc4c5={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x48efb6['name']=_0x5d4c3f;let _0x733937=null;const _0xde67f1=[0x0];for(let _0x5e4a72=0x0;_0x5e4a72<_0x13c67e['length'];_0x5e4a72++)if('elementStart'===_0x13c67e[_0x5e4a72]['type']){_0x13c67e[_0x5e4a72]['previousPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1);const _0x399c49=new _0x8d1ceb(_0x13c67e[_0x5e4a72]['item']['name'],_0x13c67e[_0x5e4a72]['item']['getAttributes']());_0x2d4956[0x0]['_appendChild'](_0x399c49),_0xde67f1['push'](0x0),_0x2d4956['unshift'](_0x399c49),_0x13c67e[_0x5e4a72]['nextPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1);}else'elementEnd'===_0x13c67e[_0x5e4a72]['type']?(_0x2d4956['shift'](),_0x13c67e[_0x5e4a72]['previousPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1),_0xde67f1['pop'](),_0xde67f1[_0xde67f1['length']-0x1]++,_0x13c67e[_0x5e4a72]['nextPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1)):(_0x13c67e[_0x5e4a72]['previousPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1),_0x733937?_0x733937['_data']+=_0x13c67e[_0x5e4a72]['item']['data']:_0x733937=new _0x1ad521(_0x13c67e[_0x5e4a72]['item']['data'],_0x13c67e[_0x5e4a72]['item']['getAttributes']()),_0x13c67e[_0x5e4a72+0x1]&&'text'===_0x13c67e[_0x5e4a72+0x1]['type']&&_0x1a2cac(_0x733937,_0x13c67e[_0x5e4a72+0x1]['item'])||(_0x2d4956[0x0]['_appendChild'](_0x733937),_0x733937=null),_0xde67f1[_0xde67f1['length']-0x1]+=_0x13c67e[_0x5e4a72]['item']['offsetSize'],_0x13c67e[_0x5e4a72]['nextPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1));for(let _0x3293c6=0x0;_0x3293c6<_0x13c67e['length'];_0x3293c6++){const _0x6d7f88=_0x13c67e[_0x3293c6]['previousPosition'],_0x1f813a=_0x13c67e[_0x3293c6]['nextPosition'];for(const _0x1f15d0 of _0x13c67e[_0x3293c6]['markersStart'])_0x3fb3f7['set'](_0x1f15d0,{'start':_0x6d7f88,'end':null});_0x46042b('isRemoveSuggestion',_0x3293c6,_0x6d7f88,_0x1f813a),_0x46042b('isAddSuggestion',_0x3293c6,_0x6d7f88,_0x1f813a),_0x46042b('isRemoved',_0x3293c6,_0x6d7f88,_0x1f813a),_0x46042b('isAdded',_0x3293c6,_0x6d7f88,_0x1f813a);for(const _0x3e5bee of _0x13c67e[_0x3293c6]['markersEnd']){const _0x2770b2=_0x3fb3f7['get'](_0x3e5bee);_0x2770b2?_0x2770b2['end']=_0x1f813a:_0x3fb3f7['set'](_0x3e5bee,{'start':_0x1f813a,'end':_0x1f813a});}}for(const [_0x25ac70,_0x26f0dc]of _0x3fb3f7){const _0x5764e3=this['editor']['model']['createRange'](_0x26f0dc['start'],_0x26f0dc['end']);_0x48efb6['markers']['set'](_0x25ac70,_0x5764e3);}return _0x41a1c8['sort']((_0x88d13c,_0x325239)=>{const _0x2f6119=_0x48efb6['markers']['get']('revision:'+_0x88d13c['id']),_0x64f7ce=_0x48efb6['markers']['get']('revision:'+_0x325239['id']);return _0x2f6119['start']['isBefore'](_0x64f7ce['start'])?-0x1:_0x2f6119['start']['isAfter'](_0x64f7ce['start'])?0x1:_0x2f6119['end']['isBefore'](_0x64f7ce['end'])?-0x1:_0x2f6119['end']['isAfter'](_0x64f7ce['end'])?0x1:'add'===_0x88d13c['type']?-0x1:0x1;}),{'root':_0x48efb6,'changes':_0x41a1c8};function _0x46042b(_0x2c81f4,_0x2680a5,_0x45bcb7,_0x5b28cd){const _0x17b165=!!_0x13c67e[_0x2680a5][_0x2c81f4],_0x36b924=_0x17b165?_0x13c67e[_0x2680a5][_0x2c81f4]['userId']:null,_0x1ada47=_0x2680a5===_0x13c67e['length']-0x1,_0x564900=_0x1fc4c5[_0x2c81f4][0x0],_0x32cf4f=_0x232bc5['isObject'](_0x13c67e[_0x2680a5]['item']);!_0x5d3d3a[_0x2c81f4]&&_0x17b165?_0x5d3d3a[_0x2c81f4]={'start':_0x45bcb7,'tapeItem':_0x13c67e[_0x2680a5],'userId':_0x36b924,'type':_0x2c81f4}:_0x5d3d3a[_0x2c81f4]&&!_0x17b165?(_0x5d3d3a[_0x2c81f4]['end']=_0x45bcb7,_0x2dce10(_0x5d3d3a[_0x2c81f4]),_0x5d3d3a[_0x2c81f4]=null):_0x5d3d3a[_0x2c81f4]&&_0x17b165&&_0x5d3d3a[_0x2c81f4]['userId']!==_0x36b924&&(_0x5d3d3a[_0x2c81f4]['end']=_0x45bcb7,_0x564900&&_0x564900['userId']===_0x5d3d3a[_0x2c81f4]['userId']||_0x2dce10(_0x5d3d3a[_0x2c81f4]),_0x5d3d3a[_0x2c81f4]={'start':_0x45bcb7,'tapeItem':_0x13c67e[_0x2680a5],'userId':_0x36b924,'type':_0x2c81f4}),_0x5d3d3a[_0x2c81f4]&&_0x32cf4f&&('elementStart'!==_0x13c67e[_0x2680a5]['type']||_0x564900&&_0x564900['userId']===_0x36b924||_0x1fc4c5[_0x2c81f4]['unshift']({'userId':_0x36b924,'object':_0x13c67e[_0x2680a5]['item'],'change':_0x5d3d3a[_0x2c81f4]}),'elementEnd'===_0x13c67e[_0x2680a5]['type']&&_0x564900&&_0x564900['object']===_0x13c67e[_0x2680a5]['item']&&(_0x1fc4c5[_0x2c81f4]['shift'](),_0x5d3d3a[_0x2c81f4]=_0x564900['change'])),_0x5d3d3a[_0x2c81f4]&&_0x1ada47&&(_0x5d3d3a[_0x2c81f4]['end']=_0x5b28cd,_0x2dce10(_0x5d3d3a[_0x2c81f4]),_0x5d3d3a[_0x2c81f4]=null);}function _0x2dce10({start:_0x2ea5f3,end:_0x2d7b95,tapeItem:_0xa8df82,userId:_0x485c54,type:_0x137c80}){const _0x59a951=_0xa8df82['item'],_0x505f84=_0x224d2d['schema']['isBlock'](_0x59a951)&&!_0x224d2d['schema']['isLimit'](_0x59a951),_0x497bf4=_0x2ea5f3['nodeAfter']==_0x2d7b95['parent']&&_0x2d7b95['isAtStart'];if(_0x505f84&&_0x497bf4)return;const _0x2d5703=_0x224d2d['createRange'](_0x2ea5f3,_0x2d7b95),_0x368468=new Ot({'author':_0x57cf38['get'](_0x485c54),'type':'isAdded'==_0x137c80||'isAddSuggestion'==_0x137c80?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x137c80||'isRemoveSuggestion'==_0x137c80},'createdAt':new Date(),'rootName':_0x4f24a1});_0x41a1c8['push'](_0x368468),_0x48efb6['markers']['set']('revision:'+_0x368468['id'],_0x2d5703);}function _0x1a2cac(_0x4dc993,_0x50df85){const _0x10234a=_0x4dc993['getAttributes'](),_0x26ab2b=_0x50df85['getAttributes']();for(const _0x239e9e of _0x10234a){if(_0x239e9e[0x1]!==_0x50df85['getAttribute'](_0x239e9e[0x0]))return!0x1;_0x26ab2b['next']();}return _0x26ab2b['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x188f49=>{const _0xb14fbc=_0x188f49['markerName']['split'](':')[0x1],_0x5e3a06=this['_getChangeFromId'](_0xb14fbc);if(!_0x5e3a06)return null;const _0x5ff80e='add'==_0x5e3a06['type']?'insertion':'deletion',_0x405376=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5ff80e];return _0x5e3a06['data']['isSuggestion']&&_0x405376['push']('ck-suggestion-marker-'+_0x5ff80e+'-new'),this['activeChange']==_0x5e3a06&&_0x405376['push']('ck-suggestion-marker--active'),{'classes':_0x405376,'attributes':{'data-change-id':_0xb14fbc}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3f119d=>{_0x3f119d['on']('element:pre',(_0x5b3e4b,_0x5d7c93,_0x3a14dd)=>{const _0x4ce81e=_0x5d7c93['viewItem']['getChild'](0x0);if(!_0x4ce81e||!_0x4ce81e['is']('element','code'))return;if(!_0x3a14dd['consumable']['consume'](_0x4ce81e,{'attributes':['vid_start','vid_end']}))return;const _0x4f1016=_0x5d7c93['modelRange']['start']['nodeAfter'];_0x3a14dd['writer']['setAttribute']('vid_start',_0x4ce81e['getAttribute']('vid_start'),_0x4f1016),_0x3a14dd['writer']['setAttribute']('vid_end',_0x4ce81e['getAttribute']('vid_end'),_0x4f1016);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x551523=>{_0x551523['on']('element',(_0x17bbfb,_0x2a9b41,_0x4396e8)=>{if(!_0x4396e8['consumable']['consume'](_0x2a9b41['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2a9b41['modelRange']['isCollapsed'])return;const _0x3b217e=_0x2a9b41['modelRange']['start']['nodeAfter'];_0x3b217e['hasAttribute']('vid_start')||_0x3b217e['hasAttribute']('vid')||(_0x4396e8['writer']['setAttribute']('vid_start',_0x2a9b41['viewItem']['getAttribute']('vid_start'),_0x3b217e),_0x4396e8['writer']['setAttribute']('vid_end',_0x2a9b41['viewItem']['getAttribute']('vid_end'),_0x3b217e));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x398258=>_0x398258['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xf798c4,[,_0x22a1a7])=>{['vid_start','vid_end','vid']['includes'](_0x22a1a7)&&(_0xf798c4['return']=!0x0,_0xf798c4['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x14056e=>{_0x14056e['on']('attribute:vid',(_0x1862d7,_0x9d6d9b,_0x46fce7)=>{if('\x20'!=_0x9d6d9b['item']['data']||_0x9d6d9b['item']['parent']['maxOffset']>0x1)return;if(!_0x46fce7['consumable']['consume'](_0x9d6d9b['item'],_0x1862d7['name']))return;const _0x255e82=_0x46fce7['writer'],_0x4fde56=_0x46fce7['mapper']['toViewRange'](_0x9d6d9b['range']);_0x255e82['wrap'](_0x4fde56,_0x255e82['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4c353b){const _0x1b5871=_0x4c353b['plugins']['get']('RevisionViewer');return(_0x1f55a0,_0x324163,_0x92ff64)=>{const _0x1f7cc9=_0x324163['markerName']['split'](':')[0x1],_0xeb206=_0x1b5871['_getChangeFromId'](_0x1f7cc9);if(!_0xeb206)return null;const _0x3cfebd='add'==_0xeb206['type']?'split':'merge';if(!_0x92ff64['consumable']['test'](_0x324163['markerRange'],_0x1f55a0['name']))return;const _0x1ad8ac=_0x324163['markerRange']['getWalker'](),_0x5416ae=_0x324163['markerRange']['start'],_0x4752b9=_0x4c353b['model']['schema'];let _0x4df9b1=null,_0x4187ab=null,_0x37ff4e=!0x1,_0x44d557=!0x1;for(const _0x6dce80 of _0x1ad8ac){const _0x4beb29=_0x6dce80['item'];_0x37ff4e=_0x37ff4e||_0x4752b9['isContent'](_0x4beb29);const _0x2c8ee0=_0x92ff64['mapper']['toViewElement'](_0x4beb29);if(_0x2c8ee0&&_0x2c8ee0['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x6dce80['type']&&(_0x4752b9['isBlock'](_0x4beb29)&&!_0x4752b9['isLimit'](_0x4beb29)&&(_0x4beb29['nextSibling']||_0x5416ae['isAtEnd']?_0x4df9b1&&_0x4df9b1['parent']==_0x4beb29||(_0x4df9b1=_0x4beb29,_0x628944(_0x6dce80['previousPosition']),_0x44d557=!0x0):_0x4187ab=_0x4187ab||_0x6dce80['previousPosition']));}function _0x628944(_0x4f44ce){const _0x4e3e81=_0x92ff64['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3cfebd}),_0x4eba34=_0x92ff64['mapper']['toViewPosition'](_0x4f44ce);_0xeb206['data']['isSuggestion']&&_0x92ff64['writer']['addClass']('ck-suggestion-marker-'+_0x3cfebd+'-new',_0x4e3e81),_0x1b5871['activeChange']==_0xeb206&&_0x92ff64['writer']['addClass']('ck-suggestion-marker--active',_0x4e3e81),_0x92ff64['writer']['insert'](_0x4eba34,_0x4e3e81),_0x92ff64['mapper']['bindElementToMarker'](_0x4e3e81,_0x324163['markerName']);}_0x37ff4e||_0x44d557||!_0x4187ab||_0x628944(_0x4187ab);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1ec69a,_0x26a10d,_0x47c5ae)=>{const _0x23dd01=_0x47c5ae['mapper']['markerNameToElements'](_0x26a10d['markerName']);if(_0x23dd01){for(const _0x11d508 of _0x23dd01)(_0x11d508['hasClass']('ck-suggestion-marker-split')||_0x11d508['hasClass']('ck-suggestion-marker-merge'))&&(_0x47c5ae['mapper']['unbindElementFromMarkerName'](_0x11d508,_0x26a10d['markerName']),_0x47c5ae['writer']['remove'](_0x11d508));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x40d04f,_0x27504b,_0x5274cd)=>{const _0x556316=_0x27504b['markerName']['split'](':')[0x1],_0x153924=this['_getChangeFromId'](_0x556316);if(!_0x153924)return null;const _0x4d08cd='add'==_0x153924['type']?'split':'merge';if(_0x5274cd['consumable']['test'](_0x27504b['markerRange'],_0x40d04f['name']))for(const _0x35f0db of _0x27504b['markerRange']['getItems']()){if(!_0x35f0db['is']('element','softBreak'))continue;const _0x3d92d0=_0x5274cd['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4d08cd}),_0xc4df13=_0x5274cd['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x35f0db));_0x153924['data']['isSuggestion']&&_0x5274cd['writer']['addClass']('ck-suggestion-marker-'+_0x4d08cd+'-new',_0x3d92d0),this['activeChange']==_0x153924&&_0x5274cd['writer']['addClass']('ck-suggestion-marker--active',_0x3d92d0),_0x5274cd['writer']['insert'](_0xc4df13,_0x3d92d0),_0x5274cd['mapper']['bindElementToMarker'](_0x3d92d0,_0x27504b['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1c9d73=>{for(const _0x2e7945 of this['editor']['model']['document']['getRootNames']()){const _0x4d88d0=this['editor']['model']['document']['getRoot'](_0x2e7945),_0x52d8d4=this['editor']['editing']['view']['document']['getRoot'](_0x2e7945);if(_0x52d8d4){const _0x218d1b=_0x4d88d0['getAttribute']('revisionHistoryAttachChange');if(_0x1c9d73['removeAttribute']('data-change-id',_0x52d8d4),_0x1c9d73['removeClass']('ck-revision-history-root-add',_0x52d8d4),_0x1c9d73['removeClass']('ck-revision-history-root-remove',_0x52d8d4),_0x1c9d73['removeClass']('ck-revision-history-root--active',_0x52d8d4),_0x218d1b){const _0x2ab70a=this['_getChangeFromId'](_0x218d1b);if(!_0x2ab70a)return null;_0x1c9d73['setAttribute']('data-change-id',_0x218d1b,_0x52d8d4),_0x1c9d73['addClass']('ck-revision-history-root-'+_0x2ab70a['type'],_0x52d8d4),this['activeChange']==_0x2ab70a&&_0x1c9d73['addClass']('ck-revision-history-root--active',_0x52d8d4);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4c75be=>'revision-comment:'+_0x4c75be,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x178e7b=>'revision-suggestion:'+_0x178e7b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x6b9a3c=>({'name':'suggestion:'+_0x6b9a3c,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x2d7abb=>{const _0x3b6d2a=_0x2d7abb['markerName']['split'](':')[0x1];return'insertion'!=_0x3b6d2a&&'deletion'!=_0x3b6d2a?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3b6d2a]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3fa491,_0x2b2b98,_0x25ef37)=>{const _0x222c87=_0x25ef37['mapper']['markerNameToElements'](_0x2b2b98['markerName']);if(_0x222c87){for(const _0x130ab2 of _0x222c87)_0x130ab2['is']('uiElement')&&(_0x25ef37['mapper']['unbindElementFromMarkerName'](_0x130ab2,_0x2b2b98['markerName']),_0x25ef37['writer']['remove'](_0x130ab2));}},{'priority':'high'});}_getChangeFromId(_0x527269){return this['_changeIdToChange']['get'](_0x527269);}_getViewForChange(_0x238cd9){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x238cd9),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4f7ef2,_0x27db2e,_0x185864,_0x424a8a)=>{_0x424a8a&&this['_balloon']['remove'](_0x424a8a),_0x185864&&(this['_balloon']['add']({'view':_0x185864,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x506f9b=this['editor']['editing'],_0x412576=this['_getChangeFromId'](_0x185864['changeId']);let _0x546d24;if(_0x412576['data']['isOnRoot']){const _0x59d11e=_0x506f9b['view']['getDomRoot'](_0x412576['rootName']);_0x546d24=Array['from'](_0x59d11e['getClientRects']());}else{const _0x2e3882=this['editor']['model']['markers']['get']('revision:'+_0x185864['changeId']);_0x546d24=Array['from'](_0x506f9b['mapper']['markerNameToElements'](_0x2e3882['name']))['map'](_0x11f309=>_0x506f9b['view']['domConverter']['mapViewToDom'](_0x11f309))['map'](_0x3b56aa=>Array['from'](_0x3b56aa['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x546d24['find'](_0x589975=>_0x589975['top']-0x3<=this['_activeViewTarget']['y']&&_0x589975['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x589975['left']-0x3<=this['_activeViewTarget']['x']&&_0x589975['right']+0x3>=this['_activeViewTarget']['x'])||_0x546d24[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x39e01a,_0x26cfc1,_0x1d2de2,_0x44d02b)=>{this['activeView']=_0x1d2de2?this['_getViewForChange'](_0x1d2de2):null,this['editor']['model']['change'](()=>{const _0x1fe402=this['editor']['editing'];_0x44d02b&&(_0x44d02b['data']['isOnRoot']?_0x1fe402['view']['change'](_0x349c33=>{_0x349c33['removeClass']('ck-revision-history-root--active',_0x1fe402['view']['document']['getRoot'](_0x44d02b['rootName']));}):_0x1fe402['reconvertMarker']('revision:'+_0x44d02b['id'])),_0x1d2de2&&(_0x1d2de2['data']['isOnRoot']?_0x1fe402['view']['change'](_0x34215f=>{_0x34215f['addClass']('ck-revision-history-root--active',_0x1fe402['view']['document']['getRoot'](_0x1d2de2['rootName']));}):_0x1fe402['reconvertMarker']('revision:'+_0x1d2de2['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x535c26,_0x1ea513)=>{if(this['activeChange'])return;const _0x3463ac=this['_findChangeIdFromDomTarget'](_0x1ea513['target']),_0x55dacd=this['_changeIdToChange']['get'](_0x3463ac);_0x55dacd?(this['_activeViewTarget']={'x':_0x1ea513['domEvent']['x'],'y':_0x1ea513['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x55dacd)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2eeafb,_0x23eb0f)=>{const _0x51c76e=this['_findChangeIdFromDomTarget'](_0x23eb0f['target']),_0x4d6ae4=this['_changeIdToChange']['get'](_0x51c76e);_0x4d6ae4?(this['_activeViewTarget']={'x':_0x23eb0f['domEvent']['x'],'y':_0x23eb0f['domEvent']['y']},_0x4d6ae4===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x4d6ae4):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x5011bd){do{const _0x34869c=_0x5011bd['getAttribute']('data-change-id');if(_0x34869c)return _0x34869c;_0x5011bd=_0x5011bd['parent'];}while(_0x5011bd);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5282c3=>{for(const _0x22df64 of this['editor']['model']['markers'])_0x5282c3['removeMarker'](_0x22df64);});}};function Vt(_0x2c33a1,_0x14a718){return(_0x1b3aa3,_0x4f06e2,_0x2048eb)=>{if(!_0x2048eb['consumable']['test'](_0x4f06e2['markerRange'],_0x1b3aa3['name']))return;const _0x16b1cf=_0x4f06e2['markerRange']['getWalker'](),_0x41b836=_0x4f06e2['markerRange']['start'],_0x4ba28b=_0x2c33a1['model']['schema'];let _0xb816cc=null,_0x1da973=null,_0x246715=!0x1,_0x2dcedd=!0x1;for(const _0x596963 of _0x16b1cf){const _0x253582=_0x596963['item'];_0x246715=_0x246715||_0x4ba28b['isContent'](_0x253582);const _0x15f564=_0x2048eb['mapper']['toViewElement'](_0x253582);if(_0x15f564&&_0x15f564['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x596963['type']&&(_0x4ba28b['isBlock'](_0x253582)&&!_0x4ba28b['isLimit'](_0x253582)&&(_0x253582['nextSibling']||_0x41b836['isAtEnd']?_0xb816cc&&_0xb816cc['parent']==_0x253582||(_0xb816cc=_0x253582,_0x4f47a7(_0x596963['previousPosition']),_0x2dcedd=!0x0):_0x1da973=_0x1da973||_0x596963['previousPosition']));}function _0x4f47a7(_0x4b859e){const _0x1095d0=_0x2048eb['mapper']['toViewPosition'](_0x4b859e),_0x16d09f=_0x2048eb['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x14a718});_0x2048eb['writer']['insert'](_0x1095d0,_0x16d09f),_0x2048eb['mapper']['bindElementToMarker'](_0x16d09f,_0x4f06e2['markerName']);}_0x246715||_0x2dcedd||!_0x1da973||_0x4f47a7(_0x1da973);};}var Dt=class extends _0x29f6e0{constructor(_0x36fe47){super(_0x36fe47);const _0x52528a=_0x36fe47['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x52528a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x52528a,'change:isEnabled',()=>this['refresh']());}execute(){const _0x34ca0b=this['editor'],_0x5d2144=_0x34ca0b['plugins']['get'](Mt),_0x1dfcec=_0x5d2144['isReady']?_0x5d2144['diff']['newRevisionId']:null;_0x34ca0b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1dfcec);}['refresh'](){const {isReady:_0x3b5fe1,isEnabled:_0x25faec,repository:_0x542726,diff:_0x444685}=this['editor']['plugins']['get'](Mt),_0x1fd664=_0x444685&&_0x542726['getLaterVisibleRevision'](_0x444685['newRevisionId']);this['isEnabled']=_0x3b5fe1&&_0x25faec&&Boolean(_0x1fd664);}},Tt=class extends _0x29f6e0{_step;constructor(_0x383641,{direction:_0x2b0566}){super(_0x383641);const _0x5ce424=_0x383641['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x2b0566?0x1:-0x1,this['listenTo'](_0x5ce424,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5ce424,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5ce424,'change:activeChange',()=>this['refresh']());}execute(){const _0x446c8b=this['editor'],_0x138ff9=_0x446c8b['plugins']['get'](Mt),{isNavigationMode:_0x3983b8,currentChangeNumber:_0x4c0836}=_0x138ff9;let _0x466771;if(_0x138ff9['activeChange']=_0x3983b8?_0x138ff9['diff']['changes']['get'](_0x4c0836+this['_step']):_0x138ff9['diff']['changes']['first'],_0x138ff9['activeChange']['data']['isOnRoot'])_0x466771=_0x446c8b['editing']['view']['getDomRoot'](_0x138ff9['activeChange']['rootName']);else{const _0x24a978=_0x446c8b['model']['markers']['get']('revision:'+_0x138ff9['activeChange']['id']);_0x466771=_0x4a37b2(_0x446c8b['editing'],_0x24a978);}_0x2382f3({'target':_0x466771,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x304d1b,currentChangeNumber:_0x2c3a7c,numberOfChanges:_0x4696be,isReady:_0x39c113,isEnabled:_0x2c6b7c}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x2c6b7c&&_0x39c113&&_0x4696be)&&(!_0x304d1b||(0x1===this['_step']?_0x2c3a7c<_0x4696be-0x1:_0x2c3a7c>0x0));}},Ht=class extends at{constructor(_0x5980ae){super(_0x5980ae);const _0x3ce388=this['bindTemplate'],_0x100064=new _0x112eb0(_0x5980ae),_0x490159=new _0x112eb0(_0x5980ae);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',(_0x3accb5,_0x193147)=>_0x3accb5&&_0x193147>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4e2e35,_0x1703d3,_0x3f221e,_0x303da0)=>{if(!_0x4e2e35)return pt(_0x5980ae,'Loading...');if(!_0x3f221e)return pt(_0x5980ae,'No\x20changes');const _0x3bc1b8=pt(_0x5980ae,'NUMBER_OF_CHANGES',_0x3f221e);return _0x303da0?pt(_0x5980ae,'X_OF_Y_CHANGES',[_0x1703d3+0x1,_0x3f221e]):_0x3bc1b8;}),_0x100064['set']({'label':pt(_0x5980ae,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x70c06a}),_0x490159['set']({'label':pt(_0x5980ae,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4eb334}),_0x100064['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x490159['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x100064['on']('execute',()=>this['fire']('execute','backward')),_0x490159['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',_0x3ce388['if']('_isStatusLabelVisible','ck-hidden',_0x12e8c1=>!_0x12e8c1)]},'children':[{'text':_0x3ce388['to']('isNavigationMode',_0x533e37=>_0x533e37?pt(_0x5980ae,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x5980ae,'Total')+':\x20')}]},{'text':_0x3ce388['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x100064,_0x490159]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x57c795{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x44a22e=this['editor']['editing']['view'];_0x44a22e['change'](_0x53de01=>{for(const _0x87460e of _0x44a22e['document']['roots'])_0x53de01['addClass'](Pt,_0x87460e);});}['hide'](){const _0x437b58=this['editor']['editing']['view'];_0x437b58['change'](_0x5176b6=>{for(const _0x29c074 of _0x437b58['document']['roots'])_0x5176b6['removeClass'](Pt,_0x29c074);});}},Lt=class extends _0x57c795{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt,Ut];}init(){const _0x435e1f=this['editor'],_0x8777b7=_0x435e1f['plugins']['get'](Mt),_0x26cf68=_0x435e1f['plugins']['get'](Ut);_0x435e1f['ui']['componentFactory']['add']('exitToEditing',_0x534f9f=>{const _0x2b7169=new _0x112eb0(_0x534f9f);return _0x2b7169['set']({'label':pt(_0x534f9f,'Back\x20to\x20editing'),'icon':_0x3ba824,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2b7169,'execute',()=>{_0x435e1f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2b7169;}),_0x435e1f['ui']['componentFactory']['add']('restoreRevision',_0x44fe5e=>{const _0x589e26=new _0x112eb0(_0x44fe5e);return _0x589e26['set']({'label':pt(_0x44fe5e,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x589e26['bind']('isEnabled')['to'](_0x435e1f['commands']['get']('restoreRevision')),this['listenTo'](_0x589e26,'execute',()=>_0x435e1f['execute']('restoreRevision')),_0x589e26;}),_0x435e1f['ui']['componentFactory']['add']('changesNavigation',_0x3f4ae3=>{const _0x5a42c4=new Ht(_0x3f4ae3),_0x97f09f=_0x435e1f['commands']['get']('showPreviousChange'),_0x250e85=_0x435e1f['commands']['get']('showNextChange');return _0x5a42c4['bind']('isBackwardNavigationEnabled')['to'](_0x97f09f,'isEnabled'),_0x5a42c4['bind']('isForwardNavigationEnabled')['to'](_0x250e85,'isEnabled'),_0x5a42c4['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x8777b7),this['listenTo'](_0x5a42c4,'execute',(_0x361efb,_0x4b5f6c)=>{_0x435e1f['execute']('forward'===_0x4b5f6c?'showNextChange':'showPreviousChange');}),_0x5a42c4;}),_0x26cf68['show'](),_0x8777b7['on']('change:isReady',(_0x13279c,_0x4b658e,_0x4ca3ca)=>{_0x4ca3ca?_0x26cf68['hide']():_0x26cf68['show']();});}},Ft=class extends _0xd50028{['_resizeObserver']=null;constructor(_0x996fc5,_0x19dae6){super(_0x996fc5,_0x19dae6);const _0x3c5fdd=this['bindTemplate'];this['set']({'label':pt(_0x996fc5,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x996fc5,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3c5fdd['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x2261be(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x13ca39=this['fieldView']['element'];this['_tooltipString']=_0x13ca39['scrollWidth']>_0x13ca39['clientWidth']&&_0x13ca39['value']||'';}},$t=class extends at{constructor(_0xa87d9,_0x402c09,_0x5f44c8){super(_0xa87d9);const _0xe06582=new _0x56e938();_0xe06582['set']({'content':_0x51cd25,'viewBox':'0\x200\x2011\x2010'});const _0xf698f=['ck','ck-revision-history-sidebar__revision-author'];_0x5f44c8&&_0xf698f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2c9fb7=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0xa87d9,_0x5f44c8?'Revision\x20creator':'Revision\x20author')},'children':[_0xe06582,_0x402c09['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xf698f},'children':_0x2c9fb7});}};function jt(_0x8657ed,_0xa05507){const _0x27c097=_0x8657ed['bindTemplate'],_0x183080=_0x8657ed['locale'],_0x1a1cdb=ct(_0x183080);_0x1a1cdb['panelPosition']='sw';const _0x2d21f0=function(_0x5e6a40,_0x581201){const _0x220015=function(_0x585773,_0x269929){const _0x1e0b97=_0x585773['locale'],_0x349343={'Compare\x20against\x20selected':pt(_0x1e0b97,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x1e0b97,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x1e0b97,'Restore\x20this\x20revision')};return _0x269929['map'](_0x28ee04=>{const _0x2f5176=_0x349343[_0x28ee04['name']];return _0x2f5176&&_0x2f5176!==_0x28ee04['name']&&(_0x28ee04['name']=_0x2f5176),_0x28ee04;});}(_0x5e6a40,_0x581201),_0x32c629=new _0x4a1e3f();for(const _0x318b30 of _0x220015){const _0x48cfaa={'type':'button','model':new rt({'label':_0x318b30['name'],'class':_0x318b30['class'],'withText':!0x0,'role':'menuitem','_action':_0x318b30['action']})};_0x48cfaa['model']['bind']('isEnabled')['to'](_0x5e6a40,'isActionsDropdownOpen',_0x17b2cc=>'function'!=typeof _0x318b30['isEnabled']||(!_0x17b2cc||_0x318b30['isEnabled'](_0x5e6a40))),_0x32c629['add'](_0x48cfaa);}return _0x32c629;}(_0x8657ed,_0xa05507);return _0x8657ed['bind']('isActionsDropdownOpen')['to'](_0x1a1cdb,'isOpen'),_0x1a1cdb['buttonView']['set']({'label':pt(_0x183080,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x482ded}),_0x1a1cdb['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x27c097['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x27c097['to'](_0x280b1f=>_0x280b1f['stopPropagation']())}}),_0x1a1cdb['on']('execute',_0x358317=>{_0x8657ed['isReady']&&'function'==typeof _0x358317['source']['_action']&&_0x358317['source']['_action'](_0x8657ed);}),ht(_0x1a1cdb,_0x2d21f0,{'role':'menu'}),_0x1a1cdb['listenTo'](_0x8657ed,'change:isActionsDropdownOpen',(_0x628704,_0x266a65,_0x4095a2)=>{if(_0x4095a2)for(const _0x58237e of _0x1a1cdb['listView']['items']){const _0x37d985=_0x58237e['children']['first'],_0x2bf05a=_0xa05507['find'](_0xc40f2=>_0xc40f2['action']===_0x37d985['_action'])['isVisible'];_0x58237e['isVisible']=void 0x0===_0x2bf05a||_0x2bf05a(_0x8657ed);}}),_0x1a1cdb;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x5d1660(at);var Kt=class extends Bt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;constructor(_0x30ffb0,_0xe06364,_0x3c9f8f,_0x39f869){super(_0x30ffb0);const _0xd81e9a=this['bindTemplate'],_0x2bd7f5=function(_0x9f8ab4,_0x2c848f){const _0x51ae9a=Array['from'](_0x2c848f['authors'])['filter'](_0x167516=>_0x167516!=_0x2c848f['creator']);return _0x2c848f['creator']&&_0x51ae9a['unshift'](_0x2c848f['creator']),_0x51ae9a['map'](_0x2e9913=>new $t(_0x9f8ab4,_0x2e9913,_0x2e9913==_0x2c848f['creator']));}(_0x30ffb0,_0xe06364);this['id']=_0xe06364['id'],this['_revision']=_0xe06364,this['_requireRevisionName']=_0x39f869,this['bind']('name','createdAt')['to'](_0xe06364),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x15fd9e=>{return _0x3294c4=_0x30ffb0['uiLanguage'],(_0x4995d2=_0x15fd9e)['toLocaleDateString'](_0x3294c4,{'month':'long','day':'numeric'})+',\x20'+_0x4995d2['toLocaleTimeString'](_0x3294c4,{'hour':'numeric','minute':'numeric'});var _0x3294c4,_0x4995d2;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x30ffb0,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3b0da7=>_0x3b0da7||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5671c9,_0x1afdea)=>_0x5671c9&&_0x1afdea),this['revisionActionsView']=_0x3c9f8f&&_0x3c9f8f['length']?jt(this,_0x3c9f8f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xd81e9a['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xd81e9a['if']('isEnabled','ck-disabled',_0x168884=>!_0x168884),_0xd81e9a['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xd81e9a['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xd81e9a['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':_0xd81e9a['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':_0x2bd7f5}]},this['revisionActionsView']],'on':{'click':_0xd81e9a['to'](_0x843a3e=>{_0x843a3e['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x25d193=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x25d193,'change',()=>{this['_requireRevisionName']&&!_0x25d193['value']||this['fire']('setName',{'id':this['id'],'name':_0x25d193['value']}),_0x25d193['value']||(_0x25d193['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(_0x5e6e9d,_0x1fd797){const _0x2ee728=ft['fromJSDate'](_0x5e6e9d)['setLocale'](_0x1fd797),_0x48ac03=ft['local'](),_0x27f656=_0x48ac03['minus']({'days':0x1})['startOf']('day');let _0x59097b,_0x45917c;return _0x2ee728['hasSame'](_0x48ac03,'day')?(_0x59097b=_0x2ee728['startOf']('day')['toJSDate'](),_0x45917c=_0x2ee728['toRelativeCalendar']()):_0x2ee728['hasSame'](_0x27f656,'day')?(_0x59097b=_0x27f656['toJSDate'](),_0x45917c=_0x2ee728['toRelativeCalendar']()):_0x2ee728['hasSame'](_0x48ac03,'week')?(_0x59097b=_0x2ee728['startOf']('week')['toJSDate'](),_0x45917c=_0x2ee728['weekdayLong']||''):_0x2ee728['hasSame'](_0x48ac03,'year')?(_0x59097b=_0x2ee728['startOf']('month')['toJSDate'](),_0x45917c=_0x2ee728['monthLong']||''):(_0x59097b=_0x2ee728['startOf']('year')['toJSDate'](),_0x45917c=String(_0x2ee728['year'])),{'startDate':_0x59097b,'localizedPeriodName':_0x45917c};}var Gt=class extends at{startDate;['revisionViews'];_revisionActions;_requireRevisionName;constructor(_0x7f4f51,_0x4cb52a,_0x2b5597,_0x2b1fdf){super(_0x7f4f51);const _0x1f9515=qt(_0x4cb52a,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4cb52a,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x2b5597,this['_requireRevisionName']=_0x2b1fdf,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':_0x1f9515}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1141b2){const _0x4821b9=new Kt(this['locale'],_0x1141b2,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4821b9);}['removeRevision'](_0x7309e0){const _0x11b5ab=this['revisionViews']['find'](_0x141802=>_0x141802['id']===_0x7309e0['id']);this['revisionViews']['remove'](_0x11b5ab);}},Jt=class extends at{constructor(_0x2e2f08){super(_0x2e2f08);const _0x28992e=new _0x56e938();_0x28992e['content']=_0x116443,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x28992e,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x2e2f08,'Revision\x20history')]}]});}},Wt=class extends at{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;constructor(_0x1bf6da,_0x66f67b,_0x5cdbce,_0xfeac52){super(_0x1bf6da);const _0x980ea2=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x66f67b,this['_revisionActions']=_0x5cdbce,this['_requireRevisionName']=_0xfeac52,this['on']('select',(_0x144ca5,_0x55e94)=>{this['fire']('revisionSelected',_0x55e94);}),this['on']('setName',(_0x5bd7e8,_0x527c54)=>{this['fire']('revisionSetName',_0x527c54);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x1bf6da),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x980ea2['if']('isEnabled','ck-disabled',_0x2823d5=>!_0x2823d5)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xce31e0 of this['_revisions'])this['_addRevision'](_0xce31e0);this['_revisions']['on']('add',(_0x1f0507,_0x18c728)=>{this['_addRevision'](_0x18c728);}),this['_revisions']['on']('remove',(_0x1d7436,_0x116a68)=>{this['_removeRevision'](_0x116a68);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x411c8e=>_0x411c8e['revisionViews']['map'](_0x4183b8=>_0x4183b8))['flat']();}selectRevision(_0x500ca4){for(const _0x52ee53 of this['revisionViews'])_0x500ca4&&_0x500ca4['id']===_0x52ee53['id']?_0x52ee53['select']():_0x52ee53['deselect']();}highlightRevisions(_0x5b3840){for(const _0x3819d3 of this['revisionViews'])_0x5b3840['some'](({id:_0x438d40})=>_0x438d40===_0x3819d3['id'])?_0x3819d3['highlight']():_0x3819d3['unhighlight']();}['_addRevision'](_0x460dc2){const _0x26d0b0=qt(_0x460dc2['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x46c8a5=this['_getTimePeriodViewByStartDate'](_0x26d0b0);_0x46c8a5||(_0x46c8a5=new Gt(this['locale'],_0x26d0b0,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x46c8a5)),_0x46c8a5['addRevision'](_0x460dc2);}['_removeRevision'](_0x12b0dc){const _0x3867a1=qt(_0x12b0dc['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x3867a1)['removeRevision'](_0x12b0dc);}_getTimePeriodViewByStartDate(_0x199d4c){return this['timePeriodViews']['find'](_0x5e13dc=>_0x5e13dc['startDate']['getTime']()===_0x199d4c['getTime']());}},Yt=class RevisionsSidebar extends _0x57c795{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt];}constructor(
|
|
30
|
-
_0x37aa64(_0x1839d1);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1eeb36,_0x112891){super(_0x112891),this['sourceElement']=_0x1eeb36,this['model']['document']['createRoot']();const _0x3fd525=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x3fd525);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x116684,_0x44fd7b){const _0x518514=new this(_0x116684,_0x44fd7b);return await _0x518514['initPlugins'](),await _0x518514['ui']['init'](_0x116684),await _0x518514['data']['init'](_0x518514['config']['get']('initialData')||''),_0x518514['fire']('ready'),_0x518514;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x3bf7c2{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x14a1c6){super(_0x14a1c6),this['result']='end',_0x14a1c6['editing']['view']['_overlayModeHint']='auto',_0x14a1c6['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x3bf7c2{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_t,St];}constructor(_0x28239f){if(super(_0x28239f),!this['editor']['config']['get']('revisionHistory'))throw new _0x5b13e7('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x30bc0c=>this['_showRevisionViewer']({..._0x30bc0c,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x246618=>this['_closeRevisionViewer'](_0x246618)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4f1768=>this['_restoreRevision'](_0x4f1768)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x33193c){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x33193c;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x2b8c51){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x2b8c51);}getRevision(_0x29b0d7){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x29b0d7);}getRevisions(_0x2db155){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2db155||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0xa95502=this['editor'],_0x1c75a6=_0x4ac0b0(_0xa95502,ii),_0x30ca34=_0xa95502['plugins']['get']('RevisionTracker'),_0x44c564=_0xa95502['plugins']['get'](_0x403926)['users'];return _0x1c75a6['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1c75a6['lazyRoots'],(_0x1c75a6['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x3bf7c2{static get requires(){return[Mt,_0x403926];}init(){const _0x344490=this['editor']['plugins']['get'](_0x403926);for(const _0x3677d1 of _0x44c564)_0x3677d1['isAnonymous']||_0x344490['getUser'](_0x3677d1['id'])||_0x344490['addUser'](_0x3677d1);const _0x27e4d5=_0x30ca34['repository']['getRevisions']();let _0x20f797=null;const _0x307c08=this['editor']['plugins']['get']('RevisionViewer');_0x307c08['adapter']=_0x30ca34['adapter'],_0x307c08['bind']('isEnabled')['to'](_0x30ca34),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xa95502,'isReadOnly',_0x17c6e0=>!_0x17c6e0);for(const _0x355545 of _0x27e4d5){const _0x1e1027=null===_0x355545['creator'];if(_0x1e1027&&_0x355545['toVersion']===_0x355545['fromVersion'])continue;const _0x29c53d=_0x355545['toJSON']();_0x307c08['addRevisionData'](_0x29c53d,(_0x10ff06,_0x3a07a9,_0x571e2a)=>{if(_0x1e1027){if(_0x20f797)_0x20f797['_update'](_0x10ff06,_0x3a07a9);else{if(!_0x3a07a9){const _0xc0ef1d=_0x571e2a['toJSON']();_0xc0ef1d['id']=_0x49a83a(),_0x30ca34['saveRevision'](_0xc0ef1d,_0x571e2a['toVersion'])['then'](_0x1784d2=>{_0x20f797=_0x1784d2;});}}}else _0x355545['_update'](_0x10ff06,_0x3a07a9);});}}},Yt),_0x1c75a6);}['_enhanceShowRevisionViewerCallback'](){const _0x3e4a4a=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1d114f=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x1d114f['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x163a2f=this['editor']['plugins']['get']('Dialog');_0x163a2f['isOpen']&&_0x163a2f['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x13ee28=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x592682 of _0x13ee28)_0x592682['class']=_0x592682['class']?_0x592682['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x22d7f1=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x22d7f1&&_0x22d7f1['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x521eb5=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x521eb5&&_0x521eb5['setAttribute']('tabindex','-1');}}const _0x31ecec=this['_getRevisionViewerEditorConfig']();return _0x3e4a4a(_0x31ecec)['then'](_0x2b1c92=>(this['_viewerEditor']=_0x2b1c92,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'),_0x2b1c92))['catch'](_0x1f0e92=>(console['error'](_0x1f0e92),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3fe6d2=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 _0x3313fe=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x34ff0d of _0x3313fe)_0x34ff0d['class']='ck-tab-panel_disabled'===_0x34ff0d['class']?'':_0x34ff0d['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5e450a=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5e450a&&_0x5e450a['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x50072c=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x50072c&&_0x50072c['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3fe6d2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x28d2b5=this['editor']['plugins']['get']('Annotations');_0x28d2b5['refreshVisibility'](),_0x28d2b5['refreshPositioning']();}});});}['_showRevisionViewer'](_0x462e71){const _0x237232=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4fe92b=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x22b507=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x22b507,_0x462e71)['then'](_0x3ef553=>(_0x4fe92b['style']['display']='block',_0x237232['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3ef553));}['_closeRevisionViewer'](_0x50a89c){const _0x244bfc=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x244bfc['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x50a89c['destroy']();}async _restoreRevision(_0x520fd2){const _0x16f483=this['editor'],_0x4e0ff5=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2bcaa3=_0x16f483['plugins']['get']('RevisionTracker'),_0x4a788e=_0x16f483['plugins']['get']('RevisionHistoryUtils'),_0x518587=_0x4e0ff5['repository']['getRevision'](_0x520fd2);let _0x35937e,_0x4e7a98,_0x3ac310;try{await _0x4a788e['loadRevisionData'](_0x518587,this['adapter']),_0x35937e=_0x4a788e['getRevisionDocumentData'](_0x518587),_0x4e7a98=_0x4a788e['getRevisionRootsAttributes'](_0x518587);}catch(_0x4ebd3d){return void console['error'](_0x4ebd3d);}_0x16f483['model']['change'](_0x27617d=>{for(const _0x20e247 of Array['from'](_0x16f483['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x27617d['removeMarker'](_0x20e247);}),_0x4e0ff5['isReady']=!0x1,_0x16f483['model']['enqueueChange'](_0x1046b5=>{_0x1046b5['setSelection'](null),_0x1046b5['removeSelectionAttribute'](_0x16f483['model']['document']['selection']['getAttributeKeys']());const _0x5be869=Object['keys'](_0x35937e);for(const _0x337a06 of _0x16f483['model']['document']['roots'])'$graveyard'!=_0x337a06['rootName']&&_0x337a06['isAttached']()&&!_0x5be869['includes'](_0x337a06['rootName'])&&_0x1046b5['detachRoot'](_0x337a06);for(const _0x7dbaa3 of _0x5be869){let _0xe47518=_0x16f483['model']['document']['getRoot'](_0x7dbaa3);if(!_0xe47518||!_0xe47518['isAttached']()){const _0x6d7f8=_0x518587['diffData']?.[_0x7dbaa3]?.['rootElementName']||'$root';_0xe47518=_0x1046b5['addRoot'](_0x7dbaa3,_0x6d7f8);}const _0x4e7c18=_0x4e7a98[_0x7dbaa3],_0x26afb0=Object['keys'](_0x4e7c18),_0x3347d7=_0x35937e[_0x7dbaa3];for(const _0x3feb8f of _0xe47518['getAttributeKeys']())_0x26afb0['includes'](_0x3feb8f)||_0x1046b5['removeAttribute'](_0x3feb8f,_0xe47518);for(const _0xfedeed of _0x26afb0)_0x1046b5['setAttribute'](_0xfedeed,_0x4e7a98[_0x7dbaa3][_0xfedeed],_0xe47518);_0x1046b5['remove'](_0x1046b5['createRangeIn'](_0xe47518)),_0x1046b5['insert'](_0x16f483['data']['parse'](_0x3347d7,_0xe47518),_0xe47518,0x0);}});const _0x8ce392=pt(_0x16f483['locale'],'Restored');if(_0x518587['name'])_0x3ac310=-0x1==_0x518587['name']['indexOf'](_0x8ce392)?_0x8ce392+':\x20'+_0x518587['name']:_0x518587['name'];else _0x3ac310=_0x8ce392+':\x20'+(_0x518587['createdAt']['toLocaleDateString'](_0x16f483['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x518587['createdAt']['toLocaleTimeString'](_0x16f483['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2bcaa3['saveRevision']({'name':_0x3ac310}),_0x4e0ff5['isReady']=!0x0,_0x16f483['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
|
|
29
|
+
Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt];}constructor(_0x1597c0){super(_0x1597c0),this['_revisionViewer']=_0x1597c0['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x4ae7d5=this['_revisionsRepository']['_revisions'],_0x2ebd70=this['_createRevisionActions'](),_0x394009=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x4ae7d5,_0x2ebd70,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x23b6a4,_0x3aae8e)=>{_0x3aae8e['revisionViews']['on']('add',(_0x1367ee,_0x389c2c)=>{_0x389c2c['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)),_0x394009['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x2bb867=this['_revisionsRepository']['getRevision'](0x0);if(_0x2bb867){const _0x2d4905=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2bb867['id']);this['_revisionViewer']['compare'](_0x2bb867,_0x2d4905);}}_handleRevisionSelected(_0x69c033,_0x3c059e){const _0x44f295=this['_revisionsRepository']['getRevision'](_0x3c059e['id']),_0x144602=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x44f295['id']);this['_revisionViewer']['compare'](_0x44f295,_0x144602);}_handleRevisionSetName(_0xe072cf,_0xcbf686){this['_revisionsRepository']['getRevision'](_0xcbf686['id'])['setName'](_0xcbf686['name']);}['_handleDiffChange'](_0x147949,_0x35075e,_0x438045){const _0x17dc86=this['_revisionsRepository']['getRevisionsInDiff'](_0x438045);_0x17dc86['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x17dc86),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x17dc86[0x0]));}_createRevisionActions(){const _0x55f3ef=this['editor'],_0x529292=RevisionsSidebar['availableRevisionActions'],_0x48f8c2=_0x55f3ef['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x48f8c2['length'])return _0x48f8c2['map'](_0x5ce0c3=>{const _0x284913='string'==typeof _0x5ce0c3?Object['assign']({},_0x529292[_0x5ce0c3]):_0x5ce0c3;return _0x284913['action']=_0x284913['action']['bind'](this,_0x55f3ef),_0x284913['isVisible']&&(_0x284913['isVisible']=_0x284913['isVisible']['bind'](this,_0x55f3ef)),_0x284913;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x425499},_0x13f814)=>{const _0x43ee01=_0x425499['get'](Mt),_0xc4e114=_0x43ee01['repository'];let _0xfe8d02=_0x43ee01['diff']['newRevisionId'],_0x14385e=_0x13f814['id'];_0xc4e114['getIndex'](_0xfe8d02)>_0xc4e114['getIndex'](_0x14385e)&&([_0xfe8d02,_0x14385e]=[_0x14385e,_0xfe8d02]),_0x43ee01['compare'](_0xfe8d02,_0x14385e);},'isVisible':({plugins:_0x46d1ff},_0x1b2706)=>{const _0x451a37=_0x46d1ff['get'](Mt);return!(_0x451a37['repository']['getRevisionsInDiff'](_0x451a37['diff'])['length']>0x2)&&!_0x1b2706['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3cf73f,{id:_0x4c2434})=>{_0x3cf73f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4c2434);},'isVisible':({plugins:_0x3047ac},_0x9b06d5)=>!!_0x3047ac['get'](Mt)['repository']['getLaterVisibleRevision'](_0x9b06d5['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4052e3},{id:_0x5a9d8a,revisionNameView:_0x46a5d8})=>{const _0x3c2bba=_0x4052e3['get'](Mt),_0x5053d1=_0x3c2bba['repository']['getEarlierVisibleRevision'](_0x5a9d8a);_0x3c2bba['compare'](_0x5a9d8a,_0x5053d1),_0x46a5d8['focus'](),_0x46a5d8['fieldView']['select']();}}};}var Qt=class extends _0x3893d1{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x28929d,_0x5d9775){super(_0x28929d),this['_view']=_0x5d9775,this['_toolbarConfig']=ut(_0x28929d['config']['get']('toolbar')),this['_elementReplacer']=new _0xa15115();}get element(){return this['view']['element'];}init(_0x3e6dd3){const _0x46648e=this['editor'],_0x3863fe=this['view'],_0x9312ca=_0x46648e['editing']['view'],_0x146ce6=_0x3863fe['editable'];_0x146ce6['name']=_0x9312ca['document']['getRoot']()['rootName'],_0x3863fe['render']();const _0x39e2a5=_0x146ce6['element'];this['setEditableElement'](_0x146ce6['name'],_0x39e2a5),_0x3863fe['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x9312ca['attachDomRoot'](_0x39e2a5),this['_elementReplacer']['replace'](_0x3e6dd3,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x49dde5=this['view'],_0x22ee35=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x22ee35['detachDomRoot'](_0x49dde5['editable']['name']),_0x49dde5['destroy']();}_initToolbar(){const _0x39f346=this['view'];_0x39f346['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x39f346['stickyPanel']['limiterElement']=_0x39f346['element'],_0x39f346['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x3674f7})=>_0x3674f7),_0x39f346['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x39f346['toolbar']);}},zt=class extends _0x3b2c1e{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x47ae5a,_0x1d25f5,_0x35af91={}){super(_0x47ae5a),this['stickyPanel']=new st(_0x47ae5a),this['toolbar']=new ot(_0x47ae5a,{'shouldGroupWhenFull':_0x35af91['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x4c416b(_0x47ae5a,_0x1d25f5);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4842fe(_0xd42421);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2e3d68,_0x5b1c0e){super(_0x5b1c0e),this['sourceElement']=_0x2e3d68,this['model']['document']['createRoot']();const _0x4470d2=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x4470d2);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x4bd08f,_0x35b398){const _0x402238=new this(_0x4bd08f,_0x35b398);return await _0x402238['initPlugins'](),await _0x402238['ui']['init'](_0x4bd08f),await _0x402238['data']['init'](_0x402238['config']['get']('initialData')||''),_0x402238['fire']('ready'),_0x402238;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x57c795{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x332d6a){super(_0x332d6a),this['result']='end',_0x332d6a['editing']['view']['_overlayModeHint']='auto',_0x332d6a['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x57c795{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_t,St];}constructor(_0x5b5d17){if(super(_0x5b5d17),!this['editor']['config']['get']('revisionHistory'))throw new _0x5234db('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x416463=>this['_showRevisionViewer']({..._0x416463,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4c847a=>this['_closeRevisionViewer'](_0x4c847a)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x57d268=>this['_restoreRevision'](_0x57d268)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x2a20ac){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2a20ac;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x4ee2ff){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4ee2ff);}getRevision(_0x121a2b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x121a2b);}getRevisions(_0x33a747){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x33a747||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x107a51=this['editor'],_0x1d8d57=_0x2d8a3c(_0x107a51,ii),_0x13e191=_0x107a51['plugins']['get']('RevisionTracker'),_0x1de6e2=_0x107a51['plugins']['get'](_0x3e15a4)['users'];return _0x1d8d57['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1d8d57['lazyRoots'],(_0x1d8d57['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x57c795{static get requires(){return[Mt,_0x3e15a4];}init(){const _0x1e7222=this['editor']['plugins']['get'](_0x3e15a4);for(const _0x41d593 of _0x1de6e2)_0x41d593['isAnonymous']||_0x1e7222['getUser'](_0x41d593['id'])||_0x1e7222['addUser'](_0x41d593);const _0x1889e4=_0x13e191['repository']['getRevisions']();let _0x410474=null;const _0x5d3a94=this['editor']['plugins']['get']('RevisionViewer');_0x5d3a94['adapter']=_0x13e191['adapter'],_0x5d3a94['bind']('isEnabled')['to'](_0x13e191),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x107a51,'isReadOnly',_0x498b53=>!_0x498b53);for(const _0x1005ae of _0x1889e4){const _0x4b42e1=null===_0x1005ae['creator'];if(_0x4b42e1&&_0x1005ae['toVersion']===_0x1005ae['fromVersion'])continue;const _0x45518f=_0x1005ae['toJSON']();_0x5d3a94['addRevisionData'](_0x45518f,(_0x22254b,_0xa2654f,_0x1f8065)=>{if(_0x4b42e1){if(_0x410474)_0x410474['_update'](_0x22254b,_0xa2654f);else{if(!_0xa2654f){const _0x37e0aa=_0x1f8065['toJSON']();_0x37e0aa['id']=_0xb49d28(),_0x13e191['saveRevision'](_0x37e0aa,_0x1f8065['toVersion'])['then'](_0x2906c5=>{_0x410474=_0x2906c5;});}}}else _0x1005ae['_update'](_0x22254b,_0xa2654f);});}}},Yt),_0x1d8d57);}['_enhanceShowRevisionViewerCallback'](){const _0x557dfe=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x21c6e4=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x21c6e4['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x55e806=this['editor']['plugins']['get']('Dialog');_0x55e806['isOpen']&&_0x55e806['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x4de3be=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x364bfe of _0x4de3be)_0x364bfe['class']=_0x364bfe['class']?_0x364bfe['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x2f4e1e=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2f4e1e&&_0x2f4e1e['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x829bf4=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x829bf4&&_0x829bf4['setAttribute']('tabindex','-1');}}const _0x1520de=this['_getRevisionViewerEditorConfig']();return _0x557dfe(_0x1520de)['then'](_0x2569d9=>(this['_viewerEditor']=_0x2569d9,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'),_0x2569d9))['catch'](_0x4cbc65=>(console['error'](_0x4cbc65),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x362f5e=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 _0x30888d=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4d58d1 of _0x30888d)_0x4d58d1['class']='ck-tab-panel_disabled'===_0x4d58d1['class']?'':_0x4d58d1['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5662a2=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5662a2&&_0x5662a2['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x7eeac=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x7eeac&&_0x7eeac['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x362f5e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x24c744=this['editor']['plugins']['get']('Annotations');_0x24c744['refreshVisibility'](),_0x24c744['refreshPositioning']();}});});}['_showRevisionViewer'](_0x45aaa2){const _0x5d8b84=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2a3465=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x32ab14=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x32ab14,_0x45aaa2)['then'](_0x7b9df=>(_0x2a3465['style']['display']='block',_0x5d8b84['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x7b9df));}['_closeRevisionViewer'](_0x13d47f){const _0xbf9386=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0xbf9386['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x13d47f['destroy']();}async _restoreRevision(_0x60ba1e){const _0x32e9c5=this['editor'],_0x9080db=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xc98c9=_0x32e9c5['plugins']['get']('RevisionTracker'),_0x4a8f13=_0x32e9c5['plugins']['get']('RevisionHistoryUtils'),_0x1ac05c=_0x9080db['repository']['getRevision'](_0x60ba1e);let _0x25b8b6,_0x1fc895,_0x2acc61;try{await _0x4a8f13['loadRevisionData'](_0x1ac05c,this['adapter']),_0x25b8b6=_0x4a8f13['getRevisionDocumentData'](_0x1ac05c),_0x1fc895=_0x4a8f13['getRevisionRootsAttributes'](_0x1ac05c);}catch(_0x52aa71){return void console['error'](_0x52aa71);}_0x32e9c5['model']['change'](_0x27c39d=>{for(const _0x3f2c9a of Array['from'](_0x32e9c5['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x27c39d['removeMarker'](_0x3f2c9a);}),_0x9080db['isReady']=!0x1,_0x32e9c5['model']['enqueueChange'](_0x52dab7=>{_0x52dab7['setSelection'](null),_0x52dab7['removeSelectionAttribute'](_0x32e9c5['model']['document']['selection']['getAttributeKeys']());const _0x34588b=Object['keys'](_0x25b8b6);for(const _0x16a470 of _0x32e9c5['model']['document']['roots'])'$graveyard'!=_0x16a470['rootName']&&_0x16a470['isAttached']()&&!_0x34588b['includes'](_0x16a470['rootName'])&&_0x52dab7['detachRoot'](_0x16a470);for(const _0x59d357 of _0x34588b){let _0x1e4f4b=_0x32e9c5['model']['document']['getRoot'](_0x59d357);if(!_0x1e4f4b||!_0x1e4f4b['isAttached']()){const _0x26b811=_0x1ac05c['diffData']?.[_0x59d357]?.['rootElementName']||'$root';_0x1e4f4b=_0x52dab7['addRoot'](_0x59d357,_0x26b811);}const _0x156040=_0x1fc895[_0x59d357],_0x37f897=Object['keys'](_0x156040),_0x4b2b60=_0x25b8b6[_0x59d357];for(const _0x282039 of _0x1e4f4b['getAttributeKeys']())_0x37f897['includes'](_0x282039)||_0x52dab7['removeAttribute'](_0x282039,_0x1e4f4b);for(const _0x23cb08 of _0x37f897)_0x52dab7['setAttribute'](_0x23cb08,_0x1fc895[_0x59d357][_0x23cb08],_0x1e4f4b);_0x52dab7['remove'](_0x52dab7['createRangeIn'](_0x1e4f4b)),_0x52dab7['insert'](_0x32e9c5['data']['parse'](_0x4b2b60,_0x1e4f4b),_0x1e4f4b,0x0);}});const _0x51bbc7=pt(_0x32e9c5['locale'],'Restored');if(_0x1ac05c['name'])_0x2acc61=-0x1==_0x1ac05c['name']['indexOf'](_0x51bbc7)?_0x51bbc7+':\x20'+_0x1ac05c['name']:_0x1ac05c['name'];else _0x2acc61=_0x51bbc7+':\x20'+(_0x1ac05c['createdAt']['toLocaleDateString'](_0x32e9c5['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1ac05c['createdAt']['toLocaleTimeString'](_0x32e9c5['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xc98c9['saveRevision']({'name':_0x2acc61}),_0x9080db['isReady']=!0x0,_0x32e9c5['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
|