@univerjs-pro/thread-comment-datasource 0.15.2-insiders.20260124-12fc7f0 → 0.15.3-insiders.20260131-b9b8805
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 +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x347130=_0x4f64;(function(_0x52acd4,_0x5c800c){const _0xa03dd=_0x4f64,_0x1d3953=_0x52acd4();while(!![]){try{const _0x3df49e=-parseInt(_0xa03dd(0x13e))/0x1+-parseInt(_0xa03dd(0x138))/0x2+parseInt(_0xa03dd(0x132))/0x3+parseInt(_0xa03dd(0x11c))/0x4*(-parseInt(_0xa03dd(0x103))/0x5)+-parseInt(_0xa03dd(0x112))/0x6*(parseInt(_0xa03dd(0x10a))/0x7)+-parseInt(_0xa03dd(0x130))/0x8+-parseInt(_0xa03dd(0x105))/0x9*(-parseInt(_0xa03dd(0x142))/0xa);if(_0x3df49e===_0x5c800c)break;else _0x1d3953['push'](_0x1d3953['shift']());}catch(_0x1aed91){_0x1d3953['push'](_0x1d3953['shift']());}}}(_0x1d56,0x42756));function _0x1d56(){const _0x492ae7=['/universer-api/user/list','_configService','50044bRmldF','updateComment','root','getUser','Edit','resolved','requireSession','_sessionService','users','UserManagerService','symbol','UniverCollaborationClientPlugin','HTTPService','user','Solve','parentId','Reply','_init','filter','find','1898856vHkqpK','YYYY/MM/DD\x20HH:mm','1245240tjQRIu','format','ref','/edit','thread-comment-data-source.config','_httpService','971512dJXNUp','dayjs','toStringTag','forEach','size','solved','156197SvAdfc','add','OpenOrReOpen','getCurrentUser','10gpHGHT','CommentService','pipe','getMemberID','onReady','saveCommentToSnapshot','unitId','rangeId','userId','commentUpdate$','body','DependentOn','Solved','UniverThreadCommentDataSourcePlugin','delete','replyId','post','UNIVER_UNKNOWN','Add','stringify','UniverLicensePlugin','error','parse','UNRECOGNIZED','threadId','length','UniverInstanceType','CustomRangeType','get','/delete','content','getUnit','customRanges','deleteComment','addUser','type','getOwnPropertyDescriptor','/reply','Delete','map','setConfig','disposeWithMe','Disposable','Injector','_userService','_initDataSource','replies','subscribe','values','115TWZwMQ','/universer-api/comment/unit/','9238689xVwSnl','code','_injector','addComment','IThreadCommentDataSourceService','581YLKIQi','_threadCommentModel','_threadCommentDataSourceService','slice','Unknown','getComment','COMMENT','payload','168cAQsIG','_threadCommentDataSource','UniverThreadCommentUIPlugin','defineProperty','createTimestamp','_initUserSync','Inject','resolveComment'];_0x1d56=function(){return _0x492ae7;};return _0x1d56();}Object['defineProperty'](exports,Symbol[_0x347130(0x13a)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a49fc=>(_0x3a49fc[_0x3a49fc[_0x347130(0x140)]=0x0]='OpenOrReOpen',_0x3a49fc[_0x3a49fc['Solved']=0x1]=_0x347130(0x14e),_0x3a49fc[_0x3a49fc[_0x347130(0x159)]=-0x1]='UNRECOGNIZED',_0x3a49fc))(I||{}),v=(_0x391a3a=>(_0x391a3a[_0x391a3a['Unknown']=0x0]=_0x347130(0x10e),_0x391a3a[_0x391a3a[_0x347130(0x154)]=0x1]=_0x347130(0x154),_0x391a3a[_0x391a3a[_0x347130(0x12c)]=0x2]=_0x347130(0x12c),_0x391a3a[_0x391a3a[_0x347130(0x120)]=0x3]=_0x347130(0x120),_0x391a3a[_0x391a3a[_0x347130(0x168)]=0x4]=_0x347130(0x168),_0x391a3a[_0x391a3a[_0x347130(0x12a)]=0x5]='Solve',_0x391a3a[_0x391a3a['UNRECOGNIZED']=-0x1]=_0x347130(0x159),_0x391a3a))(v||{});const f=_0x54989f=>c[_0x347130(0x139)](new Date(+_0x54989f))[_0x347130(0x133)](_0x347130(0x131)),R=async(_0xae9b59,_0x41f7d6)=>{const _0x37f8fa=_0x347130,_0x6e29bd=_0xae9b59['get'](c[_0x37f8fa(0x125)]),_0x93d04c=_0xae9b59[_0x37f8fa(0x15e)](P[_0x37f8fa(0x128)]);_0x41f7d6[_0x37f8fa(0x13b)](_0x4966f3=>{const _0x34fb7b=_0x37f8fa;_0x6e29bd[_0x34fb7b(0x11f)](_0x4966f3)&&_0x41f7d6[_0x34fb7b(0x150)](_0x4966f3);}),_0x41f7d6[_0x37f8fa(0x13c)]&&(await _0x93d04c[_0x37f8fa(0x15e)](_0x37f8fa(0x11a),{'params':{'userIDs':[..._0x41f7d6]}}))[_0x37f8fa(0x14c)][_0x37f8fa(0x124)][_0x37f8fa(0x13b)](_0x3cdbc0=>{const _0x2b2159=_0x37f8fa;_0x3cdbc0&&_0x6e29bd[_0x2b2159(0x164)](_0x3cdbc0);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5be219,_0x2a43e6,_0x207d97,_0x5927d7)=>{const _0x273c22=_0x347130;for(var _0x16473a=_0x5927d7>0x1?void 0x0:_0x5927d7?$(_0x2a43e6,_0x207d97):_0x2a43e6,_0x142c58=_0x5be219[_0x273c22(0x15b)]-0x1,_0x85e943;_0x142c58>=0x0;_0x142c58--)(_0x85e943=_0x5be219[_0x142c58])&&(_0x16473a=_0x85e943(_0x16473a)||_0x16473a);return _0x16473a;},S=(_0x4ff6ee,_0x1cd745)=>(_0x18e5e9,_0x2bb1d1)=>_0x1cd745(_0x18e5e9,_0x2bb1d1,_0x4ff6ee);let _=class extends c[_0x347130(0xfc)]{constructor(_0x2a690f,_0x26aee8,_0x3dcb5e,_0x7bbfda){const _0x533ade=_0x347130;super(),this['_commentService']=_0x2a690f,this[_0x533ade(0x10b)]=_0x26aee8,this[_0x533ade(0xfe)]=_0x3dcb5e,this[_0x533ade(0x107)]=_0x7bbfda,this[_0x533ade(0x12d)](),this['_initUserSync']();}[_0x347130(0x117)](){const _0x22eb92=_0x347130;this[_0x22eb92(0xfb)](this[_0x22eb92(0x10b)]['commentUpdate$'][_0x22eb92(0x144)](j['bufferTime'](0x10))[_0x22eb92(0x101)](_0x12de10=>{const _0x3b4012=_0x22eb92,_0x403fa8=new Set();_0x12de10['forEach'](_0x5a1b70=>{const _0x58e081=_0x4f64;if(_0x5a1b70[_0x58e081(0x165)]===_0x58e081(0x13f)){const _0x204d69=_0x5a1b70[_0x58e081(0x111)]['personId'];_0x403fa8[_0x58e081(0x13f)](_0x204d69);}}),R(this[_0x3b4012(0x107)],_0x403fa8);}));}[_0x347130(0x12d)](){const _0x5bc4d1=_0x347130;this[_0x5bc4d1(0xfb)](this['_commentService'][_0x5bc4d1(0x14b)][_0x5bc4d1(0x101)](async _0x26a95e=>{const _0x4e0aa6=_0x5bc4d1;var _0xcf8bc9,_0x936a1b,_0x85bff7,_0xe99c0b;const _0x2552df=(_0xcf8bc9=this[_0x4e0aa6(0x10b)]['getUnit'](_0x26a95e['unitId'])[_0x4e0aa6(0x12f)](_0x4a27dd=>_0x4a27dd['threadId']===_0x26a95e['threadId']))==null?void 0x0:_0xcf8bc9[_0x4e0aa6(0x11e)];if(!_0x2552df)return;const {unitId:_0xfdcc75,subUnitId:_0x533acd}=_0x2552df;switch(_0x26a95e[_0x4e0aa6(0x129)]&&this[_0x4e0aa6(0xfe)]['addUser'](_0x26a95e[_0x4e0aa6(0x129)]),_0x26a95e[_0x4e0aa6(0x165)]){case v['Add']:break;case v[_0x4e0aa6(0x12c)]:{this['_threadCommentModel'][_0x4e0aa6(0x108)](_0xfdcc75,_0x533acd,{'unitId':_0xfdcc75,'subUnitId':_0x533acd,'ref':'','id':_0x26a95e[_0x4e0aa6(0x151)],'dT':f(+_0x26a95e[_0x4e0aa6(0x116)]),'threadId':_0x26a95e[_0x4e0aa6(0x15a)],'personId':(_0x85bff7=(_0x936a1b=_0x26a95e[_0x4e0aa6(0x129)])==null?void 0x0:_0x936a1b['userID'])!=null?_0x85bff7:_0x26a95e[_0x4e0aa6(0x14a)],'text':JSON[_0x4e0aa6(0x158)](_0x26a95e[_0x4e0aa6(0x160)]),'parentId':_0x2552df['id']});break;}case v[_0x4e0aa6(0x168)]:{const _0x39a4fc=this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x10f)](_0xfdcc75,_0x533acd,_0x26a95e[_0x4e0aa6(0x151)]);_0x39a4fc&&_0x39a4fc[_0x4e0aa6(0x12b)]&&this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x163)](_0xfdcc75,_0x533acd,_0x26a95e[_0x4e0aa6(0x151)]);break;}case v['Edit']:{this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x11d)](_0xfdcc75,_0x533acd,{'commentId':_0x26a95e[_0x4e0aa6(0x151)],'text':JSON[_0x4e0aa6(0x158)](_0x26a95e[_0x4e0aa6(0x160)])});break;}case v['Solve']:{const _0x22aff2=(_0xe99c0b=this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x161)](_0x26a95e[_0x4e0aa6(0x148)])[_0x4e0aa6(0x12f)](_0x4e858d=>_0x4e858d[_0x4e0aa6(0x15a)]===_0x26a95e['threadId']))==null?void 0x0:_0xe99c0b[_0x4e0aa6(0x11e)];_0x22aff2&&this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x119)](_0xfdcc75,_0x533acd,_0x22aff2['id'],_0x26a95e[_0x4e0aa6(0x13d)]===I[_0x4e0aa6(0x14e)]);break;}}}));}};_=E([S(0x0,c[_0x347130(0x118)](b[_0x347130(0x143)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x347130(0x118)](c[_0x347130(0x125)])),S(0x3,c[_0x347130(0x118)](c[_0x347130(0xfd)]))],_);const q=_0x347130(0x136),D={};var A=Object[_0x347130(0x166)],x=(_0xd75edd,_0xd9f53d,_0x42f41d,_0x2c4db7)=>{for(var _0x57b173=_0x2c4db7>0x1?void 0x0:_0x2c4db7?A(_0xd9f53d,_0x42f41d):_0xd9f53d,_0x559c7b=_0xd75edd['length']-0x1,_0x2215e3;_0x559c7b>=0x0;_0x559c7b--)(_0x2215e3=_0xd75edd[_0x559c7b])&&(_0x57b173=_0x2215e3(_0x57b173)||_0x57b173);return _0x57b173;},C=(_0x2621f5,_0x3822c5)=>(_0x42e15c,_0x4343ba)=>_0x3822c5(_0x42e15c,_0x4343ba,_0x2621f5);function Y(_0x115c41,_0x136d02){const _0x5bd4a5=_0x347130,_0x4be33d=_0x115c41[_0x5bd4a5(0x100)][0x0];return{..._0x136d02,'id':_0x4be33d[_0x5bd4a5(0x151)],'resolved':_0x115c41[_0x5bd4a5(0x13d)]===0x1,'dT':f(_0x4be33d[_0x5bd4a5(0x116)]),'personId':_0x4be33d[_0x5bd4a5(0x14a)],'threadId':_0x4be33d[_0x5bd4a5(0x15a)]};}function G(_0x2541df,_0x490f27,_0x329a76){const _0x5d50a2=_0x347130;var _0x2cf2f1,_0x2b77f0;if(((_0x2b77f0=(_0x2cf2f1=_0x2541df==null?void 0x0:_0x2541df['replies'])==null?void 0x0:_0x2cf2f1[_0x5d50a2(0x15b)])!=null?_0x2b77f0:0x0)>0x0){const _0x38ffd5=(_0x43e1e1,_0x381aee)=>({'id':_0x43e1e1[_0x5d50a2(0x151)],'threadId':_0x43e1e1[_0x5d50a2(0x15a)],'dT':f(_0x43e1e1[_0x5d50a2(0x116)]),'personId':_0x43e1e1[_0x5d50a2(0x14a)],'resolved':_0x2541df[_0x5d50a2(0x13d)]===I[_0x5d50a2(0x14e)],'unitId':_0x490f27,'subUnitId':_0x329a76,'text':JSON[_0x5d50a2(0x158)](_0x43e1e1[_0x5d50a2(0x160)]),'parentId':_0x381aee}),_0x36161e=_0x38ffd5(_0x2541df[_0x5d50a2(0x100)][0x0]);return{..._0x36161e,'children':_0x2541df[_0x5d50a2(0x100)][_0x5d50a2(0x10d)](0x1)[_0x5d50a2(0x169)](_0x5743c3=>_0x38ffd5(_0x5743c3,_0x36161e['id']))};}return null;}let p=class{constructor(_0x10dc9a,_0x2fbd84,_0x2d4a1e){const _0x4d6a1b=_0x347130;this[_0x4d6a1b(0x137)]=_0x10dc9a,this[_0x4d6a1b(0xfe)]=_0x2fbd84,this[_0x4d6a1b(0x123)]=_0x2d4a1e;}async[_0x347130(0x108)](_0x26071c){const _0x7185a9=_0x347130;var _0x13a5ca,_0x172152;const {parentId:_0x38605f,unitId:_0x40c384,text:_0x460e05,threadId:_0x59eda2}=_0x26071c,_0x553384=(_0x172152=(_0x13a5ca=_0x460e05[_0x7185a9(0x162)])==null?void 0x0:_0x13a5ca[_0x7185a9(0x12e)](_0x4d3e8d=>_0x4d3e8d['rangeType']===c[_0x7185a9(0x15d)][_0x7185a9(0x110)])['map'](_0x1f0153=>_0x1f0153['rangeId']))!=null?_0x172152:[],_0x44e5ec=JSON[_0x7185a9(0x155)](_0x460e05),_0x5df3d3=(await this[_0x7185a9(0x123)][_0x7185a9(0x122)](_0x40c384))[_0x7185a9(0x145)]();if(_0x38605f){const _0x27ceb8={'memberId':_0x5df3d3,'unitId':_0x40c384,'content':_0x44e5ec,'mention':_0x553384,'threadId':_0x59eda2},_0x159c67=(await this['_httpService'][_0x7185a9(0x152)](_0x7185a9(0x104)+_0x40c384+_0x7185a9(0x167),{'body':_0x27ceb8}))[_0x7185a9(0x14c)]['reply'];return{..._0x26071c,'id':_0x159c67[_0x7185a9(0x151)],'dT':c[_0x7185a9(0x139)](+_0x159c67[_0x7185a9(0x116)])['format'](_0x7185a9(0x131)),'personId':_0x159c67[_0x7185a9(0x14a)]};}else{const _0x16cddb={'memberId':_0x5df3d3,'unitId':_0x40c384,'content':_0x44e5ec,'mention':_0x553384},_0x323fb3=await this[_0x7185a9(0x137)][_0x7185a9(0x152)]('/universer-api/comment/unit/'+_0x40c384+'/add',{'body':_0x16cddb});return Y(_0x323fb3[_0x7185a9(0x14c)]['comment'],_0x26071c);}}async[_0x347130(0x11d)](_0x1222f5){const _0x3f048f=_0x347130;var _0x1d3efa,_0x46820d;const {text:_0x38bcfa,unitId:_0xe7b142}=_0x1222f5,_0xa424c2=(_0x46820d=(_0x1d3efa=_0x38bcfa['customRanges'])==null?void 0x0:_0x1d3efa['filter'](_0x3eb56c=>_0x3eb56c['rangeType']===c[_0x3f048f(0x15d)][_0x3f048f(0x110)])[_0x3f048f(0x169)](_0x15d09d=>_0x15d09d[_0x3f048f(0x149)]))!=null?_0x46820d:[],_0x52f380=JSON['stringify'](_0x38bcfa),_0x1c8567=_0x1222f5['threadId'],_0x1301bf=_0x1222f5['id'],_0x12ce35={'memberId':(await this[_0x3f048f(0x123)][_0x3f048f(0x122)](_0xe7b142))['getMemberID'](),'unitId':_0xe7b142,'threadId':_0x1c8567,'mention':_0xa424c2,'content':_0x52f380,'replyId':_0x1301bf},_0x8c80a=await this['_httpService'][_0x3f048f(0x152)](_0x3f048f(0x104)+_0xe7b142+_0x3f048f(0x135),{'body':_0x12ce35});return!_0x8c80a[_0x3f048f(0x14c)][_0x3f048f(0x157)]||_0x8c80a[_0x3f048f(0x14c)][_0x3f048f(0x157)][_0x3f048f(0x106)]===0x1;}async[_0x347130(0x119)](_0x2df55c){const _0x268e70=_0x347130,{unitId:_0x1e98a5}=_0x2df55c,_0x35040e=_0x2df55c[_0x268e70(0x15a)],_0x3cff48={'memberId':this[_0x268e70(0xfe)][_0x268e70(0x141)]()['userID'],'unitId':_0x1e98a5,'threadId':_0x35040e,'solved':_0x2df55c[_0x268e70(0x121)]?I[_0x268e70(0x14e)]:I['OpenOrReOpen']},_0x3775ac=await this[_0x268e70(0x137)][_0x268e70(0x152)](_0x268e70(0x104)+_0x1e98a5+'/solved',{'body':_0x3cff48});return!_0x3775ac[_0x268e70(0x14c)][_0x268e70(0x157)]||_0x3775ac[_0x268e70(0x14c)]['error'][_0x268e70(0x106)]===0x1;}async[_0x347130(0x163)](_0x30ff0b,_0x9f347f,_0x454aa9,_0x27362c){const _0x352717=_0x347130,_0x193070={'memberId':(await this['_sessionService'][_0x352717(0x122)](_0x30ff0b))[_0x352717(0x145)](),'threadId':_0x454aa9,'replyId':_0x27362c,'unitId':_0x30ff0b},_0x143563=await this[_0x352717(0x137)][_0x352717(0x152)](_0x352717(0x104)+_0x30ff0b+_0x352717(0x15f),{'body':_0x193070});return!_0x143563[_0x352717(0x14c)][_0x352717(0x157)]||_0x143563[_0x352717(0x14c)][_0x352717(0x157)][_0x352717(0x106)]===0x1;}async['listComments'](_0x2bb451,_0x1dc388,_0x138ebc){const _0x432f2f=_0x347130,_0x25077d={'unitId':_0x2bb451,'threadId':_0x138ebc},_0x3883b1=await this[_0x432f2f(0x137)][_0x432f2f(0x152)](_0x432f2f(0x104)+_0x2bb451+'/list',{'body':_0x25077d}),_0x4b4baa=_0x138ebc['map'](_0x58dcf1=>G(_0x3883b1[_0x432f2f(0x14c)]['comments'][_0x58dcf1],_0x2bb451,_0x1dc388))[_0x432f2f(0x12e)](Boolean);return Object[_0x432f2f(0x102)](_0x3883b1[_0x432f2f(0x14c)][_0x432f2f(0x124)])[_0x432f2f(0x13b)](_0x124246=>{const _0x3162b2=_0x432f2f;this[_0x3162b2(0xfe)][_0x3162b2(0x164)](_0x124246);}),_0x4b4baa;}[_0x347130(0x147)](_0x5e9bce){const _0x271f47=_0x347130;return{'id':_0x5e9bce['id'],'threadId':_0x5e9bce[_0x271f47(0x15a)],'ref':_0x5e9bce[_0x271f47(0x134)]};}};p=x([C(0x0,c[_0x347130(0x118)](P['HTTPService'])),C(0x1,c[_0x347130(0x118)](c[_0x347130(0x125)])),C(0x2,c[_0x347130(0x118)](b['CollaborationSessionService']))],p);var H=Object[_0x347130(0x166)],J=(_0xf3aa87,_0x16e6f5,_0x444f6b,_0x40b862)=>{const _0xc6e173=_0x347130;for(var _0x253c28=_0x40b862>0x1?void 0x0:_0x40b862?H(_0x16e6f5,_0x444f6b):_0x16e6f5,_0x4c650c=_0xf3aa87[_0xc6e173(0x15b)]-0x1,_0x1c2223;_0x4c650c>=0x0;_0x4c650c--)(_0x1c2223=_0xf3aa87[_0x4c650c])&&(_0x253c28=_0x1c2223(_0x253c28)||_0x253c28);return _0x253c28;},y=(_0xb3739c,_0x39ba2b)=>(_0x5566d0,_0xec8d4b)=>_0x39ba2b(_0x5566d0,_0xec8d4b,_0xb3739c);let g=class extends c[_0x347130(0xfc)]{constructor(_0x49c1d8,_0x2dd1a7){const _0x3ac574=_0x347130;super(),this[_0x3ac574(0x10c)]=_0x49c1d8,this['_threadCommentDataSource']=_0x2dd1a7,this['_initDataSource']();}[_0x347130(0xff)](){const _0x3e8aab=_0x347130;this[_0x3e8aab(0x10c)]['dataSource']=this[_0x3e8aab(0x113)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};function _0x4f64(_0xe4adf,_0x38ae8e){_0xe4adf=_0xe4adf-0xfa;const _0x1d569a=_0x1d56();let _0x4f6459=_0x1d569a[_0xe4adf];return _0x4f6459;}g=J([y(0x0,M[_0x347130(0x109)]),y(0x1,c[_0x347130(0x118)](p))],g);var F=Object[_0x347130(0x115)],L=Object[_0x347130(0x166)],Z=(_0x556c20,_0x3f5363,_0xf766cd)=>_0x3f5363 in _0x556c20?F(_0x556c20,_0x3f5363,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf766cd}):_0x556c20[_0x3f5363]=_0xf766cd,W=(_0x960383,_0x25eed0,_0xdecd40,_0x3ab13c)=>{const _0x1a61da=_0x347130;for(var _0x226990=_0x3ab13c>0x1?void 0x0:_0x3ab13c?L(_0x25eed0,_0xdecd40):_0x25eed0,_0x22aa39=_0x960383[_0x1a61da(0x15b)]-0x1,_0x5e318a;_0x22aa39>=0x0;_0x22aa39--)(_0x5e318a=_0x960383[_0x22aa39])&&(_0x226990=_0x5e318a(_0x226990)||_0x226990);return _0x226990;},O=(_0x15bc18,_0x73925c)=>(_0x3b168b,_0x446da6)=>_0x73925c(_0x3b168b,_0x446da6,_0x15bc18),N=(_0x153f20,_0x12bf76,_0xbad3a6)=>Z(_0x153f20,typeof _0x12bf76!=_0x347130(0x126)?_0x12bf76+'':_0x12bf76,_0xbad3a6);exports[_0x347130(0x14f)]=class extends c['Plugin']{constructor(_0x583899=D,_0x4edc80,_0x2d9b4d){const _0x228247=_0x347130;super(),this['_config']=_0x583899,this[_0x228247(0x107)]=_0x4edc80,this[_0x228247(0x11b)]=_0x2d9b4d;const {..._0x58e7a2}=c['merge']({},D,this['_config']);this[_0x228247(0x11b)][_0x228247(0xfa)](q,_0x58e7a2);}['onStarting'](){[[p],[g],[_]]['forEach'](_0x578e72=>{this['_injector']['add'](_0x578e72);});}[_0x347130(0x146)](){const _0x34ef3f=_0x347130;this[_0x34ef3f(0x107)][_0x34ef3f(0x15e)](g),this[_0x34ef3f(0x107)][_0x34ef3f(0x15e)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x347130(0x14f)],_0x347130(0x165),c[_0x347130(0x15c)][_0x347130(0x153)]),exports[_0x347130(0x14f)]=W([c[_0x347130(0x14d)](w[_0x347130(0x114)],b[_0x347130(0x127)],T[_0x347130(0x156)]),O(0x1,c['Inject'](c[_0x347130(0xfd)])),O(0x2,c['IConfigService'])],exports[_0x347130(0x14f)]);
|
|
1
|
+
'use strict';const _0x5a5865=_0x4d8d;(function(_0x1d6ef5,_0x4f7139){const _0x49960c=_0x4d8d,_0x33edfd=_0x1d6ef5();while(!![]){try{const _0x2baba9=-parseInt(_0x49960c(0x1fb))/0x1*(-parseInt(_0x49960c(0x1d6))/0x2)+-parseInt(_0x49960c(0x21a))/0x3*(-parseInt(_0x49960c(0x1fa))/0x4)+-parseInt(_0x49960c(0x230))/0x5+parseInt(_0x49960c(0x1f1))/0x6+parseInt(_0x49960c(0x224))/0x7*(-parseInt(_0x49960c(0x1c2))/0x8)+-parseInt(_0x49960c(0x1d7))/0x9*(parseInt(_0x49960c(0x1e0))/0xa)+-parseInt(_0x49960c(0x1d9))/0xb;if(_0x2baba9===_0x4f7139)break;else _0x33edfd['push'](_0x33edfd['shift']());}catch(_0x45a658){_0x33edfd['push'](_0x33edfd['shift']());}}}(_0x2cf6,0x6b6bc));Object[_0x5a5865(0x202)](exports,Symbol[_0x5a5865(0x231)],{'value':_0x5a5865(0x222)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x5a5865(0x227);var I=(_0x5a9749=>(_0x5a9749[_0x5a9749[_0x5a5865(0x1bb)]=0x0]=_0x5a5865(0x1bb),_0x5a9749[_0x5a9749['Solved']=0x1]='Solved',_0x5a9749[_0x5a9749['UNRECOGNIZED']=-0x1]=_0x5a5865(0x1d4),_0x5a9749))(I||{}),v=(_0x1ba871=>(_0x1ba871[_0x1ba871['Unknown']=0x0]=_0x5a5865(0x1d3),_0x1ba871[_0x1ba871[_0x5a5865(0x223)]=0x1]=_0x5a5865(0x223),_0x1ba871[_0x1ba871[_0x5a5865(0x204)]=0x2]=_0x5a5865(0x204),_0x1ba871[_0x1ba871[_0x5a5865(0x218)]=0x3]='Edit',_0x1ba871[_0x1ba871[_0x5a5865(0x213)]=0x4]=_0x5a5865(0x213),_0x1ba871[_0x1ba871[_0x5a5865(0x1e8)]=0x5]='Solve',_0x1ba871[_0x1ba871[_0x5a5865(0x1d4)]=-0x1]='UNRECOGNIZED',_0x1ba871))(v||{});const f=_0x979a7=>c[_0x5a5865(0x1ff)](new Date(+_0x979a7))[_0x5a5865(0x1bc)](_0x5a5865(0x203)),R=async(_0x4de789,_0x29c8a4)=>{const _0x37e6d5=_0x5a5865,_0x4500bf=_0x4de789[_0x37e6d5(0x21e)](c[_0x37e6d5(0x1ce)]),_0x1553a5=_0x4de789[_0x37e6d5(0x21e)](P['HTTPService']);_0x29c8a4[_0x37e6d5(0x1c6)](_0x16cfbf=>{const _0x8d2be8=_0x37e6d5;_0x4500bf['getUser'](_0x16cfbf)&&_0x29c8a4[_0x8d2be8(0x20f)](_0x16cfbf);}),_0x29c8a4[_0x37e6d5(0x22c)]&&(await _0x1553a5[_0x37e6d5(0x21e)](_0x37e6d5(0x209),{'params':{'userIDs':[..._0x29c8a4]}}))[_0x37e6d5(0x1ed)][_0x37e6d5(0x1f4)][_0x37e6d5(0x1c6)](_0x2be773=>{_0x2be773&&_0x4500bf['addUser'](_0x2be773);});};var $=Object[_0x5a5865(0x20d)],E=(_0x14b37d,_0x5c16e7,_0x5d3138,_0x9af5b1)=>{const _0x146b8a=_0x5a5865;for(var _0xb5c027=_0x9af5b1>0x1?void 0x0:_0x9af5b1?$(_0x5c16e7,_0x5d3138):_0x5c16e7,_0x38321b=_0x14b37d[_0x146b8a(0x1c4)]-0x1,_0xfbafe7;_0x38321b>=0x0;_0x38321b--)(_0xfbafe7=_0x14b37d[_0x38321b])&&(_0xb5c027=_0xfbafe7(_0xb5c027)||_0xb5c027);return _0xb5c027;},S=(_0x3537a7,_0x2f6c31)=>(_0x54fb07,_0x3fbc02)=>_0x2f6c31(_0x54fb07,_0x3fbc02,_0x3537a7);let _=class extends c['Disposable']{constructor(_0x18f6ee,_0x59869c,_0x4ac8b6,_0x40a66a){const _0x46eb81=_0x5a5865;super(),this[_0x46eb81(0x1e9)]=_0x18f6ee,this['_threadCommentModel']=_0x59869c,this['_userService']=_0x4ac8b6,this[_0x46eb81(0x219)]=_0x40a66a,this[_0x46eb81(0x1e3)](),this[_0x46eb81(0x1f9)]();}['_initUserSync'](){const _0x3508de=_0x5a5865;this['disposeWithMe'](this[_0x3508de(0x20c)][_0x3508de(0x1fd)][_0x3508de(0x221)](j['bufferTime'](0x10))['subscribe'](_0x75a4f8=>{const _0x5f18cf=_0x3508de,_0x19ef7f=new Set();_0x75a4f8[_0x5f18cf(0x1c6)](_0xe91f6d=>{const _0x46913f=_0x5f18cf;if(_0xe91f6d[_0x46913f(0x200)]===_0x46913f(0x1ef)){const _0x80bbf8=_0xe91f6d[_0x46913f(0x1bf)][_0x46913f(0x1df)];_0x19ef7f[_0x46913f(0x1ef)](_0x80bbf8);}}),R(this[_0x5f18cf(0x219)],_0x19ef7f);}));}['_init'](){const _0x2e0369=_0x5a5865;this[_0x2e0369(0x1c3)](this[_0x2e0369(0x1e9)][_0x2e0369(0x1fd)]['subscribe'](async _0x4b7148=>{const _0x240ed2=_0x2e0369;var _0x419865,_0x541f49,_0x3f36ce,_0xfa7ca3;const _0x2afdc3=(_0x419865=this[_0x240ed2(0x20c)][_0x240ed2(0x21b)](_0x4b7148['unitId'])[_0x240ed2(0x1d1)](_0x87c9c4=>_0x87c9c4[_0x240ed2(0x1cb)]===_0x4b7148[_0x240ed2(0x1cb)]))==null?void 0x0:_0x419865['root'];if(!_0x2afdc3)return;const {unitId:_0x5aeb4d,subUnitId:_0x3b10ae}=_0x2afdc3;switch(_0x4b7148[_0x240ed2(0x1d0)]&&this[_0x240ed2(0x1f8)][_0x240ed2(0x228)](_0x4b7148[_0x240ed2(0x1d0)]),_0x4b7148[_0x240ed2(0x200)]){case v[_0x240ed2(0x223)]:break;case v[_0x240ed2(0x204)]:{this['_threadCommentModel'][_0x240ed2(0x21d)](_0x5aeb4d,_0x3b10ae,{'unitId':_0x5aeb4d,'subUnitId':_0x3b10ae,'ref':'','id':_0x4b7148[_0x240ed2(0x205)],'dT':f(+_0x4b7148[_0x240ed2(0x1c8)]),'threadId':_0x4b7148[_0x240ed2(0x1cb)],'personId':(_0x3f36ce=(_0x541f49=_0x4b7148[_0x240ed2(0x1d0)])==null?void 0x0:_0x541f49[_0x240ed2(0x1c9)])!=null?_0x3f36ce:_0x4b7148['userId'],'text':JSON[_0x240ed2(0x20a)](_0x4b7148[_0x240ed2(0x1cc)]),'parentId':_0x2afdc3['id']});break;}case v[_0x240ed2(0x213)]:{const _0x3ace51=this[_0x240ed2(0x20c)]['getComment'](_0x5aeb4d,_0x3b10ae,_0x4b7148['replyId']);_0x3ace51&&_0x3ace51['parentId']&&this[_0x240ed2(0x20c)][_0x240ed2(0x1cd)](_0x5aeb4d,_0x3b10ae,_0x4b7148['replyId']);break;}case v['Edit']:{this[_0x240ed2(0x20c)][_0x240ed2(0x1e2)](_0x5aeb4d,_0x3b10ae,{'commentId':_0x4b7148[_0x240ed2(0x205)],'text':JSON[_0x240ed2(0x20a)](_0x4b7148[_0x240ed2(0x1cc)])});break;}case v[_0x240ed2(0x1e8)]:{const _0x3d181=(_0xfa7ca3=this[_0x240ed2(0x20c)][_0x240ed2(0x21b)](_0x4b7148[_0x240ed2(0x1fe)])['find'](_0x2c05a2=>_0x2c05a2[_0x240ed2(0x1cb)]===_0x4b7148[_0x240ed2(0x1cb)]))==null?void 0x0:_0xfa7ca3[_0x240ed2(0x217)];_0x3d181&&this['_threadCommentModel']['resolveComment'](_0x5aeb4d,_0x3b10ae,_0x3d181['id'],_0x4b7148[_0x240ed2(0x1eb)]===I[_0x240ed2(0x1cf)]);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x5a5865(0x1e4)](M[_0x5a5865(0x1be)])),S(0x2,c[_0x5a5865(0x1e4)](c[_0x5a5865(0x1ce)])),S(0x3,c[_0x5a5865(0x1e4)](c['Injector']))],_);const q=_0x5a5865(0x207),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3d5c74,_0xadfcfe,_0x1411f0,_0x4dc0ce)=>{for(var _0x27ff01=_0x4dc0ce>0x1?void 0x0:_0x4dc0ce?A(_0xadfcfe,_0x1411f0):_0xadfcfe,_0x358f82=_0x3d5c74['length']-0x1,_0x524a61;_0x358f82>=0x0;_0x358f82--)(_0x524a61=_0x3d5c74[_0x358f82])&&(_0x27ff01=_0x524a61(_0x27ff01)||_0x27ff01);return _0x27ff01;},C=(_0x52633b,_0xd4211d)=>(_0x84a3f3,_0x1e4cee)=>_0xd4211d(_0x84a3f3,_0x1e4cee,_0x52633b);function Y(_0x3139c0,_0x2999d7){const _0x559478=_0x5a5865,_0x4207f8=_0x3139c0['replies'][0x0];return{..._0x2999d7,'id':_0x4207f8[_0x559478(0x205)],'resolved':_0x3139c0['solved']===0x1,'dT':f(_0x4207f8[_0x559478(0x1c8)]),'personId':_0x4207f8[_0x559478(0x1f2)],'threadId':_0x4207f8[_0x559478(0x1cb)]};}function G(_0x479b72,_0x30aff5,_0x486f20){const _0x6ef22a=_0x5a5865;var _0x1c002c,_0x5aa48f;if(((_0x5aa48f=(_0x1c002c=_0x479b72==null?void 0x0:_0x479b72[_0x6ef22a(0x1f5)])==null?void 0x0:_0x1c002c[_0x6ef22a(0x1c4)])!=null?_0x5aa48f:0x0)>0x0){const _0xa1da5b=(_0x55a219,_0x47de6b)=>({'id':_0x55a219[_0x6ef22a(0x205)],'threadId':_0x55a219[_0x6ef22a(0x1cb)],'dT':f(_0x55a219['createTimestamp']),'personId':_0x55a219['userId'],'resolved':_0x479b72[_0x6ef22a(0x1eb)]===I[_0x6ef22a(0x1cf)],'unitId':_0x30aff5,'subUnitId':_0x486f20,'text':JSON[_0x6ef22a(0x20a)](_0x55a219[_0x6ef22a(0x1cc)]),'parentId':_0x47de6b}),_0x38c17d=_0xa1da5b(_0x479b72[_0x6ef22a(0x1f5)][0x0]);return{..._0x38c17d,'children':_0x479b72[_0x6ef22a(0x1f5)]['slice'](0x1)[_0x6ef22a(0x208)](_0x38f43a=>_0xa1da5b(_0x38f43a,_0x38c17d['id']))};}return null;}let p=class{constructor(_0x22cde7,_0x140d2b,_0x139389){const _0x3a5b7d=_0x5a5865;this[_0x3a5b7d(0x1d8)]=_0x22cde7,this[_0x3a5b7d(0x1f8)]=_0x140d2b,this[_0x3a5b7d(0x206)]=_0x139389;}async[_0x5a5865(0x21d)](_0x1266ff){const _0x140ba5=_0x5a5865;var _0x4cbeb6,_0x5b1238;const {parentId:_0x3cd6e2,unitId:_0x51c32c,text:_0x43e2c8,threadId:_0x1e8c3c}=_0x1266ff,_0x272212=(_0x5b1238=(_0x4cbeb6=_0x43e2c8['customRanges'])==null?void 0x0:_0x4cbeb6[_0x140ba5(0x1c0)](_0xe01ebc=>_0xe01ebc[_0x140ba5(0x1ca)]===c[_0x140ba5(0x1ec)][_0x140ba5(0x1f6)])['map'](_0x4ade29=>_0x4ade29[_0x140ba5(0x214)]))!=null?_0x5b1238:[],_0x4471c3=JSON[_0x140ba5(0x22d)](_0x43e2c8),_0x3fff50=(await this[_0x140ba5(0x206)]['requireSession'](_0x51c32c))[_0x140ba5(0x1e5)]();if(_0x3cd6e2){const _0x2ba4b6={'memberId':_0x3fff50,'unitId':_0x51c32c,'content':_0x4471c3,'mention':_0x272212,'threadId':_0x1e8c3c},_0x2b1fcb=(await this['_httpService'][_0x140ba5(0x1d5)](_0x140ba5(0x225)+_0x51c32c+_0x140ba5(0x1de),{'body':_0x2ba4b6}))['body'][_0x140ba5(0x232)];return{..._0x1266ff,'id':_0x2b1fcb[_0x140ba5(0x205)],'dT':c[_0x140ba5(0x1ff)](+_0x2b1fcb[_0x140ba5(0x1c8)])[_0x140ba5(0x1bc)](_0x140ba5(0x203)),'personId':_0x2b1fcb[_0x140ba5(0x1f2)]};}else{const _0x415e63={'memberId':_0x3fff50,'unitId':_0x51c32c,'content':_0x4471c3,'mention':_0x272212},_0x72a939=await this[_0x140ba5(0x1d8)][_0x140ba5(0x1d5)](_0x140ba5(0x225)+_0x51c32c+'/add',{'body':_0x415e63});return Y(_0x72a939[_0x140ba5(0x1ed)][_0x140ba5(0x22e)],_0x1266ff);}}async[_0x5a5865(0x1e2)](_0x1ce372){const _0x4f561e=_0x5a5865;var _0x239f7b,_0x329a04;const {text:_0x407e7a,unitId:_0x1ac760}=_0x1ce372,_0x1433bd=(_0x329a04=(_0x239f7b=_0x407e7a['customRanges'])==null?void 0x0:_0x239f7b[_0x4f561e(0x1c0)](_0x24c7a6=>_0x24c7a6[_0x4f561e(0x1ca)]===c[_0x4f561e(0x1ec)][_0x4f561e(0x1f6)])[_0x4f561e(0x208)](_0x2ec654=>_0x2ec654[_0x4f561e(0x214)]))!=null?_0x329a04:[],_0x150ae1=JSON[_0x4f561e(0x22d)](_0x407e7a),_0x527f69=_0x1ce372['threadId'],_0x46905c=_0x1ce372['id'],_0x12f423={'memberId':(await this[_0x4f561e(0x206)][_0x4f561e(0x1dd)](_0x1ac760))['getMemberID'](),'unitId':_0x1ac760,'threadId':_0x527f69,'mention':_0x1433bd,'content':_0x150ae1,'replyId':_0x46905c},_0x5d322e=await this['_httpService'][_0x4f561e(0x1d5)]('/universer-api/comment/unit/'+_0x1ac760+_0x4f561e(0x1c1),{'body':_0x12f423});return!_0x5d322e['body'][_0x4f561e(0x212)]||_0x5d322e[_0x4f561e(0x1ed)][_0x4f561e(0x212)][_0x4f561e(0x229)]===0x1;}async[_0x5a5865(0x1fc)](_0x99bef9){const _0x7188bd=_0x5a5865,{unitId:_0x23cd91}=_0x99bef9,_0x1762df=_0x99bef9[_0x7188bd(0x1cb)],_0x95a16e={'memberId':this['_userService'][_0x7188bd(0x20b)]()[_0x7188bd(0x1c9)],'unitId':_0x23cd91,'threadId':_0x1762df,'solved':_0x99bef9['resolved']?I['Solved']:I[_0x7188bd(0x1bb)]},_0x54e4e8=await this['_httpService'][_0x7188bd(0x1d5)](_0x7188bd(0x225)+_0x23cd91+'/solved',{'body':_0x95a16e});return!_0x54e4e8[_0x7188bd(0x1ed)][_0x7188bd(0x212)]||_0x54e4e8[_0x7188bd(0x1ed)][_0x7188bd(0x212)][_0x7188bd(0x229)]===0x1;}async[_0x5a5865(0x1cd)](_0x51267f,_0x337641,_0x446473,_0xc65c9a){const _0x295a21=_0x5a5865,_0x1fadbe={'memberId':(await this[_0x295a21(0x206)]['requireSession'](_0x51267f))[_0x295a21(0x1e5)](),'threadId':_0x446473,'replyId':_0xc65c9a,'unitId':_0x51267f},_0x26c03b=await this['_httpService'][_0x295a21(0x1d5)](_0x295a21(0x225)+_0x51267f+_0x295a21(0x22b),{'body':_0x1fadbe});return!_0x26c03b[_0x295a21(0x1ed)][_0x295a21(0x212)]||_0x26c03b[_0x295a21(0x1ed)][_0x295a21(0x212)][_0x295a21(0x229)]===0x1;}async[_0x5a5865(0x1da)](_0x4af64a,_0x17f08d,_0x317e61){const _0x3dd162=_0x5a5865,_0x41f2ef={'unitId':_0x4af64a,'threadId':_0x317e61},_0x122a76=await this[_0x3dd162(0x1d8)][_0x3dd162(0x1d5)](_0x3dd162(0x225)+_0x4af64a+_0x3dd162(0x1e6),{'body':_0x41f2ef}),_0xecef8e=_0x317e61['map'](_0x5c1c62=>G(_0x122a76['body'][_0x3dd162(0x1d2)][_0x5c1c62],_0x4af64a,_0x17f08d))['filter'](Boolean);return Object[_0x3dd162(0x1dc)](_0x122a76[_0x3dd162(0x1ed)][_0x3dd162(0x1f4)])[_0x3dd162(0x1c6)](_0x6641dd=>{const _0x21a36d=_0x3dd162;this[_0x21a36d(0x1f8)][_0x21a36d(0x228)](_0x6641dd);}),_0xecef8e;}[_0x5a5865(0x1f0)](_0xa98793){const _0x5cfb45=_0x5a5865;return{'id':_0xa98793['id'],'threadId':_0xa98793['threadId'],'ref':_0xa98793[_0x5cfb45(0x21f)]};}};p=x([C(0x0,c[_0x5a5865(0x1e4)](P[_0x5a5865(0x20e)])),C(0x1,c[_0x5a5865(0x1e4)](c['UserManagerService'])),C(0x2,c[_0x5a5865(0x1e4)](b[_0x5a5865(0x211)]))],p);var H=Object[_0x5a5865(0x20d)],J=(_0x50b559,_0x16b1c1,_0x17792f,_0x3760f5)=>{const _0x27d083=_0x5a5865;for(var _0x50dae5=_0x3760f5>0x1?void 0x0:_0x3760f5?H(_0x16b1c1,_0x17792f):_0x16b1c1,_0x93efdd=_0x50b559[_0x27d083(0x1c4)]-0x1,_0x3b9592;_0x93efdd>=0x0;_0x93efdd--)(_0x3b9592=_0x50b559[_0x93efdd])&&(_0x50dae5=_0x3b9592(_0x50dae5)||_0x50dae5);return _0x50dae5;},y=(_0x359dee,_0x5066e5)=>(_0x69dfba,_0x5e790b)=>_0x5066e5(_0x69dfba,_0x5e790b,_0x359dee);let g=class extends c[_0x5a5865(0x1c5)]{constructor(_0x379089,_0x3e6eeb){const _0x52628e=_0x5a5865;super(),this[_0x52628e(0x226)]=_0x379089,this['_threadCommentDataSource']=_0x3e6eeb,this[_0x52628e(0x216)]();}[_0x5a5865(0x216)](){const _0x230db8=_0x5a5865;this[_0x230db8(0x226)]['dataSource']=this['_threadCommentDataSource'],this[_0x230db8(0x226)][_0x230db8(0x22f)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5a5865(0x1e4)](p))],g);var F=Object[_0x5a5865(0x202)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1741b6,_0x447da7,_0x5d1ac8)=>_0x447da7 in _0x1741b6?F(_0x1741b6,_0x447da7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d1ac8}):_0x1741b6[_0x447da7]=_0x5d1ac8,W=(_0x2ac3b2,_0x7df7ad,_0x1357c0,_0x4f4b11)=>{for(var _0x19f48b=_0x4f4b11>0x1?void 0x0:_0x4f4b11?L(_0x7df7ad,_0x1357c0):_0x7df7ad,_0x4eaa0c=_0x2ac3b2['length']-0x1,_0x33ffbb;_0x4eaa0c>=0x0;_0x4eaa0c--)(_0x33ffbb=_0x2ac3b2[_0x4eaa0c])&&(_0x19f48b=_0x33ffbb(_0x19f48b)||_0x19f48b);return _0x19f48b;},O=(_0x2c0d7b,_0x151ce8)=>(_0x372d78,_0x5313cb)=>_0x151ce8(_0x372d78,_0x5313cb,_0x2c0d7b),N=(_0x21db52,_0x319182,_0x311a67)=>Z(_0x21db52,typeof _0x319182!=_0x5a5865(0x1ba)?_0x319182+'':_0x319182,_0x311a67);function _0x4d8d(_0x33d546,_0x2a867b){_0x33d546=_0x33d546-0x1ba;const _0x2cf674=_0x2cf6();let _0x4d8d3d=_0x2cf674[_0x33d546];return _0x4d8d3d;}function _0x2cf6(){const _0x36bc5a=['replyId','_sessionService','thread-comment-data-source.config','map','/universer-api/user/list','parse','getCurrentUser','_threadCommentModel','getOwnPropertyDescriptor','HTTPService','delete','_configService','CollaborationSessionService','error','Delete','rangeId','UniverCollaborationClientPlugin','_initDataSource','root','Edit','_injector','161817pGOdLY','getUnit','_config','addComment','get','ref','UniverLicensePlugin','pipe','Module','Add','18641RyKTAo','/universer-api/comment/unit/','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','code','setConfig','/delete','size','stringify','comment','syncUpdateMutationToColla','527135iDyZPt','toStringTag','reply','symbol','OpenOrReOpen','format','Injector','ThreadCommentModel','payload','filter','/edit','56otxWFv','disposeWithMe','length','Disposable','forEach','Plugin','createTimestamp','userID','rangeType','threadId','content','deleteComment','UserManagerService','Solved','user','find','comments','Unknown','UNRECOGNIZED','post','124JGySjF','6221637tQKrsu','_httpService','688974aNkIBJ','listComments','UniverThreadCommentDataSourcePlugin','values','requireSession','/reply','personId','10oqtGtA','UniverInstanceType','updateComment','_init','Inject','getMemberID','/list','onReady','Solve','_commentService','merge','solved','CustomRangeType','body','onStarting','add','saveCommentToSnapshot','3299676wjMhBi','userId','UniverThreadCommentUIPlugin','users','replies','COMMENT','pluginName','_userService','_initUserSync','44PmTHQB','2818tgEjSM','resolveComment','commentUpdate$','unitId','dayjs','type','DependentOn','defineProperty','YYYY/MM/DD\x20HH:mm','Reply'];_0x2cf6=function(){return _0x36bc5a;};return _0x2cf6();}exports[_0x5a5865(0x1db)]=class extends c[_0x5a5865(0x1c7)]{constructor(_0x48407a=D,_0x282387,_0x257072){const _0x11b602=_0x5a5865;super(),this[_0x11b602(0x21c)]=_0x48407a,this[_0x11b602(0x219)]=_0x282387,this[_0x11b602(0x210)]=_0x257072;const {..._0x1583a9}=c[_0x11b602(0x1ea)]({},D,this[_0x11b602(0x21c)]);this['_configService'][_0x11b602(0x22a)](q,_0x1583a9);}[_0x5a5865(0x1ee)](){const _0x155995=_0x5a5865;[[p],[g],[_]][_0x155995(0x1c6)](_0x189336=>{const _0x5d91bb=_0x155995;this[_0x5d91bb(0x219)]['add'](_0x189336);});}[_0x5a5865(0x1e7)](){const _0x4bca31=_0x5a5865;this[_0x4bca31(0x219)][_0x4bca31(0x21e)](g),this[_0x4bca31(0x219)][_0x4bca31(0x21e)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x5a5865(0x1f7),U),N(exports[_0x5a5865(0x1db)],_0x5a5865(0x200),c[_0x5a5865(0x1e1)]['UNIVER_UNKNOWN']),exports[_0x5a5865(0x1db)]=W([c[_0x5a5865(0x201)](w[_0x5a5865(0x1f3)],b[_0x5a5865(0x215)],T[_0x5a5865(0x220)]),O(0x1,c[_0x5a5865(0x1e4)](c[_0x5a5865(0x1bd)])),O(0x2,c['IConfigService'])],exports[_0x5a5865(0x1db)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x566e92=_0x4978;(function(_0x4151f4,_0x5ba13e){const _0xf53b9=_0x4978,_0x18764d=_0x4151f4();while(!![]){try{const _0x3c4c55=parseInt(_0xf53b9(0x1a4))/0x1+parseInt(_0xf53b9(0x17b))/0x2+parseInt(_0xf53b9(0x1ce))/0x3+-parseInt(_0xf53b9(0x182))/0x4*(-parseInt(_0xf53b9(0x1c0))/0x5)+-parseInt(_0xf53b9(0x18b))/0x6*(parseInt(_0xf53b9(0x1af))/0x7)+parseInt(_0xf53b9(0x1c4))/0x8+-parseInt(_0xf53b9(0x17f))/0x9;if(_0x3c4c55===_0x5ba13e)break;else _0x18764d['push'](_0x18764d['shift']());}catch(_0x1665a7){_0x18764d['push'](_0x18764d['shift']());}}}(_0x246c,0xb11be));import{CommentService as _0x2bf8f1,CollaborationSessionService as _0x19134d,UniverCollaborationClientPlugin as _0x428713}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x56de4c}from'@univerjs-pro/license';import{dayjs as _0x2a6e24,UserManagerService as _0x2b454a,Inject as _0x228d0a,Injector as _0x10100d,Disposable as _0x32bfe7,CustomRangeType as _0x5deff7,UniverInstanceType as _0x2ef3d3,DependentOn as _0x512e62,IConfigService as _0x5c0e15,Plugin as _0x4a70cc,merge as _0xa2d842}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3f1117}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e792,IThreadCommentDataSourceService as _0x505b6d}from'@univerjs/thread-comment';import{bufferTime as _0x1d13f7}from'rxjs';import{HTTPService as _0x38e1d4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2fe957=>(_0x2fe957[_0x2fe957['OpenOrReOpen']=0x0]=_0x566e92(0x1ad),_0x2fe957[_0x2fe957[_0x566e92(0x192)]=0x1]=_0x566e92(0x192),_0x2fe957[_0x2fe957['UNRECOGNIZED']=-0x1]=_0x566e92(0x1cb),_0x2fe957))(I||{}),v=(_0x22bda5=>(_0x22bda5[_0x22bda5['Unknown']=0x0]='Unknown',_0x22bda5[_0x22bda5[_0x566e92(0x1cf)]=0x1]=_0x566e92(0x1cf),_0x22bda5[_0x22bda5['Reply']=0x2]=_0x566e92(0x1cd),_0x22bda5[_0x22bda5[_0x566e92(0x1b0)]=0x3]=_0x566e92(0x1b0),_0x22bda5[_0x22bda5[_0x566e92(0x1c3)]=0x4]=_0x566e92(0x1c3),_0x22bda5[_0x22bda5['Solve']=0x5]=_0x566e92(0x1a5),_0x22bda5[_0x22bda5[_0x566e92(0x1cb)]=-0x1]=_0x566e92(0x1cb),_0x22bda5))(v||{});const y=_0x2ebf51=>_0x2a6e24(new Date(+_0x2ebf51))[_0x566e92(0x1bb)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x484a1c,_0x2054c6)=>{const _0x562c9c=_0x566e92,_0x5ad13a=_0x484a1c['get'](_0x2b454a),_0x3d2df6=_0x484a1c[_0x562c9c(0x1d5)](_0x38e1d4);_0x2054c6[_0x562c9c(0x1d0)](_0x3331b7=>{const _0x34ad25=_0x562c9c;_0x5ad13a[_0x34ad25(0x1b9)](_0x3331b7)&&_0x2054c6[_0x34ad25(0x17a)](_0x3331b7);}),_0x2054c6[_0x562c9c(0x195)]&&(await _0x3d2df6['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2054c6]}}))[_0x562c9c(0x1b1)]['users'][_0x562c9c(0x1d0)](_0x24e738=>{const _0x2b3ae3=_0x562c9c;_0x24e738&&_0x5ad13a[_0x2b3ae3(0x1d4)](_0x24e738);});};var K=Object[_0x566e92(0x1d9)],V=(_0x3378e3,_0x54873a,_0x33de9a,_0x1f6117)=>{for(var _0x40f0ca=_0x1f6117>0x1?void 0x0:_0x1f6117?K(_0x54873a,_0x33de9a):_0x54873a,_0x3536b5=_0x3378e3['length']-0x1,_0xaa7fde;_0x3536b5>=0x0;_0x3536b5--)(_0xaa7fde=_0x3378e3[_0x3536b5])&&(_0x40f0ca=_0xaa7fde(_0x40f0ca)||_0x40f0ca);return _0x40f0ca;},p=(_0x15fe6a,_0x2d562b)=>(_0x5e8232,_0x42d333)=>_0x2d562b(_0x5e8232,_0x42d333,_0x15fe6a);let _=class extends _0x32bfe7{constructor(_0x2228ee,_0x5edec9,_0x9e9716,_0xc65a00){const _0xa19c23=_0x566e92;super(),this[_0xa19c23(0x1ac)]=_0x2228ee,this[_0xa19c23(0x1a1)]=_0x5edec9,this['_userService']=_0x9e9716,this[_0xa19c23(0x184)]=_0xc65a00,this[_0xa19c23(0x19a)](),this[_0xa19c23(0x185)]();}['_initUserSync'](){const _0x57e692=_0x566e92;this['disposeWithMe'](this[_0x57e692(0x1a1)][_0x57e692(0x1c9)][_0x57e692(0x1d2)](_0x1d13f7(0x10))['subscribe'](_0x2e7828=>{const _0x1f2996=_0x57e692,_0x27d066=new Set();_0x2e7828['forEach'](_0x451d01=>{const _0x160bc1=_0x4978;if(_0x451d01['type']===_0x160bc1(0x18a)){const _0x3c8c0f=_0x451d01[_0x160bc1(0x17c)][_0x160bc1(0x18d)];_0x27d066[_0x160bc1(0x18a)](_0x3c8c0f);}}),B(this[_0x1f2996(0x184)],_0x27d066);}));}[_0x566e92(0x19a)](){const _0xf2abe2=_0x566e92;this[_0xf2abe2(0x1a6)](this['_commentService'][_0xf2abe2(0x1c9)]['subscribe'](async _0x91ed5b=>{const _0x12e023=_0xf2abe2;var _0x55fc1a,_0x41ac85,_0x3a1d81,_0x29c11e;const _0x16b4df=(_0x55fc1a=this['_threadCommentModel']['getUnit'](_0x91ed5b[_0x12e023(0x1b8)])[_0x12e023(0x188)](_0x1ba272=>_0x1ba272[_0x12e023(0x17d)]===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x55fc1a[_0x12e023(0x1c6)];if(!_0x16b4df)return;const {unitId:_0x5c19df,subUnitId:_0x5ac403}=_0x16b4df;switch(_0x91ed5b[_0x12e023(0x196)]&&this[_0x12e023(0x1b5)][_0x12e023(0x1d4)](_0x91ed5b['user']),_0x91ed5b[_0x12e023(0x1c7)]){case v[_0x12e023(0x1cf)]:break;case v['Reply']:{this['_threadCommentModel'][_0x12e023(0x181)](_0x5c19df,_0x5ac403,{'unitId':_0x5c19df,'subUnitId':_0x5ac403,'ref':'','id':_0x91ed5b[_0x12e023(0x1ae)],'dT':y(+_0x91ed5b[_0x12e023(0x1bf)]),'threadId':_0x91ed5b[_0x12e023(0x17d)],'personId':(_0x3a1d81=(_0x41ac85=_0x91ed5b[_0x12e023(0x196)])==null?void 0x0:_0x41ac85['userID'])!=null?_0x3a1d81:_0x91ed5b[_0x12e023(0x19d)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)]),'parentId':_0x16b4df['id']});break;}case v[_0x12e023(0x1c3)]:{const _0x5b3399=this[_0x12e023(0x1a1)]['getComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);_0x5b3399&&_0x5b3399['parentId']&&this[_0x12e023(0x1a1)]['deleteComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);break;}case v[_0x12e023(0x1b0)]:{this['_threadCommentModel'][_0x12e023(0x1ba)](_0x5c19df,_0x5ac403,{'commentId':_0x91ed5b[_0x12e023(0x1ae)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)])});break;}case v[_0x12e023(0x1a5)]:{const _0x1e4aad=(_0x29c11e=this['_threadCommentModel']['getUnit'](_0x91ed5b['unitId'])[_0x12e023(0x188)](_0x9ca084=>_0x9ca084['threadId']===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x29c11e[_0x12e023(0x1c6)];_0x1e4aad&&this[_0x12e023(0x1a1)]['resolveComment'](_0x5c19df,_0x5ac403,_0x1e4aad['id'],_0x91ed5b[_0x12e023(0x1b4)]===I[_0x12e023(0x192)]);break;}}}));}};_=V([p(0x0,_0x228d0a(_0x2bf8f1)),p(0x1,_0x228d0a(_0x53e792)),p(0x2,_0x228d0a(_0x2b454a)),p(0x3,_0x228d0a(_0x10100d))],_);const z=_0x566e92(0x1d8),O={};var k=Object[_0x566e92(0x1d9)],Q=(_0x1c0a2d,_0x336acf,_0x5e89ed,_0x56b986)=>{const _0x535c20=_0x566e92;for(var _0x54fc48=_0x56b986>0x1?void 0x0:_0x56b986?k(_0x336acf,_0x5e89ed):_0x336acf,_0x293dce=_0x1c0a2d[_0x535c20(0x1c1)]-0x1,_0x24429f;_0x293dce>=0x0;_0x293dce--)(_0x24429f=_0x1c0a2d[_0x293dce])&&(_0x54fc48=_0x24429f(_0x54fc48)||_0x54fc48);return _0x54fc48;},b=(_0x4e31dc,_0x1e03ef)=>(_0xfe5e48,_0x5c6a66)=>_0x1e03ef(_0xfe5e48,_0x5c6a66,_0x4e31dc);function X(_0x4dddad,_0x4830a0){const _0x3ed482=_0x566e92,_0x2b3cd6=_0x4dddad[_0x3ed482(0x190)][0x0];return{..._0x4830a0,'id':_0x2b3cd6[_0x3ed482(0x1ae)],'resolved':_0x4dddad['solved']===0x1,'dT':y(_0x2b3cd6[_0x3ed482(0x1bf)]),'personId':_0x2b3cd6['userId'],'threadId':_0x2b3cd6['threadId']};}function ee(_0x315331,_0x5225d0,_0x45cbfb){const _0x41a946=_0x566e92;var _0x2f2781,_0x59de68;if(((_0x59de68=(_0x2f2781=_0x315331==null?void 0x0:_0x315331[_0x41a946(0x190)])==null?void 0x0:_0x2f2781[_0x41a946(0x1c1)])!=null?_0x59de68:0x0)>0x0){const _0x475fe9=(_0x35f434,_0x1146b8)=>({'id':_0x35f434['replyId'],'threadId':_0x35f434['threadId'],'dT':y(_0x35f434[_0x41a946(0x1bf)]),'personId':_0x35f434[_0x41a946(0x19d)],'resolved':_0x315331['solved']===I[_0x41a946(0x192)],'unitId':_0x5225d0,'subUnitId':_0x45cbfb,'text':JSON[_0x41a946(0x1d7)](_0x35f434[_0x41a946(0x19c)]),'parentId':_0x1146b8}),_0x17b98d=_0x475fe9(_0x315331[_0x41a946(0x190)][0x0]);return{..._0x17b98d,'children':_0x315331['replies'][_0x41a946(0x1aa)](0x1)[_0x41a946(0x1c2)](_0x21b9b8=>_0x475fe9(_0x21b9b8,_0x17b98d['id']))};}return null;}function _0x4978(_0x2e8473,_0x14a663){_0x2e8473=_0x2e8473-0x17a;const _0x246c73=_0x246c();let _0x4978ed=_0x246c73[_0x2e8473];return _0x4978ed;}function _0x246c(){const _0x42e02a=['_httpService','unitId','getUser','updateComment','format','/add','_config','reply','createTimestamp','245065UcGrDW','length','map','Delete','2097704pMVOir','_configService','root','type','/delete','commentUpdate$','getMemberID','UNRECOGNIZED','onStarting','Reply','3906726bdBuof','Add','forEach','listComments','pipe','syncUpdateMutationToColla','addUser','get','customRanges','parse','thread-comment-data-source.config','getOwnPropertyDescriptor','values','ref','delete','459266BVNWdE','payload','threadId','/universer-api/comment/unit/','9947007nrrwdv','onReady','addComment','12RudHoH','requireSession','_injector','_initUserSync','_threadCommentDataSourceService','pluginName','find','stringify','add','7473438niRlcW','getCurrentUser','personId','/list','filter','replies','post','Solved','UNIVER_UNKNOWN','comments','size','user','/reply','_threadCommentDataSource','deleteComment','_init','rangeId','content','userId','saveCommentToSnapshot','dataSource','userID','_threadCommentModel','_initDataSource','resolveComment','1135107xIKmJr','Solve','disposeWithMe','code','COMMENT','rangeType','slice','_sessionService','_commentService','OpenOrReOpen','replyId','7hbXvVG','Edit','body','/solved','setConfig','solved','_userService','error'];_0x246c=function(){return _0x42e02a;};return _0x246c();}let S=class{constructor(_0x4635db,_0x2e161b,_0x34cd79){const _0x3eb3d6=_0x566e92;this['_httpService']=_0x4635db,this[_0x3eb3d6(0x1b5)]=_0x2e161b,this[_0x3eb3d6(0x1ab)]=_0x34cd79;}async['addComment'](_0x55d157){const _0x324ee0=_0x566e92;var _0x3f0b43,_0x145f0f;const {parentId:_0x3f8e8c,unitId:_0x1b23e9,text:_0x5b2696,threadId:_0xffca03}=_0x55d157,_0x1ee016=(_0x145f0f=(_0x3f0b43=_0x5b2696['customRanges'])==null?void 0x0:_0x3f0b43[_0x324ee0(0x18f)](_0x398ad0=>_0x398ad0[_0x324ee0(0x1a9)]===_0x5deff7[_0x324ee0(0x1a8)])[_0x324ee0(0x1c2)](_0xbf3763=>_0xbf3763[_0x324ee0(0x19b)]))!=null?_0x145f0f:[],_0x145931=JSON[_0x324ee0(0x189)](_0x5b2696),_0x39f568=(await this[_0x324ee0(0x1ab)][_0x324ee0(0x183)](_0x1b23e9))[_0x324ee0(0x1ca)]();if(_0x3f8e8c){const _0x2802c5={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016,'threadId':_0xffca03},_0x1750e4=(await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x197),{'body':_0x2802c5}))[_0x324ee0(0x1b1)][_0x324ee0(0x1be)];return{..._0x55d157,'id':_0x1750e4[_0x324ee0(0x1ae)],'dT':_0x2a6e24(+_0x1750e4[_0x324ee0(0x1bf)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1750e4[_0x324ee0(0x19d)]};}else{const _0x3b5c8d={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016},_0x52dd8c=await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x1bc),{'body':_0x3b5c8d});return X(_0x52dd8c[_0x324ee0(0x1b1)]['comment'],_0x55d157);}}async[_0x566e92(0x1ba)](_0x26cf02){const _0x45b8de=_0x566e92;var _0x1da307,_0x58c17f;const {text:_0xc6bd56,unitId:_0x11530b}=_0x26cf02,_0x33160=(_0x58c17f=(_0x1da307=_0xc6bd56[_0x45b8de(0x1d6)])==null?void 0x0:_0x1da307[_0x45b8de(0x18f)](_0x219568=>_0x219568[_0x45b8de(0x1a9)]===_0x5deff7['COMMENT'])['map'](_0x494c58=>_0x494c58[_0x45b8de(0x19b)]))!=null?_0x58c17f:[],_0x2f0e0d=JSON['stringify'](_0xc6bd56),_0x1c7215=_0x26cf02[_0x45b8de(0x17d)],_0x5d7214=_0x26cf02['id'],_0x39d2d8={'memberId':(await this['_sessionService'][_0x45b8de(0x183)](_0x11530b))[_0x45b8de(0x1ca)](),'unitId':_0x11530b,'threadId':_0x1c7215,'mention':_0x33160,'content':_0x2f0e0d,'replyId':_0x5d7214},_0x3abf0f=await this[_0x45b8de(0x1b7)]['post'](_0x45b8de(0x17e)+_0x11530b+'/edit',{'body':_0x39d2d8});return!_0x3abf0f[_0x45b8de(0x1b1)]['error']||_0x3abf0f[_0x45b8de(0x1b1)][_0x45b8de(0x1b6)][_0x45b8de(0x1a7)]===0x1;}async[_0x566e92(0x1a3)](_0x4399d9){const _0x11ed0e=_0x566e92,{unitId:_0x3d244e}=_0x4399d9,_0x144746=_0x4399d9['threadId'],_0x5704ee={'memberId':this[_0x11ed0e(0x1b5)][_0x11ed0e(0x18c)]()[_0x11ed0e(0x1a0)],'unitId':_0x3d244e,'threadId':_0x144746,'solved':_0x4399d9['resolved']?I[_0x11ed0e(0x192)]:I[_0x11ed0e(0x1ad)]},_0x6f25b2=await this[_0x11ed0e(0x1b7)]['post'](_0x11ed0e(0x17e)+_0x3d244e+_0x11ed0e(0x1b2),{'body':_0x5704ee});return!_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)]||_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)][_0x11ed0e(0x1a7)]===0x1;}async[_0x566e92(0x199)](_0x431b40,_0xb61162,_0x50c8ee,_0x2d95f2){const _0x720422=_0x566e92,_0x36d9b0={'memberId':(await this[_0x720422(0x1ab)][_0x720422(0x183)](_0x431b40))[_0x720422(0x1ca)](),'threadId':_0x50c8ee,'replyId':_0x2d95f2,'unitId':_0x431b40},_0x30a198=await this[_0x720422(0x1b7)]['post'](_0x720422(0x17e)+_0x431b40+_0x720422(0x1c8),{'body':_0x36d9b0});return!_0x30a198[_0x720422(0x1b1)][_0x720422(0x1b6)]||_0x30a198['body'][_0x720422(0x1b6)][_0x720422(0x1a7)]===0x1;}async[_0x566e92(0x1d1)](_0x34d883,_0x2c75ce,_0x2def2b){const _0x2efd0c=_0x566e92,_0x3127a8={'unitId':_0x34d883,'threadId':_0x2def2b},_0x1a1361=await this[_0x2efd0c(0x1b7)][_0x2efd0c(0x191)]('/universer-api/comment/unit/'+_0x34d883+_0x2efd0c(0x18e),{'body':_0x3127a8}),_0x2b4838=_0x2def2b['map'](_0x496bbe=>ee(_0x1a1361[_0x2efd0c(0x1b1)][_0x2efd0c(0x194)][_0x496bbe],_0x34d883,_0x2c75ce))[_0x2efd0c(0x18f)](Boolean);return Object[_0x2efd0c(0x1da)](_0x1a1361[_0x2efd0c(0x1b1)]['users'])[_0x2efd0c(0x1d0)](_0x204390=>{const _0x53b07d=_0x2efd0c;this[_0x53b07d(0x1b5)][_0x53b07d(0x1d4)](_0x204390);}),_0x2b4838;}[_0x566e92(0x19e)](_0x1c54fb){const _0x44d066=_0x566e92;return{'id':_0x1c54fb['id'],'threadId':_0x1c54fb[_0x44d066(0x17d)],'ref':_0x1c54fb[_0x44d066(0x1db)]};}};S=Q([b(0x0,_0x228d0a(_0x38e1d4)),b(0x1,_0x228d0a(_0x2b454a)),b(0x2,_0x228d0a(_0x19134d))],S);var re=Object[_0x566e92(0x1d9)],te=(_0x4d767c,_0x501601,_0x37ebf1,_0x2ec760)=>{const _0x2dcdb7=_0x566e92;for(var _0xe5d630=_0x2ec760>0x1?void 0x0:_0x2ec760?re(_0x501601,_0x37ebf1):_0x501601,_0x18be74=_0x4d767c[_0x2dcdb7(0x1c1)]-0x1,_0x4b8bc2;_0x18be74>=0x0;_0x18be74--)(_0x4b8bc2=_0x4d767c[_0x18be74])&&(_0xe5d630=_0x4b8bc2(_0xe5d630)||_0xe5d630);return _0xe5d630;},M=(_0x2d48ba,_0x40c9fc)=>(_0x1f0988,_0x2a43ea)=>_0x40c9fc(_0x1f0988,_0x2a43ea,_0x2d48ba);let f=class extends _0x32bfe7{constructor(_0x38c894,_0x2d11c7){const _0x21f561=_0x566e92;super(),this[_0x21f561(0x186)]=_0x38c894,this[_0x21f561(0x198)]=_0x2d11c7,this[_0x21f561(0x1a2)]();}[_0x566e92(0x1a2)](){const _0x38a7e2=_0x566e92;this[_0x38a7e2(0x186)][_0x38a7e2(0x19f)]=this[_0x38a7e2(0x198)],this[_0x38a7e2(0x186)][_0x38a7e2(0x1d3)]=!0x1;}};f=te([M(0x0,_0x505b6d),M(0x1,_0x228d0a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5abbfa,_0x1ad024,_0x4c70f3)=>_0x1ad024 in _0x5abbfa?se(_0x5abbfa,_0x1ad024,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c70f3}):_0x5abbfa[_0x1ad024]=_0x4c70f3,ie=(_0x25f4b1,_0x5a872d,_0x163863,_0x3ea07f)=>{const _0x2e7586=_0x566e92;for(var _0x30f392=_0x3ea07f>0x1?void 0x0:_0x3ea07f?oe(_0x5a872d,_0x163863):_0x5a872d,_0x1fcda5=_0x25f4b1[_0x2e7586(0x1c1)]-0x1,_0x569861;_0x1fcda5>=0x0;_0x1fcda5--)(_0x569861=_0x25f4b1[_0x1fcda5])&&(_0x30f392=_0x569861(_0x30f392)||_0x30f392);return _0x30f392;},N=(_0x5731a1,_0x2f5d71)=>(_0x1d6782,_0x43b46b)=>_0x2f5d71(_0x1d6782,_0x43b46b,_0x5731a1),$=(_0x247c28,_0x865b9a,_0x29865e)=>ne(_0x247c28,typeof _0x865b9a!='symbol'?_0x865b9a+'':_0x865b9a,_0x29865e);let g=class extends _0x4a70cc{constructor(_0x4750d7=O,_0x29d03c,_0x33b68d){const _0x153224=_0x566e92;super(),this[_0x153224(0x1bd)]=_0x4750d7,this['_injector']=_0x29d03c,this[_0x153224(0x1c5)]=_0x33b68d;const {..._0x577e68}=_0xa2d842({},O,this[_0x153224(0x1bd)]);this[_0x153224(0x1c5)][_0x153224(0x1b3)](z,_0x577e68);}[_0x566e92(0x1cc)](){const _0x18610c=_0x566e92;[[S],[f],[_]][_0x18610c(0x1d0)](_0x5acffd=>{const _0x2b5f70=_0x18610c;this['_injector'][_0x2b5f70(0x18a)](_0x5acffd);});}[_0x566e92(0x180)](){const _0x543873=_0x566e92;this[_0x543873(0x184)][_0x543873(0x1d5)](f),this[_0x543873(0x184)]['get'](_);}};$(g,_0x566e92(0x187),W),$(g,_0x566e92(0x1c7),_0x2ef3d3[_0x566e92(0x193)]),g=ie([_0x512e62(_0x3f1117,_0x428713,_0x56de4c),N(0x1,_0x228d0a(_0x10100d)),N(0x2,_0x5c0e15)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x86cbf5=_0x5d7f;(function(_0x117666,_0x4b58f0){const _0x2a811a=_0x5d7f,_0x23cc3a=_0x117666();while(!![]){try{const _0x5a1677=-parseInt(_0x2a811a(0xe5))/0x1+-parseInt(_0x2a811a(0xdf))/0x2+parseInt(_0x2a811a(0xf5))/0x3+-parseInt(_0x2a811a(0xee))/0x4*(parseInt(_0x2a811a(0x101))/0x5)+-parseInt(_0x2a811a(0xdd))/0x6*(parseInt(_0x2a811a(0x103))/0x7)+-parseInt(_0x2a811a(0xc8))/0x8+parseInt(_0x2a811a(0x108))/0x9*(parseInt(_0x2a811a(0x105))/0xa);if(_0x5a1677===_0x4b58f0)break;else _0x23cc3a['push'](_0x23cc3a['shift']());}catch(_0x4aaf55){_0x23cc3a['push'](_0x23cc3a['shift']());}}}(_0x56ef,0x72c00));import{CommentService as _0x52eb93,CollaborationSessionService as _0x37c9b3,UniverCollaborationClientPlugin as _0x341643}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2e99e7}from'@univerjs-pro/license';import{dayjs as _0xf6a523,UserManagerService as _0x19b7d2,Inject as _0x391d25,Injector as _0x16d21e,Disposable as _0xac9089,CustomRangeType as _0x30218b,UniverInstanceType as _0x151aad,DependentOn as _0x53e780,Plugin as _0xcdf00d,merge as _0x5297c7,IConfigService as _0x34235b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9b63b3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x78788c,IThreadCommentDataSourceService as _0x4ff8e3}from'@univerjs/thread-comment';import{bufferTime as _0x515bb3}from'rxjs';import{HTTPService as _0x6eed4a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1d6073=>(_0x1d6073[_0x1d6073[_0x86cbf5(0xbf)]=0x0]='OpenOrReOpen',_0x1d6073[_0x1d6073[_0x86cbf5(0x100)]=0x1]=_0x86cbf5(0x100),_0x1d6073[_0x1d6073['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1d6073))(I||{}),v=(_0xc37026=>(_0xc37026[_0xc37026[_0x86cbf5(0xe6)]=0x0]=_0x86cbf5(0xe6),_0xc37026[_0xc37026[_0x86cbf5(0x10c)]=0x1]='Add',_0xc37026[_0xc37026[_0x86cbf5(0xfd)]=0x2]=_0x86cbf5(0xfd),_0xc37026[_0xc37026[_0x86cbf5(0xfa)]=0x3]=_0x86cbf5(0xfa),_0xc37026[_0xc37026['Delete']=0x4]=_0x86cbf5(0xf8),_0xc37026[_0xc37026[_0x86cbf5(0xca)]=0x5]=_0x86cbf5(0xca),_0xc37026[_0xc37026['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xc37026))(v||{});const y=_0xa584ed=>_0xf6a523(new Date(+_0xa584ed))[_0x86cbf5(0x11a)](_0x86cbf5(0xdc)),B=async(_0x200004,_0x1db96d)=>{const _0x3d2181=_0x86cbf5,_0x209b92=_0x200004[_0x3d2181(0x110)](_0x19b7d2),_0x32e102=_0x200004[_0x3d2181(0x110)](_0x6eed4a);_0x1db96d[_0x3d2181(0xf6)](_0xe9545c=>{const _0x32ac35=_0x3d2181;_0x209b92['getUser'](_0xe9545c)&&_0x1db96d[_0x32ac35(0x113)](_0xe9545c);}),_0x1db96d['size']&&(await _0x32e102['get'](_0x3d2181(0xd6),{'params':{'userIDs':[..._0x1db96d]}}))[_0x3d2181(0x10d)]['users'][_0x3d2181(0xf6)](_0x219388=>{const _0x43c80a=_0x3d2181;_0x219388&&_0x209b92[_0x43c80a(0xe0)](_0x219388);});};var K=Object[_0x86cbf5(0xcd)],V=(_0x3a7b3b,_0x137716,_0x46749a,_0x4075a5)=>{const _0x39be8e=_0x86cbf5;for(var _0x1f7dcc=_0x4075a5>0x1?void 0x0:_0x4075a5?K(_0x137716,_0x46749a):_0x137716,_0x1dc2d1=_0x3a7b3b[_0x39be8e(0xd8)]-0x1,_0xabde4;_0x1dc2d1>=0x0;_0x1dc2d1--)(_0xabde4=_0x3a7b3b[_0x1dc2d1])&&(_0x1f7dcc=_0xabde4(_0x1f7dcc)||_0x1f7dcc);return _0x1f7dcc;},p=(_0x20be10,_0x658855)=>(_0x546dd2,_0x229000)=>_0x658855(_0x546dd2,_0x229000,_0x20be10);let _=class extends _0xac9089{constructor(_0x195fed,_0x164b59,_0x27fabf,_0x1e0508){const _0x22bbe4=_0x86cbf5;super(),this[_0x22bbe4(0xd7)]=_0x195fed,this[_0x22bbe4(0xbd)]=_0x164b59,this[_0x22bbe4(0xeb)]=_0x27fabf,this[_0x22bbe4(0x10b)]=_0x1e0508,this[_0x22bbe4(0xe8)](),this[_0x22bbe4(0xe4)]();}[_0x86cbf5(0xe4)](){const _0xa15162=_0x86cbf5;this[_0xa15162(0xc2)](this['_threadCommentModel'][_0xa15162(0xd3)][_0xa15162(0xd9)](_0x515bb3(0x10))[_0xa15162(0x109)](_0x25000f=>{const _0x15be72=_0xa15162,_0x5e686c=new Set();_0x25000f[_0x15be72(0xf6)](_0x2246f8=>{const _0x21b388=_0x15be72;if(_0x2246f8[_0x21b388(0x114)]===_0x21b388(0xbe)){const _0x5ec18d=_0x2246f8[_0x21b388(0xdb)][_0x21b388(0xbc)];_0x5e686c[_0x21b388(0xbe)](_0x5ec18d);}}),B(this[_0x15be72(0x10b)],_0x5e686c);}));}[_0x86cbf5(0xe8)](){const _0x145842=_0x86cbf5;this[_0x145842(0xc2)](this[_0x145842(0xd7)]['commentUpdate$'][_0x145842(0x109)](async _0x31891e=>{const _0x32ef84=_0x145842;var _0x391bd4,_0x5cc79c,_0x1fda0c,_0x4baf2f;const _0x329d52=(_0x391bd4=this['_threadCommentModel']['getUnit'](_0x31891e[_0x32ef84(0x118)])[_0x32ef84(0xf2)](_0x4b0482=>_0x4b0482[_0x32ef84(0x10f)]===_0x31891e[_0x32ef84(0x10f)]))==null?void 0x0:_0x391bd4['root'];if(!_0x329d52)return;const {unitId:_0x39dfee,subUnitId:_0x26dab7}=_0x329d52;switch(_0x31891e[_0x32ef84(0xc0)]&&this[_0x32ef84(0xeb)][_0x32ef84(0xe0)](_0x31891e[_0x32ef84(0xc0)]),_0x31891e[_0x32ef84(0x114)]){case v['Add']:break;case v[_0x32ef84(0xfd)]:{this['_threadCommentModel'][_0x32ef84(0x107)](_0x39dfee,_0x26dab7,{'unitId':_0x39dfee,'subUnitId':_0x26dab7,'ref':'','id':_0x31891e[_0x32ef84(0x11e)],'dT':y(+_0x31891e[_0x32ef84(0x11b)]),'threadId':_0x31891e[_0x32ef84(0x10f)],'personId':(_0x1fda0c=(_0x5cc79c=_0x31891e[_0x32ef84(0xc0)])==null?void 0x0:_0x5cc79c[_0x32ef84(0x111)])!=null?_0x1fda0c:_0x31891e['userId'],'text':JSON['parse'](_0x31891e[_0x32ef84(0xed)]),'parentId':_0x329d52['id']});break;}case v[_0x32ef84(0xf8)]:{const _0x558b89=this['_threadCommentModel']['getComment'](_0x39dfee,_0x26dab7,_0x31891e['replyId']);_0x558b89&&_0x558b89[_0x32ef84(0xcf)]&&this[_0x32ef84(0xbd)][_0x32ef84(0xd2)](_0x39dfee,_0x26dab7,_0x31891e['replyId']);break;}case v['Edit']:{this[_0x32ef84(0xbd)][_0x32ef84(0xe2)](_0x39dfee,_0x26dab7,{'commentId':_0x31891e[_0x32ef84(0x11e)],'text':JSON[_0x32ef84(0xc1)](_0x31891e[_0x32ef84(0xed)])});break;}case v[_0x32ef84(0xca)]:{const _0x3a2822=(_0x4baf2f=this[_0x32ef84(0xbd)][_0x32ef84(0xda)](_0x31891e[_0x32ef84(0x118)])[_0x32ef84(0xf2)](_0x538c6b=>_0x538c6b[_0x32ef84(0x10f)]===_0x31891e[_0x32ef84(0x10f)]))==null?void 0x0:_0x4baf2f[_0x32ef84(0xe9)];_0x3a2822&&this[_0x32ef84(0xbd)]['resolveComment'](_0x39dfee,_0x26dab7,_0x3a2822['id'],_0x31891e[_0x32ef84(0x117)]===I[_0x32ef84(0x100)]);break;}}}));}};_=V([p(0x0,_0x391d25(_0x52eb93)),p(0x1,_0x391d25(_0x78788c)),p(0x2,_0x391d25(_0x19b7d2)),p(0x3,_0x391d25(_0x16d21e))],_);const z=_0x86cbf5(0xff),O={};var k=Object[_0x86cbf5(0xcd)],Q=(_0x34a864,_0x1ca008,_0x4ccbb3,_0xabd10)=>{for(var _0x188529=_0xabd10>0x1?void 0x0:_0xabd10?k(_0x1ca008,_0x4ccbb3):_0x1ca008,_0x419583=_0x34a864['length']-0x1,_0x6d8932;_0x419583>=0x0;_0x419583--)(_0x6d8932=_0x34a864[_0x419583])&&(_0x188529=_0x6d8932(_0x188529)||_0x188529);return _0x188529;},b=(_0x33cdb5,_0x342c6b)=>(_0x488288,_0xdf9a4d)=>_0x342c6b(_0x488288,_0xdf9a4d,_0x33cdb5);function _0x5d7f(_0x5bbca9,_0x2334e9){_0x5bbca9=_0x5bbca9-0xbc;const _0x56efce=_0x56ef();let _0x5d7fb8=_0x56efce[_0x5bbca9];return _0x5d7fb8;}function X(_0x129440,_0x441261){const _0x142c8c=_0x86cbf5,_0x538a69=_0x129440['replies'][0x0];return{..._0x441261,'id':_0x538a69[_0x142c8c(0x11e)],'resolved':_0x129440[_0x142c8c(0x117)]===0x1,'dT':y(_0x538a69[_0x142c8c(0x11b)]),'personId':_0x538a69[_0x142c8c(0x112)],'threadId':_0x538a69[_0x142c8c(0x10f)]};}function ee(_0x3b40ef,_0x5394c8,_0x493c3c){const _0x20d362=_0x86cbf5;var _0x329340,_0x193743;if(((_0x193743=(_0x329340=_0x3b40ef==null?void 0x0:_0x3b40ef[_0x20d362(0xf9)])==null?void 0x0:_0x329340['length'])!=null?_0x193743:0x0)>0x0){const _0x135404=(_0x21ce35,_0x3d4e32)=>({'id':_0x21ce35['replyId'],'threadId':_0x21ce35[_0x20d362(0x10f)],'dT':y(_0x21ce35['createTimestamp']),'personId':_0x21ce35['userId'],'resolved':_0x3b40ef[_0x20d362(0x117)]===I[_0x20d362(0x100)],'unitId':_0x5394c8,'subUnitId':_0x493c3c,'text':JSON[_0x20d362(0xc1)](_0x21ce35[_0x20d362(0xed)]),'parentId':_0x3d4e32}),_0x2a3983=_0x135404(_0x3b40ef[_0x20d362(0xf9)][0x0]);return{..._0x2a3983,'children':_0x3b40ef['replies'][_0x20d362(0x11c)](0x1)[_0x20d362(0x11f)](_0x57456f=>_0x135404(_0x57456f,_0x2a3983['id']))};}return null;}let S=class{constructor(_0x30a9a3,_0x245ba8,_0x43c75e){const _0x3be8b2=_0x86cbf5;this[_0x3be8b2(0xce)]=_0x30a9a3,this['_userService']=_0x245ba8,this['_sessionService']=_0x43c75e;}async[_0x86cbf5(0x107)](_0x487568){const _0x100bf7=_0x86cbf5;var _0x2f7bb9,_0x34e5f8;const {parentId:_0x1c44df,unitId:_0x40fc53,text:_0x157fa8,threadId:_0x23d0a0}=_0x487568,_0x5569fb=(_0x34e5f8=(_0x2f7bb9=_0x157fa8[_0x100bf7(0x10a)])==null?void 0x0:_0x2f7bb9[_0x100bf7(0xf1)](_0x2e9fe4=>_0x2e9fe4['rangeType']===_0x30218b[_0x100bf7(0xf0)])[_0x100bf7(0x11f)](_0x3c1b67=>_0x3c1b67[_0x100bf7(0x106)]))!=null?_0x34e5f8:[],_0x1e8919=JSON[_0x100bf7(0xef)](_0x157fa8),_0x327015=(await this[_0x100bf7(0xd0)]['requireSession'](_0x40fc53))[_0x100bf7(0xc7)]();if(_0x1c44df){const _0x2c7e33={'memberId':_0x327015,'unitId':_0x40fc53,'content':_0x1e8919,'mention':_0x5569fb,'threadId':_0x23d0a0},_0x2bd3cf=(await this[_0x100bf7(0xce)][_0x100bf7(0xea)](_0x100bf7(0xc3)+_0x40fc53+_0x100bf7(0xc4),{'body':_0x2c7e33}))[_0x100bf7(0x10d)][_0x100bf7(0x11d)];return{..._0x487568,'id':_0x2bd3cf[_0x100bf7(0x11e)],'dT':_0xf6a523(+_0x2bd3cf[_0x100bf7(0x11b)])['format'](_0x100bf7(0xdc)),'personId':_0x2bd3cf['userId']};}else{const _0xfb9099={'memberId':_0x327015,'unitId':_0x40fc53,'content':_0x1e8919,'mention':_0x5569fb},_0x35e7e1=await this[_0x100bf7(0xce)]['post']('/universer-api/comment/unit/'+_0x40fc53+'/add',{'body':_0xfb9099});return X(_0x35e7e1[_0x100bf7(0x10d)][_0x100bf7(0xc5)],_0x487568);}}async['updateComment'](_0x318b4e){const _0x2ba6ad=_0x86cbf5;var _0x4463f2,_0x266363;const {text:_0x322158,unitId:_0x290682}=_0x318b4e,_0x1ddca7=(_0x266363=(_0x4463f2=_0x322158[_0x2ba6ad(0x10a)])==null?void 0x0:_0x4463f2[_0x2ba6ad(0xf1)](_0x1d7e80=>_0x1d7e80[_0x2ba6ad(0x104)]===_0x30218b[_0x2ba6ad(0xf0)])[_0x2ba6ad(0x11f)](_0x3d8988=>_0x3d8988[_0x2ba6ad(0x106)]))!=null?_0x266363:[],_0x5b81a4=JSON[_0x2ba6ad(0xef)](_0x322158),_0x5e0d8a=_0x318b4e[_0x2ba6ad(0x10f)],_0x5855c8=_0x318b4e['id'],_0x49e85a={'memberId':(await this[_0x2ba6ad(0xd0)]['requireSession'](_0x290682))[_0x2ba6ad(0xc7)](),'unitId':_0x290682,'threadId':_0x5e0d8a,'mention':_0x1ddca7,'content':_0x5b81a4,'replyId':_0x5855c8},_0x2a2a6e=await this[_0x2ba6ad(0xce)][_0x2ba6ad(0xea)](_0x2ba6ad(0xc3)+_0x290682+_0x2ba6ad(0xf3),{'body':_0x49e85a});return!_0x2a2a6e[_0x2ba6ad(0x10d)][_0x2ba6ad(0xfb)]||_0x2a2a6e[_0x2ba6ad(0x10d)][_0x2ba6ad(0xfb)]['code']===0x1;}async[_0x86cbf5(0xcb)](_0x5d2048){const _0x1d7a33=_0x86cbf5,{unitId:_0x56f537}=_0x5d2048,_0x281e31=_0x5d2048['threadId'],_0x3a2c01={'memberId':this[_0x1d7a33(0xeb)][_0x1d7a33(0xec)]()['userID'],'unitId':_0x56f537,'threadId':_0x281e31,'solved':_0x5d2048[_0x1d7a33(0xe7)]?I[_0x1d7a33(0x100)]:I['OpenOrReOpen']},_0xbbe77c=await this[_0x1d7a33(0xce)][_0x1d7a33(0xea)](_0x1d7a33(0xc3)+_0x56f537+'/solved',{'body':_0x3a2c01});return!_0xbbe77c[_0x1d7a33(0x10d)][_0x1d7a33(0xfb)]||_0xbbe77c[_0x1d7a33(0x10d)][_0x1d7a33(0xfb)]['code']===0x1;}async[_0x86cbf5(0xd2)](_0x4ca655,_0x4df0e7,_0xc9bb44,_0x1b8aae){const _0x37ec2e=_0x86cbf5,_0x4ef762={'memberId':(await this['_sessionService'][_0x37ec2e(0xf4)](_0x4ca655))['getMemberID'](),'threadId':_0xc9bb44,'replyId':_0x1b8aae,'unitId':_0x4ca655},_0x51e637=await this[_0x37ec2e(0xce)]['post']('/universer-api/comment/unit/'+_0x4ca655+_0x37ec2e(0xd5),{'body':_0x4ef762});return!_0x51e637[_0x37ec2e(0x10d)][_0x37ec2e(0xfb)]||_0x51e637['body'][_0x37ec2e(0xfb)][_0x37ec2e(0xc9)]===0x1;}async[_0x86cbf5(0x102)](_0x58839b,_0x3c865a,_0x2c3357){const _0x43ab00=_0x86cbf5,_0x58fda5={'unitId':_0x58839b,'threadId':_0x2c3357},_0x1c5c31=await this[_0x43ab00(0xce)][_0x43ab00(0xea)](_0x43ab00(0xc3)+_0x58839b+_0x43ab00(0xfc),{'body':_0x58fda5}),_0x5e2024=_0x2c3357[_0x43ab00(0x11f)](_0x5db052=>ee(_0x1c5c31[_0x43ab00(0x10d)][_0x43ab00(0xfe)][_0x5db052],_0x58839b,_0x3c865a))[_0x43ab00(0xf1)](Boolean);return Object['values'](_0x1c5c31[_0x43ab00(0x10d)][_0x43ab00(0x116)])[_0x43ab00(0xf6)](_0x4378eb=>{const _0x483abc=_0x43ab00;this[_0x483abc(0xeb)][_0x483abc(0xe0)](_0x4378eb);}),_0x5e2024;}['saveCommentToSnapshot'](_0x2345fb){const _0x553c14=_0x86cbf5;return{'id':_0x2345fb['id'],'threadId':_0x2345fb[_0x553c14(0x10f)],'ref':_0x2345fb['ref']};}};S=Q([b(0x0,_0x391d25(_0x6eed4a)),b(0x1,_0x391d25(_0x19b7d2)),b(0x2,_0x391d25(_0x37c9b3))],S);var re=Object[_0x86cbf5(0xcd)],te=(_0x2a8943,_0x129db3,_0x102a78,_0xea53)=>{const _0x551127=_0x86cbf5;for(var _0x1235d2=_0xea53>0x1?void 0x0:_0xea53?re(_0x129db3,_0x102a78):_0x129db3,_0xf70ae0=_0x2a8943[_0x551127(0xd8)]-0x1,_0x2443dd;_0xf70ae0>=0x0;_0xf70ae0--)(_0x2443dd=_0x2a8943[_0xf70ae0])&&(_0x1235d2=_0x2443dd(_0x1235d2)||_0x1235d2);return _0x1235d2;},M=(_0x7dda8b,_0x162e36)=>(_0x3d5aec,_0x3adafd)=>_0x162e36(_0x3d5aec,_0x3adafd,_0x7dda8b);let f=class extends _0xac9089{constructor(_0x197a95,_0x32a56d){const _0x582e3c=_0x86cbf5;super(),this[_0x582e3c(0xd1)]=_0x197a95,this[_0x582e3c(0x115)]=_0x32a56d,this[_0x582e3c(0x120)]();}[_0x86cbf5(0x120)](){const _0x5dcae2=_0x86cbf5;this[_0x5dcae2(0xd1)][_0x5dcae2(0xde)]=this[_0x5dcae2(0x115)],this[_0x5dcae2(0xd1)][_0x5dcae2(0xf7)]=!0x1;}};f=te([M(0x0,_0x4ff8e3),M(0x1,_0x391d25(S))],f);var se=Object[_0x86cbf5(0xe1)],oe=Object[_0x86cbf5(0xcd)],ne=(_0x4fde1e,_0x5478e3,_0x5ea69c)=>_0x5478e3 in _0x4fde1e?se(_0x4fde1e,_0x5478e3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5ea69c}):_0x4fde1e[_0x5478e3]=_0x5ea69c,ie=(_0x453a60,_0x1aa6d8,_0x53301c,_0x15732b)=>{for(var _0x3964fe=_0x15732b>0x1?void 0x0:_0x15732b?oe(_0x1aa6d8,_0x53301c):_0x1aa6d8,_0x487fa7=_0x453a60['length']-0x1,_0x64db12;_0x487fa7>=0x0;_0x487fa7--)(_0x64db12=_0x453a60[_0x487fa7])&&(_0x3964fe=_0x64db12(_0x3964fe)||_0x3964fe);return _0x3964fe;},N=(_0x2654b5,_0x37157c)=>(_0x419c50,_0xa7832)=>_0x37157c(_0x419c50,_0xa7832,_0x2654b5),$=(_0x2984bc,_0x4704b8,_0x499fcb)=>ne(_0x2984bc,typeof _0x4704b8!='symbol'?_0x4704b8+'':_0x4704b8,_0x499fcb);let g=class extends _0xcdf00d{constructor(_0x15df1a=O,_0x49ecbb,_0x105724){const _0x4c36dc=_0x86cbf5;super(),this[_0x4c36dc(0xe3)]=_0x15df1a,this['_injector']=_0x49ecbb,this['_configService']=_0x105724;const {..._0x11e1bd}=_0x5297c7({},O,this[_0x4c36dc(0xe3)]);this[_0x4c36dc(0xd4)][_0x4c36dc(0x10e)](z,_0x11e1bd);}[_0x86cbf5(0xc6)](){[[S],[f],[_]]['forEach'](_0x9dd983=>{const _0xf8c799=_0x5d7f;this['_injector'][_0xf8c799(0xbe)](_0x9dd983);});}[_0x86cbf5(0xcc)](){const _0x14fdcc=_0x86cbf5;this[_0x14fdcc(0x10b)][_0x14fdcc(0x110)](f),this[_0x14fdcc(0x10b)][_0x14fdcc(0x110)](_);}};function _0x56ef(){const _0x534b2f=['Delete','replies','Edit','error','/list','Reply','comments','thread-comment-data-source.config','Solved','531840KvHpfi','listComments','12845yFRDtM','rangeType','2050460SYNXlU','rangeId','addComment','153lVhnbc','subscribe','customRanges','_injector','Add','body','setConfig','threadId','get','userID','userId','delete','type','_threadCommentDataSource','users','solved','unitId','pluginName','format','createTimestamp','slice','reply','replyId','map','_initDataSource','personId','_threadCommentModel','add','OpenOrReOpen','user','parse','disposeWithMe','/universer-api/comment/unit/','/reply','comment','onStarting','getMemberID','4838848vvMCAn','code','Solve','resolveComment','onReady','getOwnPropertyDescriptor','_httpService','parentId','_sessionService','_threadCommentDataSourceService','deleteComment','commentUpdate$','_configService','/delete','/universer-api/user/list','_commentService','length','pipe','getUnit','payload','YYYY/MM/DD\x20HH:mm','2724vxCQQH','dataSource','1731912jLakjX','addUser','defineProperty','updateComment','_config','_initUserSync','502416qSyZXW','Unknown','resolved','_init','root','post','_userService','getCurrentUser','content','12vKXJKF','stringify','COMMENT','filter','find','/edit','requireSession','328968kZdiHK','forEach','syncUpdateMutationToColla'];_0x56ef=function(){return _0x534b2f;};return _0x56ef();}$(g,_0x86cbf5(0x119),W),$(g,'type',_0x151aad['UNIVER_UNKNOWN']),g=ie([_0x53e780(_0x9b63b3,_0x341643,_0x2e99e7),N(0x1,_0x391d25(_0x16d21e)),N(0x2,_0x34235b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x566e92=_0x4978;(function(_0x4151f4,_0x5ba13e){const _0xf53b9=_0x4978,_0x18764d=_0x4151f4();while(!![]){try{const _0x3c4c55=parseInt(_0xf53b9(0x1a4))/0x1+parseInt(_0xf53b9(0x17b))/0x2+parseInt(_0xf53b9(0x1ce))/0x3+-parseInt(_0xf53b9(0x182))/0x4*(-parseInt(_0xf53b9(0x1c0))/0x5)+-parseInt(_0xf53b9(0x18b))/0x6*(parseInt(_0xf53b9(0x1af))/0x7)+parseInt(_0xf53b9(0x1c4))/0x8+-parseInt(_0xf53b9(0x17f))/0x9;if(_0x3c4c55===_0x5ba13e)break;else _0x18764d['push'](_0x18764d['shift']());}catch(_0x1665a7){_0x18764d['push'](_0x18764d['shift']());}}}(_0x246c,0xb11be));import{CommentService as _0x2bf8f1,CollaborationSessionService as _0x19134d,UniverCollaborationClientPlugin as _0x428713}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x56de4c}from'@univerjs-pro/license';import{dayjs as _0x2a6e24,UserManagerService as _0x2b454a,Inject as _0x228d0a,Injector as _0x10100d,Disposable as _0x32bfe7,CustomRangeType as _0x5deff7,UniverInstanceType as _0x2ef3d3,DependentOn as _0x512e62,IConfigService as _0x5c0e15,Plugin as _0x4a70cc,merge as _0xa2d842}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3f1117}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e792,IThreadCommentDataSourceService as _0x505b6d}from'@univerjs/thread-comment';import{bufferTime as _0x1d13f7}from'rxjs';import{HTTPService as _0x38e1d4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2fe957=>(_0x2fe957[_0x2fe957['OpenOrReOpen']=0x0]=_0x566e92(0x1ad),_0x2fe957[_0x2fe957[_0x566e92(0x192)]=0x1]=_0x566e92(0x192),_0x2fe957[_0x2fe957['UNRECOGNIZED']=-0x1]=_0x566e92(0x1cb),_0x2fe957))(I||{}),v=(_0x22bda5=>(_0x22bda5[_0x22bda5['Unknown']=0x0]='Unknown',_0x22bda5[_0x22bda5[_0x566e92(0x1cf)]=0x1]=_0x566e92(0x1cf),_0x22bda5[_0x22bda5['Reply']=0x2]=_0x566e92(0x1cd),_0x22bda5[_0x22bda5[_0x566e92(0x1b0)]=0x3]=_0x566e92(0x1b0),_0x22bda5[_0x22bda5[_0x566e92(0x1c3)]=0x4]=_0x566e92(0x1c3),_0x22bda5[_0x22bda5['Solve']=0x5]=_0x566e92(0x1a5),_0x22bda5[_0x22bda5[_0x566e92(0x1cb)]=-0x1]=_0x566e92(0x1cb),_0x22bda5))(v||{});const y=_0x2ebf51=>_0x2a6e24(new Date(+_0x2ebf51))[_0x566e92(0x1bb)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x484a1c,_0x2054c6)=>{const _0x562c9c=_0x566e92,_0x5ad13a=_0x484a1c['get'](_0x2b454a),_0x3d2df6=_0x484a1c[_0x562c9c(0x1d5)](_0x38e1d4);_0x2054c6[_0x562c9c(0x1d0)](_0x3331b7=>{const _0x34ad25=_0x562c9c;_0x5ad13a[_0x34ad25(0x1b9)](_0x3331b7)&&_0x2054c6[_0x34ad25(0x17a)](_0x3331b7);}),_0x2054c6[_0x562c9c(0x195)]&&(await _0x3d2df6['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2054c6]}}))[_0x562c9c(0x1b1)]['users'][_0x562c9c(0x1d0)](_0x24e738=>{const _0x2b3ae3=_0x562c9c;_0x24e738&&_0x5ad13a[_0x2b3ae3(0x1d4)](_0x24e738);});};var K=Object[_0x566e92(0x1d9)],V=(_0x3378e3,_0x54873a,_0x33de9a,_0x1f6117)=>{for(var _0x40f0ca=_0x1f6117>0x1?void 0x0:_0x1f6117?K(_0x54873a,_0x33de9a):_0x54873a,_0x3536b5=_0x3378e3['length']-0x1,_0xaa7fde;_0x3536b5>=0x0;_0x3536b5--)(_0xaa7fde=_0x3378e3[_0x3536b5])&&(_0x40f0ca=_0xaa7fde(_0x40f0ca)||_0x40f0ca);return _0x40f0ca;},p=(_0x15fe6a,_0x2d562b)=>(_0x5e8232,_0x42d333)=>_0x2d562b(_0x5e8232,_0x42d333,_0x15fe6a);let _=class extends _0x32bfe7{constructor(_0x2228ee,_0x5edec9,_0x9e9716,_0xc65a00){const _0xa19c23=_0x566e92;super(),this[_0xa19c23(0x1ac)]=_0x2228ee,this[_0xa19c23(0x1a1)]=_0x5edec9,this['_userService']=_0x9e9716,this[_0xa19c23(0x184)]=_0xc65a00,this[_0xa19c23(0x19a)](),this[_0xa19c23(0x185)]();}['_initUserSync'](){const _0x57e692=_0x566e92;this['disposeWithMe'](this[_0x57e692(0x1a1)][_0x57e692(0x1c9)][_0x57e692(0x1d2)](_0x1d13f7(0x10))['subscribe'](_0x2e7828=>{const _0x1f2996=_0x57e692,_0x27d066=new Set();_0x2e7828['forEach'](_0x451d01=>{const _0x160bc1=_0x4978;if(_0x451d01['type']===_0x160bc1(0x18a)){const _0x3c8c0f=_0x451d01[_0x160bc1(0x17c)][_0x160bc1(0x18d)];_0x27d066[_0x160bc1(0x18a)](_0x3c8c0f);}}),B(this[_0x1f2996(0x184)],_0x27d066);}));}[_0x566e92(0x19a)](){const _0xf2abe2=_0x566e92;this[_0xf2abe2(0x1a6)](this['_commentService'][_0xf2abe2(0x1c9)]['subscribe'](async _0x91ed5b=>{const _0x12e023=_0xf2abe2;var _0x55fc1a,_0x41ac85,_0x3a1d81,_0x29c11e;const _0x16b4df=(_0x55fc1a=this['_threadCommentModel']['getUnit'](_0x91ed5b[_0x12e023(0x1b8)])[_0x12e023(0x188)](_0x1ba272=>_0x1ba272[_0x12e023(0x17d)]===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x55fc1a[_0x12e023(0x1c6)];if(!_0x16b4df)return;const {unitId:_0x5c19df,subUnitId:_0x5ac403}=_0x16b4df;switch(_0x91ed5b[_0x12e023(0x196)]&&this[_0x12e023(0x1b5)][_0x12e023(0x1d4)](_0x91ed5b['user']),_0x91ed5b[_0x12e023(0x1c7)]){case v[_0x12e023(0x1cf)]:break;case v['Reply']:{this['_threadCommentModel'][_0x12e023(0x181)](_0x5c19df,_0x5ac403,{'unitId':_0x5c19df,'subUnitId':_0x5ac403,'ref':'','id':_0x91ed5b[_0x12e023(0x1ae)],'dT':y(+_0x91ed5b[_0x12e023(0x1bf)]),'threadId':_0x91ed5b[_0x12e023(0x17d)],'personId':(_0x3a1d81=(_0x41ac85=_0x91ed5b[_0x12e023(0x196)])==null?void 0x0:_0x41ac85['userID'])!=null?_0x3a1d81:_0x91ed5b[_0x12e023(0x19d)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)]),'parentId':_0x16b4df['id']});break;}case v[_0x12e023(0x1c3)]:{const _0x5b3399=this[_0x12e023(0x1a1)]['getComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);_0x5b3399&&_0x5b3399['parentId']&&this[_0x12e023(0x1a1)]['deleteComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);break;}case v[_0x12e023(0x1b0)]:{this['_threadCommentModel'][_0x12e023(0x1ba)](_0x5c19df,_0x5ac403,{'commentId':_0x91ed5b[_0x12e023(0x1ae)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)])});break;}case v[_0x12e023(0x1a5)]:{const _0x1e4aad=(_0x29c11e=this['_threadCommentModel']['getUnit'](_0x91ed5b['unitId'])[_0x12e023(0x188)](_0x9ca084=>_0x9ca084['threadId']===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x29c11e[_0x12e023(0x1c6)];_0x1e4aad&&this[_0x12e023(0x1a1)]['resolveComment'](_0x5c19df,_0x5ac403,_0x1e4aad['id'],_0x91ed5b[_0x12e023(0x1b4)]===I[_0x12e023(0x192)]);break;}}}));}};_=V([p(0x0,_0x228d0a(_0x2bf8f1)),p(0x1,_0x228d0a(_0x53e792)),p(0x2,_0x228d0a(_0x2b454a)),p(0x3,_0x228d0a(_0x10100d))],_);const z=_0x566e92(0x1d8),O={};var k=Object[_0x566e92(0x1d9)],Q=(_0x1c0a2d,_0x336acf,_0x5e89ed,_0x56b986)=>{const _0x535c20=_0x566e92;for(var _0x54fc48=_0x56b986>0x1?void 0x0:_0x56b986?k(_0x336acf,_0x5e89ed):_0x336acf,_0x293dce=_0x1c0a2d[_0x535c20(0x1c1)]-0x1,_0x24429f;_0x293dce>=0x0;_0x293dce--)(_0x24429f=_0x1c0a2d[_0x293dce])&&(_0x54fc48=_0x24429f(_0x54fc48)||_0x54fc48);return _0x54fc48;},b=(_0x4e31dc,_0x1e03ef)=>(_0xfe5e48,_0x5c6a66)=>_0x1e03ef(_0xfe5e48,_0x5c6a66,_0x4e31dc);function X(_0x4dddad,_0x4830a0){const _0x3ed482=_0x566e92,_0x2b3cd6=_0x4dddad[_0x3ed482(0x190)][0x0];return{..._0x4830a0,'id':_0x2b3cd6[_0x3ed482(0x1ae)],'resolved':_0x4dddad['solved']===0x1,'dT':y(_0x2b3cd6[_0x3ed482(0x1bf)]),'personId':_0x2b3cd6['userId'],'threadId':_0x2b3cd6['threadId']};}function ee(_0x315331,_0x5225d0,_0x45cbfb){const _0x41a946=_0x566e92;var _0x2f2781,_0x59de68;if(((_0x59de68=(_0x2f2781=_0x315331==null?void 0x0:_0x315331[_0x41a946(0x190)])==null?void 0x0:_0x2f2781[_0x41a946(0x1c1)])!=null?_0x59de68:0x0)>0x0){const _0x475fe9=(_0x35f434,_0x1146b8)=>({'id':_0x35f434['replyId'],'threadId':_0x35f434['threadId'],'dT':y(_0x35f434[_0x41a946(0x1bf)]),'personId':_0x35f434[_0x41a946(0x19d)],'resolved':_0x315331['solved']===I[_0x41a946(0x192)],'unitId':_0x5225d0,'subUnitId':_0x45cbfb,'text':JSON[_0x41a946(0x1d7)](_0x35f434[_0x41a946(0x19c)]),'parentId':_0x1146b8}),_0x17b98d=_0x475fe9(_0x315331[_0x41a946(0x190)][0x0]);return{..._0x17b98d,'children':_0x315331['replies'][_0x41a946(0x1aa)](0x1)[_0x41a946(0x1c2)](_0x21b9b8=>_0x475fe9(_0x21b9b8,_0x17b98d['id']))};}return null;}function _0x4978(_0x2e8473,_0x14a663){_0x2e8473=_0x2e8473-0x17a;const _0x246c73=_0x246c();let _0x4978ed=_0x246c73[_0x2e8473];return _0x4978ed;}function _0x246c(){const _0x42e02a=['_httpService','unitId','getUser','updateComment','format','/add','_config','reply','createTimestamp','245065UcGrDW','length','map','Delete','2097704pMVOir','_configService','root','type','/delete','commentUpdate$','getMemberID','UNRECOGNIZED','onStarting','Reply','3906726bdBuof','Add','forEach','listComments','pipe','syncUpdateMutationToColla','addUser','get','customRanges','parse','thread-comment-data-source.config','getOwnPropertyDescriptor','values','ref','delete','459266BVNWdE','payload','threadId','/universer-api/comment/unit/','9947007nrrwdv','onReady','addComment','12RudHoH','requireSession','_injector','_initUserSync','_threadCommentDataSourceService','pluginName','find','stringify','add','7473438niRlcW','getCurrentUser','personId','/list','filter','replies','post','Solved','UNIVER_UNKNOWN','comments','size','user','/reply','_threadCommentDataSource','deleteComment','_init','rangeId','content','userId','saveCommentToSnapshot','dataSource','userID','_threadCommentModel','_initDataSource','resolveComment','1135107xIKmJr','Solve','disposeWithMe','code','COMMENT','rangeType','slice','_sessionService','_commentService','OpenOrReOpen','replyId','7hbXvVG','Edit','body','/solved','setConfig','solved','_userService','error'];_0x246c=function(){return _0x42e02a;};return _0x246c();}let S=class{constructor(_0x4635db,_0x2e161b,_0x34cd79){const _0x3eb3d6=_0x566e92;this['_httpService']=_0x4635db,this[_0x3eb3d6(0x1b5)]=_0x2e161b,this[_0x3eb3d6(0x1ab)]=_0x34cd79;}async['addComment'](_0x55d157){const _0x324ee0=_0x566e92;var _0x3f0b43,_0x145f0f;const {parentId:_0x3f8e8c,unitId:_0x1b23e9,text:_0x5b2696,threadId:_0xffca03}=_0x55d157,_0x1ee016=(_0x145f0f=(_0x3f0b43=_0x5b2696['customRanges'])==null?void 0x0:_0x3f0b43[_0x324ee0(0x18f)](_0x398ad0=>_0x398ad0[_0x324ee0(0x1a9)]===_0x5deff7[_0x324ee0(0x1a8)])[_0x324ee0(0x1c2)](_0xbf3763=>_0xbf3763[_0x324ee0(0x19b)]))!=null?_0x145f0f:[],_0x145931=JSON[_0x324ee0(0x189)](_0x5b2696),_0x39f568=(await this[_0x324ee0(0x1ab)][_0x324ee0(0x183)](_0x1b23e9))[_0x324ee0(0x1ca)]();if(_0x3f8e8c){const _0x2802c5={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016,'threadId':_0xffca03},_0x1750e4=(await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x197),{'body':_0x2802c5}))[_0x324ee0(0x1b1)][_0x324ee0(0x1be)];return{..._0x55d157,'id':_0x1750e4[_0x324ee0(0x1ae)],'dT':_0x2a6e24(+_0x1750e4[_0x324ee0(0x1bf)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1750e4[_0x324ee0(0x19d)]};}else{const _0x3b5c8d={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016},_0x52dd8c=await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x1bc),{'body':_0x3b5c8d});return X(_0x52dd8c[_0x324ee0(0x1b1)]['comment'],_0x55d157);}}async[_0x566e92(0x1ba)](_0x26cf02){const _0x45b8de=_0x566e92;var _0x1da307,_0x58c17f;const {text:_0xc6bd56,unitId:_0x11530b}=_0x26cf02,_0x33160=(_0x58c17f=(_0x1da307=_0xc6bd56[_0x45b8de(0x1d6)])==null?void 0x0:_0x1da307[_0x45b8de(0x18f)](_0x219568=>_0x219568[_0x45b8de(0x1a9)]===_0x5deff7['COMMENT'])['map'](_0x494c58=>_0x494c58[_0x45b8de(0x19b)]))!=null?_0x58c17f:[],_0x2f0e0d=JSON['stringify'](_0xc6bd56),_0x1c7215=_0x26cf02[_0x45b8de(0x17d)],_0x5d7214=_0x26cf02['id'],_0x39d2d8={'memberId':(await this['_sessionService'][_0x45b8de(0x183)](_0x11530b))[_0x45b8de(0x1ca)](),'unitId':_0x11530b,'threadId':_0x1c7215,'mention':_0x33160,'content':_0x2f0e0d,'replyId':_0x5d7214},_0x3abf0f=await this[_0x45b8de(0x1b7)]['post'](_0x45b8de(0x17e)+_0x11530b+'/edit',{'body':_0x39d2d8});return!_0x3abf0f[_0x45b8de(0x1b1)]['error']||_0x3abf0f[_0x45b8de(0x1b1)][_0x45b8de(0x1b6)][_0x45b8de(0x1a7)]===0x1;}async[_0x566e92(0x1a3)](_0x4399d9){const _0x11ed0e=_0x566e92,{unitId:_0x3d244e}=_0x4399d9,_0x144746=_0x4399d9['threadId'],_0x5704ee={'memberId':this[_0x11ed0e(0x1b5)][_0x11ed0e(0x18c)]()[_0x11ed0e(0x1a0)],'unitId':_0x3d244e,'threadId':_0x144746,'solved':_0x4399d9['resolved']?I[_0x11ed0e(0x192)]:I[_0x11ed0e(0x1ad)]},_0x6f25b2=await this[_0x11ed0e(0x1b7)]['post'](_0x11ed0e(0x17e)+_0x3d244e+_0x11ed0e(0x1b2),{'body':_0x5704ee});return!_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)]||_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)][_0x11ed0e(0x1a7)]===0x1;}async[_0x566e92(0x199)](_0x431b40,_0xb61162,_0x50c8ee,_0x2d95f2){const _0x720422=_0x566e92,_0x36d9b0={'memberId':(await this[_0x720422(0x1ab)][_0x720422(0x183)](_0x431b40))[_0x720422(0x1ca)](),'threadId':_0x50c8ee,'replyId':_0x2d95f2,'unitId':_0x431b40},_0x30a198=await this[_0x720422(0x1b7)]['post'](_0x720422(0x17e)+_0x431b40+_0x720422(0x1c8),{'body':_0x36d9b0});return!_0x30a198[_0x720422(0x1b1)][_0x720422(0x1b6)]||_0x30a198['body'][_0x720422(0x1b6)][_0x720422(0x1a7)]===0x1;}async[_0x566e92(0x1d1)](_0x34d883,_0x2c75ce,_0x2def2b){const _0x2efd0c=_0x566e92,_0x3127a8={'unitId':_0x34d883,'threadId':_0x2def2b},_0x1a1361=await this[_0x2efd0c(0x1b7)][_0x2efd0c(0x191)]('/universer-api/comment/unit/'+_0x34d883+_0x2efd0c(0x18e),{'body':_0x3127a8}),_0x2b4838=_0x2def2b['map'](_0x496bbe=>ee(_0x1a1361[_0x2efd0c(0x1b1)][_0x2efd0c(0x194)][_0x496bbe],_0x34d883,_0x2c75ce))[_0x2efd0c(0x18f)](Boolean);return Object[_0x2efd0c(0x1da)](_0x1a1361[_0x2efd0c(0x1b1)]['users'])[_0x2efd0c(0x1d0)](_0x204390=>{const _0x53b07d=_0x2efd0c;this[_0x53b07d(0x1b5)][_0x53b07d(0x1d4)](_0x204390);}),_0x2b4838;}[_0x566e92(0x19e)](_0x1c54fb){const _0x44d066=_0x566e92;return{'id':_0x1c54fb['id'],'threadId':_0x1c54fb[_0x44d066(0x17d)],'ref':_0x1c54fb[_0x44d066(0x1db)]};}};S=Q([b(0x0,_0x228d0a(_0x38e1d4)),b(0x1,_0x228d0a(_0x2b454a)),b(0x2,_0x228d0a(_0x19134d))],S);var re=Object[_0x566e92(0x1d9)],te=(_0x4d767c,_0x501601,_0x37ebf1,_0x2ec760)=>{const _0x2dcdb7=_0x566e92;for(var _0xe5d630=_0x2ec760>0x1?void 0x0:_0x2ec760?re(_0x501601,_0x37ebf1):_0x501601,_0x18be74=_0x4d767c[_0x2dcdb7(0x1c1)]-0x1,_0x4b8bc2;_0x18be74>=0x0;_0x18be74--)(_0x4b8bc2=_0x4d767c[_0x18be74])&&(_0xe5d630=_0x4b8bc2(_0xe5d630)||_0xe5d630);return _0xe5d630;},M=(_0x2d48ba,_0x40c9fc)=>(_0x1f0988,_0x2a43ea)=>_0x40c9fc(_0x1f0988,_0x2a43ea,_0x2d48ba);let f=class extends _0x32bfe7{constructor(_0x38c894,_0x2d11c7){const _0x21f561=_0x566e92;super(),this[_0x21f561(0x186)]=_0x38c894,this[_0x21f561(0x198)]=_0x2d11c7,this[_0x21f561(0x1a2)]();}[_0x566e92(0x1a2)](){const _0x38a7e2=_0x566e92;this[_0x38a7e2(0x186)][_0x38a7e2(0x19f)]=this[_0x38a7e2(0x198)],this[_0x38a7e2(0x186)][_0x38a7e2(0x1d3)]=!0x1;}};f=te([M(0x0,_0x505b6d),M(0x1,_0x228d0a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5abbfa,_0x1ad024,_0x4c70f3)=>_0x1ad024 in _0x5abbfa?se(_0x5abbfa,_0x1ad024,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c70f3}):_0x5abbfa[_0x1ad024]=_0x4c70f3,ie=(_0x25f4b1,_0x5a872d,_0x163863,_0x3ea07f)=>{const _0x2e7586=_0x566e92;for(var _0x30f392=_0x3ea07f>0x1?void 0x0:_0x3ea07f?oe(_0x5a872d,_0x163863):_0x5a872d,_0x1fcda5=_0x25f4b1[_0x2e7586(0x1c1)]-0x1,_0x569861;_0x1fcda5>=0x0;_0x1fcda5--)(_0x569861=_0x25f4b1[_0x1fcda5])&&(_0x30f392=_0x569861(_0x30f392)||_0x30f392);return _0x30f392;},N=(_0x5731a1,_0x2f5d71)=>(_0x1d6782,_0x43b46b)=>_0x2f5d71(_0x1d6782,_0x43b46b,_0x5731a1),$=(_0x247c28,_0x865b9a,_0x29865e)=>ne(_0x247c28,typeof _0x865b9a!='symbol'?_0x865b9a+'':_0x865b9a,_0x29865e);let g=class extends _0x4a70cc{constructor(_0x4750d7=O,_0x29d03c,_0x33b68d){const _0x153224=_0x566e92;super(),this[_0x153224(0x1bd)]=_0x4750d7,this['_injector']=_0x29d03c,this[_0x153224(0x1c5)]=_0x33b68d;const {..._0x577e68}=_0xa2d842({},O,this[_0x153224(0x1bd)]);this[_0x153224(0x1c5)][_0x153224(0x1b3)](z,_0x577e68);}[_0x566e92(0x1cc)](){const _0x18610c=_0x566e92;[[S],[f],[_]][_0x18610c(0x1d0)](_0x5acffd=>{const _0x2b5f70=_0x18610c;this['_injector'][_0x2b5f70(0x18a)](_0x5acffd);});}[_0x566e92(0x180)](){const _0x543873=_0x566e92;this[_0x543873(0x184)][_0x543873(0x1d5)](f),this[_0x543873(0x184)]['get'](_);}};$(g,_0x566e92(0x187),W),$(g,_0x566e92(0x1c7),_0x2ef3d3[_0x566e92(0x193)]),g=ie([_0x512e62(_0x3f1117,_0x428713,_0x56de4c),N(0x1,_0x228d0a(_0x10100d)),N(0x2,_0x5c0e15)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x86cbf5=_0x5d7f;(function(_0x117666,_0x4b58f0){const _0x2a811a=_0x5d7f,_0x23cc3a=_0x117666();while(!![]){try{const _0x5a1677=-parseInt(_0x2a811a(0xe5))/0x1+-parseInt(_0x2a811a(0xdf))/0x2+parseInt(_0x2a811a(0xf5))/0x3+-parseInt(_0x2a811a(0xee))/0x4*(parseInt(_0x2a811a(0x101))/0x5)+-parseInt(_0x2a811a(0xdd))/0x6*(parseInt(_0x2a811a(0x103))/0x7)+-parseInt(_0x2a811a(0xc8))/0x8+parseInt(_0x2a811a(0x108))/0x9*(parseInt(_0x2a811a(0x105))/0xa);if(_0x5a1677===_0x4b58f0)break;else _0x23cc3a['push'](_0x23cc3a['shift']());}catch(_0x4aaf55){_0x23cc3a['push'](_0x23cc3a['shift']());}}}(_0x56ef,0x72c00));import{CommentService as _0x52eb93,CollaborationSessionService as _0x37c9b3,UniverCollaborationClientPlugin as _0x341643}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2e99e7}from'@univerjs-pro/license';import{dayjs as _0xf6a523,UserManagerService as _0x19b7d2,Inject as _0x391d25,Injector as _0x16d21e,Disposable as _0xac9089,CustomRangeType as _0x30218b,UniverInstanceType as _0x151aad,DependentOn as _0x53e780,Plugin as _0xcdf00d,merge as _0x5297c7,IConfigService as _0x34235b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9b63b3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x78788c,IThreadCommentDataSourceService as _0x4ff8e3}from'@univerjs/thread-comment';import{bufferTime as _0x515bb3}from'rxjs';import{HTTPService as _0x6eed4a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1d6073=>(_0x1d6073[_0x1d6073[_0x86cbf5(0xbf)]=0x0]='OpenOrReOpen',_0x1d6073[_0x1d6073[_0x86cbf5(0x100)]=0x1]=_0x86cbf5(0x100),_0x1d6073[_0x1d6073['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1d6073))(I||{}),v=(_0xc37026=>(_0xc37026[_0xc37026[_0x86cbf5(0xe6)]=0x0]=_0x86cbf5(0xe6),_0xc37026[_0xc37026[_0x86cbf5(0x10c)]=0x1]='Add',_0xc37026[_0xc37026[_0x86cbf5(0xfd)]=0x2]=_0x86cbf5(0xfd),_0xc37026[_0xc37026[_0x86cbf5(0xfa)]=0x3]=_0x86cbf5(0xfa),_0xc37026[_0xc37026['Delete']=0x4]=_0x86cbf5(0xf8),_0xc37026[_0xc37026[_0x86cbf5(0xca)]=0x5]=_0x86cbf5(0xca),_0xc37026[_0xc37026['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xc37026))(v||{});const y=_0xa584ed=>_0xf6a523(new Date(+_0xa584ed))[_0x86cbf5(0x11a)](_0x86cbf5(0xdc)),B=async(_0x200004,_0x1db96d)=>{const _0x3d2181=_0x86cbf5,_0x209b92=_0x200004[_0x3d2181(0x110)](_0x19b7d2),_0x32e102=_0x200004[_0x3d2181(0x110)](_0x6eed4a);_0x1db96d[_0x3d2181(0xf6)](_0xe9545c=>{const _0x32ac35=_0x3d2181;_0x209b92['getUser'](_0xe9545c)&&_0x1db96d[_0x32ac35(0x113)](_0xe9545c);}),_0x1db96d['size']&&(await _0x32e102['get'](_0x3d2181(0xd6),{'params':{'userIDs':[..._0x1db96d]}}))[_0x3d2181(0x10d)]['users'][_0x3d2181(0xf6)](_0x219388=>{const _0x43c80a=_0x3d2181;_0x219388&&_0x209b92[_0x43c80a(0xe0)](_0x219388);});};var K=Object[_0x86cbf5(0xcd)],V=(_0x3a7b3b,_0x137716,_0x46749a,_0x4075a5)=>{const _0x39be8e=_0x86cbf5;for(var _0x1f7dcc=_0x4075a5>0x1?void 0x0:_0x4075a5?K(_0x137716,_0x46749a):_0x137716,_0x1dc2d1=_0x3a7b3b[_0x39be8e(0xd8)]-0x1,_0xabde4;_0x1dc2d1>=0x0;_0x1dc2d1--)(_0xabde4=_0x3a7b3b[_0x1dc2d1])&&(_0x1f7dcc=_0xabde4(_0x1f7dcc)||_0x1f7dcc);return _0x1f7dcc;},p=(_0x20be10,_0x658855)=>(_0x546dd2,_0x229000)=>_0x658855(_0x546dd2,_0x229000,_0x20be10);let _=class extends _0xac9089{constructor(_0x195fed,_0x164b59,_0x27fabf,_0x1e0508){const _0x22bbe4=_0x86cbf5;super(),this[_0x22bbe4(0xd7)]=_0x195fed,this[_0x22bbe4(0xbd)]=_0x164b59,this[_0x22bbe4(0xeb)]=_0x27fabf,this[_0x22bbe4(0x10b)]=_0x1e0508,this[_0x22bbe4(0xe8)](),this[_0x22bbe4(0xe4)]();}[_0x86cbf5(0xe4)](){const _0xa15162=_0x86cbf5;this[_0xa15162(0xc2)](this['_threadCommentModel'][_0xa15162(0xd3)][_0xa15162(0xd9)](_0x515bb3(0x10))[_0xa15162(0x109)](_0x25000f=>{const _0x15be72=_0xa15162,_0x5e686c=new Set();_0x25000f[_0x15be72(0xf6)](_0x2246f8=>{const _0x21b388=_0x15be72;if(_0x2246f8[_0x21b388(0x114)]===_0x21b388(0xbe)){const _0x5ec18d=_0x2246f8[_0x21b388(0xdb)][_0x21b388(0xbc)];_0x5e686c[_0x21b388(0xbe)](_0x5ec18d);}}),B(this[_0x15be72(0x10b)],_0x5e686c);}));}[_0x86cbf5(0xe8)](){const _0x145842=_0x86cbf5;this[_0x145842(0xc2)](this[_0x145842(0xd7)]['commentUpdate$'][_0x145842(0x109)](async _0x31891e=>{const _0x32ef84=_0x145842;var _0x391bd4,_0x5cc79c,_0x1fda0c,_0x4baf2f;const _0x329d52=(_0x391bd4=this['_threadCommentModel']['getUnit'](_0x31891e[_0x32ef84(0x118)])[_0x32ef84(0xf2)](_0x4b0482=>_0x4b0482[_0x32ef84(0x10f)]===_0x31891e[_0x32ef84(0x10f)]))==null?void 0x0:_0x391bd4['root'];if(!_0x329d52)return;const {unitId:_0x39dfee,subUnitId:_0x26dab7}=_0x329d52;switch(_0x31891e[_0x32ef84(0xc0)]&&this[_0x32ef84(0xeb)][_0x32ef84(0xe0)](_0x31891e[_0x32ef84(0xc0)]),_0x31891e[_0x32ef84(0x114)]){case v['Add']:break;case v[_0x32ef84(0xfd)]:{this['_threadCommentModel'][_0x32ef84(0x107)](_0x39dfee,_0x26dab7,{'unitId':_0x39dfee,'subUnitId':_0x26dab7,'ref':'','id':_0x31891e[_0x32ef84(0x11e)],'dT':y(+_0x31891e[_0x32ef84(0x11b)]),'threadId':_0x31891e[_0x32ef84(0x10f)],'personId':(_0x1fda0c=(_0x5cc79c=_0x31891e[_0x32ef84(0xc0)])==null?void 0x0:_0x5cc79c[_0x32ef84(0x111)])!=null?_0x1fda0c:_0x31891e['userId'],'text':JSON['parse'](_0x31891e[_0x32ef84(0xed)]),'parentId':_0x329d52['id']});break;}case v[_0x32ef84(0xf8)]:{const _0x558b89=this['_threadCommentModel']['getComment'](_0x39dfee,_0x26dab7,_0x31891e['replyId']);_0x558b89&&_0x558b89[_0x32ef84(0xcf)]&&this[_0x32ef84(0xbd)][_0x32ef84(0xd2)](_0x39dfee,_0x26dab7,_0x31891e['replyId']);break;}case v['Edit']:{this[_0x32ef84(0xbd)][_0x32ef84(0xe2)](_0x39dfee,_0x26dab7,{'commentId':_0x31891e[_0x32ef84(0x11e)],'text':JSON[_0x32ef84(0xc1)](_0x31891e[_0x32ef84(0xed)])});break;}case v[_0x32ef84(0xca)]:{const _0x3a2822=(_0x4baf2f=this[_0x32ef84(0xbd)][_0x32ef84(0xda)](_0x31891e[_0x32ef84(0x118)])[_0x32ef84(0xf2)](_0x538c6b=>_0x538c6b[_0x32ef84(0x10f)]===_0x31891e[_0x32ef84(0x10f)]))==null?void 0x0:_0x4baf2f[_0x32ef84(0xe9)];_0x3a2822&&this[_0x32ef84(0xbd)]['resolveComment'](_0x39dfee,_0x26dab7,_0x3a2822['id'],_0x31891e[_0x32ef84(0x117)]===I[_0x32ef84(0x100)]);break;}}}));}};_=V([p(0x0,_0x391d25(_0x52eb93)),p(0x1,_0x391d25(_0x78788c)),p(0x2,_0x391d25(_0x19b7d2)),p(0x3,_0x391d25(_0x16d21e))],_);const z=_0x86cbf5(0xff),O={};var k=Object[_0x86cbf5(0xcd)],Q=(_0x34a864,_0x1ca008,_0x4ccbb3,_0xabd10)=>{for(var _0x188529=_0xabd10>0x1?void 0x0:_0xabd10?k(_0x1ca008,_0x4ccbb3):_0x1ca008,_0x419583=_0x34a864['length']-0x1,_0x6d8932;_0x419583>=0x0;_0x419583--)(_0x6d8932=_0x34a864[_0x419583])&&(_0x188529=_0x6d8932(_0x188529)||_0x188529);return _0x188529;},b=(_0x33cdb5,_0x342c6b)=>(_0x488288,_0xdf9a4d)=>_0x342c6b(_0x488288,_0xdf9a4d,_0x33cdb5);function _0x5d7f(_0x5bbca9,_0x2334e9){_0x5bbca9=_0x5bbca9-0xbc;const _0x56efce=_0x56ef();let _0x5d7fb8=_0x56efce[_0x5bbca9];return _0x5d7fb8;}function X(_0x129440,_0x441261){const _0x142c8c=_0x86cbf5,_0x538a69=_0x129440['replies'][0x0];return{..._0x441261,'id':_0x538a69[_0x142c8c(0x11e)],'resolved':_0x129440[_0x142c8c(0x117)]===0x1,'dT':y(_0x538a69[_0x142c8c(0x11b)]),'personId':_0x538a69[_0x142c8c(0x112)],'threadId':_0x538a69[_0x142c8c(0x10f)]};}function ee(_0x3b40ef,_0x5394c8,_0x493c3c){const _0x20d362=_0x86cbf5;var _0x329340,_0x193743;if(((_0x193743=(_0x329340=_0x3b40ef==null?void 0x0:_0x3b40ef[_0x20d362(0xf9)])==null?void 0x0:_0x329340['length'])!=null?_0x193743:0x0)>0x0){const _0x135404=(_0x21ce35,_0x3d4e32)=>({'id':_0x21ce35['replyId'],'threadId':_0x21ce35[_0x20d362(0x10f)],'dT':y(_0x21ce35['createTimestamp']),'personId':_0x21ce35['userId'],'resolved':_0x3b40ef[_0x20d362(0x117)]===I[_0x20d362(0x100)],'unitId':_0x5394c8,'subUnitId':_0x493c3c,'text':JSON[_0x20d362(0xc1)](_0x21ce35[_0x20d362(0xed)]),'parentId':_0x3d4e32}),_0x2a3983=_0x135404(_0x3b40ef[_0x20d362(0xf9)][0x0]);return{..._0x2a3983,'children':_0x3b40ef['replies'][_0x20d362(0x11c)](0x1)[_0x20d362(0x11f)](_0x57456f=>_0x135404(_0x57456f,_0x2a3983['id']))};}return null;}let S=class{constructor(_0x30a9a3,_0x245ba8,_0x43c75e){const _0x3be8b2=_0x86cbf5;this[_0x3be8b2(0xce)]=_0x30a9a3,this['_userService']=_0x245ba8,this['_sessionService']=_0x43c75e;}async[_0x86cbf5(0x107)](_0x487568){const _0x100bf7=_0x86cbf5;var _0x2f7bb9,_0x34e5f8;const {parentId:_0x1c44df,unitId:_0x40fc53,text:_0x157fa8,threadId:_0x23d0a0}=_0x487568,_0x5569fb=(_0x34e5f8=(_0x2f7bb9=_0x157fa8[_0x100bf7(0x10a)])==null?void 0x0:_0x2f7bb9[_0x100bf7(0xf1)](_0x2e9fe4=>_0x2e9fe4['rangeType']===_0x30218b[_0x100bf7(0xf0)])[_0x100bf7(0x11f)](_0x3c1b67=>_0x3c1b67[_0x100bf7(0x106)]))!=null?_0x34e5f8:[],_0x1e8919=JSON[_0x100bf7(0xef)](_0x157fa8),_0x327015=(await this[_0x100bf7(0xd0)]['requireSession'](_0x40fc53))[_0x100bf7(0xc7)]();if(_0x1c44df){const _0x2c7e33={'memberId':_0x327015,'unitId':_0x40fc53,'content':_0x1e8919,'mention':_0x5569fb,'threadId':_0x23d0a0},_0x2bd3cf=(await this[_0x100bf7(0xce)][_0x100bf7(0xea)](_0x100bf7(0xc3)+_0x40fc53+_0x100bf7(0xc4),{'body':_0x2c7e33}))[_0x100bf7(0x10d)][_0x100bf7(0x11d)];return{..._0x487568,'id':_0x2bd3cf[_0x100bf7(0x11e)],'dT':_0xf6a523(+_0x2bd3cf[_0x100bf7(0x11b)])['format'](_0x100bf7(0xdc)),'personId':_0x2bd3cf['userId']};}else{const _0xfb9099={'memberId':_0x327015,'unitId':_0x40fc53,'content':_0x1e8919,'mention':_0x5569fb},_0x35e7e1=await this[_0x100bf7(0xce)]['post']('/universer-api/comment/unit/'+_0x40fc53+'/add',{'body':_0xfb9099});return X(_0x35e7e1[_0x100bf7(0x10d)][_0x100bf7(0xc5)],_0x487568);}}async['updateComment'](_0x318b4e){const _0x2ba6ad=_0x86cbf5;var _0x4463f2,_0x266363;const {text:_0x322158,unitId:_0x290682}=_0x318b4e,_0x1ddca7=(_0x266363=(_0x4463f2=_0x322158[_0x2ba6ad(0x10a)])==null?void 0x0:_0x4463f2[_0x2ba6ad(0xf1)](_0x1d7e80=>_0x1d7e80[_0x2ba6ad(0x104)]===_0x30218b[_0x2ba6ad(0xf0)])[_0x2ba6ad(0x11f)](_0x3d8988=>_0x3d8988[_0x2ba6ad(0x106)]))!=null?_0x266363:[],_0x5b81a4=JSON[_0x2ba6ad(0xef)](_0x322158),_0x5e0d8a=_0x318b4e[_0x2ba6ad(0x10f)],_0x5855c8=_0x318b4e['id'],_0x49e85a={'memberId':(await this[_0x2ba6ad(0xd0)]['requireSession'](_0x290682))[_0x2ba6ad(0xc7)](),'unitId':_0x290682,'threadId':_0x5e0d8a,'mention':_0x1ddca7,'content':_0x5b81a4,'replyId':_0x5855c8},_0x2a2a6e=await this[_0x2ba6ad(0xce)][_0x2ba6ad(0xea)](_0x2ba6ad(0xc3)+_0x290682+_0x2ba6ad(0xf3),{'body':_0x49e85a});return!_0x2a2a6e[_0x2ba6ad(0x10d)][_0x2ba6ad(0xfb)]||_0x2a2a6e[_0x2ba6ad(0x10d)][_0x2ba6ad(0xfb)]['code']===0x1;}async[_0x86cbf5(0xcb)](_0x5d2048){const _0x1d7a33=_0x86cbf5,{unitId:_0x56f537}=_0x5d2048,_0x281e31=_0x5d2048['threadId'],_0x3a2c01={'memberId':this[_0x1d7a33(0xeb)][_0x1d7a33(0xec)]()['userID'],'unitId':_0x56f537,'threadId':_0x281e31,'solved':_0x5d2048[_0x1d7a33(0xe7)]?I[_0x1d7a33(0x100)]:I['OpenOrReOpen']},_0xbbe77c=await this[_0x1d7a33(0xce)][_0x1d7a33(0xea)](_0x1d7a33(0xc3)+_0x56f537+'/solved',{'body':_0x3a2c01});return!_0xbbe77c[_0x1d7a33(0x10d)][_0x1d7a33(0xfb)]||_0xbbe77c[_0x1d7a33(0x10d)][_0x1d7a33(0xfb)]['code']===0x1;}async[_0x86cbf5(0xd2)](_0x4ca655,_0x4df0e7,_0xc9bb44,_0x1b8aae){const _0x37ec2e=_0x86cbf5,_0x4ef762={'memberId':(await this['_sessionService'][_0x37ec2e(0xf4)](_0x4ca655))['getMemberID'](),'threadId':_0xc9bb44,'replyId':_0x1b8aae,'unitId':_0x4ca655},_0x51e637=await this[_0x37ec2e(0xce)]['post']('/universer-api/comment/unit/'+_0x4ca655+_0x37ec2e(0xd5),{'body':_0x4ef762});return!_0x51e637[_0x37ec2e(0x10d)][_0x37ec2e(0xfb)]||_0x51e637['body'][_0x37ec2e(0xfb)][_0x37ec2e(0xc9)]===0x1;}async[_0x86cbf5(0x102)](_0x58839b,_0x3c865a,_0x2c3357){const _0x43ab00=_0x86cbf5,_0x58fda5={'unitId':_0x58839b,'threadId':_0x2c3357},_0x1c5c31=await this[_0x43ab00(0xce)][_0x43ab00(0xea)](_0x43ab00(0xc3)+_0x58839b+_0x43ab00(0xfc),{'body':_0x58fda5}),_0x5e2024=_0x2c3357[_0x43ab00(0x11f)](_0x5db052=>ee(_0x1c5c31[_0x43ab00(0x10d)][_0x43ab00(0xfe)][_0x5db052],_0x58839b,_0x3c865a))[_0x43ab00(0xf1)](Boolean);return Object['values'](_0x1c5c31[_0x43ab00(0x10d)][_0x43ab00(0x116)])[_0x43ab00(0xf6)](_0x4378eb=>{const _0x483abc=_0x43ab00;this[_0x483abc(0xeb)][_0x483abc(0xe0)](_0x4378eb);}),_0x5e2024;}['saveCommentToSnapshot'](_0x2345fb){const _0x553c14=_0x86cbf5;return{'id':_0x2345fb['id'],'threadId':_0x2345fb[_0x553c14(0x10f)],'ref':_0x2345fb['ref']};}};S=Q([b(0x0,_0x391d25(_0x6eed4a)),b(0x1,_0x391d25(_0x19b7d2)),b(0x2,_0x391d25(_0x37c9b3))],S);var re=Object[_0x86cbf5(0xcd)],te=(_0x2a8943,_0x129db3,_0x102a78,_0xea53)=>{const _0x551127=_0x86cbf5;for(var _0x1235d2=_0xea53>0x1?void 0x0:_0xea53?re(_0x129db3,_0x102a78):_0x129db3,_0xf70ae0=_0x2a8943[_0x551127(0xd8)]-0x1,_0x2443dd;_0xf70ae0>=0x0;_0xf70ae0--)(_0x2443dd=_0x2a8943[_0xf70ae0])&&(_0x1235d2=_0x2443dd(_0x1235d2)||_0x1235d2);return _0x1235d2;},M=(_0x7dda8b,_0x162e36)=>(_0x3d5aec,_0x3adafd)=>_0x162e36(_0x3d5aec,_0x3adafd,_0x7dda8b);let f=class extends _0xac9089{constructor(_0x197a95,_0x32a56d){const _0x582e3c=_0x86cbf5;super(),this[_0x582e3c(0xd1)]=_0x197a95,this[_0x582e3c(0x115)]=_0x32a56d,this[_0x582e3c(0x120)]();}[_0x86cbf5(0x120)](){const _0x5dcae2=_0x86cbf5;this[_0x5dcae2(0xd1)][_0x5dcae2(0xde)]=this[_0x5dcae2(0x115)],this[_0x5dcae2(0xd1)][_0x5dcae2(0xf7)]=!0x1;}};f=te([M(0x0,_0x4ff8e3),M(0x1,_0x391d25(S))],f);var se=Object[_0x86cbf5(0xe1)],oe=Object[_0x86cbf5(0xcd)],ne=(_0x4fde1e,_0x5478e3,_0x5ea69c)=>_0x5478e3 in _0x4fde1e?se(_0x4fde1e,_0x5478e3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5ea69c}):_0x4fde1e[_0x5478e3]=_0x5ea69c,ie=(_0x453a60,_0x1aa6d8,_0x53301c,_0x15732b)=>{for(var _0x3964fe=_0x15732b>0x1?void 0x0:_0x15732b?oe(_0x1aa6d8,_0x53301c):_0x1aa6d8,_0x487fa7=_0x453a60['length']-0x1,_0x64db12;_0x487fa7>=0x0;_0x487fa7--)(_0x64db12=_0x453a60[_0x487fa7])&&(_0x3964fe=_0x64db12(_0x3964fe)||_0x3964fe);return _0x3964fe;},N=(_0x2654b5,_0x37157c)=>(_0x419c50,_0xa7832)=>_0x37157c(_0x419c50,_0xa7832,_0x2654b5),$=(_0x2984bc,_0x4704b8,_0x499fcb)=>ne(_0x2984bc,typeof _0x4704b8!='symbol'?_0x4704b8+'':_0x4704b8,_0x499fcb);let g=class extends _0xcdf00d{constructor(_0x15df1a=O,_0x49ecbb,_0x105724){const _0x4c36dc=_0x86cbf5;super(),this[_0x4c36dc(0xe3)]=_0x15df1a,this['_injector']=_0x49ecbb,this['_configService']=_0x105724;const {..._0x11e1bd}=_0x5297c7({},O,this[_0x4c36dc(0xe3)]);this[_0x4c36dc(0xd4)][_0x4c36dc(0x10e)](z,_0x11e1bd);}[_0x86cbf5(0xc6)](){[[S],[f],[_]]['forEach'](_0x9dd983=>{const _0xf8c799=_0x5d7f;this['_injector'][_0xf8c799(0xbe)](_0x9dd983);});}[_0x86cbf5(0xcc)](){const _0x14fdcc=_0x86cbf5;this[_0x14fdcc(0x10b)][_0x14fdcc(0x110)](f),this[_0x14fdcc(0x10b)][_0x14fdcc(0x110)](_);}};function _0x56ef(){const _0x534b2f=['Delete','replies','Edit','error','/list','Reply','comments','thread-comment-data-source.config','Solved','531840KvHpfi','listComments','12845yFRDtM','rangeType','2050460SYNXlU','rangeId','addComment','153lVhnbc','subscribe','customRanges','_injector','Add','body','setConfig','threadId','get','userID','userId','delete','type','_threadCommentDataSource','users','solved','unitId','pluginName','format','createTimestamp','slice','reply','replyId','map','_initDataSource','personId','_threadCommentModel','add','OpenOrReOpen','user','parse','disposeWithMe','/universer-api/comment/unit/','/reply','comment','onStarting','getMemberID','4838848vvMCAn','code','Solve','resolveComment','onReady','getOwnPropertyDescriptor','_httpService','parentId','_sessionService','_threadCommentDataSourceService','deleteComment','commentUpdate$','_configService','/delete','/universer-api/user/list','_commentService','length','pipe','getUnit','payload','YYYY/MM/DD\x20HH:mm','2724vxCQQH','dataSource','1731912jLakjX','addUser','defineProperty','updateComment','_config','_initUserSync','502416qSyZXW','Unknown','resolved','_init','root','post','_userService','getCurrentUser','content','12vKXJKF','stringify','COMMENT','filter','find','/edit','requireSession','328968kZdiHK','forEach','syncUpdateMutationToColla'];_0x56ef=function(){return _0x534b2f;};return _0x56ef();}$(g,_0x86cbf5(0x119),W),$(g,'type',_0x151aad['UNIVER_UNKNOWN']),g=ie([_0x53e780(_0x9b63b3,_0x341643,_0x2e99e7),N(0x1,_0x391d25(_0x16d21e)),N(0x2,_0x34235b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x15a8(_0x2eb11b,_0x28df04){_0x2eb11b=_0x2eb11b-0xdb;const _0x884ca0=_0x884c();let _0x15a848=_0x884ca0[_0x2eb11b];return _0x15a848;}(function(_0x3d10ec,_0x1b9790){const _0x20bb58=_0x15a8,_0x1356ac=_0x3d10ec();while(!![]){try{const _0x109b18=-parseInt(_0x20bb58(0x13c))/0x1+parseInt(_0x20bb58(0xf5))/0x2*(-parseInt(_0x20bb58(0x10a))/0x3)+parseInt(_0x20bb58(0x163))/0x4+parseInt(_0x20bb58(0x106))/0x5*(parseInt(_0x20bb58(0xe4))/0x6)+-parseInt(_0x20bb58(0x10f))/0x7+-parseInt(_0x20bb58(0x15c))/0x8*(-parseInt(_0x20bb58(0x141))/0x9)+parseInt(_0x20bb58(0x112))/0xa;if(_0x109b18===_0x1b9790)break;else _0x1356ac['push'](_0x1356ac['shift']());}catch(_0x52375c){_0x1356ac['push'](_0x1356ac['shift']());}}}(_0x884c,0x49120),function(_0xc4bc2,_0x18b0cc){const _0x5679fb=_0x15a8;typeof exports=='object'&&typeof module<'u'?_0x18b0cc(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x5679fb(0x138)&&define[_0x5679fb(0x146)]?define([_0x5679fb(0xed),_0x5679fb(0x14d),_0x5679fb(0x15b),_0x5679fb(0x15a),_0x5679fb(0x122),_0x5679fb(0x10d),_0x5679fb(0xfd),_0x5679fb(0x162)],_0x18b0cc):(_0xc4bc2=typeof globalThis<'u'?globalThis:_0xc4bc2||self,_0x18b0cc(_0xc4bc2[_0x5679fb(0x134)]={},_0xc4bc2['UniverProCollaborationClient'],_0xc4bc2['UniverProLicense'],_0xc4bc2[_0x5679fb(0x147)],_0xc4bc2[_0x5679fb(0x115)],_0xc4bc2[_0x5679fb(0x14f)],_0xc4bc2[_0x5679fb(0xfd)],_0xc4bc2[_0x5679fb(0xe0)]));}(this,function(_0x2bd891,_0x182376,_0x55a627,_0x3cf436,_0x3221c6,_0x9352bb,_0x23deff,_0xece950){'use strict';const _0x24d132=_0x15a8;const _0x422647='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3ca880=(_0x466370=>(_0x466370[_0x466370[_0x24d132(0xfc)]=0x0]=_0x24d132(0xfc),_0x466370[_0x466370[_0x24d132(0x139)]=0x1]=_0x24d132(0x139),_0x466370[_0x466370[_0x24d132(0x109)]=-0x1]=_0x24d132(0x109),_0x466370))(_0x3ca880||{}),_0x39795b=(_0x24e338=>(_0x24e338[_0x24e338[_0x24d132(0xe7)]=0x0]=_0x24d132(0xe7),_0x24e338[_0x24e338[_0x24d132(0xf6)]=0x1]=_0x24d132(0xf6),_0x24e338[_0x24e338[_0x24d132(0x153)]=0x2]=_0x24d132(0x153),_0x24e338[_0x24e338['Edit']=0x3]=_0x24d132(0x10c),_0x24e338[_0x24e338[_0x24d132(0x151)]=0x4]='Delete',_0x24e338[_0x24e338[_0x24d132(0x13f)]=0x5]='Solve',_0x24e338[_0x24e338[_0x24d132(0x109)]=-0x1]=_0x24d132(0x109),_0x24e338))(_0x39795b||{});const _0x26178e=_0x4f3ab2=>_0x3cf436[_0x24d132(0x127)](new Date(+_0x4f3ab2))[_0x24d132(0xef)](_0x24d132(0x155)),_0x135771=async(_0x1ccca4,_0x5cf549)=>{const _0x280103=_0x24d132,_0x43cc16=_0x1ccca4[_0x280103(0xe5)](_0x3cf436[_0x280103(0xdd)]),_0x59ffcb=_0x1ccca4['get'](_0xece950[_0x280103(0x144)]);_0x5cf549[_0x280103(0xe6)](_0x4cbe26=>{const _0x5a2c33=_0x280103;_0x43cc16[_0x5a2c33(0xe2)](_0x4cbe26)&&_0x5cf549[_0x5a2c33(0x158)](_0x4cbe26);}),_0x5cf549['size']&&(await _0x59ffcb[_0x280103(0xe5)](_0x280103(0xe3),{'params':{'userIDs':[..._0x5cf549]}}))[_0x280103(0xdf)]['users']['forEach'](_0x4ecff7=>{_0x4ecff7&&_0x43cc16['addUser'](_0x4ecff7);});};var _0x2b795e=Object['getOwnPropertyDescriptor'],_0x49a6ec=(_0x58aa84,_0x54b70b,_0x2a44cb,_0x10933c)=>{const _0x155eb9=_0x24d132;for(var _0xd74da2=_0x10933c>0x1?void 0x0:_0x10933c?_0x2b795e(_0x54b70b,_0x2a44cb):_0x54b70b,_0xc8e322=_0x58aa84[_0x155eb9(0x113)]-0x1,_0x5268e0;_0xc8e322>=0x0;_0xc8e322--)(_0x5268e0=_0x58aa84[_0xc8e322])&&(_0xd74da2=_0x5268e0(_0xd74da2)||_0xd74da2);return _0xd74da2;},_0x40294f=(_0x34d9bd,_0x11e520)=>(_0x472376,_0x2f18c1)=>_0x11e520(_0x472376,_0x2f18c1,_0x34d9bd);let _0x468484=class extends _0x3cf436[_0x24d132(0xf3)]{constructor(_0x36ef92,_0x1612ab,_0x5d3e5a,_0x3568cf){const _0xf52273=_0x24d132;super(),this[_0xf52273(0x104)]=_0x36ef92,this[_0xf52273(0x11e)]=_0x1612ab,this[_0xf52273(0x125)]=_0x5d3e5a,this[_0xf52273(0xdc)]=_0x3568cf,this[_0xf52273(0x130)](),this['_initUserSync']();}['_initUserSync'](){const _0x4e2889=_0x24d132;this[_0x4e2889(0x15e)](this[_0x4e2889(0x11e)][_0x4e2889(0x11c)]['pipe'](_0x23deff[_0x4e2889(0x14e)](0x10))[_0x4e2889(0x128)](_0x24d7ca=>{const _0x18961b=_0x4e2889,_0x5a886e=new Set();_0x24d7ca[_0x18961b(0xe6)](_0x43f4ab=>{const _0x4e735f=_0x18961b;if(_0x43f4ab[_0x4e735f(0xfa)]===_0x4e735f(0x135)){const _0x3d5bcd=_0x43f4ab[_0x4e735f(0x12b)][_0x4e735f(0x13a)];_0x5a886e[_0x4e735f(0x135)](_0x3d5bcd);}}),_0x135771(this['_injector'],_0x5a886e);}));}[_0x24d132(0x130)](){const _0x367e49=_0x24d132;this[_0x367e49(0x15e)](this[_0x367e49(0x104)]['commentUpdate$'][_0x367e49(0x128)](async _0x45de5f=>{const _0x32cafb=_0x367e49;var _0x56eb6b,_0x15716f,_0x346d69,_0x558db7;const _0xa827cf=(_0x56eb6b=this[_0x32cafb(0x11e)][_0x32cafb(0x136)](_0x45de5f['unitId'])[_0x32cafb(0x133)](_0x363650=>_0x363650[_0x32cafb(0x137)]===_0x45de5f[_0x32cafb(0x137)]))==null?void 0x0:_0x56eb6b[_0x32cafb(0x148)];if(!_0xa827cf)return;const {unitId:_0x30fd0d,subUnitId:_0x511970}=_0xa827cf;switch(_0x45de5f['user']&&this[_0x32cafb(0x125)][_0x32cafb(0xff)](_0x45de5f['user']),_0x45de5f[_0x32cafb(0xfa)]){case _0x39795b[_0x32cafb(0xf6)]:break;case _0x39795b[_0x32cafb(0x153)]:{this[_0x32cafb(0x11e)][_0x32cafb(0x165)](_0x30fd0d,_0x511970,{'unitId':_0x30fd0d,'subUnitId':_0x511970,'ref':'','id':_0x45de5f[_0x32cafb(0xec)],'dT':_0x26178e(+_0x45de5f['createTimestamp']),'threadId':_0x45de5f[_0x32cafb(0x137)],'personId':(_0x346d69=(_0x15716f=_0x45de5f[_0x32cafb(0x117)])==null?void 0x0:_0x15716f[_0x32cafb(0x11a)])!=null?_0x346d69:_0x45de5f[_0x32cafb(0xf7)],'text':JSON['parse'](_0x45de5f[_0x32cafb(0x13b)]),'parentId':_0xa827cf['id']});break;}case _0x39795b['Delete']:{const _0xf8e80f=this[_0x32cafb(0x11e)][_0x32cafb(0x102)](_0x30fd0d,_0x511970,_0x45de5f['replyId']);_0xf8e80f&&_0xf8e80f[_0x32cafb(0x12c)]&&this[_0x32cafb(0x11e)][_0x32cafb(0x126)](_0x30fd0d,_0x511970,_0x45de5f['replyId']);break;}case _0x39795b[_0x32cafb(0x10c)]:{this[_0x32cafb(0x11e)][_0x32cafb(0xdb)](_0x30fd0d,_0x511970,{'commentId':_0x45de5f[_0x32cafb(0xec)],'text':JSON['parse'](_0x45de5f[_0x32cafb(0x13b)])});break;}case _0x39795b[_0x32cafb(0x13f)]:{const _0x4332ee=(_0x558db7=this[_0x32cafb(0x11e)][_0x32cafb(0x136)](_0x45de5f[_0x32cafb(0xe8)])[_0x32cafb(0x133)](_0x3286e8=>_0x3286e8['threadId']===_0x45de5f[_0x32cafb(0x137)]))==null?void 0x0:_0x558db7[_0x32cafb(0x148)];_0x4332ee&&this['_threadCommentModel'][_0x32cafb(0x107)](_0x30fd0d,_0x511970,_0x4332ee['id'],_0x45de5f[_0x32cafb(0x111)]===_0x3ca880[_0x32cafb(0x139)]);break;}}}));}};_0x468484=_0x49a6ec([_0x40294f(0x0,_0x3cf436[_0x24d132(0xea)](_0x182376[_0x24d132(0x149)])),_0x40294f(0x1,_0x3cf436[_0x24d132(0xea)](_0x9352bb[_0x24d132(0x120)])),_0x40294f(0x2,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0xdd)])),_0x40294f(0x3,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0x140)]))],_0x468484);const _0x5c4310=_0x24d132(0x157),_0x1b4fd6={};var _0x5cd200=Object[_0x24d132(0x145)],_0x28e893=(_0x5c4e62,_0x1050fe,_0x26ae88,_0x46817d)=>{const _0xf9058=_0x24d132;for(var _0x32bb62=_0x46817d>0x1?void 0x0:_0x46817d?_0x5cd200(_0x1050fe,_0x26ae88):_0x1050fe,_0x52e72e=_0x5c4e62[_0xf9058(0x113)]-0x1,_0x335ef4;_0x52e72e>=0x0;_0x52e72e--)(_0x335ef4=_0x5c4e62[_0x52e72e])&&(_0x32bb62=_0x335ef4(_0x32bb62)||_0x32bb62);return _0x32bb62;},_0x359717=(_0x3a7288,_0x4a46bf)=>(_0x586777,_0x3ae275)=>_0x4a46bf(_0x586777,_0x3ae275,_0x3a7288);function _0x1dae63(_0x130875,_0x28e711){const _0x4b4ea3=_0x24d132,_0x5dd877=_0x130875['replies'][0x0];return{..._0x28e711,'id':_0x5dd877[_0x4b4ea3(0xec)],'resolved':_0x130875[_0x4b4ea3(0x111)]===0x1,'dT':_0x26178e(_0x5dd877[_0x4b4ea3(0x13e)]),'personId':_0x5dd877[_0x4b4ea3(0xf7)],'threadId':_0x5dd877['threadId']};}function _0x35c8d0(_0x225682,_0x3455a6,_0x451c34){const _0x47c54e=_0x24d132;var _0x6fcaf3,_0x248d26;if(((_0x248d26=(_0x6fcaf3=_0x225682==null?void 0x0:_0x225682[_0x47c54e(0x118)])==null?void 0x0:_0x6fcaf3[_0x47c54e(0x113)])!=null?_0x248d26:0x0)>0x0){const _0x37925a=(_0x86a1e5,_0x5cdd67)=>({'id':_0x86a1e5['replyId'],'threadId':_0x86a1e5[_0x47c54e(0x137)],'dT':_0x26178e(_0x86a1e5[_0x47c54e(0x13e)]),'personId':_0x86a1e5[_0x47c54e(0xf7)],'resolved':_0x225682[_0x47c54e(0x111)]===_0x3ca880[_0x47c54e(0x139)],'unitId':_0x3455a6,'subUnitId':_0x451c34,'text':JSON[_0x47c54e(0xf8)](_0x86a1e5[_0x47c54e(0x13b)]),'parentId':_0x5cdd67}),_0xbf4485=_0x37925a(_0x225682[_0x47c54e(0x118)][0x0]);return{..._0xbf4485,'children':_0x225682['replies'][_0x47c54e(0x14b)](0x1)[_0x47c54e(0xf2)](_0x31ade6=>_0x37925a(_0x31ade6,_0xbf4485['id']))};}return null;}let _0x3dc6ee=class{constructor(_0x6f8e7b,_0x4fdaef,_0x5e8ca8){const _0x3c8e3d=_0x24d132;this[_0x3c8e3d(0x14c)]=_0x6f8e7b,this[_0x3c8e3d(0x125)]=_0x4fdaef,this[_0x3c8e3d(0xfe)]=_0x5e8ca8;}async[_0x24d132(0x165)](_0x81836d){const _0x45e161=_0x24d132;var _0x42cd96,_0x13746a;const {parentId:_0x37d2eb,unitId:_0x535c2a,text:_0x407665,threadId:_0x5d5dd4}=_0x81836d,_0x2d8f44=(_0x13746a=(_0x42cd96=_0x407665[_0x45e161(0x10e)])==null?void 0x0:_0x42cd96['filter'](_0x16e67f=>_0x16e67f[_0x45e161(0x12e)]===_0x3cf436['CustomRangeType'][_0x45e161(0xf9)])[_0x45e161(0xf2)](_0x1eb024=>_0x1eb024[_0x45e161(0x116)]))!=null?_0x13746a:[],_0x26ca0c=JSON[_0x45e161(0x150)](_0x407665),_0x3da2cb=(await this['_sessionService'][_0x45e161(0x124)](_0x535c2a))[_0x45e161(0x131)]();if(_0x37d2eb){const _0x454f84={'memberId':_0x3da2cb,'unitId':_0x535c2a,'content':_0x26ca0c,'mention':_0x2d8f44,'threadId':_0x5d5dd4},_0x3be613=(await this['_httpService']['post'](_0x45e161(0x11b)+_0x535c2a+_0x45e161(0x123),{'body':_0x454f84}))[_0x45e161(0xdf)][_0x45e161(0x12a)];return{..._0x81836d,'id':_0x3be613[_0x45e161(0xec)],'dT':_0x3cf436['dayjs'](+_0x3be613[_0x45e161(0x13e)])[_0x45e161(0xef)](_0x45e161(0x155)),'personId':_0x3be613[_0x45e161(0xf7)]};}else{const _0x36bc62={'memberId':_0x3da2cb,'unitId':_0x535c2a,'content':_0x26ca0c,'mention':_0x2d8f44},_0x4b107c=await this[_0x45e161(0x14c)][_0x45e161(0x164)](_0x45e161(0x11b)+_0x535c2a+'/add',{'body':_0x36bc62});return _0x1dae63(_0x4b107c[_0x45e161(0xdf)]['comment'],_0x81836d);}}async[_0x24d132(0xdb)](_0x235053){const _0x1085f7=_0x24d132;var _0x2c0075,_0x1b8137;const {text:_0x6b441,unitId:_0x24209a}=_0x235053,_0x168baf=(_0x1b8137=(_0x2c0075=_0x6b441[_0x1085f7(0x10e)])==null?void 0x0:_0x2c0075[_0x1085f7(0x160)](_0xae2a0b=>_0xae2a0b['rangeType']===_0x3cf436[_0x1085f7(0xf1)][_0x1085f7(0xf9)])['map'](_0xb070b0=>_0xb070b0[_0x1085f7(0x116)]))!=null?_0x1b8137:[],_0x44b424=JSON[_0x1085f7(0x150)](_0x6b441),_0x31894c=_0x235053[_0x1085f7(0x137)],_0x413f83=_0x235053['id'],_0x37fb44={'memberId':(await this[_0x1085f7(0xfe)]['requireSession'](_0x24209a))['getMemberID'](),'unitId':_0x24209a,'threadId':_0x31894c,'mention':_0x168baf,'content':_0x44b424,'replyId':_0x413f83},_0x2bb9a7=await this[_0x1085f7(0x14c)]['post'](_0x1085f7(0x11b)+_0x24209a+_0x1085f7(0x154),{'body':_0x37fb44});return!_0x2bb9a7[_0x1085f7(0xdf)][_0x1085f7(0x100)]||_0x2bb9a7[_0x1085f7(0xdf)]['error']['code']===0x1;}async[_0x24d132(0x107)](_0x190490){const _0x44a3f3=_0x24d132,{unitId:_0x4110a8}=_0x190490,_0x4048c4=_0x190490[_0x44a3f3(0x137)],_0x2c6584={'memberId':this[_0x44a3f3(0x125)][_0x44a3f3(0x152)]()['userID'],'unitId':_0x4110a8,'threadId':_0x4048c4,'solved':_0x190490[_0x44a3f3(0x159)]?_0x3ca880['Solved']:_0x3ca880[_0x44a3f3(0xfc)]},_0x58b44c=await this['_httpService'][_0x44a3f3(0x164)](_0x44a3f3(0x11b)+_0x4110a8+_0x44a3f3(0xf4),{'body':_0x2c6584});return!_0x58b44c['body'][_0x44a3f3(0x100)]||_0x58b44c['body'][_0x44a3f3(0x100)]['code']===0x1;}async[_0x24d132(0x126)](_0x1d3898,_0x204a59,_0x328f18,_0x8a9fbb){const _0x221508=_0x24d132,_0x390c00={'memberId':(await this[_0x221508(0xfe)][_0x221508(0x124)](_0x1d3898))[_0x221508(0x131)](),'threadId':_0x328f18,'replyId':_0x8a9fbb,'unitId':_0x1d3898},_0xa57bdb=await this[_0x221508(0x14c)][_0x221508(0x164)](_0x221508(0x11b)+_0x1d3898+_0x221508(0x15f),{'body':_0x390c00});return!_0xa57bdb[_0x221508(0xdf)][_0x221508(0x100)]||_0xa57bdb[_0x221508(0xdf)][_0x221508(0x100)][_0x221508(0x105)]===0x1;}async[_0x24d132(0x103)](_0x43384a,_0x2eb629,_0x3bccbc){const _0x267c2a=_0x24d132,_0x445819={'unitId':_0x43384a,'threadId':_0x3bccbc},_0x1c53ad=await this[_0x267c2a(0x14c)]['post']('/universer-api/comment/unit/'+_0x43384a+_0x267c2a(0x143),{'body':_0x445819}),_0xea8e62=_0x3bccbc[_0x267c2a(0xf2)](_0x4fe749=>_0x35c8d0(_0x1c53ad[_0x267c2a(0xdf)][_0x267c2a(0x11f)][_0x4fe749],_0x43384a,_0x2eb629))[_0x267c2a(0x160)](Boolean);return Object['values'](_0x1c53ad[_0x267c2a(0xdf)][_0x267c2a(0x108)])[_0x267c2a(0xe6)](_0x27a557=>{const _0x45a7cd=_0x267c2a;this[_0x45a7cd(0x125)][_0x45a7cd(0xff)](_0x27a557);}),_0xea8e62;}[_0x24d132(0x156)](_0x42b7a8){const _0x59ebbe=_0x24d132;return{'id':_0x42b7a8['id'],'threadId':_0x42b7a8[_0x59ebbe(0x137)],'ref':_0x42b7a8[_0x59ebbe(0x10b)]};}};_0x3dc6ee=_0x28e893([_0x359717(0x0,_0x3cf436[_0x24d132(0xea)](_0xece950[_0x24d132(0x144)])),_0x359717(0x1,_0x3cf436['Inject'](_0x3cf436['UserManagerService'])),_0x359717(0x2,_0x3cf436[_0x24d132(0xea)](_0x182376[_0x24d132(0x142)]))],_0x3dc6ee);var _0x40cae6=Object[_0x24d132(0x145)],_0x578f53=(_0x1e46e9,_0x38bc85,_0xc9100c,_0x11755e)=>{const _0x16ca4b=_0x24d132;for(var _0x346c6e=_0x11755e>0x1?void 0x0:_0x11755e?_0x40cae6(_0x38bc85,_0xc9100c):_0x38bc85,_0x44169f=_0x1e46e9[_0x16ca4b(0x113)]-0x1,_0x390d53;_0x44169f>=0x0;_0x44169f--)(_0x390d53=_0x1e46e9[_0x44169f])&&(_0x346c6e=_0x390d53(_0x346c6e)||_0x346c6e);return _0x346c6e;},_0x5a83a4=(_0x233c99,_0x1a2d9b)=>(_0x5a47f7,_0xd1a598)=>_0x1a2d9b(_0x5a47f7,_0xd1a598,_0x233c99);let _0x1c6ea4=class extends _0x3cf436[_0x24d132(0xf3)]{constructor(_0x1ce08b,_0x10b066){const _0x3efff2=_0x24d132;super(),this[_0x3efff2(0x14a)]=_0x1ce08b,this[_0x3efff2(0xde)]=_0x10b066,this['_initDataSource']();}[_0x24d132(0x13d)](){const _0xd6c6e8=_0x24d132;this[_0xd6c6e8(0x14a)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xd6c6e8(0xeb)]=!0x1;}};_0x1c6ea4=_0x578f53([_0x5a83a4(0x0,_0x9352bb[_0x24d132(0x101)]),_0x5a83a4(0x1,_0x3cf436[_0x24d132(0xea)](_0x3dc6ee))],_0x1c6ea4);var _0x43e69b=Object[_0x24d132(0x12d)],_0xb1cf58=Object[_0x24d132(0x145)],_0x2f10b8=(_0x5b652d,_0x4f2325,_0x107721)=>_0x4f2325 in _0x5b652d?_0x43e69b(_0x5b652d,_0x4f2325,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x107721}):_0x5b652d[_0x4f2325]=_0x107721,_0x2772a9=(_0x39f55a,_0x57277b,_0x152232,_0x8b6177)=>{const _0x2a82c7=_0x24d132;for(var _0x1e3dd7=_0x8b6177>0x1?void 0x0:_0x8b6177?_0xb1cf58(_0x57277b,_0x152232):_0x57277b,_0x3835e1=_0x39f55a[_0x2a82c7(0x113)]-0x1,_0x379e6f;_0x3835e1>=0x0;_0x3835e1--)(_0x379e6f=_0x39f55a[_0x3835e1])&&(_0x1e3dd7=_0x379e6f(_0x1e3dd7)||_0x1e3dd7);return _0x1e3dd7;},_0x28de69=(_0xfa49cc,_0x435a01)=>(_0x44882d,_0x78046d)=>_0x435a01(_0x44882d,_0x78046d,_0xfa49cc),_0x48ee5c=(_0x374088,_0x4f5b9e,_0xae5018)=>_0x2f10b8(_0x374088,typeof _0x4f5b9e!='symbol'?_0x4f5b9e+'':_0x4f5b9e,_0xae5018);_0x2bd891[_0x24d132(0xe1)]=class extends _0x3cf436[_0x24d132(0x132)]{constructor(_0x349884=_0x1b4fd6,_0x2ba9c6,_0xc06f10){const _0x272aef=_0x24d132;super(),this[_0x272aef(0x114)]=_0x349884,this['_injector']=_0x2ba9c6,this[_0x272aef(0xe9)]=_0xc06f10;const {..._0x4da3d2}=_0x3cf436['merge']({},_0x1b4fd6,this['_config']);this[_0x272aef(0xe9)][_0x272aef(0x110)](_0x5c4310,_0x4da3d2);}[_0x24d132(0xfb)](){const _0x162992=_0x24d132;[[_0x3dc6ee],[_0x1c6ea4],[_0x468484]][_0x162992(0xe6)](_0x2d5f20=>{const _0x2bdaa3=_0x162992;this['_injector'][_0x2bdaa3(0x135)](_0x2d5f20);});}[_0x24d132(0x161)](){const _0x16e048=_0x24d132;this[_0x16e048(0xdc)][_0x16e048(0xe5)](_0x1c6ea4),this[_0x16e048(0xdc)][_0x16e048(0xe5)](_0x468484);}},_0x48ee5c(_0x2bd891[_0x24d132(0xe1)],_0x24d132(0x12f),_0x422647),_0x48ee5c(_0x2bd891[_0x24d132(0xe1)],_0x24d132(0xfa),_0x3cf436[_0x24d132(0x11d)][_0x24d132(0xf0)]),_0x2bd891[_0x24d132(0xe1)]=_0x2772a9([_0x3cf436['DependentOn'](_0x3221c6[_0x24d132(0xee)],_0x182376[_0x24d132(0x15d)],_0x55a627[_0x24d132(0x129)]),_0x28de69(0x1,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0x140)])),_0x28de69(0x2,_0x3cf436['IConfigService'])],_0x2bd891[_0x24d132(0xe1)]),Object[_0x24d132(0x12d)](_0x2bd891,Symbol[_0x24d132(0x121)],{'value':_0x24d132(0x119)});}));function _0x884c(){const _0x13c66e=['UniverLicensePlugin','reply','payload','parentId','defineProperty','rangeType','pluginName','_init','getMemberID','Plugin','find','UniverProThreadCommentDatasource','add','getUnit','threadId','function','Solved','personId','content','251839xVRRwD','_initDataSource','createTimestamp','Solve','Injector','198VrYyou','CollaborationSessionService','/list','HTTPService','getOwnPropertyDescriptor','amd','UniverCore','root','CommentService','_threadCommentDataSourceService','slice','_httpService','@univerjs-pro/collaboration-client','bufferTime','UniverThreadComment','stringify','Delete','getCurrentUser','Reply','/edit','YYYY/MM/DD\x20HH:mm','saveCommentToSnapshot','thread-comment-data-source.config','delete','resolved','@univerjs/core','@univerjs-pro/license','104CaOpjk','UniverCollaborationClientPlugin','disposeWithMe','/delete','filter','onReady','@univerjs/network','149176CZVNET','post','addComment','updateComment','_injector','UserManagerService','_threadCommentDataSource','body','UniverNetwork','UniverThreadCommentDataSourcePlugin','getUser','/universer-api/user/list','6FvMOQm','get','forEach','Unknown','unitId','_configService','Inject','syncUpdateMutationToColla','replyId','exports','UniverThreadCommentUIPlugin','format','UNIVER_UNKNOWN','CustomRangeType','map','Disposable','/solved','985154xsGTuW','Add','userId','parse','COMMENT','type','onStarting','OpenOrReOpen','rxjs','_sessionService','addUser','error','IThreadCommentDataSourceService','getComment','listComments','_commentService','code','1779155Mofyra','resolveComment','users','UNRECOGNIZED','3mNTWXM','ref','Edit','@univerjs/thread-comment','customRanges','4142712FsKydk','setConfig','solved','12421170wttOMU','length','_config','UniverThreadCommentUi','rangeId','user','replies','Module','userID','/universer-api/comment/unit/','commentUpdate$','UniverInstanceType','_threadCommentModel','comments','ThreadCommentModel','toStringTag','@univerjs/thread-comment-ui','/reply','requireSession','_userService','deleteComment','dayjs','subscribe'];_0x884c=function(){return _0x13c66e;};return _0x884c();}
|
|
1
|
+
function _0x4fc1(_0x5d6968,_0x1a016e){_0x5d6968=_0x5d6968-0x99;const _0x275932=_0x2759();let _0x4fc19a=_0x275932[_0x5d6968];return _0x4fc19a;}function _0x2759(){const _0x185be8=['onReady','_commentService','_injector','values','find','UNIVER_UNKNOWN','_threadCommentDataSource','userID','COMMENT','dayjs','users','defineProperty','UserManagerService','_threadCommentDataSourceService','UNRECOGNIZED','length','Unknown','thread-comment-data-source.config','228LpBFYm','add','@univerjs-pro/license','requireSession','getUser','Solved','solved','Inject','Edit','type','getComment','_initDataSource','error','listComments','UniverCollaborationClientPlugin','pluginName','customRanges','slice','DependentOn','object','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','exports','@univerjs/core','9jLmBhY','650429SuxmoG','rangeType','user','OpenOrReOpen','/reply','CollaborationSessionService','setConfig','forEach','resolved','UniverProCollaborationClient','1654070UlTYYz','62RNbByq','UniverThreadCommentUi','size','/universer-api/comment/unit/','11773256IuqmGR','post','pipe','get','Disposable','getMemberID','symbol','_threadCommentModel','UniverThreadCommentUIPlugin','addComment','529716CGUKBo','UniverLicensePlugin','IConfigService','UniverThreadCommentDataSourcePlugin','100ZJqOpE','2931488IRvlef','bufferTime','createTimestamp','IThreadCommentDataSourceService','body','amd','rangeId','syncUpdateMutationToColla','_userService','_httpService','@univerjs/thread-comment-ui','updateComment','Solve','subscribe','parse','userId','Add','getUnit','UniverProThreadCommentDatasource','resolveComment','code','UniverCore','deleteComment','disposeWithMe','threadId','25yBYTdv','content','18tqUmWd','Reply','addUser','CustomRangeType','_configService','saveCommentToSnapshot','commentUpdate$','477332sEaMWp','Delete','map','@univerjs/network','/solved','/edit','root','_sessionService','reply','HTTPService','/add','@univerjs-pro/collaboration-client','Injector','parentId','filter','UniverProLicense','_initUserSync','_config','delete','UniverNetwork','personId','toStringTag','_init','replyId','comment','30894XgCily','UniverInstanceType','rxjs','replies','merge'];_0x2759=function(){return _0x185be8;};return _0x2759();}(function(_0x238c7e,_0x404d76){const _0x4b089a=_0x4fc1,_0x4ce29a=_0x238c7e();while(!![]){try{const _0x5b5a27=parseInt(_0x4b089a(0x111))/0x1*(-parseInt(_0x4b089a(0xc3))/0x2)+parseInt(_0x4b089a(0xd1))/0x3+parseInt(_0x4b089a(0xf8))/0x4*(-parseInt(_0x4b089a(0xef))/0x5)+-parseInt(_0x4b089a(0xf1))/0x6*(-parseInt(_0x4b089a(0xd6))/0x7)+parseInt(_0x4b089a(0xc7))/0x8*(-parseInt(_0x4b089a(0xb7))/0x9)+parseInt(_0x4b089a(0xd5))/0xa*(parseInt(_0x4b089a(0xc2))/0xb)+-parseInt(_0x4b089a(0x9e))/0xc*(-parseInt(_0x4b089a(0xb8))/0xd);if(_0x5b5a27===_0x404d76)break;else _0x4ce29a['push'](_0x4ce29a['shift']());}catch(_0x5d0450){_0x4ce29a['push'](_0x4ce29a['shift']());}}}(_0x2759,0xd241f),function(_0x543e33,_0x37f35d){const _0x1565dd=_0x4fc1;typeof exports==_0x1565dd(0xb1)&&typeof module<'u'?_0x37f35d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1565dd(0xdb)]?define([_0x1565dd(0xb5),_0x1565dd(0x103),_0x1565dd(0xa0),_0x1565dd(0xb6),_0x1565dd(0xe0),'@univerjs/thread-comment',_0x1565dd(0x113),_0x1565dd(0xfb)],_0x37f35d):(_0x543e33=typeof globalThis<'u'?globalThis:_0x543e33||self,_0x37f35d(_0x543e33[_0x1565dd(0xe8)]={},_0x543e33[_0x1565dd(0xc1)],_0x543e33[_0x1565dd(0x107)],_0x543e33[_0x1565dd(0xeb)],_0x543e33[_0x1565dd(0xc4)],_0x543e33['UniverThreadComment'],_0x543e33[_0x1565dd(0x113)],_0x543e33[_0x1565dd(0x10b)]));}(this,function(_0x516af5,_0x51f5d2,_0x510c03,_0x4ce256,_0x29c832,_0x49d2c9,_0x4065d9,_0x387da3){'use strict';const _0x37ea4f=_0x4fc1;const _0x34150e=_0x37ea4f(0xb3);var _0x155c68=(_0x1f58fb=>(_0x1f58fb[_0x1f58fb[_0x37ea4f(0xbb)]=0x0]=_0x37ea4f(0xbb),_0x1f58fb[_0x1f58fb[_0x37ea4f(0xa3)]=0x1]=_0x37ea4f(0xa3),_0x1f58fb[_0x1f58fb[_0x37ea4f(0x9a)]=-0x1]='UNRECOGNIZED',_0x1f58fb))(_0x155c68||{}),_0x236599=(_0x5444f6=>(_0x5444f6[_0x5444f6[_0x37ea4f(0x9c)]=0x0]=_0x37ea4f(0x9c),_0x5444f6[_0x5444f6[_0x37ea4f(0xe6)]=0x1]='Add',_0x5444f6[_0x5444f6[_0x37ea4f(0xf2)]=0x2]=_0x37ea4f(0xf2),_0x5444f6[_0x5444f6[_0x37ea4f(0xa6)]=0x3]=_0x37ea4f(0xa6),_0x5444f6[_0x5444f6[_0x37ea4f(0xf9)]=0x4]=_0x37ea4f(0xf9),_0x5444f6[_0x5444f6[_0x37ea4f(0xe2)]=0x5]='Solve',_0x5444f6[_0x5444f6[_0x37ea4f(0x9a)]=-0x1]=_0x37ea4f(0x9a),_0x5444f6))(_0x236599||{});const _0x3eb4e5=_0x2e20bc=>_0x4ce256[_0x37ea4f(0x11f)](new Date(+_0x2e20bc))['format'](_0x37ea4f(0xb4)),_0x343f27=async(_0x139df6,_0x281d54)=>{const _0x269ad4=_0x37ea4f,_0x3f6add=_0x139df6[_0x269ad4(0xca)](_0x4ce256[_0x269ad4(0x122)]),_0x4f6068=_0x139df6[_0x269ad4(0xca)](_0x387da3[_0x269ad4(0x101)]);_0x281d54['forEach'](_0x2fe755=>{const _0x151cf1=_0x269ad4;_0x3f6add[_0x151cf1(0xa2)](_0x2fe755)&&_0x281d54[_0x151cf1(0x10a)](_0x2fe755);}),_0x281d54[_0x269ad4(0xc5)]&&(await _0x4f6068['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x281d54]}}))[_0x269ad4(0xda)]['users'][_0x269ad4(0xbf)](_0x1028e1=>{_0x1028e1&&_0x3f6add['addUser'](_0x1028e1);});};var _0x3f0d8d=Object['getOwnPropertyDescriptor'],_0x3c29d4=(_0x4b13c2,_0x55c5cc,_0x49e8fb,_0x2c90f5)=>{for(var _0x428d80=_0x2c90f5>0x1?void 0x0:_0x2c90f5?_0x3f0d8d(_0x55c5cc,_0x49e8fb):_0x55c5cc,_0x4492bd=_0x4b13c2['length']-0x1,_0x74ad8d;_0x4492bd>=0x0;_0x4492bd--)(_0x74ad8d=_0x4b13c2[_0x4492bd])&&(_0x428d80=_0x74ad8d(_0x428d80)||_0x428d80);return _0x428d80;},_0xf68162=(_0x1515d9,_0x2e9343)=>(_0x3665e0,_0x5148c6)=>_0x2e9343(_0x3665e0,_0x5148c6,_0x1515d9);let _0x26e6b0=class extends _0x4ce256[_0x37ea4f(0xcb)]{constructor(_0x579203,_0x3c69f0,_0x2d8829,_0x27033d){const _0x6c2a7c=_0x37ea4f;super(),this[_0x6c2a7c(0x117)]=_0x579203,this[_0x6c2a7c(0xce)]=_0x3c69f0,this[_0x6c2a7c(0xde)]=_0x2d8829,this[_0x6c2a7c(0x118)]=_0x27033d,this[_0x6c2a7c(0x10e)](),this[_0x6c2a7c(0x108)]();}['_initUserSync'](){const _0x5e03c5=_0x37ea4f;this[_0x5e03c5(0xed)](this[_0x5e03c5(0xce)][_0x5e03c5(0xf7)][_0x5e03c5(0xc9)](_0x4065d9[_0x5e03c5(0xd7)](0x10))['subscribe'](_0x2fd4b0=>{const _0x35c304=_0x5e03c5,_0x63096=new Set();_0x2fd4b0['forEach'](_0x4fe285=>{const _0x2f803d=_0x4fc1;if(_0x4fe285[_0x2f803d(0xa7)]===_0x2f803d(0x9f)){const _0x3b58c5=_0x4fe285['payload'][_0x2f803d(0x10c)];_0x63096['add'](_0x3b58c5);}}),_0x343f27(this[_0x35c304(0x118)],_0x63096);}));}[_0x37ea4f(0x10e)](){const _0xc7b7c5=_0x37ea4f;this[_0xc7b7c5(0xed)](this[_0xc7b7c5(0x117)][_0xc7b7c5(0xf7)][_0xc7b7c5(0xe3)](async _0x5c0f05=>{const _0x33806d=_0xc7b7c5;var _0x4830a2,_0x117c0a,_0x363158,_0x58c8d2;const _0x56e55e=(_0x4830a2=this[_0x33806d(0xce)][_0x33806d(0xe7)](_0x5c0f05['unitId'])[_0x33806d(0x11a)](_0x26704c=>_0x26704c[_0x33806d(0xee)]===_0x5c0f05[_0x33806d(0xee)]))==null?void 0x0:_0x4830a2['root'];if(!_0x56e55e)return;const {unitId:_0x132b42,subUnitId:_0xceb18b}=_0x56e55e;switch(_0x5c0f05[_0x33806d(0xba)]&&this['_userService'][_0x33806d(0xf3)](_0x5c0f05['user']),_0x5c0f05[_0x33806d(0xa7)]){case _0x236599[_0x33806d(0xe6)]:break;case _0x236599[_0x33806d(0xf2)]:{this[_0x33806d(0xce)][_0x33806d(0xd0)](_0x132b42,_0xceb18b,{'unitId':_0x132b42,'subUnitId':_0xceb18b,'ref':'','id':_0x5c0f05['replyId'],'dT':_0x3eb4e5(+_0x5c0f05['createTimestamp']),'threadId':_0x5c0f05[_0x33806d(0xee)],'personId':(_0x363158=(_0x117c0a=_0x5c0f05[_0x33806d(0xba)])==null?void 0x0:_0x117c0a[_0x33806d(0x11d)])!=null?_0x363158:_0x5c0f05[_0x33806d(0xe5)],'text':JSON[_0x33806d(0xe4)](_0x5c0f05[_0x33806d(0xf0)]),'parentId':_0x56e55e['id']});break;}case _0x236599[_0x33806d(0xf9)]:{const _0x2d802d=this[_0x33806d(0xce)][_0x33806d(0xa8)](_0x132b42,_0xceb18b,_0x5c0f05['replyId']);_0x2d802d&&_0x2d802d[_0x33806d(0x105)]&&this[_0x33806d(0xce)][_0x33806d(0xec)](_0x132b42,_0xceb18b,_0x5c0f05['replyId']);break;}case _0x236599['Edit']:{this['_threadCommentModel'][_0x33806d(0xe1)](_0x132b42,_0xceb18b,{'commentId':_0x5c0f05[_0x33806d(0x10f)],'text':JSON['parse'](_0x5c0f05[_0x33806d(0xf0)])});break;}case _0x236599[_0x33806d(0xe2)]:{const _0x43c872=(_0x58c8d2=this['_threadCommentModel'][_0x33806d(0xe7)](_0x5c0f05['unitId'])[_0x33806d(0x11a)](_0x6f1a58=>_0x6f1a58[_0x33806d(0xee)]===_0x5c0f05[_0x33806d(0xee)]))==null?void 0x0:_0x58c8d2[_0x33806d(0xfe)];_0x43c872&&this[_0x33806d(0xce)][_0x33806d(0xe9)](_0x132b42,_0xceb18b,_0x43c872['id'],_0x5c0f05['solved']===_0x155c68[_0x33806d(0xa3)]);break;}}}));}};_0x26e6b0=_0x3c29d4([_0xf68162(0x0,_0x4ce256['Inject'](_0x51f5d2['CommentService'])),_0xf68162(0x1,_0x4ce256[_0x37ea4f(0xa5)](_0x49d2c9['ThreadCommentModel'])),_0xf68162(0x2,_0x4ce256[_0x37ea4f(0xa5)](_0x4ce256[_0x37ea4f(0x122)])),_0xf68162(0x3,_0x4ce256[_0x37ea4f(0xa5)](_0x4ce256[_0x37ea4f(0x104)]))],_0x26e6b0);const _0x580a78=_0x37ea4f(0x9d),_0x37d64c={};var _0x57e98b=Object[_0x37ea4f(0xb2)],_0x6a96ca=(_0x523315,_0x15e13d,_0x459813,_0x20acb9)=>{const _0x560055=_0x37ea4f;for(var _0x58290e=_0x20acb9>0x1?void 0x0:_0x20acb9?_0x57e98b(_0x15e13d,_0x459813):_0x15e13d,_0x388795=_0x523315[_0x560055(0x9b)]-0x1,_0xdf1b25;_0x388795>=0x0;_0x388795--)(_0xdf1b25=_0x523315[_0x388795])&&(_0x58290e=_0xdf1b25(_0x58290e)||_0x58290e);return _0x58290e;},_0x5e2716=(_0x555545,_0x3fab07)=>(_0x49e4a4,_0x52b85a)=>_0x3fab07(_0x49e4a4,_0x52b85a,_0x555545);function _0x30fced(_0x46ae84,_0x87ea5b){const _0x56e83f=_0x37ea4f,_0x5a23a6=_0x46ae84[_0x56e83f(0x114)][0x0];return{..._0x87ea5b,'id':_0x5a23a6['replyId'],'resolved':_0x46ae84[_0x56e83f(0xa4)]===0x1,'dT':_0x3eb4e5(_0x5a23a6[_0x56e83f(0xd8)]),'personId':_0x5a23a6[_0x56e83f(0xe5)],'threadId':_0x5a23a6[_0x56e83f(0xee)]};}function _0x369def(_0x164578,_0x518ea2,_0x4084d3){const _0x2d08a7=_0x37ea4f;var _0x589ead,_0xfad0cf;if(((_0xfad0cf=(_0x589ead=_0x164578==null?void 0x0:_0x164578[_0x2d08a7(0x114)])==null?void 0x0:_0x589ead[_0x2d08a7(0x9b)])!=null?_0xfad0cf:0x0)>0x0){const _0x208b33=(_0x475bb7,_0x739b25)=>({'id':_0x475bb7[_0x2d08a7(0x10f)],'threadId':_0x475bb7[_0x2d08a7(0xee)],'dT':_0x3eb4e5(_0x475bb7['createTimestamp']),'personId':_0x475bb7['userId'],'resolved':_0x164578[_0x2d08a7(0xa4)]===_0x155c68[_0x2d08a7(0xa3)],'unitId':_0x518ea2,'subUnitId':_0x4084d3,'text':JSON[_0x2d08a7(0xe4)](_0x475bb7[_0x2d08a7(0xf0)]),'parentId':_0x739b25}),_0xf2bf5b=_0x208b33(_0x164578[_0x2d08a7(0x114)][0x0]);return{..._0xf2bf5b,'children':_0x164578[_0x2d08a7(0x114)][_0x2d08a7(0xaf)](0x1)['map'](_0x258a87=>_0x208b33(_0x258a87,_0xf2bf5b['id']))};}return null;}let _0x4053b8=class{constructor(_0x3e52f9,_0x29bbd4,_0x4ddc7a){const _0xe25b96=_0x37ea4f;this['_httpService']=_0x3e52f9,this[_0xe25b96(0xde)]=_0x29bbd4,this[_0xe25b96(0xff)]=_0x4ddc7a;}async[_0x37ea4f(0xd0)](_0x340b9a){const _0x5eeb7b=_0x37ea4f;var _0x3fc2d4,_0x819e66;const {parentId:_0x574289,unitId:_0x524cf9,text:_0x3c24ed,threadId:_0xd3a7bf}=_0x340b9a,_0x1c687c=(_0x819e66=(_0x3fc2d4=_0x3c24ed[_0x5eeb7b(0xae)])==null?void 0x0:_0x3fc2d4['filter'](_0x119cc6=>_0x119cc6[_0x5eeb7b(0xb9)]===_0x4ce256[_0x5eeb7b(0xf4)][_0x5eeb7b(0x11e)])[_0x5eeb7b(0xfa)](_0x3be7b3=>_0x3be7b3[_0x5eeb7b(0xdc)]))!=null?_0x819e66:[],_0x2fb561=JSON['stringify'](_0x3c24ed),_0x5be694=(await this[_0x5eeb7b(0xff)][_0x5eeb7b(0xa1)](_0x524cf9))[_0x5eeb7b(0xcc)]();if(_0x574289){const _0x762d35={'memberId':_0x5be694,'unitId':_0x524cf9,'content':_0x2fb561,'mention':_0x1c687c,'threadId':_0xd3a7bf},_0x79cf0f=(await this[_0x5eeb7b(0xdf)][_0x5eeb7b(0xc8)]('/universer-api/comment/unit/'+_0x524cf9+_0x5eeb7b(0xbc),{'body':_0x762d35}))[_0x5eeb7b(0xda)][_0x5eeb7b(0x100)];return{..._0x340b9a,'id':_0x79cf0f[_0x5eeb7b(0x10f)],'dT':_0x4ce256[_0x5eeb7b(0x11f)](+_0x79cf0f[_0x5eeb7b(0xd8)])['format'](_0x5eeb7b(0xb4)),'personId':_0x79cf0f[_0x5eeb7b(0xe5)]};}else{const _0x5441fa={'memberId':_0x5be694,'unitId':_0x524cf9,'content':_0x2fb561,'mention':_0x1c687c},_0x571883=await this[_0x5eeb7b(0xdf)][_0x5eeb7b(0xc8)](_0x5eeb7b(0xc6)+_0x524cf9+_0x5eeb7b(0x102),{'body':_0x5441fa});return _0x30fced(_0x571883[_0x5eeb7b(0xda)][_0x5eeb7b(0x110)],_0x340b9a);}}async[_0x37ea4f(0xe1)](_0x107d41){const _0x4b1443=_0x37ea4f;var _0x24d404,_0x217c6d;const {text:_0x48828e,unitId:_0x11e28b}=_0x107d41,_0x166fad=(_0x217c6d=(_0x24d404=_0x48828e[_0x4b1443(0xae)])==null?void 0x0:_0x24d404[_0x4b1443(0x106)](_0x51e84b=>_0x51e84b[_0x4b1443(0xb9)]===_0x4ce256[_0x4b1443(0xf4)][_0x4b1443(0x11e)])[_0x4b1443(0xfa)](_0x3ef1b2=>_0x3ef1b2[_0x4b1443(0xdc)]))!=null?_0x217c6d:[],_0xd5c04c=JSON['stringify'](_0x48828e),_0x15670b=_0x107d41[_0x4b1443(0xee)],_0x4667b1=_0x107d41['id'],_0x17f130={'memberId':(await this[_0x4b1443(0xff)]['requireSession'](_0x11e28b))[_0x4b1443(0xcc)](),'unitId':_0x11e28b,'threadId':_0x15670b,'mention':_0x166fad,'content':_0xd5c04c,'replyId':_0x4667b1},_0x312441=await this['_httpService'][_0x4b1443(0xc8)](_0x4b1443(0xc6)+_0x11e28b+_0x4b1443(0xfd),{'body':_0x17f130});return!_0x312441[_0x4b1443(0xda)][_0x4b1443(0xaa)]||_0x312441[_0x4b1443(0xda)]['error'][_0x4b1443(0xea)]===0x1;}async[_0x37ea4f(0xe9)](_0x591ec5){const _0x35d622=_0x37ea4f,{unitId:_0x2f08b7}=_0x591ec5,_0x21b103=_0x591ec5['threadId'],_0xc5456f={'memberId':this[_0x35d622(0xde)]['getCurrentUser']()['userID'],'unitId':_0x2f08b7,'threadId':_0x21b103,'solved':_0x591ec5[_0x35d622(0xc0)]?_0x155c68[_0x35d622(0xa3)]:_0x155c68['OpenOrReOpen']},_0x402679=await this['_httpService'][_0x35d622(0xc8)](_0x35d622(0xc6)+_0x2f08b7+_0x35d622(0xfc),{'body':_0xc5456f});return!_0x402679[_0x35d622(0xda)][_0x35d622(0xaa)]||_0x402679[_0x35d622(0xda)]['error'][_0x35d622(0xea)]===0x1;}async[_0x37ea4f(0xec)](_0x910d52,_0xacdec1,_0x15a141,_0x7f2675){const _0x187a28=_0x37ea4f,_0x52b1e7={'memberId':(await this[_0x187a28(0xff)][_0x187a28(0xa1)](_0x910d52))[_0x187a28(0xcc)](),'threadId':_0x15a141,'replyId':_0x7f2675,'unitId':_0x910d52},_0x3bb2ac=await this[_0x187a28(0xdf)][_0x187a28(0xc8)](_0x187a28(0xc6)+_0x910d52+'/delete',{'body':_0x52b1e7});return!_0x3bb2ac['body'][_0x187a28(0xaa)]||_0x3bb2ac['body'][_0x187a28(0xaa)]['code']===0x1;}async[_0x37ea4f(0xab)](_0xd93a2,_0x5decac,_0x59f64a){const _0x581666=_0x37ea4f,_0x4befd8={'unitId':_0xd93a2,'threadId':_0x59f64a},_0x53faa7=await this[_0x581666(0xdf)][_0x581666(0xc8)](_0x581666(0xc6)+_0xd93a2+'/list',{'body':_0x4befd8}),_0xc9ed05=_0x59f64a[_0x581666(0xfa)](_0x3d5e77=>_0x369def(_0x53faa7['body']['comments'][_0x3d5e77],_0xd93a2,_0x5decac))[_0x581666(0x106)](Boolean);return Object[_0x581666(0x119)](_0x53faa7[_0x581666(0xda)][_0x581666(0x120)])['forEach'](_0x15ae1b=>{const _0x3ed8d5=_0x581666;this['_userService'][_0x3ed8d5(0xf3)](_0x15ae1b);}),_0xc9ed05;}[_0x37ea4f(0xf6)](_0x4dbc7b){return{'id':_0x4dbc7b['id'],'threadId':_0x4dbc7b['threadId'],'ref':_0x4dbc7b['ref']};}};_0x4053b8=_0x6a96ca([_0x5e2716(0x0,_0x4ce256[_0x37ea4f(0xa5)](_0x387da3[_0x37ea4f(0x101)])),_0x5e2716(0x1,_0x4ce256[_0x37ea4f(0xa5)](_0x4ce256['UserManagerService'])),_0x5e2716(0x2,_0x4ce256[_0x37ea4f(0xa5)](_0x51f5d2[_0x37ea4f(0xbd)]))],_0x4053b8);var _0x37fb3a=Object[_0x37ea4f(0xb2)],_0x10d955=(_0x2b6d32,_0x1408da,_0x3fbb21,_0x529bc0)=>{for(var _0x2b6f3c=_0x529bc0>0x1?void 0x0:_0x529bc0?_0x37fb3a(_0x1408da,_0x3fbb21):_0x1408da,_0x739980=_0x2b6d32['length']-0x1,_0x2938fd;_0x739980>=0x0;_0x739980--)(_0x2938fd=_0x2b6d32[_0x739980])&&(_0x2b6f3c=_0x2938fd(_0x2b6f3c)||_0x2b6f3c);return _0x2b6f3c;},_0x5276a7=(_0x5c3cc9,_0xc5f69f)=>(_0x340763,_0x4968f3)=>_0xc5f69f(_0x340763,_0x4968f3,_0x5c3cc9);let _0x2a24cb=class extends _0x4ce256[_0x37ea4f(0xcb)]{constructor(_0xad4cd2,_0x39901c){const _0x115244=_0x37ea4f;super(),this[_0x115244(0x99)]=_0xad4cd2,this[_0x115244(0x11c)]=_0x39901c,this[_0x115244(0xa9)]();}[_0x37ea4f(0xa9)](){const _0x1a8e75=_0x37ea4f;this[_0x1a8e75(0x99)]['dataSource']=this[_0x1a8e75(0x11c)],this[_0x1a8e75(0x99)][_0x1a8e75(0xdd)]=!0x1;}};_0x2a24cb=_0x10d955([_0x5276a7(0x0,_0x49d2c9[_0x37ea4f(0xd9)]),_0x5276a7(0x1,_0x4ce256['Inject'](_0x4053b8))],_0x2a24cb);var _0x64b0f1=Object[_0x37ea4f(0x121)],_0x1dfc3a=Object[_0x37ea4f(0xb2)],_0xa26552=(_0x5a22fa,_0x21ba51,_0x48659b)=>_0x21ba51 in _0x5a22fa?_0x64b0f1(_0x5a22fa,_0x21ba51,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48659b}):_0x5a22fa[_0x21ba51]=_0x48659b,_0x333fb1=(_0x32a523,_0x4640fe,_0x39123b,_0x91f368)=>{const _0x3f7a44=_0x37ea4f;for(var _0x587985=_0x91f368>0x1?void 0x0:_0x91f368?_0x1dfc3a(_0x4640fe,_0x39123b):_0x4640fe,_0x1120f9=_0x32a523[_0x3f7a44(0x9b)]-0x1,_0x411686;_0x1120f9>=0x0;_0x1120f9--)(_0x411686=_0x32a523[_0x1120f9])&&(_0x587985=_0x411686(_0x587985)||_0x587985);return _0x587985;},_0x14e06e=(_0x2fdb88,_0x20ef31)=>(_0x4f9633,_0x6150c)=>_0x20ef31(_0x4f9633,_0x6150c,_0x2fdb88),_0x146dfb=(_0x5762bc,_0x1fd021,_0x24627f)=>_0xa26552(_0x5762bc,typeof _0x1fd021!=_0x37ea4f(0xcd)?_0x1fd021+'':_0x1fd021,_0x24627f);_0x516af5['UniverThreadCommentDataSourcePlugin']=class extends _0x4ce256['Plugin']{constructor(_0x7efeae=_0x37d64c,_0x5a19b7,_0x420b89){const _0x3fc89e=_0x37ea4f;super(),this[_0x3fc89e(0x109)]=_0x7efeae,this[_0x3fc89e(0x118)]=_0x5a19b7,this['_configService']=_0x420b89;const {..._0x41c07c}=_0x4ce256[_0x3fc89e(0x115)]({},_0x37d64c,this['_config']);this[_0x3fc89e(0xf5)][_0x3fc89e(0xbe)](_0x580a78,_0x41c07c);}['onStarting'](){const _0x5b1990=_0x37ea4f;[[_0x4053b8],[_0x2a24cb],[_0x26e6b0]][_0x5b1990(0xbf)](_0x4fe094=>{this['_injector']['add'](_0x4fe094);});}[_0x37ea4f(0x116)](){const _0x29bc7c=_0x37ea4f;this['_injector'][_0x29bc7c(0xca)](_0x2a24cb),this[_0x29bc7c(0x118)][_0x29bc7c(0xca)](_0x26e6b0);}},_0x146dfb(_0x516af5[_0x37ea4f(0xd4)],_0x37ea4f(0xad),_0x34150e),_0x146dfb(_0x516af5[_0x37ea4f(0xd4)],_0x37ea4f(0xa7),_0x4ce256[_0x37ea4f(0x112)][_0x37ea4f(0x11b)]),_0x516af5[_0x37ea4f(0xd4)]=_0x333fb1([_0x4ce256[_0x37ea4f(0xb0)](_0x29c832[_0x37ea4f(0xcf)],_0x51f5d2[_0x37ea4f(0xac)],_0x510c03[_0x37ea4f(0xd2)]),_0x14e06e(0x1,_0x4ce256[_0x37ea4f(0xa5)](_0x4ce256[_0x37ea4f(0x104)])),_0x14e06e(0x2,_0x4ce256[_0x37ea4f(0xd3)])],_0x516af5[_0x37ea4f(0xd4)]),Object[_0x37ea4f(0x121)](_0x516af5,Symbol[_0x37ea4f(0x10d)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3-insiders.20260131-b9b8805",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.15.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.3-insiders.20260131-b9b8805",
|
|
49
|
+
"@univerjs-pro/license": "0.15.3-insiders.20260131-b9b8805",
|
|
50
|
+
"@univerjs/core": "0.15.3-insiders.20260131-b9b8805",
|
|
51
|
+
"@univerjs/thread-comment": "0.15.3-insiders.20260131-b9b8805",
|
|
49
52
|
"@univerjs/protocol": "0.1.48",
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment-ui": "0.15.2-insiders.20260124-12fc7f0",
|
|
53
|
-
"@univerjs-pro/license": "0.15.2-insiders.20260124-12fc7f0",
|
|
54
|
-
"@univerjs/core": "0.15.2-insiders.20260124-12fc7f0"
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.15.3-insiders.20260131-b9b8805",
|
|
54
|
+
"@univerjs/network": "0.15.3-insiders.20260131-b9b8805"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.1",
|
|
60
|
-
"vitest": "^4.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.15.
|
|
60
|
+
"vitest": "^4.0.18",
|
|
61
|
+
"@univerjs-infra/shared": "0.15.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|