UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 7.36 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 _0x461e0c=_0x558b;function _0x558b(_0x4748d4,_0x33dce6){const _0x1691a5=_0x1691();return _0x558b=function(_0x558b05,_0x28e9f9){_0x558b05=_0x558b05-0x100;let _0x5417a1=_0x1691a5[_0x558b05];return _0x5417a1;},_0x558b(_0x4748d4,_0x33dce6);}(function(_0x4af3af,_0x6d22e2){const _0x5be023=_0x558b,_0x39cf0b=_0x4af3af();while(!![]){try{const _0x5054de=parseInt(_0x5be023(0x10a))/0x1*(-parseInt(_0x5be023(0x104))/0x2)+parseInt(_0x5be023(0x111))/0x3+-parseInt(_0x5be023(0x10e))/0x4*(-parseInt(_0x5be023(0x116))/0x5)+parseInt(_0x5be023(0x11b))/0x6+-parseInt(_0x5be023(0x10c))/0x7*(-parseInt(_0x5be023(0x11e))/0x8)+-parseInt(_0x5be023(0x100))/0x9+-parseInt(_0x5be023(0x11a))/0xa;if(_0x5054de===_0x6d22e2)break;else _0x39cf0b['push'](_0x39cf0b['shift']());}catch(_0x2bc306){_0x39cf0b['push'](_0x39cf0b['shift']());}}}(_0x1691,0x21f9d));function _0x1691(){const _0x173a9f=['innerView','top','has','getByInnerView','_viewToAnnotation','_sort','annotationcollection-duplicated-item','_getOrderInContent','focusTracker','focus','targetRect','getByView','268092NSlRSr','remove','updateTargetRect','blur','4DMKahu','stopListening','view','clear','destroy','left','80209WsWBTc','getIndex','21qfPLrr','refreshPositioning','1012xmAszl','get','add','663162mQBRSG','_focusTracker','listenTo','from','annotationcollection-not-existing-item','4555dvJntr','set','delete','change:isFocused','4521440IFODCM','742746odBNjY','length','sort','549832PgFRnF','isFocused','_innerViewToAnnotation','fire','focusableElements'];_0x1691=function(){return _0x173a9f;};return _0x1691();}import{CKEditorError as _0xf771d0,Collection as _0x2307d1,FocusTracker as _0x40d4ae}from'ckeditor5/src/utils.js';export default class _ extends _0x2307d1{[_0x461e0c(0x120)];[_0x461e0c(0x127)];[_0x461e0c(0x112)];constructor(_0x4de3eb=[]){const _0x15d724=_0x461e0c;super(),this[_0x15d724(0x120)]=new Map(),this[_0x15d724(0x127)]=new Map(),this[_0x15d724(0x112)]=new _0x40d4ae(),this[_0x15d724(0x112)]['on'](_0x15d724(0x119),(_0x17b95f,_0x5ca14e,_0x433cb4)=>{const _0x3a63ca=_0x15d724;_0x433cb4||this[_0x3a63ca(0x121)](_0x3a63ca(0x103));});for(const _0x3ecd30 of _0x4de3eb)this[_0x15d724(0x110)](_0x3ecd30);}get[_0x461e0c(0x11f)](){const _0x2f17e7=_0x461e0c;return this[_0x2f17e7(0x112)][_0x2f17e7(0x11f)];}[_0x461e0c(0x110)](_0x29e4cf){const _0x4b81c8=_0x461e0c;if(this[_0x4b81c8(0x125)](_0x29e4cf))throw new _0xf771d0(_0x4b81c8(0x129),null);this[_0x4b81c8(0x120)][_0x4b81c8(0x117)](_0x29e4cf[_0x4b81c8(0x123)],_0x29e4cf),this[_0x4b81c8(0x127)][_0x4b81c8(0x117)](_0x29e4cf[_0x4b81c8(0x106)],_0x29e4cf);for(const _0x12f4b4 of _0x29e4cf[_0x4b81c8(0x122)])this[_0x4b81c8(0x112)][_0x4b81c8(0x110)](_0x12f4b4);this[_0x4b81c8(0x113)](_0x29e4cf[_0x4b81c8(0x122)],_0x4b81c8(0x110),(_0x27a31e,_0x27eee1)=>{const _0x1abea1=_0x4b81c8;this[_0x1abea1(0x112)][_0x1abea1(0x110)](_0x27eee1);}),this[_0x4b81c8(0x113)](_0x29e4cf[_0x4b81c8(0x122)],_0x4b81c8(0x101),(_0x5affa5,_0x2d5703)=>{const _0x52a748=_0x4b81c8;this[_0x52a748(0x112)][_0x52a748(0x101)](_0x2d5703);}),this[_0x4b81c8(0x113)](_0x29e4cf[_0x4b81c8(0x106)][_0x4b81c8(0x12b)],_0x4b81c8(0x119),(_0x39b841,_0x8012d3,_0x48b814)=>{const _0x5cad4c=_0x4b81c8;_0x48b814&&this[_0x5cad4c(0x121)](_0x5cad4c(0x12c),_0x29e4cf);}),_0x29e4cf[_0x4b81c8(0x102)]();const _0x952d74=this[_0x4b81c8(0x12a)](_0x29e4cf[_0x4b81c8(0x106)][_0x4b81c8(0x12d)]);return super[_0x4b81c8(0x110)](_0x29e4cf,_0x952d74);}[_0x461e0c(0x101)](_0x4145a3){const _0x2ac999=_0x461e0c;if(!this[_0x2ac999(0x125)](_0x4145a3))throw new _0xf771d0(_0x2ac999(0x115),null);this[_0x2ac999(0x105)](_0x4145a3[_0x2ac999(0x106)][_0x2ac999(0x12b)]),this[_0x2ac999(0x105)](_0x4145a3[_0x2ac999(0x122)]);for(const _0x55c95f of _0x4145a3[_0x2ac999(0x122)])this[_0x2ac999(0x112)][_0x2ac999(0x101)](_0x55c95f);return this[_0x2ac999(0x127)][_0x2ac999(0x118)](_0x4145a3[_0x2ac999(0x106)]),this[_0x2ac999(0x120)][_0x2ac999(0x118)](_0x4145a3[_0x2ac999(0x123)]),super[_0x2ac999(0x101)](_0x4145a3);}[_0x461e0c(0x126)](_0x4d2a26){const _0xa8ef30=_0x461e0c;return this[_0xa8ef30(0x120)][_0xa8ef30(0x10f)](_0x4d2a26);}[_0x461e0c(0x12e)](_0x576ce6){const _0x420f0e=_0x461e0c;return this[_0x420f0e(0x127)][_0x420f0e(0x10f)](_0x576ce6);}[_0x461e0c(0x108)](){const _0x7b5a4c=_0x461e0c;super[_0x7b5a4c(0x107)](),this[_0x7b5a4c(0x105)](),this[_0x7b5a4c(0x120)][_0x7b5a4c(0x107)](),this[_0x7b5a4c(0x127)][_0x7b5a4c(0x107)](),this[_0x7b5a4c(0x112)][_0x7b5a4c(0x108)]();}[_0x461e0c(0x10d)](){const _0x1e105e=_0x461e0c;for(const _0x1b4f3a of this)_0x1b4f3a[_0x1e105e(0x102)]();this[_0x1e105e(0x128)]();}[_0x461e0c(0x128)](){const _0x597811=_0x461e0c,_0x412253=Array[_0x597811(0x114)](this)[_0x597811(0x11d)]((_0xd44853,_0x306dca)=>v(_0xd44853[_0x597811(0x106)][_0x597811(0x12d)],_0x306dca[_0x597811(0x106)][_0x597811(0x12d)]));for(let _0x190bb9=_0x412253[_0x597811(0x11c)]-0x1;_0x190bb9>0x0;_0x190bb9--){const _0x358a2e=_0x412253[_0x190bb9];_0x190bb9!==this[_0x597811(0x10b)](_0x358a2e)&&(this[_0x597811(0x101)](_0x358a2e),this[_0x597811(0x110)](_0x358a2e));}}[_0x461e0c(0x12a)](_0x256696){const _0x540422=_0x461e0c;let _0x15360c=0x0;if(!_0x256696)return this[_0x540422(0x11c)];for(const _0x2bce4c of this){const _0x2ed07c=_0x2bce4c[_0x540422(0x106)][_0x540422(0x12d)];if(_0x2ed07c){if(v(_0x256696,_0x2ed07c)<0x0)return _0x15360c;_0x15360c++;}}return _0x15360c;}}export function bindAnnotationCollections({source:_0x574064,target:_0x3daaa5,filter:_0x2ae4c2}){const _0x64e408=_0x461e0c;for(const _0x2d9a35 of _0x574064)_0x2ae4c2(_0x2d9a35)&&_0x3daaa5[_0x64e408(0x110)](_0x2d9a35);_0x3daaa5[_0x64e408(0x113)](_0x574064,_0x64e408(0x110),(_0x3c8b4d,_0x211281)=>{const _0x1fe02c=_0x64e408;_0x2ae4c2(_0x211281)&&_0x3daaa5[_0x1fe02c(0x110)](_0x211281);}),_0x3daaa5[_0x64e408(0x113)](_0x574064,_0x64e408(0x101),(_0x226bb9,_0x5b898f)=>{const _0x116076=_0x64e408;_0x3daaa5[_0x116076(0x125)](_0x5b898f)&&_0x3daaa5[_0x116076(0x101)](_0x5b898f);});}function v(_0x13a483,_0x3fa1c6){const _0x565b3f=_0x461e0c;if(null===_0x13a483&&null===_0x3fa1c6)return 0x0;if(null===_0x13a483)return-0x1;if(null===_0x3fa1c6)return 0x1;const _0x26fe5a=_0x13a483[_0x565b3f(0x124)]-_0x3fa1c6[_0x565b3f(0x124)];return 0x0==_0x26fe5a?_0x13a483[_0x565b3f(0x109)]-_0x3fa1c6[_0x565b3f(0x109)]:_0x26fe5a;}