@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506101607 → 0.8.0-nightly.202506111607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0xc4cba8=_0x4577;(function(_0x5676a5,_0x2fd5c0){const _0x3ac769=_0x4577,_0x1eec18=_0x5676a5();while(!![]){try{const _0x2cd39e=-parseInt(_0x3ac769(0x1cf))/0x1+parseInt(_0x3ac769(0x1df))/0x2*(parseInt(_0x3ac769(0x1dd))/0x3)+parseInt(_0x3ac769(0x1c4))/0x4+parseInt(_0x3ac769(0x1b1))/0x5*(-parseInt(_0x3ac769(0x1ce))/0x6)+-parseInt(_0x3ac769(0x1c3))/0x7*(-parseInt(_0x3ac769(0x18b))/0x8)+-parseInt(_0x3ac769(0x1da))/0x9*(parseInt(_0x3ac769(0x1d3))/0xa)+-parseInt(_0x3ac769(0x1d6))/0xb*(-parseInt(_0x3ac769(0x1c1))/0xc);if(_0x2cd39e===_0x2fd5c0)break;else _0x1eec18['push'](_0x1eec18['shift']());}catch(_0x1bc8cd){_0x1eec18['push'](_0x1eec18['shift']());}}}(_0x4c7c,0xcde42));Object[_0xc4cba8(0x1aa)](exports,Symbol['toStringTag'],{'value':_0xc4cba8(0x1d9)});const b=require(_0xc4cba8(0x17d)),T=require(_0xc4cba8(0x1b6)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0xc4cba8(0x1a7)),w=require('rxjs'),P=require(_0xc4cba8(0x1cd)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2d0a55=>(_0x2d0a55[_0x2d0a55[_0xc4cba8(0x1d8)]=0x0]=_0xc4cba8(0x1d8),_0x2d0a55[_0x2d0a55['Solved']=0x1]=_0xc4cba8(0x1cc),_0x2d0a55[_0x2d0a55[_0xc4cba8(0x1a6)]=-0x1]=_0xc4cba8(0x1a6),_0x2d0a55))(I||{}),v=(_0x16ab1b=>(_0x16ab1b[_0x16ab1b[_0xc4cba8(0x1be)]=0x0]='Unknown',_0x16ab1b[_0x16ab1b[_0xc4cba8(0x1ba)]=0x1]='Add',_0x16ab1b[_0x16ab1b[_0xc4cba8(0x19d)]=0x2]='Reply',_0x16ab1b[_0x16ab1b[_0xc4cba8(0x1b4)]=0x3]=_0xc4cba8(0x1b4),_0x16ab1b[_0x16ab1b['Delete']=0x4]='Delete',_0x16ab1b[_0x16ab1b[_0xc4cba8(0x18e)]=0x5]=_0xc4cba8(0x18e),_0x16ab1b[_0x16ab1b[_0xc4cba8(0x1a6)]=-0x1]=_0xc4cba8(0x1a6),_0x16ab1b))(v||{});const f=_0x12c774=>c['dayjs'](new Date(+_0x12c774))[_0xc4cba8(0x1b0)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x572715,_0x5c2ead)=>{const _0x3836fc=_0xc4cba8,_0x5b13e4=_0x572715[_0x3836fc(0x1a5)](c[_0x3836fc(0x1bf)]),_0xc57886=_0x572715[_0x3836fc(0x1a5)](P[_0x3836fc(0x195)]);_0x5c2ead[_0x3836fc(0x193)](_0x4b5e1f=>{const _0x781974=_0x3836fc;_0x5b13e4[_0x781974(0x1bc)](_0x4b5e1f)&&_0x5c2ead['delete'](_0x4b5e1f);}),_0x5c2ead[_0x3836fc(0x1cb)]&&(await _0xc57886[_0x3836fc(0x1a5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c2ead]}}))[_0x3836fc(0x19c)][_0x3836fc(0x1a8)]['forEach'](_0x515360=>{const _0x5c978d=_0x3836fc;_0x515360&&_0x5b13e4[_0x5c978d(0x194)](_0x515360);});};var $=Object[_0xc4cba8(0x1d0)],E=(_0x42dc96,_0x54ffe3,_0x3201b7,_0x318f39)=>{const _0x490b2d=_0xc4cba8;for(var _0x183de8=_0x318f39>0x1?void 0x0:_0x318f39?$(_0x54ffe3,_0x3201b7):_0x54ffe3,_0x53d414=_0x42dc96[_0x490b2d(0x188)]-0x1,_0x41e315;_0x53d414>=0x0;_0x53d414--)(_0x41e315=_0x42dc96[_0x53d414])&&(_0x183de8=_0x41e315(_0x183de8)||_0x183de8);return _0x183de8;},S=(_0xc232f8,_0x5f2f51)=>(_0x57641c,_0x4cccaa)=>_0x5f2f51(_0x57641c,_0x4cccaa,_0xc232f8);let p=class extends c['Disposable']{constructor(_0x14a443,_0x3dd47f,_0x188029,_0x16e356){const _0x154097=_0xc4cba8;super(),this[_0x154097(0x180)]=_0x14a443,this[_0x154097(0x187)]=_0x3dd47f,this[_0x154097(0x190)]=_0x188029,this[_0x154097(0x1d1)]=_0x16e356,this[_0x154097(0x18c)](),this[_0x154097(0x1c8)]();}['_initUserSync'](){const _0x596ccd=_0xc4cba8;this['disposeWithMe'](this[_0x596ccd(0x187)]['commentUpdate$'][_0x596ccd(0x1e3)](w['bufferTime'](0x10))[_0x596ccd(0x19e)](_0x3db895=>{const _0x2db8a1=_0x596ccd,_0x14e597=new Set();_0x3db895[_0x2db8a1(0x193)](_0x3cfee7=>{const _0x2678f0=_0x2db8a1;switch(_0x3cfee7[_0x2678f0(0x177)]){case _0x2678f0(0x198):{const _0x1e4c52=_0x3cfee7[_0x2678f0(0x186)][_0x2678f0(0x185)];_0x14e597[_0x2678f0(0x198)](_0x1e4c52);break;}}}),R(this['_injector'],_0x14e597);}));}[_0xc4cba8(0x18c)](){const _0x2c81d1=_0xc4cba8;this['disposeWithMe'](this[_0x2c81d1(0x180)][_0x2c81d1(0x1c2)]['subscribe'](async _0x5cd385=>{const _0x22b832=_0x2c81d1;var _0x22a00a,_0x3ed4d5,_0x570550,_0xa46408;const _0x249ff3=(_0x22a00a=this[_0x22b832(0x187)][_0x22b832(0x174)](_0x5cd385[_0x22b832(0x1c0)])[_0x22b832(0x18f)](_0x823f21=>_0x823f21[_0x22b832(0x17e)]===_0x5cd385['threadId']))==null?void 0x0:_0x22a00a[_0x22b832(0x179)];if(!_0x249ff3)return;const {unitId:_0x5af4c3,subUnitId:_0x460d6c}=_0x249ff3;switch(_0x5cd385[_0x22b832(0x1b8)]&&this['_userService'][_0x22b832(0x194)](_0x5cd385['user']),_0x5cd385[_0x22b832(0x177)]){case v[_0x22b832(0x1ba)]:break;case v[_0x22b832(0x19d)]:{this[_0x22b832(0x187)][_0x22b832(0x183)](_0x5af4c3,_0x460d6c,{'unitId':_0x5af4c3,'subUnitId':_0x460d6c,'ref':'','id':_0x5cd385[_0x22b832(0x1ab)],'dT':f(+_0x5cd385['createTimestamp']),'threadId':_0x5cd385[_0x22b832(0x17e)],'personId':(_0x570550=(_0x3ed4d5=_0x5cd385[_0x22b832(0x1b8)])==null?void 0x0:_0x3ed4d5[_0x22b832(0x17c)])!=null?_0x570550:_0x5cd385[_0x22b832(0x1a4)],'text':JSON[_0x22b832(0x1ca)](_0x5cd385[_0x22b832(0x1ae)]),'parentId':_0x249ff3['id']});break;}case v[_0x22b832(0x1e0)]:{const _0x3c42ec=this[_0x22b832(0x187)]['getComment'](_0x5af4c3,_0x460d6c,_0x5cd385[_0x22b832(0x1ab)]);_0x3c42ec&&_0x3c42ec['parentId']&&this[_0x22b832(0x187)][_0x22b832(0x1b3)](_0x5af4c3,_0x460d6c,_0x5cd385[_0x22b832(0x1ab)]);break;}case v['Edit']:{this[_0x22b832(0x187)][_0x22b832(0x197)](_0x5af4c3,_0x460d6c,{'commentId':_0x5cd385[_0x22b832(0x1ab)],'text':JSON['parse'](_0x5cd385[_0x22b832(0x1ae)])});break;}case v[_0x22b832(0x18e)]:{const _0x2704f3=(_0xa46408=this[_0x22b832(0x187)]['getUnit'](_0x5cd385[_0x22b832(0x1c0)])['find'](_0x51f0d5=>_0x51f0d5[_0x22b832(0x17e)]===_0x5cd385['threadId']))==null?void 0x0:_0xa46408[_0x22b832(0x179)];_0x2704f3&&this[_0x22b832(0x187)]['resolveComment'](_0x5af4c3,_0x460d6c,_0x2704f3['id'],_0x5cd385['solved']===I[_0x22b832(0x1cc)]);break;}}}));}};p=E([S(0x0,c[_0xc4cba8(0x19b)](b['CommentService'])),S(0x1,c[_0xc4cba8(0x19b)](M['ThreadCommentModel'])),S(0x2,c[_0xc4cba8(0x19b)](c[_0xc4cba8(0x1bf)])),S(0x3,c['Inject'](c[_0xc4cba8(0x1a2)]))],p);const q=_0xc4cba8(0x1c5),D={};function _0x4577(_0x5d1307,_0x2b7568){const _0x4c7c70=_0x4c7c();return _0x4577=function(_0x4577a4,_0x25193d){_0x4577a4=_0x4577a4-0x172;let _0x4cbf15=_0x4c7c70[_0x4577a4];return _0x4cbf15;},_0x4577(_0x5d1307,_0x2b7568);}var A=Object[_0xc4cba8(0x1d0)],x=(_0x1ef5d3,_0x227c59,_0x4983a2,_0x5eb824)=>{const _0x3c0aba=_0xc4cba8;for(var _0xc1e694=_0x5eb824>0x1?void 0x0:_0x5eb824?A(_0x227c59,_0x4983a2):_0x227c59,_0x3d9242=_0x1ef5d3[_0x3c0aba(0x188)]-0x1,_0x29f294;_0x3d9242>=0x0;_0x3d9242--)(_0x29f294=_0x1ef5d3[_0x3d9242])&&(_0xc1e694=_0x29f294(_0xc1e694)||_0xc1e694);return _0xc1e694;},_=(_0xe24f19,_0x1bf003)=>(_0x3d6e95,_0x50432a)=>_0x1bf003(_0x3d6e95,_0x50432a,_0xe24f19);function _0x4c7c(){const _0x5eb80f=['content','IConfigService','format','385zMIaic','CustomRangeType','deleteComment','Edit','error','@univerjs-pro/license','UniverThreadCommentDataSourcePlugin','user','listComments','Add','comments','getUser','syncUpdateMutationToColla','Unknown','UserManagerService','unitId','4647696vDFmZc','commentUpdate$','980xSZXWA','6125192bwpKgu','thread-comment-data-source.config','slice','UniverCollaborationClientPlugin','_initUserSync','ref','parse','size','Solved','@univerjs/network','119118qyljzd','235993tLyBGa','getOwnPropertyDescriptor','_injector','getCurrentUser','24370Ksqryc','/universer-api/comment/unit/','DependentOn','11iALerT','solved','OpenOrReOpen','Module','3420fWRbVr','requireSession','/add','9ECMNVU','_httpService','269732yrNJMi','Delete','filter','resolved','pipe','replies','map','getUnit','_initDataSource','stringify','type','_configService','root','rangeId','customRanges','userID','@univerjs-pro/collaboration-client','threadId','pluginName','_commentService','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUIPlugin','addComment','post','personId','payload','_threadCommentModel','length','_config','dataSource','69192iRLZuo','_init','/list','Solve','find','_userService','/delete','saveCommentToSnapshot','forEach','addUser','HTTPService','CollaborationSessionService','updateComment','add','code','getMemberID','Inject','body','Reply','subscribe','dayjs','_threadCommentDataSourceService','createTimestamp','Injector','UniverInstanceType','userId','get','UNRECOGNIZED','@univerjs/thread-comment','users','_sessionService','defineProperty','replyId','resolveComment','_threadCommentDataSource'];_0x4c7c=function(){return _0x5eb80f;};return _0x4c7c();}function Y(_0x103d11,_0x2fa658){const _0x2d22c9=_0xc4cba8,_0x3a9afa=_0x103d11[_0x2d22c9(0x172)][0x0];return{..._0x2fa658,'id':_0x3a9afa[_0x2d22c9(0x1ab)],'resolved':_0x103d11[_0x2d22c9(0x1d7)]===0x1,'dT':f(_0x3a9afa['createTimestamp']),'personId':_0x3a9afa[_0x2d22c9(0x1a4)],'threadId':_0x3a9afa[_0x2d22c9(0x17e)]};}function G(_0x3bdc0a,_0x2d5801,_0x2f3730){const _0x9539f1=_0xc4cba8;var _0x2f914b,_0x19202c;if(((_0x19202c=(_0x2f914b=_0x3bdc0a==null?void 0x0:_0x3bdc0a['replies'])==null?void 0x0:_0x2f914b[_0x9539f1(0x188)])!=null?_0x19202c:0x0)>0x0){const _0x5a684d=(_0x2fe36e,_0x4d6b09)=>({'id':_0x2fe36e[_0x9539f1(0x1ab)],'threadId':_0x2fe36e[_0x9539f1(0x17e)],'dT':f(_0x2fe36e[_0x9539f1(0x1a1)]),'personId':_0x2fe36e['userId'],'resolved':_0x3bdc0a['solved']===I[_0x9539f1(0x1cc)],'unitId':_0x2d5801,'subUnitId':_0x2f3730,'text':JSON[_0x9539f1(0x1ca)](_0x2fe36e[_0x9539f1(0x1ae)]),'parentId':_0x4d6b09}),_0x264a82=_0x5a684d(_0x3bdc0a['replies'][0x0]);return{..._0x264a82,'children':_0x3bdc0a['replies'][_0x9539f1(0x1c6)](0x1)[_0x9539f1(0x173)](_0x4fcf09=>_0x5a684d(_0x4fcf09,_0x264a82['id']))};}return null;}let g=class{constructor(_0x337d34,_0x509f7e,_0x24c47b,_0x4c46a6){const _0x147f5f=_0xc4cba8;this['_httpService']=_0x337d34,this[_0x147f5f(0x190)]=_0x509f7e,this[_0x147f5f(0x1a9)]=_0x24c47b,this['_injector']=_0x4c46a6;}async[_0xc4cba8(0x183)](_0x54b5f4){const _0x4132ed=_0xc4cba8;var _0x476669,_0x2285aa;const {parentId:_0x239ebf,unitId:_0x3ae9ec,text:_0x3d105a,threadId:_0x1d7fe0}=_0x54b5f4,_0x2097b8=(_0x2285aa=(_0x476669=_0x3d105a[_0x4132ed(0x17b)])==null?void 0x0:_0x476669['filter'](_0x1f7862=>_0x1f7862['rangeType']===c[_0x4132ed(0x1b2)]['COMMENT'])[_0x4132ed(0x173)](_0xfc58b=>_0xfc58b[_0x4132ed(0x17a)]))!=null?_0x2285aa:[],_0x124ff3=JSON[_0x4132ed(0x176)](_0x3d105a),_0x154320=(await this[_0x4132ed(0x1a9)]['requireSession'](_0x3ae9ec))[_0x4132ed(0x19a)]();if(_0x239ebf){const _0x28ec0b={'memberId':_0x154320,'unitId':_0x3ae9ec,'content':_0x124ff3,'mention':_0x2097b8,'threadId':_0x1d7fe0},_0x211892=(await this['_httpService'][_0x4132ed(0x184)](_0x4132ed(0x1d4)+_0x3ae9ec+'/reply',{'body':_0x28ec0b}))[_0x4132ed(0x19c)]['reply'];return{..._0x54b5f4,'id':_0x211892[_0x4132ed(0x1ab)],'dT':c[_0x4132ed(0x19f)](+_0x211892[_0x4132ed(0x1a1)])['format'](_0x4132ed(0x181)),'personId':_0x211892[_0x4132ed(0x1a4)]};}else{const _0x57ae89={'memberId':_0x154320,'unitId':_0x3ae9ec,'content':_0x124ff3,'mention':_0x2097b8},_0xe8fae=await this[_0x4132ed(0x1de)]['post']('/universer-api/comment/unit/'+_0x3ae9ec+_0x4132ed(0x1dc),{'body':_0x57ae89});return Y(_0xe8fae[_0x4132ed(0x19c)]['comment'],_0x54b5f4);}}async[_0xc4cba8(0x197)](_0xbe636a){const _0x494d6d=_0xc4cba8;var _0x45add5,_0x672e8;const {text:_0x1e2bd0,unitId:_0x2c0d25}=_0xbe636a,_0x5e279e=(_0x672e8=(_0x45add5=_0x1e2bd0['customRanges'])==null?void 0x0:_0x45add5[_0x494d6d(0x1e1)](_0x50faec=>_0x50faec['rangeType']===c[_0x494d6d(0x1b2)]['COMMENT'])[_0x494d6d(0x173)](_0x3c2181=>_0x3c2181[_0x494d6d(0x17a)]))!=null?_0x672e8:[],_0x2aaf89=JSON[_0x494d6d(0x176)](_0x1e2bd0),_0x514214=_0xbe636a['threadId'],_0xee1bd8=_0xbe636a['id'],_0x2162ce={'memberId':(await this[_0x494d6d(0x1a9)][_0x494d6d(0x1db)](_0x2c0d25))[_0x494d6d(0x19a)](),'unitId':_0x2c0d25,'threadId':_0x514214,'mention':_0x5e279e,'content':_0x2aaf89,'replyId':_0xee1bd8},_0x5ac3dc=await this['_httpService'][_0x494d6d(0x184)](_0x494d6d(0x1d4)+_0x2c0d25+'/edit',{'body':_0x2162ce});return!_0x5ac3dc[_0x494d6d(0x19c)][_0x494d6d(0x1b5)]||_0x5ac3dc[_0x494d6d(0x19c)][_0x494d6d(0x1b5)][_0x494d6d(0x199)]===0x1;}async[_0xc4cba8(0x1ac)](_0x4fd942){const _0x2002c0=_0xc4cba8,{unitId:_0x5e96ed}=_0x4fd942,_0x407aa5=_0x4fd942[_0x2002c0(0x17e)],_0x11047a={'memberId':this[_0x2002c0(0x190)][_0x2002c0(0x1d2)]()[_0x2002c0(0x17c)],'unitId':_0x5e96ed,'threadId':_0x407aa5,'solved':_0x4fd942[_0x2002c0(0x1e2)]?I[_0x2002c0(0x1cc)]:I[_0x2002c0(0x1d8)]},_0x4b7a69=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x5e96ed+'/solved',{'body':_0x11047a});return!_0x4b7a69['body'][_0x2002c0(0x1b5)]||_0x4b7a69[_0x2002c0(0x19c)][_0x2002c0(0x1b5)]['code']===0x1;}async[_0xc4cba8(0x1b3)](_0x374676,_0x38568a,_0x29009b,_0x11ea73){const _0x42b961=_0xc4cba8,_0x42dc65={'memberId':(await this[_0x42b961(0x1a9)][_0x42b961(0x1db)](_0x374676))[_0x42b961(0x19a)](),'threadId':_0x29009b,'replyId':_0x11ea73,'unitId':_0x374676},_0x52fdd0=await this[_0x42b961(0x1de)][_0x42b961(0x184)](_0x42b961(0x1d4)+_0x374676+_0x42b961(0x191),{'body':_0x42dc65});return!_0x52fdd0['body']['error']||_0x52fdd0[_0x42b961(0x19c)][_0x42b961(0x1b5)][_0x42b961(0x199)]===0x1;}async[_0xc4cba8(0x1b9)](_0xc8e034,_0x1b8f50,_0xdfc69a){const _0x4864a9=_0xc4cba8,_0x191c85={'unitId':_0xc8e034,'threadId':_0xdfc69a},_0x132fc9=await this[_0x4864a9(0x1de)][_0x4864a9(0x184)](_0x4864a9(0x1d4)+_0xc8e034+_0x4864a9(0x18d),{'body':_0x191c85}),_0x578c82=_0xdfc69a['map'](_0x5636b8=>G(_0x132fc9[_0x4864a9(0x19c)][_0x4864a9(0x1bb)][_0x5636b8],_0xc8e034,_0x1b8f50))[_0x4864a9(0x1e1)](Boolean);return Object['values'](_0x132fc9['body'][_0x4864a9(0x1a8)])[_0x4864a9(0x193)](_0x8f16=>{const _0x1cf2dd=_0x4864a9;this[_0x1cf2dd(0x190)]['addUser'](_0x8f16);}),_0x578c82;}[_0xc4cba8(0x192)](_0x23a00c){const _0x4aa716=_0xc4cba8;return{'id':_0x23a00c['id'],'threadId':_0x23a00c[_0x4aa716(0x17e)],'ref':_0x23a00c[_0x4aa716(0x1c9)]};}};g=x([_(0x0,c[_0xc4cba8(0x19b)](P['HTTPService'])),_(0x1,c[_0xc4cba8(0x19b)](c[_0xc4cba8(0x1bf)])),_(0x2,c[_0xc4cba8(0x19b)](b[_0xc4cba8(0x196)])),_(0x3,c['Inject'](c[_0xc4cba8(0x1a2)]))],g);var H=Object[_0xc4cba8(0x1d0)],J=(_0x4a10c3,_0x1fb755,_0x1ea2c8,_0x2986ff)=>{const _0x55c2f0=_0xc4cba8;for(var _0x1da4df=_0x2986ff>0x1?void 0x0:_0x2986ff?H(_0x1fb755,_0x1ea2c8):_0x1fb755,_0x60a24=_0x4a10c3[_0x55c2f0(0x188)]-0x1,_0x160099;_0x60a24>=0x0;_0x60a24--)(_0x160099=_0x4a10c3[_0x60a24])&&(_0x1da4df=_0x160099(_0x1da4df)||_0x1da4df);return _0x1da4df;},y=(_0x2be8e7,_0x62e726)=>(_0x177171,_0x5a071f)=>_0x62e726(_0x177171,_0x5a071f,_0x2be8e7);let C=class extends c['Disposable']{constructor(_0x10239a,_0xb43348){const _0xbdaafc=_0xc4cba8;super(),this[_0xbdaafc(0x1a0)]=_0x10239a,this[_0xbdaafc(0x1ad)]=_0xb43348,this['_initDataSource']();}[_0xc4cba8(0x175)](){const _0x40cf31=_0xc4cba8;this[_0x40cf31(0x1a0)][_0x40cf31(0x18a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x40cf31(0x1bd)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xc4cba8(0x19b)](g))],C);var F=Object[_0xc4cba8(0x1aa)],L=Object['getOwnPropertyDescriptor'],Z=(_0xcaf893,_0x584b1c,_0x540636)=>_0x584b1c in _0xcaf893?F(_0xcaf893,_0x584b1c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x540636}):_0xcaf893[_0x584b1c]=_0x540636,W=(_0xc49152,_0x528958,_0x5c7b16,_0x49186c)=>{const _0x19f838=_0xc4cba8;for(var _0x149ab=_0x49186c>0x1?void 0x0:_0x49186c?L(_0x528958,_0x5c7b16):_0x528958,_0xec637f=_0xc49152[_0x19f838(0x188)]-0x1,_0x37792f;_0xec637f>=0x0;_0xec637f--)(_0x37792f=_0xc49152[_0xec637f])&&(_0x149ab=_0x37792f(_0x149ab)||_0x149ab);return _0x149ab;},O=(_0x178d38,_0x222d7f)=>(_0x13cad7,_0x3204c0)=>_0x222d7f(_0x13cad7,_0x3204c0,_0x178d38),N=(_0x4ac73c,_0x37ab73,_0x2472cb)=>Z(_0x4ac73c,typeof _0x37ab73!='symbol'?_0x37ab73+'':_0x37ab73,_0x2472cb);exports[_0xc4cba8(0x1b7)]=class extends c['Plugin']{constructor(_0x5ca669=D,_0x1eec29,_0x2ddfd0){const _0x2d68ef=_0xc4cba8;super(),this[_0x2d68ef(0x189)]=_0x5ca669,this[_0x2d68ef(0x1d1)]=_0x1eec29,this[_0x2d68ef(0x178)]=_0x2ddfd0;const {..._0x10e1f8}=c['merge']({},D,this[_0x2d68ef(0x189)]);this[_0x2d68ef(0x178)]['setConfig'](q,_0x10e1f8);}['onStarting'](){const _0x4354b8=_0xc4cba8;[[g],[C],[p]][_0x4354b8(0x193)](_0x3d8323=>{const _0x1cdb04=_0x4354b8;this[_0x1cdb04(0x1d1)][_0x1cdb04(0x198)](_0x3d8323);});}['onReady'](){const _0x3b168f=_0xc4cba8;this[_0x3b168f(0x1d1)]['get'](C),this[_0x3b168f(0x1d1)][_0x3b168f(0x1a5)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xc4cba8(0x17f),U),N(exports[_0xc4cba8(0x1b7)],_0xc4cba8(0x177),c[_0xc4cba8(0x1a3)]['UNIVER_UNKNOWN']),exports[_0xc4cba8(0x1b7)]=W([c[_0xc4cba8(0x1d5)](j[_0xc4cba8(0x182)],b[_0xc4cba8(0x1c7)],T['UniverLicensePlugin']),O(0x1,c[_0xc4cba8(0x19b)](c['Injector'])),O(0x2,c[_0xc4cba8(0x1af)])],exports[_0xc4cba8(0x1b7)]);
|
|
1
|
+
'use strict';function _0x3e65(){const _0x12d064=['replies','map','getUnit','comments','@univerjs/thread-comment','parse','184482hEAbVe','_init','21yrnHcj','values','get','length','getUser','15WDmLzZ','deleteComment','@univerjs-pro/collaboration-client','reply','delete','@univerjs/thread-comment-ui','_initUserSync','_initDataSource','requireSession','Unknown','rangeType','@univerjs/network','UniverInstanceType','_userService','error','YYYY/MM/DD\x20HH:mm','listComments','_httpService','disposeWithMe','_injector','updateComment','setConfig','UniverThreadCommentUIPlugin','onReady','rangeId','comment','filter','IConfigService','Disposable','UniverThreadCommentDataSourcePlugin','find','getOwnPropertyDescriptor','CustomRangeType','326826ANsTJK','OpenOrReOpen','/universer-api/comment/unit/','Edit','@univerjs-pro/license','UserManagerService','_sessionService','9554720XxvWhr','Injector','solved','resolved','ThreadCommentModel','_threadCommentDataSource','_configService','body','addUser','_threadCommentDataSourceService','/list','Solved','users','8qJsVbq','Inject','user','118591XlERqi','addComment','DependentOn','replyId','createTimestamp','dayjs','userID','size','personId','/reply','format','unitId','parentId','1255112UXHrCC','root','threadId','_commentService','Solve','Delete','userId','customRanges','type','UNRECOGNIZED','pipe','COMMENT','defineProperty','add','CollaborationSessionService','1349262CvskOP','subscribe','UniverLicensePlugin','content','toStringTag','getCurrentUser','UNIVER_UNKNOWN','slice','@univerjs/core','Plugin','Add','/add','1304044NbAanl','/delete','_threadCommentModel','resolveComment','symbol','commentUpdate$','code','HTTPService','getMemberID','post','payload','Reply','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','/universer-api/user/list'];_0x3e65=function(){return _0x12d064;};return _0x3e65();}function _0x2033(_0x2acc7f,_0x2c0adc){const _0x3e6598=_0x3e65();return _0x2033=function(_0x203343,_0x2f0255){_0x203343=_0x203343-0x165;let _0x17e943=_0x3e6598[_0x203343];return _0x17e943;},_0x2033(_0x2acc7f,_0x2c0adc);}const _0x2f412a=_0x2033;(function(_0x2f5821,_0x33cb29){const _0x3cd949=_0x2033,_0x4b065a=_0x2f5821();while(!![]){try{const _0x32fdb5=parseInt(_0x3cd949(0x1d1))/0x1+parseInt(_0x3cd949(0x17c))/0x2+-parseInt(_0x3cd949(0x170))/0x3*(parseInt(_0x3cd949(0x1ce))/0x4)+-parseInt(_0x3cd949(0x199))/0x5*(-parseInt(_0x3cd949(0x1ba))/0x6)+parseInt(_0x3cd949(0x194))/0x7*(-parseInt(_0x3cd949(0x1de))/0x8)+-parseInt(_0x3cd949(0x192))/0x9+parseInt(_0x3cd949(0x1c1))/0xa;if(_0x32fdb5===_0x33cb29)break;else _0x4b065a['push'](_0x4b065a['shift']());}catch(_0x141262){_0x4b065a['push'](_0x4b065a['shift']());}}}(_0x3e65,0x79c89));Object[_0x2f412a(0x16d)](exports,Symbol[_0x2f412a(0x174)],{'value':'Module'});const b=require(_0x2f412a(0x19b)),T=require(_0x2f412a(0x1be)),c=require(_0x2f412a(0x178)),j=require(_0x2f412a(0x19e)),M=require(_0x2f412a(0x190)),w=require('rxjs'),P=require(_0x2f412a(0x1a4)),U=_0x2f412a(0x189);var I=(_0x29e037=>(_0x29e037[_0x29e037[_0x2f412a(0x1bb)]=0x0]=_0x2f412a(0x1bb),_0x29e037[_0x29e037[_0x2f412a(0x1cc)]=0x1]=_0x2f412a(0x1cc),_0x29e037[_0x29e037[_0x2f412a(0x16a)]=-0x1]=_0x2f412a(0x16a),_0x29e037))(I||{}),v=(_0x3b7c36=>(_0x3b7c36[_0x3b7c36[_0x2f412a(0x1a2)]=0x0]=_0x2f412a(0x1a2),_0x3b7c36[_0x3b7c36['Add']=0x1]=_0x2f412a(0x17a),_0x3b7c36[_0x3b7c36[_0x2f412a(0x187)]=0x2]=_0x2f412a(0x187),_0x3b7c36[_0x3b7c36[_0x2f412a(0x1bd)]=0x3]='Edit',_0x3b7c36[_0x3b7c36['Delete']=0x4]=_0x2f412a(0x166),_0x3b7c36[_0x3b7c36[_0x2f412a(0x165)]=0x5]=_0x2f412a(0x165),_0x3b7c36[_0x3b7c36[_0x2f412a(0x16a)]=-0x1]=_0x2f412a(0x16a),_0x3b7c36))(v||{});const f=_0x12c85a=>c[_0x2f412a(0x1d6)](new Date(+_0x12c85a))[_0x2f412a(0x1db)](_0x2f412a(0x1a8)),R=async(_0x2a7fa5,_0x4762ec)=>{const _0x4851ab=_0x2f412a,_0x51cf37=_0x2a7fa5[_0x4851ab(0x196)](c[_0x4851ab(0x1bf)]),_0x3e75fa=_0x2a7fa5[_0x4851ab(0x196)](P[_0x4851ab(0x183)]);_0x4762ec[_0x4851ab(0x18a)](_0x5638ea=>{const _0x3b07d2=_0x4851ab;_0x51cf37[_0x3b07d2(0x198)](_0x5638ea)&&_0x4762ec[_0x3b07d2(0x19d)](_0x5638ea);}),_0x4762ec[_0x4851ab(0x1d8)]&&(await _0x3e75fa[_0x4851ab(0x196)](_0x4851ab(0x18b),{'params':{'userIDs':[..._0x4762ec]}}))['body'][_0x4851ab(0x1cd)]['forEach'](_0x42602d=>{const _0x3e27f4=_0x4851ab;_0x42602d&&_0x51cf37[_0x3e27f4(0x1c9)](_0x42602d);});};var $=Object[_0x2f412a(0x1b8)],E=(_0x1c48df,_0x3ecf21,_0x34833f,_0x427565)=>{const _0xbf5d58=_0x2f412a;for(var _0x4de9f5=_0x427565>0x1?void 0x0:_0x427565?$(_0x3ecf21,_0x34833f):_0x3ecf21,_0x4d9c2a=_0x1c48df[_0xbf5d58(0x197)]-0x1,_0x3e545e;_0x4d9c2a>=0x0;_0x4d9c2a--)(_0x3e545e=_0x1c48df[_0x4d9c2a])&&(_0x4de9f5=_0x3e545e(_0x4de9f5)||_0x4de9f5);return _0x4de9f5;},S=(_0x9cf3f2,_0x54b6d0)=>(_0x352c3e,_0x46e3df)=>_0x54b6d0(_0x352c3e,_0x46e3df,_0x9cf3f2);let p=class extends c['Disposable']{constructor(_0x16e161,_0x563eb7,_0x1a590b,_0xaa9f64){const _0x2ad6bd=_0x2f412a;super(),this[_0x2ad6bd(0x1e1)]=_0x16e161,this[_0x2ad6bd(0x17e)]=_0x563eb7,this['_userService']=_0x1a590b,this[_0x2ad6bd(0x1ac)]=_0xaa9f64,this[_0x2ad6bd(0x193)](),this['_initUserSync']();}[_0x2f412a(0x19f)](){const _0x28e952=_0x2f412a;this['disposeWithMe'](this[_0x28e952(0x17e)][_0x28e952(0x181)][_0x28e952(0x16b)](w['bufferTime'](0x10))[_0x28e952(0x171)](_0x56faef=>{const _0x1a2d38=new Set();_0x56faef['forEach'](_0x123234=>{const _0x1909d7=_0x2033;switch(_0x123234['type']){case _0x1909d7(0x16e):{const _0x41d66a=_0x123234[_0x1909d7(0x186)][_0x1909d7(0x1d9)];_0x1a2d38['add'](_0x41d66a);break;}}}),R(this['_injector'],_0x1a2d38);}));}[_0x2f412a(0x193)](){const _0x1789ba=_0x2f412a;this[_0x1789ba(0x1ab)](this[_0x1789ba(0x1e1)]['commentUpdate$'][_0x1789ba(0x171)](async _0x4c0e23=>{const _0xd81a10=_0x1789ba;var _0x2c1c7b,_0xb0f14b,_0xbfdf5b,_0x3d8df3;const _0x2a622d=(_0x2c1c7b=this[_0xd81a10(0x17e)]['getUnit'](_0x4c0e23[_0xd81a10(0x1dc)])[_0xd81a10(0x1b7)](_0x13755=>_0x13755[_0xd81a10(0x1e0)]===_0x4c0e23['threadId']))==null?void 0x0:_0x2c1c7b[_0xd81a10(0x1df)];if(!_0x2a622d)return;const {unitId:_0x53a921,subUnitId:_0x2f12e}=_0x2a622d;switch(_0x4c0e23['user']&&this[_0xd81a10(0x1a6)][_0xd81a10(0x1c9)](_0x4c0e23[_0xd81a10(0x1d0)]),_0x4c0e23[_0xd81a10(0x169)]){case v[_0xd81a10(0x17a)]:break;case v[_0xd81a10(0x187)]:{this['_threadCommentModel'][_0xd81a10(0x1d2)](_0x53a921,_0x2f12e,{'unitId':_0x53a921,'subUnitId':_0x2f12e,'ref':'','id':_0x4c0e23[_0xd81a10(0x1d4)],'dT':f(+_0x4c0e23[_0xd81a10(0x1d5)]),'threadId':_0x4c0e23[_0xd81a10(0x1e0)],'personId':(_0xbfdf5b=(_0xb0f14b=_0x4c0e23[_0xd81a10(0x1d0)])==null?void 0x0:_0xb0f14b['userID'])!=null?_0xbfdf5b:_0x4c0e23[_0xd81a10(0x167)],'text':JSON[_0xd81a10(0x191)](_0x4c0e23[_0xd81a10(0x173)]),'parentId':_0x2a622d['id']});break;}case v['Delete']:{const _0x33850f=this[_0xd81a10(0x17e)]['getComment'](_0x53a921,_0x2f12e,_0x4c0e23[_0xd81a10(0x1d4)]);_0x33850f&&_0x33850f[_0xd81a10(0x1dd)]&&this['_threadCommentModel'][_0xd81a10(0x19a)](_0x53a921,_0x2f12e,_0x4c0e23[_0xd81a10(0x1d4)]);break;}case v[_0xd81a10(0x1bd)]:{this[_0xd81a10(0x17e)]['updateComment'](_0x53a921,_0x2f12e,{'commentId':_0x4c0e23['replyId'],'text':JSON[_0xd81a10(0x191)](_0x4c0e23[_0xd81a10(0x173)])});break;}case v[_0xd81a10(0x165)]:{const _0x426524=(_0x3d8df3=this[_0xd81a10(0x17e)][_0xd81a10(0x18e)](_0x4c0e23[_0xd81a10(0x1dc)])[_0xd81a10(0x1b7)](_0x283cc7=>_0x283cc7[_0xd81a10(0x1e0)]===_0x4c0e23[_0xd81a10(0x1e0)]))==null?void 0x0:_0x3d8df3['root'];_0x426524&&this[_0xd81a10(0x17e)][_0xd81a10(0x17f)](_0x53a921,_0x2f12e,_0x426524['id'],_0x4c0e23['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x2f412a(0x1cf)](b['CommentService'])),S(0x1,c['Inject'](M[_0x2f412a(0x1c5)])),S(0x2,c['Inject'](c[_0x2f412a(0x1bf)])),S(0x3,c[_0x2f412a(0x1cf)](c[_0x2f412a(0x1c2)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x2f412a(0x1b8)],x=(_0x42f0f9,_0x51d420,_0x211ed0,_0x428694)=>{const _0x1c57ab=_0x2f412a;for(var _0xaa1171=_0x428694>0x1?void 0x0:_0x428694?A(_0x51d420,_0x211ed0):_0x51d420,_0x452a2d=_0x42f0f9[_0x1c57ab(0x197)]-0x1,_0x51a3e9;_0x452a2d>=0x0;_0x452a2d--)(_0x51a3e9=_0x42f0f9[_0x452a2d])&&(_0xaa1171=_0x51a3e9(_0xaa1171)||_0xaa1171);return _0xaa1171;},_=(_0xa9bdb6,_0x4e7889)=>(_0x35e4dc,_0x2339de)=>_0x4e7889(_0x35e4dc,_0x2339de,_0xa9bdb6);function Y(_0x360505,_0x2aa2a1){const _0x1ca8cc=_0x2f412a,_0x51d3d4=_0x360505['replies'][0x0];return{..._0x2aa2a1,'id':_0x51d3d4['replyId'],'resolved':_0x360505[_0x1ca8cc(0x1c3)]===0x1,'dT':f(_0x51d3d4[_0x1ca8cc(0x1d5)]),'personId':_0x51d3d4[_0x1ca8cc(0x167)],'threadId':_0x51d3d4['threadId']};}function G(_0x640a64,_0x113e02,_0x2b7038){const _0x2d74e3=_0x2f412a;var _0x806ead,_0x50c9df;if(((_0x50c9df=(_0x806ead=_0x640a64==null?void 0x0:_0x640a64[_0x2d74e3(0x18c)])==null?void 0x0:_0x806ead[_0x2d74e3(0x197)])!=null?_0x50c9df:0x0)>0x0){const _0x458340=(_0x7be113,_0x365b81)=>({'id':_0x7be113[_0x2d74e3(0x1d4)],'threadId':_0x7be113[_0x2d74e3(0x1e0)],'dT':f(_0x7be113[_0x2d74e3(0x1d5)]),'personId':_0x7be113[_0x2d74e3(0x167)],'resolved':_0x640a64['solved']===I[_0x2d74e3(0x1cc)],'unitId':_0x113e02,'subUnitId':_0x2b7038,'text':JSON[_0x2d74e3(0x191)](_0x7be113['content']),'parentId':_0x365b81}),_0x21cecd=_0x458340(_0x640a64[_0x2d74e3(0x18c)][0x0]);return{..._0x21cecd,'children':_0x640a64['replies'][_0x2d74e3(0x177)](0x1)[_0x2d74e3(0x18d)](_0x533c42=>_0x458340(_0x533c42,_0x21cecd['id']))};}return null;}let g=class{constructor(_0x44a1de,_0x140ca2,_0x19ba42,_0x27f2b3){const _0x4cebde=_0x2f412a;this[_0x4cebde(0x1aa)]=_0x44a1de,this[_0x4cebde(0x1a6)]=_0x140ca2,this[_0x4cebde(0x1c0)]=_0x19ba42,this['_injector']=_0x27f2b3;}async[_0x2f412a(0x1d2)](_0x31a709){const _0x337d4f=_0x2f412a;var _0x1c59db,_0x108bce;const {parentId:_0x440b72,unitId:_0x36183a,text:_0x14be0f,threadId:_0x7f1cab}=_0x31a709,_0x5cfaa1=(_0x108bce=(_0x1c59db=_0x14be0f[_0x337d4f(0x168)])==null?void 0x0:_0x1c59db[_0x337d4f(0x1b3)](_0x79a92f=>_0x79a92f['rangeType']===c[_0x337d4f(0x1b9)][_0x337d4f(0x16c)])[_0x337d4f(0x18d)](_0x34233a=>_0x34233a['rangeId']))!=null?_0x108bce:[],_0x927c35=JSON['stringify'](_0x14be0f),_0x49b23b=(await this['_sessionService']['requireSession'](_0x36183a))['getMemberID']();if(_0x440b72){const _0x1ef0e5={'memberId':_0x49b23b,'unitId':_0x36183a,'content':_0x927c35,'mention':_0x5cfaa1,'threadId':_0x7f1cab},_0x321dee=(await this['_httpService'][_0x337d4f(0x185)]('/universer-api/comment/unit/'+_0x36183a+_0x337d4f(0x1da),{'body':_0x1ef0e5}))[_0x337d4f(0x1c8)][_0x337d4f(0x19c)];return{..._0x31a709,'id':_0x321dee[_0x337d4f(0x1d4)],'dT':c['dayjs'](+_0x321dee[_0x337d4f(0x1d5)])[_0x337d4f(0x1db)](_0x337d4f(0x1a8)),'personId':_0x321dee[_0x337d4f(0x167)]};}else{const _0x4a2cd5={'memberId':_0x49b23b,'unitId':_0x36183a,'content':_0x927c35,'mention':_0x5cfaa1},_0x1bac5f=await this[_0x337d4f(0x1aa)]['post'](_0x337d4f(0x1bc)+_0x36183a+_0x337d4f(0x17b),{'body':_0x4a2cd5});return Y(_0x1bac5f[_0x337d4f(0x1c8)][_0x337d4f(0x1b2)],_0x31a709);}}async[_0x2f412a(0x1ad)](_0x516d0a){const _0x562140=_0x2f412a;var _0xd0b62,_0x3038f4;const {text:_0x3ed933,unitId:_0x3f25cc}=_0x516d0a,_0x439041=(_0x3038f4=(_0xd0b62=_0x3ed933['customRanges'])==null?void 0x0:_0xd0b62['filter'](_0x2217a9=>_0x2217a9[_0x562140(0x1a3)]===c[_0x562140(0x1b9)][_0x562140(0x16c)])[_0x562140(0x18d)](_0x3a5587=>_0x3a5587[_0x562140(0x1b1)]))!=null?_0x3038f4:[],_0x54e125=JSON['stringify'](_0x3ed933),_0x2190c1=_0x516d0a[_0x562140(0x1e0)],_0x5881b7=_0x516d0a['id'],_0x16956c={'memberId':(await this[_0x562140(0x1c0)][_0x562140(0x1a1)](_0x3f25cc))[_0x562140(0x184)](),'unitId':_0x3f25cc,'threadId':_0x2190c1,'mention':_0x439041,'content':_0x54e125,'replyId':_0x5881b7},_0x503467=await this['_httpService'][_0x562140(0x185)](_0x562140(0x1bc)+_0x3f25cc+'/edit',{'body':_0x16956c});return!_0x503467['body'][_0x562140(0x1a7)]||_0x503467[_0x562140(0x1c8)]['error'][_0x562140(0x182)]===0x1;}async[_0x2f412a(0x17f)](_0x313bf5){const _0x1e4958=_0x2f412a,{unitId:_0x1f7c30}=_0x313bf5,_0x214c24=_0x313bf5[_0x1e4958(0x1e0)],_0x1d082d={'memberId':this[_0x1e4958(0x1a6)][_0x1e4958(0x175)]()[_0x1e4958(0x1d7)],'unitId':_0x1f7c30,'threadId':_0x214c24,'solved':_0x313bf5[_0x1e4958(0x1c4)]?I[_0x1e4958(0x1cc)]:I['OpenOrReOpen']},_0x56ade7=await this[_0x1e4958(0x1aa)][_0x1e4958(0x185)](_0x1e4958(0x1bc)+_0x1f7c30+'/solved',{'body':_0x1d082d});return!_0x56ade7[_0x1e4958(0x1c8)][_0x1e4958(0x1a7)]||_0x56ade7[_0x1e4958(0x1c8)][_0x1e4958(0x1a7)][_0x1e4958(0x182)]===0x1;}async[_0x2f412a(0x19a)](_0x32fe90,_0x12c816,_0x2daac1,_0x3e6fbc){const _0x441f1c=_0x2f412a,_0x490116={'memberId':(await this[_0x441f1c(0x1c0)][_0x441f1c(0x1a1)](_0x32fe90))[_0x441f1c(0x184)](),'threadId':_0x2daac1,'replyId':_0x3e6fbc,'unitId':_0x32fe90},_0x23482d=await this[_0x441f1c(0x1aa)]['post']('/universer-api/comment/unit/'+_0x32fe90+_0x441f1c(0x17d),{'body':_0x490116});return!_0x23482d[_0x441f1c(0x1c8)][_0x441f1c(0x1a7)]||_0x23482d[_0x441f1c(0x1c8)][_0x441f1c(0x1a7)][_0x441f1c(0x182)]===0x1;}async[_0x2f412a(0x1a9)](_0x13d005,_0x48d368,_0x499b0e){const _0x2c146f=_0x2f412a,_0x84eb42={'unitId':_0x13d005,'threadId':_0x499b0e},_0x2e83f5=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x13d005+_0x2c146f(0x1cb),{'body':_0x84eb42}),_0x4c0a0a=_0x499b0e[_0x2c146f(0x18d)](_0x3d88f5=>G(_0x2e83f5['body'][_0x2c146f(0x18f)][_0x3d88f5],_0x13d005,_0x48d368))[_0x2c146f(0x1b3)](Boolean);return Object[_0x2c146f(0x195)](_0x2e83f5[_0x2c146f(0x1c8)][_0x2c146f(0x1cd)])['forEach'](_0x3b1b54=>{const _0x5e1a0b=_0x2c146f;this[_0x5e1a0b(0x1a6)][_0x5e1a0b(0x1c9)](_0x3b1b54);}),_0x4c0a0a;}['saveCommentToSnapshot'](_0x32437e){return{'id':_0x32437e['id'],'threadId':_0x32437e['threadId'],'ref':_0x32437e['ref']};}};g=x([_(0x0,c[_0x2f412a(0x1cf)](P['HTTPService'])),_(0x1,c[_0x2f412a(0x1cf)](c['UserManagerService'])),_(0x2,c[_0x2f412a(0x1cf)](b[_0x2f412a(0x16f)])),_(0x3,c[_0x2f412a(0x1cf)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x4d7f05,_0x49aac3,_0x2e8be8,_0x56f18b)=>{const _0xe67251=_0x2f412a;for(var _0x17b84c=_0x56f18b>0x1?void 0x0:_0x56f18b?H(_0x49aac3,_0x2e8be8):_0x49aac3,_0x236b5a=_0x4d7f05[_0xe67251(0x197)]-0x1,_0x32af9b;_0x236b5a>=0x0;_0x236b5a--)(_0x32af9b=_0x4d7f05[_0x236b5a])&&(_0x17b84c=_0x32af9b(_0x17b84c)||_0x17b84c);return _0x17b84c;},y=(_0x5db0dd,_0x24705b)=>(_0x545006,_0x5961bf)=>_0x24705b(_0x545006,_0x5961bf,_0x5db0dd);let C=class extends c[_0x2f412a(0x1b5)]{constructor(_0xc3e779,_0x3bfc6f){const _0x3b3a2f=_0x2f412a;super(),this[_0x3b3a2f(0x1ca)]=_0xc3e779,this[_0x3b3a2f(0x1c6)]=_0x3bfc6f,this[_0x3b3a2f(0x1a0)]();}[_0x2f412a(0x1a0)](){const _0x29b07f=_0x2f412a;this[_0x29b07f(0x1ca)]['dataSource']=this[_0x29b07f(0x1c6)],this[_0x29b07f(0x1ca)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x2f412a(0x1cf)](g))],C);var F=Object[_0x2f412a(0x16d)],L=Object[_0x2f412a(0x1b8)],Z=(_0x8de0e4,_0x432279,_0x2c3657)=>_0x432279 in _0x8de0e4?F(_0x8de0e4,_0x432279,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c3657}):_0x8de0e4[_0x432279]=_0x2c3657,W=(_0xbb4e53,_0x528743,_0x576ab5,_0x2ccd32)=>{const _0xd2546b=_0x2f412a;for(var _0x21f758=_0x2ccd32>0x1?void 0x0:_0x2ccd32?L(_0x528743,_0x576ab5):_0x528743,_0x2dc612=_0xbb4e53[_0xd2546b(0x197)]-0x1,_0x45631b;_0x2dc612>=0x0;_0x2dc612--)(_0x45631b=_0xbb4e53[_0x2dc612])&&(_0x21f758=_0x45631b(_0x21f758)||_0x21f758);return _0x21f758;},O=(_0x1b6b30,_0x356f79)=>(_0x11825d,_0xa22e59)=>_0x356f79(_0x11825d,_0xa22e59,_0x1b6b30),N=(_0x301f94,_0x5c2cdd,_0x57049b)=>Z(_0x301f94,typeof _0x5c2cdd!=_0x2f412a(0x180)?_0x5c2cdd+'':_0x5c2cdd,_0x57049b);exports[_0x2f412a(0x1b6)]=class extends c[_0x2f412a(0x179)]{constructor(_0x5db8b5=D,_0xb54a1,_0x5ac467){const _0x33945f=_0x2f412a;super(),this[_0x33945f(0x188)]=_0x5db8b5,this[_0x33945f(0x1ac)]=_0xb54a1,this[_0x33945f(0x1c7)]=_0x5ac467;const {..._0x26ce40}=c['merge']({},D,this[_0x33945f(0x188)]);this['_configService'][_0x33945f(0x1ae)](q,_0x26ce40);}['onStarting'](){const _0x51db39=_0x2f412a;[[g],[C],[p]][_0x51db39(0x18a)](_0x2f35aa=>{const _0x1e2b0b=_0x51db39;this['_injector'][_0x1e2b0b(0x16e)](_0x2f35aa);});}[_0x2f412a(0x1b0)](){const _0x24d4e1=_0x2f412a;this[_0x24d4e1(0x1ac)][_0x24d4e1(0x196)](C),this[_0x24d4e1(0x1ac)][_0x24d4e1(0x196)](p);}},N(exports[_0x2f412a(0x1b6)],'pluginName',U),N(exports[_0x2f412a(0x1b6)],_0x2f412a(0x169),c[_0x2f412a(0x1a5)][_0x2f412a(0x176)]),exports[_0x2f412a(0x1b6)]=W([c[_0x2f412a(0x1d3)](j[_0x2f412a(0x1af)],b['UniverCollaborationClientPlugin'],T[_0x2f412a(0x172)]),O(0x1,c[_0x2f412a(0x1cf)](c[_0x2f412a(0x1c2)])),O(0x2,c[_0x2f412a(0x1b4)])],exports[_0x2f412a(0x1b6)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4f9315=_0x1093;function _0x96a8(){const _0x11c432=['addUser','Solved','ref','content','getOwnPropertyDescriptor','setConfig','resolved','/edit','784YKkfsJ','UNRECOGNIZED','_initUserSync','syncUpdateMutationToColla','saveCommentToSnapshot','_injector','error','map','onReady','listComments','/universer-api/user/list','rangeType','_httpService','YYYY/MM/DD\x20HH:mm','/solved','size','userId','symbol','addComment','getMemberID','commentUpdate$','code','Edit','getComment','parentId','stringify','filter','unitId','resolveComment','rangeId','Solve','replyId','_userService','UNIVER_UNKNOWN','deleteComment','dataSource','payload','90oqcliU','solved','comment','6747856yDIypc','pluginName','comments','length','body','_commentService','root','_sessionService','replies','getCurrentUser','users','_threadCommentModel','defineProperty','getUnit','OpenOrReOpen','9627366ZMmpjv','type','slice','1870196FQApxT','/add','/universer-api/comment/unit/','COMMENT','_configService','user','818010nTJToR','4831821BlKIdG','9228hdXaxi','add','thread-comment-data-source.config','Reply','delete','_initDataSource','get','Unknown','format','disposeWithMe','createTimestamp','642795vzmxvy','_threadCommentDataSource','pipe','/list','find','_init','_threadCommentDataSourceService','threadId','post','forEach','30HBAqxF','values','updateComment','userID','parse','Delete','requireSession','Add','customRanges'];_0x96a8=function(){return _0x11c432;};return _0x96a8();}(function(_0x2b693b,_0x563364){const _0x58350a=_0x1093,_0x48d822=_0x2b693b();while(!![]){try{const _0x33833c=-parseInt(_0x58350a(0xe4))/0x1+-parseInt(_0x58350a(0xde))/0x2+-parseInt(_0x58350a(0xe6))/0x3*(-parseInt(_0x58350a(0x10c))/0x4)+parseInt(_0x58350a(0xf1))/0x5*(-parseInt(_0x58350a(0xfb))/0x6)+-parseInt(_0x58350a(0xdb))/0x7+-parseInt(_0x58350a(0x134))/0x8+parseInt(_0x58350a(0xe5))/0x9*(parseInt(_0x58350a(0x131))/0xa);if(_0x33833c===_0x563364)break;else _0x48d822['push'](_0x48d822['shift']());}catch(_0x42f4b5){_0x48d822['push'](_0x48d822['shift']());}}}(_0x96a8,0xc831a));import{CommentService as _0x3ab801,CollaborationSessionService as _0x243c30,UniverCollaborationClientPlugin as _0x589b09}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x10820f}from'@univerjs-pro/license';import{dayjs as _0x113944,UserManagerService as _0x3bc288,Inject as _0x4395a5,Injector as _0x3849c5,Disposable as _0x3f16eb,CustomRangeType as _0x1fdbdf,UniverInstanceType as _0x1d95eb,DependentOn as _0x4b6a7b,IConfigService as _0xd35145,Plugin as _0x290c01,merge as _0x5aa3a4}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x8ab5ff}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x26caec,IThreadCommentDataSourceService as _0xd47b4}from'@univerjs/thread-comment';import{bufferTime as _0x745818}from'rxjs';import{HTTPService as _0x495cf5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2cea32=>(_0x2cea32[_0x2cea32[_0x4f9315(0xda)]=0x0]=_0x4f9315(0xda),_0x2cea32[_0x2cea32[_0x4f9315(0x105)]=0x1]=_0x4f9315(0x105),_0x2cea32[_0x2cea32[_0x4f9315(0x10d)]=-0x1]=_0x4f9315(0x10d),_0x2cea32))(I||{}),v=(_0x14b3a7=>(_0x14b3a7[_0x14b3a7[_0x4f9315(0xed)]=0x0]=_0x4f9315(0xed),_0x14b3a7[_0x14b3a7[_0x4f9315(0x102)]=0x1]='Add',_0x14b3a7[_0x14b3a7[_0x4f9315(0xe9)]=0x2]=_0x4f9315(0xe9),_0x14b3a7[_0x14b3a7[_0x4f9315(0x122)]=0x3]=_0x4f9315(0x122),_0x14b3a7[_0x14b3a7['Delete']=0x4]=_0x4f9315(0x100),_0x14b3a7[_0x14b3a7[_0x4f9315(0x12a)]=0x5]=_0x4f9315(0x12a),_0x14b3a7[_0x14b3a7[_0x4f9315(0x10d)]=-0x1]='UNRECOGNIZED',_0x14b3a7))(v||{});const D=_0x4a736c=>_0x113944(new Date(+_0x4a736c))[_0x4f9315(0xee)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x45e369,_0x42f827)=>{const _0x4f2171=_0x4f9315,_0x141c32=_0x45e369[_0x4f2171(0xec)](_0x3bc288),_0x19cdba=_0x45e369[_0x4f2171(0xec)](_0x495cf5);_0x42f827[_0x4f2171(0xfa)](_0x3e7421=>{const _0x58b955=_0x4f2171;_0x141c32['getUser'](_0x3e7421)&&_0x42f827[_0x58b955(0xea)](_0x3e7421);}),_0x42f827[_0x4f2171(0x11b)]&&(await _0x19cdba[_0x4f2171(0xec)](_0x4f2171(0x116),{'params':{'userIDs':[..._0x42f827]}}))[_0x4f2171(0xd0)][_0x4f2171(0xd6)][_0x4f2171(0xfa)](_0x1fb079=>{const _0x7fd648=_0x4f2171;_0x1fb079&&_0x141c32[_0x7fd648(0x104)](_0x1fb079);});};var K=Object[_0x4f9315(0x108)],V=(_0x20f58a,_0x277ff2,_0x355b37,_0x12fa46)=>{const _0x568e55=_0x4f9315;for(var _0x272374=_0x12fa46>0x1?void 0x0:_0x12fa46?K(_0x277ff2,_0x355b37):_0x277ff2,_0x2aee80=_0x20f58a[_0x568e55(0xcf)]-0x1,_0x2a85c6;_0x2aee80>=0x0;_0x2aee80--)(_0x2a85c6=_0x20f58a[_0x2aee80])&&(_0x272374=_0x2a85c6(_0x272374)||_0x272374);return _0x272374;},p=(_0x43598d,_0xd8f65e)=>(_0x3d172e,_0x23861c)=>_0xd8f65e(_0x3d172e,_0x23861c,_0x43598d);let S=class extends _0x3f16eb{constructor(_0x5499df,_0x3d1d0e,_0x4ffe7a,_0x1a9d47){const _0x31b1d5=_0x4f9315;super(),this[_0x31b1d5(0xd1)]=_0x5499df,this[_0x31b1d5(0xd7)]=_0x3d1d0e,this['_userService']=_0x4ffe7a,this[_0x31b1d5(0x111)]=_0x1a9d47,this[_0x31b1d5(0xf6)](),this[_0x31b1d5(0x10e)]();}[_0x4f9315(0x10e)](){const _0x42caf8=_0x4f9315;this[_0x42caf8(0xef)](this[_0x42caf8(0xd7)][_0x42caf8(0x120)][_0x42caf8(0xf3)](_0x745818(0x10))['subscribe'](_0x20ab19=>{const _0x468743=_0x42caf8,_0x2c0254=new Set();_0x20ab19[_0x468743(0xfa)](_0x475f55=>{const _0x2a4489=_0x468743;switch(_0x475f55[_0x2a4489(0xdc)]){case'add':{const _0x27eb33=_0x475f55[_0x2a4489(0x130)]['personId'];_0x2c0254['add'](_0x27eb33);break;}}}),B(this['_injector'],_0x2c0254);}));}['_init'](){const _0x55fee9=_0x4f9315;this[_0x55fee9(0xef)](this['_commentService'][_0x55fee9(0x120)]['subscribe'](async _0x44860e=>{const _0x3a6bb7=_0x55fee9;var _0x4979be,_0x205623,_0x561492,_0x5100bc;const _0x2e4dcf=(_0x4979be=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xd9)](_0x44860e['unitId'])['find'](_0x1b0661=>_0x1b0661[_0x3a6bb7(0xf8)]===_0x44860e[_0x3a6bb7(0xf8)]))==null?void 0x0:_0x4979be['root'];if(!_0x2e4dcf)return;const {unitId:_0x2b5af0,subUnitId:_0x59b6b2}=_0x2e4dcf;switch(_0x44860e[_0x3a6bb7(0xe3)]&&this['_userService'][_0x3a6bb7(0x104)](_0x44860e[_0x3a6bb7(0xe3)]),_0x44860e[_0x3a6bb7(0xdc)]){case v[_0x3a6bb7(0x102)]:break;case v[_0x3a6bb7(0xe9)]:{this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x11e)](_0x2b5af0,_0x59b6b2,{'unitId':_0x2b5af0,'subUnitId':_0x59b6b2,'ref':'','id':_0x44860e[_0x3a6bb7(0x12b)],'dT':D(+_0x44860e[_0x3a6bb7(0xf0)]),'threadId':_0x44860e[_0x3a6bb7(0xf8)],'personId':(_0x561492=(_0x205623=_0x44860e[_0x3a6bb7(0xe3)])==null?void 0x0:_0x205623[_0x3a6bb7(0xfe)])!=null?_0x561492:_0x44860e[_0x3a6bb7(0x11c)],'text':JSON[_0x3a6bb7(0xff)](_0x44860e[_0x3a6bb7(0x107)]),'parentId':_0x2e4dcf['id']});break;}case v[_0x3a6bb7(0x100)]:{const _0x2c1f36=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x123)](_0x2b5af0,_0x59b6b2,_0x44860e['replyId']);_0x2c1f36&&_0x2c1f36[_0x3a6bb7(0x124)]&&this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x12e)](_0x2b5af0,_0x59b6b2,_0x44860e[_0x3a6bb7(0x12b)]);break;}case v['Edit']:{this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xfd)](_0x2b5af0,_0x59b6b2,{'commentId':_0x44860e[_0x3a6bb7(0x12b)],'text':JSON[_0x3a6bb7(0xff)](_0x44860e['content'])});break;}case v[_0x3a6bb7(0x12a)]:{const _0x36f6c0=(_0x5100bc=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xd9)](_0x44860e[_0x3a6bb7(0x127)])[_0x3a6bb7(0xf5)](_0x33056c=>_0x33056c[_0x3a6bb7(0xf8)]===_0x44860e[_0x3a6bb7(0xf8)]))==null?void 0x0:_0x5100bc[_0x3a6bb7(0xd2)];_0x36f6c0&&this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x128)](_0x2b5af0,_0x59b6b2,_0x36f6c0['id'],_0x44860e[_0x3a6bb7(0x132)]===I[_0x3a6bb7(0x105)]);break;}}}));}};function _0x1093(_0x3857f5,_0x4fd443){const _0x96a8bd=_0x96a8();return _0x1093=function(_0x109304,_0x485c03){_0x109304=_0x109304-0xce;let _0x298a36=_0x96a8bd[_0x109304];return _0x298a36;},_0x1093(_0x3857f5,_0x4fd443);}S=V([p(0x0,_0x4395a5(_0x3ab801)),p(0x1,_0x4395a5(_0x26caec)),p(0x2,_0x4395a5(_0x3bc288)),p(0x3,_0x4395a5(_0x3849c5))],S);const z=_0x4f9315(0xe8),M={};var k=Object[_0x4f9315(0x108)],Q=(_0x1bd5c6,_0x49c3ef,_0x14bbf8,_0x33aeee)=>{const _0x1768b1=_0x4f9315;for(var _0xb3d02=_0x33aeee>0x1?void 0x0:_0x33aeee?k(_0x49c3ef,_0x14bbf8):_0x49c3ef,_0x4a1d54=_0x1bd5c6[_0x1768b1(0xcf)]-0x1,_0x40768f;_0x4a1d54>=0x0;_0x4a1d54--)(_0x40768f=_0x1bd5c6[_0x4a1d54])&&(_0xb3d02=_0x40768f(_0xb3d02)||_0xb3d02);return _0xb3d02;},_=(_0x164b37,_0x3de780)=>(_0x4d7120,_0x39bfb0)=>_0x3de780(_0x4d7120,_0x39bfb0,_0x164b37);function X(_0x40d8b3,_0x3dfea5){const _0x38d0f5=_0x4f9315,_0x3485c1=_0x40d8b3[_0x38d0f5(0xd4)][0x0];return{..._0x3dfea5,'id':_0x3485c1[_0x38d0f5(0x12b)],'resolved':_0x40d8b3[_0x38d0f5(0x132)]===0x1,'dT':D(_0x3485c1[_0x38d0f5(0xf0)]),'personId':_0x3485c1['userId'],'threadId':_0x3485c1[_0x38d0f5(0xf8)]};}function ee(_0x14201c,_0x432a39,_0x82ef9c){const _0x2217ea=_0x4f9315;var _0x212383,_0x2550ff;if(((_0x2550ff=(_0x212383=_0x14201c==null?void 0x0:_0x14201c[_0x2217ea(0xd4)])==null?void 0x0:_0x212383[_0x2217ea(0xcf)])!=null?_0x2550ff:0x0)>0x0){const _0x3d64fa=(_0x16db86,_0x361ee9)=>({'id':_0x16db86['replyId'],'threadId':_0x16db86[_0x2217ea(0xf8)],'dT':D(_0x16db86['createTimestamp']),'personId':_0x16db86[_0x2217ea(0x11c)],'resolved':_0x14201c[_0x2217ea(0x132)]===I[_0x2217ea(0x105)],'unitId':_0x432a39,'subUnitId':_0x82ef9c,'text':JSON[_0x2217ea(0xff)](_0x16db86[_0x2217ea(0x107)]),'parentId':_0x361ee9}),_0x1d45fd=_0x3d64fa(_0x14201c['replies'][0x0]);return{..._0x1d45fd,'children':_0x14201c[_0x2217ea(0xd4)][_0x2217ea(0xdd)](0x1)[_0x2217ea(0x113)](_0xec80be=>_0x3d64fa(_0xec80be,_0x1d45fd['id']))};}return null;}let f=class{constructor(_0x5d2b5c,_0x24bb37,_0x17d125,_0x1f9715){const _0xa76332=_0x4f9315;this[_0xa76332(0x118)]=_0x5d2b5c,this[_0xa76332(0x12c)]=_0x24bb37,this['_sessionService']=_0x17d125,this[_0xa76332(0x111)]=_0x1f9715;}async[_0x4f9315(0x11e)](_0x39cff2){const _0x5e6a1a=_0x4f9315;var _0x606ea8,_0x1d8a59;const {parentId:_0x272415,unitId:_0x1dfb4c,text:_0x32f593,threadId:_0x40a64b}=_0x39cff2,_0x37930d=(_0x1d8a59=(_0x606ea8=_0x32f593[_0x5e6a1a(0x103)])==null?void 0x0:_0x606ea8[_0x5e6a1a(0x126)](_0x19b8b9=>_0x19b8b9[_0x5e6a1a(0x117)]===_0x1fdbdf['COMMENT'])[_0x5e6a1a(0x113)](_0x28d214=>_0x28d214['rangeId']))!=null?_0x1d8a59:[],_0x16ea6e=JSON[_0x5e6a1a(0x125)](_0x32f593),_0x41b451=(await this[_0x5e6a1a(0xd3)][_0x5e6a1a(0x101)](_0x1dfb4c))['getMemberID']();if(_0x272415){const _0x3018bc={'memberId':_0x41b451,'unitId':_0x1dfb4c,'content':_0x16ea6e,'mention':_0x37930d,'threadId':_0x40a64b},_0x3ccac9=(await this[_0x5e6a1a(0x118)][_0x5e6a1a(0xf9)]('/universer-api/comment/unit/'+_0x1dfb4c+'/reply',{'body':_0x3018bc}))[_0x5e6a1a(0xd0)]['reply'];return{..._0x39cff2,'id':_0x3ccac9[_0x5e6a1a(0x12b)],'dT':_0x113944(+_0x3ccac9[_0x5e6a1a(0xf0)])['format'](_0x5e6a1a(0x119)),'personId':_0x3ccac9[_0x5e6a1a(0x11c)]};}else{const _0x11ccd9={'memberId':_0x41b451,'unitId':_0x1dfb4c,'content':_0x16ea6e,'mention':_0x37930d},_0x15ab40=await this[_0x5e6a1a(0x118)][_0x5e6a1a(0xf9)](_0x5e6a1a(0xe0)+_0x1dfb4c+_0x5e6a1a(0xdf),{'body':_0x11ccd9});return X(_0x15ab40[_0x5e6a1a(0xd0)][_0x5e6a1a(0x133)],_0x39cff2);}}async[_0x4f9315(0xfd)](_0x9f708a){const _0x2e244c=_0x4f9315;var _0x1094ab,_0x9eadb1;const {text:_0x136fb3,unitId:_0x4b119a}=_0x9f708a,_0x8bcd7a=(_0x9eadb1=(_0x1094ab=_0x136fb3[_0x2e244c(0x103)])==null?void 0x0:_0x1094ab[_0x2e244c(0x126)](_0x2bdd51=>_0x2bdd51[_0x2e244c(0x117)]===_0x1fdbdf[_0x2e244c(0xe1)])[_0x2e244c(0x113)](_0x17fd80=>_0x17fd80[_0x2e244c(0x129)]))!=null?_0x9eadb1:[],_0x4292ea=JSON[_0x2e244c(0x125)](_0x136fb3),_0x74ef76=_0x9f708a[_0x2e244c(0xf8)],_0x47b62f=_0x9f708a['id'],_0x4cc6b6={'memberId':(await this['_sessionService'][_0x2e244c(0x101)](_0x4b119a))[_0x2e244c(0x11f)](),'unitId':_0x4b119a,'threadId':_0x74ef76,'mention':_0x8bcd7a,'content':_0x4292ea,'replyId':_0x47b62f},_0x17c92d=await this[_0x2e244c(0x118)][_0x2e244c(0xf9)](_0x2e244c(0xe0)+_0x4b119a+_0x2e244c(0x10b),{'body':_0x4cc6b6});return!_0x17c92d['body']['error']||_0x17c92d[_0x2e244c(0xd0)][_0x2e244c(0x112)][_0x2e244c(0x121)]===0x1;}async[_0x4f9315(0x128)](_0x2ae0aa){const _0xd71b21=_0x4f9315,{unitId:_0x2fa12d}=_0x2ae0aa,_0x398e82=_0x2ae0aa[_0xd71b21(0xf8)],_0x5cf04c={'memberId':this[_0xd71b21(0x12c)][_0xd71b21(0xd5)]()[_0xd71b21(0xfe)],'unitId':_0x2fa12d,'threadId':_0x398e82,'solved':_0x2ae0aa[_0xd71b21(0x10a)]?I['Solved']:I[_0xd71b21(0xda)]},_0x3cbf4b=await this[_0xd71b21(0x118)]['post'](_0xd71b21(0xe0)+_0x2fa12d+_0xd71b21(0x11a),{'body':_0x5cf04c});return!_0x3cbf4b['body'][_0xd71b21(0x112)]||_0x3cbf4b[_0xd71b21(0xd0)][_0xd71b21(0x112)][_0xd71b21(0x121)]===0x1;}async['deleteComment'](_0x35a27e,_0x1c2972,_0x1e2eb7,_0x5d94ad){const _0x1a143c=_0x4f9315,_0x4046a3={'memberId':(await this['_sessionService']['requireSession'](_0x35a27e))['getMemberID'](),'threadId':_0x1e2eb7,'replyId':_0x5d94ad,'unitId':_0x35a27e},_0x1097e9=await this[_0x1a143c(0x118)][_0x1a143c(0xf9)]('/universer-api/comment/unit/'+_0x35a27e+'/delete',{'body':_0x4046a3});return!_0x1097e9[_0x1a143c(0xd0)][_0x1a143c(0x112)]||_0x1097e9['body'][_0x1a143c(0x112)][_0x1a143c(0x121)]===0x1;}async[_0x4f9315(0x115)](_0x1c690d,_0x100e25,_0x249390){const _0x232e38=_0x4f9315,_0x3853ed={'unitId':_0x1c690d,'threadId':_0x249390},_0x4d5586=await this[_0x232e38(0x118)][_0x232e38(0xf9)](_0x232e38(0xe0)+_0x1c690d+_0x232e38(0xf4),{'body':_0x3853ed}),_0x35f3e8=_0x249390[_0x232e38(0x113)](_0x23232c=>ee(_0x4d5586['body'][_0x232e38(0xce)][_0x23232c],_0x1c690d,_0x100e25))[_0x232e38(0x126)](Boolean);return Object[_0x232e38(0xfc)](_0x4d5586[_0x232e38(0xd0)]['users'])['forEach'](_0x545a10=>{const _0x2a8ad9=_0x232e38;this['_userService'][_0x2a8ad9(0x104)](_0x545a10);}),_0x35f3e8;}[_0x4f9315(0x110)](_0x4af4cd){const _0x1c34a4=_0x4f9315;return{'id':_0x4af4cd['id'],'threadId':_0x4af4cd[_0x1c34a4(0xf8)],'ref':_0x4af4cd[_0x1c34a4(0x106)]};}};f=Q([_(0x0,_0x4395a5(_0x495cf5)),_(0x1,_0x4395a5(_0x3bc288)),_(0x2,_0x4395a5(_0x243c30)),_(0x3,_0x4395a5(_0x3849c5))],f);var re=Object[_0x4f9315(0x108)],te=(_0xaad7f3,_0x12e457,_0x427f69,_0x1a4463)=>{const _0x4f402c=_0x4f9315;for(var _0x4bc349=_0x1a4463>0x1?void 0x0:_0x1a4463?re(_0x12e457,_0x427f69):_0x12e457,_0x25fed4=_0xaad7f3[_0x4f402c(0xcf)]-0x1,_0x23bb74;_0x25fed4>=0x0;_0x25fed4--)(_0x23bb74=_0xaad7f3[_0x25fed4])&&(_0x4bc349=_0x23bb74(_0x4bc349)||_0x4bc349);return _0x4bc349;},N=(_0x20abad,_0x3bb62e)=>(_0x14fa97,_0x5215f0)=>_0x3bb62e(_0x14fa97,_0x5215f0,_0x20abad);let g=class extends _0x3f16eb{constructor(_0x1c665d,_0x42355f){const _0x1603bd=_0x4f9315;super(),this[_0x1603bd(0xf7)]=_0x1c665d,this[_0x1603bd(0xf2)]=_0x42355f,this[_0x1603bd(0xeb)]();}['_initDataSource'](){const _0xdbe197=_0x4f9315;this['_threadCommentDataSourceService'][_0xdbe197(0x12f)]=this[_0xdbe197(0xf2)],this[_0xdbe197(0xf7)][_0xdbe197(0x10f)]=!0x1;}};g=te([N(0x0,_0xd47b4),N(0x1,_0x4395a5(f))],g);var se=Object[_0x4f9315(0xd8)],oe=Object[_0x4f9315(0x108)],ne=(_0x3f7ab8,_0x1abd36,_0x58fb5b)=>_0x1abd36 in _0x3f7ab8?se(_0x3f7ab8,_0x1abd36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58fb5b}):_0x3f7ab8[_0x1abd36]=_0x58fb5b,ie=(_0x2e71ca,_0x3b0fe0,_0x3084a1,_0x2ba560)=>{const _0x19761b=_0x4f9315;for(var _0x2bea22=_0x2ba560>0x1?void 0x0:_0x2ba560?oe(_0x3b0fe0,_0x3084a1):_0x3b0fe0,_0x49d0fd=_0x2e71ca[_0x19761b(0xcf)]-0x1,_0x28df2d;_0x49d0fd>=0x0;_0x49d0fd--)(_0x28df2d=_0x2e71ca[_0x49d0fd])&&(_0x2bea22=_0x28df2d(_0x2bea22)||_0x2bea22);return _0x2bea22;},w=(_0x7f8c09,_0x2e66c9)=>(_0x404563,_0x5155cc)=>_0x2e66c9(_0x404563,_0x5155cc,_0x7f8c09),$=(_0x479723,_0x4ca56f,_0x42df61)=>ne(_0x479723,typeof _0x4ca56f!=_0x4f9315(0x11d)?_0x4ca56f+'':_0x4ca56f,_0x42df61);let b=class extends _0x290c01{constructor(_0x31c138=M,_0x38c186,_0x4ad6b3){const _0x4ce06d=_0x4f9315;super(),this['_config']=_0x31c138,this[_0x4ce06d(0x111)]=_0x38c186,this['_configService']=_0x4ad6b3;const {..._0x2f3327}=_0x5aa3a4({},M,this['_config']);this[_0x4ce06d(0xe2)][_0x4ce06d(0x109)](z,_0x2f3327);}['onStarting'](){const _0x588261=_0x4f9315;[[f],[g],[S]][_0x588261(0xfa)](_0x47773f=>{const _0x24f831=_0x588261;this[_0x24f831(0x111)][_0x24f831(0xe7)](_0x47773f);});}[_0x4f9315(0x114)](){const _0x3ff83a=_0x4f9315;this[_0x3ff83a(0x111)][_0x3ff83a(0xec)](g),this['_injector'][_0x3ff83a(0xec)](S);}};$(b,_0x4f9315(0x135),W),$(b,_0x4f9315(0xdc),_0x1d95eb[_0x4f9315(0x12d)]),b=ie([_0x4b6a7b(_0x8ab5ff,_0x589b09,_0x10820f),w(0x1,_0x4395a5(_0x3849c5)),w(0x2,_0xd35145)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x521248=_0x5dec;(function(_0x8c7a22,_0x14bd5a){const _0x28d111=_0x5dec,_0x55fbc9=_0x8c7a22();while(!![]){try{const _0x2ac0ad=-parseInt(_0x28d111(0xf8))/0x1+-parseInt(_0x28d111(0x121))/0x2*(-parseInt(_0x28d111(0x14d))/0x3)+parseInt(_0x28d111(0xf0))/0x4+parseInt(_0x28d111(0x119))/0x5+-parseInt(_0x28d111(0xfd))/0x6+parseInt(_0x28d111(0xf3))/0x7+parseInt(_0x28d111(0x114))/0x8*(-parseInt(_0x28d111(0xfa))/0x9);if(_0x2ac0ad===_0x14bd5a)break;else _0x55fbc9['push'](_0x55fbc9['shift']());}catch(_0xec2de1){_0x55fbc9['push'](_0x55fbc9['shift']());}}}(_0x2f53,0xecd41));import{CommentService as _0x695c84,CollaborationSessionService as _0x2de60c,UniverCollaborationClientPlugin as _0x2ddcde}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xca7a46}from'@univerjs-pro/license';import{dayjs as _0x1d081f,UserManagerService as _0x5e4393,Inject as _0x30a124,Injector as _0x91409b,Disposable as _0x3fcfa0,CustomRangeType as _0x5c6f55,UniverInstanceType as _0x274050,DependentOn as _0x13c9ad,IConfigService as _0x1e339e,Plugin as _0x212cbe,merge as _0x123e4c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x502461}from'@univerjs/thread-comment-ui';function _0x5dec(_0x38b6d7,_0x559185){const _0x2f53cd=_0x2f53();return _0x5dec=function(_0x5dec20,_0x55b527){_0x5dec20=_0x5dec20-0xe9;let _0x3d5750=_0x2f53cd[_0x5dec20];return _0x3d5750;},_0x5dec(_0x38b6d7,_0x559185);}import{ThreadCommentModel as _0x444c3f,IThreadCommentDataSourceService as _0x408dc9}from'@univerjs/thread-comment';import{bufferTime as _0x3db9d6}from'rxjs';import{HTTPService as _0x11e3e7}from'@univerjs/network';const W=_0x521248(0x11b);var I=(_0x511929=>(_0x511929[_0x511929[_0x521248(0xe9)]=0x0]=_0x521248(0xe9),_0x511929[_0x511929['Solved']=0x1]=_0x521248(0x136),_0x511929[_0x511929[_0x521248(0xff)]=-0x1]=_0x521248(0xff),_0x511929))(I||{}),v=(_0x3358c0=>(_0x3358c0[_0x3358c0[_0x521248(0x127)]=0x0]='Unknown',_0x3358c0[_0x3358c0['Add']=0x1]=_0x521248(0x126),_0x3358c0[_0x3358c0[_0x521248(0x137)]=0x2]=_0x521248(0x137),_0x3358c0[_0x3358c0[_0x521248(0x101)]=0x3]=_0x521248(0x101),_0x3358c0[_0x3358c0[_0x521248(0x10a)]=0x4]='Delete',_0x3358c0[_0x3358c0[_0x521248(0x115)]=0x5]=_0x521248(0x115),_0x3358c0[_0x3358c0[_0x521248(0xff)]=-0x1]=_0x521248(0xff),_0x3358c0))(v||{});const D=_0x48d561=>_0x1d081f(new Date(+_0x48d561))[_0x521248(0x14c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x7da91b,_0x1d36d3)=>{const _0x329d89=_0x521248,_0x396473=_0x7da91b['get'](_0x5e4393),_0x54acaf=_0x7da91b[_0x329d89(0x12f)](_0x11e3e7);_0x1d36d3['forEach'](_0x557f01=>{const _0x136230=_0x329d89;_0x396473['getUser'](_0x557f01)&&_0x1d36d3[_0x136230(0x123)](_0x557f01);}),_0x1d36d3[_0x329d89(0x109)]&&(await _0x54acaf['get'](_0x329d89(0x144),{'params':{'userIDs':[..._0x1d36d3]}}))[_0x329d89(0xed)][_0x329d89(0x11d)]['forEach'](_0x196b31=>{const _0x368e1c=_0x329d89;_0x196b31&&_0x396473[_0x368e1c(0xef)](_0x196b31);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x370c02,_0x2a904e,_0x2626ad,_0xd93bc)=>{const _0x15fdc5=_0x521248;for(var _0x408445=_0xd93bc>0x1?void 0x0:_0xd93bc?K(_0x2a904e,_0x2626ad):_0x2a904e,_0x1d5ef7=_0x370c02[_0x15fdc5(0x12b)]-0x1,_0x3e52c7;_0x1d5ef7>=0x0;_0x1d5ef7--)(_0x3e52c7=_0x370c02[_0x1d5ef7])&&(_0x408445=_0x3e52c7(_0x408445)||_0x408445);return _0x408445;},p=(_0x3437bc,_0x11636e)=>(_0x248eb4,_0x2e7486)=>_0x11636e(_0x248eb4,_0x2e7486,_0x3437bc);let S=class extends _0x3fcfa0{constructor(_0x30325e,_0x5e7357,_0x261d80,_0x5f5752){const _0x5ec101=_0x521248;super(),this[_0x5ec101(0x11a)]=_0x30325e,this[_0x5ec101(0x102)]=_0x5e7357,this['_userService']=_0x261d80,this['_injector']=_0x5f5752,this['_init'](),this[_0x5ec101(0x132)]();}[_0x521248(0x132)](){const _0x4359e5=_0x521248;this[_0x4359e5(0x100)](this[_0x4359e5(0x102)][_0x4359e5(0xf9)][_0x4359e5(0xfe)](_0x3db9d6(0x10))[_0x4359e5(0xf1)](_0x2b350d=>{const _0x1d741f=_0x4359e5,_0x379569=new Set();_0x2b350d[_0x1d741f(0xf6)](_0x26107b=>{const _0x3c383a=_0x1d741f;switch(_0x26107b[_0x3c383a(0x145)]){case _0x3c383a(0x14a):{const _0x3bdea8=_0x26107b['payload'][_0x3c383a(0x116)];_0x379569[_0x3c383a(0x14a)](_0x3bdea8);break;}}}),B(this[_0x1d741f(0xea)],_0x379569);}));}['_init'](){const _0xdf9345=_0x521248;this[_0xdf9345(0x100)](this[_0xdf9345(0x11a)][_0xdf9345(0xf9)][_0xdf9345(0xf1)](async _0x479e09=>{const _0x29a3c8=_0xdf9345;var _0x2b1f40,_0x51f6ba,_0x5f0f53,_0x43a6ee;const _0x3c81b3=(_0x2b1f40=this[_0x29a3c8(0x102)][_0x29a3c8(0x13d)](_0x479e09[_0x29a3c8(0x12d)])[_0x29a3c8(0x12e)](_0x1727f8=>_0x1727f8['threadId']===_0x479e09[_0x29a3c8(0x147)]))==null?void 0x0:_0x2b1f40[_0x29a3c8(0x143)];if(!_0x3c81b3)return;const {unitId:_0x1aa92c,subUnitId:_0x2e4b58}=_0x3c81b3;switch(_0x479e09['user']&&this['_userService'][_0x29a3c8(0xef)](_0x479e09[_0x29a3c8(0x110)]),_0x479e09[_0x29a3c8(0x145)]){case v[_0x29a3c8(0x126)]:break;case v[_0x29a3c8(0x137)]:{this[_0x29a3c8(0x102)][_0x29a3c8(0xf2)](_0x1aa92c,_0x2e4b58,{'unitId':_0x1aa92c,'subUnitId':_0x2e4b58,'ref':'','id':_0x479e09[_0x29a3c8(0x10b)],'dT':D(+_0x479e09['createTimestamp']),'threadId':_0x479e09[_0x29a3c8(0x147)],'personId':(_0x5f0f53=(_0x51f6ba=_0x479e09[_0x29a3c8(0x110)])==null?void 0x0:_0x51f6ba[_0x29a3c8(0x107)])!=null?_0x5f0f53:_0x479e09[_0x29a3c8(0x11f)],'text':JSON[_0x29a3c8(0xfc)](_0x479e09[_0x29a3c8(0x122)]),'parentId':_0x3c81b3['id']});break;}case v[_0x29a3c8(0x10a)]:{const _0x4b3094=this['_threadCommentModel'][_0x29a3c8(0x139)](_0x1aa92c,_0x2e4b58,_0x479e09[_0x29a3c8(0x10b)]);_0x4b3094&&_0x4b3094['parentId']&&this['_threadCommentModel'][_0x29a3c8(0x10c)](_0x1aa92c,_0x2e4b58,_0x479e09[_0x29a3c8(0x10b)]);break;}case v['Edit']:{this[_0x29a3c8(0x102)]['updateComment'](_0x1aa92c,_0x2e4b58,{'commentId':_0x479e09['replyId'],'text':JSON[_0x29a3c8(0xfc)](_0x479e09[_0x29a3c8(0x122)])});break;}case v[_0x29a3c8(0x115)]:{const _0x3ebba5=(_0x43a6ee=this['_threadCommentModel'][_0x29a3c8(0x13d)](_0x479e09[_0x29a3c8(0x12d)])[_0x29a3c8(0x12e)](_0x1ccd5c=>_0x1ccd5c[_0x29a3c8(0x147)]===_0x479e09[_0x29a3c8(0x147)]))==null?void 0x0:_0x43a6ee['root'];_0x3ebba5&&this[_0x29a3c8(0x102)][_0x29a3c8(0x134)](_0x1aa92c,_0x2e4b58,_0x3ebba5['id'],_0x479e09[_0x29a3c8(0x11e)]===I[_0x29a3c8(0x136)]);break;}}}));}};S=V([p(0x0,_0x30a124(_0x695c84)),p(0x1,_0x30a124(_0x444c3f)),p(0x2,_0x30a124(_0x5e4393)),p(0x3,_0x30a124(_0x91409b))],S);const z=_0x521248(0x131),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x389fc1,_0x44bbe4,_0x357c56,_0x2707ee)=>{for(var _0x3eca8e=_0x2707ee>0x1?void 0x0:_0x2707ee?k(_0x44bbe4,_0x357c56):_0x44bbe4,_0x54e894=_0x389fc1['length']-0x1,_0x17c875;_0x54e894>=0x0;_0x54e894--)(_0x17c875=_0x389fc1[_0x54e894])&&(_0x3eca8e=_0x17c875(_0x3eca8e)||_0x3eca8e);return _0x3eca8e;},_=(_0x559f71,_0x1bbda0)=>(_0x9dd14f,_0x4ad798)=>_0x1bbda0(_0x9dd14f,_0x4ad798,_0x559f71);function _0x2f53(){const _0x52a37b=['/universer-api/comment/unit/','9583370fNSiTd','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','users','solved','userId','createTimestamp','838emhzMO','content','delete','post','/edit','Add','Unknown','resolved','requireSession','_userService','length','onStarting','unitId','find','get','replies','thread-comment-data-source.config','_initUserSync','values','resolveComment','/delete','Solved','Reply','_httpService','getComment','getMemberID','/solved','error','getUnit','saveCommentToSnapshot','/add','_threadCommentDataSourceService','_configService','COMMENT','root','/universer-api/user/list','type','customRanges','threadId','getOwnPropertyDescriptor','filter','add','rangeId','format','651qPcqww','OpenOrReOpen','_injector','stringify','setConfig','body','pluginName','addUser','2251732bcWWko','subscribe','addComment','4336297MkmwFr','updateComment','/list','forEach','_sessionService','353658saOzlt','commentUpdate$','1924407MmnjpP','code','parse','9914826nmVcGJ','pipe','UNRECOGNIZED','disposeWithMe','Edit','_threadCommentModel','onReady','reply','_threadCommentDataSource','slice','userID','listComments','size','Delete','replyId','deleteComment','map','syncUpdateMutationToColla','defineProperty','user','comment','dataSource','_initDataSource','8kDeEgx','Solve','personId','getCurrentUser'];_0x2f53=function(){return _0x52a37b;};return _0x2f53();}function X(_0x296fe0,_0x1a561f){const _0x145e71=_0x521248,_0x139767=_0x296fe0[_0x145e71(0x130)][0x0];return{..._0x1a561f,'id':_0x139767['replyId'],'resolved':_0x296fe0[_0x145e71(0x11e)]===0x1,'dT':D(_0x139767[_0x145e71(0x120)]),'personId':_0x139767[_0x145e71(0x11f)],'threadId':_0x139767[_0x145e71(0x147)]};}function ee(_0x1ccc3c,_0x5737b3,_0x5097af){const _0x420e19=_0x521248;var _0x13b983,_0x5b49e6;if(((_0x5b49e6=(_0x13b983=_0x1ccc3c==null?void 0x0:_0x1ccc3c['replies'])==null?void 0x0:_0x13b983[_0x420e19(0x12b)])!=null?_0x5b49e6:0x0)>0x0){const _0x4991ac=(_0xdb9eb5,_0x328ca6)=>({'id':_0xdb9eb5['replyId'],'threadId':_0xdb9eb5['threadId'],'dT':D(_0xdb9eb5[_0x420e19(0x120)]),'personId':_0xdb9eb5[_0x420e19(0x11f)],'resolved':_0x1ccc3c['solved']===I[_0x420e19(0x136)],'unitId':_0x5737b3,'subUnitId':_0x5097af,'text':JSON[_0x420e19(0xfc)](_0xdb9eb5['content']),'parentId':_0x328ca6}),_0x24559f=_0x4991ac(_0x1ccc3c['replies'][0x0]);return{..._0x24559f,'children':_0x1ccc3c[_0x420e19(0x130)][_0x420e19(0x106)](0x1)[_0x420e19(0x10d)](_0x236a5c=>_0x4991ac(_0x236a5c,_0x24559f['id']))};}return null;}let f=class{constructor(_0x408413,_0x57ddfc,_0xdcf56d,_0x41b707){const _0x166924=_0x521248;this[_0x166924(0x138)]=_0x408413,this[_0x166924(0x12a)]=_0x57ddfc,this['_sessionService']=_0xdcf56d,this[_0x166924(0xea)]=_0x41b707;}async[_0x521248(0xf2)](_0x3b82ca){const _0x359ee2=_0x521248;var _0x4025f6,_0x443300;const {parentId:_0x24a3ce,unitId:_0x511381,text:_0x1e8de6,threadId:_0x29e293}=_0x3b82ca,_0x274867=(_0x443300=(_0x4025f6=_0x1e8de6[_0x359ee2(0x146)])==null?void 0x0:_0x4025f6[_0x359ee2(0x149)](_0x256bb9=>_0x256bb9['rangeType']===_0x5c6f55[_0x359ee2(0x142)])[_0x359ee2(0x10d)](_0x1e0e06=>_0x1e0e06[_0x359ee2(0x14b)]))!=null?_0x443300:[],_0x5982d3=JSON[_0x359ee2(0xeb)](_0x1e8de6),_0x16d679=(await this[_0x359ee2(0xf7)]['requireSession'](_0x511381))[_0x359ee2(0x13a)]();if(_0x24a3ce){const _0x249df9={'memberId':_0x16d679,'unitId':_0x511381,'content':_0x5982d3,'mention':_0x274867,'threadId':_0x29e293},_0x2c0163=(await this[_0x359ee2(0x138)]['post'](_0x359ee2(0x118)+_0x511381+'/reply',{'body':_0x249df9}))[_0x359ee2(0xed)][_0x359ee2(0x104)];return{..._0x3b82ca,'id':_0x2c0163['replyId'],'dT':_0x1d081f(+_0x2c0163[_0x359ee2(0x120)])[_0x359ee2(0x14c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c0163[_0x359ee2(0x11f)]};}else{const _0x40365d={'memberId':_0x16d679,'unitId':_0x511381,'content':_0x5982d3,'mention':_0x274867},_0x1afdf2=await this['_httpService']['post'](_0x359ee2(0x118)+_0x511381+_0x359ee2(0x13f),{'body':_0x40365d});return X(_0x1afdf2[_0x359ee2(0xed)][_0x359ee2(0x111)],_0x3b82ca);}}async[_0x521248(0xf4)](_0x456c88){const _0x5c5b50=_0x521248;var _0xd437c3,_0x1e5fb2;const {text:_0x1ebfa2,unitId:_0x1720a4}=_0x456c88,_0x1ae4fe=(_0x1e5fb2=(_0xd437c3=_0x1ebfa2['customRanges'])==null?void 0x0:_0xd437c3[_0x5c5b50(0x149)](_0x56d419=>_0x56d419['rangeType']===_0x5c6f55[_0x5c5b50(0x142)])[_0x5c5b50(0x10d)](_0x12fc6c=>_0x12fc6c[_0x5c5b50(0x14b)]))!=null?_0x1e5fb2:[],_0xe5bbe9=JSON['stringify'](_0x1ebfa2),_0x39a639=_0x456c88['threadId'],_0x59b279=_0x456c88['id'],_0xa6ba67={'memberId':(await this['_sessionService']['requireSession'](_0x1720a4))[_0x5c5b50(0x13a)](),'unitId':_0x1720a4,'threadId':_0x39a639,'mention':_0x1ae4fe,'content':_0xe5bbe9,'replyId':_0x59b279},_0xb061f1=await this['_httpService']['post'](_0x5c5b50(0x118)+_0x1720a4+_0x5c5b50(0x125),{'body':_0xa6ba67});return!_0xb061f1[_0x5c5b50(0xed)][_0x5c5b50(0x13c)]||_0xb061f1[_0x5c5b50(0xed)][_0x5c5b50(0x13c)]['code']===0x1;}async[_0x521248(0x134)](_0x38407a){const _0x4e249e=_0x521248,{unitId:_0x3f0640}=_0x38407a,_0x124e52=_0x38407a['threadId'],_0x46028a={'memberId':this['_userService'][_0x4e249e(0x117)]()[_0x4e249e(0x107)],'unitId':_0x3f0640,'threadId':_0x124e52,'solved':_0x38407a[_0x4e249e(0x128)]?I['Solved']:I[_0x4e249e(0xe9)]},_0x1aef6e=await this[_0x4e249e(0x138)][_0x4e249e(0x124)](_0x4e249e(0x118)+_0x3f0640+_0x4e249e(0x13b),{'body':_0x46028a});return!_0x1aef6e[_0x4e249e(0xed)][_0x4e249e(0x13c)]||_0x1aef6e[_0x4e249e(0xed)][_0x4e249e(0x13c)]['code']===0x1;}async['deleteComment'](_0x3b68f9,_0x3021f1,_0x163d15,_0x143918){const _0x1490d3=_0x521248,_0x20e18d={'memberId':(await this['_sessionService'][_0x1490d3(0x129)](_0x3b68f9))['getMemberID'](),'threadId':_0x163d15,'replyId':_0x143918,'unitId':_0x3b68f9},_0x15bd25=await this[_0x1490d3(0x138)][_0x1490d3(0x124)](_0x1490d3(0x118)+_0x3b68f9+_0x1490d3(0x135),{'body':_0x20e18d});return!_0x15bd25['body'][_0x1490d3(0x13c)]||_0x15bd25[_0x1490d3(0xed)][_0x1490d3(0x13c)][_0x1490d3(0xfb)]===0x1;}async[_0x521248(0x108)](_0x99819d,_0x55c058,_0x32e47f){const _0xa057bf=_0x521248,_0x131054={'unitId':_0x99819d,'threadId':_0x32e47f},_0x10086b=await this['_httpService'][_0xa057bf(0x124)](_0xa057bf(0x118)+_0x99819d+_0xa057bf(0xf5),{'body':_0x131054}),_0x4bce7b=_0x32e47f[_0xa057bf(0x10d)](_0x585054=>ee(_0x10086b[_0xa057bf(0xed)]['comments'][_0x585054],_0x99819d,_0x55c058))[_0xa057bf(0x149)](Boolean);return Object[_0xa057bf(0x133)](_0x10086b['body'][_0xa057bf(0x11d)])[_0xa057bf(0xf6)](_0x1b9d16=>{const _0x1390ff=_0xa057bf;this[_0x1390ff(0x12a)]['addUser'](_0x1b9d16);}),_0x4bce7b;}[_0x521248(0x13e)](_0x51e7e3){const _0x58c8cc=_0x521248;return{'id':_0x51e7e3['id'],'threadId':_0x51e7e3[_0x58c8cc(0x147)],'ref':_0x51e7e3['ref']};}};f=Q([_(0x0,_0x30a124(_0x11e3e7)),_(0x1,_0x30a124(_0x5e4393)),_(0x2,_0x30a124(_0x2de60c)),_(0x3,_0x30a124(_0x91409b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2bbdb2,_0xe1ef1d,_0x251581,_0xdaf905)=>{for(var _0x11518b=_0xdaf905>0x1?void 0x0:_0xdaf905?re(_0xe1ef1d,_0x251581):_0xe1ef1d,_0x2e7509=_0x2bbdb2['length']-0x1,_0x47711f;_0x2e7509>=0x0;_0x2e7509--)(_0x47711f=_0x2bbdb2[_0x2e7509])&&(_0x11518b=_0x47711f(_0x11518b)||_0x11518b);return _0x11518b;},N=(_0x97c0d1,_0x91ac35)=>(_0x319c93,_0x52a6e0)=>_0x91ac35(_0x319c93,_0x52a6e0,_0x97c0d1);let g=class extends _0x3fcfa0{constructor(_0x38b8b,_0x4481af){const _0x35dfaa=_0x521248;super(),this[_0x35dfaa(0x140)]=_0x38b8b,this[_0x35dfaa(0x105)]=_0x4481af,this[_0x35dfaa(0x113)]();}[_0x521248(0x113)](){const _0x46caa7=_0x521248;this[_0x46caa7(0x140)][_0x46caa7(0x112)]=this[_0x46caa7(0x105)],this[_0x46caa7(0x140)][_0x46caa7(0x10e)]=!0x1;}};g=te([N(0x0,_0x408dc9),N(0x1,_0x30a124(f))],g);var se=Object[_0x521248(0x10f)],oe=Object[_0x521248(0x148)],ne=(_0x5d6f78,_0x12f06f,_0xf60301)=>_0x12f06f in _0x5d6f78?se(_0x5d6f78,_0x12f06f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf60301}):_0x5d6f78[_0x12f06f]=_0xf60301,ie=(_0x183baf,_0x38e501,_0x506baf,_0x382a3b)=>{for(var _0x5e3a7f=_0x382a3b>0x1?void 0x0:_0x382a3b?oe(_0x38e501,_0x506baf):_0x38e501,_0x2cce59=_0x183baf['length']-0x1,_0x208525;_0x2cce59>=0x0;_0x2cce59--)(_0x208525=_0x183baf[_0x2cce59])&&(_0x5e3a7f=_0x208525(_0x5e3a7f)||_0x5e3a7f);return _0x5e3a7f;},w=(_0x531e92,_0x1e5ebe)=>(_0x4a20fe,_0xc3a5f2)=>_0x1e5ebe(_0x4a20fe,_0xc3a5f2,_0x531e92),$=(_0x35f5ec,_0x1a0d35,_0x188b7f)=>ne(_0x35f5ec,typeof _0x1a0d35!='symbol'?_0x1a0d35+'':_0x1a0d35,_0x188b7f);let b=class extends _0x212cbe{constructor(_0x32fd49=M,_0xe6d1b0,_0x1b2de3){const _0x43386f=_0x521248;super(),this['_config']=_0x32fd49,this['_injector']=_0xe6d1b0,this[_0x43386f(0x141)]=_0x1b2de3;const {..._0x41c434}=_0x123e4c({},M,this[_0x43386f(0x11c)]);this['_configService'][_0x43386f(0xec)](z,_0x41c434);}[_0x521248(0x12c)](){[[f],[g],[S]]['forEach'](_0x28408c=>{const _0x2ee2f4=_0x5dec;this[_0x2ee2f4(0xea)][_0x2ee2f4(0x14a)](_0x28408c);});}[_0x521248(0x103)](){const _0x1d37b0=_0x521248;this[_0x1d37b0(0xea)]['get'](g),this[_0x1d37b0(0xea)][_0x1d37b0(0x12f)](S);}};$(b,_0x521248(0xee),W),$(b,_0x521248(0x145),_0x274050['UNIVER_UNKNOWN']),b=ie([_0x13c9ad(_0x502461,_0x2ddcde,_0xca7a46),w(0x1,_0x30a124(_0x91409b)),w(0x2,_0x1e339e)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4f9315=_0x1093;function _0x96a8(){const _0x11c432=['addUser','Solved','ref','content','getOwnPropertyDescriptor','setConfig','resolved','/edit','784YKkfsJ','UNRECOGNIZED','_initUserSync','syncUpdateMutationToColla','saveCommentToSnapshot','_injector','error','map','onReady','listComments','/universer-api/user/list','rangeType','_httpService','YYYY/MM/DD\x20HH:mm','/solved','size','userId','symbol','addComment','getMemberID','commentUpdate$','code','Edit','getComment','parentId','stringify','filter','unitId','resolveComment','rangeId','Solve','replyId','_userService','UNIVER_UNKNOWN','deleteComment','dataSource','payload','90oqcliU','solved','comment','6747856yDIypc','pluginName','comments','length','body','_commentService','root','_sessionService','replies','getCurrentUser','users','_threadCommentModel','defineProperty','getUnit','OpenOrReOpen','9627366ZMmpjv','type','slice','1870196FQApxT','/add','/universer-api/comment/unit/','COMMENT','_configService','user','818010nTJToR','4831821BlKIdG','9228hdXaxi','add','thread-comment-data-source.config','Reply','delete','_initDataSource','get','Unknown','format','disposeWithMe','createTimestamp','642795vzmxvy','_threadCommentDataSource','pipe','/list','find','_init','_threadCommentDataSourceService','threadId','post','forEach','30HBAqxF','values','updateComment','userID','parse','Delete','requireSession','Add','customRanges'];_0x96a8=function(){return _0x11c432;};return _0x96a8();}(function(_0x2b693b,_0x563364){const _0x58350a=_0x1093,_0x48d822=_0x2b693b();while(!![]){try{const _0x33833c=-parseInt(_0x58350a(0xe4))/0x1+-parseInt(_0x58350a(0xde))/0x2+-parseInt(_0x58350a(0xe6))/0x3*(-parseInt(_0x58350a(0x10c))/0x4)+parseInt(_0x58350a(0xf1))/0x5*(-parseInt(_0x58350a(0xfb))/0x6)+-parseInt(_0x58350a(0xdb))/0x7+-parseInt(_0x58350a(0x134))/0x8+parseInt(_0x58350a(0xe5))/0x9*(parseInt(_0x58350a(0x131))/0xa);if(_0x33833c===_0x563364)break;else _0x48d822['push'](_0x48d822['shift']());}catch(_0x42f4b5){_0x48d822['push'](_0x48d822['shift']());}}}(_0x96a8,0xc831a));import{CommentService as _0x3ab801,CollaborationSessionService as _0x243c30,UniverCollaborationClientPlugin as _0x589b09}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x10820f}from'@univerjs-pro/license';import{dayjs as _0x113944,UserManagerService as _0x3bc288,Inject as _0x4395a5,Injector as _0x3849c5,Disposable as _0x3f16eb,CustomRangeType as _0x1fdbdf,UniverInstanceType as _0x1d95eb,DependentOn as _0x4b6a7b,IConfigService as _0xd35145,Plugin as _0x290c01,merge as _0x5aa3a4}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x8ab5ff}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x26caec,IThreadCommentDataSourceService as _0xd47b4}from'@univerjs/thread-comment';import{bufferTime as _0x745818}from'rxjs';import{HTTPService as _0x495cf5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2cea32=>(_0x2cea32[_0x2cea32[_0x4f9315(0xda)]=0x0]=_0x4f9315(0xda),_0x2cea32[_0x2cea32[_0x4f9315(0x105)]=0x1]=_0x4f9315(0x105),_0x2cea32[_0x2cea32[_0x4f9315(0x10d)]=-0x1]=_0x4f9315(0x10d),_0x2cea32))(I||{}),v=(_0x14b3a7=>(_0x14b3a7[_0x14b3a7[_0x4f9315(0xed)]=0x0]=_0x4f9315(0xed),_0x14b3a7[_0x14b3a7[_0x4f9315(0x102)]=0x1]='Add',_0x14b3a7[_0x14b3a7[_0x4f9315(0xe9)]=0x2]=_0x4f9315(0xe9),_0x14b3a7[_0x14b3a7[_0x4f9315(0x122)]=0x3]=_0x4f9315(0x122),_0x14b3a7[_0x14b3a7['Delete']=0x4]=_0x4f9315(0x100),_0x14b3a7[_0x14b3a7[_0x4f9315(0x12a)]=0x5]=_0x4f9315(0x12a),_0x14b3a7[_0x14b3a7[_0x4f9315(0x10d)]=-0x1]='UNRECOGNIZED',_0x14b3a7))(v||{});const D=_0x4a736c=>_0x113944(new Date(+_0x4a736c))[_0x4f9315(0xee)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x45e369,_0x42f827)=>{const _0x4f2171=_0x4f9315,_0x141c32=_0x45e369[_0x4f2171(0xec)](_0x3bc288),_0x19cdba=_0x45e369[_0x4f2171(0xec)](_0x495cf5);_0x42f827[_0x4f2171(0xfa)](_0x3e7421=>{const _0x58b955=_0x4f2171;_0x141c32['getUser'](_0x3e7421)&&_0x42f827[_0x58b955(0xea)](_0x3e7421);}),_0x42f827[_0x4f2171(0x11b)]&&(await _0x19cdba[_0x4f2171(0xec)](_0x4f2171(0x116),{'params':{'userIDs':[..._0x42f827]}}))[_0x4f2171(0xd0)][_0x4f2171(0xd6)][_0x4f2171(0xfa)](_0x1fb079=>{const _0x7fd648=_0x4f2171;_0x1fb079&&_0x141c32[_0x7fd648(0x104)](_0x1fb079);});};var K=Object[_0x4f9315(0x108)],V=(_0x20f58a,_0x277ff2,_0x355b37,_0x12fa46)=>{const _0x568e55=_0x4f9315;for(var _0x272374=_0x12fa46>0x1?void 0x0:_0x12fa46?K(_0x277ff2,_0x355b37):_0x277ff2,_0x2aee80=_0x20f58a[_0x568e55(0xcf)]-0x1,_0x2a85c6;_0x2aee80>=0x0;_0x2aee80--)(_0x2a85c6=_0x20f58a[_0x2aee80])&&(_0x272374=_0x2a85c6(_0x272374)||_0x272374);return _0x272374;},p=(_0x43598d,_0xd8f65e)=>(_0x3d172e,_0x23861c)=>_0xd8f65e(_0x3d172e,_0x23861c,_0x43598d);let S=class extends _0x3f16eb{constructor(_0x5499df,_0x3d1d0e,_0x4ffe7a,_0x1a9d47){const _0x31b1d5=_0x4f9315;super(),this[_0x31b1d5(0xd1)]=_0x5499df,this[_0x31b1d5(0xd7)]=_0x3d1d0e,this['_userService']=_0x4ffe7a,this[_0x31b1d5(0x111)]=_0x1a9d47,this[_0x31b1d5(0xf6)](),this[_0x31b1d5(0x10e)]();}[_0x4f9315(0x10e)](){const _0x42caf8=_0x4f9315;this[_0x42caf8(0xef)](this[_0x42caf8(0xd7)][_0x42caf8(0x120)][_0x42caf8(0xf3)](_0x745818(0x10))['subscribe'](_0x20ab19=>{const _0x468743=_0x42caf8,_0x2c0254=new Set();_0x20ab19[_0x468743(0xfa)](_0x475f55=>{const _0x2a4489=_0x468743;switch(_0x475f55[_0x2a4489(0xdc)]){case'add':{const _0x27eb33=_0x475f55[_0x2a4489(0x130)]['personId'];_0x2c0254['add'](_0x27eb33);break;}}}),B(this['_injector'],_0x2c0254);}));}['_init'](){const _0x55fee9=_0x4f9315;this[_0x55fee9(0xef)](this['_commentService'][_0x55fee9(0x120)]['subscribe'](async _0x44860e=>{const _0x3a6bb7=_0x55fee9;var _0x4979be,_0x205623,_0x561492,_0x5100bc;const _0x2e4dcf=(_0x4979be=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xd9)](_0x44860e['unitId'])['find'](_0x1b0661=>_0x1b0661[_0x3a6bb7(0xf8)]===_0x44860e[_0x3a6bb7(0xf8)]))==null?void 0x0:_0x4979be['root'];if(!_0x2e4dcf)return;const {unitId:_0x2b5af0,subUnitId:_0x59b6b2}=_0x2e4dcf;switch(_0x44860e[_0x3a6bb7(0xe3)]&&this['_userService'][_0x3a6bb7(0x104)](_0x44860e[_0x3a6bb7(0xe3)]),_0x44860e[_0x3a6bb7(0xdc)]){case v[_0x3a6bb7(0x102)]:break;case v[_0x3a6bb7(0xe9)]:{this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x11e)](_0x2b5af0,_0x59b6b2,{'unitId':_0x2b5af0,'subUnitId':_0x59b6b2,'ref':'','id':_0x44860e[_0x3a6bb7(0x12b)],'dT':D(+_0x44860e[_0x3a6bb7(0xf0)]),'threadId':_0x44860e[_0x3a6bb7(0xf8)],'personId':(_0x561492=(_0x205623=_0x44860e[_0x3a6bb7(0xe3)])==null?void 0x0:_0x205623[_0x3a6bb7(0xfe)])!=null?_0x561492:_0x44860e[_0x3a6bb7(0x11c)],'text':JSON[_0x3a6bb7(0xff)](_0x44860e[_0x3a6bb7(0x107)]),'parentId':_0x2e4dcf['id']});break;}case v[_0x3a6bb7(0x100)]:{const _0x2c1f36=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x123)](_0x2b5af0,_0x59b6b2,_0x44860e['replyId']);_0x2c1f36&&_0x2c1f36[_0x3a6bb7(0x124)]&&this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x12e)](_0x2b5af0,_0x59b6b2,_0x44860e[_0x3a6bb7(0x12b)]);break;}case v['Edit']:{this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xfd)](_0x2b5af0,_0x59b6b2,{'commentId':_0x44860e[_0x3a6bb7(0x12b)],'text':JSON[_0x3a6bb7(0xff)](_0x44860e['content'])});break;}case v[_0x3a6bb7(0x12a)]:{const _0x36f6c0=(_0x5100bc=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xd9)](_0x44860e[_0x3a6bb7(0x127)])[_0x3a6bb7(0xf5)](_0x33056c=>_0x33056c[_0x3a6bb7(0xf8)]===_0x44860e[_0x3a6bb7(0xf8)]))==null?void 0x0:_0x5100bc[_0x3a6bb7(0xd2)];_0x36f6c0&&this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x128)](_0x2b5af0,_0x59b6b2,_0x36f6c0['id'],_0x44860e[_0x3a6bb7(0x132)]===I[_0x3a6bb7(0x105)]);break;}}}));}};function _0x1093(_0x3857f5,_0x4fd443){const _0x96a8bd=_0x96a8();return _0x1093=function(_0x109304,_0x485c03){_0x109304=_0x109304-0xce;let _0x298a36=_0x96a8bd[_0x109304];return _0x298a36;},_0x1093(_0x3857f5,_0x4fd443);}S=V([p(0x0,_0x4395a5(_0x3ab801)),p(0x1,_0x4395a5(_0x26caec)),p(0x2,_0x4395a5(_0x3bc288)),p(0x3,_0x4395a5(_0x3849c5))],S);const z=_0x4f9315(0xe8),M={};var k=Object[_0x4f9315(0x108)],Q=(_0x1bd5c6,_0x49c3ef,_0x14bbf8,_0x33aeee)=>{const _0x1768b1=_0x4f9315;for(var _0xb3d02=_0x33aeee>0x1?void 0x0:_0x33aeee?k(_0x49c3ef,_0x14bbf8):_0x49c3ef,_0x4a1d54=_0x1bd5c6[_0x1768b1(0xcf)]-0x1,_0x40768f;_0x4a1d54>=0x0;_0x4a1d54--)(_0x40768f=_0x1bd5c6[_0x4a1d54])&&(_0xb3d02=_0x40768f(_0xb3d02)||_0xb3d02);return _0xb3d02;},_=(_0x164b37,_0x3de780)=>(_0x4d7120,_0x39bfb0)=>_0x3de780(_0x4d7120,_0x39bfb0,_0x164b37);function X(_0x40d8b3,_0x3dfea5){const _0x38d0f5=_0x4f9315,_0x3485c1=_0x40d8b3[_0x38d0f5(0xd4)][0x0];return{..._0x3dfea5,'id':_0x3485c1[_0x38d0f5(0x12b)],'resolved':_0x40d8b3[_0x38d0f5(0x132)]===0x1,'dT':D(_0x3485c1[_0x38d0f5(0xf0)]),'personId':_0x3485c1['userId'],'threadId':_0x3485c1[_0x38d0f5(0xf8)]};}function ee(_0x14201c,_0x432a39,_0x82ef9c){const _0x2217ea=_0x4f9315;var _0x212383,_0x2550ff;if(((_0x2550ff=(_0x212383=_0x14201c==null?void 0x0:_0x14201c[_0x2217ea(0xd4)])==null?void 0x0:_0x212383[_0x2217ea(0xcf)])!=null?_0x2550ff:0x0)>0x0){const _0x3d64fa=(_0x16db86,_0x361ee9)=>({'id':_0x16db86['replyId'],'threadId':_0x16db86[_0x2217ea(0xf8)],'dT':D(_0x16db86['createTimestamp']),'personId':_0x16db86[_0x2217ea(0x11c)],'resolved':_0x14201c[_0x2217ea(0x132)]===I[_0x2217ea(0x105)],'unitId':_0x432a39,'subUnitId':_0x82ef9c,'text':JSON[_0x2217ea(0xff)](_0x16db86[_0x2217ea(0x107)]),'parentId':_0x361ee9}),_0x1d45fd=_0x3d64fa(_0x14201c['replies'][0x0]);return{..._0x1d45fd,'children':_0x14201c[_0x2217ea(0xd4)][_0x2217ea(0xdd)](0x1)[_0x2217ea(0x113)](_0xec80be=>_0x3d64fa(_0xec80be,_0x1d45fd['id']))};}return null;}let f=class{constructor(_0x5d2b5c,_0x24bb37,_0x17d125,_0x1f9715){const _0xa76332=_0x4f9315;this[_0xa76332(0x118)]=_0x5d2b5c,this[_0xa76332(0x12c)]=_0x24bb37,this['_sessionService']=_0x17d125,this[_0xa76332(0x111)]=_0x1f9715;}async[_0x4f9315(0x11e)](_0x39cff2){const _0x5e6a1a=_0x4f9315;var _0x606ea8,_0x1d8a59;const {parentId:_0x272415,unitId:_0x1dfb4c,text:_0x32f593,threadId:_0x40a64b}=_0x39cff2,_0x37930d=(_0x1d8a59=(_0x606ea8=_0x32f593[_0x5e6a1a(0x103)])==null?void 0x0:_0x606ea8[_0x5e6a1a(0x126)](_0x19b8b9=>_0x19b8b9[_0x5e6a1a(0x117)]===_0x1fdbdf['COMMENT'])[_0x5e6a1a(0x113)](_0x28d214=>_0x28d214['rangeId']))!=null?_0x1d8a59:[],_0x16ea6e=JSON[_0x5e6a1a(0x125)](_0x32f593),_0x41b451=(await this[_0x5e6a1a(0xd3)][_0x5e6a1a(0x101)](_0x1dfb4c))['getMemberID']();if(_0x272415){const _0x3018bc={'memberId':_0x41b451,'unitId':_0x1dfb4c,'content':_0x16ea6e,'mention':_0x37930d,'threadId':_0x40a64b},_0x3ccac9=(await this[_0x5e6a1a(0x118)][_0x5e6a1a(0xf9)]('/universer-api/comment/unit/'+_0x1dfb4c+'/reply',{'body':_0x3018bc}))[_0x5e6a1a(0xd0)]['reply'];return{..._0x39cff2,'id':_0x3ccac9[_0x5e6a1a(0x12b)],'dT':_0x113944(+_0x3ccac9[_0x5e6a1a(0xf0)])['format'](_0x5e6a1a(0x119)),'personId':_0x3ccac9[_0x5e6a1a(0x11c)]};}else{const _0x11ccd9={'memberId':_0x41b451,'unitId':_0x1dfb4c,'content':_0x16ea6e,'mention':_0x37930d},_0x15ab40=await this[_0x5e6a1a(0x118)][_0x5e6a1a(0xf9)](_0x5e6a1a(0xe0)+_0x1dfb4c+_0x5e6a1a(0xdf),{'body':_0x11ccd9});return X(_0x15ab40[_0x5e6a1a(0xd0)][_0x5e6a1a(0x133)],_0x39cff2);}}async[_0x4f9315(0xfd)](_0x9f708a){const _0x2e244c=_0x4f9315;var _0x1094ab,_0x9eadb1;const {text:_0x136fb3,unitId:_0x4b119a}=_0x9f708a,_0x8bcd7a=(_0x9eadb1=(_0x1094ab=_0x136fb3[_0x2e244c(0x103)])==null?void 0x0:_0x1094ab[_0x2e244c(0x126)](_0x2bdd51=>_0x2bdd51[_0x2e244c(0x117)]===_0x1fdbdf[_0x2e244c(0xe1)])[_0x2e244c(0x113)](_0x17fd80=>_0x17fd80[_0x2e244c(0x129)]))!=null?_0x9eadb1:[],_0x4292ea=JSON[_0x2e244c(0x125)](_0x136fb3),_0x74ef76=_0x9f708a[_0x2e244c(0xf8)],_0x47b62f=_0x9f708a['id'],_0x4cc6b6={'memberId':(await this['_sessionService'][_0x2e244c(0x101)](_0x4b119a))[_0x2e244c(0x11f)](),'unitId':_0x4b119a,'threadId':_0x74ef76,'mention':_0x8bcd7a,'content':_0x4292ea,'replyId':_0x47b62f},_0x17c92d=await this[_0x2e244c(0x118)][_0x2e244c(0xf9)](_0x2e244c(0xe0)+_0x4b119a+_0x2e244c(0x10b),{'body':_0x4cc6b6});return!_0x17c92d['body']['error']||_0x17c92d[_0x2e244c(0xd0)][_0x2e244c(0x112)][_0x2e244c(0x121)]===0x1;}async[_0x4f9315(0x128)](_0x2ae0aa){const _0xd71b21=_0x4f9315,{unitId:_0x2fa12d}=_0x2ae0aa,_0x398e82=_0x2ae0aa[_0xd71b21(0xf8)],_0x5cf04c={'memberId':this[_0xd71b21(0x12c)][_0xd71b21(0xd5)]()[_0xd71b21(0xfe)],'unitId':_0x2fa12d,'threadId':_0x398e82,'solved':_0x2ae0aa[_0xd71b21(0x10a)]?I['Solved']:I[_0xd71b21(0xda)]},_0x3cbf4b=await this[_0xd71b21(0x118)]['post'](_0xd71b21(0xe0)+_0x2fa12d+_0xd71b21(0x11a),{'body':_0x5cf04c});return!_0x3cbf4b['body'][_0xd71b21(0x112)]||_0x3cbf4b[_0xd71b21(0xd0)][_0xd71b21(0x112)][_0xd71b21(0x121)]===0x1;}async['deleteComment'](_0x35a27e,_0x1c2972,_0x1e2eb7,_0x5d94ad){const _0x1a143c=_0x4f9315,_0x4046a3={'memberId':(await this['_sessionService']['requireSession'](_0x35a27e))['getMemberID'](),'threadId':_0x1e2eb7,'replyId':_0x5d94ad,'unitId':_0x35a27e},_0x1097e9=await this[_0x1a143c(0x118)][_0x1a143c(0xf9)]('/universer-api/comment/unit/'+_0x35a27e+'/delete',{'body':_0x4046a3});return!_0x1097e9[_0x1a143c(0xd0)][_0x1a143c(0x112)]||_0x1097e9['body'][_0x1a143c(0x112)][_0x1a143c(0x121)]===0x1;}async[_0x4f9315(0x115)](_0x1c690d,_0x100e25,_0x249390){const _0x232e38=_0x4f9315,_0x3853ed={'unitId':_0x1c690d,'threadId':_0x249390},_0x4d5586=await this[_0x232e38(0x118)][_0x232e38(0xf9)](_0x232e38(0xe0)+_0x1c690d+_0x232e38(0xf4),{'body':_0x3853ed}),_0x35f3e8=_0x249390[_0x232e38(0x113)](_0x23232c=>ee(_0x4d5586['body'][_0x232e38(0xce)][_0x23232c],_0x1c690d,_0x100e25))[_0x232e38(0x126)](Boolean);return Object[_0x232e38(0xfc)](_0x4d5586[_0x232e38(0xd0)]['users'])['forEach'](_0x545a10=>{const _0x2a8ad9=_0x232e38;this['_userService'][_0x2a8ad9(0x104)](_0x545a10);}),_0x35f3e8;}[_0x4f9315(0x110)](_0x4af4cd){const _0x1c34a4=_0x4f9315;return{'id':_0x4af4cd['id'],'threadId':_0x4af4cd[_0x1c34a4(0xf8)],'ref':_0x4af4cd[_0x1c34a4(0x106)]};}};f=Q([_(0x0,_0x4395a5(_0x495cf5)),_(0x1,_0x4395a5(_0x3bc288)),_(0x2,_0x4395a5(_0x243c30)),_(0x3,_0x4395a5(_0x3849c5))],f);var re=Object[_0x4f9315(0x108)],te=(_0xaad7f3,_0x12e457,_0x427f69,_0x1a4463)=>{const _0x4f402c=_0x4f9315;for(var _0x4bc349=_0x1a4463>0x1?void 0x0:_0x1a4463?re(_0x12e457,_0x427f69):_0x12e457,_0x25fed4=_0xaad7f3[_0x4f402c(0xcf)]-0x1,_0x23bb74;_0x25fed4>=0x0;_0x25fed4--)(_0x23bb74=_0xaad7f3[_0x25fed4])&&(_0x4bc349=_0x23bb74(_0x4bc349)||_0x4bc349);return _0x4bc349;},N=(_0x20abad,_0x3bb62e)=>(_0x14fa97,_0x5215f0)=>_0x3bb62e(_0x14fa97,_0x5215f0,_0x20abad);let g=class extends _0x3f16eb{constructor(_0x1c665d,_0x42355f){const _0x1603bd=_0x4f9315;super(),this[_0x1603bd(0xf7)]=_0x1c665d,this[_0x1603bd(0xf2)]=_0x42355f,this[_0x1603bd(0xeb)]();}['_initDataSource'](){const _0xdbe197=_0x4f9315;this['_threadCommentDataSourceService'][_0xdbe197(0x12f)]=this[_0xdbe197(0xf2)],this[_0xdbe197(0xf7)][_0xdbe197(0x10f)]=!0x1;}};g=te([N(0x0,_0xd47b4),N(0x1,_0x4395a5(f))],g);var se=Object[_0x4f9315(0xd8)],oe=Object[_0x4f9315(0x108)],ne=(_0x3f7ab8,_0x1abd36,_0x58fb5b)=>_0x1abd36 in _0x3f7ab8?se(_0x3f7ab8,_0x1abd36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58fb5b}):_0x3f7ab8[_0x1abd36]=_0x58fb5b,ie=(_0x2e71ca,_0x3b0fe0,_0x3084a1,_0x2ba560)=>{const _0x19761b=_0x4f9315;for(var _0x2bea22=_0x2ba560>0x1?void 0x0:_0x2ba560?oe(_0x3b0fe0,_0x3084a1):_0x3b0fe0,_0x49d0fd=_0x2e71ca[_0x19761b(0xcf)]-0x1,_0x28df2d;_0x49d0fd>=0x0;_0x49d0fd--)(_0x28df2d=_0x2e71ca[_0x49d0fd])&&(_0x2bea22=_0x28df2d(_0x2bea22)||_0x2bea22);return _0x2bea22;},w=(_0x7f8c09,_0x2e66c9)=>(_0x404563,_0x5155cc)=>_0x2e66c9(_0x404563,_0x5155cc,_0x7f8c09),$=(_0x479723,_0x4ca56f,_0x42df61)=>ne(_0x479723,typeof _0x4ca56f!=_0x4f9315(0x11d)?_0x4ca56f+'':_0x4ca56f,_0x42df61);let b=class extends _0x290c01{constructor(_0x31c138=M,_0x38c186,_0x4ad6b3){const _0x4ce06d=_0x4f9315;super(),this['_config']=_0x31c138,this[_0x4ce06d(0x111)]=_0x38c186,this['_configService']=_0x4ad6b3;const {..._0x2f3327}=_0x5aa3a4({},M,this['_config']);this[_0x4ce06d(0xe2)][_0x4ce06d(0x109)](z,_0x2f3327);}['onStarting'](){const _0x588261=_0x4f9315;[[f],[g],[S]][_0x588261(0xfa)](_0x47773f=>{const _0x24f831=_0x588261;this[_0x24f831(0x111)][_0x24f831(0xe7)](_0x47773f);});}[_0x4f9315(0x114)](){const _0x3ff83a=_0x4f9315;this[_0x3ff83a(0x111)][_0x3ff83a(0xec)](g),this['_injector'][_0x3ff83a(0xec)](S);}};$(b,_0x4f9315(0x135),W),$(b,_0x4f9315(0xdc),_0x1d95eb[_0x4f9315(0x12d)]),b=ie([_0x4b6a7b(_0x8ab5ff,_0x589b09,_0x10820f),w(0x1,_0x4395a5(_0x3849c5)),w(0x2,_0xd35145)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x521248=_0x5dec;(function(_0x8c7a22,_0x14bd5a){const _0x28d111=_0x5dec,_0x55fbc9=_0x8c7a22();while(!![]){try{const _0x2ac0ad=-parseInt(_0x28d111(0xf8))/0x1+-parseInt(_0x28d111(0x121))/0x2*(-parseInt(_0x28d111(0x14d))/0x3)+parseInt(_0x28d111(0xf0))/0x4+parseInt(_0x28d111(0x119))/0x5+-parseInt(_0x28d111(0xfd))/0x6+parseInt(_0x28d111(0xf3))/0x7+parseInt(_0x28d111(0x114))/0x8*(-parseInt(_0x28d111(0xfa))/0x9);if(_0x2ac0ad===_0x14bd5a)break;else _0x55fbc9['push'](_0x55fbc9['shift']());}catch(_0xec2de1){_0x55fbc9['push'](_0x55fbc9['shift']());}}}(_0x2f53,0xecd41));import{CommentService as _0x695c84,CollaborationSessionService as _0x2de60c,UniverCollaborationClientPlugin as _0x2ddcde}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xca7a46}from'@univerjs-pro/license';import{dayjs as _0x1d081f,UserManagerService as _0x5e4393,Inject as _0x30a124,Injector as _0x91409b,Disposable as _0x3fcfa0,CustomRangeType as _0x5c6f55,UniverInstanceType as _0x274050,DependentOn as _0x13c9ad,IConfigService as _0x1e339e,Plugin as _0x212cbe,merge as _0x123e4c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x502461}from'@univerjs/thread-comment-ui';function _0x5dec(_0x38b6d7,_0x559185){const _0x2f53cd=_0x2f53();return _0x5dec=function(_0x5dec20,_0x55b527){_0x5dec20=_0x5dec20-0xe9;let _0x3d5750=_0x2f53cd[_0x5dec20];return _0x3d5750;},_0x5dec(_0x38b6d7,_0x559185);}import{ThreadCommentModel as _0x444c3f,IThreadCommentDataSourceService as _0x408dc9}from'@univerjs/thread-comment';import{bufferTime as _0x3db9d6}from'rxjs';import{HTTPService as _0x11e3e7}from'@univerjs/network';const W=_0x521248(0x11b);var I=(_0x511929=>(_0x511929[_0x511929[_0x521248(0xe9)]=0x0]=_0x521248(0xe9),_0x511929[_0x511929['Solved']=0x1]=_0x521248(0x136),_0x511929[_0x511929[_0x521248(0xff)]=-0x1]=_0x521248(0xff),_0x511929))(I||{}),v=(_0x3358c0=>(_0x3358c0[_0x3358c0[_0x521248(0x127)]=0x0]='Unknown',_0x3358c0[_0x3358c0['Add']=0x1]=_0x521248(0x126),_0x3358c0[_0x3358c0[_0x521248(0x137)]=0x2]=_0x521248(0x137),_0x3358c0[_0x3358c0[_0x521248(0x101)]=0x3]=_0x521248(0x101),_0x3358c0[_0x3358c0[_0x521248(0x10a)]=0x4]='Delete',_0x3358c0[_0x3358c0[_0x521248(0x115)]=0x5]=_0x521248(0x115),_0x3358c0[_0x3358c0[_0x521248(0xff)]=-0x1]=_0x521248(0xff),_0x3358c0))(v||{});const D=_0x48d561=>_0x1d081f(new Date(+_0x48d561))[_0x521248(0x14c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x7da91b,_0x1d36d3)=>{const _0x329d89=_0x521248,_0x396473=_0x7da91b['get'](_0x5e4393),_0x54acaf=_0x7da91b[_0x329d89(0x12f)](_0x11e3e7);_0x1d36d3['forEach'](_0x557f01=>{const _0x136230=_0x329d89;_0x396473['getUser'](_0x557f01)&&_0x1d36d3[_0x136230(0x123)](_0x557f01);}),_0x1d36d3[_0x329d89(0x109)]&&(await _0x54acaf['get'](_0x329d89(0x144),{'params':{'userIDs':[..._0x1d36d3]}}))[_0x329d89(0xed)][_0x329d89(0x11d)]['forEach'](_0x196b31=>{const _0x368e1c=_0x329d89;_0x196b31&&_0x396473[_0x368e1c(0xef)](_0x196b31);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x370c02,_0x2a904e,_0x2626ad,_0xd93bc)=>{const _0x15fdc5=_0x521248;for(var _0x408445=_0xd93bc>0x1?void 0x0:_0xd93bc?K(_0x2a904e,_0x2626ad):_0x2a904e,_0x1d5ef7=_0x370c02[_0x15fdc5(0x12b)]-0x1,_0x3e52c7;_0x1d5ef7>=0x0;_0x1d5ef7--)(_0x3e52c7=_0x370c02[_0x1d5ef7])&&(_0x408445=_0x3e52c7(_0x408445)||_0x408445);return _0x408445;},p=(_0x3437bc,_0x11636e)=>(_0x248eb4,_0x2e7486)=>_0x11636e(_0x248eb4,_0x2e7486,_0x3437bc);let S=class extends _0x3fcfa0{constructor(_0x30325e,_0x5e7357,_0x261d80,_0x5f5752){const _0x5ec101=_0x521248;super(),this[_0x5ec101(0x11a)]=_0x30325e,this[_0x5ec101(0x102)]=_0x5e7357,this['_userService']=_0x261d80,this['_injector']=_0x5f5752,this['_init'](),this[_0x5ec101(0x132)]();}[_0x521248(0x132)](){const _0x4359e5=_0x521248;this[_0x4359e5(0x100)](this[_0x4359e5(0x102)][_0x4359e5(0xf9)][_0x4359e5(0xfe)](_0x3db9d6(0x10))[_0x4359e5(0xf1)](_0x2b350d=>{const _0x1d741f=_0x4359e5,_0x379569=new Set();_0x2b350d[_0x1d741f(0xf6)](_0x26107b=>{const _0x3c383a=_0x1d741f;switch(_0x26107b[_0x3c383a(0x145)]){case _0x3c383a(0x14a):{const _0x3bdea8=_0x26107b['payload'][_0x3c383a(0x116)];_0x379569[_0x3c383a(0x14a)](_0x3bdea8);break;}}}),B(this[_0x1d741f(0xea)],_0x379569);}));}['_init'](){const _0xdf9345=_0x521248;this[_0xdf9345(0x100)](this[_0xdf9345(0x11a)][_0xdf9345(0xf9)][_0xdf9345(0xf1)](async _0x479e09=>{const _0x29a3c8=_0xdf9345;var _0x2b1f40,_0x51f6ba,_0x5f0f53,_0x43a6ee;const _0x3c81b3=(_0x2b1f40=this[_0x29a3c8(0x102)][_0x29a3c8(0x13d)](_0x479e09[_0x29a3c8(0x12d)])[_0x29a3c8(0x12e)](_0x1727f8=>_0x1727f8['threadId']===_0x479e09[_0x29a3c8(0x147)]))==null?void 0x0:_0x2b1f40[_0x29a3c8(0x143)];if(!_0x3c81b3)return;const {unitId:_0x1aa92c,subUnitId:_0x2e4b58}=_0x3c81b3;switch(_0x479e09['user']&&this['_userService'][_0x29a3c8(0xef)](_0x479e09[_0x29a3c8(0x110)]),_0x479e09[_0x29a3c8(0x145)]){case v[_0x29a3c8(0x126)]:break;case v[_0x29a3c8(0x137)]:{this[_0x29a3c8(0x102)][_0x29a3c8(0xf2)](_0x1aa92c,_0x2e4b58,{'unitId':_0x1aa92c,'subUnitId':_0x2e4b58,'ref':'','id':_0x479e09[_0x29a3c8(0x10b)],'dT':D(+_0x479e09['createTimestamp']),'threadId':_0x479e09[_0x29a3c8(0x147)],'personId':(_0x5f0f53=(_0x51f6ba=_0x479e09[_0x29a3c8(0x110)])==null?void 0x0:_0x51f6ba[_0x29a3c8(0x107)])!=null?_0x5f0f53:_0x479e09[_0x29a3c8(0x11f)],'text':JSON[_0x29a3c8(0xfc)](_0x479e09[_0x29a3c8(0x122)]),'parentId':_0x3c81b3['id']});break;}case v[_0x29a3c8(0x10a)]:{const _0x4b3094=this['_threadCommentModel'][_0x29a3c8(0x139)](_0x1aa92c,_0x2e4b58,_0x479e09[_0x29a3c8(0x10b)]);_0x4b3094&&_0x4b3094['parentId']&&this['_threadCommentModel'][_0x29a3c8(0x10c)](_0x1aa92c,_0x2e4b58,_0x479e09[_0x29a3c8(0x10b)]);break;}case v['Edit']:{this[_0x29a3c8(0x102)]['updateComment'](_0x1aa92c,_0x2e4b58,{'commentId':_0x479e09['replyId'],'text':JSON[_0x29a3c8(0xfc)](_0x479e09[_0x29a3c8(0x122)])});break;}case v[_0x29a3c8(0x115)]:{const _0x3ebba5=(_0x43a6ee=this['_threadCommentModel'][_0x29a3c8(0x13d)](_0x479e09[_0x29a3c8(0x12d)])[_0x29a3c8(0x12e)](_0x1ccd5c=>_0x1ccd5c[_0x29a3c8(0x147)]===_0x479e09[_0x29a3c8(0x147)]))==null?void 0x0:_0x43a6ee['root'];_0x3ebba5&&this[_0x29a3c8(0x102)][_0x29a3c8(0x134)](_0x1aa92c,_0x2e4b58,_0x3ebba5['id'],_0x479e09[_0x29a3c8(0x11e)]===I[_0x29a3c8(0x136)]);break;}}}));}};S=V([p(0x0,_0x30a124(_0x695c84)),p(0x1,_0x30a124(_0x444c3f)),p(0x2,_0x30a124(_0x5e4393)),p(0x3,_0x30a124(_0x91409b))],S);const z=_0x521248(0x131),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x389fc1,_0x44bbe4,_0x357c56,_0x2707ee)=>{for(var _0x3eca8e=_0x2707ee>0x1?void 0x0:_0x2707ee?k(_0x44bbe4,_0x357c56):_0x44bbe4,_0x54e894=_0x389fc1['length']-0x1,_0x17c875;_0x54e894>=0x0;_0x54e894--)(_0x17c875=_0x389fc1[_0x54e894])&&(_0x3eca8e=_0x17c875(_0x3eca8e)||_0x3eca8e);return _0x3eca8e;},_=(_0x559f71,_0x1bbda0)=>(_0x9dd14f,_0x4ad798)=>_0x1bbda0(_0x9dd14f,_0x4ad798,_0x559f71);function _0x2f53(){const _0x52a37b=['/universer-api/comment/unit/','9583370fNSiTd','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','users','solved','userId','createTimestamp','838emhzMO','content','delete','post','/edit','Add','Unknown','resolved','requireSession','_userService','length','onStarting','unitId','find','get','replies','thread-comment-data-source.config','_initUserSync','values','resolveComment','/delete','Solved','Reply','_httpService','getComment','getMemberID','/solved','error','getUnit','saveCommentToSnapshot','/add','_threadCommentDataSourceService','_configService','COMMENT','root','/universer-api/user/list','type','customRanges','threadId','getOwnPropertyDescriptor','filter','add','rangeId','format','651qPcqww','OpenOrReOpen','_injector','stringify','setConfig','body','pluginName','addUser','2251732bcWWko','subscribe','addComment','4336297MkmwFr','updateComment','/list','forEach','_sessionService','353658saOzlt','commentUpdate$','1924407MmnjpP','code','parse','9914826nmVcGJ','pipe','UNRECOGNIZED','disposeWithMe','Edit','_threadCommentModel','onReady','reply','_threadCommentDataSource','slice','userID','listComments','size','Delete','replyId','deleteComment','map','syncUpdateMutationToColla','defineProperty','user','comment','dataSource','_initDataSource','8kDeEgx','Solve','personId','getCurrentUser'];_0x2f53=function(){return _0x52a37b;};return _0x2f53();}function X(_0x296fe0,_0x1a561f){const _0x145e71=_0x521248,_0x139767=_0x296fe0[_0x145e71(0x130)][0x0];return{..._0x1a561f,'id':_0x139767['replyId'],'resolved':_0x296fe0[_0x145e71(0x11e)]===0x1,'dT':D(_0x139767[_0x145e71(0x120)]),'personId':_0x139767[_0x145e71(0x11f)],'threadId':_0x139767[_0x145e71(0x147)]};}function ee(_0x1ccc3c,_0x5737b3,_0x5097af){const _0x420e19=_0x521248;var _0x13b983,_0x5b49e6;if(((_0x5b49e6=(_0x13b983=_0x1ccc3c==null?void 0x0:_0x1ccc3c['replies'])==null?void 0x0:_0x13b983[_0x420e19(0x12b)])!=null?_0x5b49e6:0x0)>0x0){const _0x4991ac=(_0xdb9eb5,_0x328ca6)=>({'id':_0xdb9eb5['replyId'],'threadId':_0xdb9eb5['threadId'],'dT':D(_0xdb9eb5[_0x420e19(0x120)]),'personId':_0xdb9eb5[_0x420e19(0x11f)],'resolved':_0x1ccc3c['solved']===I[_0x420e19(0x136)],'unitId':_0x5737b3,'subUnitId':_0x5097af,'text':JSON[_0x420e19(0xfc)](_0xdb9eb5['content']),'parentId':_0x328ca6}),_0x24559f=_0x4991ac(_0x1ccc3c['replies'][0x0]);return{..._0x24559f,'children':_0x1ccc3c[_0x420e19(0x130)][_0x420e19(0x106)](0x1)[_0x420e19(0x10d)](_0x236a5c=>_0x4991ac(_0x236a5c,_0x24559f['id']))};}return null;}let f=class{constructor(_0x408413,_0x57ddfc,_0xdcf56d,_0x41b707){const _0x166924=_0x521248;this[_0x166924(0x138)]=_0x408413,this[_0x166924(0x12a)]=_0x57ddfc,this['_sessionService']=_0xdcf56d,this[_0x166924(0xea)]=_0x41b707;}async[_0x521248(0xf2)](_0x3b82ca){const _0x359ee2=_0x521248;var _0x4025f6,_0x443300;const {parentId:_0x24a3ce,unitId:_0x511381,text:_0x1e8de6,threadId:_0x29e293}=_0x3b82ca,_0x274867=(_0x443300=(_0x4025f6=_0x1e8de6[_0x359ee2(0x146)])==null?void 0x0:_0x4025f6[_0x359ee2(0x149)](_0x256bb9=>_0x256bb9['rangeType']===_0x5c6f55[_0x359ee2(0x142)])[_0x359ee2(0x10d)](_0x1e0e06=>_0x1e0e06[_0x359ee2(0x14b)]))!=null?_0x443300:[],_0x5982d3=JSON[_0x359ee2(0xeb)](_0x1e8de6),_0x16d679=(await this[_0x359ee2(0xf7)]['requireSession'](_0x511381))[_0x359ee2(0x13a)]();if(_0x24a3ce){const _0x249df9={'memberId':_0x16d679,'unitId':_0x511381,'content':_0x5982d3,'mention':_0x274867,'threadId':_0x29e293},_0x2c0163=(await this[_0x359ee2(0x138)]['post'](_0x359ee2(0x118)+_0x511381+'/reply',{'body':_0x249df9}))[_0x359ee2(0xed)][_0x359ee2(0x104)];return{..._0x3b82ca,'id':_0x2c0163['replyId'],'dT':_0x1d081f(+_0x2c0163[_0x359ee2(0x120)])[_0x359ee2(0x14c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c0163[_0x359ee2(0x11f)]};}else{const _0x40365d={'memberId':_0x16d679,'unitId':_0x511381,'content':_0x5982d3,'mention':_0x274867},_0x1afdf2=await this['_httpService']['post'](_0x359ee2(0x118)+_0x511381+_0x359ee2(0x13f),{'body':_0x40365d});return X(_0x1afdf2[_0x359ee2(0xed)][_0x359ee2(0x111)],_0x3b82ca);}}async[_0x521248(0xf4)](_0x456c88){const _0x5c5b50=_0x521248;var _0xd437c3,_0x1e5fb2;const {text:_0x1ebfa2,unitId:_0x1720a4}=_0x456c88,_0x1ae4fe=(_0x1e5fb2=(_0xd437c3=_0x1ebfa2['customRanges'])==null?void 0x0:_0xd437c3[_0x5c5b50(0x149)](_0x56d419=>_0x56d419['rangeType']===_0x5c6f55[_0x5c5b50(0x142)])[_0x5c5b50(0x10d)](_0x12fc6c=>_0x12fc6c[_0x5c5b50(0x14b)]))!=null?_0x1e5fb2:[],_0xe5bbe9=JSON['stringify'](_0x1ebfa2),_0x39a639=_0x456c88['threadId'],_0x59b279=_0x456c88['id'],_0xa6ba67={'memberId':(await this['_sessionService']['requireSession'](_0x1720a4))[_0x5c5b50(0x13a)](),'unitId':_0x1720a4,'threadId':_0x39a639,'mention':_0x1ae4fe,'content':_0xe5bbe9,'replyId':_0x59b279},_0xb061f1=await this['_httpService']['post'](_0x5c5b50(0x118)+_0x1720a4+_0x5c5b50(0x125),{'body':_0xa6ba67});return!_0xb061f1[_0x5c5b50(0xed)][_0x5c5b50(0x13c)]||_0xb061f1[_0x5c5b50(0xed)][_0x5c5b50(0x13c)]['code']===0x1;}async[_0x521248(0x134)](_0x38407a){const _0x4e249e=_0x521248,{unitId:_0x3f0640}=_0x38407a,_0x124e52=_0x38407a['threadId'],_0x46028a={'memberId':this['_userService'][_0x4e249e(0x117)]()[_0x4e249e(0x107)],'unitId':_0x3f0640,'threadId':_0x124e52,'solved':_0x38407a[_0x4e249e(0x128)]?I['Solved']:I[_0x4e249e(0xe9)]},_0x1aef6e=await this[_0x4e249e(0x138)][_0x4e249e(0x124)](_0x4e249e(0x118)+_0x3f0640+_0x4e249e(0x13b),{'body':_0x46028a});return!_0x1aef6e[_0x4e249e(0xed)][_0x4e249e(0x13c)]||_0x1aef6e[_0x4e249e(0xed)][_0x4e249e(0x13c)]['code']===0x1;}async['deleteComment'](_0x3b68f9,_0x3021f1,_0x163d15,_0x143918){const _0x1490d3=_0x521248,_0x20e18d={'memberId':(await this['_sessionService'][_0x1490d3(0x129)](_0x3b68f9))['getMemberID'](),'threadId':_0x163d15,'replyId':_0x143918,'unitId':_0x3b68f9},_0x15bd25=await this[_0x1490d3(0x138)][_0x1490d3(0x124)](_0x1490d3(0x118)+_0x3b68f9+_0x1490d3(0x135),{'body':_0x20e18d});return!_0x15bd25['body'][_0x1490d3(0x13c)]||_0x15bd25[_0x1490d3(0xed)][_0x1490d3(0x13c)][_0x1490d3(0xfb)]===0x1;}async[_0x521248(0x108)](_0x99819d,_0x55c058,_0x32e47f){const _0xa057bf=_0x521248,_0x131054={'unitId':_0x99819d,'threadId':_0x32e47f},_0x10086b=await this['_httpService'][_0xa057bf(0x124)](_0xa057bf(0x118)+_0x99819d+_0xa057bf(0xf5),{'body':_0x131054}),_0x4bce7b=_0x32e47f[_0xa057bf(0x10d)](_0x585054=>ee(_0x10086b[_0xa057bf(0xed)]['comments'][_0x585054],_0x99819d,_0x55c058))[_0xa057bf(0x149)](Boolean);return Object[_0xa057bf(0x133)](_0x10086b['body'][_0xa057bf(0x11d)])[_0xa057bf(0xf6)](_0x1b9d16=>{const _0x1390ff=_0xa057bf;this[_0x1390ff(0x12a)]['addUser'](_0x1b9d16);}),_0x4bce7b;}[_0x521248(0x13e)](_0x51e7e3){const _0x58c8cc=_0x521248;return{'id':_0x51e7e3['id'],'threadId':_0x51e7e3[_0x58c8cc(0x147)],'ref':_0x51e7e3['ref']};}};f=Q([_(0x0,_0x30a124(_0x11e3e7)),_(0x1,_0x30a124(_0x5e4393)),_(0x2,_0x30a124(_0x2de60c)),_(0x3,_0x30a124(_0x91409b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2bbdb2,_0xe1ef1d,_0x251581,_0xdaf905)=>{for(var _0x11518b=_0xdaf905>0x1?void 0x0:_0xdaf905?re(_0xe1ef1d,_0x251581):_0xe1ef1d,_0x2e7509=_0x2bbdb2['length']-0x1,_0x47711f;_0x2e7509>=0x0;_0x2e7509--)(_0x47711f=_0x2bbdb2[_0x2e7509])&&(_0x11518b=_0x47711f(_0x11518b)||_0x11518b);return _0x11518b;},N=(_0x97c0d1,_0x91ac35)=>(_0x319c93,_0x52a6e0)=>_0x91ac35(_0x319c93,_0x52a6e0,_0x97c0d1);let g=class extends _0x3fcfa0{constructor(_0x38b8b,_0x4481af){const _0x35dfaa=_0x521248;super(),this[_0x35dfaa(0x140)]=_0x38b8b,this[_0x35dfaa(0x105)]=_0x4481af,this[_0x35dfaa(0x113)]();}[_0x521248(0x113)](){const _0x46caa7=_0x521248;this[_0x46caa7(0x140)][_0x46caa7(0x112)]=this[_0x46caa7(0x105)],this[_0x46caa7(0x140)][_0x46caa7(0x10e)]=!0x1;}};g=te([N(0x0,_0x408dc9),N(0x1,_0x30a124(f))],g);var se=Object[_0x521248(0x10f)],oe=Object[_0x521248(0x148)],ne=(_0x5d6f78,_0x12f06f,_0xf60301)=>_0x12f06f in _0x5d6f78?se(_0x5d6f78,_0x12f06f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf60301}):_0x5d6f78[_0x12f06f]=_0xf60301,ie=(_0x183baf,_0x38e501,_0x506baf,_0x382a3b)=>{for(var _0x5e3a7f=_0x382a3b>0x1?void 0x0:_0x382a3b?oe(_0x38e501,_0x506baf):_0x38e501,_0x2cce59=_0x183baf['length']-0x1,_0x208525;_0x2cce59>=0x0;_0x2cce59--)(_0x208525=_0x183baf[_0x2cce59])&&(_0x5e3a7f=_0x208525(_0x5e3a7f)||_0x5e3a7f);return _0x5e3a7f;},w=(_0x531e92,_0x1e5ebe)=>(_0x4a20fe,_0xc3a5f2)=>_0x1e5ebe(_0x4a20fe,_0xc3a5f2,_0x531e92),$=(_0x35f5ec,_0x1a0d35,_0x188b7f)=>ne(_0x35f5ec,typeof _0x1a0d35!='symbol'?_0x1a0d35+'':_0x1a0d35,_0x188b7f);let b=class extends _0x212cbe{constructor(_0x32fd49=M,_0xe6d1b0,_0x1b2de3){const _0x43386f=_0x521248;super(),this['_config']=_0x32fd49,this['_injector']=_0xe6d1b0,this[_0x43386f(0x141)]=_0x1b2de3;const {..._0x41c434}=_0x123e4c({},M,this[_0x43386f(0x11c)]);this['_configService'][_0x43386f(0xec)](z,_0x41c434);}[_0x521248(0x12c)](){[[f],[g],[S]]['forEach'](_0x28408c=>{const _0x2ee2f4=_0x5dec;this[_0x2ee2f4(0xea)][_0x2ee2f4(0x14a)](_0x28408c);});}[_0x521248(0x103)](){const _0x1d37b0=_0x521248;this[_0x1d37b0(0xea)]['get'](g),this[_0x1d37b0(0xea)][_0x1d37b0(0x12f)](S);}};$(b,_0x521248(0xee),W),$(b,_0x521248(0x145),_0x274050['UNIVER_UNKNOWN']),b=ie([_0x13c9ad(_0x502461,_0x2ddcde,_0xca7a46),w(0x1,_0x30a124(_0x91409b)),w(0x2,_0x1e339e)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x25e2(){const _0x400efd=['getUser','UniverLicensePlugin','bufferTime','11hjSEiI','deleteComment','comment','updateComment','Plugin','_initUserSync','code','679827hdQNzB','stringify','_initDataSource','getComment','Disposable','pipe','2019564qQnUvc','unitId','get','defineProperty','UserManagerService','UniverCore','Module','type','_threadCommentDataSourceService','403725ZiOrWy','error','merge','user','threadId','toStringTag','6326RnoPYy','COMMENT','@univerjs/network','content','subscribe','Delete','UniverNetwork','CollaborationSessionService','HTTPService','_httpService','/list','_commentService','/solved','@univerjs/thread-comment','_threadCommentDataSource','UniverThreadComment','@univerjs/thread-comment-ui','Inject','find','users','/delete','personId','109mbFjuY','comments','requireSession','disposeWithMe','ref','format','ThreadCommentModel','map','10FggShh','filter','_threadCommentModel','3553370qKQfQG','UniverInstanceType','createTimestamp','getCurrentUser','reply','/universer-api/comment/unit/','rxjs','getOwnPropertyDescriptor','addUser','Solve','/add','CustomRangeType','amd','Injector','CommentService','payload','UNRECOGNIZED','post','@univerjs-pro/collaboration-client','UniverProLicense','commentUpdate$','syncUpdateMutationToColla','values','dayjs','_injector','Edit','replyId','getMemberID','Add','OpenOrReOpen','forEach','body','IThreadCommentDataSourceService','DependentOn','_userService','pluginName','UniverThreadCommentDataSourcePlugin','userId','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','/edit','Reply','_sessionService','thread-comment-data-source.config','delete','onStarting','8GNsIlt','parentId','_init','add','_config','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','function','replies','Solved','getUnit','_configService','resolveComment','parse','rangeId','slice','/reply','root','rangeType','Unknown','/universer-api/user/list','67365QWaNgH','471532HZivfh','length','resolved'];_0x25e2=function(){return _0x400efd;};return _0x25e2();}function _0x969c(_0x404604,_0x3f14ea){const _0x25e246=_0x25e2();return _0x969c=function(_0x969c03,_0x29910e){_0x969c03=_0x969c03-0xc5;let _0x12c40f=_0x25e246[_0x969c03];return _0x12c40f;},_0x969c(_0x404604,_0x3f14ea);}(function(_0x5587d8,_0x126045){const _0xb1b5d=_0x969c,_0xf1c6b1=_0x5587d8();while(!![]){try{const _0x2beb92=parseInt(_0xb1b5d(0x119))/0x1*(-parseInt(_0xb1b5d(0x103))/0x2)+parseInt(_0xb1b5d(0xee))/0x3+-parseInt(_0xb1b5d(0xe1))/0x4*(-parseInt(_0xb1b5d(0x121))/0x5)+-parseInt(_0xb1b5d(0xf4))/0x6+parseInt(_0xb1b5d(0xfd))/0x7+parseInt(_0xb1b5d(0xca))/0x8*(-parseInt(_0xb1b5d(0xe0))/0x9)+-parseInt(_0xb1b5d(0x124))/0xa*(-parseInt(_0xb1b5d(0xe7))/0xb);if(_0x2beb92===_0x126045)break;else _0xf1c6b1['push'](_0xf1c6b1['shift']());}catch(_0x30dca1){_0xf1c6b1['push'](_0xf1c6b1['shift']());}}}(_0x25e2,0x2d8ad),function(_0x565a39,_0x1c8ead){const _0x5dee63=_0x969c;typeof exports=='object'&&typeof module<'u'?_0x1c8ead(exports,require(_0x5dee63(0x136)),require(_0x5dee63(0x14b)),require(_0x5dee63(0xd1)),require(_0x5dee63(0x113)),require('@univerjs/thread-comment'),require('rxjs'),require(_0x5dee63(0x105))):typeof define==_0x5dee63(0xd2)&&define[_0x5dee63(0x130)]?define(['exports','@univerjs-pro/collaboration-client',_0x5dee63(0x14b),_0x5dee63(0xd1),_0x5dee63(0x113),_0x5dee63(0x110),_0x5dee63(0x12a),_0x5dee63(0x105)],_0x1c8ead):(_0x565a39=typeof globalThis<'u'?globalThis:_0x565a39||self,_0x1c8ead(_0x565a39['UniverProThreadCommentDatasource']={},_0x565a39['UniverProCollaborationClient'],_0x565a39[_0x5dee63(0x137)],_0x565a39[_0x5dee63(0xf9)],_0x565a39['UniverThreadCommentUi'],_0x565a39[_0x5dee63(0x112)],_0x565a39[_0x5dee63(0x12a)],_0x565a39[_0x5dee63(0x109)]));}(this,function(_0x49da9b,_0x2a6dbd,_0x1f1fb0,_0x1a662a,_0x2eb002,_0x215241,_0x5d3423,_0xf2698a){'use strict';const _0x5ae394=_0x969c;const _0x18e20e=_0x5ae394(0xd0);var _0x48e270=(_0x46cbfd=>(_0x46cbfd[_0x46cbfd[_0x5ae394(0x141)]=0x0]=_0x5ae394(0x141),_0x46cbfd[_0x46cbfd[_0x5ae394(0xd4)]=0x1]=_0x5ae394(0xd4),_0x46cbfd[_0x46cbfd[_0x5ae394(0x134)]=-0x1]=_0x5ae394(0x134),_0x46cbfd))(_0x48e270||{}),_0x257be8=(_0x865118=>(_0x865118[_0x865118[_0x5ae394(0xde)]=0x0]='Unknown',_0x865118[_0x865118[_0x5ae394(0x140)]=0x1]=_0x5ae394(0x140),_0x865118[_0x865118[_0x5ae394(0xc5)]=0x2]='Reply',_0x865118[_0x865118[_0x5ae394(0x13d)]=0x3]='Edit',_0x865118[_0x865118['Delete']=0x4]=_0x5ae394(0x108),_0x865118[_0x865118['Solve']=0x5]=_0x5ae394(0x12d),_0x865118[_0x865118[_0x5ae394(0x134)]=-0x1]=_0x5ae394(0x134),_0x865118))(_0x257be8||{});const _0x28c8ce=_0x45a0cc=>_0x1a662a['dayjs'](new Date(+_0x45a0cc))['format'](_0x5ae394(0x14a)),_0x37279e=async(_0x17d4e5,_0x3dba83)=>{const _0x3f4a4b=_0x5ae394,_0x17ce07=_0x17d4e5[_0x3f4a4b(0xf6)](_0x1a662a[_0x3f4a4b(0xf8)]),_0x2fa6eb=_0x17d4e5[_0x3f4a4b(0xf6)](_0xf2698a[_0x3f4a4b(0x10b)]);_0x3dba83[_0x3f4a4b(0x142)](_0x4b3e1b=>{const _0x571dbc=_0x3f4a4b;_0x17ce07[_0x571dbc(0xe4)](_0x4b3e1b)&&_0x3dba83[_0x571dbc(0xc8)](_0x4b3e1b);}),_0x3dba83['size']&&(await _0x2fa6eb[_0x3f4a4b(0xf6)](_0x3f4a4b(0xdf),{'params':{'userIDs':[..._0x3dba83]}}))[_0x3f4a4b(0x143)][_0x3f4a4b(0x116)][_0x3f4a4b(0x142)](_0x8af7f6=>{_0x8af7f6&&_0x17ce07['addUser'](_0x8af7f6);});};var _0x160436=Object[_0x5ae394(0x12b)],_0x4da777=(_0x4c5e60,_0x534dba,_0x2c6364,_0x4da5c2)=>{const _0xe0b272=_0x5ae394;for(var _0x511ebb=_0x4da5c2>0x1?void 0x0:_0x4da5c2?_0x160436(_0x534dba,_0x2c6364):_0x534dba,_0x7b0fb=_0x4c5e60[_0xe0b272(0xe2)]-0x1,_0x399760;_0x7b0fb>=0x0;_0x7b0fb--)(_0x399760=_0x4c5e60[_0x7b0fb])&&(_0x511ebb=_0x399760(_0x511ebb)||_0x511ebb);return _0x511ebb;},_0x5b11ab=(_0x26e9d4,_0x4c0110)=>(_0x3e9f1b,_0x3f414c)=>_0x4c0110(_0x3e9f1b,_0x3f414c,_0x26e9d4);let _0x4a7b5c=class extends _0x1a662a[_0x5ae394(0xf2)]{constructor(_0x29e9fd,_0x38837a,_0x2a3dd6,_0x35ddda){const _0x2af568=_0x5ae394;super(),this[_0x2af568(0x10e)]=_0x29e9fd,this[_0x2af568(0x123)]=_0x38837a,this[_0x2af568(0x146)]=_0x2a3dd6,this[_0x2af568(0x13c)]=_0x35ddda,this['_init'](),this[_0x2af568(0xec)]();}[_0x5ae394(0xec)](){const _0x5116d8=_0x5ae394;this[_0x5116d8(0x11c)](this[_0x5116d8(0x123)]['commentUpdate$'][_0x5116d8(0xf3)](_0x5d3423[_0x5116d8(0xe6)](0x10))[_0x5116d8(0x107)](_0xe3123c=>{const _0x306f8a=_0x5116d8,_0x4d1482=new Set();_0xe3123c[_0x306f8a(0x142)](_0x51736e=>{const _0x33a4cf=_0x306f8a;switch(_0x51736e['type']){case _0x33a4cf(0xcd):{const _0x144ae3=_0x51736e[_0x33a4cf(0x133)][_0x33a4cf(0x118)];_0x4d1482['add'](_0x144ae3);break;}}}),_0x37279e(this[_0x306f8a(0x13c)],_0x4d1482);}));}[_0x5ae394(0xcc)](){const _0x47bd08=_0x5ae394;this['disposeWithMe'](this[_0x47bd08(0x10e)][_0x47bd08(0x138)][_0x47bd08(0x107)](async _0x3f5ba2=>{const _0xcbda7d=_0x47bd08;var _0x5c73b3,_0x375920,_0xefb171,_0x45834a;const _0xb82980=(_0x5c73b3=this[_0xcbda7d(0x123)]['getUnit'](_0x3f5ba2[_0xcbda7d(0xf5)])[_0xcbda7d(0x115)](_0x1100ba=>_0x1100ba[_0xcbda7d(0x101)]===_0x3f5ba2[_0xcbda7d(0x101)]))==null?void 0x0:_0x5c73b3['root'];if(!_0xb82980)return;const {unitId:_0x137b1a,subUnitId:_0x48ce0d}=_0xb82980;switch(_0x3f5ba2['user']&&this[_0xcbda7d(0x146)][_0xcbda7d(0x12c)](_0x3f5ba2[_0xcbda7d(0x100)]),_0x3f5ba2[_0xcbda7d(0xfb)]){case _0x257be8[_0xcbda7d(0x140)]:break;case _0x257be8['Reply']:{this[_0xcbda7d(0x123)]['addComment'](_0x137b1a,_0x48ce0d,{'unitId':_0x137b1a,'subUnitId':_0x48ce0d,'ref':'','id':_0x3f5ba2[_0xcbda7d(0x13e)],'dT':_0x28c8ce(+_0x3f5ba2[_0xcbda7d(0x126)]),'threadId':_0x3f5ba2[_0xcbda7d(0x101)],'personId':(_0xefb171=(_0x375920=_0x3f5ba2['user'])==null?void 0x0:_0x375920['userID'])!=null?_0xefb171:_0x3f5ba2['userId'],'text':JSON[_0xcbda7d(0xd8)](_0x3f5ba2[_0xcbda7d(0x106)]),'parentId':_0xb82980['id']});break;}case _0x257be8[_0xcbda7d(0x108)]:{const _0x1e508f=this[_0xcbda7d(0x123)][_0xcbda7d(0xf1)](_0x137b1a,_0x48ce0d,_0x3f5ba2[_0xcbda7d(0x13e)]);_0x1e508f&&_0x1e508f[_0xcbda7d(0xcb)]&&this['_threadCommentModel'][_0xcbda7d(0xe8)](_0x137b1a,_0x48ce0d,_0x3f5ba2[_0xcbda7d(0x13e)]);break;}case _0x257be8['Edit']:{this[_0xcbda7d(0x123)][_0xcbda7d(0xea)](_0x137b1a,_0x48ce0d,{'commentId':_0x3f5ba2['replyId'],'text':JSON[_0xcbda7d(0xd8)](_0x3f5ba2['content'])});break;}case _0x257be8[_0xcbda7d(0x12d)]:{const _0x45d6e5=(_0x45834a=this[_0xcbda7d(0x123)][_0xcbda7d(0xd5)](_0x3f5ba2[_0xcbda7d(0xf5)])['find'](_0x2c0132=>_0x2c0132[_0xcbda7d(0x101)]===_0x3f5ba2['threadId']))==null?void 0x0:_0x45834a[_0xcbda7d(0xdc)];_0x45d6e5&&this['_threadCommentModel'][_0xcbda7d(0xd7)](_0x137b1a,_0x48ce0d,_0x45d6e5['id'],_0x3f5ba2['solved']===_0x48e270[_0xcbda7d(0xd4)]);break;}}}));}};_0x4a7b5c=_0x4da777([_0x5b11ab(0x0,_0x1a662a['Inject'](_0x2a6dbd[_0x5ae394(0x132)])),_0x5b11ab(0x1,_0x1a662a['Inject'](_0x215241[_0x5ae394(0x11f)])),_0x5b11ab(0x2,_0x1a662a[_0x5ae394(0x114)](_0x1a662a[_0x5ae394(0xf8)])),_0x5b11ab(0x3,_0x1a662a[_0x5ae394(0x114)](_0x1a662a[_0x5ae394(0x131)]))],_0x4a7b5c);const _0x33ba36=_0x5ae394(0xc7),_0x4c230b={};var _0x4116cf=Object[_0x5ae394(0x12b)],_0x58ee3b=(_0x5e4f34,_0x68c9f1,_0x24c8c5,_0x2d9f12)=>{const _0x4c9b92=_0x5ae394;for(var _0x829725=_0x2d9f12>0x1?void 0x0:_0x2d9f12?_0x4116cf(_0x68c9f1,_0x24c8c5):_0x68c9f1,_0x19cc87=_0x5e4f34[_0x4c9b92(0xe2)]-0x1,_0x4ded57;_0x19cc87>=0x0;_0x19cc87--)(_0x4ded57=_0x5e4f34[_0x19cc87])&&(_0x829725=_0x4ded57(_0x829725)||_0x829725);return _0x829725;},_0x3998b0=(_0x2ac37f,_0xb98011)=>(_0xc91ab6,_0x36e7f6)=>_0xb98011(_0xc91ab6,_0x36e7f6,_0x2ac37f);function _0x1cc6a7(_0xfa3561,_0xf37067){const _0x325eea=_0x5ae394,_0x39fe5f=_0xfa3561[_0x325eea(0xd3)][0x0];return{..._0xf37067,'id':_0x39fe5f[_0x325eea(0x13e)],'resolved':_0xfa3561['solved']===0x1,'dT':_0x28c8ce(_0x39fe5f[_0x325eea(0x126)]),'personId':_0x39fe5f[_0x325eea(0x149)],'threadId':_0x39fe5f[_0x325eea(0x101)]};}function _0x43e166(_0x45ca93,_0x580398,_0x182af3){const _0x22bcf6=_0x5ae394;var _0x4aec7e,_0x447bbe;if(((_0x447bbe=(_0x4aec7e=_0x45ca93==null?void 0x0:_0x45ca93[_0x22bcf6(0xd3)])==null?void 0x0:_0x4aec7e['length'])!=null?_0x447bbe:0x0)>0x0){const _0x5879bc=(_0x142d07,_0x30dea6)=>({'id':_0x142d07[_0x22bcf6(0x13e)],'threadId':_0x142d07[_0x22bcf6(0x101)],'dT':_0x28c8ce(_0x142d07[_0x22bcf6(0x126)]),'personId':_0x142d07[_0x22bcf6(0x149)],'resolved':_0x45ca93['solved']===_0x48e270[_0x22bcf6(0xd4)],'unitId':_0x580398,'subUnitId':_0x182af3,'text':JSON[_0x22bcf6(0xd8)](_0x142d07[_0x22bcf6(0x106)]),'parentId':_0x30dea6}),_0x43bc9b=_0x5879bc(_0x45ca93[_0x22bcf6(0xd3)][0x0]);return{..._0x43bc9b,'children':_0x45ca93[_0x22bcf6(0xd3)][_0x22bcf6(0xda)](0x1)['map'](_0x2bfd2c=>_0x5879bc(_0x2bfd2c,_0x43bc9b['id']))};}return null;}let _0x9f5aa3=class{constructor(_0x51a7b5,_0x39fb9f,_0x1ab626,_0x12953f){const _0x14fef7=_0x5ae394;this[_0x14fef7(0x10c)]=_0x51a7b5,this[_0x14fef7(0x146)]=_0x39fb9f,this[_0x14fef7(0xc6)]=_0x1ab626,this['_injector']=_0x12953f;}async['addComment'](_0x30ab8c){const _0x48998e=_0x5ae394;var _0x443310,_0x3edfa7;const {parentId:_0x52988e,unitId:_0xca6e7e,text:_0x2453ed,threadId:_0x47eec6}=_0x30ab8c,_0x1c1a43=(_0x3edfa7=(_0x443310=_0x2453ed['customRanges'])==null?void 0x0:_0x443310[_0x48998e(0x122)](_0x154a42=>_0x154a42[_0x48998e(0xdd)]===_0x1a662a[_0x48998e(0x12f)][_0x48998e(0x104)])[_0x48998e(0x120)](_0x18ddff=>_0x18ddff[_0x48998e(0xd9)]))!=null?_0x3edfa7:[],_0x4e69ec=JSON[_0x48998e(0xef)](_0x2453ed),_0xab0c67=(await this[_0x48998e(0xc6)][_0x48998e(0x11b)](_0xca6e7e))[_0x48998e(0x13f)]();if(_0x52988e){const _0x219244={'memberId':_0xab0c67,'unitId':_0xca6e7e,'content':_0x4e69ec,'mention':_0x1c1a43,'threadId':_0x47eec6},_0x1f0611=(await this[_0x48998e(0x10c)][_0x48998e(0x135)]('/universer-api/comment/unit/'+_0xca6e7e+_0x48998e(0xdb),{'body':_0x219244}))[_0x48998e(0x143)][_0x48998e(0x128)];return{..._0x30ab8c,'id':_0x1f0611[_0x48998e(0x13e)],'dT':_0x1a662a[_0x48998e(0x13b)](+_0x1f0611['createTimestamp'])[_0x48998e(0x11e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1f0611['userId']};}else{const _0x7daf2d={'memberId':_0xab0c67,'unitId':_0xca6e7e,'content':_0x4e69ec,'mention':_0x1c1a43},_0x3e8dab=await this[_0x48998e(0x10c)][_0x48998e(0x135)](_0x48998e(0x129)+_0xca6e7e+_0x48998e(0x12e),{'body':_0x7daf2d});return _0x1cc6a7(_0x3e8dab[_0x48998e(0x143)][_0x48998e(0xe9)],_0x30ab8c);}}async['updateComment'](_0x1bfce7){const _0xd4bc42=_0x5ae394;var _0x39ba72,_0x1963cf;const {text:_0x19fcef,unitId:_0x10a659}=_0x1bfce7,_0x516816=(_0x1963cf=(_0x39ba72=_0x19fcef['customRanges'])==null?void 0x0:_0x39ba72[_0xd4bc42(0x122)](_0x11a098=>_0x11a098[_0xd4bc42(0xdd)]===_0x1a662a[_0xd4bc42(0x12f)][_0xd4bc42(0x104)])[_0xd4bc42(0x120)](_0x55c45d=>_0x55c45d[_0xd4bc42(0xd9)]))!=null?_0x1963cf:[],_0x5ad9bb=JSON['stringify'](_0x19fcef),_0x38dbf8=_0x1bfce7['threadId'],_0x427cc2=_0x1bfce7['id'],_0x19f67f={'memberId':(await this['_sessionService'][_0xd4bc42(0x11b)](_0x10a659))['getMemberID'](),'unitId':_0x10a659,'threadId':_0x38dbf8,'mention':_0x516816,'content':_0x5ad9bb,'replyId':_0x427cc2},_0x190dc0=await this[_0xd4bc42(0x10c)][_0xd4bc42(0x135)](_0xd4bc42(0x129)+_0x10a659+_0xd4bc42(0x14c),{'body':_0x19f67f});return!_0x190dc0['body']['error']||_0x190dc0['body'][_0xd4bc42(0xfe)][_0xd4bc42(0xed)]===0x1;}async[_0x5ae394(0xd7)](_0x126c9e){const _0x2dc894=_0x5ae394,{unitId:_0x576829}=_0x126c9e,_0x328ca7=_0x126c9e[_0x2dc894(0x101)],_0x116442={'memberId':this[_0x2dc894(0x146)][_0x2dc894(0x127)]()['userID'],'unitId':_0x576829,'threadId':_0x328ca7,'solved':_0x126c9e[_0x2dc894(0xe3)]?_0x48e270['Solved']:_0x48e270[_0x2dc894(0x141)]},_0x4fbe09=await this['_httpService']['post'](_0x2dc894(0x129)+_0x576829+_0x2dc894(0x10f),{'body':_0x116442});return!_0x4fbe09[_0x2dc894(0x143)][_0x2dc894(0xfe)]||_0x4fbe09['body']['error'][_0x2dc894(0xed)]===0x1;}async[_0x5ae394(0xe8)](_0x42be1a,_0x19f0c7,_0x26c36b,_0x303287){const _0x4540c5=_0x5ae394,_0x2ce214={'memberId':(await this['_sessionService'][_0x4540c5(0x11b)](_0x42be1a))[_0x4540c5(0x13f)](),'threadId':_0x26c36b,'replyId':_0x303287,'unitId':_0x42be1a},_0x226697=await this[_0x4540c5(0x10c)][_0x4540c5(0x135)](_0x4540c5(0x129)+_0x42be1a+_0x4540c5(0x117),{'body':_0x2ce214});return!_0x226697['body']['error']||_0x226697[_0x4540c5(0x143)][_0x4540c5(0xfe)][_0x4540c5(0xed)]===0x1;}async['listComments'](_0x40f94a,_0x406dfe,_0x48f4af){const _0x431d78=_0x5ae394,_0x437174={'unitId':_0x40f94a,'threadId':_0x48f4af},_0x4f2114=await this[_0x431d78(0x10c)]['post'](_0x431d78(0x129)+_0x40f94a+_0x431d78(0x10d),{'body':_0x437174}),_0x27bbd3=_0x48f4af['map'](_0xb25f9c=>_0x43e166(_0x4f2114[_0x431d78(0x143)][_0x431d78(0x11a)][_0xb25f9c],_0x40f94a,_0x406dfe))[_0x431d78(0x122)](Boolean);return Object[_0x431d78(0x13a)](_0x4f2114['body'][_0x431d78(0x116)])[_0x431d78(0x142)](_0x5a6a28=>{const _0x145173=_0x431d78;this[_0x145173(0x146)][_0x145173(0x12c)](_0x5a6a28);}),_0x27bbd3;}['saveCommentToSnapshot'](_0x5d54ca){const _0x5a886d=_0x5ae394;return{'id':_0x5d54ca['id'],'threadId':_0x5d54ca[_0x5a886d(0x101)],'ref':_0x5d54ca[_0x5a886d(0x11d)]};}};_0x9f5aa3=_0x58ee3b([_0x3998b0(0x0,_0x1a662a[_0x5ae394(0x114)](_0xf2698a[_0x5ae394(0x10b)])),_0x3998b0(0x1,_0x1a662a[_0x5ae394(0x114)](_0x1a662a[_0x5ae394(0xf8)])),_0x3998b0(0x2,_0x1a662a[_0x5ae394(0x114)](_0x2a6dbd[_0x5ae394(0x10a)])),_0x3998b0(0x3,_0x1a662a[_0x5ae394(0x114)](_0x1a662a['Injector']))],_0x9f5aa3);var _0x2d6343=Object[_0x5ae394(0x12b)],_0x5713cb=(_0x20ba95,_0x243504,_0x5babb4,_0x3fd450)=>{const _0xbffcd3=_0x5ae394;for(var _0x31366b=_0x3fd450>0x1?void 0x0:_0x3fd450?_0x2d6343(_0x243504,_0x5babb4):_0x243504,_0x35a987=_0x20ba95[_0xbffcd3(0xe2)]-0x1,_0x230ad0;_0x35a987>=0x0;_0x35a987--)(_0x230ad0=_0x20ba95[_0x35a987])&&(_0x31366b=_0x230ad0(_0x31366b)||_0x31366b);return _0x31366b;},_0x2e9fc9=(_0x554fc0,_0x1fc07e)=>(_0x471049,_0x14f713)=>_0x1fc07e(_0x471049,_0x14f713,_0x554fc0);let _0x49f62c=class extends _0x1a662a[_0x5ae394(0xf2)]{constructor(_0x3cc777,_0x588969){const _0x449808=_0x5ae394;super(),this[_0x449808(0xfc)]=_0x3cc777,this[_0x449808(0x111)]=_0x588969,this[_0x449808(0xf0)]();}[_0x5ae394(0xf0)](){const _0x29fcb4=_0x5ae394;this[_0x29fcb4(0xfc)]['dataSource']=this[_0x29fcb4(0x111)],this['_threadCommentDataSourceService'][_0x29fcb4(0x139)]=!0x1;}};_0x49f62c=_0x5713cb([_0x2e9fc9(0x0,_0x215241[_0x5ae394(0x144)]),_0x2e9fc9(0x1,_0x1a662a[_0x5ae394(0x114)](_0x9f5aa3))],_0x49f62c);var _0x368519=Object[_0x5ae394(0xf7)],_0x1fb961=Object[_0x5ae394(0x12b)],_0xb735d2=(_0x3e1825,_0x3c268e,_0x5e38bb)=>_0x3c268e in _0x3e1825?_0x368519(_0x3e1825,_0x3c268e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e38bb}):_0x3e1825[_0x3c268e]=_0x5e38bb,_0x363879=(_0x5bcd62,_0x5fccc1,_0x2654c0,_0x1b55da)=>{for(var _0x52d67e=_0x1b55da>0x1?void 0x0:_0x1b55da?_0x1fb961(_0x5fccc1,_0x2654c0):_0x5fccc1,_0x216d73=_0x5bcd62['length']-0x1,_0xb0a9dd;_0x216d73>=0x0;_0x216d73--)(_0xb0a9dd=_0x5bcd62[_0x216d73])&&(_0x52d67e=_0xb0a9dd(_0x52d67e)||_0x52d67e);return _0x52d67e;},_0x30038c=(_0x3ef33b,_0x5c4b20)=>(_0x273266,_0xa42293)=>_0x5c4b20(_0x273266,_0xa42293,_0x3ef33b),_0x33718d=(_0x32c9ba,_0x1931f8,_0x4737b8)=>_0xb735d2(_0x32c9ba,typeof _0x1931f8!=_0x5ae394(0xcf)?_0x1931f8+'':_0x1931f8,_0x4737b8);_0x49da9b[_0x5ae394(0x148)]=class extends _0x1a662a[_0x5ae394(0xeb)]{constructor(_0x342e2f=_0x4c230b,_0xecccaa,_0x297dd9){const _0x3c5257=_0x5ae394;super(),this[_0x3c5257(0xce)]=_0x342e2f,this[_0x3c5257(0x13c)]=_0xecccaa,this[_0x3c5257(0xd6)]=_0x297dd9;const {..._0x37ce60}=_0x1a662a[_0x3c5257(0xff)]({},_0x4c230b,this['_config']);this[_0x3c5257(0xd6)]['setConfig'](_0x33ba36,_0x37ce60);}[_0x5ae394(0xc9)](){[[_0x9f5aa3],[_0x49f62c],[_0x4a7b5c]]['forEach'](_0x1775a5=>{const _0x2763b4=_0x969c;this[_0x2763b4(0x13c)]['add'](_0x1775a5);});}['onReady'](){const _0x449a53=_0x5ae394;this[_0x449a53(0x13c)][_0x449a53(0xf6)](_0x49f62c),this[_0x449a53(0x13c)][_0x449a53(0xf6)](_0x4a7b5c);}},_0x33718d(_0x49da9b[_0x5ae394(0x148)],_0x5ae394(0x147),_0x18e20e),_0x33718d(_0x49da9b['UniverThreadCommentDataSourcePlugin'],'type',_0x1a662a[_0x5ae394(0x125)]['UNIVER_UNKNOWN']),_0x49da9b[_0x5ae394(0x148)]=_0x363879([_0x1a662a[_0x5ae394(0x145)](_0x2eb002['UniverThreadCommentUIPlugin'],_0x2a6dbd['UniverCollaborationClientPlugin'],_0x1f1fb0[_0x5ae394(0xe5)]),_0x30038c(0x1,_0x1a662a[_0x5ae394(0x114)](_0x1a662a['Injector'])),_0x30038c(0x2,_0x1a662a['IConfigService'])],_0x49da9b['UniverThreadCommentDataSourcePlugin']),Object[_0x5ae394(0xf7)](_0x49da9b,Symbol[_0x5ae394(0x102)],{'value':_0x5ae394(0xfa)});}));
|
|
1
|
+
(function(_0x209469,_0x1b39c9){const _0x335c98=_0x12b1,_0x2aa800=_0x209469();while(!![]){try{const _0x1f9633=parseInt(_0x335c98(0x182))/0x1*(-parseInt(_0x335c98(0x1a1))/0x2)+parseInt(_0x335c98(0x17f))/0x3*(parseInt(_0x335c98(0x1ab))/0x4)+-parseInt(_0x335c98(0x197))/0x5*(-parseInt(_0x335c98(0x171))/0x6)+-parseInt(_0x335c98(0x1a4))/0x7+parseInt(_0x335c98(0x1e9))/0x8*(-parseInt(_0x335c98(0x1c1))/0x9)+parseInt(_0x335c98(0x1e3))/0xa*(parseInt(_0x335c98(0x16f))/0xb)+-parseInt(_0x335c98(0x179))/0xc*(-parseInt(_0x335c98(0x1e8))/0xd);if(_0x1f9633===_0x1b39c9)break;else _0x2aa800['push'](_0x2aa800['shift']());}catch(_0x1a7b47){_0x2aa800['push'](_0x2aa800['shift']());}}}(_0x2297,0xedfdf),function(_0x25b976,_0x10f2a3){const _0x1bc2fa=_0x12b1;typeof exports==_0x1bc2fa(0x195)&&typeof module<'u'?_0x10f2a3(exports,require('@univerjs-pro/collaboration-client'),require(_0x1bc2fa(0x1cc)),require(_0x1bc2fa(0x1ee)),require('@univerjs/thread-comment-ui'),require(_0x1bc2fa(0x194)),require(_0x1bc2fa(0x173)),require(_0x1bc2fa(0x186))):typeof define=='function'&&define[_0x1bc2fa(0x1b2)]?define([_0x1bc2fa(0x190),'@univerjs-pro/collaboration-client',_0x1bc2fa(0x1cc),_0x1bc2fa(0x1ee),_0x1bc2fa(0x191),'@univerjs/thread-comment',_0x1bc2fa(0x173),_0x1bc2fa(0x186)],_0x10f2a3):(_0x25b976=typeof globalThis<'u'?globalThis:_0x25b976||self,_0x10f2a3(_0x25b976['UniverProThreadCommentDatasource']={},_0x25b976[_0x1bc2fa(0x185)],_0x25b976['UniverProLicense'],_0x25b976[_0x1bc2fa(0x1dd)],_0x25b976[_0x1bc2fa(0x1bb)],_0x25b976[_0x1bc2fa(0x170)],_0x25b976[_0x1bc2fa(0x173)],_0x25b976['UniverNetwork']));}(this,function(_0x8dead2,_0x9f227b,_0x564bc7,_0x18f87e,_0x906cd9,_0xb382d7,_0x191812,_0x359eff){'use strict';const _0x49efe9=_0x12b1;const _0x469486=_0x49efe9(0x1cd);var _0x58c75c=(_0x33ea65=>(_0x33ea65[_0x33ea65[_0x49efe9(0x1e7)]=0x0]=_0x49efe9(0x1e7),_0x33ea65[_0x33ea65[_0x49efe9(0x1e5)]=0x1]=_0x49efe9(0x1e5),_0x33ea65[_0x33ea65[_0x49efe9(0x1da)]=-0x1]='UNRECOGNIZED',_0x33ea65))(_0x58c75c||{}),_0x5f2972=(_0x3fa19d=>(_0x3fa19d[_0x3fa19d[_0x49efe9(0x1a6)]=0x0]=_0x49efe9(0x1a6),_0x3fa19d[_0x3fa19d[_0x49efe9(0x1c2)]=0x1]='Add',_0x3fa19d[_0x3fa19d[_0x49efe9(0x1bd)]=0x2]=_0x49efe9(0x1bd),_0x3fa19d[_0x3fa19d['Edit']=0x3]=_0x49efe9(0x1b0),_0x3fa19d[_0x3fa19d[_0x49efe9(0x18b)]=0x4]=_0x49efe9(0x18b),_0x3fa19d[_0x3fa19d[_0x49efe9(0x1d8)]=0x5]=_0x49efe9(0x1d8),_0x3fa19d[_0x3fa19d[_0x49efe9(0x1da)]=-0x1]=_0x49efe9(0x1da),_0x3fa19d))(_0x5f2972||{});const _0x1ad1d3=_0x272119=>_0x18f87e[_0x49efe9(0x177)](new Date(+_0x272119))['format'](_0x49efe9(0x1c5)),_0x1c7d68=async(_0x13e70e,_0x620afa)=>{const _0x1f6d0b=_0x49efe9,_0xcdaab8=_0x13e70e['get'](_0x18f87e[_0x1f6d0b(0x198)]),_0x309856=_0x13e70e[_0x1f6d0b(0x1cf)](_0x359eff[_0x1f6d0b(0x1b5)]);_0x620afa['forEach'](_0x30f942=>{const _0x459393=_0x1f6d0b;_0xcdaab8[_0x459393(0x1dc)](_0x30f942)&&_0x620afa[_0x459393(0x1ef)](_0x30f942);}),_0x620afa[_0x1f6d0b(0x19a)]&&(await _0x309856[_0x1f6d0b(0x1cf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x620afa]}}))[_0x1f6d0b(0x1d6)]['users'][_0x1f6d0b(0x1bc)](_0x19e682=>{const _0x331f52=_0x1f6d0b;_0x19e682&&_0xcdaab8[_0x331f52(0x1d7)](_0x19e682);});};var _0x4fc42b=Object[_0x49efe9(0x17b)],_0x42b947=(_0x123267,_0x4d7bcd,_0x40143e,_0x4451b1)=>{for(var _0x1c6bfc=_0x4451b1>0x1?void 0x0:_0x4451b1?_0x4fc42b(_0x4d7bcd,_0x40143e):_0x4d7bcd,_0x2e0f8f=_0x123267['length']-0x1,_0x4b7019;_0x2e0f8f>=0x0;_0x2e0f8f--)(_0x4b7019=_0x123267[_0x2e0f8f])&&(_0x1c6bfc=_0x4b7019(_0x1c6bfc)||_0x1c6bfc);return _0x1c6bfc;},_0x9fc40a=(_0x588eb3,_0x49534d)=>(_0x391ce8,_0x2ac3ad)=>_0x49534d(_0x391ce8,_0x2ac3ad,_0x588eb3);let _0x256920=class extends _0x18f87e[_0x49efe9(0x1a3)]{constructor(_0x4fe119,_0x588759,_0x41209b,_0x3cd6af){const _0x39ad04=_0x49efe9;super(),this[_0x39ad04(0x19c)]=_0x4fe119,this[_0x39ad04(0x1ac)]=_0x588759,this[_0x39ad04(0x1e4)]=_0x41209b,this[_0x39ad04(0x1c3)]=_0x3cd6af,this[_0x39ad04(0x1a7)](),this[_0x39ad04(0x1ea)]();}[_0x49efe9(0x1ea)](){const _0x5c15fa=_0x49efe9;this[_0x5c15fa(0x176)](this['_threadCommentModel'][_0x5c15fa(0x1e0)]['pipe'](_0x191812['bufferTime'](0x10))[_0x5c15fa(0x1c7)](_0x2e0709=>{const _0x40777d=_0x5c15fa,_0x273938=new Set();_0x2e0709[_0x40777d(0x1bc)](_0x2dd9b0=>{const _0x29f39b=_0x40777d;switch(_0x2dd9b0[_0x29f39b(0x1ad)]){case _0x29f39b(0x1a9):{const _0x2554ef=_0x2dd9b0['payload'][_0x29f39b(0x1b6)];_0x273938[_0x29f39b(0x1a9)](_0x2554ef);break;}}}),_0x1c7d68(this[_0x40777d(0x1c3)],_0x273938);}));}[_0x49efe9(0x1a7)](){const _0x13e5d9=_0x49efe9;this[_0x13e5d9(0x176)](this[_0x13e5d9(0x19c)][_0x13e5d9(0x1e0)][_0x13e5d9(0x1c7)](async _0x1e1b50=>{const _0x40f287=_0x13e5d9;var _0x461209,_0x120adc,_0x19e9a3,_0x2440d6;const _0x1ef3c9=(_0x461209=this[_0x40f287(0x1ac)]['getUnit'](_0x1e1b50[_0x40f287(0x192)])['find'](_0x49ed39=>_0x49ed39[_0x40f287(0x1ca)]===_0x1e1b50['threadId']))==null?void 0x0:_0x461209[_0x40f287(0x18c)];if(!_0x1ef3c9)return;const {unitId:_0x1344a5,subUnitId:_0x23be48}=_0x1ef3c9;switch(_0x1e1b50[_0x40f287(0x1bf)]&&this[_0x40f287(0x1e4)][_0x40f287(0x1d7)](_0x1e1b50[_0x40f287(0x1bf)]),_0x1e1b50['type']){case _0x5f2972['Add']:break;case _0x5f2972['Reply']:{this[_0x40f287(0x1ac)][_0x40f287(0x199)](_0x1344a5,_0x23be48,{'unitId':_0x1344a5,'subUnitId':_0x23be48,'ref':'','id':_0x1e1b50[_0x40f287(0x183)],'dT':_0x1ad1d3(+_0x1e1b50['createTimestamp']),'threadId':_0x1e1b50[_0x40f287(0x1ca)],'personId':(_0x19e9a3=(_0x120adc=_0x1e1b50['user'])==null?void 0x0:_0x120adc[_0x40f287(0x172)])!=null?_0x19e9a3:_0x1e1b50['userId'],'text':JSON['parse'](_0x1e1b50[_0x40f287(0x1d0)]),'parentId':_0x1ef3c9['id']});break;}case _0x5f2972['Delete']:{const _0xef30f8=this['_threadCommentModel']['getComment'](_0x1344a5,_0x23be48,_0x1e1b50[_0x40f287(0x183)]);_0xef30f8&&_0xef30f8['parentId']&&this[_0x40f287(0x1ac)][_0x40f287(0x1c0)](_0x1344a5,_0x23be48,_0x1e1b50[_0x40f287(0x183)]);break;}case _0x5f2972[_0x40f287(0x1b0)]:{this['_threadCommentModel'][_0x40f287(0x18f)](_0x1344a5,_0x23be48,{'commentId':_0x1e1b50[_0x40f287(0x183)],'text':JSON[_0x40f287(0x18a)](_0x1e1b50[_0x40f287(0x1d0)])});break;}case _0x5f2972[_0x40f287(0x1d8)]:{const _0x683bc2=(_0x2440d6=this[_0x40f287(0x1ac)][_0x40f287(0x1d9)](_0x1e1b50['unitId'])[_0x40f287(0x1b9)](_0x1fe6b3=>_0x1fe6b3[_0x40f287(0x1ca)]===_0x1e1b50[_0x40f287(0x1ca)]))==null?void 0x0:_0x2440d6[_0x40f287(0x18c)];_0x683bc2&&this['_threadCommentModel']['resolveComment'](_0x1344a5,_0x23be48,_0x683bc2['id'],_0x1e1b50[_0x40f287(0x178)]===_0x58c75c[_0x40f287(0x1e5)]);break;}}}));}};_0x256920=_0x42b947([_0x9fc40a(0x0,_0x18f87e[_0x49efe9(0x18e)](_0x9f227b[_0x49efe9(0x1e1)])),_0x9fc40a(0x1,_0x18f87e[_0x49efe9(0x18e)](_0xb382d7[_0x49efe9(0x180)])),_0x9fc40a(0x2,_0x18f87e[_0x49efe9(0x18e)](_0x18f87e[_0x49efe9(0x198)])),_0x9fc40a(0x3,_0x18f87e[_0x49efe9(0x18e)](_0x18f87e[_0x49efe9(0x1c6)]))],_0x256920);const _0x17de5b=_0x49efe9(0x1cb),_0xa7af7e={};var _0x2aa72c=Object['getOwnPropertyDescriptor'],_0x24db42=(_0x32efc2,_0x203419,_0xc3acdb,_0x3f5870)=>{const _0x410825=_0x49efe9;for(var _0x4e50e2=_0x3f5870>0x1?void 0x0:_0x3f5870?_0x2aa72c(_0x203419,_0xc3acdb):_0x203419,_0x1fa9a4=_0x32efc2[_0x410825(0x17c)]-0x1,_0x1ce00e;_0x1fa9a4>=0x0;_0x1fa9a4--)(_0x1ce00e=_0x32efc2[_0x1fa9a4])&&(_0x4e50e2=_0x1ce00e(_0x4e50e2)||_0x4e50e2);return _0x4e50e2;},_0xb24e0e=(_0x56870c,_0x4b8979)=>(_0x3ce6a1,_0x51816f)=>_0x4b8979(_0x3ce6a1,_0x51816f,_0x56870c);function _0x33e71a(_0x5401b8,_0x519cd2){const _0x478917=_0x49efe9,_0x3f2846=_0x5401b8['replies'][0x0];return{..._0x519cd2,'id':_0x3f2846[_0x478917(0x183)],'resolved':_0x5401b8[_0x478917(0x178)]===0x1,'dT':_0x1ad1d3(_0x3f2846[_0x478917(0x16e)]),'personId':_0x3f2846[_0x478917(0x181)],'threadId':_0x3f2846['threadId']};}function _0x36461d(_0x208512,_0xdea6f4,_0x6c70d3){const _0x7cac23=_0x49efe9;var _0x26e2ca,_0x25c66c;if(((_0x25c66c=(_0x26e2ca=_0x208512==null?void 0x0:_0x208512[_0x7cac23(0x1d4)])==null?void 0x0:_0x26e2ca[_0x7cac23(0x17c)])!=null?_0x25c66c:0x0)>0x0){const _0x5553f6=(_0x161512,_0x1b71ed)=>({'id':_0x161512['replyId'],'threadId':_0x161512[_0x7cac23(0x1ca)],'dT':_0x1ad1d3(_0x161512[_0x7cac23(0x16e)]),'personId':_0x161512[_0x7cac23(0x181)],'resolved':_0x208512[_0x7cac23(0x178)]===_0x58c75c[_0x7cac23(0x1e5)],'unitId':_0xdea6f4,'subUnitId':_0x6c70d3,'text':JSON['parse'](_0x161512['content']),'parentId':_0x1b71ed}),_0x2db493=_0x5553f6(_0x208512['replies'][0x0]);return{..._0x2db493,'children':_0x208512[_0x7cac23(0x1d4)][_0x7cac23(0x1df)](0x1)[_0x7cac23(0x1aa)](_0x388593=>_0x5553f6(_0x388593,_0x2db493['id']))};}return null;}let _0x29d1e7=class{constructor(_0x178459,_0x5c2aeb,_0x10d456,_0x3dcd38){const _0x24a811=_0x49efe9;this[_0x24a811(0x16d)]=_0x178459,this[_0x24a811(0x1e4)]=_0x5c2aeb,this[_0x24a811(0x187)]=_0x10d456,this[_0x24a811(0x1c3)]=_0x3dcd38;}async['addComment'](_0x5addb3){const _0xf48e8c=_0x49efe9;var _0x12068b,_0x4a34b8;const {parentId:_0x92910e,unitId:_0x40a6d5,text:_0x670a24,threadId:_0x49ef44}=_0x5addb3,_0xc537dd=(_0x4a34b8=(_0x12068b=_0x670a24[_0xf48e8c(0x17a)])==null?void 0x0:_0x12068b['filter'](_0x4283cc=>_0x4283cc[_0xf48e8c(0x1ce)]===_0x18f87e[_0xf48e8c(0x184)]['COMMENT'])[_0xf48e8c(0x1aa)](_0x984f23=>_0x984f23[_0xf48e8c(0x1a8)]))!=null?_0x4a34b8:[],_0x1b0b36=JSON[_0xf48e8c(0x16b)](_0x670a24),_0x463487=(await this[_0xf48e8c(0x187)][_0xf48e8c(0x19b)](_0x40a6d5))[_0xf48e8c(0x1d1)]();if(_0x92910e){const _0x4f0beb={'memberId':_0x463487,'unitId':_0x40a6d5,'content':_0x1b0b36,'mention':_0xc537dd,'threadId':_0x49ef44},_0x2cf1dd=(await this['_httpService'][_0xf48e8c(0x1be)](_0xf48e8c(0x1b7)+_0x40a6d5+_0xf48e8c(0x16c),{'body':_0x4f0beb}))[_0xf48e8c(0x1d6)]['reply'];return{..._0x5addb3,'id':_0x2cf1dd[_0xf48e8c(0x183)],'dT':_0x18f87e[_0xf48e8c(0x177)](+_0x2cf1dd[_0xf48e8c(0x16e)])[_0xf48e8c(0x193)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2cf1dd[_0xf48e8c(0x181)]};}else{const _0x61cb78={'memberId':_0x463487,'unitId':_0x40a6d5,'content':_0x1b0b36,'mention':_0xc537dd},_0x5969c0=await this[_0xf48e8c(0x16d)][_0xf48e8c(0x1be)](_0xf48e8c(0x1b7)+_0x40a6d5+_0xf48e8c(0x1e6),{'body':_0x61cb78});return _0x33e71a(_0x5969c0[_0xf48e8c(0x1d6)][_0xf48e8c(0x19d)],_0x5addb3);}}async[_0x49efe9(0x18f)](_0x223c04){const _0xc0484b=_0x49efe9;var _0x61e903,_0x189fa2;const {text:_0x567841,unitId:_0x585a1f}=_0x223c04,_0x3d5aae=(_0x189fa2=(_0x61e903=_0x567841['customRanges'])==null?void 0x0:_0x61e903['filter'](_0x55639a=>_0x55639a[_0xc0484b(0x1ce)]===_0x18f87e[_0xc0484b(0x184)]['COMMENT'])[_0xc0484b(0x1aa)](_0x346f7d=>_0x346f7d['rangeId']))!=null?_0x189fa2:[],_0x2fe534=JSON[_0xc0484b(0x16b)](_0x567841),_0x4362dc=_0x223c04[_0xc0484b(0x1ca)],_0x3798ff=_0x223c04['id'],_0x508d60={'memberId':(await this[_0xc0484b(0x187)][_0xc0484b(0x19b)](_0x585a1f))[_0xc0484b(0x1d1)](),'unitId':_0x585a1f,'threadId':_0x4362dc,'mention':_0x3d5aae,'content':_0x2fe534,'replyId':_0x3798ff},_0x2dd023=await this[_0xc0484b(0x16d)][_0xc0484b(0x1be)](_0xc0484b(0x1b7)+_0x585a1f+_0xc0484b(0x174),{'body':_0x508d60});return!_0x2dd023[_0xc0484b(0x1d6)][_0xc0484b(0x1a5)]||_0x2dd023['body'][_0xc0484b(0x1a5)][_0xc0484b(0x1c9)]===0x1;}async[_0x49efe9(0x175)](_0x116a8c){const _0x1c8676=_0x49efe9,{unitId:_0x1f709b}=_0x116a8c,_0x125a18=_0x116a8c[_0x1c8676(0x1ca)],_0x77afda={'memberId':this[_0x1c8676(0x1e4)][_0x1c8676(0x1de)]()[_0x1c8676(0x172)],'unitId':_0x1f709b,'threadId':_0x125a18,'solved':_0x116a8c['resolved']?_0x58c75c[_0x1c8676(0x1e5)]:_0x58c75c[_0x1c8676(0x1e7)]},_0x3845c1=await this[_0x1c8676(0x16d)][_0x1c8676(0x1be)](_0x1c8676(0x1b7)+_0x1f709b+_0x1c8676(0x1eb),{'body':_0x77afda});return!_0x3845c1[_0x1c8676(0x1d6)][_0x1c8676(0x1a5)]||_0x3845c1[_0x1c8676(0x1d6)][_0x1c8676(0x1a5)][_0x1c8676(0x1c9)]===0x1;}async['deleteComment'](_0x3c28c0,_0xa94fea,_0x5cba35,_0x4ec51c){const _0x10dd49=_0x49efe9,_0x1a2340={'memberId':(await this['_sessionService'][_0x10dd49(0x19b)](_0x3c28c0))['getMemberID'](),'threadId':_0x5cba35,'replyId':_0x4ec51c,'unitId':_0x3c28c0},_0x3dad32=await this[_0x10dd49(0x16d)][_0x10dd49(0x1be)](_0x10dd49(0x1b7)+_0x3c28c0+_0x10dd49(0x1b4),{'body':_0x1a2340});return!_0x3dad32[_0x10dd49(0x1d6)][_0x10dd49(0x1a5)]||_0x3dad32['body'][_0x10dd49(0x1a5)][_0x10dd49(0x1c9)]===0x1;}async[_0x49efe9(0x17d)](_0x1180c6,_0x5886c1,_0x571570){const _0x4de103=_0x49efe9,_0x5b0d5a={'unitId':_0x1180c6,'threadId':_0x571570},_0x1943be=await this[_0x4de103(0x16d)][_0x4de103(0x1be)](_0x4de103(0x1b7)+_0x1180c6+'/list',{'body':_0x5b0d5a}),_0xaa7678=_0x571570['map'](_0x3ea8e0=>_0x36461d(_0x1943be['body'][_0x4de103(0x19e)][_0x3ea8e0],_0x1180c6,_0x5886c1))[_0x4de103(0x17e)](Boolean);return Object[_0x4de103(0x1b3)](_0x1943be[_0x4de103(0x1d6)][_0x4de103(0x1d5)])[_0x4de103(0x1bc)](_0x1078d5=>{const _0x31df98=_0x4de103;this[_0x31df98(0x1e4)][_0x31df98(0x1d7)](_0x1078d5);}),_0xaa7678;}['saveCommentToSnapshot'](_0x292e60){const _0x354009=_0x49efe9;return{'id':_0x292e60['id'],'threadId':_0x292e60['threadId'],'ref':_0x292e60[_0x354009(0x1c8)]};}};_0x29d1e7=_0x24db42([_0xb24e0e(0x0,_0x18f87e[_0x49efe9(0x18e)](_0x359eff['HTTPService'])),_0xb24e0e(0x1,_0x18f87e[_0x49efe9(0x18e)](_0x18f87e[_0x49efe9(0x198)])),_0xb24e0e(0x2,_0x18f87e[_0x49efe9(0x18e)](_0x9f227b['CollaborationSessionService'])),_0xb24e0e(0x3,_0x18f87e[_0x49efe9(0x18e)](_0x18f87e[_0x49efe9(0x1c6)]))],_0x29d1e7);var _0x3d834a=Object[_0x49efe9(0x17b)],_0x247c3d=(_0x53b058,_0x30889d,_0x22e031,_0x51bc92)=>{for(var _0x1fa26b=_0x51bc92>0x1?void 0x0:_0x51bc92?_0x3d834a(_0x30889d,_0x22e031):_0x30889d,_0x279c3d=_0x53b058['length']-0x1,_0x455194;_0x279c3d>=0x0;_0x279c3d--)(_0x455194=_0x53b058[_0x279c3d])&&(_0x1fa26b=_0x455194(_0x1fa26b)||_0x1fa26b);return _0x1fa26b;},_0x43b705=(_0x523812,_0x26cd3d)=>(_0xb7b124,_0x165b35)=>_0x26cd3d(_0xb7b124,_0x165b35,_0x523812);let _0x183656=class extends _0x18f87e['Disposable']{constructor(_0x2a1f16,_0xf0d767){const _0x29e3a1=_0x49efe9;super(),this['_threadCommentDataSourceService']=_0x2a1f16,this['_threadCommentDataSource']=_0xf0d767,this[_0x29e3a1(0x1af)]();}[_0x49efe9(0x1af)](){const _0x11c523=_0x49efe9;this[_0x11c523(0x1ec)]['dataSource']=this[_0x11c523(0x19f)],this[_0x11c523(0x1ec)][_0x11c523(0x188)]=!0x1;}};_0x183656=_0x247c3d([_0x43b705(0x0,_0xb382d7[_0x49efe9(0x1ba)]),_0x43b705(0x1,_0x18f87e['Inject'](_0x29d1e7))],_0x183656);var _0x56a20f=Object[_0x49efe9(0x1a0)],_0x11d459=Object[_0x49efe9(0x17b)],_0x159f69=(_0x175edf,_0x10cb62,_0x4cc41)=>_0x10cb62 in _0x175edf?_0x56a20f(_0x175edf,_0x10cb62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4cc41}):_0x175edf[_0x10cb62]=_0x4cc41,_0x15a1d8=(_0x1f615e,_0x222f50,_0x5c99ce,_0xf6e123)=>{const _0x4f0c89=_0x49efe9;for(var _0x4370a9=_0xf6e123>0x1?void 0x0:_0xf6e123?_0x11d459(_0x222f50,_0x5c99ce):_0x222f50,_0x5605f0=_0x1f615e[_0x4f0c89(0x17c)]-0x1,_0x537e6d;_0x5605f0>=0x0;_0x5605f0--)(_0x537e6d=_0x1f615e[_0x5605f0])&&(_0x4370a9=_0x537e6d(_0x4370a9)||_0x4370a9);return _0x4370a9;},_0x26e11f=(_0x50a643,_0x47ee79)=>(_0x25dd72,_0x261d71)=>_0x47ee79(_0x25dd72,_0x261d71,_0x50a643),_0x25cb6d=(_0x4c5e5b,_0xb84660,_0xf9e9f)=>_0x159f69(_0x4c5e5b,typeof _0xb84660!=_0x49efe9(0x189)?_0xb84660+'':_0xb84660,_0xf9e9f);_0x8dead2['UniverThreadCommentDataSourcePlugin']=class extends _0x18f87e[_0x49efe9(0x1db)]{constructor(_0x30f4b5=_0xa7af7e,_0x15d4dc,_0x3d676c){const _0x3f520c=_0x49efe9;super(),this[_0x3f520c(0x1c4)]=_0x30f4b5,this[_0x3f520c(0x1c3)]=_0x15d4dc,this['_configService']=_0x3d676c;const {..._0x52151a}=_0x18f87e[_0x3f520c(0x1ae)]({},_0xa7af7e,this['_config']);this['_configService']['setConfig'](_0x17de5b,_0x52151a);}['onStarting'](){[[_0x29d1e7],[_0x183656],[_0x256920]]['forEach'](_0x5e886b=>{const _0x43624b=_0x12b1;this[_0x43624b(0x1c3)][_0x43624b(0x1a9)](_0x5e886b);});}[_0x49efe9(0x1b8)](){const _0x1ab560=_0x49efe9;this[_0x1ab560(0x1c3)][_0x1ab560(0x1cf)](_0x183656),this[_0x1ab560(0x1c3)][_0x1ab560(0x1cf)](_0x256920);}},_0x25cb6d(_0x8dead2[_0x49efe9(0x196)],_0x49efe9(0x1d3),_0x469486),_0x25cb6d(_0x8dead2['UniverThreadCommentDataSourcePlugin'],'type',_0x18f87e['UniverInstanceType'][_0x49efe9(0x1b1)]),_0x8dead2[_0x49efe9(0x196)]=_0x15a1d8([_0x18f87e[_0x49efe9(0x1d2)](_0x906cd9['UniverThreadCommentUIPlugin'],_0x9f227b[_0x49efe9(0x18d)],_0x564bc7[_0x49efe9(0x1a2)]),_0x26e11f(0x1,_0x18f87e['Inject'](_0x18f87e[_0x49efe9(0x1c6)])),_0x26e11f(0x2,_0x18f87e[_0x49efe9(0x1ed)])],_0x8dead2['UniverThreadCommentDataSourcePlugin']),Object[_0x49efe9(0x1a0)](_0x8dead2,Symbol['toStringTag'],{'value':_0x49efe9(0x1e2)});}));function _0x12b1(_0x47e1e2,_0x4150da){const _0x2297d7=_0x2297();return _0x12b1=function(_0x12b1e4,_0x5670af){_0x12b1e4=_0x12b1e4-0x16b;let _0x40bf5b=_0x2297d7[_0x12b1e4];return _0x40bf5b;},_0x12b1(_0x47e1e2,_0x4150da);}function _0x2297(){const _0x521650=['rangeType','get','content','getMemberID','DependentOn','pluginName','replies','users','body','addUser','Solve','getUnit','UNRECOGNIZED','Plugin','getUser','UniverCore','getCurrentUser','slice','commentUpdate$','CommentService','Module','1510yukKBO','_userService','Solved','/add','OpenOrReOpen','2675166FdHtCk','48wSJuuT','_initUserSync','/solved','_threadCommentDataSourceService','IConfigService','@univerjs/core','delete','stringify','/reply','_httpService','createTimestamp','82753UluYga','UniverThreadComment','309954apkuOb','userID','rxjs','/edit','resolveComment','disposeWithMe','dayjs','solved','48qbIQiT','customRanges','getOwnPropertyDescriptor','length','listComments','filter','4361874ztirRe','ThreadCommentModel','userId','238vETnMJ','replyId','CustomRangeType','UniverProCollaborationClient','@univerjs/network','_sessionService','syncUpdateMutationToColla','symbol','parse','Delete','root','UniverCollaborationClientPlugin','Inject','updateComment','exports','@univerjs/thread-comment-ui','unitId','format','@univerjs/thread-comment','object','UniverThreadCommentDataSourcePlugin','165kDWCxt','UserManagerService','addComment','size','requireSession','_commentService','comment','comments','_threadCommentDataSource','defineProperty','8852CbLoAU','UniverLicensePlugin','Disposable','9220799NRfWrb','error','Unknown','_init','rangeId','add','map','4cVgSzd','_threadCommentModel','type','merge','_initDataSource','Edit','UNIVER_UNKNOWN','amd','values','/delete','HTTPService','personId','/universer-api/comment/unit/','onReady','find','IThreadCommentDataSourceService','UniverThreadCommentUi','forEach','Reply','post','user','deleteComment','2658519YatmQZ','Add','_injector','_config','YYYY/MM/DD\x20HH:mm','Injector','subscribe','ref','code','threadId','thread-comment-data-source.config','@univerjs-pro/license','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x2297=function(){return _0x521650;};return _0x2297();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202506111607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs/core": "0.8.0-nightly.202506111607",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202506111607",
|
|
50
|
+
"@univerjs/network": "0.8.0-nightly.202506111607",
|
|
51
|
+
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506111607",
|
|
53
|
+
"@univerjs-pro/license": "0.8.0-nightly.202506111607",
|
|
54
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202506111607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|