@ckeditor/ckeditor5-revision-history 49.0.0-alpha.0 → 49.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.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.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
|
-
_0x3e0f7e();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x1aece3){super(),this['id']=_0x1aece3['id']||_0x164a82(),this['creator']=_0x1aece3['creator']||null,this['authors']=_0x1aece3['authors']||[],this['diffData']=_0x1aece3['diffData']||null,this['toVersion']=_0x1aece3['toVersion']||0x0,this['fromVersion']=_0x1aece3['fromVersion']||0x0,this['set']('name',_0x1aece3['name']||''),this['set']('createdAt',_0x1aece3['createdAt']||new Date()),this['set']('attributes',_0x1aece3['attributes']||{});}setName(_0x5e907f){this['_update']({'name':_0x5e907f});}setAttribute(_0x18c3c3,_0x19fe8f){const _0x404f3c=_0x2b595f(this['attributes']);_0x87871a(_0x404f3c,_0x18c3c3,_0x19fe8f),this['_update']({'attributes':_0x404f3c});}removeAttribute(_0x4e8673){const _0x5ea1fa=_0x2b595f(this['attributes']);_0x3f4e7d(_0x5ea1fa,_0x4e8673),this['_update']({'attributes':_0x5ea1fa});}_update(_0x2c4519,_0x58307b=!0x1){let _0x483205=!0x1;const _0xc92ab5={'id':this['id']};for(const _0x4cc66b of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x3a7713=_0x2c4519[_0x4cc66b];void 0x0!==_0x3a7713&&_0x3a7713!==this[_0x4cc66b]&&(this[_0x4cc66b]=_0x3a7713,_0xc92ab5[_0x4cc66b]=_0x3a7713,_0x483205=!0x0);}_0x483205&&(_0xc92ab5['authors']&&(_0xc92ab5['authorsIds']=_0xc92ab5['authors']['map'](_0x8e57a8=>_0x8e57a8['id']),delete _0xc92ab5['authors']),this['fire']('_update',_0xc92ab5,_0x58307b));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x44e5ce=>_0x44e5ce['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x149c71{['_revisions'];static get requires(){return[_0x1b7fe0];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x3477c1){super(_0x3477c1),this['_revisions']=new _0x29b214();}afterInit(){!async function(_0x40f311){const _0x12f190='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x17247d=0xeb829,_0x5e4b37=0x79710,_0x529986={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0xd0c073(_0x2bdce7){const _0x2313d3=new window['Promise'](_0x25daf5=>{_0x2bdce7['once']('ready',_0x25daf5);}),_0x15e3ea=window['Date']['now'](),_0x1c1405=_0x2bdce7['config']['get']('licenseKey');async function _0x4fded2(){let _0xf713a9,_0xfe138b=null,_0x59e054=null;try{return'GPL'==_0x1c1405?'NotAllowed':(_0xf713a9=_0x241ff3(),_0xf713a9?(_0xf713a9['usageEndpoint']&&(_0x59e054=_0x26fdd4(_0xf713a9['usageEndpoint'],_0xf713a9['jti'])),await _0x4853d4()?_0x1dc021()?_0x28e4a5()?'Expired':_0x30eb37()?('evaluation'==_0xf713a9['licenseType']&&(_0xfe138b=_0x5932b2('EvaluationLimit')),await _0x2b6f04()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x28e4a5(){const _0x22d035=['evaluation','trial']['includes'](_0xf713a9['licenseType'])?_0x15e3ea/0x3e8:0xe10*_0x5e4b37;return _0xf713a9['exp']<_0x22d035;}function _0x1dc021(){const _0x36dade=_0xf713a9['features'];if(!_0x36dade)return!0x1;if(_0x36dade['includes']('*'))return!0x0;if(_0x36dade['includes']('RH'))return!0x0;if(_0x36dade['includes']('RRH')){if(_0x39911b())return!0x0;if(_0x5b42f5()||_0x1c530f())return!0x0;}return!0x1;}function _0x30eb37(){const _0x264aa1=_0xf713a9['licensedHosts'];if(!_0x264aa1||0x0==_0x264aa1['length'])return!0x0;const {hostname:_0x1808f8}=new URL(window['location']['href']);if(_0x264aa1['includes'](_0x1808f8))return!0x0;const _0x10633b=_0x1808f8['split']('.');return _0x264aa1['filter'](_0x5238b9=>_0x5238b9['includes']('*'))['map'](_0x18aad9=>_0x18aad9['split']('.'))['filter'](_0x5f18ae=>_0x5f18ae['length']<=_0x10633b['length'])['map'](_0x3a54eb=>Array(_0x10633b['length']-_0x3a54eb['length'])['fill']('*'===_0x3a54eb[0x0]?'*':'')['concat'](_0x3a54eb))['some'](_0x1b1520=>_0x10633b['every']((_0xfa82ed,_0x16b67d)=>_0x1b1520[_0x16b67d]===_0xfa82ed||'*'===_0x1b1520[_0x16b67d]));}function _0x2b6f04(){return _0xfe138b&&_0x59e054?new window['Promise']((_0x4013e4,_0xa7e14d)=>{_0xfe138b['then'](_0x4013e4,_0xa7e14d),_0x59e054['then'](_0x3953a2=>{'Valid'!=_0x3953a2&&_0x4013e4(_0x3953a2);},_0xa7e14d);}):_0xfe138b||_0x59e054||'Valid';}}function _0x26fdd4(_0x1b6893,_0x200d69){return new window['Promise'](_0x525550=>{if(_0x3b0e30())return _0x525550('Valid');_0x4838ec(),_0x2bdce7['decorate']('_sendUsageRequest');let _0x382fa2=!0x1;const _0x39ad08=_0x164a82();function _0xa7983c(_0x292772){return!!_0x292772&&('object'==typeof _0x292772||'function'==typeof _0x292772)&&'function'==typeof _0x292772['then']&&'function'==typeof _0x292772['catch'];}function _0x5752a4(_0x5c426f){_0x3d9697(_0x5c426f)['then'](_0x5e1453=>_0x5e1453&&'ok'==_0x5e1453['status']?_0x16d91e(_0x5913a9(_0x39ad08+_0x200d69))!=_0x5e1453['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2244a4=>(_0x9bf308(),_0x2244a4),()=>{const _0x4ea707=_0x4df46f();return null==_0x4ea707?(_0x9bf308(),'Valid'):_0x15e3ea-_0x4ea707>0x240c8400?'UsageLimit':'Valid';})['then'](_0x525550)['catch'](()=>{_0x525550('UsageLimit');});const _0x662335=0x36ee80;function _0x9bf308(){const _0x3db711='llct-'+_0x16d91e(_0x5913a9(_0x1b6893)),_0x3a964a=_0x160645(_0x16d91e(window['Math']['ceil'](_0x15e3ea/_0x662335)));window['localStorage']['setItem'](_0x3db711,_0x3a964a);}function _0x4df46f(){const _0x5552fb='llct-'+_0x16d91e(_0x5913a9(_0x1b6893)),_0x575f3d=window['localStorage']['getItem'](_0x5552fb);return _0x575f3d?window['parseInt'](_0x160645(_0x575f3d),0x10)*_0x662335:null;}function _0x3d9697(_0x48845d){return new window['Promise']((_0x168cfa,_0x1329dc)=>{_0x48845d['then'](_0x168cfa,_0x1329dc),window['setTimeout'](_0x1329dc,0x1d4c0);});}}_0x2bdce7['on']('_sendUsageRequest',(_0x25ca85,_0x4fe4b4)=>{if(_0x4fe4b4[0x0]!=_0x1b6893)return _0x525550('UsageLimit');_0x4fe4b4[0x1]={..._0x4fe4b4[0x1],'requestId':_0x39ad08};},{'priority':'high'}),_0x2bdce7['on']('_sendUsageRequest',_0xab44e8=>{_0xa7983c(_0xab44e8['return'])&&(_0x382fa2=!0x0,_0x5752a4(_0xab44e8['return']));},{'priority':'low'}),_0x2313d3['then'](()=>{_0x382fa2||_0x525550('UsageLimit');});});function _0x3b0e30(){return'auto'==_0x2bdce7['editing']['view']['_overlayModeHint'];}function _0x4838ec(){_0x2bdce7['editing']['view']['_overlayModeHint']='auto';}}function _0x5932b2(_0x59a14b){const _0x171d79=[new window['Promise'](_0x300124=>setTimeout(_0x300124,0x93ecc)),_0x2313d3['then'](()=>new window['Promise'](_0x1e6c27=>{const _0x66cbd1=0x7,_0x216ba2=_0x40f311['_revisions'];function _0x1c329e(){_0x216ba2['length']>=_0x66cbd1&&_0x1e6c27();}_0x1c329e(),_0x216ba2['on']('add',_0x1c329e);})),new window['Promise'](_0x2c01b6=>{function _0x106162(){for(const _0x1f4524 in window)if(window['Number']['isNaN'](window['Number'](_0x1f4524))&&window[_0x1f4524]==_0x17247d)return _0x2c01b6();'destroyed'!=_0x2bdce7['state']&&window['setTimeout'](_0x106162,0x1388);}_0x22e7eb('RevisionViewer')&&_0x106162();})];return window['Promise']['race'](_0x171d79)['then'](()=>_0x59a14b);}async function _0x2f063f(){if(await _0x2313d3,_0x22e7eb('RevisionViewer')){const _0x5da832=_0x40f311['getRevision'](0x0),_0x3fbb40=_0x40f311['getEarlierVisibleRevision'](_0x5da832['id']),_0x5ef4d9=_0x18e757('RevisionViewer');return await _0x5ef4d9['compare'](_0x5da832['id'],_0x3fbb40?_0x3fbb40['id']:null,!0x0),_0x5ef4d9['unbind']('isEnabled'),_0x5ef4d9['isEnabled']=!0x1,_0x5ef4d9['compare']=_0xf036b2,void(_0x5ef4d9['_getDiff']=_0xf036b2);}if(_0x22e7eb('RevisionTracker')){const _0x1cd17f=_0x18e757('RevisionTracker');_0x1cd17f['unbind']('isEnabled'),_0x1cd17f['isEnabled']=!0x1,_0x1cd17f['update']=_0xf036b2,_0x1cd17f['saveRevision']=_0xf036b2;}_0x2bdce7['model']['change']=_0xf036b2,_0x2bdce7['model']['enqueueChange']=_0xf036b2,_0x2bdce7['enableReadOnlyMode']('model');}function _0x39911b(){return _0x22e7eb('WebSocketGateway')&&'connected'==_0x18e757('WebSocketGateway')['state'];}function _0x5b42f5(){return _0x22e7eb('RevisionViewerIntegration');}function _0x1c530f(){return _0x22e7eb('TrackChangesDataGetter');}function _0x320202(_0x41bfbb){const _0x38f830=_0x224078();_0x2bdce7[_0x38f830]='revisionHistoryLicenseKey'+_0x41bfbb,_0x41bfbb['endsWith']('Limit')&&(window[_0x224078()]=_0x17247d),'Valid'!=_0x41bfbb&&_0x2f063f();}function _0x224078(){const _0x1f78c0=window['String'](window['performance']['now']())['replace']('.','');let _0x2aeb2e='N';for(let _0x5091bc=0x0;_0x5091bc<_0x1f78c0['length'];_0x5091bc+=0x2){let _0x4b0f95=window['parseInt'](_0x1f78c0['substring'](_0x5091bc,_0x5091bc+0x2));_0x4b0f95>=0x3e&&(_0x4b0f95-=0x3e),_0x2aeb2e+=_0x12f190[_0x4b0f95];}return _0x2aeb2e;}function _0x241ff3(){const _0xc0b566=_0x1c1405['split']('.');if(0x3!=_0xc0b566['length'])return null;return _0x2d8833(_0xc0b566[0x1]);function _0x2d8833(_0x17a9f1){const _0x544076=_0x2ecea7(_0x17a9f1);return _0x544076&&_0x1bea97()?_0x544076:null;function _0x1bea97(){const _0x232cea=_0x544076['jti'],_0x596651=window['parseInt'](_0x232cea['substring'](_0x232cea['length']-0x8),0x10),_0x141baf={..._0x544076,'jti':_0x232cea['substring'](0x0,_0x232cea['length']-0x8)};return delete _0x141baf['vc'],_0x5913a9(_0x141baf)==_0x596651;}}}async function _0x4853d4(){let _0x3d2bf7=!0x0;try{const [_0x594e85,_0x27a626,_0x5baa27]=_0x1c1405['split']('.');return _0x23f4c4(_0x594e85),await _0x13b200(_0x594e85,_0x27a626,_0x5baa27),_0x3d2bf7;}catch{return!0x1;}function _0x23f4c4(_0x404b7c){const _0x4f5156=_0x2ecea7(_0x404b7c);_0x4f5156&&'ES256'==_0x4f5156['alg']||(_0x3d2bf7=!0x1);}async function _0x13b200(_0x44d320,_0x1e93cf,_0x40815e){const _0x2ef16a=window['Uint8Array']['from'](_0x369b7c(_0x40815e),_0x2476f8=>_0x2476f8['charCodeAt'](0x0)),_0x5e5d62=new window['TextEncoder']()['encode'](_0x44d320+'.'+_0x1e93cf),_0x58a3ef=window['crypto']['subtle'];if(!_0x58a3ef)return;const _0x5185d5=await _0x58a3ef['importKey']('jwk',_0x529986,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x58a3ef['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x5185d5,_0x2ef16a,_0x5e5d62)||(_0x3d2bf7=!0x1);}}function _0x2ecea7(_0x130bdf){return _0x130bdf['startsWith']('ey')?JSON['parse'](_0x369b7c(_0x130bdf)):null;}function _0x369b7c(_0x8fe2eb){return window['atob'](_0x8fe2eb['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5913a9(_0x256fdf){let _0x23071=0x1505;function _0x444478(_0x44b415){for(let _0x5d72bf=0x0;_0x5d72bf<_0x44b415['length'];_0x5d72bf++){const _0x256dbb=_0x44b415['charCodeAt'](_0x5d72bf);_0x23071=(_0x23071<<0x5)+_0x23071+_0x256dbb,_0x23071&=_0x23071;}}function _0x2f33b6(_0x894c5f){Array['isArray'](_0x894c5f)?_0x894c5f['forEach'](_0x2f33b6):_0x894c5f&&'object'==typeof _0x894c5f?Object['entries'](_0x894c5f)['sort']()['forEach'](([_0x4f440b,_0x14cb98])=>{_0x444478(_0x4f440b),_0x2f33b6(_0x14cb98);}):_0x444478(window['String'](_0x894c5f));}return _0x2f33b6(_0x256fdf),_0x23071>>>0x0;}function _0x16d91e(_0x3e899e){return _0x3e899e['toString'](0x10)['padStart'](0x8,'0');}function _0x160645(_0x49a349){return _0x49a349['split']('')['reverse']()['join']('');}function _0x22e7eb(_0x570588){return _0x2bdce7['plugins']['has'](_0x570588);}function _0x18e757(_0x24a28c){return _0x2bdce7['plugins']['get'](_0x24a28c);}function _0xf036b2(){}_0x320202(await _0x4fded2());}_0xd0c073(_0x40f311['editor']);}(this);}createRevision(_0x24e76d){const _0x2c8870=this['editor']['plugins']['get']('Users');return new yt({'id':_0x24e76d['id'],'name':_0x24e76d['name'],'creator':_0x24e76d['creatorId']?_0x2c8870['getUser'](_0x24e76d['creatorId']):null,'diffData':_0x24e76d['diffData']||_0x24e76d['data'],'authors':_0x24e76d['authorsIds']['map'](_0x37d38b=>_0x2c8870['getUser'](_0x37d38b)),'createdAt':new Date(_0x24e76d['createdAt']),'attributes':_0x24e76d['attributes'],'fromVersion':_0x24e76d['fromVersion'],'toVersion':_0x24e76d['toVersion']});}['addRevision'](_0x23f91c,_0x54d3ce=0x0){this['_revisions']['add'](_0x23f91c,_0x54d3ce);}getRevision(_0x3e07e9){return this['_revisions']['get'](_0x3e07e9);}getRevisions(_0x5c1db5={'toJSON':!0x1}){const _0x41a8c8=Array['from'](this['_revisions']);return _0x41a8c8['reverse'](),_0x5c1db5['toJSON']?_0x41a8c8['map'](_0xbbf73b=>_0xbbf73b['toJSON']()):_0x41a8c8;}getIndex(_0x39a2e7){return this['_revisions']['getIndex'](_0x39a2e7);}getEarlierVisibleRevision(_0x3bb34d){const [,_0x14425b]=this['getRevisionsIterator'](_0x3bb34d,{'direction':'earlier'});return _0x14425b;}getLaterVisibleRevision(_0x3e187e){const [,_0xbdce5f]=this['getRevisionsIterator'](_0x3e187e,{'direction':'later'});return _0xbdce5f;}getRevisionsInDiff(_0x4310ec){const _0x5f31ad=[];for(const _0x47532e of this['getRevisionsIterator'](_0x4310ec['newRevisionId']))if(_0x5f31ad['push'](_0x47532e),_0x47532e['id']===_0x4310ec['oldRevisionId'])break;return _0x5f31ad;}*getRevisionsIterator(_0x22a65f,{direction:_0x53c31f='earlier',filter:_0x56c51d=()=>!0x0}={}){const _0xe5bc41='earlier'===_0x53c31f?0x1:-0x1;let _0x55b88d=this['_revisions']['get'](_0x22a65f),_0x56aea3=this['getIndex'](_0x55b88d);for(yield _0x55b88d;_0x55b88d;){if(_0x56aea3+=_0xe5bc41,_0x55b88d=this['getRevision'](_0x56aea3),!_0x55b88d)return;_0x56c51d(_0x55b88d)&&(yield _0x55b88d);}}},Rt=class extends _0x149c71{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1fad18,'c'],[_0x4ff23c,'a'],[_0x29f762,'e'],[_0x4e7dc5,'r'],[_0x37e5eb,'u']]);_typeCharToViewClass=new Map([['c',_0x1fad18],['a',_0x4ff23c],['e',_0x29f762],['r',_0x4e7dc5],['u',_0x37e5eb]]);async loadRevisionData(_0x1ee21b,_0x4bdad9){if(_0x1ee21b['diffData']||!_0x4bdad9)return;const _0x4e518f=this['editor']['config']['get']('collaboration.channelId');_0x1ee21b['diffData']=(await _0x4bdad9['getRevision']({'channelId':_0x4e518f,'revisionId':_0x1ee21b['id']}))['diffData'];}getRevisionDocumentData(_0x3a5f00){const _0x1997d3={};for(const _0x979e5f in _0x3a5f00['diffData']){if(_0x3a5f00['diffData'][_0x979e5f]['attachChange']&&!_0x3a5f00['diffData'][_0x979e5f]['attachChange']['isAttached'])continue;const _0x3db3e8=this['_removeRevisionMarkers'](JSON['parse'](_0x3a5f00['diffData'][_0x979e5f]['insertions'])),_0x34c736=this['editor']['editing']['view']['document'],_0x966f61=new _0x183c6a(_0x34c736,_0x3db3e8['map'](_0x3d01e5=>this['_getViewFromDiffObj'](_0x3d01e5,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1997d3[_0x979e5f]=this['editor']['data']['processor']['toData'](_0x966f61),this['editor']['data']['processor']['useFillerType']('default');}return _0x1997d3;}getRevisionRootsAttributes(_0x1c41d4){const _0x437440={};for(const _0x3d0b5e in _0x1c41d4['diffData'])_0x1c41d4['diffData'][_0x3d0b5e]['attachChange']&&!_0x1c41d4['diffData'][_0x3d0b5e]['attachChange']['isAttached']||(_0x437440[_0x3d0b5e]=_0x1c41d4['diffData'][_0x3d0b5e]['attributesAfter']||{});return _0x437440;}getRevisionRootsModelElements(_0x399f21){const _0x2921a5={};for(const _0xefa352 in _0x399f21['diffData']){if(_0x399f21['diffData'][_0xefa352]['attachChange']&&!_0x399f21['diffData'][_0xefa352]['attachChange']['isAttached'])continue;const _0x56f669=_0x399f21['diffData'][_0xefa352]['rootElementName'];_0x56f669&&(_0x2921a5[_0xefa352]=_0x56f669);}return _0x2921a5;}_getTypeCharForViewElement(_0x4fe9cc){return this['_viewClassToTypeChar']['get'](_0x4fe9cc['constructor']);}_getViewFromDiffObj(_0xeb0c8,_0x499737){const _0x25c91=this['editor']['editing']['view']['document'];if('string'==typeof _0xeb0c8)return new _0x41a322(_0x25c91,_0xeb0c8);{let _0x374a4c,_0x89689c;_0x89689c='u'==_0xeb0c8['type']||'r'==_0xeb0c8['type']?[]:_0xeb0c8['children']['map'](_0x9f2925=>this['_getViewFromDiffObj'](_0x9f2925,_0x499737));const _0x32e698=this['_typeCharToViewClass']['get'](_0xeb0c8['type'])||_0x1c12fb,_0x44eebf=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x374a4c=new _0x32e698(_0x25c91,_0xeb0c8['name'],_0xeb0c8['attributes'],_0x89689c),'u'==_0xeb0c8['type']&&_0xeb0c8['children'][0x0]){const _0x3ad7c6=_0xeb0c8['children'][0x0];if(_0x374a4c['render']=function(_0x113cf4){const _0x3043b3=_0x113cf4['createElement']('div');return _0x3043b3['innerHTML']=_0x16e1fd(_0x3ad7c6),_0x3043b3['childNodes'][0x0];},_0x499737){const _0x29e314=new _0x183c6a(_0x25c91);_0x29e314['_appendChild'](_0x374a4c);const _0xece7c3=Array['from'](_0x44eebf['viewChildrenToDom'](_0x29e314,{'bind':!0x1})),_0x164393=_0x44eebf['domDocument']['createElement']('div');_0x164393['append'](..._0xece7c3),_0x374a4c=Array['from'](_0x44eebf['domChildrenToView'](_0x164393))[0x0];}}else{if('r'==_0xeb0c8['type']&&_0xeb0c8['children'][0x0]){const _0x22ef51=_0xeb0c8['children'][0x0];if(_0x374a4c['render']=function(_0x28af3e){_0x28af3e['innerHTML']=_0x16e1fd(_0x22ef51);},_0x499737){const _0x4a6d81=new _0x183c6a(_0x25c91);_0x4a6d81['_appendChild'](_0x374a4c);const _0x53ea24=Array['from'](_0x44eebf['viewChildrenToDom'](_0x4a6d81,{'bind':!0x1})),_0x4010b1=_0x44eebf['domDocument']['createElement']('div');_0x4010b1['append'](..._0x53ea24);const _0x58f627=Array['from'](_0x44eebf['domChildrenToView'](_0x4010b1));_0x58f627['length']>0x1?_0x374a4c['_appendChild'](_0x58f627):_0x374a4c=_0x58f627[0x0];}}}if(_0xeb0c8['customProperties']){for(const [_0x1f6c4f,_0x9b9b7c]of _0xeb0c8['customProperties'])_0x374a4c['_setCustomProperty'](_0x1f6c4f,_0x9b9b7c);}const _0x328edb=void 0x0===_0xeb0c8['fillerOffset']?null:_0xeb0c8['fillerOffset'];return null!==_0x328edb&&(_0x374a4c['getFillerOffset']=()=>_0x328edb),_0x374a4c;}}_makeModelFromViewString(_0x1d680b,_0x406e53){const _0x41a29f=JSON['parse'](_0x1d680b),_0x2a8099=this['editor']['editing']['view']['document'],_0x3326a9=new _0x183c6a(_0x2a8099,_0x41a29f['map'](_0x4d40c6=>this['_getViewFromDiffObj'](_0x4d40c6,!0x0))),_0xf5049f=this['editor']['data']['toModel'](_0x3326a9,_0x406e53);return _0xf5049f['name']=_0x406e53,_0xf5049f;}['_removeRevisionMarkers'](_0x9cf0a4){return(_0x9cf0a4=_0x9cf0a4['filter'](_0x17d394=>!_0x17d394['name']||'revision-start'!==_0x17d394['name']&&'revision-end'!==_0x17d394['name']))['forEach'](_0x5499da=>{'string'!=typeof _0x5499da&&(_0x5499da['children']=this['_removeRevisionMarkers'](_0x5499da['children']),_0x5499da['attributes']=_0x5499da['attributes']['filter'](_0x569ea2=>!_0x569ea2[0x0]['startsWith']('data-revision-')));}),_0x9cf0a4;}};function kt(_0x3f3b0a,_0x3fde49,_0x1d8d61){const t=_0x3f3b0a['t'];switch(_0x3fde49){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'},_0x1d8d61);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1d8d61);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'},_0x1d8d61);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x1d8d61);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x1d8d61);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x149c71{['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[_0x1b7fe0,bt,Rt,_0x47b0ba];}constructor(_0x1cd5fe){super(_0x1cd5fe),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 _0x18ed49=_0x164a82();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x18ed49},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 _0x276987=this['repository']['getRevision'](0x0),_0x241f2b=_0x276987&&null===_0x276987['creator']?_0x276987:null;if(this['_continueCurrentRevision']=!!_0x241f2b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x15678b=this['_source']['getCurrentRevisionId'](),_0x34d19e=this['repository']['getRevision'](_0x15678b);if(_0x34d19e)this['_startingVersion']=_0x34d19e['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x8cdb74=this['_source']['history']['_operations']['find'](_0x3d67a8=>!_0x3d67a8['_isInit']),_0x131b92=_0x8cdb74?_0x8cdb74['baseVersion']:this['_source']['history']['version'];_0x276987?(_0x276987['toVersion']<_0x131b92&&_0x276987['_update']({'toVersion':_0x131b92}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x241f2b['id'],this['_startingVersion']=_0x241f2b['fromVersion']):(this['_startingVersion']=_0x276987['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x131b92,this['_continueCurrentRevision']=!0x1);}}else _0x241f2b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x241f2b['toVersion'],this['editor']['model']['document']['history']['version']),_0x241f2b['fromVersion']===_0x241f2b['toVersion']?(0x0!==_0x241f2b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x241f2b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x241f2b['id'],this['_startingVersion']=_0x241f2b['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',_0x4f27c1=>!_0x4f27c1),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x104e3d=[this['editor']];for(const _0x4384db of _0x104e3d){let _0x471e37;for(const _0x2135e7 in _0x4384db){const _0x19ac8a=_0x2135e7,_0x2fd163=_0x4384db[_0x19ac8a];if('revisionHistoryLicenseKeyValid'==_0x2fd163||'revisionHistoryLicenseKeyInvalid'==_0x2fd163||'revisionHistoryLicenseKeyExpired'==_0x2fd163||'revisionHistoryLicenseKeyDomainLimit'==_0x2fd163||'revisionHistoryLicenseKeyNotAllowed'==_0x2fd163||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2fd163||'revisionHistoryLicenseKeyUsageLimit'==_0x2fd163){delete _0x4384db[_0x19ac8a],_0x471e37=_0x2fd163,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x471e37&&_0x4384db['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x471e37&&_0x4384db['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x471e37&&_0x4384db['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x471e37&&_0x4384db['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x471e37&&_0x4384db['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x471e37&&_0x4384db['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x1f5e47=this['repository']['getRevision'](0x0),_0xe69b47=await this['getRevisionDocumentData'](_0x1f5e47),_0x2daf53=await this['getRevisionRootsAttributes'](_0x1f5e47),_0x171a25=this['_utils']['getRevisionRootsModelElements'](_0x1f5e47);this['_replaceEditorDataWithRevisionData'](_0xe69b47,_0x2daf53,_0x171a25);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x34f4c6){this['_source']=_0x34f4c6;}async update(){const _0x3035ab=await this['_source']['getLatestVersion']();if(_0x3035ab>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5bb33f=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3035ab});_0x5bb33f['authors']=_0x5bb33f['authorsIds']['map'](_0x1fe210=>this['editor']['plugins']['get']('Users')['getUser'](_0x1fe210)),this['currentRevision']['_update'](_0x5bb33f);}}async['saveRevision'](_0x2c4d80={},_0x451928=null){const _0x1fb382=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x451928>this['currentRevision']['toVersion']&&(_0x451928=null),null===_0x451928&&(_0x451928=await this['_source']['getLatestVersion']());const _0x2f04cd=this['_getFromVersion'](_0x451928),_0x7024e3=this['buildRevisionData']({'from':_0x2f04cd,'to':_0x451928});if(this['currentRevision']['toVersion']<_0x451928){const _0x597b02=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x451928,'to':_0x451928});_0x597b02['authors']=[],_0x597b02['authorsIds']=[],_0x597b02['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x597b02,!0x0),delete _0x597b02['authors'],_0x1fb382['push'](_0x597b02);}const _0x44e91a={..._0x2c4d80,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x2c4d80['name']||null,'id':_0x2c4d80['id']||_0x164a82(),..._0x7024e3,'attributes':{..._0x2c4d80['attributes'],..._0x7024e3['attributes']}},_0x113019=this['addRevisionData'](_0x44e91a);_0x1fb382['push'](_0x44e91a);const _0x168827=this['repository']['getIndex'](_0x113019);if(0x0!==_0x168827){const _0x478b0b=this['repository']['getRevision'](_0x168827-0x1);if(_0x478b0b['fromVersion']!==_0x451928){const _0x431441=this['_revisionDataBuilder']['getData'](_0x451928,_0x478b0b['toVersion']),_0x104195={'id':_0x478b0b['id'],'diffData':_0x431441['diffData'],'authorsIds':_0x431441['authorsIds'],'authors':_0x431441['authorsIds']['map'](_0xd19ad9=>this['editor']['plugins']['get']('Users')['getUser'](_0xd19ad9)),'fromVersion':_0x451928};this['_stampAiAttribute'](_0x104195,_0x478b0b,!!_0x431441['hasAIChanges']),_0x478b0b===this['currentRevision']&&(_0x104195['createdAt']=new Date(_0x44e91a['createdAt']['getTime']()+0xa)),_0x478b0b['_update'](_0x104195,!0x0),delete _0x104195['authors'],_0x1fb382['push'](_0x104195);}}if(this['adapter']){for(const _0x36d230 of _0x1fb382)this['_bufferUpdate'](_0x36d230['id'],_0x36d230,!0x0);this['sendBufferedUpdates']();}return _0x113019;}addRevisionData(_0x22a2a1){const _0x448f3f=this['repository']['createRevision'](_0x22a2a1);return this['adapter']&&_0x448f3f['on']('_update',(_0xa7dc71,_0x4184d4,_0x4caa65)=>{_0x4caa65||(this['_bufferUpdate'](_0x4184d4['id'],_0x4184d4,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x448f3f,this['_findInsertionIndex'](_0x448f3f)),_0x448f3f;}async getRevisionDocumentData(_0x1f8056){return await this['_utils']['loadRevisionData'](_0x1f8056,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1f8056);}async getRevisionRootsAttributes(_0x4f9cff){return await this['_utils']['loadRevisionData'](_0x4f9cff,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4f9cff);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x10fcef=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x576d27=0x0;_0x576d27<_0x10fcef['length'];_0x576d27++){const _0xeff7b9=_0x10fcef[_0x576d27];let _0x4e1995=!0x1;for(const _0x52e91f of Object['keys'](_0xeff7b9))void 0x0===_0xeff7b9[_0x52e91f]?delete _0xeff7b9[_0x52e91f]:'id'!==_0x52e91f&&(_0x4e1995=!0x0);_0x4e1995||(_0x10fcef[_0x576d27]=null);}if(_0x10fcef=_0x10fcef['filter'](_0x38839e=>null!==_0x38839e),!_0x10fcef['length'])return;for(let _0x4e124c=0x0;_0x4e124c<_0x10fcef['length'];_0x4e124c++){const _0x26559a=_0x10fcef[_0x4e124c];void 0x0!==_0x26559a['fromVersion']&&void 0x0===_0x26559a['toVersion']&&(_0x26559a['toVersion']=this['repository']['getRevision'](_0x26559a['id'])['toVersion']),void 0x0!==_0x26559a['toVersion']&&void 0x0===_0x26559a['fromVersion']&&(_0x26559a['fromVersion']=this['repository']['getRevision'](_0x26559a['id'])['fromVersion']);}const _0x14d8c6=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x10fcef,_0x14d8c6)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x5da60b=>{if(_0x5da60b){for(const _0x301973 of _0x5da60b)this['setRevisionData']({'id':_0x301973['id'],'createdAt':_0x301973['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x46b1be,_0x243bcd,_0x4d386d){if(_0x4d386d===(!!_0x243bcd&&!!_0x243bcd['attributes']['@ai']))return;const _0x1f2405={..._0x243bcd?_0x243bcd['attributes']:{},..._0x46b1be['attributes']};_0x4d386d?_0x1f2405['@ai']=!0x0:delete _0x1f2405['@ai'],_0x46b1be['attributes']=_0x1f2405;}buildRevisionData({revision:_0x49116a=null,from:_0x49a92e=null,to:_0x1a97d7=null}){_0x49a92e=null!==_0x49a92e?_0x49a92e:_0x49116a['fromVersion'],_0x1a97d7=null!==_0x1a97d7?_0x1a97d7:_0x49116a['toVersion'];const _0x4d5635=this['_revisionDataBuilder']['getData'](_0x49a92e,_0x1a97d7),_0x768d82={'diffData':_0x4d5635['diffData'],'authorsIds':_0x4d5635['authorsIds'],'fromVersion':_0x49a92e,'toVersion':_0x1a97d7};if(this['_stampAiAttribute'](_0x768d82,_0x49116a,!!_0x4d5635['hasAIChanges']),!_0x49116a||_0x1a97d7!==_0x49116a['toVersion']){const _0x3e7379=_0x1a97d7-0x1,_0x475c74=this['_source']['history']['getOperation'](_0x3e7379);_0x768d82['createdAt']=_0x475c74&&_0x475c74['createdAt']||new Date();}if(this['_loadedStateData']&&_0x49a92e===this['_loadedStateData']['fromVersion']){for(const _0x455ae5 of this['_loadedStateData']['authors'])_0x768d82['authorsIds']['includes'](_0x455ae5['id'])||_0x768d82['authorsIds']['push'](_0x455ae5['id']);}return _0x768d82;}_bufferUpdate(_0x15ca23,_0x2b890e,_0x2e007f){if(this['_bufferedUpdates']['has'](_0x15ca23)){const _0x4463d5=this['_bufferedUpdates']['get'](_0x15ca23);_0x2b890e=_0x2e007f?{..._0x4463d5,..._0x2b890e}:{..._0x2b890e,..._0x4463d5};}this['_bufferedUpdates']['set'](_0x15ca23,_0x2b890e);}setRevisionData(_0x53fe28){const _0x291011=this['repository']['getRevision'](_0x53fe28['id']);if(_0x53fe28['createdAt']&&(_0x53fe28['createdAt']=new Date(_0x53fe28['createdAt'])),_0x53fe28['authorsIds']){const _0x495bd4=this['editor']['plugins']['get']('Users');_0x53fe28['authors']=_0x53fe28['authorsIds']['map'](_0x94457f=>_0x495bd4['getUser'](_0x94457f));}_0x291011['_update'](_0x53fe28,!0x0);}_createInitialRevision(_0x32ab8c){const _0x5029a9=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5029a9)this['_initialRevisionId']=_0x5029a9['id'];else{const _0x5d1516=!this['editor']['model']['document']['roots']['find'](_0x416566=>this['editor']['model']['hasContent'](_0x416566)),_0x2a7566=this['editor']['plugins']['get']('Users')['me']['id'],_0x192181=kt(this['editor']['locale'],_0x5d1516?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x32ab8c,'to':_0x32ab8c,'id':this['_initialRevisionId'],'name':_0x192181,'creatorId':_0x2a7566});}}_createCurrentRevision(_0x5e2226){const _0x10b696=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x10b696),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5e2226,'to':_0x5e2226,'id':_0x10b696,'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(_0x47ebc5,_0x27aa74,_0x428d6b){const _0x68f77e={},_0x37ef26={},_0x3e4631={},_0x133484=this['editor']['config']['get']('roots')||{};for(const [_0x53305a,_0x1c38a9]of Object['entries'](_0x133484))_0x1c38a9['lazyLoad']||(_0x68f77e[_0x53305a]=_0x1c38a9['initialData']??'',_0x37ef26[_0x53305a]=_0x1c38a9['modelAttributes']||{},_0x1c38a9['modelElement']&&(_0x3e4631[_0x53305a]=_0x1c38a9['modelElement']));for(const _0x5e32ae of this['editor']['model']['document']['getRootNames']())_0x68f77e[_0x5e32ae]??='',_0x37ef26[_0x5e32ae]??={};let _0x4cb081=!0x1;const _0x538437=Object['keys'](_0x68f77e),_0x262703=Object['keys'](_0x47ebc5);for(const _0x1c2aa7 of _0x538437){if(_0x68f77e[_0x1c2aa7]!==_0x47ebc5[_0x1c2aa7]&&''!==_0x68f77e[_0x1c2aa7]['trim']()){_0x4cb081=!0x0;break;}if(!_0x19c116(_0x37ef26[_0x1c2aa7],_0x27aa74[_0x1c2aa7])&&Object['keys'](_0x37ef26[_0x1c2aa7])['length']>0x0){_0x4cb081=!0x0;break;}const _0xc4bcb0=_0x3e4631[_0x1c2aa7],_0x31224a=_0x428d6b[_0x1c2aa7];if(_0xc4bcb0&&_0x31224a&&_0xc4bcb0!==_0x31224a){_0x4cb081=!0x0;break;}}_0x4cb081||(_0x4cb081=_0x262703['some'](_0xf9e1b4=>!this['editor']['model']['document']['getRoot'](_0xf9e1b4))),_0x4cb081&&_0x4ffd83('editor-initial-data-replaced-with-revision-data',{'editorData':_0x68f77e,'editorRootsAttributes':_0x37ef26,'editorRootsModelElements':_0x3e4631,'revisionData':_0x47ebc5,'revisionRootsAttributes':_0x27aa74,'revisionRootsModelElements':_0x428d6b});for(const [_0x40dc53,_0xe24f79]of Object['entries'](_0x47ebc5))this['editor']['config']['set']('roots.'+_0x40dc53+'.initialData',_0xe24f79);for(const [_0x521bb9,_0x29df08]of Object['entries'](_0x27aa74))this['editor']['config']['set']('roots.'+_0x521bb9+'.modelAttributes',_0x29df08);const _0x51679b=this['editor']['model']['document'];for(const [_0x40c72d,_0x1e0ab3]of Object['entries'](_0x428d6b)){this['editor']['config']['set']('roots.'+_0x40c72d+'.modelElement',_0x1e0ab3);const _0x3d77a4=_0x51679b['getRoot'](_0x40c72d);_0x3d77a4&&_0x3d77a4['name']!==_0x1e0ab3&&(_0x51679b['roots']['remove'](_0x40c72d),_0x51679b['createRoot'](_0x1e0ab3,_0x40c72d));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2206f7=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2206f7['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x5d038a){const _0x2a6deb=this['repository']['getRevisions']();_0x2a6deb['reverse']();let _0x536cc1=0x0;for(;_0x536cc1<_0x2a6deb['length'];){const _0x54b269=_0x2a6deb[_0x536cc1];if(_0x54b269===this['currentRevision']){_0x536cc1++;continue;}if(_0x54b269['id']===this['_initialRevisionId'])break;const _0x10a4fb=_0x5d038a['toVersion']-_0x54b269['toVersion']||_0x5d038a['fromVersion']-_0x54b269['fromVersion'];if(_0x10a4fb>0x0)break;if(_0x10a4fb<0x0)_0x536cc1++;else{if(!_0x5d038a['creator']&&_0x54b269['creator'])break;if(_0x54b269['creator']||!_0x5d038a['creator']){if(_0x5d038a['createdAt']>_0x54b269['createdAt'])break;_0x536cc1++;}else _0x536cc1++;}}return _0x536cc1;}_getFromVersion(_0x5f4ed5){const _0x181e2a=this['repository']['getRevisions']();_0x181e2a['reverse'](),_0x181e2a['shift']();const _0x51d4d0=_0x181e2a['find'](_0x3f9d96=>_0x3f9d96['toVersion']<=_0x5f4ed5)['toVersion'];return _0x51d4d0<this['_startingVersion']?this['_startingVersion']:_0x51d4d0;}['_makeRevision']({name:_0x31f730,from:_0x523df8,to:_0x39c1a4,creatorId:_0x3403a6,id:_0x39431c}){const _0xf6738b=this['buildRevisionData']({'from':_0x523df8,'to':_0x39c1a4});_0xf6738b['name']=_0x31f730,_0xf6738b['creatorId']=_0x3403a6,_0xf6738b['id']=_0x39431c;const _0x16e98e=this['addRevisionData'](_0xf6738b);return this['adapter']&&this['_bufferUpdate'](_0xf6738b['id'],_0xf6738b,!0x0),_0x16e98e;}_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(_0x3c96d4){this['editor']=_0x3c96d4,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(_0x19def8){this['source']=_0x19def8;const _0x124973=new Map(),_0x1bad8d=new Map(),_0x1856e6=this['editor']['model']['document']['roots']['map'](_0x3b326c=>_0x3b326c['rootName']);for(const _0x9c19f8 of _0x1856e6){const _0x3c5cce=this['editor']['model']['document']['getRoot'](_0x9c19f8),_0x2b1c6e=St(_0x3c5cce);_0x124973['set'](_0x9c19f8,_0x2b1c6e),_0x1bad8d['set'](_0x9c19f8,Object['fromEntries'](_0x3c5cce['getAttributes']()));}const _0x5e562e=Array['from'](this['editor']['model']['markers'])['map'](_0x24363a=>[_0x24363a['name'],_0x24363a['getRange']()]),_0x1c9821=this['source']['version'];this['_saveMetaData'](_0x1c9821,_0x124973,_0x5e562e,_0x1bad8d),this['_startingRevisionId']=this['_revisionId'];const _0x2daa16=new Map(),_0x5296d9=new Map();for(const _0x5a898d of _0x1856e6){const _0x4865bf=Et(_0x5a898d,this['editor']['model']['document']['getRoot'](_0x5a898d)['name']);_0x2daa16['set'](_0x5a898d,_0x4865bf),_0x5296d9['set'](_0x5a898d,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2daa16,[],_0x5296d9);}getData(_0x32b878,_0x486a29){if(this['_lastFrom']===_0x32b878&&this['_lastTo']<=_0x486a29)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x486a29,!0x0);else{if(!this['_savedMetaData']['has'](_0x32b878)){const _0x240f8a=this['_getPreviousFrom'](_0x32b878);this['_calculateMetaData'](_0x240f8a,_0x32b878,!0x1);}this['_calculateMetaData'](_0x32b878,_0x486a29,!0x0);}return this['_lastFrom']=_0x32b878,this['_lastTo']=_0x486a29,this['_getState']();}loadState(_0x50d105){if(!this['_savedMetaData']['has'](_0x50d105['fromVersion'])){const _0x5796a5=this['_getPreviousFrom'](_0x50d105['fromVersion']);this['_calculateMetaData'](_0x5796a5,_0x50d105['fromVersion'],!0x1);}this['_calculateMetaData'](_0x50d105['fromVersion'],_0x50d105['toVersion'],!0x1);const _0x29a31f=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x50d105['fromVersion'],this['_lastTo']=_0x50d105['toVersion'];for(const _0x1cfb33 in _0x50d105['diffData']){const _0x86aa4c=_0x50d105['diffData'][_0x1cfb33]['attachChange'],_0x390139=_0x2b595f(_0x50d105['diffData'][_0x1cfb33]['attributesBefore'])||{},_0x2892e0=_0x50d105['diffData'][_0x1cfb33],_0x34da30=_0x29a31f['_makeModelFromViewString'](_0x2892e0['deletions'],_0x2892e0['rootElementName']||'$root');_0x34da30['rootName']=_0x1cfb33,_0x34da30['_isAttached']=!_0x86aa4c||!_0x86aa4c['isAttached'],_0x34da30['isAttached']=()=>_0x34da30['_isAttached'],this['_baseRoots']['set'](_0x1cfb33,_0x34da30),this['_baseRootsAttributes']['set'](_0x1cfb33,_0x390139),_0x86aa4c&&this['_touchedRoots']['set'](_0x1cfb33,_0x86aa4c);const _0x33a4b8=this['_makeIdsRoot'](_0x34da30);this['_baseIdsRoots']['set'](_0x1cfb33,_0x33a4b8);for(const [_0x3f2b31,_0x4ab399]of _0x34da30['markers']){if(!_0x3f2b31['startsWith']('revision:'))continue;const _0x2f7fc6=_0x3f2b31['split'](':')[0x2],_0x19fc90=_0x2892e0['aiSources']?.[_0x3f2b31]||null;for(const _0xe5d16f of _0x4ab399['getWalker']({'singleCharacters':!0x0})){const _0x91cf61=this['_getVidAttributeName'](_0xe5d16f),_0x4cc403='elementEnd'==_0xe5d16f['type']?_0xe5d16f['previousPosition']['path']['slice'](0x0,-0x1):_0xe5d16f['previousPosition']['path'],_0xc75a15=_0x33a4b8['getNodeByPath'](_0x4cc403)['getAttribute'](_0x91cf61);this['_touched']['set'](_0xc75a15,{'userId':_0x2f7fc6,'aiSource':_0x19fc90});}_0x34da30['markers']['delete'](_0x3f2b31);}}this['_startingRevisionId']=this['_revisionId'];const _0x5841a6=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3fa283=>!this['_touched']['has'](_0x3fa283));let _0x38294c=0x0;const _0x245d30=new Map();for(const _0x5cae5e in _0x50d105['diffData']){const _0x33038b=_0x50d105['diffData'][_0x5cae5e]['attachChange'],_0x5449e5=_0x2b595f(_0x50d105['diffData'][_0x5cae5e]['attributesAfter'])||{},_0x1196d4=_0x50d105['diffData'][_0x5cae5e],_0x510228=_0x29a31f['_makeModelFromViewString'](_0x1196d4['insertions'],_0x1196d4['rootElementName']||'$root');_0x510228['rootName']=_0x5cae5e,_0x510228['_isAttached']=!_0x33038b||_0x33038b['isAttached'],_0x510228['isAttached']=()=>_0x510228['_isAttached'],this['_diffRoots']['set'](_0x5cae5e,_0x510228),this['_diffRootsAttributes']['set'](_0x5cae5e,_0x5449e5);const _0x54b0e2=this['_makeIdsRoot'](_0x510228,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5cae5e,_0x54b0e2),_0x245d30['set'](_0x5cae5e,_0x510228['isAttached']()?_0x5449e5:{});for(const [_0x1773ce,_0x56bdf9]of _0x510228['markers']){if(!_0x1773ce['startsWith']('revision:'))continue;const _0x386630=_0x1773ce['split'](':')[0x2],_0x54cbeb=_0x1196d4['aiSources']?.[_0x1773ce]||null;for(const _0x2039bc of _0x56bdf9['getWalker']({'singleCharacters':!0x0})){const _0x127c5e=this['_getVidAttributeName'](_0x2039bc),_0x1650fa=this['_revisionId']++,_0x153a91='elementEnd'==_0x2039bc['type']?_0x2039bc['previousPosition']['path']['slice'](0x0,-0x1):_0x2039bc['previousPosition']['path'];_0x54b0e2['getNodeByPath'](_0x153a91)['_setAttribute'](_0x127c5e,_0x1650fa),this['_touched']['set'](_0x1650fa,{'userId':_0x386630,'aiSource':_0x54cbeb});}_0x510228['markers']['delete'](_0x1773ce);}for(const _0x3d501e of this['editor']['model']['createRangeIn'](_0x510228)['getWalker']({'singleCharacters':!0x0})){const _0xb84897=this['_getVidAttributeName'](_0x3d501e),_0x2367d3='elementEnd'==_0x3d501e['type']?_0x3d501e['previousPosition']['path']['slice'](0x0,-0x1):_0x3d501e['previousPosition']['path'],_0x5979a3=_0x54b0e2['getNodeByPath'](_0x2367d3);_0x5979a3['getAttribute'](_0xb84897)>0x0||_0x5979a3['_setAttribute'](_0xb84897,_0x5841a6[_0x38294c++]);}for(const [_0x45dadd,_0x371c99]of _0x510228['markers'])_0x45dadd['startsWith']('revision:')||this['_markers']['set'](_0x45dadd,_0x371c99);}const {roots:_0x703b9c}=this['_savedMetaData']['get'](_0x50d105['fromVersion']),{roots:_0x14590a}=this['_savedMetaData']['get'](_0x50d105['toVersion']),_0x397609=St(_0x703b9c['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x397609),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x397609,Number['NEGATIVE_INFINITY']));const _0x28438b=St(_0x14590a['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x28438b),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x28438b));const _0xd902d4=Array['from'](this['_diffRoots'])['map'](([_0x2b355c,_0x119b5e])=>[_0x2b355c,St(_0x119b5e)]);this['_saveMetaData'](this['_lastTo'],_0xd902d4,this['_markers'],_0x245d30);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0xa63876,_0x5d5447,_0x3bc3eb,_0x5f1ed5){const _0x58078d=new Map(_0x5d5447),_0x511704=new Map(_0x2b595f(_0x5f1ed5)),_0x4792fa=new Map();for(const [_0x1abcfa,_0x5f1359]of _0x3bc3eb)_0x4792fa['set'](_0x1abcfa,{'start':_0x5f1359['start']['clone'](),'end':_0x5f1359['end']['clone'](),'rootName':_0x5f1359['root']['rootName']});this['_savedMetaData']['set'](_0xa63876,{'roots':_0x58078d,'markers':_0x4792fa,'rootsAttributes':_0x511704});}_removeMetaData(_0x152a2e){this['_savedMetaData']['delete'](_0x152a2e);}_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(_0x279dc5,_0x16b962=null){let _0x2bd4ca=null;_0x279dc5['is']('documentFragment')||(_0x2bd4ca=new _0x2bedc6(_0x279dc5['name'],{'vid_start':null===_0x16b962?this['_revisionId']++:_0x16b962++}));const _0x5ab169=[];for(const _0x198074 of _0x279dc5['getChildren']())if(_0x198074['is']('element')){_0x5ab169['push'](this['_makeIdsRoot'](_0x198074,_0x16b962));const _0xfda5f6=_0x5ab169[_0x5ab169['length']-0x1];null!==_0x16b962&&(_0x16b962=_0xfda5f6['is']('element','$text')?_0xfda5f6['getAttribute']('vid')+0x1:_0xfda5f6['getAttribute']('vid_end')+0x1);}else{for(let _0x5783e2=0x0;_0x5783e2<_0x198074['offsetSize'];_0x5783e2++)_0x5ab169['push'](new _0x2bedc6('$text',{'vid':null===_0x16b962?this['_revisionId']++:_0x16b962++}));}if(_0x279dc5['is']('documentFragment')){const _0x442af8=Et(_0x279dc5['rootName'],_0x279dc5['name']);return _0x442af8['_insertChild'](0x0,_0x5ab169),_0x442af8;}return _0x2bd4ca['_setAttribute']('vid_end',null===_0x16b962?this['_revisionId']++:_0x16b962),_0x2bd4ca['_insertChild'](0x0,_0x5ab169),_0x2bd4ca;}_calculateMetaData(_0x2ade4f,_0xa7f647,_0x17c5e5){this['_reset']();const {roots:_0x41e590,markers:_0x153e7c,rootsAttributes:_0x421947}=this['_savedMetaData']['get'](_0x2ade4f);this['_baseRoots']=new Map(_0x41e590),this['_baseRootsAttributes']=new Map(_0x2b595f(_0x421947));for(const [_0x173e6c,_0x4e2051]of this['_baseRoots'])if('$graveyard'!==_0x173e6c&&(this['_diffRoots']['set'](_0x173e6c,St(_0x4e2051)),this['_diffRootsAttributes']=new Map(_0x2b595f(_0x421947)),_0x17c5e5)){const _0x565a45=this['_revisionId'];this['_idsRoots']['set'](_0x173e6c,this['_makeIdsRoot'](_0x4e2051)),this['_baseIdsRoots']['set'](_0x173e6c,this['_makeIdsRoot'](_0x4e2051,_0x565a45));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x17c5e5&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x371e60,_0x510b22]of _0x153e7c){const _0x26e65d=this['_baseRoots']['get'](_0x510b22['rootName']),_0x49a6ed=this['_diffRoots']['get'](_0x510b22['rootName']),_0x53a3c1=new _0x21ca2d(_0x11effe(_0x510b22['start'],_0x26e65d),_0x11effe(_0x510b22['end'],_0x26e65d)),_0x82300b=_0x189007(_0x53a3c1,_0x49a6ed);_0x26e65d['markers']['set'](_0x371e60,_0x53a3c1),this['_markers']['set'](_0x371e60,_0x82300b);}this['_applyOperations'](_0x2ade4f,_0xa7f647,_0x17c5e5);}_applyOperations(_0x34dcff,_0x322a35,_0x3ad617){for(const _0x41b3e3 of this['source']['getOperations'](_0x34dcff,_0x322a35))this['_handleOperation'](_0x41b3e3,_0x3ad617);for(const _0x595dc8 of this['_diffRoots']['values']())_0x595dc8['markers']['clear']();for(const [_0x5aac08,_0x4674cd]of this['_markers'])this['_diffRoots']['get'](_0x4674cd['root']['rootName'])['markers']['set'](_0x5aac08,_0x4674cd['clone']());const _0x3c805b=new Map(),_0x4b8924=new Map();for(const [_0x3d6053,_0x524948]of this['_diffRoots'])_0x3c805b['set'](_0x3d6053,St(_0x524948)),_0x4b8924['set'](_0x3d6053,this['_diffRootsAttributes']['get'](_0x3d6053));this['_saveMetaData'](_0x322a35,_0x3c805b,this['_markers'],_0x4b8924);}_getPreviousFrom(_0x193f7d){const _0xc69852=Array['from'](this['_savedMetaData']['keys']());_0xc69852['sort']((_0x28c656,_0x38bbd1)=>_0x28c656-_0x38bbd1),_0xc69852['reverse']();for(const _0x14d237 of _0xc69852)if(_0x14d237<_0x193f7d)return _0x14d237;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4e4038,_0x28c2db){const _0x475401=Array['from'](_0x28c2db['markers'])['map'](([_0x51f40c,_0x145700])=>[_0x51f40c,_0x189007(_0x145700,_0x4e4038)]);_0x4e4038['markers']=new Map(_0x475401);}_transformMarkers(_0x24e5f5){for(const _0x287063 of this['_markers']['values']()){const _0x4ae838=_0x287063['getTransformedByOperation'](_0x24e5f5),_0x451d0b=_0x21ca2d['_createFromRanges'](_0x4ae838);_0x287063['start']=_0x451d0b['start'],_0x287063['end']=_0x451d0b['end'];}}_handleOperation(_0x2ae06e,_0x31feaa){if('addRoot'!=_0x2ae06e['type']&&'detachRoot'!=_0x2ae06e['type']){if('insert'==_0x2ae06e['type']){const _0x3ceb2a=_0x2ae06e['position']['root'],_0x3f5c3a=_0x3ceb2a['rootName'],_0x1d6504=_0x3ceb2a['name'];this['_diffRoots']['has'](_0x3f5c3a)||(this['_diffRoots']['set'](_0x3f5c3a,Et(_0x3f5c3a,_0x1d6504,!0x0)),this['_diffRootsAttributes']['set'](_0x3f5c3a,{}),_0x31feaa&&this['_idsRoots']['set'](_0x3f5c3a,Et(_0x3f5c3a,_0x1d6504,!0x0)));}else{if('addRootAttribute'==_0x2ae06e['type']||'removeRootAttribute'==_0x2ae06e['type']||'changeRootAttribute'==_0x2ae06e['type'])return void this['_handleRootAttributeOperation'](_0x2ae06e);'marker'==_0x2ae06e['type']&&this['_handleMarkerOperation'](_0x2ae06e);}if('marker'!==_0x2ae06e['type']){const _0x5c1455=this['_cloneOperation'](_0x2ae06e,this['_diffRoots']);_0x5c1455['_execute'](),this['_transformMarkers'](_0x5c1455);}if(_0x31feaa)switch(_0x2ae06e['type']){case'insert':this['_handleInsertOperation'](_0x2ae06e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2ae06e);break;case'merge':this['_handleMergeOperation'](_0x2ae06e);break;case'split':this['_handleSplitOperation'](_0x2ae06e);}}else this['_handleRootOperation'](_0x2ae06e,_0x31feaa);}_cloneOperation(_0x3f5cfa,_0x336853){const _0x325905=_0x3f5cfa['clone']();return _0x325905['_authorId']=_0x3f5cfa['_authorId'],_0x325905['_aiSource']=_0x3f5cfa['_aiSource'],_0x325905['baseVersion']=null,_0x2424b3(_0x325905,_0x336853),_0x325905;}_getBaseVids(_0x56931a){return _0x56931a['map'](_0x5204cd=>{const _0x10e7e2=this['_getVidAttributeName'](_0x5204cd);return Number(_0x5204cd['item']['getAttribute'](_0x10e7e2));});}_generateTape(_0x15aac3,_0x130b20){if(_0x15aac3['is']('element','$text'))_0x130b20['push']({'item':_0x15aac3,'type':'text'});else{_0x15aac3['is']('element')&&_0x130b20['push']({'item':_0x15aac3,'type':'elementStart'});for(const _0x5f594f of _0x15aac3['getChildren']())this['_generateTape'](_0x5f594f,_0x130b20);_0x15aac3['is']('element')&&_0x130b20['push']({'item':_0x15aac3,'type':'elementEnd'});}return _0x130b20;}_getState(){const _0x3f4227=new Map(this['_touched']),_0x4bacee=new Map(_0x3f4227),_0x9786da=new Map(),_0x4e76da={'insertions':{},'deletions':{}},_0x431152={'insertions':{},'deletions':{}},_0x1d43b5=new Map(),_0x36e003=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x2952e6=new Map();_0x36e003['delete']('$graveyard');for(const _0x74bfd0 of _0x36e003){const _0x2fb8c4=(this['_diffRoots']['get'](_0x74bfd0)??this['_baseRoots']['get'](_0x74bfd0))['name'],_0x260c3a=this['_diffRoots']['get'](_0x74bfd0)||Et(_0x74bfd0,_0x2fb8c4,!0x1),_0x5bc6a0=this['_baseRoots']['get'](_0x74bfd0)||Et(_0x74bfd0,_0x2fb8c4,!0x1);_0x260c3a['isAttached']()||_0x5bc6a0['isAttached']()?(_0x2952e6['set'](_0x74bfd0,_0x2fb8c4),_0x4e76da['insertions'][_0x74bfd0]=St(_0x260c3a),_0x4e76da['deletions'][_0x74bfd0]=St(_0x5bc6a0),this['_copyMarkers'](_0x4e76da['deletions'][_0x74bfd0],_0x5bc6a0),this['_copyMarkers'](_0x4e76da['insertions'][_0x74bfd0],_0x260c3a),_0x431152['insertions'][_0x74bfd0]=this['_generateTape'](this['_idsRoots']['get'](_0x74bfd0),[]),_0x431152['deletions'][_0x74bfd0]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x74bfd0)||Et(_0x74bfd0,_0x2fb8c4,!0x1),[])):_0x36e003['delete'](_0x74bfd0);}for(const _0x251a38 of _0x36e003){const _0x57033a=_0x431152['insertions'][_0x251a38];for(const _0x19da0a of _0x57033a){const _0x34166d=this['_getVidAttributeName'](_0x19da0a),_0x32eee6=_0x19da0a['item']['getAttribute'](_0x34166d);_0x4bacee['delete'](_0x32eee6),_0x32eee6>=this['_startingRevisionId']&&_0x9786da['set'](_0x32eee6,_0x3f4227['get'](_0x32eee6));}}for(const _0x410e1e of _0x36e003){const _0x156d67=_0x431152['insertions'][_0x410e1e],_0x5f1148=this['_getBaseVids'](_0x431152['deletions'][_0x410e1e]);let _0x4c76bb=0x0;for(const _0x1ea2a9 of _0x156d67){const _0x314904=this['_getVidAttributeName'](_0x1ea2a9),_0x1f3da7=_0x1ea2a9['item']['getAttribute'](_0x314904);if(!_0x9786da['has'](_0x1f3da7)&&!_0x1d43b5['has'](_0x1f3da7)){if(_0x4bacee['has'](_0x1f3da7))_0x4c76bb++;else{if(_0x1f3da7!=_0x5f1148[_0x4c76bb]){const _0x40e468=_0x3f4227['get'](_0x1f3da7)||_0x3f4227['get'](_0x5f1148[_0x4c76bb]);for(;_0x1f3da7!=_0x5f1148[_0x4c76bb];)_0x4bacee['has'](_0x5f1148[_0x4c76bb])||(_0x1d43b5['set'](_0x5f1148[_0x4c76bb],_0x40e468),_0x3f4227['set'](_0x5f1148[_0x4c76bb],_0x40e468)),_0x4c76bb++;}_0x4c76bb++;}}}}for(const _0x19fdf6 of _0x36e003){const _0x168ca5=_0x431152['insertions'][_0x19fdf6];for(const _0xca5eea of _0x168ca5){const _0x16a193=this['_getVidAttributeName'](_0xca5eea),_0x146aa6=_0xca5eea['item']['getAttribute'](_0x16a193);if(_0x1d43b5['has'](_0x146aa6)){const _0x21e9b4=_0x1d43b5['get'](_0x146aa6);_0x4bacee['has'](_0x146aa6)||_0x4bacee['set'](_0x146aa6,{..._0x21e9b4}),_0x9786da['set'](_0x146aa6,{..._0x21e9b4});}}}for(const _0x3444bc of _0x4bacee['keys']())_0x3444bc>=this['_startingRevisionId']&&_0x4bacee['delete'](_0x3444bc);const _0x358f26=new Map();for(const _0x10ca5c of _0x36e003){let _0x2b2c66=_0x431152['insertions'][_0x10ca5c];for(const _0x16f2d8 of _0x2b2c66)if(_0x16f2d8['item']['is']('element','tableCell')){const _0x59ae5c=this['_getVidAttributeName'](_0x16f2d8),_0x40cd7c=_0x16f2d8['item']['getAttribute'](_0x59ae5c);if(_0x9786da['has'](_0x40cd7c)){const _0xe1f742=_0x16f2d8['item']['parent']['parent']['getAttribute']('vid_start'),_0x212c3f=_0x9786da['get'](_0x40cd7c),_0x43ec4c=_0x358f26['get'](_0xe1f742)||{'users':new Set(),'aiSource':null};_0x43ec4c['users']['add'](_0x212c3f['userId']),_0x43ec4c['aiSource']=_0x43ec4c['aiSource']||_0x212c3f['aiSource']||null,_0x358f26['set'](_0xe1f742,_0x43ec4c);}}_0x2b2c66=_0x431152['deletions'][_0x10ca5c];for(const _0xd2eb59 of _0x2b2c66)if(_0xd2eb59['item']['is']('element','tableCell')){const _0x183ba0=this['_getVidAttributeName'](_0xd2eb59),_0x537074=_0xd2eb59['item']['getAttribute'](_0x183ba0);if(_0x4bacee['has'](_0x537074)){const _0x52a9bb=_0xd2eb59['item']['parent']['parent']['getAttribute']('vid_start'),_0x53fa98=_0x4bacee['get'](_0x537074),_0x3b3bfd=_0x358f26['get'](_0x52a9bb)||{'users':new Set(),'aiSource':null};_0x3b3bfd['users']['add'](_0x53fa98['userId']),_0x3b3bfd['aiSource']=_0x3b3bfd['aiSource']||_0x53fa98['aiSource']||null,_0x358f26['set'](_0x52a9bb,_0x3b3bfd);}}for(const _0x7d831f of _0x358f26['keys']())(_0x9786da['has'](_0x7d831f)||_0x4bacee['has'](_0x7d831f))&&_0x358f26['delete'](_0x7d831f);}for(const _0x1e9239 of _0x36e003){const _0x1b476d=_0x431152['insertions'][_0x1e9239];let _0x4923e9=null,_0x57be0b=null,_0x11475e=null;for(const _0x1c1260 of _0x1b476d){const _0x268675=this['_getVidAttributeName'](_0x1c1260),_0x3389b3=_0x1c1260['item']['getAttribute'](_0x268675),_0x6020ce=_0x358f26['get'](_0x3389b3);if(_0x6020ce&&'elementStart'==_0x1c1260['type']&&(_0x4923e9=Array['from'](_0x6020ce['users'])[0x0],_0x57be0b=_0x6020ce['aiSource'],_0x11475e=_0x1c1260['item']['getAttribute']('vid_end')),_0x4923e9){const _0x54fff3=_0x57be0b||_0x4bacee['get'](_0x3389b3)?.['aiSource']||null,_0x39e7fa=_0x57be0b||_0x9786da['get'](_0x3389b3)?.['aiSource']||null;_0x4bacee['set'](_0x3389b3,{'userId':_0x4923e9,'aiSource':_0x54fff3}),_0x9786da['set'](_0x3389b3,{'userId':_0x4923e9,'aiSource':_0x39e7fa});}_0x3389b3==_0x11475e&&(_0x4923e9=null,_0x11475e=null);}}const _0x17291e={},_0xa27345=new Set();for(const _0x2aee67 of _0x36e003){const _0x12ff8f=_0x4e76da['deletions'][_0x2aee67],_0xbbb5c1=_0x4e76da['insertions'][_0x2aee67];for(const {userId:_0x2500a7}of this['_touchedMarkers']['values']())null!==_0x2500a7&&_0xa27345['add'](_0x2500a7);for(const {userId:_0x2ac5ae}of this['_touchedRoots']['values']())null!==_0x2ac5ae&&_0xa27345['add'](_0x2ac5ae);const _0x7349e6={};this['_markChanges'](_0xbbb5c1,_0x431152['insertions'][_0x2aee67],_0x9786da,'insertion',_0xa27345,_0x7349e6),this['_markChanges'](_0x12ff8f,_0x431152['deletions'][_0x2aee67],_0x4bacee,'deletion',_0xa27345,_0x7349e6),this['_collectSuggestionAiSources'](_0xbbb5c1,_0x7349e6),this['_collectSuggestionAiSources'](_0x12ff8f,_0x7349e6),_0x17291e[_0x2aee67]={'insertions':this['_prepareViewToSave'](_0xbbb5c1),'deletions':this['_prepareViewToSave'](_0x12ff8f),'attachChange':this['_touchedRoots']['get'](_0x2aee67)||null,'attributesBefore':_0x2b595f(this['_baseRootsAttributes']['get'](_0x2aee67))||{},'attributesAfter':_0x2b595f(this['_diffRootsAttributes']['get'](_0x2aee67)),'rootElementName':_0x2952e6['get'](_0x2aee67),'aiSources':_0x7349e6};}const _0x1d6d06=Array['from'](_0x9786da['values']())['some'](_0x4cab87=>!(!_0x4cab87||!_0x4cab87['aiSource']))||Array['from'](_0x4bacee['values']())['some'](_0x211ec0=>!(!_0x211ec0||!_0x211ec0['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x5bee75=>this['_aiTouchedMarkers']['has'](_0x5bee75));return{'diffData':_0x17291e,'authorsIds':Array['from'](_0xa27345),'hasAIChanges':_0x1d6d06};}_collectSuggestionAiSources(_0x58654b,_0x28c5f3){const _0x272b5f=_0x58654b['markers'];for(const _0x471d12 of _0x272b5f['keys']()){if(!_0x471d12['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x471d12))continue;const _0x48ef59=this['_aiTouchedMarkers']['get'](_0x471d12);_0x48ef59&&(_0x28c5f3[_0x471d12]=_0x48ef59);}}_processRootBeforeSave(_0x4a2d7d){for(const [,_0x179654]of _0x4a2d7d['markers']){const _0x36c68e=_0x179654['start']['getAncestors']()['filter'](_0x126179=>'tableCell'==_0x126179['name']);for(const _0x304082 of _0x36c68e)0x1==_0x304082['childCount']&&_0x304082['getChild'](0x0)['is']('element','paragraph')&&_0x304082['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x11880b){this['_processRootBeforeSave'](_0x11880b);const _0x5d7d23=this['editor']['data']['toView'](_0x11880b,{}),_0x3c7ca4=Array['from'](_0x5d7d23['getChildren']())['map'](_0x1fcd87=>this['_getViewJson'](_0x1fcd87));return JSON['stringify'](_0x3c7ca4);}_getViewJson(_0x1994a3){if(_0x1994a3['is']('$text'))return _0x1994a3['data'];{const _0x14e312=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x271b5e=_0x1994a3,_0x44d44b=this['editor']['data']['htmlProcessor']['domConverter'],_0x4e9968={'type':_0x14e312['_getTypeCharForViewElement'](_0x271b5e),'name':_0x271b5e['name'],'attributes':Array['from'](_0x271b5e['getAttributes']()),'children':Array['from'](_0x271b5e['getChildren']())['map'](_0x4f5b41=>this['_getViewJson'](_0x4f5b41))};if(_0x1994a3['is']('uiElement')&&'$comment'!=_0x1994a3['name']){const _0x5d10e2=_0x1994a3['render'](_0x44d44b['domDocument'],_0x44d44b);_0x4e9968['children']['push'](_0x5d10e2['outerHTML']);}else{if(_0x1994a3['is']('rawElement')){const _0x4dff60=_0x44d44b['domDocument']['createElement'](_0x271b5e['name']);_0x1994a3['render'](_0x4dff60,_0x44d44b),_0x4e9968['children']['push'](_0x4dff60['innerHTML']);}}const _0x2f7da2=Array['from'](_0x271b5e['getCustomProperties']());_0x2f7da2['length']>0x0&&(_0x4e9968['customProperties']=_0x2f7da2);const _0x20b64c=_0x271b5e['getFillerOffset']();return null!==_0x20b64c&&(_0x4e9968['fillerOffset']=_0x20b64c),_0x4e9968;}}['_markChanges'](_0x245c0e,_0x50e7ae,_0x1525f2,_0x254208,_0x299595,_0x335ff2){let _0x51cfcc=null,_0xe78951=null,_0x1933f8=0x0;const _0x289a1c=this['editor']['model'];for(let _0x4fb59b=0x0;_0x4fb59b<_0x50e7ae['length'];_0x4fb59b++){const _0x5c3a0e=this['_getVidAttributeName'](_0x50e7ae[_0x4fb59b]),_0x443713=_0x50e7ae[_0x4fb59b]['item']['getAttribute'](_0x5c3a0e),_0x5c9618=_0x1525f2['get'](_0x443713),_0x3fde31=_0x4fb59b==_0x50e7ae['length']-0x1;!_0x51cfcc&&_0x5c9618&&(_0x51cfcc=_0x5c9618,_0xe78951=_0x50e7ae[_0x4fb59b]);const _0x5692e1=!!_0x51cfcc&&!!_0x5c9618&&_0x5c9618['userId']!=_0x51cfcc['userId'],_0x4ffd67=!!_0x51cfcc&&!!_0x5c9618&&_0x5c9618['aiSource']!=_0x51cfcc['aiSource'];_0x51cfcc&&(!_0x5c9618||_0x5692e1||_0x4ffd67)&&(_0x396b06(_0x5c9618,Ot(_0xe78951,_0x245c0e,_0x289a1c),Ot(_0x50e7ae[_0x4fb59b],_0x245c0e,_0x289a1c)),_0x51cfcc=_0x5c9618||null,_0xe78951=_0x5c9618?_0x50e7ae[_0x4fb59b]:null),_0x51cfcc&&_0x3fde31&&_0x396b06(_0x5c9618,Ot(_0xe78951,_0x245c0e,_0x289a1c),Ct(_0x50e7ae[_0x4fb59b],_0x245c0e,_0x289a1c));}function _0x396b06(_0x5e1bf4,_0x575962,_0x15d20b){const _0x3eab25=_0x51cfcc['userId'],_0x33c76b=_0x51cfcc['aiSource'],_0x514be0='revision:'+_0x254208+':'+_0x3eab25+':'+_0x1933f8++,_0x5263fa=_0x289a1c['createRange'](_0x575962,_0x15d20b);_0x245c0e['markers']['set'](_0x514be0,_0x5263fa),_0x33c76b&&(_0x335ff2[_0x514be0]=_0x33c76b),null!==_0x3eab25&&_0x299595['add'](_0x3eab25);}}_getVidAttributeName(_0x24e473){switch(_0x24e473['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x1c9900){const _0xc4f0ae=this['_idsRoots']['get'](_0x1c9900['position']['root']['rootName']),_0x5879ed=_0x11effe(_0x1c9900['position'],_0xc4f0ae),_0x4ce445=null===_0x1c9900['_authorId']?null:_0x1c9900['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b0966=_0x1c9900['_aiSource']||null,_0x2a729b=_0x5879ed['parent'],_0x4ddc0b=this['_revisionId'],_0x532a3c=[];for(const _0x3dd26d of _0x1c9900['nodes'])if(_0x3dd26d['is']('element'))_0x532a3c['push'](this['_makeIdsRoot'](_0x3dd26d));else{for(let _0xbff207=0x0;_0xbff207<_0x3dd26d['offsetSize'];_0xbff207++)_0x532a3c['push'](new _0x2bedc6('$text',{'vid':this['_revisionId']++}));}const _0x508631=this['_revisionId'];for(let _0xa19c0a=_0x4ddc0b;_0xa19c0a<_0x508631;_0xa19c0a++)this['_touched']['set'](_0xa19c0a,{'userId':_0x4ce445,'aiSource':_0x4b0966});_0x2a729b['_insertChild'](_0x5879ed['offset'],_0x532a3c);}_setTouched(_0x44b28b,_0x5456f8,_0x4768f1){this['_touched']['set'](_0x44b28b,{'userId':_0x5456f8,'aiSource':_0x4768f1||this['_touched']['get'](_0x44b28b)?.['aiSource']||null});}_handleMoveOperation(_0x5d9f17){(_0x5d9f17=this['_cloneOperation'](_0x5d9f17,this['_idsRoots']))['_execute']();const _0x355d17=null===_0x5d9f17['_authorId']?null:_0x5d9f17['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x193918=_0x5d9f17['_aiSource']||null,_0x77f5e8=_0x5d9f17['getMovedRangeStart'](),_0x29c949=_0x77f5e8['parent'],_0x10e549=_0x77f5e8['offset'],_0x5030dd=(_0x4e3e77,_0x3e4399,_0x51455c)=>{for(let _0x1b2554=_0x3e4399;_0x1b2554<_0x51455c;_0x1b2554++){const _0x4ba754=_0x4e3e77['getChild'](_0x1b2554);_0x4ba754['is']('element','$text')?this['_setTouched'](_0x4ba754['getAttribute']('vid'),_0x355d17,_0x193918):(this['_setTouched'](_0x4ba754['getAttribute']('vid_start'),_0x355d17,_0x193918),_0x5030dd(_0x4ba754,0x0,_0x4ba754['childCount']),this['_setTouched'](_0x4ba754['getAttribute']('vid_end'),_0x355d17,_0x193918));}};_0x5030dd(_0x29c949,_0x10e549,_0x10e549+_0x5d9f17['howMany']);}_handleMergeOperation(_0x5bd084){const _0x29273c=null===(_0x5bd084=this['_cloneOperation'](_0x5bd084,this['_idsRoots']))['_authorId']?null:_0x5bd084['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43fcf2=_0x5bd084['_aiSource']||null,_0x3e8a1b=_0x5bd084['targetPosition']['parent'],_0x410e58=_0x5bd084['sourcePosition']['parent'],_0x107a24=_0x3e8a1b['getAttribute']('vid_end'),_0x39fa0a=_0x410e58['getAttribute']('vid_start');_0x3e8a1b['_setAttribute']('vid_end',_0x410e58['getAttribute']('vid_end')),_0x410e58['_setAttribute']('vid_end',_0x107a24),this['_setTouched'](_0x39fa0a,_0x29273c,_0x43fcf2),this['_setTouched'](_0x107a24,_0x29273c,_0x43fcf2),_0x5bd084['_execute']();}_handleSplitOperation(_0x3d0390){const _0x423f62=null===(_0x3d0390=this['_cloneOperation'](_0x3d0390,this['_idsRoots']))['_authorId']?null:_0x3d0390['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5d647e=_0x3d0390['_aiSource']||null,_0x41912f=_0x3d0390['graveyardPosition'],_0x4464db=_0x3d0390['splitPosition']['parent'];_0x3d0390['_execute']();const _0x4e1505=_0x4464db['getAttribute']('vid_end'),_0x104a9b=_0x3d0390['insertionPosition']['nodeAfter'];if(_0x41912f){const _0x367b91=_0x104a9b['getAttribute']('vid_end'),_0x46a589=_0x4464db['getAttribute']('vid_end');_0x4464db['_setAttribute']('vid_end',_0x367b91),_0x104a9b['_setAttribute']('vid_end',_0x46a589),this['_setTouched'](_0x4464db['getAttribute']('vid_end'),_0x423f62,_0x5d647e),this['_setTouched'](_0x104a9b['getAttribute']('vid_start'),_0x423f62,_0x5d647e);}else{const _0x5c449c=this['_revisionId']++,_0x1b6c3f=this['_revisionId']++;_0x4464db['_setAttribute']('vid_end',_0x5c449c),_0x104a9b['_setAttribute']('vid_start',_0x1b6c3f),_0x104a9b['_setAttribute']('vid_end',_0x4e1505),this['_setTouched'](_0x5c449c,_0x423f62,_0x5d647e),this['_setTouched'](_0x1b6c3f,_0x423f62,_0x5d647e);}}_handleMarkerOperation(_0x13dbde){if(!_0x13dbde['affectsData'])return;const _0x2676bf=(_0x13dbde=this['_cloneOperation'](_0x13dbde,this['_diffRoots']))['oldRange']?_0x13dbde['oldRange']['root']:null,_0x5c2726=_0x13dbde['newRange']?_0x13dbde['newRange']['root']:null;_0x2676bf&&this['_markers']['delete'](_0x13dbde['name']),_0x5c2726&&this['_markers']['set'](_0x13dbde['name'],_0x13dbde['newRange']['clone']());const _0x5ef36a=null===_0x13dbde['_authorId']?null:_0x13dbde['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x304e34=_0x13dbde['name'];if(_0x13dbde['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x304e34,_0x13dbde['_aiSource']),!this['_touchedMarkers']['has'](_0x304e34))return void this['_touchedMarkers']['set'](_0x304e34,{'range':_0x13dbde['oldRange'],'userId':_0x5ef36a});const _0x3b76ba=this['_touchedMarkers']['get'](_0x304e34),_0x586e81=_0x3b76ba['range'],_0x1c3148=_0x13dbde['newRange'];null==_0x586e81&&null==_0x1c3148||_0x586e81&&_0x1c3148&&_0x586e81['isEqual'](_0x1c3148)?this['_touchedMarkers']['delete'](_0x13dbde['name']):_0x3b76ba['userId']=_0x5ef36a;}_handleRootOperation(_0x4dafd4,_0x45fe2b){this['_diffRoots']['has'](_0x4dafd4['rootName'])?this['_diffRoots']['get'](_0x4dafd4['rootName'])['_isAttached']=_0x4dafd4['isAdd']:(this['_diffRoots']['set'](_0x4dafd4['rootName'],Et(_0x4dafd4['rootName'],_0x4dafd4['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x4dafd4['rootName'],{}),_0x45fe2b&&this['_idsRoots']['set'](_0x4dafd4['rootName'],Et(_0x4dafd4['rootName'],_0x4dafd4['elementName'],!0x0)));const _0xcc66e3=null===_0x4dafd4['_authorId']?null:_0x4dafd4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb60279=this['_touchedRoots']['get'](_0x4dafd4['rootName']);_0xb60279&&_0xb60279['userId']===_0xcc66e3?this['_touchedRoots']['delete'](_0x4dafd4['rootName']):this['_touchedRoots']['set'](_0x4dafd4['rootName'],{'userId':_0xcc66e3,'isAttached':_0x4dafd4['isAdd']});}_handleRootAttributeOperation(_0x3c4471){const _0xb5e973=this['_diffRootsAttributes']['get'](_0x3c4471['root']['rootName']);null===_0x3c4471['newValue']?delete _0xb5e973[_0x3c4471['key']]:_0xb5e973[_0x3c4471['key']]=_0x3c4471['newValue'];}};function St(_0x12e3cd){const _0x1a93cb=Et(_0x12e3cd['rootName'],_0x12e3cd['name'],_0x12e3cd['isAttached']());for(const _0x529db0 of _0x12e3cd['getChildren']()){const _0x5ab486=_0x529db0['_clone'](!0x0);_0x1a93cb['_appendChild'](_0x5ab486);}return _0x1a93cb;}function Et(_0x1ab669,_0x49c765,_0x4234a3=!0x0){const _0x4d3a83=new _0x411dfa();return _0x4d3a83['rootName']=_0x1ab669,_0x4d3a83['name']=_0x49c765,_0x4d3a83['_isAttached']=_0x4234a3,_0x4d3a83['isAttached']=()=>_0x4d3a83['_isAttached'],_0x4d3a83;}function Ot(_0x15143f,_0x3468fd,_0x3227e8){const _0x5ad581='elementEnd'==_0x15143f['type']?_0x3227e8['createPositionAt'](_0x15143f['item'],'end'):_0x3227e8['createPositionBefore'](_0x15143f['item']);return _0x3227e8['createPositionFromPath'](_0x3468fd,_0x5ad581['path'],_0x5ad581['stickiness']);}function Ct(_0xe15d05,_0x4b5974,_0x3e0ad4){const _0x1f4f83='elementStart'==_0xe15d05['type']?_0x3e0ad4['createPositionAt'](_0xe15d05['item'],0x0):_0x3e0ad4['createPositionAfter'](_0xe15d05['item']);return _0x3e0ad4['createPositionFromPath'](_0x4b5974,_0x1f4f83['path'],_0x1f4f83['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x3e0f7e();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x57ac42){super(),this['id']=_0x57ac42['id']||_0x164a82(),this['author']=_0x57ac42['author'],this['type']=_0x57ac42['type'],this['data']=_0x57ac42['data']||{},this['rootName']=_0x57ac42['rootName'],this['set']('createdAt',_0x57ac42['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1d002b,_0x1e1bb2){this['newRevisionId']=_0x1d002b,this['oldRevisionId']=_0x1e1bb2,this['changes']=new _0x29b214();}_setChanges(_0x2ad811){for(const _0x470d68 of _0x2ad811)this['changes']['add'](_0x470d68);}},Pt=class extends _0x149c71{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[_0x1b7fe0,_0x18d040,bt,Rt];}constructor(_0x50d058){super(_0x50d058),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',(_0x5ec4f6,_0x41fa69,_0x2647ba)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x392eaa=>{for(const _0x59b708 of this['editor']['editing']['view']['document']['roots'])_0x2647ba?_0x392eaa['removeClass']('ck-editor__editable__overlay',_0x59b708):_0x392eaa['addClass']('ck-editor__editable__overlay',_0x59b708);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x48ff8a=>null!==_0x48ff8a),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x29ce31,_0xb4c96b,_0x9c5999)=>_0x29ce31&&_0x9c5999?_0xb4c96b['changes']['getIndex'](_0x9c5999):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x471aa4,_0x11e0e3)=>_0x471aa4?_0x11e0e3['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x18d040),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x357645=this['editor'],_0x2c4605=new $t(_0x357645,{'direction':'backward'}),_0x50050d=new $t(_0x357645,{'direction':'forward'});_0x357645['commands']['add']('showPreviousChange',_0x2c4605),_0x357645['commands']['add']('showNextChange',_0x50050d),_0x357645['commands']['add']('restoreRevision',new Ft(_0x357645)),this['on']('change:numberOfChanges',()=>{_0x2c4605['refresh'](),_0x50050d['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x357645['enableReadOnlyMode']('revision-viewer'),_0x357645['plugins']['has']('WidgetToolbarRepository')&&_0x357645['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x5ad16e){return await this['_utils']['loadRevisionData'](_0x5ad16e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5ad16e);}async getRevisionRootsAttributes(_0x4fa5a0){return await this['_utils']['loadRevisionData'](_0x4fa5a0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4fa5a0);}async['compare'](_0x19428a,_0xdd60d6,_0x78a3c0=!0x1){if(!this['isEnabled'])return;const _0x2cce15=this['diff'],_0x1f56c3=this['repository'],_0x58774e='string'==typeof _0x19428a?_0x1f56c3['getRevision'](_0x19428a):_0x19428a,_0x407f38='string'==typeof _0xdd60d6?_0x1f56c3['getRevision'](_0xdd60d6):_0xdd60d6,_0x268c4b=_0x58774e['id'],_0xb93408=_0x407f38?_0x407f38['id']:null;if(!_0x78a3c0&&this['diff']&&this['diff']['newRevisionId']===_0x268c4b&&this['diff']['oldRevisionId']===_0xb93408)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x268c4b,_0xb93408);const _0x1f11bc=this['_getRevisionsRange'](_0x58774e,_0x407f38,!0x0)['map'](_0x174c38=>this['_utils']['loadRevisionData'](_0x174c38,this['adapter']));return _0x1f11bc['push'](new Promise(_0x1fcd80=>{setTimeout(_0x1fcd80,0x14);})),Promise['all'](_0x1f11bc)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x464665=this['_getDiff'](_0x268c4b,_0xb93408);this['_cleanUpCommentMarkers'](_0x464665);for(const _0x18c843 of _0x464665['changes'])this['_changeIdToChange']['set'](_0x18c843['id'],_0x18c843);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x6ccb32=>{for(const _0x1c57bd of this['editor']['model']['document']['getRootNames']())_0x6ccb32['detachRoot'](_0x1c57bd);for(const _0x125613 of Object['keys'](_0x464665['model'])){const _0x5af6a1=_0x464665['model'][_0x125613]['name'],_0x1cb669=_0x6ccb32['addRoot'](_0x125613,_0x5af6a1);for(const _0xee72f of Object['keys'](_0x464665['attributes'][_0x125613]))_0x6ccb32['setAttribute'](_0xee72f,_0x464665['attributes'][_0x125613][_0xee72f],_0x1cb669);_0x6ccb32['insert'](_0x464665['model'][_0x125613],_0x1cb669,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x464665['changes'])),this['isReady']=!0x0;})['catch'](_0x16b521=>{console['error'](_0x16b521),this['_cleanUp'](),_0x2cce15&&(this['diff']=_0x2cce15),this['isReady']=!0x0;});}addRevisionData(_0x3f9473,_0x4654c4){const _0x5570e3=this['repository']['createRevision'](_0x3f9473);return _0x5570e3['on']('_update',(_0x4b87e1,_0x490551,_0x4482b4)=>_0x4654c4(_0x490551,_0x4482b4,_0x5570e3)),this['repository']['addRevision'](_0x5570e3),_0x5570e3;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x48cbe0=>{for(const _0x38832d of this['editor']['model']['document']['getRootNames']())_0x48cbe0['detachRoot'](_0x38832d);});}_cleanUpCommentMarkers(_0x47be3c){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x3a4a85=this['_getVisibleCommentThreadIds']();for(const _0x57e258 of Object['values'](_0x47be3c['model']))for(const _0x1f5e03 of Array['from'](_0x57e258['markers']['keys']()))_0x1f5e03['startsWith']('revision-comment:')&&!_0x3a4a85['has'](Ut(_0x1f5e03))&&_0x57e258['markers']['delete'](_0x1f5e03);}_sortAndFilterDiffChanges(_0x38920a){const _0x466de6=[],_0x131ff7=new Map();for(const _0x5f0e65 of this['editor']['model']['document']['getRootNames']()){const _0x2e57b0=this['editor']['editing']['view']['getDomRoot'](_0x5f0e65);if(!_0x2e57b0)continue;const _0x14ee03=_0x2e57b0['getClientRects']()['item'](0x0);_0x14ee03&&(_0x466de6['push'](_0x5f0e65),_0x131ff7['set'](_0x5f0e65,_0x14ee03));}return _0x466de6['sort']((_0x5efdcd,_0x4d78a8)=>{const _0x3ccc75=_0x131ff7['get'](_0x5efdcd),_0x3d222e=_0x131ff7['get'](_0x4d78a8);return _0x3ccc75['y']-_0x3d222e['y']||_0x3ccc75['x']-_0x3d222e['x'];}),(_0x38920a=_0x38920a['filter'](_0x3f1e00=>_0x466de6['includes'](_0x3f1e00['rootName'])))['sort']((_0x513d08,_0x3e96e4)=>_0x466de6['indexOf'](_0x513d08['rootName'])-_0x466de6['indexOf'](_0x3e96e4['rootName'])),_0x38920a;}['_makeTape'](_0x16a465,_0x37710a={}){const _0x33989e=Array['from'](_0x16a465['markers'])['filter'](([_0x2d0c81,_0x2b5c5c])=>_0x2d0c81['startsWith']('revision:')&&!_0x2b5c5c['isCollapsed']),_0x20c213=Array['from'](this['editor']['model']['createRangeIn'](_0x16a465)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x33989e['length'])for(const _0xaa2b34 of _0x20c213){const [_0x301df6,_0x4638b9]=_0x33989e[0x0],[,_0x3a9c62,_0x3ca69b]=_0x301df6['split'](':'),_0x421e9a=_0x37710a[_0x301df6]||null;if(_0x4638b9['end']['isEqual'](_0xaa2b34['nextPosition'])&&_0x33989e['shift'](),(_0xaa2b34['previousPosition']['isEqual'](_0x4638b9['start'])||_0xaa2b34['previousPosition']['isAfter'](_0x4638b9['start']))&&('insertion'==_0x3a9c62?_0xaa2b34['isAdded']={'userId':_0x3ca69b,'aiSource':_0x421e9a}:'deletion'==_0x3a9c62&&(_0xaa2b34['isRemoved']={'userId':_0x3ca69b,'aiSource':_0x421e9a})),0x0==_0x33989e['length'])break;}return _0x20c213;}_refreshStartEndIndex(_0x259ae3){const _0x3802dc=new Map();for(let _0x5bb47b=0x0;_0x5bb47b<_0x259ae3['length'];_0x5bb47b++)'text'===_0x259ae3[_0x5bb47b]['type']?(_0x259ae3[_0x5bb47b]['item']['startIndex']=_0x5bb47b,_0x259ae3[_0x5bb47b]['item']['endIndex']=_0x5bb47b):('elementStart'===_0x259ae3[_0x5bb47b]['type']?_0x259ae3[_0x5bb47b]['item']['startIndex']=_0x5bb47b:'elementEnd'===_0x259ae3[_0x5bb47b]['type']&&(_0x259ae3[_0x5bb47b]['item']['endIndex']=_0x5bb47b),_0x3802dc['set'](_0x259ae3[_0x5bb47b]['id'],_0x5bb47b));for(const _0x224b36 of _0x3802dc['values']())'elementStart'===_0x259ae3[_0x224b36]['type']?_0x259ae3[_0x224b36]['item']['endIndex']=_0x3802dc['get'](_0x259ae3[_0x224b36]['pairId']):'elementEnd'===_0x259ae3[_0x224b36]['type']&&(_0x259ae3[_0x224b36]['item']['startIndex']=_0x3802dc['get'](_0x259ae3[_0x224b36]['pairId']));}['_processTape'](_0x52fb52){for(let _0x3668ec=0x0;_0x3668ec<_0x52fb52['length'];_0x3668ec++){if('elementStart'===_0x52fb52[_0x3668ec]['type'])_0x52fb52[_0x3668ec]['item']['startIndex']=_0x3668ec;else{if('elementEnd'===_0x52fb52[_0x3668ec]['type']){_0x52fb52[_0x3668ec]['item']['endIndex']=_0x3668ec;const _0x2a91ff=_0x52fb52[_0x3668ec]['item']['startIndex'];_0x52fb52[_0x2a91ff]['pairId']=_0x52fb52[_0x3668ec]['id'],_0x52fb52[_0x3668ec]['pairId']=_0x52fb52[_0x2a91ff]['id'];}else _0x52fb52[_0x3668ec]['item']['startIndex']=_0x3668ec,_0x52fb52[_0x3668ec]['item']['endIndex']=_0x3668ec,_0x52fb52[_0x3668ec]['pairId']=null;}_0x52fb52[_0x3668ec]['markersStart']||(_0x52fb52[_0x3668ec]['markersStart']=[],_0x52fb52[_0x3668ec]['markersEnd']=[]);}}_markInsertions(_0x598902,_0x5092be){const _0x4e8737=_0x598902['filter'](_0x4de669=>!_0x4de669['isAdded']);for(let _0x5b8609=0x0;_0x5b8609<_0x5092be['length'];_0x5b8609++)_0x5092be[_0x5b8609]['isAdded']&&(_0x4e8737[_0x5b8609]['isAdded']=_0x5092be[_0x5b8609]['isAdded']);}_getDiff(_0xbe58a9,_0x4fa818=null){const _0x124db2=this['repository']['getRevision'](_0xbe58a9),_0x5c97a7=_0x4fa818?this['repository']['getRevision'](_0x4fa818):null,_0x53ac1e=this['_getRevisionsRange'](_0x124db2,_0x5c97a7),_0x4eaaa9=_0x53ac1e[_0x53ac1e['length']-0x1],_0x13ed17=new Map(),_0xae62bc={'model':{},'attributes':{},'changes':[]},_0x2c635e=new Set(),_0x4354ca=new Map();for(let _0x1687d0=_0x53ac1e['length']-0x1;_0x1687d0>=0x0;_0x1687d0--){const _0x42af7=_0x53ac1e[_0x1687d0];for(const _0x2ccde7 of Object['keys'](_0x42af7['diffData']))if(_0x42af7['diffData'][_0x2ccde7]['attachChange']){const _0x5bff45=_0x42af7['diffData'][_0x2ccde7]['attachChange'];_0x5bff45['isAttached']?(_0x2c635e['add'](_0x2ccde7),_0x4354ca['has'](_0x2ccde7)&&_0x4354ca['get'](_0x2ccde7)['userId']==_0x5bff45['userId']?_0x4354ca['delete'](_0x2ccde7):_0x4354ca['set'](_0x2ccde7,_0x5bff45)):_0x4354ca['has'](_0x2ccde7)?(_0x2c635e['delete'](_0x2ccde7),_0x4354ca['delete'](_0x2ccde7)):(_0x2c635e['add'](_0x2ccde7),_0x4354ca['set'](_0x2ccde7,_0x5bff45));}else _0x2c635e['add'](_0x2ccde7);}for(const _0x13dc34 of _0x2c635e){const _0xcd3933=_0x4354ca['has'](_0x13dc34)&&!_0x4354ca['get'](_0x13dc34)['isAttached'];let _0x6d7a97=_0xcd3933?_0x53ac1e['length']-0x1:0x0;const _0x2f58f1=_0xcd3933?-0x1:0x1;for(;_0x53ac1e[_0x6d7a97];){const _0x291560=_0x53ac1e[_0x6d7a97];if(_0x291560['diffData'][_0x13dc34]){const _0x537588=_0xcd3933?_0x291560['diffData'][_0x13dc34]['attributesBefore']:_0x291560['diffData'][_0x13dc34]['attributesAfter'];_0xae62bc['attributes'][_0x13dc34]=_0x537588?_0x2b595f(_0x537588):{};break;}_0x6d7a97+=_0x2f58f1;}}for(const _0x23adad of _0x53ac1e){_0x23adad['model']={};for(const _0x52e667 of _0x23adad['authors'])_0x13ed17['set'](_0x52e667['id'],_0x52e667);for(const _0x161885 of _0x2c635e){const _0x1c2293=_0x23adad['diffData'][_0x161885]?_0x23adad['diffData'][_0x161885]['insertions']:'[]',_0x3cdcb2=_0x23adad['diffData'][_0x161885]?_0x23adad['diffData'][_0x161885]['deletions']:'[]',_0x2cdfc8=_0x23adad['diffData'][_0x161885]?.['rootElementName']||'$root';_0x23adad['model'][_0x161885]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1c2293,_0x2cdfc8),'deletions':this['_utils']['_makeModelFromViewString'](_0x3cdcb2,_0x2cdfc8)};}}for(const _0x5ba033 of _0x2c635e){let _0x46a35d=null,_0x5d50d4=0x0;const _0x2e29d0=_0x53ac1e['map'](_0x4ae7fd=>_0x4ae7fd['diffData'][_0x5ba033]?.['rootElementName'])['find'](_0x530acb=>void 0x0!==_0x530acb)||'$root',_0x32a807=new Map(Array['from'](_0x124db2['model'][_0x5ba033]['insertions']['markers'])['filter'](([_0x1e6c88])=>!_0x1e6c88['startsWith']('revision:')));let _0x1463cb=0x0;for(const _0x548566 of _0x53ac1e){const _0x1c3994=_0x548566['diffData'][_0x5ba033]?.['aiSources']||{},_0x1a7f84=this['_makeTape'](_0x548566['model'][_0x5ba033]['insertions'],_0x1c3994);_0x548566==_0x124db2?(_0x46a35d=_0x1a7f84,_0x5d50d4=_0x46a35d['length'],_0x46a35d['forEach'](_0x805c46=>{_0x805c46['id']=_0x1463cb++;}),this['_processTape'](_0x46a35d)):this['_markInsertions'](_0x46a35d,_0x1a7f84);const _0x3798e9=_0x46a35d['filter'](_0x4c93cf=>!_0x4c93cf['isAdded'])['map'](_0x5c536a=>_0x5c536a['id']);let _0x200491=0x0;const _0x3fec33=this['_makeTape'](_0x548566['model'][_0x5ba033]['deletions'],_0x1c3994);_0x3fec33['forEach'](_0x4fddf9=>{_0x4fddf9['isRemoved']?_0x4fddf9['id']=_0x5d50d4++:_0x4fddf9['id']=_0x3798e9[_0x200491++];}),this['_processTape'](_0x3fec33),this['_setDistance'](_0x46a35d,'isAdded'),this['_setDistance'](_0x3fec33,'isRemoved'),_0x548566==_0x124db2&&this['_markMarkers'](_0x46a35d,_0x32a807),_0x46a35d=this['_joinTapes'](_0x46a35d,_0x3fec33),this['_refreshStartEndIndex'](_0x46a35d),this['_setDistance'](_0x46a35d,'isRemoved');}_0x46a35d=_0x46a35d['filter'](_0x5ee299=>!(_0x5ee299['isAdded']&&_0x5ee299['isRemoved']));const _0x3a61f7=new Map(_0x4eaaa9['model'][_0x5ba033]['deletions']['markers']),_0x2a25e5=new Set(_0x32a807['keys']());for(const _0x288c43 of _0x3a61f7['keys']())_0x2a25e5['delete'](_0x288c43);const _0x1298fb=Object['assign']({},..._0x53ac1e['map'](_0x211ffc=>_0x211ffc['diffData'][_0x5ba033]?.['aiSources']));this['_markSuggestions'](_0x46a35d,_0x2a25e5,_0x1298fb),this['_fixObsoleteTags'](_0x46a35d),_0x46a35d=this['_removeMissingPairs'](_0x46a35d),_0x46a35d=this['_markMismatchedRemovedTags'](_0x46a35d),_0x46a35d=this['_removeUnsupportedChanges'](_0x46a35d);const {root:_0x3d0c62,changes:_0xb83d74}=this['_makeModelFromTape'](_0x46a35d,_0x13ed17,_0x5ba033,_0x2e29d0);_0xae62bc['model'][_0x5ba033]=_0x3d0c62;const _0x318d63=_0x4354ca['get'](_0x5ba033);if(_0x318d63){const _0x24f45e=_0x13ed17['get'](_0x318d63['userId']),_0x334e91=new Mt({'author':_0x24f45e,'type':_0x318d63['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5ba033});_0xb83d74['unshift'](_0x334e91),_0xae62bc['attributes'][_0x5ba033]['revisionHistoryAttachChange']=_0x334e91['id'];}_0xae62bc['changes']=_0xae62bc['changes']['concat'](_0xb83d74);}return _0xae62bc;}['_markMarkers'](_0x2453d0,_0x5ace32){for(let _0x4237de=0x0;_0x4237de<_0x2453d0['length'];_0x4237de++)for(const [_0x3452f0,_0x499dd1]of _0x5ace32)!_0x499dd1['isCollapsed']&&_0x499dd1['start']['isEqual'](_0x2453d0[_0x4237de]['previousPosition'])&&_0x2453d0[_0x4237de]['markersStart']['push'](_0x3452f0),_0x499dd1['end']['isEqual'](_0x2453d0[_0x4237de]['nextPosition'])&&_0x2453d0[_0x4237de]['markersEnd']['push'](_0x3452f0);}['_joinTapes'](_0x47cc1b,_0x1d391a){let _0x1dc491=[],_0x20d355=0x0,_0x490eb1=0x0;for(;_0x20d355<_0x47cc1b['length']||_0x490eb1<_0x1d391a['length'];){const _0x6670d7=_0x47cc1b[_0x20d355]||{},_0x596ab0=_0x1d391a[_0x490eb1]||{};if(_0x6670d7['id']==_0x596ab0['id'])_0x20d355++,_0x490eb1++,_0x1dc491['push'](_0x6670d7);else{if(_0x596ab0['isRemoved']&&_0x6670d7['isAdded']){const {commonTape:_0x3326fe,iEnd:_0x1f7526,jEnd:_0x1def39}=this['_threeWayMerge'](_0x47cc1b,_0x20d355,_0x1d391a,_0x490eb1);_0x1dc491=_0x1dc491['concat'](_0x3326fe),_0x20d355=_0x1f7526,_0x490eb1=_0x1def39;}else _0x596ab0['isRemoved']?(_0x490eb1++,_0x1dc491['push'](_0x596ab0)):(_0x20d355++,_0x1dc491['push'](_0x6670d7));}}return _0x1dc491;}_markSuggestions(_0x11381c,_0x1c87b3,_0x1d7a8a){const _0x49f933=[];for(let _0x57a965=0x0;_0x57a965<_0x11381c['length'];_0x57a965++){for(let _0x5e3127=0x0;_0x5e3127<_0x11381c[_0x57a965]['markersStart']['length'];_0x5e3127++){const _0xb8f186=_0x11381c[_0x57a965]['markersStart'][_0x5e3127];if(!_0x1c87b3['has'](_0xb8f186))continue;const {group:_0x5ad389,type:_0x3f9108,authorId:_0x59e84d}=_0x31e208(_0xb8f186);if('revision-suggestion'!=_0x5ad389||'insertion'!=_0x3f9108&&'deletion'!=_0x3f9108)continue;const _0x2fc5ab=_0x1d7a8a['suggestion:'+_0xb8f186['slice'](0x14)]||null;_0x49f933['unshift']({'type':_0x3f9108,'name':_0xb8f186,'userId':_0x59e84d,'aiSource':_0x2fc5ab}),_0x11381c[_0x57a965]['markersStart']['splice'](_0x5e3127,0x1),_0x5e3127--;}_0x2c2b25(_0x11381c[_0x57a965]);for(let _0x22b66e=0x0;_0x22b66e<_0x11381c[_0x57a965]['markersEnd']['length'];_0x22b66e++){const _0x105063=_0x11381c[_0x57a965]['markersEnd'][_0x22b66e];if(!_0x1c87b3['has'](_0x105063))continue;const {group:_0x18389c,type:_0x1d5831}=_0x31e208(_0x105063);if('revision-suggestion'!=_0x18389c||'insertion'!=_0x1d5831&&'deletion'!=_0x1d5831)continue;_0x11381c[_0x57a965]['markersEnd']['splice'](_0x22b66e,0x1),_0x22b66e--;const _0xdf1a85=_0x49f933['findIndex'](_0xc89a99=>_0xc89a99['name']==_0x105063);_0xdf1a85>-0x1&&_0x49f933['splice'](_0xdf1a85,0x1);}}function _0x31e208(_0x297b89){const _0x512ad6=_0x297b89['split'](':');return{'group':_0x512ad6[0x0],'type':_0x512ad6[0x1],'subType':_0x512ad6['length']>=0x5?_0x512ad6[0x2]:null,'id':_0x512ad6['length']<0x5?_0x512ad6[0x2]:_0x512ad6[0x3],'authorId':_0x512ad6['length']<0x5?_0x512ad6[0x3]:_0x512ad6[0x4],'markerCount':0x6==_0x512ad6['length']?_0x512ad6[0x5]:null};}function _0x2c2b25(_0x433339){for(let _0x1aaf75=0x0;_0x1aaf75<_0x49f933['length'];_0x1aaf75++){if(_0x433339['isAdded']&&'insertion'==_0x49f933[_0x1aaf75]['type']&&_0x433339['isAdded']['userId']==_0x49f933[_0x1aaf75]['userId'])return _0x433339['isAddSuggestion']={..._0x49f933[_0x1aaf75],'aiSource':_0x433339['isAdded']['aiSource']||_0x49f933[_0x1aaf75]['aiSource']},void delete _0x433339['isAdded'];if(!_0x433339['isAdded']&&!_0x433339['isRemoved']&&'deletion'==_0x49f933[_0x1aaf75]['type'])return void(_0x433339['isRemoveSuggestion']=_0x49f933[_0x1aaf75]);}}}_setDistance(_0x25d900,_0x172da2){let _0x40c483=0x0,_0x1f9544=!0x1;const _0x209709=new Map();for(const _0x5bcacc of _0x25d900)_0x5bcacc[_0x172da2]?_0x1f9544&&(_0x40c483++,_0x1f9544=!0x1):(_0x40c483++,_0x1f9544=!0x0),_0x209709['set'](_0x5bcacc['id'],_0x40c483);for(let _0x5547eb=0x0;_0x5547eb<_0x25d900['length'];_0x5547eb++){if('isRemoved'==_0x172da2&&_0x25d900[_0x5547eb]['isAdded']||'isAdded'==_0x172da2&&_0x25d900[_0x5547eb]['isRemoved'])continue;if('text'==_0x25d900[_0x5547eb]['type']){_0x25d900[_0x5547eb]['distance']=0x0;continue;}const _0xd37906=_0x209709['get'](_0x25d900[_0x5547eb]['pairId']),_0x3866c4=_0x209709['get'](_0x25d900[_0x5547eb]['id']);_0x25d900[_0x5547eb]['distance']=_0xd37906-_0x3866c4;}}_getRevisionsRange(_0x19e2e9,_0x17a0a8,_0x404f36=!0x1){const _0x5b0006=[];let _0x20e57d=this['repository']['getIndex'](_0x19e2e9),_0x15172b=this['repository']['getIndex'](_0x17a0a8);for(-0x1==_0x15172b&&(_0x15172b=this['repository']['_revisions']['length'],_0x404f36=!0x1);_0x20e57d<_0x15172b;)_0x5b0006['push'](this['repository']['getRevision'](_0x20e57d)),_0x20e57d++;return _0x404f36&&_0x5b0006['push'](this['repository']['getRevision'](_0x20e57d)),_0x5b0006;}_threeWayMerge(_0x384347,_0x5e73ca,_0x31aa34,_0x548b6e){const _0x146bd0=this['editor']['model']['schema'];let _0x37c60d=_0x5e73ca;for(;_0x384347[_0x37c60d]&&_0x384347[_0x37c60d]['isAdded'];)_0x37c60d++;let _0x304313=_0x548b6e;for(;_0x31aa34[_0x304313]&&_0x31aa34[_0x304313]['isRemoved'];)_0x304313++;_0x11ff64(_0x384347,_0x5e73ca,_0x37c60d),_0x11ff64(_0x31aa34,_0x548b6e,_0x304313);const _0xa744d=_0x31aa34['slice'](_0x548b6e,_0x304313)['concat'](_0x384347['slice'](_0x5e73ca,_0x37c60d));return _0xa744d['sort']((_0x220e4,_0x5e349e)=>_0x220e4['side']!=_0x5e349e['side']?_0x220e4['side']-_0x5e349e['side']:_0x220e4['level']!=_0x5e349e['level']?_0x220e4['level']-_0x5e349e['level']:_0x220e4['distance']!=_0x5e349e['distance']?_0x5e349e['distance']-_0x220e4['distance']:!!_0x220e4['isAdded']!=!!_0x5e349e['isAdded']?-0x1==_0x220e4['side']||0x0==_0x220e4['side']?_0x220e4['isAdded']?-0x1:0x1:_0x220e4['isAdded']?0x1:-0x1:_0x220e4['index']-_0x5e349e['index']),{'commonTape':_0xa744d,'iEnd':_0x37c60d,'jEnd':_0x304313};function _0x11ff64(_0x5a7189,_0x345741,_0x28f419){let _0x2c4773=-0x1,_0x46060a=Number['POSITIVE_INFINITY'],_0x465a7a=!0x0;for(let _0x65b1f0=_0x345741;_0x65b1f0<_0x28f419;_0x65b1f0++)if(_0x146bd0['isInline'](_0x5a7189[_0x65b1f0]['item'])||(_0x465a7a=!0x1),_0x5a7189[_0x65b1f0]['item']['startIndex']<_0x345741&&(_0x2c4773=_0x65b1f0),_0x5a7189[_0x65b1f0]['item']['endIndex']>=_0x28f419){_0x46060a=_0x65b1f0;break;}_0x465a7a&&(_0x2c4773=_0x28f419-0x1);for(let _0x32368f=_0x345741;_0x32368f<_0x28f419;_0x32368f++)_0x5a7189[_0x32368f]['side']=_0x32368f<=_0x2c4773?-0x1:_0x32368f<_0x46060a?0x0:0x1,_0x5a7189[_0x32368f]['index']=_0x32368f;let _0x49f923=0x0;for(let _0xd06471=_0x345741;_0xd06471<=_0x2c4773;_0xd06471++)0x0==_0x5a7189[_0xd06471]['distance']?_0x5a7189[_0xd06471]['level']=_0x49f923:(_0x49f923++,_0x5a7189[_0xd06471]['level']=_0x49f923,_0x49f923++);for(let _0x27ad65=_0x345741;_0x27ad65<_0x28f419;_0x27ad65++)0x0==_0x5a7189[_0x27ad65]['side']&&(_0x5a7189[_0x27ad65]['level']=_0x49f923);_0x49f923=0x0;for(let _0x26d1dd=_0x28f419-0x1;_0x26d1dd>=_0x46060a;_0x26d1dd--)0x0==_0x5a7189[_0x26d1dd]['distance']?_0x5a7189[_0x26d1dd]['level']=_0x49f923:(_0x49f923--,_0x5a7189[_0x26d1dd]['level']=_0x49f923,_0x49f923--);}}_fixObsoleteTags(_0x5f0c0d){const _0x2f2a1b=new Map(),_0x4adf91=this['editor']['model']['schema'];for(let _0x145ced=0x1;_0x145ced<_0x5f0c0d['length'];_0x145ced++){let _0x38b7ef,_0x113fdb,_0x5bc01d;const _0x3c6708=_0x5f0c0d[_0x145ced],_0x37b3ee=_0x5f0c0d[_0x145ced-0x1];if('text'==_0x3c6708['type'])continue;if(_0x3c6708['type']!=_0x37b3ee['type'])continue;if(!_0x4adf91['isBlock'](_0x37b3ee['item'])||_0x4adf91['isLimit'](_0x37b3ee['item']))continue;if(!_0x4adf91['isBlock'](_0x3c6708['item'])||_0x4adf91['isLimit'](_0x3c6708['item']))continue;if((_0x5f0c0d[_0x145ced]['isAdded']||_0x5f0c0d[_0x145ced]['isAddSuggestion'])&&_0x5f0c0d[_0x145ced-0x1]['isRemoved'])_0x38b7ef=_0x5f0c0d[_0x145ced],_0x113fdb=_0x5f0c0d[_0x145ced-0x1],_0x5bc01d=_0x145ced-0x1;else{if(!_0x5f0c0d[_0x145ced]['isRemoved']||!_0x5f0c0d[_0x145ced-0x1]['isAdded']&&!_0x5f0c0d[_0x145ced-0x1]['isAddSuggestion'])continue;_0x38b7ef=_0x5f0c0d[_0x145ced-0x1],_0x113fdb=_0x5f0c0d[_0x145ced],_0x5bc01d=_0x145ced;}const _0x4aaa3a=_0x38b7ef['level']==_0x113fdb['level'],_0x2438d8=Math['abs'](_0x38b7ef['level'])<Math['abs'](_0x113fdb['level'])&&0x0==_0x113fdb['distance'];(_0x4aaa3a||_0x2438d8)&&(_0x2f2a1b['set'](_0x113fdb['id'],_0x38b7ef['id']),_0x5f0c0d['splice'](_0x5bc01d,0x1),_0x145ced--,_0x38b7ef['isAdded']=!0x1);}for(let _0x53469d=0x0;_0x53469d<_0x5f0c0d['length'];_0x53469d++)_0x2f2a1b['has'](_0x5f0c0d[_0x53469d]['pairId'])&&(_0x5f0c0d[_0x53469d]['pairId']=_0x2f2a1b['get'](_0x5f0c0d[_0x53469d]['pairId']));}['_removeMissingPairs'](_0x5d074e){const _0x5f3b88=new Set(_0x5d074e['map'](_0x26825f=>_0x26825f['id']));for(let _0x3d1ce7=0x0;_0x3d1ce7<_0x5d074e['length'];_0x3d1ce7++)_0x5f3b88['has'](_0x5d074e[_0x3d1ce7]['pairId'])||0x0==_0x5d074e[_0x3d1ce7]['distance']||(_0x5d074e[_0x3d1ce7]['isIncorrect']=!0x0);return _0x5d074e['filter'](_0x37ec7a=>!_0x37ec7a['isIncorrect']);}_markMismatchedRemovedTags(_0x537520){const _0xf8de41=new Set();for(let _0x58efb4=0x0;_0x58efb4<_0x537520['length'];_0x58efb4++){if(_0xf8de41['has'](_0x537520[_0x58efb4]['id'])&&_0x537520[_0x58efb4]['isRemoved']&&(_0x537520[_0x58efb4]['isIncorrect']=!0x0),_0x537520[_0x58efb4]['isIncorrect'])continue;if(0x0==_0x537520[_0x58efb4]['distance'])continue;if('elementStart'!=_0x537520[_0x58efb4]['type'])continue;if(null==_0x537520[_0x58efb4]['pairId'])continue;let _0x1fd367=_0x58efb4+0x1,_0x5f0a6d=0x0;for(;_0x537520[_0x1fd367]['id']!=_0x537520[_0x58efb4]['pairId'];)'elementStart'==_0x537520[_0x1fd367]['type']?_0x5f0a6d++:'elementEnd'==_0x537520[_0x1fd367]['type']&&_0x5f0a6d--,_0x1fd367++;if(0x0!=_0x5f0a6d){if(_0x537520[_0x58efb4]['isRemoved'])_0x537520[_0x58efb4]['isIncorrect']=!0x0;else{for(;_0x1fd367!=_0x58efb4;)_0x537520[_0x1fd367]['isRemoved']&&0x0!=_0x537520[_0x1fd367]['distance']&&(_0x537520[_0x1fd367]['isIncorrect']=!0x0,_0xf8de41['add'](_0x537520[_0x1fd367]['pairId'])),_0x1fd367--;}}}return _0x537520['filter'](_0x2cd7c2=>!_0x2cd7c2['isIncorrect']);}_removeUnsupportedChanges(_0xf7b627){const _0x49609c=this['editor']['model']['schema'];for(let _0x4f6069=0x0;_0x4f6069<_0xf7b627['length'];_0x4f6069++){if(!(_0xf7b627[_0x4f6069]['isAdded']||_0xf7b627[_0x4f6069]['isAddSuggestion']||_0xf7b627[_0x4f6069]['isRemoved']||_0xf7b627[_0x4f6069]['isRemoveSuggestion']))continue;if(0x0==_0xf7b627[_0x4f6069]['distance'])continue;const _0x224b57=_0xf7b627[_0x4f6069]['item'];_0x49609c['isBlock'](_0x224b57)||_0x49609c['isLimit'](_0x224b57)||(_0xf7b627[_0x4f6069]['isAdded']&&delete _0xf7b627[_0x4f6069]['isAdded'],_0xf7b627[_0x4f6069]['isAddSuggestion']&&delete _0xf7b627[_0x4f6069]['isAddSuggestion'],_0xf7b627[_0x4f6069]['isRemoveSuggestion']&&delete _0xf7b627[_0x4f6069]['isRemoveSuggestion'],_0xf7b627[_0x4f6069]['isRemoved']&&(_0xf7b627[_0x4f6069]['isIncorrect']=!0x0));}return _0xf7b627['filter'](_0x16577b=>!_0x16577b['isIncorrect']);}['_makeModelFromTape'](_0x15e6c8,_0x48f4a0,_0x36f06f,_0x41f2f3){const _0x392fd8=new _0x411dfa(),_0x55b70b=[],_0x42ac42=new Map(),_0x4c5a6d=this['editor']['model'],_0x4b9da0=_0x4c5a6d['schema'],_0x479b0c=[_0x392fd8],_0xda86f0={},_0xc73e5c={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x392fd8['name']=_0x41f2f3;let _0x15598d=null;const _0x1d4080=[0x0];for(let _0x458fc2=0x0;_0x458fc2<_0x15e6c8['length'];_0x458fc2++)if('elementStart'===_0x15e6c8[_0x458fc2]['type']){_0x15e6c8[_0x458fc2]['previousPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080);const _0x1b5bd8=new _0x2bedc6(_0x15e6c8[_0x458fc2]['item']['name'],_0x15e6c8[_0x458fc2]['item']['getAttributes']());_0x479b0c[0x0]['_appendChild'](_0x1b5bd8),_0x1d4080['push'](0x0),_0x479b0c['unshift'](_0x1b5bd8),_0x15e6c8[_0x458fc2]['nextPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080);}else'elementEnd'===_0x15e6c8[_0x458fc2]['type']?(_0x479b0c['shift'](),_0x15e6c8[_0x458fc2]['previousPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080),_0x1d4080['pop'](),_0x1d4080[_0x1d4080['length']-0x1]++,_0x15e6c8[_0x458fc2]['nextPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080)):(_0x15e6c8[_0x458fc2]['previousPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080),_0x15598d?_0x15598d['_data']+=_0x15e6c8[_0x458fc2]['item']['data']:_0x15598d=new _0x55fe07(_0x15e6c8[_0x458fc2]['item']['data'],_0x15e6c8[_0x458fc2]['item']['getAttributes']()),_0x15e6c8[_0x458fc2+0x1]&&'text'===_0x15e6c8[_0x458fc2+0x1]['type']&&_0x15f58d(_0x15598d,_0x15e6c8[_0x458fc2+0x1]['item'])||(_0x479b0c[0x0]['_appendChild'](_0x15598d),_0x15598d=null),_0x1d4080[_0x1d4080['length']-0x1]+=_0x15e6c8[_0x458fc2]['item']['offsetSize'],_0x15e6c8[_0x458fc2]['nextPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080));for(let _0x1074c7=0x0;_0x1074c7<_0x15e6c8['length'];_0x1074c7++){const _0x3afa5a=_0x15e6c8[_0x1074c7]['previousPosition'],_0x4efbb5=_0x15e6c8[_0x1074c7]['nextPosition'];for(const _0x5f588d of _0x15e6c8[_0x1074c7]['markersStart'])_0x42ac42['set'](_0x5f588d,{'start':_0x3afa5a,'end':null});_0x1dc94d('isRemoveSuggestion',_0x1074c7,_0x3afa5a,_0x4efbb5),_0x1dc94d('isAddSuggestion',_0x1074c7,_0x3afa5a,_0x4efbb5),_0x1dc94d('isRemoved',_0x1074c7,_0x3afa5a,_0x4efbb5),_0x1dc94d('isAdded',_0x1074c7,_0x3afa5a,_0x4efbb5);for(const _0x120746 of _0x15e6c8[_0x1074c7]['markersEnd']){const _0x25f3df=_0x42ac42['get'](_0x120746);_0x25f3df?_0x25f3df['end']=_0x4efbb5:_0x42ac42['set'](_0x120746,{'start':_0x4efbb5,'end':_0x4efbb5});}}for(const [_0x248531,_0x471227]of _0x42ac42){const _0x47d10d=this['editor']['model']['createRange'](_0x471227['start'],_0x471227['end']);_0x392fd8['markers']['set'](_0x248531,_0x47d10d);}return _0x55b70b['sort']((_0xd0d5f7,_0x4adebb)=>{const _0x98afe6=_0x392fd8['markers']['get']('revision:'+_0xd0d5f7['id']),_0x3c7cd6=_0x392fd8['markers']['get']('revision:'+_0x4adebb['id']);return _0x98afe6['start']['isBefore'](_0x3c7cd6['start'])?-0x1:_0x98afe6['start']['isAfter'](_0x3c7cd6['start'])?0x1:_0x98afe6['end']['isBefore'](_0x3c7cd6['end'])?-0x1:_0x98afe6['end']['isAfter'](_0x3c7cd6['end'])?0x1:'add'===_0xd0d5f7['type']?-0x1:0x1;}),{'root':_0x392fd8,'changes':_0x55b70b};function _0x1dc94d(_0xcbddbf,_0x38efc5,_0xcad00a,_0x7d328d){const _0x43c6df=!!_0x15e6c8[_0x38efc5][_0xcbddbf],_0x4828c4=_0x43c6df?_0x15e6c8[_0x38efc5][_0xcbddbf]['userId']:null,_0x1db8f2=_0x43c6df&&_0x15e6c8[_0x38efc5][_0xcbddbf]['aiSource']||null,_0x2217a0=_0x38efc5===_0x15e6c8['length']-0x1,_0x3604f9=_0xc73e5c[_0xcbddbf][0x0],_0x3bc3c1=_0x4b9da0['isObject'](_0x15e6c8[_0x38efc5]['item']);!_0xda86f0[_0xcbddbf]&&_0x43c6df?_0xda86f0[_0xcbddbf]={'start':_0xcad00a,'tapeItem':_0x15e6c8[_0x38efc5],'userId':_0x4828c4,'aiSource':_0x1db8f2,'type':_0xcbddbf}:_0xda86f0[_0xcbddbf]&&!_0x43c6df?(_0xda86f0[_0xcbddbf]['end']=_0xcad00a,_0x23277f(_0xda86f0[_0xcbddbf]),_0xda86f0[_0xcbddbf]=null):_0xda86f0[_0xcbddbf]&&_0x43c6df&&(_0xda86f0[_0xcbddbf]['userId']!==_0x4828c4||_0xda86f0[_0xcbddbf]['aiSource']!==_0x1db8f2)&&(_0xda86f0[_0xcbddbf]['end']=_0xcad00a,_0x3604f9&&_0x3604f9['userId']===_0xda86f0[_0xcbddbf]['userId']?_0x3604f9['change']['aiSource']=_0x3604f9['change']['aiSource']||_0xda86f0[_0xcbddbf]['aiSource']:_0x23277f(_0xda86f0[_0xcbddbf]),_0xda86f0[_0xcbddbf]={'start':_0xcad00a,'tapeItem':_0x15e6c8[_0x38efc5],'userId':_0x4828c4,'aiSource':_0x1db8f2,'type':_0xcbddbf}),_0xda86f0[_0xcbddbf]&&_0x3bc3c1&&('elementStart'!==_0x15e6c8[_0x38efc5]['type']||_0x3604f9&&_0x3604f9['userId']===_0x4828c4||_0xc73e5c[_0xcbddbf]['unshift']({'userId':_0x4828c4,'object':_0x15e6c8[_0x38efc5]['item'],'change':_0xda86f0[_0xcbddbf]}),'elementEnd'===_0x15e6c8[_0x38efc5]['type']&&_0x3604f9&&_0x3604f9['object']===_0x15e6c8[_0x38efc5]['item']&&(_0xc73e5c[_0xcbddbf]['shift'](),_0xda86f0[_0xcbddbf]=_0x3604f9['change'])),_0xda86f0[_0xcbddbf]&&_0x2217a0&&(_0xda86f0[_0xcbddbf]['end']=_0x7d328d,_0x23277f(_0xda86f0[_0xcbddbf]),_0xda86f0[_0xcbddbf]=null);}function _0x23277f({start:_0xf9a73e,end:_0x3d2979,tapeItem:_0x380cfc,userId:_0x48da8c,aiSource:_0x5d95af,type:_0x34ee4c}){const _0x4568c9=_0x380cfc['item'],_0x322689=_0x4c5a6d['schema']['isBlock'](_0x4568c9)&&!_0x4c5a6d['schema']['isLimit'](_0x4568c9),_0x46790e=_0xf9a73e['nodeAfter']==_0x3d2979['parent']&&_0x3d2979['isAtStart'];if(_0x322689&&_0x46790e)return;const _0x3b1714=_0x4c5a6d['createRange'](_0xf9a73e,_0x3d2979),_0x320635=_0x48f4a0['get'](_0x48da8c),_0x5a6fed=new Mt({'author':_0x320635,'type':'isAdded'==_0x34ee4c||'isAddSuggestion'==_0x34ee4c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x34ee4c||'isRemoveSuggestion'==_0x34ee4c,'aiSource':_0x5d95af||null},'createdAt':new Date(),'rootName':_0x36f06f});_0x55b70b['push'](_0x5a6fed),_0x392fd8['markers']['set']('revision:'+_0x5a6fed['id'],_0x3b1714);}function _0x15f58d(_0x32d1e1,_0x162c9e){const _0x8fe5f2=_0x32d1e1['getAttributes'](),_0x326050=_0x162c9e['getAttributes']();for(const _0x11af96 of _0x8fe5f2){if(_0x11af96[0x1]!==_0x162c9e['getAttribute'](_0x11af96[0x0]))return!0x1;_0x326050['next']();}return _0x326050['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x2dcb4a=>{const _0x416030=_0x2dcb4a['markerName']['split'](':')[0x1],_0x431376=this['_getChangeFromId'](_0x416030);if(!_0x431376)return null;const _0x48fb1e='add'==_0x431376['type']?'insertion':'deletion',_0x58279e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x48fb1e];return _0x431376['data']['isSuggestion']&&_0x58279e['push']('ck-suggestion-marker-'+_0x48fb1e+'-new'),this['activeChange']==_0x431376&&_0x58279e['push']('ck-suggestion-marker--active'),{'classes':_0x58279e,'attributes':{'data-change-id':_0x416030}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1f1f9d=>{_0x1f1f9d['on']('element:pre',(_0x5a70c7,_0x541f88,_0x2c3191)=>{const _0x546fe1=_0x541f88['viewItem']['getChild'](0x0);if(!_0x546fe1||!_0x546fe1['is']('element','code'))return;if(!_0x2c3191['consumable']['consume'](_0x546fe1,{'attributes':['vid_start','vid_end']}))return;const _0x115cb2=_0x541f88['modelRange']['start']['nodeAfter'];_0x2c3191['writer']['setAttribute']('vid_start',_0x546fe1['getAttribute']('vid_start'),_0x115cb2),_0x2c3191['writer']['setAttribute']('vid_end',_0x546fe1['getAttribute']('vid_end'),_0x115cb2);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x8a9692=>{_0x8a9692['on']('element',(_0x22a3ad,_0x16d46c,_0x501a84)=>{if(!_0x501a84['consumable']['consume'](_0x16d46c['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x16d46c['modelRange']['isCollapsed'])return;const _0x6c0072=_0x16d46c['modelRange']['start']['nodeAfter'];_0x6c0072['hasAttribute']('vid_start')||_0x6c0072['hasAttribute']('vid')||(_0x501a84['writer']['setAttribute']('vid_start',_0x16d46c['viewItem']['getAttribute']('vid_start'),_0x6c0072),_0x501a84['writer']['setAttribute']('vid_end',_0x16d46c['viewItem']['getAttribute']('vid_end'),_0x6c0072));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x6facb1=>_0x6facb1['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4c4467,[,_0x332ca6])=>{['vid_start','vid_end','vid']['includes'](_0x332ca6)&&(_0x4c4467['return']=!0x0,_0x4c4467['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5bc9b2=>{_0x5bc9b2['on']('attribute:vid',(_0x25dc2f,_0x299bb4,_0x94dd94)=>{if('\x20'!=_0x299bb4['item']['data']||_0x299bb4['item']['parent']['maxOffset']>0x1)return;if(!_0x94dd94['consumable']['consume'](_0x299bb4['item'],_0x25dc2f['name']))return;const _0x38b0bb=_0x94dd94['writer'],_0x3cfc01=_0x94dd94['mapper']['toViewRange'](_0x299bb4['range']);_0x38b0bb['wrap'](_0x3cfc01,_0x38b0bb['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x102e9e){const _0x17df11=_0x102e9e['plugins']['get']('RevisionViewer');return(_0x559e41,_0x44f72f,_0x52bffd)=>{const _0x50b011=_0x44f72f['markerName']['split'](':')[0x1],_0x2044d4=_0x17df11['_getChangeFromId'](_0x50b011);if(!_0x2044d4)return null;const _0x154eb4='add'==_0x2044d4['type']?'split':'merge';if(!_0x52bffd['consumable']['test'](_0x44f72f['markerRange'],_0x559e41['name']))return;const _0x415fe4=_0x44f72f['markerRange']['getWalker'](),_0x4bbacc=_0x44f72f['markerRange']['start'],_0x1f02c2=_0x102e9e['model']['schema'];let _0x4949a8=null,_0x3835c2=null,_0xc3c755=!0x1,_0x121a83=!0x1;for(const _0x289806 of _0x415fe4){const _0x18ceb1=_0x289806['item'];_0xc3c755=_0xc3c755||_0x1f02c2['isContent'](_0x18ceb1);const _0x8c02dc=_0x52bffd['mapper']['toViewElement'](_0x18ceb1);if(_0x8c02dc&&_0x8c02dc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x289806['type']&&(_0x1f02c2['isBlock'](_0x18ceb1)&&!_0x1f02c2['isLimit'](_0x18ceb1)&&(_0x18ceb1['nextSibling']||_0x4bbacc['isAtEnd']?_0x4949a8&&_0x4949a8['parent']==_0x18ceb1||(_0x4949a8=_0x18ceb1,_0xb5c91b(_0x289806['previousPosition']),_0x121a83=!0x0):_0x3835c2=_0x3835c2||_0x289806['previousPosition']));}function _0xb5c91b(_0x449bbb){const _0xedd730=_0x52bffd['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x154eb4}),_0x408d1c=_0x52bffd['mapper']['toViewPosition'](_0x449bbb);_0x2044d4['data']['isSuggestion']&&_0x52bffd['writer']['addClass']('ck-suggestion-marker-'+_0x154eb4+'-new',_0xedd730),_0x17df11['activeChange']==_0x2044d4&&_0x52bffd['writer']['addClass']('ck-suggestion-marker--active',_0xedd730),_0x52bffd['writer']['insert'](_0x408d1c,_0xedd730),_0x52bffd['mapper']['bindElementToMarker'](_0xedd730,_0x44f72f['markerName']);}_0xc3c755||_0x121a83||!_0x3835c2||_0xb5c91b(_0x3835c2);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x4a7cbd,_0x2da5e3,_0x1fd923)=>{const _0xb0577=_0x1fd923['mapper']['markerNameToElements'](_0x2da5e3['markerName']);if(_0xb0577){for(const _0x28b626 of _0xb0577)(_0x28b626['hasClass']('ck-suggestion-marker-split')||_0x28b626['hasClass']('ck-suggestion-marker-merge'))&&(_0x1fd923['mapper']['unbindElementFromMarkerName'](_0x28b626,_0x2da5e3['markerName']),_0x1fd923['writer']['remove'](_0x28b626));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3937e0,_0x41c2f4,_0x312e77)=>{const _0x57c5d6=_0x41c2f4['markerName']['split'](':')[0x1],_0x343265=this['_getChangeFromId'](_0x57c5d6);if(!_0x343265)return null;const _0x384897='add'==_0x343265['type']?'split':'merge';if(_0x312e77['consumable']['test'](_0x41c2f4['markerRange'],_0x3937e0['name']))for(const _0x59b998 of _0x41c2f4['markerRange']['getItems']()){if(!_0x59b998['is']('element','softBreak'))continue;const _0x31cc22=_0x312e77['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x384897}),_0x48cd4d=_0x312e77['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x59b998));_0x343265['data']['isSuggestion']&&_0x312e77['writer']['addClass']('ck-suggestion-marker-'+_0x384897+'-new',_0x31cc22),this['activeChange']==_0x343265&&_0x312e77['writer']['addClass']('ck-suggestion-marker--active',_0x31cc22),_0x312e77['writer']['insert'](_0x48cd4d,_0x31cc22),_0x312e77['mapper']['bindElementToMarker'](_0x31cc22,_0x41c2f4['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x42c209=>{for(const _0x12ff4d of this['editor']['model']['document']['getRootNames']()){const _0x22dfb0=this['editor']['model']['document']['getRoot'](_0x12ff4d),_0x181b9c=this['editor']['editing']['view']['document']['getRoot'](_0x12ff4d);if(_0x181b9c){const _0x2f026b=_0x22dfb0['getAttribute']('revisionHistoryAttachChange');if(_0x42c209['removeAttribute']('data-change-id',_0x181b9c),_0x42c209['removeClass']('ck-revision-history-root-add',_0x181b9c),_0x42c209['removeClass']('ck-revision-history-root-remove',_0x181b9c),_0x42c209['removeClass']('ck-revision-history-root--active',_0x181b9c),_0x2f026b){const _0x5a9a1b=this['_getChangeFromId'](_0x2f026b);if(!_0x5a9a1b)return null;_0x42c209['setAttribute']('data-change-id',_0x2f026b,_0x181b9c),_0x42c209['addClass']('ck-revision-history-root-'+_0x5a9a1b['type'],_0x181b9c),this['activeChange']==_0x5a9a1b&&_0x42c209['addClass']('ck-revision-history-root--active',_0x181b9c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2cc3b2=>'revision-comment:'+_0x2cc3b2,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0xcb8732=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0xcb8732['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x156046=>'revision-suggestion:'+_0x156046,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x411cf0=>({'name':'suggestion:'+_0x411cf0,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xc04aab=>{const _0x1e1614=_0xc04aab['markerName']['split'](':')[0x1];return'insertion'!=_0x1e1614&&'deletion'!=_0x1e1614?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1e1614]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3deb8a,_0x216222,_0x2e6ea9)=>{const _0x3fbd9b=_0x2e6ea9['mapper']['markerNameToElements'](_0x216222['markerName']);if(_0x3fbd9b){for(const _0x301983 of _0x3fbd9b)_0x301983['is']('uiElement')&&(_0x2e6ea9['mapper']['unbindElementFromMarkerName'](_0x301983,_0x216222['markerName']),_0x2e6ea9['writer']['remove'](_0x301983));}},{'priority':'high'});}_getChangeFromId(_0x11d706){return this['_changeIdToChange']['get'](_0x11d706);}_getViewForChange(_0x1c9e77){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x1c9e77,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xab52df,_0x428450,_0x2ed8b7,_0xb7dac7)=>{_0xb7dac7&&this['_balloon']['remove'](_0xb7dac7),_0x2ed8b7&&(this['_balloon']['add']({'view':_0x2ed8b7,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0xf5ba74=this['editor']['editing'],_0x49027d=this['_getChangeFromId'](_0x2ed8b7['changeId']);let _0x52829f;if(_0x49027d['data']['isOnRoot']){const _0x3479a3=_0xf5ba74['view']['getDomRoot'](_0x49027d['rootName']);_0x52829f=Array['from'](_0x3479a3['getClientRects']());}else{const _0x54f8e4=this['editor']['model']['markers']['get']('revision:'+_0x2ed8b7['changeId']);_0x52829f=Array['from'](_0xf5ba74['mapper']['markerNameToElements'](_0x54f8e4['name']))['map'](_0x50d1e6=>_0xf5ba74['view']['domConverter']['mapViewToDom'](_0x50d1e6))['map'](_0x44102b=>Array['from'](_0x44102b['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x52829f['find'](_0x14f4ec=>_0x14f4ec['top']-0x3<=this['_activeViewTarget']['y']&&_0x14f4ec['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x14f4ec['left']-0x3<=this['_activeViewTarget']['x']&&_0x14f4ec['right']+0x3>=this['_activeViewTarget']['x'])||_0x52829f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3fb5cd,_0x5ca1c9,_0x23de7b,_0x3c8268)=>{this['activeView']=_0x23de7b?this['_getViewForChange'](_0x23de7b):null,this['editor']['model']['change'](()=>{const _0x264cb2=this['editor']['editing'];_0x3c8268&&(_0x3c8268['data']['isOnRoot']?_0x264cb2['view']['change'](_0x28be43=>{_0x28be43['removeClass']('ck-revision-history-root--active',_0x264cb2['view']['document']['getRoot'](_0x3c8268['rootName']));}):_0x264cb2['reconvertMarker']('revision:'+_0x3c8268['id'])),_0x23de7b&&(_0x23de7b['data']['isOnRoot']?_0x264cb2['view']['change'](_0x42d16a=>{_0x42d16a['addClass']('ck-revision-history-root--active',_0x264cb2['view']['document']['getRoot'](_0x23de7b['rootName']));}):_0x264cb2['reconvertMarker']('revision:'+_0x23de7b['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x36e7b7,_0xd7c2d2)=>{if(this['activeChange'])return;const _0x1b635d=this['_findChangeIdFromDomTarget'](_0xd7c2d2['target']),_0x377a70=this['_changeIdToChange']['get'](_0x1b635d);_0x377a70?(this['_activeViewTarget']={'x':_0xd7c2d2['domEvent']['x'],'y':_0xd7c2d2['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x377a70)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x14e569,_0x1e26a0)=>{const _0x2feffb=this['_findChangeIdFromDomTarget'](_0x1e26a0['target']),_0x2b52ac=this['_changeIdToChange']['get'](_0x2feffb);_0x2b52ac?(this['_activeViewTarget']={'x':_0x1e26a0['domEvent']['x'],'y':_0x1e26a0['domEvent']['y']},_0x2b52ac===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2b52ac):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x41e4e0){do{const _0x41cf95=_0x41e4e0['getAttribute']('data-change-id');if(_0x41cf95)return _0x41cf95;_0x41e4e0=_0x41e4e0['parent'];}while(_0x41e4e0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5ddcc3=>{for(const _0x55e84d of this['editor']['model']['markers'])_0x5ddcc3['removeMarker'](_0x55e84d);});}};function Ut(_0x3dd795){return _0x3dd795['split'](':')[0x1];}function Lt(_0x55a8c2,_0x249215){return(_0x38e422,_0x406598,_0x5e6059)=>{if(!_0x5e6059['consumable']['test'](_0x406598['markerRange'],_0x38e422['name']))return;const _0x2a7210=_0x406598['markerRange']['getWalker'](),_0x355916=_0x406598['markerRange']['start'],_0x4decb3=_0x55a8c2['model']['schema'];let _0x4de033=null,_0x159b01=null,_0x1b1905=!0x1,_0x18eb04=!0x1;for(const _0x53b4e4 of _0x2a7210){const _0x299de5=_0x53b4e4['item'];_0x1b1905=_0x1b1905||_0x4decb3['isContent'](_0x299de5);const _0xb2ec5a=_0x5e6059['mapper']['toViewElement'](_0x299de5);if(_0xb2ec5a&&_0xb2ec5a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x53b4e4['type']&&(_0x4decb3['isBlock'](_0x299de5)&&!_0x4decb3['isLimit'](_0x299de5)&&(_0x299de5['nextSibling']||_0x355916['isAtEnd']?_0x4de033&&_0x4de033['parent']==_0x299de5||(_0x4de033=_0x299de5,_0x513e26(_0x53b4e4['previousPosition']),_0x18eb04=!0x0):_0x159b01=_0x159b01||_0x53b4e4['previousPosition']));}function _0x513e26(_0x181616){const _0x576c7e=_0x5e6059['mapper']['toViewPosition'](_0x181616),_0x3b7134=_0x5e6059['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x249215});_0x5e6059['writer']['insert'](_0x576c7e,_0x3b7134),_0x5e6059['mapper']['bindElementToMarker'](_0x3b7134,_0x406598['markerName']);}_0x1b1905||_0x18eb04||!_0x159b01||_0x513e26(_0x159b01);};}var Ft=class extends _0x38fd12{constructor(_0x409f80){super(_0x409f80);const _0x468170=_0x409f80['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x468170,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x468170,'change:isEnabled',()=>this['refresh']());}execute(){const _0x5286cb=this['editor'],_0x3a4d00=_0x5286cb['plugins']['get'](Pt),_0x4fcf9b=_0x3a4d00['isReady']?_0x3a4d00['diff']['newRevisionId']:null;_0x5286cb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4fcf9b);}['refresh'](){const {isReady:_0x16fe44,isEnabled:_0x39390a,repository:_0x6830db,diff:_0xb4e250}=this['editor']['plugins']['get'](Pt),_0x582f93=_0xb4e250&&_0x6830db['getLaterVisibleRevision'](_0xb4e250['newRevisionId']);this['isEnabled']=_0x16fe44&&_0x39390a&&Boolean(_0x582f93);}},$t=class extends _0x38fd12{_step;constructor(_0x4fc292,{direction:_0x3a7087}){super(_0x4fc292);const _0x19c88d=_0x4fc292['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x3a7087?0x1:-0x1,this['listenTo'](_0x19c88d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x19c88d,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x19c88d,'change:activeChange',()=>this['refresh']());}execute(){const _0x514bcc=this['editor'],_0x8d3e05=_0x514bcc['plugins']['get'](Pt),{isNavigationMode:_0x3e8496,currentChangeNumber:_0x1214ee}=_0x8d3e05;let _0xc7db2e;if(_0x8d3e05['activeChange']=_0x3e8496?_0x8d3e05['diff']['changes']['get'](_0x1214ee+this['_step']):_0x8d3e05['diff']['changes']['first'],_0x8d3e05['activeChange']['data']['isOnRoot'])_0xc7db2e=_0x514bcc['editing']['view']['getDomRoot'](_0x8d3e05['activeChange']['rootName']);else{const _0x310659=_0x514bcc['model']['markers']['get']('revision:'+_0x8d3e05['activeChange']['id']);_0xc7db2e=_0xb30b1f(_0x514bcc['editing'],_0x310659);}_0x49c812({'target':_0xc7db2e,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x577ead,currentChangeNumber:_0x28a5e8,numberOfChanges:_0x26d489,isReady:_0x26dbdf,isEnabled:_0x1ad287}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x1ad287&&_0x26dbdf&&_0x26d489)&&(!_0x577ead||(0x1===this['_step']?_0x28a5e8<_0x26d489-0x1:_0x28a5e8>0x0));}},Bt=class extends dt{constructor(_0x3ec1cf){super(_0x3ec1cf);const _0x5286ef=this['bindTemplate'],_0x425bb0=new _0x2828f9(_0x3ec1cf),_0x296c61=new _0x2828f9(_0x3ec1cf);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',(_0xd4be23,_0x24e729)=>_0xd4be23&&_0x24e729>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x44b3fe,_0x8f6b0e,_0x4fedb2,_0xc70aef)=>{if(!_0x44b3fe)return kt(_0x3ec1cf,'Loading...');if(!_0x4fedb2)return kt(_0x3ec1cf,'No\x20changes');const _0x598d0e=kt(_0x3ec1cf,'NUMBER_OF_CHANGES',_0x4fedb2);return _0xc70aef?kt(_0x3ec1cf,'X_OF_Y_CHANGES',[_0x8f6b0e+0x1,_0x4fedb2]):_0x598d0e;}),_0x425bb0['set']({'label':kt(_0x3ec1cf,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3c7c33}),_0x296c61['set']({'label':kt(_0x3ec1cf,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x58db84}),_0x425bb0['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x296c61['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x425bb0['on']('execute',()=>this['fire']('execute','backward')),_0x296c61['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',_0x5286ef['if']('_isStatusLabelVisible','ck-hidden',_0x47cd54=>!_0x47cd54)]},'children':[{'text':_0x5286ef['to']('isNavigationMode',_0x2f5914=>_0x2f5914?kt(_0x3ec1cf,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x3ec1cf,'Total')+':\x20')}]},{'text':_0x5286ef['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x425bb0,_0x296c61]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x149c71{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x59a2ad=this['editor']['editing']['view'];_0x59a2ad['change'](_0x2d66f9=>{for(const _0x12865e of _0x59a2ad['document']['roots'])_0x2d66f9['addClass'](jt,_0x12865e);});}['hide'](){const _0x53f10e=this['editor']['editing']['view'];_0x53f10e['change'](_0x6901cb=>{for(const _0x5ea93c of _0x53f10e['document']['roots'])_0x6901cb['removeClass'](jt,_0x5ea93c);});}},Kt=class extends _0x149c71{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x1e7a66=this['editor'],_0x4ff570=_0x1e7a66['plugins']['get'](Pt),_0x527b50=_0x1e7a66['plugins']['get'](Gt);_0x1e7a66['ui']['componentFactory']['add']('exitToEditing',_0x289998=>{const _0x150d8d=new _0x2828f9(_0x289998);return _0x150d8d['set']({'label':kt(_0x289998,'Back\x20to\x20editing'),'icon':_0xbd625a,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x150d8d,'execute',()=>{_0x1e7a66['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x150d8d;}),_0x1e7a66['ui']['componentFactory']['add']('restoreRevision',_0x272a40=>{const _0x3b865e=new _0x2828f9(_0x272a40);return _0x3b865e['set']({'label':kt(_0x272a40,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3b865e['bind']('isEnabled')['to'](_0x1e7a66['commands']['get']('restoreRevision')),this['listenTo'](_0x3b865e,'execute',()=>_0x1e7a66['execute']('restoreRevision')),_0x3b865e;}),_0x1e7a66['ui']['componentFactory']['add']('changesNavigation',_0x4a30cb=>{const _0x295eae=new Bt(_0x4a30cb),_0x5baacf=_0x1e7a66['commands']['get']('showPreviousChange'),_0x2fcc10=_0x1e7a66['commands']['get']('showNextChange');return _0x295eae['bind']('isBackwardNavigationEnabled')['to'](_0x5baacf,'isEnabled'),_0x295eae['bind']('isForwardNavigationEnabled')['to'](_0x2fcc10,'isEnabled'),_0x295eae['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4ff570),this['listenTo'](_0x295eae,'execute',(_0x54f06d,_0x25b900)=>{_0x1e7a66['execute']('forward'===_0x25b900?'showNextChange':'showPreviousChange');}),_0x295eae;}),_0x527b50['show'](),_0x4ff570['on']('change:isReady',(_0x14cc5a,_0x5ea1b5,_0x4d30c6)=>{_0x4d30c6?_0x527b50['hide']():_0x527b50['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x4f7be2,_0x9e4763){super(_0x4f7be2,_0x9e4763);const _0x8c1f31=this['bindTemplate'];this['set']({'label':kt(_0x4f7be2,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x4f7be2,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x8c1f31['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x5b511d(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x533be1=this['fieldView']['element'];this['_tooltipString']=_0x533be1['scrollWidth']>_0x533be1['clientWidth']&&_0x533be1['value']||'';}},Yt=class extends dt{constructor(_0x3a41d5,_0x37704f,_0x4767e4){super(_0x3a41d5);const _0x11fd2b=new _0x2813f5();_0x11fd2b['set']({'content':_0x362c27,'viewBox':'0\x200\x2011\x2010'});const _0x20802c=['ck','ck-revision-history-sidebar__revision-author'];_0x4767e4&&_0x20802c['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3bc9b2=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x3a41d5,_0x4767e4?'Revision\x20creator':'Revision\x20author')},'children':[_0x11fd2b,_0x37704f['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x20802c},'children':_0x3bc9b2});}};function Jt(_0x16ca19,_0x2337e4){const _0x852cb1=_0x16ca19['bindTemplate'],_0x2266ec=_0x16ca19['locale'],_0x36600a=vt(_0x2266ec);_0x36600a['panelPosition']='sw';const _0x16f2fc=function(_0x4cfbe9,_0xd61943){const _0x38d6dc=function(_0x35a05a,_0x4c98e4){const _0x59a4e1=_0x35a05a['locale'],_0x28bd13={'Compare\x20against\x20selected':kt(_0x59a4e1,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x59a4e1,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x59a4e1,'Restore\x20this\x20revision')};return _0x4c98e4['map'](_0x35cabd=>{const _0x37b4eb=_0x28bd13[_0x35cabd['name']];return _0x37b4eb&&_0x37b4eb!==_0x35cabd['name']&&(_0x35cabd['name']=_0x37b4eb),_0x35cabd;});}(_0x4cfbe9,_0xd61943),_0x251c6c=new _0x29b214();for(const _0x1b46a3 of _0x38d6dc){const _0x55e78d={'type':'button','model':new ut({'label':_0x1b46a3['name'],'class':_0x1b46a3['class'],'withText':!0x0,'role':'menuitem','_action':_0x1b46a3['action']})};_0x55e78d['model']['bind']('isEnabled')['to'](_0x4cfbe9,'isActionsDropdownOpen',_0x217371=>'function'!=typeof _0x1b46a3['isEnabled']||(!_0x217371||_0x1b46a3['isEnabled'](_0x4cfbe9))),_0x251c6c['add'](_0x55e78d);}return _0x251c6c;}(_0x16ca19,_0x2337e4);return _0x16ca19['bind']('isActionsDropdownOpen')['to'](_0x36600a,'isOpen'),_0x36600a['buttonView']['set']({'label':kt(_0x2266ec,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1a6c25}),_0x36600a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x852cb1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x852cb1['to'](_0x2ea7e0=>_0x2ea7e0['stopPropagation']())}}),_0x36600a['on']('execute',_0xd0ad3d=>{_0x16ca19['isReady']&&'function'==typeof _0xd0ad3d['source']['_action']&&_0xd0ad3d['source']['_action'](_0x16ca19);}),ft(_0x36600a,_0x16f2fc,{'role':'menu'}),_0x36600a['listenTo'](_0x16ca19,'change:isActionsDropdownOpen',(_0x5de848,_0x51fa5f,_0x3200fb)=>{if(_0x3200fb)for(const _0x417184 of _0x36600a['listView']['items']){const _0x1db5c1=_0x417184['children']['first'],_0x37a856=_0x2337e4['find'](_0x5ed8d1=>_0x5ed8d1['action']===_0x1db5c1['_action'])['isVisible'];_0x417184['isVisible']=void 0x0===_0x37a856||_0x37a856(_0x16ca19);}}),_0x36600a;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x331064,Collection as _0x58c1b7,ElementReplacer as _0x109d06,FocusTracker as _0x4ac1dc,KeystrokeHandler as _0xddd25,ObservableMixin as _0x392707,ResizeObserver as _0x4c0bcb,logWarning as _0x100000,scrollViewportToShowTarget as _0x164b2d,trustedHtml as _0x4cde8c,uid as _0x2cb4ed}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x2a6b9c,isEqual as _0x324a53,set as _0x388653,unset as _0x29cb6c}from'es-toolkit/compat';import{Command as _0x34f9e4,Editor as _0x130f17,ElementApiMixin as _0x55e211,PendingActions as _0x2c2eee,Plugin as _0x372c9a}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x2957b7,PillView as _0x4198e5,Users as _0x4db7e9,getMarkerDomElement as _0x5a9bc3,reRootOperation as _0x8c22cf,reRootPosition as _0xe182ed,reRootRange as _0x2ef4f4,sanitizeEditorConfig as _0x17a015}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x2f3aa9,ModelElement as _0xd26162,ModelRange as _0x597476,ModelText as _0x470eed,ViewAttributeElement as _0x398662,ViewContainerElement as _0x1aa21b,ViewDocumentFragment as _0x52f1e2,ViewElement as _0x5b4473,ViewEmptyElement as _0x3ff98f,ViewRawElement as _0x587f07,ViewText as _0x12251d,ViewUIElement as _0x23eb08}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x1aafad,IconChevronUp as _0x6cb6a3,IconHistory as _0x58846a,IconSparkle as _0x37a00,IconThreeVerticalDots as _0x1bbd99,IconUndo as _0x30d045,IconUser as _0x35d01a}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x517ea8,ButtonView as _0x5c3bd6,ContextualBalloon as _0x2c4323,CssTransitionDisablerMixin as _0x14df5a,EditorUI as _0x22ae71,IconView as _0x51d124,InlineEditableUIView as tt,LabeledFieldView as it,ListItemView as et,ListView as st,MenuBarMenuListItemButtonView as nt,MenuBarMenuListItemView as ot,MenuBarMenuListView as rt,MenuBarMenuView as at,StickyPanelView as ht,ToolbarSeparatorView as ct,ToolbarView as lt,UIModel as ut,View as dt,addListToDropdown as ft,createDropdown as vt,createLabeledInputText as gt,normalizeToolbarConfig as mt,submitHandler as _t}from'@ckeditor/ckeditor5-ui';import{DateTime as wt}from'luxon';const pt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x392707();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0xa8e2b4){super(),this['id']=_0xa8e2b4['id']||_0x2cb4ed(),this['creator']=_0xa8e2b4['creator']||null,this['authors']=_0xa8e2b4['authors']||[],this['diffData']=_0xa8e2b4['diffData']||null,this['toVersion']=_0xa8e2b4['toVersion']||0x0,this['fromVersion']=_0xa8e2b4['fromVersion']||0x0,this['set']('name',_0xa8e2b4['name']||''),this['set']('createdAt',_0xa8e2b4['createdAt']||new Date()),this['set']('attributes',_0xa8e2b4['attributes']||{});}setName(_0x217a43){this['_update']({'name':_0x217a43});}setAttribute(_0x2a6e9c,_0x8780a7){const _0xe74fd1=_0x2a6b9c(this['attributes']);_0x388653(_0xe74fd1,_0x2a6e9c,_0x8780a7),this['_update']({'attributes':_0xe74fd1});}removeAttribute(_0x31c156){const _0x46bf26=_0x2a6b9c(this['attributes']);_0x29cb6c(_0x46bf26,_0x31c156),this['_update']({'attributes':_0x46bf26});}_update(_0x282240,_0x371831=!0x1){let _0x5334e1=!0x1;const _0x26b8d0={'id':this['id']};for(const _0x42bbce of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x39047a=_0x282240[_0x42bbce];void 0x0!==_0x39047a&&_0x39047a!==this[_0x42bbce]&&(this[_0x42bbce]=_0x39047a,_0x26b8d0[_0x42bbce]=_0x39047a,_0x5334e1=!0x0);}_0x5334e1&&(_0x26b8d0['authors']&&(_0x26b8d0['authorsIds']=_0x26b8d0['authors']['map'](_0x22906a=>_0x22906a['id']),delete _0x26b8d0['authors']),this['fire']('_update',_0x26b8d0,_0x371831));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x574494=>_0x574494['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x372c9a{['_revisions'];static get requires(){return[_0x4db7e9];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x4a760d){super(_0x4a760d),this['_revisions']=new _0x58c1b7();}afterInit(){!async function(_0xb7196c){const _0x2469a5='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x402e07=0xeb829,_0x2fb0f1=0x79740,_0x5a23a2={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x40e9d8(_0x10d1c6){const _0xbb6d51=new window['Promise'](_0x3a30a4=>{_0x10d1c6['once']('ready',_0x3a30a4);}),_0x33adb0=window['Date']['now'](),_0x3da6e3=_0x10d1c6['config']['get']('licenseKey');async function _0x182f78(){let _0x33dd02,_0x6a2b27=null,_0x2f4f63=null;try{return'GPL'==_0x3da6e3?'NotAllowed':(_0x33dd02=_0x586591(),_0x33dd02?(_0x33dd02['usageEndpoint']&&(_0x2f4f63=_0x23c829(_0x33dd02['usageEndpoint'],_0x33dd02['jti'])),await _0x430502()?_0x57ad24()?_0x49d76f()?'Expired':_0x46d6aa()?('evaluation'==_0x33dd02['licenseType']&&(_0x6a2b27=_0x1ab176('EvaluationLimit')),await _0x54c955()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x49d76f(){const _0x49ff7a=['evaluation','trial']['includes'](_0x33dd02['licenseType'])?_0x33adb0/0x3e8:0xe10*_0x2fb0f1;return _0x33dd02['exp']<_0x49ff7a;}function _0x57ad24(){const _0x14f274=_0x33dd02['features'];if(!_0x14f274)return!0x1;if(_0x14f274['includes']('*'))return!0x0;if(_0x14f274['includes']('RH'))return!0x0;if(_0x14f274['includes']('RRH')){if(_0x394557())return!0x0;if(_0xab1ce1()||_0x1742c7())return!0x0;}return!0x1;}function _0x46d6aa(){const _0x3f120e=_0x33dd02['licensedHosts'];if(!_0x3f120e||0x0==_0x3f120e['length'])return!0x0;const {hostname:_0x978c6f}=new URL(window['location']['href']);if(_0x3f120e['includes'](_0x978c6f))return!0x0;const _0x56d16f=_0x978c6f['split']('.');return _0x3f120e['filter'](_0x4672d2=>_0x4672d2['includes']('*'))['map'](_0x2e332d=>_0x2e332d['split']('.'))['filter'](_0x5d59f2=>_0x5d59f2['length']<=_0x56d16f['length'])['map'](_0x5af953=>Array(_0x56d16f['length']-_0x5af953['length'])['fill']('*'===_0x5af953[0x0]?'*':'')['concat'](_0x5af953))['some'](_0x1cf3c3=>_0x56d16f['every']((_0x3dd36f,_0x287e8d)=>_0x1cf3c3[_0x287e8d]===_0x3dd36f||'*'===_0x1cf3c3[_0x287e8d]));}function _0x54c955(){return _0x6a2b27&&_0x2f4f63?new window['Promise']((_0xcf414,_0x3084d9)=>{_0x6a2b27['then'](_0xcf414,_0x3084d9),_0x2f4f63['then'](_0x35a6b2=>{'Valid'!=_0x35a6b2&&_0xcf414(_0x35a6b2);},_0x3084d9);}):_0x6a2b27||_0x2f4f63||'Valid';}}function _0x23c829(_0x28b6b6,_0xbc6e69){return new window['Promise'](_0x3c825f=>{if(_0x4002df())return _0x3c825f('Valid');_0x538d5f(),_0x10d1c6['decorate']('_sendUsageRequest');let _0x5c734b=!0x1;const _0x3c91e8=_0x2cb4ed();function _0x5987f9(_0x1c9675){return!!_0x1c9675&&('object'==typeof _0x1c9675||'function'==typeof _0x1c9675)&&'function'==typeof _0x1c9675['then']&&'function'==typeof _0x1c9675['catch'];}function _0x53cce5(_0x22a8ee){_0x1e1657(_0x22a8ee)['then'](_0x37acfb=>_0x37acfb&&'ok'==_0x37acfb['status']?_0x52d4a1(_0x414ca2(_0x3c91e8+_0xbc6e69))!=_0x37acfb['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x307106=>(_0x3eb380(),_0x307106),()=>{const _0x3be23f=_0x5ae37f();return null==_0x3be23f?(_0x3eb380(),'Valid'):_0x33adb0-_0x3be23f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3c825f)['catch'](()=>{_0x3c825f('UsageLimit');});const _0x5c7df8=0x36ee80;function _0x3eb380(){const _0x4bbe27='llct-'+_0x52d4a1(_0x414ca2(_0x28b6b6)),_0x1f6d86=_0x3c6c75(_0x52d4a1(window['Math']['ceil'](_0x33adb0/_0x5c7df8)));window['localStorage']['setItem'](_0x4bbe27,_0x1f6d86);}function _0x5ae37f(){const _0x2a96a6='llct-'+_0x52d4a1(_0x414ca2(_0x28b6b6)),_0x34cfaf=window['localStorage']['getItem'](_0x2a96a6);return _0x34cfaf?window['parseInt'](_0x3c6c75(_0x34cfaf),0x10)*_0x5c7df8:null;}function _0x1e1657(_0x534f8d){return new window['Promise']((_0x482ec8,_0x5d9fc4)=>{_0x534f8d['then'](_0x482ec8,_0x5d9fc4),window['setTimeout'](_0x5d9fc4,0x1d4c0);});}}_0x10d1c6['on']('_sendUsageRequest',(_0x32512e,_0x26fd92)=>{if(_0x26fd92[0x0]!=_0x28b6b6)return _0x3c825f('UsageLimit');_0x26fd92[0x1]={..._0x26fd92[0x1],'requestId':_0x3c91e8};},{'priority':'high'}),_0x10d1c6['on']('_sendUsageRequest',_0x465805=>{_0x5987f9(_0x465805['return'])&&(_0x5c734b=!0x0,_0x53cce5(_0x465805['return']));},{'priority':'low'}),_0xbb6d51['then'](()=>{_0x5c734b||_0x3c825f('UsageLimit');});});function _0x4002df(){return'auto'==_0x10d1c6['editing']['view']['_overlayModeHint'];}function _0x538d5f(){_0x10d1c6['editing']['view']['_overlayModeHint']='auto';}}function _0x1ab176(_0x8b69a0){const _0x4064c2=[new window['Promise'](_0x95b6b8=>setTimeout(_0x95b6b8,0x93ecc)),_0xbb6d51['then'](()=>new window['Promise'](_0x4ad341=>{const _0x1c375c=0x7,_0x3e4983=_0xb7196c['_revisions'];function _0x2a71ad(){_0x3e4983['length']>=_0x1c375c&&_0x4ad341();}_0x2a71ad(),_0x3e4983['on']('add',_0x2a71ad);})),new window['Promise'](_0x1095ea=>{function _0x5b6c6e(){for(const _0x4c2a9f in window)if(window['Number']['isNaN'](window['Number'](_0x4c2a9f))&&window[_0x4c2a9f]==_0x402e07)return _0x1095ea();'destroyed'!=_0x10d1c6['state']&&window['setTimeout'](_0x5b6c6e,0x1388);}_0x58d641('RevisionViewer')&&_0x5b6c6e();})];return window['Promise']['race'](_0x4064c2)['then'](()=>_0x8b69a0);}async function _0x270c67(){if(await _0xbb6d51,_0x58d641('RevisionViewer')){const _0x47fc05=_0xb7196c['getRevision'](0x0),_0x595332=_0xb7196c['getEarlierVisibleRevision'](_0x47fc05['id']),_0x1eebc4=_0x28e45b('RevisionViewer');return await _0x1eebc4['compare'](_0x47fc05['id'],_0x595332?_0x595332['id']:null,!0x0),_0x1eebc4['unbind']('isEnabled'),_0x1eebc4['isEnabled']=!0x1,_0x1eebc4['compare']=_0x519790,void(_0x1eebc4['_getDiff']=_0x519790);}if(_0x58d641('RevisionTracker')){const _0x361ca8=_0x28e45b('RevisionTracker');_0x361ca8['unbind']('isEnabled'),_0x361ca8['isEnabled']=!0x1,_0x361ca8['update']=_0x519790,_0x361ca8['saveRevision']=_0x519790;}_0x10d1c6['model']['change']=_0x519790,_0x10d1c6['model']['enqueueChange']=_0x519790,_0x10d1c6['enableReadOnlyMode']('model');}function _0x394557(){return _0x58d641('WebSocketGateway')&&'connected'==_0x28e45b('WebSocketGateway')['state'];}function _0xab1ce1(){return _0x58d641('RevisionViewerIntegration');}function _0x1742c7(){return _0x58d641('TrackChangesDataGetter');}function _0x52451f(_0x356e73){const _0x250712=_0x3e6d96();_0x10d1c6[_0x250712]='revisionHistoryLicenseKey'+_0x356e73,_0x356e73['endsWith']('Limit')&&(window[_0x3e6d96()]=_0x402e07),'Valid'!=_0x356e73&&_0x270c67();}function _0x3e6d96(){const _0x54a383=window['String'](window['performance']['now']())['replace']('.','');let _0x3ea45c='N';for(let _0x437a7b=0x0;_0x437a7b<_0x54a383['length'];_0x437a7b+=0x2){let _0x22ffe8=window['parseInt'](_0x54a383['substring'](_0x437a7b,_0x437a7b+0x2));_0x22ffe8>=0x3e&&(_0x22ffe8-=0x3e),_0x3ea45c+=_0x2469a5[_0x22ffe8];}return _0x3ea45c;}function _0x586591(){const _0x43ff06=_0x3da6e3['split']('.');if(0x3!=_0x43ff06['length'])return null;return _0x2ba8a6(_0x43ff06[0x1]);function _0x2ba8a6(_0x1f3b38){const _0x58375b=_0x37e11c(_0x1f3b38);return _0x58375b&&_0x2fd176()?_0x58375b:null;function _0x2fd176(){const _0x55c1cf=_0x58375b['jti'],_0x53b203=window['parseInt'](_0x55c1cf['substring'](_0x55c1cf['length']-0x8),0x10),_0x392fad={..._0x58375b,'jti':_0x55c1cf['substring'](0x0,_0x55c1cf['length']-0x8)};return delete _0x392fad['vc'],_0x414ca2(_0x392fad)==_0x53b203;}}}async function _0x430502(){let _0x55d9dd=!0x0;try{const [_0x348cc1,_0x2f199f,_0x421c5c]=_0x3da6e3['split']('.');return _0x5c8b0a(_0x348cc1),await _0x4536c4(_0x348cc1,_0x2f199f,_0x421c5c),_0x55d9dd;}catch{return!0x1;}function _0x5c8b0a(_0x19f9b8){const _0x4df5e5=_0x37e11c(_0x19f9b8);_0x4df5e5&&'ES256'==_0x4df5e5['alg']||(_0x55d9dd=!0x1);}async function _0x4536c4(_0x4bb4d9,_0x28de1e,_0x101e1d){const _0x57c7c5=window['Uint8Array']['from'](_0x3d1d07(_0x101e1d),_0x4a9e71=>_0x4a9e71['charCodeAt'](0x0)),_0x5a7920=new window['TextEncoder']()['encode'](_0x4bb4d9+'.'+_0x28de1e),_0x3c5133=window['crypto']['subtle'];if(!_0x3c5133)return;const _0x49aa34=await _0x3c5133['importKey']('jwk',_0x5a23a2,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3c5133['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x49aa34,_0x57c7c5,_0x5a7920)||(_0x55d9dd=!0x1);}}function _0x37e11c(_0x44e7aa){return _0x44e7aa['startsWith']('ey')?JSON['parse'](_0x3d1d07(_0x44e7aa)):null;}function _0x3d1d07(_0x538b76){return window['atob'](_0x538b76['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x414ca2(_0x46e9b4){let _0xe20245=0x1505;function _0x53ab30(_0x1067b8){for(let _0x4866fe=0x0;_0x4866fe<_0x1067b8['length'];_0x4866fe++){const _0x22a45a=_0x1067b8['charCodeAt'](_0x4866fe);_0xe20245=(_0xe20245<<0x5)+_0xe20245+_0x22a45a,_0xe20245&=_0xe20245;}}function _0x8b9459(_0x3abfc3){Array['isArray'](_0x3abfc3)?_0x3abfc3['forEach'](_0x8b9459):_0x3abfc3&&'object'==typeof _0x3abfc3?Object['entries'](_0x3abfc3)['sort']()['forEach'](([_0xf40a81,_0x102e94])=>{_0x53ab30(_0xf40a81),_0x8b9459(_0x102e94);}):_0x53ab30(window['String'](_0x3abfc3));}return _0x8b9459(_0x46e9b4),_0xe20245>>>0x0;}function _0x52d4a1(_0x432fe1){return _0x432fe1['toString'](0x10)['padStart'](0x8,'0');}function _0x3c6c75(_0x123330){return _0x123330['split']('')['reverse']()['join']('');}function _0x58d641(_0x26133a){return _0x10d1c6['plugins']['has'](_0x26133a);}function _0x28e45b(_0x260edb){return _0x10d1c6['plugins']['get'](_0x260edb);}function _0x519790(){}_0x52451f(await _0x182f78());}_0x40e9d8(_0xb7196c['editor']);}(this);}createRevision(_0x20e0f7){const _0x235aab=this['editor']['plugins']['get']('Users');return new yt({'id':_0x20e0f7['id'],'name':_0x20e0f7['name'],'creator':_0x20e0f7['creatorId']?_0x235aab['getUser'](_0x20e0f7['creatorId']):null,'diffData':_0x20e0f7['diffData']||_0x20e0f7['data'],'authors':_0x20e0f7['authorsIds']['map'](_0x3c0c8e=>_0x235aab['getUser'](_0x3c0c8e)),'createdAt':new Date(_0x20e0f7['createdAt']),'attributes':_0x20e0f7['attributes'],'fromVersion':_0x20e0f7['fromVersion'],'toVersion':_0x20e0f7['toVersion']});}['addRevision'](_0x495461,_0x359d85=0x0){this['_revisions']['add'](_0x495461,_0x359d85);}getRevision(_0x6aadb4){return this['_revisions']['get'](_0x6aadb4);}getRevisions(_0x28457e={'toJSON':!0x1}){const _0x24e085=Array['from'](this['_revisions']);return _0x24e085['reverse'](),_0x28457e['toJSON']?_0x24e085['map'](_0x4b3b1b=>_0x4b3b1b['toJSON']()):_0x24e085;}getIndex(_0x232e14){return this['_revisions']['getIndex'](_0x232e14);}getEarlierVisibleRevision(_0x1dce19){const [,_0xbb38f]=this['getRevisionsIterator'](_0x1dce19,{'direction':'earlier'});return _0xbb38f;}getLaterVisibleRevision(_0x68bec8){const [,_0x577941]=this['getRevisionsIterator'](_0x68bec8,{'direction':'later'});return _0x577941;}getRevisionsInDiff(_0x10d9af){const _0x179c25=[];for(const _0x42d922 of this['getRevisionsIterator'](_0x10d9af['newRevisionId']))if(_0x179c25['push'](_0x42d922),_0x42d922['id']===_0x10d9af['oldRevisionId'])break;return _0x179c25;}*getRevisionsIterator(_0x469697,{direction:_0x4166c8='earlier',filter:_0x3d36c3=()=>!0x0}={}){const _0x2769ee='earlier'===_0x4166c8?0x1:-0x1;let _0x491e11=this['_revisions']['get'](_0x469697),_0xec7e89=this['getIndex'](_0x491e11);for(yield _0x491e11;_0x491e11;){if(_0xec7e89+=_0x2769ee,_0x491e11=this['getRevision'](_0xec7e89),!_0x491e11)return;_0x3d36c3(_0x491e11)&&(yield _0x491e11);}}},Rt=class extends _0x372c9a{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1aa21b,'c'],[_0x398662,'a'],[_0x3ff98f,'e'],[_0x587f07,'r'],[_0x23eb08,'u']]);_typeCharToViewClass=new Map([['c',_0x1aa21b],['a',_0x398662],['e',_0x3ff98f],['r',_0x587f07],['u',_0x23eb08]]);async loadRevisionData(_0x1f0a74,_0x169642){if(_0x1f0a74['diffData']||!_0x169642)return;const _0x51ca3a=this['editor']['config']['get']('collaboration.channelId');_0x1f0a74['diffData']=(await _0x169642['getRevision']({'channelId':_0x51ca3a,'revisionId':_0x1f0a74['id']}))['diffData'];}getRevisionDocumentData(_0xc25fa7){const _0xcbf5df={};for(const _0x51dbf5 in _0xc25fa7['diffData']){if(_0xc25fa7['diffData'][_0x51dbf5]['attachChange']&&!_0xc25fa7['diffData'][_0x51dbf5]['attachChange']['isAttached'])continue;const _0x270f3f=this['_removeRevisionMarkers'](JSON['parse'](_0xc25fa7['diffData'][_0x51dbf5]['insertions'])),_0x1014e9=this['editor']['editing']['view']['document'],_0x53866b=new _0x52f1e2(_0x1014e9,_0x270f3f['map'](_0x516a64=>this['_getViewFromDiffObj'](_0x516a64,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xcbf5df[_0x51dbf5]=this['editor']['data']['processor']['toData'](_0x53866b),this['editor']['data']['processor']['useFillerType']('default');}return _0xcbf5df;}getRevisionRootsAttributes(_0x33a360){const _0x573d38={};for(const _0x3d032c in _0x33a360['diffData'])_0x33a360['diffData'][_0x3d032c]['attachChange']&&!_0x33a360['diffData'][_0x3d032c]['attachChange']['isAttached']||(_0x573d38[_0x3d032c]=_0x33a360['diffData'][_0x3d032c]['attributesAfter']||{});return _0x573d38;}getRevisionRootsModelElements(_0x2285c4){const _0x540c6b={};for(const _0x560642 in _0x2285c4['diffData']){if(_0x2285c4['diffData'][_0x560642]['attachChange']&&!_0x2285c4['diffData'][_0x560642]['attachChange']['isAttached'])continue;const _0x19a783=_0x2285c4['diffData'][_0x560642]['rootElementName'];_0x19a783&&(_0x540c6b[_0x560642]=_0x19a783);}return _0x540c6b;}_getTypeCharForViewElement(_0x3c1d60){return this['_viewClassToTypeChar']['get'](_0x3c1d60['constructor']);}_getViewFromDiffObj(_0x5874cb,_0x4f3397){const _0x2dfcb0=this['editor']['editing']['view']['document'];if('string'==typeof _0x5874cb)return new _0x12251d(_0x2dfcb0,_0x5874cb);{let _0xc89f76,_0x5747b2;_0x5747b2='u'==_0x5874cb['type']||'r'==_0x5874cb['type']?[]:_0x5874cb['children']['map'](_0x16cabb=>this['_getViewFromDiffObj'](_0x16cabb,_0x4f3397));const _0x59ad5f=this['_typeCharToViewClass']['get'](_0x5874cb['type'])||_0x5b4473,_0x437eef=this['editor']['data']['htmlProcessor']['domConverter'];if(_0xc89f76=new _0x59ad5f(_0x2dfcb0,_0x5874cb['name'],_0x5874cb['attributes'],_0x5747b2),'u'==_0x5874cb['type']&&_0x5874cb['children'][0x0]){const _0x34bc6e=_0x5874cb['children'][0x0];if(_0xc89f76['render']=function(_0x492ce2){const _0x3d8faf=_0x492ce2['createElement']('div');return _0x3d8faf['innerHTML']=_0x4cde8c(_0x34bc6e),_0x3d8faf['childNodes'][0x0];},_0x4f3397){const _0x2135aa=new _0x52f1e2(_0x2dfcb0);_0x2135aa['_appendChild'](_0xc89f76);const _0x2ba321=Array['from'](_0x437eef['viewChildrenToDom'](_0x2135aa,{'bind':!0x1})),_0x38498c=_0x437eef['domDocument']['createElement']('div');_0x38498c['append'](..._0x2ba321),_0xc89f76=Array['from'](_0x437eef['domChildrenToView'](_0x38498c))[0x0];}}else{if('r'==_0x5874cb['type']&&_0x5874cb['children'][0x0]){const _0x4bdcdb=_0x5874cb['children'][0x0];if(_0xc89f76['render']=function(_0x5ea95d){_0x5ea95d['innerHTML']=_0x4cde8c(_0x4bdcdb);},_0x4f3397){const _0x289663=new _0x52f1e2(_0x2dfcb0);_0x289663['_appendChild'](_0xc89f76);const _0xf331e3=Array['from'](_0x437eef['viewChildrenToDom'](_0x289663,{'bind':!0x1})),_0x3ca7d6=_0x437eef['domDocument']['createElement']('div');_0x3ca7d6['append'](..._0xf331e3);const _0x26ff53=Array['from'](_0x437eef['domChildrenToView'](_0x3ca7d6));_0x26ff53['length']>0x1?_0xc89f76['_appendChild'](_0x26ff53):_0xc89f76=_0x26ff53[0x0];}}}if(_0x5874cb['customProperties']){for(const [_0x5c6872,_0x276f92]of _0x5874cb['customProperties'])_0xc89f76['_setCustomProperty'](_0x5c6872,_0x276f92);}const _0x2692ff=void 0x0===_0x5874cb['fillerOffset']?null:_0x5874cb['fillerOffset'];return null!==_0x2692ff&&(_0xc89f76['getFillerOffset']=()=>_0x2692ff),_0xc89f76;}}_makeModelFromViewString(_0x45d48e,_0x2799b8){const _0x284c04=JSON['parse'](_0x45d48e),_0x28f87b=this['editor']['editing']['view']['document'],_0xb830f8=new _0x52f1e2(_0x28f87b,_0x284c04['map'](_0x11c16a=>this['_getViewFromDiffObj'](_0x11c16a,!0x0))),_0x38f7c6=this['editor']['data']['toModel'](_0xb830f8,_0x2799b8);return _0x38f7c6['name']=_0x2799b8,_0x38f7c6;}['_removeRevisionMarkers'](_0x1af902){return(_0x1af902=_0x1af902['filter'](_0x11f702=>!_0x11f702['name']||'revision-start'!==_0x11f702['name']&&'revision-end'!==_0x11f702['name']))['forEach'](_0x301cb2=>{'string'!=typeof _0x301cb2&&(_0x301cb2['children']=this['_removeRevisionMarkers'](_0x301cb2['children']),_0x301cb2['attributes']=_0x301cb2['attributes']['filter'](_0x12fd70=>!_0x12fd70[0x0]['startsWith']('data-revision-')));}),_0x1af902;}};function kt(_0x36dbd0,_0x353c21,_0x2ba0b7){const t=_0x36dbd0['t'];switch(_0x353c21){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'},_0x2ba0b7);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2ba0b7);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'},_0x2ba0b7);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x2ba0b7);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x2ba0b7);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x372c9a{['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[_0x4db7e9,bt,Rt,_0x2c2eee];}constructor(_0x410fe3){super(_0x410fe3),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 _0x45b332=_0x2cb4ed();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x45b332},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 _0x2619fb=this['repository']['getRevision'](0x0),_0x430cd4=_0x2619fb&&null===_0x2619fb['creator']?_0x2619fb:null;if(this['_continueCurrentRevision']=!!_0x430cd4&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x29b190=this['_source']['getCurrentRevisionId'](),_0xc1341e=this['repository']['getRevision'](_0x29b190);if(_0xc1341e)this['_startingVersion']=_0xc1341e['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1a4381=this['_source']['history']['_operations']['find'](_0x1ab20a=>!_0x1ab20a['_isInit']),_0x1bd29b=_0x1a4381?_0x1a4381['baseVersion']:this['_source']['history']['version'];_0x2619fb?(_0x2619fb['toVersion']<_0x1bd29b&&_0x2619fb['_update']({'toVersion':_0x1bd29b}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x430cd4['id'],this['_startingVersion']=_0x430cd4['fromVersion']):(this['_startingVersion']=_0x2619fb['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x1bd29b,this['_continueCurrentRevision']=!0x1);}}else _0x430cd4&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x430cd4['toVersion'],this['editor']['model']['document']['history']['version']),_0x430cd4['fromVersion']===_0x430cd4['toVersion']?(0x0!==_0x430cd4['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x430cd4['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x430cd4['id'],this['_startingVersion']=_0x430cd4['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',_0x1f933c=>!_0x1f933c),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1d7d4b=[this['editor']];for(const _0x50049a of _0x1d7d4b){let _0x5b57b9;for(const _0x5b9a61 in _0x50049a){const _0x13b215=_0x5b9a61,_0xf1fabd=_0x50049a[_0x13b215];if('revisionHistoryLicenseKeyValid'==_0xf1fabd||'revisionHistoryLicenseKeyInvalid'==_0xf1fabd||'revisionHistoryLicenseKeyExpired'==_0xf1fabd||'revisionHistoryLicenseKeyDomainLimit'==_0xf1fabd||'revisionHistoryLicenseKeyNotAllowed'==_0xf1fabd||'revisionHistoryLicenseKeyEvaluationLimit'==_0xf1fabd||'revisionHistoryLicenseKeyUsageLimit'==_0xf1fabd){delete _0x50049a[_0x13b215],_0x5b57b9=_0xf1fabd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5b57b9&&_0x50049a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5b57b9&&_0x50049a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5b57b9&&_0x50049a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5b57b9&&_0x50049a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5b57b9&&_0x50049a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5b57b9&&_0x50049a['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x44d03a=this['repository']['getRevision'](0x0),_0x231090=await this['getRevisionDocumentData'](_0x44d03a),_0x10c489=await this['getRevisionRootsAttributes'](_0x44d03a),_0x48ccbb=this['_utils']['getRevisionRootsModelElements'](_0x44d03a);this['_replaceEditorDataWithRevisionData'](_0x231090,_0x10c489,_0x48ccbb);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x99b972){this['_source']=_0x99b972;}async update(){const _0x408d4e=await this['_source']['getLatestVersion']();if(_0x408d4e>this['currentRevision']['toVersion']){await this['_loadState']();const _0x56169d=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x408d4e});_0x56169d['authors']=_0x56169d['authorsIds']['map'](_0x367096=>this['editor']['plugins']['get']('Users')['getUser'](_0x367096)),this['currentRevision']['_update'](_0x56169d);}}async['saveRevision'](_0x4d73c9={},_0x315c3b=null){const _0x4bc527=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x315c3b>this['currentRevision']['toVersion']&&(_0x315c3b=null),null===_0x315c3b&&(_0x315c3b=await this['_source']['getLatestVersion']());const _0x3a34ff=this['_getFromVersion'](_0x315c3b),_0x4df3d0=this['buildRevisionData']({'from':_0x3a34ff,'to':_0x315c3b});if(this['currentRevision']['toVersion']<_0x315c3b){const _0x4958d7=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x315c3b,'to':_0x315c3b});_0x4958d7['authors']=[],_0x4958d7['authorsIds']=[],_0x4958d7['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4958d7,!0x0),delete _0x4958d7['authors'],_0x4bc527['push'](_0x4958d7);}const _0xab4547={..._0x4d73c9,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x4d73c9['name']||null,'id':_0x4d73c9['id']||_0x2cb4ed(),..._0x4df3d0,'attributes':{..._0x4d73c9['attributes'],..._0x4df3d0['attributes']}},_0x49167c=this['addRevisionData'](_0xab4547);_0x4bc527['push'](_0xab4547);const _0x1c7323=this['repository']['getIndex'](_0x49167c);if(0x0!==_0x1c7323){const _0x25393a=this['repository']['getRevision'](_0x1c7323-0x1);if(_0x25393a['fromVersion']!==_0x315c3b){const _0x4503f8=this['_revisionDataBuilder']['getData'](_0x315c3b,_0x25393a['toVersion']),_0x219a20={'id':_0x25393a['id'],'diffData':_0x4503f8['diffData'],'authorsIds':_0x4503f8['authorsIds'],'authors':_0x4503f8['authorsIds']['map'](_0x34958b=>this['editor']['plugins']['get']('Users')['getUser'](_0x34958b)),'fromVersion':_0x315c3b};this['_stampAiAttribute'](_0x219a20,_0x25393a,!!_0x4503f8['hasAIChanges']),_0x25393a===this['currentRevision']&&(_0x219a20['createdAt']=new Date(_0xab4547['createdAt']['getTime']()+0xa)),_0x25393a['_update'](_0x219a20,!0x0),delete _0x219a20['authors'],_0x4bc527['push'](_0x219a20);}}if(this['adapter']){for(const _0x2a8b0a of _0x4bc527)this['_bufferUpdate'](_0x2a8b0a['id'],_0x2a8b0a,!0x0);this['sendBufferedUpdates']();}return _0x49167c;}addRevisionData(_0xe85b01){const _0x39a0f7=this['repository']['createRevision'](_0xe85b01);return this['adapter']&&_0x39a0f7['on']('_update',(_0x18e007,_0x14b944,_0x4e06fc)=>{_0x4e06fc||(this['_bufferUpdate'](_0x14b944['id'],_0x14b944,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x39a0f7,this['_findInsertionIndex'](_0x39a0f7)),_0x39a0f7;}async getRevisionDocumentData(_0xae3b50){return await this['_utils']['loadRevisionData'](_0xae3b50,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xae3b50);}async getRevisionRootsAttributes(_0x15983a){return await this['_utils']['loadRevisionData'](_0x15983a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x15983a);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3d354e=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x28de8b=0x0;_0x28de8b<_0x3d354e['length'];_0x28de8b++){const _0x38f89e=_0x3d354e[_0x28de8b];let _0x298728=!0x1;for(const _0x3de490 of Object['keys'](_0x38f89e))void 0x0===_0x38f89e[_0x3de490]?delete _0x38f89e[_0x3de490]:'id'!==_0x3de490&&(_0x298728=!0x0);_0x298728||(_0x3d354e[_0x28de8b]=null);}if(_0x3d354e=_0x3d354e['filter'](_0x137585=>null!==_0x137585),!_0x3d354e['length'])return;for(let _0x1db980=0x0;_0x1db980<_0x3d354e['length'];_0x1db980++){const _0x5f4c68=_0x3d354e[_0x1db980];void 0x0!==_0x5f4c68['fromVersion']&&void 0x0===_0x5f4c68['toVersion']&&(_0x5f4c68['toVersion']=this['repository']['getRevision'](_0x5f4c68['id'])['toVersion']),void 0x0!==_0x5f4c68['toVersion']&&void 0x0===_0x5f4c68['fromVersion']&&(_0x5f4c68['fromVersion']=this['repository']['getRevision'](_0x5f4c68['id'])['fromVersion']);}const _0x1d520e=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3d354e,_0x1d520e)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x5f08f6=>{if(_0x5f08f6){for(const _0x75d6b2 of _0x5f08f6)this['setRevisionData']({'id':_0x75d6b2['id'],'createdAt':_0x75d6b2['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x266a22,_0x3713d0,_0x1f8734){if(_0x1f8734===(!!_0x3713d0&&!!_0x3713d0['attributes']['@ai']))return;const _0x387fd3={..._0x3713d0?_0x3713d0['attributes']:{},..._0x266a22['attributes']};_0x1f8734?_0x387fd3['@ai']=!0x0:delete _0x387fd3['@ai'],_0x266a22['attributes']=_0x387fd3;}buildRevisionData({revision:_0x44b657=null,from:_0x3e41cf=null,to:_0x58ca09=null}){_0x3e41cf=null!==_0x3e41cf?_0x3e41cf:_0x44b657['fromVersion'],_0x58ca09=null!==_0x58ca09?_0x58ca09:_0x44b657['toVersion'];const _0x5a7d64=this['_revisionDataBuilder']['getData'](_0x3e41cf,_0x58ca09),_0x376e3c={'diffData':_0x5a7d64['diffData'],'authorsIds':_0x5a7d64['authorsIds'],'fromVersion':_0x3e41cf,'toVersion':_0x58ca09};if(this['_stampAiAttribute'](_0x376e3c,_0x44b657,!!_0x5a7d64['hasAIChanges']),!_0x44b657||_0x58ca09!==_0x44b657['toVersion']){const _0x9925f9=_0x58ca09-0x1,_0x30127c=this['_source']['history']['getOperation'](_0x9925f9);_0x376e3c['createdAt']=_0x30127c&&_0x30127c['createdAt']||new Date();}if(this['_loadedStateData']&&_0x3e41cf===this['_loadedStateData']['fromVersion']){for(const _0x2850c9 of this['_loadedStateData']['authors'])_0x376e3c['authorsIds']['includes'](_0x2850c9['id'])||_0x376e3c['authorsIds']['push'](_0x2850c9['id']);}return _0x376e3c;}_bufferUpdate(_0x507f70,_0x549ab7,_0x561bd5){if(this['_bufferedUpdates']['has'](_0x507f70)){const _0x583856=this['_bufferedUpdates']['get'](_0x507f70);_0x549ab7=_0x561bd5?{..._0x583856,..._0x549ab7}:{..._0x549ab7,..._0x583856};}this['_bufferedUpdates']['set'](_0x507f70,_0x549ab7);}setRevisionData(_0x5e77ab){const _0x5b1522=this['repository']['getRevision'](_0x5e77ab['id']);if(_0x5e77ab['createdAt']&&(_0x5e77ab['createdAt']=new Date(_0x5e77ab['createdAt'])),_0x5e77ab['authorsIds']){const _0x15e2d5=this['editor']['plugins']['get']('Users');_0x5e77ab['authors']=_0x5e77ab['authorsIds']['map'](_0x437f2f=>_0x15e2d5['getUser'](_0x437f2f));}_0x5b1522['_update'](_0x5e77ab,!0x0);}_createInitialRevision(_0x374237){const _0x2acc40=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x2acc40)this['_initialRevisionId']=_0x2acc40['id'];else{const _0x264bb3=!this['editor']['model']['document']['roots']['find'](_0x216694=>this['editor']['model']['hasContent'](_0x216694)),_0x3e6bcd=this['editor']['plugins']['get']('Users')['me']['id'],_0x5db0fd=kt(this['editor']['locale'],_0x264bb3?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x374237,'to':_0x374237,'id':this['_initialRevisionId'],'name':_0x5db0fd,'creatorId':_0x3e6bcd});}}_createCurrentRevision(_0x2c0f1a){const _0x61966a=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x61966a),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2c0f1a,'to':_0x2c0f1a,'id':_0x61966a,'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(_0x537c19,_0x30bec2,_0x434105){const _0x47677a={},_0x430715={},_0x20d53a={},_0x18e119=this['editor']['config']['get']('roots')||{};for(const [_0x232822,_0x4047ef]of Object['entries'](_0x18e119))_0x4047ef['lazyLoad']||(_0x47677a[_0x232822]=_0x4047ef['initialData']??'',_0x430715[_0x232822]=_0x4047ef['modelAttributes']||{},_0x4047ef['modelElement']&&(_0x20d53a[_0x232822]=_0x4047ef['modelElement']));for(const _0x3b4c3d of this['editor']['model']['document']['getRootNames']())_0x47677a[_0x3b4c3d]??='',_0x430715[_0x3b4c3d]??={};let _0x371ec0=!0x1;const _0x39b768=Object['keys'](_0x47677a),_0x596b4c=Object['keys'](_0x537c19);for(const _0x5dd8e0 of _0x39b768){if(_0x47677a[_0x5dd8e0]!==_0x537c19[_0x5dd8e0]&&''!==_0x47677a[_0x5dd8e0]['trim']()){_0x371ec0=!0x0;break;}if(!_0x324a53(_0x430715[_0x5dd8e0],_0x30bec2[_0x5dd8e0])&&Object['keys'](_0x430715[_0x5dd8e0])['length']>0x0){_0x371ec0=!0x0;break;}const _0x4aa26c=_0x20d53a[_0x5dd8e0],_0x54ad71=_0x434105[_0x5dd8e0];if(_0x4aa26c&&_0x54ad71&&_0x4aa26c!==_0x54ad71){_0x371ec0=!0x0;break;}}_0x371ec0||(_0x371ec0=_0x596b4c['some'](_0x228542=>!this['editor']['model']['document']['getRoot'](_0x228542))),_0x371ec0&&_0x100000('editor-initial-data-replaced-with-revision-data',{'editorData':_0x47677a,'editorRootsAttributes':_0x430715,'editorRootsModelElements':_0x20d53a,'revisionData':_0x537c19,'revisionRootsAttributes':_0x30bec2,'revisionRootsModelElements':_0x434105});for(const [_0x3c463e,_0x24c81e]of Object['entries'](_0x537c19))this['editor']['config']['set']('roots.'+_0x3c463e+'.initialData',_0x24c81e);for(const [_0x898c40,_0x65f726]of Object['entries'](_0x30bec2))this['editor']['config']['set']('roots.'+_0x898c40+'.modelAttributes',_0x65f726);const _0x5d9d97=this['editor']['model']['document'];for(const [_0x41269b,_0x141ce0]of Object['entries'](_0x434105)){this['editor']['config']['set']('roots.'+_0x41269b+'.modelElement',_0x141ce0);const _0x2d8545=_0x5d9d97['getRoot'](_0x41269b);_0x2d8545&&_0x2d8545['name']!==_0x141ce0&&(_0x5d9d97['roots']['remove'](_0x41269b),_0x5d9d97['createRoot'](_0x141ce0,_0x41269b));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2cff9f=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2cff9f['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x28cbd8){const _0x301eaa=this['repository']['getRevisions']();_0x301eaa['reverse']();let _0x576c4a=0x0;for(;_0x576c4a<_0x301eaa['length'];){const _0x310d2d=_0x301eaa[_0x576c4a];if(_0x310d2d===this['currentRevision']){_0x576c4a++;continue;}if(_0x310d2d['id']===this['_initialRevisionId'])break;const _0x59fbc8=_0x28cbd8['toVersion']-_0x310d2d['toVersion']||_0x28cbd8['fromVersion']-_0x310d2d['fromVersion'];if(_0x59fbc8>0x0)break;if(_0x59fbc8<0x0)_0x576c4a++;else{if(!_0x28cbd8['creator']&&_0x310d2d['creator'])break;if(_0x310d2d['creator']||!_0x28cbd8['creator']){if(_0x28cbd8['createdAt']>_0x310d2d['createdAt'])break;_0x576c4a++;}else _0x576c4a++;}}return _0x576c4a;}_getFromVersion(_0x401f25){const _0x3cdb60=this['repository']['getRevisions']();_0x3cdb60['reverse'](),_0x3cdb60['shift']();const _0x3127db=_0x3cdb60['find'](_0x4c3583=>_0x4c3583['toVersion']<=_0x401f25)['toVersion'];return _0x3127db<this['_startingVersion']?this['_startingVersion']:_0x3127db;}['_makeRevision']({name:_0x1bedc2,from:_0x2ae67c,to:_0x360951,creatorId:_0x141896,id:_0xc6a22a}){const _0x162013=this['buildRevisionData']({'from':_0x2ae67c,'to':_0x360951});_0x162013['name']=_0x1bedc2,_0x162013['creatorId']=_0x141896,_0x162013['id']=_0xc6a22a;const _0x1dbf4=this['addRevisionData'](_0x162013);return this['adapter']&&this['_bufferUpdate'](_0x162013['id'],_0x162013,!0x0),_0x1dbf4;}_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(_0xd7ab71){this['editor']=_0xd7ab71,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(_0xcdd32b){this['source']=_0xcdd32b;const _0x187ec3=new Map(),_0x17b809=new Map(),_0x2c39ff=this['editor']['model']['document']['roots']['map'](_0x105d5b=>_0x105d5b['rootName']);for(const _0x1f4d32 of _0x2c39ff){const _0x54b650=this['editor']['model']['document']['getRoot'](_0x1f4d32),_0x47bc51=St(_0x54b650);_0x187ec3['set'](_0x1f4d32,_0x47bc51),_0x17b809['set'](_0x1f4d32,Object['fromEntries'](_0x54b650['getAttributes']()));}const _0x44db59=Array['from'](this['editor']['model']['markers'])['map'](_0x26d4ef=>[_0x26d4ef['name'],_0x26d4ef['getRange']()]),_0x1b7de2=this['source']['version'];this['_saveMetaData'](_0x1b7de2,_0x187ec3,_0x44db59,_0x17b809),this['_startingRevisionId']=this['_revisionId'];const _0x2da385=new Map(),_0x4c4107=new Map();for(const _0x56bfbf of _0x2c39ff){const _0x173736=Et(_0x56bfbf,this['editor']['model']['document']['getRoot'](_0x56bfbf)['name']);_0x2da385['set'](_0x56bfbf,_0x173736),_0x4c4107['set'](_0x56bfbf,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2da385,[],_0x4c4107);}getData(_0x14934c,_0x5f380d){if(this['_lastFrom']===_0x14934c&&this['_lastTo']<=_0x5f380d)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5f380d,!0x0);else{if(!this['_savedMetaData']['has'](_0x14934c)){const _0x4ff767=this['_getPreviousFrom'](_0x14934c);this['_calculateMetaData'](_0x4ff767,_0x14934c,!0x1);}this['_calculateMetaData'](_0x14934c,_0x5f380d,!0x0);}return this['_lastFrom']=_0x14934c,this['_lastTo']=_0x5f380d,this['_getState']();}loadState(_0x23b5da){if(!this['_savedMetaData']['has'](_0x23b5da['fromVersion'])){const _0x49ea6d=this['_getPreviousFrom'](_0x23b5da['fromVersion']);this['_calculateMetaData'](_0x49ea6d,_0x23b5da['fromVersion'],!0x1);}this['_calculateMetaData'](_0x23b5da['fromVersion'],_0x23b5da['toVersion'],!0x1);const _0x43e292=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x23b5da['fromVersion'],this['_lastTo']=_0x23b5da['toVersion'];for(const _0x1ce74f in _0x23b5da['diffData']){const _0x54b549=_0x23b5da['diffData'][_0x1ce74f]['attachChange'],_0x50efbf=_0x2a6b9c(_0x23b5da['diffData'][_0x1ce74f]['attributesBefore'])||{},_0xe5635c=_0x23b5da['diffData'][_0x1ce74f],_0x3e0cd6=_0x43e292['_makeModelFromViewString'](_0xe5635c['deletions'],_0xe5635c['rootElementName']||'$root');_0x3e0cd6['rootName']=_0x1ce74f,_0x3e0cd6['_isAttached']=!_0x54b549||!_0x54b549['isAttached'],_0x3e0cd6['isAttached']=()=>_0x3e0cd6['_isAttached'],this['_baseRoots']['set'](_0x1ce74f,_0x3e0cd6),this['_baseRootsAttributes']['set'](_0x1ce74f,_0x50efbf),_0x54b549&&this['_touchedRoots']['set'](_0x1ce74f,_0x54b549);const _0x214cf1=this['_makeIdsRoot'](_0x3e0cd6);this['_baseIdsRoots']['set'](_0x1ce74f,_0x214cf1);for(const [_0x57808f,_0xe72d1]of _0x3e0cd6['markers']){if(!_0x57808f['startsWith']('revision:'))continue;const _0x38820a=_0x57808f['split'](':')[0x2],_0xb3a336=_0xe5635c['aiSources']?.[_0x57808f]||null;for(const _0x5d6864 of _0xe72d1['getWalker']({'singleCharacters':!0x0})){const _0x463bed=this['_getVidAttributeName'](_0x5d6864),_0x3ab3c4='elementEnd'==_0x5d6864['type']?_0x5d6864['previousPosition']['path']['slice'](0x0,-0x1):_0x5d6864['previousPosition']['path'],_0x3cf229=_0x214cf1['getNodeByPath'](_0x3ab3c4)['getAttribute'](_0x463bed);this['_touched']['set'](_0x3cf229,{'userId':_0x38820a,'aiSource':_0xb3a336});}_0x3e0cd6['markers']['delete'](_0x57808f);}}this['_startingRevisionId']=this['_revisionId'];const _0x56903f=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0xf4a86a=>!this['_touched']['has'](_0xf4a86a));let _0x30cc6b=0x0;const _0x41af22=new Map();for(const _0x1f0b6a in _0x23b5da['diffData']){const _0x149ad2=_0x23b5da['diffData'][_0x1f0b6a]['attachChange'],_0x14cbeb=_0x2a6b9c(_0x23b5da['diffData'][_0x1f0b6a]['attributesAfter'])||{},_0x529e2e=_0x23b5da['diffData'][_0x1f0b6a],_0x51e412=_0x43e292['_makeModelFromViewString'](_0x529e2e['insertions'],_0x529e2e['rootElementName']||'$root');_0x51e412['rootName']=_0x1f0b6a,_0x51e412['_isAttached']=!_0x149ad2||_0x149ad2['isAttached'],_0x51e412['isAttached']=()=>_0x51e412['_isAttached'],this['_diffRoots']['set'](_0x1f0b6a,_0x51e412),this['_diffRootsAttributes']['set'](_0x1f0b6a,_0x14cbeb);const _0x575b58=this['_makeIdsRoot'](_0x51e412,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1f0b6a,_0x575b58),_0x41af22['set'](_0x1f0b6a,_0x51e412['isAttached']()?_0x14cbeb:{});for(const [_0x267cf2,_0x45e951]of _0x51e412['markers']){if(!_0x267cf2['startsWith']('revision:'))continue;const _0x42ef0a=_0x267cf2['split'](':')[0x2],_0x23301a=_0x529e2e['aiSources']?.[_0x267cf2]||null;for(const _0x285fc3 of _0x45e951['getWalker']({'singleCharacters':!0x0})){const _0x37b11a=this['_getVidAttributeName'](_0x285fc3),_0x453ad0=this['_revisionId']++,_0x504161='elementEnd'==_0x285fc3['type']?_0x285fc3['previousPosition']['path']['slice'](0x0,-0x1):_0x285fc3['previousPosition']['path'];_0x575b58['getNodeByPath'](_0x504161)['_setAttribute'](_0x37b11a,_0x453ad0),this['_touched']['set'](_0x453ad0,{'userId':_0x42ef0a,'aiSource':_0x23301a});}_0x51e412['markers']['delete'](_0x267cf2);}for(const _0x50a07e of this['editor']['model']['createRangeIn'](_0x51e412)['getWalker']({'singleCharacters':!0x0})){const _0x19a87a=this['_getVidAttributeName'](_0x50a07e),_0x4b94cf='elementEnd'==_0x50a07e['type']?_0x50a07e['previousPosition']['path']['slice'](0x0,-0x1):_0x50a07e['previousPosition']['path'],_0x556c2b=_0x575b58['getNodeByPath'](_0x4b94cf);_0x556c2b['getAttribute'](_0x19a87a)>0x0||_0x556c2b['_setAttribute'](_0x19a87a,_0x56903f[_0x30cc6b++]);}for(const [_0x2492ec,_0x56589d]of _0x51e412['markers'])_0x2492ec['startsWith']('revision:')||this['_markers']['set'](_0x2492ec,_0x56589d);}const {roots:_0x1ae4a2}=this['_savedMetaData']['get'](_0x23b5da['fromVersion']),{roots:_0x47e12c}=this['_savedMetaData']['get'](_0x23b5da['toVersion']),_0x32c810=St(_0x1ae4a2['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x32c810),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x32c810,Number['NEGATIVE_INFINITY']));const _0x134dd8=St(_0x47e12c['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x134dd8),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x134dd8));const _0x170369=Array['from'](this['_diffRoots'])['map'](([_0x502fa8,_0x3ba876])=>[_0x502fa8,St(_0x3ba876)]);this['_saveMetaData'](this['_lastTo'],_0x170369,this['_markers'],_0x41af22);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x2acba9,_0x4b53b3,_0x75569f,_0x8fb565){const _0x392f9f=new Map(_0x4b53b3),_0x5f0d64=new Map(_0x2a6b9c(_0x8fb565)),_0x348d33=new Map();for(const [_0x50f5ec,_0x57be69]of _0x75569f)_0x348d33['set'](_0x50f5ec,{'start':_0x57be69['start']['clone'](),'end':_0x57be69['end']['clone'](),'rootName':_0x57be69['root']['rootName']});this['_savedMetaData']['set'](_0x2acba9,{'roots':_0x392f9f,'markers':_0x348d33,'rootsAttributes':_0x5f0d64});}_removeMetaData(_0x4b6ae6){this['_savedMetaData']['delete'](_0x4b6ae6);}_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(_0x4da044,_0x1c21de=null){let _0x697968=null;_0x4da044['is']('documentFragment')||(_0x697968=new _0xd26162(_0x4da044['name'],{'vid_start':null===_0x1c21de?this['_revisionId']++:_0x1c21de++}));const _0x6bdbda=[];for(const _0x3aebd8 of _0x4da044['getChildren']())if(_0x3aebd8['is']('element')){_0x6bdbda['push'](this['_makeIdsRoot'](_0x3aebd8,_0x1c21de));const _0x23e5df=_0x6bdbda[_0x6bdbda['length']-0x1];null!==_0x1c21de&&(_0x1c21de=_0x23e5df['is']('element','$text')?_0x23e5df['getAttribute']('vid')+0x1:_0x23e5df['getAttribute']('vid_end')+0x1);}else{for(let _0x495026=0x0;_0x495026<_0x3aebd8['offsetSize'];_0x495026++)_0x6bdbda['push'](new _0xd26162('$text',{'vid':null===_0x1c21de?this['_revisionId']++:_0x1c21de++}));}if(_0x4da044['is']('documentFragment')){const _0x492fe9=Et(_0x4da044['rootName'],_0x4da044['name']);return _0x492fe9['_insertChild'](0x0,_0x6bdbda),_0x492fe9;}return _0x697968['_setAttribute']('vid_end',null===_0x1c21de?this['_revisionId']++:_0x1c21de),_0x697968['_insertChild'](0x0,_0x6bdbda),_0x697968;}_calculateMetaData(_0xb1e6f8,_0x1c8306,_0x2db88a){this['_reset']();const {roots:_0x106029,markers:_0x4df6bd,rootsAttributes:_0x5b8d02}=this['_savedMetaData']['get'](_0xb1e6f8);this['_baseRoots']=new Map(_0x106029),this['_baseRootsAttributes']=new Map(_0x2a6b9c(_0x5b8d02));for(const [_0x1b6234,_0x830c50]of this['_baseRoots'])if('$graveyard'!==_0x1b6234&&(this['_diffRoots']['set'](_0x1b6234,St(_0x830c50)),this['_diffRootsAttributes']=new Map(_0x2a6b9c(_0x5b8d02)),_0x2db88a)){const _0x34bf1c=this['_revisionId'];this['_idsRoots']['set'](_0x1b6234,this['_makeIdsRoot'](_0x830c50)),this['_baseIdsRoots']['set'](_0x1b6234,this['_makeIdsRoot'](_0x830c50,_0x34bf1c));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x2db88a&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x26699e,_0x42fd33]of _0x4df6bd){const _0x489000=this['_baseRoots']['get'](_0x42fd33['rootName']),_0x159919=this['_diffRoots']['get'](_0x42fd33['rootName']),_0x4630fa=new _0x597476(_0xe182ed(_0x42fd33['start'],_0x489000),_0xe182ed(_0x42fd33['end'],_0x489000)),_0x597daa=_0x2ef4f4(_0x4630fa,_0x159919);_0x489000['markers']['set'](_0x26699e,_0x4630fa),this['_markers']['set'](_0x26699e,_0x597daa);}this['_applyOperations'](_0xb1e6f8,_0x1c8306,_0x2db88a);}_applyOperations(_0x3c07b9,_0x3616e9,_0x130c21){for(const _0xded3d0 of this['source']['getOperations'](_0x3c07b9,_0x3616e9))this['_handleOperation'](_0xded3d0,_0x130c21);for(const _0x1628ea of this['_diffRoots']['values']())_0x1628ea['markers']['clear']();for(const [_0x161d5c,_0x32bdb6]of this['_markers'])this['_diffRoots']['get'](_0x32bdb6['root']['rootName'])['markers']['set'](_0x161d5c,_0x32bdb6['clone']());const _0x3b323c=new Map(),_0x551b34=new Map();for(const [_0x3caa62,_0x22f599]of this['_diffRoots'])_0x3b323c['set'](_0x3caa62,St(_0x22f599)),_0x551b34['set'](_0x3caa62,this['_diffRootsAttributes']['get'](_0x3caa62));this['_saveMetaData'](_0x3616e9,_0x3b323c,this['_markers'],_0x551b34);}_getPreviousFrom(_0x28d0db){const _0x35f7e2=Array['from'](this['_savedMetaData']['keys']());_0x35f7e2['sort']((_0x1ca8ca,_0x46d498)=>_0x1ca8ca-_0x46d498),_0x35f7e2['reverse']();for(const _0x36305d of _0x35f7e2)if(_0x36305d<_0x28d0db)return _0x36305d;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x150290,_0x4bbe64){const _0x4b2b48=Array['from'](_0x4bbe64['markers'])['map'](([_0x5dec77,_0x986b05])=>[_0x5dec77,_0x2ef4f4(_0x986b05,_0x150290)]);_0x150290['markers']=new Map(_0x4b2b48);}_transformMarkers(_0x180e4e){for(const _0x313185 of this['_markers']['values']()){const _0x304941=_0x313185['getTransformedByOperation'](_0x180e4e),_0x249c98=_0x597476['_createFromRanges'](_0x304941);_0x313185['start']=_0x249c98['start'],_0x313185['end']=_0x249c98['end'];}}_handleOperation(_0x3d0f79,_0x21816d){if('addRoot'!=_0x3d0f79['type']&&'detachRoot'!=_0x3d0f79['type']){if('insert'==_0x3d0f79['type']){const _0x3cf62d=_0x3d0f79['position']['root'],_0x436939=_0x3cf62d['rootName'],_0x11c13b=_0x3cf62d['name'];this['_diffRoots']['has'](_0x436939)||(this['_diffRoots']['set'](_0x436939,Et(_0x436939,_0x11c13b,!0x0)),this['_diffRootsAttributes']['set'](_0x436939,{}),_0x21816d&&this['_idsRoots']['set'](_0x436939,Et(_0x436939,_0x11c13b,!0x0)));}else{if('addRootAttribute'==_0x3d0f79['type']||'removeRootAttribute'==_0x3d0f79['type']||'changeRootAttribute'==_0x3d0f79['type'])return void this['_handleRootAttributeOperation'](_0x3d0f79);'marker'==_0x3d0f79['type']&&this['_handleMarkerOperation'](_0x3d0f79);}if('marker'!==_0x3d0f79['type']){const _0x4f267f=this['_cloneOperation'](_0x3d0f79,this['_diffRoots']);_0x4f267f['_execute'](),this['_transformMarkers'](_0x4f267f);}if(_0x21816d)switch(_0x3d0f79['type']){case'insert':this['_handleInsertOperation'](_0x3d0f79);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3d0f79);break;case'merge':this['_handleMergeOperation'](_0x3d0f79);break;case'split':this['_handleSplitOperation'](_0x3d0f79);}}else this['_handleRootOperation'](_0x3d0f79,_0x21816d);}_cloneOperation(_0x66d9fb,_0x414307){const _0x2c5fac=_0x66d9fb['clone']();return _0x2c5fac['_authorId']=_0x66d9fb['_authorId'],_0x2c5fac['_aiSource']=_0x66d9fb['_aiSource'],_0x2c5fac['baseVersion']=null,_0x8c22cf(_0x2c5fac,_0x414307),_0x2c5fac;}_getBaseVids(_0x2a99a2){return _0x2a99a2['map'](_0x38fc5b=>{const _0x367a55=this['_getVidAttributeName'](_0x38fc5b);return Number(_0x38fc5b['item']['getAttribute'](_0x367a55));});}_generateTape(_0x51b890,_0x49791d){if(_0x51b890['is']('element','$text'))_0x49791d['push']({'item':_0x51b890,'type':'text'});else{_0x51b890['is']('element')&&_0x49791d['push']({'item':_0x51b890,'type':'elementStart'});for(const _0x240d65 of _0x51b890['getChildren']())this['_generateTape'](_0x240d65,_0x49791d);_0x51b890['is']('element')&&_0x49791d['push']({'item':_0x51b890,'type':'elementEnd'});}return _0x49791d;}_getState(){const _0x2671ee=new Map(this['_touched']),_0x376472=new Map(_0x2671ee),_0xfdab9f=new Map(),_0x76f5d0={'insertions':{},'deletions':{}},_0x5f5557={'insertions':{},'deletions':{}},_0x1f3736=new Map(),_0x494c3c=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x5d21ec=new Map();_0x494c3c['delete']('$graveyard');for(const _0x61d637 of _0x494c3c){const _0x37d0f0=(this['_diffRoots']['get'](_0x61d637)??this['_baseRoots']['get'](_0x61d637))['name'],_0x38b1ae=this['_diffRoots']['get'](_0x61d637)||Et(_0x61d637,_0x37d0f0,!0x1),_0x16a94b=this['_baseRoots']['get'](_0x61d637)||Et(_0x61d637,_0x37d0f0,!0x1);_0x38b1ae['isAttached']()||_0x16a94b['isAttached']()?(_0x5d21ec['set'](_0x61d637,_0x37d0f0),_0x76f5d0['insertions'][_0x61d637]=St(_0x38b1ae),_0x76f5d0['deletions'][_0x61d637]=St(_0x16a94b),this['_copyMarkers'](_0x76f5d0['deletions'][_0x61d637],_0x16a94b),this['_copyMarkers'](_0x76f5d0['insertions'][_0x61d637],_0x38b1ae),_0x5f5557['insertions'][_0x61d637]=this['_generateTape'](this['_idsRoots']['get'](_0x61d637),[]),_0x5f5557['deletions'][_0x61d637]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x61d637)||Et(_0x61d637,_0x37d0f0,!0x1),[])):_0x494c3c['delete'](_0x61d637);}for(const _0x40fa35 of _0x494c3c){const _0x502ee5=_0x5f5557['insertions'][_0x40fa35];for(const _0x1c7289 of _0x502ee5){const _0x484558=this['_getVidAttributeName'](_0x1c7289),_0x1f6e74=_0x1c7289['item']['getAttribute'](_0x484558);_0x376472['delete'](_0x1f6e74),_0x1f6e74>=this['_startingRevisionId']&&_0xfdab9f['set'](_0x1f6e74,_0x2671ee['get'](_0x1f6e74));}}for(const _0x21ded4 of _0x494c3c){const _0x3f3414=_0x5f5557['insertions'][_0x21ded4],_0x53006=this['_getBaseVids'](_0x5f5557['deletions'][_0x21ded4]);let _0x2a81ec=0x0;for(const _0x5806b9 of _0x3f3414){const _0x2e4757=this['_getVidAttributeName'](_0x5806b9),_0x27cdd=_0x5806b9['item']['getAttribute'](_0x2e4757);if(!_0xfdab9f['has'](_0x27cdd)&&!_0x1f3736['has'](_0x27cdd)){if(_0x376472['has'](_0x27cdd))_0x2a81ec++;else{if(_0x27cdd!=_0x53006[_0x2a81ec]){const _0x5d6894=_0x2671ee['get'](_0x27cdd)||_0x2671ee['get'](_0x53006[_0x2a81ec]);for(;_0x27cdd!=_0x53006[_0x2a81ec];)_0x376472['has'](_0x53006[_0x2a81ec])||(_0x1f3736['set'](_0x53006[_0x2a81ec],_0x5d6894),_0x2671ee['set'](_0x53006[_0x2a81ec],_0x5d6894)),_0x2a81ec++;}_0x2a81ec++;}}}}for(const _0x5cbac3 of _0x494c3c){const _0x15ae49=_0x5f5557['insertions'][_0x5cbac3];for(const _0x4747f6 of _0x15ae49){const _0x15b2fb=this['_getVidAttributeName'](_0x4747f6),_0x5dc080=_0x4747f6['item']['getAttribute'](_0x15b2fb);if(_0x1f3736['has'](_0x5dc080)){const _0x1e8559=_0x1f3736['get'](_0x5dc080);_0x376472['has'](_0x5dc080)||_0x376472['set'](_0x5dc080,{..._0x1e8559}),_0xfdab9f['set'](_0x5dc080,{..._0x1e8559});}}}for(const _0x8b17b0 of _0x376472['keys']())_0x8b17b0>=this['_startingRevisionId']&&_0x376472['delete'](_0x8b17b0);const _0x35de21=new Map();for(const _0x57fd33 of _0x494c3c){let _0x23a063=_0x5f5557['insertions'][_0x57fd33];for(const _0x4e6c1b of _0x23a063)if(_0x4e6c1b['item']['is']('element','tableCell')){const _0xfab6dd=this['_getVidAttributeName'](_0x4e6c1b),_0x10fffb=_0x4e6c1b['item']['getAttribute'](_0xfab6dd);if(_0xfdab9f['has'](_0x10fffb)){const _0x35f41f=_0x4e6c1b['item']['parent']['parent']['getAttribute']('vid_start'),_0x1b3330=_0xfdab9f['get'](_0x10fffb),_0x922395=_0x35de21['get'](_0x35f41f)||{'users':new Set(),'aiSource':null};_0x922395['users']['add'](_0x1b3330['userId']),_0x922395['aiSource']=_0x922395['aiSource']||_0x1b3330['aiSource']||null,_0x35de21['set'](_0x35f41f,_0x922395);}}_0x23a063=_0x5f5557['deletions'][_0x57fd33];for(const _0x272cba of _0x23a063)if(_0x272cba['item']['is']('element','tableCell')){const _0x29b771=this['_getVidAttributeName'](_0x272cba),_0x325151=_0x272cba['item']['getAttribute'](_0x29b771);if(_0x376472['has'](_0x325151)){const _0xc26e8a=_0x272cba['item']['parent']['parent']['getAttribute']('vid_start'),_0x52cc89=_0x376472['get'](_0x325151),_0x566866=_0x35de21['get'](_0xc26e8a)||{'users':new Set(),'aiSource':null};_0x566866['users']['add'](_0x52cc89['userId']),_0x566866['aiSource']=_0x566866['aiSource']||_0x52cc89['aiSource']||null,_0x35de21['set'](_0xc26e8a,_0x566866);}}for(const _0xd8500e of _0x35de21['keys']())(_0xfdab9f['has'](_0xd8500e)||_0x376472['has'](_0xd8500e))&&_0x35de21['delete'](_0xd8500e);}for(const _0x4cf2b3 of _0x494c3c){const _0x2421c7=_0x5f5557['insertions'][_0x4cf2b3];let _0x438d02=null,_0x1eb11c=null,_0x48d27b=null;for(const _0x50505e of _0x2421c7){const _0x1c4f31=this['_getVidAttributeName'](_0x50505e),_0xc0fdd8=_0x50505e['item']['getAttribute'](_0x1c4f31),_0x572036=_0x35de21['get'](_0xc0fdd8);if(_0x572036&&'elementStart'==_0x50505e['type']&&(_0x438d02=Array['from'](_0x572036['users'])[0x0],_0x1eb11c=_0x572036['aiSource'],_0x48d27b=_0x50505e['item']['getAttribute']('vid_end')),_0x438d02){const _0x40036c=_0x1eb11c||_0x376472['get'](_0xc0fdd8)?.['aiSource']||null,_0x46cb03=_0x1eb11c||_0xfdab9f['get'](_0xc0fdd8)?.['aiSource']||null;_0x376472['set'](_0xc0fdd8,{'userId':_0x438d02,'aiSource':_0x40036c}),_0xfdab9f['set'](_0xc0fdd8,{'userId':_0x438d02,'aiSource':_0x46cb03});}_0xc0fdd8==_0x48d27b&&(_0x438d02=null,_0x48d27b=null);}}const _0x52dd0a={},_0x6363da=new Set();for(const _0x130969 of _0x494c3c){const _0x22811c=_0x76f5d0['deletions'][_0x130969],_0x5cf67b=_0x76f5d0['insertions'][_0x130969];for(const {userId:_0xf8413f}of this['_touchedMarkers']['values']())null!==_0xf8413f&&_0x6363da['add'](_0xf8413f);for(const {userId:_0x3c95f5}of this['_touchedRoots']['values']())null!==_0x3c95f5&&_0x6363da['add'](_0x3c95f5);const _0x48ed25={};this['_markChanges'](_0x5cf67b,_0x5f5557['insertions'][_0x130969],_0xfdab9f,'insertion',_0x6363da,_0x48ed25),this['_markChanges'](_0x22811c,_0x5f5557['deletions'][_0x130969],_0x376472,'deletion',_0x6363da,_0x48ed25),this['_collectSuggestionAiSources'](_0x5cf67b,_0x48ed25),this['_collectSuggestionAiSources'](_0x22811c,_0x48ed25),_0x52dd0a[_0x130969]={'insertions':this['_prepareViewToSave'](_0x5cf67b),'deletions':this['_prepareViewToSave'](_0x22811c),'attachChange':this['_touchedRoots']['get'](_0x130969)||null,'attributesBefore':_0x2a6b9c(this['_baseRootsAttributes']['get'](_0x130969))||{},'attributesAfter':_0x2a6b9c(this['_diffRootsAttributes']['get'](_0x130969)),'rootElementName':_0x5d21ec['get'](_0x130969),'aiSources':_0x48ed25};}const _0x267942=Array['from'](_0xfdab9f['values']())['some'](_0x42f593=>!(!_0x42f593||!_0x42f593['aiSource']))||Array['from'](_0x376472['values']())['some'](_0x3db84b=>!(!_0x3db84b||!_0x3db84b['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x80e49c=>this['_aiTouchedMarkers']['has'](_0x80e49c));return{'diffData':_0x52dd0a,'authorsIds':Array['from'](_0x6363da),'hasAIChanges':_0x267942};}_collectSuggestionAiSources(_0xfd5b8f,_0x1e93e0){const _0x55a58b=_0xfd5b8f['markers'];for(const _0x2072d7 of _0x55a58b['keys']()){if(!_0x2072d7['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x2072d7))continue;const _0x43b40c=this['_aiTouchedMarkers']['get'](_0x2072d7);_0x43b40c&&(_0x1e93e0[_0x2072d7]=_0x43b40c);}}_processRootBeforeSave(_0x51bd1c){for(const [,_0x2b8c1b]of _0x51bd1c['markers']){const _0x41b245=_0x2b8c1b['start']['getAncestors']()['filter'](_0x347ed9=>'tableCell'==_0x347ed9['name']);for(const _0x214a8f of _0x41b245)0x1==_0x214a8f['childCount']&&_0x214a8f['getChild'](0x0)['is']('element','paragraph')&&_0x214a8f['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2a6e70){this['_processRootBeforeSave'](_0x2a6e70);const _0x57dc78=this['editor']['data']['toView'](_0x2a6e70,{}),_0x412bdf=Array['from'](_0x57dc78['getChildren']())['map'](_0x2e7b05=>this['_getViewJson'](_0x2e7b05));return JSON['stringify'](_0x412bdf);}_getViewJson(_0x28fc86){if(_0x28fc86['is']('$text'))return _0x28fc86['data'];{const _0x3f689e=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1a8b38=_0x28fc86,_0x38605b=this['editor']['data']['htmlProcessor']['domConverter'],_0x18e375={'type':_0x3f689e['_getTypeCharForViewElement'](_0x1a8b38),'name':_0x1a8b38['name'],'attributes':Array['from'](_0x1a8b38['getAttributes']()),'children':Array['from'](_0x1a8b38['getChildren']())['map'](_0x54166d=>this['_getViewJson'](_0x54166d))};if(_0x28fc86['is']('uiElement')&&'$comment'!=_0x28fc86['name']){const _0x3b8fb6=_0x28fc86['render'](_0x38605b['domDocument'],_0x38605b);_0x18e375['children']['push'](_0x3b8fb6['outerHTML']);}else{if(_0x28fc86['is']('rawElement')){const _0x20419e=_0x38605b['domDocument']['createElement'](_0x1a8b38['name']);_0x28fc86['render'](_0x20419e,_0x38605b),_0x18e375['children']['push'](_0x20419e['innerHTML']);}}const _0x4ae502=Array['from'](_0x1a8b38['getCustomProperties']());_0x4ae502['length']>0x0&&(_0x18e375['customProperties']=_0x4ae502);const _0x3bb997=_0x1a8b38['getFillerOffset']();return null!==_0x3bb997&&(_0x18e375['fillerOffset']=_0x3bb997),_0x18e375;}}['_markChanges'](_0x34804d,_0x280f7a,_0x458ac2,_0x309522,_0x42c3c2,_0x160171){let _0x1ef9ad=null,_0x3c2a35=null,_0x1ec524=0x0;const _0x592112=this['editor']['model'];for(let _0x5eb148=0x0;_0x5eb148<_0x280f7a['length'];_0x5eb148++){const _0x584167=this['_getVidAttributeName'](_0x280f7a[_0x5eb148]),_0x4c57a6=_0x280f7a[_0x5eb148]['item']['getAttribute'](_0x584167),_0x3bcebf=_0x458ac2['get'](_0x4c57a6),_0x53b45c=_0x5eb148==_0x280f7a['length']-0x1;!_0x1ef9ad&&_0x3bcebf&&(_0x1ef9ad=_0x3bcebf,_0x3c2a35=_0x280f7a[_0x5eb148]);const _0x22d882=!!_0x1ef9ad&&!!_0x3bcebf&&_0x3bcebf['userId']!=_0x1ef9ad['userId'],_0x5e329b=!!_0x1ef9ad&&!!_0x3bcebf&&_0x3bcebf['aiSource']!=_0x1ef9ad['aiSource'];_0x1ef9ad&&(!_0x3bcebf||_0x22d882||_0x5e329b)&&(_0x571f19(_0x3bcebf,Ot(_0x3c2a35,_0x34804d,_0x592112),Ot(_0x280f7a[_0x5eb148],_0x34804d,_0x592112)),_0x1ef9ad=_0x3bcebf||null,_0x3c2a35=_0x3bcebf?_0x280f7a[_0x5eb148]:null),_0x1ef9ad&&_0x53b45c&&_0x571f19(_0x3bcebf,Ot(_0x3c2a35,_0x34804d,_0x592112),Ct(_0x280f7a[_0x5eb148],_0x34804d,_0x592112));}function _0x571f19(_0x4d310b,_0x4afac9,_0xa06d21){const _0x1fecc1=_0x1ef9ad['userId'],_0x360288=_0x1ef9ad['aiSource'],_0x1b5898='revision:'+_0x309522+':'+_0x1fecc1+':'+_0x1ec524++,_0x2e8bef=_0x592112['createRange'](_0x4afac9,_0xa06d21);_0x34804d['markers']['set'](_0x1b5898,_0x2e8bef),_0x360288&&(_0x160171[_0x1b5898]=_0x360288),null!==_0x1fecc1&&_0x42c3c2['add'](_0x1fecc1);}}_getVidAttributeName(_0x235558){switch(_0x235558['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x4c0e81){const _0x1e52b2=this['_idsRoots']['get'](_0x4c0e81['position']['root']['rootName']),_0x5ef444=_0xe182ed(_0x4c0e81['position'],_0x1e52b2),_0x1b85db=null===_0x4c0e81['_authorId']?null:_0x4c0e81['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2e8750=_0x4c0e81['_aiSource']||null,_0xc837b5=_0x5ef444['parent'],_0x29642e=this['_revisionId'],_0x4be962=[];for(const _0x45df8f of _0x4c0e81['nodes'])if(_0x45df8f['is']('element'))_0x4be962['push'](this['_makeIdsRoot'](_0x45df8f));else{for(let _0x5a0d89=0x0;_0x5a0d89<_0x45df8f['offsetSize'];_0x5a0d89++)_0x4be962['push'](new _0xd26162('$text',{'vid':this['_revisionId']++}));}const _0x1a89da=this['_revisionId'];for(let _0x4a7ee0=_0x29642e;_0x4a7ee0<_0x1a89da;_0x4a7ee0++)this['_touched']['set'](_0x4a7ee0,{'userId':_0x1b85db,'aiSource':_0x2e8750});_0xc837b5['_insertChild'](_0x5ef444['offset'],_0x4be962);}_setTouched(_0x4a26d2,_0x142dc7,_0x44486c){this['_touched']['set'](_0x4a26d2,{'userId':_0x142dc7,'aiSource':_0x44486c||this['_touched']['get'](_0x4a26d2)?.['aiSource']||null});}_handleMoveOperation(_0x451605){(_0x451605=this['_cloneOperation'](_0x451605,this['_idsRoots']))['_execute']();const _0x2db5f7=null===_0x451605['_authorId']?null:_0x451605['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3997fd=_0x451605['_aiSource']||null,_0x7f99c8=_0x451605['getMovedRangeStart'](),_0x48ab10=_0x7f99c8['parent'],_0x4310d6=_0x7f99c8['offset'],_0x11f98c=(_0x5e5dd1,_0xbf471c,_0x5abc6e)=>{for(let _0x4b6d00=_0xbf471c;_0x4b6d00<_0x5abc6e;_0x4b6d00++){const _0xcce8e7=_0x5e5dd1['getChild'](_0x4b6d00);_0xcce8e7['is']('element','$text')?this['_setTouched'](_0xcce8e7['getAttribute']('vid'),_0x2db5f7,_0x3997fd):(this['_setTouched'](_0xcce8e7['getAttribute']('vid_start'),_0x2db5f7,_0x3997fd),_0x11f98c(_0xcce8e7,0x0,_0xcce8e7['childCount']),this['_setTouched'](_0xcce8e7['getAttribute']('vid_end'),_0x2db5f7,_0x3997fd));}};_0x11f98c(_0x48ab10,_0x4310d6,_0x4310d6+_0x451605['howMany']);}_handleMergeOperation(_0x38de15){const _0x3280dc=null===(_0x38de15=this['_cloneOperation'](_0x38de15,this['_idsRoots']))['_authorId']?null:_0x38de15['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4e66bd=_0x38de15['_aiSource']||null,_0x588bd8=_0x38de15['targetPosition']['parent'],_0x361948=_0x38de15['sourcePosition']['parent'],_0x56951d=_0x588bd8['getAttribute']('vid_end'),_0x437dd5=_0x361948['getAttribute']('vid_start');_0x588bd8['_setAttribute']('vid_end',_0x361948['getAttribute']('vid_end')),_0x361948['_setAttribute']('vid_end',_0x56951d),this['_setTouched'](_0x437dd5,_0x3280dc,_0x4e66bd),this['_setTouched'](_0x56951d,_0x3280dc,_0x4e66bd),_0x38de15['_execute']();}_handleSplitOperation(_0xf97127){const _0x1c01bf=null===(_0xf97127=this['_cloneOperation'](_0xf97127,this['_idsRoots']))['_authorId']?null:_0xf97127['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a49d3=_0xf97127['_aiSource']||null,_0x507f44=_0xf97127['graveyardPosition'],_0x3f05a3=_0xf97127['splitPosition']['parent'];_0xf97127['_execute']();const _0x4226c9=_0x3f05a3['getAttribute']('vid_end'),_0xde9c76=_0xf97127['insertionPosition']['nodeAfter'];if(_0x507f44){const _0x157c1f=_0xde9c76['getAttribute']('vid_end'),_0x1af68b=_0x3f05a3['getAttribute']('vid_end');_0x3f05a3['_setAttribute']('vid_end',_0x157c1f),_0xde9c76['_setAttribute']('vid_end',_0x1af68b),this['_setTouched'](_0x3f05a3['getAttribute']('vid_end'),_0x1c01bf,_0x4a49d3),this['_setTouched'](_0xde9c76['getAttribute']('vid_start'),_0x1c01bf,_0x4a49d3);}else{const _0x1512f6=this['_revisionId']++,_0x4d8335=this['_revisionId']++;_0x3f05a3['_setAttribute']('vid_end',_0x1512f6),_0xde9c76['_setAttribute']('vid_start',_0x4d8335),_0xde9c76['_setAttribute']('vid_end',_0x4226c9),this['_setTouched'](_0x1512f6,_0x1c01bf,_0x4a49d3),this['_setTouched'](_0x4d8335,_0x1c01bf,_0x4a49d3);}}_handleMarkerOperation(_0x493a6c){if(!_0x493a6c['affectsData'])return;const _0x185d2a=(_0x493a6c=this['_cloneOperation'](_0x493a6c,this['_diffRoots']))['oldRange']?_0x493a6c['oldRange']['root']:null,_0x2e36f8=_0x493a6c['newRange']?_0x493a6c['newRange']['root']:null;_0x185d2a&&this['_markers']['delete'](_0x493a6c['name']),_0x2e36f8&&this['_markers']['set'](_0x493a6c['name'],_0x493a6c['newRange']['clone']());const _0x229e90=null===_0x493a6c['_authorId']?null:_0x493a6c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x59666b=_0x493a6c['name'];if(_0x493a6c['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x59666b,_0x493a6c['_aiSource']),!this['_touchedMarkers']['has'](_0x59666b))return void this['_touchedMarkers']['set'](_0x59666b,{'range':_0x493a6c['oldRange'],'userId':_0x229e90});const _0x53fd97=this['_touchedMarkers']['get'](_0x59666b),_0x1c8915=_0x53fd97['range'],_0x2599f5=_0x493a6c['newRange'];null==_0x1c8915&&null==_0x2599f5||_0x1c8915&&_0x2599f5&&_0x1c8915['isEqual'](_0x2599f5)?this['_touchedMarkers']['delete'](_0x493a6c['name']):_0x53fd97['userId']=_0x229e90;}_handleRootOperation(_0x2e6bad,_0x59f49a){this['_diffRoots']['has'](_0x2e6bad['rootName'])?this['_diffRoots']['get'](_0x2e6bad['rootName'])['_isAttached']=_0x2e6bad['isAdd']:(this['_diffRoots']['set'](_0x2e6bad['rootName'],Et(_0x2e6bad['rootName'],_0x2e6bad['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x2e6bad['rootName'],{}),_0x59f49a&&this['_idsRoots']['set'](_0x2e6bad['rootName'],Et(_0x2e6bad['rootName'],_0x2e6bad['elementName'],!0x0)));const _0x1cb43c=null===_0x2e6bad['_authorId']?null:_0x2e6bad['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x36b862=this['_touchedRoots']['get'](_0x2e6bad['rootName']);_0x36b862&&_0x36b862['userId']===_0x1cb43c?this['_touchedRoots']['delete'](_0x2e6bad['rootName']):this['_touchedRoots']['set'](_0x2e6bad['rootName'],{'userId':_0x1cb43c,'isAttached':_0x2e6bad['isAdd']});}_handleRootAttributeOperation(_0x4c8b70){const _0x22a853=this['_diffRootsAttributes']['get'](_0x4c8b70['root']['rootName']);null===_0x4c8b70['newValue']?delete _0x22a853[_0x4c8b70['key']]:_0x22a853[_0x4c8b70['key']]=_0x4c8b70['newValue'];}};function St(_0x3ab282){const _0x4a6c0a=Et(_0x3ab282['rootName'],_0x3ab282['name'],_0x3ab282['isAttached']());for(const _0xb47d0b of _0x3ab282['getChildren']()){const _0x5bf2eb=_0xb47d0b['_clone'](!0x0);_0x4a6c0a['_appendChild'](_0x5bf2eb);}return _0x4a6c0a;}function Et(_0x18ae19,_0x57241f,_0x33e381=!0x0){const _0x8bda8d=new _0x2f3aa9();return _0x8bda8d['rootName']=_0x18ae19,_0x8bda8d['name']=_0x57241f,_0x8bda8d['_isAttached']=_0x33e381,_0x8bda8d['isAttached']=()=>_0x8bda8d['_isAttached'],_0x8bda8d;}function Ot(_0x2b102f,_0x56f741,_0x2aba92){const _0x1c09d2='elementEnd'==_0x2b102f['type']?_0x2aba92['createPositionAt'](_0x2b102f['item'],'end'):_0x2aba92['createPositionBefore'](_0x2b102f['item']);return _0x2aba92['createPositionFromPath'](_0x56f741,_0x1c09d2['path'],_0x1c09d2['stickiness']);}function Ct(_0x5917a1,_0x167a1e,_0x20c685){const _0x3ba1ee='elementStart'==_0x5917a1['type']?_0x20c685['createPositionAt'](_0x5917a1['item'],0x0):_0x20c685['createPositionAfter'](_0x5917a1['item']);return _0x20c685['createPositionFromPath'](_0x167a1e,_0x3ba1ee['path'],_0x3ba1ee['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x14df5a(dt);var xt=class extends Nt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x4f3fd5,_0x3f242c){super(_0x4f3fd5),this['focusTracker']=new _0x4ac1dc(),this['keystrokes']=new _0xddd25(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3f242c),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_t({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x2cff61=_0x853d75=>_0x853d75['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2cff61),this['keystrokes']['set']('arrowleft',_0x2cff61),this['keystrokes']['set']('arrowup',_0x2cff61),this['keystrokes']['set']('arrowdown',_0x2cff61);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x24b59d){this['revisionNameInputView']['fieldView']['element']['value']=_0x24b59d['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x1181f4){const _0x4cd232=new it(this['locale'],gt),_0x13d379=_0x4cd232['fieldView'];_0x13d379['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x55edee=kt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x1181f4&&(_0x55edee+='\x20('+kt(this['locale'],'optional')+')'),(_0x4cd232['label']=_0x55edee,_0x13d379['on']('input',()=>{this['revisionNameInputValue']=_0x13d379['element']['value']['trim']();}),_0x4cd232);}},Dt=class extends _0x372c9a{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At];}['_saveRevisionFormView'];init(){const _0x10fa8b=this['editor'],_0x2dc877=_0x10fa8b['plugins']['get']('RevisionTracker');_0x10fa8b['ui']['componentFactory']['add']('revisionHistory',_0x52321d=>{const _0x24f7d3=vt(_0x52321d),_0x1d573c=_0x24f7d3['panelView']['children'],_0x134a8d=new st(_0x52321d),_0x346cbb=new et(_0x52321d),_0xdd6588=this['_createSaveRevisionButton'](_0x5c3bd6),_0x87cc44=new et(_0x52321d),_0x3c9cd3=this['_createOpenRevisionButton'](_0x5c3bd6);return _0x24f7d3['bind']('isEnabled')['to'](_0x2dc877,'isReady',_0x2dc877,'isEnabled',_0x10fa8b,'isReadOnly',(_0x4f58e8,_0x1b857e,_0x5d38a6)=>_0x4f58e8&&_0x1b857e&&!_0x5d38a6),_0x24f7d3['buttonView']['set']({'icon':_0x58846a,'label':kt(_0x52321d,'Revision\x20history'),'tooltip':!0x0}),_0xdd6588['set']({'withText':!0x0,'role':'menuitem'}),_0x3c9cd3['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x3c9cd3,'execute',()=>{_0x24f7d3['isOpen']=!0x1,_0x10fa8b['editing']['view']['focus']();},{'priority':'low'}),_0x346cbb['children']['add'](_0xdd6588),_0x87cc44['children']['add'](_0x3c9cd3),_0x134a8d['role']='menu',_0x134a8d['items']['addMany']([_0x346cbb,_0x87cc44]),_0x1d573c['add'](_0x134a8d),_0x24f7d3;}),_0x10fa8b['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x221dc0=this['editor'],_0x4358b8=_0x221dc0['locale'],_0x2b7366=_0x221dc0['plugins']['get']('RevisionTracker'),_0x39d071=new at(_0x4358b8),_0x4ba35c=new rt(_0x4358b8);_0x39d071['bind']('isEnabled')['to'](_0x2b7366,'isReady',_0x2b7366,'isEnabled',_0x221dc0,'isReadOnly',(_0xb423cd,_0x3370e9,_0x487941)=>_0xb423cd&&_0x3370e9&&!_0x487941),_0x39d071['buttonView']['set']({'icon':_0x58846a,'label':kt(_0x4358b8,'Revision\x20history')});const _0x37f8fc=new ot(_0x4358b8,_0x39d071),_0x5cc886=this['_createSaveRevisionButton'](nt);_0x5cc886['delegate']('execute')['to'](_0x39d071),_0x37f8fc['children']['add'](_0x5cc886),_0x4ba35c['items']['add'](_0x37f8fc);const _0x1574c=new ot(_0x4358b8,_0x39d071),_0x4e89b4=this['_createOpenRevisionButton'](nt);return _0x4e89b4['delegate']('execute')['to'](_0x39d071),_0x1574c['children']['add'](_0x4e89b4),_0x4ba35c['items']['add'](_0x1574c),_0x39d071['panelView']['children']['add'](_0x4ba35c),_0x39d071;}_createSaveRevisionButton(_0x2e91c6){const _0x5bcdf5=this['editor'],_0x723a5=_0x5bcdf5['plugins']['get']('RevisionTracker'),_0xcdd811=new _0x2e91c6(_0x5bcdf5['locale']);return _0xcdd811['set']({'label':kt(_0x5bcdf5['locale'],'Save\x20current\x20revision')}),_0xcdd811['bind']('isEnabled')['to'](_0x723a5,'isReady',_0x723a5,'isEnabled',_0x5bcdf5,'isReadOnly',(_0x675039,_0x9da677,_0x420e6d)=>_0x675039&&_0x9da677&&!_0x420e6d),this['listenTo'](_0xcdd811,'execute',()=>{this['_showDialog']();}),_0xcdd811;}_createOpenRevisionButton(_0x5575a1){const _0x17142f=this['editor'],_0x1f71ff=_0x17142f['plugins']['get']('RevisionTracker'),_0x599bf7=new _0x5575a1(_0x17142f['locale']);return _0x599bf7['set']({'label':kt(_0x17142f['locale'],'Open\x20revision\x20history')}),_0x599bf7['bind']('isEnabled')['to'](_0x1f71ff,'isReady',_0x17142f,'isReadOnly',(_0x21bdc4,_0x2eb28b)=>_0x21bdc4&&!_0x2eb28b),this['listenTo'](_0x599bf7,'execute',()=>{_0x17142f['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x599bf7;}['_showDialog'](){const _0x4bccc7=this['editor'],_0x32a91b=_0x4bccc7['locale'],_0x38d742=_0x4bccc7['plugins']['get']('Dialog'),_0x52ccbc=_0x4bccc7['plugins']['get']('RevisionTracker');function _0x2c2388(_0x5d1b75){_0x4bccc7['config']['get']('revisionHistory.requireRevisionName')&&''===_0x5d1b75['revisionName']?_0x5d1b75['revisionNameInputView']['errorText']=kt(_0x32a91b,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4bccc7['plugins']['get'](At)['saveRevision']({'name':_0x5d1b75['revisionName']}),_0x38d742['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x2c2388(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x38d742['show']({'id':'revisionSave','title':kt(_0x32a91b,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':kt(_0x4bccc7['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x38d742['hide']()},{'label':kt(_0x4bccc7['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3dc104){_0x3dc104['bind']('isEnabled')['to'](_0x52ccbc,'isReady',_0x52ccbc,'isEnabled',_0x4bccc7,'isReadOnly',(_0x19d859,_0x37d7a9,_0x1ffb0a)=>_0x19d859&&_0x37d7a9&&!_0x1ffb0a);},'onExecute':()=>_0x2c2388(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x3f3ac0=this['editor'],_0x1c9659=_0x3f3ac0['locale'];this['_saveRevisionFormView']=new xt(_0x1c9659,_0x3f3ac0['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Vt=class extends dt{['changeId'];['_model'];constructor(_0x199d54,_0x400a3d,_0x44fb2a=!0x1){super(_0x199d54),this['_model']=_0x400a3d,this['changeId']=_0x400a3d['id'];const _0x4b43c4=this['bindTemplate'],_0x4a31e1=_0x44fb2a&&!!_0x400a3d['data']['aiSource'],_0x349845=_0x4a31e1?this['_createAiIconView'](_0x199d54):null;this['set']('type',_0x400a3d['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4b43c4['to']('type',_0x458c78=>'ck-revision-change__'+_0x458c78),..._0x4a31e1?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x4a31e1?[this['_createAiDescriptionView'](_0x199d54,_0x400a3d),_0x349845]:this['_getDescriptionChildren'](_0x199d54,_0x400a3d)}]});}_getDescriptionChildren(_0x552fa0,_0x58db39){let _0x3feb3e='Removed\x20by';return _0x58db39['data']['isSuggestion']?_0x3feb3e='Suggested\x20by':'add'==_0x58db39['type']&&(_0x3feb3e='Added\x20by'),[this['_createLabel'](kt(_0x552fa0,_0x3feb3e)),{'text':'\x20'+_0x58db39['author']['name']}];}_createAiDescriptionView(_0x1a53e8,_0x2c00fd){let _0x333f74='AI_SOURCE_REMOVED_BY';_0x2c00fd['data']['isSuggestion']?_0x333f74='AI_SOURCE_SUGGESTED_BY':'add'==_0x2c00fd['type']&&(_0x333f74='AI_SOURCE_ADDED_BY');const _0x21c5c6=new dt(_0x1a53e8);return _0x21c5c6['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0x21c5c6['render'](),_0x21c5c6['element']['innerHTML']=_0x4cde8c(kt(_0x1a53e8,_0x333f74,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+kt(_0x1a53e8,'AI_SOURCE_AI')+'</span>'])),_0x21c5c6['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x2c00fd['author']['name'],_0x21c5c6;}_createLabel(_0x9adfa9){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x9adfa9}]};}_createAiIconView(_0x3c7475){const _0x269ece=new _0x51d124();return _0x269ece['content']=_0x37a00,_0x269ece['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':kt(_0x3c7475,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x269ece;}['focus'](){this['element']['focus']();}};const Tt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x392707();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0xfad8fd){super(),this['id']=_0xfad8fd['id']||_0x2cb4ed(),this['author']=_0xfad8fd['author'],this['type']=_0xfad8fd['type'],this['data']=_0xfad8fd['data']||{},this['rootName']=_0xfad8fd['rootName'],this['set']('createdAt',_0xfad8fd['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xdec2bc,_0x192b33){this['newRevisionId']=_0xdec2bc,this['oldRevisionId']=_0x192b33,this['changes']=new _0x58c1b7();}_setChanges(_0x191ea2){for(const _0x3ff1f5 of _0x191ea2)this['changes']['add'](_0x3ff1f5);}},Pt=class extends _0x372c9a{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[_0x4db7e9,_0x2c4323,bt,Rt];}constructor(_0x4ff84b){super(_0x4ff84b),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',(_0x374574,_0x3ea13d,_0x19f881)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4e61da=>{for(const _0x5af20b of this['editor']['editing']['view']['document']['roots'])_0x19f881?_0x4e61da['removeClass']('ck-editor__editable__overlay',_0x5af20b):_0x4e61da['addClass']('ck-editor__editable__overlay',_0x5af20b);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4f0e65=>null!==_0x4f0e65),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x55d29c,_0x3686f5,_0x40c695)=>_0x55d29c&&_0x40c695?_0x3686f5['changes']['getIndex'](_0x40c695):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1267c2,_0x38e005)=>_0x1267c2?_0x38e005['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x2c4323),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x4df453=this['editor'],_0x3f24fb=new $t(_0x4df453,{'direction':'backward'}),_0x4faebd=new $t(_0x4df453,{'direction':'forward'});_0x4df453['commands']['add']('showPreviousChange',_0x3f24fb),_0x4df453['commands']['add']('showNextChange',_0x4faebd),_0x4df453['commands']['add']('restoreRevision',new Ft(_0x4df453)),this['on']('change:numberOfChanges',()=>{_0x3f24fb['refresh'](),_0x4faebd['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4df453['enableReadOnlyMode']('revision-viewer'),_0x4df453['plugins']['has']('WidgetToolbarRepository')&&_0x4df453['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x2bf4cc){return await this['_utils']['loadRevisionData'](_0x2bf4cc,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2bf4cc);}async getRevisionRootsAttributes(_0x1a3b92){return await this['_utils']['loadRevisionData'](_0x1a3b92,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1a3b92);}async['compare'](_0x18059b,_0x3799e1,_0x2a41d0=!0x1){if(!this['isEnabled'])return;const _0x754508=this['diff'],_0x3efae0=this['repository'],_0x3a834d='string'==typeof _0x18059b?_0x3efae0['getRevision'](_0x18059b):_0x18059b,_0x217d49='string'==typeof _0x3799e1?_0x3efae0['getRevision'](_0x3799e1):_0x3799e1,_0xde8607=_0x3a834d['id'],_0x259e60=_0x217d49?_0x217d49['id']:null;if(!_0x2a41d0&&this['diff']&&this['diff']['newRevisionId']===_0xde8607&&this['diff']['oldRevisionId']===_0x259e60)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0xde8607,_0x259e60);const _0x1f2898=this['_getRevisionsRange'](_0x3a834d,_0x217d49,!0x0)['map'](_0x252ae2=>this['_utils']['loadRevisionData'](_0x252ae2,this['adapter']));return _0x1f2898['push'](new Promise(_0x30e8a3=>{setTimeout(_0x30e8a3,0x14);})),Promise['all'](_0x1f2898)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2d1aae=this['_getDiff'](_0xde8607,_0x259e60);this['_cleanUpCommentMarkers'](_0x2d1aae);for(const _0x4cf75d of _0x2d1aae['changes'])this['_changeIdToChange']['set'](_0x4cf75d['id'],_0x4cf75d);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x579e42=>{for(const _0x9d5116 of this['editor']['model']['document']['getRootNames']())_0x579e42['detachRoot'](_0x9d5116);for(const _0x32022a of Object['keys'](_0x2d1aae['model'])){const _0x1bf29d=_0x2d1aae['model'][_0x32022a]['name'],_0x5c3610=_0x579e42['addRoot'](_0x32022a,_0x1bf29d);for(const _0x319c08 of Object['keys'](_0x2d1aae['attributes'][_0x32022a]))_0x579e42['setAttribute'](_0x319c08,_0x2d1aae['attributes'][_0x32022a][_0x319c08],_0x5c3610);_0x579e42['insert'](_0x2d1aae['model'][_0x32022a],_0x5c3610,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2d1aae['changes'])),this['isReady']=!0x0;})['catch'](_0x36e27e=>{console['error'](_0x36e27e),this['_cleanUp'](),_0x754508&&(this['diff']=_0x754508),this['isReady']=!0x0;});}addRevisionData(_0x2fa7b6,_0x1b8580){const _0x2355c4=this['repository']['createRevision'](_0x2fa7b6);return _0x2355c4['on']('_update',(_0x2b3eaa,_0x136f27,_0x77c015)=>_0x1b8580(_0x136f27,_0x77c015,_0x2355c4)),this['repository']['addRevision'](_0x2355c4),_0x2355c4;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3eb725=>{for(const _0x406c3e of this['editor']['model']['document']['getRootNames']())_0x3eb725['detachRoot'](_0x406c3e);});}_cleanUpCommentMarkers(_0x4b5e36){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x3cf95e=this['_getVisibleCommentThreadIds']();for(const _0x16a33a of Object['values'](_0x4b5e36['model']))for(const _0x4b9eb9 of Array['from'](_0x16a33a['markers']['keys']()))_0x4b9eb9['startsWith']('revision-comment:')&&!_0x3cf95e['has'](Ut(_0x4b9eb9))&&_0x16a33a['markers']['delete'](_0x4b9eb9);}_sortAndFilterDiffChanges(_0x4a0baf){const _0x442df5=[],_0x4d0333=new Map();for(const _0x574944 of this['editor']['model']['document']['getRootNames']()){const _0x2ff2a7=this['editor']['editing']['view']['getDomRoot'](_0x574944);if(!_0x2ff2a7)continue;const _0x4438e0=_0x2ff2a7['getClientRects']()['item'](0x0);_0x4438e0&&(_0x442df5['push'](_0x574944),_0x4d0333['set'](_0x574944,_0x4438e0));}return _0x442df5['sort']((_0x2718bc,_0x393346)=>{const _0x55af15=_0x4d0333['get'](_0x2718bc),_0x11aab0=_0x4d0333['get'](_0x393346);return _0x55af15['y']-_0x11aab0['y']||_0x55af15['x']-_0x11aab0['x'];}),(_0x4a0baf=_0x4a0baf['filter'](_0x2fa993=>_0x442df5['includes'](_0x2fa993['rootName'])))['sort']((_0x18e100,_0x10bc60)=>_0x442df5['indexOf'](_0x18e100['rootName'])-_0x442df5['indexOf'](_0x10bc60['rootName'])),_0x4a0baf;}['_makeTape'](_0x4ca413,_0x5cf9b3={}){const _0x291bf9=Array['from'](_0x4ca413['markers'])['filter'](([_0x79250b,_0x1f25fc])=>_0x79250b['startsWith']('revision:')&&!_0x1f25fc['isCollapsed']),_0x338542=Array['from'](this['editor']['model']['createRangeIn'](_0x4ca413)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x291bf9['length'])for(const _0x170d31 of _0x338542){const [_0x1f9a21,_0x363146]=_0x291bf9[0x0],[,_0x2e47ef,_0x3b056a]=_0x1f9a21['split'](':'),_0x51dec6=_0x5cf9b3[_0x1f9a21]||null;if(_0x363146['end']['isEqual'](_0x170d31['nextPosition'])&&_0x291bf9['shift'](),(_0x170d31['previousPosition']['isEqual'](_0x363146['start'])||_0x170d31['previousPosition']['isAfter'](_0x363146['start']))&&('insertion'==_0x2e47ef?_0x170d31['isAdded']={'userId':_0x3b056a,'aiSource':_0x51dec6}:'deletion'==_0x2e47ef&&(_0x170d31['isRemoved']={'userId':_0x3b056a,'aiSource':_0x51dec6})),0x0==_0x291bf9['length'])break;}return _0x338542;}_refreshStartEndIndex(_0x3c34f7){const _0x24117b=new Map();for(let _0x4c7bb2=0x0;_0x4c7bb2<_0x3c34f7['length'];_0x4c7bb2++)'text'===_0x3c34f7[_0x4c7bb2]['type']?(_0x3c34f7[_0x4c7bb2]['item']['startIndex']=_0x4c7bb2,_0x3c34f7[_0x4c7bb2]['item']['endIndex']=_0x4c7bb2):('elementStart'===_0x3c34f7[_0x4c7bb2]['type']?_0x3c34f7[_0x4c7bb2]['item']['startIndex']=_0x4c7bb2:'elementEnd'===_0x3c34f7[_0x4c7bb2]['type']&&(_0x3c34f7[_0x4c7bb2]['item']['endIndex']=_0x4c7bb2),_0x24117b['set'](_0x3c34f7[_0x4c7bb2]['id'],_0x4c7bb2));for(const _0x1b7e2f of _0x24117b['values']())'elementStart'===_0x3c34f7[_0x1b7e2f]['type']?_0x3c34f7[_0x1b7e2f]['item']['endIndex']=_0x24117b['get'](_0x3c34f7[_0x1b7e2f]['pairId']):'elementEnd'===_0x3c34f7[_0x1b7e2f]['type']&&(_0x3c34f7[_0x1b7e2f]['item']['startIndex']=_0x24117b['get'](_0x3c34f7[_0x1b7e2f]['pairId']));}['_processTape'](_0x366bd4){for(let _0x1921e4=0x0;_0x1921e4<_0x366bd4['length'];_0x1921e4++){if('elementStart'===_0x366bd4[_0x1921e4]['type'])_0x366bd4[_0x1921e4]['item']['startIndex']=_0x1921e4;else{if('elementEnd'===_0x366bd4[_0x1921e4]['type']){_0x366bd4[_0x1921e4]['item']['endIndex']=_0x1921e4;const _0x2caf2c=_0x366bd4[_0x1921e4]['item']['startIndex'];_0x366bd4[_0x2caf2c]['pairId']=_0x366bd4[_0x1921e4]['id'],_0x366bd4[_0x1921e4]['pairId']=_0x366bd4[_0x2caf2c]['id'];}else _0x366bd4[_0x1921e4]['item']['startIndex']=_0x1921e4,_0x366bd4[_0x1921e4]['item']['endIndex']=_0x1921e4,_0x366bd4[_0x1921e4]['pairId']=null;}_0x366bd4[_0x1921e4]['markersStart']||(_0x366bd4[_0x1921e4]['markersStart']=[],_0x366bd4[_0x1921e4]['markersEnd']=[]);}}_markInsertions(_0x4a0ad2,_0x5219c7){const _0x4082a2=_0x4a0ad2['filter'](_0x58755b=>!_0x58755b['isAdded']);for(let _0x386ca5=0x0;_0x386ca5<_0x5219c7['length'];_0x386ca5++)_0x5219c7[_0x386ca5]['isAdded']&&(_0x4082a2[_0x386ca5]['isAdded']=_0x5219c7[_0x386ca5]['isAdded']);}_getDiff(_0xe4b2bc,_0x4164e8=null){const _0x5c9405=this['repository']['getRevision'](_0xe4b2bc),_0x316cf1=_0x4164e8?this['repository']['getRevision'](_0x4164e8):null,_0x5cd16f=this['_getRevisionsRange'](_0x5c9405,_0x316cf1),_0x23545c=_0x5cd16f[_0x5cd16f['length']-0x1],_0x1419c0=new Map(),_0x7fbc09={'model':{},'attributes':{},'changes':[]},_0x4c3841=new Set(),_0x2cdc23=new Map();for(let _0x1064a0=_0x5cd16f['length']-0x1;_0x1064a0>=0x0;_0x1064a0--){const _0xc473b4=_0x5cd16f[_0x1064a0];for(const _0x5c6bf6 of Object['keys'](_0xc473b4['diffData']))if(_0xc473b4['diffData'][_0x5c6bf6]['attachChange']){const _0x22f172=_0xc473b4['diffData'][_0x5c6bf6]['attachChange'];_0x22f172['isAttached']?(_0x4c3841['add'](_0x5c6bf6),_0x2cdc23['has'](_0x5c6bf6)&&_0x2cdc23['get'](_0x5c6bf6)['userId']==_0x22f172['userId']?_0x2cdc23['delete'](_0x5c6bf6):_0x2cdc23['set'](_0x5c6bf6,_0x22f172)):_0x2cdc23['has'](_0x5c6bf6)?(_0x4c3841['delete'](_0x5c6bf6),_0x2cdc23['delete'](_0x5c6bf6)):(_0x4c3841['add'](_0x5c6bf6),_0x2cdc23['set'](_0x5c6bf6,_0x22f172));}else _0x4c3841['add'](_0x5c6bf6);}for(const _0x25aeeb of _0x4c3841){const _0x21fc02=_0x2cdc23['has'](_0x25aeeb)&&!_0x2cdc23['get'](_0x25aeeb)['isAttached'];let _0x281bca=_0x21fc02?_0x5cd16f['length']-0x1:0x0;const _0x511353=_0x21fc02?-0x1:0x1;for(;_0x5cd16f[_0x281bca];){const _0x48b0c2=_0x5cd16f[_0x281bca];if(_0x48b0c2['diffData'][_0x25aeeb]){const _0x2f1974=_0x21fc02?_0x48b0c2['diffData'][_0x25aeeb]['attributesBefore']:_0x48b0c2['diffData'][_0x25aeeb]['attributesAfter'];_0x7fbc09['attributes'][_0x25aeeb]=_0x2f1974?_0x2a6b9c(_0x2f1974):{};break;}_0x281bca+=_0x511353;}}for(const _0x15991f of _0x5cd16f){_0x15991f['model']={};for(const _0x2ae638 of _0x15991f['authors'])_0x1419c0['set'](_0x2ae638['id'],_0x2ae638);for(const _0x10d0fd of _0x4c3841){const _0x247e8d=_0x15991f['diffData'][_0x10d0fd]?_0x15991f['diffData'][_0x10d0fd]['insertions']:'[]',_0x2113c3=_0x15991f['diffData'][_0x10d0fd]?_0x15991f['diffData'][_0x10d0fd]['deletions']:'[]',_0xb8d87=_0x15991f['diffData'][_0x10d0fd]?.['rootElementName']||'$root';_0x15991f['model'][_0x10d0fd]={'insertions':this['_utils']['_makeModelFromViewString'](_0x247e8d,_0xb8d87),'deletions':this['_utils']['_makeModelFromViewString'](_0x2113c3,_0xb8d87)};}}for(const _0x378ad7 of _0x4c3841){let _0x2e7449=null,_0x79c21f=0x0;const _0x56a8be=_0x5cd16f['map'](_0x4b0cd6=>_0x4b0cd6['diffData'][_0x378ad7]?.['rootElementName'])['find'](_0x3e5e38=>void 0x0!==_0x3e5e38)||'$root',_0x2a6ff6=new Map(Array['from'](_0x5c9405['model'][_0x378ad7]['insertions']['markers'])['filter'](([_0x102c28])=>!_0x102c28['startsWith']('revision:')));let _0x220564=0x0;for(const _0x2818b0 of _0x5cd16f){const _0xe6ac45=_0x2818b0['diffData'][_0x378ad7]?.['aiSources']||{},_0x583e67=this['_makeTape'](_0x2818b0['model'][_0x378ad7]['insertions'],_0xe6ac45);_0x2818b0==_0x5c9405?(_0x2e7449=_0x583e67,_0x79c21f=_0x2e7449['length'],_0x2e7449['forEach'](_0x3cb736=>{_0x3cb736['id']=_0x220564++;}),this['_processTape'](_0x2e7449)):this['_markInsertions'](_0x2e7449,_0x583e67);const _0x5f4120=_0x2e7449['filter'](_0x20bb4f=>!_0x20bb4f['isAdded'])['map'](_0x160a86=>_0x160a86['id']);let _0x4d4c42=0x0;const _0xd9fef0=this['_makeTape'](_0x2818b0['model'][_0x378ad7]['deletions'],_0xe6ac45);_0xd9fef0['forEach'](_0x1cb59=>{_0x1cb59['isRemoved']?_0x1cb59['id']=_0x79c21f++:_0x1cb59['id']=_0x5f4120[_0x4d4c42++];}),this['_processTape'](_0xd9fef0),this['_setDistance'](_0x2e7449,'isAdded'),this['_setDistance'](_0xd9fef0,'isRemoved'),_0x2818b0==_0x5c9405&&this['_markMarkers'](_0x2e7449,_0x2a6ff6),_0x2e7449=this['_joinTapes'](_0x2e7449,_0xd9fef0),this['_refreshStartEndIndex'](_0x2e7449),this['_setDistance'](_0x2e7449,'isRemoved');}_0x2e7449=_0x2e7449['filter'](_0x19317e=>!(_0x19317e['isAdded']&&_0x19317e['isRemoved']));const _0x402142=new Map(_0x23545c['model'][_0x378ad7]['deletions']['markers']),_0xca1758=new Set(_0x2a6ff6['keys']());for(const _0xd4c045 of _0x402142['keys']())_0xca1758['delete'](_0xd4c045);const _0x1d5cd8=Object['assign']({},..._0x5cd16f['map'](_0x358443=>_0x358443['diffData'][_0x378ad7]?.['aiSources']));this['_markSuggestions'](_0x2e7449,_0xca1758,_0x1d5cd8),this['_fixObsoleteTags'](_0x2e7449),_0x2e7449=this['_removeMissingPairs'](_0x2e7449),_0x2e7449=this['_markMismatchedRemovedTags'](_0x2e7449),_0x2e7449=this['_removeUnsupportedChanges'](_0x2e7449);const {root:_0x2f4884,changes:_0x278169}=this['_makeModelFromTape'](_0x2e7449,_0x1419c0,_0x378ad7,_0x56a8be);_0x7fbc09['model'][_0x378ad7]=_0x2f4884;const _0x1ea255=_0x2cdc23['get'](_0x378ad7);if(_0x1ea255){const _0x5dafd2=_0x1419c0['get'](_0x1ea255['userId']),_0x103a7a=new Mt({'author':_0x5dafd2,'type':_0x1ea255['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x378ad7});_0x278169['unshift'](_0x103a7a),_0x7fbc09['attributes'][_0x378ad7]['revisionHistoryAttachChange']=_0x103a7a['id'];}_0x7fbc09['changes']=_0x7fbc09['changes']['concat'](_0x278169);}return _0x7fbc09;}['_markMarkers'](_0x3fe550,_0x32191f){for(let _0x467f90=0x0;_0x467f90<_0x3fe550['length'];_0x467f90++)for(const [_0x52046f,_0x4e2a6b]of _0x32191f)!_0x4e2a6b['isCollapsed']&&_0x4e2a6b['start']['isEqual'](_0x3fe550[_0x467f90]['previousPosition'])&&_0x3fe550[_0x467f90]['markersStart']['push'](_0x52046f),_0x4e2a6b['end']['isEqual'](_0x3fe550[_0x467f90]['nextPosition'])&&_0x3fe550[_0x467f90]['markersEnd']['push'](_0x52046f);}['_joinTapes'](_0x42c9b7,_0xe31729){let _0x10f1b1=[],_0x340d13=0x0,_0x18eba8=0x0;for(;_0x340d13<_0x42c9b7['length']||_0x18eba8<_0xe31729['length'];){const _0x3ff9e6=_0x42c9b7[_0x340d13]||{},_0x2586dd=_0xe31729[_0x18eba8]||{};if(_0x3ff9e6['id']==_0x2586dd['id'])_0x340d13++,_0x18eba8++,_0x10f1b1['push'](_0x3ff9e6);else{if(_0x2586dd['isRemoved']&&_0x3ff9e6['isAdded']){const {commonTape:_0x2942a5,iEnd:_0x2eb297,jEnd:_0x24f3ab}=this['_threeWayMerge'](_0x42c9b7,_0x340d13,_0xe31729,_0x18eba8);_0x10f1b1=_0x10f1b1['concat'](_0x2942a5),_0x340d13=_0x2eb297,_0x18eba8=_0x24f3ab;}else _0x2586dd['isRemoved']?(_0x18eba8++,_0x10f1b1['push'](_0x2586dd)):(_0x340d13++,_0x10f1b1['push'](_0x3ff9e6));}}return _0x10f1b1;}_markSuggestions(_0x236319,_0x3cbc37,_0xf295f8){const _0x3eee76=[];for(let _0x259ef5=0x0;_0x259ef5<_0x236319['length'];_0x259ef5++){for(let _0x3b8469=0x0;_0x3b8469<_0x236319[_0x259ef5]['markersStart']['length'];_0x3b8469++){const _0x34f0ef=_0x236319[_0x259ef5]['markersStart'][_0x3b8469];if(!_0x3cbc37['has'](_0x34f0ef))continue;const {group:_0xfcf1bd,type:_0x3a85f9,authorId:_0x12c749}=_0x52de41(_0x34f0ef);if('revision-suggestion'!=_0xfcf1bd||'insertion'!=_0x3a85f9&&'deletion'!=_0x3a85f9)continue;const _0x2d434e=_0xf295f8['suggestion:'+_0x34f0ef['slice'](0x14)]||null;_0x3eee76['unshift']({'type':_0x3a85f9,'name':_0x34f0ef,'userId':_0x12c749,'aiSource':_0x2d434e}),_0x236319[_0x259ef5]['markersStart']['splice'](_0x3b8469,0x1),_0x3b8469--;}_0xa0cbb(_0x236319[_0x259ef5]);for(let _0x5eb901=0x0;_0x5eb901<_0x236319[_0x259ef5]['markersEnd']['length'];_0x5eb901++){const _0x12b33e=_0x236319[_0x259ef5]['markersEnd'][_0x5eb901];if(!_0x3cbc37['has'](_0x12b33e))continue;const {group:_0x3a90cf,type:_0x4ea542}=_0x52de41(_0x12b33e);if('revision-suggestion'!=_0x3a90cf||'insertion'!=_0x4ea542&&'deletion'!=_0x4ea542)continue;_0x236319[_0x259ef5]['markersEnd']['splice'](_0x5eb901,0x1),_0x5eb901--;const _0x19de18=_0x3eee76['findIndex'](_0x21deee=>_0x21deee['name']==_0x12b33e);_0x19de18>-0x1&&_0x3eee76['splice'](_0x19de18,0x1);}}function _0x52de41(_0x2b2002){const _0x1bdfc6=_0x2b2002['split'](':');return{'group':_0x1bdfc6[0x0],'type':_0x1bdfc6[0x1],'subType':_0x1bdfc6['length']>=0x5?_0x1bdfc6[0x2]:null,'id':_0x1bdfc6['length']<0x5?_0x1bdfc6[0x2]:_0x1bdfc6[0x3],'authorId':_0x1bdfc6['length']<0x5?_0x1bdfc6[0x3]:_0x1bdfc6[0x4],'markerCount':0x6==_0x1bdfc6['length']?_0x1bdfc6[0x5]:null};}function _0xa0cbb(_0x499699){for(let _0x33816d=0x0;_0x33816d<_0x3eee76['length'];_0x33816d++){if(_0x499699['isAdded']&&'insertion'==_0x3eee76[_0x33816d]['type']&&_0x499699['isAdded']['userId']==_0x3eee76[_0x33816d]['userId'])return _0x499699['isAddSuggestion']={..._0x3eee76[_0x33816d],'aiSource':_0x499699['isAdded']['aiSource']||_0x3eee76[_0x33816d]['aiSource']},void delete _0x499699['isAdded'];if(!_0x499699['isAdded']&&!_0x499699['isRemoved']&&'deletion'==_0x3eee76[_0x33816d]['type'])return void(_0x499699['isRemoveSuggestion']=_0x3eee76[_0x33816d]);}}}_setDistance(_0x319dbc,_0x311fd9){let _0x5363b4=0x0,_0x366fa0=!0x1;const _0x2b4a62=new Map();for(const _0x54773b of _0x319dbc)_0x54773b[_0x311fd9]?_0x366fa0&&(_0x5363b4++,_0x366fa0=!0x1):(_0x5363b4++,_0x366fa0=!0x0),_0x2b4a62['set'](_0x54773b['id'],_0x5363b4);for(let _0x947f4a=0x0;_0x947f4a<_0x319dbc['length'];_0x947f4a++){if('isRemoved'==_0x311fd9&&_0x319dbc[_0x947f4a]['isAdded']||'isAdded'==_0x311fd9&&_0x319dbc[_0x947f4a]['isRemoved'])continue;if('text'==_0x319dbc[_0x947f4a]['type']){_0x319dbc[_0x947f4a]['distance']=0x0;continue;}const _0x1e4c0e=_0x2b4a62['get'](_0x319dbc[_0x947f4a]['pairId']),_0x43d0cc=_0x2b4a62['get'](_0x319dbc[_0x947f4a]['id']);_0x319dbc[_0x947f4a]['distance']=_0x1e4c0e-_0x43d0cc;}}_getRevisionsRange(_0x1ef121,_0x207e26,_0x7e48ed=!0x1){const _0x3506d6=[];let _0xc3be68=this['repository']['getIndex'](_0x1ef121),_0x24a999=this['repository']['getIndex'](_0x207e26);for(-0x1==_0x24a999&&(_0x24a999=this['repository']['_revisions']['length'],_0x7e48ed=!0x1);_0xc3be68<_0x24a999;)_0x3506d6['push'](this['repository']['getRevision'](_0xc3be68)),_0xc3be68++;return _0x7e48ed&&_0x3506d6['push'](this['repository']['getRevision'](_0xc3be68)),_0x3506d6;}_threeWayMerge(_0x226cd6,_0xa01da8,_0x196353,_0x38e9d0){const _0x3e043=this['editor']['model']['schema'];let _0x4995d3=_0xa01da8;for(;_0x226cd6[_0x4995d3]&&_0x226cd6[_0x4995d3]['isAdded'];)_0x4995d3++;let _0x4f56df=_0x38e9d0;for(;_0x196353[_0x4f56df]&&_0x196353[_0x4f56df]['isRemoved'];)_0x4f56df++;_0x5f507a(_0x226cd6,_0xa01da8,_0x4995d3),_0x5f507a(_0x196353,_0x38e9d0,_0x4f56df);const _0x420c6e=_0x196353['slice'](_0x38e9d0,_0x4f56df)['concat'](_0x226cd6['slice'](_0xa01da8,_0x4995d3));return _0x420c6e['sort']((_0x1b09cd,_0x35dcc7)=>_0x1b09cd['side']!=_0x35dcc7['side']?_0x1b09cd['side']-_0x35dcc7['side']:_0x1b09cd['level']!=_0x35dcc7['level']?_0x1b09cd['level']-_0x35dcc7['level']:_0x1b09cd['distance']!=_0x35dcc7['distance']?_0x35dcc7['distance']-_0x1b09cd['distance']:!!_0x1b09cd['isAdded']!=!!_0x35dcc7['isAdded']?-0x1==_0x1b09cd['side']||0x0==_0x1b09cd['side']?_0x1b09cd['isAdded']?-0x1:0x1:_0x1b09cd['isAdded']?0x1:-0x1:_0x1b09cd['index']-_0x35dcc7['index']),{'commonTape':_0x420c6e,'iEnd':_0x4995d3,'jEnd':_0x4f56df};function _0x5f507a(_0x2aa69a,_0x3ca913,_0x321a2f){let _0x1078ab=-0x1,_0x10e88f=Number['POSITIVE_INFINITY'],_0x33ba68=!0x0;for(let _0x2afbc7=_0x3ca913;_0x2afbc7<_0x321a2f;_0x2afbc7++)if(_0x3e043['isInline'](_0x2aa69a[_0x2afbc7]['item'])||(_0x33ba68=!0x1),_0x2aa69a[_0x2afbc7]['item']['startIndex']<_0x3ca913&&(_0x1078ab=_0x2afbc7),_0x2aa69a[_0x2afbc7]['item']['endIndex']>=_0x321a2f){_0x10e88f=_0x2afbc7;break;}_0x33ba68&&(_0x1078ab=_0x321a2f-0x1);for(let _0x791b8=_0x3ca913;_0x791b8<_0x321a2f;_0x791b8++)_0x2aa69a[_0x791b8]['side']=_0x791b8<=_0x1078ab?-0x1:_0x791b8<_0x10e88f?0x0:0x1,_0x2aa69a[_0x791b8]['index']=_0x791b8;let _0x5dd35a=0x0;for(let _0x2e91a8=_0x3ca913;_0x2e91a8<=_0x1078ab;_0x2e91a8++)0x0==_0x2aa69a[_0x2e91a8]['distance']?_0x2aa69a[_0x2e91a8]['level']=_0x5dd35a:(_0x5dd35a++,_0x2aa69a[_0x2e91a8]['level']=_0x5dd35a,_0x5dd35a++);for(let _0x13a152=_0x3ca913;_0x13a152<_0x321a2f;_0x13a152++)0x0==_0x2aa69a[_0x13a152]['side']&&(_0x2aa69a[_0x13a152]['level']=_0x5dd35a);_0x5dd35a=0x0;for(let _0x54fe58=_0x321a2f-0x1;_0x54fe58>=_0x10e88f;_0x54fe58--)0x0==_0x2aa69a[_0x54fe58]['distance']?_0x2aa69a[_0x54fe58]['level']=_0x5dd35a:(_0x5dd35a--,_0x2aa69a[_0x54fe58]['level']=_0x5dd35a,_0x5dd35a--);}}_fixObsoleteTags(_0x2b7f9e){const _0x3888b1=new Map(),_0x68efbd=this['editor']['model']['schema'];for(let _0x2691d1=0x1;_0x2691d1<_0x2b7f9e['length'];_0x2691d1++){let _0x2f2997,_0x1b6476,_0x5cdce0;const _0x295d7a=_0x2b7f9e[_0x2691d1],_0x470962=_0x2b7f9e[_0x2691d1-0x1];if('text'==_0x295d7a['type'])continue;if(_0x295d7a['type']!=_0x470962['type'])continue;if(!_0x68efbd['isBlock'](_0x470962['item'])||_0x68efbd['isLimit'](_0x470962['item']))continue;if(!_0x68efbd['isBlock'](_0x295d7a['item'])||_0x68efbd['isLimit'](_0x295d7a['item']))continue;if((_0x2b7f9e[_0x2691d1]['isAdded']||_0x2b7f9e[_0x2691d1]['isAddSuggestion'])&&_0x2b7f9e[_0x2691d1-0x1]['isRemoved'])_0x2f2997=_0x2b7f9e[_0x2691d1],_0x1b6476=_0x2b7f9e[_0x2691d1-0x1],_0x5cdce0=_0x2691d1-0x1;else{if(!_0x2b7f9e[_0x2691d1]['isRemoved']||!_0x2b7f9e[_0x2691d1-0x1]['isAdded']&&!_0x2b7f9e[_0x2691d1-0x1]['isAddSuggestion'])continue;_0x2f2997=_0x2b7f9e[_0x2691d1-0x1],_0x1b6476=_0x2b7f9e[_0x2691d1],_0x5cdce0=_0x2691d1;}const _0x4b5bc3=_0x2f2997['level']==_0x1b6476['level'],_0x20e6d3=Math['abs'](_0x2f2997['level'])<Math['abs'](_0x1b6476['level'])&&0x0==_0x1b6476['distance'];(_0x4b5bc3||_0x20e6d3)&&(_0x3888b1['set'](_0x1b6476['id'],_0x2f2997['id']),_0x2b7f9e['splice'](_0x5cdce0,0x1),_0x2691d1--,_0x2f2997['isAdded']=!0x1);}for(let _0x52f8a4=0x0;_0x52f8a4<_0x2b7f9e['length'];_0x52f8a4++)_0x3888b1['has'](_0x2b7f9e[_0x52f8a4]['pairId'])&&(_0x2b7f9e[_0x52f8a4]['pairId']=_0x3888b1['get'](_0x2b7f9e[_0x52f8a4]['pairId']));}['_removeMissingPairs'](_0x25cecb){const _0x452cb0=new Set(_0x25cecb['map'](_0x1ee493=>_0x1ee493['id']));for(let _0x1d8e66=0x0;_0x1d8e66<_0x25cecb['length'];_0x1d8e66++)_0x452cb0['has'](_0x25cecb[_0x1d8e66]['pairId'])||0x0==_0x25cecb[_0x1d8e66]['distance']||(_0x25cecb[_0x1d8e66]['isIncorrect']=!0x0);return _0x25cecb['filter'](_0x1ca0d1=>!_0x1ca0d1['isIncorrect']);}_markMismatchedRemovedTags(_0x1e69b9){const _0x54e9d0=new Set();for(let _0x585f12=0x0;_0x585f12<_0x1e69b9['length'];_0x585f12++){if(_0x54e9d0['has'](_0x1e69b9[_0x585f12]['id'])&&_0x1e69b9[_0x585f12]['isRemoved']&&(_0x1e69b9[_0x585f12]['isIncorrect']=!0x0),_0x1e69b9[_0x585f12]['isIncorrect'])continue;if(0x0==_0x1e69b9[_0x585f12]['distance'])continue;if('elementStart'!=_0x1e69b9[_0x585f12]['type'])continue;if(null==_0x1e69b9[_0x585f12]['pairId'])continue;let _0x1beca4=_0x585f12+0x1,_0x2ad62b=0x0;for(;_0x1e69b9[_0x1beca4]['id']!=_0x1e69b9[_0x585f12]['pairId'];)'elementStart'==_0x1e69b9[_0x1beca4]['type']?_0x2ad62b++:'elementEnd'==_0x1e69b9[_0x1beca4]['type']&&_0x2ad62b--,_0x1beca4++;if(0x0!=_0x2ad62b){if(_0x1e69b9[_0x585f12]['isRemoved'])_0x1e69b9[_0x585f12]['isIncorrect']=!0x0;else{for(;_0x1beca4!=_0x585f12;)_0x1e69b9[_0x1beca4]['isRemoved']&&0x0!=_0x1e69b9[_0x1beca4]['distance']&&(_0x1e69b9[_0x1beca4]['isIncorrect']=!0x0,_0x54e9d0['add'](_0x1e69b9[_0x1beca4]['pairId'])),_0x1beca4--;}}}return _0x1e69b9['filter'](_0x582d67=>!_0x582d67['isIncorrect']);}_removeUnsupportedChanges(_0x4c552c){const _0x3b7096=this['editor']['model']['schema'];for(let _0x42f069=0x0;_0x42f069<_0x4c552c['length'];_0x42f069++){if(!(_0x4c552c[_0x42f069]['isAdded']||_0x4c552c[_0x42f069]['isAddSuggestion']||_0x4c552c[_0x42f069]['isRemoved']||_0x4c552c[_0x42f069]['isRemoveSuggestion']))continue;if(0x0==_0x4c552c[_0x42f069]['distance'])continue;const _0x180663=_0x4c552c[_0x42f069]['item'];_0x3b7096['isBlock'](_0x180663)||_0x3b7096['isLimit'](_0x180663)||(_0x4c552c[_0x42f069]['isAdded']&&delete _0x4c552c[_0x42f069]['isAdded'],_0x4c552c[_0x42f069]['isAddSuggestion']&&delete _0x4c552c[_0x42f069]['isAddSuggestion'],_0x4c552c[_0x42f069]['isRemoveSuggestion']&&delete _0x4c552c[_0x42f069]['isRemoveSuggestion'],_0x4c552c[_0x42f069]['isRemoved']&&(_0x4c552c[_0x42f069]['isIncorrect']=!0x0));}return _0x4c552c['filter'](_0x54c7ad=>!_0x54c7ad['isIncorrect']);}['_makeModelFromTape'](_0x2fa460,_0x244758,_0x299326,_0x46eae5){const _0xd25997=new _0x2f3aa9(),_0x26a314=[],_0x4196d1=new Map(),_0x585d30=this['editor']['model'],_0xa620bd=_0x585d30['schema'],_0x330ba0=[_0xd25997],_0x524e35={},_0x36a684={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0xd25997['name']=_0x46eae5;let _0x566157=null;const _0x29701b=[0x0];for(let _0x571814=0x0;_0x571814<_0x2fa460['length'];_0x571814++)if('elementStart'===_0x2fa460[_0x571814]['type']){_0x2fa460[_0x571814]['previousPosition']=_0x585d30['createPositionFromPath'](_0xd25997,_0x29701b);const _0xf8c37d=new _0xd26162(_0x2fa460[_0x571814]['item']['name'],_0x2fa460[_0x571814]['item']['getAttributes']());_0x330ba0[0x0]['_appendChild'](_0xf8c37d),_0x29701b['push'](0x0),_0x330ba0['unshift'](_0xf8c37d),_0x2fa460[_0x571814]['nextPosition']=_0x585d30['createPositionFromPath'](_0xd25997,_0x29701b);}else'elementEnd'===_0x2fa460[_0x571814]['type']?(_0x330ba0['shift'](),_0x2fa460[_0x571814]['previousPosition']=_0x585d30['createPositionFromPath'](_0xd25997,_0x29701b),_0x29701b['pop'](),_0x29701b[_0x29701b['length']-0x1]++,_0x2fa460[_0x571814]['nextPosition']=_0x585d30['createPositionFromPath'](_0xd25997,_0x29701b)):(_0x2fa460[_0x571814]['previousPosition']=_0x585d30['createPositionFromPath'](_0xd25997,_0x29701b),_0x566157?_0x566157['_data']+=_0x2fa460[_0x571814]['item']['data']:_0x566157=new _0x470eed(_0x2fa460[_0x571814]['item']['data'],_0x2fa460[_0x571814]['item']['getAttributes']()),_0x2fa460[_0x571814+0x1]&&'text'===_0x2fa460[_0x571814+0x1]['type']&&_0x25dd96(_0x566157,_0x2fa460[_0x571814+0x1]['item'])||(_0x330ba0[0x0]['_appendChild'](_0x566157),_0x566157=null),_0x29701b[_0x29701b['length']-0x1]+=_0x2fa460[_0x571814]['item']['offsetSize'],_0x2fa460[_0x571814]['nextPosition']=_0x585d30['createPositionFromPath'](_0xd25997,_0x29701b));for(let _0x2eb55e=0x0;_0x2eb55e<_0x2fa460['length'];_0x2eb55e++){const _0x38fa6b=_0x2fa460[_0x2eb55e]['previousPosition'],_0x476829=_0x2fa460[_0x2eb55e]['nextPosition'];for(const _0x47dd28 of _0x2fa460[_0x2eb55e]['markersStart'])_0x4196d1['set'](_0x47dd28,{'start':_0x38fa6b,'end':null});_0xe96b7d('isRemoveSuggestion',_0x2eb55e,_0x38fa6b,_0x476829),_0xe96b7d('isAddSuggestion',_0x2eb55e,_0x38fa6b,_0x476829),_0xe96b7d('isRemoved',_0x2eb55e,_0x38fa6b,_0x476829),_0xe96b7d('isAdded',_0x2eb55e,_0x38fa6b,_0x476829);for(const _0x793b7c of _0x2fa460[_0x2eb55e]['markersEnd']){const _0x4325b6=_0x4196d1['get'](_0x793b7c);_0x4325b6?_0x4325b6['end']=_0x476829:_0x4196d1['set'](_0x793b7c,{'start':_0x476829,'end':_0x476829});}}for(const [_0x486746,_0xa620ae]of _0x4196d1){const _0x5adf5f=this['editor']['model']['createRange'](_0xa620ae['start'],_0xa620ae['end']);_0xd25997['markers']['set'](_0x486746,_0x5adf5f);}return _0x26a314['sort']((_0x101ac7,_0x4a4391)=>{const _0x558bfa=_0xd25997['markers']['get']('revision:'+_0x101ac7['id']),_0x234744=_0xd25997['markers']['get']('revision:'+_0x4a4391['id']);return _0x558bfa['start']['isBefore'](_0x234744['start'])?-0x1:_0x558bfa['start']['isAfter'](_0x234744['start'])?0x1:_0x558bfa['end']['isBefore'](_0x234744['end'])?-0x1:_0x558bfa['end']['isAfter'](_0x234744['end'])?0x1:'add'===_0x101ac7['type']?-0x1:0x1;}),{'root':_0xd25997,'changes':_0x26a314};function _0xe96b7d(_0x2be1d4,_0x191bb5,_0x194891,_0x20f25a){const _0x733ecb=!!_0x2fa460[_0x191bb5][_0x2be1d4],_0x105928=_0x733ecb?_0x2fa460[_0x191bb5][_0x2be1d4]['userId']:null,_0x146ef4=_0x733ecb&&_0x2fa460[_0x191bb5][_0x2be1d4]['aiSource']||null,_0x147521=_0x191bb5===_0x2fa460['length']-0x1,_0x380677=_0x36a684[_0x2be1d4][0x0],_0x13ae5c=_0xa620bd['isObject'](_0x2fa460[_0x191bb5]['item']);!_0x524e35[_0x2be1d4]&&_0x733ecb?_0x524e35[_0x2be1d4]={'start':_0x194891,'tapeItem':_0x2fa460[_0x191bb5],'userId':_0x105928,'aiSource':_0x146ef4,'type':_0x2be1d4}:_0x524e35[_0x2be1d4]&&!_0x733ecb?(_0x524e35[_0x2be1d4]['end']=_0x194891,_0x39977b(_0x524e35[_0x2be1d4]),_0x524e35[_0x2be1d4]=null):_0x524e35[_0x2be1d4]&&_0x733ecb&&(_0x524e35[_0x2be1d4]['userId']!==_0x105928||_0x524e35[_0x2be1d4]['aiSource']!==_0x146ef4)&&(_0x524e35[_0x2be1d4]['end']=_0x194891,_0x380677&&_0x380677['userId']===_0x524e35[_0x2be1d4]['userId']?_0x380677['change']['aiSource']=_0x380677['change']['aiSource']||_0x524e35[_0x2be1d4]['aiSource']:_0x39977b(_0x524e35[_0x2be1d4]),_0x524e35[_0x2be1d4]={'start':_0x194891,'tapeItem':_0x2fa460[_0x191bb5],'userId':_0x105928,'aiSource':_0x146ef4,'type':_0x2be1d4}),_0x524e35[_0x2be1d4]&&_0x13ae5c&&('elementStart'!==_0x2fa460[_0x191bb5]['type']||_0x380677&&_0x380677['userId']===_0x105928||_0x36a684[_0x2be1d4]['unshift']({'userId':_0x105928,'object':_0x2fa460[_0x191bb5]['item'],'change':_0x524e35[_0x2be1d4]}),'elementEnd'===_0x2fa460[_0x191bb5]['type']&&_0x380677&&_0x380677['object']===_0x2fa460[_0x191bb5]['item']&&(_0x36a684[_0x2be1d4]['shift'](),_0x524e35[_0x2be1d4]=_0x380677['change'])),_0x524e35[_0x2be1d4]&&_0x147521&&(_0x524e35[_0x2be1d4]['end']=_0x20f25a,_0x39977b(_0x524e35[_0x2be1d4]),_0x524e35[_0x2be1d4]=null);}function _0x39977b({start:_0x21a9d4,end:_0x5f34df,tapeItem:_0x3a8fa7,userId:_0xab65df,aiSource:_0x1ccd89,type:_0x1126a0}){const _0x3ed649=_0x3a8fa7['item'],_0x5a1a31=_0x585d30['schema']['isBlock'](_0x3ed649)&&!_0x585d30['schema']['isLimit'](_0x3ed649),_0x1a0824=_0x21a9d4['nodeAfter']==_0x5f34df['parent']&&_0x5f34df['isAtStart'];if(_0x5a1a31&&_0x1a0824)return;const _0x103f1e=_0x585d30['createRange'](_0x21a9d4,_0x5f34df),_0x3460bb=_0x244758['get'](_0xab65df),_0x5e363=new Mt({'author':_0x3460bb,'type':'isAdded'==_0x1126a0||'isAddSuggestion'==_0x1126a0?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1126a0||'isRemoveSuggestion'==_0x1126a0,'aiSource':_0x1ccd89||null},'createdAt':new Date(),'rootName':_0x299326});_0x26a314['push'](_0x5e363),_0xd25997['markers']['set']('revision:'+_0x5e363['id'],_0x103f1e);}function _0x25dd96(_0x5e7c7e,_0xd28ea5){const _0x2311f3=_0x5e7c7e['getAttributes'](),_0x4c5618=_0xd28ea5['getAttributes']();for(const _0x4168cf of _0x2311f3){if(_0x4168cf[0x1]!==_0xd28ea5['getAttribute'](_0x4168cf[0x0]))return!0x1;_0x4c5618['next']();}return _0x4c5618['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1b9f1b=>{const _0x1d017a=_0x1b9f1b['markerName']['split'](':')[0x1],_0x372a87=this['_getChangeFromId'](_0x1d017a);if(!_0x372a87)return null;const _0x1cb6fd='add'==_0x372a87['type']?'insertion':'deletion',_0x4c5636=['ck-suggestion-marker','ck-suggestion-marker-'+_0x1cb6fd];return _0x372a87['data']['isSuggestion']&&_0x4c5636['push']('ck-suggestion-marker-'+_0x1cb6fd+'-new'),this['activeChange']==_0x372a87&&_0x4c5636['push']('ck-suggestion-marker--active'),{'classes':_0x4c5636,'attributes':{'data-change-id':_0x1d017a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xde282d=>{_0xde282d['on']('element:pre',(_0x2ec22b,_0x1b786d,_0x150666)=>{const _0x14381d=_0x1b786d['viewItem']['getChild'](0x0);if(!_0x14381d||!_0x14381d['is']('element','code'))return;if(!_0x150666['consumable']['consume'](_0x14381d,{'attributes':['vid_start','vid_end']}))return;const _0x2c91e4=_0x1b786d['modelRange']['start']['nodeAfter'];_0x150666['writer']['setAttribute']('vid_start',_0x14381d['getAttribute']('vid_start'),_0x2c91e4),_0x150666['writer']['setAttribute']('vid_end',_0x14381d['getAttribute']('vid_end'),_0x2c91e4);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x4f7ca6=>{_0x4f7ca6['on']('element',(_0x39fe6a,_0x1eb4f0,_0x433b7d)=>{if(!_0x433b7d['consumable']['consume'](_0x1eb4f0['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1eb4f0['modelRange']['isCollapsed'])return;const _0xa1461a=_0x1eb4f0['modelRange']['start']['nodeAfter'];_0xa1461a['hasAttribute']('vid_start')||_0xa1461a['hasAttribute']('vid')||(_0x433b7d['writer']['setAttribute']('vid_start',_0x1eb4f0['viewItem']['getAttribute']('vid_start'),_0xa1461a),_0x433b7d['writer']['setAttribute']('vid_end',_0x1eb4f0['viewItem']['getAttribute']('vid_end'),_0xa1461a));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3796c2=>_0x3796c2['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x59fc92,[,_0x5b88cc])=>{['vid_start','vid_end','vid']['includes'](_0x5b88cc)&&(_0x59fc92['return']=!0x0,_0x59fc92['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3ea95=>{_0x3ea95['on']('attribute:vid',(_0x27ae85,_0x1ca4d4,_0x22e28e)=>{if('\x20'!=_0x1ca4d4['item']['data']||_0x1ca4d4['item']['parent']['maxOffset']>0x1)return;if(!_0x22e28e['consumable']['consume'](_0x1ca4d4['item'],_0x27ae85['name']))return;const _0x16833f=_0x22e28e['writer'],_0x468877=_0x22e28e['mapper']['toViewRange'](_0x1ca4d4['range']);_0x16833f['wrap'](_0x468877,_0x16833f['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5b8e11){const _0x1ad63f=_0x5b8e11['plugins']['get']('RevisionViewer');return(_0x2ad903,_0x1791d5,_0x3f50c1)=>{const _0x152b73=_0x1791d5['markerName']['split'](':')[0x1],_0x55c3d4=_0x1ad63f['_getChangeFromId'](_0x152b73);if(!_0x55c3d4)return null;const _0x3fc36b='add'==_0x55c3d4['type']?'split':'merge';if(!_0x3f50c1['consumable']['test'](_0x1791d5['markerRange'],_0x2ad903['name']))return;const _0xbf0aa9=_0x1791d5['markerRange']['getWalker'](),_0x2c7211=_0x1791d5['markerRange']['start'],_0x3b648d=_0x5b8e11['model']['schema'];let _0x47247a=null,_0x142ae6=null,_0x3e8de0=!0x1,_0x52d703=!0x1;for(const _0x3faa94 of _0xbf0aa9){const _0x39b698=_0x3faa94['item'];_0x3e8de0=_0x3e8de0||_0x3b648d['isContent'](_0x39b698);const _0xe253ce=_0x3f50c1['mapper']['toViewElement'](_0x39b698);if(_0xe253ce&&_0xe253ce['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3faa94['type']&&(_0x3b648d['isBlock'](_0x39b698)&&!_0x3b648d['isLimit'](_0x39b698)&&(_0x39b698['nextSibling']||_0x2c7211['isAtEnd']?_0x47247a&&_0x47247a['parent']==_0x39b698||(_0x47247a=_0x39b698,_0x4ea4ac(_0x3faa94['previousPosition']),_0x52d703=!0x0):_0x142ae6=_0x142ae6||_0x3faa94['previousPosition']));}function _0x4ea4ac(_0x4c7289){const _0x25c6f9=_0x3f50c1['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3fc36b}),_0x39d05e=_0x3f50c1['mapper']['toViewPosition'](_0x4c7289);_0x55c3d4['data']['isSuggestion']&&_0x3f50c1['writer']['addClass']('ck-suggestion-marker-'+_0x3fc36b+'-new',_0x25c6f9),_0x1ad63f['activeChange']==_0x55c3d4&&_0x3f50c1['writer']['addClass']('ck-suggestion-marker--active',_0x25c6f9),_0x3f50c1['writer']['insert'](_0x39d05e,_0x25c6f9),_0x3f50c1['mapper']['bindElementToMarker'](_0x25c6f9,_0x1791d5['markerName']);}_0x3e8de0||_0x52d703||!_0x142ae6||_0x4ea4ac(_0x142ae6);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xdb1769,_0x4f060e,_0x2b9c2b)=>{const _0x1b91f9=_0x2b9c2b['mapper']['markerNameToElements'](_0x4f060e['markerName']);if(_0x1b91f9){for(const _0x36bcc1 of _0x1b91f9)(_0x36bcc1['hasClass']('ck-suggestion-marker-split')||_0x36bcc1['hasClass']('ck-suggestion-marker-merge'))&&(_0x2b9c2b['mapper']['unbindElementFromMarkerName'](_0x36bcc1,_0x4f060e['markerName']),_0x2b9c2b['writer']['remove'](_0x36bcc1));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x6f0c84,_0x4f45c8,_0x1fb550)=>{const _0x4e87b2=_0x4f45c8['markerName']['split'](':')[0x1],_0x9046e6=this['_getChangeFromId'](_0x4e87b2);if(!_0x9046e6)return null;const _0x62f7f8='add'==_0x9046e6['type']?'split':'merge';if(_0x1fb550['consumable']['test'](_0x4f45c8['markerRange'],_0x6f0c84['name']))for(const _0x262e47 of _0x4f45c8['markerRange']['getItems']()){if(!_0x262e47['is']('element','softBreak'))continue;const _0x195da2=_0x1fb550['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x62f7f8}),_0x3884d5=_0x1fb550['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x262e47));_0x9046e6['data']['isSuggestion']&&_0x1fb550['writer']['addClass']('ck-suggestion-marker-'+_0x62f7f8+'-new',_0x195da2),this['activeChange']==_0x9046e6&&_0x1fb550['writer']['addClass']('ck-suggestion-marker--active',_0x195da2),_0x1fb550['writer']['insert'](_0x3884d5,_0x195da2),_0x1fb550['mapper']['bindElementToMarker'](_0x195da2,_0x4f45c8['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x58e980=>{for(const _0x38e5e7 of this['editor']['model']['document']['getRootNames']()){const _0x283709=this['editor']['model']['document']['getRoot'](_0x38e5e7),_0x4cddda=this['editor']['editing']['view']['document']['getRoot'](_0x38e5e7);if(_0x4cddda){const _0x53c694=_0x283709['getAttribute']('revisionHistoryAttachChange');if(_0x58e980['removeAttribute']('data-change-id',_0x4cddda),_0x58e980['removeClass']('ck-revision-history-root-add',_0x4cddda),_0x58e980['removeClass']('ck-revision-history-root-remove',_0x4cddda),_0x58e980['removeClass']('ck-revision-history-root--active',_0x4cddda),_0x53c694){const _0x5bf6af=this['_getChangeFromId'](_0x53c694);if(!_0x5bf6af)return null;_0x58e980['setAttribute']('data-change-id',_0x53c694,_0x4cddda),_0x58e980['addClass']('ck-revision-history-root-'+_0x5bf6af['type'],_0x4cddda),this['activeChange']==_0x5bf6af&&_0x58e980['addClass']('ck-revision-history-root--active',_0x4cddda);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2572ac=>'revision-comment:'+_0x2572ac,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0xbc4b9d=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0xbc4b9d['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x42aebc=>'revision-suggestion:'+_0x42aebc,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2435b7=>({'name':'suggestion:'+_0x2435b7,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4878b4=>{const _0x997a89=_0x4878b4['markerName']['split'](':')[0x1];return'insertion'!=_0x997a89&&'deletion'!=_0x997a89?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x997a89]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3515c1,_0x31377b,_0x41918b)=>{const _0x16d39c=_0x41918b['mapper']['markerNameToElements'](_0x31377b['markerName']);if(_0x16d39c){for(const _0x62aaa9 of _0x16d39c)_0x62aaa9['is']('uiElement')&&(_0x41918b['mapper']['unbindElementFromMarkerName'](_0x62aaa9,_0x31377b['markerName']),_0x41918b['writer']['remove'](_0x62aaa9));}},{'priority':'high'});}_getChangeFromId(_0x361ab3){return this['_changeIdToChange']['get'](_0x361ab3);}_getViewForChange(_0x2f8c26){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x2f8c26,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5a118a,_0x2bd0df,_0x321590,_0x4be5ac)=>{_0x4be5ac&&this['_balloon']['remove'](_0x4be5ac),_0x321590&&(this['_balloon']['add']({'view':_0x321590,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x24fb9d=this['editor']['editing'],_0x18f879=this['_getChangeFromId'](_0x321590['changeId']);let _0x30d2a0;if(_0x18f879['data']['isOnRoot']){const _0x51b35c=_0x24fb9d['view']['getDomRoot'](_0x18f879['rootName']);_0x30d2a0=Array['from'](_0x51b35c['getClientRects']());}else{const _0x1fc97=this['editor']['model']['markers']['get']('revision:'+_0x321590['changeId']);_0x30d2a0=Array['from'](_0x24fb9d['mapper']['markerNameToElements'](_0x1fc97['name']))['map'](_0x372050=>_0x24fb9d['view']['domConverter']['mapViewToDom'](_0x372050))['map'](_0x192988=>Array['from'](_0x192988['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x30d2a0['find'](_0x342220=>_0x342220['top']-0x3<=this['_activeViewTarget']['y']&&_0x342220['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x342220['left']-0x3<=this['_activeViewTarget']['x']&&_0x342220['right']+0x3>=this['_activeViewTarget']['x'])||_0x30d2a0[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x428dec,_0x30cb47,_0x3eab41,_0x442a00)=>{this['activeView']=_0x3eab41?this['_getViewForChange'](_0x3eab41):null,this['editor']['model']['change'](()=>{const _0x40773f=this['editor']['editing'];_0x442a00&&(_0x442a00['data']['isOnRoot']?_0x40773f['view']['change'](_0x37053c=>{_0x37053c['removeClass']('ck-revision-history-root--active',_0x40773f['view']['document']['getRoot'](_0x442a00['rootName']));}):_0x40773f['reconvertMarker']('revision:'+_0x442a00['id'])),_0x3eab41&&(_0x3eab41['data']['isOnRoot']?_0x40773f['view']['change'](_0x583dd7=>{_0x583dd7['addClass']('ck-revision-history-root--active',_0x40773f['view']['document']['getRoot'](_0x3eab41['rootName']));}):_0x40773f['reconvertMarker']('revision:'+_0x3eab41['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5f109b,_0x47abe0)=>{if(this['activeChange'])return;const _0x1c1a0b=this['_findChangeIdFromDomTarget'](_0x47abe0['target']),_0x3a08e6=this['_changeIdToChange']['get'](_0x1c1a0b);_0x3a08e6?(this['_activeViewTarget']={'x':_0x47abe0['domEvent']['x'],'y':_0x47abe0['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3a08e6)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2be9f3,_0x39bd20)=>{const _0x3ef9be=this['_findChangeIdFromDomTarget'](_0x39bd20['target']),_0x44d9db=this['_changeIdToChange']['get'](_0x3ef9be);_0x44d9db?(this['_activeViewTarget']={'x':_0x39bd20['domEvent']['x'],'y':_0x39bd20['domEvent']['y']},_0x44d9db===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x44d9db):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x48856e){do{const _0xc7a377=_0x48856e['getAttribute']('data-change-id');if(_0xc7a377)return _0xc7a377;_0x48856e=_0x48856e['parent'];}while(_0x48856e);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x55d7d3=>{for(const _0x2581a5 of this['editor']['model']['markers'])_0x55d7d3['removeMarker'](_0x2581a5);});}};function Ut(_0x2ebb12){return _0x2ebb12['split'](':')[0x1];}function Lt(_0x2370ea,_0x3d57a4){return(_0x19ae08,_0x93178f,_0x260e1f)=>{if(!_0x260e1f['consumable']['test'](_0x93178f['markerRange'],_0x19ae08['name']))return;const _0x5b8aba=_0x93178f['markerRange']['getWalker'](),_0x3e0a3e=_0x93178f['markerRange']['start'],_0x3a95cb=_0x2370ea['model']['schema'];let _0x694c9=null,_0x31a7c2=null,_0x3b7534=!0x1,_0x4bf405=!0x1;for(const _0x485514 of _0x5b8aba){const _0x2c4f3c=_0x485514['item'];_0x3b7534=_0x3b7534||_0x3a95cb['isContent'](_0x2c4f3c);const _0x55143c=_0x260e1f['mapper']['toViewElement'](_0x2c4f3c);if(_0x55143c&&_0x55143c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x485514['type']&&(_0x3a95cb['isBlock'](_0x2c4f3c)&&!_0x3a95cb['isLimit'](_0x2c4f3c)&&(_0x2c4f3c['nextSibling']||_0x3e0a3e['isAtEnd']?_0x694c9&&_0x694c9['parent']==_0x2c4f3c||(_0x694c9=_0x2c4f3c,_0x4df167(_0x485514['previousPosition']),_0x4bf405=!0x0):_0x31a7c2=_0x31a7c2||_0x485514['previousPosition']));}function _0x4df167(_0x145fbe){const _0x22ab9e=_0x260e1f['mapper']['toViewPosition'](_0x145fbe),_0x556fc6=_0x260e1f['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3d57a4});_0x260e1f['writer']['insert'](_0x22ab9e,_0x556fc6),_0x260e1f['mapper']['bindElementToMarker'](_0x556fc6,_0x93178f['markerName']);}_0x3b7534||_0x4bf405||!_0x31a7c2||_0x4df167(_0x31a7c2);};}var Ft=class extends _0x34f9e4{constructor(_0x47c885){super(_0x47c885);const _0x366186=_0x47c885['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x366186,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x366186,'change:isEnabled',()=>this['refresh']());}execute(){const _0xa67ba1=this['editor'],_0x4f6bd8=_0xa67ba1['plugins']['get'](Pt),_0x19540c=_0x4f6bd8['isReady']?_0x4f6bd8['diff']['newRevisionId']:null;_0xa67ba1['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x19540c);}['refresh'](){const {isReady:_0x48446e,isEnabled:_0x415bd4,repository:_0xf7f564,diff:_0x2d931e}=this['editor']['plugins']['get'](Pt),_0x15e6b2=_0x2d931e&&_0xf7f564['getLaterVisibleRevision'](_0x2d931e['newRevisionId']);this['isEnabled']=_0x48446e&&_0x415bd4&&Boolean(_0x15e6b2);}},$t=class extends _0x34f9e4{_step;constructor(_0xf59eb9,{direction:_0x2a860b}){super(_0xf59eb9);const _0x578946=_0xf59eb9['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x2a860b?0x1:-0x1,this['listenTo'](_0x578946,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x578946,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x578946,'change:activeChange',()=>this['refresh']());}execute(){const _0x404456=this['editor'],_0x280180=_0x404456['plugins']['get'](Pt),{isNavigationMode:_0x17069e,currentChangeNumber:_0x2cb7be}=_0x280180;let _0x1fcaa0;if(_0x280180['activeChange']=_0x17069e?_0x280180['diff']['changes']['get'](_0x2cb7be+this['_step']):_0x280180['diff']['changes']['first'],_0x280180['activeChange']['data']['isOnRoot'])_0x1fcaa0=_0x404456['editing']['view']['getDomRoot'](_0x280180['activeChange']['rootName']);else{const _0x1b0a16=_0x404456['model']['markers']['get']('revision:'+_0x280180['activeChange']['id']);_0x1fcaa0=_0x5a9bc3(_0x404456['editing'],_0x1b0a16);}_0x164b2d({'target':_0x1fcaa0,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x51fc8c,currentChangeNumber:_0x5921c0,numberOfChanges:_0xea79cb,isReady:_0x541d58,isEnabled:_0x1a5781}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x1a5781&&_0x541d58&&_0xea79cb)&&(!_0x51fc8c||(0x1===this['_step']?_0x5921c0<_0xea79cb-0x1:_0x5921c0>0x0));}},Bt=class extends dt{constructor(_0x201037){super(_0x201037);const _0x2227a2=this['bindTemplate'],_0x33dc6b=new _0x5c3bd6(_0x201037),_0x514f8e=new _0x5c3bd6(_0x201037);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',(_0x5e013b,_0x527c8b)=>_0x5e013b&&_0x527c8b>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2c6705,_0x1cb75f,_0x55596d,_0x1784f6)=>{if(!_0x2c6705)return kt(_0x201037,'Loading...');if(!_0x55596d)return kt(_0x201037,'No\x20changes');const _0x5c5cc0=kt(_0x201037,'NUMBER_OF_CHANGES',_0x55596d);return _0x1784f6?kt(_0x201037,'X_OF_Y_CHANGES',[_0x1cb75f+0x1,_0x55596d]):_0x5c5cc0;}),_0x33dc6b['set']({'label':kt(_0x201037,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x6cb6a3}),_0x514f8e['set']({'label':kt(_0x201037,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1aafad}),_0x33dc6b['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x514f8e['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x33dc6b['on']('execute',()=>this['fire']('execute','backward')),_0x514f8e['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',_0x2227a2['if']('_isStatusLabelVisible','ck-hidden',_0xa41e7f=>!_0xa41e7f)]},'children':[{'text':_0x2227a2['to']('isNavigationMode',_0xe7743c=>_0xe7743c?kt(_0x201037,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x201037,'Total')+':\x20')}]},{'text':_0x2227a2['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x33dc6b,_0x514f8e]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x372c9a{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1dccd4=this['editor']['editing']['view'];_0x1dccd4['change'](_0x34f082=>{for(const _0x193801 of _0x1dccd4['document']['roots'])_0x34f082['addClass'](jt,_0x193801);});}['hide'](){const _0x48755c=this['editor']['editing']['view'];_0x48755c['change'](_0x544296=>{for(const _0x47db44 of _0x48755c['document']['roots'])_0x544296['removeClass'](jt,_0x47db44);});}},Kt=class extends _0x372c9a{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0xf5eafd=this['editor'],_0xa193da=_0xf5eafd['plugins']['get'](Pt),_0x93a36d=_0xf5eafd['plugins']['get'](Gt);_0xf5eafd['ui']['componentFactory']['add']('exitToEditing',_0x20cffb=>{const _0x198750=new _0x5c3bd6(_0x20cffb);return _0x198750['set']({'label':kt(_0x20cffb,'Back\x20to\x20editing'),'icon':_0x30d045,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x198750,'execute',()=>{_0xf5eafd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x198750;}),_0xf5eafd['ui']['componentFactory']['add']('restoreRevision',_0x45e2b3=>{const _0x8685e7=new _0x5c3bd6(_0x45e2b3);return _0x8685e7['set']({'label':kt(_0x45e2b3,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x8685e7['bind']('isEnabled')['to'](_0xf5eafd['commands']['get']('restoreRevision')),this['listenTo'](_0x8685e7,'execute',()=>_0xf5eafd['execute']('restoreRevision')),_0x8685e7;}),_0xf5eafd['ui']['componentFactory']['add']('changesNavigation',_0x500cfb=>{const _0x1e49b7=new Bt(_0x500cfb),_0x6e40f1=_0xf5eafd['commands']['get']('showPreviousChange'),_0x43f7d2=_0xf5eafd['commands']['get']('showNextChange');return _0x1e49b7['bind']('isBackwardNavigationEnabled')['to'](_0x6e40f1,'isEnabled'),_0x1e49b7['bind']('isForwardNavigationEnabled')['to'](_0x43f7d2,'isEnabled'),_0x1e49b7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xa193da),this['listenTo'](_0x1e49b7,'execute',(_0x5134a4,_0x34adce)=>{_0xf5eafd['execute']('forward'===_0x34adce?'showNextChange':'showPreviousChange');}),_0x1e49b7;}),_0x93a36d['show'](),_0xa193da['on']('change:isReady',(_0x40c59a,_0x99cff8,_0x5b34fc)=>{_0x5b34fc?_0x93a36d['hide']():_0x93a36d['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x5a8d33,_0x679d5e){super(_0x5a8d33,_0x679d5e);const _0x187d90=this['bindTemplate'];this['set']({'label':kt(_0x5a8d33,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x5a8d33,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x187d90['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x4c0bcb(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x4141ba=this['fieldView']['element'];this['_tooltipString']=_0x4141ba['scrollWidth']>_0x4141ba['clientWidth']&&_0x4141ba['value']||'';}},Yt=class extends dt{constructor(_0x8262dd,_0x40b7cf,_0x43ad41){super(_0x8262dd);const _0x6551e7=new _0x51d124();_0x6551e7['set']({'content':_0x35d01a,'viewBox':'0\x200\x2011\x2010'});const _0x3f7159=['ck','ck-revision-history-sidebar__revision-author'];_0x43ad41&&_0x3f7159['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3c61f3=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x8262dd,_0x43ad41?'Revision\x20creator':'Revision\x20author')},'children':[_0x6551e7,_0x40b7cf['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x3f7159},'children':_0x3c61f3});}};function Jt(_0x20b558,_0xcbda11){const _0x522f6c=_0x20b558['bindTemplate'],_0x5aabea=_0x20b558['locale'],_0x27217e=vt(_0x5aabea);_0x27217e['panelPosition']='sw';const _0x43bce1=function(_0x53e911,_0x1f3edb){const _0xd69217=function(_0x330ae5,_0x2042d9){const _0x283886=_0x330ae5['locale'],_0x21d5fa={'Compare\x20against\x20selected':kt(_0x283886,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x283886,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x283886,'Restore\x20this\x20revision')};return _0x2042d9['map'](_0x287ebf=>{const _0x29d8b8=_0x21d5fa[_0x287ebf['name']];return _0x29d8b8&&_0x29d8b8!==_0x287ebf['name']&&(_0x287ebf['name']=_0x29d8b8),_0x287ebf;});}(_0x53e911,_0x1f3edb),_0x1b2edd=new _0x58c1b7();for(const _0x474cb2 of _0xd69217){const _0x3664ff={'type':'button','model':new ut({'label':_0x474cb2['name'],'class':_0x474cb2['class'],'withText':!0x0,'role':'menuitem','_action':_0x474cb2['action']})};_0x3664ff['model']['bind']('isEnabled')['to'](_0x53e911,'isActionsDropdownOpen',_0xe99e7c=>'function'!=typeof _0x474cb2['isEnabled']||(!_0xe99e7c||_0x474cb2['isEnabled'](_0x53e911))),_0x1b2edd['add'](_0x3664ff);}return _0x1b2edd;}(_0x20b558,_0xcbda11);return _0x20b558['bind']('isActionsDropdownOpen')['to'](_0x27217e,'isOpen'),_0x27217e['buttonView']['set']({'label':kt(_0x5aabea,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1bbd99}),_0x27217e['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x522f6c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x522f6c['to'](_0x2a2409=>_0x2a2409['stopPropagation']())}}),_0x27217e['on']('execute',_0x3930cf=>{_0x20b558['isReady']&&'function'==typeof _0x3930cf['source']['_action']&&_0x3930cf['source']['_action'](_0x20b558);}),ft(_0x27217e,_0x43bce1,{'role':'menu'}),_0x27217e['listenTo'](_0x20b558,'change:isActionsDropdownOpen',(_0x4445ee,_0x3c3eda,_0x3c82b5)=>{if(_0x3c82b5)for(const _0x5bdd96 of _0x27217e['listView']['items']){const _0x375ada=_0x5bdd96['children']['first'],_0xc6ab01=_0xcbda11['find'](_0x58f914=>_0x58f914['action']===_0x375ada['_action'])['isVisible'];_0x5bdd96['isVisible']=void 0x0===_0xc6ab01||_0xc6ab01(_0x20b558);}}),_0x27217e;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x2957b7(dt);var Xt=class extends Wt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0x14da16,_0x355c3b,_0x1d3565,_0x132d3c,_0x1ba1a1=!0x1){super(_0x14da16);const _0x45e740=this['bindTemplate'],_0x550965=function(_0x46a19d,_0x8531c0){const _0x50362c=Array['from'](_0x8531c0['authors'])['filter'](_0x2c2c8a=>_0x2c2c8a!=_0x8531c0['creator']);return _0x8531c0['creator']&&_0x50362c['unshift'](_0x8531c0['creator']),_0x50362c['map'](_0x5222e4=>new Yt(_0x46a19d,_0x5222e4,_0x5222e4==_0x8531c0['creator']));}(_0x14da16,_0x355c3b);this['id']=_0x355c3b['id'],this['_revision']=_0x355c3b,this['_requireRevisionName']=_0x132d3c,this['bind']('_isAiGenerated')['to'](_0x355c3b,'attributes',_0x101cbe=>!(!_0x101cbe||!_0x101cbe['@ai'])),this['bind']('name','createdAt')['to'](_0x355c3b),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0xf92eb7=>{return _0x1aea5f=_0x14da16['uiLanguage'],(_0x4974c3=_0xf92eb7)['toLocaleDateString'](_0x1aea5f,{'month':'long','day':'numeric'})+',\x20'+_0x4974c3['toLocaleTimeString'](_0x1aea5f,{'hour':'numeric','minute':'numeric'});var _0x1aea5f,_0x4974c3;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new qt(_0x14da16,gt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x96722c=>_0x96722c||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x545582,_0x58b205)=>_0x545582&&_0x58b205),this['revisionActionsView']=_0x1d3565&&_0x1d3565['length']?Jt(this,_0x1d3565):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x1ba1a1?this['_createAiPillView'](_0x14da16):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x45e740['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x45e740['if']('isEnabled','ck-disabled',_0x1b42ea=>!_0x1b42ea),_0x45e740['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x45e740['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x45e740['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x45e740['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x550965}]},..._0x1ba1a1?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x45e740['if']('_isAiGenerated','ck-hidden',_0x421697=>!_0x421697)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x45e740['to'](_0x294ef7=>{_0x294ef7['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x4d77ed){const _0xae281d=new _0x4198e5(_0x4d77ed);return _0xae281d['set']({'icon':_0x37a00,'label':kt(_0x4d77ed,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':kt(_0x4d77ed,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0xae281d['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0xae281d;}['render'](){super['render']();const _0x490d03=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x490d03,'change',()=>{this['_requireRevisionName']&&!_0x490d03['value']||this['fire']('setName',{'id':this['id'],'name':_0x490d03['value']}),_0x490d03['value']||(_0x490d03['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Qt(_0x2bc280,_0x1de1b0){const _0x4c1a59=wt['fromJSDate'](_0x2bc280)['setLocale'](_0x1de1b0),_0x12ed15=wt['local'](),_0x4ef63f=_0x12ed15['minus']({'days':0x1})['startOf']('day');let _0x29be69,_0x4da8a3;return _0x4c1a59['hasSame'](_0x12ed15,'day')?(_0x29be69=_0x4c1a59['startOf']('day')['toJSDate'](),_0x4da8a3=_0x4c1a59['toRelativeCalendar']()):_0x4c1a59['hasSame'](_0x4ef63f,'day')?(_0x29be69=_0x4ef63f['toJSDate'](),_0x4da8a3=_0x4c1a59['toRelativeCalendar']()):_0x4c1a59['hasSame'](_0x12ed15,'week')?(_0x29be69=_0x4c1a59['startOf']('week')['toJSDate'](),_0x4da8a3=_0x4c1a59['weekdayLong']||''):_0x4c1a59['hasSame'](_0x12ed15,'year')?(_0x29be69=_0x4c1a59['startOf']('month')['toJSDate'](),_0x4da8a3=_0x4c1a59['monthLong']||''):(_0x29be69=_0x4c1a59['startOf']('year')['toJSDate'](),_0x4da8a3=String(_0x4c1a59['year'])),{'startDate':_0x29be69,'localizedPeriodName':_0x4da8a3};}var zt=class extends dt{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x57e20e,_0x5232b4,_0x198099,_0x2a0663,_0x38a3ef){super(_0x57e20e);const _0x3c246b=Qt(_0x5232b4,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5232b4,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x198099,this['_requireRevisionName']=_0x2a0663,this['_showAISource']=_0x38a3ef,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':_0x3c246b}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x34ede4){const _0x170c66=new Xt(this['locale'],_0x34ede4,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x170c66);}['removeRevision'](_0x13fe92){const _0x5b8844=this['revisionViews']['find'](_0x2bbcfb=>_0x2bbcfb['id']===_0x13fe92['id']);this['revisionViews']['remove'](_0x5b8844);}},Zt=class extends dt{constructor(_0x493360){super(_0x493360);const _0x82e5ff=new _0x51d124();_0x82e5ff['content']=_0x58846a,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x82e5ff,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[kt(_0x493360,'Revision\x20history')]}]});}},ti=class extends dt{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x565785,_0x435e33,_0x23851e,_0x5cde17,_0x22f048){super(_0x565785);const _0x41f82f=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x435e33,this['_revisionActions']=_0x23851e,this['_requireRevisionName']=_0x5cde17,this['_showAISource']=_0x22f048,this['on']('select',(_0x39d8f7,_0x3fd96f)=>{this['fire']('revisionSelected',_0x3fd96f);}),this['on']('setName',(_0x544137,_0x26ca13)=>{this['fire']('revisionSetName',_0x26ca13);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Zt(_0x565785),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x41f82f['if']('isEnabled','ck-disabled',_0x53d86d=>!_0x53d86d)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x364501 of this['_revisions'])this['_addRevision'](_0x364501);this['_revisions']['on']('add',(_0x158949,_0x5f2307)=>{this['_addRevision'](_0x5f2307);}),this['_revisions']['on']('remove',(_0x3a3a43,_0x489957)=>{this['_removeRevision'](_0x489957);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x3c0da2=>_0x3c0da2['revisionViews']['map'](_0x5c16ac=>_0x5c16ac))['flat']();}selectRevision(_0x5e3e3a){for(const _0x4968de of this['revisionViews'])_0x5e3e3a&&_0x5e3e3a['id']===_0x4968de['id']?_0x4968de['select']():_0x4968de['deselect']();}highlightRevisions(_0x80636e){for(const _0x1649cd of this['revisionViews'])_0x80636e['some'](({id:_0x3e4c8d})=>_0x3e4c8d===_0x1649cd['id'])?_0x1649cd['highlight']():_0x1649cd['unhighlight']();}['_addRevision'](_0xd307ac){const _0x1ed5e8=Qt(_0xd307ac['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x549bb1=this['_getTimePeriodViewByStartDate'](_0x1ed5e8);_0x549bb1||(_0x549bb1=new zt(this['locale'],_0x1ed5e8,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x549bb1)),_0x549bb1['addRevision'](_0xd307ac);}['_removeRevision'](_0x53c61f){const _0x52b980=Qt(_0x53c61f['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x52b980)['removeRevision'](_0x53c61f);}_getTimePeriodViewByStartDate(_0x53bf45){return this['timePeriodViews']['find'](_0x35848b=>_0x35848b['startDate']['getTime']()===_0x53bf45['getTime']());}},ii=class RevisionsSidebar extends _0x372c9a{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(
|
|
30
|
-
_0x23962d(_0x4586a5);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5c5e40,_0xcc4915){super(_0xcc4915),this['sourceElement']=_0x5c5e40,this['model']['document']['createRoot']();const _0x326399=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x326399);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x4813ea,_0x316d73){const _0x4eaca1=new this(_0x4813ea,_0x316d73);return await _0x4eaca1['initPlugins'](),await _0x4eaca1['ui']['init'](_0x4813ea),await _0x4eaca1['data']['init'](_0x4eaca1['config']['get']('initialData')||''),_0x4eaca1['fire']('ready'),_0x4eaca1;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x149c71{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bc37f){super(_0x5bc37f),this['result']='end',_0x5bc37f['editing']['view']['_overlayModeHint']='auto',_0x5bc37f['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x149c71{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x55fa9f){if(super(_0x55fa9f),!this['editor']['config']['get']('revisionHistory'))throw new _0x2e30a8('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x208342=>this['_showRevisionViewer']({..._0x208342,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x481ff3=>this['_closeRevisionViewer'](_0x481ff3)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3c382f=>this['_restoreRevision'](_0x3c382f)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x3e0b8e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3e0b8e;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x1e70dc){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1e70dc);}getRevision(_0x1c5bbe){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1c5bbe);}getRevisions(_0x4feab0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4feab0||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x4f5b85=this['editor'],_0xd44dac=_0x5cb3d0(_0x4f5b85,ai),_0x2cbf0e=_0x4f5b85['plugins']['get']('RevisionTracker'),_0x369f5f=_0x4f5b85['plugins']['get'](_0x1b7fe0)['users'];return _0xd44dac['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0xd44dac['lazyRoots'],(_0xd44dac['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x149c71{static get requires(){return[Pt,_0x1b7fe0];}init(){const _0x53bee9=this['editor']['plugins']['get'](_0x1b7fe0);for(const _0xe93fc6 of _0x369f5f)_0xe93fc6['isAnonymous']||_0x53bee9['getUser'](_0xe93fc6['id'])||_0x53bee9['addUser'](_0xe93fc6);const _0x48ab82=_0x2cbf0e['repository']['getRevisions']();let _0x567432=null;const _0x14138f=this['editor']['plugins']['get']('RevisionViewer');if(_0x14138f['adapter']=_0x2cbf0e['adapter'],_0x14138f['bind']('isEnabled')['to'](_0x2cbf0e),_0x4f5b85['plugins']['has']('CommentsRepository')){const _0x172070=_0x4f5b85['plugins']['get']('CommentsRepository');_0x14138f['_getVisibleCommentThreadIds']=()=>new Set(_0x172070['getCommentThreads']()['filter'](_0x13ff83=>!_0x13ff83['isResolved'])['map'](_0x5be4b6=>_0x5be4b6['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4f5b85,'isReadOnly',_0xa157a8=>!_0xa157a8);for(const _0x5a37c5 of _0x48ab82){const _0x314eba=null===_0x5a37c5['creator'];if(_0x314eba&&_0x5a37c5['toVersion']===_0x5a37c5['fromVersion'])continue;const _0x5383ec=_0x5a37c5['toJSON']();_0x14138f['addRevisionData'](_0x5383ec,(_0xf518f8,_0x509b04,_0x595600)=>{if(_0x314eba){if(_0x567432)_0x567432['_update'](_0xf518f8,_0x509b04);else{if(!_0x509b04){const _0x55492b=_0x595600['toJSON']();_0x55492b['id']=_0x164a82(),_0x2cbf0e['saveRevision'](_0x55492b,_0x595600['toVersion'])['then'](_0x2af74c=>{_0x567432=_0x2af74c;});}}}else _0x5a37c5['_update'](_0xf518f8,_0x509b04);});}}},ii),_0xd44dac);}['_enhanceShowRevisionViewerCallback'](){const _0x30a65f=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4efce0=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4efce0['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2c623e=this['editor']['plugins']['get']('Dialog');_0x2c623e['isOpen']&&_0x2c623e['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x57fdb4=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x39d5b7 of _0x57fdb4)_0x39d5b7['class']=_0x39d5b7['class']?_0x39d5b7['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x22bd99=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x22bd99&&_0x22bd99['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xb21269=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xb21269&&_0xb21269['setAttribute']('tabindex','-1');}}const _0xce7509=this['_getRevisionViewerEditorConfig']();return _0x30a65f(_0xce7509)['then'](_0x30492f=>(this['_viewerEditor']=_0x30492f,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'),_0x30492f))['catch'](_0x279dfd=>(console['error'](_0x279dfd),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x199f3d=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 _0x5632f0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4a82e9 of _0x5632f0)_0x4a82e9['class']='ck-tab-panel_disabled'===_0x4a82e9['class']?'':_0x4a82e9['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x10ad86=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x10ad86&&_0x10ad86['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x196dee=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x196dee&&_0x196dee['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x199f3d(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2b388c=this['editor']['plugins']['get']('Annotations');_0x2b388c['refreshVisibility'](),_0x2b388c['refreshPositioning']();}});});}['_showRevisionViewer'](_0x511fe9){const _0x3a02b0=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1c4dc4=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x25293d=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x25293d,_0x511fe9)['then'](_0x1b92af=>(_0x1c4dc4['style']['display']='block',_0x3a02b0['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1b92af));}['_closeRevisionViewer'](_0x4eca93){const _0x40f210=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x40f210['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4eca93['destroy']();}async _restoreRevision(_0x39df13){const _0x5c991b=this['editor'],_0x9846a5=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x4531b0=_0x5c991b['plugins']['get']('RevisionTracker'),_0x127b49=_0x5c991b['plugins']['get']('RevisionHistoryUtils'),_0x54f576=_0x9846a5['repository']['getRevision'](_0x39df13);let _0x3374e5,_0x569225,_0x247241;try{await _0x127b49['loadRevisionData'](_0x54f576,this['adapter']),_0x3374e5=_0x127b49['getRevisionDocumentData'](_0x54f576),_0x569225=_0x127b49['getRevisionRootsAttributes'](_0x54f576);}catch(_0x1762e3){return void console['error'](_0x1762e3);}_0x5c991b['model']['change'](_0xe0c5dd=>{for(const _0x39220e of Array['from'](_0x5c991b['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xe0c5dd['removeMarker'](_0x39220e);}),_0x9846a5['isReady']=!0x1,_0x5c991b['model']['enqueueChange'](_0x4fbd6d=>{_0x4fbd6d['setSelection'](null),_0x4fbd6d['removeSelectionAttribute'](_0x5c991b['model']['document']['selection']['getAttributeKeys']());const _0x4482a5=Object['keys'](_0x3374e5);for(const _0x2532d8 of _0x5c991b['model']['document']['roots'])'$graveyard'!=_0x2532d8['rootName']&&_0x2532d8['isAttached']()&&!_0x4482a5['includes'](_0x2532d8['rootName'])&&_0x4fbd6d['detachRoot'](_0x2532d8);for(const _0x2b02a2 of _0x4482a5){let _0x173030=_0x5c991b['model']['document']['getRoot'](_0x2b02a2);if(!_0x173030||!_0x173030['isAttached']()){const _0x41e700=_0x54f576['diffData']?.[_0x2b02a2]?.['rootElementName']||'$root';_0x173030=_0x4fbd6d['addRoot'](_0x2b02a2,_0x41e700);}const _0x1dec0a=_0x569225[_0x2b02a2],_0x1f3627=Object['keys'](_0x1dec0a),_0x50eb8e=_0x3374e5[_0x2b02a2];for(const _0x5a8eba of _0x173030['getAttributeKeys']())_0x1f3627['includes'](_0x5a8eba)||_0x4fbd6d['removeAttribute'](_0x5a8eba,_0x173030);for(const _0x233e7b of _0x1f3627)_0x4fbd6d['setAttribute'](_0x233e7b,_0x569225[_0x2b02a2][_0x233e7b],_0x173030);_0x4fbd6d['remove'](_0x4fbd6d['createRangeIn'](_0x173030)),_0x4fbd6d['insert'](_0x5c991b['data']['parse'](_0x50eb8e,_0x173030),_0x173030,0x0);}});const _0x4ed5cc=kt(_0x5c991b['locale'],'Restored');if(_0x54f576['name'])_0x247241=-0x1==_0x54f576['name']['indexOf'](_0x4ed5cc)?_0x4ed5cc+':\x20'+_0x54f576['name']:_0x54f576['name'];else _0x247241=_0x4ed5cc+':\x20'+(_0x54f576['createdAt']['toLocaleDateString'](_0x5c991b['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x54f576['createdAt']['toLocaleTimeString'](_0x5c991b['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x4531b0['saveRevision']({'name':_0x247241}),_0x9846a5['isReady']=!0x0,_0x5c991b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|
|
29
|
+
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(_0x3409c1){super(_0x3409c1),this['_revisionViewer']=_0x3409c1['plugins']['get'](Pt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x2c47c0=this['_revisionsRepository']['_revisions'],_0x3cda3a=this['_createRevisionActions'](),_0x28c0d6=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ti(this['editor']['locale'],_0x2c47c0,_0x3cda3a,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',(_0x9e6676,_0x10a6f4)=>{_0x10a6f4['revisionViews']['on']('add',(_0x5cd5d4,_0x1903fd)=>{_0x1903fd['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)),_0x28c0d6['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0xed2347=this['_revisionsRepository']['getRevision'](0x0);if(_0xed2347){const _0x2e8527=this['_revisionsRepository']['getEarlierVisibleRevision'](_0xed2347['id']);this['_revisionViewer']['compare'](_0xed2347,_0x2e8527);}}_handleRevisionSelected(_0x50ee7b,_0x28c4a3){const _0xfee61d=this['_revisionsRepository']['getRevision'](_0x28c4a3['id']),_0x15cf2c=this['_revisionsRepository']['getEarlierVisibleRevision'](_0xfee61d['id']);this['_revisionViewer']['compare'](_0xfee61d,_0x15cf2c);}_handleRevisionSetName(_0x5972b6,_0x221182){this['_revisionsRepository']['getRevision'](_0x221182['id'])['setName'](_0x221182['name']);}['_handleDiffChange'](_0x3bd3c6,_0x50ecc1,_0x315b9d){const _0x5ec651=this['_revisionsRepository']['getRevisionsInDiff'](_0x315b9d);_0x5ec651['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x5ec651),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x5ec651[0x0]));}_createRevisionActions(){const _0x5f2cdf=this['editor'],_0x1db780=RevisionsSidebar['availableRevisionActions'],_0xe66b5d=_0x5f2cdf['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0xe66b5d['length'])return _0xe66b5d['map'](_0x5c2c4b=>{const _0xdff467='string'==typeof _0x5c2c4b?Object['assign']({},_0x1db780[_0x5c2c4b]):_0x5c2c4b;return _0xdff467['action']=_0xdff467['action']['bind'](this,_0x5f2cdf),_0xdff467['isVisible']&&(_0xdff467['isVisible']=_0xdff467['isVisible']['bind'](this,_0x5f2cdf)),_0xdff467;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1664a1},_0x12093c)=>{const _0x2acb8b=_0x1664a1['get'](Pt),_0x2513e9=_0x2acb8b['repository'];let _0x48ca8f=_0x2acb8b['diff']['newRevisionId'],_0x264b0e=_0x12093c['id'];_0x2513e9['getIndex'](_0x48ca8f)>_0x2513e9['getIndex'](_0x264b0e)&&([_0x48ca8f,_0x264b0e]=[_0x264b0e,_0x48ca8f]),_0x2acb8b['compare'](_0x48ca8f,_0x264b0e);},'isVisible':({plugins:_0x2348d6},_0x4c72e4)=>{const _0x5130ac=_0x2348d6['get'](Pt);return!(_0x5130ac['repository']['getRevisionsInDiff'](_0x5130ac['diff'])['length']>0x2)&&!_0x4c72e4['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x89f8ee,{id:_0x31b8db})=>{_0x89f8ee['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x31b8db);},'isVisible':({plugins:_0xebe256},_0x541060)=>!!_0xebe256['get'](Pt)['repository']['getLaterVisibleRevision'](_0x541060['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x2f7984},{id:_0x1a5817,revisionNameView:_0x31abd2})=>{const _0x3586a1=_0x2f7984['get'](Pt),_0x1425da=_0x3586a1['repository']['getEarlierVisibleRevision'](_0x1a5817);_0x3586a1['compare'](_0x1a5817,_0x1425da),_0x31abd2['focus'](),_0x31abd2['fieldView']['select']();}}};}var si=class extends _0x22ae71{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x12d89e,_0x593c1c){super(_0x12d89e),this['_view']=_0x593c1c,this['_toolbarConfig']=mt(_0x12d89e['config']['get']('toolbar')),this['_elementReplacer']=new _0x109d06();}get element(){return this['view']['element'];}init(_0x3f8357){const _0x24b99d=this['editor'],_0x3b72b5=this['view'],_0x13aaba=_0x24b99d['editing']['view'],_0x437bd9=_0x3b72b5['editable'];_0x437bd9['name']=_0x13aaba['document']['getRoot']()['rootName'],_0x3b72b5['render']();const _0x451547=_0x437bd9['element'];this['setEditableElement'](_0x437bd9['name'],_0x451547),_0x3b72b5['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x13aaba['attachDomRoot'](_0x451547),this['_elementReplacer']['replace'](_0x3f8357,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x7ee5a1=this['view'],_0x5755ff=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5755ff['detachDomRoot'](_0x7ee5a1['editable']['name']),_0x7ee5a1['destroy']();}_initToolbar(){const _0x4df4ad=this['view'];_0x4df4ad['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4df4ad['stickyPanel']['limiterElement']=_0x4df4ad['element'],_0x4df4ad['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x73ad01})=>_0x73ad01),_0x4df4ad['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4df4ad['toolbar']);}},ni=class extends _0x517ea8{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x52071a,_0xcb6c72,_0x1c5eed={}){super(_0x52071a),this['stickyPanel']=new ht(_0x52071a),this['toolbar']=new lt(_0x52071a,{'shouldGroupWhenFull':_0x1c5eed['shouldToolbarGroupWhenFull']}),this['_editable']=new tt(_0x52071a,_0xcb6c72);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const oi=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x55e211(_0x130f17);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5af24d,_0x297914){super(_0x297914),this['sourceElement']=_0x5af24d,this['model']['document']['createRoot']();const _0x20595c=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x20595c);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x699b5c,_0x29b141){const _0x23502a=new this(_0x699b5c,_0x29b141);return await _0x23502a['initPlugins'](),await _0x23502a['ui']['init'](_0x699b5c),await _0x23502a['data']['init'](_0x23502a['config']['get']('initialData')||''),_0x23502a['fire']('ready'),_0x23502a;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x372c9a{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x27e416){super(_0x27e416),this['result']='end',_0x27e416['editing']['view']['_overlayModeHint']='auto',_0x27e416['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x372c9a{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x4f6773){if(super(_0x4f6773),!this['editor']['config']['get']('revisionHistory'))throw new _0x331064('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4c10e1=>this['_showRevisionViewer']({..._0x4c10e1,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x56126c=>this['_closeRevisionViewer'](_0x56126c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3a73f3=>this['_restoreRevision'](_0x3a73f3)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0xe7968e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0xe7968e;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x550814){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x550814);}getRevision(_0xcb7e54){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xcb7e54);}getRevisions(_0x45d409){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x45d409||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x28f711=this['editor'],_0x261b5c=_0x17a015(_0x28f711,ai),_0x256636=_0x28f711['plugins']['get']('RevisionTracker'),_0x2e7507=_0x28f711['plugins']['get'](_0x4db7e9)['users'];return _0x261b5c['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x261b5c['lazyRoots'],(_0x261b5c['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x372c9a{static get requires(){return[Pt,_0x4db7e9];}init(){const _0x4c5cd3=this['editor']['plugins']['get'](_0x4db7e9);for(const _0x3e84a0 of _0x2e7507)_0x3e84a0['isAnonymous']||_0x4c5cd3['getUser'](_0x3e84a0['id'])||_0x4c5cd3['addUser'](_0x3e84a0);const _0x3870e9=_0x256636['repository']['getRevisions']();let _0x1d4e44=null;const _0x2b05f9=this['editor']['plugins']['get']('RevisionViewer');if(_0x2b05f9['adapter']=_0x256636['adapter'],_0x2b05f9['bind']('isEnabled')['to'](_0x256636),_0x28f711['plugins']['has']('CommentsRepository')){const _0x1fb766=_0x28f711['plugins']['get']('CommentsRepository');_0x2b05f9['_getVisibleCommentThreadIds']=()=>new Set(_0x1fb766['getCommentThreads']()['filter'](_0x562d24=>!_0x562d24['isResolved'])['map'](_0x267971=>_0x267971['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x28f711,'isReadOnly',_0x3d2b56=>!_0x3d2b56);for(const _0x588b5b of _0x3870e9){const _0x16f8d2=null===_0x588b5b['creator'];if(_0x16f8d2&&_0x588b5b['toVersion']===_0x588b5b['fromVersion'])continue;const _0x4d95b8=_0x588b5b['toJSON']();_0x2b05f9['addRevisionData'](_0x4d95b8,(_0x31be5c,_0x1abe11,_0x38f5fb)=>{if(_0x16f8d2){if(_0x1d4e44)_0x1d4e44['_update'](_0x31be5c,_0x1abe11);else{if(!_0x1abe11){const _0x386fe4=_0x38f5fb['toJSON']();_0x386fe4['id']=_0x2cb4ed(),_0x256636['saveRevision'](_0x386fe4,_0x38f5fb['toVersion'])['then'](_0x5c1d5c=>{_0x1d4e44=_0x5c1d5c;});}}}else _0x588b5b['_update'](_0x31be5c,_0x1abe11);});}}},ii),_0x261b5c);}['_enhanceShowRevisionViewerCallback'](){const _0x451cf8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x69a9d2=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x69a9d2['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x26c656=this['editor']['plugins']['get']('Dialog');_0x26c656['isOpen']&&_0x26c656['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x147b78=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x15fffe of _0x147b78)_0x15fffe['class']=_0x15fffe['class']?_0x15fffe['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x19dee2=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x19dee2&&_0x19dee2['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x572e82=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x572e82&&_0x572e82['setAttribute']('tabindex','-1');}}const _0x539095=this['_getRevisionViewerEditorConfig']();return _0x451cf8(_0x539095)['then'](_0x13bb14=>(this['_viewerEditor']=_0x13bb14,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'),_0x13bb14))['catch'](_0x359c57=>(console['error'](_0x359c57),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x40b31b=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 _0x2de977=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x705eb1 of _0x2de977)_0x705eb1['class']='ck-tab-panel_disabled'===_0x705eb1['class']?'':_0x705eb1['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x53989a=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x53989a&&_0x53989a['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3061f9=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3061f9&&_0x3061f9['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x40b31b(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3fe2bd=this['editor']['plugins']['get']('Annotations');_0x3fe2bd['refreshVisibility'](),_0x3fe2bd['refreshPositioning']();}});});}['_showRevisionViewer'](_0x35253c){const _0xca2a2d=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x66e7d=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3a7f07=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x3a7f07,_0x35253c)['then'](_0x167db0=>(_0x66e7d['style']['display']='block',_0xca2a2d['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x167db0));}['_closeRevisionViewer'](_0x451607){const _0x246982=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x246982['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x451607['destroy']();}async _restoreRevision(_0x262ab7){const _0x4b4868=this['editor'],_0x79c0ed=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xd54563=_0x4b4868['plugins']['get']('RevisionTracker'),_0x5f252b=_0x4b4868['plugins']['get']('RevisionHistoryUtils'),_0x258c16=_0x79c0ed['repository']['getRevision'](_0x262ab7);let _0x2c2d03,_0x241d62,_0x3b1582;try{await _0x5f252b['loadRevisionData'](_0x258c16,this['adapter']),_0x2c2d03=_0x5f252b['getRevisionDocumentData'](_0x258c16),_0x241d62=_0x5f252b['getRevisionRootsAttributes'](_0x258c16);}catch(_0x5e3138){return void console['error'](_0x5e3138);}_0x4b4868['model']['change'](_0x543099=>{for(const _0x2dbbe9 of Array['from'](_0x4b4868['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x543099['removeMarker'](_0x2dbbe9);}),_0x79c0ed['isReady']=!0x1,_0x4b4868['model']['enqueueChange'](_0x1ee770=>{_0x1ee770['setSelection'](null),_0x1ee770['removeSelectionAttribute'](_0x4b4868['model']['document']['selection']['getAttributeKeys']());const _0xf31b18=Object['keys'](_0x2c2d03);for(const _0x426652 of _0x4b4868['model']['document']['roots'])'$graveyard'!=_0x426652['rootName']&&_0x426652['isAttached']()&&!_0xf31b18['includes'](_0x426652['rootName'])&&_0x1ee770['detachRoot'](_0x426652);for(const _0x3ffb6d of _0xf31b18){let _0x1d3dd8=_0x4b4868['model']['document']['getRoot'](_0x3ffb6d);if(!_0x1d3dd8||!_0x1d3dd8['isAttached']()){const _0x21a84f=_0x258c16['diffData']?.[_0x3ffb6d]?.['rootElementName']||'$root';_0x1d3dd8=_0x1ee770['addRoot'](_0x3ffb6d,_0x21a84f);}const _0x3e8744=_0x241d62[_0x3ffb6d],_0xc2e649=Object['keys'](_0x3e8744),_0x452d62=_0x2c2d03[_0x3ffb6d];for(const _0x3dacb5 of _0x1d3dd8['getAttributeKeys']())_0xc2e649['includes'](_0x3dacb5)||_0x1ee770['removeAttribute'](_0x3dacb5,_0x1d3dd8);for(const _0xb92236 of _0xc2e649)_0x1ee770['setAttribute'](_0xb92236,_0x241d62[_0x3ffb6d][_0xb92236],_0x1d3dd8);_0x1ee770['remove'](_0x1ee770['createRangeIn'](_0x1d3dd8)),_0x1ee770['insert'](_0x4b4868['data']['parse'](_0x452d62,_0x1d3dd8),_0x1d3dd8,0x0);}});const _0x4b383f=kt(_0x4b4868['locale'],'Restored');if(_0x258c16['name'])_0x3b1582=-0x1==_0x258c16['name']['indexOf'](_0x4b383f)?_0x4b383f+':\x20'+_0x258c16['name']:_0x258c16['name'];else _0x3b1582=_0x4b383f+':\x20'+(_0x258c16['createdAt']['toLocaleDateString'](_0x4b4868['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x258c16['createdAt']['toLocaleTimeString'](_0x4b4868['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xd54563['saveRevision']({'name':_0x3b1582}),_0x79c0ed['isReady']=!0x0,_0x4b4868['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|