UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 7.1 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 _0x31252f=_0x5a76;(function(_0xac44fb,_0x46c3d5){const _0x218149=_0x5a76,_0x125cbc=_0xac44fb();while(!![]){try{const _0x405c84=parseInt(_0x218149(0x92))/0x1+-parseInt(_0x218149(0xa2))/0x2+-parseInt(_0x218149(0x80))/0x3+-parseInt(_0x218149(0xa6))/0x4*(-parseInt(_0x218149(0x88))/0x5)+parseInt(_0x218149(0xa4))/0x6+parseInt(_0x218149(0x9c))/0x7+parseInt(_0x218149(0xaa))/0x8;if(_0x405c84===_0x46c3d5)break;else _0x125cbc['push'](_0x125cbc['shift']());}catch(_0x141c96){_0x125cbc['push'](_0x125cbc['shift']());}}}(_0xa03c,0xea965));import{CKEditorError as _0x35170e,Collection as _0x2621bc,FocusTracker as _0x17d1ab}from'ckeditor5/src/utils.js';export default class x extends _0x2621bc{constructor(_0xa6c56c=[]){const _0x59557b=_0x5a76;super(),this[_0x59557b(0x83)]=new Map(),this[_0x59557b(0x8c)]=new Map(),this[_0x59557b(0x9b)]=new _0x17d1ab(),this[_0x59557b(0x9b)]['on'](_0x59557b(0xa8),(_0x39ac7b,_0xb7d013,_0x2bf433)=>{const _0x1d2eda=_0x59557b;_0x2bf433||this[_0x1d2eda(0x94)](_0x1d2eda(0x82));});for(const _0x13ad97 of _0xa6c56c)this[_0x59557b(0x8a)](_0x13ad97);}get[_0x31252f(0x9a)](){const _0x516104=_0x31252f;return this[_0x516104(0x9b)][_0x516104(0x9a)];}[_0x31252f(0x8a)](_0x4abd54){const _0x25a255=_0x31252f;if(this[_0x25a255(0x9e)](_0x4abd54))throw new _0x35170e(_0x25a255(0xa3),null);this[_0x25a255(0x83)][_0x25a255(0x89)](_0x4abd54[_0x25a255(0x9f)],_0x4abd54),this[_0x25a255(0x8c)][_0x25a255(0x89)](_0x4abd54[_0x25a255(0x95)],_0x4abd54);for(const _0x2d08f8 of _0x4abd54[_0x25a255(0xa7)])this[_0x25a255(0x9b)][_0x25a255(0x8a)](_0x2d08f8);this[_0x25a255(0x93)](_0x4abd54[_0x25a255(0xa7)],_0x25a255(0x8a),(_0x43a3ba,_0x451a17)=>{const _0x525fb2=_0x25a255;this[_0x525fb2(0x9b)][_0x525fb2(0x8a)](_0x451a17);}),this[_0x25a255(0x93)](_0x4abd54[_0x25a255(0xa7)],_0x25a255(0x87),(_0x563b51,_0x816993)=>{const _0x5e5d29=_0x25a255;this[_0x5e5d29(0x9b)][_0x5e5d29(0x87)](_0x816993);}),this[_0x25a255(0x93)](_0x4abd54[_0x25a255(0x95)][_0x25a255(0xa5)],_0x25a255(0xa8),(_0x4e05b3,_0x45da2b,_0xb3a704)=>{const _0x5161e8=_0x25a255;_0xb3a704&&this[_0x5161e8(0x94)](_0x5161e8(0xa0),_0x4abd54);}),_0x4abd54[_0x25a255(0xab)]();const _0xf5de99=this[_0x25a255(0xa1)](_0x4abd54[_0x25a255(0x95)][_0x25a255(0x84)]);return super[_0x25a255(0x8a)](_0x4abd54,_0xf5de99);}[_0x31252f(0x87)](_0x21a252){const _0x44d4cb=_0x31252f;if(!this[_0x44d4cb(0x9e)](_0x21a252))throw new _0x35170e(_0x44d4cb(0x91),null);this[_0x44d4cb(0xac)](_0x21a252[_0x44d4cb(0x95)][_0x44d4cb(0xa5)]),this[_0x44d4cb(0xac)](_0x21a252[_0x44d4cb(0xa7)]);for(const _0x122e19 of _0x21a252[_0x44d4cb(0xa7)])this[_0x44d4cb(0x9b)][_0x44d4cb(0x87)](_0x122e19);return this[_0x44d4cb(0x8c)][_0x44d4cb(0x96)](_0x21a252[_0x44d4cb(0x95)]),this[_0x44d4cb(0x83)][_0x44d4cb(0x96)](_0x21a252[_0x44d4cb(0x9f)]),super[_0x44d4cb(0x87)](_0x21a252);}[_0x31252f(0xa9)](_0x6eb4e1){const _0x4233ca=_0x31252f;return this[_0x4233ca(0x83)][_0x4233ca(0x8b)](_0x6eb4e1);}[_0x31252f(0x8e)](_0x2bc98c){const _0x5729f3=_0x31252f;return this[_0x5729f3(0x8c)][_0x5729f3(0x8b)](_0x2bc98c);}[_0x31252f(0x99)](){const _0x89b958=_0x31252f;super[_0x89b958(0x97)](),this[_0x89b958(0xac)](),this[_0x89b958(0x83)][_0x89b958(0x97)](),this[_0x89b958(0x8c)][_0x89b958(0x97)](),this[_0x89b958(0x9b)][_0x89b958(0x99)]();}[_0x31252f(0x81)](){const _0x3f671c=_0x31252f;for(const _0x3d3a33 of this)_0x3d3a33[_0x3f671c(0xab)]();this[_0x3f671c(0x8f)]();}[_0x31252f(0x8f)](){const _0x4c4950=_0x31252f,_0x3daa0a=Array[_0x4c4950(0x85)](this)[_0x4c4950(0x90)]((_0x377afd,_0x55f566)=>v(_0x377afd[_0x4c4950(0x95)][_0x4c4950(0x84)],_0x55f566[_0x4c4950(0x95)][_0x4c4950(0x84)]));for(let _0x483d5e=_0x3daa0a[_0x4c4950(0x98)]-0x1;_0x483d5e>0x0;_0x483d5e--){const _0x224705=_0x3daa0a[_0x483d5e];_0x483d5e!==this[_0x4c4950(0x8d)](_0x224705)&&(this[_0x4c4950(0x87)](_0x224705),this[_0x4c4950(0x8a)](_0x224705));}}[_0x31252f(0xa1)](_0x22a117){const _0x2c8c98=_0x31252f;let _0x3dbac3=0x0;if(!_0x22a117)return this[_0x2c8c98(0x98)];for(const _0x525d99 of this){const _0x2f5131=_0x525d99[_0x2c8c98(0x95)][_0x2c8c98(0x84)];if(_0x2f5131){if(v(_0x22a117,_0x2f5131)<0x0)return _0x3dbac3;_0x3dbac3++;}}return _0x3dbac3;}}function _0xa03c(){const _0x50b274=['_innerViewToAnnotation','targetRect','from','left','remove','5NGbICK','set','add','get','_viewToAnnotation','getIndex','getByView','_sort','sort','annotationcollection-not-existing-item','943611fDUXRQ','listenTo','fire','view','delete','clear','length','destroy','isFocused','_focusTracker','8963374dHVgud','top','has','innerView','focus','_getOrderInContent','3289272ZksjaA','annotationcollection-duplicated-item','152178PxRsJz','focusTracker','1923332zklVbb','focusableElements','change:isFocused','getByInnerView','13990104OiVnRl','updateTargetRect','stopListening','5620641dJKPoK','refreshPositioning','blur'];_0xa03c=function(){return _0x50b274;};return _0xa03c();}function _0x5a76(_0x274d47,_0x5e7357){const _0xa03cde=_0xa03c();return _0x5a76=function(_0x5a76d7,_0x14682e){_0x5a76d7=_0x5a76d7-0x80;let _0x272edf=_0xa03cde[_0x5a76d7];return _0x272edf;},_0x5a76(_0x274d47,_0x5e7357);}export function bindAnnotationCollections({source:_0x2046e8,target:_0x3d0ce8,filter:_0x371a1a}){const _0x2f11e0=_0x31252f;for(const _0x5cda45 of _0x2046e8)_0x371a1a(_0x5cda45)&&_0x3d0ce8[_0x2f11e0(0x8a)](_0x5cda45);_0x3d0ce8[_0x2f11e0(0x93)](_0x2046e8,_0x2f11e0(0x8a),(_0x34c691,_0xa06672)=>{const _0x2049ab=_0x2f11e0;_0x371a1a(_0xa06672)&&_0x3d0ce8[_0x2049ab(0x8a)](_0xa06672);}),_0x3d0ce8[_0x2f11e0(0x93)](_0x2046e8,_0x2f11e0(0x87),(_0x71c32c,_0x467b86)=>{const _0x39926c=_0x2f11e0;_0x3d0ce8[_0x39926c(0x9e)](_0x467b86)&&_0x3d0ce8[_0x39926c(0x87)](_0x467b86);});}function v(_0x283fb0,_0x2c6c1b){const _0x12f1ff=_0x31252f;if(null===_0x283fb0&&null===_0x2c6c1b)return 0x0;if(null===_0x283fb0)return-0x1;if(null===_0x2c6c1b)return 0x1;const _0x43230f=_0x283fb0[_0x12f1ff(0x9d)]-_0x2c6c1b[_0x12f1ff(0x9d)];return 0x0==_0x43230f?_0x283fb0[_0x12f1ff(0x86)]-_0x2c6c1b[_0x12f1ff(0x86)]:_0x43230f;}