@ckeditor/ckeditor5-revision-history 49.1.0-alpha.0 → 49.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.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.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.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
|
-
_0xc0251e();var bt=class extends yt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x51cb00){super(),this['id']=_0x51cb00['id']||_0x5a9e0c(),this['creator']=_0x51cb00['creator']||null,this['authors']=_0x51cb00['authors']||[],this['diffData']=_0x51cb00['diffData']||null,this['toVersion']=_0x51cb00['toVersion']||0x0,this['fromVersion']=_0x51cb00['fromVersion']||0x0,this['set']('name',_0x51cb00['name']||''),this['set']('createdAt',_0x51cb00['createdAt']||new Date()),this['set']('attributes',_0x51cb00['attributes']||{});}setName(_0x14afdb){this['_update']({'name':_0x14afdb});}setAttribute(_0x1c49d4,_0x359800){const _0x1567e4=_0x3ef400(this['attributes']);_0x228ef7(_0x1567e4,_0x1c49d4,_0x359800),this['_update']({'attributes':_0x1567e4});}removeAttribute(_0x462d0b){const _0x2021e4=_0x3ef400(this['attributes']);_0x467441(_0x2021e4,_0x462d0b),this['_update']({'attributes':_0x2021e4});}_update(_0x8088bf,_0x36c0d6=!0x1){let _0x387b68=!0x1;const _0x5d8a59={'id':this['id']};for(const _0x171863 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x36cf10=_0x8088bf[_0x171863];void 0x0!==_0x36cf10&&_0x36cf10!==this[_0x171863]&&(this[_0x171863]=_0x36cf10,_0x5d8a59[_0x171863]=_0x36cf10,_0x387b68=!0x0);}_0x387b68&&(_0x5d8a59['authors']&&(_0x5d8a59['authorsIds']=_0x5d8a59['authors']['map'](_0x53cf6d=>_0x53cf6d['id']),delete _0x5d8a59['authors']),this['fire']('_update',_0x5d8a59,_0x36c0d6));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x29e296=>_0x29e296['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},Rt=class extends _0x3c4294{['_revisions'];static get requires(){return[_0x2c9bd7];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x46bc3b){super(_0x46bc3b),this['_revisions']=new _0x4ae41b();}afterInit(){!async function(_0x26ef8b){const _0x4b5b87='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x4f3009=0xeb829,_0x4edbc6=0x799b0,_0x1ee284={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x11db50(_0x280989){const _0x149088=new window['Promise'](_0x593b30=>{_0x280989['once']('ready',_0x593b30);}),_0xea0f56=window['Date']['now'](),_0x2d2579=_0x280989['config']['get']('licenseKey');async function _0x1ee1c5(){let _0x2c7616,_0x590885=null,_0x4fef47=null;try{return'GPL'==_0x2d2579?'NotAllowed':(_0x2c7616=_0x13db3b(),_0x2c7616?(_0x2c7616['usageEndpoint']&&(_0x4fef47=_0x4aec67(_0x2c7616['usageEndpoint'],_0x2c7616['jti'])),await _0x20c61a()?_0x30e012()?_0x4a26dd()?'Expired':_0x4f7e78()?('evaluation'==_0x2c7616['licenseType']&&(_0x590885=_0x14e9d4('EvaluationLimit')),await _0x1c46b8()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4a26dd(){const _0x531431=['evaluation','trial']['includes'](_0x2c7616['licenseType'])?_0xea0f56/0x3e8:0xe10*_0x4edbc6;return _0x2c7616['exp']<_0x531431;}function _0x30e012(){const _0xb35e42=_0x2c7616['features'];if(!_0xb35e42)return!0x1;if(_0xb35e42['includes']('*'))return!0x0;if(_0xb35e42['includes']('RH'))return!0x0;if(_0xb35e42['includes']('RRH')){if(_0x49bbce())return!0x0;if(_0x9199e1()||_0x472548())return!0x0;}return!0x1;}function _0x4f7e78(){const _0x159f57=_0x2c7616['licensedHosts'];if(!_0x159f57||0x0==_0x159f57['length'])return!0x0;const {hostname:_0x81f648}=new URL(window['location']['href']);if(_0x159f57['includes'](_0x81f648))return!0x0;const _0x4ea072=_0x81f648['split']('.');return _0x159f57['filter'](_0x414ead=>_0x414ead['includes']('*'))['map'](_0x407ad5=>_0x407ad5['split']('.'))['filter'](_0x4744ce=>_0x4744ce['length']<=_0x4ea072['length'])['map'](_0x1d5b1b=>Array(_0x4ea072['length']-_0x1d5b1b['length'])['fill']('*'===_0x1d5b1b[0x0]?'*':'')['concat'](_0x1d5b1b))['some'](_0x6238dd=>_0x4ea072['every']((_0x270e72,_0x1fc531)=>_0x6238dd[_0x1fc531]===_0x270e72||'*'===_0x6238dd[_0x1fc531]));}function _0x1c46b8(){return _0x590885&&_0x4fef47?new window['Promise']((_0x26097d,_0x12d2b0)=>{_0x590885['then'](_0x26097d,_0x12d2b0),_0x4fef47['then'](_0x78784d=>{'Valid'!=_0x78784d&&_0x26097d(_0x78784d);},_0x12d2b0);}):_0x590885||_0x4fef47||'Valid';}}function _0x4aec67(_0xf3f9aa,_0x57da00){return new window['Promise'](_0x595ce0=>{if(_0x2a58cc())return _0x595ce0('Valid');_0x370afc(),_0x280989['decorate']('_sendUsageRequest');let _0x40415e=!0x1;const _0x452bcd=_0x5a9e0c();function _0x420809(_0x5d7514){return!!_0x5d7514&&('object'==typeof _0x5d7514||'function'==typeof _0x5d7514)&&'function'==typeof _0x5d7514['then']&&'function'==typeof _0x5d7514['catch'];}function _0xbf303(_0x1af178){_0x2e2c79(_0x1af178)['then'](_0x1fe441=>_0x1fe441&&'ok'==_0x1fe441['status']?_0x5ae3c7(_0x3147e1(_0x452bcd+_0x57da00))!=_0x1fe441['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4ca7df=>(_0x5ccac3(),_0x4ca7df),()=>{const _0x5536c2=_0x503310();return null==_0x5536c2?(_0x5ccac3(),'Valid'):_0xea0f56-_0x5536c2>0x240c8400?'UsageLimit':'Valid';})['then'](_0x595ce0)['catch'](()=>{_0x595ce0('UsageLimit');});const _0x419fdd=0x36ee80;function _0x5ccac3(){const _0x2fc03e='llct-'+_0x5ae3c7(_0x3147e1(_0xf3f9aa)),_0x5afb3a=_0x3cb662(_0x5ae3c7(window['Math']['ceil'](_0xea0f56/_0x419fdd)));window['localStorage']['setItem'](_0x2fc03e,_0x5afb3a);}function _0x503310(){const _0x4a9d81='llct-'+_0x5ae3c7(_0x3147e1(_0xf3f9aa)),_0x5c7a88=window['localStorage']['getItem'](_0x4a9d81);return _0x5c7a88?window['parseInt'](_0x3cb662(_0x5c7a88),0x10)*_0x419fdd:null;}function _0x2e2c79(_0x307627){return new window['Promise']((_0x23fc0a,_0x19b3b5)=>{_0x307627['then'](_0x23fc0a,_0x19b3b5),window['setTimeout'](_0x19b3b5,0x1d4c0);});}}_0x280989['on']('_sendUsageRequest',(_0x240f3c,_0x129b7c)=>{if(_0x129b7c[0x0]!=_0xf3f9aa)return _0x595ce0('UsageLimit');_0x129b7c[0x1]={..._0x129b7c[0x1],'requestId':_0x452bcd};},{'priority':'high'}),_0x280989['on']('_sendUsageRequest',_0x1665e1=>{_0x420809(_0x1665e1['return'])&&(_0x40415e=!0x0,_0xbf303(_0x1665e1['return']));},{'priority':'low'}),_0x149088['then'](()=>{_0x40415e||_0x595ce0('UsageLimit');});});function _0x2a58cc(){return'auto'==_0x280989['editing']['view']['_overlayModeHint'];}function _0x370afc(){_0x280989['editing']['view']['_overlayModeHint']='auto';}}function _0x14e9d4(_0x3b3310){const _0x13fc75=[new window['Promise'](_0xaafb3d=>setTimeout(_0xaafb3d,0x93ecc)),_0x149088['then'](()=>new window['Promise'](_0x49c2c5=>{const _0xc0a23d=0x7,_0x5a3e5c=_0x26ef8b['_revisions'];function _0x162a35(){_0x5a3e5c['length']>=_0xc0a23d&&_0x49c2c5();}_0x162a35(),_0x5a3e5c['on']('add',_0x162a35);})),new window['Promise'](_0x49c99e=>{function _0x4bc45d(){for(const _0x547c39 in window)if(window['Number']['isNaN'](window['Number'](_0x547c39))&&window[_0x547c39]==_0x4f3009)return _0x49c99e();'destroyed'!=_0x280989['state']&&window['setTimeout'](_0x4bc45d,0x1388);}_0x3bae73('RevisionViewer')&&_0x4bc45d();})];return window['Promise']['race'](_0x13fc75)['then'](()=>_0x3b3310);}async function _0x20a8fc(){if(await _0x149088,_0x3bae73('RevisionViewer')){const _0x2f0dd1=_0x26ef8b['getRevision'](0x0),_0x1aa2f6=_0x26ef8b['getEarlierVisibleRevision'](_0x2f0dd1['id']),_0x117e03=_0x5c9491('RevisionViewer');return await _0x117e03['compare'](_0x2f0dd1['id'],_0x1aa2f6?_0x1aa2f6['id']:null,!0x0),_0x117e03['unbind']('isEnabled'),_0x117e03['isEnabled']=!0x1,_0x117e03['compare']=_0x5a7053,void(_0x117e03['_getDiff']=_0x5a7053);}if(_0x3bae73('RevisionTracker')){const _0x568de5=_0x5c9491('RevisionTracker');_0x568de5['unbind']('isEnabled'),_0x568de5['isEnabled']=!0x1,_0x568de5['update']=_0x5a7053,_0x568de5['saveRevision']=_0x5a7053;}_0x280989['model']['change']=_0x5a7053,_0x280989['model']['enqueueChange']=_0x5a7053,_0x280989['enableReadOnlyMode']('model');}function _0x49bbce(){return _0x3bae73('WebSocketGateway')&&'connected'==_0x5c9491('WebSocketGateway')['state'];}function _0x9199e1(){return _0x3bae73('RevisionViewerIntegration');}function _0x472548(){return _0x3bae73('TrackChangesDataGetter');}function _0x209306(_0x10509b){const _0xe910ed=_0x1534a9();_0x280989[_0xe910ed]='revisionHistoryLicenseKey'+_0x10509b,_0x10509b['endsWith']('Limit')&&(window[_0x1534a9()]=_0x4f3009),'Valid'!=_0x10509b&&_0x20a8fc();}function _0x1534a9(){const _0x5d8644=window['String'](window['performance']['now']())['replace']('.','');let _0x24648b='g';for(let _0xdf6443=0x0;_0xdf6443<_0x5d8644['length'];_0xdf6443+=0x2){let _0x27bb48=window['parseInt'](_0x5d8644['substring'](_0xdf6443,_0xdf6443+0x2));_0x27bb48>=0x3e&&(_0x27bb48-=0x3e),_0x24648b+=_0x4b5b87[_0x27bb48];}return _0x24648b;}function _0x13db3b(){const _0x24ff7d=_0x2d2579['split']('.');if(0x3!=_0x24ff7d['length'])return null;return _0x5421a1(_0x24ff7d[0x1]);function _0x5421a1(_0x5ba741){const _0x3e69a2=_0x4768d3(_0x5ba741);return _0x3e69a2&&_0xc400e7()?_0x3e69a2:null;function _0xc400e7(){const _0x400dca=_0x3e69a2['jti'],_0x30fff6=window['parseInt'](_0x400dca['substring'](_0x400dca['length']-0x8),0x10),_0x9c25a7={..._0x3e69a2,'jti':_0x400dca['substring'](0x0,_0x400dca['length']-0x8)};return delete _0x9c25a7['vc'],_0x3147e1(_0x9c25a7)==_0x30fff6;}}}async function _0x20c61a(){let _0x13a5e1=!0x0;try{const [_0x540481,_0x38451f,_0xd9b502]=_0x2d2579['split']('.');return _0x1c6f1e(_0x540481),await _0x270fd8(_0x540481,_0x38451f,_0xd9b502),_0x13a5e1;}catch{return!0x1;}function _0x1c6f1e(_0x56412b){const _0x451645=_0x4768d3(_0x56412b);_0x451645&&'ES256'==_0x451645['alg']||(_0x13a5e1=!0x1);}async function _0x270fd8(_0x58eb91,_0x14a05a,_0x7d2242){const _0x3a1faa=window['Uint8Array']['from'](_0xd8558d(_0x7d2242),_0x27bacf=>_0x27bacf['charCodeAt'](0x0)),_0x23a294=new window['TextEncoder']()['encode'](_0x58eb91+'.'+_0x14a05a),_0x23941d=window['crypto']['subtle'];if(!_0x23941d)return;const _0x25ac1d=await _0x23941d['importKey']('jwk',_0x1ee284,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x23941d['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x25ac1d,_0x3a1faa,_0x23a294)||(_0x13a5e1=!0x1);}}function _0x4768d3(_0x49842c){return _0x49842c['startsWith']('ey')?JSON['parse'](_0xd8558d(_0x49842c)):null;}function _0xd8558d(_0x2e3f1d){return window['atob'](_0x2e3f1d['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3147e1(_0x116e57){let _0x28f6eb=0x1505;function _0x5d70b2(_0x27929f){for(let _0x3ed64b=0x0;_0x3ed64b<_0x27929f['length'];_0x3ed64b++){const _0x1e70e5=_0x27929f['charCodeAt'](_0x3ed64b);_0x28f6eb=(_0x28f6eb<<0x5)+_0x28f6eb+_0x1e70e5,_0x28f6eb&=_0x28f6eb;}}function _0x2f4e44(_0x18200c){Array['isArray'](_0x18200c)?_0x18200c['forEach'](_0x2f4e44):_0x18200c&&'object'==typeof _0x18200c?Object['entries'](_0x18200c)['sort']()['forEach'](([_0x14bb75,_0xd472a0])=>{_0x5d70b2(_0x14bb75),_0x2f4e44(_0xd472a0);}):_0x5d70b2(window['String'](_0x18200c));}return _0x2f4e44(_0x116e57),_0x28f6eb>>>0x0;}function _0x5ae3c7(_0x226e8a){return _0x226e8a['toString'](0x10)['padStart'](0x8,'0');}function _0x3cb662(_0x5b88cb){return _0x5b88cb['split']('')['reverse']()['join']('');}function _0x3bae73(_0x44e6cf){return _0x280989['plugins']['has'](_0x44e6cf);}function _0x5c9491(_0x322024){return _0x280989['plugins']['get'](_0x322024);}function _0x5a7053(){}_0x209306(await _0x1ee1c5());}_0x11db50(_0x26ef8b['editor']);}(this);}createRevision(_0x1b4475){const _0x1a9d7a=this['editor']['plugins']['get']('Users');return new bt({'id':_0x1b4475['id'],'name':_0x1b4475['name'],'creator':_0x1b4475['creatorId']?_0x1a9d7a['getUser'](_0x1b4475['creatorId']):null,'diffData':_0x1b4475['diffData']||_0x1b4475['data'],'authors':_0x1b4475['authorsIds']['map'](_0x5f36b9=>_0x1a9d7a['getUser'](_0x5f36b9)),'createdAt':new Date(_0x1b4475['createdAt']),'attributes':_0x1b4475['attributes'],'fromVersion':_0x1b4475['fromVersion'],'toVersion':_0x1b4475['toVersion']});}['addRevision'](_0x8b9687,_0x212d16=0x0){this['_revisions']['add'](_0x8b9687,_0x212d16);}getRevision(_0x2e0498){return this['_revisions']['get'](_0x2e0498);}getRevisions(_0x285528={'toJSON':!0x1}){const _0x2e81b0=Array['from'](this['_revisions']);return _0x2e81b0['reverse'](),_0x285528['toJSON']?_0x2e81b0['map'](_0xed28ad=>_0xed28ad['toJSON']()):_0x2e81b0;}getIndex(_0x5d77e7){return this['_revisions']['getIndex'](_0x5d77e7);}getEarlierVisibleRevision(_0x52bcdb){const [,_0x324016]=this['getRevisionsIterator'](_0x52bcdb,{'direction':'earlier'});return _0x324016;}getLaterVisibleRevision(_0x22675a){const [,_0xa2f332]=this['getRevisionsIterator'](_0x22675a,{'direction':'later'});return _0xa2f332;}getRevisionsInDiff(_0x23350b){const _0x5ab01b=[];for(const _0x23760c of this['getRevisionsIterator'](_0x23350b['newRevisionId']))if(_0x5ab01b['push'](_0x23760c),_0x23760c['id']===_0x23350b['oldRevisionId'])break;return _0x5ab01b;}*getRevisionsIterator(_0x4f18be,{direction:_0x17e212='earlier',filter:_0x471ff8=()=>!0x0}={}){const _0x18d51b='earlier'===_0x17e212?0x1:-0x1;let _0x3503fa=this['_revisions']['get'](_0x4f18be),_0x15cc7e=this['getIndex'](_0x3503fa);for(yield _0x3503fa;_0x3503fa;){if(_0x15cc7e+=_0x18d51b,_0x3503fa=this['getRevision'](_0x15cc7e),!_0x3503fa)return;_0x471ff8(_0x3503fa)&&(yield _0x3503fa);}}},kt=class extends _0x3c4294{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x230112,'c'],[_0x2dc7ab,'a'],[_0x4bae08,'e'],[_0x5e11d9,'r'],[_0x597258,'u']]);_typeCharToViewClass=new Map([['c',_0x230112],['a',_0x2dc7ab],['e',_0x4bae08],['r',_0x5e11d9],['u',_0x597258]]);async loadRevisionData(_0x4fb885,_0x5051ac){if(_0x4fb885['diffData']||!_0x5051ac)return;const _0x473aee=this['editor']['config']['get']('collaboration.channelId');_0x4fb885['diffData']=(await _0x5051ac['getRevision']({'channelId':_0x473aee,'revisionId':_0x4fb885['id']}))['diffData'];}getRevisionDocumentData(_0x5be30f){const _0x339f28={};for(const _0x1b366e in _0x5be30f['diffData']){if(_0x5be30f['diffData'][_0x1b366e]['attachChange']&&!_0x5be30f['diffData'][_0x1b366e]['attachChange']['isAttached'])continue;const _0x5610bb=this['_removeRevisionMarkers'](JSON['parse'](_0x5be30f['diffData'][_0x1b366e]['insertions'])),_0x5d01f6=this['editor']['editing']['view']['document'],_0x1eb7f1=new _0x404b21(_0x5d01f6,_0x5610bb['map'](_0x6035ca=>this['_getViewFromDiffObj'](_0x6035ca,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x339f28[_0x1b366e]=this['editor']['data']['processor']['toData'](_0x1eb7f1),this['editor']['data']['processor']['useFillerType']('default');}return _0x339f28;}getRevisionRootsAttributes(_0x2324a6){const _0x507a19={};for(const _0x3fb6fc in _0x2324a6['diffData'])_0x2324a6['diffData'][_0x3fb6fc]['attachChange']&&!_0x2324a6['diffData'][_0x3fb6fc]['attachChange']['isAttached']||(_0x507a19[_0x3fb6fc]=_0x2324a6['diffData'][_0x3fb6fc]['attributesAfter']||{});return _0x507a19;}getRevisionRootsModelElements(_0x2c4f1b){const _0x34a367={};for(const _0x3a988f in _0x2c4f1b['diffData']){if(_0x2c4f1b['diffData'][_0x3a988f]['attachChange']&&!_0x2c4f1b['diffData'][_0x3a988f]['attachChange']['isAttached'])continue;const _0x120e4a=_0x2c4f1b['diffData'][_0x3a988f]['rootElementName'];_0x120e4a&&(_0x34a367[_0x3a988f]=_0x120e4a);}return _0x34a367;}_getTypeCharForViewElement(_0x200392){return this['_viewClassToTypeChar']['get'](_0x200392['constructor']);}_getViewFromDiffObj(_0x3f69b6,_0x2f5bd3){const _0x4c38f0=this['editor']['editing']['view']['document'];if('string'==typeof _0x3f69b6)return new _0x487176(_0x4c38f0,_0x3f69b6);{let _0x2c67b3,_0x4ce102;_0x4ce102='u'==_0x3f69b6['type']||'r'==_0x3f69b6['type']?[]:_0x3f69b6['children']['map'](_0x30d277=>this['_getViewFromDiffObj'](_0x30d277,_0x2f5bd3));const _0x368a0f=this['_typeCharToViewClass']['get'](_0x3f69b6['type'])||_0x19d94b,_0x4fd55e=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2c67b3=new _0x368a0f(_0x4c38f0,_0x3f69b6['name'],_0x3f69b6['attributes'],_0x4ce102),'u'==_0x3f69b6['type']&&_0x3f69b6['children'][0x0]){const _0x22d72f=_0x3f69b6['children'][0x0];if(_0x2c67b3['render']=function(_0x4ea9c2){const _0x369254=_0x4ea9c2['createElement']('div');return _0x369254['innerHTML']=_0x3111b3(_0x22d72f),_0x369254['childNodes'][0x0];},_0x2f5bd3){const _0x164df5=new _0x404b21(_0x4c38f0);_0x164df5['_appendChild'](_0x2c67b3);const _0x18b174=Array['from'](_0x4fd55e['viewChildrenToDom'](_0x164df5,{'bind':!0x1})),_0x208b5a=_0x4fd55e['domDocument']['createElement']('div');_0x208b5a['append'](..._0x18b174),_0x2c67b3=Array['from'](_0x4fd55e['domChildrenToView'](_0x208b5a))[0x0];}}else{if('r'==_0x3f69b6['type']&&_0x3f69b6['children'][0x0]){const _0x4aba01=_0x3f69b6['children'][0x0];if(_0x2c67b3['render']=function(_0x2fd9c7){_0x2fd9c7['innerHTML']=_0x3111b3(_0x4aba01);},_0x2f5bd3){const _0x7aadf0=new _0x404b21(_0x4c38f0);_0x7aadf0['_appendChild'](_0x2c67b3);const _0x33276f=Array['from'](_0x4fd55e['viewChildrenToDom'](_0x7aadf0,{'bind':!0x1})),_0x4a6dbd=_0x4fd55e['domDocument']['createElement']('div');_0x4a6dbd['append'](..._0x33276f);const _0x54c65e=Array['from'](_0x4fd55e['domChildrenToView'](_0x4a6dbd));_0x54c65e['length']>0x1?_0x2c67b3['_appendChild'](_0x54c65e):_0x2c67b3=_0x54c65e[0x0];}}}if(_0x3f69b6['customProperties']){for(const [_0x4e5b04,_0x3d842e]of _0x3f69b6['customProperties'])_0x2c67b3['_setCustomProperty'](_0x4e5b04,_0x3d842e);}const _0x5e54ba=void 0x0===_0x3f69b6['fillerOffset']?null:_0x3f69b6['fillerOffset'];return null!==_0x5e54ba&&(_0x2c67b3['getFillerOffset']=()=>_0x5e54ba),_0x2c67b3;}}_makeModelFromViewString(_0x49998a,_0x22c3f5){const _0x3e88fa=JSON['parse'](_0x49998a),_0xc865f6=this['editor']['editing']['view']['document'],_0x2f0c6f=new _0x404b21(_0xc865f6,_0x3e88fa['map'](_0x51c2e0=>this['_getViewFromDiffObj'](_0x51c2e0,!0x0))),_0x2d965a=this['editor']['data']['toModel'](_0x2f0c6f,_0x22c3f5);return _0x2d965a['name']=_0x22c3f5,_0x2d965a;}['_removeRevisionMarkers'](_0x294c37){return(_0x294c37=_0x294c37['filter'](_0xd039fe=>!_0xd039fe['name']||'revision-start'!==_0xd039fe['name']&&'revision-end'!==_0xd039fe['name']))['forEach'](_0x3d9580=>{'string'!=typeof _0x3d9580&&(_0x3d9580['children']=this['_removeRevisionMarkers'](_0x3d9580['children']),_0x3d9580['attributes']=_0x3d9580['attributes']['filter'](_0x3bb4c6=>!_0x3bb4c6[0x0]['startsWith']('data-revision-')));}),_0x294c37;}};function At(_0x8effe4,_0x4d5673,_0x45149f){const t=_0x8effe4['t'];switch(_0x4d5673){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'},_0x45149f);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x45149f);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x45149f);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x45149f);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x45149f);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var Et=class extends _0x3c4294{['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[_0x2c9bd7,Rt,kt,_0x4c4288];}constructor(_0x13a69d){super(_0x13a69d),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x230a87=_0x5a9e0c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x230a87},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 _0x597a8d=this['repository']['getRevision'](0x0),_0x5bc5f3=_0x597a8d&&null===_0x597a8d['creator']?_0x597a8d:null;if(this['_continueCurrentRevision']=!!_0x5bc5f3&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4d31eb=this['_source']['getCurrentRevisionId'](),_0x8f52b5=this['repository']['getRevision'](_0x4d31eb);if(_0x8f52b5)this['_startingVersion']=_0x8f52b5['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4abd2d=this['_source']['history']['_operations']['find'](_0x18214f=>!_0x18214f['_isInit']),_0x234d19=_0x4abd2d?_0x4abd2d['baseVersion']:this['_source']['history']['version'];_0x597a8d?(_0x597a8d['toVersion']<_0x234d19&&_0x597a8d['_update']({'toVersion':_0x234d19}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5bc5f3['id'],this['_startingVersion']=_0x5bc5f3['fromVersion']):(this['_startingVersion']=_0x597a8d['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x234d19,this['_continueCurrentRevision']=!0x1);}}else _0x5bc5f3&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5bc5f3['toVersion'],this['editor']['model']['document']['history']['version']),_0x5bc5f3['fromVersion']===_0x5bc5f3['toVersion']?(0x0!==_0x5bc5f3['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5bc5f3['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5bc5f3['id'],this['_startingVersion']=_0x5bc5f3['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',_0x407814=>!_0x407814),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1c5eeb=[this['editor']];for(const _0x4562ee of _0x1c5eeb){let _0x4c7eb7;for(const _0x477d08 in _0x4562ee){const _0x537f72=_0x477d08,_0x3847e4=_0x4562ee[_0x537f72];if('revisionHistoryLicenseKeyValid'==_0x3847e4||'revisionHistoryLicenseKeyInvalid'==_0x3847e4||'revisionHistoryLicenseKeyExpired'==_0x3847e4||'revisionHistoryLicenseKeyDomainLimit'==_0x3847e4||'revisionHistoryLicenseKeyNotAllowed'==_0x3847e4||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3847e4||'revisionHistoryLicenseKeyUsageLimit'==_0x3847e4){delete _0x4562ee[_0x537f72],_0x4c7eb7=_0x3847e4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0xf42ed4=this['repository']['getRevision'](0x0),_0x46d494=await this['getRevisionDocumentData'](_0xf42ed4),_0x462ddf=await this['getRevisionRootsAttributes'](_0xf42ed4),_0x23ae44=this['_utils']['getRevisionRootsModelElements'](_0xf42ed4);this['_replaceEditorDataWithRevisionData'](_0x46d494,_0x462ddf,_0x23ae44);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x20e6f5){this['_source']=_0x20e6f5;}async update(){const _0x327f76=await this['_source']['getLatestVersion']();if(_0x327f76>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3e742a=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x327f76});_0x3e742a['authors']=_0x3e742a['authorsIds']['map'](_0x4dfe0b=>this['editor']['plugins']['get']('Users')['getUser'](_0x4dfe0b)),this['currentRevision']['_update'](_0x3e742a);}}async['saveRevision'](_0x19a033={},_0x5db98a=null){const _0x87e9e=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x5db98a>this['currentRevision']['toVersion']&&(_0x5db98a=null),null===_0x5db98a&&(_0x5db98a=await this['_source']['getLatestVersion']());const _0x58ec18=this['_getFromVersion'](_0x5db98a),_0x421d02=this['buildRevisionData']({'from':_0x58ec18,'to':_0x5db98a});if(this['currentRevision']['toVersion']<_0x5db98a){const _0x380f51=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x5db98a,'to':_0x5db98a});_0x380f51['authors']=[],_0x380f51['authorsIds']=[],_0x380f51['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x380f51,!0x0),delete _0x380f51['authors'],_0x87e9e['push'](_0x380f51);}const _0x2dac8f={..._0x19a033,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x19a033['name']||null,'id':_0x19a033['id']||_0x5a9e0c(),..._0x421d02,'attributes':{..._0x19a033['attributes'],..._0x421d02['attributes']}},_0x2d5e94=this['addRevisionData'](_0x2dac8f);_0x87e9e['push'](_0x2dac8f);const _0x55d496=this['repository']['getIndex'](_0x2d5e94);if(0x0!==_0x55d496){const _0x35bf06=this['repository']['getRevision'](_0x55d496-0x1);if(_0x35bf06['fromVersion']!==_0x5db98a){const _0x6866ea=this['_revisionDataBuilder']['getData'](_0x5db98a,_0x35bf06['toVersion']),_0x529e27={'id':_0x35bf06['id'],'diffData':_0x6866ea['diffData'],'authorsIds':_0x6866ea['authorsIds'],'authors':_0x6866ea['authorsIds']['map'](_0x5bc480=>this['editor']['plugins']['get']('Users')['getUser'](_0x5bc480)),'fromVersion':_0x5db98a};this['_stampAiAttribute'](_0x529e27,_0x35bf06,!!_0x6866ea['hasAIChanges']),_0x35bf06===this['currentRevision']&&(_0x529e27['createdAt']=new Date(_0x2dac8f['createdAt']['getTime']()+0xa)),_0x35bf06['_update'](_0x529e27,!0x0),delete _0x529e27['authors'],_0x87e9e['push'](_0x529e27);}}if(this['adapter']){for(const _0x55fafe of _0x87e9e)this['_bufferUpdate'](_0x55fafe['id'],_0x55fafe,!0x0);this['sendBufferedUpdates']();}return _0x2d5e94;}addRevisionData(_0x5d9630){const _0x2d1c03=this['repository']['createRevision'](_0x5d9630);return this['adapter']&&_0x2d1c03['on']('_update',(_0x6f523e,_0x2ee038,_0x25aad2)=>{_0x25aad2||(this['_bufferUpdate'](_0x2ee038['id'],_0x2ee038,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2d1c03,this['_findInsertionIndex'](_0x2d1c03)),_0x2d1c03;}async getRevisionDocumentData(_0x3f0470){return await this['_utils']['loadRevisionData'](_0x3f0470,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3f0470);}async getRevisionRootsAttributes(_0x381821){return await this['_utils']['loadRevisionData'](_0x381821,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x381821);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x208283=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5b329e=0x0;_0x5b329e<_0x208283['length'];_0x5b329e++){const _0x2c70a0=_0x208283[_0x5b329e];let _0x1d0ccf=!0x1;for(const _0x291095 of Object['keys'](_0x2c70a0))void 0x0===_0x2c70a0[_0x291095]?delete _0x2c70a0[_0x291095]:'id'!==_0x291095&&(_0x1d0ccf=!0x0);_0x1d0ccf||(_0x208283[_0x5b329e]=null);}if(_0x208283=_0x208283['filter'](_0x462a25=>null!==_0x462a25),!_0x208283['length'])return;for(let _0x481fa7=0x0;_0x481fa7<_0x208283['length'];_0x481fa7++){const _0x21c623=_0x208283[_0x481fa7];void 0x0!==_0x21c623['fromVersion']&&void 0x0===_0x21c623['toVersion']&&(_0x21c623['toVersion']=this['repository']['getRevision'](_0x21c623['id'])['toVersion']),void 0x0!==_0x21c623['toVersion']&&void 0x0===_0x21c623['fromVersion']&&(_0x21c623['fromVersion']=this['repository']['getRevision'](_0x21c623['id'])['fromVersion']);}const _0x2f31aa=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x208283,_0x2f31aa)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x525baa=>{if(_0x525baa){for(const _0x2f3ce8 of _0x525baa)this['setRevisionData']({'id':_0x2f3ce8['id'],'createdAt':_0x2f3ce8['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x46283d,_0x32494e,_0x8cff3e){if(_0x8cff3e===(!!_0x32494e&&!!_0x32494e['attributes']['@ai']))return;const _0x4779f9={..._0x32494e?_0x32494e['attributes']:{},..._0x46283d['attributes']};_0x8cff3e?_0x4779f9['@ai']=!0x0:delete _0x4779f9['@ai'],_0x46283d['attributes']=_0x4779f9;}buildRevisionData({revision:_0x2e4ff8=null,from:_0x252fc5=null,to:_0x1071df=null}){_0x252fc5=null!==_0x252fc5?_0x252fc5:_0x2e4ff8['fromVersion'],_0x1071df=null!==_0x1071df?_0x1071df:_0x2e4ff8['toVersion'];const _0x572a55=this['_revisionDataBuilder']['getData'](_0x252fc5,_0x1071df),_0x3b8db2={'diffData':_0x572a55['diffData'],'authorsIds':_0x572a55['authorsIds'],'fromVersion':_0x252fc5,'toVersion':_0x1071df};if(this['_stampAiAttribute'](_0x3b8db2,_0x2e4ff8,!!_0x572a55['hasAIChanges']),!_0x2e4ff8||_0x1071df!==_0x2e4ff8['toVersion']){const _0x3478d7=_0x1071df-0x1,_0x375f3f=this['_source']['history']['getOperation'](_0x3478d7);_0x3b8db2['createdAt']=_0x375f3f&&_0x375f3f['createdAt']||new Date();}if(this['_loadedStateData']&&_0x252fc5===this['_loadedStateData']['fromVersion']){for(const _0x58e1da of this['_loadedStateData']['authors'])_0x3b8db2['authorsIds']['includes'](_0x58e1da['id'])||_0x3b8db2['authorsIds']['push'](_0x58e1da['id']);}return _0x3b8db2;}_bufferUpdate(_0xb60ead,_0x43cc5e,_0x3a84b8){if(this['_bufferedUpdates']['has'](_0xb60ead)){const _0x59a582=this['_bufferedUpdates']['get'](_0xb60ead);_0x43cc5e=_0x3a84b8?{..._0x59a582,..._0x43cc5e}:{..._0x43cc5e,..._0x59a582};}this['_bufferedUpdates']['set'](_0xb60ead,_0x43cc5e);}setRevisionData(_0x4e4142){const _0x12367f=this['repository']['getRevision'](_0x4e4142['id']);if(_0x4e4142['createdAt']&&(_0x4e4142['createdAt']=new Date(_0x4e4142['createdAt'])),_0x4e4142['authorsIds']){const _0x4a6696=this['editor']['plugins']['get']('Users');_0x4e4142['authors']=_0x4e4142['authorsIds']['map'](_0x4a8369=>_0x4a6696['getUser'](_0x4a8369));}_0x12367f['_update'](_0x4e4142,!0x0);}_createInitialRevision(_0x685698){const _0x52d2f2=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x52d2f2)this['_initialRevisionId']=_0x52d2f2['id'];else{const _0x1e5b93=!this['editor']['model']['document']['roots']['find'](_0x4815bc=>this['editor']['model']['hasContent'](_0x4815bc)),_0x5420ce=this['editor']['plugins']['get']('Users')['me']['id'],_0x24b307=At(this['editor']['locale'],_0x1e5b93?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x685698,'to':_0x685698,'id':this['_initialRevisionId'],'name':_0x24b307,'creatorId':_0x5420ce});}}_createCurrentRevision(_0x583171){const _0x2bfed9=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2bfed9),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x583171,'to':_0x583171,'id':_0x2bfed9,'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(_0xaed9c0,_0x13b9bf,_0x2c3815){const _0x2d1ab6={},_0x143014={},_0x1dc48f={},_0x589af9=this['editor']['config']['get']('roots')||{};for(const [_0x177b02,_0x3d052d]of Object['entries'](_0x589af9))_0x3d052d['lazyLoad']||(_0x2d1ab6[_0x177b02]=_0x3d052d['initialData']??'',_0x143014[_0x177b02]=_0x3d052d['modelAttributes']||{},_0x3d052d['modelElement']&&(_0x1dc48f[_0x177b02]=_0x3d052d['modelElement']));for(const _0x491816 of this['editor']['model']['document']['getRootNames']())_0x2d1ab6[_0x491816]??='',_0x143014[_0x491816]??={};let _0x30b378=!0x1;const _0x25efea=Object['keys'](_0x2d1ab6),_0x2be152=Object['keys'](_0xaed9c0);for(const _0x28a7a8 of _0x25efea){if(_0x2d1ab6[_0x28a7a8]!==_0xaed9c0[_0x28a7a8]&&''!==_0x2d1ab6[_0x28a7a8]['trim']()){_0x30b378=!0x0;break;}if(!_0x2863c2(_0x143014[_0x28a7a8],_0x13b9bf[_0x28a7a8])&&Object['keys'](_0x143014[_0x28a7a8])['length']>0x0){_0x30b378=!0x0;break;}const _0x427bd0=_0x1dc48f[_0x28a7a8],_0xd6e543=_0x2c3815[_0x28a7a8];if(_0x427bd0&&_0xd6e543&&_0x427bd0!==_0xd6e543){_0x30b378=!0x0;break;}}_0x30b378||(_0x30b378=_0x2be152['some'](_0x1174c3=>!this['editor']['model']['document']['getRoot'](_0x1174c3))),_0x30b378&&_0x310429('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2d1ab6,'editorRootsAttributes':_0x143014,'editorRootsModelElements':_0x1dc48f,'revisionData':_0xaed9c0,'revisionRootsAttributes':_0x13b9bf,'revisionRootsModelElements':_0x2c3815});for(const [_0x54dde9,_0x44524d]of Object['entries'](_0xaed9c0))this['editor']['config']['set']('roots.'+_0x54dde9+'.initialData',_0x44524d);for(const [_0x2fdbdf,_0x5c69fb]of Object['entries'](_0x13b9bf))this['editor']['config']['set']('roots.'+_0x2fdbdf+'.modelAttributes',_0x5c69fb);const _0x33651f=this['editor']['model']['document'];for(const [_0x265ac7,_0x394708]of Object['entries'](_0x2c3815)){this['editor']['config']['set']('roots.'+_0x265ac7+'.modelElement',_0x394708);const _0x54cf58=_0x33651f['getRoot'](_0x265ac7);_0x54cf58&&_0x54cf58['name']!==_0x394708&&(_0x33651f['roots']['remove'](_0x265ac7),_0x33651f['createRoot'](_0x394708,_0x265ac7));}}_addPendingAction(){if(!this['_pendingAction']){const _0x19240e=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x19240e['add'](At(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x3d5988){const _0x11b206=this['repository']['getRevisions']();_0x11b206['reverse']();let _0x39c3e4=0x0;for(;_0x39c3e4<_0x11b206['length'];){const _0x1c9150=_0x11b206[_0x39c3e4];if(_0x1c9150===this['currentRevision']){_0x39c3e4++;continue;}if(_0x1c9150['id']===this['_initialRevisionId'])break;const _0x3994fa=_0x3d5988['toVersion']-_0x1c9150['toVersion']||_0x3d5988['fromVersion']-_0x1c9150['fromVersion'];if(_0x3994fa>0x0)break;if(_0x3994fa<0x0)_0x39c3e4++;else{if(!_0x3d5988['creator']&&_0x1c9150['creator'])break;if(_0x1c9150['creator']||!_0x3d5988['creator']){if(_0x3d5988['createdAt']>_0x1c9150['createdAt'])break;_0x39c3e4++;}else _0x39c3e4++;}}return _0x39c3e4;}_getFromVersion(_0x266d1a){const _0x46877b=this['repository']['getRevisions']();_0x46877b['reverse'](),_0x46877b['shift']();const _0xe75398=_0x46877b['find'](_0x36fdcc=>_0x36fdcc['toVersion']<=_0x266d1a)['toVersion'];return _0xe75398<this['_startingVersion']?this['_startingVersion']:_0xe75398;}['_makeRevision']({name:_0x413e4c,from:_0x4db1c5,to:_0xd365ee,creatorId:_0x2f7efa,id:_0x3372c5}){const _0x1396c8=this['buildRevisionData']({'from':_0x4db1c5,'to':_0xd365ee});_0x1396c8['name']=_0x413e4c,_0x1396c8['creatorId']=_0x2f7efa,_0x1396c8['id']=_0x3372c5;const _0x5404c1=this['addRevisionData'](_0x1396c8);return this['adapter']&&this['_bufferUpdate'](_0x1396c8['id'],_0x1396c8,!0x0),_0x5404c1;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x552026){this['editor']=_0x552026,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0xe6d166){this['source']=_0xe6d166;const _0x17120c=new Map(),_0x4a09fa=new Map(),_0x5311b7=this['editor']['model']['document']['roots']['map'](_0x4cecf7=>_0x4cecf7['rootName']);for(const _0x54626b of _0x5311b7){const _0x5410c4=this['editor']['model']['document']['getRoot'](_0x54626b),_0x3993fd=St(_0x5410c4);_0x17120c['set'](_0x54626b,_0x3993fd),_0x4a09fa['set'](_0x54626b,Object['fromEntries'](_0x5410c4['getAttributes']()));}const _0x6c714b=Array['from'](this['editor']['model']['markers'])['map'](_0x5f3937=>[_0x5f3937['name'],_0x5f3937['getRange']()]),_0x48d764=this['source']['version'];this['_saveMetaData'](_0x48d764,_0x17120c,_0x6c714b,_0x4a09fa),this['_startingRevisionId']=this['_revisionId'];const _0x141cac=new Map(),_0x14d00f=new Map();for(const _0x164c7a of _0x5311b7){const _0x10c422=Ot(_0x164c7a,this['editor']['model']['document']['getRoot'](_0x164c7a)['name']);_0x141cac['set'](_0x164c7a,_0x10c422),_0x14d00f['set'](_0x164c7a,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x141cac,[],_0x14d00f);}getData(_0x223268,_0x2179be){if(this['_lastFrom']===_0x223268&&this['_lastTo']<=_0x2179be)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2179be,!0x0);else{if(!this['_savedMetaData']['has'](_0x223268)){const _0x3574b8=this['_getPreviousFrom'](_0x223268);this['_calculateMetaData'](_0x3574b8,_0x223268,!0x1);}this['_calculateMetaData'](_0x223268,_0x2179be,!0x0);}return this['_lastFrom']=_0x223268,this['_lastTo']=_0x2179be,this['_getState']();}loadState(_0x4ac10f){if(!this['_savedMetaData']['has'](_0x4ac10f['fromVersion'])){const _0xe18e88=this['_getPreviousFrom'](_0x4ac10f['fromVersion']);this['_calculateMetaData'](_0xe18e88,_0x4ac10f['fromVersion'],!0x1);}this['_calculateMetaData'](_0x4ac10f['fromVersion'],_0x4ac10f['toVersion'],!0x1);const _0x154b61=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4ac10f['fromVersion'],this['_lastTo']=_0x4ac10f['toVersion'];for(const _0x43f0a7 in _0x4ac10f['diffData']){const _0x3bdf41=_0x4ac10f['diffData'][_0x43f0a7]['attachChange'],_0x47d7ea=_0x3ef400(_0x4ac10f['diffData'][_0x43f0a7]['attributesBefore'])||{},_0x36e2ce=_0x4ac10f['diffData'][_0x43f0a7],_0x5521b0=_0x154b61['_makeModelFromViewString'](_0x36e2ce['deletions'],_0x36e2ce['rootElementName']||'$root');_0x5521b0['rootName']=_0x43f0a7,_0x5521b0['_isAttached']=!_0x3bdf41||!_0x3bdf41['isAttached'],_0x5521b0['isAttached']=()=>_0x5521b0['_isAttached'],this['_baseRoots']['set'](_0x43f0a7,_0x5521b0),this['_baseRootsAttributes']['set'](_0x43f0a7,_0x47d7ea),_0x3bdf41&&this['_touchedRoots']['set'](_0x43f0a7,_0x3bdf41);const _0x149b74=this['_makeIdsRoot'](_0x5521b0);this['_baseIdsRoots']['set'](_0x43f0a7,_0x149b74);for(const [_0x11aa97,_0x5c0781]of _0x5521b0['markers']){if(!_0x11aa97['startsWith']('revision:'))continue;const _0xdff0e0=_0x11aa97['split'](':')[0x2],_0x5a7093=_0x36e2ce['aiSources']?.[_0x11aa97]||null;for(const _0x4e2b61 of _0x5c0781['getWalker']({'singleCharacters':!0x0})){const _0x474e69=this['_getVidAttributeName'](_0x4e2b61),_0x5482bf='elementEnd'==_0x4e2b61['type']?_0x4e2b61['previousPosition']['path']['slice'](0x0,-0x1):_0x4e2b61['previousPosition']['path'],_0x52e31a=_0x149b74['getNodeByPath'](_0x5482bf)['getAttribute'](_0x474e69);this['_touched']['set'](_0x52e31a,{'userId':_0xdff0e0,'aiSource':_0x5a7093});}_0x5521b0['markers']['delete'](_0x11aa97);}}this['_startingRevisionId']=this['_revisionId'];const _0x270a8c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2615e5=>!this['_touched']['has'](_0x2615e5));let _0x4d954e=0x0;const _0x14a85c=new Map();for(const _0x327dc9 in _0x4ac10f['diffData']){const _0x1e3241=_0x4ac10f['diffData'][_0x327dc9]['attachChange'],_0x225431=_0x3ef400(_0x4ac10f['diffData'][_0x327dc9]['attributesAfter'])||{},_0x5cf37c=_0x4ac10f['diffData'][_0x327dc9],_0x4d795b=_0x154b61['_makeModelFromViewString'](_0x5cf37c['insertions'],_0x5cf37c['rootElementName']||'$root');_0x4d795b['rootName']=_0x327dc9,_0x4d795b['_isAttached']=!_0x1e3241||_0x1e3241['isAttached'],_0x4d795b['isAttached']=()=>_0x4d795b['_isAttached'],this['_diffRoots']['set'](_0x327dc9,_0x4d795b),this['_diffRootsAttributes']['set'](_0x327dc9,_0x225431);const _0x8ad717=this['_makeIdsRoot'](_0x4d795b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x327dc9,_0x8ad717),_0x14a85c['set'](_0x327dc9,_0x4d795b['isAttached']()?_0x225431:{});for(const [_0x4be9d5,_0x3afd5a]of _0x4d795b['markers']){if(!_0x4be9d5['startsWith']('revision:'))continue;const _0x586a3c=_0x4be9d5['split'](':')[0x2],_0x1adeb0=_0x5cf37c['aiSources']?.[_0x4be9d5]||null;for(const _0x545a39 of _0x3afd5a['getWalker']({'singleCharacters':!0x0})){const _0x14a28d=this['_getVidAttributeName'](_0x545a39),_0x262108=this['_revisionId']++,_0x35e63d='elementEnd'==_0x545a39['type']?_0x545a39['previousPosition']['path']['slice'](0x0,-0x1):_0x545a39['previousPosition']['path'];_0x8ad717['getNodeByPath'](_0x35e63d)['_setAttribute'](_0x14a28d,_0x262108),this['_touched']['set'](_0x262108,{'userId':_0x586a3c,'aiSource':_0x1adeb0});}_0x4d795b['markers']['delete'](_0x4be9d5);}for(const _0x32fea2 of this['editor']['model']['createRangeIn'](_0x4d795b)['getWalker']({'singleCharacters':!0x0})){const _0x26d904=this['_getVidAttributeName'](_0x32fea2),_0x2398a0='elementEnd'==_0x32fea2['type']?_0x32fea2['previousPosition']['path']['slice'](0x0,-0x1):_0x32fea2['previousPosition']['path'],_0x2db11c=_0x8ad717['getNodeByPath'](_0x2398a0);_0x2db11c['getAttribute'](_0x26d904)>0x0||_0x2db11c['_setAttribute'](_0x26d904,_0x270a8c[_0x4d954e++]);}for(const [_0x474538,_0x13e3e1]of _0x4d795b['markers'])_0x474538['startsWith']('revision:')||this['_markers']['set'](_0x474538,_0x13e3e1);}const {roots:_0x12f57f}=this['_savedMetaData']['get'](_0x4ac10f['fromVersion']),{roots:_0x1fe107}=this['_savedMetaData']['get'](_0x4ac10f['toVersion']),_0x3d77a0=St(_0x12f57f['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x3d77a0),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3d77a0,Number['NEGATIVE_INFINITY']));const _0xc4020e=St(_0x1fe107['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0xc4020e),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xc4020e));const _0xedf5b9=Array['from'](this['_diffRoots'])['map'](([_0x21a42f,_0x30da8b])=>[_0x21a42f,St(_0x30da8b)]);this['_saveMetaData'](this['_lastTo'],_0xedf5b9,this['_markers'],_0x14a85c);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x54102c,_0xbfcb6d,_0x1af649,_0x31f6dd){const _0x503f5c=new Map(_0xbfcb6d),_0x458fac=new Map(_0x3ef400(_0x31f6dd)),_0x10592c=new Map();for(const [_0x9fbbde,_0x151b14]of _0x1af649)_0x10592c['set'](_0x9fbbde,{'start':_0x151b14['start']['clone'](),'end':_0x151b14['end']['clone'](),'rootName':_0x151b14['root']['rootName']});this['_savedMetaData']['set'](_0x54102c,{'roots':_0x503f5c,'markers':_0x10592c,'rootsAttributes':_0x458fac});}_removeMetaData(_0x4f67e6){this['_savedMetaData']['delete'](_0x4f67e6);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}_makeIdsRoot(_0x58549a,_0x46a401=null){let _0x96b039=null;_0x58549a['is']('documentFragment')||(_0x96b039=new _0x2f35f3(_0x58549a['name'],{'vid_start':null===_0x46a401?this['_revisionId']++:_0x46a401++}));const _0x4f6acd=[];for(const _0x1e02f5 of _0x58549a['getChildren']())if(_0x1e02f5['is']('element')){_0x4f6acd['push'](this['_makeIdsRoot'](_0x1e02f5,_0x46a401));const _0x2b9470=_0x4f6acd[_0x4f6acd['length']-0x1];null!==_0x46a401&&(_0x46a401=_0x2b9470['is']('element','$text')?_0x2b9470['getAttribute']('vid')+0x1:_0x2b9470['getAttribute']('vid_end')+0x1);}else{for(let _0x48adbc=0x0;_0x48adbc<_0x1e02f5['offsetSize'];_0x48adbc++)_0x4f6acd['push'](new _0x2f35f3('$text',{'vid':null===_0x46a401?this['_revisionId']++:_0x46a401++}));}if(_0x58549a['is']('documentFragment')){const _0x495070=Ot(_0x58549a['rootName'],_0x58549a['name']);return _0x495070['_insertChild'](0x0,_0x4f6acd),_0x495070;}return _0x96b039['_setAttribute']('vid_end',null===_0x46a401?this['_revisionId']++:_0x46a401),_0x96b039['_insertChild'](0x0,_0x4f6acd),_0x96b039;}_calculateMetaData(_0x2eedc4,_0x30fe08,_0x21c6a2){this['_reset']();const {roots:_0x1baa39,markers:_0x20c44a,rootsAttributes:_0x13bdfc}=this['_savedMetaData']['get'](_0x2eedc4);this['_baseRoots']=new Map(_0x1baa39),this['_baseRootsAttributes']=new Map(_0x3ef400(_0x13bdfc));for(const [_0x507993,_0x45a565]of this['_baseRoots'])if('$graveyard'!==_0x507993&&(this['_diffRoots']['set'](_0x507993,St(_0x45a565)),this['_diffRootsAttributes']=new Map(_0x3ef400(_0x13bdfc)),_0x21c6a2)){const _0x2f0cb6=this['_revisionId'];this['_idsRoots']['set'](_0x507993,this['_makeIdsRoot'](_0x45a565)),this['_baseIdsRoots']['set'](_0x507993,this['_makeIdsRoot'](_0x45a565,_0x2f0cb6));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x21c6a2&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x37649a,_0x3e45d6]of _0x20c44a){const _0x1cc14e=this['_baseRoots']['get'](_0x3e45d6['rootName']),_0x5b2771=this['_diffRoots']['get'](_0x3e45d6['rootName']),_0x2f77d0=new _0x59fca0(_0x56bb1(_0x3e45d6['start'],_0x1cc14e),_0x56bb1(_0x3e45d6['end'],_0x1cc14e)),_0x2fdc5f=_0x45bc6e(_0x2f77d0,_0x5b2771);_0x1cc14e['markers']['set'](_0x37649a,_0x2f77d0),this['_markers']['set'](_0x37649a,_0x2fdc5f);}this['_applyOperations'](_0x2eedc4,_0x30fe08,_0x21c6a2);}_applyOperations(_0x579c38,_0x4e670b,_0xcb084b){for(const _0x437df5 of this['source']['getOperations'](_0x579c38,_0x4e670b))this['_handleOperation'](_0x437df5,_0xcb084b);for(const _0x138723 of this['_diffRoots']['values']())_0x138723['markers']['clear']();for(const [_0x1b8551,_0x258b26]of this['_markers'])this['_diffRoots']['get'](_0x258b26['root']['rootName'])['markers']['set'](_0x1b8551,_0x258b26['clone']());const _0x3fbcb4=new Map(),_0x50b628=new Map();for(const [_0x1bb038,_0x5435d9]of this['_diffRoots'])_0x3fbcb4['set'](_0x1bb038,St(_0x5435d9)),_0x50b628['set'](_0x1bb038,this['_diffRootsAttributes']['get'](_0x1bb038));this['_saveMetaData'](_0x4e670b,_0x3fbcb4,this['_markers'],_0x50b628);}_getPreviousFrom(_0x572048){const _0x2c04b9=Array['from'](this['_savedMetaData']['keys']());_0x2c04b9['sort']((_0x51f777,_0x47df94)=>_0x51f777-_0x47df94),_0x2c04b9['reverse']();for(const _0x114710 of _0x2c04b9)if(_0x114710<_0x572048)return _0x114710;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x483389,_0x3eb1dc){const _0x3d1146=Array['from'](_0x3eb1dc['markers'])['map'](([_0x398793,_0x502f92])=>[_0x398793,_0x45bc6e(_0x502f92,_0x483389)]);_0x483389['markers']=new Map(_0x3d1146);}_transformMarkers(_0x37555c){for(const _0x18bf9a of this['_markers']['values']()){const _0x4a5e26=_0x18bf9a['getTransformedByOperation'](_0x37555c),_0x4546c8=_0x59fca0['_createFromRanges'](_0x4a5e26);_0x18bf9a['start']=_0x4546c8['start'],_0x18bf9a['end']=_0x4546c8['end'];}}_handleOperation(_0x2174ea,_0x249139){if('addRoot'!=_0x2174ea['type']&&'detachRoot'!=_0x2174ea['type']){if('insert'==_0x2174ea['type']){const _0x22649c=_0x2174ea['position']['root'],_0x58b6ff=_0x22649c['rootName'],_0x3425e3=_0x22649c['name'];this['_diffRoots']['has'](_0x58b6ff)||(this['_diffRoots']['set'](_0x58b6ff,Ot(_0x58b6ff,_0x3425e3,!0x0)),this['_diffRootsAttributes']['set'](_0x58b6ff,{}),_0x249139&&this['_idsRoots']['set'](_0x58b6ff,Ot(_0x58b6ff,_0x3425e3,!0x0)));}else{if('addRootAttribute'==_0x2174ea['type']||'removeRootAttribute'==_0x2174ea['type']||'changeRootAttribute'==_0x2174ea['type'])return void this['_handleRootAttributeOperation'](_0x2174ea);'marker'==_0x2174ea['type']&&this['_handleMarkerOperation'](_0x2174ea);}if('marker'!==_0x2174ea['type']){const _0x2f1c8d=this['_cloneOperation'](_0x2174ea,this['_diffRoots']);_0x2f1c8d['_execute'](),this['_transformMarkers'](_0x2f1c8d);}if(_0x249139)switch(_0x2174ea['type']){case'insert':this['_handleInsertOperation'](_0x2174ea);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2174ea);break;case'merge':this['_handleMergeOperation'](_0x2174ea);break;case'split':this['_handleSplitOperation'](_0x2174ea);}}else this['_handleRootOperation'](_0x2174ea,_0x249139);}_cloneOperation(_0x30c331,_0x4879c5){const _0x17698e=_0x30c331['clone']();return _0x17698e['_authorId']=_0x30c331['_authorId'],_0x17698e['_aiSource']=_0x30c331['_aiSource'],_0x17698e['baseVersion']=null,_0x1aee78(_0x17698e,_0x4879c5),_0x17698e;}_getBaseVids(_0x20d195){return _0x20d195['map'](_0x45ba07=>{const _0x29b1d0=this['_getVidAttributeName'](_0x45ba07);return Number(_0x45ba07['item']['getAttribute'](_0x29b1d0));});}_generateTape(_0x5692ff,_0x3c4bf1){if(_0x5692ff['is']('element','$text'))_0x3c4bf1['push']({'item':_0x5692ff,'type':'text'});else{_0x5692ff['is']('element')&&_0x3c4bf1['push']({'item':_0x5692ff,'type':'elementStart'});for(const _0x221f50 of _0x5692ff['getChildren']())this['_generateTape'](_0x221f50,_0x3c4bf1);_0x5692ff['is']('element')&&_0x3c4bf1['push']({'item':_0x5692ff,'type':'elementEnd'});}return _0x3c4bf1;}_getState(){const _0x530094=new Map(this['_touched']),_0x1e115b=new Map(_0x530094),_0x589f3e=new Map(),_0x104459={'insertions':{},'deletions':{}},_0x4ad899={'insertions':{},'deletions':{}},_0x50ba3e=new Map(),_0x1bb074=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1dbbb3=new Map();_0x1bb074['delete']('$graveyard');for(const _0x390a01 of _0x1bb074){const _0x340c2e=(this['_diffRoots']['get'](_0x390a01)??this['_baseRoots']['get'](_0x390a01))['name'],_0xe1d2fa=this['_diffRoots']['get'](_0x390a01)||Ot(_0x390a01,_0x340c2e,!0x1),_0x49e2a1=this['_baseRoots']['get'](_0x390a01)||Ot(_0x390a01,_0x340c2e,!0x1);_0xe1d2fa['isAttached']()||_0x49e2a1['isAttached']()?(_0x1dbbb3['set'](_0x390a01,_0x340c2e),_0x104459['insertions'][_0x390a01]=St(_0xe1d2fa),_0x104459['deletions'][_0x390a01]=St(_0x49e2a1),this['_copyMarkers'](_0x104459['deletions'][_0x390a01],_0x49e2a1),this['_copyMarkers'](_0x104459['insertions'][_0x390a01],_0xe1d2fa),_0x4ad899['insertions'][_0x390a01]=this['_generateTape'](this['_idsRoots']['get'](_0x390a01),[]),_0x4ad899['deletions'][_0x390a01]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x390a01)||Ot(_0x390a01,_0x340c2e,!0x1),[])):_0x1bb074['delete'](_0x390a01);}for(const _0x1058b3 of _0x1bb074){const _0x562591=_0x4ad899['insertions'][_0x1058b3];for(const _0x3e4623 of _0x562591){const _0xf08b23=this['_getVidAttributeName'](_0x3e4623),_0x332376=_0x3e4623['item']['getAttribute'](_0xf08b23);_0x1e115b['delete'](_0x332376),_0x332376>=this['_startingRevisionId']&&_0x589f3e['set'](_0x332376,_0x530094['get'](_0x332376));}}for(const _0x15b387 of _0x1bb074){const _0x253797=_0x4ad899['insertions'][_0x15b387],_0xf5d5f8=this['_getBaseVids'](_0x4ad899['deletions'][_0x15b387]);let _0x1dae19=0x0;for(const _0x42dbca of _0x253797){const _0x5ad19d=this['_getVidAttributeName'](_0x42dbca),_0x59105d=_0x42dbca['item']['getAttribute'](_0x5ad19d);if(!_0x589f3e['has'](_0x59105d)&&!_0x50ba3e['has'](_0x59105d)){if(_0x1e115b['has'](_0x59105d))_0x1dae19++;else{if(_0x59105d!=_0xf5d5f8[_0x1dae19]){const _0x3adb6c=_0x530094['get'](_0x59105d)||_0x530094['get'](_0xf5d5f8[_0x1dae19]);for(;_0x59105d!=_0xf5d5f8[_0x1dae19];)_0x1e115b['has'](_0xf5d5f8[_0x1dae19])||(_0x50ba3e['set'](_0xf5d5f8[_0x1dae19],_0x3adb6c),_0x530094['set'](_0xf5d5f8[_0x1dae19],_0x3adb6c)),_0x1dae19++;}_0x1dae19++;}}}}for(const _0xafdc84 of _0x1bb074){const _0x155182=_0x4ad899['insertions'][_0xafdc84];for(const _0x34b925 of _0x155182){const _0x43e7e0=this['_getVidAttributeName'](_0x34b925),_0x4ac0f2=_0x34b925['item']['getAttribute'](_0x43e7e0);if(_0x50ba3e['has'](_0x4ac0f2)){const _0x42bf34=_0x50ba3e['get'](_0x4ac0f2);_0x1e115b['has'](_0x4ac0f2)||_0x1e115b['set'](_0x4ac0f2,{..._0x42bf34}),_0x589f3e['set'](_0x4ac0f2,{..._0x42bf34});}}}for(const _0x5d9f90 of _0x1e115b['keys']())_0x5d9f90>=this['_startingRevisionId']&&_0x1e115b['delete'](_0x5d9f90);const _0x54582f=new Map();for(const _0x44b788 of _0x1bb074){let _0x2c45ea=_0x4ad899['insertions'][_0x44b788];for(const _0x4b1616 of _0x2c45ea)if(_0x4b1616['item']['is']('element','tableCell')){const _0x5ef4e4=this['_getVidAttributeName'](_0x4b1616),_0x25d0fc=_0x4b1616['item']['getAttribute'](_0x5ef4e4);if(_0x589f3e['has'](_0x25d0fc)){const _0x4d323c=_0x4b1616['item']['parent']['parent']['getAttribute']('vid_start'),_0x1d27b7=_0x589f3e['get'](_0x25d0fc),_0x38107b=_0x54582f['get'](_0x4d323c)||{'users':new Set(),'aiSource':null};_0x38107b['users']['add'](_0x1d27b7['userId']),_0x38107b['aiSource']=_0x38107b['aiSource']||_0x1d27b7['aiSource']||null,_0x54582f['set'](_0x4d323c,_0x38107b);}}_0x2c45ea=_0x4ad899['deletions'][_0x44b788];for(const _0x37a466 of _0x2c45ea)if(_0x37a466['item']['is']('element','tableCell')){const _0x3da111=this['_getVidAttributeName'](_0x37a466),_0x4d4520=_0x37a466['item']['getAttribute'](_0x3da111);if(_0x1e115b['has'](_0x4d4520)){const _0x48f156=_0x37a466['item']['parent']['parent']['getAttribute']('vid_start'),_0x314889=_0x1e115b['get'](_0x4d4520),_0x21c56e=_0x54582f['get'](_0x48f156)||{'users':new Set(),'aiSource':null};_0x21c56e['users']['add'](_0x314889['userId']),_0x21c56e['aiSource']=_0x21c56e['aiSource']||_0x314889['aiSource']||null,_0x54582f['set'](_0x48f156,_0x21c56e);}}for(const _0x34f022 of _0x54582f['keys']())(_0x589f3e['has'](_0x34f022)||_0x1e115b['has'](_0x34f022))&&_0x54582f['delete'](_0x34f022);}for(const _0x42efc5 of _0x1bb074){const _0x23c9c1=_0x4ad899['insertions'][_0x42efc5];let _0x59aaeb=null,_0x487198=null,_0x3c0200=null;for(const _0x78b84f of _0x23c9c1){const _0x48bc39=this['_getVidAttributeName'](_0x78b84f),_0x3605c6=_0x78b84f['item']['getAttribute'](_0x48bc39),_0x446ae0=_0x54582f['get'](_0x3605c6);if(_0x446ae0&&'elementStart'==_0x78b84f['type']&&(_0x59aaeb=Array['from'](_0x446ae0['users'])[0x0],_0x487198=_0x446ae0['aiSource'],_0x3c0200=_0x78b84f['item']['getAttribute']('vid_end')),_0x59aaeb){const _0x3405e2=_0x487198||_0x1e115b['get'](_0x3605c6)?.['aiSource']||null,_0x388316=_0x487198||_0x589f3e['get'](_0x3605c6)?.['aiSource']||null;_0x1e115b['set'](_0x3605c6,{'userId':_0x59aaeb,'aiSource':_0x3405e2}),_0x589f3e['set'](_0x3605c6,{'userId':_0x59aaeb,'aiSource':_0x388316});}_0x3605c6==_0x3c0200&&(_0x59aaeb=null,_0x3c0200=null);}}const _0x1db37b={},_0xadc102=new Set();for(const _0x4b0d8c of _0x1bb074){const _0x1ce578=_0x104459['deletions'][_0x4b0d8c],_0x11aa3a=_0x104459['insertions'][_0x4b0d8c];for(const {userId:_0x16b7d7}of this['_touchedMarkers']['values']())null!==_0x16b7d7&&_0xadc102['add'](_0x16b7d7);for(const {userId:_0x3ff137}of this['_touchedRoots']['values']())null!==_0x3ff137&&_0xadc102['add'](_0x3ff137);const _0x3af94e={};this['_markChanges'](_0x11aa3a,_0x4ad899['insertions'][_0x4b0d8c],_0x589f3e,'insertion',_0xadc102,_0x3af94e),this['_markChanges'](_0x1ce578,_0x4ad899['deletions'][_0x4b0d8c],_0x1e115b,'deletion',_0xadc102,_0x3af94e),this['_collectSuggestionAiSources'](_0x11aa3a,_0x3af94e),this['_collectSuggestionAiSources'](_0x1ce578,_0x3af94e),_0x1db37b[_0x4b0d8c]={'insertions':this['_prepareViewToSave'](_0x11aa3a),'deletions':this['_prepareViewToSave'](_0x1ce578),'attachChange':this['_touchedRoots']['get'](_0x4b0d8c)||null,'attributesBefore':_0x3ef400(this['_baseRootsAttributes']['get'](_0x4b0d8c))||{},'attributesAfter':_0x3ef400(this['_diffRootsAttributes']['get'](_0x4b0d8c)),'rootElementName':_0x1dbbb3['get'](_0x4b0d8c),'aiSources':_0x3af94e};}const _0x509e15=Array['from'](_0x589f3e['values']())['some'](_0x542f8c=>!(!_0x542f8c||!_0x542f8c['aiSource']))||Array['from'](_0x1e115b['values']())['some'](_0x19d8fa=>!(!_0x19d8fa||!_0x19d8fa['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x48172d=>this['_aiTouchedMarkers']['has'](_0x48172d));return{'diffData':_0x1db37b,'authorsIds':Array['from'](_0xadc102),'hasAIChanges':_0x509e15};}_collectSuggestionAiSources(_0x57597f,_0x3c3ecb){const _0x2c0986=_0x57597f['markers'];for(const _0x4d85fd of _0x2c0986['keys']()){if(!_0x4d85fd['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x4d85fd))continue;const _0x248f29=this['_aiTouchedMarkers']['get'](_0x4d85fd);_0x248f29&&(_0x3c3ecb[_0x4d85fd]=_0x248f29);}}_processRootBeforeSave(_0x20b6ab){for(const [,_0x431ae1]of _0x20b6ab['markers']){const _0x362081=_0x431ae1['start']['getAncestors']()['filter'](_0x34f4b3=>'tableCell'==_0x34f4b3['name']);for(const _0x495e4c of _0x362081)0x1==_0x495e4c['childCount']&&_0x495e4c['getChild'](0x0)['is']('element','paragraph')&&_0x495e4c['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x59640b){this['_processRootBeforeSave'](_0x59640b);const _0x19ecda=this['editor']['data']['toView'](_0x59640b,{}),_0x183167=Array['from'](_0x19ecda['getChildren']())['map'](_0x3cfd71=>this['_getViewJson'](_0x3cfd71));return JSON['stringify'](_0x183167);}_getViewJson(_0x49800b){if(_0x49800b['is']('$text'))return _0x49800b['data'];{const _0x17c540=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x9a3d8e=_0x49800b,_0xdb5e95=this['editor']['data']['htmlProcessor']['domConverter'],_0x5a8464={'type':_0x17c540['_getTypeCharForViewElement'](_0x9a3d8e),'name':_0x9a3d8e['name'],'attributes':Array['from'](_0x9a3d8e['getAttributes']()),'children':Array['from'](_0x9a3d8e['getChildren']())['map'](_0x20cb60=>this['_getViewJson'](_0x20cb60))};if(_0x49800b['is']('uiElement')&&'$comment'!=_0x49800b['name']){const _0x4e9164=_0x49800b['render'](_0xdb5e95['domDocument'],_0xdb5e95);_0x5a8464['children']['push'](_0x4e9164['outerHTML']);}else{if(_0x49800b['is']('rawElement')){const _0x294c8a=_0xdb5e95['domDocument']['createElement'](_0x9a3d8e['name']);_0x49800b['render'](_0x294c8a,_0xdb5e95),_0x5a8464['children']['push'](_0x294c8a['innerHTML']);}}const _0x6e188c=Array['from'](_0x9a3d8e['getCustomProperties']());_0x6e188c['length']>0x0&&(_0x5a8464['customProperties']=_0x6e188c);const _0x5a54f4=_0x9a3d8e['getFillerOffset']();return null!==_0x5a54f4&&(_0x5a8464['fillerOffset']=_0x5a54f4),_0x5a8464;}}['_markChanges'](_0x516a94,_0x4109c7,_0x38eb61,_0x589ecc,_0x138ccc,_0x2c4a23){let _0x419840=null,_0x2f88bd=null,_0x4284e8=0x0;const _0x432a79=this['editor']['model'];for(let _0x319b26=0x0;_0x319b26<_0x4109c7['length'];_0x319b26++){const _0x3819f8=this['_getVidAttributeName'](_0x4109c7[_0x319b26]),_0x3d0516=_0x4109c7[_0x319b26]['item']['getAttribute'](_0x3819f8),_0x2f0d1a=_0x38eb61['get'](_0x3d0516),_0x58b2f3=_0x319b26==_0x4109c7['length']-0x1;!_0x419840&&_0x2f0d1a&&(_0x419840=_0x2f0d1a,_0x2f88bd=_0x4109c7[_0x319b26]);const _0x463fe6=!!_0x419840&&!!_0x2f0d1a&&_0x2f0d1a['userId']!=_0x419840['userId'],_0xcac514=!!_0x419840&&!!_0x2f0d1a&&_0x2f0d1a['aiSource']!=_0x419840['aiSource'];_0x419840&&(!_0x2f0d1a||_0x463fe6||_0xcac514)&&(_0x27d4e0(_0x2f0d1a,Ct(_0x2f88bd,_0x516a94,_0x432a79),Ct(_0x4109c7[_0x319b26],_0x516a94,_0x432a79)),_0x419840=_0x2f0d1a||null,_0x2f88bd=_0x2f0d1a?_0x4109c7[_0x319b26]:null),_0x419840&&_0x58b2f3&&_0x27d4e0(_0x2f0d1a,Ct(_0x2f88bd,_0x516a94,_0x432a79),Nt(_0x4109c7[_0x319b26],_0x516a94,_0x432a79));}function _0x27d4e0(_0x15a324,_0x1fb49f,_0x1cdf55){const _0x56fc66=_0x419840['userId'],_0x5adde6=_0x419840['aiSource'],_0xc1ff00='revision:'+_0x589ecc+':'+_0x56fc66+':'+_0x4284e8++,_0x39fd99=_0x432a79['createRange'](_0x1fb49f,_0x1cdf55);_0x516a94['markers']['set'](_0xc1ff00,_0x39fd99),_0x5adde6&&(_0x2c4a23[_0xc1ff00]=_0x5adde6),null!==_0x56fc66&&_0x138ccc['add'](_0x56fc66);}}_getVidAttributeName(_0x516e97){switch(_0x516e97['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x30fc76){const _0x70f068=this['_idsRoots']['get'](_0x30fc76['position']['root']['rootName']),_0x559dbe=_0x56bb1(_0x30fc76['position'],_0x70f068),_0x322902=null===_0x30fc76['_authorId']?null:_0x30fc76['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x373f9f=_0x30fc76['_aiSource']||null,_0x3456fd=_0x559dbe['parent'],_0x533b10=this['_revisionId'],_0x3113cc=[];for(const _0x577c02 of _0x30fc76['nodes'])if(_0x577c02['is']('element'))_0x3113cc['push'](this['_makeIdsRoot'](_0x577c02));else{for(let _0x2e7676=0x0;_0x2e7676<_0x577c02['offsetSize'];_0x2e7676++)_0x3113cc['push'](new _0x2f35f3('$text',{'vid':this['_revisionId']++}));}const _0x381f25=this['_revisionId'];for(let _0x2773f2=_0x533b10;_0x2773f2<_0x381f25;_0x2773f2++)this['_touched']['set'](_0x2773f2,{'userId':_0x322902,'aiSource':_0x373f9f});_0x3456fd['_insertChild'](_0x559dbe['offset'],_0x3113cc);}_setTouched(_0xf45e6,_0x222204,_0x32b6a7){this['_touched']['set'](_0xf45e6,{'userId':_0x222204,'aiSource':_0x32b6a7||this['_touched']['get'](_0xf45e6)?.['aiSource']||null});}_handleMoveOperation(_0x499ae0){(_0x499ae0=this['_cloneOperation'](_0x499ae0,this['_idsRoots']))['_execute']();const _0x3c16bf=null===_0x499ae0['_authorId']?null:_0x499ae0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1dca60=_0x499ae0['_aiSource']||null,_0x1c0382=_0x499ae0['getMovedRangeStart'](),_0x55d6e7=_0x1c0382['parent'],_0x3cd3f2=_0x1c0382['offset'],_0x3802d2=(_0x4c6c9c,_0x43727e,_0x338aa4)=>{for(let _0x377649=_0x43727e;_0x377649<_0x338aa4;_0x377649++){const _0xc03b65=_0x4c6c9c['getChild'](_0x377649);_0xc03b65['is']('element','$text')?this['_setTouched'](_0xc03b65['getAttribute']('vid'),_0x3c16bf,_0x1dca60):(this['_setTouched'](_0xc03b65['getAttribute']('vid_start'),_0x3c16bf,_0x1dca60),_0x3802d2(_0xc03b65,0x0,_0xc03b65['childCount']),this['_setTouched'](_0xc03b65['getAttribute']('vid_end'),_0x3c16bf,_0x1dca60));}};_0x3802d2(_0x55d6e7,_0x3cd3f2,_0x3cd3f2+_0x499ae0['howMany']);}_handleMergeOperation(_0x54ee80){const _0x646840=null===(_0x54ee80=this['_cloneOperation'](_0x54ee80,this['_idsRoots']))['_authorId']?null:_0x54ee80['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x48d0b3=_0x54ee80['_aiSource']||null,_0x56d306=_0x54ee80['targetPosition']['parent'],_0x3d5a2e=_0x54ee80['sourcePosition']['parent'],_0x40e2d3=_0x56d306['getAttribute']('vid_end'),_0x418af7=_0x3d5a2e['getAttribute']('vid_start');_0x56d306['_setAttribute']('vid_end',_0x3d5a2e['getAttribute']('vid_end')),_0x3d5a2e['_setAttribute']('vid_end',_0x40e2d3),this['_setTouched'](_0x418af7,_0x646840,_0x48d0b3),this['_setTouched'](_0x40e2d3,_0x646840,_0x48d0b3),_0x54ee80['_execute']();}_handleSplitOperation(_0x21f4c4){const _0x3baa9e=null===(_0x21f4c4=this['_cloneOperation'](_0x21f4c4,this['_idsRoots']))['_authorId']?null:_0x21f4c4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x393f36=_0x21f4c4['_aiSource']||null,_0x82063d=_0x21f4c4['graveyardPosition'],_0x511f19=_0x21f4c4['splitPosition']['parent'];_0x21f4c4['_execute']();const _0x89f6c1=_0x511f19['getAttribute']('vid_end'),_0xc74f43=_0x21f4c4['insertionPosition']['nodeAfter'];if(_0x82063d){const _0x1d1e81=_0xc74f43['getAttribute']('vid_end'),_0x33bd82=_0x511f19['getAttribute']('vid_end');_0x511f19['_setAttribute']('vid_end',_0x1d1e81),_0xc74f43['_setAttribute']('vid_end',_0x33bd82),this['_setTouched'](_0x511f19['getAttribute']('vid_end'),_0x3baa9e,_0x393f36),this['_setTouched'](_0xc74f43['getAttribute']('vid_start'),_0x3baa9e,_0x393f36);}else{const _0x14134f=this['_revisionId']++,_0x3e3c5a=this['_revisionId']++;_0x511f19['_setAttribute']('vid_end',_0x14134f),_0xc74f43['_setAttribute']('vid_start',_0x3e3c5a),_0xc74f43['_setAttribute']('vid_end',_0x89f6c1),this['_setTouched'](_0x14134f,_0x3baa9e,_0x393f36),this['_setTouched'](_0x3e3c5a,_0x3baa9e,_0x393f36);}}_handleMarkerOperation(_0x5019ef){if(!_0x5019ef['affectsData'])return;const _0x459bb9=(_0x5019ef=this['_cloneOperation'](_0x5019ef,this['_diffRoots']))['oldRange']?_0x5019ef['oldRange']['root']:null,_0x34c21f=_0x5019ef['newRange']?_0x5019ef['newRange']['root']:null;_0x459bb9&&this['_markers']['delete'](_0x5019ef['name']),_0x34c21f&&this['_markers']['set'](_0x5019ef['name'],_0x5019ef['newRange']['clone']());const _0x32aff0=null===_0x5019ef['_authorId']?null:_0x5019ef['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xe67c88=_0x5019ef['name'];if(_0x5019ef['_aiSource']&&this['_aiTouchedMarkers']['set'](_0xe67c88,_0x5019ef['_aiSource']),!this['_touchedMarkers']['has'](_0xe67c88))return void this['_touchedMarkers']['set'](_0xe67c88,{'range':_0x5019ef['oldRange'],'userId':_0x32aff0});const _0x368a83=this['_touchedMarkers']['get'](_0xe67c88),_0x49a42d=_0x368a83['range'],_0x470080=_0x5019ef['newRange'];null==_0x49a42d&&null==_0x470080||_0x49a42d&&_0x470080&&_0x49a42d['isEqual'](_0x470080)?this['_touchedMarkers']['delete'](_0x5019ef['name']):_0x368a83['userId']=_0x32aff0;}_handleRootOperation(_0xe74f37,_0x95e88f){this['_diffRoots']['has'](_0xe74f37['rootName'])?this['_diffRoots']['get'](_0xe74f37['rootName'])['_isAttached']=_0xe74f37['isAdd']:(this['_diffRoots']['set'](_0xe74f37['rootName'],Ot(_0xe74f37['rootName'],_0xe74f37['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0xe74f37['rootName'],{}),_0x95e88f&&this['_idsRoots']['set'](_0xe74f37['rootName'],Ot(_0xe74f37['rootName'],_0xe74f37['elementName'],!0x0)));const _0x1c51ab=null===_0xe74f37['_authorId']?null:_0xe74f37['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x306ed5=this['_touchedRoots']['get'](_0xe74f37['rootName']);_0x306ed5&&_0x306ed5['userId']===_0x1c51ab?this['_touchedRoots']['delete'](_0xe74f37['rootName']):this['_touchedRoots']['set'](_0xe74f37['rootName'],{'userId':_0x1c51ab,'isAttached':_0xe74f37['isAdd']});}_handleRootAttributeOperation(_0x26b6b0){const _0x18ea6c=this['_diffRootsAttributes']['get'](_0x26b6b0['root']['rootName']);null===_0x26b6b0['newValue']?delete _0x18ea6c[_0x26b6b0['key']]:_0x18ea6c[_0x26b6b0['key']]=_0x26b6b0['newValue'];}};function St(_0x7ebe0c){const _0x370531=Ot(_0x7ebe0c['rootName'],_0x7ebe0c['name'],_0x7ebe0c['isAttached']());for(const _0x14622a of _0x7ebe0c['getChildren']()){const _0x4f04fc=_0x14622a['_clone'](!0x0);_0x370531['_appendChild'](_0x4f04fc);}return _0x370531;}function Ot(_0x199da2,_0x4972ef,_0x15c819=!0x0){const _0x2aec09=new _0xc42c44();return _0x2aec09['rootName']=_0x199da2,_0x2aec09['name']=_0x4972ef,_0x2aec09['_isAttached']=_0x15c819,_0x2aec09['isAttached']=()=>_0x2aec09['_isAttached'],_0x2aec09;}function Ct(_0x4133b5,_0x13bf5c,_0xfaed0b){const _0x44a3bf='elementEnd'==_0x4133b5['type']?_0xfaed0b['createPositionAt'](_0x4133b5['item'],'end'):_0xfaed0b['createPositionBefore'](_0x4133b5['item']);return _0xfaed0b['createPositionFromPath'](_0x13bf5c,_0x44a3bf['path'],_0x44a3bf['stickiness']);}function Nt(_0x3c9f37,_0x3efec8,_0x247869){const _0x4db8d1='elementStart'==_0x3c9f37['type']?_0x247869['createPositionAt'](_0x3c9f37['item'],0x0):_0x247869['createPositionAfter'](_0x3c9f37['item']);return _0x247869['createPositionFromPath'](_0x3efec8,_0x4db8d1['path'],_0x4db8d1['stickiness']);}const xt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0xc0251e();var Ht=class extends Mt{['id'];author;type;data;rootName;constructor(_0x22a33c){super(),this['id']=_0x22a33c['id']||_0x5a9e0c(),this['author']=_0x22a33c['author'],this['type']=_0x22a33c['type'],this['data']=_0x22a33c['data']||{},this['rootName']=_0x22a33c['rootName'],this['set']('createdAt',_0x22a33c['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Pt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x51760a,_0xbb8880){this['newRevisionId']=_0x51760a,this['oldRevisionId']=_0xbb8880,this['changes']=new _0x4ae41b();}_setChanges(_0x101198){for(const _0x1b78e3 of _0x101198)this['changes']['add'](_0x1b78e3);}},Ut=class extends _0x3c4294{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x2c9bd7,_0x124255,Rt,kt];}constructor(_0x533a73){super(_0x533a73),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',(_0x1fff01,_0x1bb4fd,_0x682dd8)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x9b699=>{for(const _0x7a29b3 of this['editor']['editing']['view']['document']['roots'])_0x682dd8?_0x9b699['removeClass']('ck-editor__editable__overlay',_0x7a29b3):_0x9b699['addClass']('ck-editor__editable__overlay',_0x7a29b3);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5cd21d=>null!==_0x5cd21d),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x45d7f8,_0x4b6dd2,_0x3a5748)=>_0x45d7f8&&_0x3a5748?_0x4b6dd2['changes']['getIndex'](_0x3a5748):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x465ad0,_0x5cc36a)=>_0x465ad0?_0x5cc36a['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x124255),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0xebf6b2=this['editor'],_0x4b28c8=new $t(_0xebf6b2,{'direction':'backward'}),_0x9f92a8=new $t(_0xebf6b2,{'direction':'forward'});_0xebf6b2['commands']['add']('showPreviousChange',_0x4b28c8),_0xebf6b2['commands']['add']('showNextChange',_0x9f92a8),_0xebf6b2['commands']['add']('restoreRevision',new Ft(_0xebf6b2)),this['on']('change:numberOfChanges',()=>{_0x4b28c8['refresh'](),_0x9f92a8['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0xebf6b2['enableReadOnlyMode']('revision-viewer'),_0xebf6b2['plugins']['has']('WidgetToolbarRepository')&&_0xebf6b2['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0xcf0cbb){return await this['_utils']['loadRevisionData'](_0xcf0cbb,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xcf0cbb);}async getRevisionRootsAttributes(_0x32b4bd){return await this['_utils']['loadRevisionData'](_0x32b4bd,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x32b4bd);}async['compare'](_0x5c689c,_0x1cef8f,_0x1da054=!0x1){if(!this['isEnabled'])return;const _0x57d6a0=this['diff'],_0x3a63c4=this['repository'],_0xcfd10b='string'==typeof _0x5c689c?_0x3a63c4['getRevision'](_0x5c689c):_0x5c689c,_0xd05776='string'==typeof _0x1cef8f?_0x3a63c4['getRevision'](_0x1cef8f):_0x1cef8f,_0x51fe05=_0xcfd10b['id'],_0x3596f8=_0xd05776?_0xd05776['id']:null;if(!_0x1da054&&this['diff']&&this['diff']['newRevisionId']===_0x51fe05&&this['diff']['oldRevisionId']===_0x3596f8)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Pt(_0x51fe05,_0x3596f8);const _0x28e3fd=this['_getRevisionsRange'](_0xcfd10b,_0xd05776,!0x0)['map'](_0x2fb0e1=>this['_utils']['loadRevisionData'](_0x2fb0e1,this['adapter']));return _0x28e3fd['push'](new Promise(_0x20cbb7=>{setTimeout(_0x20cbb7,0x14);})),Promise['all'](_0x28e3fd)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2f3f4d=this['_getDiff'](_0x51fe05,_0x3596f8);this['_cleanUpCommentMarkers'](_0x2f3f4d);for(const _0x58b35b of _0x2f3f4d['changes'])this['_changeIdToChange']['set'](_0x58b35b['id'],_0x58b35b);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x82c1e4=>{for(const _0x5b197e of this['editor']['model']['document']['getRootNames']())_0x82c1e4['detachRoot'](_0x5b197e);for(const _0xdeb904 of Object['keys'](_0x2f3f4d['model'])){const _0x4601f4=_0x2f3f4d['model'][_0xdeb904]['name'],_0x10d59f=_0x82c1e4['addRoot'](_0xdeb904,_0x4601f4);for(const _0x1210d6 of Object['keys'](_0x2f3f4d['attributes'][_0xdeb904]))_0x82c1e4['setAttribute'](_0x1210d6,_0x2f3f4d['attributes'][_0xdeb904][_0x1210d6],_0x10d59f);_0x82c1e4['insert'](_0x2f3f4d['model'][_0xdeb904],_0x10d59f,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2f3f4d['changes'])),this['isReady']=!0x0;})['catch'](_0x20546e=>{console['error'](_0x20546e),this['_cleanUp'](),_0x57d6a0&&(this['diff']=_0x57d6a0),this['isReady']=!0x0;});}addRevisionData(_0x1bbe27,_0x100131){const _0x130eda=this['repository']['createRevision'](_0x1bbe27);return _0x130eda['on']('_update',(_0x3ae38e,_0x723b36,_0x519493)=>_0x100131(_0x723b36,_0x519493,_0x130eda)),this['repository']['addRevision'](_0x130eda),_0x130eda;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x725e73=>{for(const _0x217a25 of this['editor']['model']['document']['getRootNames']())_0x725e73['detachRoot'](_0x217a25);});}_cleanUpCommentMarkers(_0x2968cb){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x438bca=this['_getVisibleCommentThreadIds']();for(const _0x5e3a5c of Object['values'](_0x2968cb['model']))for(const _0x521cd0 of Array['from'](_0x5e3a5c['markers']['keys']()))_0x521cd0['startsWith']('revision-comment:')&&!_0x438bca['has'](Lt(_0x521cd0))&&_0x5e3a5c['markers']['delete'](_0x521cd0);}_sortAndFilterDiffChanges(_0x303b4f){const _0x18bf5e=[],_0x32b9d0=new Map();for(const _0x43115d of this['editor']['model']['document']['getRootNames']()){const _0x31fbed=this['editor']['editing']['view']['getDomRoot'](_0x43115d);if(!_0x31fbed)continue;const _0x15edc7=_0x31fbed['getClientRects']()['item'](0x0);_0x15edc7&&(_0x18bf5e['push'](_0x43115d),_0x32b9d0['set'](_0x43115d,_0x15edc7));}return _0x18bf5e['sort']((_0x5520a0,_0x25babe)=>{const _0x4855f6=_0x32b9d0['get'](_0x5520a0),_0x4817a0=_0x32b9d0['get'](_0x25babe);return _0x4855f6['y']-_0x4817a0['y']||_0x4855f6['x']-_0x4817a0['x'];}),(_0x303b4f=_0x303b4f['filter'](_0x18aa6d=>_0x18bf5e['includes'](_0x18aa6d['rootName'])))['sort']((_0x21cbdf,_0x27fc2d)=>_0x18bf5e['indexOf'](_0x21cbdf['rootName'])-_0x18bf5e['indexOf'](_0x27fc2d['rootName'])),_0x303b4f;}['_makeTape'](_0x46ffcb,_0x4eaf10={}){const _0x55de77=Array['from'](_0x46ffcb['markers'])['filter'](([_0x244a5f,_0x171cee])=>_0x244a5f['startsWith']('revision:')&&!_0x171cee['isCollapsed']),_0x45ff2b=Array['from'](this['editor']['model']['createRangeIn'](_0x46ffcb)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x55de77['length'])for(const _0x4b6064 of _0x45ff2b){const [_0x1d6123,_0x55202e]=_0x55de77[0x0],[,_0x56753b,_0x103d57]=_0x1d6123['split'](':'),_0x1f1db8=_0x4eaf10[_0x1d6123]||null;if(_0x55202e['end']['isEqual'](_0x4b6064['nextPosition'])&&_0x55de77['shift'](),(_0x4b6064['previousPosition']['isEqual'](_0x55202e['start'])||_0x4b6064['previousPosition']['isAfter'](_0x55202e['start']))&&('insertion'==_0x56753b?_0x4b6064['isAdded']={'userId':_0x103d57,'aiSource':_0x1f1db8}:'deletion'==_0x56753b&&(_0x4b6064['isRemoved']={'userId':_0x103d57,'aiSource':_0x1f1db8})),0x0==_0x55de77['length'])break;}return _0x45ff2b;}_refreshStartEndIndex(_0x43304a){const _0x2be660=new Map();for(let _0x2ca811=0x0;_0x2ca811<_0x43304a['length'];_0x2ca811++)'text'===_0x43304a[_0x2ca811]['type']?(_0x43304a[_0x2ca811]['item']['startIndex']=_0x2ca811,_0x43304a[_0x2ca811]['item']['endIndex']=_0x2ca811):('elementStart'===_0x43304a[_0x2ca811]['type']?_0x43304a[_0x2ca811]['item']['startIndex']=_0x2ca811:'elementEnd'===_0x43304a[_0x2ca811]['type']&&(_0x43304a[_0x2ca811]['item']['endIndex']=_0x2ca811),_0x2be660['set'](_0x43304a[_0x2ca811]['id'],_0x2ca811));for(const _0x5f3dc0 of _0x2be660['values']())'elementStart'===_0x43304a[_0x5f3dc0]['type']?_0x43304a[_0x5f3dc0]['item']['endIndex']=_0x2be660['get'](_0x43304a[_0x5f3dc0]['pairId']):'elementEnd'===_0x43304a[_0x5f3dc0]['type']&&(_0x43304a[_0x5f3dc0]['item']['startIndex']=_0x2be660['get'](_0x43304a[_0x5f3dc0]['pairId']));}['_processTape'](_0x3a25f5){for(let _0x59f0af=0x0;_0x59f0af<_0x3a25f5['length'];_0x59f0af++){if('elementStart'===_0x3a25f5[_0x59f0af]['type'])_0x3a25f5[_0x59f0af]['item']['startIndex']=_0x59f0af;else{if('elementEnd'===_0x3a25f5[_0x59f0af]['type']){_0x3a25f5[_0x59f0af]['item']['endIndex']=_0x59f0af;const _0x6a4eda=_0x3a25f5[_0x59f0af]['item']['startIndex'];_0x3a25f5[_0x6a4eda]['pairId']=_0x3a25f5[_0x59f0af]['id'],_0x3a25f5[_0x59f0af]['pairId']=_0x3a25f5[_0x6a4eda]['id'];}else _0x3a25f5[_0x59f0af]['item']['startIndex']=_0x59f0af,_0x3a25f5[_0x59f0af]['item']['endIndex']=_0x59f0af,_0x3a25f5[_0x59f0af]['pairId']=null;}_0x3a25f5[_0x59f0af]['markersStart']||(_0x3a25f5[_0x59f0af]['markersStart']=[],_0x3a25f5[_0x59f0af]['markersEnd']=[]);}}_markInsertions(_0x39a453,_0x2bbf32){const _0x19c9ee=_0x39a453['filter'](_0x167508=>!_0x167508['isAdded']);for(let _0x2e248b=0x0;_0x2e248b<_0x2bbf32['length'];_0x2e248b++)_0x2bbf32[_0x2e248b]['isAdded']&&(_0x19c9ee[_0x2e248b]['isAdded']=_0x2bbf32[_0x2e248b]['isAdded']);}_getDiff(_0x2f66c7,_0x23e1a9=null){const _0xf65bae=this['repository']['getRevision'](_0x2f66c7),_0x42970b=_0x23e1a9?this['repository']['getRevision'](_0x23e1a9):null,_0x1595ad=this['_getRevisionsRange'](_0xf65bae,_0x42970b),_0x1fb39e=_0x1595ad[_0x1595ad['length']-0x1],_0x46cb3f=new Map(),_0x2d62a4={'model':{},'attributes':{},'changes':[]},_0x45cc08=new Set(),_0x521c16=new Map();for(let _0x1f492f=_0x1595ad['length']-0x1;_0x1f492f>=0x0;_0x1f492f--){const _0x2f142d=_0x1595ad[_0x1f492f];for(const _0x5151cd of Object['keys'](_0x2f142d['diffData']))if(_0x2f142d['diffData'][_0x5151cd]['attachChange']){const _0x1efb3d=_0x2f142d['diffData'][_0x5151cd]['attachChange'];_0x1efb3d['isAttached']?(_0x45cc08['add'](_0x5151cd),_0x521c16['has'](_0x5151cd)&&_0x521c16['get'](_0x5151cd)['userId']==_0x1efb3d['userId']?_0x521c16['delete'](_0x5151cd):_0x521c16['set'](_0x5151cd,_0x1efb3d)):_0x521c16['has'](_0x5151cd)?(_0x45cc08['delete'](_0x5151cd),_0x521c16['delete'](_0x5151cd)):(_0x45cc08['add'](_0x5151cd),_0x521c16['set'](_0x5151cd,_0x1efb3d));}else _0x45cc08['add'](_0x5151cd);}for(const _0x17b1ab of _0x45cc08){const _0x59d622=_0x521c16['has'](_0x17b1ab)&&!_0x521c16['get'](_0x17b1ab)['isAttached'];let _0x3cf932=_0x59d622?_0x1595ad['length']-0x1:0x0;const _0x4cfd94=_0x59d622?-0x1:0x1;for(;_0x1595ad[_0x3cf932];){const _0x12aabc=_0x1595ad[_0x3cf932];if(_0x12aabc['diffData'][_0x17b1ab]){const _0x88b954=_0x59d622?_0x12aabc['diffData'][_0x17b1ab]['attributesBefore']:_0x12aabc['diffData'][_0x17b1ab]['attributesAfter'];_0x2d62a4['attributes'][_0x17b1ab]=_0x88b954?_0x3ef400(_0x88b954):{};break;}_0x3cf932+=_0x4cfd94;}}for(const _0x560a39 of _0x1595ad){_0x560a39['model']={};for(const _0x2b49e7 of _0x560a39['authors'])_0x46cb3f['set'](_0x2b49e7['id'],_0x2b49e7);for(const _0x500c9d of _0x45cc08){const _0x1c725a=_0x560a39['diffData'][_0x500c9d]?_0x560a39['diffData'][_0x500c9d]['insertions']:'[]',_0x487d49=_0x560a39['diffData'][_0x500c9d]?_0x560a39['diffData'][_0x500c9d]['deletions']:'[]',_0x194865=_0x560a39['diffData'][_0x500c9d]?.['rootElementName']||'$root';_0x560a39['model'][_0x500c9d]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1c725a,_0x194865),'deletions':this['_utils']['_makeModelFromViewString'](_0x487d49,_0x194865)};}}for(const _0x35a6ca of _0x45cc08){let _0x378e59=null,_0x3995ff=0x0;const _0x233cda=_0x1595ad['map'](_0x45d3bb=>_0x45d3bb['diffData'][_0x35a6ca]?.['rootElementName'])['find'](_0x503340=>void 0x0!==_0x503340)||'$root',_0x7ec68a=new Map(Array['from'](_0xf65bae['model'][_0x35a6ca]['insertions']['markers'])['filter'](([_0x58d2d3])=>!_0x58d2d3['startsWith']('revision:')));let _0x257cb2=0x0;for(const _0x47f024 of _0x1595ad){const _0x2b2b02=_0x47f024['diffData'][_0x35a6ca]?.['aiSources']||{},_0x19f226=this['_makeTape'](_0x47f024['model'][_0x35a6ca]['insertions'],_0x2b2b02);_0x47f024==_0xf65bae?(_0x378e59=_0x19f226,_0x3995ff=_0x378e59['length'],_0x378e59['forEach'](_0x1692e7=>{_0x1692e7['id']=_0x257cb2++;}),this['_processTape'](_0x378e59)):this['_markInsertions'](_0x378e59,_0x19f226);const _0x2987f2=_0x378e59['filter'](_0x54ecb3=>!_0x54ecb3['isAdded'])['map'](_0x3d2446=>_0x3d2446['id']);let _0x543fb6=0x0;const _0x2a7be1=this['_makeTape'](_0x47f024['model'][_0x35a6ca]['deletions'],_0x2b2b02);_0x2a7be1['forEach'](_0x37c475=>{_0x37c475['isRemoved']?_0x37c475['id']=_0x3995ff++:_0x37c475['id']=_0x2987f2[_0x543fb6++];}),this['_processTape'](_0x2a7be1),this['_setDistance'](_0x378e59,'isAdded'),this['_setDistance'](_0x2a7be1,'isRemoved'),_0x47f024==_0xf65bae&&this['_markMarkers'](_0x378e59,_0x7ec68a),_0x378e59=this['_joinTapes'](_0x378e59,_0x2a7be1),this['_refreshStartEndIndex'](_0x378e59),this['_setDistance'](_0x378e59,'isRemoved');}_0x378e59=_0x378e59['filter'](_0x126009=>!(_0x126009['isAdded']&&_0x126009['isRemoved']));const _0x4ac8c7=new Map(_0x1fb39e['model'][_0x35a6ca]['deletions']['markers']),_0x383eb7=new Set(_0x7ec68a['keys']());for(const _0xa5d536 of _0x4ac8c7['keys']())_0x383eb7['delete'](_0xa5d536);const _0x1bdea1=Object['assign']({},..._0x1595ad['map'](_0x171c44=>_0x171c44['diffData'][_0x35a6ca]?.['aiSources']));this['_markSuggestions'](_0x378e59,_0x383eb7,_0x1bdea1),this['_fixObsoleteTags'](_0x378e59),_0x378e59=this['_removeMissingPairs'](_0x378e59),_0x378e59=this['_markMismatchedRemovedTags'](_0x378e59),_0x378e59=this['_removeUnsupportedChanges'](_0x378e59);const {root:_0x10660c,changes:_0x595368}=this['_makeModelFromTape'](_0x378e59,_0x46cb3f,_0x35a6ca,_0x233cda);_0x2d62a4['model'][_0x35a6ca]=_0x10660c;const _0x4e79e2=_0x521c16['get'](_0x35a6ca);if(_0x4e79e2){const _0xc7ab40=_0x46cb3f['get'](_0x4e79e2['userId']),_0x39b3b1=new Ht({'author':_0xc7ab40,'type':_0x4e79e2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x35a6ca});_0x595368['unshift'](_0x39b3b1),_0x2d62a4['attributes'][_0x35a6ca]['revisionHistoryAttachChange']=_0x39b3b1['id'];}_0x2d62a4['changes']=_0x2d62a4['changes']['concat'](_0x595368);}return _0x2d62a4;}['_markMarkers'](_0x4bc872,_0x5e5994){for(let _0x39da28=0x0;_0x39da28<_0x4bc872['length'];_0x39da28++)for(const [_0x5e06c0,_0xece2c1]of _0x5e5994)!_0xece2c1['isCollapsed']&&_0xece2c1['start']['isEqual'](_0x4bc872[_0x39da28]['previousPosition'])&&_0x4bc872[_0x39da28]['markersStart']['push'](_0x5e06c0),_0xece2c1['end']['isEqual'](_0x4bc872[_0x39da28]['nextPosition'])&&_0x4bc872[_0x39da28]['markersEnd']['push'](_0x5e06c0);}['_joinTapes'](_0x29f84e,_0x5bfb1a){let _0x207974=[],_0x5e9c34=0x0,_0x28b6f4=0x0;for(;_0x5e9c34<_0x29f84e['length']||_0x28b6f4<_0x5bfb1a['length'];){const _0x2b7b12=_0x29f84e[_0x5e9c34]||{},_0x85e5cf=_0x5bfb1a[_0x28b6f4]||{};if(_0x2b7b12['id']==_0x85e5cf['id'])_0x5e9c34++,_0x28b6f4++,_0x207974['push'](_0x2b7b12);else{if(_0x85e5cf['isRemoved']&&_0x2b7b12['isAdded']){const {commonTape:_0x14a45d,iEnd:_0x4f6428,jEnd:_0x3dc912}=this['_threeWayMerge'](_0x29f84e,_0x5e9c34,_0x5bfb1a,_0x28b6f4);_0x207974=_0x207974['concat'](_0x14a45d),_0x5e9c34=_0x4f6428,_0x28b6f4=_0x3dc912;}else _0x85e5cf['isRemoved']?(_0x28b6f4++,_0x207974['push'](_0x85e5cf)):(_0x5e9c34++,_0x207974['push'](_0x2b7b12));}}return _0x207974;}_markSuggestions(_0x8bd541,_0x279a68,_0x1ae51b){const _0xb8a350=[];for(let _0x55eb65=0x0;_0x55eb65<_0x8bd541['length'];_0x55eb65++){for(let _0x263f27=0x0;_0x263f27<_0x8bd541[_0x55eb65]['markersStart']['length'];_0x263f27++){const _0x2b3768=_0x8bd541[_0x55eb65]['markersStart'][_0x263f27];if(!_0x279a68['has'](_0x2b3768))continue;const {group:_0x4c8686,type:_0x519757,authorId:_0x19e2ce}=_0x2a57c8(_0x2b3768);if('revision-suggestion'!=_0x4c8686||'insertion'!=_0x519757&&'deletion'!=_0x519757)continue;const _0x5dfce8=_0x1ae51b['suggestion:'+_0x2b3768['slice'](0x14)]||null;_0xb8a350['unshift']({'type':_0x519757,'name':_0x2b3768,'userId':_0x19e2ce,'aiSource':_0x5dfce8}),_0x8bd541[_0x55eb65]['markersStart']['splice'](_0x263f27,0x1),_0x263f27--;}_0x2774fe(_0x8bd541[_0x55eb65]);for(let _0x5475d1=0x0;_0x5475d1<_0x8bd541[_0x55eb65]['markersEnd']['length'];_0x5475d1++){const _0x4e75ba=_0x8bd541[_0x55eb65]['markersEnd'][_0x5475d1];if(!_0x279a68['has'](_0x4e75ba))continue;const {group:_0x52d933,type:_0x4c483f}=_0x2a57c8(_0x4e75ba);if('revision-suggestion'!=_0x52d933||'insertion'!=_0x4c483f&&'deletion'!=_0x4c483f)continue;_0x8bd541[_0x55eb65]['markersEnd']['splice'](_0x5475d1,0x1),_0x5475d1--;const _0x44343f=_0xb8a350['findIndex'](_0x3a5895=>_0x3a5895['name']==_0x4e75ba);_0x44343f>-0x1&&_0xb8a350['splice'](_0x44343f,0x1);}}function _0x2a57c8(_0x22b26a){const _0x51961a=_0x22b26a['split'](':');return{'group':_0x51961a[0x0],'type':_0x51961a[0x1],'subType':_0x51961a['length']>=0x5?_0x51961a[0x2]:null,'id':_0x51961a['length']<0x5?_0x51961a[0x2]:_0x51961a[0x3],'authorId':_0x51961a['length']<0x5?_0x51961a[0x3]:_0x51961a[0x4],'markerCount':0x6==_0x51961a['length']?_0x51961a[0x5]:null};}function _0x2774fe(_0x47ac2a){for(let _0x1a086a=0x0;_0x1a086a<_0xb8a350['length'];_0x1a086a++){if(_0x47ac2a['isAdded']&&'insertion'==_0xb8a350[_0x1a086a]['type']&&_0x47ac2a['isAdded']['userId']==_0xb8a350[_0x1a086a]['userId'])return _0x47ac2a['isAddSuggestion']={..._0xb8a350[_0x1a086a],'aiSource':_0x47ac2a['isAdded']['aiSource']||_0xb8a350[_0x1a086a]['aiSource']},void delete _0x47ac2a['isAdded'];if(!_0x47ac2a['isAdded']&&!_0x47ac2a['isRemoved']&&'deletion'==_0xb8a350[_0x1a086a]['type'])return void(_0x47ac2a['isRemoveSuggestion']=_0xb8a350[_0x1a086a]);}}}_setDistance(_0x4d87d0,_0x1a50c0){let _0x45f601=0x0,_0x32521c=!0x1;const _0x4618f1=new Map();for(const _0x2cd591 of _0x4d87d0)_0x2cd591[_0x1a50c0]?_0x32521c&&(_0x45f601++,_0x32521c=!0x1):(_0x45f601++,_0x32521c=!0x0),_0x4618f1['set'](_0x2cd591['id'],_0x45f601);for(let _0x1af36f=0x0;_0x1af36f<_0x4d87d0['length'];_0x1af36f++){if('isRemoved'==_0x1a50c0&&_0x4d87d0[_0x1af36f]['isAdded']||'isAdded'==_0x1a50c0&&_0x4d87d0[_0x1af36f]['isRemoved'])continue;if('text'==_0x4d87d0[_0x1af36f]['type']){_0x4d87d0[_0x1af36f]['distance']=0x0;continue;}const _0x59e89b=_0x4618f1['get'](_0x4d87d0[_0x1af36f]['pairId']),_0x13847d=_0x4618f1['get'](_0x4d87d0[_0x1af36f]['id']);_0x4d87d0[_0x1af36f]['distance']=_0x59e89b-_0x13847d;}}_getRevisionsRange(_0xa8a3cd,_0x4c34c5,_0x402dfb=!0x1){const _0x45d03c=[];let _0x47b26c=this['repository']['getIndex'](_0xa8a3cd),_0xbd2948=this['repository']['getIndex'](_0x4c34c5);for(-0x1==_0xbd2948&&(_0xbd2948=this['repository']['_revisions']['length'],_0x402dfb=!0x1);_0x47b26c<_0xbd2948;)_0x45d03c['push'](this['repository']['getRevision'](_0x47b26c)),_0x47b26c++;return _0x402dfb&&_0x45d03c['push'](this['repository']['getRevision'](_0x47b26c)),_0x45d03c;}_threeWayMerge(_0x418c4b,_0x1d371c,_0x1c8053,_0x494e37){const _0x50faa8=this['editor']['model']['schema'];let _0x5d6149=_0x1d371c;for(;_0x418c4b[_0x5d6149]&&_0x418c4b[_0x5d6149]['isAdded'];)_0x5d6149++;let _0x40a816=_0x494e37;for(;_0x1c8053[_0x40a816]&&_0x1c8053[_0x40a816]['isRemoved'];)_0x40a816++;_0x55f969(_0x418c4b,_0x1d371c,_0x5d6149),_0x55f969(_0x1c8053,_0x494e37,_0x40a816);const _0x55567b=_0x1c8053['slice'](_0x494e37,_0x40a816)['concat'](_0x418c4b['slice'](_0x1d371c,_0x5d6149));return _0x55567b['sort']((_0x3743c4,_0x40006d)=>_0x3743c4['side']!=_0x40006d['side']?_0x3743c4['side']-_0x40006d['side']:_0x3743c4['level']!=_0x40006d['level']?_0x3743c4['level']-_0x40006d['level']:_0x3743c4['distance']!=_0x40006d['distance']?_0x40006d['distance']-_0x3743c4['distance']:!!_0x3743c4['isAdded']!=!!_0x40006d['isAdded']?-0x1==_0x3743c4['side']||0x0==_0x3743c4['side']?_0x3743c4['isAdded']?-0x1:0x1:_0x3743c4['isAdded']?0x1:-0x1:_0x3743c4['index']-_0x40006d['index']),{'commonTape':_0x55567b,'iEnd':_0x5d6149,'jEnd':_0x40a816};function _0x55f969(_0x5e7b99,_0x265217,_0x4e7d3f){let _0x2c6c57=-0x1,_0x52431b=Number['POSITIVE_INFINITY'],_0x3370d4=!0x0;for(let _0x4b211f=_0x265217;_0x4b211f<_0x4e7d3f;_0x4b211f++)if(_0x50faa8['isInline'](_0x5e7b99[_0x4b211f]['item'])||(_0x3370d4=!0x1),_0x5e7b99[_0x4b211f]['item']['startIndex']<_0x265217&&(_0x2c6c57=_0x4b211f),_0x5e7b99[_0x4b211f]['item']['endIndex']>=_0x4e7d3f){_0x52431b=_0x4b211f;break;}_0x3370d4&&(_0x2c6c57=_0x4e7d3f-0x1);for(let _0x44f3f7=_0x265217;_0x44f3f7<_0x4e7d3f;_0x44f3f7++)_0x5e7b99[_0x44f3f7]['side']=_0x44f3f7<=_0x2c6c57?-0x1:_0x44f3f7<_0x52431b?0x0:0x1,_0x5e7b99[_0x44f3f7]['index']=_0x44f3f7;let _0x456a43=0x0;for(let _0x51c64f=_0x265217;_0x51c64f<=_0x2c6c57;_0x51c64f++)0x0==_0x5e7b99[_0x51c64f]['distance']?_0x5e7b99[_0x51c64f]['level']=_0x456a43:(_0x456a43++,_0x5e7b99[_0x51c64f]['level']=_0x456a43,_0x456a43++);for(let _0x2cf415=_0x265217;_0x2cf415<_0x4e7d3f;_0x2cf415++)0x0==_0x5e7b99[_0x2cf415]['side']&&(_0x5e7b99[_0x2cf415]['level']=_0x456a43);_0x456a43=0x0;for(let _0x48c2f1=_0x4e7d3f-0x1;_0x48c2f1>=_0x52431b;_0x48c2f1--)0x0==_0x5e7b99[_0x48c2f1]['distance']?_0x5e7b99[_0x48c2f1]['level']=_0x456a43:(_0x456a43--,_0x5e7b99[_0x48c2f1]['level']=_0x456a43,_0x456a43--);}}_fixObsoleteTags(_0x5c974e){const _0x2c6987=new Map(),_0x62606d=this['editor']['model']['schema'];for(let _0x28f843=0x1;_0x28f843<_0x5c974e['length'];_0x28f843++){let _0x238376,_0x2d5f13,_0x37f966;const _0x288d7a=_0x5c974e[_0x28f843],_0x245a8e=_0x5c974e[_0x28f843-0x1];if('text'==_0x288d7a['type'])continue;if(_0x288d7a['type']!=_0x245a8e['type'])continue;if(!_0x62606d['isBlock'](_0x245a8e['item'])||_0x62606d['isLimit'](_0x245a8e['item']))continue;if(!_0x62606d['isBlock'](_0x288d7a['item'])||_0x62606d['isLimit'](_0x288d7a['item']))continue;if((_0x5c974e[_0x28f843]['isAdded']||_0x5c974e[_0x28f843]['isAddSuggestion'])&&_0x5c974e[_0x28f843-0x1]['isRemoved'])_0x238376=_0x5c974e[_0x28f843],_0x2d5f13=_0x5c974e[_0x28f843-0x1],_0x37f966=_0x28f843-0x1;else{if(!_0x5c974e[_0x28f843]['isRemoved']||!_0x5c974e[_0x28f843-0x1]['isAdded']&&!_0x5c974e[_0x28f843-0x1]['isAddSuggestion'])continue;_0x238376=_0x5c974e[_0x28f843-0x1],_0x2d5f13=_0x5c974e[_0x28f843],_0x37f966=_0x28f843;}const _0x59c1b4=_0x238376['level']==_0x2d5f13['level'],_0xb1a8a1=Math['abs'](_0x238376['level'])<Math['abs'](_0x2d5f13['level'])&&0x0==_0x2d5f13['distance'];(_0x59c1b4||_0xb1a8a1)&&(_0x2c6987['set'](_0x2d5f13['id'],_0x238376['id']),_0x5c974e['splice'](_0x37f966,0x1),_0x28f843--,_0x238376['isAdded']=!0x1);}for(let _0x23ec52=0x0;_0x23ec52<_0x5c974e['length'];_0x23ec52++)_0x2c6987['has'](_0x5c974e[_0x23ec52]['pairId'])&&(_0x5c974e[_0x23ec52]['pairId']=_0x2c6987['get'](_0x5c974e[_0x23ec52]['pairId']));}['_removeMissingPairs'](_0x522ab6){const _0x556f8b=new Set(_0x522ab6['map'](_0x5a8f9f=>_0x5a8f9f['id']));for(let _0x1e9504=0x0;_0x1e9504<_0x522ab6['length'];_0x1e9504++)_0x556f8b['has'](_0x522ab6[_0x1e9504]['pairId'])||0x0==_0x522ab6[_0x1e9504]['distance']||(_0x522ab6[_0x1e9504]['isIncorrect']=!0x0);return _0x522ab6['filter'](_0x5e0e8a=>!_0x5e0e8a['isIncorrect']);}_markMismatchedRemovedTags(_0xca282d){const _0x5f174c=new Set();for(let _0x51da2c=0x0;_0x51da2c<_0xca282d['length'];_0x51da2c++){if(_0x5f174c['has'](_0xca282d[_0x51da2c]['id'])&&_0xca282d[_0x51da2c]['isRemoved']&&(_0xca282d[_0x51da2c]['isIncorrect']=!0x0),_0xca282d[_0x51da2c]['isIncorrect'])continue;if(0x0==_0xca282d[_0x51da2c]['distance'])continue;if('elementStart'!=_0xca282d[_0x51da2c]['type'])continue;if(null==_0xca282d[_0x51da2c]['pairId'])continue;let _0x57df1b=_0x51da2c+0x1,_0x168399=0x0;for(;_0xca282d[_0x57df1b]['id']!=_0xca282d[_0x51da2c]['pairId'];)'elementStart'==_0xca282d[_0x57df1b]['type']?_0x168399++:'elementEnd'==_0xca282d[_0x57df1b]['type']&&_0x168399--,_0x57df1b++;if(0x0!=_0x168399){if(_0xca282d[_0x51da2c]['isRemoved'])_0xca282d[_0x51da2c]['isIncorrect']=!0x0;else{for(;_0x57df1b!=_0x51da2c;)_0xca282d[_0x57df1b]['isRemoved']&&0x0!=_0xca282d[_0x57df1b]['distance']&&(_0xca282d[_0x57df1b]['isIncorrect']=!0x0,_0x5f174c['add'](_0xca282d[_0x57df1b]['pairId'])),_0x57df1b--;}}}return _0xca282d['filter'](_0x43706f=>!_0x43706f['isIncorrect']);}_removeUnsupportedChanges(_0x795755){const _0x4436de=this['editor']['model']['schema'];for(let _0x289b45=0x0;_0x289b45<_0x795755['length'];_0x289b45++){if(!(_0x795755[_0x289b45]['isAdded']||_0x795755[_0x289b45]['isAddSuggestion']||_0x795755[_0x289b45]['isRemoved']||_0x795755[_0x289b45]['isRemoveSuggestion']))continue;if(0x0==_0x795755[_0x289b45]['distance'])continue;const _0x2b0f7e=_0x795755[_0x289b45]['item'];_0x4436de['isBlock'](_0x2b0f7e)||_0x4436de['isLimit'](_0x2b0f7e)||(_0x795755[_0x289b45]['isAdded']&&delete _0x795755[_0x289b45]['isAdded'],_0x795755[_0x289b45]['isAddSuggestion']&&delete _0x795755[_0x289b45]['isAddSuggestion'],_0x795755[_0x289b45]['isRemoveSuggestion']&&delete _0x795755[_0x289b45]['isRemoveSuggestion'],_0x795755[_0x289b45]['isRemoved']&&(_0x795755[_0x289b45]['isIncorrect']=!0x0));}return _0x795755['filter'](_0x47b811=>!_0x47b811['isIncorrect']);}['_makeModelFromTape'](_0x43668b,_0x2418c0,_0x426ddb,_0xe788ec){const _0x2bcb4b=new _0xc42c44(),_0x3a6d7f=[],_0x59177a=new Map(),_0x3eda9f=this['editor']['model'],_0x36ef96=_0x3eda9f['schema'],_0x34d654=[_0x2bcb4b],_0x3dd2b3={},_0x3811de={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2bcb4b['name']=_0xe788ec;let _0x8cb0d8=null;const _0x239ce9=[0x0];for(let _0x29a9f8=0x0;_0x29a9f8<_0x43668b['length'];_0x29a9f8++)if('elementStart'===_0x43668b[_0x29a9f8]['type']){_0x43668b[_0x29a9f8]['previousPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9);const _0x2dc7e1=new _0x2f35f3(_0x43668b[_0x29a9f8]['item']['name'],_0x43668b[_0x29a9f8]['item']['getAttributes']());_0x34d654[0x0]['_appendChild'](_0x2dc7e1),_0x239ce9['push'](0x0),_0x34d654['unshift'](_0x2dc7e1),_0x43668b[_0x29a9f8]['nextPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9);}else'elementEnd'===_0x43668b[_0x29a9f8]['type']?(_0x34d654['shift'](),_0x43668b[_0x29a9f8]['previousPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9),_0x239ce9['pop'](),_0x239ce9[_0x239ce9['length']-0x1]++,_0x43668b[_0x29a9f8]['nextPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9)):(_0x43668b[_0x29a9f8]['previousPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9),_0x8cb0d8?_0x8cb0d8['_data']+=_0x43668b[_0x29a9f8]['item']['data']:_0x8cb0d8=new _0xfcc423(_0x43668b[_0x29a9f8]['item']['data'],_0x43668b[_0x29a9f8]['item']['getAttributes']()),_0x43668b[_0x29a9f8+0x1]&&'text'===_0x43668b[_0x29a9f8+0x1]['type']&&_0x4aed44(_0x8cb0d8,_0x43668b[_0x29a9f8+0x1]['item'])||(_0x34d654[0x0]['_appendChild'](_0x8cb0d8),_0x8cb0d8=null),_0x239ce9[_0x239ce9['length']-0x1]+=_0x43668b[_0x29a9f8]['item']['offsetSize'],_0x43668b[_0x29a9f8]['nextPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9));for(let _0x4834bb=0x0;_0x4834bb<_0x43668b['length'];_0x4834bb++){const _0x18fbb0=_0x43668b[_0x4834bb]['previousPosition'],_0x5a86bc=_0x43668b[_0x4834bb]['nextPosition'];for(const _0x11b484 of _0x43668b[_0x4834bb]['markersStart'])_0x59177a['set'](_0x11b484,{'start':_0x18fbb0,'end':null});_0x48ac6a('isRemoveSuggestion',_0x4834bb,_0x18fbb0,_0x5a86bc),_0x48ac6a('isAddSuggestion',_0x4834bb,_0x18fbb0,_0x5a86bc),_0x48ac6a('isRemoved',_0x4834bb,_0x18fbb0,_0x5a86bc),_0x48ac6a('isAdded',_0x4834bb,_0x18fbb0,_0x5a86bc);for(const _0x5d0ccf of _0x43668b[_0x4834bb]['markersEnd']){const _0x387cc9=_0x59177a['get'](_0x5d0ccf);_0x387cc9?_0x387cc9['end']=_0x5a86bc:_0x59177a['set'](_0x5d0ccf,{'start':_0x5a86bc,'end':_0x5a86bc});}}for(const [_0x180cbe,_0x412e8c]of _0x59177a){const _0x23d5f8=this['editor']['model']['createRange'](_0x412e8c['start'],_0x412e8c['end']);_0x2bcb4b['markers']['set'](_0x180cbe,_0x23d5f8);}return _0x3a6d7f['sort']((_0x5e282e,_0x18f031)=>{const _0x54a6df=_0x2bcb4b['markers']['get']('revision:'+_0x5e282e['id']),_0x43736e=_0x2bcb4b['markers']['get']('revision:'+_0x18f031['id']);return _0x54a6df['start']['isBefore'](_0x43736e['start'])?-0x1:_0x54a6df['start']['isAfter'](_0x43736e['start'])?0x1:_0x54a6df['end']['isBefore'](_0x43736e['end'])?-0x1:_0x54a6df['end']['isAfter'](_0x43736e['end'])?0x1:'add'===_0x5e282e['type']?-0x1:0x1;}),{'root':_0x2bcb4b,'changes':_0x3a6d7f};function _0x48ac6a(_0xb99d89,_0x430b0b,_0x59a196,_0x1d48f2){const _0x5769a0=!!_0x43668b[_0x430b0b][_0xb99d89],_0x3ad4fa=_0x5769a0?_0x43668b[_0x430b0b][_0xb99d89]['userId']:null,_0x1fad5c=_0x5769a0&&_0x43668b[_0x430b0b][_0xb99d89]['aiSource']||null,_0x10c146=_0x430b0b===_0x43668b['length']-0x1,_0x2c517e=_0x3811de[_0xb99d89][0x0],_0x5de4b0=_0x36ef96['isObject'](_0x43668b[_0x430b0b]['item']);!_0x3dd2b3[_0xb99d89]&&_0x5769a0?_0x3dd2b3[_0xb99d89]={'start':_0x59a196,'tapeItem':_0x43668b[_0x430b0b],'userId':_0x3ad4fa,'aiSource':_0x1fad5c,'type':_0xb99d89}:_0x3dd2b3[_0xb99d89]&&!_0x5769a0?(_0x3dd2b3[_0xb99d89]['end']=_0x59a196,_0x1e224e(_0x3dd2b3[_0xb99d89]),_0x3dd2b3[_0xb99d89]=null):_0x3dd2b3[_0xb99d89]&&_0x5769a0&&(_0x3dd2b3[_0xb99d89]['userId']!==_0x3ad4fa||_0x3dd2b3[_0xb99d89]['aiSource']!==_0x1fad5c)&&(_0x3dd2b3[_0xb99d89]['end']=_0x59a196,_0x2c517e&&_0x2c517e['userId']===_0x3dd2b3[_0xb99d89]['userId']?_0x2c517e['change']['aiSource']=_0x2c517e['change']['aiSource']||_0x3dd2b3[_0xb99d89]['aiSource']:_0x1e224e(_0x3dd2b3[_0xb99d89]),_0x3dd2b3[_0xb99d89]={'start':_0x59a196,'tapeItem':_0x43668b[_0x430b0b],'userId':_0x3ad4fa,'aiSource':_0x1fad5c,'type':_0xb99d89}),_0x3dd2b3[_0xb99d89]&&_0x5de4b0&&('elementStart'!==_0x43668b[_0x430b0b]['type']||_0x2c517e&&_0x2c517e['userId']===_0x3ad4fa||_0x3811de[_0xb99d89]['unshift']({'userId':_0x3ad4fa,'object':_0x43668b[_0x430b0b]['item'],'change':_0x3dd2b3[_0xb99d89]}),'elementEnd'===_0x43668b[_0x430b0b]['type']&&_0x2c517e&&_0x2c517e['object']===_0x43668b[_0x430b0b]['item']&&(_0x3811de[_0xb99d89]['shift'](),_0x3dd2b3[_0xb99d89]=_0x2c517e['change'])),_0x3dd2b3[_0xb99d89]&&_0x10c146&&(_0x3dd2b3[_0xb99d89]['end']=_0x1d48f2,_0x1e224e(_0x3dd2b3[_0xb99d89]),_0x3dd2b3[_0xb99d89]=null);}function _0x1e224e({start:_0x2fcc2e,end:_0x702d3a,tapeItem:_0x2fb750,userId:_0x489ee1,aiSource:_0x2ef23f,type:_0x17b131}){const _0x59b1cd=_0x2fb750['item'],_0x1abf4=_0x3eda9f['schema']['isBlock'](_0x59b1cd)&&!_0x3eda9f['schema']['isLimit'](_0x59b1cd),_0x52b2be=_0x2fcc2e['nodeAfter']==_0x702d3a['parent']&&_0x702d3a['isAtStart'];if(_0x1abf4&&_0x52b2be)return;const _0x2e49d4=_0x3eda9f['createRange'](_0x2fcc2e,_0x702d3a),_0x5f002a=_0x2418c0['get'](_0x489ee1),_0x2e7e3c=new Ht({'author':_0x5f002a,'type':'isAdded'==_0x17b131||'isAddSuggestion'==_0x17b131?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x17b131||'isRemoveSuggestion'==_0x17b131,'aiSource':_0x2ef23f||null},'createdAt':new Date(),'rootName':_0x426ddb});_0x3a6d7f['push'](_0x2e7e3c),_0x2bcb4b['markers']['set']('revision:'+_0x2e7e3c['id'],_0x2e49d4);}function _0x4aed44(_0x5e179c,_0x1173b5){const _0x117c7b=_0x5e179c['getAttributes'](),_0x1155fe=_0x1173b5['getAttributes']();for(const _0x27f4fc of _0x117c7b){if(_0x27f4fc[0x1]!==_0x1173b5['getAttribute'](_0x27f4fc[0x0]))return!0x1;_0x1155fe['next']();}return _0x1155fe['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x12485e=>{const _0x3eba67=_0x12485e['markerName']['split'](':')[0x1],_0x4233e3=this['_getChangeFromId'](_0x3eba67);if(!_0x4233e3)return null;const _0x41b9b7='add'==_0x4233e3['type']?'insertion':'deletion',_0x128edb=['ck-suggestion-marker','ck-suggestion-marker-'+_0x41b9b7];return _0x4233e3['data']['isSuggestion']&&_0x128edb['push']('ck-suggestion-marker-'+_0x41b9b7+'-new'),this['activeChange']==_0x4233e3&&_0x128edb['push']('ck-suggestion-marker--active'),{'classes':_0x128edb,'attributes':{'data-change-id':_0x3eba67}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x34a2c1=>{_0x34a2c1['on']('element:pre',(_0x32ffc2,_0x4badb5,_0x4e25a6)=>{const _0x1cb0a2=_0x4badb5['viewItem']['getChild'](0x0);if(!_0x1cb0a2||!_0x1cb0a2['is']('element','code'))return;if(!_0x4e25a6['consumable']['consume'](_0x1cb0a2,{'attributes':['vid_start','vid_end']}))return;const _0x435394=_0x4badb5['modelRange']['start']['nodeAfter'];_0x4e25a6['writer']['setAttribute']('vid_start',_0x1cb0a2['getAttribute']('vid_start'),_0x435394),_0x4e25a6['writer']['setAttribute']('vid_end',_0x1cb0a2['getAttribute']('vid_end'),_0x435394);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x323d2b=>{_0x323d2b['on']('element',(_0x5e26d0,_0x580c2f,_0x1d05f9)=>{if(!_0x1d05f9['consumable']['consume'](_0x580c2f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x580c2f['modelRange']['isCollapsed'])return;const _0x579e89=_0x580c2f['modelRange']['start']['nodeAfter'];_0x579e89['hasAttribute']('vid_start')||_0x579e89['hasAttribute']('vid')||(_0x1d05f9['writer']['setAttribute']('vid_start',_0x580c2f['viewItem']['getAttribute']('vid_start'),_0x579e89),_0x1d05f9['writer']['setAttribute']('vid_end',_0x580c2f['viewItem']['getAttribute']('vid_end'),_0x579e89));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x563859=>_0x563859['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3247d4,[,_0x2d42c3])=>{['vid_start','vid_end','vid']['includes'](_0x2d42c3)&&(_0x3247d4['return']=!0x0,_0x3247d4['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5c21f1=>{_0x5c21f1['on']('attribute:vid',(_0x499918,_0x5e38e3,_0x3ac338)=>{if('\x20'!=_0x5e38e3['item']['data']||_0x5e38e3['item']['parent']['maxOffset']>0x1)return;if(!_0x3ac338['consumable']['consume'](_0x5e38e3['item'],_0x499918['name']))return;const _0x30a187=_0x3ac338['writer'],_0x1ac479=_0x3ac338['mapper']['toViewRange'](_0x5e38e3['range']);_0x30a187['wrap'](_0x1ac479,_0x30a187['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4a8c9b){const _0xb5abf7=_0x4a8c9b['plugins']['get']('RevisionViewer');return(_0x408837,_0x626d98,_0x2e53f8)=>{const _0x2b2bd8=_0x626d98['markerName']['split'](':')[0x1],_0x1d7e6d=_0xb5abf7['_getChangeFromId'](_0x2b2bd8);if(!_0x1d7e6d)return null;const _0x5c40d6='add'==_0x1d7e6d['type']?'split':'merge';if(!_0x2e53f8['consumable']['test'](_0x626d98['markerRange'],_0x408837['name']))return;const _0xdff58b=_0x626d98['markerRange']['getWalker'](),_0x3d16e5=_0x626d98['markerRange']['start'],_0x15724e=_0x4a8c9b['model']['schema'];let _0x53ad0c=null,_0x102c83=null,_0x1d3231=!0x1,_0x389f27=!0x1;for(const _0x4b0c6c of _0xdff58b){const _0x329e13=_0x4b0c6c['item'];_0x1d3231=_0x1d3231||_0x15724e['isContent'](_0x329e13);const _0x5b14bc=_0x2e53f8['mapper']['toViewElement'](_0x329e13);if(_0x5b14bc&&_0x5b14bc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4b0c6c['type']&&(_0x15724e['isBlock'](_0x329e13)&&!_0x15724e['isLimit'](_0x329e13)&&(_0x329e13['nextSibling']||_0x3d16e5['isAtEnd']?_0x53ad0c&&_0x53ad0c['parent']==_0x329e13||(_0x53ad0c=_0x329e13,_0x2960f5(_0x4b0c6c['previousPosition']),_0x389f27=!0x0):_0x102c83=_0x102c83||_0x4b0c6c['previousPosition']));}function _0x2960f5(_0x9f9eb6){const _0x46d425=_0x2e53f8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5c40d6}),_0x96389e=_0x2e53f8['mapper']['toViewPosition'](_0x9f9eb6);_0x1d7e6d['data']['isSuggestion']&&_0x2e53f8['writer']['addClass']('ck-suggestion-marker-'+_0x5c40d6+'-new',_0x46d425),_0xb5abf7['activeChange']==_0x1d7e6d&&_0x2e53f8['writer']['addClass']('ck-suggestion-marker--active',_0x46d425),_0x2e53f8['writer']['insert'](_0x96389e,_0x46d425),_0x2e53f8['mapper']['bindElementToMarker'](_0x46d425,_0x626d98['markerName']);}_0x1d3231||_0x389f27||!_0x102c83||_0x2960f5(_0x102c83);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x43d4a0,_0x497496,_0x2c3258)=>{const _0x1845cc=_0x2c3258['mapper']['markerNameToElements'](_0x497496['markerName']);if(_0x1845cc){for(const _0x3375c0 of _0x1845cc)(_0x3375c0['hasClass']('ck-suggestion-marker-split')||_0x3375c0['hasClass']('ck-suggestion-marker-merge'))&&(_0x2c3258['mapper']['unbindElementFromMarkerName'](_0x3375c0,_0x497496['markerName']),_0x2c3258['writer']['remove'](_0x3375c0));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x13d4dd,_0x334478,_0xc8d840)=>{const _0x356656=_0x334478['markerName']['split'](':')[0x1],_0x216c3c=this['_getChangeFromId'](_0x356656);if(!_0x216c3c)return null;const _0x3f6fab='add'==_0x216c3c['type']?'split':'merge';if(_0xc8d840['consumable']['test'](_0x334478['markerRange'],_0x13d4dd['name']))for(const _0x10f1e0 of _0x334478['markerRange']['getItems']()){if(!_0x10f1e0['is']('element','softBreak'))continue;const _0xf1336b=_0xc8d840['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3f6fab}),_0x77f20b=_0xc8d840['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x10f1e0));_0x216c3c['data']['isSuggestion']&&_0xc8d840['writer']['addClass']('ck-suggestion-marker-'+_0x3f6fab+'-new',_0xf1336b),this['activeChange']==_0x216c3c&&_0xc8d840['writer']['addClass']('ck-suggestion-marker--active',_0xf1336b),_0xc8d840['writer']['insert'](_0x77f20b,_0xf1336b),_0xc8d840['mapper']['bindElementToMarker'](_0xf1336b,_0x334478['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x5f4310=>{for(const _0x50f1ca of this['editor']['model']['document']['getRootNames']()){const _0x31d9c1=this['editor']['model']['document']['getRoot'](_0x50f1ca),_0x2fb015=this['editor']['editing']['view']['document']['getRoot'](_0x50f1ca);if(_0x2fb015){const _0x2a66bd=_0x31d9c1['getAttribute']('revisionHistoryAttachChange');if(_0x5f4310['removeAttribute']('data-change-id',_0x2fb015),_0x5f4310['removeClass']('ck-revision-history-root-add',_0x2fb015),_0x5f4310['removeClass']('ck-revision-history-root-remove',_0x2fb015),_0x5f4310['removeClass']('ck-revision-history-root--active',_0x2fb015),_0x2a66bd){const _0x75da35=this['_getChangeFromId'](_0x2a66bd);if(!_0x75da35)return null;_0x5f4310['setAttribute']('data-change-id',_0x2a66bd,_0x2fb015),_0x5f4310['addClass']('ck-revision-history-root-'+_0x75da35['type'],_0x2fb015),this['activeChange']==_0x75da35&&_0x5f4310['addClass']('ck-revision-history-root--active',_0x2fb015);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x10fa8e=>'revision-comment:'+_0x10fa8e,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x547427=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Lt(_0x547427['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x23b4cf=>'revision-suggestion:'+_0x23b4cf,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4a56d9=>({'name':'suggestion:'+_0x4a56d9,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x34f599=>{const _0x33042c=_0x34f599['markerName']['split'](':')[0x1];return'insertion'!=_0x33042c&&'deletion'!=_0x33042c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x33042c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Bt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Bt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x28c162,_0x39c3df,_0xd40fc3)=>{const _0xe8aff6=_0xd40fc3['mapper']['markerNameToElements'](_0x39c3df['markerName']);if(_0xe8aff6){for(const _0x32eb23 of _0xe8aff6)_0x32eb23['is']('uiElement')&&(_0xd40fc3['mapper']['unbindElementFromMarkerName'](_0x32eb23,_0x39c3df['markerName']),_0xd40fc3['writer']['remove'](_0x32eb23));}},{'priority':'high'});}_getChangeFromId(_0x36aa59){return this['_changeIdToChange']['get'](_0x36aa59);}_getViewForChange(_0x45b652){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Tt(this['editor']['locale'],_0x45b652,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5d7993,_0x2d46b3,_0x39b534,_0x5af8aa)=>{_0x5af8aa&&this['_balloon']['remove'](_0x5af8aa),_0x39b534&&(this['_balloon']['add']({'view':_0x39b534,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2511be=this['editor']['editing'],_0x3fa50b=this['_getChangeFromId'](_0x39b534['changeId']);let _0x19a7fb;if(_0x3fa50b['data']['isOnRoot']){const _0xdbe93a=_0x2511be['view']['getDomRoot'](_0x3fa50b['rootName']);_0x19a7fb=Array['from'](_0xdbe93a['getClientRects']());}else{const _0x51dac6=this['editor']['model']['markers']['get']('revision:'+_0x39b534['changeId']);_0x19a7fb=Array['from'](_0x2511be['mapper']['markerNameToElements'](_0x51dac6['name']))['map'](_0x111e6a=>_0x2511be['view']['domConverter']['mapViewToDom'](_0x111e6a))['map'](_0x2ed1df=>Array['from'](_0x2ed1df['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x19a7fb['find'](_0x2099a8=>_0x2099a8['top']-0x3<=this['_activeViewTarget']['y']&&_0x2099a8['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2099a8['left']-0x3<=this['_activeViewTarget']['x']&&_0x2099a8['right']+0x3>=this['_activeViewTarget']['x'])||_0x19a7fb[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3d6c9a,_0xdc3884,_0x78112b,_0x2127da)=>{this['activeView']=_0x78112b?this['_getViewForChange'](_0x78112b):null,this['editor']['model']['change'](()=>{const _0x35d769=this['editor']['editing'];_0x2127da&&(_0x2127da['data']['isOnRoot']?_0x35d769['view']['change'](_0x223682=>{_0x223682['removeClass']('ck-revision-history-root--active',_0x35d769['view']['document']['getRoot'](_0x2127da['rootName']));}):_0x35d769['reconvertMarker']('revision:'+_0x2127da['id'])),_0x78112b&&(_0x78112b['data']['isOnRoot']?_0x35d769['view']['change'](_0x3dfa22=>{_0x3dfa22['addClass']('ck-revision-history-root--active',_0x35d769['view']['document']['getRoot'](_0x78112b['rootName']));}):_0x35d769['reconvertMarker']('revision:'+_0x78112b['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x136265,_0x596941)=>{if(this['activeChange'])return;const _0x213f8e=this['_findChangeIdFromDomTarget'](_0x596941['target']),_0x2ce1bc=this['_changeIdToChange']['get'](_0x213f8e);_0x2ce1bc?(this['_activeViewTarget']={'x':_0x596941['domEvent']['x'],'y':_0x596941['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2ce1bc)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x60f446,_0x4b9e50)=>{const _0x281b89=this['_findChangeIdFromDomTarget'](_0x4b9e50['target']),_0x53d04c=this['_changeIdToChange']['get'](_0x281b89);_0x53d04c?(this['_activeViewTarget']={'x':_0x4b9e50['domEvent']['x'],'y':_0x4b9e50['domEvent']['y']},_0x53d04c===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x53d04c):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x2d31db){do{const _0x398292=_0x2d31db['getAttribute']('data-change-id');if(_0x398292)return _0x398292;_0x2d31db=_0x2d31db['parent'];}while(_0x2d31db);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x46c789=>{for(const _0x19d7d5 of this['editor']['model']['markers'])_0x46c789['removeMarker'](_0x19d7d5);});}};function Lt(_0x4a74b3){return _0x4a74b3['split'](':')[0x1];}function Bt(_0x4fdc6a,_0x5096dc){return(_0x2c7788,_0x1731c5,_0x34c16e)=>{if(!_0x34c16e['consumable']['test'](_0x1731c5['markerRange'],_0x2c7788['name']))return;const _0x31ca4d=_0x1731c5['markerRange']['getWalker'](),_0xd4af40=_0x1731c5['markerRange']['start'],_0x1c242f=_0x4fdc6a['model']['schema'];let _0x5d2bbb=null,_0x239703=null,_0x27b64c=!0x1,_0x356479=!0x1;for(const _0x4e9556 of _0x31ca4d){const _0x3ddd73=_0x4e9556['item'];_0x27b64c=_0x27b64c||_0x1c242f['isContent'](_0x3ddd73);const _0x398fc2=_0x34c16e['mapper']['toViewElement'](_0x3ddd73);if(_0x398fc2&&_0x398fc2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4e9556['type']&&(_0x1c242f['isBlock'](_0x3ddd73)&&!_0x1c242f['isLimit'](_0x3ddd73)&&(_0x3ddd73['nextSibling']||_0xd4af40['isAtEnd']?_0x5d2bbb&&_0x5d2bbb['parent']==_0x3ddd73||(_0x5d2bbb=_0x3ddd73,_0x39dc09(_0x4e9556['previousPosition']),_0x356479=!0x0):_0x239703=_0x239703||_0x4e9556['previousPosition']));}function _0x39dc09(_0x363ffa){const _0x4b1d63=_0x34c16e['mapper']['toViewPosition'](_0x363ffa),_0x4e44a7=_0x34c16e['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5096dc});_0x34c16e['writer']['insert'](_0x4b1d63,_0x4e44a7),_0x34c16e['mapper']['bindElementToMarker'](_0x4e44a7,_0x1731c5['markerName']);}_0x27b64c||_0x356479||!_0x239703||_0x39dc09(_0x239703);};}var Ft=class extends _0x2ea1de{constructor(_0x1dfb06){super(_0x1dfb06);const _0x15bd8f=_0x1dfb06['plugins']['get'](Ut);this['affectsData']=!0x1,this['listenTo'](_0x15bd8f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x15bd8f,'change:isEnabled',()=>this['refresh']());}execute(){const _0x4537f1=this['editor'],_0x2e71e4=_0x4537f1['plugins']['get'](Ut),_0x1699e4=_0x2e71e4['isReady']?_0x2e71e4['diff']['newRevisionId']:null;_0x4537f1['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1699e4);}['refresh'](){const {isReady:_0x36e31d,isEnabled:_0x36b4ba,repository:_0x2139e8,diff:_0x36af79}=this['editor']['plugins']['get'](Ut),_0x575b88=_0x36af79&&_0x2139e8['getLaterVisibleRevision'](_0x36af79['newRevisionId']);this['isEnabled']=_0x36e31d&&_0x36b4ba&&Boolean(_0x575b88);}},$t=class extends _0x2ea1de{_step;constructor(_0xe7d3d0,{direction:_0x2da719}){super(_0xe7d3d0);const _0x1aee0e=_0xe7d3d0['plugins']['get'](Ut);this['affectsData']=!0x1,this['_step']='forward'===_0x2da719?0x1:-0x1,this['listenTo'](_0x1aee0e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1aee0e,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1aee0e,'change:activeChange',()=>this['refresh']());}execute(){const _0x37e816=this['editor'],_0x3def0a=_0x37e816['plugins']['get'](Ut),{isNavigationMode:_0x3dfc1b,currentChangeNumber:_0x3f3132}=_0x3def0a;let _0x344591;if(_0x3def0a['activeChange']=_0x3dfc1b?_0x3def0a['diff']['changes']['get'](_0x3f3132+this['_step']):_0x3def0a['diff']['changes']['first'],_0x3def0a['activeChange']['data']['isOnRoot'])_0x344591=_0x37e816['editing']['view']['getDomRoot'](_0x3def0a['activeChange']['rootName']);else{const _0x5e7e33=_0x37e816['model']['markers']['get']('revision:'+_0x3def0a['activeChange']['id']);_0x344591=_0x19ab88(_0x37e816['editing'],_0x5e7e33);}_0x2444ec({'target':_0x344591,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5eddfd,currentChangeNumber:_0x481e2a,numberOfChanges:_0x1640d5,isReady:_0x301618,isEnabled:_0x354f54}=this['editor']['plugins']['get'](Ut);this['isEnabled']=!!(_0x354f54&&_0x301618&&_0x1640d5)&&(!_0x5eddfd||(0x1===this['_step']?_0x481e2a<_0x1640d5-0x1:_0x481e2a>0x0));}},jt=class extends ft{constructor(_0x4686d9){super(_0x4686d9);const _0xfd228=this['bindTemplate'],_0x49afcd=new _0x1b2b54(_0x4686d9),_0x528a53=new _0x1b2b54(_0x4686d9);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',(_0x55047c,_0x15544f)=>_0x55047c&&_0x15544f>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x221a23,_0x3e9ae5,_0x3e55a3,_0x5d188f)=>{if(!_0x221a23)return At(_0x4686d9,'Loading...');if(!_0x3e55a3)return At(_0x4686d9,'No\x20changes');const _0x392e31=At(_0x4686d9,'NUMBER_OF_CHANGES',_0x3e55a3);return _0x5d188f?At(_0x4686d9,'X_OF_Y_CHANGES',[_0x3e9ae5+0x1,_0x3e55a3]):_0x392e31;}),_0x49afcd['set']({'label':At(_0x4686d9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1555fc}),_0x528a53['set']({'label':At(_0x4686d9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3a9006}),_0x49afcd['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x528a53['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x49afcd['on']('execute',()=>this['fire']('execute','backward')),_0x528a53['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',_0xfd228['if']('_isStatusLabelVisible','ck-hidden',_0x5a8137=>!_0x5a8137)]},'children':[{'text':_0xfd228['to']('isNavigationMode',_0x22653e=>_0x22653e?At(_0x4686d9,'EDIT_X_OF_Y_REVISIONS')+':\x20':At(_0x4686d9,'Total')+':\x20')}]},{'text':_0xfd228['to']('_statusText')}]},new lt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x49afcd,_0x528a53]}]});}};const Gt='ck-editor__editable__loading-overlay';var Kt=class extends _0x3c4294{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1d5322=this['editor']['editing']['view'];_0x1d5322['change'](_0x4d5284=>{for(const _0x457aea of _0x1d5322['document']['roots'])_0x4d5284['addClass'](Gt,_0x457aea);});}['hide'](){const _0x815703=this['editor']['editing']['view'];_0x815703['change'](_0x1e6c20=>{for(const _0x2771d3 of _0x815703['document']['roots'])_0x1e6c20['removeClass'](Gt,_0x2771d3);});}},qt=class extends _0x3c4294{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ut,Kt];}init(){const _0x338921=this['editor'],_0x27b487=_0x338921['plugins']['get'](Ut),_0x33975a=_0x338921['plugins']['get'](Kt);_0x338921['ui']['componentFactory']['add']('exitToEditing',_0xfb7a5d=>{const _0x23675e=new _0x1b2b54(_0xfb7a5d);return _0x23675e['set']({'label':At(_0xfb7a5d,'Back\x20to\x20editing'),'icon':_0x230776,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x23675e,'execute',()=>{_0x338921['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x23675e;}),_0x338921['ui']['componentFactory']['add']('restoreRevision',_0x620507=>{const _0xf53686=new _0x1b2b54(_0x620507);return _0xf53686['set']({'label':At(_0x620507,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0xf53686['bind']('isEnabled')['to'](_0x338921['commands']['get']('restoreRevision')),this['listenTo'](_0xf53686,'execute',()=>_0x338921['execute']('restoreRevision')),_0xf53686;}),_0x338921['ui']['componentFactory']['add']('changesNavigation',_0x1532e1=>{const _0x366b74=new jt(_0x1532e1),_0x37c4b5=_0x338921['commands']['get']('showPreviousChange'),_0x31269a=_0x338921['commands']['get']('showNextChange');return _0x366b74['bind']('isBackwardNavigationEnabled')['to'](_0x37c4b5,'isEnabled'),_0x366b74['bind']('isForwardNavigationEnabled')['to'](_0x31269a,'isEnabled'),_0x366b74['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x27b487),this['listenTo'](_0x366b74,'execute',(_0x44e08a,_0x4ee21d)=>{_0x338921['execute']('forward'===_0x4ee21d?'showNextChange':'showPreviousChange');}),_0x366b74;}),_0x33975a['show'](),_0x27b487['on']('change:isReady',(_0x2b12d3,_0x4b0c22,_0x426a63)=>{_0x426a63?_0x33975a['hide']():_0x33975a['show']();});}},Yt=class extends st{['_resizeObserver']=null;constructor(_0x3e1fd5,_0x49d59c){super(_0x3e1fd5,_0x49d59c);const _0x3703b0=this['bindTemplate'];this['set']({'label':At(_0x3e1fd5,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=At(_0x3e1fd5,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3703b0['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x3a57ef(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']()),this['on']('change:isEnabled',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0xbb1577=this['fieldView']['element'];this['_tooltipString']=!this['isEnabled']&&_0xbb1577['scrollWidth']>_0xbb1577['clientWidth']&&_0xbb1577['value']||'';}},Jt=class extends ft{constructor(_0x242e8e,_0x169d63,_0x2c72f8){super(_0x242e8e);const _0x37771e=new tt();_0x37771e['set']({'content':_0x39d7d6,'viewBox':'0\x200\x2011\x2010'});const _0xe08520=['ck','ck-revision-history-sidebar__revision-author'];_0x2c72f8&&_0xe08520['push']('ck-revision-history-sidebar__revision-author_creator');const _0x351dc4=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':At(_0x242e8e,_0x2c72f8?'Revision\x20creator':'Revision\x20author')},'children':[_0x37771e,_0x169d63['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xe08520},'children':_0x351dc4});}};function Wt(_0x12087c,_0x4ab5b7){const _0x441585=_0x12087c['bindTemplate'],_0x1098a2=_0x12087c['locale'],_0x1953c8=gt(_0x1098a2);_0x1953c8['panelPositionLimiter']=()=>{const _0x482d0e=_0x1953c8['buttonView']['element'];return _0x482d0e&&_0x4a7a50(_0x482d0e);};const _0x3d45e8=function(_0x4f6058,_0x175f58){const _0xed14b=function(_0x4c1494,_0x549a85){const _0x4d1035=_0x4c1494['locale'],_0xe29a1d={'Compare\x20against\x20selected':At(_0x4d1035,'Compare\x20against\x20selected'),'Name\x20this\x20revision':At(_0x4d1035,'Name\x20this\x20revision'),'Restore\x20this\x20revision':At(_0x4d1035,'Restore\x20this\x20revision')};return _0x549a85['map'](_0x2ca8ad=>{const _0x49a804=_0xe29a1d[_0x2ca8ad['name']];return _0x49a804&&_0x49a804!==_0x2ca8ad['name']&&(_0x2ca8ad['name']=_0x49a804),_0x2ca8ad;});}(_0x4f6058,_0x175f58),_0x28b0af=new _0x4ae41b();for(const _0x12372a of _0xed14b){const _0xfa7be1={'type':'button','model':new dt({'label':_0x12372a['name'],'class':_0x12372a['class'],'withText':!0x0,'role':'menuitem','_action':_0x12372a['action']})};_0xfa7be1['model']['bind']('isEnabled')['to'](_0x4f6058,'isActionsDropdownOpen',_0x3f9b55=>'function'!=typeof _0x12372a['isEnabled']||(!_0x3f9b55||_0x12372a['isEnabled'](_0x4f6058))),_0x28b0af['add'](_0xfa7be1);}return _0x28b0af;}(_0x12087c,_0x4ab5b7);return _0x12087c['bind']('isActionsDropdownOpen')['to'](_0x1953c8,'isOpen'),_0x1953c8['buttonView']['set']({'label':At(_0x1098a2,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'rtl'===_0x1098a2['uiLanguageDirection']?'se':'sw','icon':_0x546cf7,'class':'ck-button_small','tabindex':0x0}),_0x1953c8['buttonView']['extendTemplate']({'attributes':{'aria-labelledby':_0x12087c['revisionNameView']['fieldView']['id'],'aria-describedby':[_0x12087c['_dateElementId'],_0x12087c['_authorsElementId']]}}),_0x1953c8['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x441585['if']('isActionsDropdownOpen','ck-on'),_0x441585['if']('isEditing','ck-hidden')]},'on':{'click':_0x441585['to'](_0x2a79cd=>_0x2a79cd['stopPropagation']())}}),_0x1953c8['on']('execute',_0x4c6039=>{_0x12087c['isReady']&&'function'==typeof _0x4c6039['source']['_action']&&_0x4c6039['source']['_action'](_0x12087c);}),vt(_0x1953c8,_0x3d45e8,{'role':'menu'}),_0x1953c8['listenTo'](_0x12087c,'change:isActionsDropdownOpen',(_0x519af4,_0x5daeba,_0x114e6d)=>{if(_0x114e6d)for(const _0x39e358 of _0x1953c8['listView']['items']){const _0x472766=_0x39e358['children']['first'],_0x1cdf1c=_0x4ab5b7['find'](_0x411708=>_0x411708['action']===_0x472766['_action'])['isVisible'];_0x39e358['isVisible']=void 0x0===_0x1cdf1c||_0x1cdf1c(_0x12087c);}}),_0x1953c8;}const Xt=/* #__PURE__ -- @preserve */
|
|
27
|
-
_0x17f891(ft);var Qt=class extends Xt{['id'];['revisionNameView'];revisionActionsView;saveButtonView;cancelButtonView;_keystrokes;['_revision'];_requireRevisionName;['_aiPillView'];_dateElementId;_authorsElementId;constructor(_0x5bdb12,_0x2cfcdd,_0x1f828f,_0x13e7e9,_0xc97954=!0x1){super(_0x5bdb12);const _0x114713=this['bindTemplate'],_0x10a363=function(_0x31f5c9,_0x28ca2d){const _0x27aaab=Array['from'](_0x28ca2d['authors'])['filter'](_0xb9ab72=>_0xb9ab72!=_0x28ca2d['creator']);return _0x28ca2d['creator']&&_0x27aaab['unshift'](_0x28ca2d['creator']),_0x27aaab['map'](_0x1af79f=>new Jt(_0x31f5c9,_0x1af79f,_0x1af79f==_0x28ca2d['creator']));}(_0x5bdb12,_0x2cfcdd);this['id']=_0x2cfcdd['id'],this['_revision']=_0x2cfcdd,this['_requireRevisionName']=_0x13e7e9,this['bind']('_isAiGenerated')['to'](_0x2cfcdd,'attributes',_0x23cf28=>!(!_0x23cf28||!_0x23cf28['@ai'])),this['bind']('name','createdAt')['to'](_0x2cfcdd),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1d665c=>{return _0x1dca81=_0x5bdb12['uiLanguage'],(_0x2b43ac=_0x1d665c)['toLocaleDateString'](_0x1dca81,{'month':'long','day':'numeric'})+',\x20'+_0x2b43ac['toLocaleTimeString'](_0x1dca81,{'hour':'numeric','minute':'numeric'});var _0x1dca81,_0x2b43ac;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isEditing',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['_keystrokes']=new _0x2e7552(),this['_dateElementId']='ck-revision-history-revision-date-'+_0x5a9e0c(),this['_authorsElementId']='ck-revision-history-revision-authors-'+_0x5a9e0c(),this['revisionNameView']=new Yt(_0x5bdb12,mt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'class':['ck-input_small'],'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x2f2027=>_0x2f2027||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isEditing',this,'isEnabled',(_0x4ad1db,_0x4c846d)=>_0x4ad1db&&_0x4c846d),this['revisionNameView']['fieldView']['bind']('tabIndex')['to'](this['revisionNameView']['fieldView'],'isReadOnly',_0x1e5114=>_0x1e5114?-0x1:void 0x0),this['saveButtonView']=this['_createSaveButtonView'](_0x5bdb12),this['cancelButtonView']=this['_createCancelButtonView'](_0x5bdb12),this['revisionActionsView']=_0x1f828f&&_0x1f828f['length']?Wt(this,_0x1f828f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0xc97954?this['_createAiPillView'](_0x5bdb12):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x114713['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x114713['if']('isEnabled','ck-disabled',_0x59fb10=>!_0x59fb10),_0x114713['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x114713['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x114713['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open'),_0x114713['if']('isEditing','ck-revision-history-sidebar__revision_editing')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date',_0x114713['if']('isEditing','ck-hidden')],'id':this['_dateElementId']},'children':[{'text':_0x114713['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__edit-actions',_0x114713['if']('isEditing','ck-hidden',_0x1caaf8=>!_0x1caaf8)]},'children':[this['cancelButtonView'],this['saveButtonView']],'on':{'click':_0x114713['to'](_0x29fa91=>_0x29fa91['stopPropagation']())}},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors'],'id':this['_authorsElementId']},'children':_0x10a363}]},..._0xc97954?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x114713['if']('_isAiGenerated','ck-hidden',_0x2cacb4=>!_0x2cacb4)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x114713['to'](_0x291795=>{_0x291795['srcElement']['closest']('.ck-confirm-view')||this['isEditing']&&this['revisionNameView']['element']['contains'](_0x291795['target'])||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x241eaa){const _0x26c8c7=new _0x358c61(_0x241eaa);return _0x26c8c7['set']({'icon':_0x2ea3e0,'label':At(_0x241eaa,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':At(_0x241eaa,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x26c8c7['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x26c8c7;}_createSaveButtonView(_0x5ba9f4){const _0x1433f9=new _0x1b2b54(_0x5ba9f4),_0xad1d63=this['revisionNameView']['fieldView'];return _0x1433f9['set']({'label':At(_0x5ba9f4,'Save'),'withText':!0x0,'class':'ck-button-action\x20ck-button_small','tabindex':0x0}),_0x1433f9['bind']('isEnabled')['to'](this,'isEnabled',_0xad1d63,'isEmpty',(_0x3c2840,_0x54610c)=>_0x3c2840&&!(this['_requireRevisionName']&&_0x54610c)),_0x1433f9['on']('execute',()=>this['_saveName']()),_0x1433f9;}_createCancelButtonView(_0x5b6b3d){const _0x14032d=new _0x1b2b54(_0x5b6b3d);return _0x14032d['set']({'label':At(_0x5b6b3d,'Cancel'),'withText':!0x0,'class':'ck-button_small','tabindex':0x0}),_0x14032d['on']('execute',()=>this['_finishEditing']()),_0x14032d;}['_saveName'](){const _0x33ca0c=this['revisionNameView']['fieldView']['element']['value'];this['_requireRevisionName']&&!_0x33ca0c||(_0x33ca0c===this['name']||!this['name']&&_0x33ca0c===this['_createdAtFormatted']||this['fire']('setName',{'id':this['id'],'name':_0x33ca0c}),this['_finishEditing']());}_finishEditing(){const _0x5722cd=this['revisionNameView']['fieldView'],_0x5c59b1=this['_hasKeyboardFocus']();_0x5722cd['element']['value']=_0x5722cd['value'],_0x5722cd['isEmpty']=!_0x5722cd['element']['value'],this['isEditing']=!0x1,_0x5c59b1&&this['revisionActionsView']&&this['revisionActionsView']['focus']();}['_hasKeyboardFocus'](){const _0x144c7d=this['element']['getRootNode']()['activeElement'];return!!_0x144c7d&&this['element']['contains'](_0x144c7d)&&_0x144c7d['matches'](':focus-visible');}['render'](){super['render']();const _0x450b07=this['revisionNameView']['fieldView']['element'];this['_keystrokes']['listenTo'](this['element']),this['_keystrokes']['set']('Enter',(_0x7ad4a,_0x51fbc0)=>{this['isEditing']&&_0x7ad4a['target']===_0x450b07&&(this['_saveName'](),_0x51fbc0());}),this['_keystrokes']['set']('Esc',(_0x45301e,_0x564159)=>{this['isEditing']&&(this['_finishEditing'](),_0x564159());});}destroy(){super['destroy'](),this['_keystrokes']['destroy']();}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function zt(_0x2bea6d,_0x2cd79e){const _0xef633d=pt['fromJSDate'](_0x2bea6d)['setLocale'](_0x2cd79e),_0x248471=pt['local'](),_0x269c7e=_0x248471['minus']({'days':0x1})['startOf']('day');let _0x29b697,_0x2346b4;return _0xef633d['hasSame'](_0x248471,'day')?(_0x29b697=_0xef633d['startOf']('day')['toJSDate'](),_0x2346b4=_0xef633d['toRelativeCalendar']()):_0xef633d['hasSame'](_0x269c7e,'day')?(_0x29b697=_0x269c7e['toJSDate'](),_0x2346b4=_0xef633d['toRelativeCalendar']()):_0xef633d['hasSame'](_0x248471,'week')?(_0x29b697=_0xef633d['startOf']('week')['toJSDate'](),_0x2346b4=_0xef633d['weekdayLong']||''):_0xef633d['hasSame'](_0x248471,'year')?(_0x29b697=_0xef633d['startOf']('month')['toJSDate'](),_0x2346b4=_0xef633d['monthLong']||''):(_0x29b697=_0xef633d['startOf']('year')['toJSDate'](),_0x2346b4=String(_0xef633d['year'])),{'startDate':_0x29b697,'localizedPeriodName':_0x2346b4};}var Zt=class extends ft{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x3bd494,_0x529c68,_0x13e211,_0x24ed8c,_0x13abec){super(_0x3bd494);const _0x1aaf9a=zt(_0x529c68,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x529c68,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x13e211,this['_requireRevisionName']=_0x24ed8c,this['_showAISource']=_0x13abec,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':_0x1aaf9a}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2e5aba){const _0x51874d=new Qt(this['locale'],_0x2e5aba,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x51874d);}['removeRevision'](_0x1246cc){const _0x4f9269=this['revisionViews']['find'](_0x2f1e8a=>_0x2f1e8a['id']===_0x1246cc['id']);this['revisionViews']['remove'](_0x4f9269);}},ti=class extends ft{constructor(_0x45e04e){super(_0x45e04e);const _0x3d8263=new tt();_0x3d8263['content']=_0x4afdb8,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x3d8263,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[At(_0x45e04e,'Revision\x20history')]}]});}},ii=class extends ft{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x264d16,_0x4fa380,_0x12ebc4,_0x15a5bc,_0x4935c7){super(_0x264d16);const _0x28147c=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4fa380,this['_revisionActions']=_0x12ebc4,this['_requireRevisionName']=_0x15a5bc,this['_showAISource']=_0x4935c7,this['on']('select',(_0x492052,_0x3effa7)=>{this['fire']('revisionSelected',_0x3effa7);}),this['on']('setName',(_0xf63ead,_0x446995)=>{this['fire']('revisionSetName',_0x446995);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar'],'dir':_0x264d16['uiLanguageDirection']},'children':[new ti(_0x264d16),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x28147c['if']('isEnabled','ck-disabled',_0x1f6750=>!_0x1f6750)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x550f2d of this['_revisions'])this['_addRevision'](_0x550f2d);this['_revisions']['on']('add',(_0x5c2b37,_0x533dc1)=>{this['_addRevision'](_0x533dc1);}),this['_revisions']['on']('remove',(_0x32ba0d,_0x5683dc)=>{this['_removeRevision'](_0x5683dc);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x3e696a=>_0x3e696a['revisionViews']['map'](_0x40f9f6=>_0x40f9f6))['flat']();}selectRevision(_0x3e2b37){for(const _0x4db42c of this['revisionViews'])_0x3e2b37&&_0x3e2b37['id']===_0x4db42c['id']?_0x4db42c['select']():_0x4db42c['deselect']();}highlightRevisions(_0x20d92b){for(const _0xd37b51 of this['revisionViews'])_0x20d92b['some'](({id:_0x42b2dc})=>_0x42b2dc===_0xd37b51['id'])?_0xd37b51['highlight']():_0xd37b51['unhighlight']();}['_addRevision'](_0x54a2f0){const _0x43dac4=zt(_0x54a2f0['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x528036=this['_getTimePeriodViewByStartDate'](_0x43dac4);_0x528036||(_0x528036=new Zt(this['locale'],_0x43dac4,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x528036)),_0x528036['addRevision'](_0x54a2f0);}['_removeRevision'](_0x5c9417){const _0x5d6aba=zt(_0x5c9417['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x5d6aba)['removeRevision'](_0x5c9417);}_getTimePeriodViewByStartDate(_0x2150ad){return this['timePeriodViews']['find'](_0x19ac7d=>_0x19ac7d['startDate']['getTime']()===_0x2150ad['getTime']());}},si=class RevisionsSidebar extends _0x3c4294{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
23
|
+
import{CKEditorError as _0x2e47d1,Collection as _0x45c016,ElementReplacer as _0x5c7f20,FocusTracker as _0x237823,KeystrokeHandler as _0x326416,ObservableMixin as _0x38bfb6,ResizeObserver as _0x54c0e7,findClosestScrollableAncestor as _0x23c702,logWarning as _0x344af6,scrollViewportToShowTarget as _0x54e81f,trustedHtml as _0x58af3e,uid as _0x45072e}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x36e7de,isEqual as _0x5825a9,set as _0x512c63,unset as _0x417be3}from'es-toolkit/compat';import{Command as _0x499926,Editor as _0x1ed76d,ElementApiMixin as _0x92ff9b,PendingActions as _0x1bde66,Plugin as _0x53e262}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x4b5724,PillView as _0x88a120,Users as _0x9e6c40,getMarkerDomElement as _0x386c43,reRootOperation as _0x10ad56,reRootPosition as _0x3015e,reRootRange as _0x293e27,sanitizeEditorConfig as _0x2c8a77}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x2b0661,ModelElement as _0x147fef,ModelRange as _0x2df2cd,ModelText as _0x1aaca6,ViewAttributeElement as _0x163a43,ViewContainerElement as _0x204f81,ViewDocumentFragment as _0x1ed382,ViewElement as _0x24b1c2,ViewEmptyElement as _0x5357fd,ViewRawElement as _0x5e1bd7,ViewText as _0x82afa4,ViewUIElement as _0x2f5599}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x3e4f96,IconChevronUp as _0x4051c7,IconHistory as _0x199aa8,IconSparkle as _0x346d16,IconThreeVerticalDots as _0x2c2f5d,IconUndo as _0x22efaa,IconUser as _0x3b6736}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x5d3dd,ButtonView as _0x51332c,ContextualBalloon as _0x344da2,CssTransitionDisablerMixin as _0x398db6,EditorUI as _0x298c7a,IconView as tt,InlineEditableUIView as it,LabeledFieldView as st,ListItemView as et,ListView as nt,MenuBarMenuListItemButtonView as ot,MenuBarMenuListItemView as rt,MenuBarMenuListView as at,MenuBarMenuView as ht,StickyPanelView as ct,ToolbarSeparatorView as lt,ToolbarView as ut,UIModel as dt,View as ft,addListToDropdown as vt,createDropdown as gt,createLabeledInputText as mt,normalizeToolbarConfig as _t,submitHandler as wt}from'@ckeditor/ckeditor5-ui';import{DateTime as pt}from'luxon';const yt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x38bfb6();var bt=class extends yt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x1a72eb){super(),this['id']=_0x1a72eb['id']||_0x45072e(),this['creator']=_0x1a72eb['creator']||null,this['authors']=_0x1a72eb['authors']||[],this['diffData']=_0x1a72eb['diffData']||null,this['toVersion']=_0x1a72eb['toVersion']||0x0,this['fromVersion']=_0x1a72eb['fromVersion']||0x0,this['set']('name',_0x1a72eb['name']||''),this['set']('createdAt',_0x1a72eb['createdAt']||new Date()),this['set']('attributes',_0x1a72eb['attributes']||{});}setName(_0xacb861){this['_update']({'name':_0xacb861});}setAttribute(_0xd397a0,_0x48e2f2){const _0x1cb05e=_0x36e7de(this['attributes']);_0x512c63(_0x1cb05e,_0xd397a0,_0x48e2f2),this['_update']({'attributes':_0x1cb05e});}removeAttribute(_0x302577){const _0x3a8158=_0x36e7de(this['attributes']);_0x417be3(_0x3a8158,_0x302577),this['_update']({'attributes':_0x3a8158});}_update(_0x419b5a,_0x2bd0ab=!0x1){let _0x20ec88=!0x1;const _0x2b952f={'id':this['id']};for(const _0x21fad3 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1f7f65=_0x419b5a[_0x21fad3];void 0x0!==_0x1f7f65&&_0x1f7f65!==this[_0x21fad3]&&(this[_0x21fad3]=_0x1f7f65,_0x2b952f[_0x21fad3]=_0x1f7f65,_0x20ec88=!0x0);}_0x20ec88&&(_0x2b952f['authors']&&(_0x2b952f['authorsIds']=_0x2b952f['authors']['map'](_0x25856a=>_0x25856a['id']),delete _0x2b952f['authors']),this['fire']('_update',_0x2b952f,_0x2bd0ab));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x42cb07=>_0x42cb07['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},Rt=class extends _0x53e262{['_revisions'];static get requires(){return[_0x9e6c40];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0xd97d1d){super(_0xd97d1d),this['_revisions']=new _0x45c016();}afterInit(){!async function(_0x27be0d){const _0xaa2398='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x2cc7f0=0xeb829,_0x5caa00=0x799c8,_0x514da0={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2cb3df(_0x4fe30c){const _0x16cdd4=new window['Promise'](_0x534b6b=>{_0x4fe30c['once']('ready',_0x534b6b);}),_0x11db90=window['Date']['now'](),_0x58b3da=_0x4fe30c['config']['get']('licenseKey');async function _0x2d3762(){let _0x1c1708,_0x4100e9=null,_0x106ee3=null;try{return'GPL'==_0x58b3da?'NotAllowed':(_0x1c1708=_0x6630d6(),_0x1c1708?(_0x1c1708['usageEndpoint']&&(_0x106ee3=_0x338a31(_0x1c1708['usageEndpoint'],_0x1c1708['jti'])),await _0xa4509d()?_0x5e41bf()?_0x59a873()?'Expired':_0x3e3adb()?('evaluation'==_0x1c1708['licenseType']&&(_0x4100e9=_0x4badcc('EvaluationLimit')),await _0x2575ff()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x59a873(){const _0x568f01=['evaluation','trial']['includes'](_0x1c1708['licenseType'])?_0x11db90/0x3e8:0xe10*_0x5caa00;return _0x1c1708['exp']<_0x568f01;}function _0x5e41bf(){const _0x3bfee2=_0x1c1708['features'];if(!_0x3bfee2)return!0x1;if(_0x3bfee2['includes']('*'))return!0x0;if(_0x3bfee2['includes']('RH'))return!0x0;if(_0x3bfee2['includes']('RRH')){if(_0x5af7a7())return!0x0;if(_0x5c71fe()||_0x482570())return!0x0;}return!0x1;}function _0x3e3adb(){const _0x56b5ff=_0x1c1708['licensedHosts'];if(!_0x56b5ff||0x0==_0x56b5ff['length'])return!0x0;const {hostname:_0x54ee85}=new URL(window['location']['href']);if(_0x56b5ff['includes'](_0x54ee85))return!0x0;const _0x5aa5d8=_0x54ee85['split']('.');return _0x56b5ff['filter'](_0x5c98bf=>_0x5c98bf['includes']('*'))['map'](_0x3c2510=>_0x3c2510['split']('.'))['filter'](_0x1c2054=>_0x1c2054['length']<=_0x5aa5d8['length'])['map'](_0x2613eb=>Array(_0x5aa5d8['length']-_0x2613eb['length'])['fill']('*'===_0x2613eb[0x0]?'*':'')['concat'](_0x2613eb))['some'](_0x8f3a6d=>_0x5aa5d8['every']((_0x46cc8d,_0x274433)=>_0x8f3a6d[_0x274433]===_0x46cc8d||'*'===_0x8f3a6d[_0x274433]));}function _0x2575ff(){return _0x4100e9&&_0x106ee3?new window['Promise']((_0x26dda2,_0x4ec786)=>{_0x4100e9['then'](_0x26dda2,_0x4ec786),_0x106ee3['then'](_0x435342=>{'Valid'!=_0x435342&&_0x26dda2(_0x435342);},_0x4ec786);}):_0x4100e9||_0x106ee3||'Valid';}}function _0x338a31(_0x2aa041,_0x4c62bc){return new window['Promise'](_0x16b82b=>{if(_0x2a3110())return _0x16b82b('Valid');_0x5d8fd5(),_0x4fe30c['decorate']('_sendUsageRequest');let _0x1cd095=!0x1;const _0x1950de=_0x45072e();function _0x1d93f7(_0x2292c0){return!!_0x2292c0&&('object'==typeof _0x2292c0||'function'==typeof _0x2292c0)&&'function'==typeof _0x2292c0['then']&&'function'==typeof _0x2292c0['catch'];}function _0xc27081(_0x43fb63){_0x140696(_0x43fb63)['then'](_0x85cc34=>_0x85cc34&&'ok'==_0x85cc34['status']?_0x59cda9(_0x3014a0(_0x1950de+_0x4c62bc))!=_0x85cc34['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x52fa47=>(_0x1c22c7(),_0x52fa47),()=>{const _0x194737=_0x1c91af();return null==_0x194737?(_0x1c22c7(),'Valid'):_0x11db90-_0x194737>0x240c8400?'UsageLimit':'Valid';})['then'](_0x16b82b)['catch'](()=>{_0x16b82b('UsageLimit');});const _0x6586ca=0x36ee80;function _0x1c22c7(){const _0x2bf109='llct-'+_0x59cda9(_0x3014a0(_0x2aa041)),_0x457d6d=_0x2674d0(_0x59cda9(window['Math']['ceil'](_0x11db90/_0x6586ca)));window['localStorage']['setItem'](_0x2bf109,_0x457d6d);}function _0x1c91af(){const _0x5833f7='llct-'+_0x59cda9(_0x3014a0(_0x2aa041)),_0x111fca=window['localStorage']['getItem'](_0x5833f7);return _0x111fca?window['parseInt'](_0x2674d0(_0x111fca),0x10)*_0x6586ca:null;}function _0x140696(_0x3d43fc){return new window['Promise']((_0x406cff,_0x2b678f)=>{_0x3d43fc['then'](_0x406cff,_0x2b678f),window['setTimeout'](_0x2b678f,0x1d4c0);});}}_0x4fe30c['on']('_sendUsageRequest',(_0x28a59f,_0x2c4ea0)=>{if(_0x2c4ea0[0x0]!=_0x2aa041)return _0x16b82b('UsageLimit');_0x2c4ea0[0x1]={..._0x2c4ea0[0x1],'requestId':_0x1950de};},{'priority':'high'}),_0x4fe30c['on']('_sendUsageRequest',_0x396cf7=>{_0x1d93f7(_0x396cf7['return'])&&(_0x1cd095=!0x0,_0xc27081(_0x396cf7['return']));},{'priority':'low'}),_0x16cdd4['then'](()=>{_0x1cd095||_0x16b82b('UsageLimit');});});function _0x2a3110(){return'auto'==_0x4fe30c['editing']['view']['_overlayModeHint'];}function _0x5d8fd5(){_0x4fe30c['editing']['view']['_overlayModeHint']='auto';}}function _0x4badcc(_0x1021a5){const _0x4f9123=[new window['Promise'](_0xe40e85=>setTimeout(_0xe40e85,0x93ecc)),_0x16cdd4['then'](()=>new window['Promise'](_0x52095e=>{const _0x2118dd=0x7,_0x380857=_0x27be0d['_revisions'];function _0x39dabb(){_0x380857['length']>=_0x2118dd&&_0x52095e();}_0x39dabb(),_0x380857['on']('add',_0x39dabb);})),new window['Promise'](_0x41ef98=>{function _0x38c7fe(){for(const _0x31742b in window)if(window['Number']['isNaN'](window['Number'](_0x31742b))&&window[_0x31742b]==_0x2cc7f0)return _0x41ef98();'destroyed'!=_0x4fe30c['state']&&window['setTimeout'](_0x38c7fe,0x1388);}_0xc9be30('RevisionViewer')&&_0x38c7fe();})];return window['Promise']['race'](_0x4f9123)['then'](()=>_0x1021a5);}async function _0x2b9de1(){if(await _0x16cdd4,_0xc9be30('RevisionViewer')){const _0x432d62=_0x27be0d['getRevision'](0x0),_0x574ec7=_0x27be0d['getEarlierVisibleRevision'](_0x432d62['id']),_0x5cd32e=_0x435b7c('RevisionViewer');return await _0x5cd32e['compare'](_0x432d62['id'],_0x574ec7?_0x574ec7['id']:null,!0x0),_0x5cd32e['unbind']('isEnabled'),_0x5cd32e['isEnabled']=!0x1,_0x5cd32e['compare']=_0x4704cf,void(_0x5cd32e['_getDiff']=_0x4704cf);}if(_0xc9be30('RevisionTracker')){const _0x5a2440=_0x435b7c('RevisionTracker');_0x5a2440['unbind']('isEnabled'),_0x5a2440['isEnabled']=!0x1,_0x5a2440['update']=_0x4704cf,_0x5a2440['saveRevision']=_0x4704cf;}_0x4fe30c['model']['change']=_0x4704cf,_0x4fe30c['model']['enqueueChange']=_0x4704cf,_0x4fe30c['enableReadOnlyMode']('model');}function _0x5af7a7(){return _0xc9be30('WebSocketGateway')&&'connected'==_0x435b7c('WebSocketGateway')['state'];}function _0x5c71fe(){return _0xc9be30('RevisionViewerIntegration');}function _0x482570(){return _0xc9be30('TrackChangesDataGetter');}function _0x41ea1c(_0x5a5029){const _0x278c2a=_0x3fef3c();_0x4fe30c[_0x278c2a]='revisionHistoryLicenseKey'+_0x5a5029,_0x5a5029['endsWith']('Limit')&&(window[_0x3fef3c()]=_0x2cc7f0),'Valid'!=_0x5a5029&&_0x2b9de1();}function _0x3fef3c(){const _0x25e40d=window['String'](window['performance']['now']())['replace']('.','');let _0x2724dc='g';for(let _0x40e15b=0x0;_0x40e15b<_0x25e40d['length'];_0x40e15b+=0x2){let _0x201123=window['parseInt'](_0x25e40d['substring'](_0x40e15b,_0x40e15b+0x2));_0x201123>=0x3e&&(_0x201123-=0x3e),_0x2724dc+=_0xaa2398[_0x201123];}return _0x2724dc;}function _0x6630d6(){const _0x5cfa2d=_0x58b3da['split']('.');if(0x3!=_0x5cfa2d['length'])return null;return _0x256116(_0x5cfa2d[0x1]);function _0x256116(_0x5a1467){const _0x8f53fb=_0x827ff3(_0x5a1467);return _0x8f53fb&&_0x2503df()?_0x8f53fb:null;function _0x2503df(){const _0x3f04c3=_0x8f53fb['jti'],_0x3d658f=window['parseInt'](_0x3f04c3['substring'](_0x3f04c3['length']-0x8),0x10),_0xde567e={..._0x8f53fb,'jti':_0x3f04c3['substring'](0x0,_0x3f04c3['length']-0x8)};return delete _0xde567e['vc'],_0x3014a0(_0xde567e)==_0x3d658f;}}}async function _0xa4509d(){let _0x28e807=!0x0;try{const [_0x50eaaf,_0x517d26,_0x4a913b]=_0x58b3da['split']('.');return _0x28735e(_0x50eaaf),await _0x4bfee4(_0x50eaaf,_0x517d26,_0x4a913b),_0x28e807;}catch{return!0x1;}function _0x28735e(_0x593b2c){const _0x461cbf=_0x827ff3(_0x593b2c);_0x461cbf&&'ES256'==_0x461cbf['alg']||(_0x28e807=!0x1);}async function _0x4bfee4(_0x39e252,_0x5e1943,_0x18f24a){const _0x214d58=window['Uint8Array']['from'](_0x42e4bb(_0x18f24a),_0x2acd90=>_0x2acd90['charCodeAt'](0x0)),_0x455c20=new window['TextEncoder']()['encode'](_0x39e252+'.'+_0x5e1943),_0x5b63f5=window['crypto']['subtle'];if(!_0x5b63f5)return;const _0x10110d=await _0x5b63f5['importKey']('jwk',_0x514da0,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5b63f5['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x10110d,_0x214d58,_0x455c20)||(_0x28e807=!0x1);}}function _0x827ff3(_0x2a278c){return _0x2a278c['startsWith']('ey')?JSON['parse'](_0x42e4bb(_0x2a278c)):null;}function _0x42e4bb(_0x2eaa76){return window['atob'](_0x2eaa76['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3014a0(_0x57b7e5){let _0xbc9b26=0x1505;function _0x2db2fb(_0x5b2840){for(let _0x45edaf=0x0;_0x45edaf<_0x5b2840['length'];_0x45edaf++){const _0xe7249c=_0x5b2840['charCodeAt'](_0x45edaf);_0xbc9b26=(_0xbc9b26<<0x5)+_0xbc9b26+_0xe7249c,_0xbc9b26&=_0xbc9b26;}}function _0x214d9f(_0x11998b){Array['isArray'](_0x11998b)?_0x11998b['forEach'](_0x214d9f):_0x11998b&&'object'==typeof _0x11998b?Object['entries'](_0x11998b)['sort']()['forEach'](([_0x1e5f33,_0x2fb75e])=>{_0x2db2fb(_0x1e5f33),_0x214d9f(_0x2fb75e);}):_0x2db2fb(window['String'](_0x11998b));}return _0x214d9f(_0x57b7e5),_0xbc9b26>>>0x0;}function _0x59cda9(_0x5ce626){return _0x5ce626['toString'](0x10)['padStart'](0x8,'0');}function _0x2674d0(_0x1f0f4c){return _0x1f0f4c['split']('')['reverse']()['join']('');}function _0xc9be30(_0x38d5fa){return _0x4fe30c['plugins']['has'](_0x38d5fa);}function _0x435b7c(_0x5998bf){return _0x4fe30c['plugins']['get'](_0x5998bf);}function _0x4704cf(){}_0x41ea1c(await _0x2d3762());}_0x2cb3df(_0x27be0d['editor']);}(this);}createRevision(_0x370094){const _0x10e1cb=this['editor']['plugins']['get']('Users');return new bt({'id':_0x370094['id'],'name':_0x370094['name'],'creator':_0x370094['creatorId']?_0x10e1cb['getUser'](_0x370094['creatorId']):null,'diffData':_0x370094['diffData']||_0x370094['data'],'authors':_0x370094['authorsIds']['map'](_0x433ec0=>_0x10e1cb['getUser'](_0x433ec0)),'createdAt':new Date(_0x370094['createdAt']),'attributes':_0x370094['attributes'],'fromVersion':_0x370094['fromVersion'],'toVersion':_0x370094['toVersion']});}['addRevision'](_0x42bc70,_0x3153f3=0x0){this['_revisions']['add'](_0x42bc70,_0x3153f3);}getRevision(_0x2004a9){return this['_revisions']['get'](_0x2004a9);}getRevisions(_0xfc52ee={'toJSON':!0x1}){const _0x1a3816=Array['from'](this['_revisions']);return _0x1a3816['reverse'](),_0xfc52ee['toJSON']?_0x1a3816['map'](_0xf66cb3=>_0xf66cb3['toJSON']()):_0x1a3816;}getIndex(_0x5c9e87){return this['_revisions']['getIndex'](_0x5c9e87);}getEarlierVisibleRevision(_0x3dbe3a){const [,_0x35c042]=this['getRevisionsIterator'](_0x3dbe3a,{'direction':'earlier'});return _0x35c042;}getLaterVisibleRevision(_0x141f8a){const [,_0x227e25]=this['getRevisionsIterator'](_0x141f8a,{'direction':'later'});return _0x227e25;}getRevisionsInDiff(_0x515f42){const _0x560d5f=[];for(const _0x3a2f11 of this['getRevisionsIterator'](_0x515f42['newRevisionId']))if(_0x560d5f['push'](_0x3a2f11),_0x3a2f11['id']===_0x515f42['oldRevisionId'])break;return _0x560d5f;}*getRevisionsIterator(_0x566ea5,{direction:_0x4b1a0c='earlier',filter:_0x377091=()=>!0x0}={}){const _0x4e52d6='earlier'===_0x4b1a0c?0x1:-0x1;let _0x269a4e=this['_revisions']['get'](_0x566ea5),_0x472a58=this['getIndex'](_0x269a4e);for(yield _0x269a4e;_0x269a4e;){if(_0x472a58+=_0x4e52d6,_0x269a4e=this['getRevision'](_0x472a58),!_0x269a4e)return;_0x377091(_0x269a4e)&&(yield _0x269a4e);}}},kt=class extends _0x53e262{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x204f81,'c'],[_0x163a43,'a'],[_0x5357fd,'e'],[_0x5e1bd7,'r'],[_0x2f5599,'u']]);_typeCharToViewClass=new Map([['c',_0x204f81],['a',_0x163a43],['e',_0x5357fd],['r',_0x5e1bd7],['u',_0x2f5599]]);async loadRevisionData(_0x2633db,_0x52c79e){if(_0x2633db['diffData']||!_0x52c79e)return;const _0x53e92b=this['editor']['config']['get']('collaboration.channelId');_0x2633db['diffData']=(await _0x52c79e['getRevision']({'channelId':_0x53e92b,'revisionId':_0x2633db['id']}))['diffData'];}getRevisionDocumentData(_0x500517){const _0x4d4b2b={};for(const _0x19be32 in _0x500517['diffData']){if(_0x500517['diffData'][_0x19be32]['attachChange']&&!_0x500517['diffData'][_0x19be32]['attachChange']['isAttached'])continue;const _0x40409c=this['_removeRevisionMarkers'](JSON['parse'](_0x500517['diffData'][_0x19be32]['insertions'])),_0x49d83d=this['editor']['editing']['view']['document'],_0x147cf0=new _0x1ed382(_0x49d83d,_0x40409c['map'](_0x5cfb18=>this['_getViewFromDiffObj'](_0x5cfb18,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4d4b2b[_0x19be32]=this['editor']['data']['processor']['toData'](_0x147cf0),this['editor']['data']['processor']['useFillerType']('default');}return _0x4d4b2b;}getRevisionRootsAttributes(_0x32ba6a){const _0x49fd28={};for(const _0x566dad in _0x32ba6a['diffData'])_0x32ba6a['diffData'][_0x566dad]['attachChange']&&!_0x32ba6a['diffData'][_0x566dad]['attachChange']['isAttached']||(_0x49fd28[_0x566dad]=_0x32ba6a['diffData'][_0x566dad]['attributesAfter']||{});return _0x49fd28;}getRevisionRootsModelElements(_0x59664e){const _0x51a081={};for(const _0x1a3cc3 in _0x59664e['diffData']){if(_0x59664e['diffData'][_0x1a3cc3]['attachChange']&&!_0x59664e['diffData'][_0x1a3cc3]['attachChange']['isAttached'])continue;const _0x4bcdde=_0x59664e['diffData'][_0x1a3cc3]['rootElementName'];_0x4bcdde&&(_0x51a081[_0x1a3cc3]=_0x4bcdde);}return _0x51a081;}_getTypeCharForViewElement(_0x5b8e2c){return this['_viewClassToTypeChar']['get'](_0x5b8e2c['constructor']);}_getViewFromDiffObj(_0x2d1993,_0x37f469){const _0x575b7b=this['editor']['editing']['view']['document'];if('string'==typeof _0x2d1993)return new _0x82afa4(_0x575b7b,_0x2d1993);{let _0x60893e,_0x1d8df5;_0x1d8df5='u'==_0x2d1993['type']||'r'==_0x2d1993['type']?[]:_0x2d1993['children']['map'](_0x4c50a9=>this['_getViewFromDiffObj'](_0x4c50a9,_0x37f469));const _0x57979b=this['_typeCharToViewClass']['get'](_0x2d1993['type'])||_0x24b1c2,_0x29002a=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x60893e=new _0x57979b(_0x575b7b,_0x2d1993['name'],_0x2d1993['attributes'],_0x1d8df5),'u'==_0x2d1993['type']&&_0x2d1993['children'][0x0]){const _0x2763e6=_0x2d1993['children'][0x0];if(_0x60893e['render']=function(_0x116b60){const _0x3e77ce=_0x116b60['createElement']('div');return _0x3e77ce['innerHTML']=_0x58af3e(_0x2763e6),_0x3e77ce['childNodes'][0x0];},_0x37f469){const _0x525b7e=new _0x1ed382(_0x575b7b);_0x525b7e['_appendChild'](_0x60893e);const _0x5ac6b3=Array['from'](_0x29002a['viewChildrenToDom'](_0x525b7e,{'bind':!0x1})),_0x305ca9=_0x29002a['domDocument']['createElement']('div');_0x305ca9['append'](..._0x5ac6b3),_0x60893e=Array['from'](_0x29002a['domChildrenToView'](_0x305ca9))[0x0];}}else{if('r'==_0x2d1993['type']&&_0x2d1993['children'][0x0]){const _0x2ebdf2=_0x2d1993['children'][0x0];if(_0x60893e['render']=function(_0x55e1c5){_0x55e1c5['innerHTML']=_0x58af3e(_0x2ebdf2);},_0x37f469){const _0x2f3518=new _0x1ed382(_0x575b7b);_0x2f3518['_appendChild'](_0x60893e);const _0x537295=Array['from'](_0x29002a['viewChildrenToDom'](_0x2f3518,{'bind':!0x1})),_0x4734d8=_0x29002a['domDocument']['createElement']('div');_0x4734d8['append'](..._0x537295);const _0x5c4e33=Array['from'](_0x29002a['domChildrenToView'](_0x4734d8));_0x5c4e33['length']>0x1?_0x60893e['_appendChild'](_0x5c4e33):_0x60893e=_0x5c4e33[0x0];}}}if(_0x2d1993['customProperties']){for(const [_0x29ba8b,_0x51f1b8]of _0x2d1993['customProperties'])_0x60893e['_setCustomProperty'](_0x29ba8b,_0x51f1b8);}const _0x97a168=void 0x0===_0x2d1993['fillerOffset']?null:_0x2d1993['fillerOffset'];return null!==_0x97a168&&(_0x60893e['getFillerOffset']=()=>_0x97a168),_0x60893e;}}_makeModelFromViewString(_0x680638,_0x3c9d2d){const _0x30207d=JSON['parse'](_0x680638),_0xbf2fa1=this['editor']['editing']['view']['document'],_0x5819e9=new _0x1ed382(_0xbf2fa1,_0x30207d['map'](_0x335cb1=>this['_getViewFromDiffObj'](_0x335cb1,!0x0))),_0x4f59c4=this['editor']['data']['toModel'](_0x5819e9,_0x3c9d2d);return _0x4f59c4['name']=_0x3c9d2d,_0x4f59c4;}['_removeRevisionMarkers'](_0x209f73){return(_0x209f73=_0x209f73['filter'](_0x5af84e=>!_0x5af84e['name']||'revision-start'!==_0x5af84e['name']&&'revision-end'!==_0x5af84e['name']))['forEach'](_0x2af893=>{'string'!=typeof _0x2af893&&(_0x2af893['children']=this['_removeRevisionMarkers'](_0x2af893['children']),_0x2af893['attributes']=_0x2af893['attributes']['filter'](_0x4fc7e6=>!_0x4fc7e6[0x0]['startsWith']('data-revision-')));}),_0x209f73;}};function At(_0x1a1767,_0xbcd40,_0x4b10d5){const t=_0x1a1767['t'];switch(_0xbcd40){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'},_0x4b10d5);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x4b10d5);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x4b10d5);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x4b10d5);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x4b10d5);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var Et=class extends _0x53e262{['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[_0x9e6c40,Rt,kt,_0x1bde66];}constructor(_0x1569df){super(_0x1569df),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x5d688e=_0x45072e();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x5d688e},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 _0x474d23=this['repository']['getRevision'](0x0),_0x4ba1ed=_0x474d23&&null===_0x474d23['creator']?_0x474d23:null;if(this['_continueCurrentRevision']=!!_0x4ba1ed&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x29f605=this['_source']['getCurrentRevisionId'](),_0x5ca242=this['repository']['getRevision'](_0x29f605);if(_0x5ca242)this['_startingVersion']=_0x5ca242['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x138bd7=this['_source']['history']['_operations']['find'](_0x226dfb=>!_0x226dfb['_isInit']),_0x12bcfe=_0x138bd7?_0x138bd7['baseVersion']:this['_source']['history']['version'];_0x474d23?(_0x474d23['toVersion']<_0x12bcfe&&_0x474d23['_update']({'toVersion':_0x12bcfe}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x4ba1ed['id'],this['_startingVersion']=_0x4ba1ed['fromVersion']):(this['_startingVersion']=_0x474d23['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x12bcfe,this['_continueCurrentRevision']=!0x1);}}else _0x4ba1ed&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x4ba1ed['toVersion'],this['editor']['model']['document']['history']['version']),_0x4ba1ed['fromVersion']===_0x4ba1ed['toVersion']?(0x0!==_0x4ba1ed['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x4ba1ed['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x4ba1ed['id'],this['_startingVersion']=_0x4ba1ed['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',_0x2f4bcb=>!_0x2f4bcb),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1bcec2=[this['editor']];for(const _0x347452 of _0x1bcec2){let _0x596fc3;for(const _0x7c3634 in _0x347452){const _0x33c44e=_0x7c3634,_0x2ef70c=_0x347452[_0x33c44e];if('revisionHistoryLicenseKeyValid'==_0x2ef70c||'revisionHistoryLicenseKeyInvalid'==_0x2ef70c||'revisionHistoryLicenseKeyExpired'==_0x2ef70c||'revisionHistoryLicenseKeyDomainLimit'==_0x2ef70c||'revisionHistoryLicenseKeyNotAllowed'==_0x2ef70c||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2ef70c||'revisionHistoryLicenseKeyUsageLimit'==_0x2ef70c){delete _0x347452[_0x33c44e],_0x596fc3=_0x2ef70c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x596fc3&&_0x347452['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x596fc3&&_0x347452['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x596fc3&&_0x347452['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x596fc3&&_0x347452['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x596fc3&&_0x347452['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x596fc3&&_0x347452['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x3eeea9=this['repository']['getRevision'](0x0),_0x5d064e=await this['getRevisionDocumentData'](_0x3eeea9),_0x5091bd=await this['getRevisionRootsAttributes'](_0x3eeea9),_0x4b87ab=this['_utils']['getRevisionRootsModelElements'](_0x3eeea9);this['_replaceEditorDataWithRevisionData'](_0x5d064e,_0x5091bd,_0x4b87ab);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x14e5d4){this['_source']=_0x14e5d4;}async update(){const _0x273d8d=await this['_source']['getLatestVersion']();if(_0x273d8d>this['currentRevision']['toVersion']){await this['_loadState']();const _0xd00eaf=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x273d8d});_0xd00eaf['authors']=_0xd00eaf['authorsIds']['map'](_0x2da277=>this['editor']['plugins']['get']('Users')['getUser'](_0x2da277)),this['currentRevision']['_update'](_0xd00eaf);}}async['saveRevision'](_0x1c38d7={},_0x114635=null){const _0x28d5b0=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x114635>this['currentRevision']['toVersion']&&(_0x114635=null),null===_0x114635&&(_0x114635=await this['_source']['getLatestVersion']());const _0x56723c=this['_getFromVersion'](_0x114635),_0x7618c9=this['buildRevisionData']({'from':_0x56723c,'to':_0x114635});if(this['currentRevision']['toVersion']<_0x114635){const _0x3d89f2=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x114635,'to':_0x114635});_0x3d89f2['authors']=[],_0x3d89f2['authorsIds']=[],_0x3d89f2['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3d89f2,!0x0),delete _0x3d89f2['authors'],_0x28d5b0['push'](_0x3d89f2);}const _0xd87775={..._0x1c38d7,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1c38d7['name']||null,'id':_0x1c38d7['id']||_0x45072e(),..._0x7618c9,'attributes':{..._0x1c38d7['attributes'],..._0x7618c9['attributes']}},_0x140b1b=this['addRevisionData'](_0xd87775);_0x28d5b0['push'](_0xd87775);const _0x40c793=this['repository']['getIndex'](_0x140b1b);if(0x0!==_0x40c793){const _0x43c97d=this['repository']['getRevision'](_0x40c793-0x1);if(_0x43c97d['fromVersion']!==_0x114635){const _0x1e49e4=this['_revisionDataBuilder']['getData'](_0x114635,_0x43c97d['toVersion']),_0x146458={'id':_0x43c97d['id'],'diffData':_0x1e49e4['diffData'],'authorsIds':_0x1e49e4['authorsIds'],'authors':_0x1e49e4['authorsIds']['map'](_0x1b3c73=>this['editor']['plugins']['get']('Users')['getUser'](_0x1b3c73)),'fromVersion':_0x114635};this['_stampAiAttribute'](_0x146458,_0x43c97d,!!_0x1e49e4['hasAIChanges']),_0x43c97d===this['currentRevision']&&(_0x146458['createdAt']=new Date(_0xd87775['createdAt']['getTime']()+0xa)),_0x43c97d['_update'](_0x146458,!0x0),delete _0x146458['authors'],_0x28d5b0['push'](_0x146458);}}if(this['adapter']){for(const _0x3b3a80 of _0x28d5b0)this['_bufferUpdate'](_0x3b3a80['id'],_0x3b3a80,!0x0);this['sendBufferedUpdates']();}return _0x140b1b;}addRevisionData(_0xfe376d){const _0x4d218d=this['repository']['createRevision'](_0xfe376d);return this['adapter']&&_0x4d218d['on']('_update',(_0x38b355,_0x3e3a27,_0x3b1672)=>{_0x3b1672||(this['_bufferUpdate'](_0x3e3a27['id'],_0x3e3a27,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4d218d,this['_findInsertionIndex'](_0x4d218d)),_0x4d218d;}async getRevisionDocumentData(_0x1fa346){return await this['_utils']['loadRevisionData'](_0x1fa346,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1fa346);}async getRevisionRootsAttributes(_0xfcc5b6){return await this['_utils']['loadRevisionData'](_0xfcc5b6,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xfcc5b6);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x21db80=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x315d8a=0x0;_0x315d8a<_0x21db80['length'];_0x315d8a++){const _0x625a3a=_0x21db80[_0x315d8a];let _0x2e2ed5=!0x1;for(const _0x146c9a of Object['keys'](_0x625a3a))void 0x0===_0x625a3a[_0x146c9a]?delete _0x625a3a[_0x146c9a]:'id'!==_0x146c9a&&(_0x2e2ed5=!0x0);_0x2e2ed5||(_0x21db80[_0x315d8a]=null);}if(_0x21db80=_0x21db80['filter'](_0xa6018c=>null!==_0xa6018c),!_0x21db80['length'])return;for(let _0x26e107=0x0;_0x26e107<_0x21db80['length'];_0x26e107++){const _0x1795ce=_0x21db80[_0x26e107];void 0x0!==_0x1795ce['fromVersion']&&void 0x0===_0x1795ce['toVersion']&&(_0x1795ce['toVersion']=this['repository']['getRevision'](_0x1795ce['id'])['toVersion']),void 0x0!==_0x1795ce['toVersion']&&void 0x0===_0x1795ce['fromVersion']&&(_0x1795ce['fromVersion']=this['repository']['getRevision'](_0x1795ce['id'])['fromVersion']);}const _0x2d410b=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x21db80,_0x2d410b)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x43c7e0=>{if(_0x43c7e0){for(const _0x35acd0 of _0x43c7e0)this['setRevisionData']({'id':_0x35acd0['id'],'createdAt':_0x35acd0['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x2fdac3,_0x3373e3,_0x5bbc9b){if(_0x5bbc9b===(!!_0x3373e3&&!!_0x3373e3['attributes']['@ai']))return;const _0x2393e2={..._0x3373e3?_0x3373e3['attributes']:{},..._0x2fdac3['attributes']};_0x5bbc9b?_0x2393e2['@ai']=!0x0:delete _0x2393e2['@ai'],_0x2fdac3['attributes']=_0x2393e2;}buildRevisionData({revision:_0x4bcd5d=null,from:_0x796d01=null,to:_0x2b9e17=null}){_0x796d01=null!==_0x796d01?_0x796d01:_0x4bcd5d['fromVersion'],_0x2b9e17=null!==_0x2b9e17?_0x2b9e17:_0x4bcd5d['toVersion'];const _0x487d9b=this['_revisionDataBuilder']['getData'](_0x796d01,_0x2b9e17),_0xe77b2e={'diffData':_0x487d9b['diffData'],'authorsIds':_0x487d9b['authorsIds'],'fromVersion':_0x796d01,'toVersion':_0x2b9e17};if(this['_stampAiAttribute'](_0xe77b2e,_0x4bcd5d,!!_0x487d9b['hasAIChanges']),!_0x4bcd5d||_0x2b9e17!==_0x4bcd5d['toVersion']){const _0x460d3e=_0x2b9e17-0x1,_0x19e961=this['_source']['history']['getOperation'](_0x460d3e);_0xe77b2e['createdAt']=_0x19e961&&_0x19e961['createdAt']||new Date();}if(this['_loadedStateData']&&_0x796d01===this['_loadedStateData']['fromVersion']){for(const _0x269fb4 of this['_loadedStateData']['authors'])_0xe77b2e['authorsIds']['includes'](_0x269fb4['id'])||_0xe77b2e['authorsIds']['push'](_0x269fb4['id']);}return _0xe77b2e;}_bufferUpdate(_0x11da94,_0x106c3e,_0xc424fc){if(this['_bufferedUpdates']['has'](_0x11da94)){const _0x2fa182=this['_bufferedUpdates']['get'](_0x11da94);_0x106c3e=_0xc424fc?{..._0x2fa182,..._0x106c3e}:{..._0x106c3e,..._0x2fa182};}this['_bufferedUpdates']['set'](_0x11da94,_0x106c3e);}setRevisionData(_0x394857){const _0x1b3c64=this['repository']['getRevision'](_0x394857['id']);if(_0x394857['createdAt']&&(_0x394857['createdAt']=new Date(_0x394857['createdAt'])),_0x394857['authorsIds']){const _0x5d0d5f=this['editor']['plugins']['get']('Users');_0x394857['authors']=_0x394857['authorsIds']['map'](_0xeac96=>_0x5d0d5f['getUser'](_0xeac96));}_0x1b3c64['_update'](_0x394857,!0x0);}_createInitialRevision(_0x208ad6){const _0x5089be=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5089be)this['_initialRevisionId']=_0x5089be['id'];else{const _0x573a1a=!this['editor']['model']['document']['roots']['find'](_0x30094c=>this['editor']['model']['hasContent'](_0x30094c)),_0xfdbc3e=this['editor']['plugins']['get']('Users')['me']['id'],_0x25c098=At(this['editor']['locale'],_0x573a1a?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x208ad6,'to':_0x208ad6,'id':this['_initialRevisionId'],'name':_0x25c098,'creatorId':_0xfdbc3e});}}_createCurrentRevision(_0xf6799e){const _0x205aef=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x205aef),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xf6799e,'to':_0xf6799e,'id':_0x205aef,'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(_0x4bda1e,_0xc81b20,_0x22f1a3){const _0x219362={},_0xc5c569={},_0x40380d={},_0x373e33=this['editor']['config']['get']('roots')||{};for(const [_0x192dda,_0x19cc85]of Object['entries'](_0x373e33))_0x19cc85['lazyLoad']||(_0x219362[_0x192dda]=_0x19cc85['initialData']??'',_0xc5c569[_0x192dda]=_0x19cc85['modelAttributes']||{},_0x19cc85['modelElement']&&(_0x40380d[_0x192dda]=_0x19cc85['modelElement']));for(const _0x2f9347 of this['editor']['model']['document']['getRootNames']())_0x219362[_0x2f9347]??='',_0xc5c569[_0x2f9347]??={};let _0x55b6e=!0x1;const _0x1ab48f=Object['keys'](_0x219362),_0x9ebd07=Object['keys'](_0x4bda1e);for(const _0x16e8b3 of _0x1ab48f){if(_0x219362[_0x16e8b3]!==_0x4bda1e[_0x16e8b3]&&''!==_0x219362[_0x16e8b3]['trim']()){_0x55b6e=!0x0;break;}if(!_0x5825a9(_0xc5c569[_0x16e8b3],_0xc81b20[_0x16e8b3])&&Object['keys'](_0xc5c569[_0x16e8b3])['length']>0x0){_0x55b6e=!0x0;break;}const _0x16a97a=_0x40380d[_0x16e8b3],_0x1d55b5=_0x22f1a3[_0x16e8b3];if(_0x16a97a&&_0x1d55b5&&_0x16a97a!==_0x1d55b5){_0x55b6e=!0x0;break;}}_0x55b6e||(_0x55b6e=_0x9ebd07['some'](_0x5dba29=>!this['editor']['model']['document']['getRoot'](_0x5dba29))),_0x55b6e&&_0x344af6('editor-initial-data-replaced-with-revision-data',{'editorData':_0x219362,'editorRootsAttributes':_0xc5c569,'editorRootsModelElements':_0x40380d,'revisionData':_0x4bda1e,'revisionRootsAttributes':_0xc81b20,'revisionRootsModelElements':_0x22f1a3});for(const [_0x3621da,_0x294bdd]of Object['entries'](_0x4bda1e))this['editor']['config']['set']('roots.'+_0x3621da+'.initialData',_0x294bdd);for(const [_0x2ff63a,_0x4f1e56]of Object['entries'](_0xc81b20))this['editor']['config']['set']('roots.'+_0x2ff63a+'.modelAttributes',_0x4f1e56);const _0x59d7e3=this['editor']['model']['document'];for(const [_0x36ee04,_0x14083c]of Object['entries'](_0x22f1a3)){this['editor']['config']['set']('roots.'+_0x36ee04+'.modelElement',_0x14083c);const _0x2d9d6f=_0x59d7e3['getRoot'](_0x36ee04);_0x2d9d6f&&_0x2d9d6f['name']!==_0x14083c&&(_0x59d7e3['roots']['remove'](_0x36ee04),_0x59d7e3['createRoot'](_0x14083c,_0x36ee04));}}_addPendingAction(){if(!this['_pendingAction']){const _0x1ca2c5=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1ca2c5['add'](At(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x1c3254){const _0x131309=this['repository']['getRevisions']();_0x131309['reverse']();let _0x49f659=0x0;for(;_0x49f659<_0x131309['length'];){const _0x446ff6=_0x131309[_0x49f659];if(_0x446ff6===this['currentRevision']){_0x49f659++;continue;}if(_0x446ff6['id']===this['_initialRevisionId'])break;const _0x25e4da=_0x1c3254['toVersion']-_0x446ff6['toVersion']||_0x1c3254['fromVersion']-_0x446ff6['fromVersion'];if(_0x25e4da>0x0)break;if(_0x25e4da<0x0)_0x49f659++;else{if(!_0x1c3254['creator']&&_0x446ff6['creator'])break;if(_0x446ff6['creator']||!_0x1c3254['creator']){if(_0x1c3254['createdAt']>_0x446ff6['createdAt'])break;_0x49f659++;}else _0x49f659++;}}return _0x49f659;}_getFromVersion(_0x48c231){const _0x220f60=this['repository']['getRevisions']();_0x220f60['reverse'](),_0x220f60['shift']();const _0x1527c0=_0x220f60['find'](_0x2402ab=>_0x2402ab['toVersion']<=_0x48c231)['toVersion'];return _0x1527c0<this['_startingVersion']?this['_startingVersion']:_0x1527c0;}['_makeRevision']({name:_0x1085c1,from:_0x18c1fc,to:_0x3f5c53,creatorId:_0x120ebc,id:_0x586da8}){const _0x488b9b=this['buildRevisionData']({'from':_0x18c1fc,'to':_0x3f5c53});_0x488b9b['name']=_0x1085c1,_0x488b9b['creatorId']=_0x120ebc,_0x488b9b['id']=_0x586da8;const _0x44b9ec=this['addRevisionData'](_0x488b9b);return this['adapter']&&this['_bufferUpdate'](_0x488b9b['id'],_0x488b9b,!0x0),_0x44b9ec;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x22e64f){this['editor']=_0x22e64f,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x49f4aa){this['source']=_0x49f4aa;const _0x540d64=new Map(),_0x47115e=new Map(),_0x38009c=this['editor']['model']['document']['roots']['map'](_0x143d54=>_0x143d54['rootName']);for(const _0x4202ec of _0x38009c){const _0x2aadcd=this['editor']['model']['document']['getRoot'](_0x4202ec),_0x20eef0=St(_0x2aadcd);_0x540d64['set'](_0x4202ec,_0x20eef0),_0x47115e['set'](_0x4202ec,Object['fromEntries'](_0x2aadcd['getAttributes']()));}const _0x5251ce=Array['from'](this['editor']['model']['markers'])['map'](_0x262704=>[_0x262704['name'],_0x262704['getRange']()]),_0x3e55b5=this['source']['version'];this['_saveMetaData'](_0x3e55b5,_0x540d64,_0x5251ce,_0x47115e),this['_startingRevisionId']=this['_revisionId'];const _0x22cc7e=new Map(),_0x4f9787=new Map();for(const _0x53c27c of _0x38009c){const _0x15d938=Ot(_0x53c27c,this['editor']['model']['document']['getRoot'](_0x53c27c)['name']);_0x22cc7e['set'](_0x53c27c,_0x15d938),_0x4f9787['set'](_0x53c27c,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x22cc7e,[],_0x4f9787);}getData(_0x5cf47f,_0x41e252){if(this['_lastFrom']===_0x5cf47f&&this['_lastTo']<=_0x41e252)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x41e252,!0x0);else{if(!this['_savedMetaData']['has'](_0x5cf47f)){const _0x356f82=this['_getPreviousFrom'](_0x5cf47f);this['_calculateMetaData'](_0x356f82,_0x5cf47f,!0x1);}this['_calculateMetaData'](_0x5cf47f,_0x41e252,!0x0);}return this['_lastFrom']=_0x5cf47f,this['_lastTo']=_0x41e252,this['_getState']();}loadState(_0x404e5e){if(!this['_savedMetaData']['has'](_0x404e5e['fromVersion'])){const _0x51f7b5=this['_getPreviousFrom'](_0x404e5e['fromVersion']);this['_calculateMetaData'](_0x51f7b5,_0x404e5e['fromVersion'],!0x1);}this['_calculateMetaData'](_0x404e5e['fromVersion'],_0x404e5e['toVersion'],!0x1);const _0x613c25=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x404e5e['fromVersion'],this['_lastTo']=_0x404e5e['toVersion'];for(const _0x4364a7 in _0x404e5e['diffData']){const _0x3f45af=_0x404e5e['diffData'][_0x4364a7]['attachChange'],_0x577401=_0x36e7de(_0x404e5e['diffData'][_0x4364a7]['attributesBefore'])||{},_0x3b1f08=_0x404e5e['diffData'][_0x4364a7],_0x2fac43=_0x613c25['_makeModelFromViewString'](_0x3b1f08['deletions'],_0x3b1f08['rootElementName']||'$root');_0x2fac43['rootName']=_0x4364a7,_0x2fac43['_isAttached']=!_0x3f45af||!_0x3f45af['isAttached'],_0x2fac43['isAttached']=()=>_0x2fac43['_isAttached'],this['_baseRoots']['set'](_0x4364a7,_0x2fac43),this['_baseRootsAttributes']['set'](_0x4364a7,_0x577401),_0x3f45af&&this['_touchedRoots']['set'](_0x4364a7,_0x3f45af);const _0xf33e55=this['_makeIdsRoot'](_0x2fac43);this['_baseIdsRoots']['set'](_0x4364a7,_0xf33e55);for(const [_0xcc50e,_0x8243c4]of _0x2fac43['markers']){if(!_0xcc50e['startsWith']('revision:'))continue;const _0x50d384=_0xcc50e['split'](':')[0x2],_0x1ebc2e=_0x3b1f08['aiSources']?.[_0xcc50e]||null;for(const _0x1888e0 of _0x8243c4['getWalker']({'singleCharacters':!0x0})){const _0x19f9ac=this['_getVidAttributeName'](_0x1888e0),_0x1dc467='elementEnd'==_0x1888e0['type']?_0x1888e0['previousPosition']['path']['slice'](0x0,-0x1):_0x1888e0['previousPosition']['path'],_0x4b3511=_0xf33e55['getNodeByPath'](_0x1dc467)['getAttribute'](_0x19f9ac);this['_touched']['set'](_0x4b3511,{'userId':_0x50d384,'aiSource':_0x1ebc2e});}_0x2fac43['markers']['delete'](_0xcc50e);}}this['_startingRevisionId']=this['_revisionId'];const _0x21f700=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4aa9e8=>!this['_touched']['has'](_0x4aa9e8));let _0x4b42e1=0x0;const _0x44896e=new Map();for(const _0x1d45ce in _0x404e5e['diffData']){const _0xb48b2=_0x404e5e['diffData'][_0x1d45ce]['attachChange'],_0x29786f=_0x36e7de(_0x404e5e['diffData'][_0x1d45ce]['attributesAfter'])||{},_0x394e35=_0x404e5e['diffData'][_0x1d45ce],_0x941fb3=_0x613c25['_makeModelFromViewString'](_0x394e35['insertions'],_0x394e35['rootElementName']||'$root');_0x941fb3['rootName']=_0x1d45ce,_0x941fb3['_isAttached']=!_0xb48b2||_0xb48b2['isAttached'],_0x941fb3['isAttached']=()=>_0x941fb3['_isAttached'],this['_diffRoots']['set'](_0x1d45ce,_0x941fb3),this['_diffRootsAttributes']['set'](_0x1d45ce,_0x29786f);const _0x424332=this['_makeIdsRoot'](_0x941fb3,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1d45ce,_0x424332),_0x44896e['set'](_0x1d45ce,_0x941fb3['isAttached']()?_0x29786f:{});for(const [_0x2d452f,_0xd842ff]of _0x941fb3['markers']){if(!_0x2d452f['startsWith']('revision:'))continue;const _0x4c06f8=_0x2d452f['split'](':')[0x2],_0x538cc2=_0x394e35['aiSources']?.[_0x2d452f]||null;for(const _0x465d9e of _0xd842ff['getWalker']({'singleCharacters':!0x0})){const _0x585e19=this['_getVidAttributeName'](_0x465d9e),_0x23a020=this['_revisionId']++,_0x103609='elementEnd'==_0x465d9e['type']?_0x465d9e['previousPosition']['path']['slice'](0x0,-0x1):_0x465d9e['previousPosition']['path'];_0x424332['getNodeByPath'](_0x103609)['_setAttribute'](_0x585e19,_0x23a020),this['_touched']['set'](_0x23a020,{'userId':_0x4c06f8,'aiSource':_0x538cc2});}_0x941fb3['markers']['delete'](_0x2d452f);}for(const _0xffcae3 of this['editor']['model']['createRangeIn'](_0x941fb3)['getWalker']({'singleCharacters':!0x0})){const _0x4f1f0b=this['_getVidAttributeName'](_0xffcae3),_0x52e7a4='elementEnd'==_0xffcae3['type']?_0xffcae3['previousPosition']['path']['slice'](0x0,-0x1):_0xffcae3['previousPosition']['path'],_0x387dc5=_0x424332['getNodeByPath'](_0x52e7a4);_0x387dc5['getAttribute'](_0x4f1f0b)>0x0||_0x387dc5['_setAttribute'](_0x4f1f0b,_0x21f700[_0x4b42e1++]);}for(const [_0x5e519f,_0x3f5348]of _0x941fb3['markers'])_0x5e519f['startsWith']('revision:')||this['_markers']['set'](_0x5e519f,_0x3f5348);}const {roots:_0x3f4faf}=this['_savedMetaData']['get'](_0x404e5e['fromVersion']),{roots:_0x336c83}=this['_savedMetaData']['get'](_0x404e5e['toVersion']),_0x2eac82=St(_0x3f4faf['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x2eac82),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2eac82,Number['NEGATIVE_INFINITY']));const _0x53b047=St(_0x336c83['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x53b047),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x53b047));const _0x1bdecd=Array['from'](this['_diffRoots'])['map'](([_0xfe6848,_0xc82d2b])=>[_0xfe6848,St(_0xc82d2b)]);this['_saveMetaData'](this['_lastTo'],_0x1bdecd,this['_markers'],_0x44896e);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x44aef2,_0x87de94,_0x5475b2,_0x24c0b9){const _0x2d8edc=new Map(_0x87de94),_0x16a582=new Map(_0x36e7de(_0x24c0b9)),_0x4dc19d=new Map();for(const [_0x46bbc0,_0x3da1ae]of _0x5475b2)_0x4dc19d['set'](_0x46bbc0,{'start':_0x3da1ae['start']['clone'](),'end':_0x3da1ae['end']['clone'](),'rootName':_0x3da1ae['root']['rootName']});this['_savedMetaData']['set'](_0x44aef2,{'roots':_0x2d8edc,'markers':_0x4dc19d,'rootsAttributes':_0x16a582});}_removeMetaData(_0x5d6005){this['_savedMetaData']['delete'](_0x5d6005);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}_makeIdsRoot(_0x55b2a0,_0x2d2ebe=null){let _0x827100=null;_0x55b2a0['is']('documentFragment')||(_0x827100=new _0x147fef(_0x55b2a0['name'],{'vid_start':null===_0x2d2ebe?this['_revisionId']++:_0x2d2ebe++}));const _0x570a91=[];for(const _0x3e107e of _0x55b2a0['getChildren']())if(_0x3e107e['is']('element')){_0x570a91['push'](this['_makeIdsRoot'](_0x3e107e,_0x2d2ebe));const _0x471768=_0x570a91[_0x570a91['length']-0x1];null!==_0x2d2ebe&&(_0x2d2ebe=_0x471768['is']('element','$text')?_0x471768['getAttribute']('vid')+0x1:_0x471768['getAttribute']('vid_end')+0x1);}else{for(let _0x2f0b39=0x0;_0x2f0b39<_0x3e107e['offsetSize'];_0x2f0b39++)_0x570a91['push'](new _0x147fef('$text',{'vid':null===_0x2d2ebe?this['_revisionId']++:_0x2d2ebe++}));}if(_0x55b2a0['is']('documentFragment')){const _0x1cc4b8=Ot(_0x55b2a0['rootName'],_0x55b2a0['name']);return _0x1cc4b8['_insertChild'](0x0,_0x570a91),_0x1cc4b8;}return _0x827100['_setAttribute']('vid_end',null===_0x2d2ebe?this['_revisionId']++:_0x2d2ebe),_0x827100['_insertChild'](0x0,_0x570a91),_0x827100;}_calculateMetaData(_0xa8f301,_0x2afa42,_0x4b91cb){this['_reset']();const {roots:_0x139e9a,markers:_0x2d65ef,rootsAttributes:_0x31de18}=this['_savedMetaData']['get'](_0xa8f301);this['_baseRoots']=new Map(_0x139e9a),this['_baseRootsAttributes']=new Map(_0x36e7de(_0x31de18));for(const [_0x30dbc8,_0x3b2f8f]of this['_baseRoots'])if('$graveyard'!==_0x30dbc8&&(this['_diffRoots']['set'](_0x30dbc8,St(_0x3b2f8f)),this['_diffRootsAttributes']=new Map(_0x36e7de(_0x31de18)),_0x4b91cb)){const _0x380e20=this['_revisionId'];this['_idsRoots']['set'](_0x30dbc8,this['_makeIdsRoot'](_0x3b2f8f)),this['_baseIdsRoots']['set'](_0x30dbc8,this['_makeIdsRoot'](_0x3b2f8f,_0x380e20));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x4b91cb&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x149607,_0x4d0ad8]of _0x2d65ef){const _0x1d95c5=this['_baseRoots']['get'](_0x4d0ad8['rootName']),_0x17d3e8=this['_diffRoots']['get'](_0x4d0ad8['rootName']),_0x2949c0=new _0x2df2cd(_0x3015e(_0x4d0ad8['start'],_0x1d95c5),_0x3015e(_0x4d0ad8['end'],_0x1d95c5)),_0x17fd61=_0x293e27(_0x2949c0,_0x17d3e8);_0x1d95c5['markers']['set'](_0x149607,_0x2949c0),this['_markers']['set'](_0x149607,_0x17fd61);}this['_applyOperations'](_0xa8f301,_0x2afa42,_0x4b91cb);}_applyOperations(_0x3d9c6e,_0x3c18c3,_0x4c0698){for(const _0x36d7c6 of this['source']['getOperations'](_0x3d9c6e,_0x3c18c3))this['_handleOperation'](_0x36d7c6,_0x4c0698);for(const _0x23e7c5 of this['_diffRoots']['values']())_0x23e7c5['markers']['clear']();for(const [_0x443dad,_0x3e8113]of this['_markers'])this['_diffRoots']['get'](_0x3e8113['root']['rootName'])['markers']['set'](_0x443dad,_0x3e8113['clone']());const _0x2b06cc=new Map(),_0x3d954e=new Map();for(const [_0x58e9f3,_0x1e1f51]of this['_diffRoots'])_0x2b06cc['set'](_0x58e9f3,St(_0x1e1f51)),_0x3d954e['set'](_0x58e9f3,this['_diffRootsAttributes']['get'](_0x58e9f3));this['_saveMetaData'](_0x3c18c3,_0x2b06cc,this['_markers'],_0x3d954e);}_getPreviousFrom(_0xf458aa){const _0x3df2a6=Array['from'](this['_savedMetaData']['keys']());_0x3df2a6['sort']((_0x1349f3,_0x40fa52)=>_0x1349f3-_0x40fa52),_0x3df2a6['reverse']();for(const _0x3d84e5 of _0x3df2a6)if(_0x3d84e5<_0xf458aa)return _0x3d84e5;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x39133d,_0x2f1adc){const _0x4199d0=Array['from'](_0x2f1adc['markers'])['map'](([_0x4f6f75,_0x326459])=>[_0x4f6f75,_0x293e27(_0x326459,_0x39133d)]);_0x39133d['markers']=new Map(_0x4199d0);}_transformMarkers(_0xace305){for(const _0x1171e8 of this['_markers']['values']()){const _0x5bd896=_0x1171e8['getTransformedByOperation'](_0xace305),_0xb2c4ff=_0x2df2cd['_createFromRanges'](_0x5bd896);_0x1171e8['start']=_0xb2c4ff['start'],_0x1171e8['end']=_0xb2c4ff['end'];}}_handleOperation(_0x240c33,_0x225aaa){if('addRoot'!=_0x240c33['type']&&'detachRoot'!=_0x240c33['type']){if('insert'==_0x240c33['type']){const _0x276030=_0x240c33['position']['root'],_0x544a9d=_0x276030['rootName'],_0x29ba4a=_0x276030['name'];this['_diffRoots']['has'](_0x544a9d)||(this['_diffRoots']['set'](_0x544a9d,Ot(_0x544a9d,_0x29ba4a,!0x0)),this['_diffRootsAttributes']['set'](_0x544a9d,{}),_0x225aaa&&this['_idsRoots']['set'](_0x544a9d,Ot(_0x544a9d,_0x29ba4a,!0x0)));}else{if('addRootAttribute'==_0x240c33['type']||'removeRootAttribute'==_0x240c33['type']||'changeRootAttribute'==_0x240c33['type'])return void this['_handleRootAttributeOperation'](_0x240c33);'marker'==_0x240c33['type']&&this['_handleMarkerOperation'](_0x240c33);}if('marker'!==_0x240c33['type']){const _0x3bf69c=this['_cloneOperation'](_0x240c33,this['_diffRoots']);_0x3bf69c['_execute'](),this['_transformMarkers'](_0x3bf69c);}if(_0x225aaa)switch(_0x240c33['type']){case'insert':this['_handleInsertOperation'](_0x240c33);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x240c33);break;case'merge':this['_handleMergeOperation'](_0x240c33);break;case'split':this['_handleSplitOperation'](_0x240c33);}}else this['_handleRootOperation'](_0x240c33,_0x225aaa);}_cloneOperation(_0x5d2dc2,_0x371f48){const _0x13486e=_0x5d2dc2['clone']();return _0x13486e['_authorId']=_0x5d2dc2['_authorId'],_0x13486e['_aiSource']=_0x5d2dc2['_aiSource'],_0x13486e['baseVersion']=null,_0x10ad56(_0x13486e,_0x371f48),_0x13486e;}_getBaseVids(_0xda8246){return _0xda8246['map'](_0x46d182=>{const _0x7f358b=this['_getVidAttributeName'](_0x46d182);return Number(_0x46d182['item']['getAttribute'](_0x7f358b));});}_generateTape(_0x50396b,_0x49078d){if(_0x50396b['is']('element','$text'))_0x49078d['push']({'item':_0x50396b,'type':'text'});else{_0x50396b['is']('element')&&_0x49078d['push']({'item':_0x50396b,'type':'elementStart'});for(const _0x3a5da1 of _0x50396b['getChildren']())this['_generateTape'](_0x3a5da1,_0x49078d);_0x50396b['is']('element')&&_0x49078d['push']({'item':_0x50396b,'type':'elementEnd'});}return _0x49078d;}_getState(){const _0x33093e=new Map(this['_touched']),_0x560515=new Map(_0x33093e),_0x133ca6=new Map(),_0x5e160d={'insertions':{},'deletions':{}},_0x229325={'insertions':{},'deletions':{}},_0x4fef0a=new Map(),_0x15c5ab=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x595f98=new Map();_0x15c5ab['delete']('$graveyard');for(const _0x57b7f0 of _0x15c5ab){const _0x28a524=(this['_diffRoots']['get'](_0x57b7f0)??this['_baseRoots']['get'](_0x57b7f0))['name'],_0x3ccd3e=this['_diffRoots']['get'](_0x57b7f0)||Ot(_0x57b7f0,_0x28a524,!0x1),_0x4fb3f9=this['_baseRoots']['get'](_0x57b7f0)||Ot(_0x57b7f0,_0x28a524,!0x1);_0x3ccd3e['isAttached']()||_0x4fb3f9['isAttached']()?(_0x595f98['set'](_0x57b7f0,_0x28a524),_0x5e160d['insertions'][_0x57b7f0]=St(_0x3ccd3e),_0x5e160d['deletions'][_0x57b7f0]=St(_0x4fb3f9),this['_copyMarkers'](_0x5e160d['deletions'][_0x57b7f0],_0x4fb3f9),this['_copyMarkers'](_0x5e160d['insertions'][_0x57b7f0],_0x3ccd3e),_0x229325['insertions'][_0x57b7f0]=this['_generateTape'](this['_idsRoots']['get'](_0x57b7f0),[]),_0x229325['deletions'][_0x57b7f0]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x57b7f0)||Ot(_0x57b7f0,_0x28a524,!0x1),[])):_0x15c5ab['delete'](_0x57b7f0);}for(const _0x3814c6 of _0x15c5ab){const _0x13a33b=_0x229325['insertions'][_0x3814c6];for(const _0x28b1cd of _0x13a33b){const _0xe661cf=this['_getVidAttributeName'](_0x28b1cd),_0x53e8d0=_0x28b1cd['item']['getAttribute'](_0xe661cf);_0x560515['delete'](_0x53e8d0),_0x53e8d0>=this['_startingRevisionId']&&_0x133ca6['set'](_0x53e8d0,_0x33093e['get'](_0x53e8d0));}}for(const _0x1dd2f8 of _0x15c5ab){const _0x215ba5=_0x229325['insertions'][_0x1dd2f8],_0x2b1581=this['_getBaseVids'](_0x229325['deletions'][_0x1dd2f8]);let _0x395d91=0x0;for(const _0x2256f5 of _0x215ba5){const _0x530f8c=this['_getVidAttributeName'](_0x2256f5),_0x1b33d0=_0x2256f5['item']['getAttribute'](_0x530f8c);if(!_0x133ca6['has'](_0x1b33d0)&&!_0x4fef0a['has'](_0x1b33d0)){if(_0x560515['has'](_0x1b33d0))_0x395d91++;else{if(_0x1b33d0!=_0x2b1581[_0x395d91]){const _0x114990=_0x33093e['get'](_0x1b33d0)||_0x33093e['get'](_0x2b1581[_0x395d91]);for(;_0x1b33d0!=_0x2b1581[_0x395d91];)_0x560515['has'](_0x2b1581[_0x395d91])||(_0x4fef0a['set'](_0x2b1581[_0x395d91],_0x114990),_0x33093e['set'](_0x2b1581[_0x395d91],_0x114990)),_0x395d91++;}_0x395d91++;}}}}for(const _0x4195e8 of _0x15c5ab){const _0x189b92=_0x229325['insertions'][_0x4195e8];for(const _0x5c6438 of _0x189b92){const _0xaf09d7=this['_getVidAttributeName'](_0x5c6438),_0x456ae1=_0x5c6438['item']['getAttribute'](_0xaf09d7);if(_0x4fef0a['has'](_0x456ae1)){const _0x5889c8=_0x4fef0a['get'](_0x456ae1);_0x560515['has'](_0x456ae1)||_0x560515['set'](_0x456ae1,{..._0x5889c8}),_0x133ca6['set'](_0x456ae1,{..._0x5889c8});}}}for(const _0x155b2e of _0x560515['keys']())_0x155b2e>=this['_startingRevisionId']&&_0x560515['delete'](_0x155b2e);const _0x55da98=new Map();for(const _0x5f2850 of _0x15c5ab){let _0x22c178=_0x229325['insertions'][_0x5f2850];for(const _0x3532c5 of _0x22c178)if(_0x3532c5['item']['is']('element','tableCell')){const _0x3c2ce7=this['_getVidAttributeName'](_0x3532c5),_0xc85e43=_0x3532c5['item']['getAttribute'](_0x3c2ce7);if(_0x133ca6['has'](_0xc85e43)){const _0x4a8752=_0x3532c5['item']['parent']['parent']['getAttribute']('vid_start'),_0x304f89=_0x133ca6['get'](_0xc85e43),_0x1f77a6=_0x55da98['get'](_0x4a8752)||{'users':new Set(),'aiSource':null};_0x1f77a6['users']['add'](_0x304f89['userId']),_0x1f77a6['aiSource']=_0x1f77a6['aiSource']||_0x304f89['aiSource']||null,_0x55da98['set'](_0x4a8752,_0x1f77a6);}}_0x22c178=_0x229325['deletions'][_0x5f2850];for(const _0x369e02 of _0x22c178)if(_0x369e02['item']['is']('element','tableCell')){const _0x119512=this['_getVidAttributeName'](_0x369e02),_0x21445f=_0x369e02['item']['getAttribute'](_0x119512);if(_0x560515['has'](_0x21445f)){const _0xe70a54=_0x369e02['item']['parent']['parent']['getAttribute']('vid_start'),_0xfed34e=_0x560515['get'](_0x21445f),_0x5d2144=_0x55da98['get'](_0xe70a54)||{'users':new Set(),'aiSource':null};_0x5d2144['users']['add'](_0xfed34e['userId']),_0x5d2144['aiSource']=_0x5d2144['aiSource']||_0xfed34e['aiSource']||null,_0x55da98['set'](_0xe70a54,_0x5d2144);}}for(const _0x280d3f of _0x55da98['keys']())(_0x133ca6['has'](_0x280d3f)||_0x560515['has'](_0x280d3f))&&_0x55da98['delete'](_0x280d3f);}for(const _0x2fcb6f of _0x15c5ab){const _0x4ce626=_0x229325['insertions'][_0x2fcb6f];let _0x286249=null,_0x60d707=null,_0x56b7e6=null;for(const _0x2528af of _0x4ce626){const _0x2b6ae5=this['_getVidAttributeName'](_0x2528af),_0x4f962f=_0x2528af['item']['getAttribute'](_0x2b6ae5),_0x268a80=_0x55da98['get'](_0x4f962f);if(_0x268a80&&'elementStart'==_0x2528af['type']&&(_0x286249=Array['from'](_0x268a80['users'])[0x0],_0x60d707=_0x268a80['aiSource'],_0x56b7e6=_0x2528af['item']['getAttribute']('vid_end')),_0x286249){const _0x29b749=_0x60d707||_0x560515['get'](_0x4f962f)?.['aiSource']||null,_0x549fe9=_0x60d707||_0x133ca6['get'](_0x4f962f)?.['aiSource']||null;_0x560515['set'](_0x4f962f,{'userId':_0x286249,'aiSource':_0x29b749}),_0x133ca6['set'](_0x4f962f,{'userId':_0x286249,'aiSource':_0x549fe9});}_0x4f962f==_0x56b7e6&&(_0x286249=null,_0x56b7e6=null);}}const _0x44c98f={},_0x49c610=new Set();for(const _0x3357f8 of _0x15c5ab){const _0xb4d9=_0x5e160d['deletions'][_0x3357f8],_0x538d5b=_0x5e160d['insertions'][_0x3357f8];for(const {userId:_0x263d8f}of this['_touchedMarkers']['values']())null!==_0x263d8f&&_0x49c610['add'](_0x263d8f);for(const {userId:_0x4663b5}of this['_touchedRoots']['values']())null!==_0x4663b5&&_0x49c610['add'](_0x4663b5);const _0x452867={};this['_markChanges'](_0x538d5b,_0x229325['insertions'][_0x3357f8],_0x133ca6,'insertion',_0x49c610,_0x452867),this['_markChanges'](_0xb4d9,_0x229325['deletions'][_0x3357f8],_0x560515,'deletion',_0x49c610,_0x452867),this['_collectSuggestionAiSources'](_0x538d5b,_0x452867),this['_collectSuggestionAiSources'](_0xb4d9,_0x452867),_0x44c98f[_0x3357f8]={'insertions':this['_prepareViewToSave'](_0x538d5b),'deletions':this['_prepareViewToSave'](_0xb4d9),'attachChange':this['_touchedRoots']['get'](_0x3357f8)||null,'attributesBefore':_0x36e7de(this['_baseRootsAttributes']['get'](_0x3357f8))||{},'attributesAfter':_0x36e7de(this['_diffRootsAttributes']['get'](_0x3357f8)),'rootElementName':_0x595f98['get'](_0x3357f8),'aiSources':_0x452867};}const _0x4be864=Array['from'](_0x133ca6['values']())['some'](_0x388591=>!(!_0x388591||!_0x388591['aiSource']))||Array['from'](_0x560515['values']())['some'](_0x3b7f59=>!(!_0x3b7f59||!_0x3b7f59['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x5e0257=>this['_aiTouchedMarkers']['has'](_0x5e0257));return{'diffData':_0x44c98f,'authorsIds':Array['from'](_0x49c610),'hasAIChanges':_0x4be864};}_collectSuggestionAiSources(_0x3b48c1,_0x35eafa){const _0x44ab79=_0x3b48c1['markers'];for(const _0x56bfbd of _0x44ab79['keys']()){if(!_0x56bfbd['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x56bfbd))continue;const _0x11376f=this['_aiTouchedMarkers']['get'](_0x56bfbd);_0x11376f&&(_0x35eafa[_0x56bfbd]=_0x11376f);}}_processRootBeforeSave(_0x3c4550){for(const [,_0xf523c]of _0x3c4550['markers']){const _0xed24a0=_0xf523c['start']['getAncestors']()['filter'](_0x9fa2eb=>'tableCell'==_0x9fa2eb['name']);for(const _0x56eafa of _0xed24a0)0x1==_0x56eafa['childCount']&&_0x56eafa['getChild'](0x0)['is']('element','paragraph')&&_0x56eafa['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3d4b6c){this['_processRootBeforeSave'](_0x3d4b6c);const _0x1d94a5=this['editor']['data']['toView'](_0x3d4b6c,{}),_0x4071bc=Array['from'](_0x1d94a5['getChildren']())['map'](_0x30dfd1=>this['_getViewJson'](_0x30dfd1));return JSON['stringify'](_0x4071bc);}_getViewJson(_0x130794){if(_0x130794['is']('$text'))return _0x130794['data'];{const _0x113e70=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x18a206=_0x130794,_0xc801da=this['editor']['data']['htmlProcessor']['domConverter'],_0xa0efc5={'type':_0x113e70['_getTypeCharForViewElement'](_0x18a206),'name':_0x18a206['name'],'attributes':Array['from'](_0x18a206['getAttributes']()),'children':Array['from'](_0x18a206['getChildren']())['map'](_0x4121df=>this['_getViewJson'](_0x4121df))};if(_0x130794['is']('uiElement')&&'$comment'!=_0x130794['name']){const _0x1f7520=_0x130794['render'](_0xc801da['domDocument'],_0xc801da);_0xa0efc5['children']['push'](_0x1f7520['outerHTML']);}else{if(_0x130794['is']('rawElement')){const _0x3cbdaa=_0xc801da['domDocument']['createElement'](_0x18a206['name']);_0x130794['render'](_0x3cbdaa,_0xc801da),_0xa0efc5['children']['push'](_0x3cbdaa['innerHTML']);}}const _0x324eba=Array['from'](_0x18a206['getCustomProperties']());_0x324eba['length']>0x0&&(_0xa0efc5['customProperties']=_0x324eba);const _0x3760f4=_0x18a206['getFillerOffset']();return null!==_0x3760f4&&(_0xa0efc5['fillerOffset']=_0x3760f4),_0xa0efc5;}}['_markChanges'](_0xc756bc,_0x8d737c,_0x4ba3dc,_0xf2555b,_0x356ddb,_0x21ca52){let _0x8b5aa6=null,_0x1cb458=null,_0x4784f=0x0;const _0x244488=this['editor']['model'];for(let _0x4d5960=0x0;_0x4d5960<_0x8d737c['length'];_0x4d5960++){const _0x5f01a6=this['_getVidAttributeName'](_0x8d737c[_0x4d5960]),_0xca3cfd=_0x8d737c[_0x4d5960]['item']['getAttribute'](_0x5f01a6),_0x5df042=_0x4ba3dc['get'](_0xca3cfd),_0x2291c4=_0x4d5960==_0x8d737c['length']-0x1;!_0x8b5aa6&&_0x5df042&&(_0x8b5aa6=_0x5df042,_0x1cb458=_0x8d737c[_0x4d5960]);const _0x3b91e8=!!_0x8b5aa6&&!!_0x5df042&&_0x5df042['userId']!=_0x8b5aa6['userId'],_0x3e82e4=!!_0x8b5aa6&&!!_0x5df042&&_0x5df042['aiSource']!=_0x8b5aa6['aiSource'];_0x8b5aa6&&(!_0x5df042||_0x3b91e8||_0x3e82e4)&&(_0x457093(_0x5df042,Ct(_0x1cb458,_0xc756bc,_0x244488),Ct(_0x8d737c[_0x4d5960],_0xc756bc,_0x244488)),_0x8b5aa6=_0x5df042||null,_0x1cb458=_0x5df042?_0x8d737c[_0x4d5960]:null),_0x8b5aa6&&_0x2291c4&&_0x457093(_0x5df042,Ct(_0x1cb458,_0xc756bc,_0x244488),Nt(_0x8d737c[_0x4d5960],_0xc756bc,_0x244488));}function _0x457093(_0x5062c5,_0x35d578,_0xf2de3c){const _0x567f05=_0x8b5aa6['userId'],_0x2cf3e3=_0x8b5aa6['aiSource'],_0x2372b3='revision:'+_0xf2555b+':'+_0x567f05+':'+_0x4784f++,_0x4ab829=_0x244488['createRange'](_0x35d578,_0xf2de3c);_0xc756bc['markers']['set'](_0x2372b3,_0x4ab829),_0x2cf3e3&&(_0x21ca52[_0x2372b3]=_0x2cf3e3),null!==_0x567f05&&_0x356ddb['add'](_0x567f05);}}_getVidAttributeName(_0x347b9f){switch(_0x347b9f['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x2b88ce){const _0x3cd24a=this['_idsRoots']['get'](_0x2b88ce['position']['root']['rootName']),_0x5c80b7=_0x3015e(_0x2b88ce['position'],_0x3cd24a),_0x3fc3f2=null===_0x2b88ce['_authorId']?null:_0x2b88ce['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21bf8b=_0x2b88ce['_aiSource']||null,_0x2389d5=_0x5c80b7['parent'],_0x2c97db=this['_revisionId'],_0x485b1f=[];for(const _0x222cab of _0x2b88ce['nodes'])if(_0x222cab['is']('element'))_0x485b1f['push'](this['_makeIdsRoot'](_0x222cab));else{for(let _0x5a0ed4=0x0;_0x5a0ed4<_0x222cab['offsetSize'];_0x5a0ed4++)_0x485b1f['push'](new _0x147fef('$text',{'vid':this['_revisionId']++}));}const _0x46056b=this['_revisionId'];for(let _0x2e9799=_0x2c97db;_0x2e9799<_0x46056b;_0x2e9799++)this['_touched']['set'](_0x2e9799,{'userId':_0x3fc3f2,'aiSource':_0x21bf8b});_0x2389d5['_insertChild'](_0x5c80b7['offset'],_0x485b1f);}_setTouched(_0x644d86,_0xe77f4f,_0x40a8a7){this['_touched']['set'](_0x644d86,{'userId':_0xe77f4f,'aiSource':_0x40a8a7||this['_touched']['get'](_0x644d86)?.['aiSource']||null});}_handleMoveOperation(_0x4d04d0){(_0x4d04d0=this['_cloneOperation'](_0x4d04d0,this['_idsRoots']))['_execute']();const _0x144971=null===_0x4d04d0['_authorId']?null:_0x4d04d0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x55bc04=_0x4d04d0['_aiSource']||null,_0x40f5ca=_0x4d04d0['getMovedRangeStart'](),_0x3db123=_0x40f5ca['parent'],_0x34ae31=_0x40f5ca['offset'],_0x579a92=(_0x313632,_0x50351d,_0x128a37)=>{for(let _0x3cc383=_0x50351d;_0x3cc383<_0x128a37;_0x3cc383++){const _0x3e5608=_0x313632['getChild'](_0x3cc383);_0x3e5608['is']('element','$text')?this['_setTouched'](_0x3e5608['getAttribute']('vid'),_0x144971,_0x55bc04):(this['_setTouched'](_0x3e5608['getAttribute']('vid_start'),_0x144971,_0x55bc04),_0x579a92(_0x3e5608,0x0,_0x3e5608['childCount']),this['_setTouched'](_0x3e5608['getAttribute']('vid_end'),_0x144971,_0x55bc04));}};_0x579a92(_0x3db123,_0x34ae31,_0x34ae31+_0x4d04d0['howMany']);}_handleMergeOperation(_0x551dfb){const _0x5edfd9=null===(_0x551dfb=this['_cloneOperation'](_0x551dfb,this['_idsRoots']))['_authorId']?null:_0x551dfb['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2a93e1=_0x551dfb['_aiSource']||null,_0x1504ce=_0x551dfb['targetPosition']['parent'],_0xe6fd0=_0x551dfb['sourcePosition']['parent'],_0x4ee447=_0x1504ce['getAttribute']('vid_end'),_0x182fc2=_0xe6fd0['getAttribute']('vid_start');_0x1504ce['_setAttribute']('vid_end',_0xe6fd0['getAttribute']('vid_end')),_0xe6fd0['_setAttribute']('vid_end',_0x4ee447),this['_setTouched'](_0x182fc2,_0x5edfd9,_0x2a93e1),this['_setTouched'](_0x4ee447,_0x5edfd9,_0x2a93e1),_0x551dfb['_execute']();}_handleSplitOperation(_0x1117a4){const _0x1fbac0=null===(_0x1117a4=this['_cloneOperation'](_0x1117a4,this['_idsRoots']))['_authorId']?null:_0x1117a4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3ee910=_0x1117a4['_aiSource']||null,_0xe64e72=_0x1117a4['graveyardPosition'],_0x180069=_0x1117a4['splitPosition']['parent'];_0x1117a4['_execute']();const _0x480e21=_0x180069['getAttribute']('vid_end'),_0xd99321=_0x1117a4['insertionPosition']['nodeAfter'];if(_0xe64e72){const _0x2d9764=_0xd99321['getAttribute']('vid_end'),_0x2bdb9a=_0x180069['getAttribute']('vid_end');_0x180069['_setAttribute']('vid_end',_0x2d9764),_0xd99321['_setAttribute']('vid_end',_0x2bdb9a),this['_setTouched'](_0x180069['getAttribute']('vid_end'),_0x1fbac0,_0x3ee910),this['_setTouched'](_0xd99321['getAttribute']('vid_start'),_0x1fbac0,_0x3ee910);}else{const _0x2e9bb5=this['_revisionId']++,_0x112ce4=this['_revisionId']++;_0x180069['_setAttribute']('vid_end',_0x2e9bb5),_0xd99321['_setAttribute']('vid_start',_0x112ce4),_0xd99321['_setAttribute']('vid_end',_0x480e21),this['_setTouched'](_0x2e9bb5,_0x1fbac0,_0x3ee910),this['_setTouched'](_0x112ce4,_0x1fbac0,_0x3ee910);}}_handleMarkerOperation(_0x5d3633){if(!_0x5d3633['affectsData'])return;const _0x353b41=(_0x5d3633=this['_cloneOperation'](_0x5d3633,this['_diffRoots']))['oldRange']?_0x5d3633['oldRange']['root']:null,_0x46534e=_0x5d3633['newRange']?_0x5d3633['newRange']['root']:null;_0x353b41&&this['_markers']['delete'](_0x5d3633['name']),_0x46534e&&this['_markers']['set'](_0x5d3633['name'],_0x5d3633['newRange']['clone']());const _0x5ef61a=null===_0x5d3633['_authorId']?null:_0x5d3633['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1741ad=_0x5d3633['name'];if(_0x5d3633['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x1741ad,_0x5d3633['_aiSource']),!this['_touchedMarkers']['has'](_0x1741ad))return void this['_touchedMarkers']['set'](_0x1741ad,{'range':_0x5d3633['oldRange'],'userId':_0x5ef61a});const _0x326d86=this['_touchedMarkers']['get'](_0x1741ad),_0x3bf0da=_0x326d86['range'],_0x19542f=_0x5d3633['newRange'];null==_0x3bf0da&&null==_0x19542f||_0x3bf0da&&_0x19542f&&_0x3bf0da['isEqual'](_0x19542f)?this['_touchedMarkers']['delete'](_0x5d3633['name']):_0x326d86['userId']=_0x5ef61a;}_handleRootOperation(_0x9b3b73,_0x2e75c5){this['_diffRoots']['has'](_0x9b3b73['rootName'])?this['_diffRoots']['get'](_0x9b3b73['rootName'])['_isAttached']=_0x9b3b73['isAdd']:(this['_diffRoots']['set'](_0x9b3b73['rootName'],Ot(_0x9b3b73['rootName'],_0x9b3b73['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x9b3b73['rootName'],{}),_0x2e75c5&&this['_idsRoots']['set'](_0x9b3b73['rootName'],Ot(_0x9b3b73['rootName'],_0x9b3b73['elementName'],!0x0)));const _0x4c5ae1=null===_0x9b3b73['_authorId']?null:_0x9b3b73['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x33a4e4=this['_touchedRoots']['get'](_0x9b3b73['rootName']);_0x33a4e4&&_0x33a4e4['userId']===_0x4c5ae1?this['_touchedRoots']['delete'](_0x9b3b73['rootName']):this['_touchedRoots']['set'](_0x9b3b73['rootName'],{'userId':_0x4c5ae1,'isAttached':_0x9b3b73['isAdd']});}_handleRootAttributeOperation(_0x78341d){const _0x874cc8=this['_diffRootsAttributes']['get'](_0x78341d['root']['rootName']);null===_0x78341d['newValue']?delete _0x874cc8[_0x78341d['key']]:_0x874cc8[_0x78341d['key']]=_0x78341d['newValue'];}};function St(_0x55d79b){const _0x7ea90f=Ot(_0x55d79b['rootName'],_0x55d79b['name'],_0x55d79b['isAttached']());for(const _0x1c2685 of _0x55d79b['getChildren']()){const _0x23addb=_0x1c2685['_clone'](!0x0);_0x7ea90f['_appendChild'](_0x23addb);}return _0x7ea90f;}function Ot(_0x1b0cb8,_0x134d3c,_0x3fe4c9=!0x0){const _0x3d7b09=new _0x2b0661();return _0x3d7b09['rootName']=_0x1b0cb8,_0x3d7b09['name']=_0x134d3c,_0x3d7b09['_isAttached']=_0x3fe4c9,_0x3d7b09['isAttached']=()=>_0x3d7b09['_isAttached'],_0x3d7b09;}function Ct(_0xbc54dc,_0x372e0e,_0x1f080d){const _0x2b62a0='elementEnd'==_0xbc54dc['type']?_0x1f080d['createPositionAt'](_0xbc54dc['item'],'end'):_0x1f080d['createPositionBefore'](_0xbc54dc['item']);return _0x1f080d['createPositionFromPath'](_0x372e0e,_0x2b62a0['path'],_0x2b62a0['stickiness']);}function Nt(_0x228378,_0x19eaa7,_0x1fa578){const _0x1b4552='elementStart'==_0x228378['type']?_0x1fa578['createPositionAt'](_0x228378['item'],0x0):_0x1fa578['createPositionAfter'](_0x228378['item']);return _0x1fa578['createPositionFromPath'](_0x19eaa7,_0x1b4552['path'],_0x1b4552['stickiness']);}const xt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x398db6(ft);var Vt=class extends xt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x32fe2f,_0x3d2f4b){super(_0x32fe2f),this['focusTracker']=new _0x237823(),this['keystrokes']=new _0x326416(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3d2f4b),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'](),wt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x3f4a9e=_0x49ffd7=>_0x49ffd7['stopPropagation']();this['keystrokes']['set']('arrowright',_0x3f4a9e),this['keystrokes']['set']('arrowleft',_0x3f4a9e),this['keystrokes']['set']('arrowup',_0x3f4a9e),this['keystrokes']['set']('arrowdown',_0x3f4a9e);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x492197){this['revisionNameInputView']['fieldView']['element']['value']=_0x492197['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0xa340ac){const _0x7ad44=new st(this['locale'],mt),_0x68f4fb=_0x7ad44['fieldView'];_0x68f4fb['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x53e66a=At(this['locale'],'Name\x20of\x20the\x20revision');return!_0xa340ac&&(_0x53e66a+='\x20('+At(this['locale'],'optional')+')'),(_0x7ad44['label']=_0x53e66a,_0x68f4fb['on']('input',()=>{this['revisionNameInputValue']=_0x68f4fb['element']['value']['trim']();}),_0x7ad44);}},Dt=class extends _0x53e262{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Et];}['_saveRevisionFormView'];init(){const _0x152bd6=this['editor'],_0x54ba42=_0x152bd6['plugins']['get']('RevisionTracker');_0x152bd6['ui']['componentFactory']['add']('revisionHistory',_0x1bf740=>{const _0x76d17=gt(_0x1bf740),_0x5bc399=_0x76d17['panelView']['children'],_0x244e0f=new nt(_0x1bf740),_0xcb58ae=new et(_0x1bf740),_0x132db2=this['_createSaveRevisionButton'](_0x51332c),_0x3b8c1b=new et(_0x1bf740),_0xd987=this['_createOpenRevisionButton'](_0x51332c);return _0x76d17['bind']('isEnabled')['to'](_0x54ba42,'isReady',_0x54ba42,'isEnabled',_0x152bd6,'isReadOnly',(_0x277883,_0x4fdafa,_0x1e2937)=>_0x277883&&_0x4fdafa&&!_0x1e2937),_0x76d17['buttonView']['set']({'icon':_0x199aa8,'label':At(_0x1bf740,'Revision\x20history'),'tooltip':!0x0}),_0x132db2['set']({'withText':!0x0,'role':'menuitem'}),_0xd987['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0xd987,'execute',()=>{_0x76d17['isOpen']=!0x1,_0x152bd6['editing']['view']['focus']();},{'priority':'low'}),_0xcb58ae['children']['add'](_0x132db2),_0x3b8c1b['children']['add'](_0xd987),_0x244e0f['role']='menu',_0x244e0f['items']['addMany']([_0xcb58ae,_0x3b8c1b]),_0x5bc399['add'](_0x244e0f),_0x76d17;}),_0x152bd6['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x4e91b2=this['editor'],_0x38f220=_0x4e91b2['locale'],_0x42203d=_0x4e91b2['plugins']['get']('RevisionTracker'),_0x471be1=new ht(_0x38f220),_0x3561cf=new at(_0x38f220);_0x471be1['bind']('isEnabled')['to'](_0x42203d,'isReady',_0x42203d,'isEnabled',_0x4e91b2,'isReadOnly',(_0x25446e,_0x29a6dd,_0x133f6c)=>_0x25446e&&_0x29a6dd&&!_0x133f6c),_0x471be1['buttonView']['set']({'icon':_0x199aa8,'label':At(_0x38f220,'Revision\x20history')});const _0x4c6736=new rt(_0x38f220,_0x471be1),_0x586213=this['_createSaveRevisionButton'](ot);_0x586213['delegate']('execute')['to'](_0x471be1),_0x4c6736['children']['add'](_0x586213),_0x3561cf['items']['add'](_0x4c6736);const _0x446dde=new rt(_0x38f220,_0x471be1),_0x37e7b6=this['_createOpenRevisionButton'](ot);return _0x37e7b6['delegate']('execute')['to'](_0x471be1),_0x446dde['children']['add'](_0x37e7b6),_0x3561cf['items']['add'](_0x446dde),_0x471be1['panelView']['children']['add'](_0x3561cf),_0x471be1;}_createSaveRevisionButton(_0x49eb61){const _0x4819d7=this['editor'],_0x45638d=_0x4819d7['plugins']['get']('RevisionTracker'),_0x2ba23f=new _0x49eb61(_0x4819d7['locale']);return _0x2ba23f['set']({'label':At(_0x4819d7['locale'],'Save\x20current\x20revision')}),_0x2ba23f['bind']('isEnabled')['to'](_0x45638d,'isReady',_0x45638d,'isEnabled',_0x4819d7,'isReadOnly',(_0x4e774a,_0x4c1605,_0x3dac9b)=>_0x4e774a&&_0x4c1605&&!_0x3dac9b),this['listenTo'](_0x2ba23f,'execute',()=>{this['_showDialog']();}),_0x2ba23f;}_createOpenRevisionButton(_0x449072){const _0x2ccc64=this['editor'],_0x52600a=_0x2ccc64['plugins']['get']('RevisionTracker'),_0x377fa1=new _0x449072(_0x2ccc64['locale']);return _0x377fa1['set']({'label':At(_0x2ccc64['locale'],'Open\x20revision\x20history')}),_0x377fa1['bind']('isEnabled')['to'](_0x52600a,'isReady',_0x2ccc64,'isReadOnly',(_0x5baa9a,_0x1b6855)=>_0x5baa9a&&!_0x1b6855),this['listenTo'](_0x377fa1,'execute',()=>{_0x2ccc64['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x377fa1;}['_showDialog'](){const _0x2ae2e6=this['editor'],_0x27dec4=_0x2ae2e6['locale'],_0x338772=_0x2ae2e6['plugins']['get']('Dialog'),_0x60e9ed=_0x2ae2e6['plugins']['get']('RevisionTracker');function _0x1e3b82(_0x3d9169){_0x2ae2e6['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3d9169['revisionName']?_0x3d9169['revisionNameInputView']['errorText']=At(_0x27dec4,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2ae2e6['plugins']['get'](Et)['saveRevision']({'name':_0x3d9169['revisionName']}),_0x338772['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1e3b82(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x338772['show']({'id':'revisionSave','title':At(_0x27dec4,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':At(_0x2ae2e6['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x338772['hide']()},{'label':At(_0x2ae2e6['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x298403){_0x298403['bind']('isEnabled')['to'](_0x60e9ed,'isReady',_0x60e9ed,'isEnabled',_0x2ae2e6,'isReadOnly',(_0x2699bd,_0x55a1db,_0x4de8d5)=>_0x2699bd&&_0x55a1db&&!_0x4de8d5);},'onExecute':()=>_0x1e3b82(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x2fb6d1=this['editor'],_0x408e7a=_0x2fb6d1['locale'];this['_saveRevisionFormView']=new Vt(_0x408e7a,_0x2fb6d1['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Tt=class extends ft{['changeId'];['_model'];constructor(_0x5b4aa7,_0x100b1b,_0x28b31c=!0x1){super(_0x5b4aa7),this['_model']=_0x100b1b,this['changeId']=_0x100b1b['id'];const _0x6e369c=this['bindTemplate'],_0xda7b98=_0x28b31c&&!!_0x100b1b['data']['aiSource'],_0x3cf5c8=_0xda7b98?this['_createAiIconView'](_0x5b4aa7):null;this['set']('type',_0x100b1b['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x6e369c['to']('type',_0x2658f2=>'ck-revision-change__'+_0x2658f2),..._0xda7b98?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0xda7b98?[this['_createAiDescriptionView'](_0x5b4aa7,_0x100b1b),_0x3cf5c8]:this['_getDescriptionChildren'](_0x5b4aa7,_0x100b1b)}]});}_getDescriptionChildren(_0x12099f,_0x2a9479){let _0x59e569='Removed\x20by';return _0x2a9479['data']['isSuggestion']?_0x59e569='Suggested\x20by':'add'==_0x2a9479['type']&&(_0x59e569='Added\x20by'),[this['_createLabel'](At(_0x12099f,_0x59e569)),{'text':'\x20'+_0x2a9479['author']['name']}];}_createAiDescriptionView(_0x3df934,_0x395c8d){let _0x5f4f31='AI_SOURCE_REMOVED_BY';_0x395c8d['data']['isSuggestion']?_0x5f4f31='AI_SOURCE_SUGGESTED_BY':'add'==_0x395c8d['type']&&(_0x5f4f31='AI_SOURCE_ADDED_BY');const _0xafa5cc=new ft(_0x3df934);return _0xafa5cc['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0xafa5cc['render'](),_0xafa5cc['element']['innerHTML']=_0x58af3e(At(_0x3df934,_0x5f4f31,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+At(_0x3df934,'AI_SOURCE_AI')+'</span>'])),_0xafa5cc['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x395c8d['author']['name'],_0xafa5cc;}_createLabel(_0x38fde0){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x38fde0}]};}_createAiIconView(_0x3729d0){const _0x1e2ea6=new tt();return _0x1e2ea6['content']=_0x346d16,_0x1e2ea6['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':At(_0x3729d0,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x1e2ea6;}['focus'](){this['element']['focus']();}};const Mt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x38bfb6();var Ht=class extends Mt{['id'];author;type;data;rootName;constructor(_0x4974d1){super(),this['id']=_0x4974d1['id']||_0x45072e(),this['author']=_0x4974d1['author'],this['type']=_0x4974d1['type'],this['data']=_0x4974d1['data']||{},this['rootName']=_0x4974d1['rootName'],this['set']('createdAt',_0x4974d1['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Pt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x131e3a,_0x3f3db6){this['newRevisionId']=_0x131e3a,this['oldRevisionId']=_0x3f3db6,this['changes']=new _0x45c016();}_setChanges(_0xaa24ba){for(const _0x537432 of _0xaa24ba)this['changes']['add'](_0x537432);}},Ut=class extends _0x53e262{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x9e6c40,_0x344da2,Rt,kt];}constructor(_0x1a41df){super(_0x1a41df),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',(_0x2d30af,_0x3423af,_0x51cb18)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4190e8=>{for(const _0x34b22b of this['editor']['editing']['view']['document']['roots'])_0x51cb18?_0x4190e8['removeClass']('ck-editor__editable__overlay',_0x34b22b):_0x4190e8['addClass']('ck-editor__editable__overlay',_0x34b22b);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1702fe=>null!==_0x1702fe),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x19c9b0,_0x122845,_0xbe642f)=>_0x19c9b0&&_0xbe642f?_0x122845['changes']['getIndex'](_0xbe642f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x5d73a2,_0x1168f4)=>_0x5d73a2?_0x1168f4['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x344da2),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x2a90ed=this['editor'],_0x2c4a08=new $t(_0x2a90ed,{'direction':'backward'}),_0x30c29a=new $t(_0x2a90ed,{'direction':'forward'});_0x2a90ed['commands']['add']('showPreviousChange',_0x2c4a08),_0x2a90ed['commands']['add']('showNextChange',_0x30c29a),_0x2a90ed['commands']['add']('restoreRevision',new Ft(_0x2a90ed)),this['on']('change:numberOfChanges',()=>{_0x2c4a08['refresh'](),_0x30c29a['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2a90ed['enableReadOnlyMode']('revision-viewer'),_0x2a90ed['plugins']['has']('WidgetToolbarRepository')&&_0x2a90ed['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x166f93){return await this['_utils']['loadRevisionData'](_0x166f93,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x166f93);}async getRevisionRootsAttributes(_0x48bf7e){return await this['_utils']['loadRevisionData'](_0x48bf7e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x48bf7e);}async['compare'](_0x34bb63,_0xc5efde,_0x5725eb=!0x1){if(!this['isEnabled'])return;const _0x36d939=this['diff'],_0x1b6905=this['repository'],_0x3b60b4='string'==typeof _0x34bb63?_0x1b6905['getRevision'](_0x34bb63):_0x34bb63,_0xe1620a='string'==typeof _0xc5efde?_0x1b6905['getRevision'](_0xc5efde):_0xc5efde,_0x3e7dd1=_0x3b60b4['id'],_0x24d35f=_0xe1620a?_0xe1620a['id']:null;if(!_0x5725eb&&this['diff']&&this['diff']['newRevisionId']===_0x3e7dd1&&this['diff']['oldRevisionId']===_0x24d35f)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Pt(_0x3e7dd1,_0x24d35f);const _0x27b004=this['_getRevisionsRange'](_0x3b60b4,_0xe1620a,!0x0)['map'](_0x93afc=>this['_utils']['loadRevisionData'](_0x93afc,this['adapter']));return _0x27b004['push'](new Promise(_0xdf8ad0=>{setTimeout(_0xdf8ad0,0x14);})),Promise['all'](_0x27b004)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x365ed5=this['_getDiff'](_0x3e7dd1,_0x24d35f);this['_cleanUpCommentMarkers'](_0x365ed5);for(const _0x4f6c26 of _0x365ed5['changes'])this['_changeIdToChange']['set'](_0x4f6c26['id'],_0x4f6c26);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x17cf74=>{for(const _0x592077 of this['editor']['model']['document']['getRootNames']())_0x17cf74['detachRoot'](_0x592077);for(const _0x39840c of Object['keys'](_0x365ed5['model'])){const _0x427eb8=_0x365ed5['model'][_0x39840c]['name'],_0x42cfb0=_0x17cf74['addRoot'](_0x39840c,_0x427eb8);for(const _0x3edcb4 of Object['keys'](_0x365ed5['attributes'][_0x39840c]))_0x17cf74['setAttribute'](_0x3edcb4,_0x365ed5['attributes'][_0x39840c][_0x3edcb4],_0x42cfb0);_0x17cf74['insert'](_0x365ed5['model'][_0x39840c],_0x42cfb0,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x365ed5['changes'])),this['isReady']=!0x0;})['catch'](_0x4d6098=>{console['error'](_0x4d6098),this['_cleanUp'](),_0x36d939&&(this['diff']=_0x36d939),this['isReady']=!0x0;});}addRevisionData(_0x39b6a8,_0x3c2110){const _0x5f1709=this['repository']['createRevision'](_0x39b6a8);return _0x5f1709['on']('_update',(_0x5589a6,_0x1bf9d7,_0x4336a3)=>_0x3c2110(_0x1bf9d7,_0x4336a3,_0x5f1709)),this['repository']['addRevision'](_0x5f1709),_0x5f1709;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5e2d85=>{for(const _0x1887de of this['editor']['model']['document']['getRootNames']())_0x5e2d85['detachRoot'](_0x1887de);});}_cleanUpCommentMarkers(_0x517c97){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0xf1f55f=this['_getVisibleCommentThreadIds']();for(const _0x394e8c of Object['values'](_0x517c97['model']))for(const _0xe0f09f of Array['from'](_0x394e8c['markers']['keys']()))_0xe0f09f['startsWith']('revision-comment:')&&!_0xf1f55f['has'](Lt(_0xe0f09f))&&_0x394e8c['markers']['delete'](_0xe0f09f);}_sortAndFilterDiffChanges(_0x78e8f1){const _0xb54a32=[],_0x3cbaf0=new Map();for(const _0x109eff of this['editor']['model']['document']['getRootNames']()){const _0x2d6ea7=this['editor']['editing']['view']['getDomRoot'](_0x109eff);if(!_0x2d6ea7)continue;const _0x562116=_0x2d6ea7['getClientRects']()['item'](0x0);_0x562116&&(_0xb54a32['push'](_0x109eff),_0x3cbaf0['set'](_0x109eff,_0x562116));}return _0xb54a32['sort']((_0x3239e9,_0x4273ba)=>{const _0x2c9c12=_0x3cbaf0['get'](_0x3239e9),_0x16d428=_0x3cbaf0['get'](_0x4273ba);return _0x2c9c12['y']-_0x16d428['y']||_0x2c9c12['x']-_0x16d428['x'];}),(_0x78e8f1=_0x78e8f1['filter'](_0x40af67=>_0xb54a32['includes'](_0x40af67['rootName'])))['sort']((_0x539bee,_0x2c1e89)=>_0xb54a32['indexOf'](_0x539bee['rootName'])-_0xb54a32['indexOf'](_0x2c1e89['rootName'])),_0x78e8f1;}['_makeTape'](_0x3b2566,_0x35c7ec={}){const _0x236b89=Array['from'](_0x3b2566['markers'])['filter'](([_0x3bc28b,_0x2b023e])=>_0x3bc28b['startsWith']('revision:')&&!_0x2b023e['isCollapsed']),_0x2b393d=Array['from'](this['editor']['model']['createRangeIn'](_0x3b2566)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x236b89['length'])for(const _0x446be2 of _0x2b393d){const [_0x1200be,_0x552de7]=_0x236b89[0x0],[,_0x23b1c6,_0x56af9a]=_0x1200be['split'](':'),_0x3b48db=_0x35c7ec[_0x1200be]||null;if(_0x552de7['end']['isEqual'](_0x446be2['nextPosition'])&&_0x236b89['shift'](),(_0x446be2['previousPosition']['isEqual'](_0x552de7['start'])||_0x446be2['previousPosition']['isAfter'](_0x552de7['start']))&&('insertion'==_0x23b1c6?_0x446be2['isAdded']={'userId':_0x56af9a,'aiSource':_0x3b48db}:'deletion'==_0x23b1c6&&(_0x446be2['isRemoved']={'userId':_0x56af9a,'aiSource':_0x3b48db})),0x0==_0x236b89['length'])break;}return _0x2b393d;}_refreshStartEndIndex(_0x2dc2c2){const _0x56bb0e=new Map();for(let _0x1a04cf=0x0;_0x1a04cf<_0x2dc2c2['length'];_0x1a04cf++)'text'===_0x2dc2c2[_0x1a04cf]['type']?(_0x2dc2c2[_0x1a04cf]['item']['startIndex']=_0x1a04cf,_0x2dc2c2[_0x1a04cf]['item']['endIndex']=_0x1a04cf):('elementStart'===_0x2dc2c2[_0x1a04cf]['type']?_0x2dc2c2[_0x1a04cf]['item']['startIndex']=_0x1a04cf:'elementEnd'===_0x2dc2c2[_0x1a04cf]['type']&&(_0x2dc2c2[_0x1a04cf]['item']['endIndex']=_0x1a04cf),_0x56bb0e['set'](_0x2dc2c2[_0x1a04cf]['id'],_0x1a04cf));for(const _0x218209 of _0x56bb0e['values']())'elementStart'===_0x2dc2c2[_0x218209]['type']?_0x2dc2c2[_0x218209]['item']['endIndex']=_0x56bb0e['get'](_0x2dc2c2[_0x218209]['pairId']):'elementEnd'===_0x2dc2c2[_0x218209]['type']&&(_0x2dc2c2[_0x218209]['item']['startIndex']=_0x56bb0e['get'](_0x2dc2c2[_0x218209]['pairId']));}['_processTape'](_0x483e6a){for(let _0x301406=0x0;_0x301406<_0x483e6a['length'];_0x301406++){if('elementStart'===_0x483e6a[_0x301406]['type'])_0x483e6a[_0x301406]['item']['startIndex']=_0x301406;else{if('elementEnd'===_0x483e6a[_0x301406]['type']){_0x483e6a[_0x301406]['item']['endIndex']=_0x301406;const _0x316479=_0x483e6a[_0x301406]['item']['startIndex'];_0x483e6a[_0x316479]['pairId']=_0x483e6a[_0x301406]['id'],_0x483e6a[_0x301406]['pairId']=_0x483e6a[_0x316479]['id'];}else _0x483e6a[_0x301406]['item']['startIndex']=_0x301406,_0x483e6a[_0x301406]['item']['endIndex']=_0x301406,_0x483e6a[_0x301406]['pairId']=null;}_0x483e6a[_0x301406]['markersStart']||(_0x483e6a[_0x301406]['markersStart']=[],_0x483e6a[_0x301406]['markersEnd']=[]);}}_markInsertions(_0x5b3ae3,_0x24351b){const _0xfc93e6=_0x5b3ae3['filter'](_0x5a20ae=>!_0x5a20ae['isAdded']);for(let _0x3c65d2=0x0;_0x3c65d2<_0x24351b['length'];_0x3c65d2++)_0x24351b[_0x3c65d2]['isAdded']&&(_0xfc93e6[_0x3c65d2]['isAdded']=_0x24351b[_0x3c65d2]['isAdded']);}_getDiff(_0x5197ae,_0x56e075=null){const _0x4626ba=this['repository']['getRevision'](_0x5197ae),_0x33aa63=_0x56e075?this['repository']['getRevision'](_0x56e075):null,_0x552780=this['_getRevisionsRange'](_0x4626ba,_0x33aa63),_0x1e6e05=_0x552780[_0x552780['length']-0x1],_0x5b9447=new Map(),_0x401d60={'model':{},'attributes':{},'changes':[]},_0x141c94=new Set(),_0x3df094=new Map();for(let _0x330f90=_0x552780['length']-0x1;_0x330f90>=0x0;_0x330f90--){const _0x90f2cc=_0x552780[_0x330f90];for(const _0x17830d of Object['keys'](_0x90f2cc['diffData']))if(_0x90f2cc['diffData'][_0x17830d]['attachChange']){const _0xa4a2aa=_0x90f2cc['diffData'][_0x17830d]['attachChange'];_0xa4a2aa['isAttached']?(_0x141c94['add'](_0x17830d),_0x3df094['has'](_0x17830d)&&_0x3df094['get'](_0x17830d)['userId']==_0xa4a2aa['userId']?_0x3df094['delete'](_0x17830d):_0x3df094['set'](_0x17830d,_0xa4a2aa)):_0x3df094['has'](_0x17830d)?(_0x141c94['delete'](_0x17830d),_0x3df094['delete'](_0x17830d)):(_0x141c94['add'](_0x17830d),_0x3df094['set'](_0x17830d,_0xa4a2aa));}else _0x141c94['add'](_0x17830d);}for(const _0x3f64d0 of _0x141c94){const _0x44d7d8=_0x3df094['has'](_0x3f64d0)&&!_0x3df094['get'](_0x3f64d0)['isAttached'];let _0x56ea65=_0x44d7d8?_0x552780['length']-0x1:0x0;const _0x33886b=_0x44d7d8?-0x1:0x1;for(;_0x552780[_0x56ea65];){const _0x59c4fe=_0x552780[_0x56ea65];if(_0x59c4fe['diffData'][_0x3f64d0]){const _0x305975=_0x44d7d8?_0x59c4fe['diffData'][_0x3f64d0]['attributesBefore']:_0x59c4fe['diffData'][_0x3f64d0]['attributesAfter'];_0x401d60['attributes'][_0x3f64d0]=_0x305975?_0x36e7de(_0x305975):{};break;}_0x56ea65+=_0x33886b;}}for(const _0x267876 of _0x552780){_0x267876['model']={};for(const _0x21f26d of _0x267876['authors'])_0x5b9447['set'](_0x21f26d['id'],_0x21f26d);for(const _0x5365aa of _0x141c94){const _0x164dda=_0x267876['diffData'][_0x5365aa]?_0x267876['diffData'][_0x5365aa]['insertions']:'[]',_0x4f1015=_0x267876['diffData'][_0x5365aa]?_0x267876['diffData'][_0x5365aa]['deletions']:'[]',_0x35f796=_0x267876['diffData'][_0x5365aa]?.['rootElementName']||'$root';_0x267876['model'][_0x5365aa]={'insertions':this['_utils']['_makeModelFromViewString'](_0x164dda,_0x35f796),'deletions':this['_utils']['_makeModelFromViewString'](_0x4f1015,_0x35f796)};}}for(const _0x47958d of _0x141c94){let _0x4bf351=null,_0x5f3ce7=0x0;const _0x1d8ed7=_0x552780['map'](_0x131f69=>_0x131f69['diffData'][_0x47958d]?.['rootElementName'])['find'](_0x52aab8=>void 0x0!==_0x52aab8)||'$root',_0x4dfb7f=new Map(Array['from'](_0x4626ba['model'][_0x47958d]['insertions']['markers'])['filter'](([_0x29a1be])=>!_0x29a1be['startsWith']('revision:')));let _0x1931b0=0x0;for(const _0x378389 of _0x552780){const _0x4c22ca=_0x378389['diffData'][_0x47958d]?.['aiSources']||{},_0x86da23=this['_makeTape'](_0x378389['model'][_0x47958d]['insertions'],_0x4c22ca);_0x378389==_0x4626ba?(_0x4bf351=_0x86da23,_0x5f3ce7=_0x4bf351['length'],_0x4bf351['forEach'](_0x3360b1=>{_0x3360b1['id']=_0x1931b0++;}),this['_processTape'](_0x4bf351)):this['_markInsertions'](_0x4bf351,_0x86da23);const _0x517278=_0x4bf351['filter'](_0x118c62=>!_0x118c62['isAdded'])['map'](_0x74b651=>_0x74b651['id']);let _0x1e24fb=0x0;const _0xe4276d=this['_makeTape'](_0x378389['model'][_0x47958d]['deletions'],_0x4c22ca);_0xe4276d['forEach'](_0x4c6cde=>{_0x4c6cde['isRemoved']?_0x4c6cde['id']=_0x5f3ce7++:_0x4c6cde['id']=_0x517278[_0x1e24fb++];}),this['_processTape'](_0xe4276d),this['_setDistance'](_0x4bf351,'isAdded'),this['_setDistance'](_0xe4276d,'isRemoved'),_0x378389==_0x4626ba&&this['_markMarkers'](_0x4bf351,_0x4dfb7f),_0x4bf351=this['_joinTapes'](_0x4bf351,_0xe4276d),this['_refreshStartEndIndex'](_0x4bf351),this['_setDistance'](_0x4bf351,'isRemoved');}_0x4bf351=_0x4bf351['filter'](_0x43cea7=>!(_0x43cea7['isAdded']&&_0x43cea7['isRemoved']));const _0x2f55e5=new Map(_0x1e6e05['model'][_0x47958d]['deletions']['markers']),_0x328749=new Set(_0x4dfb7f['keys']());for(const _0x5f1950 of _0x2f55e5['keys']())_0x328749['delete'](_0x5f1950);const _0x2e7501=Object['assign']({},..._0x552780['map'](_0x188c0a=>_0x188c0a['diffData'][_0x47958d]?.['aiSources']));this['_markSuggestions'](_0x4bf351,_0x328749,_0x2e7501),this['_fixObsoleteTags'](_0x4bf351),_0x4bf351=this['_removeMissingPairs'](_0x4bf351),_0x4bf351=this['_markMismatchedRemovedTags'](_0x4bf351),_0x4bf351=this['_removeUnsupportedChanges'](_0x4bf351);const {root:_0x121dd2,changes:_0xb3f150}=this['_makeModelFromTape'](_0x4bf351,_0x5b9447,_0x47958d,_0x1d8ed7);_0x401d60['model'][_0x47958d]=_0x121dd2;const _0x1e95c5=_0x3df094['get'](_0x47958d);if(_0x1e95c5){const _0xd6c62f=_0x5b9447['get'](_0x1e95c5['userId']),_0x59f3a1=new Ht({'author':_0xd6c62f,'type':_0x1e95c5['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x47958d});_0xb3f150['unshift'](_0x59f3a1),_0x401d60['attributes'][_0x47958d]['revisionHistoryAttachChange']=_0x59f3a1['id'];}_0x401d60['changes']=_0x401d60['changes']['concat'](_0xb3f150);}return _0x401d60;}['_markMarkers'](_0x1c503f,_0x3a0015){for(let _0x5a3f5e=0x0;_0x5a3f5e<_0x1c503f['length'];_0x5a3f5e++)for(const [_0x2f11ef,_0x2c24eb]of _0x3a0015)!_0x2c24eb['isCollapsed']&&_0x2c24eb['start']['isEqual'](_0x1c503f[_0x5a3f5e]['previousPosition'])&&_0x1c503f[_0x5a3f5e]['markersStart']['push'](_0x2f11ef),_0x2c24eb['end']['isEqual'](_0x1c503f[_0x5a3f5e]['nextPosition'])&&_0x1c503f[_0x5a3f5e]['markersEnd']['push'](_0x2f11ef);}['_joinTapes'](_0xf23c82,_0x1208a1){let _0x115ba5=[],_0x2b295c=0x0,_0x50a140=0x0;for(;_0x2b295c<_0xf23c82['length']||_0x50a140<_0x1208a1['length'];){const _0x29ae3d=_0xf23c82[_0x2b295c]||{},_0x122932=_0x1208a1[_0x50a140]||{};if(_0x29ae3d['id']==_0x122932['id'])_0x2b295c++,_0x50a140++,_0x115ba5['push'](_0x29ae3d);else{if(_0x122932['isRemoved']&&_0x29ae3d['isAdded']){const {commonTape:_0x4688dc,iEnd:_0x3e8f90,jEnd:_0x349572}=this['_threeWayMerge'](_0xf23c82,_0x2b295c,_0x1208a1,_0x50a140);_0x115ba5=_0x115ba5['concat'](_0x4688dc),_0x2b295c=_0x3e8f90,_0x50a140=_0x349572;}else _0x122932['isRemoved']?(_0x50a140++,_0x115ba5['push'](_0x122932)):(_0x2b295c++,_0x115ba5['push'](_0x29ae3d));}}return _0x115ba5;}_markSuggestions(_0xff6fae,_0x5c81f5,_0x5decc9){const _0x15106d=[];for(let _0x322a8e=0x0;_0x322a8e<_0xff6fae['length'];_0x322a8e++){for(let _0x11898d=0x0;_0x11898d<_0xff6fae[_0x322a8e]['markersStart']['length'];_0x11898d++){const _0x22bb00=_0xff6fae[_0x322a8e]['markersStart'][_0x11898d];if(!_0x5c81f5['has'](_0x22bb00))continue;const {group:_0x4d813f,type:_0x3088c9,authorId:_0x22edf8}=_0x35e84b(_0x22bb00);if('revision-suggestion'!=_0x4d813f||'insertion'!=_0x3088c9&&'deletion'!=_0x3088c9)continue;const _0x3ec8ae=_0x5decc9['suggestion:'+_0x22bb00['slice'](0x14)]||null;_0x15106d['unshift']({'type':_0x3088c9,'name':_0x22bb00,'userId':_0x22edf8,'aiSource':_0x3ec8ae}),_0xff6fae[_0x322a8e]['markersStart']['splice'](_0x11898d,0x1),_0x11898d--;}_0x115768(_0xff6fae[_0x322a8e]);for(let _0x2d871a=0x0;_0x2d871a<_0xff6fae[_0x322a8e]['markersEnd']['length'];_0x2d871a++){const _0x3a2af4=_0xff6fae[_0x322a8e]['markersEnd'][_0x2d871a];if(!_0x5c81f5['has'](_0x3a2af4))continue;const {group:_0x356f21,type:_0x54c3d1}=_0x35e84b(_0x3a2af4);if('revision-suggestion'!=_0x356f21||'insertion'!=_0x54c3d1&&'deletion'!=_0x54c3d1)continue;_0xff6fae[_0x322a8e]['markersEnd']['splice'](_0x2d871a,0x1),_0x2d871a--;const _0x365b80=_0x15106d['findIndex'](_0x7f5c49=>_0x7f5c49['name']==_0x3a2af4);_0x365b80>-0x1&&_0x15106d['splice'](_0x365b80,0x1);}}function _0x35e84b(_0x3a0164){const _0x12c357=_0x3a0164['split'](':');return{'group':_0x12c357[0x0],'type':_0x12c357[0x1],'subType':_0x12c357['length']>=0x5?_0x12c357[0x2]:null,'id':_0x12c357['length']<0x5?_0x12c357[0x2]:_0x12c357[0x3],'authorId':_0x12c357['length']<0x5?_0x12c357[0x3]:_0x12c357[0x4],'markerCount':0x6==_0x12c357['length']?_0x12c357[0x5]:null};}function _0x115768(_0x21585e){for(let _0x52024f=0x0;_0x52024f<_0x15106d['length'];_0x52024f++){if(_0x21585e['isAdded']&&'insertion'==_0x15106d[_0x52024f]['type']&&_0x21585e['isAdded']['userId']==_0x15106d[_0x52024f]['userId'])return _0x21585e['isAddSuggestion']={..._0x15106d[_0x52024f],'aiSource':_0x21585e['isAdded']['aiSource']||_0x15106d[_0x52024f]['aiSource']},void delete _0x21585e['isAdded'];if(!_0x21585e['isAdded']&&!_0x21585e['isRemoved']&&'deletion'==_0x15106d[_0x52024f]['type'])return void(_0x21585e['isRemoveSuggestion']=_0x15106d[_0x52024f]);}}}_setDistance(_0xb778fa,_0x7539da){let _0x5b42d6=0x0,_0x39b1ff=!0x1;const _0x51c2c6=new Map();for(const _0x1018e9 of _0xb778fa)_0x1018e9[_0x7539da]?_0x39b1ff&&(_0x5b42d6++,_0x39b1ff=!0x1):(_0x5b42d6++,_0x39b1ff=!0x0),_0x51c2c6['set'](_0x1018e9['id'],_0x5b42d6);for(let _0x34bdf2=0x0;_0x34bdf2<_0xb778fa['length'];_0x34bdf2++){if('isRemoved'==_0x7539da&&_0xb778fa[_0x34bdf2]['isAdded']||'isAdded'==_0x7539da&&_0xb778fa[_0x34bdf2]['isRemoved'])continue;if('text'==_0xb778fa[_0x34bdf2]['type']){_0xb778fa[_0x34bdf2]['distance']=0x0;continue;}const _0x54afbe=_0x51c2c6['get'](_0xb778fa[_0x34bdf2]['pairId']),_0x14d7fa=_0x51c2c6['get'](_0xb778fa[_0x34bdf2]['id']);_0xb778fa[_0x34bdf2]['distance']=_0x54afbe-_0x14d7fa;}}_getRevisionsRange(_0x5ee64a,_0x428c51,_0x3adfc5=!0x1){const _0x43d5f=[];let _0x2e8c2f=this['repository']['getIndex'](_0x5ee64a),_0x52a801=this['repository']['getIndex'](_0x428c51);for(-0x1==_0x52a801&&(_0x52a801=this['repository']['_revisions']['length'],_0x3adfc5=!0x1);_0x2e8c2f<_0x52a801;)_0x43d5f['push'](this['repository']['getRevision'](_0x2e8c2f)),_0x2e8c2f++;return _0x3adfc5&&_0x43d5f['push'](this['repository']['getRevision'](_0x2e8c2f)),_0x43d5f;}_threeWayMerge(_0x4f42eb,_0x347e21,_0x4829e9,_0x179bd5){const _0x4aff25=this['editor']['model']['schema'];let _0xb70baf=_0x347e21;for(;_0x4f42eb[_0xb70baf]&&_0x4f42eb[_0xb70baf]['isAdded'];)_0xb70baf++;let _0x252a86=_0x179bd5;for(;_0x4829e9[_0x252a86]&&_0x4829e9[_0x252a86]['isRemoved'];)_0x252a86++;_0x1aa472(_0x4f42eb,_0x347e21,_0xb70baf),_0x1aa472(_0x4829e9,_0x179bd5,_0x252a86);const _0x1030f5=_0x4829e9['slice'](_0x179bd5,_0x252a86)['concat'](_0x4f42eb['slice'](_0x347e21,_0xb70baf));return _0x1030f5['sort']((_0x2881e3,_0x2735e2)=>_0x2881e3['side']!=_0x2735e2['side']?_0x2881e3['side']-_0x2735e2['side']:_0x2881e3['level']!=_0x2735e2['level']?_0x2881e3['level']-_0x2735e2['level']:_0x2881e3['distance']!=_0x2735e2['distance']?_0x2735e2['distance']-_0x2881e3['distance']:!!_0x2881e3['isAdded']!=!!_0x2735e2['isAdded']?-0x1==_0x2881e3['side']||0x0==_0x2881e3['side']?_0x2881e3['isAdded']?-0x1:0x1:_0x2881e3['isAdded']?0x1:-0x1:_0x2881e3['index']-_0x2735e2['index']),{'commonTape':_0x1030f5,'iEnd':_0xb70baf,'jEnd':_0x252a86};function _0x1aa472(_0x486953,_0x40534d,_0x41fe24){let _0x1f2839=-0x1,_0x5039e0=Number['POSITIVE_INFINITY'],_0x1375a5=!0x0;for(let _0x21a188=_0x40534d;_0x21a188<_0x41fe24;_0x21a188++)if(_0x4aff25['isInline'](_0x486953[_0x21a188]['item'])||(_0x1375a5=!0x1),_0x486953[_0x21a188]['item']['startIndex']<_0x40534d&&(_0x1f2839=_0x21a188),_0x486953[_0x21a188]['item']['endIndex']>=_0x41fe24){_0x5039e0=_0x21a188;break;}_0x1375a5&&(_0x1f2839=_0x41fe24-0x1);for(let _0x47c0a0=_0x40534d;_0x47c0a0<_0x41fe24;_0x47c0a0++)_0x486953[_0x47c0a0]['side']=_0x47c0a0<=_0x1f2839?-0x1:_0x47c0a0<_0x5039e0?0x0:0x1,_0x486953[_0x47c0a0]['index']=_0x47c0a0;let _0x5efe53=0x0;for(let _0x38550b=_0x40534d;_0x38550b<=_0x1f2839;_0x38550b++)0x0==_0x486953[_0x38550b]['distance']?_0x486953[_0x38550b]['level']=_0x5efe53:(_0x5efe53++,_0x486953[_0x38550b]['level']=_0x5efe53,_0x5efe53++);for(let _0x2652e0=_0x40534d;_0x2652e0<_0x41fe24;_0x2652e0++)0x0==_0x486953[_0x2652e0]['side']&&(_0x486953[_0x2652e0]['level']=_0x5efe53);_0x5efe53=0x0;for(let _0x446752=_0x41fe24-0x1;_0x446752>=_0x5039e0;_0x446752--)0x0==_0x486953[_0x446752]['distance']?_0x486953[_0x446752]['level']=_0x5efe53:(_0x5efe53--,_0x486953[_0x446752]['level']=_0x5efe53,_0x5efe53--);}}_fixObsoleteTags(_0x13dd16){const _0x1ad0f4=new Map(),_0x24c3e0=this['editor']['model']['schema'];for(let _0x33ff7b=0x1;_0x33ff7b<_0x13dd16['length'];_0x33ff7b++){let _0xbf51c1,_0x55b617,_0x62485c;const _0x35b03a=_0x13dd16[_0x33ff7b],_0x334f8d=_0x13dd16[_0x33ff7b-0x1];if('text'==_0x35b03a['type'])continue;if(_0x35b03a['type']!=_0x334f8d['type'])continue;if(!_0x24c3e0['isBlock'](_0x334f8d['item'])||_0x24c3e0['isLimit'](_0x334f8d['item']))continue;if(!_0x24c3e0['isBlock'](_0x35b03a['item'])||_0x24c3e0['isLimit'](_0x35b03a['item']))continue;if((_0x13dd16[_0x33ff7b]['isAdded']||_0x13dd16[_0x33ff7b]['isAddSuggestion'])&&_0x13dd16[_0x33ff7b-0x1]['isRemoved'])_0xbf51c1=_0x13dd16[_0x33ff7b],_0x55b617=_0x13dd16[_0x33ff7b-0x1],_0x62485c=_0x33ff7b-0x1;else{if(!_0x13dd16[_0x33ff7b]['isRemoved']||!_0x13dd16[_0x33ff7b-0x1]['isAdded']&&!_0x13dd16[_0x33ff7b-0x1]['isAddSuggestion'])continue;_0xbf51c1=_0x13dd16[_0x33ff7b-0x1],_0x55b617=_0x13dd16[_0x33ff7b],_0x62485c=_0x33ff7b;}const _0x1d9e3e=_0xbf51c1['level']==_0x55b617['level'],_0x53a5a9=Math['abs'](_0xbf51c1['level'])<Math['abs'](_0x55b617['level'])&&0x0==_0x55b617['distance'];(_0x1d9e3e||_0x53a5a9)&&(_0x1ad0f4['set'](_0x55b617['id'],_0xbf51c1['id']),_0x13dd16['splice'](_0x62485c,0x1),_0x33ff7b--,_0xbf51c1['isAdded']=!0x1);}for(let _0x54f7c9=0x0;_0x54f7c9<_0x13dd16['length'];_0x54f7c9++)_0x1ad0f4['has'](_0x13dd16[_0x54f7c9]['pairId'])&&(_0x13dd16[_0x54f7c9]['pairId']=_0x1ad0f4['get'](_0x13dd16[_0x54f7c9]['pairId']));}['_removeMissingPairs'](_0x123f72){const _0x3517a6=new Set(_0x123f72['map'](_0x2e0ebb=>_0x2e0ebb['id']));for(let _0x39fc5d=0x0;_0x39fc5d<_0x123f72['length'];_0x39fc5d++)_0x3517a6['has'](_0x123f72[_0x39fc5d]['pairId'])||0x0==_0x123f72[_0x39fc5d]['distance']||(_0x123f72[_0x39fc5d]['isIncorrect']=!0x0);return _0x123f72['filter'](_0x2c8336=>!_0x2c8336['isIncorrect']);}_markMismatchedRemovedTags(_0xd6de54){const _0x339426=new Set();for(let _0x4f1631=0x0;_0x4f1631<_0xd6de54['length'];_0x4f1631++){if(_0x339426['has'](_0xd6de54[_0x4f1631]['id'])&&_0xd6de54[_0x4f1631]['isRemoved']&&(_0xd6de54[_0x4f1631]['isIncorrect']=!0x0),_0xd6de54[_0x4f1631]['isIncorrect'])continue;if(0x0==_0xd6de54[_0x4f1631]['distance'])continue;if('elementStart'!=_0xd6de54[_0x4f1631]['type'])continue;if(null==_0xd6de54[_0x4f1631]['pairId'])continue;let _0x5be28f=_0x4f1631+0x1,_0x14778e=0x0;for(;_0xd6de54[_0x5be28f]['id']!=_0xd6de54[_0x4f1631]['pairId'];)'elementStart'==_0xd6de54[_0x5be28f]['type']?_0x14778e++:'elementEnd'==_0xd6de54[_0x5be28f]['type']&&_0x14778e--,_0x5be28f++;if(0x0!=_0x14778e){if(_0xd6de54[_0x4f1631]['isRemoved'])_0xd6de54[_0x4f1631]['isIncorrect']=!0x0;else{for(;_0x5be28f!=_0x4f1631;)_0xd6de54[_0x5be28f]['isRemoved']&&0x0!=_0xd6de54[_0x5be28f]['distance']&&(_0xd6de54[_0x5be28f]['isIncorrect']=!0x0,_0x339426['add'](_0xd6de54[_0x5be28f]['pairId'])),_0x5be28f--;}}}return _0xd6de54['filter'](_0x4ae00b=>!_0x4ae00b['isIncorrect']);}_removeUnsupportedChanges(_0x201b01){const _0x168be4=this['editor']['model']['schema'];for(let _0x30939a=0x0;_0x30939a<_0x201b01['length'];_0x30939a++){if(!(_0x201b01[_0x30939a]['isAdded']||_0x201b01[_0x30939a]['isAddSuggestion']||_0x201b01[_0x30939a]['isRemoved']||_0x201b01[_0x30939a]['isRemoveSuggestion']))continue;if(0x0==_0x201b01[_0x30939a]['distance'])continue;const _0x98b304=_0x201b01[_0x30939a]['item'];_0x168be4['isBlock'](_0x98b304)||_0x168be4['isLimit'](_0x98b304)||(_0x201b01[_0x30939a]['isAdded']&&delete _0x201b01[_0x30939a]['isAdded'],_0x201b01[_0x30939a]['isAddSuggestion']&&delete _0x201b01[_0x30939a]['isAddSuggestion'],_0x201b01[_0x30939a]['isRemoveSuggestion']&&delete _0x201b01[_0x30939a]['isRemoveSuggestion'],_0x201b01[_0x30939a]['isRemoved']&&(_0x201b01[_0x30939a]['isIncorrect']=!0x0));}return _0x201b01['filter'](_0x214e98=>!_0x214e98['isIncorrect']);}['_makeModelFromTape'](_0x1468f1,_0x2da1de,_0x92e86a,_0x275cc3){const _0x2c49ac=new _0x2b0661(),_0x5058e4=[],_0x567dc8=new Map(),_0xb2b6db=this['editor']['model'],_0x573291=_0xb2b6db['schema'],_0x38f7ba=[_0x2c49ac],_0x334578={},_0x490e10={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2c49ac['name']=_0x275cc3;let _0x38a622=null;const _0x4e05a0=[0x0];for(let _0x2669d5=0x0;_0x2669d5<_0x1468f1['length'];_0x2669d5++)if('elementStart'===_0x1468f1[_0x2669d5]['type']){_0x1468f1[_0x2669d5]['previousPosition']=_0xb2b6db['createPositionFromPath'](_0x2c49ac,_0x4e05a0);const _0xd268ee=new _0x147fef(_0x1468f1[_0x2669d5]['item']['name'],_0x1468f1[_0x2669d5]['item']['getAttributes']());_0x38f7ba[0x0]['_appendChild'](_0xd268ee),_0x4e05a0['push'](0x0),_0x38f7ba['unshift'](_0xd268ee),_0x1468f1[_0x2669d5]['nextPosition']=_0xb2b6db['createPositionFromPath'](_0x2c49ac,_0x4e05a0);}else'elementEnd'===_0x1468f1[_0x2669d5]['type']?(_0x38f7ba['shift'](),_0x1468f1[_0x2669d5]['previousPosition']=_0xb2b6db['createPositionFromPath'](_0x2c49ac,_0x4e05a0),_0x4e05a0['pop'](),_0x4e05a0[_0x4e05a0['length']-0x1]++,_0x1468f1[_0x2669d5]['nextPosition']=_0xb2b6db['createPositionFromPath'](_0x2c49ac,_0x4e05a0)):(_0x1468f1[_0x2669d5]['previousPosition']=_0xb2b6db['createPositionFromPath'](_0x2c49ac,_0x4e05a0),_0x38a622?_0x38a622['_data']+=_0x1468f1[_0x2669d5]['item']['data']:_0x38a622=new _0x1aaca6(_0x1468f1[_0x2669d5]['item']['data'],_0x1468f1[_0x2669d5]['item']['getAttributes']()),_0x1468f1[_0x2669d5+0x1]&&'text'===_0x1468f1[_0x2669d5+0x1]['type']&&_0x258335(_0x38a622,_0x1468f1[_0x2669d5+0x1]['item'])||(_0x38f7ba[0x0]['_appendChild'](_0x38a622),_0x38a622=null),_0x4e05a0[_0x4e05a0['length']-0x1]+=_0x1468f1[_0x2669d5]['item']['offsetSize'],_0x1468f1[_0x2669d5]['nextPosition']=_0xb2b6db['createPositionFromPath'](_0x2c49ac,_0x4e05a0));for(let _0x28c8a0=0x0;_0x28c8a0<_0x1468f1['length'];_0x28c8a0++){const _0xb7addf=_0x1468f1[_0x28c8a0]['previousPosition'],_0xc4e8e8=_0x1468f1[_0x28c8a0]['nextPosition'];for(const _0x2e6bf3 of _0x1468f1[_0x28c8a0]['markersStart'])_0x567dc8['set'](_0x2e6bf3,{'start':_0xb7addf,'end':null});_0x32bd55('isRemoveSuggestion',_0x28c8a0,_0xb7addf,_0xc4e8e8),_0x32bd55('isAddSuggestion',_0x28c8a0,_0xb7addf,_0xc4e8e8),_0x32bd55('isRemoved',_0x28c8a0,_0xb7addf,_0xc4e8e8),_0x32bd55('isAdded',_0x28c8a0,_0xb7addf,_0xc4e8e8);for(const _0x2b085b of _0x1468f1[_0x28c8a0]['markersEnd']){const _0x3b095b=_0x567dc8['get'](_0x2b085b);_0x3b095b?_0x3b095b['end']=_0xc4e8e8:_0x567dc8['set'](_0x2b085b,{'start':_0xc4e8e8,'end':_0xc4e8e8});}}for(const [_0x479003,_0x21ff9a]of _0x567dc8){const _0x31ef3d=this['editor']['model']['createRange'](_0x21ff9a['start'],_0x21ff9a['end']);_0x2c49ac['markers']['set'](_0x479003,_0x31ef3d);}return _0x5058e4['sort']((_0x556911,_0xb0254f)=>{const _0x5a8359=_0x2c49ac['markers']['get']('revision:'+_0x556911['id']),_0x220dc4=_0x2c49ac['markers']['get']('revision:'+_0xb0254f['id']);return _0x5a8359['start']['isBefore'](_0x220dc4['start'])?-0x1:_0x5a8359['start']['isAfter'](_0x220dc4['start'])?0x1:_0x5a8359['end']['isBefore'](_0x220dc4['end'])?-0x1:_0x5a8359['end']['isAfter'](_0x220dc4['end'])?0x1:'add'===_0x556911['type']?-0x1:0x1;}),{'root':_0x2c49ac,'changes':_0x5058e4};function _0x32bd55(_0x51d816,_0x3663c9,_0x3d60ba,_0x3790ed){const _0x1b30e8=!!_0x1468f1[_0x3663c9][_0x51d816],_0x5da1f2=_0x1b30e8?_0x1468f1[_0x3663c9][_0x51d816]['userId']:null,_0x2307ba=_0x1b30e8&&_0x1468f1[_0x3663c9][_0x51d816]['aiSource']||null,_0xfeb01c=_0x3663c9===_0x1468f1['length']-0x1,_0x1ac51b=_0x490e10[_0x51d816][0x0],_0x315695=_0x573291['isObject'](_0x1468f1[_0x3663c9]['item']);!_0x334578[_0x51d816]&&_0x1b30e8?_0x334578[_0x51d816]={'start':_0x3d60ba,'tapeItem':_0x1468f1[_0x3663c9],'userId':_0x5da1f2,'aiSource':_0x2307ba,'type':_0x51d816}:_0x334578[_0x51d816]&&!_0x1b30e8?(_0x334578[_0x51d816]['end']=_0x3d60ba,_0x3089e3(_0x334578[_0x51d816]),_0x334578[_0x51d816]=null):_0x334578[_0x51d816]&&_0x1b30e8&&(_0x334578[_0x51d816]['userId']!==_0x5da1f2||_0x334578[_0x51d816]['aiSource']!==_0x2307ba)&&(_0x334578[_0x51d816]['end']=_0x3d60ba,_0x1ac51b&&_0x1ac51b['userId']===_0x334578[_0x51d816]['userId']?_0x1ac51b['change']['aiSource']=_0x1ac51b['change']['aiSource']||_0x334578[_0x51d816]['aiSource']:_0x3089e3(_0x334578[_0x51d816]),_0x334578[_0x51d816]={'start':_0x3d60ba,'tapeItem':_0x1468f1[_0x3663c9],'userId':_0x5da1f2,'aiSource':_0x2307ba,'type':_0x51d816}),_0x334578[_0x51d816]&&_0x315695&&('elementStart'!==_0x1468f1[_0x3663c9]['type']||_0x1ac51b&&_0x1ac51b['userId']===_0x5da1f2||_0x490e10[_0x51d816]['unshift']({'userId':_0x5da1f2,'object':_0x1468f1[_0x3663c9]['item'],'change':_0x334578[_0x51d816]}),'elementEnd'===_0x1468f1[_0x3663c9]['type']&&_0x1ac51b&&_0x1ac51b['object']===_0x1468f1[_0x3663c9]['item']&&(_0x490e10[_0x51d816]['shift'](),_0x334578[_0x51d816]=_0x1ac51b['change'])),_0x334578[_0x51d816]&&_0xfeb01c&&(_0x334578[_0x51d816]['end']=_0x3790ed,_0x3089e3(_0x334578[_0x51d816]),_0x334578[_0x51d816]=null);}function _0x3089e3({start:_0xec83f8,end:_0x2b84fa,tapeItem:_0x22602e,userId:_0x912bbe,aiSource:_0x2e1c34,type:_0x59da9c}){const _0x418daa=_0x22602e['item'],_0x514f3a=_0xb2b6db['schema']['isBlock'](_0x418daa)&&!_0xb2b6db['schema']['isLimit'](_0x418daa),_0x5065fa=_0xec83f8['nodeAfter']==_0x2b84fa['parent']&&_0x2b84fa['isAtStart'];if(_0x514f3a&&_0x5065fa)return;const _0x1fc703=_0xb2b6db['createRange'](_0xec83f8,_0x2b84fa),_0x5c1d08=_0x2da1de['get'](_0x912bbe),_0x5a80a6=new Ht({'author':_0x5c1d08,'type':'isAdded'==_0x59da9c||'isAddSuggestion'==_0x59da9c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x59da9c||'isRemoveSuggestion'==_0x59da9c,'aiSource':_0x2e1c34||null},'createdAt':new Date(),'rootName':_0x92e86a});_0x5058e4['push'](_0x5a80a6),_0x2c49ac['markers']['set']('revision:'+_0x5a80a6['id'],_0x1fc703);}function _0x258335(_0x562f0f,_0x188e72){const _0x38f030=_0x562f0f['getAttributes'](),_0x24dcc1=_0x188e72['getAttributes']();for(const _0x2d65c2 of _0x38f030){if(_0x2d65c2[0x1]!==_0x188e72['getAttribute'](_0x2d65c2[0x0]))return!0x1;_0x24dcc1['next']();}return _0x24dcc1['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xc1a090=>{const _0x5452a3=_0xc1a090['markerName']['split'](':')[0x1],_0xc428a8=this['_getChangeFromId'](_0x5452a3);if(!_0xc428a8)return null;const _0x1a4ee6='add'==_0xc428a8['type']?'insertion':'deletion',_0x33cc73=['ck-suggestion-marker','ck-suggestion-marker-'+_0x1a4ee6];return _0xc428a8['data']['isSuggestion']&&_0x33cc73['push']('ck-suggestion-marker-'+_0x1a4ee6+'-new'),this['activeChange']==_0xc428a8&&_0x33cc73['push']('ck-suggestion-marker--active'),{'classes':_0x33cc73,'attributes':{'data-change-id':_0x5452a3}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3d509c=>{_0x3d509c['on']('element:pre',(_0x2216f1,_0x26d7f7,_0xefa735)=>{const _0x35655c=_0x26d7f7['viewItem']['getChild'](0x0);if(!_0x35655c||!_0x35655c['is']('element','code'))return;if(!_0xefa735['consumable']['consume'](_0x35655c,{'attributes':['vid_start','vid_end']}))return;const _0x303dbf=_0x26d7f7['modelRange']['start']['nodeAfter'];_0xefa735['writer']['setAttribute']('vid_start',_0x35655c['getAttribute']('vid_start'),_0x303dbf),_0xefa735['writer']['setAttribute']('vid_end',_0x35655c['getAttribute']('vid_end'),_0x303dbf);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0xbae4dd=>{_0xbae4dd['on']('element',(_0x55fa9f,_0x327c2b,_0x17265d)=>{if(!_0x17265d['consumable']['consume'](_0x327c2b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x327c2b['modelRange']['isCollapsed'])return;const _0x5ea79c=_0x327c2b['modelRange']['start']['nodeAfter'];_0x5ea79c['hasAttribute']('vid_start')||_0x5ea79c['hasAttribute']('vid')||(_0x17265d['writer']['setAttribute']('vid_start',_0x327c2b['viewItem']['getAttribute']('vid_start'),_0x5ea79c),_0x17265d['writer']['setAttribute']('vid_end',_0x327c2b['viewItem']['getAttribute']('vid_end'),_0x5ea79c));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x21a7a1=>_0x21a7a1['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1e60c4,[,_0x3061db])=>{['vid_start','vid_end','vid']['includes'](_0x3061db)&&(_0x1e60c4['return']=!0x0,_0x1e60c4['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5be78c=>{_0x5be78c['on']('attribute:vid',(_0x58b781,_0x4690c4,_0x32aa91)=>{if('\x20'!=_0x4690c4['item']['data']||_0x4690c4['item']['parent']['maxOffset']>0x1)return;if(!_0x32aa91['consumable']['consume'](_0x4690c4['item'],_0x58b781['name']))return;const _0xaf87cc=_0x32aa91['writer'],_0x119123=_0x32aa91['mapper']['toViewRange'](_0x4690c4['range']);_0xaf87cc['wrap'](_0x119123,_0xaf87cc['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2f955c){const _0x233776=_0x2f955c['plugins']['get']('RevisionViewer');return(_0x486762,_0x556f6c,_0x45aef2)=>{const _0x4d8612=_0x556f6c['markerName']['split'](':')[0x1],_0x227ca5=_0x233776['_getChangeFromId'](_0x4d8612);if(!_0x227ca5)return null;const _0x28b022='add'==_0x227ca5['type']?'split':'merge';if(!_0x45aef2['consumable']['test'](_0x556f6c['markerRange'],_0x486762['name']))return;const _0x1ec86c=_0x556f6c['markerRange']['getWalker'](),_0x2d02fe=_0x556f6c['markerRange']['start'],_0x52b79c=_0x2f955c['model']['schema'];let _0x2eb421=null,_0x492683=null,_0x44fd07=!0x1,_0x7068d9=!0x1;for(const _0x28c750 of _0x1ec86c){const _0x188682=_0x28c750['item'];_0x44fd07=_0x44fd07||_0x52b79c['isContent'](_0x188682);const _0x3cddd7=_0x45aef2['mapper']['toViewElement'](_0x188682);if(_0x3cddd7&&_0x3cddd7['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x28c750['type']&&(_0x52b79c['isBlock'](_0x188682)&&!_0x52b79c['isLimit'](_0x188682)&&(_0x188682['nextSibling']||_0x2d02fe['isAtEnd']?_0x2eb421&&_0x2eb421['parent']==_0x188682||(_0x2eb421=_0x188682,_0x4d1fe8(_0x28c750['previousPosition']),_0x7068d9=!0x0):_0x492683=_0x492683||_0x28c750['previousPosition']));}function _0x4d1fe8(_0x134f32){const _0x67ab1a=_0x45aef2['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x28b022}),_0x21334a=_0x45aef2['mapper']['toViewPosition'](_0x134f32);_0x227ca5['data']['isSuggestion']&&_0x45aef2['writer']['addClass']('ck-suggestion-marker-'+_0x28b022+'-new',_0x67ab1a),_0x233776['activeChange']==_0x227ca5&&_0x45aef2['writer']['addClass']('ck-suggestion-marker--active',_0x67ab1a),_0x45aef2['writer']['insert'](_0x21334a,_0x67ab1a),_0x45aef2['mapper']['bindElementToMarker'](_0x67ab1a,_0x556f6c['markerName']);}_0x44fd07||_0x7068d9||!_0x492683||_0x4d1fe8(_0x492683);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x342f0b,_0x3630c3,_0xfdb3be)=>{const _0x4592a6=_0xfdb3be['mapper']['markerNameToElements'](_0x3630c3['markerName']);if(_0x4592a6){for(const _0x2952e5 of _0x4592a6)(_0x2952e5['hasClass']('ck-suggestion-marker-split')||_0x2952e5['hasClass']('ck-suggestion-marker-merge'))&&(_0xfdb3be['mapper']['unbindElementFromMarkerName'](_0x2952e5,_0x3630c3['markerName']),_0xfdb3be['writer']['remove'](_0x2952e5));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x261bd2,_0x249000,_0x4bd975)=>{const _0x37c1c3=_0x249000['markerName']['split'](':')[0x1],_0x452a52=this['_getChangeFromId'](_0x37c1c3);if(!_0x452a52)return null;const _0xa3f9be='add'==_0x452a52['type']?'split':'merge';if(_0x4bd975['consumable']['test'](_0x249000['markerRange'],_0x261bd2['name']))for(const _0x207ccb of _0x249000['markerRange']['getItems']()){if(!_0x207ccb['is']('element','softBreak'))continue;const _0x51db4c=_0x4bd975['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xa3f9be}),_0x5af92c=_0x4bd975['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x207ccb));_0x452a52['data']['isSuggestion']&&_0x4bd975['writer']['addClass']('ck-suggestion-marker-'+_0xa3f9be+'-new',_0x51db4c),this['activeChange']==_0x452a52&&_0x4bd975['writer']['addClass']('ck-suggestion-marker--active',_0x51db4c),_0x4bd975['writer']['insert'](_0x5af92c,_0x51db4c),_0x4bd975['mapper']['bindElementToMarker'](_0x51db4c,_0x249000['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2f5ca0=>{for(const _0x38b872 of this['editor']['model']['document']['getRootNames']()){const _0xf444c2=this['editor']['model']['document']['getRoot'](_0x38b872),_0x811b3c=this['editor']['editing']['view']['document']['getRoot'](_0x38b872);if(_0x811b3c){const _0x580119=_0xf444c2['getAttribute']('revisionHistoryAttachChange');if(_0x2f5ca0['removeAttribute']('data-change-id',_0x811b3c),_0x2f5ca0['removeClass']('ck-revision-history-root-add',_0x811b3c),_0x2f5ca0['removeClass']('ck-revision-history-root-remove',_0x811b3c),_0x2f5ca0['removeClass']('ck-revision-history-root--active',_0x811b3c),_0x580119){const _0x3be1bd=this['_getChangeFromId'](_0x580119);if(!_0x3be1bd)return null;_0x2f5ca0['setAttribute']('data-change-id',_0x580119,_0x811b3c),_0x2f5ca0['addClass']('ck-revision-history-root-'+_0x3be1bd['type'],_0x811b3c),this['activeChange']==_0x3be1bd&&_0x2f5ca0['addClass']('ck-revision-history-root--active',_0x811b3c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x32d2fb=>'revision-comment:'+_0x32d2fb,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x251774=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Lt(_0x251774['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3dd888=>'revision-suggestion:'+_0x3dd888,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5ef68a=>({'name':'suggestion:'+_0x5ef68a,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xcc0210=>{const _0x10feaf=_0xcc0210['markerName']['split'](':')[0x1];return'insertion'!=_0x10feaf&&'deletion'!=_0x10feaf?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x10feaf]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Bt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Bt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x68a436,_0x1d37cf,_0xb7c9f0)=>{const _0x573b60=_0xb7c9f0['mapper']['markerNameToElements'](_0x1d37cf['markerName']);if(_0x573b60){for(const _0x196095 of _0x573b60)_0x196095['is']('uiElement')&&(_0xb7c9f0['mapper']['unbindElementFromMarkerName'](_0x196095,_0x1d37cf['markerName']),_0xb7c9f0['writer']['remove'](_0x196095));}},{'priority':'high'});}_getChangeFromId(_0x3ce603){return this['_changeIdToChange']['get'](_0x3ce603);}_getViewForChange(_0x149c88){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Tt(this['editor']['locale'],_0x149c88,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1e96d5,_0x446ec9,_0xe2e5bd,_0x275e1c)=>{_0x275e1c&&this['_balloon']['remove'](_0x275e1c),_0xe2e5bd&&(this['_balloon']['add']({'view':_0xe2e5bd,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x513cad=this['editor']['editing'],_0x46fa2e=this['_getChangeFromId'](_0xe2e5bd['changeId']);let _0x1d57a3;if(_0x46fa2e['data']['isOnRoot']){const _0x41d83f=_0x513cad['view']['getDomRoot'](_0x46fa2e['rootName']);_0x1d57a3=Array['from'](_0x41d83f['getClientRects']());}else{const _0x34f909=this['editor']['model']['markers']['get']('revision:'+_0xe2e5bd['changeId']);_0x1d57a3=Array['from'](_0x513cad['mapper']['markerNameToElements'](_0x34f909['name']))['map'](_0x2b5f33=>_0x513cad['view']['domConverter']['mapViewToDom'](_0x2b5f33))['map'](_0x23f12a=>Array['from'](_0x23f12a['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x1d57a3['find'](_0x1eacc0=>_0x1eacc0['top']-0x3<=this['_activeViewTarget']['y']&&_0x1eacc0['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1eacc0['left']-0x3<=this['_activeViewTarget']['x']&&_0x1eacc0['right']+0x3>=this['_activeViewTarget']['x'])||_0x1d57a3[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x54f4a5,_0x3e59a7,_0x512e2e,_0x548008)=>{this['activeView']=_0x512e2e?this['_getViewForChange'](_0x512e2e):null,this['editor']['model']['change'](()=>{const _0x6b7540=this['editor']['editing'];_0x548008&&(_0x548008['data']['isOnRoot']?_0x6b7540['view']['change'](_0x1143f3=>{_0x1143f3['removeClass']('ck-revision-history-root--active',_0x6b7540['view']['document']['getRoot'](_0x548008['rootName']));}):_0x6b7540['reconvertMarker']('revision:'+_0x548008['id'])),_0x512e2e&&(_0x512e2e['data']['isOnRoot']?_0x6b7540['view']['change'](_0x1ec61a=>{_0x1ec61a['addClass']('ck-revision-history-root--active',_0x6b7540['view']['document']['getRoot'](_0x512e2e['rootName']));}):_0x6b7540['reconvertMarker']('revision:'+_0x512e2e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5e5415,_0x334a3e)=>{if(this['activeChange'])return;const _0x3c615d=this['_findChangeIdFromDomTarget'](_0x334a3e['target']),_0x1868a6=this['_changeIdToChange']['get'](_0x3c615d);_0x1868a6?(this['_activeViewTarget']={'x':_0x334a3e['domEvent']['x'],'y':_0x334a3e['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1868a6)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x5a717e,_0x531085)=>{const _0x371949=this['_findChangeIdFromDomTarget'](_0x531085['target']),_0x4096b1=this['_changeIdToChange']['get'](_0x371949);_0x4096b1?(this['_activeViewTarget']={'x':_0x531085['domEvent']['x'],'y':_0x531085['domEvent']['y']},_0x4096b1===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x4096b1):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x5dd4fd){do{const _0x13e353=_0x5dd4fd['getAttribute']('data-change-id');if(_0x13e353)return _0x13e353;_0x5dd4fd=_0x5dd4fd['parent'];}while(_0x5dd4fd);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xcc802a=>{for(const _0x1d8a03 of this['editor']['model']['markers'])_0xcc802a['removeMarker'](_0x1d8a03);});}};function Lt(_0x1b46cf){return _0x1b46cf['split'](':')[0x1];}function Bt(_0x42cbd1,_0x1ee089){return(_0x5799ce,_0x4e8c8e,_0x51ff42)=>{if(!_0x51ff42['consumable']['test'](_0x4e8c8e['markerRange'],_0x5799ce['name']))return;const _0x462030=_0x4e8c8e['markerRange']['getWalker'](),_0x3fb22e=_0x4e8c8e['markerRange']['start'],_0x2529b1=_0x42cbd1['model']['schema'];let _0x115228=null,_0x28a29a=null,_0x3f1b7b=!0x1,_0x3d826c=!0x1;for(const _0xdcc512 of _0x462030){const _0x7bf932=_0xdcc512['item'];_0x3f1b7b=_0x3f1b7b||_0x2529b1['isContent'](_0x7bf932);const _0x12a786=_0x51ff42['mapper']['toViewElement'](_0x7bf932);if(_0x12a786&&_0x12a786['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xdcc512['type']&&(_0x2529b1['isBlock'](_0x7bf932)&&!_0x2529b1['isLimit'](_0x7bf932)&&(_0x7bf932['nextSibling']||_0x3fb22e['isAtEnd']?_0x115228&&_0x115228['parent']==_0x7bf932||(_0x115228=_0x7bf932,_0x308318(_0xdcc512['previousPosition']),_0x3d826c=!0x0):_0x28a29a=_0x28a29a||_0xdcc512['previousPosition']));}function _0x308318(_0x178507){const _0x53acea=_0x51ff42['mapper']['toViewPosition'](_0x178507),_0x226de7=_0x51ff42['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1ee089});_0x51ff42['writer']['insert'](_0x53acea,_0x226de7),_0x51ff42['mapper']['bindElementToMarker'](_0x226de7,_0x4e8c8e['markerName']);}_0x3f1b7b||_0x3d826c||!_0x28a29a||_0x308318(_0x28a29a);};}var Ft=class extends _0x499926{constructor(_0x1637f1){super(_0x1637f1);const _0x169733=_0x1637f1['plugins']['get'](Ut);this['affectsData']=!0x1,this['listenTo'](_0x169733,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x169733,'change:isEnabled',()=>this['refresh']());}execute(){const _0x374b41=this['editor'],_0x3397aa=_0x374b41['plugins']['get'](Ut),_0x8ff64c=_0x3397aa['isReady']?_0x3397aa['diff']['newRevisionId']:null;_0x374b41['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x8ff64c);}['refresh'](){const {isReady:_0x20ab91,isEnabled:_0xf04eb4,repository:_0x55ce52,diff:_0x572dc1}=this['editor']['plugins']['get'](Ut),_0x4229a3=_0x572dc1&&_0x55ce52['getLaterVisibleRevision'](_0x572dc1['newRevisionId']);this['isEnabled']=_0x20ab91&&_0xf04eb4&&Boolean(_0x4229a3);}},$t=class extends _0x499926{_step;constructor(_0x396b78,{direction:_0xcdc78b}){super(_0x396b78);const _0x48289a=_0x396b78['plugins']['get'](Ut);this['affectsData']=!0x1,this['_step']='forward'===_0xcdc78b?0x1:-0x1,this['listenTo'](_0x48289a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x48289a,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x48289a,'change:activeChange',()=>this['refresh']());}execute(){const _0x1dc309=this['editor'],_0x2d777e=_0x1dc309['plugins']['get'](Ut),{isNavigationMode:_0x2904b2,currentChangeNumber:_0x3a1c84}=_0x2d777e;let _0x1b24f4;if(_0x2d777e['activeChange']=_0x2904b2?_0x2d777e['diff']['changes']['get'](_0x3a1c84+this['_step']):_0x2d777e['diff']['changes']['first'],_0x2d777e['activeChange']['data']['isOnRoot'])_0x1b24f4=_0x1dc309['editing']['view']['getDomRoot'](_0x2d777e['activeChange']['rootName']);else{const _0x56cdfd=_0x1dc309['model']['markers']['get']('revision:'+_0x2d777e['activeChange']['id']);_0x1b24f4=_0x386c43(_0x1dc309['editing'],_0x56cdfd);}_0x54e81f({'target':_0x1b24f4,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x350b53,currentChangeNumber:_0x30550a,numberOfChanges:_0x1ccd98,isReady:_0x40d94f,isEnabled:_0x506a82}=this['editor']['plugins']['get'](Ut);this['isEnabled']=!!(_0x506a82&&_0x40d94f&&_0x1ccd98)&&(!_0x350b53||(0x1===this['_step']?_0x30550a<_0x1ccd98-0x1:_0x30550a>0x0));}},jt=class extends ft{constructor(_0x5e49f9){super(_0x5e49f9);const _0x44fc6d=this['bindTemplate'],_0x5ee709=new _0x51332c(_0x5e49f9),_0x3f3823=new _0x51332c(_0x5e49f9);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',(_0x1a6ebc,_0x5b1c56)=>_0x1a6ebc&&_0x5b1c56>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x43fa94,_0x2e5249,_0x4a8c17,_0x30410e)=>{if(!_0x43fa94)return At(_0x5e49f9,'Loading...');if(!_0x4a8c17)return At(_0x5e49f9,'No\x20changes');const _0x2a1f39=At(_0x5e49f9,'NUMBER_OF_CHANGES',_0x4a8c17);return _0x30410e?At(_0x5e49f9,'X_OF_Y_CHANGES',[_0x2e5249+0x1,_0x4a8c17]):_0x2a1f39;}),_0x5ee709['set']({'label':At(_0x5e49f9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x4051c7}),_0x3f3823['set']({'label':At(_0x5e49f9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3e4f96}),_0x5ee709['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3f3823['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5ee709['on']('execute',()=>this['fire']('execute','backward')),_0x3f3823['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',_0x44fc6d['if']('_isStatusLabelVisible','ck-hidden',_0x2101fc=>!_0x2101fc)]},'children':[{'text':_0x44fc6d['to']('isNavigationMode',_0x2b436b=>_0x2b436b?At(_0x5e49f9,'EDIT_X_OF_Y_REVISIONS')+':\x20':At(_0x5e49f9,'Total')+':\x20')}]},{'text':_0x44fc6d['to']('_statusText')}]},new lt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5ee709,_0x3f3823]}]});}};const Gt='ck-editor__editable__loading-overlay';var Kt=class extends _0x53e262{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2ec451=this['editor']['editing']['view'];_0x2ec451['change'](_0x245ddf=>{for(const _0x5222f9 of _0x2ec451['document']['roots'])_0x245ddf['addClass'](Gt,_0x5222f9);});}['hide'](){const _0x288734=this['editor']['editing']['view'];_0x288734['change'](_0x5f09e=>{for(const _0x56a4cf of _0x288734['document']['roots'])_0x5f09e['removeClass'](Gt,_0x56a4cf);});}},qt=class extends _0x53e262{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ut,Kt];}init(){const _0x2524cb=this['editor'],_0x27eca0=_0x2524cb['plugins']['get'](Ut),_0x4b0cdf=_0x2524cb['plugins']['get'](Kt);_0x2524cb['ui']['componentFactory']['add']('exitToEditing',_0x5a27c9=>{const _0x12ee69=new _0x51332c(_0x5a27c9);return _0x12ee69['set']({'label':At(_0x5a27c9,'Back\x20to\x20editing'),'icon':_0x22efaa,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x12ee69,'execute',()=>{_0x2524cb['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x12ee69;}),_0x2524cb['ui']['componentFactory']['add']('restoreRevision',_0x5c2c55=>{const _0x5d884e=new _0x51332c(_0x5c2c55);return _0x5d884e['set']({'label':At(_0x5c2c55,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5d884e['bind']('isEnabled')['to'](_0x2524cb['commands']['get']('restoreRevision')),this['listenTo'](_0x5d884e,'execute',()=>_0x2524cb['execute']('restoreRevision')),_0x5d884e;}),_0x2524cb['ui']['componentFactory']['add']('changesNavigation',_0x2ac284=>{const _0x13ccdf=new jt(_0x2ac284),_0x230a63=_0x2524cb['commands']['get']('showPreviousChange'),_0x43d6c4=_0x2524cb['commands']['get']('showNextChange');return _0x13ccdf['bind']('isBackwardNavigationEnabled')['to'](_0x230a63,'isEnabled'),_0x13ccdf['bind']('isForwardNavigationEnabled')['to'](_0x43d6c4,'isEnabled'),_0x13ccdf['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x27eca0),this['listenTo'](_0x13ccdf,'execute',(_0xd3c490,_0x3a2926)=>{_0x2524cb['execute']('forward'===_0x3a2926?'showNextChange':'showPreviousChange');}),_0x13ccdf;}),_0x4b0cdf['show'](),_0x27eca0['on']('change:isReady',(_0x22b7c1,_0x5a05ef,_0x46d349)=>{_0x46d349?_0x4b0cdf['hide']():_0x4b0cdf['show']();});}},Yt=class extends st{['_resizeObserver']=null;constructor(_0x5d41ba,_0x55ef19){super(_0x5d41ba,_0x55ef19);const _0x53815d=this['bindTemplate'];this['set']({'label':At(_0x5d41ba,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=At(_0x5d41ba,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x53815d['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x54c0e7(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']()),this['on']('change:isEnabled',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x552414=this['fieldView']['element'];this['_tooltipString']=!this['isEnabled']&&_0x552414['scrollWidth']>_0x552414['clientWidth']&&_0x552414['value']||'';}},Jt=class extends ft{constructor(_0x5aebcb,_0x17c001,_0x2549ce){super(_0x5aebcb);const _0x1816d7=new tt();_0x1816d7['set']({'content':_0x3b6736,'viewBox':'0\x200\x2011\x2010'});const _0x49b051=['ck','ck-revision-history-sidebar__revision-author'];_0x2549ce&&_0x49b051['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2fd2b1=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':At(_0x5aebcb,_0x2549ce?'Revision\x20creator':'Revision\x20author')},'children':[_0x1816d7,_0x17c001['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x49b051},'children':_0x2fd2b1});}};function Wt(_0x5e6eb4,_0x3f79ed){const _0x5170eb=_0x5e6eb4['bindTemplate'],_0x5cfb44=_0x5e6eb4['locale'],_0x50317b=gt(_0x5cfb44);_0x50317b['panelPositionLimiter']=()=>{const _0x5dbb82=_0x50317b['buttonView']['element'];return _0x5dbb82&&_0x23c702(_0x5dbb82);};const _0x32e586=function(_0x468889,_0x4527f5){const _0x1af260=function(_0x2ddc72,_0x2084db){const _0x58a9ff=_0x2ddc72['locale'],_0xbe349b={'Compare\x20against\x20selected':At(_0x58a9ff,'Compare\x20against\x20selected'),'Name\x20this\x20revision':At(_0x58a9ff,'Name\x20this\x20revision'),'Restore\x20this\x20revision':At(_0x58a9ff,'Restore\x20this\x20revision')};return _0x2084db['map'](_0x4bc892=>{const _0x28c1b8=_0xbe349b[_0x4bc892['name']];return _0x28c1b8&&_0x28c1b8!==_0x4bc892['name']&&(_0x4bc892['name']=_0x28c1b8),_0x4bc892;});}(_0x468889,_0x4527f5),_0x40bdd6=new _0x45c016();for(const _0x47fa23 of _0x1af260){const _0xcfd2f3={'type':'button','model':new dt({'label':_0x47fa23['name'],'class':_0x47fa23['class'],'withText':!0x0,'role':'menuitem','_action':_0x47fa23['action']})};_0xcfd2f3['model']['bind']('isEnabled')['to'](_0x468889,'isActionsDropdownOpen',_0x184520=>'function'!=typeof _0x47fa23['isEnabled']||(!_0x184520||_0x47fa23['isEnabled'](_0x468889))),_0x40bdd6['add'](_0xcfd2f3);}return _0x40bdd6;}(_0x5e6eb4,_0x3f79ed);return _0x5e6eb4['bind']('isActionsDropdownOpen')['to'](_0x50317b,'isOpen'),_0x50317b['buttonView']['set']({'label':At(_0x5cfb44,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'rtl'===_0x5cfb44['uiLanguageDirection']?'se':'sw','icon':_0x2c2f5d,'class':'ck-button_small','tabindex':0x0}),_0x50317b['buttonView']['extendTemplate']({'attributes':{'aria-labelledby':_0x5e6eb4['revisionNameView']['fieldView']['id'],'aria-describedby':[_0x5e6eb4['_dateElementId'],_0x5e6eb4['_authorsElementId']]}}),_0x50317b['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5170eb['if']('isActionsDropdownOpen','ck-on'),_0x5170eb['if']('isEditing','ck-hidden')]},'on':{'click':_0x5170eb['to'](_0x3621c3=>_0x3621c3['stopPropagation']())}}),_0x50317b['on']('execute',_0x1d396f=>{_0x5e6eb4['isReady']&&'function'==typeof _0x1d396f['source']['_action']&&_0x1d396f['source']['_action'](_0x5e6eb4);}),vt(_0x50317b,_0x32e586,{'role':'menu'}),_0x50317b['listenTo'](_0x5e6eb4,'change:isActionsDropdownOpen',(_0x549f1c,_0x387314,_0x704c28)=>{if(_0x704c28)for(const _0x22290b of _0x50317b['listView']['items']){const _0x101e43=_0x22290b['children']['first'],_0xdad06c=_0x3f79ed['find'](_0x1ec79c=>_0x1ec79c['action']===_0x101e43['_action'])['isVisible'];_0x22290b['isVisible']=void 0x0===_0xdad06c||_0xdad06c(_0x5e6eb4);}}),_0x50317b;}const Xt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x4b5724(ft);var Qt=class extends Xt{['id'];['revisionNameView'];revisionActionsView;saveButtonView;cancelButtonView;_keystrokes;['_revision'];_requireRevisionName;['_aiPillView'];_dateElementId;_authorsElementId;constructor(_0x472a62,_0x24d80,_0xde08f1,_0x25f8c5,_0x2c19b5=!0x1){super(_0x472a62);const _0xf13313=this['bindTemplate'],_0x3ed6df=function(_0x5ba587,_0x5c18e3){const _0x9a834b=Array['from'](_0x5c18e3['authors'])['filter'](_0x32c8a7=>_0x32c8a7!=_0x5c18e3['creator']);return _0x5c18e3['creator']&&_0x9a834b['unshift'](_0x5c18e3['creator']),_0x9a834b['map'](_0x4ab7ca=>new Jt(_0x5ba587,_0x4ab7ca,_0x4ab7ca==_0x5c18e3['creator']));}(_0x472a62,_0x24d80);this['id']=_0x24d80['id'],this['_revision']=_0x24d80,this['_requireRevisionName']=_0x25f8c5,this['bind']('_isAiGenerated')['to'](_0x24d80,'attributes',_0x5af62a=>!(!_0x5af62a||!_0x5af62a['@ai'])),this['bind']('name','createdAt')['to'](_0x24d80),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1e22ff=>{return _0x396cb3=_0x472a62['uiLanguage'],(_0x22a198=_0x1e22ff)['toLocaleDateString'](_0x396cb3,{'month':'long','day':'numeric'})+',\x20'+_0x22a198['toLocaleTimeString'](_0x396cb3,{'hour':'numeric','minute':'numeric'});var _0x396cb3,_0x22a198;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isEditing',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['_keystrokes']=new _0x326416(),this['_dateElementId']='ck-revision-history-revision-date-'+_0x45072e(),this['_authorsElementId']='ck-revision-history-revision-authors-'+_0x45072e(),this['revisionNameView']=new Yt(_0x472a62,mt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'class':['ck-input_small'],'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x385312=>_0x385312||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isEditing',this,'isEnabled',(_0x24ada8,_0x3400cf)=>_0x24ada8&&_0x3400cf),this['revisionNameView']['fieldView']['bind']('tabIndex')['to'](this['revisionNameView']['fieldView'],'isReadOnly',_0x9885b9=>_0x9885b9?-0x1:void 0x0),this['saveButtonView']=this['_createSaveButtonView'](_0x472a62),this['cancelButtonView']=this['_createCancelButtonView'](_0x472a62),this['revisionActionsView']=_0xde08f1&&_0xde08f1['length']?Wt(this,_0xde08f1):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x2c19b5?this['_createAiPillView'](_0x472a62):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xf13313['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xf13313['if']('isEnabled','ck-disabled',_0x5be358=>!_0x5be358),_0xf13313['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xf13313['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xf13313['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open'),_0xf13313['if']('isEditing','ck-revision-history-sidebar__revision_editing')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date',_0xf13313['if']('isEditing','ck-hidden')],'id':this['_dateElementId']},'children':[{'text':_0xf13313['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__edit-actions',_0xf13313['if']('isEditing','ck-hidden',_0x27b893=>!_0x27b893)]},'children':[this['cancelButtonView'],this['saveButtonView']],'on':{'click':_0xf13313['to'](_0x1612cd=>_0x1612cd['stopPropagation']())}},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors'],'id':this['_authorsElementId']},'children':_0x3ed6df}]},..._0x2c19b5?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0xf13313['if']('_isAiGenerated','ck-hidden',_0x2d390f=>!_0x2d390f)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0xf13313['to'](_0x16f4fe=>{_0x16f4fe['srcElement']['closest']('.ck-confirm-view')||this['isEditing']&&this['revisionNameView']['element']['contains'](_0x16f4fe['target'])||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x3b6ca9){const _0x1aae90=new _0x88a120(_0x3b6ca9);return _0x1aae90['set']({'icon':_0x346d16,'label':At(_0x3b6ca9,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':At(_0x3b6ca9,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x1aae90['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x1aae90;}_createSaveButtonView(_0x4e8c69){const _0x1eb9e0=new _0x51332c(_0x4e8c69),_0x6ad54b=this['revisionNameView']['fieldView'];return _0x1eb9e0['set']({'label':At(_0x4e8c69,'Save'),'withText':!0x0,'class':'ck-button-action\x20ck-button_small','tabindex':0x0}),_0x1eb9e0['bind']('isEnabled')['to'](this,'isEnabled',_0x6ad54b,'isEmpty',(_0x356474,_0x5418a5)=>_0x356474&&!(this['_requireRevisionName']&&_0x5418a5)),_0x1eb9e0['on']('execute',()=>this['_saveName']()),_0x1eb9e0;}_createCancelButtonView(_0xd14bb2){const _0x5c1cd8=new _0x51332c(_0xd14bb2);return _0x5c1cd8['set']({'label':At(_0xd14bb2,'Cancel'),'withText':!0x0,'class':'ck-button_small','tabindex':0x0}),_0x5c1cd8['on']('execute',()=>this['_finishEditing']()),_0x5c1cd8;}['_saveName'](){const _0x2cfd27=this['revisionNameView']['fieldView']['element']['value'];this['_requireRevisionName']&&!_0x2cfd27||(_0x2cfd27===this['name']||!this['name']&&_0x2cfd27===this['_createdAtFormatted']||this['fire']('setName',{'id':this['id'],'name':_0x2cfd27}),this['_finishEditing']());}_finishEditing(){const _0x2b0a36=this['revisionNameView']['fieldView'],_0x3245e6=this['_hasKeyboardFocus']();_0x2b0a36['element']['value']=_0x2b0a36['value'],_0x2b0a36['isEmpty']=!_0x2b0a36['element']['value'],this['isEditing']=!0x1,_0x3245e6&&this['revisionActionsView']&&this['revisionActionsView']['focus']();}['_hasKeyboardFocus'](){const _0x18d7fc=this['element']['getRootNode']()['activeElement'];return!!_0x18d7fc&&this['element']['contains'](_0x18d7fc)&&_0x18d7fc['matches'](':focus-visible');}['render'](){super['render']();const _0x4d9f75=this['revisionNameView']['fieldView']['element'];this['_keystrokes']['listenTo'](this['element']),this['_keystrokes']['set']('Enter',(_0x3f9167,_0x2ed9fe)=>{this['isEditing']&&_0x3f9167['target']===_0x4d9f75&&(this['_saveName'](),_0x2ed9fe());}),this['_keystrokes']['set']('Esc',(_0x2a7cd5,_0x22ca10)=>{this['isEditing']&&(this['_finishEditing'](),_0x22ca10());});}destroy(){super['destroy'](),this['_keystrokes']['destroy']();}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function zt(_0x2da618,_0x166ac3){const _0x52a246=pt['fromJSDate'](_0x2da618)['setLocale'](_0x166ac3),_0x8af839=pt['local'](),_0x1bf52f=_0x8af839['minus']({'days':0x1})['startOf']('day');let _0x486623,_0x430aef;return _0x52a246['hasSame'](_0x8af839,'day')?(_0x486623=_0x52a246['startOf']('day')['toJSDate'](),_0x430aef=_0x52a246['toRelativeCalendar']()):_0x52a246['hasSame'](_0x1bf52f,'day')?(_0x486623=_0x1bf52f['toJSDate'](),_0x430aef=_0x52a246['toRelativeCalendar']()):_0x52a246['hasSame'](_0x8af839,'week')?(_0x486623=_0x52a246['startOf']('week')['toJSDate'](),_0x430aef=_0x52a246['weekdayLong']||''):_0x52a246['hasSame'](_0x8af839,'year')?(_0x486623=_0x52a246['startOf']('month')['toJSDate'](),_0x430aef=_0x52a246['monthLong']||''):(_0x486623=_0x52a246['startOf']('year')['toJSDate'](),_0x430aef=String(_0x52a246['year'])),{'startDate':_0x486623,'localizedPeriodName':_0x430aef};}var Zt=class extends ft{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x4462c7,_0x436800,_0x15d989,_0xb33830,_0x52f451){super(_0x4462c7);const _0x3ccd07=zt(_0x436800,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x436800,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x15d989,this['_requireRevisionName']=_0xb33830,this['_showAISource']=_0x52f451,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':_0x3ccd07}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x204082){const _0x248c39=new Qt(this['locale'],_0x204082,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x248c39);}['removeRevision'](_0x10acbc){const _0x702242=this['revisionViews']['find'](_0x5130d9=>_0x5130d9['id']===_0x10acbc['id']);this['revisionViews']['remove'](_0x702242);}},ti=class extends ft{constructor(_0x3ffef4){super(_0x3ffef4);const _0xa14c8=new tt();_0xa14c8['content']=_0x199aa8,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0xa14c8,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[At(_0x3ffef4,'Revision\x20history')]}]});}},ii=class extends ft{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x21b9f9,_0x4e5bb4,_0x58940e,_0x490cb8,_0x5652d9){super(_0x21b9f9);const _0x4514d0=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4e5bb4,this['_revisionActions']=_0x58940e,this['_requireRevisionName']=_0x490cb8,this['_showAISource']=_0x5652d9,this['on']('select',(_0xdd8e01,_0x3ee7b1)=>{this['fire']('revisionSelected',_0x3ee7b1);}),this['on']('setName',(_0x43fdbf,_0x50e57f)=>{this['fire']('revisionSetName',_0x50e57f);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar'],'dir':_0x21b9f9['uiLanguageDirection']},'children':[new ti(_0x21b9f9),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4514d0['if']('isEnabled','ck-disabled',_0x58ecbc=>!_0x58ecbc)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x597aa7 of this['_revisions'])this['_addRevision'](_0x597aa7);this['_revisions']['on']('add',(_0x14264f,_0xdfc17c)=>{this['_addRevision'](_0xdfc17c);}),this['_revisions']['on']('remove',(_0x3d4c85,_0x30625e)=>{this['_removeRevision'](_0x30625e);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x20d200=>_0x20d200['revisionViews']['map'](_0x365481=>_0x365481))['flat']();}selectRevision(_0x4e86bb){for(const _0x474aef of this['revisionViews'])_0x4e86bb&&_0x4e86bb['id']===_0x474aef['id']?_0x474aef['select']():_0x474aef['deselect']();}highlightRevisions(_0x35d01d){for(const _0x4b8855 of this['revisionViews'])_0x35d01d['some'](({id:_0x226671})=>_0x226671===_0x4b8855['id'])?_0x4b8855['highlight']():_0x4b8855['unhighlight']();}['_addRevision'](_0xac49c6){const _0x3bfb20=zt(_0xac49c6['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1b1781=this['_getTimePeriodViewByStartDate'](_0x3bfb20);_0x1b1781||(_0x1b1781=new Zt(this['locale'],_0x3bfb20,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x1b1781)),_0x1b1781['addRevision'](_0xac49c6);}['_removeRevision'](_0x38f413){const _0x175439=zt(_0x38f413['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x175439)['removeRevision'](_0x38f413);}_getTimePeriodViewByStartDate(_0x2b497a){return this['timePeriodViews']['find'](_0x2bd5d6=>_0x2bd5d6['startDate']['getTime']()===_0x2b497a['getTime']());}},si=class RevisionsSidebar extends _0x53e262{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['nameRevision','compareAgainstSelected','restoreRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ut];}constructor(
|
|
30
|
-
_0x3dacdc(_0x33d07e);var ai=class extends ri{['_ui'];get['ui'](){return this['_ui'];}constructor(_0xbf7f3,_0x406fc4){super(_0x406fc4),this['sourceElement']=_0xbf7f3,this['model']['document']['createRoot']();const _0xaf491a=new oi(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ni(this,_0xaf491a);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x248ecd,_0x5118a1){const _0x1024df=new this(_0x248ecd,_0x5118a1);return await _0x1024df['initPlugins'](),await _0x1024df['ui']['init'](_0x248ecd),await _0x1024df['data']['init'](_0x1024df['config']['get']('initialData')||''),_0x1024df['fire']('ready'),_0x1024df;}};const hi=['RevisionHistoryUI','RestrictedEditingMode'];var ci=class extends _0x3c4294{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3bfd62){super(_0x3bfd62),this['result']='end',_0x3bfd62['editing']['view']['_overlayModeHint']='auto',_0x3bfd62['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},li=class extends _0x3c4294{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Et,Dt];}constructor(_0x29a24a){if(super(_0x29a24a),!this['editor']['config']['get']('revisionHistory'))throw new _0x42c032('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4e3e32=>this['_showRevisionViewer']({..._0x4e3e32,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x10ed5e=>this['_closeRevisionViewer'](_0x10ed5e)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x538d30=>this['_restoreRevision'](_0x538d30)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x43893f){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x43893f;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x1200e9){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1200e9);}getRevision(_0x31b2f5){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x31b2f5);}getRevisions(_0x2daf3b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2daf3b||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x5df0f9=this['editor'],_0x22dff0=_0x16e77b(_0x5df0f9,hi),_0x5011de=_0x5df0f9['plugins']['get']('RevisionTracker'),_0x3237b0=_0x5df0f9['plugins']['get'](_0x2c9bd7)['users'];return _0x22dff0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x22dff0['lazyRoots'],(_0x22dff0['plugins']['push'](ci,Ut,qt,class RevisionViewerInit extends _0x3c4294{static get requires(){return[Ut,_0x2c9bd7];}init(){const _0x1855f3=this['editor']['plugins']['get'](_0x2c9bd7);for(const _0x509c60 of _0x3237b0)_0x509c60['isAnonymous']||_0x1855f3['getUser'](_0x509c60['id'])||_0x1855f3['addUser'](_0x509c60);const _0x153475=_0x5011de['repository']['getRevisions']();let _0x7cfb4b=null;const _0x3d7a60=this['editor']['plugins']['get']('RevisionViewer');if(_0x3d7a60['adapter']=_0x5011de['adapter'],_0x3d7a60['bind']('isEnabled')['to'](_0x5011de),_0x5df0f9['plugins']['has']('CommentsRepository')){const _0x4657a2=_0x5df0f9['plugins']['get']('CommentsRepository');_0x3d7a60['_getVisibleCommentThreadIds']=()=>new Set(_0x4657a2['getCommentThreads']()['filter'](_0x21581c=>!_0x21581c['isResolved'])['map'](_0x471161=>_0x471161['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x5df0f9,'isReadOnly',_0x5d129b=>!_0x5d129b);for(const _0x5e3899 of _0x153475){const _0x33c838=null===_0x5e3899['creator'];if(_0x33c838&&_0x5e3899['toVersion']===_0x5e3899['fromVersion'])continue;const _0x34d039=_0x5e3899['toJSON']();_0x3d7a60['addRevisionData'](_0x34d039,(_0x476031,_0x3f583c,_0x183dd4)=>{if(_0x33c838){if(_0x7cfb4b)_0x7cfb4b['_update'](_0x476031,_0x3f583c);else{if(!_0x3f583c){const _0xe109f8=_0x183dd4['toJSON']();_0xe109f8['id']=_0x5a9e0c(),_0x5011de['saveRevision'](_0xe109f8,_0x183dd4['toVersion'])['then'](_0x4ab805=>{_0x7cfb4b=_0x4ab805;});}}}else _0x5e3899['_update'](_0x476031,_0x3f583c);});}}},si),_0x22dff0);}['_enhanceShowRevisionViewerCallback'](){const _0x4e267d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1cf704=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x1cf704['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x43df54=this['editor']['plugins']['get']('Dialog');_0x43df54['isOpen']&&_0x43df54['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x53c970=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x21ade9 of _0x53c970)_0x21ade9['class']=_0x21ade9['class']?_0x21ade9['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x16adbf=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x16adbf&&_0x16adbf['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x121f6d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x121f6d&&_0x121f6d['setAttribute']('tabindex','-1');}}const _0x4f8707=this['_getRevisionViewerEditorConfig']();return _0x4e267d(_0x4f8707)['then'](_0x123f1a=>(this['_viewerEditor']=_0x123f1a,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'),_0x123f1a))['catch'](_0x4750ac=>(console['error'](_0x4750ac),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x351b01=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 _0x21a293=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x97497a of _0x21a293)_0x97497a['class']='ck-tab-panel_disabled'===_0x97497a['class']?'':_0x97497a['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x40c921=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x40c921&&_0x40c921['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1792de=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1792de&&_0x1792de['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x351b01(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3598f0=this['editor']['plugins']['get']('Annotations');_0x3598f0['refreshVisibility'](),_0x3598f0['refreshPositioning']();}});});}['_showRevisionViewer'](_0x39e767){const _0x31b84c=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3055c2=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x54ed84=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ai['create'](_0x54ed84,_0x39e767)['then'](_0x28e424=>(_0x3055c2['style']['display']='block',_0x31b84c['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x28e424));}['_closeRevisionViewer'](_0x49d980){const _0x3b50b9=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3b50b9['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x49d980['destroy']();}async _restoreRevision(_0xfdd627){const _0x4be6d8=this['editor'],_0x3171a5=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x401a27=_0x4be6d8['plugins']['get']('RevisionTracker'),_0x4142a4=_0x4be6d8['plugins']['get']('RevisionHistoryUtils'),_0x4ab2cb=_0x3171a5['repository']['getRevision'](_0xfdd627);let _0x2dd9c3,_0x201178,_0x10a513;try{await _0x4142a4['loadRevisionData'](_0x4ab2cb,this['adapter']),_0x2dd9c3=_0x4142a4['getRevisionDocumentData'](_0x4ab2cb),_0x201178=_0x4142a4['getRevisionRootsAttributes'](_0x4ab2cb);}catch(_0x44d8c7){return void console['error'](_0x44d8c7);}_0x4be6d8['model']['change'](_0x42262f=>{for(const _0x550afe of Array['from'](_0x4be6d8['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x42262f['removeMarker'](_0x550afe);}),_0x3171a5['isReady']=!0x1,_0x4be6d8['model']['enqueueChange'](_0x4d18f7=>{_0x4d18f7['setSelection'](null),_0x4d18f7['removeSelectionAttribute'](_0x4be6d8['model']['document']['selection']['getAttributeKeys']());const _0x440336=Object['keys'](_0x2dd9c3);for(const _0x4e8cc3 of _0x4be6d8['model']['document']['roots'])'$graveyard'!=_0x4e8cc3['rootName']&&_0x4e8cc3['isAttached']()&&!_0x440336['includes'](_0x4e8cc3['rootName'])&&_0x4d18f7['detachRoot'](_0x4e8cc3);for(const _0x53f6a1 of _0x440336){let _0x41d75a=_0x4be6d8['model']['document']['getRoot'](_0x53f6a1);if(!_0x41d75a||!_0x41d75a['isAttached']()){const _0x2b9ee0=_0x4ab2cb['diffData']?.[_0x53f6a1]?.['rootElementName']||'$root';_0x41d75a=_0x4d18f7['addRoot'](_0x53f6a1,_0x2b9ee0);}const _0xcb95b2=_0x201178[_0x53f6a1],_0x35556e=Object['keys'](_0xcb95b2),_0x48e616=_0x2dd9c3[_0x53f6a1];for(const _0x305cc5 of _0x41d75a['getAttributeKeys']())_0x35556e['includes'](_0x305cc5)||_0x4d18f7['removeAttribute'](_0x305cc5,_0x41d75a);for(const _0x239b2a of _0x35556e)_0x4d18f7['setAttribute'](_0x239b2a,_0x201178[_0x53f6a1][_0x239b2a],_0x41d75a);_0x4d18f7['remove'](_0x4d18f7['createRangeIn'](_0x41d75a)),_0x4d18f7['insert'](_0x4be6d8['data']['parse'](_0x48e616,_0x41d75a),_0x41d75a,0x0);}});const _0x22aa00=At(_0x4be6d8['locale'],'Restored');if(_0x4ab2cb['name'])_0x10a513=-0x1==_0x4ab2cb['name']['indexOf'](_0x22aa00)?_0x22aa00+':\x20'+_0x4ab2cb['name']:_0x4ab2cb['name'];else _0x10a513=_0x22aa00+':\x20'+(_0x4ab2cb['createdAt']['toLocaleDateString'](_0x4be6d8['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4ab2cb['createdAt']['toLocaleTimeString'](_0x4be6d8['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x401a27['saveRevision']({'name':_0x10a513}),_0x3171a5['isReady']=!0x0,_0x4be6d8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,bt as Revision,li as RevisionHistory,Dt as RevisionHistoryUI,kt as RevisionHistoryUtils,Et as RevisionTracker,Ut as RevisionViewer,ai as RevisionViewerEditor,ci as RevisionViewerIntegration,Kt as RevisionViewerLoadingOverlay,qt as RevisionViewerUI,Rt as RevisionsRepository,si as RevisionsSidebar,$t as ShowChangeCommand};
|
|
29
|
+
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ut];}constructor(_0x39b609){super(_0x39b609),this['_revisionViewer']=_0x39b609['plugins']['get'](Ut),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x4b82d3=this['_revisionsRepository']['_revisions'],_0x1b13a2=this['_createRevisionActions'](),_0x42654e=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ii(this['editor']['locale'],_0x4b82d3,_0x1b13a2,this['editor']['config']['get']('revisionHistory.requireRevisionName'),'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x368478,_0x5444e6)=>{_0x5444e6['revisionViews']['on']('add',(_0x4364bb,_0x368d01)=>{_0x368d01['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)),_0x42654e['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x3bfe8a=this['_revisionsRepository']['getRevision'](0x0);if(_0x3bfe8a){const _0xea2caf=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3bfe8a['id']);this['_revisionViewer']['compare'](_0x3bfe8a,_0xea2caf);}}_handleRevisionSelected(_0x5af3ad,_0x44223f){const _0x527203=this['_revisionsRepository']['getRevision'](_0x44223f['id']),_0x4f741f=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x527203['id']);this['_revisionViewer']['compare'](_0x527203,_0x4f741f);}_handleRevisionSetName(_0x2d0a9c,_0x1bca58){this['_revisionsRepository']['getRevision'](_0x1bca58['id'])['setName'](_0x1bca58['name']);}['_handleDiffChange'](_0x265733,_0x4b635e,_0x45ceb4){const _0x54153e=this['_revisionsRepository']['getRevisionsInDiff'](_0x45ceb4);_0x54153e['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x54153e),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x54153e[0x0]));}_createRevisionActions(){const _0x71125=this['editor'],_0x1cd786=RevisionsSidebar['availableRevisionActions'],_0xd8276e=_0x71125['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0xd8276e['length'])return _0xd8276e['map'](_0x2f17b2=>{const _0x4d3815='string'==typeof _0x2f17b2?Object['assign']({},_0x1cd786[_0x2f17b2]):_0x2f17b2;return _0x4d3815['action']=_0x4d3815['action']['bind'](this,_0x71125),_0x4d3815['isVisible']&&(_0x4d3815['isVisible']=_0x4d3815['isVisible']['bind'](this,_0x71125)),_0x4d3815;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4aaf1e},_0x2f4dfb)=>{const _0x8ab4c8=_0x4aaf1e['get'](Ut),_0x3892f5=_0x8ab4c8['repository'];let _0xe255d8=_0x8ab4c8['diff']['newRevisionId'],_0x2335fd=_0x2f4dfb['id'];_0x3892f5['getIndex'](_0xe255d8)>_0x3892f5['getIndex'](_0x2335fd)&&([_0xe255d8,_0x2335fd]=[_0x2335fd,_0xe255d8]),_0x8ab4c8['compare'](_0xe255d8,_0x2335fd);},'isVisible':({plugins:_0x4e7050},_0x323f58)=>{const _0x1a8287=_0x4e7050['get'](Ut);return!(_0x1a8287['repository']['getRevisionsInDiff'](_0x1a8287['diff'])['length']>0x2)&&!_0x323f58['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3bc9d5,{id:_0x2d7e4d})=>{_0x3bc9d5['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2d7e4d);},'isVisible':({plugins:_0x425860},_0x50c8d8)=>!!_0x425860['get'](Ut)['repository']['getLaterVisibleRevision'](_0x50c8d8['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':(_0x38b49d,_0x32cedb)=>{_0x32cedb['isEditing']=!0x0,_0x32cedb['revisionNameView']['focus'](),_0x32cedb['revisionNameView']['fieldView']['select']();}}};}var ni=class extends _0x298c7a{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0xef08f2,_0xdeb761){super(_0xef08f2),this['_view']=_0xdeb761,this['_toolbarConfig']=_t(_0xef08f2['config']['get']('toolbar')),this['_elementReplacer']=new _0x5c7f20();}get element(){return this['view']['element'];}init(_0x10ee3f){const _0x2237ae=this['editor'],_0x1f5a8a=this['view'],_0x2af1f3=_0x2237ae['editing']['view'],_0x35bba9=_0x1f5a8a['editable'];_0x35bba9['name']=_0x2af1f3['document']['getRoot']()['rootName'],_0x35bba9['isMainFrameEditingRoot']=!0x0,_0x1f5a8a['render']();const _0xb0435f=_0x35bba9['element'];this['setEditableElement'](_0x35bba9['name'],_0xb0435f),_0x1f5a8a['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2af1f3['attachDomRoot'](_0xb0435f),this['_elementReplacer']['replace'](_0x10ee3f,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x46fa19=this['view'],_0x59faa0=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x59faa0['detachDomRoot'](_0x46fa19['editable']['name']),_0x46fa19['destroy']();}_initToolbar(){const _0x367535=this['view'];_0x367535['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x367535['stickyPanel']['limiterElement']=_0x367535['element'],_0x367535['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xf8f0d1})=>_0xf8f0d1),_0x367535['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x367535['toolbar']);}},oi=class extends _0x5d3dd{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x32777e,_0x4d42a9,_0x46a567={}){super(_0x32777e),this['stickyPanel']=new ct(_0x32777e),this['toolbar']=new ut(_0x32777e,{'shouldGroupWhenFull':_0x46a567['shouldToolbarGroupWhenFull']}),this['_editable']=new it(_0x32777e,_0x4d42a9),this['extendTemplate']({'attributes':{'class':'ck-revision-viewer-editor'}});}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const ri=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x92ff9b(_0x1ed76d);var ai=class extends ri{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x454cba,_0x32b023){super(_0x32b023),this['sourceElement']=_0x454cba,this['model']['document']['createRoot']();const _0x393822=new oi(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ni(this,_0x393822);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x50ed5c,_0x5ee09e){const _0x9ac94=new this(_0x50ed5c,_0x5ee09e);return await _0x9ac94['initPlugins'](),await _0x9ac94['ui']['init'](_0x50ed5c),await _0x9ac94['data']['init'](_0x9ac94['config']['get']('initialData')||''),_0x9ac94['fire']('ready'),_0x9ac94;}};const hi=['RevisionHistoryUI','RestrictedEditingMode'];var ci=class extends _0x53e262{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28d092){super(_0x28d092),this['result']='end',_0x28d092['editing']['view']['_overlayModeHint']='auto',_0x28d092['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},li=class extends _0x53e262{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Et,Dt];}constructor(_0x45f31a){if(super(_0x45f31a),!this['editor']['config']['get']('revisionHistory'))throw new _0x2e47d1('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x59a827=>this['_showRevisionViewer']({..._0x59a827,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x5284c4=>this['_closeRevisionViewer'](_0x5284c4)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x335109=>this['_restoreRevision'](_0x335109)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x38cdbe){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x38cdbe;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x64edbb){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x64edbb);}getRevision(_0x5c505d){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5c505d);}getRevisions(_0x3b83bc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3b83bc||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x1159a1=this['editor'],_0x9216c2=_0x2c8a77(_0x1159a1,hi),_0x5138d5=_0x1159a1['plugins']['get']('RevisionTracker'),_0x17a6df=_0x1159a1['plugins']['get'](_0x9e6c40)['users'];return _0x9216c2['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x9216c2['lazyRoots'],(_0x9216c2['plugins']['push'](ci,Ut,qt,class RevisionViewerInit extends _0x53e262{static get requires(){return[Ut,_0x9e6c40];}init(){const _0x33b762=this['editor']['plugins']['get'](_0x9e6c40);for(const _0x401379 of _0x17a6df)_0x401379['isAnonymous']||_0x33b762['getUser'](_0x401379['id'])||_0x33b762['addUser'](_0x401379);const _0x92d00c=_0x5138d5['repository']['getRevisions']();let _0x283cb3=null;const _0x1e5e56=this['editor']['plugins']['get']('RevisionViewer');if(_0x1e5e56['adapter']=_0x5138d5['adapter'],_0x1e5e56['bind']('isEnabled')['to'](_0x5138d5),_0x1159a1['plugins']['has']('CommentsRepository')){const _0x4f74da=_0x1159a1['plugins']['get']('CommentsRepository');_0x1e5e56['_getVisibleCommentThreadIds']=()=>new Set(_0x4f74da['getCommentThreads']()['filter'](_0x4cf14c=>!_0x4cf14c['isResolved'])['map'](_0xc1049=>_0xc1049['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x1159a1,'isReadOnly',_0x494369=>!_0x494369);for(const _0x2eb090 of _0x92d00c){const _0x42cb3c=null===_0x2eb090['creator'];if(_0x42cb3c&&_0x2eb090['toVersion']===_0x2eb090['fromVersion'])continue;const _0x400b5f=_0x2eb090['toJSON']();_0x1e5e56['addRevisionData'](_0x400b5f,(_0x250a62,_0x1dd57d,_0x1f39cc)=>{if(_0x42cb3c){if(_0x283cb3)_0x283cb3['_update'](_0x250a62,_0x1dd57d);else{if(!_0x1dd57d){const _0x475612=_0x1f39cc['toJSON']();_0x475612['id']=_0x45072e(),_0x5138d5['saveRevision'](_0x475612,_0x1f39cc['toVersion'])['then'](_0xf6ce12=>{_0x283cb3=_0xf6ce12;});}}}else _0x2eb090['_update'](_0x250a62,_0x1dd57d);});}}},si),_0x9216c2);}['_enhanceShowRevisionViewerCallback'](){const _0x2d9cff=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4fe6c6=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4fe6c6['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5128bd=this['editor']['plugins']['get']('Dialog');_0x5128bd['isOpen']&&_0x5128bd['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x12ad77=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4735f2 of _0x12ad77)_0x4735f2['class']=_0x4735f2['class']?_0x4735f2['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0xc63655=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xc63655&&_0xc63655['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x50342b=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x50342b&&_0x50342b['setAttribute']('tabindex','-1');}}const _0x50cde1=this['_getRevisionViewerEditorConfig']();return _0x2d9cff(_0x50cde1)['then'](_0xb0b28e=>(this['_viewerEditor']=_0xb0b28e,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'),_0xb0b28e))['catch'](_0x311204=>(console['error'](_0x311204),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5c5dec=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 _0x233aab=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x49f0c8 of _0x233aab)_0x49f0c8['class']='ck-tab-panel_disabled'===_0x49f0c8['class']?'':_0x49f0c8['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x38ac6d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x38ac6d&&_0x38ac6d['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x9786e7=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x9786e7&&_0x9786e7['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5c5dec(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xc11ec8=this['editor']['plugins']['get']('Annotations');_0xc11ec8['refreshVisibility'](),_0xc11ec8['refreshPositioning']();}});});}['_showRevisionViewer'](_0x5a24a2){const _0x398fe7=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x47030d=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2528c1=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ai['create'](_0x2528c1,_0x5a24a2)['then'](_0x5dc093=>(_0x47030d['style']['display']='block',_0x398fe7['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x5dc093));}['_closeRevisionViewer'](_0x4290bb){const _0x1f2c9d=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x1f2c9d['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4290bb['destroy']();}async _restoreRevision(_0x48f08f){const _0x1b0252=this['editor'],_0x57157b=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x970086=_0x1b0252['plugins']['get']('RevisionTracker'),_0xb69596=_0x1b0252['plugins']['get']('RevisionHistoryUtils'),_0x31e1c1=_0x57157b['repository']['getRevision'](_0x48f08f);let _0x40b21f,_0x25499a,_0x163e26;try{await _0xb69596['loadRevisionData'](_0x31e1c1,this['adapter']),_0x40b21f=_0xb69596['getRevisionDocumentData'](_0x31e1c1),_0x25499a=_0xb69596['getRevisionRootsAttributes'](_0x31e1c1);}catch(_0x45d2d4){return void console['error'](_0x45d2d4);}_0x1b0252['model']['change'](_0x4e59ac=>{for(const _0x5c7bba of Array['from'](_0x1b0252['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4e59ac['removeMarker'](_0x5c7bba);}),_0x57157b['isReady']=!0x1,_0x1b0252['model']['enqueueChange'](_0x4ecc9=>{_0x4ecc9['setSelection'](null),_0x4ecc9['removeSelectionAttribute'](_0x1b0252['model']['document']['selection']['getAttributeKeys']());const _0x15e610=Object['keys'](_0x40b21f);for(const _0x24f776 of _0x1b0252['model']['document']['roots'])'$graveyard'!=_0x24f776['rootName']&&_0x24f776['isAttached']()&&!_0x15e610['includes'](_0x24f776['rootName'])&&_0x4ecc9['detachRoot'](_0x24f776);for(const _0x6e8481 of _0x15e610){let _0x2f06a3=_0x1b0252['model']['document']['getRoot'](_0x6e8481);if(!_0x2f06a3||!_0x2f06a3['isAttached']()){const _0xc27598=_0x31e1c1['diffData']?.[_0x6e8481]?.['rootElementName']||'$root';_0x2f06a3=_0x4ecc9['addRoot'](_0x6e8481,_0xc27598);}const _0x208009=_0x25499a[_0x6e8481],_0x364a24=Object['keys'](_0x208009),_0x486ba5=_0x40b21f[_0x6e8481];for(const _0x50f256 of _0x2f06a3['getAttributeKeys']())_0x364a24['includes'](_0x50f256)||_0x4ecc9['removeAttribute'](_0x50f256,_0x2f06a3);for(const _0x1e1717 of _0x364a24)_0x4ecc9['setAttribute'](_0x1e1717,_0x25499a[_0x6e8481][_0x1e1717],_0x2f06a3);_0x4ecc9['remove'](_0x4ecc9['createRangeIn'](_0x2f06a3)),_0x4ecc9['insert'](_0x1b0252['data']['parse'](_0x486ba5,_0x2f06a3),_0x2f06a3,0x0);}});const _0x14a2e1=At(_0x1b0252['locale'],'Restored');if(_0x31e1c1['name'])_0x163e26=-0x1==_0x31e1c1['name']['indexOf'](_0x14a2e1)?_0x14a2e1+':\x20'+_0x31e1c1['name']:_0x31e1c1['name'];else _0x163e26=_0x14a2e1+':\x20'+(_0x31e1c1['createdAt']['toLocaleDateString'](_0x1b0252['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x31e1c1['createdAt']['toLocaleTimeString'](_0x1b0252['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x970086['saveRevision']({'name':_0x163e26}),_0x57157b['isReady']=!0x0,_0x1b0252['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,bt as Revision,li as RevisionHistory,Dt as RevisionHistoryUI,kt as RevisionHistoryUtils,Et as RevisionTracker,Ut as RevisionViewer,ai as RevisionViewerEditor,ci as RevisionViewerIntegration,Kt as RevisionViewerLoadingOverlay,qt as RevisionViewerUI,Rt as RevisionsRepository,si as RevisionsSidebar,$t as ShowChangeCommand};
|