UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 9.01 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x432fe4=_0x5852;function _0x3258(){const _0x40d778=['TrackChangesTableProperties','2640jXHTcb','getSelectionAffectedTableCells','tableBorderStyle','registerBlockAttribute','toUpperCase','discard','handleSuggestionDescription','TableCellPropertiesEditing','data','accept','enableCommand','290eNkapV','21583270NULlgh','22839ODLESn','start','getContainedElement','commandParams','join','getSuggestionCallback','markBlockFormat','batch','tableProperties','nodeAfter','registerDescriptionCallback','9194031FzItGj','table','removeAttribute','4968ZjMAxA','handleDiscardAction','tableHeight','isPremiumPlugin','5704964cilCSs','format','change','tableBorderWidth','_handlePropertyChange','subType','6692440SEgDNG','tableCellProperties','tableCellHorizontalAlignment','tableCellBackgroundColor','TableUtils','FORMAT_','findAncestor','getFirstPosition','isOfficialPlugin','selection','pluginName','get','afterInit','tableCellPadding','_suggestionFactory','registerCustomCallback','9sRGIvS','replace','document','*Format:*\x20change\x20table\x20properties','TablePropertiesEditing','tableCellBorderColor','tableCellBorderStyle','tableAlignment','tableCellVerticalAlignment','tableCellWidth','setAttribute','_$1','editor','tableCellHeight','descriptionFactory','has','tableBackgroundColor','tableWidth','tableBorderColor','getSuggestions','enqueueChange','tableCellBorderWidth','getAttribute','754397EwGqae','formatBlock','*Format:*\x20change\x20table\x20cell\x20properties','plugins','TrackChangesEditing','_registerTablePropertiesAttributes','model','_getSuggestion','registerAttributeLabel','locale'];_0x3258=function(){return _0x40d778;};return _0x3258();}(function(_0x128bfe,_0x225b78){const _0x479579=_0x5852,_0x4ca5a6=_0x128bfe();while(!![]){try{const _0x466620=parseInt(_0x479579(0x1d7))/0x1+parseInt(_0x479579(0x1ed))/0x2*(parseInt(_0x479579(0x1ef))/0x3)+-parseInt(_0x479579(0x1aa))/0x4+parseInt(_0x479579(0x1e2))/0x5*(parseInt(_0x479579(0x1a6))/0x6)+-parseInt(_0x479579(0x1a3))/0x7+-parseInt(_0x479579(0x1b0))/0x8+parseInt(_0x479579(0x1c0))/0x9*(parseInt(_0x479579(0x1ee))/0xa);if(_0x466620===_0x225b78)break;else _0x4ca5a6['push'](_0x4ca5a6['shift']());}catch(_0x1159b2){_0x4ca5a6['push'](_0x4ca5a6['shift']());}}}(_0x3258,0xd63fc));function _0x5852(_0x1fc020,_0x31cf14){const _0x3258cc=_0x3258();return _0x5852=function(_0x5852a9,_0x337d8c){_0x5852a9=_0x5852a9-0x1a0;let _0x179634=_0x3258cc[_0x5852a9];return _0x179634;},_0x5852(_0x1fc020,_0x31cf14);}import{Plugin as _0x37fd1b}from'ckeditor5/src/core.js';import{getTranslation as _0x99fad7}from'../utils/common-translations.js';export class TrackChangesTableProperties extends _0x37fd1b{[_0x432fe4(0x1a0)];[_0x432fe4(0x1b1)];constructor(_0x399da4){const _0xb0f9ea=_0x432fe4;super(_0x399da4),this[_0xb0f9ea(0x1a0)]=[_0xb0f9ea(0x1d2),_0xb0f9ea(0x1e4),_0xb0f9ea(0x1ad),_0xb0f9ea(0x1c7),_0xb0f9ea(0x1d1),_0xb0f9ea(0x1a8),_0xb0f9ea(0x1d0)],this[_0xb0f9ea(0x1b1)]=[_0xb0f9ea(0x1c5),_0xb0f9ea(0x1c6),_0xb0f9ea(0x1d5),_0xb0f9ea(0x1bd),_0xb0f9ea(0x1c9),_0xb0f9ea(0x1cd),_0xb0f9ea(0x1b3),_0xb0f9ea(0x1b2),_0xb0f9ea(0x1c8)];}static get[_0x432fe4(0x1ba)](){const _0xef3772=_0x432fe4;return _0xef3772(0x1e1);}static get[_0x432fe4(0x1b8)](){return!0x0;}static get[_0x432fe4(0x1a9)](){return!0x0;}[_0x432fe4(0x1bc)](){const _0x2fd712=_0x432fe4,_0x3cb8d=this[_0x2fd712(0x1cc)][_0x2fd712(0x1da)][_0x2fd712(0x1bb)](_0x2fd712(0x1db));if(this[_0x2fd712(0x1cc)][_0x2fd712(0x1da)][_0x2fd712(0x1cf)](_0x2fd712(0x1c4))){for(const _0x3b1be4 of this[_0x2fd712(0x1a0)])_0x3cb8d[_0x2fd712(0x1ec)](_0x3b1be4,(_0x56767c,_0x504c09)=>{const _0x4d9781=_0x2fd712,_0x1da45c=this[_0x4d9781(0x1cc)][_0x4d9781(0x1dd)][_0x4d9781(0x1c2)][_0x4d9781(0x1b9)][_0x4d9781(0x1b7)]()[_0x4d9781(0x1b6)](_0x4d9781(0x1a4));this[_0x4d9781(0x1ae)](_0x3b1be4,[_0x1da45c],this[_0x4d9781(0x1a0)],_0x4d9781(0x1a0),_0x56767c,_0x504c09);});_0x3cb8d[_0x2fd712(0x1be)][_0x2fd712(0x1bf)](_0x2fd712(0x1d8),_0x2fd712(0x1a0),_0x2fd712(0x1eb),_0x3cb8d[_0x2fd712(0x1be)][_0x2fd712(0x1f4)](_0x2fd712(0x1d8),null,_0x2fd712(0x1e7))),_0x3cb8d[_0x2fd712(0x1be)][_0x2fd712(0x1bf)](_0x2fd712(0x1d8),_0x2fd712(0x1a0),_0x2fd712(0x1e7),(_0x5454b1,_0xb80193)=>this[_0x2fd712(0x1a7)](this[_0x2fd712(0x1a0)],_0x5454b1,_0xb80193)),_0x3cb8d[_0x2fd712(0x1be)][_0x2fd712(0x1bf)](_0x2fd712(0x1d8),_0x2fd712(0x1a0),_0x2fd712(0x1f3),()=>!0x1);}if(this[_0x2fd712(0x1cc)][_0x2fd712(0x1da)][_0x2fd712(0x1cf)](_0x2fd712(0x1e9))){for(const _0x3a6974 of this[_0x2fd712(0x1b1)])_0x3cb8d[_0x2fd712(0x1ec)](_0x3a6974,(_0x386449,_0xa198e3)=>{const _0x44d073=_0x2fd712,_0x36e4b3=this[_0x44d073(0x1cc)][_0x44d073(0x1da)][_0x44d073(0x1bb)](_0x44d073(0x1b4))[_0x44d073(0x1e3)](this[_0x44d073(0x1cc)][_0x44d073(0x1dd)][_0x44d073(0x1c2)][_0x44d073(0x1b9)]);this[_0x44d073(0x1ae)](_0x3a6974,_0x36e4b3,this[_0x44d073(0x1b1)],_0x44d073(0x1b1),_0x386449,_0xa198e3);});_0x3cb8d[_0x2fd712(0x1be)][_0x2fd712(0x1bf)](_0x2fd712(0x1d8),_0x2fd712(0x1b1),_0x2fd712(0x1eb),_0x3cb8d[_0x2fd712(0x1be)][_0x2fd712(0x1f4)](_0x2fd712(0x1d8),null,_0x2fd712(0x1e7))),_0x3cb8d[_0x2fd712(0x1be)][_0x2fd712(0x1bf)](_0x2fd712(0x1d8),_0x2fd712(0x1b1),_0x2fd712(0x1e7),(_0x360ed9,_0x215bc2)=>this[_0x2fd712(0x1a7)](this[_0x2fd712(0x1b1)],_0x360ed9,_0x215bc2)),_0x3cb8d[_0x2fd712(0x1be)][_0x2fd712(0x1bf)](_0x2fd712(0x1d8),_0x2fd712(0x1b1),_0x2fd712(0x1f3),()=>!0x1);}_0x3cb8d[_0x2fd712(0x1ce)][_0x2fd712(0x1a2)](_0x380089=>this[_0x2fd712(0x1e8)](_0x380089)),this[_0x2fd712(0x1dc)]();}[_0x432fe4(0x1ae)](_0x44e978,_0x3f7f10,_0x57e8ce,_0x589d23,_0x34694d,_0x244c95){const _0x45dab1=_0x432fe4,_0x191537=this[_0x45dab1(0x1cc)][_0x45dab1(0x1da)][_0x45dab1(0x1bb)](_0x45dab1(0x1db));this[_0x45dab1(0x1cc)][_0x45dab1(0x1dd)][_0x45dab1(0x1d4)](_0x244c95[_0x45dab1(0x1f6)],()=>{const _0xc06cad=_0x45dab1;for(const _0x1ba38c of _0x3f7f10){if(this[_0xc06cad(0x1de)](_0x1ba38c,_0x589d23))_0x34694d(_0x244c95);else{const _0x518287={};for(const _0x2b0371 of _0x57e8ce){const _0x4523db=_0x1ba38c[_0xc06cad(0x1d6)](_0x2b0371);void 0x0!==_0x4523db&&(_0x518287[_0x2b0371]=_0x4523db);}_0x34694d(_0x244c95),_0x191537[_0xc06cad(0x1f5)](_0x1ba38c,{'commandParams':[_0x518287]},[],_0x589d23);}}});}[_0x432fe4(0x1a7)](_0x5f560b,_0x181fab,_0x3b448a){const _0x36578d=_0x432fe4,_0x220a62=_0x181fab[0x0][_0x36578d(0x1f0)][_0x36578d(0x1a1)],_0x48ac2f=_0x3b448a[_0x36578d(0x1f2)][0x0];this[_0x36578d(0x1cc)][_0x36578d(0x1dd)][_0x36578d(0x1ac)](_0x507fcb=>{const _0x55c96a=_0x36578d;for(const _0x2e742b of _0x5f560b)void 0x0!==_0x48ac2f[_0x2e742b]?_0x507fcb[_0x55c96a(0x1ca)](_0x2e742b,_0x48ac2f[_0x2e742b],_0x220a62):_0x507fcb[_0x55c96a(0x1a5)](_0x2e742b,_0x220a62);});}[_0x432fe4(0x1e8)](_0x598d8b){const _0x561f47=_0x432fe4;if(_0x598d8b[_0x561f47(0x1ea)])switch(_0x598d8b[_0x561f47(0x1af)]){case _0x561f47(0x1a0):return{'type':_0x561f47(0x1ab),'content':_0x99fad7(this[_0x561f47(0x1cc)][_0x561f47(0x1e0)],_0x561f47(0x1c3))};case _0x561f47(0x1b1):return{'type':_0x561f47(0x1ab),'content':_0x99fad7(this[_0x561f47(0x1cc)][_0x561f47(0x1e0)],_0x561f47(0x1d9))};}}[_0x432fe4(0x1de)](_0x3d782,_0x4957d1){const _0x1447c5=_0x432fe4,_0x4592e5=this[_0x1447c5(0x1cc)][_0x1447c5(0x1da)][_0x1447c5(0x1bb)](_0x1447c5(0x1db));for(const _0xf9ceb8 of _0x4592e5[_0x1447c5(0x1d3)]({'skipNotAttached':!0x0})){const _0x15a733=_0xf9ceb8[_0x1447c5(0x1f1)]();if(_0xf9ceb8[_0x1447c5(0x1af)]===_0x4957d1&&_0x15a733===_0x3d782)return _0xf9ceb8;}return null;}[_0x432fe4(0x1dc)](){const _0x221152=_0x432fe4,_0x2c5b3c=this[_0x221152(0x1cc)][_0x221152(0x1da)][_0x221152(0x1bb)](_0x221152(0x1db)),_0x54d577=[...this[_0x221152(0x1a0)],...this[_0x221152(0x1b1)]];for(const _0x482724 of _0x54d577){const _0x5e4a31=_0x482724[_0x221152(0x1c1)](/([A-Z])/g,_0x221152(0x1cb))[_0x221152(0x1e6)]();_0x2c5b3c[_0x221152(0x1e5)](_0x482724),_0x2c5b3c[_0x221152(0x1ce)][_0x221152(0x1df)](_0x482724,_0x99fad7(this[_0x221152(0x1cc)][_0x221152(0x1e0)],_0x221152(0x1b5)+_0x5e4a31));}}}