@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 7.46 kB
JavaScript
/*
* 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 _0x22ab41=_0x4f11;(function(_0x552031,_0x576498){const _0x1c315b=_0x4f11,_0x1acf45=_0x552031();while(!![]){try{const _0x2b138a=parseInt(_0x1c315b(0x1f4))/0x1*(parseInt(_0x1c315b(0x20e))/0x2)+-parseInt(_0x1c315b(0x212))/0x3+-parseInt(_0x1c315b(0x207))/0x4*(-parseInt(_0x1c315b(0x1ee))/0x5)+-parseInt(_0x1c315b(0x1fa))/0x6*(-parseInt(_0x1c315b(0x20f))/0x7)+-parseInt(_0x1c315b(0x208))/0x8+parseInt(_0x1c315b(0x204))/0x9*(parseInt(_0x1c315b(0x200))/0xa)+parseInt(_0x1c315b(0x1ec))/0xb*(parseInt(_0x1c315b(0x1ff))/0xc);if(_0x2b138a===_0x576498)break;else _0x1acf45['push'](_0x1acf45['shift']());}catch(_0x571ffb){_0x1acf45['push'](_0x1acf45['shift']());}}}(_0x20d1,0x57181));import{CKEditorError as _0xfc57ec,Collection as _0x58942a,FocusTracker as _0x1e5c97}from'ckeditor5/src/utils.js';function _0x20d1(){const _0x30fd7d=['delete','targetRect','clear','661nGOGFW','isFocused','length','innerView','get','has','963918XDaJvJ','focusTracker','_viewToAnnotation','updateTargetRect','change:isFocused','2484WKoCvm','10XrBGUR','_sort','add','getByInnerView','5126229PhFoCy','remove','top','1384172GRoPKb','5447544qjfFLQ','annotationcollection-not-existing-item','destroy','focus','annotationcollection-duplicated-item','_getOrderInContent','168rIrfMs','28zXvLJB','refreshPositioning','getByView','1860513URSsqu','from','_innerViewToAnnotation','focusableElements','listenTo','view','getIndex','_focusTracker','blur','sort','stopListening','2343QWZPkw','left','5weVjJO','fire','set'];_0x20d1=function(){return _0x30fd7d;};return _0x20d1();}function _0x4f11(_0x49828a,_0x465ade){const _0x20d152=_0x20d1();return _0x4f11=function(_0x4f1194,_0x2285f2){_0x4f1194=_0x4f1194-0x1e2;let _0x18a638=_0x20d152[_0x4f1194];return _0x18a638;},_0x4f11(_0x49828a,_0x465ade);}export class AnnotationCollection extends _0x58942a{[_0x22ab41(0x1e3)];[_0x22ab41(0x1fc)];[_0x22ab41(0x1e8)];constructor(_0x588463=[]){const _0x559871=_0x22ab41;super(),this[_0x559871(0x1e3)]=new Map(),this[_0x559871(0x1fc)]=new Map(),this[_0x559871(0x1e8)]=new _0x1e5c97(),this[_0x559871(0x1e8)]['on'](_0x559871(0x1fe),(_0x1f2da8,_0x259bf4,_0x1f5631)=>{const _0x471d3e=_0x559871;_0x1f5631||this[_0x471d3e(0x1ef)](_0x471d3e(0x1e9));});for(const _0x158a9b of _0x588463)this[_0x559871(0x202)](_0x158a9b);}get[_0x22ab41(0x1f5)](){const _0x24310c=_0x22ab41;return this[_0x24310c(0x1e8)][_0x24310c(0x1f5)];}[_0x22ab41(0x202)](_0x5f7c5c){const _0x5f530b=_0x22ab41;if(this[_0x5f530b(0x1f9)](_0x5f7c5c))throw new _0xfc57ec(_0x5f530b(0x20c),null);this[_0x5f530b(0x1e3)][_0x5f530b(0x1f0)](_0x5f7c5c[_0x5f530b(0x1f7)],_0x5f7c5c),this[_0x5f530b(0x1fc)][_0x5f530b(0x1f0)](_0x5f7c5c[_0x5f530b(0x1e6)],_0x5f7c5c);for(const _0x426fd0 of _0x5f7c5c[_0x5f530b(0x1e4)])this[_0x5f530b(0x1e8)][_0x5f530b(0x202)](_0x426fd0);this[_0x5f530b(0x1e5)](_0x5f7c5c[_0x5f530b(0x1e4)],_0x5f530b(0x202),(_0xd3f89b,_0x72cfce)=>{const _0x56d977=_0x5f530b;this[_0x56d977(0x1e8)][_0x56d977(0x202)](_0x72cfce);}),this[_0x5f530b(0x1e5)](_0x5f7c5c[_0x5f530b(0x1e4)],_0x5f530b(0x205),(_0x19b515,_0x20273d)=>{const _0x1d682e=_0x5f530b;this[_0x1d682e(0x1e8)][_0x1d682e(0x205)](_0x20273d);}),this[_0x5f530b(0x1e5)](_0x5f7c5c[_0x5f530b(0x1e6)][_0x5f530b(0x1fb)],_0x5f530b(0x1fe),(_0x1f4917,_0x26db1e,_0xdca380)=>{const _0x1b68be=_0x5f530b;_0xdca380&&this[_0x1b68be(0x1ef)](_0x1b68be(0x20b),_0x5f7c5c);}),_0x5f7c5c[_0x5f530b(0x1fd)]();const _0x49198f=this[_0x5f530b(0x20d)](_0x5f7c5c[_0x5f530b(0x1e6)][_0x5f530b(0x1f2)]);return super[_0x5f530b(0x202)](_0x5f7c5c,_0x49198f);}[_0x22ab41(0x205)](_0x50f2d7){const _0x146958=_0x22ab41;if(!this[_0x146958(0x1f9)](_0x50f2d7))throw new _0xfc57ec(_0x146958(0x209),null);this[_0x146958(0x1eb)](_0x50f2d7[_0x146958(0x1e6)][_0x146958(0x1fb)]),this[_0x146958(0x1eb)](_0x50f2d7[_0x146958(0x1e4)]);for(const _0x2269eb of _0x50f2d7[_0x146958(0x1e4)])this[_0x146958(0x1e8)][_0x146958(0x205)](_0x2269eb);return this[_0x146958(0x1fc)][_0x146958(0x1f1)](_0x50f2d7[_0x146958(0x1e6)]),this[_0x146958(0x1e3)][_0x146958(0x1f1)](_0x50f2d7[_0x146958(0x1f7)]),super[_0x146958(0x205)](_0x50f2d7);}[_0x22ab41(0x203)](_0x5f2001){const _0x1bd431=_0x22ab41;return this[_0x1bd431(0x1e3)][_0x1bd431(0x1f8)](_0x5f2001);}[_0x22ab41(0x211)](_0x261572){const _0x5eda59=_0x22ab41;return this[_0x5eda59(0x1fc)][_0x5eda59(0x1f8)](_0x261572);}[_0x22ab41(0x20a)](){const _0x187bfd=_0x22ab41;super[_0x187bfd(0x1f3)](),this[_0x187bfd(0x1eb)](),this[_0x187bfd(0x1e3)][_0x187bfd(0x1f3)](),this[_0x187bfd(0x1fc)][_0x187bfd(0x1f3)](),this[_0x187bfd(0x1e8)][_0x187bfd(0x20a)]();}[_0x22ab41(0x210)](){const _0x2f546b=_0x22ab41;for(const _0xdab410 of this)_0xdab410[_0x2f546b(0x1fd)]();this[_0x2f546b(0x201)]();}[_0x22ab41(0x201)](){const _0x4739eb=_0x22ab41,_0x15de3d=Array[_0x4739eb(0x1e2)](this)[_0x4739eb(0x1ea)]((_0x3ec33e,_0x1abd01)=>w(_0x3ec33e[_0x4739eb(0x1e6)][_0x4739eb(0x1f2)],_0x1abd01[_0x4739eb(0x1e6)][_0x4739eb(0x1f2)]));for(let _0x51811a=_0x15de3d[_0x4739eb(0x1f6)]-0x1;_0x51811a>0x0;_0x51811a--){const _0x596d02=_0x15de3d[_0x51811a];_0x51811a!==this[_0x4739eb(0x1e7)](_0x596d02)&&(this[_0x4739eb(0x205)](_0x596d02),this[_0x4739eb(0x202)](_0x596d02));}}[_0x22ab41(0x20d)](_0x5804ae){const _0x15f1d7=_0x22ab41;let _0x138a48=0x0;if(!_0x5804ae)return this[_0x15f1d7(0x1f6)];for(const _0x2431e7 of this){const _0x94515=_0x2431e7[_0x15f1d7(0x1e6)][_0x15f1d7(0x1f2)];if(_0x94515){if(w(_0x5804ae,_0x94515)<0x0)return _0x138a48;_0x138a48++;}}return _0x138a48;}}export function bindAnnotationCollections({source:_0x6ee68d,target:_0x53eaf0,filter:_0x11a846}){const _0x6a9ead=_0x22ab41;for(const _0x1b6f76 of _0x6ee68d)_0x11a846(_0x1b6f76)&&_0x53eaf0[_0x6a9ead(0x202)](_0x1b6f76);_0x53eaf0[_0x6a9ead(0x1e5)](_0x6ee68d,_0x6a9ead(0x202),(_0x1f1d6a,_0x33516f)=>{const _0x18d2aa=_0x6a9ead;_0x11a846(_0x33516f)&&_0x53eaf0[_0x18d2aa(0x202)](_0x33516f);}),_0x53eaf0[_0x6a9ead(0x1e5)](_0x6ee68d,_0x6a9ead(0x205),(_0x15f262,_0x18c2bf)=>{const _0x322521=_0x6a9ead;_0x53eaf0[_0x322521(0x1f9)](_0x18c2bf)&&_0x53eaf0[_0x322521(0x205)](_0x18c2bf);});}function w(_0x3ad2fc,_0x56c329){const _0x578485=_0x22ab41;if(null===_0x3ad2fc&&null===_0x56c329)return 0x0;if(null===_0x3ad2fc)return-0x1;if(null===_0x56c329)return 0x1;const _0x440ef4=_0x3ad2fc[_0x578485(0x206)]-_0x56c329[_0x578485(0x206)];return 0x0==_0x440ef4?_0x3ad2fc[_0x578485(0x1ed)]-_0x56c329[_0x578485(0x1ed)]:_0x440ef4;}