@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 4.47 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 _0x45dc06=_0x3c8e;function _0x3c8e(_0x101ae0,_0x22b582){const _0x4c9545=_0x4c95();return _0x3c8e=function(_0x3c8eb3,_0x417a20){_0x3c8eb3=_0x3c8eb3-0x174;let _0x482466=_0x4c9545[_0x3c8eb3];return _0x482466;},_0x3c8e(_0x101ae0,_0x22b582);}(function(_0x2f1520,_0x1e6c90){const _0x21c596=_0x3c8e,_0x101796=_0x2f1520();while(!![]){try{const _0x57daa9=-parseInt(_0x21c596(0x181))/0x1*(parseInt(_0x21c596(0x175))/0x2)+parseInt(_0x21c596(0x18b))/0x3*(parseInt(_0x21c596(0x174))/0x4)+parseInt(_0x21c596(0x190))/0x5*(parseInt(_0x21c596(0x18d))/0x6)+parseInt(_0x21c596(0x176))/0x7+-parseInt(_0x21c596(0x193))/0x8*(parseInt(_0x21c596(0x18f))/0x9)+-parseInt(_0x21c596(0x184))/0xa+parseInt(_0x21c596(0x18e))/0xb*(-parseInt(_0x21c596(0x187))/0xc);if(_0x57daa9===_0x1e6c90)break;else _0x101796['push'](_0x101796['shift']());}catch(_0x2663f0){_0x101796['push'](_0x101796['shift']());}}}(_0x4c95,0xafe96));function _0x4c95(){const _0x319e02=['addCommentThread','define','1956888euqwGd','execute','high','listenTo','3LRAsQE','get','1170810BFBOqO','55ITjyfN','549pqKttU','25ngIjyV','collaboration_features','forEach','8744vUAaxi','4042952izsIJM','4AipiUv','9441957DPEgvG','importWord','config','map','afterInit','dataInsert','basic','plugins','_handleImportedData','commands','collaboration.channelId','677892lquSYy','editor','importWord.formatting.comments','3769030zJjhrn'];_0x4c95=function(){return _0x319e02;};return _0x4c95();}import{Plugin as _0xc092c5}from'ckeditor5/src/core.js';import{priorities as _0x39ac15}from'ckeditor5/src/utils.js';import{Users as _0x1b4642}from'ckeditor5-collaboration/src/collaboration-core.js';import _0x35614a from'../commentsrepository.js';export default class ct extends _0xc092c5{constructor(_0x9a4635){const _0x2d3fb3=_0x3c8e;super(_0x9a4635),this[_0x2d3fb3(0x182)][_0x2d3fb3(0x178)][_0x2d3fb3(0x186)](_0x2d3fb3(0x183),_0x2d3fb3(0x17c));}[_0x45dc06(0x17a)](){const _0x124cb7=_0x45dc06,_0x5174d6=this[_0x124cb7(0x182)],_0x17568a=_0x5174d6[_0x124cb7(0x17f)][_0x124cb7(0x18c)](_0x124cb7(0x177)),_0x4cef29=_0x5174d6[_0x124cb7(0x17d)][_0x124cb7(0x18c)](_0x1b4642);_0x17568a&&(_0x17568a['on'](_0x124cb7(0x188),(_0x296a36,[,_0x277af1])=>{const _0x90cd56=_0x124cb7;_0x277af1[_0x90cd56(0x191)]={'comments':!0x0,'user_id':_0x4cef29['me']['id']};},{'priority':_0x39ac15[_0x124cb7(0x189)]+0xa}),this[_0x124cb7(0x18a)](_0x17568a,_0x124cb7(0x17b),this[_0x124cb7(0x17e)]));}[_0x45dc06(0x17e)](_0x4574f4,_0x10d520){const _0x7851a=_0x45dc06,{comment_threads:_0xdb5c8d}=_0x10d520;_0xdb5c8d&&_0xdb5c8d[_0x7851a(0x192)](({thread_id:_0x31eb85,comments:_0x1c9c00,is_resolved:_0xe3c1b9})=>{const _0x332959=_0x7851a,_0x5ec2cb=new Date(),_0x267261=_0x1c9c00[_0x332959(0x179)](({author:_0x1af8f6,content:_0x51e275,created_at:_0x4ff249})=>({'content':_0x51e275,'authorId':this[_0x332959(0x182)][_0x332959(0x17d)][_0x332959(0x18c)](_0x1b4642)['me']['id'],'createdAt':_0x5ec2cb,'attributes':{'@external':{'authorName':_0x1af8f6,'createdAt':_0x4ff249?new Date(_0x4ff249):new Date(),'source':_0x332959(0x177)}}})),_0x5a4123=this[_0x332959(0x182)][_0x332959(0x178)][_0x332959(0x18c)](_0x332959(0x180));this[_0x332959(0x182)][_0x332959(0x17d)][_0x332959(0x18c)](_0x35614a)[_0x332959(0x185)]({'channelId':_0x5a4123,'threadId':_0x31eb85,'comments':_0x267261,'resolvedAt':_0xe3c1b9?_0x5ec2cb:null});});}}