@univerjs-pro/thread-comment-datasource 0.15.5 → 0.16.0-insiders.20260302-b09f1e4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x1169(_0x5703f7,_0x4f0a0d){_0x5703f7=_0x5703f7-0x173;const _0x3bb234=_0x3bb2();let _0x1169d7=_0x3bb234[_0x5703f7];return _0x1169d7;}const _0x3d1db5=_0x1169;(function(_0x401810,_0x34c493){const _0x2bd3db=_0x1169,_0x5555d7=_0x401810();while(!![]){try{const _0xe12e78=-parseInt(_0x2bd3db(0x1b7))/0x1*(-parseInt(_0x2bd3db(0x1bb))/0x2)+-parseInt(_0x2bd3db(0x1eb))/0x3+-parseInt(_0x2bd3db(0x1e4))/0x4*(-parseInt(_0x2bd3db(0x182))/0x5)+parseInt(_0x2bd3db(0x1b4))/0x6+parseInt(_0x2bd3db(0x1b0))/0x7*(-parseInt(_0x2bd3db(0x190))/0x8)+-parseInt(_0x2bd3db(0x19d))/0x9*(parseInt(_0x2bd3db(0x1ba))/0xa)+parseInt(_0x2bd3db(0x187))/0xb;if(_0xe12e78===_0x34c493)break;else _0x5555d7['push'](_0x5555d7['shift']());}catch(_0x174e6d){_0x5555d7['push'](_0x5555d7['shift']());}}}(_0x3bb2,0xcddfb));Object[_0x3d1db5(0x199)](exports,Symbol[_0x3d1db5(0x175)],{'value':_0x3d1db5(0x1c5)});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=_0x3d1db5(0x189);var I=(_0x46dec4=>(_0x46dec4[_0x46dec4[_0x3d1db5(0x1a9)]=0x0]='OpenOrReOpen',_0x46dec4[_0x46dec4[_0x3d1db5(0x1a2)]=0x1]=_0x3d1db5(0x1a2),_0x46dec4[_0x46dec4[_0x3d1db5(0x181)]=-0x1]=_0x3d1db5(0x181),_0x46dec4))(I||{}),v=(_0x191b06=>(_0x191b06[_0x191b06['Unknown']=0x0]=_0x3d1db5(0x18f),_0x191b06[_0x191b06[_0x3d1db5(0x176)]=0x1]=_0x3d1db5(0x176),_0x191b06[_0x191b06['Reply']=0x2]=_0x3d1db5(0x1a1),_0x191b06[_0x191b06[_0x3d1db5(0x1e9)]=0x3]=_0x3d1db5(0x1e9),_0x191b06[_0x191b06[_0x3d1db5(0x1d4)]=0x4]='Delete',_0x191b06[_0x191b06[_0x3d1db5(0x1b6)]=0x5]=_0x3d1db5(0x1b6),_0x191b06[_0x191b06[_0x3d1db5(0x181)]=-0x1]=_0x3d1db5(0x181),_0x191b06))(v||{});const f=_0x84494d=>c['dayjs'](new Date(+_0x84494d))['format'](_0x3d1db5(0x1d8)),R=async(_0x517b9d,_0x299b6a)=>{const _0x214aba=_0x3d1db5,_0x2f5da0=_0x517b9d[_0x214aba(0x1e1)](c[_0x214aba(0x1b2)]),_0x1fff50=_0x517b9d[_0x214aba(0x1e1)](P['HTTPService']);_0x299b6a[_0x214aba(0x19b)](_0x4381b7=>{const _0x141257=_0x214aba;_0x2f5da0[_0x141257(0x1a5)](_0x4381b7)&&_0x299b6a[_0x141257(0x1e3)](_0x4381b7);}),_0x299b6a[_0x214aba(0x1d5)]&&(await _0x1fff50['get'](_0x214aba(0x1ce),{'params':{'userIDs':[..._0x299b6a]}}))[_0x214aba(0x1a7)][_0x214aba(0x1b8)][_0x214aba(0x19b)](_0x2ab090=>{const _0x4e02b7=_0x214aba;_0x2ab090&&_0x2f5da0[_0x4e02b7(0x1e2)](_0x2ab090);});};function _0x3bb2(){const _0xd05a53=['filter','post','type','toStringTag','Add','saveCommentToSnapshot','thread-comment-data-source.config','comment','getOwnPropertyDescriptor','threadId','DependentOn','_httpService','UniverCollaborationClientPlugin','updateComment','find','UNRECOGNIZED','8440wOnyEd','getMemberID','subscribe','getComment','replies','8677174UuWOgG','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','values','_threadCommentDataSource','format','ThreadCommentModel','Unknown','591144gXWTKK','Plugin','_init','_initDataSource','_initUserSync','_threadCommentDataSourceService','_injector','_commentService','/edit','defineProperty','CommentService','forEach','userId','117Bcsrft','requireSession','dayjs','rangeType','Reply','Solved','merge','_userService','getUser','map','body','stringify','OpenOrReOpen','onReady','content','Inject','CustomRangeType','setConfig','Disposable','63wrsbyg','_sessionService','UserManagerService','ref','7668594dEQJWW','user','Solve','1sGMOBp','users','add','767170YUbsEu','60042YqYbad','_configService','getUnit','UniverThreadCommentDataSourcePlugin','_threadCommentModel','syncUpdateMutationToColla','reply','parse','bufferTime','UniverInstanceType','Module','slice','getCurrentUser','listComments','onStarting','Injector','commentUpdate$','resolved','UNIVER_UNKNOWN','/universer-api/user/list','/solved','payload','_config','/reply','solved','Delete','size','CollaborationSessionService','deleteComment','YYYY/MM/DD\x20HH:mm','symbol','length','unitId','rangeId','addComment','code','pipe','customRanges','get','addUser','delete','3028ZRTTsJ','root','replyId','error','/delete','Edit','createTimestamp','2607459yVDESE','dataSource'];_0x3bb2=function(){return _0xd05a53;};return _0x3bb2();}var $=Object[_0x3d1db5(0x17a)],E=(_0x47afc7,_0x24d030,_0x27148a,_0xd37bf0)=>{const _0x4510d0=_0x3d1db5;for(var _0x5f920b=_0xd37bf0>0x1?void 0x0:_0xd37bf0?$(_0x24d030,_0x27148a):_0x24d030,_0xd75ae=_0x47afc7[_0x4510d0(0x1da)]-0x1,_0x72d327;_0xd75ae>=0x0;_0xd75ae--)(_0x72d327=_0x47afc7[_0xd75ae])&&(_0x5f920b=_0x72d327(_0x5f920b)||_0x5f920b);return _0x5f920b;},S=(_0x76aad5,_0x8c6167)=>(_0x3afec0,_0xf136f8)=>_0x8c6167(_0x3afec0,_0xf136f8,_0x76aad5);let _=class extends c[_0x3d1db5(0x1af)]{constructor(_0x1ccf63,_0x2247ac,_0x44b69f,_0x45fa01){const _0x12747f=_0x3d1db5;super(),this[_0x12747f(0x197)]=_0x1ccf63,this[_0x12747f(0x1bf)]=_0x2247ac,this[_0x12747f(0x1a4)]=_0x44b69f,this[_0x12747f(0x196)]=_0x45fa01,this[_0x12747f(0x192)](),this[_0x12747f(0x194)]();}['_initUserSync'](){const _0x49cded=_0x3d1db5;this['disposeWithMe'](this[_0x49cded(0x1bf)][_0x49cded(0x1cb)][_0x49cded(0x1df)](j[_0x49cded(0x1c3)](0x10))[_0x49cded(0x184)](_0x56cfdd=>{const _0x1e6c55=_0x49cded,_0xa25cd4=new Set();_0x56cfdd['forEach'](_0x4d064e=>{const _0x15b9a6=_0x1169;if(_0x4d064e[_0x15b9a6(0x174)]===_0x15b9a6(0x1b9)){const _0x8cfe1c=_0x4d064e[_0x15b9a6(0x1d0)]['personId'];_0xa25cd4[_0x15b9a6(0x1b9)](_0x8cfe1c);}}),R(this[_0x1e6c55(0x196)],_0xa25cd4);}));}['_init'](){const _0x4cea3=_0x3d1db5;this['disposeWithMe'](this['_commentService'][_0x4cea3(0x1cb)]['subscribe'](async _0x588f5c=>{const _0x4c11ef=_0x4cea3;var _0x21fc82,_0x3e6393,_0x11cbc1,_0x3d03f6;const _0x4e005a=(_0x21fc82=this[_0x4c11ef(0x1bf)]['getUnit'](_0x588f5c[_0x4c11ef(0x1db)])[_0x4c11ef(0x180)](_0x512c64=>_0x512c64[_0x4c11ef(0x17b)]===_0x588f5c[_0x4c11ef(0x17b)]))==null?void 0x0:_0x21fc82[_0x4c11ef(0x1e5)];if(!_0x4e005a)return;const {unitId:_0x10b12b,subUnitId:_0x5685bf}=_0x4e005a;switch(_0x588f5c[_0x4c11ef(0x1b5)]&&this[_0x4c11ef(0x1a4)][_0x4c11ef(0x1e2)](_0x588f5c[_0x4c11ef(0x1b5)]),_0x588f5c[_0x4c11ef(0x174)]){case v[_0x4c11ef(0x176)]:break;case v[_0x4c11ef(0x1a1)]:{this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1dd)](_0x10b12b,_0x5685bf,{'unitId':_0x10b12b,'subUnitId':_0x5685bf,'ref':'','id':_0x588f5c[_0x4c11ef(0x1e6)],'dT':f(+_0x588f5c[_0x4c11ef(0x1ea)]),'threadId':_0x588f5c[_0x4c11ef(0x17b)],'personId':(_0x11cbc1=(_0x3e6393=_0x588f5c[_0x4c11ef(0x1b5)])==null?void 0x0:_0x3e6393['userID'])!=null?_0x11cbc1:_0x588f5c['userId'],'text':JSON[_0x4c11ef(0x1c2)](_0x588f5c['content']),'parentId':_0x4e005a['id']});break;}case v[_0x4c11ef(0x1d4)]:{const _0x4aad88=this[_0x4c11ef(0x1bf)][_0x4c11ef(0x185)](_0x10b12b,_0x5685bf,_0x588f5c[_0x4c11ef(0x1e6)]);_0x4aad88&&_0x4aad88['parentId']&&this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1d7)](_0x10b12b,_0x5685bf,_0x588f5c[_0x4c11ef(0x1e6)]);break;}case v[_0x4c11ef(0x1e9)]:{this[_0x4c11ef(0x1bf)][_0x4c11ef(0x17f)](_0x10b12b,_0x5685bf,{'commentId':_0x588f5c['replyId'],'text':JSON['parse'](_0x588f5c['content'])});break;}case v[_0x4c11ef(0x1b6)]:{const _0x41529e=(_0x3d03f6=this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1bd)](_0x588f5c[_0x4c11ef(0x1db)])['find'](_0x66b010=>_0x66b010[_0x4c11ef(0x17b)]===_0x588f5c['threadId']))==null?void 0x0:_0x3d03f6[_0x4c11ef(0x1e5)];_0x41529e&&this[_0x4c11ef(0x1bf)]['resolveComment'](_0x10b12b,_0x5685bf,_0x41529e['id'],_0x588f5c[_0x4c11ef(0x1d3)]===I[_0x4c11ef(0x1a2)]);break;}}}));}};_=E([S(0x0,c[_0x3d1db5(0x1ac)](b[_0x3d1db5(0x19a)])),S(0x1,c[_0x3d1db5(0x1ac)](M[_0x3d1db5(0x18e)])),S(0x2,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1b2)])),S(0x3,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1ca)]))],_);const q=_0x3d1db5(0x178),D={};var A=Object[_0x3d1db5(0x17a)],x=(_0x1bb383,_0x5a5faf,_0x25ccb3,_0x2f83cc)=>{const _0x4a51f3=_0x3d1db5;for(var _0x473590=_0x2f83cc>0x1?void 0x0:_0x2f83cc?A(_0x5a5faf,_0x25ccb3):_0x5a5faf,_0x2dac46=_0x1bb383[_0x4a51f3(0x1da)]-0x1,_0x593a08;_0x2dac46>=0x0;_0x2dac46--)(_0x593a08=_0x1bb383[_0x2dac46])&&(_0x473590=_0x593a08(_0x473590)||_0x473590);return _0x473590;},C=(_0x55562b,_0x4dd465)=>(_0x321bcf,_0x56ca1c)=>_0x4dd465(_0x321bcf,_0x56ca1c,_0x55562b);function Y(_0x24dd2f,_0x15efbb){const _0x5582ec=_0x3d1db5,_0x394d69=_0x24dd2f[_0x5582ec(0x186)][0x0];return{..._0x15efbb,'id':_0x394d69[_0x5582ec(0x1e6)],'resolved':_0x24dd2f[_0x5582ec(0x1d3)]===0x1,'dT':f(_0x394d69[_0x5582ec(0x1ea)]),'personId':_0x394d69[_0x5582ec(0x19c)],'threadId':_0x394d69['threadId']};}function G(_0x44a122,_0x5ec112,_0x415e88){const _0x3f2079=_0x3d1db5;var _0x89a76c,_0x3fb1f7;if(((_0x3fb1f7=(_0x89a76c=_0x44a122==null?void 0x0:_0x44a122[_0x3f2079(0x186)])==null?void 0x0:_0x89a76c['length'])!=null?_0x3fb1f7:0x0)>0x0){const _0x469814=(_0xe54661,_0x6fd75e)=>({'id':_0xe54661[_0x3f2079(0x1e6)],'threadId':_0xe54661[_0x3f2079(0x17b)],'dT':f(_0xe54661[_0x3f2079(0x1ea)]),'personId':_0xe54661[_0x3f2079(0x19c)],'resolved':_0x44a122[_0x3f2079(0x1d3)]===I[_0x3f2079(0x1a2)],'unitId':_0x5ec112,'subUnitId':_0x415e88,'text':JSON[_0x3f2079(0x1c2)](_0xe54661[_0x3f2079(0x1ab)]),'parentId':_0x6fd75e}),_0x20584a=_0x469814(_0x44a122[_0x3f2079(0x186)][0x0]);return{..._0x20584a,'children':_0x44a122[_0x3f2079(0x186)][_0x3f2079(0x1c6)](0x1)['map'](_0x22929c=>_0x469814(_0x22929c,_0x20584a['id']))};}return null;}let p=class{constructor(_0x16c7b8,_0x4406f8,_0x4f01d0){const _0x2a60fd=_0x3d1db5;this[_0x2a60fd(0x17d)]=_0x16c7b8,this[_0x2a60fd(0x1a4)]=_0x4406f8,this[_0x2a60fd(0x1b1)]=_0x4f01d0;}async[_0x3d1db5(0x1dd)](_0x5cb4ab){const _0x4c9668=_0x3d1db5;var _0x84c271,_0x51da51;const {parentId:_0x311af8,unitId:_0x389ef4,text:_0x1b5712,threadId:_0x15f9b3}=_0x5cb4ab,_0x2faeee=(_0x51da51=(_0x84c271=_0x1b5712[_0x4c9668(0x1e0)])==null?void 0x0:_0x84c271[_0x4c9668(0x1ed)](_0x3bc051=>_0x3bc051[_0x4c9668(0x1a0)]===c[_0x4c9668(0x1ad)][_0x4c9668(0x18a)])['map'](_0x30a2af=>_0x30a2af[_0x4c9668(0x1dc)]))!=null?_0x51da51:[],_0x59b363=JSON[_0x4c9668(0x1a8)](_0x1b5712),_0x2a8d37=(await this[_0x4c9668(0x1b1)][_0x4c9668(0x19e)](_0x389ef4))['getMemberID']();if(_0x311af8){const _0x224463={'memberId':_0x2a8d37,'unitId':_0x389ef4,'content':_0x59b363,'mention':_0x2faeee,'threadId':_0x15f9b3},_0x5e0b68=(await this[_0x4c9668(0x17d)][_0x4c9668(0x173)](_0x4c9668(0x188)+_0x389ef4+_0x4c9668(0x1d2),{'body':_0x224463}))['body'][_0x4c9668(0x1c1)];return{..._0x5cb4ab,'id':_0x5e0b68[_0x4c9668(0x1e6)],'dT':c[_0x4c9668(0x19f)](+_0x5e0b68['createTimestamp'])[_0x4c9668(0x18d)](_0x4c9668(0x1d8)),'personId':_0x5e0b68[_0x4c9668(0x19c)]};}else{const _0xc6694b={'memberId':_0x2a8d37,'unitId':_0x389ef4,'content':_0x59b363,'mention':_0x2faeee},_0x3ddbc0=await this[_0x4c9668(0x17d)][_0x4c9668(0x173)]('/universer-api/comment/unit/'+_0x389ef4+'/add',{'body':_0xc6694b});return Y(_0x3ddbc0[_0x4c9668(0x1a7)][_0x4c9668(0x179)],_0x5cb4ab);}}async[_0x3d1db5(0x17f)](_0x1b1784){const _0xf52251=_0x3d1db5;var _0x44f8b8,_0x322f8a;const {text:_0x235377,unitId:_0x1ce8bc}=_0x1b1784,_0x100dab=(_0x322f8a=(_0x44f8b8=_0x235377[_0xf52251(0x1e0)])==null?void 0x0:_0x44f8b8['filter'](_0x11462e=>_0x11462e[_0xf52251(0x1a0)]===c[_0xf52251(0x1ad)][_0xf52251(0x18a)])[_0xf52251(0x1a6)](_0x33e788=>_0x33e788['rangeId']))!=null?_0x322f8a:[],_0x54c1d6=JSON[_0xf52251(0x1a8)](_0x235377),_0xdf5469=_0x1b1784[_0xf52251(0x17b)],_0x1ef290=_0x1b1784['id'],_0x546811={'memberId':(await this[_0xf52251(0x1b1)][_0xf52251(0x19e)](_0x1ce8bc))[_0xf52251(0x183)](),'unitId':_0x1ce8bc,'threadId':_0xdf5469,'mention':_0x100dab,'content':_0x54c1d6,'replyId':_0x1ef290},_0xabbcf=await this[_0xf52251(0x17d)][_0xf52251(0x173)](_0xf52251(0x188)+_0x1ce8bc+_0xf52251(0x198),{'body':_0x546811});return!_0xabbcf[_0xf52251(0x1a7)][_0xf52251(0x1e7)]||_0xabbcf[_0xf52251(0x1a7)][_0xf52251(0x1e7)][_0xf52251(0x1de)]===0x1;}async['resolveComment'](_0x441e99){const _0x2b6ffb=_0x3d1db5,{unitId:_0x2094ae}=_0x441e99,_0x2614c3=_0x441e99[_0x2b6ffb(0x17b)],_0x33bc61={'memberId':this['_userService'][_0x2b6ffb(0x1c7)]()['userID'],'unitId':_0x2094ae,'threadId':_0x2614c3,'solved':_0x441e99[_0x2b6ffb(0x1cc)]?I['Solved']:I[_0x2b6ffb(0x1a9)]},_0x2f81bd=await this[_0x2b6ffb(0x17d)][_0x2b6ffb(0x173)](_0x2b6ffb(0x188)+_0x2094ae+_0x2b6ffb(0x1cf),{'body':_0x33bc61});return!_0x2f81bd[_0x2b6ffb(0x1a7)][_0x2b6ffb(0x1e7)]||_0x2f81bd[_0x2b6ffb(0x1a7)][_0x2b6ffb(0x1e7)][_0x2b6ffb(0x1de)]===0x1;}async[_0x3d1db5(0x1d7)](_0x3a4952,_0x1d118c,_0x57df27,_0x4205ef){const _0x320b71=_0x3d1db5,_0x1fe53e={'memberId':(await this['_sessionService'][_0x320b71(0x19e)](_0x3a4952))[_0x320b71(0x183)](),'threadId':_0x57df27,'replyId':_0x4205ef,'unitId':_0x3a4952},_0x4a00ca=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3a4952+_0x320b71(0x1e8),{'body':_0x1fe53e});return!_0x4a00ca[_0x320b71(0x1a7)][_0x320b71(0x1e7)]||_0x4a00ca[_0x320b71(0x1a7)][_0x320b71(0x1e7)]['code']===0x1;}async[_0x3d1db5(0x1c8)](_0x20bc2e,_0x6338c2,_0x3da866){const _0x1b647d=_0x3d1db5,_0xcf5ede={'unitId':_0x20bc2e,'threadId':_0x3da866},_0x1e2518=await this[_0x1b647d(0x17d)][_0x1b647d(0x173)](_0x1b647d(0x188)+_0x20bc2e+'/list',{'body':_0xcf5ede}),_0x5a4582=_0x3da866[_0x1b647d(0x1a6)](_0x114e29=>G(_0x1e2518[_0x1b647d(0x1a7)]['comments'][_0x114e29],_0x20bc2e,_0x6338c2))[_0x1b647d(0x1ed)](Boolean);return Object[_0x1b647d(0x18b)](_0x1e2518[_0x1b647d(0x1a7)][_0x1b647d(0x1b8)])[_0x1b647d(0x19b)](_0x4a3f6f=>{const _0x52d2dd=_0x1b647d;this[_0x52d2dd(0x1a4)][_0x52d2dd(0x1e2)](_0x4a3f6f);}),_0x5a4582;}[_0x3d1db5(0x177)](_0x42f0ca){const _0x1612a2=_0x3d1db5;return{'id':_0x42f0ca['id'],'threadId':_0x42f0ca[_0x1612a2(0x17b)],'ref':_0x42f0ca[_0x1612a2(0x1b3)]};}};p=x([C(0x0,c[_0x3d1db5(0x1ac)](P['HTTPService'])),C(0x1,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1b2)])),C(0x2,c[_0x3d1db5(0x1ac)](b[_0x3d1db5(0x1d6)]))],p);var H=Object[_0x3d1db5(0x17a)],J=(_0x34bb68,_0x15c45f,_0x1481ac,_0x585eb5)=>{for(var _0x2f50e7=_0x585eb5>0x1?void 0x0:_0x585eb5?H(_0x15c45f,_0x1481ac):_0x15c45f,_0xf38a7a=_0x34bb68['length']-0x1,_0x2fa657;_0xf38a7a>=0x0;_0xf38a7a--)(_0x2fa657=_0x34bb68[_0xf38a7a])&&(_0x2f50e7=_0x2fa657(_0x2f50e7)||_0x2f50e7);return _0x2f50e7;},y=(_0xf3b23f,_0x1b9fa5)=>(_0xd764e,_0x53c52a)=>_0x1b9fa5(_0xd764e,_0x53c52a,_0xf3b23f);let g=class extends c[_0x3d1db5(0x1af)]{constructor(_0x26587c,_0x2b24af){const _0x5054b1=_0x3d1db5;super(),this[_0x5054b1(0x195)]=_0x26587c,this[_0x5054b1(0x18c)]=_0x2b24af,this[_0x5054b1(0x193)]();}['_initDataSource'](){const _0x24546c=_0x3d1db5;this[_0x24546c(0x195)][_0x24546c(0x1ec)]=this[_0x24546c(0x18c)],this[_0x24546c(0x195)][_0x24546c(0x1c0)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x3d1db5(0x199)],L=Object['getOwnPropertyDescriptor'],Z=(_0x40e8ff,_0x6f83ec,_0x4bf4e3)=>_0x6f83ec in _0x40e8ff?F(_0x40e8ff,_0x6f83ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bf4e3}):_0x40e8ff[_0x6f83ec]=_0x4bf4e3,W=(_0x5c707f,_0x1c45b6,_0x89b6d6,_0xe58b47)=>{const _0x1b8303=_0x3d1db5;for(var _0x400917=_0xe58b47>0x1?void 0x0:_0xe58b47?L(_0x1c45b6,_0x89b6d6):_0x1c45b6,_0x4103a3=_0x5c707f[_0x1b8303(0x1da)]-0x1,_0x33683b;_0x4103a3>=0x0;_0x4103a3--)(_0x33683b=_0x5c707f[_0x4103a3])&&(_0x400917=_0x33683b(_0x400917)||_0x400917);return _0x400917;},O=(_0x368bd8,_0x4235c1)=>(_0x3886f4,_0x7614cd)=>_0x4235c1(_0x3886f4,_0x7614cd,_0x368bd8),N=(_0x54296e,_0x27b5d6,_0x4c1ab5)=>Z(_0x54296e,typeof _0x27b5d6!=_0x3d1db5(0x1d9)?_0x27b5d6+'':_0x27b5d6,_0x4c1ab5);exports[_0x3d1db5(0x1be)]=class extends c[_0x3d1db5(0x191)]{constructor(_0xd51dc9=D,_0x4641f3,_0x6ef878){const _0x1a47b3=_0x3d1db5;super(),this[_0x1a47b3(0x1d1)]=_0xd51dc9,this[_0x1a47b3(0x196)]=_0x4641f3,this['_configService']=_0x6ef878;const {..._0x5d8773}=c[_0x1a47b3(0x1a3)]({},D,this[_0x1a47b3(0x1d1)]);this[_0x1a47b3(0x1bc)][_0x1a47b3(0x1ae)](q,_0x5d8773);}[_0x3d1db5(0x1c9)](){[[p],[g],[_]]['forEach'](_0x3bb083=>{const _0x34af70=_0x1169;this[_0x34af70(0x196)][_0x34af70(0x1b9)](_0x3bb083);});}[_0x3d1db5(0x1aa)](){const _0x13240f=_0x3d1db5;this[_0x13240f(0x196)][_0x13240f(0x1e1)](g),this[_0x13240f(0x196)][_0x13240f(0x1e1)](_);}},N(exports[_0x3d1db5(0x1be)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3d1db5(0x174),c[_0x3d1db5(0x1c4)][_0x3d1db5(0x1cd)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3d1db5(0x17c)](w['UniverThreadCommentUIPlugin'],b[_0x3d1db5(0x17e)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x3fb5ad=_0x3ba1;(function(_0x1366c0,_0x28d3f9){const _0x5e2767=_0x3ba1,_0x54f9f1=_0x1366c0();while(!![]){try{const _0x3b4f17=-parseInt(_0x5e2767(0x1ca))/0x1+parseInt(_0x5e2767(0x172))/0x2*(-parseInt(_0x5e2767(0x1c5))/0x3)+parseInt(_0x5e2767(0x1c3))/0x4*(parseInt(_0x5e2767(0x1d8))/0x5)+parseInt(_0x5e2767(0x17f))/0x6+parseInt(_0x5e2767(0x1c7))/0x7*(parseInt(_0x5e2767(0x1ba))/0x8)+parseInt(_0x5e2767(0x1d1))/0x9*(parseInt(_0x5e2767(0x176))/0xa)+parseInt(_0x5e2767(0x187))/0xb;if(_0x3b4f17===_0x28d3f9)break;else _0x54f9f1['push'](_0x54f9f1['shift']());}catch(_0xa61ec5){_0x54f9f1['push'](_0x54f9f1['shift']());}}}(_0x181e,0xbe867));Object[_0x3fb5ad(0x193)](exports,Symbol[_0x3fb5ad(0x1b6)],{'value':_0x3fb5ad(0x18a)});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=_0x3fb5ad(0x196);var I=(_0x4f607c=>(_0x4f607c[_0x4f607c[_0x3fb5ad(0x1dc)]=0x0]='OpenOrReOpen',_0x4f607c[_0x4f607c[_0x3fb5ad(0x1d0)]=0x1]=_0x3fb5ad(0x1d0),_0x4f607c[_0x4f607c['UNRECOGNIZED']=-0x1]=_0x3fb5ad(0x1c4),_0x4f607c))(I||{}),v=(_0x27d844=>(_0x27d844[_0x27d844[_0x3fb5ad(0x16d)]=0x0]=_0x3fb5ad(0x16d),_0x27d844[_0x27d844[_0x3fb5ad(0x16c)]=0x1]=_0x3fb5ad(0x16c),_0x27d844[_0x27d844[_0x3fb5ad(0x1d9)]=0x2]='Reply',_0x27d844[_0x27d844[_0x3fb5ad(0x177)]=0x3]=_0x3fb5ad(0x177),_0x27d844[_0x27d844[_0x3fb5ad(0x1a0)]=0x4]='Delete',_0x27d844[_0x27d844[_0x3fb5ad(0x171)]=0x5]=_0x3fb5ad(0x171),_0x27d844[_0x27d844[_0x3fb5ad(0x1c4)]=-0x1]=_0x3fb5ad(0x1c4),_0x27d844))(v||{});const f=_0x483aea=>c[_0x3fb5ad(0x168)](new Date(+_0x483aea))['format'](_0x3fb5ad(0x197)),R=async(_0x5bd974,_0x54aca8)=>{const _0x54ae8c=_0x3fb5ad,_0x10322e=_0x5bd974[_0x54ae8c(0x183)](c[_0x54ae8c(0x1d3)]),_0x19e9fb=_0x5bd974[_0x54ae8c(0x183)](P['HTTPService']);_0x54aca8[_0x54ae8c(0x17a)](_0x173e9a=>{const _0x22b837=_0x54ae8c;_0x10322e[_0x22b837(0x1c1)](_0x173e9a)&&_0x54aca8[_0x22b837(0x16f)](_0x173e9a);}),_0x54aca8[_0x54ae8c(0x178)]&&(await _0x19e9fb['get'](_0x54ae8c(0x199),{'params':{'userIDs':[..._0x54aca8]}}))[_0x54ae8c(0x16b)][_0x54ae8c(0x1d4)][_0x54ae8c(0x17a)](_0x19526e=>{const _0x43e234=_0x54ae8c;_0x19526e&&_0x10322e[_0x43e234(0x189)](_0x19526e);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x1cfeee,_0xf4afb2,_0xcdb4f0,_0x4028b1)=>{for(var _0x3a8630=_0x4028b1>0x1?void 0x0:_0x4028b1?$(_0xf4afb2,_0xcdb4f0):_0xf4afb2,_0xb895b1=_0x1cfeee['length']-0x1,_0x5eba9a;_0xb895b1>=0x0;_0xb895b1--)(_0x5eba9a=_0x1cfeee[_0xb895b1])&&(_0x3a8630=_0x5eba9a(_0x3a8630)||_0x3a8630);return _0x3a8630;},S=(_0x34c43a,_0x4b5589)=>(_0x4efa18,_0x145102)=>_0x4b5589(_0x4efa18,_0x145102,_0x34c43a);let _=class extends c['Disposable']{constructor(_0x1ef9df,_0x516a6d,_0x221c2d,_0x16d8f8){const _0x23846f=_0x3fb5ad;super(),this['_commentService']=_0x1ef9df,this[_0x23846f(0x1b3)]=_0x516a6d,this[_0x23846f(0x1c0)]=_0x221c2d,this[_0x23846f(0x1aa)]=_0x16d8f8,this[_0x23846f(0x1ad)](),this[_0x23846f(0x182)]();}[_0x3fb5ad(0x182)](){const _0x1faf45=_0x3fb5ad;this[_0x1faf45(0x1cf)](this[_0x1faf45(0x1b3)][_0x1faf45(0x1a7)][_0x1faf45(0x195)](j[_0x1faf45(0x191)](0x10))[_0x1faf45(0x1de)](_0x43463c=>{const _0x20cca4=_0x1faf45,_0x40cde5=new Set();_0x43463c[_0x20cca4(0x17a)](_0x536059=>{const _0x3bfdc5=_0x20cca4;if(_0x536059['type']===_0x3bfdc5(0x18e)){const _0x1204b1=_0x536059[_0x3bfdc5(0x1cc)][_0x3bfdc5(0x1d5)];_0x40cde5['add'](_0x1204b1);}}),R(this[_0x20cca4(0x1aa)],_0x40cde5);}));}[_0x3fb5ad(0x1ad)](){const _0x9ceff5=_0x3fb5ad;this[_0x9ceff5(0x1cf)](this[_0x9ceff5(0x179)]['commentUpdate$'][_0x9ceff5(0x1de)](async _0x3321d6=>{const _0x59307b=_0x9ceff5;var _0x1e41ce,_0x4aaea7,_0x6938ab,_0x1173cb;const _0x8c5e1a=(_0x1e41ce=this[_0x59307b(0x1b3)][_0x59307b(0x1b1)](_0x3321d6[_0x59307b(0x18c)])['find'](_0x454244=>_0x454244['threadId']===_0x3321d6[_0x59307b(0x1ce)]))==null?void 0x0:_0x1e41ce[_0x59307b(0x1c9)];if(!_0x8c5e1a)return;const {unitId:_0x4f39b3,subUnitId:_0x4ea7e2}=_0x8c5e1a;switch(_0x3321d6['user']&&this['_userService'][_0x59307b(0x189)](_0x3321d6[_0x59307b(0x185)]),_0x3321d6['type']){case v[_0x59307b(0x16c)]:break;case v['Reply']:{this['_threadCommentModel'][_0x59307b(0x17d)](_0x4f39b3,_0x4ea7e2,{'unitId':_0x4f39b3,'subUnitId':_0x4ea7e2,'ref':'','id':_0x3321d6['replyId'],'dT':f(+_0x3321d6[_0x59307b(0x1b5)]),'threadId':_0x3321d6[_0x59307b(0x1ce)],'personId':(_0x6938ab=(_0x4aaea7=_0x3321d6[_0x59307b(0x185)])==null?void 0x0:_0x4aaea7[_0x59307b(0x1df)])!=null?_0x6938ab:_0x3321d6[_0x59307b(0x175)],'text':JSON['parse'](_0x3321d6[_0x59307b(0x1b0)]),'parentId':_0x8c5e1a['id']});break;}case v[_0x59307b(0x1a0)]:{const _0x327d5d=this[_0x59307b(0x1b3)]['getComment'](_0x4f39b3,_0x4ea7e2,_0x3321d6[_0x59307b(0x1b2)]);_0x327d5d&&_0x327d5d[_0x59307b(0x1a8)]&&this[_0x59307b(0x1b3)][_0x59307b(0x17c)](_0x4f39b3,_0x4ea7e2,_0x3321d6[_0x59307b(0x1b2)]);break;}case v[_0x59307b(0x177)]:{this[_0x59307b(0x1b3)][_0x59307b(0x16e)](_0x4f39b3,_0x4ea7e2,{'commentId':_0x3321d6['replyId'],'text':JSON[_0x59307b(0x169)](_0x3321d6[_0x59307b(0x1b0)])});break;}case v[_0x59307b(0x171)]:{const _0xacf662=(_0x1173cb=this['_threadCommentModel'][_0x59307b(0x1b1)](_0x3321d6[_0x59307b(0x18c)])['find'](_0x2275b3=>_0x2275b3['threadId']===_0x3321d6[_0x59307b(0x1ce)]))==null?void 0x0:_0x1173cb['root'];_0xacf662&&this[_0x59307b(0x1b3)][_0x59307b(0x1a6)](_0x4f39b3,_0x4ea7e2,_0xacf662['id'],_0x3321d6[_0x59307b(0x18b)]===I[_0x59307b(0x1d0)]);break;}}}));}};function _0x181e(){const _0x133d37=['_threadCommentDataSource','UserManagerService','users','personId','code','replies','5vNsfFb','Reply','Inject','_initDataSource','OpenOrReOpen','customRanges','subscribe','userID','UniverInstanceType','_configService','UniverThreadCommentUIPlugin','dayjs','parse','CommentService','body','Add','Unknown','updateComment','delete','Injector','Solve','1690HzCSAq','listComments','onReady','userId','137950aOJzfB','Edit','size','_commentService','forEach','requireSession','deleteComment','addComment','symbol','434694tKllDD','thread-comment-data-source.config','getMemberID','_initUserSync','get','pluginName','user','/add','10904432QLPwFD','ref','addUser','Module','solved','unitId','/edit','add','filter','/universer-api/comment/unit/','bufferTime','onStarting','defineProperty','setConfig','pipe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','map','/universer-api/user/list','_httpService','IThreadCommentDataSourceService','rangeId','post','UniverThreadCommentDataSourcePlugin','_threadCommentDataSourceService','Delete','syncUpdateMutationToColla','comments','IConfigService','merge','getOwnPropertyDescriptor','resolveComment','commentUpdate$','parentId','_sessionService','_injector','length','CustomRangeType','_init','error','getCurrentUser','content','getUnit','replyId','_threadCommentModel','HTTPService','createTimestamp','toStringTag','/list','ThreadCommentModel','Plugin','68776uifKoW','COMMENT','DependentOn','UniverLicensePlugin','values','comment','_userService','getUser','/solved','4111708acsghI','UNRECOGNIZED','3345bqfWLY','UNIVER_UNKNOWN','539ogcrGY','rangeType','root','1155246kenstR','stringify','payload','saveCommentToSnapshot','threadId','disposeWithMe','Solved','81rwBscI'];_0x181e=function(){return _0x133d37;};return _0x181e();}function _0x3ba1(_0x38813b,_0x32f3e5){_0x38813b=_0x38813b-0x167;const _0x181e36=_0x181e();let _0x3ba14b=_0x181e36[_0x38813b];return _0x3ba14b;}_=E([S(0x0,c['Inject'](b[_0x3fb5ad(0x16a)])),S(0x1,c[_0x3fb5ad(0x1da)](M[_0x3fb5ad(0x1b8)])),S(0x2,c[_0x3fb5ad(0x1da)](c['UserManagerService'])),S(0x3,c[_0x3fb5ad(0x1da)](c[_0x3fb5ad(0x170)]))],_);const q=_0x3fb5ad(0x180),D={};var A=Object[_0x3fb5ad(0x1a5)],x=(_0x12f4ae,_0x4c1510,_0x31fd94,_0x192c89)=>{const _0x287302=_0x3fb5ad;for(var _0x4de6e1=_0x192c89>0x1?void 0x0:_0x192c89?A(_0x4c1510,_0x31fd94):_0x4c1510,_0x32780c=_0x12f4ae[_0x287302(0x1ab)]-0x1,_0x5d6c7e;_0x32780c>=0x0;_0x32780c--)(_0x5d6c7e=_0x12f4ae[_0x32780c])&&(_0x4de6e1=_0x5d6c7e(_0x4de6e1)||_0x4de6e1);return _0x4de6e1;},C=(_0xdd2258,_0xb13ae7)=>(_0x3b25d9,_0x17d4c8)=>_0xb13ae7(_0x3b25d9,_0x17d4c8,_0xdd2258);function Y(_0x20ca75,_0x1897ce){const _0x356a23=_0x3fb5ad,_0x26fafd=_0x20ca75[_0x356a23(0x1d7)][0x0];return{..._0x1897ce,'id':_0x26fafd['replyId'],'resolved':_0x20ca75[_0x356a23(0x18b)]===0x1,'dT':f(_0x26fafd[_0x356a23(0x1b5)]),'personId':_0x26fafd[_0x356a23(0x175)],'threadId':_0x26fafd[_0x356a23(0x1ce)]};}function G(_0x44f68f,_0x21754d,_0x221592){const _0x52848a=_0x3fb5ad;var _0x9f63a5,_0x267893;if(((_0x267893=(_0x9f63a5=_0x44f68f==null?void 0x0:_0x44f68f[_0x52848a(0x1d7)])==null?void 0x0:_0x9f63a5[_0x52848a(0x1ab)])!=null?_0x267893:0x0)>0x0){const _0x4a5112=(_0x40e2ea,_0xfda29c)=>({'id':_0x40e2ea['replyId'],'threadId':_0x40e2ea['threadId'],'dT':f(_0x40e2ea['createTimestamp']),'personId':_0x40e2ea[_0x52848a(0x175)],'resolved':_0x44f68f[_0x52848a(0x18b)]===I[_0x52848a(0x1d0)],'unitId':_0x21754d,'subUnitId':_0x221592,'text':JSON[_0x52848a(0x169)](_0x40e2ea[_0x52848a(0x1b0)]),'parentId':_0xfda29c}),_0x398995=_0x4a5112(_0x44f68f[_0x52848a(0x1d7)][0x0]);return{..._0x398995,'children':_0x44f68f[_0x52848a(0x1d7)]['slice'](0x1)[_0x52848a(0x198)](_0x42b3c3=>_0x4a5112(_0x42b3c3,_0x398995['id']))};}return null;}let p=class{constructor(_0x66619d,_0x3a0c22,_0xefbe67){const _0x53e8ee=_0x3fb5ad;this[_0x53e8ee(0x19a)]=_0x66619d,this[_0x53e8ee(0x1c0)]=_0x3a0c22,this[_0x53e8ee(0x1a9)]=_0xefbe67;}async['addComment'](_0x255874){const _0x27f9a6=_0x3fb5ad;var _0x1ea23f,_0x1a41f1;const {parentId:_0x1d4792,unitId:_0xeaa561,text:_0x187dc9,threadId:_0x123eda}=_0x255874,_0x302768=(_0x1a41f1=(_0x1ea23f=_0x187dc9['customRanges'])==null?void 0x0:_0x1ea23f[_0x27f9a6(0x18f)](_0x17e3e6=>_0x17e3e6['rangeType']===c[_0x27f9a6(0x1ac)][_0x27f9a6(0x1bb)])[_0x27f9a6(0x198)](_0x966865=>_0x966865[_0x27f9a6(0x19c)]))!=null?_0x1a41f1:[],_0x2cde5c=JSON[_0x27f9a6(0x1cb)](_0x187dc9),_0x304807=(await this[_0x27f9a6(0x1a9)][_0x27f9a6(0x17b)](_0xeaa561))[_0x27f9a6(0x181)]();if(_0x1d4792){const _0x25cb24={'memberId':_0x304807,'unitId':_0xeaa561,'content':_0x2cde5c,'mention':_0x302768,'threadId':_0x123eda},_0x42e299=(await this[_0x27f9a6(0x19a)]['post']('/universer-api/comment/unit/'+_0xeaa561+'/reply',{'body':_0x25cb24}))['body']['reply'];return{..._0x255874,'id':_0x42e299[_0x27f9a6(0x1b2)],'dT':c['dayjs'](+_0x42e299[_0x27f9a6(0x1b5)])['format'](_0x27f9a6(0x197)),'personId':_0x42e299['userId']};}else{const _0x4e7e03={'memberId':_0x304807,'unitId':_0xeaa561,'content':_0x2cde5c,'mention':_0x302768},_0x3af649=await this[_0x27f9a6(0x19a)][_0x27f9a6(0x19d)](_0x27f9a6(0x190)+_0xeaa561+_0x27f9a6(0x186),{'body':_0x4e7e03});return Y(_0x3af649[_0x27f9a6(0x16b)][_0x27f9a6(0x1bf)],_0x255874);}}async['updateComment'](_0x5f2ba4){const _0x14097f=_0x3fb5ad;var _0x684661,_0x247446;const {text:_0x467056,unitId:_0x14c8ec}=_0x5f2ba4,_0x8bb9b7=(_0x247446=(_0x684661=_0x467056[_0x14097f(0x1dd)])==null?void 0x0:_0x684661[_0x14097f(0x18f)](_0x234c21=>_0x234c21[_0x14097f(0x1c8)]===c[_0x14097f(0x1ac)]['COMMENT'])[_0x14097f(0x198)](_0x4f398b=>_0x4f398b[_0x14097f(0x19c)]))!=null?_0x247446:[],_0x277ab4=JSON[_0x14097f(0x1cb)](_0x467056),_0x3ac75a=_0x5f2ba4[_0x14097f(0x1ce)],_0x55bc6f=_0x5f2ba4['id'],_0x4857ea={'memberId':(await this[_0x14097f(0x1a9)][_0x14097f(0x17b)](_0x14c8ec))[_0x14097f(0x181)](),'unitId':_0x14c8ec,'threadId':_0x3ac75a,'mention':_0x8bb9b7,'content':_0x277ab4,'replyId':_0x55bc6f},_0x105493=await this[_0x14097f(0x19a)][_0x14097f(0x19d)](_0x14097f(0x190)+_0x14c8ec+_0x14097f(0x18d),{'body':_0x4857ea});return!_0x105493['body'][_0x14097f(0x1ae)]||_0x105493[_0x14097f(0x16b)][_0x14097f(0x1ae)][_0x14097f(0x1d6)]===0x1;}async[_0x3fb5ad(0x1a6)](_0x1d6a40){const _0x160db8=_0x3fb5ad,{unitId:_0x402736}=_0x1d6a40,_0x5ddbdb=_0x1d6a40[_0x160db8(0x1ce)],_0x4272b6={'memberId':this[_0x160db8(0x1c0)][_0x160db8(0x1af)]()['userID'],'unitId':_0x402736,'threadId':_0x5ddbdb,'solved':_0x1d6a40['resolved']?I['Solved']:I[_0x160db8(0x1dc)]},_0x8e896f=await this[_0x160db8(0x19a)][_0x160db8(0x19d)](_0x160db8(0x190)+_0x402736+_0x160db8(0x1c2),{'body':_0x4272b6});return!_0x8e896f['body'][_0x160db8(0x1ae)]||_0x8e896f[_0x160db8(0x16b)][_0x160db8(0x1ae)]['code']===0x1;}async[_0x3fb5ad(0x17c)](_0x56a847,_0x4f3a78,_0x25fe60,_0x168fab){const _0x10ec42=_0x3fb5ad,_0x349409={'memberId':(await this[_0x10ec42(0x1a9)][_0x10ec42(0x17b)](_0x56a847))[_0x10ec42(0x181)](),'threadId':_0x25fe60,'replyId':_0x168fab,'unitId':_0x56a847},_0x540c41=await this[_0x10ec42(0x19a)][_0x10ec42(0x19d)](_0x10ec42(0x190)+_0x56a847+'/delete',{'body':_0x349409});return!_0x540c41[_0x10ec42(0x16b)][_0x10ec42(0x1ae)]||_0x540c41[_0x10ec42(0x16b)][_0x10ec42(0x1ae)]['code']===0x1;}async[_0x3fb5ad(0x173)](_0x17314a,_0x347e24,_0x39b94b){const _0x579ff1=_0x3fb5ad,_0x175461={'unitId':_0x17314a,'threadId':_0x39b94b},_0x5e12da=await this[_0x579ff1(0x19a)][_0x579ff1(0x19d)](_0x579ff1(0x190)+_0x17314a+_0x579ff1(0x1b7),{'body':_0x175461}),_0xd42669=_0x39b94b[_0x579ff1(0x198)](_0x5bfa12=>G(_0x5e12da[_0x579ff1(0x16b)][_0x579ff1(0x1a2)][_0x5bfa12],_0x17314a,_0x347e24))['filter'](Boolean);return Object[_0x579ff1(0x1be)](_0x5e12da[_0x579ff1(0x16b)][_0x579ff1(0x1d4)])[_0x579ff1(0x17a)](_0x852ca2=>{const _0x19f965=_0x579ff1;this[_0x19f965(0x1c0)][_0x19f965(0x189)](_0x852ca2);}),_0xd42669;}[_0x3fb5ad(0x1cd)](_0x5d95da){const _0x382d5d=_0x3fb5ad;return{'id':_0x5d95da['id'],'threadId':_0x5d95da[_0x382d5d(0x1ce)],'ref':_0x5d95da[_0x382d5d(0x188)]};}};p=x([C(0x0,c['Inject'](P[_0x3fb5ad(0x1b4)])),C(0x1,c[_0x3fb5ad(0x1da)](c[_0x3fb5ad(0x1d3)])),C(0x2,c[_0x3fb5ad(0x1da)](b['CollaborationSessionService']))],p);var H=Object[_0x3fb5ad(0x1a5)],J=(_0x57b482,_0x1ca6ae,_0x4d71e0,_0x26242d)=>{const _0x57f8d8=_0x3fb5ad;for(var _0x4b02e6=_0x26242d>0x1?void 0x0:_0x26242d?H(_0x1ca6ae,_0x4d71e0):_0x1ca6ae,_0x539917=_0x57b482[_0x57f8d8(0x1ab)]-0x1,_0x2ee6e2;_0x539917>=0x0;_0x539917--)(_0x2ee6e2=_0x57b482[_0x539917])&&(_0x4b02e6=_0x2ee6e2(_0x4b02e6)||_0x4b02e6);return _0x4b02e6;},y=(_0x43b765,_0x3f6544)=>(_0x5eeb99,_0x3d34cb)=>_0x3f6544(_0x5eeb99,_0x3d34cb,_0x43b765);let g=class extends c['Disposable']{constructor(_0x3f01f5,_0x3a1450){const _0x489d67=_0x3fb5ad;super(),this[_0x489d67(0x19f)]=_0x3f01f5,this[_0x489d67(0x1d2)]=_0x3a1450,this[_0x489d67(0x1db)]();}['_initDataSource'](){const _0x5be968=_0x3fb5ad;this[_0x5be968(0x19f)]['dataSource']=this[_0x5be968(0x1d2)],this[_0x5be968(0x19f)][_0x5be968(0x1a1)]=!0x1;}};g=J([y(0x0,M[_0x3fb5ad(0x19b)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x3fb5ad(0x193)],L=Object[_0x3fb5ad(0x1a5)],Z=(_0x24036e,_0x4643e8,_0x38285a)=>_0x4643e8 in _0x24036e?F(_0x24036e,_0x4643e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38285a}):_0x24036e[_0x4643e8]=_0x38285a,W=(_0x2c4f7b,_0x2559cd,_0x9dffa8,_0x3e299d)=>{const _0x417723=_0x3fb5ad;for(var _0x364e49=_0x3e299d>0x1?void 0x0:_0x3e299d?L(_0x2559cd,_0x9dffa8):_0x2559cd,_0x132e63=_0x2c4f7b[_0x417723(0x1ab)]-0x1,_0x169c42;_0x132e63>=0x0;_0x132e63--)(_0x169c42=_0x2c4f7b[_0x132e63])&&(_0x364e49=_0x169c42(_0x364e49)||_0x364e49);return _0x364e49;},O=(_0x5728c1,_0x119074)=>(_0x4489fb,_0x219140)=>_0x119074(_0x4489fb,_0x219140,_0x5728c1),N=(_0x42ebf3,_0x1b4e73,_0x3a271f)=>Z(_0x42ebf3,typeof _0x1b4e73!=_0x3fb5ad(0x17e)?_0x1b4e73+'':_0x1b4e73,_0x3a271f);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x3fb5ad(0x1b9)]{constructor(_0x1ba34b=D,_0x8ac595,_0x1c5336){const _0x5edc36=_0x3fb5ad;super(),this['_config']=_0x1ba34b,this[_0x5edc36(0x1aa)]=_0x8ac595,this['_configService']=_0x1c5336;const {..._0x38ef9c}=c[_0x5edc36(0x1a4)]({},D,this['_config']);this[_0x5edc36(0x1e1)][_0x5edc36(0x194)](q,_0x38ef9c);}[_0x3fb5ad(0x192)](){const _0x1a3442=_0x3fb5ad;[[p],[g],[_]][_0x1a3442(0x17a)](_0x580ad8=>{const _0x369e2e=_0x1a3442;this[_0x369e2e(0x1aa)]['add'](_0x580ad8);});}[_0x3fb5ad(0x174)](){const _0x4e6aa0=_0x3fb5ad;this[_0x4e6aa0(0x1aa)]['get'](g),this[_0x4e6aa0(0x1aa)][_0x4e6aa0(0x183)](_);}},N(exports[_0x3fb5ad(0x19e)],_0x3fb5ad(0x184),U),N(exports[_0x3fb5ad(0x19e)],'type',c[_0x3fb5ad(0x1e0)][_0x3fb5ad(0x1c6)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3fb5ad(0x1bc)](w[_0x3fb5ad(0x167)],b['UniverCollaborationClientPlugin'],T[_0x3fb5ad(0x1bd)]),O(0x1,c[_0x3fb5ad(0x1da)](c[_0x3fb5ad(0x170)])),O(0x2,c[_0x3fb5ad(0x1a3)])],exports[_0x3fb5ad(0x19e)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x48fe2c=_0x331d;(function(_0x304275,_0x2e0c6c){const _0x53dd1b=_0x331d,_0x17d870=_0x304275();while(!![]){try{const _0x68ad7f=-parseInt(_0x53dd1b(0xba))/0x1+parseInt(_0x53dd1b(0x101))/0x2*(-parseInt(_0x53dd1b(0xa1))/0x3)+parseInt(_0x53dd1b(0xa5))/0x4*(parseInt(_0x53dd1b(0xcc))/0x5)+parseInt(_0x53dd1b(0xb7))/0x6*(parseInt(_0x53dd1b(0xfb))/0x7)+-parseInt(_0x53dd1b(0xf2))/0x8*(-parseInt(_0x53dd1b(0xe3))/0x9)+parseInt(_0x53dd1b(0xaa))/0xa+-parseInt(_0x53dd1b(0xac))/0xb;if(_0x68ad7f===_0x2e0c6c)break;else _0x17d870['push'](_0x17d870['shift']());}catch(_0x556b70){_0x17d870['push'](_0x17d870['shift']());}}}(_0x2786,0xc35c6));import{CommentService as _0x5c121d,CollaborationSessionService as _0x147544,UniverCollaborationClientPlugin as _0x167480}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x25820f}from'@univerjs-pro/license';import{dayjs as _0x5195b2,UserManagerService as _0x53574f,Inject as _0x428f3a,Injector as _0x29b08d,Disposable as _0xe221d9,CustomRangeType as _0x3c6003,UniverInstanceType as _0x4bc7a1,DependentOn as _0xdc118a,Plugin as _0x4b70ca,merge as _0x157acd,IConfigService as _0x5e1548}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5995f1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5b2ea3,IThreadCommentDataSourceService as _0x38d035}from'@univerjs/thread-comment';import{bufferTime as _0x2af66c}from'rxjs';import{HTTPService as _0xa6dc27}from'@univerjs/network';const W=_0x48fe2c(0xed);var I=(_0x266a30=>(_0x266a30[_0x266a30[_0x48fe2c(0xa0)]=0x0]=_0x48fe2c(0xa0),_0x266a30[_0x266a30['Solved']=0x1]=_0x48fe2c(0x100),_0x266a30[_0x266a30[_0x48fe2c(0xa7)]=-0x1]=_0x48fe2c(0xa7),_0x266a30))(I||{}),v=(_0x3e4355=>(_0x3e4355[_0x3e4355[_0x48fe2c(0xc2)]=0x0]=_0x48fe2c(0xc2),_0x3e4355[_0x3e4355['Add']=0x1]='Add',_0x3e4355[_0x3e4355[_0x48fe2c(0xb8)]=0x2]=_0x48fe2c(0xb8),_0x3e4355[_0x3e4355['Edit']=0x3]='Edit',_0x3e4355[_0x3e4355['Delete']=0x4]=_0x48fe2c(0xb0),_0x3e4355[_0x3e4355[_0x48fe2c(0xec)]=0x5]=_0x48fe2c(0xec),_0x3e4355[_0x3e4355['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e4355))(v||{});const y=_0x4bc5e4=>_0x5195b2(new Date(+_0x4bc5e4))[_0x48fe2c(0xaf)](_0x48fe2c(0xb4)),B=async(_0x6dc9c8,_0x4964da)=>{const _0x1ba25a=_0x48fe2c,_0x10248a=_0x6dc9c8[_0x1ba25a(0xf0)](_0x53574f),_0x2bcd00=_0x6dc9c8['get'](_0xa6dc27);_0x4964da[_0x1ba25a(0xd1)](_0x240e29=>{const _0x24df96=_0x1ba25a;_0x10248a['getUser'](_0x240e29)&&_0x4964da[_0x24df96(0xe9)](_0x240e29);}),_0x4964da[_0x1ba25a(0xf1)]&&(await _0x2bcd00[_0x1ba25a(0xf0)](_0x1ba25a(0x102),{'params':{'userIDs':[..._0x4964da]}}))['body']['users'][_0x1ba25a(0xd1)](_0x526ae9=>{const _0x56833f=_0x1ba25a;_0x526ae9&&_0x10248a[_0x56833f(0xa2)](_0x526ae9);});};var K=Object[_0x48fe2c(0xa3)],V=(_0x357eef,_0x191289,_0x1b48f1,_0x37ff15)=>{for(var _0x2079ae=_0x37ff15>0x1?void 0x0:_0x37ff15?K(_0x191289,_0x1b48f1):_0x191289,_0x20a4f3=_0x357eef['length']-0x1,_0x2123a2;_0x20a4f3>=0x0;_0x20a4f3--)(_0x2123a2=_0x357eef[_0x20a4f3])&&(_0x2079ae=_0x2123a2(_0x2079ae)||_0x2079ae);return _0x2079ae;},p=(_0x1b0a29,_0x2c76a2)=>(_0x2bb2d7,_0x512358)=>_0x2c76a2(_0x2bb2d7,_0x512358,_0x1b0a29);let _=class extends _0xe221d9{constructor(_0x4ff4cb,_0x2f045e,_0x4e9578,_0x4e2071){const _0x1ea932=_0x48fe2c;super(),this[_0x1ea932(0xe2)]=_0x4ff4cb,this[_0x1ea932(0xbe)]=_0x2f045e,this[_0x1ea932(0xe4)]=_0x4e9578,this[_0x1ea932(0xdc)]=_0x4e2071,this[_0x1ea932(0xc8)](),this[_0x1ea932(0xc1)]();}[_0x48fe2c(0xc1)](){const _0x6ff1b0=_0x48fe2c;this[_0x6ff1b0(0xbd)](this[_0x6ff1b0(0xbe)]['commentUpdate$'][_0x6ff1b0(0xbf)](_0x2af66c(0x10))[_0x6ff1b0(0xd4)](_0x52b3a6=>{const _0x28d66e=_0x6ff1b0,_0x53c34d=new Set();_0x52b3a6['forEach'](_0x451407=>{const _0x10e342=_0x331d;if(_0x451407[_0x10e342(0xb2)]==='add'){const _0x39c55c=_0x451407[_0x10e342(0xfa)][_0x10e342(0xef)];_0x53c34d[_0x10e342(0xe1)](_0x39c55c);}}),B(this[_0x28d66e(0xdc)],_0x53c34d);}));}[_0x48fe2c(0xc8)](){const _0x1d947a=_0x48fe2c;this[_0x1d947a(0xbd)](this[_0x1d947a(0xe2)][_0x1d947a(0xc6)][_0x1d947a(0xd4)](async _0x312552=>{const _0x41bf6a=_0x1d947a;var _0x5933da,_0x1bd47a,_0x2d2caf,_0x2aae63;const _0x3b9dac=(_0x5933da=this[_0x41bf6a(0xbe)][_0x41bf6a(0xc4)](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0xe9a6d1=>_0xe9a6d1['threadId']===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x5933da[_0x41bf6a(0xdf)];if(!_0x3b9dac)return;const {unitId:_0x230f03,subUnitId:_0x4242d4}=_0x3b9dac;switch(_0x312552[_0x41bf6a(0xcf)]&&this[_0x41bf6a(0xe4)][_0x41bf6a(0xa2)](_0x312552[_0x41bf6a(0xcf)]),_0x312552[_0x41bf6a(0xb2)]){case v[_0x41bf6a(0xfe)]:break;case v['Reply']:{this['_threadCommentModel'][_0x41bf6a(0xf9)](_0x230f03,_0x4242d4,{'unitId':_0x230f03,'subUnitId':_0x4242d4,'ref':'','id':_0x312552[_0x41bf6a(0xf3)],'dT':y(+_0x312552[_0x41bf6a(0xe6)]),'threadId':_0x312552[_0x41bf6a(0xab)],'personId':(_0x2d2caf=(_0x1bd47a=_0x312552[_0x41bf6a(0xcf)])==null?void 0x0:_0x1bd47a[_0x41bf6a(0xea)])!=null?_0x2d2caf:_0x312552[_0x41bf6a(0xf4)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content']),'parentId':_0x3b9dac['id']});break;}case v[_0x41bf6a(0xb0)]:{const _0x1a0244=this[_0x41bf6a(0xbe)]['getComment'](_0x230f03,_0x4242d4,_0x312552[_0x41bf6a(0xf3)]);_0x1a0244&&_0x1a0244[_0x41bf6a(0xdb)]&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xca)](_0x230f03,_0x4242d4,_0x312552['replyId']);break;}case v[_0x41bf6a(0xd5)]:{this[_0x41bf6a(0xbe)]['updateComment'](_0x230f03,_0x4242d4,{'commentId':_0x312552[_0x41bf6a(0xf3)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content'])});break;}case v[_0x41bf6a(0xec)]:{const _0xe12e5d=(_0x2aae63=this[_0x41bf6a(0xbe)]['getUnit'](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0x129802=>_0x129802[_0x41bf6a(0xab)]===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x2aae63[_0x41bf6a(0xdf)];_0xe12e5d&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xda)](_0x230f03,_0x4242d4,_0xe12e5d['id'],_0x312552[_0x41bf6a(0xce)]===I[_0x41bf6a(0x100)]);break;}}}));}};_=V([p(0x0,_0x428f3a(_0x5c121d)),p(0x1,_0x428f3a(_0x5b2ea3)),p(0x2,_0x428f3a(_0x53574f)),p(0x3,_0x428f3a(_0x29b08d))],_);const z=_0x48fe2c(0xad),O={};function _0x331d(_0x4bc6b2,_0x45cb30){_0x4bc6b2=_0x4bc6b2-0x9d;const _0x2786b4=_0x2786();let _0x331dbf=_0x2786b4[_0x4bc6b2];return _0x331dbf;}var k=Object['getOwnPropertyDescriptor'],Q=(_0x139968,_0x470422,_0x3837ec,_0x826566)=>{const _0x1f42fd=_0x48fe2c;for(var _0x1c044d=_0x826566>0x1?void 0x0:_0x826566?k(_0x470422,_0x3837ec):_0x470422,_0x21f1e1=_0x139968[_0x1f42fd(0xcb)]-0x1,_0x191a22;_0x21f1e1>=0x0;_0x21f1e1--)(_0x191a22=_0x139968[_0x21f1e1])&&(_0x1c044d=_0x191a22(_0x1c044d)||_0x1c044d);return _0x1c044d;},b=(_0x36adec,_0x3903b4)=>(_0xeef47a,_0x2d48a8)=>_0x3903b4(_0xeef47a,_0x2d48a8,_0x36adec);function X(_0x30d231,_0x668fa0){const _0x3e41c4=_0x48fe2c,_0x419118=_0x30d231['replies'][0x0];return{..._0x668fa0,'id':_0x419118[_0x3e41c4(0xf3)],'resolved':_0x30d231[_0x3e41c4(0xce)]===0x1,'dT':y(_0x419118[_0x3e41c4(0xe6)]),'personId':_0x419118[_0x3e41c4(0xf4)],'threadId':_0x419118['threadId']};}function ee(_0x59ea32,_0xdda6b5,_0x10ccf5){const _0xc8bb0c=_0x48fe2c;var _0x4c05ec,_0xfb3f9c;if(((_0xfb3f9c=(_0x4c05ec=_0x59ea32==null?void 0x0:_0x59ea32['replies'])==null?void 0x0:_0x4c05ec[_0xc8bb0c(0xcb)])!=null?_0xfb3f9c:0x0)>0x0){const _0x41e3f1=(_0x7d6f27,_0x56684d)=>({'id':_0x7d6f27[_0xc8bb0c(0xf3)],'threadId':_0x7d6f27[_0xc8bb0c(0xab)],'dT':y(_0x7d6f27['createTimestamp']),'personId':_0x7d6f27[_0xc8bb0c(0xf4)],'resolved':_0x59ea32['solved']===I['Solved'],'unitId':_0xdda6b5,'subUnitId':_0x10ccf5,'text':JSON[_0xc8bb0c(0xe8)](_0x7d6f27[_0xc8bb0c(0xee)]),'parentId':_0x56684d}),_0x1c71f2=_0x41e3f1(_0x59ea32['replies'][0x0]);return{..._0x1c71f2,'children':_0x59ea32[_0xc8bb0c(0xd2)][_0xc8bb0c(0xb5)](0x1)['map'](_0x546bfa=>_0x41e3f1(_0x546bfa,_0x1c71f2['id']))};}return null;}let S=class{constructor(_0x317e21,_0x511b5e,_0x332787){const _0x2b3bef=_0x48fe2c;this[_0x2b3bef(0xd6)]=_0x317e21,this[_0x2b3bef(0xe4)]=_0x511b5e,this['_sessionService']=_0x332787;}async[_0x48fe2c(0xf9)](_0x1205f3){const _0x3ba5bb=_0x48fe2c;var _0x45718e,_0x1a0f78;const {parentId:_0x54a481,unitId:_0xa5eb06,text:_0x37c887,threadId:_0x2cc036}=_0x1205f3,_0x1b78ee=(_0x1a0f78=(_0x45718e=_0x37c887['customRanges'])==null?void 0x0:_0x45718e['filter'](_0x3dc5a3=>_0x3dc5a3['rangeType']===_0x3c6003[_0x3ba5bb(0xd8)])[_0x3ba5bb(0xd9)](_0x43c6c3=>_0x43c6c3[_0x3ba5bb(0xbb)]))!=null?_0x1a0f78:[],_0x585d95=JSON[_0x3ba5bb(0xfc)](_0x37c887),_0x4c38ac=(await this[_0x3ba5bb(0xff)][_0x3ba5bb(0xb6)](_0xa5eb06))[_0x3ba5bb(0xb3)]();if(_0x54a481){const _0x1fc30c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee,'threadId':_0x2cc036},_0xfd1c58=(await this[_0x3ba5bb(0xd6)][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+_0x3ba5bb(0xa8),{'body':_0x1fc30c}))[_0x3ba5bb(0xd0)][_0x3ba5bb(0xe0)];return{..._0x1205f3,'id':_0xfd1c58[_0x3ba5bb(0xf3)],'dT':_0x5195b2(+_0xfd1c58['createTimestamp'])[_0x3ba5bb(0xaf)](_0x3ba5bb(0xb4)),'personId':_0xfd1c58[_0x3ba5bb(0xf4)]};}else{const _0x395e9c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee},_0x5efc40=await this['_httpService'][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+'/add',{'body':_0x395e9c});return X(_0x5efc40[_0x3ba5bb(0xd0)]['comment'],_0x1205f3);}}async[_0x48fe2c(0xc5)](_0x546ec2){const _0x351375=_0x48fe2c;var _0x4f56fa,_0x5dfb48;const {text:_0x406710,unitId:_0x54c53f}=_0x546ec2,_0x274f9e=(_0x5dfb48=(_0x4f56fa=_0x406710['customRanges'])==null?void 0x0:_0x4f56fa[_0x351375(0xa6)](_0x5a5dac=>_0x5a5dac[_0x351375(0xeb)]===_0x3c6003[_0x351375(0xd8)])[_0x351375(0xd9)](_0x3ad921=>_0x3ad921[_0x351375(0xbb)]))!=null?_0x5dfb48:[],_0x402063=JSON['stringify'](_0x406710),_0x780143=_0x546ec2['threadId'],_0x23f0bb=_0x546ec2['id'],_0x3daf9f={'memberId':(await this['_sessionService'][_0x351375(0xb6)](_0x54c53f))[_0x351375(0xb3)](),'unitId':_0x54c53f,'threadId':_0x780143,'mention':_0x274f9e,'content':_0x402063,'replyId':_0x23f0bb},_0x461783=await this['_httpService'][_0x351375(0xc3)](_0x351375(0xd7)+_0x54c53f+'/edit',{'body':_0x3daf9f});return!_0x461783['body'][_0x351375(0xdd)]||_0x461783[_0x351375(0xd0)]['error'][_0x351375(0xb9)]===0x1;}async[_0x48fe2c(0xda)](_0x5980c1){const _0x46ba6d=_0x48fe2c,{unitId:_0x34d77b}=_0x5980c1,_0x161b40=_0x5980c1[_0x46ba6d(0xab)],_0x4cb8e5={'memberId':this[_0x46ba6d(0xe4)][_0x46ba6d(0xa4)]()[_0x46ba6d(0xea)],'unitId':_0x34d77b,'threadId':_0x161b40,'solved':_0x5980c1[_0x46ba6d(0xf8)]?I[_0x46ba6d(0x100)]:I['OpenOrReOpen']},_0x1e49cd=await this[_0x46ba6d(0xd6)][_0x46ba6d(0xc3)](_0x46ba6d(0xd7)+_0x34d77b+_0x46ba6d(0xc0),{'body':_0x4cb8e5});return!_0x1e49cd['body'][_0x46ba6d(0xdd)]||_0x1e49cd['body']['error'][_0x46ba6d(0xb9)]===0x1;}async[_0x48fe2c(0xca)](_0x1697cd,_0x54b36e,_0x5f3543,_0x2a2357){const _0x452c67=_0x48fe2c,_0x5d3ca7={'memberId':(await this[_0x452c67(0xff)][_0x452c67(0xb6)](_0x1697cd))['getMemberID'](),'threadId':_0x5f3543,'replyId':_0x2a2357,'unitId':_0x1697cd},_0x39c861=await this[_0x452c67(0xd6)][_0x452c67(0xc3)](_0x452c67(0xd7)+_0x1697cd+_0x452c67(0xa9),{'body':_0x5d3ca7});return!_0x39c861['body'][_0x452c67(0xdd)]||_0x39c861[_0x452c67(0xd0)]['error'][_0x452c67(0xb9)]===0x1;}async[_0x48fe2c(0xc7)](_0x2d80f1,_0x2e281b,_0xf29e7b){const _0x1785ef=_0x48fe2c,_0x3216ea={'unitId':_0x2d80f1,'threadId':_0xf29e7b},_0x5a7728=await this['_httpService']['post'](_0x1785ef(0xd7)+_0x2d80f1+'/list',{'body':_0x3216ea}),_0x331e03=_0xf29e7b['map'](_0x378d28=>ee(_0x5a7728[_0x1785ef(0xd0)]['comments'][_0x378d28],_0x2d80f1,_0x2e281b))[_0x1785ef(0xa6)](Boolean);return Object[_0x1785ef(0xde)](_0x5a7728[_0x1785ef(0xd0)][_0x1785ef(0xc9)])[_0x1785ef(0xd1)](_0x1ace91=>{const _0x5f48e4=_0x1785ef;this[_0x5f48e4(0xe4)][_0x5f48e4(0xa2)](_0x1ace91);}),_0x331e03;}['saveCommentToSnapshot'](_0x4cc305){const _0x5874fb=_0x48fe2c;return{'id':_0x4cc305['id'],'threadId':_0x4cc305[_0x5874fb(0xab)],'ref':_0x4cc305['ref']};}};S=Q([b(0x0,_0x428f3a(_0xa6dc27)),b(0x1,_0x428f3a(_0x53574f)),b(0x2,_0x428f3a(_0x147544))],S);function _0x2786(){const _0x45299d=['onReady','createTimestamp','syncUpdateMutationToColla','parse','delete','userID','rangeType','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','personId','get','size','70496CknnQN','replyId','userId','dataSource','pluginName','defineProperty','resolved','addComment','payload','282856xaBObW','stringify','_threadCommentDataSourceService','Add','_sessionService','Solved','2036bIFbsR','/universer-api/user/list','onStarting','UNIVER_UNKNOWN','find','OpenOrReOpen','933lYrrhG','addUser','getOwnPropertyDescriptor','getCurrentUser','2280OpjCZd','filter','UNRECOGNIZED','/reply','/delete','13850950wheMvX','threadId','3712808tbxHvx','thread-comment-data-source.config','_initDataSource','format','Delete','unitId','type','getMemberID','YYYY/MM/DD\x20HH:mm','slice','requireSession','6PXJwxv','Reply','code','1595405LKxwKH','rangeId','_configService','disposeWithMe','_threadCommentModel','pipe','/solved','_initUserSync','Unknown','post','getUnit','updateComment','commentUpdate$','listComments','_init','users','deleteComment','length','875SFjHxl','symbol','solved','user','body','forEach','replies','_config','subscribe','Edit','_httpService','/universer-api/comment/unit/','COMMENT','map','resolveComment','parentId','_injector','error','values','root','reply','add','_commentService','1557DOQOZp','_userService'];_0x2786=function(){return _0x45299d;};return _0x2786();}var re=Object['getOwnPropertyDescriptor'],te=(_0x11e342,_0x147bec,_0x3835ce,_0x4553a7)=>{const _0x3fc310=_0x48fe2c;for(var _0x5612a5=_0x4553a7>0x1?void 0x0:_0x4553a7?re(_0x147bec,_0x3835ce):_0x147bec,_0x4f0f61=_0x11e342[_0x3fc310(0xcb)]-0x1,_0x2b2bf6;_0x4f0f61>=0x0;_0x4f0f61--)(_0x2b2bf6=_0x11e342[_0x4f0f61])&&(_0x5612a5=_0x2b2bf6(_0x5612a5)||_0x5612a5);return _0x5612a5;},M=(_0x4b8006,_0x39bdd9)=>(_0x352980,_0x4c7fac)=>_0x39bdd9(_0x352980,_0x4c7fac,_0x4b8006);let f=class extends _0xe221d9{constructor(_0x1af98d,_0x3ebeef){const _0x3a67f2=_0x48fe2c;super(),this[_0x3a67f2(0xfd)]=_0x1af98d,this['_threadCommentDataSource']=_0x3ebeef,this[_0x3a67f2(0xae)]();}['_initDataSource'](){const _0xa271fa=_0x48fe2c;this['_threadCommentDataSourceService'][_0xa271fa(0xf5)]=this['_threadCommentDataSource'],this[_0xa271fa(0xfd)][_0xa271fa(0xe7)]=!0x1;}};f=te([M(0x0,_0x38d035),M(0x1,_0x428f3a(S))],f);var se=Object[_0x48fe2c(0xf7)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1bedea,_0x573693,_0x2a7bc3)=>_0x573693 in _0x1bedea?se(_0x1bedea,_0x573693,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a7bc3}):_0x1bedea[_0x573693]=_0x2a7bc3,ie=(_0x463889,_0x1fa58d,_0x3a106a,_0x1da43e)=>{const _0x43c352=_0x48fe2c;for(var _0x4c8874=_0x1da43e>0x1?void 0x0:_0x1da43e?oe(_0x1fa58d,_0x3a106a):_0x1fa58d,_0x4de60a=_0x463889[_0x43c352(0xcb)]-0x1,_0x8b2b3a;_0x4de60a>=0x0;_0x4de60a--)(_0x8b2b3a=_0x463889[_0x4de60a])&&(_0x4c8874=_0x8b2b3a(_0x4c8874)||_0x4c8874);return _0x4c8874;},N=(_0xa95b56,_0x51f282)=>(_0x9be76c,_0x783e9b)=>_0x51f282(_0x9be76c,_0x783e9b,_0xa95b56),$=(_0x557a2e,_0x398208,_0xf836ae)=>ne(_0x557a2e,typeof _0x398208!=_0x48fe2c(0xcd)?_0x398208+'':_0x398208,_0xf836ae);let g=class extends _0x4b70ca{constructor(_0x54c2f7=O,_0x532645,_0x1e9e98){const _0x30e2cd=_0x48fe2c;super(),this['_config']=_0x54c2f7,this[_0x30e2cd(0xdc)]=_0x532645,this[_0x30e2cd(0xbc)]=_0x1e9e98;const {..._0x2274bf}=_0x157acd({},O,this[_0x30e2cd(0xd3)]);this[_0x30e2cd(0xbc)]['setConfig'](z,_0x2274bf);}[_0x48fe2c(0x9d)](){const _0x179386=_0x48fe2c;[[S],[f],[_]][_0x179386(0xd1)](_0x3344d6=>{const _0x2e55d4=_0x179386;this[_0x2e55d4(0xdc)][_0x2e55d4(0xe1)](_0x3344d6);});}[_0x48fe2c(0xe5)](){const _0x39a128=_0x48fe2c;this[_0x39a128(0xdc)]['get'](f),this[_0x39a128(0xdc)][_0x39a128(0xf0)](_);}};$(g,_0x48fe2c(0xf6),W),$(g,_0x48fe2c(0xb2),_0x4bc7a1[_0x48fe2c(0x9e)]),g=ie([_0xdc118a(_0x5995f1,_0x167480,_0x25820f),N(0x1,_0x428f3a(_0x29b08d)),N(0x2,_0x5e1548)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3766ad=_0x6338;(function(_0x34809e,_0x4ff41c){const _0x58788a=_0x6338,_0x4d6ddb=_0x34809e();while(!![]){try{const _0x2fea04=-parseInt(_0x58788a(0x193))/0x1+parseInt(_0x58788a(0x177))/0x2+-parseInt(_0x58788a(0x186))/0x3*(-parseInt(_0x58788a(0x1b3))/0x4)+parseInt(_0x58788a(0x183))/0x5*(parseInt(_0x58788a(0x153))/0x6)+parseInt(_0x58788a(0x168))/0x7+parseInt(_0x58788a(0x1a0))/0x8+-parseInt(_0x58788a(0x164))/0x9;if(_0x2fea04===_0x4ff41c)break;else _0x4d6ddb['push'](_0x4d6ddb['shift']());}catch(_0x1504c7){_0x4d6ddb['push'](_0x4d6ddb['shift']());}}}(_0x4622,0x8d958));import{CommentService as _0x57ba11,CollaborationSessionService as _0xed5572,UniverCollaborationClientPlugin as _0x444dd9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x11f1a8}from'@univerjs-pro/license';import{dayjs as _0x273302,UserManagerService as _0x12984b,Inject as _0x2f533a,Injector as _0x16c6fe,Disposable as _0x562d89,CustomRangeType as _0x28af1a,UniverInstanceType as _0x87ab81,DependentOn as _0x2eb588,Plugin as _0x5e5468,merge as _0x38d422,IConfigService as _0x197a26}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5767cd}from'@univerjs/thread-comment-ui';function _0x4622(){const _0x1f9c87=['userID','_userService','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','get','1560658mwoVax','/solved','subscribe','addUser','_threadCommentModel','length','Delete','onReady','/list','threadId','users','getUnit','155XBsIyq','saveCommentToSnapshot','getMemberID','15fIbrzR','_configService','slice','pluginName','personId','_threadCommentDataSourceService','find','pipe','/edit','onStarting','add','COMMENT','symbol','247525ypapGY','_commentService','root','delete','requireSession','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','customRanges','Edit','_initDataSource','reply','_threadCommentDataSource','thread-comment-data-source.config','1093944fIAPbm','user','/universer-api/comment/unit/','post','UNRECOGNIZED','_init','replies','createTimestamp','Solved','_httpService','filter','comments','solved','getCurrentUser','map','body','UNIVER_UNKNOWN','forEach','size','149748crLihL','addComment','_sessionService','code','rangeType','userId','83946gxbMgp','Unknown','commentUpdate$','parse','content','resolved','Add','getOwnPropertyDescriptor','format','Solve','stringify','parentId','disposeWithMe','syncUpdateMutationToColla','_injector','payload','deleteComment','15216408JStdNA','/delete','comment','error','6861309ppLMna','listComments','unitId','replyId','rangeId','Reply','_initUserSync','defineProperty','getUser'];_0x4622=function(){return _0x1f9c87;};return _0x4622();}import{ThreadCommentModel as _0x4f5042,IThreadCommentDataSourceService as _0x43da02}from'@univerjs/thread-comment';import{bufferTime as _0x587e3c}from'rxjs';import{HTTPService as _0x252bb0}from'@univerjs/network';const W=_0x3766ad(0x174);var I=(_0x2b64bc=>(_0x2b64bc[_0x2b64bc[_0x3766ad(0x198)]=0x0]=_0x3766ad(0x198),_0x2b64bc[_0x2b64bc[_0x3766ad(0x1a8)]=0x1]=_0x3766ad(0x1a8),_0x2b64bc[_0x2b64bc[_0x3766ad(0x1a4)]=-0x1]='UNRECOGNIZED',_0x2b64bc))(I||{}),v=(_0xcec190=>(_0xcec190[_0xcec190[_0x3766ad(0x154)]=0x0]='Unknown',_0xcec190[_0xcec190['Add']=0x1]=_0x3766ad(0x159),_0xcec190[_0xcec190[_0x3766ad(0x16d)]=0x2]='Reply',_0xcec190[_0xcec190[_0x3766ad(0x19b)]=0x3]='Edit',_0xcec190[_0xcec190['Delete']=0x4]=_0x3766ad(0x17d),_0xcec190[_0xcec190[_0x3766ad(0x15c)]=0x5]='Solve',_0xcec190[_0xcec190[_0x3766ad(0x1a4)]=-0x1]=_0x3766ad(0x1a4),_0xcec190))(v||{});const y=_0x38cd3b=>_0x273302(new Date(+_0x38cd3b))[_0x3766ad(0x15b)](_0x3766ad(0x199)),B=async(_0x5209e4,_0xd3e35f)=>{const _0x3ad9c3=_0x3766ad,_0x3cae7a=_0x5209e4['get'](_0x12984b),_0xea5800=_0x5209e4['get'](_0x252bb0);_0xd3e35f[_0x3ad9c3(0x1b1)](_0x110375=>{const _0x52b20f=_0x3ad9c3;_0x3cae7a[_0x52b20f(0x170)](_0x110375)&&_0xd3e35f[_0x52b20f(0x196)](_0x110375);}),_0xd3e35f[_0x3ad9c3(0x1b2)]&&(await _0xea5800['get']('/universer-api/user/list',{'params':{'userIDs':[..._0xd3e35f]}}))[_0x3ad9c3(0x1af)]['users']['forEach'](_0xc8dc68=>{const _0x30b63c=_0x3ad9c3;_0xc8dc68&&_0x3cae7a[_0x30b63c(0x17a)](_0xc8dc68);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x9c9c70,_0x2d4e48,_0x18901d,_0xd13e38)=>{const _0x40cc99=_0x3766ad;for(var _0x201256=_0xd13e38>0x1?void 0x0:_0xd13e38?K(_0x2d4e48,_0x18901d):_0x2d4e48,_0x30c17c=_0x9c9c70[_0x40cc99(0x17c)]-0x1,_0x3e67a4;_0x30c17c>=0x0;_0x30c17c--)(_0x3e67a4=_0x9c9c70[_0x30c17c])&&(_0x201256=_0x3e67a4(_0x201256)||_0x201256);return _0x201256;},p=(_0x9eeb3d,_0x339f4d)=>(_0x156f13,_0x22b871)=>_0x339f4d(_0x156f13,_0x22b871,_0x9eeb3d);let _=class extends _0x562d89{constructor(_0x50c99d,_0xf6ec1d,_0x53aa36,_0x44c56d){const _0x2ac97d=_0x3766ad;super(),this[_0x2ac97d(0x194)]=_0x50c99d,this[_0x2ac97d(0x17b)]=_0xf6ec1d,this['_userService']=_0x53aa36,this[_0x2ac97d(0x161)]=_0x44c56d,this['_init'](),this[_0x2ac97d(0x16e)]();}['_initUserSync'](){const _0x245240=_0x3766ad;this[_0x245240(0x15f)](this[_0x245240(0x17b)][_0x245240(0x155)][_0x245240(0x18d)](_0x587e3c(0x10))[_0x245240(0x179)](_0x20f11c=>{const _0x230bf5=_0x245240,_0x4f6226=new Set();_0x20f11c[_0x230bf5(0x1b1)](_0x32da5e=>{const _0x3c60d4=_0x230bf5;if(_0x32da5e['type']===_0x3c60d4(0x190)){const _0x571cba=_0x32da5e[_0x3c60d4(0x162)][_0x3c60d4(0x18a)];_0x4f6226[_0x3c60d4(0x190)](_0x571cba);}}),B(this[_0x230bf5(0x161)],_0x4f6226);}));}[_0x3766ad(0x1a5)](){const _0x51cdd5=_0x3766ad;this[_0x51cdd5(0x15f)](this[_0x51cdd5(0x194)]['commentUpdate$'][_0x51cdd5(0x179)](async _0x29462e=>{const _0x5e160d=_0x51cdd5;var _0x1e942c,_0x53ed4f,_0x2b2f68,_0x569e06;const _0xf8b86b=(_0x1e942c=this['_threadCommentModel'][_0x5e160d(0x182)](_0x29462e['unitId'])[_0x5e160d(0x18c)](_0x4dcf2b=>_0x4dcf2b[_0x5e160d(0x180)]===_0x29462e['threadId']))==null?void 0x0:_0x1e942c[_0x5e160d(0x195)];if(!_0xf8b86b)return;const {unitId:_0x1f6b1c,subUnitId:_0x11b74c}=_0xf8b86b;switch(_0x29462e[_0x5e160d(0x1a1)]&&this[_0x5e160d(0x172)][_0x5e160d(0x17a)](_0x29462e[_0x5e160d(0x1a1)]),_0x29462e[_0x5e160d(0x173)]){case v[_0x5e160d(0x159)]:break;case v[_0x5e160d(0x16d)]:{this[_0x5e160d(0x17b)][_0x5e160d(0x1b4)](_0x1f6b1c,_0x11b74c,{'unitId':_0x1f6b1c,'subUnitId':_0x11b74c,'ref':'','id':_0x29462e[_0x5e160d(0x16b)],'dT':y(+_0x29462e[_0x5e160d(0x1a7)]),'threadId':_0x29462e['threadId'],'personId':(_0x2b2f68=(_0x53ed4f=_0x29462e[_0x5e160d(0x1a1)])==null?void 0x0:_0x53ed4f[_0x5e160d(0x171)])!=null?_0x2b2f68:_0x29462e[_0x5e160d(0x152)],'text':JSON[_0x5e160d(0x156)](_0x29462e['content']),'parentId':_0xf8b86b['id']});break;}case v[_0x5e160d(0x17d)]:{const _0x5a5572=this[_0x5e160d(0x17b)]['getComment'](_0x1f6b1c,_0x11b74c,_0x29462e[_0x5e160d(0x16b)]);_0x5a5572&&_0x5a5572[_0x5e160d(0x15e)]&&this['_threadCommentModel'][_0x5e160d(0x163)](_0x1f6b1c,_0x11b74c,_0x29462e[_0x5e160d(0x16b)]);break;}case v[_0x5e160d(0x19b)]:{this[_0x5e160d(0x17b)]['updateComment'](_0x1f6b1c,_0x11b74c,{'commentId':_0x29462e[_0x5e160d(0x16b)],'text':JSON[_0x5e160d(0x156)](_0x29462e[_0x5e160d(0x157)])});break;}case v[_0x5e160d(0x15c)]:{const _0x3f2336=(_0x569e06=this[_0x5e160d(0x17b)][_0x5e160d(0x182)](_0x29462e[_0x5e160d(0x16a)])['find'](_0x124297=>_0x124297[_0x5e160d(0x180)]===_0x29462e[_0x5e160d(0x180)]))==null?void 0x0:_0x569e06[_0x5e160d(0x195)];_0x3f2336&&this[_0x5e160d(0x17b)]['resolveComment'](_0x1f6b1c,_0x11b74c,_0x3f2336['id'],_0x29462e[_0x5e160d(0x1ac)]===I[_0x5e160d(0x1a8)]);break;}}}));}};_=V([p(0x0,_0x2f533a(_0x57ba11)),p(0x1,_0x2f533a(_0x4f5042)),p(0x2,_0x2f533a(_0x12984b)),p(0x3,_0x2f533a(_0x16c6fe))],_);const z=_0x3766ad(0x19f),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2562fe,_0x1aa573,_0x29315d,_0x304860)=>{for(var _0x54d6b5=_0x304860>0x1?void 0x0:_0x304860?k(_0x1aa573,_0x29315d):_0x1aa573,_0x5dd4db=_0x2562fe['length']-0x1,_0x462903;_0x5dd4db>=0x0;_0x5dd4db--)(_0x462903=_0x2562fe[_0x5dd4db])&&(_0x54d6b5=_0x462903(_0x54d6b5)||_0x54d6b5);return _0x54d6b5;},b=(_0x2c570e,_0x5cb426)=>(_0x277b04,_0x4cb8f8)=>_0x5cb426(_0x277b04,_0x4cb8f8,_0x2c570e);function X(_0x521445,_0x3d4489){const _0x4bc175=_0x3766ad,_0x4f6fea=_0x521445[_0x4bc175(0x1a6)][0x0];return{..._0x3d4489,'id':_0x4f6fea[_0x4bc175(0x16b)],'resolved':_0x521445[_0x4bc175(0x1ac)]===0x1,'dT':y(_0x4f6fea[_0x4bc175(0x1a7)]),'personId':_0x4f6fea[_0x4bc175(0x152)],'threadId':_0x4f6fea[_0x4bc175(0x180)]};}function ee(_0x28423b,_0x51f7fd,_0x4cfee2){const _0x19f588=_0x3766ad;var _0x107b6b,_0x386794;if(((_0x386794=(_0x107b6b=_0x28423b==null?void 0x0:_0x28423b['replies'])==null?void 0x0:_0x107b6b[_0x19f588(0x17c)])!=null?_0x386794:0x0)>0x0){const _0x1929a1=(_0x29ab33,_0x512e1f)=>({'id':_0x29ab33[_0x19f588(0x16b)],'threadId':_0x29ab33[_0x19f588(0x180)],'dT':y(_0x29ab33[_0x19f588(0x1a7)]),'personId':_0x29ab33[_0x19f588(0x152)],'resolved':_0x28423b[_0x19f588(0x1ac)]===I[_0x19f588(0x1a8)],'unitId':_0x51f7fd,'subUnitId':_0x4cfee2,'text':JSON[_0x19f588(0x156)](_0x29ab33['content']),'parentId':_0x512e1f}),_0x5991dc=_0x1929a1(_0x28423b[_0x19f588(0x1a6)][0x0]);return{..._0x5991dc,'children':_0x28423b[_0x19f588(0x1a6)][_0x19f588(0x188)](0x1)[_0x19f588(0x1ae)](_0x3d830b=>_0x1929a1(_0x3d830b,_0x5991dc['id']))};}return null;}let S=class{constructor(_0x7ac915,_0x47e10b,_0x10c2ad){const _0xe28248=_0x3766ad;this['_httpService']=_0x7ac915,this['_userService']=_0x47e10b,this[_0xe28248(0x1b5)]=_0x10c2ad;}async[_0x3766ad(0x1b4)](_0x1f99e3){const _0x119107=_0x3766ad;var _0x49481a,_0x340818;const {parentId:_0x513037,unitId:_0x3a8a9b,text:_0x70fee0,threadId:_0x2d31ad}=_0x1f99e3,_0x50f032=(_0x340818=(_0x49481a=_0x70fee0[_0x119107(0x19a)])==null?void 0x0:_0x49481a['filter'](_0x3c8499=>_0x3c8499[_0x119107(0x151)]===_0x28af1a[_0x119107(0x191)])['map'](_0x55fe8d=>_0x55fe8d[_0x119107(0x16c)]))!=null?_0x340818:[],_0x42e8af=JSON[_0x119107(0x15d)](_0x70fee0),_0x29ae81=(await this[_0x119107(0x1b5)]['requireSession'](_0x3a8a9b))[_0x119107(0x185)]();if(_0x513037){const _0x55fcae={'memberId':_0x29ae81,'unitId':_0x3a8a9b,'content':_0x42e8af,'mention':_0x50f032,'threadId':_0x2d31ad},_0x5563e1=(await this[_0x119107(0x1a9)]['post'](_0x119107(0x1a2)+_0x3a8a9b+'/reply',{'body':_0x55fcae}))[_0x119107(0x1af)][_0x119107(0x19d)];return{..._0x1f99e3,'id':_0x5563e1[_0x119107(0x16b)],'dT':_0x273302(+_0x5563e1[_0x119107(0x1a7)])['format'](_0x119107(0x199)),'personId':_0x5563e1[_0x119107(0x152)]};}else{const _0xef9046={'memberId':_0x29ae81,'unitId':_0x3a8a9b,'content':_0x42e8af,'mention':_0x50f032},_0x25f28c=await this[_0x119107(0x1a9)][_0x119107(0x1a3)](_0x119107(0x1a2)+_0x3a8a9b+'/add',{'body':_0xef9046});return X(_0x25f28c['body'][_0x119107(0x166)],_0x1f99e3);}}async['updateComment'](_0x3cee1a){const _0x2de895=_0x3766ad;var _0x25f667,_0x172423;const {text:_0x5475cd,unitId:_0x295b6e}=_0x3cee1a,_0x16270b=(_0x172423=(_0x25f667=_0x5475cd[_0x2de895(0x19a)])==null?void 0x0:_0x25f667[_0x2de895(0x1aa)](_0x57eb63=>_0x57eb63[_0x2de895(0x151)]===_0x28af1a[_0x2de895(0x191)])[_0x2de895(0x1ae)](_0x14fdca=>_0x14fdca['rangeId']))!=null?_0x172423:[],_0x2fdc25=JSON[_0x2de895(0x15d)](_0x5475cd),_0x45e54e=_0x3cee1a[_0x2de895(0x180)],_0x85be13=_0x3cee1a['id'],_0x332170={'memberId':(await this[_0x2de895(0x1b5)][_0x2de895(0x197)](_0x295b6e))[_0x2de895(0x185)](),'unitId':_0x295b6e,'threadId':_0x45e54e,'mention':_0x16270b,'content':_0x2fdc25,'replyId':_0x85be13},_0x1575d9=await this['_httpService'][_0x2de895(0x1a3)](_0x2de895(0x1a2)+_0x295b6e+_0x2de895(0x18e),{'body':_0x332170});return!_0x1575d9['body'][_0x2de895(0x167)]||_0x1575d9[_0x2de895(0x1af)]['error'][_0x2de895(0x150)]===0x1;}async['resolveComment'](_0x221b78){const _0x34be98=_0x3766ad,{unitId:_0x702d15}=_0x221b78,_0x2549ec=_0x221b78['threadId'],_0x418c8a={'memberId':this['_userService'][_0x34be98(0x1ad)]()[_0x34be98(0x171)],'unitId':_0x702d15,'threadId':_0x2549ec,'solved':_0x221b78[_0x34be98(0x158)]?I['Solved']:I[_0x34be98(0x198)]},_0x278629=await this[_0x34be98(0x1a9)]['post'](_0x34be98(0x1a2)+_0x702d15+_0x34be98(0x178),{'body':_0x418c8a});return!_0x278629[_0x34be98(0x1af)][_0x34be98(0x167)]||_0x278629[_0x34be98(0x1af)]['error'][_0x34be98(0x150)]===0x1;}async[_0x3766ad(0x163)](_0x156118,_0x1d0bee,_0x3b23ec,_0x2941a1){const _0x5b2f89=_0x3766ad,_0x23a2f0={'memberId':(await this[_0x5b2f89(0x1b5)][_0x5b2f89(0x197)](_0x156118))[_0x5b2f89(0x185)](),'threadId':_0x3b23ec,'replyId':_0x2941a1,'unitId':_0x156118},_0x419a15=await this['_httpService'][_0x5b2f89(0x1a3)](_0x5b2f89(0x1a2)+_0x156118+_0x5b2f89(0x165),{'body':_0x23a2f0});return!_0x419a15[_0x5b2f89(0x1af)]['error']||_0x419a15[_0x5b2f89(0x1af)]['error'][_0x5b2f89(0x150)]===0x1;}async[_0x3766ad(0x169)](_0x485470,_0x43ee8b,_0x3bb32){const _0x5780e9=_0x3766ad,_0x506551={'unitId':_0x485470,'threadId':_0x3bb32},_0x33e382=await this[_0x5780e9(0x1a9)][_0x5780e9(0x1a3)](_0x5780e9(0x1a2)+_0x485470+_0x5780e9(0x17f),{'body':_0x506551}),_0x242704=_0x3bb32['map'](_0x1d73cc=>ee(_0x33e382['body'][_0x5780e9(0x1ab)][_0x1d73cc],_0x485470,_0x43ee8b))[_0x5780e9(0x1aa)](Boolean);return Object['values'](_0x33e382['body'][_0x5780e9(0x181)])[_0x5780e9(0x1b1)](_0x2d8460=>{const _0x3425e5=_0x5780e9;this[_0x3425e5(0x172)]['addUser'](_0x2d8460);}),_0x242704;}[_0x3766ad(0x184)](_0x4fbf21){const _0x52a5b5=_0x3766ad;return{'id':_0x4fbf21['id'],'threadId':_0x4fbf21[_0x52a5b5(0x180)],'ref':_0x4fbf21['ref']};}};S=Q([b(0x0,_0x2f533a(_0x252bb0)),b(0x1,_0x2f533a(_0x12984b)),b(0x2,_0x2f533a(_0xed5572))],S);var re=Object[_0x3766ad(0x15a)],te=(_0x38810d,_0x1f5679,_0x83746d,_0x467d88)=>{const _0x5c9589=_0x3766ad;for(var _0x372e22=_0x467d88>0x1?void 0x0:_0x467d88?re(_0x1f5679,_0x83746d):_0x1f5679,_0x193383=_0x38810d[_0x5c9589(0x17c)]-0x1,_0x2bc769;_0x193383>=0x0;_0x193383--)(_0x2bc769=_0x38810d[_0x193383])&&(_0x372e22=_0x2bc769(_0x372e22)||_0x372e22);return _0x372e22;},M=(_0x2c7e1f,_0xde1521)=>(_0x1697c3,_0x52af9f)=>_0xde1521(_0x1697c3,_0x52af9f,_0x2c7e1f);let f=class extends _0x562d89{constructor(_0x475df6,_0x13de36){const _0x59ccd1=_0x3766ad;super(),this[_0x59ccd1(0x18b)]=_0x475df6,this[_0x59ccd1(0x19e)]=_0x13de36,this[_0x59ccd1(0x19c)]();}[_0x3766ad(0x19c)](){const _0x1d8c02=_0x3766ad;this[_0x1d8c02(0x18b)][_0x1d8c02(0x175)]=this[_0x1d8c02(0x19e)],this[_0x1d8c02(0x18b)][_0x1d8c02(0x160)]=!0x1;}};f=te([M(0x0,_0x43da02),M(0x1,_0x2f533a(S))],f);function _0x6338(_0x33d7a5,_0x31adf3){_0x33d7a5=_0x33d7a5-0x150;const _0x4622c6=_0x4622();let _0x6338fc=_0x4622c6[_0x33d7a5];return _0x6338fc;}var se=Object[_0x3766ad(0x16f)],oe=Object[_0x3766ad(0x15a)],ne=(_0x44b435,_0x495ee7,_0x4eac04)=>_0x495ee7 in _0x44b435?se(_0x44b435,_0x495ee7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4eac04}):_0x44b435[_0x495ee7]=_0x4eac04,ie=(_0x59f9a9,_0x455cc2,_0x3af823,_0x19ba1e)=>{const _0x556833=_0x3766ad;for(var _0x1c233a=_0x19ba1e>0x1?void 0x0:_0x19ba1e?oe(_0x455cc2,_0x3af823):_0x455cc2,_0x4b2673=_0x59f9a9[_0x556833(0x17c)]-0x1,_0x3289e3;_0x4b2673>=0x0;_0x4b2673--)(_0x3289e3=_0x59f9a9[_0x4b2673])&&(_0x1c233a=_0x3289e3(_0x1c233a)||_0x1c233a);return _0x1c233a;},N=(_0x4a4045,_0x176293)=>(_0x1e7c1b,_0x592d4a)=>_0x176293(_0x1e7c1b,_0x592d4a,_0x4a4045),$=(_0x142bab,_0x3fb36e,_0x31f310)=>ne(_0x142bab,typeof _0x3fb36e!=_0x3766ad(0x192)?_0x3fb36e+'':_0x3fb36e,_0x31f310);let g=class extends _0x5e5468{constructor(_0x4b41b0=O,_0x4981b8,_0x295e15){const _0xd9a974=_0x3766ad;super(),this['_config']=_0x4b41b0,this[_0xd9a974(0x161)]=_0x4981b8,this[_0xd9a974(0x187)]=_0x295e15;const {..._0x5c1206}=_0x38d422({},O,this['_config']);this[_0xd9a974(0x187)]['setConfig'](z,_0x5c1206);}[_0x3766ad(0x18f)](){const _0x2dc0bf=_0x3766ad;[[S],[f],[_]][_0x2dc0bf(0x1b1)](_0x1a7974=>{const _0x69a74f=_0x2dc0bf;this[_0x69a74f(0x161)]['add'](_0x1a7974);});}[_0x3766ad(0x17e)](){const _0x4b1b86=_0x3766ad;this[_0x4b1b86(0x161)][_0x4b1b86(0x176)](f),this[_0x4b1b86(0x161)][_0x4b1b86(0x176)](_);}};$(g,_0x3766ad(0x189),W),$(g,_0x3766ad(0x173),_0x87ab81[_0x3766ad(0x1b0)]),g=ie([_0x2eb588(_0x5767cd,_0x444dd9,_0x11f1a8),N(0x1,_0x2f533a(_0x16c6fe)),N(0x2,_0x197a26)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x48fe2c=_0x331d;(function(_0x304275,_0x2e0c6c){const _0x53dd1b=_0x331d,_0x17d870=_0x304275();while(!![]){try{const _0x68ad7f=-parseInt(_0x53dd1b(0xba))/0x1+parseInt(_0x53dd1b(0x101))/0x2*(-parseInt(_0x53dd1b(0xa1))/0x3)+parseInt(_0x53dd1b(0xa5))/0x4*(parseInt(_0x53dd1b(0xcc))/0x5)+parseInt(_0x53dd1b(0xb7))/0x6*(parseInt(_0x53dd1b(0xfb))/0x7)+-parseInt(_0x53dd1b(0xf2))/0x8*(-parseInt(_0x53dd1b(0xe3))/0x9)+parseInt(_0x53dd1b(0xaa))/0xa+-parseInt(_0x53dd1b(0xac))/0xb;if(_0x68ad7f===_0x2e0c6c)break;else _0x17d870['push'](_0x17d870['shift']());}catch(_0x556b70){_0x17d870['push'](_0x17d870['shift']());}}}(_0x2786,0xc35c6));import{CommentService as _0x5c121d,CollaborationSessionService as _0x147544,UniverCollaborationClientPlugin as _0x167480}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x25820f}from'@univerjs-pro/license';import{dayjs as _0x5195b2,UserManagerService as _0x53574f,Inject as _0x428f3a,Injector as _0x29b08d,Disposable as _0xe221d9,CustomRangeType as _0x3c6003,UniverInstanceType as _0x4bc7a1,DependentOn as _0xdc118a,Plugin as _0x4b70ca,merge as _0x157acd,IConfigService as _0x5e1548}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5995f1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5b2ea3,IThreadCommentDataSourceService as _0x38d035}from'@univerjs/thread-comment';import{bufferTime as _0x2af66c}from'rxjs';import{HTTPService as _0xa6dc27}from'@univerjs/network';const W=_0x48fe2c(0xed);var I=(_0x266a30=>(_0x266a30[_0x266a30[_0x48fe2c(0xa0)]=0x0]=_0x48fe2c(0xa0),_0x266a30[_0x266a30['Solved']=0x1]=_0x48fe2c(0x100),_0x266a30[_0x266a30[_0x48fe2c(0xa7)]=-0x1]=_0x48fe2c(0xa7),_0x266a30))(I||{}),v=(_0x3e4355=>(_0x3e4355[_0x3e4355[_0x48fe2c(0xc2)]=0x0]=_0x48fe2c(0xc2),_0x3e4355[_0x3e4355['Add']=0x1]='Add',_0x3e4355[_0x3e4355[_0x48fe2c(0xb8)]=0x2]=_0x48fe2c(0xb8),_0x3e4355[_0x3e4355['Edit']=0x3]='Edit',_0x3e4355[_0x3e4355['Delete']=0x4]=_0x48fe2c(0xb0),_0x3e4355[_0x3e4355[_0x48fe2c(0xec)]=0x5]=_0x48fe2c(0xec),_0x3e4355[_0x3e4355['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e4355))(v||{});const y=_0x4bc5e4=>_0x5195b2(new Date(+_0x4bc5e4))[_0x48fe2c(0xaf)](_0x48fe2c(0xb4)),B=async(_0x6dc9c8,_0x4964da)=>{const _0x1ba25a=_0x48fe2c,_0x10248a=_0x6dc9c8[_0x1ba25a(0xf0)](_0x53574f),_0x2bcd00=_0x6dc9c8['get'](_0xa6dc27);_0x4964da[_0x1ba25a(0xd1)](_0x240e29=>{const _0x24df96=_0x1ba25a;_0x10248a['getUser'](_0x240e29)&&_0x4964da[_0x24df96(0xe9)](_0x240e29);}),_0x4964da[_0x1ba25a(0xf1)]&&(await _0x2bcd00[_0x1ba25a(0xf0)](_0x1ba25a(0x102),{'params':{'userIDs':[..._0x4964da]}}))['body']['users'][_0x1ba25a(0xd1)](_0x526ae9=>{const _0x56833f=_0x1ba25a;_0x526ae9&&_0x10248a[_0x56833f(0xa2)](_0x526ae9);});};var K=Object[_0x48fe2c(0xa3)],V=(_0x357eef,_0x191289,_0x1b48f1,_0x37ff15)=>{for(var _0x2079ae=_0x37ff15>0x1?void 0x0:_0x37ff15?K(_0x191289,_0x1b48f1):_0x191289,_0x20a4f3=_0x357eef['length']-0x1,_0x2123a2;_0x20a4f3>=0x0;_0x20a4f3--)(_0x2123a2=_0x357eef[_0x20a4f3])&&(_0x2079ae=_0x2123a2(_0x2079ae)||_0x2079ae);return _0x2079ae;},p=(_0x1b0a29,_0x2c76a2)=>(_0x2bb2d7,_0x512358)=>_0x2c76a2(_0x2bb2d7,_0x512358,_0x1b0a29);let _=class extends _0xe221d9{constructor(_0x4ff4cb,_0x2f045e,_0x4e9578,_0x4e2071){const _0x1ea932=_0x48fe2c;super(),this[_0x1ea932(0xe2)]=_0x4ff4cb,this[_0x1ea932(0xbe)]=_0x2f045e,this[_0x1ea932(0xe4)]=_0x4e9578,this[_0x1ea932(0xdc)]=_0x4e2071,this[_0x1ea932(0xc8)](),this[_0x1ea932(0xc1)]();}[_0x48fe2c(0xc1)](){const _0x6ff1b0=_0x48fe2c;this[_0x6ff1b0(0xbd)](this[_0x6ff1b0(0xbe)]['commentUpdate$'][_0x6ff1b0(0xbf)](_0x2af66c(0x10))[_0x6ff1b0(0xd4)](_0x52b3a6=>{const _0x28d66e=_0x6ff1b0,_0x53c34d=new Set();_0x52b3a6['forEach'](_0x451407=>{const _0x10e342=_0x331d;if(_0x451407[_0x10e342(0xb2)]==='add'){const _0x39c55c=_0x451407[_0x10e342(0xfa)][_0x10e342(0xef)];_0x53c34d[_0x10e342(0xe1)](_0x39c55c);}}),B(this[_0x28d66e(0xdc)],_0x53c34d);}));}[_0x48fe2c(0xc8)](){const _0x1d947a=_0x48fe2c;this[_0x1d947a(0xbd)](this[_0x1d947a(0xe2)][_0x1d947a(0xc6)][_0x1d947a(0xd4)](async _0x312552=>{const _0x41bf6a=_0x1d947a;var _0x5933da,_0x1bd47a,_0x2d2caf,_0x2aae63;const _0x3b9dac=(_0x5933da=this[_0x41bf6a(0xbe)][_0x41bf6a(0xc4)](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0xe9a6d1=>_0xe9a6d1['threadId']===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x5933da[_0x41bf6a(0xdf)];if(!_0x3b9dac)return;const {unitId:_0x230f03,subUnitId:_0x4242d4}=_0x3b9dac;switch(_0x312552[_0x41bf6a(0xcf)]&&this[_0x41bf6a(0xe4)][_0x41bf6a(0xa2)](_0x312552[_0x41bf6a(0xcf)]),_0x312552[_0x41bf6a(0xb2)]){case v[_0x41bf6a(0xfe)]:break;case v['Reply']:{this['_threadCommentModel'][_0x41bf6a(0xf9)](_0x230f03,_0x4242d4,{'unitId':_0x230f03,'subUnitId':_0x4242d4,'ref':'','id':_0x312552[_0x41bf6a(0xf3)],'dT':y(+_0x312552[_0x41bf6a(0xe6)]),'threadId':_0x312552[_0x41bf6a(0xab)],'personId':(_0x2d2caf=(_0x1bd47a=_0x312552[_0x41bf6a(0xcf)])==null?void 0x0:_0x1bd47a[_0x41bf6a(0xea)])!=null?_0x2d2caf:_0x312552[_0x41bf6a(0xf4)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content']),'parentId':_0x3b9dac['id']});break;}case v[_0x41bf6a(0xb0)]:{const _0x1a0244=this[_0x41bf6a(0xbe)]['getComment'](_0x230f03,_0x4242d4,_0x312552[_0x41bf6a(0xf3)]);_0x1a0244&&_0x1a0244[_0x41bf6a(0xdb)]&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xca)](_0x230f03,_0x4242d4,_0x312552['replyId']);break;}case v[_0x41bf6a(0xd5)]:{this[_0x41bf6a(0xbe)]['updateComment'](_0x230f03,_0x4242d4,{'commentId':_0x312552[_0x41bf6a(0xf3)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content'])});break;}case v[_0x41bf6a(0xec)]:{const _0xe12e5d=(_0x2aae63=this[_0x41bf6a(0xbe)]['getUnit'](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0x129802=>_0x129802[_0x41bf6a(0xab)]===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x2aae63[_0x41bf6a(0xdf)];_0xe12e5d&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xda)](_0x230f03,_0x4242d4,_0xe12e5d['id'],_0x312552[_0x41bf6a(0xce)]===I[_0x41bf6a(0x100)]);break;}}}));}};_=V([p(0x0,_0x428f3a(_0x5c121d)),p(0x1,_0x428f3a(_0x5b2ea3)),p(0x2,_0x428f3a(_0x53574f)),p(0x3,_0x428f3a(_0x29b08d))],_);const z=_0x48fe2c(0xad),O={};function _0x331d(_0x4bc6b2,_0x45cb30){_0x4bc6b2=_0x4bc6b2-0x9d;const _0x2786b4=_0x2786();let _0x331dbf=_0x2786b4[_0x4bc6b2];return _0x331dbf;}var k=Object['getOwnPropertyDescriptor'],Q=(_0x139968,_0x470422,_0x3837ec,_0x826566)=>{const _0x1f42fd=_0x48fe2c;for(var _0x1c044d=_0x826566>0x1?void 0x0:_0x826566?k(_0x470422,_0x3837ec):_0x470422,_0x21f1e1=_0x139968[_0x1f42fd(0xcb)]-0x1,_0x191a22;_0x21f1e1>=0x0;_0x21f1e1--)(_0x191a22=_0x139968[_0x21f1e1])&&(_0x1c044d=_0x191a22(_0x1c044d)||_0x1c044d);return _0x1c044d;},b=(_0x36adec,_0x3903b4)=>(_0xeef47a,_0x2d48a8)=>_0x3903b4(_0xeef47a,_0x2d48a8,_0x36adec);function X(_0x30d231,_0x668fa0){const _0x3e41c4=_0x48fe2c,_0x419118=_0x30d231['replies'][0x0];return{..._0x668fa0,'id':_0x419118[_0x3e41c4(0xf3)],'resolved':_0x30d231[_0x3e41c4(0xce)]===0x1,'dT':y(_0x419118[_0x3e41c4(0xe6)]),'personId':_0x419118[_0x3e41c4(0xf4)],'threadId':_0x419118['threadId']};}function ee(_0x59ea32,_0xdda6b5,_0x10ccf5){const _0xc8bb0c=_0x48fe2c;var _0x4c05ec,_0xfb3f9c;if(((_0xfb3f9c=(_0x4c05ec=_0x59ea32==null?void 0x0:_0x59ea32['replies'])==null?void 0x0:_0x4c05ec[_0xc8bb0c(0xcb)])!=null?_0xfb3f9c:0x0)>0x0){const _0x41e3f1=(_0x7d6f27,_0x56684d)=>({'id':_0x7d6f27[_0xc8bb0c(0xf3)],'threadId':_0x7d6f27[_0xc8bb0c(0xab)],'dT':y(_0x7d6f27['createTimestamp']),'personId':_0x7d6f27[_0xc8bb0c(0xf4)],'resolved':_0x59ea32['solved']===I['Solved'],'unitId':_0xdda6b5,'subUnitId':_0x10ccf5,'text':JSON[_0xc8bb0c(0xe8)](_0x7d6f27[_0xc8bb0c(0xee)]),'parentId':_0x56684d}),_0x1c71f2=_0x41e3f1(_0x59ea32['replies'][0x0]);return{..._0x1c71f2,'children':_0x59ea32[_0xc8bb0c(0xd2)][_0xc8bb0c(0xb5)](0x1)['map'](_0x546bfa=>_0x41e3f1(_0x546bfa,_0x1c71f2['id']))};}return null;}let S=class{constructor(_0x317e21,_0x511b5e,_0x332787){const _0x2b3bef=_0x48fe2c;this[_0x2b3bef(0xd6)]=_0x317e21,this[_0x2b3bef(0xe4)]=_0x511b5e,this['_sessionService']=_0x332787;}async[_0x48fe2c(0xf9)](_0x1205f3){const _0x3ba5bb=_0x48fe2c;var _0x45718e,_0x1a0f78;const {parentId:_0x54a481,unitId:_0xa5eb06,text:_0x37c887,threadId:_0x2cc036}=_0x1205f3,_0x1b78ee=(_0x1a0f78=(_0x45718e=_0x37c887['customRanges'])==null?void 0x0:_0x45718e['filter'](_0x3dc5a3=>_0x3dc5a3['rangeType']===_0x3c6003[_0x3ba5bb(0xd8)])[_0x3ba5bb(0xd9)](_0x43c6c3=>_0x43c6c3[_0x3ba5bb(0xbb)]))!=null?_0x1a0f78:[],_0x585d95=JSON[_0x3ba5bb(0xfc)](_0x37c887),_0x4c38ac=(await this[_0x3ba5bb(0xff)][_0x3ba5bb(0xb6)](_0xa5eb06))[_0x3ba5bb(0xb3)]();if(_0x54a481){const _0x1fc30c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee,'threadId':_0x2cc036},_0xfd1c58=(await this[_0x3ba5bb(0xd6)][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+_0x3ba5bb(0xa8),{'body':_0x1fc30c}))[_0x3ba5bb(0xd0)][_0x3ba5bb(0xe0)];return{..._0x1205f3,'id':_0xfd1c58[_0x3ba5bb(0xf3)],'dT':_0x5195b2(+_0xfd1c58['createTimestamp'])[_0x3ba5bb(0xaf)](_0x3ba5bb(0xb4)),'personId':_0xfd1c58[_0x3ba5bb(0xf4)]};}else{const _0x395e9c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee},_0x5efc40=await this['_httpService'][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+'/add',{'body':_0x395e9c});return X(_0x5efc40[_0x3ba5bb(0xd0)]['comment'],_0x1205f3);}}async[_0x48fe2c(0xc5)](_0x546ec2){const _0x351375=_0x48fe2c;var _0x4f56fa,_0x5dfb48;const {text:_0x406710,unitId:_0x54c53f}=_0x546ec2,_0x274f9e=(_0x5dfb48=(_0x4f56fa=_0x406710['customRanges'])==null?void 0x0:_0x4f56fa[_0x351375(0xa6)](_0x5a5dac=>_0x5a5dac[_0x351375(0xeb)]===_0x3c6003[_0x351375(0xd8)])[_0x351375(0xd9)](_0x3ad921=>_0x3ad921[_0x351375(0xbb)]))!=null?_0x5dfb48:[],_0x402063=JSON['stringify'](_0x406710),_0x780143=_0x546ec2['threadId'],_0x23f0bb=_0x546ec2['id'],_0x3daf9f={'memberId':(await this['_sessionService'][_0x351375(0xb6)](_0x54c53f))[_0x351375(0xb3)](),'unitId':_0x54c53f,'threadId':_0x780143,'mention':_0x274f9e,'content':_0x402063,'replyId':_0x23f0bb},_0x461783=await this['_httpService'][_0x351375(0xc3)](_0x351375(0xd7)+_0x54c53f+'/edit',{'body':_0x3daf9f});return!_0x461783['body'][_0x351375(0xdd)]||_0x461783[_0x351375(0xd0)]['error'][_0x351375(0xb9)]===0x1;}async[_0x48fe2c(0xda)](_0x5980c1){const _0x46ba6d=_0x48fe2c,{unitId:_0x34d77b}=_0x5980c1,_0x161b40=_0x5980c1[_0x46ba6d(0xab)],_0x4cb8e5={'memberId':this[_0x46ba6d(0xe4)][_0x46ba6d(0xa4)]()[_0x46ba6d(0xea)],'unitId':_0x34d77b,'threadId':_0x161b40,'solved':_0x5980c1[_0x46ba6d(0xf8)]?I[_0x46ba6d(0x100)]:I['OpenOrReOpen']},_0x1e49cd=await this[_0x46ba6d(0xd6)][_0x46ba6d(0xc3)](_0x46ba6d(0xd7)+_0x34d77b+_0x46ba6d(0xc0),{'body':_0x4cb8e5});return!_0x1e49cd['body'][_0x46ba6d(0xdd)]||_0x1e49cd['body']['error'][_0x46ba6d(0xb9)]===0x1;}async[_0x48fe2c(0xca)](_0x1697cd,_0x54b36e,_0x5f3543,_0x2a2357){const _0x452c67=_0x48fe2c,_0x5d3ca7={'memberId':(await this[_0x452c67(0xff)][_0x452c67(0xb6)](_0x1697cd))['getMemberID'](),'threadId':_0x5f3543,'replyId':_0x2a2357,'unitId':_0x1697cd},_0x39c861=await this[_0x452c67(0xd6)][_0x452c67(0xc3)](_0x452c67(0xd7)+_0x1697cd+_0x452c67(0xa9),{'body':_0x5d3ca7});return!_0x39c861['body'][_0x452c67(0xdd)]||_0x39c861[_0x452c67(0xd0)]['error'][_0x452c67(0xb9)]===0x1;}async[_0x48fe2c(0xc7)](_0x2d80f1,_0x2e281b,_0xf29e7b){const _0x1785ef=_0x48fe2c,_0x3216ea={'unitId':_0x2d80f1,'threadId':_0xf29e7b},_0x5a7728=await this['_httpService']['post'](_0x1785ef(0xd7)+_0x2d80f1+'/list',{'body':_0x3216ea}),_0x331e03=_0xf29e7b['map'](_0x378d28=>ee(_0x5a7728[_0x1785ef(0xd0)]['comments'][_0x378d28],_0x2d80f1,_0x2e281b))[_0x1785ef(0xa6)](Boolean);return Object[_0x1785ef(0xde)](_0x5a7728[_0x1785ef(0xd0)][_0x1785ef(0xc9)])[_0x1785ef(0xd1)](_0x1ace91=>{const _0x5f48e4=_0x1785ef;this[_0x5f48e4(0xe4)][_0x5f48e4(0xa2)](_0x1ace91);}),_0x331e03;}['saveCommentToSnapshot'](_0x4cc305){const _0x5874fb=_0x48fe2c;return{'id':_0x4cc305['id'],'threadId':_0x4cc305[_0x5874fb(0xab)],'ref':_0x4cc305['ref']};}};S=Q([b(0x0,_0x428f3a(_0xa6dc27)),b(0x1,_0x428f3a(_0x53574f)),b(0x2,_0x428f3a(_0x147544))],S);function _0x2786(){const _0x45299d=['onReady','createTimestamp','syncUpdateMutationToColla','parse','delete','userID','rangeType','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','personId','get','size','70496CknnQN','replyId','userId','dataSource','pluginName','defineProperty','resolved','addComment','payload','282856xaBObW','stringify','_threadCommentDataSourceService','Add','_sessionService','Solved','2036bIFbsR','/universer-api/user/list','onStarting','UNIVER_UNKNOWN','find','OpenOrReOpen','933lYrrhG','addUser','getOwnPropertyDescriptor','getCurrentUser','2280OpjCZd','filter','UNRECOGNIZED','/reply','/delete','13850950wheMvX','threadId','3712808tbxHvx','thread-comment-data-source.config','_initDataSource','format','Delete','unitId','type','getMemberID','YYYY/MM/DD\x20HH:mm','slice','requireSession','6PXJwxv','Reply','code','1595405LKxwKH','rangeId','_configService','disposeWithMe','_threadCommentModel','pipe','/solved','_initUserSync','Unknown','post','getUnit','updateComment','commentUpdate$','listComments','_init','users','deleteComment','length','875SFjHxl','symbol','solved','user','body','forEach','replies','_config','subscribe','Edit','_httpService','/universer-api/comment/unit/','COMMENT','map','resolveComment','parentId','_injector','error','values','root','reply','add','_commentService','1557DOQOZp','_userService'];_0x2786=function(){return _0x45299d;};return _0x2786();}var re=Object['getOwnPropertyDescriptor'],te=(_0x11e342,_0x147bec,_0x3835ce,_0x4553a7)=>{const _0x3fc310=_0x48fe2c;for(var _0x5612a5=_0x4553a7>0x1?void 0x0:_0x4553a7?re(_0x147bec,_0x3835ce):_0x147bec,_0x4f0f61=_0x11e342[_0x3fc310(0xcb)]-0x1,_0x2b2bf6;_0x4f0f61>=0x0;_0x4f0f61--)(_0x2b2bf6=_0x11e342[_0x4f0f61])&&(_0x5612a5=_0x2b2bf6(_0x5612a5)||_0x5612a5);return _0x5612a5;},M=(_0x4b8006,_0x39bdd9)=>(_0x352980,_0x4c7fac)=>_0x39bdd9(_0x352980,_0x4c7fac,_0x4b8006);let f=class extends _0xe221d9{constructor(_0x1af98d,_0x3ebeef){const _0x3a67f2=_0x48fe2c;super(),this[_0x3a67f2(0xfd)]=_0x1af98d,this['_threadCommentDataSource']=_0x3ebeef,this[_0x3a67f2(0xae)]();}['_initDataSource'](){const _0xa271fa=_0x48fe2c;this['_threadCommentDataSourceService'][_0xa271fa(0xf5)]=this['_threadCommentDataSource'],this[_0xa271fa(0xfd)][_0xa271fa(0xe7)]=!0x1;}};f=te([M(0x0,_0x38d035),M(0x1,_0x428f3a(S))],f);var se=Object[_0x48fe2c(0xf7)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1bedea,_0x573693,_0x2a7bc3)=>_0x573693 in _0x1bedea?se(_0x1bedea,_0x573693,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a7bc3}):_0x1bedea[_0x573693]=_0x2a7bc3,ie=(_0x463889,_0x1fa58d,_0x3a106a,_0x1da43e)=>{const _0x43c352=_0x48fe2c;for(var _0x4c8874=_0x1da43e>0x1?void 0x0:_0x1da43e?oe(_0x1fa58d,_0x3a106a):_0x1fa58d,_0x4de60a=_0x463889[_0x43c352(0xcb)]-0x1,_0x8b2b3a;_0x4de60a>=0x0;_0x4de60a--)(_0x8b2b3a=_0x463889[_0x4de60a])&&(_0x4c8874=_0x8b2b3a(_0x4c8874)||_0x4c8874);return _0x4c8874;},N=(_0xa95b56,_0x51f282)=>(_0x9be76c,_0x783e9b)=>_0x51f282(_0x9be76c,_0x783e9b,_0xa95b56),$=(_0x557a2e,_0x398208,_0xf836ae)=>ne(_0x557a2e,typeof _0x398208!=_0x48fe2c(0xcd)?_0x398208+'':_0x398208,_0xf836ae);let g=class extends _0x4b70ca{constructor(_0x54c2f7=O,_0x532645,_0x1e9e98){const _0x30e2cd=_0x48fe2c;super(),this['_config']=_0x54c2f7,this[_0x30e2cd(0xdc)]=_0x532645,this[_0x30e2cd(0xbc)]=_0x1e9e98;const {..._0x2274bf}=_0x157acd({},O,this[_0x30e2cd(0xd3)]);this[_0x30e2cd(0xbc)]['setConfig'](z,_0x2274bf);}[_0x48fe2c(0x9d)](){const _0x179386=_0x48fe2c;[[S],[f],[_]][_0x179386(0xd1)](_0x3344d6=>{const _0x2e55d4=_0x179386;this[_0x2e55d4(0xdc)][_0x2e55d4(0xe1)](_0x3344d6);});}[_0x48fe2c(0xe5)](){const _0x39a128=_0x48fe2c;this[_0x39a128(0xdc)]['get'](f),this[_0x39a128(0xdc)][_0x39a128(0xf0)](_);}};$(g,_0x48fe2c(0xf6),W),$(g,_0x48fe2c(0xb2),_0x4bc7a1[_0x48fe2c(0x9e)]),g=ie([_0xdc118a(_0x5995f1,_0x167480,_0x25820f),N(0x1,_0x428f3a(_0x29b08d)),N(0x2,_0x5e1548)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3766ad=_0x6338;(function(_0x34809e,_0x4ff41c){const _0x58788a=_0x6338,_0x4d6ddb=_0x34809e();while(!![]){try{const _0x2fea04=-parseInt(_0x58788a(0x193))/0x1+parseInt(_0x58788a(0x177))/0x2+-parseInt(_0x58788a(0x186))/0x3*(-parseInt(_0x58788a(0x1b3))/0x4)+parseInt(_0x58788a(0x183))/0x5*(parseInt(_0x58788a(0x153))/0x6)+parseInt(_0x58788a(0x168))/0x7+parseInt(_0x58788a(0x1a0))/0x8+-parseInt(_0x58788a(0x164))/0x9;if(_0x2fea04===_0x4ff41c)break;else _0x4d6ddb['push'](_0x4d6ddb['shift']());}catch(_0x1504c7){_0x4d6ddb['push'](_0x4d6ddb['shift']());}}}(_0x4622,0x8d958));import{CommentService as _0x57ba11,CollaborationSessionService as _0xed5572,UniverCollaborationClientPlugin as _0x444dd9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x11f1a8}from'@univerjs-pro/license';import{dayjs as _0x273302,UserManagerService as _0x12984b,Inject as _0x2f533a,Injector as _0x16c6fe,Disposable as _0x562d89,CustomRangeType as _0x28af1a,UniverInstanceType as _0x87ab81,DependentOn as _0x2eb588,Plugin as _0x5e5468,merge as _0x38d422,IConfigService as _0x197a26}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5767cd}from'@univerjs/thread-comment-ui';function _0x4622(){const _0x1f9c87=['userID','_userService','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','get','1560658mwoVax','/solved','subscribe','addUser','_threadCommentModel','length','Delete','onReady','/list','threadId','users','getUnit','155XBsIyq','saveCommentToSnapshot','getMemberID','15fIbrzR','_configService','slice','pluginName','personId','_threadCommentDataSourceService','find','pipe','/edit','onStarting','add','COMMENT','symbol','247525ypapGY','_commentService','root','delete','requireSession','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','customRanges','Edit','_initDataSource','reply','_threadCommentDataSource','thread-comment-data-source.config','1093944fIAPbm','user','/universer-api/comment/unit/','post','UNRECOGNIZED','_init','replies','createTimestamp','Solved','_httpService','filter','comments','solved','getCurrentUser','map','body','UNIVER_UNKNOWN','forEach','size','149748crLihL','addComment','_sessionService','code','rangeType','userId','83946gxbMgp','Unknown','commentUpdate$','parse','content','resolved','Add','getOwnPropertyDescriptor','format','Solve','stringify','parentId','disposeWithMe','syncUpdateMutationToColla','_injector','payload','deleteComment','15216408JStdNA','/delete','comment','error','6861309ppLMna','listComments','unitId','replyId','rangeId','Reply','_initUserSync','defineProperty','getUser'];_0x4622=function(){return _0x1f9c87;};return _0x4622();}import{ThreadCommentModel as _0x4f5042,IThreadCommentDataSourceService as _0x43da02}from'@univerjs/thread-comment';import{bufferTime as _0x587e3c}from'rxjs';import{HTTPService as _0x252bb0}from'@univerjs/network';const W=_0x3766ad(0x174);var I=(_0x2b64bc=>(_0x2b64bc[_0x2b64bc[_0x3766ad(0x198)]=0x0]=_0x3766ad(0x198),_0x2b64bc[_0x2b64bc[_0x3766ad(0x1a8)]=0x1]=_0x3766ad(0x1a8),_0x2b64bc[_0x2b64bc[_0x3766ad(0x1a4)]=-0x1]='UNRECOGNIZED',_0x2b64bc))(I||{}),v=(_0xcec190=>(_0xcec190[_0xcec190[_0x3766ad(0x154)]=0x0]='Unknown',_0xcec190[_0xcec190['Add']=0x1]=_0x3766ad(0x159),_0xcec190[_0xcec190[_0x3766ad(0x16d)]=0x2]='Reply',_0xcec190[_0xcec190[_0x3766ad(0x19b)]=0x3]='Edit',_0xcec190[_0xcec190['Delete']=0x4]=_0x3766ad(0x17d),_0xcec190[_0xcec190[_0x3766ad(0x15c)]=0x5]='Solve',_0xcec190[_0xcec190[_0x3766ad(0x1a4)]=-0x1]=_0x3766ad(0x1a4),_0xcec190))(v||{});const y=_0x38cd3b=>_0x273302(new Date(+_0x38cd3b))[_0x3766ad(0x15b)](_0x3766ad(0x199)),B=async(_0x5209e4,_0xd3e35f)=>{const _0x3ad9c3=_0x3766ad,_0x3cae7a=_0x5209e4['get'](_0x12984b),_0xea5800=_0x5209e4['get'](_0x252bb0);_0xd3e35f[_0x3ad9c3(0x1b1)](_0x110375=>{const _0x52b20f=_0x3ad9c3;_0x3cae7a[_0x52b20f(0x170)](_0x110375)&&_0xd3e35f[_0x52b20f(0x196)](_0x110375);}),_0xd3e35f[_0x3ad9c3(0x1b2)]&&(await _0xea5800['get']('/universer-api/user/list',{'params':{'userIDs':[..._0xd3e35f]}}))[_0x3ad9c3(0x1af)]['users']['forEach'](_0xc8dc68=>{const _0x30b63c=_0x3ad9c3;_0xc8dc68&&_0x3cae7a[_0x30b63c(0x17a)](_0xc8dc68);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x9c9c70,_0x2d4e48,_0x18901d,_0xd13e38)=>{const _0x40cc99=_0x3766ad;for(var _0x201256=_0xd13e38>0x1?void 0x0:_0xd13e38?K(_0x2d4e48,_0x18901d):_0x2d4e48,_0x30c17c=_0x9c9c70[_0x40cc99(0x17c)]-0x1,_0x3e67a4;_0x30c17c>=0x0;_0x30c17c--)(_0x3e67a4=_0x9c9c70[_0x30c17c])&&(_0x201256=_0x3e67a4(_0x201256)||_0x201256);return _0x201256;},p=(_0x9eeb3d,_0x339f4d)=>(_0x156f13,_0x22b871)=>_0x339f4d(_0x156f13,_0x22b871,_0x9eeb3d);let _=class extends _0x562d89{constructor(_0x50c99d,_0xf6ec1d,_0x53aa36,_0x44c56d){const _0x2ac97d=_0x3766ad;super(),this[_0x2ac97d(0x194)]=_0x50c99d,this[_0x2ac97d(0x17b)]=_0xf6ec1d,this['_userService']=_0x53aa36,this[_0x2ac97d(0x161)]=_0x44c56d,this['_init'](),this[_0x2ac97d(0x16e)]();}['_initUserSync'](){const _0x245240=_0x3766ad;this[_0x245240(0x15f)](this[_0x245240(0x17b)][_0x245240(0x155)][_0x245240(0x18d)](_0x587e3c(0x10))[_0x245240(0x179)](_0x20f11c=>{const _0x230bf5=_0x245240,_0x4f6226=new Set();_0x20f11c[_0x230bf5(0x1b1)](_0x32da5e=>{const _0x3c60d4=_0x230bf5;if(_0x32da5e['type']===_0x3c60d4(0x190)){const _0x571cba=_0x32da5e[_0x3c60d4(0x162)][_0x3c60d4(0x18a)];_0x4f6226[_0x3c60d4(0x190)](_0x571cba);}}),B(this[_0x230bf5(0x161)],_0x4f6226);}));}[_0x3766ad(0x1a5)](){const _0x51cdd5=_0x3766ad;this[_0x51cdd5(0x15f)](this[_0x51cdd5(0x194)]['commentUpdate$'][_0x51cdd5(0x179)](async _0x29462e=>{const _0x5e160d=_0x51cdd5;var _0x1e942c,_0x53ed4f,_0x2b2f68,_0x569e06;const _0xf8b86b=(_0x1e942c=this['_threadCommentModel'][_0x5e160d(0x182)](_0x29462e['unitId'])[_0x5e160d(0x18c)](_0x4dcf2b=>_0x4dcf2b[_0x5e160d(0x180)]===_0x29462e['threadId']))==null?void 0x0:_0x1e942c[_0x5e160d(0x195)];if(!_0xf8b86b)return;const {unitId:_0x1f6b1c,subUnitId:_0x11b74c}=_0xf8b86b;switch(_0x29462e[_0x5e160d(0x1a1)]&&this[_0x5e160d(0x172)][_0x5e160d(0x17a)](_0x29462e[_0x5e160d(0x1a1)]),_0x29462e[_0x5e160d(0x173)]){case v[_0x5e160d(0x159)]:break;case v[_0x5e160d(0x16d)]:{this[_0x5e160d(0x17b)][_0x5e160d(0x1b4)](_0x1f6b1c,_0x11b74c,{'unitId':_0x1f6b1c,'subUnitId':_0x11b74c,'ref':'','id':_0x29462e[_0x5e160d(0x16b)],'dT':y(+_0x29462e[_0x5e160d(0x1a7)]),'threadId':_0x29462e['threadId'],'personId':(_0x2b2f68=(_0x53ed4f=_0x29462e[_0x5e160d(0x1a1)])==null?void 0x0:_0x53ed4f[_0x5e160d(0x171)])!=null?_0x2b2f68:_0x29462e[_0x5e160d(0x152)],'text':JSON[_0x5e160d(0x156)](_0x29462e['content']),'parentId':_0xf8b86b['id']});break;}case v[_0x5e160d(0x17d)]:{const _0x5a5572=this[_0x5e160d(0x17b)]['getComment'](_0x1f6b1c,_0x11b74c,_0x29462e[_0x5e160d(0x16b)]);_0x5a5572&&_0x5a5572[_0x5e160d(0x15e)]&&this['_threadCommentModel'][_0x5e160d(0x163)](_0x1f6b1c,_0x11b74c,_0x29462e[_0x5e160d(0x16b)]);break;}case v[_0x5e160d(0x19b)]:{this[_0x5e160d(0x17b)]['updateComment'](_0x1f6b1c,_0x11b74c,{'commentId':_0x29462e[_0x5e160d(0x16b)],'text':JSON[_0x5e160d(0x156)](_0x29462e[_0x5e160d(0x157)])});break;}case v[_0x5e160d(0x15c)]:{const _0x3f2336=(_0x569e06=this[_0x5e160d(0x17b)][_0x5e160d(0x182)](_0x29462e[_0x5e160d(0x16a)])['find'](_0x124297=>_0x124297[_0x5e160d(0x180)]===_0x29462e[_0x5e160d(0x180)]))==null?void 0x0:_0x569e06[_0x5e160d(0x195)];_0x3f2336&&this[_0x5e160d(0x17b)]['resolveComment'](_0x1f6b1c,_0x11b74c,_0x3f2336['id'],_0x29462e[_0x5e160d(0x1ac)]===I[_0x5e160d(0x1a8)]);break;}}}));}};_=V([p(0x0,_0x2f533a(_0x57ba11)),p(0x1,_0x2f533a(_0x4f5042)),p(0x2,_0x2f533a(_0x12984b)),p(0x3,_0x2f533a(_0x16c6fe))],_);const z=_0x3766ad(0x19f),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2562fe,_0x1aa573,_0x29315d,_0x304860)=>{for(var _0x54d6b5=_0x304860>0x1?void 0x0:_0x304860?k(_0x1aa573,_0x29315d):_0x1aa573,_0x5dd4db=_0x2562fe['length']-0x1,_0x462903;_0x5dd4db>=0x0;_0x5dd4db--)(_0x462903=_0x2562fe[_0x5dd4db])&&(_0x54d6b5=_0x462903(_0x54d6b5)||_0x54d6b5);return _0x54d6b5;},b=(_0x2c570e,_0x5cb426)=>(_0x277b04,_0x4cb8f8)=>_0x5cb426(_0x277b04,_0x4cb8f8,_0x2c570e);function X(_0x521445,_0x3d4489){const _0x4bc175=_0x3766ad,_0x4f6fea=_0x521445[_0x4bc175(0x1a6)][0x0];return{..._0x3d4489,'id':_0x4f6fea[_0x4bc175(0x16b)],'resolved':_0x521445[_0x4bc175(0x1ac)]===0x1,'dT':y(_0x4f6fea[_0x4bc175(0x1a7)]),'personId':_0x4f6fea[_0x4bc175(0x152)],'threadId':_0x4f6fea[_0x4bc175(0x180)]};}function ee(_0x28423b,_0x51f7fd,_0x4cfee2){const _0x19f588=_0x3766ad;var _0x107b6b,_0x386794;if(((_0x386794=(_0x107b6b=_0x28423b==null?void 0x0:_0x28423b['replies'])==null?void 0x0:_0x107b6b[_0x19f588(0x17c)])!=null?_0x386794:0x0)>0x0){const _0x1929a1=(_0x29ab33,_0x512e1f)=>({'id':_0x29ab33[_0x19f588(0x16b)],'threadId':_0x29ab33[_0x19f588(0x180)],'dT':y(_0x29ab33[_0x19f588(0x1a7)]),'personId':_0x29ab33[_0x19f588(0x152)],'resolved':_0x28423b[_0x19f588(0x1ac)]===I[_0x19f588(0x1a8)],'unitId':_0x51f7fd,'subUnitId':_0x4cfee2,'text':JSON[_0x19f588(0x156)](_0x29ab33['content']),'parentId':_0x512e1f}),_0x5991dc=_0x1929a1(_0x28423b[_0x19f588(0x1a6)][0x0]);return{..._0x5991dc,'children':_0x28423b[_0x19f588(0x1a6)][_0x19f588(0x188)](0x1)[_0x19f588(0x1ae)](_0x3d830b=>_0x1929a1(_0x3d830b,_0x5991dc['id']))};}return null;}let S=class{constructor(_0x7ac915,_0x47e10b,_0x10c2ad){const _0xe28248=_0x3766ad;this['_httpService']=_0x7ac915,this['_userService']=_0x47e10b,this[_0xe28248(0x1b5)]=_0x10c2ad;}async[_0x3766ad(0x1b4)](_0x1f99e3){const _0x119107=_0x3766ad;var _0x49481a,_0x340818;const {parentId:_0x513037,unitId:_0x3a8a9b,text:_0x70fee0,threadId:_0x2d31ad}=_0x1f99e3,_0x50f032=(_0x340818=(_0x49481a=_0x70fee0[_0x119107(0x19a)])==null?void 0x0:_0x49481a['filter'](_0x3c8499=>_0x3c8499[_0x119107(0x151)]===_0x28af1a[_0x119107(0x191)])['map'](_0x55fe8d=>_0x55fe8d[_0x119107(0x16c)]))!=null?_0x340818:[],_0x42e8af=JSON[_0x119107(0x15d)](_0x70fee0),_0x29ae81=(await this[_0x119107(0x1b5)]['requireSession'](_0x3a8a9b))[_0x119107(0x185)]();if(_0x513037){const _0x55fcae={'memberId':_0x29ae81,'unitId':_0x3a8a9b,'content':_0x42e8af,'mention':_0x50f032,'threadId':_0x2d31ad},_0x5563e1=(await this[_0x119107(0x1a9)]['post'](_0x119107(0x1a2)+_0x3a8a9b+'/reply',{'body':_0x55fcae}))[_0x119107(0x1af)][_0x119107(0x19d)];return{..._0x1f99e3,'id':_0x5563e1[_0x119107(0x16b)],'dT':_0x273302(+_0x5563e1[_0x119107(0x1a7)])['format'](_0x119107(0x199)),'personId':_0x5563e1[_0x119107(0x152)]};}else{const _0xef9046={'memberId':_0x29ae81,'unitId':_0x3a8a9b,'content':_0x42e8af,'mention':_0x50f032},_0x25f28c=await this[_0x119107(0x1a9)][_0x119107(0x1a3)](_0x119107(0x1a2)+_0x3a8a9b+'/add',{'body':_0xef9046});return X(_0x25f28c['body'][_0x119107(0x166)],_0x1f99e3);}}async['updateComment'](_0x3cee1a){const _0x2de895=_0x3766ad;var _0x25f667,_0x172423;const {text:_0x5475cd,unitId:_0x295b6e}=_0x3cee1a,_0x16270b=(_0x172423=(_0x25f667=_0x5475cd[_0x2de895(0x19a)])==null?void 0x0:_0x25f667[_0x2de895(0x1aa)](_0x57eb63=>_0x57eb63[_0x2de895(0x151)]===_0x28af1a[_0x2de895(0x191)])[_0x2de895(0x1ae)](_0x14fdca=>_0x14fdca['rangeId']))!=null?_0x172423:[],_0x2fdc25=JSON[_0x2de895(0x15d)](_0x5475cd),_0x45e54e=_0x3cee1a[_0x2de895(0x180)],_0x85be13=_0x3cee1a['id'],_0x332170={'memberId':(await this[_0x2de895(0x1b5)][_0x2de895(0x197)](_0x295b6e))[_0x2de895(0x185)](),'unitId':_0x295b6e,'threadId':_0x45e54e,'mention':_0x16270b,'content':_0x2fdc25,'replyId':_0x85be13},_0x1575d9=await this['_httpService'][_0x2de895(0x1a3)](_0x2de895(0x1a2)+_0x295b6e+_0x2de895(0x18e),{'body':_0x332170});return!_0x1575d9['body'][_0x2de895(0x167)]||_0x1575d9[_0x2de895(0x1af)]['error'][_0x2de895(0x150)]===0x1;}async['resolveComment'](_0x221b78){const _0x34be98=_0x3766ad,{unitId:_0x702d15}=_0x221b78,_0x2549ec=_0x221b78['threadId'],_0x418c8a={'memberId':this['_userService'][_0x34be98(0x1ad)]()[_0x34be98(0x171)],'unitId':_0x702d15,'threadId':_0x2549ec,'solved':_0x221b78[_0x34be98(0x158)]?I['Solved']:I[_0x34be98(0x198)]},_0x278629=await this[_0x34be98(0x1a9)]['post'](_0x34be98(0x1a2)+_0x702d15+_0x34be98(0x178),{'body':_0x418c8a});return!_0x278629[_0x34be98(0x1af)][_0x34be98(0x167)]||_0x278629[_0x34be98(0x1af)]['error'][_0x34be98(0x150)]===0x1;}async[_0x3766ad(0x163)](_0x156118,_0x1d0bee,_0x3b23ec,_0x2941a1){const _0x5b2f89=_0x3766ad,_0x23a2f0={'memberId':(await this[_0x5b2f89(0x1b5)][_0x5b2f89(0x197)](_0x156118))[_0x5b2f89(0x185)](),'threadId':_0x3b23ec,'replyId':_0x2941a1,'unitId':_0x156118},_0x419a15=await this['_httpService'][_0x5b2f89(0x1a3)](_0x5b2f89(0x1a2)+_0x156118+_0x5b2f89(0x165),{'body':_0x23a2f0});return!_0x419a15[_0x5b2f89(0x1af)]['error']||_0x419a15[_0x5b2f89(0x1af)]['error'][_0x5b2f89(0x150)]===0x1;}async[_0x3766ad(0x169)](_0x485470,_0x43ee8b,_0x3bb32){const _0x5780e9=_0x3766ad,_0x506551={'unitId':_0x485470,'threadId':_0x3bb32},_0x33e382=await this[_0x5780e9(0x1a9)][_0x5780e9(0x1a3)](_0x5780e9(0x1a2)+_0x485470+_0x5780e9(0x17f),{'body':_0x506551}),_0x242704=_0x3bb32['map'](_0x1d73cc=>ee(_0x33e382['body'][_0x5780e9(0x1ab)][_0x1d73cc],_0x485470,_0x43ee8b))[_0x5780e9(0x1aa)](Boolean);return Object['values'](_0x33e382['body'][_0x5780e9(0x181)])[_0x5780e9(0x1b1)](_0x2d8460=>{const _0x3425e5=_0x5780e9;this[_0x3425e5(0x172)]['addUser'](_0x2d8460);}),_0x242704;}[_0x3766ad(0x184)](_0x4fbf21){const _0x52a5b5=_0x3766ad;return{'id':_0x4fbf21['id'],'threadId':_0x4fbf21[_0x52a5b5(0x180)],'ref':_0x4fbf21['ref']};}};S=Q([b(0x0,_0x2f533a(_0x252bb0)),b(0x1,_0x2f533a(_0x12984b)),b(0x2,_0x2f533a(_0xed5572))],S);var re=Object[_0x3766ad(0x15a)],te=(_0x38810d,_0x1f5679,_0x83746d,_0x467d88)=>{const _0x5c9589=_0x3766ad;for(var _0x372e22=_0x467d88>0x1?void 0x0:_0x467d88?re(_0x1f5679,_0x83746d):_0x1f5679,_0x193383=_0x38810d[_0x5c9589(0x17c)]-0x1,_0x2bc769;_0x193383>=0x0;_0x193383--)(_0x2bc769=_0x38810d[_0x193383])&&(_0x372e22=_0x2bc769(_0x372e22)||_0x372e22);return _0x372e22;},M=(_0x2c7e1f,_0xde1521)=>(_0x1697c3,_0x52af9f)=>_0xde1521(_0x1697c3,_0x52af9f,_0x2c7e1f);let f=class extends _0x562d89{constructor(_0x475df6,_0x13de36){const _0x59ccd1=_0x3766ad;super(),this[_0x59ccd1(0x18b)]=_0x475df6,this[_0x59ccd1(0x19e)]=_0x13de36,this[_0x59ccd1(0x19c)]();}[_0x3766ad(0x19c)](){const _0x1d8c02=_0x3766ad;this[_0x1d8c02(0x18b)][_0x1d8c02(0x175)]=this[_0x1d8c02(0x19e)],this[_0x1d8c02(0x18b)][_0x1d8c02(0x160)]=!0x1;}};f=te([M(0x0,_0x43da02),M(0x1,_0x2f533a(S))],f);function _0x6338(_0x33d7a5,_0x31adf3){_0x33d7a5=_0x33d7a5-0x150;const _0x4622c6=_0x4622();let _0x6338fc=_0x4622c6[_0x33d7a5];return _0x6338fc;}var se=Object[_0x3766ad(0x16f)],oe=Object[_0x3766ad(0x15a)],ne=(_0x44b435,_0x495ee7,_0x4eac04)=>_0x495ee7 in _0x44b435?se(_0x44b435,_0x495ee7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4eac04}):_0x44b435[_0x495ee7]=_0x4eac04,ie=(_0x59f9a9,_0x455cc2,_0x3af823,_0x19ba1e)=>{const _0x556833=_0x3766ad;for(var _0x1c233a=_0x19ba1e>0x1?void 0x0:_0x19ba1e?oe(_0x455cc2,_0x3af823):_0x455cc2,_0x4b2673=_0x59f9a9[_0x556833(0x17c)]-0x1,_0x3289e3;_0x4b2673>=0x0;_0x4b2673--)(_0x3289e3=_0x59f9a9[_0x4b2673])&&(_0x1c233a=_0x3289e3(_0x1c233a)||_0x1c233a);return _0x1c233a;},N=(_0x4a4045,_0x176293)=>(_0x1e7c1b,_0x592d4a)=>_0x176293(_0x1e7c1b,_0x592d4a,_0x4a4045),$=(_0x142bab,_0x3fb36e,_0x31f310)=>ne(_0x142bab,typeof _0x3fb36e!=_0x3766ad(0x192)?_0x3fb36e+'':_0x3fb36e,_0x31f310);let g=class extends _0x5e5468{constructor(_0x4b41b0=O,_0x4981b8,_0x295e15){const _0xd9a974=_0x3766ad;super(),this['_config']=_0x4b41b0,this[_0xd9a974(0x161)]=_0x4981b8,this[_0xd9a974(0x187)]=_0x295e15;const {..._0x5c1206}=_0x38d422({},O,this['_config']);this[_0xd9a974(0x187)]['setConfig'](z,_0x5c1206);}[_0x3766ad(0x18f)](){const _0x2dc0bf=_0x3766ad;[[S],[f],[_]][_0x2dc0bf(0x1b1)](_0x1a7974=>{const _0x69a74f=_0x2dc0bf;this[_0x69a74f(0x161)]['add'](_0x1a7974);});}[_0x3766ad(0x17e)](){const _0x4b1b86=_0x3766ad;this[_0x4b1b86(0x161)][_0x4b1b86(0x176)](f),this[_0x4b1b86(0x161)][_0x4b1b86(0x176)](_);}};$(g,_0x3766ad(0x189),W),$(g,_0x3766ad(0x173),_0x87ab81[_0x3766ad(0x1b0)]),g=ie([_0x2eb588(_0x5767cd,_0x444dd9,_0x11f1a8),N(0x1,_0x2f533a(_0x16c6fe)),N(0x2,_0x197a26)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xc58f(_0x419dc4,_0x31a11c){_0x419dc4=_0x419dc4-0xc6;const _0x7464bc=_0x7464();let _0xc58fd5=_0x7464bc[_0x419dc4];return _0xc58fd5;}(function(_0x116b11,_0x1f4e16){const _0x36ab84=_0xc58f,_0x460837=_0x116b11();while(!![]){try{const _0x37f8f3=parseInt(_0x36ab84(0x108))/0x1*(parseInt(_0x36ab84(0x105))/0x2)+parseInt(_0x36ab84(0xff))/0x3+-parseInt(_0x36ab84(0x121))/0x4+-parseInt(_0x36ab84(0x13b))/0x5*(parseInt(_0x36ab84(0xd9))/0x6)+parseInt(_0x36ab84(0xd8))/0x7+-parseInt(_0x36ab84(0x138))/0x8*(-parseInt(_0x36ab84(0xe9))/0x9)+-parseInt(_0x36ab84(0xfd))/0xa;if(_0x37f8f3===_0x1f4e16)break;else _0x460837['push'](_0x460837['shift']());}catch(_0x213760){_0x460837['push'](_0x460837['shift']());}}}(_0x7464,0x364cb),function(_0x578ba9,_0x568c19){const _0x1ae1c6=_0xc58f;typeof exports==_0x1ae1c6(0xfb)&&typeof module<'u'?_0x568c19(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==_0x1ae1c6(0x151)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client',_0x1ae1c6(0x139),_0x1ae1c6(0x13e),_0x1ae1c6(0x14d),'@univerjs/thread-comment',_0x1ae1c6(0xfe),_0x1ae1c6(0x126)],_0x568c19):(_0x578ba9=typeof globalThis<'u'?globalThis:_0x578ba9||self,_0x568c19(_0x578ba9[_0x1ae1c6(0xd2)]={},_0x578ba9[_0x1ae1c6(0xc9)],_0x578ba9['UniverProLicense'],_0x578ba9[_0x1ae1c6(0x128)],_0x578ba9[_0x1ae1c6(0xfa)],_0x578ba9[_0x1ae1c6(0x10a)],_0x578ba9['rxjs'],_0x578ba9[_0x1ae1c6(0x141)]));}(this,function(_0x3041a1,_0x1c91d7,_0x3db020,_0x3e4368,_0x2c2f02,_0x39bcb2,_0x4b9f61,_0x567a93){'use strict';const _0x307b38=_0xc58f;const _0x3fc2ff=_0x307b38(0x142);var _0x1b8961=(_0x509cca=>(_0x509cca[_0x509cca[_0x307b38(0xf2)]=0x0]='OpenOrReOpen',_0x509cca[_0x509cca[_0x307b38(0x10f)]=0x1]=_0x307b38(0x10f),_0x509cca[_0x509cca[_0x307b38(0xe7)]=-0x1]=_0x307b38(0xe7),_0x509cca))(_0x1b8961||{}),_0x222735=(_0x8af110=>(_0x8af110[_0x8af110[_0x307b38(0xcc)]=0x0]=_0x307b38(0xcc),_0x8af110[_0x8af110[_0x307b38(0x143)]=0x1]=_0x307b38(0x143),_0x8af110[_0x8af110['Reply']=0x2]=_0x307b38(0x124),_0x8af110[_0x8af110['Edit']=0x3]=_0x307b38(0x11a),_0x8af110[_0x8af110[_0x307b38(0x100)]=0x4]=_0x307b38(0x100),_0x8af110[_0x8af110[_0x307b38(0x104)]=0x5]='Solve',_0x8af110[_0x8af110['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x8af110))(_0x222735||{});const _0x16cba7=_0x570103=>_0x3e4368[_0x307b38(0xf6)](new Date(+_0x570103))['format'](_0x307b38(0x110)),_0x41556f=async(_0x3b4318,_0x198b61)=>{const _0x580195=_0x307b38,_0x140aa5=_0x3b4318['get'](_0x3e4368[_0x580195(0x11d)]),_0x379d93=_0x3b4318[_0x580195(0x133)](_0x567a93[_0x580195(0xeb)]);_0x198b61[_0x580195(0x137)](_0x5307bc=>{const _0x213b00=_0x580195;_0x140aa5[_0x213b00(0x114)](_0x5307bc)&&_0x198b61[_0x213b00(0x103)](_0x5307bc);}),_0x198b61['size']&&(await _0x379d93['get'](_0x580195(0xca),{'params':{'userIDs':[..._0x198b61]}}))[_0x580195(0x13f)][_0x580195(0x11e)][_0x580195(0x137)](_0x271206=>{const _0x3e287f=_0x580195;_0x271206&&_0x140aa5[_0x3e287f(0x149)](_0x271206);});};var _0x1a2a1c=Object['getOwnPropertyDescriptor'],_0x4a88ca=(_0x46fbeb,_0x3e51cd,_0x2a41d8,_0x5adc5c)=>{const _0x4417d5=_0x307b38;for(var _0x310687=_0x5adc5c>0x1?void 0x0:_0x5adc5c?_0x1a2a1c(_0x3e51cd,_0x2a41d8):_0x3e51cd,_0x2c5955=_0x46fbeb[_0x4417d5(0xcb)]-0x1,_0x52d27f;_0x2c5955>=0x0;_0x2c5955--)(_0x52d27f=_0x46fbeb[_0x2c5955])&&(_0x310687=_0x52d27f(_0x310687)||_0x310687);return _0x310687;},_0x480242=(_0x4d5ba6,_0x12a3e7)=>(_0x1dad85,_0x23587b)=>_0x12a3e7(_0x1dad85,_0x23587b,_0x4d5ba6);let _0x1b1de7=class extends _0x3e4368['Disposable']{constructor(_0x2f3f00,_0x20a898,_0x27989e,_0x5bf9e2){const _0x21699b=_0x307b38;super(),this[_0x21699b(0xe3)]=_0x2f3f00,this[_0x21699b(0xc8)]=_0x20a898,this[_0x21699b(0x125)]=_0x27989e,this[_0x21699b(0x129)]=_0x5bf9e2,this[_0x21699b(0x12e)](),this[_0x21699b(0x140)]();}[_0x307b38(0x140)](){const _0x2cf9de=_0x307b38;this['disposeWithMe'](this[_0x2cf9de(0xc8)][_0x2cf9de(0x130)][_0x2cf9de(0xce)](_0x4b9f61[_0x2cf9de(0xd1)](0x10))[_0x2cf9de(0xf3)](_0x232dc5=>{const _0x2e4bf6=_0x2cf9de,_0x21e3e8=new Set();_0x232dc5[_0x2e4bf6(0x137)](_0x17ac83=>{const _0x4aa66f=_0x2e4bf6;if(_0x17ac83[_0x4aa66f(0x14c)]==='add'){const _0x1858fe=_0x17ac83[_0x4aa66f(0xef)][_0x4aa66f(0xdc)];_0x21e3e8['add'](_0x1858fe);}}),_0x41556f(this[_0x2e4bf6(0x129)],_0x21e3e8);}));}[_0x307b38(0x12e)](){const _0x34aee1=_0x307b38;this[_0x34aee1(0x147)](this[_0x34aee1(0xe3)][_0x34aee1(0x130)][_0x34aee1(0xf3)](async _0x4155f2=>{const _0x4f74da=_0x34aee1;var _0x31695f,_0x1ab9d5,_0x26e9ed,_0x2ea8a6;const _0x26fcdc=(_0x31695f=this[_0x4f74da(0xc8)]['getUnit'](_0x4155f2[_0x4f74da(0x111)])['find'](_0x30cc86=>_0x30cc86[_0x4f74da(0xdb)]===_0x4155f2[_0x4f74da(0xdb)]))==null?void 0x0:_0x31695f[_0x4f74da(0x12c)];if(!_0x26fcdc)return;const {unitId:_0x30a454,subUnitId:_0x89c10}=_0x26fcdc;switch(_0x4155f2[_0x4f74da(0xe2)]&&this[_0x4f74da(0x125)][_0x4f74da(0x149)](_0x4155f2[_0x4f74da(0xe2)]),_0x4155f2[_0x4f74da(0x14c)]){case _0x222735['Add']:break;case _0x222735[_0x4f74da(0x124)]:{this[_0x4f74da(0xc8)][_0x4f74da(0x10e)](_0x30a454,_0x89c10,{'unitId':_0x30a454,'subUnitId':_0x89c10,'ref':'','id':_0x4155f2[_0x4f74da(0x146)],'dT':_0x16cba7(+_0x4155f2[_0x4f74da(0x11f)]),'threadId':_0x4155f2['threadId'],'personId':(_0x26e9ed=(_0x1ab9d5=_0x4155f2[_0x4f74da(0xe2)])==null?void 0x0:_0x1ab9d5[_0x4f74da(0xee)])!=null?_0x26e9ed:_0x4155f2[_0x4f74da(0x13d)],'text':JSON[_0x4f74da(0xd4)](_0x4155f2[_0x4f74da(0xe0)]),'parentId':_0x26fcdc['id']});break;}case _0x222735[_0x4f74da(0x100)]:{const _0x598d5e=this[_0x4f74da(0xc8)][_0x4f74da(0xc7)](_0x30a454,_0x89c10,_0x4155f2[_0x4f74da(0x146)]);_0x598d5e&&_0x598d5e[_0x4f74da(0x115)]&&this[_0x4f74da(0xc8)][_0x4f74da(0xd5)](_0x30a454,_0x89c10,_0x4155f2[_0x4f74da(0x146)]);break;}case _0x222735[_0x4f74da(0x11a)]:{this[_0x4f74da(0xc8)][_0x4f74da(0x14f)](_0x30a454,_0x89c10,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x4f74da(0xd4)](_0x4155f2[_0x4f74da(0xe0)])});break;}case _0x222735[_0x4f74da(0x104)]:{const _0x1151a4=(_0x2ea8a6=this[_0x4f74da(0xc8)]['getUnit'](_0x4155f2[_0x4f74da(0x111)])[_0x4f74da(0x109)](_0x2c8fe4=>_0x2c8fe4[_0x4f74da(0xdb)]===_0x4155f2[_0x4f74da(0xdb)]))==null?void 0x0:_0x2ea8a6[_0x4f74da(0x12c)];_0x1151a4&&this[_0x4f74da(0xc8)][_0x4f74da(0xdf)](_0x30a454,_0x89c10,_0x1151a4['id'],_0x4155f2[_0x4f74da(0x117)]===_0x1b8961[_0x4f74da(0x10f)]);break;}}}));}};_0x1b1de7=_0x4a88ca([_0x480242(0x0,_0x3e4368[_0x307b38(0xc6)](_0x1c91d7[_0x307b38(0xf7)])),_0x480242(0x1,_0x3e4368[_0x307b38(0xc6)](_0x39bcb2[_0x307b38(0xf9)])),_0x480242(0x2,_0x3e4368[_0x307b38(0xc6)](_0x3e4368[_0x307b38(0x11d)])),_0x480242(0x3,_0x3e4368[_0x307b38(0xc6)](_0x3e4368[_0x307b38(0x123)]))],_0x1b1de7);const _0x381f78=_0x307b38(0xda),_0x4350f3={};var _0x30fce0=Object['getOwnPropertyDescriptor'],_0x22caad=(_0x4584b5,_0x5de675,_0x4fb57d,_0x893a35)=>{const _0x247999=_0x307b38;for(var _0x51055a=_0x893a35>0x1?void 0x0:_0x893a35?_0x30fce0(_0x5de675,_0x4fb57d):_0x5de675,_0x1f2e53=_0x4584b5[_0x247999(0xcb)]-0x1,_0x17812a;_0x1f2e53>=0x0;_0x1f2e53--)(_0x17812a=_0x4584b5[_0x1f2e53])&&(_0x51055a=_0x17812a(_0x51055a)||_0x51055a);return _0x51055a;},_0x3c845c=(_0xc52e01,_0x5bd81a)=>(_0x3aba7c,_0x34edc4)=>_0x5bd81a(_0x3aba7c,_0x34edc4,_0xc52e01);function _0x3946ad(_0x530888,_0x3f2300){const _0x5cc2a5=_0x307b38,_0x1f1252=_0x530888['replies'][0x0];return{..._0x3f2300,'id':_0x1f1252['replyId'],'resolved':_0x530888[_0x5cc2a5(0x117)]===0x1,'dT':_0x16cba7(_0x1f1252[_0x5cc2a5(0x11f)]),'personId':_0x1f1252[_0x5cc2a5(0x13d)],'threadId':_0x1f1252['threadId']};}function _0x4838de(_0x368f29,_0x57e35f,_0x16a428){const _0x274599=_0x307b38;var _0x165179,_0x5a4383;if(((_0x5a4383=(_0x165179=_0x368f29==null?void 0x0:_0x368f29['replies'])==null?void 0x0:_0x165179['length'])!=null?_0x5a4383:0x0)>0x0){const _0x828805=(_0x40c513,_0x32f072)=>({'id':_0x40c513[_0x274599(0x146)],'threadId':_0x40c513[_0x274599(0xdb)],'dT':_0x16cba7(_0x40c513['createTimestamp']),'personId':_0x40c513[_0x274599(0x13d)],'resolved':_0x368f29[_0x274599(0x117)]===_0x1b8961['Solved'],'unitId':_0x57e35f,'subUnitId':_0x16a428,'text':JSON[_0x274599(0xd4)](_0x40c513[_0x274599(0xe0)]),'parentId':_0x32f072}),_0x5b30e7=_0x828805(_0x368f29[_0x274599(0x11b)][0x0]);return{..._0x5b30e7,'children':_0x368f29[_0x274599(0x11b)][_0x274599(0xcd)](0x1)['map'](_0x40b264=>_0x828805(_0x40b264,_0x5b30e7['id']))};}return null;}let _0x1d1a6a=class{constructor(_0x457093,_0x2634e7,_0x1b802b){const _0x3d0d53=_0x307b38;this[_0x3d0d53(0x136)]=_0x457093,this[_0x3d0d53(0x125)]=_0x2634e7,this[_0x3d0d53(0x118)]=_0x1b802b;}async[_0x307b38(0x10e)](_0x46f12d){const _0x165e1f=_0x307b38;var _0x27aeff,_0x382a2a;const {parentId:_0x19f0d1,unitId:_0x32eab9,text:_0x45f610,threadId:_0x598edc}=_0x46f12d,_0x557e63=(_0x382a2a=(_0x27aeff=_0x45f610[_0x165e1f(0xea)])==null?void 0x0:_0x27aeff[_0x165e1f(0xf0)](_0x28854a=>_0x28854a[_0x165e1f(0x131)]===_0x3e4368[_0x165e1f(0x120)]['COMMENT'])['map'](_0x335278=>_0x335278['rangeId']))!=null?_0x382a2a:[],_0x1526e8=JSON[_0x165e1f(0x12d)](_0x45f610),_0x302a83=(await this[_0x165e1f(0x118)]['requireSession'](_0x32eab9))[_0x165e1f(0x11c)]();if(_0x19f0d1){const _0x432d08={'memberId':_0x302a83,'unitId':_0x32eab9,'content':_0x1526e8,'mention':_0x557e63,'threadId':_0x598edc},_0x4d8092=(await this[_0x165e1f(0x136)][_0x165e1f(0x102)]('/universer-api/comment/unit/'+_0x32eab9+'/reply',{'body':_0x432d08}))['body'][_0x165e1f(0x148)];return{..._0x46f12d,'id':_0x4d8092[_0x165e1f(0x146)],'dT':_0x3e4368['dayjs'](+_0x4d8092[_0x165e1f(0x11f)])[_0x165e1f(0xdd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4d8092[_0x165e1f(0x13d)]};}else{const _0x4b7c4e={'memberId':_0x302a83,'unitId':_0x32eab9,'content':_0x1526e8,'mention':_0x557e63},_0x48075c=await this[_0x165e1f(0x136)]['post'](_0x165e1f(0xe5)+_0x32eab9+'/add',{'body':_0x4b7c4e});return _0x3946ad(_0x48075c['body'][_0x165e1f(0x113)],_0x46f12d);}}async['updateComment'](_0x188848){const _0x459f88=_0x307b38;var _0x194259,_0x249f62;const {text:_0x45f752,unitId:_0x52fb8d}=_0x188848,_0x3b7c35=(_0x249f62=(_0x194259=_0x45f752[_0x459f88(0xea)])==null?void 0x0:_0x194259[_0x459f88(0xf0)](_0x1a329a=>_0x1a329a['rangeType']===_0x3e4368[_0x459f88(0x120)][_0x459f88(0x10b)])[_0x459f88(0x14a)](_0x2da044=>_0x2da044['rangeId']))!=null?_0x249f62:[],_0x56466e=JSON[_0x459f88(0x12d)](_0x45f752),_0x17c23c=_0x188848['threadId'],_0xcefc8a=_0x188848['id'],_0x260f37={'memberId':(await this[_0x459f88(0x118)][_0x459f88(0xe4)](_0x52fb8d))[_0x459f88(0x11c)](),'unitId':_0x52fb8d,'threadId':_0x17c23c,'mention':_0x3b7c35,'content':_0x56466e,'replyId':_0xcefc8a},_0x599a24=await this['_httpService'][_0x459f88(0x102)]('/universer-api/comment/unit/'+_0x52fb8d+_0x459f88(0xd6),{'body':_0x260f37});return!_0x599a24[_0x459f88(0x13f)][_0x459f88(0xd7)]||_0x599a24['body'][_0x459f88(0xd7)][_0x459f88(0x150)]===0x1;}async['resolveComment'](_0x11c00f){const _0x33d39f=_0x307b38,{unitId:_0x504d6a}=_0x11c00f,_0x52d740=_0x11c00f[_0x33d39f(0xdb)],_0x2b7ea3={'memberId':this[_0x33d39f(0x125)][_0x33d39f(0x144)]()[_0x33d39f(0xee)],'unitId':_0x504d6a,'threadId':_0x52d740,'solved':_0x11c00f[_0x33d39f(0x14b)]?_0x1b8961[_0x33d39f(0x10f)]:_0x1b8961[_0x33d39f(0xf2)]},_0x1675b8=await this[_0x33d39f(0x136)][_0x33d39f(0x102)](_0x33d39f(0xe5)+_0x504d6a+_0x33d39f(0x13a),{'body':_0x2b7ea3});return!_0x1675b8[_0x33d39f(0x13f)][_0x33d39f(0xd7)]||_0x1675b8[_0x33d39f(0x13f)][_0x33d39f(0xd7)][_0x33d39f(0x150)]===0x1;}async[_0x307b38(0xd5)](_0x2f66f2,_0xec20e8,_0x54bcd7,_0x2571d9){const _0x5e555a=_0x307b38,_0x1e8e6f={'memberId':(await this[_0x5e555a(0x118)][_0x5e555a(0xe4)](_0x2f66f2))[_0x5e555a(0x11c)](),'threadId':_0x54bcd7,'replyId':_0x2571d9,'unitId':_0x2f66f2},_0x4b90c0=await this[_0x5e555a(0x136)]['post'](_0x5e555a(0xe5)+_0x2f66f2+_0x5e555a(0xd0),{'body':_0x1e8e6f});return!_0x4b90c0[_0x5e555a(0x13f)][_0x5e555a(0xd7)]||_0x4b90c0[_0x5e555a(0x13f)][_0x5e555a(0xd7)][_0x5e555a(0x150)]===0x1;}async[_0x307b38(0x122)](_0x553527,_0x33975a,_0x2e4fd5){const _0x483703=_0x307b38,_0x22dc05={'unitId':_0x553527,'threadId':_0x2e4fd5},_0x20b655=await this[_0x483703(0x136)][_0x483703(0x102)]('/universer-api/comment/unit/'+_0x553527+_0x483703(0x107),{'body':_0x22dc05}),_0x2ff633=_0x2e4fd5[_0x483703(0x14a)](_0x12b870=>_0x4838de(_0x20b655[_0x483703(0x13f)][_0x483703(0x134)][_0x12b870],_0x553527,_0x33975a))[_0x483703(0xf0)](Boolean);return Object[_0x483703(0x135)](_0x20b655[_0x483703(0x13f)]['users'])[_0x483703(0x137)](_0x38b0e5=>{const _0x282cfe=_0x483703;this[_0x282cfe(0x125)][_0x282cfe(0x149)](_0x38b0e5);}),_0x2ff633;}[_0x307b38(0x12b)](_0x244ccb){const _0x1c7ea7=_0x307b38;return{'id':_0x244ccb['id'],'threadId':_0x244ccb['threadId'],'ref':_0x244ccb[_0x1c7ea7(0xe6)]};}};_0x1d1a6a=_0x22caad([_0x3c845c(0x0,_0x3e4368[_0x307b38(0xc6)](_0x567a93['HTTPService'])),_0x3c845c(0x1,_0x3e4368['Inject'](_0x3e4368['UserManagerService'])),_0x3c845c(0x2,_0x3e4368[_0x307b38(0xc6)](_0x1c91d7[_0x307b38(0xcf)]))],_0x1d1a6a);var _0x5ef8e1=Object[_0x307b38(0x12a)],_0x468072=(_0x5d73da,_0x2affaf,_0x27b624,_0x1cb375)=>{for(var _0x321916=_0x1cb375>0x1?void 0x0:_0x1cb375?_0x5ef8e1(_0x2affaf,_0x27b624):_0x2affaf,_0x1545ab=_0x5d73da['length']-0x1,_0x4ffb36;_0x1545ab>=0x0;_0x1545ab--)(_0x4ffb36=_0x5d73da[_0x1545ab])&&(_0x321916=_0x4ffb36(_0x321916)||_0x321916);return _0x321916;},_0x50cfa6=(_0x438f13,_0x11e92b)=>(_0x58e50c,_0x1e1afd)=>_0x11e92b(_0x58e50c,_0x1e1afd,_0x438f13);let _0xbd0b48=class extends _0x3e4368[_0x307b38(0x14e)]{constructor(_0x40545f,_0x818a41){const _0x577778=_0x307b38;super(),this[_0x577778(0xf4)]=_0x40545f,this[_0x577778(0x112)]=_0x818a41,this[_0x577778(0xe8)]();}[_0x307b38(0xe8)](){const _0x1ef6ce=_0x307b38;this[_0x1ef6ce(0xf4)][_0x1ef6ce(0xd3)]=this['_threadCommentDataSource'],this[_0x1ef6ce(0xf4)]['syncUpdateMutationToColla']=!0x1;}};_0xbd0b48=_0x468072([_0x50cfa6(0x0,_0x39bcb2[_0x307b38(0x106)]),_0x50cfa6(0x1,_0x3e4368['Inject'](_0x1d1a6a))],_0xbd0b48);var _0x5a9dd1=Object[_0x307b38(0x13c)],_0x104a55=Object[_0x307b38(0x12a)],_0x52a195=(_0x772605,_0x2d444f,_0x5e6938)=>_0x2d444f in _0x772605?_0x5a9dd1(_0x772605,_0x2d444f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e6938}):_0x772605[_0x2d444f]=_0x5e6938,_0x2d7dd7=(_0x4e6c84,_0x5a43cd,_0x3adf6c,_0x54fcfb)=>{for(var _0x5aaef6=_0x54fcfb>0x1?void 0x0:_0x54fcfb?_0x104a55(_0x5a43cd,_0x3adf6c):_0x5a43cd,_0x5754cc=_0x4e6c84['length']-0x1,_0xb7fe61;_0x5754cc>=0x0;_0x5754cc--)(_0xb7fe61=_0x4e6c84[_0x5754cc])&&(_0x5aaef6=_0xb7fe61(_0x5aaef6)||_0x5aaef6);return _0x5aaef6;},_0xeb5f0e=(_0x108d1e,_0x135b13)=>(_0x1db150,_0x4bebc7)=>_0x135b13(_0x1db150,_0x4bebc7,_0x108d1e),_0x572a42=(_0x2061ae,_0x32a520,_0x59dd6c)=>_0x52a195(_0x2061ae,typeof _0x32a520!=_0x307b38(0x116)?_0x32a520+'':_0x32a520,_0x59dd6c);_0x3041a1['UniverThreadCommentDataSourcePlugin']=class extends _0x3e4368[_0x307b38(0xf8)]{constructor(_0x570fba=_0x4350f3,_0x82bf48,_0x1673a3){const _0x3ed5cb=_0x307b38;super(),this[_0x3ed5cb(0xed)]=_0x570fba,this['_injector']=_0x82bf48,this[_0x3ed5cb(0x119)]=_0x1673a3;const {..._0x23a79a}=_0x3e4368[_0x3ed5cb(0xf1)]({},_0x4350f3,this[_0x3ed5cb(0xed)]);this[_0x3ed5cb(0x119)]['setConfig'](_0x381f78,_0x23a79a);}[_0x307b38(0x127)](){const _0x585fc6=_0x307b38;[[_0x1d1a6a],[_0xbd0b48],[_0x1b1de7]][_0x585fc6(0x137)](_0x58d0f1=>{const _0x4e4917=_0x585fc6;this[_0x4e4917(0x129)][_0x4e4917(0xe1)](_0x58d0f1);});}[_0x307b38(0x12f)](){const _0x3228db=_0x307b38;this['_injector'][_0x3228db(0x133)](_0xbd0b48),this[_0x3228db(0x129)]['get'](_0x1b1de7);}},_0x572a42(_0x3041a1[_0x307b38(0x10c)],_0x307b38(0x132),_0x3fc2ff),_0x572a42(_0x3041a1['UniverThreadCommentDataSourcePlugin'],_0x307b38(0x14c),_0x3e4368[_0x307b38(0x145)]['UNIVER_UNKNOWN']),_0x3041a1[_0x307b38(0x10c)]=_0x2d7dd7([_0x3e4368[_0x307b38(0x101)](_0x2c2f02[_0x307b38(0xec)],_0x1c91d7['UniverCollaborationClientPlugin'],_0x3db020[_0x307b38(0xfc)]),_0xeb5f0e(0x1,_0x3e4368['Inject'](_0x3e4368[_0x307b38(0x123)])),_0xeb5f0e(0x2,_0x3e4368[_0x307b38(0x10d)])],_0x3041a1[_0x307b38(0x10c)]),Object[_0x307b38(0x13c)](_0x3041a1,Symbol[_0x307b38(0xf5)],{'value':_0x307b38(0xde)});}));function _0x7464(){const _0x59f0ad=['Module','resolveComment','content','add','user','_commentService','requireSession','/universer-api/comment/unit/','ref','UNRECOGNIZED','_initDataSource','9mULguU','customRanges','HTTPService','UniverThreadCommentUIPlugin','_config','userID','payload','filter','merge','OpenOrReOpen','subscribe','_threadCommentDataSourceService','toStringTag','dayjs','CommentService','Plugin','ThreadCommentModel','UniverThreadCommentUi','object','UniverLicensePlugin','937280nZFYtG','rxjs','766767LHDylP','Delete','DependentOn','post','delete','Solve','4bCWdQm','IThreadCommentDataSourceService','/list','33037ICWAde','find','UniverThreadComment','COMMENT','UniverThreadCommentDataSourcePlugin','IConfigService','addComment','Solved','YYYY/MM/DD\x20HH:mm','unitId','_threadCommentDataSource','comment','getUser','parentId','symbol','solved','_sessionService','_configService','Edit','replies','getMemberID','UserManagerService','users','createTimestamp','CustomRangeType','1168172QLKILw','listComments','Injector','Reply','_userService','@univerjs/network','onStarting','UniverCore','_injector','getOwnPropertyDescriptor','saveCommentToSnapshot','root','stringify','_init','onReady','commentUpdate$','rangeType','pluginName','get','comments','values','_httpService','forEach','3039864AFtMSB','@univerjs-pro/license','/solved','475gttTIe','defineProperty','userId','@univerjs/core','body','_initUserSync','UniverNetwork','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','getCurrentUser','UniverInstanceType','replyId','disposeWithMe','reply','addUser','map','resolved','type','@univerjs/thread-comment-ui','Disposable','updateComment','code','function','Inject','getComment','_threadCommentModel','UniverProCollaborationClient','/universer-api/user/list','length','Unknown','slice','pipe','CollaborationSessionService','/delete','bufferTime','UniverProThreadCommentDatasource','dataSource','parse','deleteComment','/edit','error','161042ZSegWj','7356TYLpMN','thread-comment-data-source.config','threadId','personId','format'];_0x7464=function(){return _0x59f0ad;};return _0x7464();}
|
|
1
|
+
(function(_0x202f69,_0x35efd4){const _0x182f56=_0x4de0,_0x52cedd=_0x202f69();while(!![]){try{const _0x117180=parseInt(_0x182f56(0x162))/0x1+parseInt(_0x182f56(0x1aa))/0x2+parseInt(_0x182f56(0x149))/0x3+parseInt(_0x182f56(0x1bd))/0x4*(-parseInt(_0x182f56(0x19e))/0x5)+-parseInt(_0x182f56(0x19c))/0x6+parseInt(_0x182f56(0x1b7))/0x7*(parseInt(_0x182f56(0x1c2))/0x8)+-parseInt(_0x182f56(0x185))/0x9*(parseInt(_0x182f56(0x1c1))/0xa);if(_0x117180===_0x35efd4)break;else _0x52cedd['push'](_0x52cedd['shift']());}catch(_0x2d69cd){_0x52cedd['push'](_0x52cedd['shift']());}}}(_0x51cc,0x89d26),function(_0x26f746,_0x2c2272){const _0x20aa64=_0x4de0;typeof exports==_0x20aa64(0x1c3)&&typeof module<'u'?_0x2c2272(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[_0x20aa64(0x195)]?define(['exports','@univerjs-pro/collaboration-client',_0x20aa64(0x198),_0x20aa64(0x197),'@univerjs/thread-comment-ui',_0x20aa64(0x175),_0x20aa64(0x189),'@univerjs/network'],_0x2c2272):(_0x26f746=typeof globalThis<'u'?globalThis:_0x26f746||self,_0x2c2272(_0x26f746[_0x20aa64(0x1ab)]={},_0x26f746[_0x20aa64(0x1b4)],_0x26f746[_0x20aa64(0x1a8)],_0x26f746[_0x20aa64(0x15d)],_0x26f746['UniverThreadCommentUi'],_0x26f746['UniverThreadComment'],_0x26f746['rxjs'],_0x26f746[_0x20aa64(0x16f)]));}(this,function(_0x1e705a,_0x317786,_0x4df1b5,_0x10ea32,_0x1a52ab,_0x42f536,_0x1285ee,_0x2fcb1d){'use strict';const _0x4373a9=_0x4de0;const _0x1ba1e2=_0x4373a9(0x17b);var _0x218eec=(_0x384970=>(_0x384970[_0x384970[_0x4373a9(0x172)]=0x0]=_0x4373a9(0x172),_0x384970[_0x384970[_0x4373a9(0x17d)]=0x1]=_0x4373a9(0x17d),_0x384970[_0x384970['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x384970))(_0x218eec||{}),_0x326c94=(_0x3f020d=>(_0x3f020d[_0x3f020d[_0x4373a9(0x157)]=0x0]=_0x4373a9(0x157),_0x3f020d[_0x3f020d[_0x4373a9(0x1af)]=0x1]='Add',_0x3f020d[_0x3f020d[_0x4373a9(0x15f)]=0x2]=_0x4373a9(0x15f),_0x3f020d[_0x3f020d[_0x4373a9(0x152)]=0x3]=_0x4373a9(0x152),_0x3f020d[_0x3f020d['Delete']=0x4]=_0x4373a9(0x1a7),_0x3f020d[_0x3f020d[_0x4373a9(0x1c8)]=0x5]=_0x4373a9(0x1c8),_0x3f020d[_0x3f020d[_0x4373a9(0x184)]=-0x1]=_0x4373a9(0x184),_0x3f020d))(_0x326c94||{});const _0x13581b=_0x5f3c2e=>_0x10ea32[_0x4373a9(0x19d)](new Date(+_0x5f3c2e))[_0x4373a9(0x168)](_0x4373a9(0x15a)),_0x495435=async(_0x5c9bb9,_0x44f45a)=>{const _0x28b6be=_0x4373a9,_0x381c29=_0x5c9bb9[_0x28b6be(0x1b1)](_0x10ea32[_0x28b6be(0x19b)]),_0x4ab0d0=_0x5c9bb9[_0x28b6be(0x1b1)](_0x2fcb1d[_0x28b6be(0x18b)]);_0x44f45a[_0x28b6be(0x18e)](_0x107d10=>{const _0x442556=_0x28b6be;_0x381c29[_0x442556(0x181)](_0x107d10)&&_0x44f45a[_0x442556(0x165)](_0x107d10);}),_0x44f45a[_0x28b6be(0x14c)]&&(await _0x4ab0d0[_0x28b6be(0x1b1)](_0x28b6be(0x1b0),{'params':{'userIDs':[..._0x44f45a]}}))[_0x28b6be(0x1a5)][_0x28b6be(0x1a3)][_0x28b6be(0x18e)](_0x46226d=>{const _0x97bd24=_0x28b6be;_0x46226d&&_0x381c29[_0x97bd24(0x188)](_0x46226d);});};var _0x16ea44=Object[_0x4373a9(0x151)],_0xe2f9db=(_0x3898f6,_0x45a161,_0x7d0176,_0x50f077)=>{const _0x5d97fd=_0x4373a9;for(var _0x3f4de2=_0x50f077>0x1?void 0x0:_0x50f077?_0x16ea44(_0x45a161,_0x7d0176):_0x45a161,_0x2488fa=_0x3898f6[_0x5d97fd(0x16e)]-0x1,_0x26e9d0;_0x2488fa>=0x0;_0x2488fa--)(_0x26e9d0=_0x3898f6[_0x2488fa])&&(_0x3f4de2=_0x26e9d0(_0x3f4de2)||_0x3f4de2);return _0x3f4de2;},_0x15616c=(_0x2c8e5d,_0x761300)=>(_0x3d0b3a,_0x3802ff)=>_0x761300(_0x3d0b3a,_0x3802ff,_0x2c8e5d);let _0x24ae9a=class extends _0x10ea32['Disposable']{constructor(_0x39fb84,_0x16dbcb,_0x2f1e68,_0x3f69ed){const _0x4f3527=_0x4373a9;super(),this['_commentService']=_0x39fb84,this[_0x4f3527(0x1b5)]=_0x16dbcb,this[_0x4f3527(0x1be)]=_0x2f1e68,this[_0x4f3527(0x1c0)]=_0x3f69ed,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x4d755e=_0x4373a9;this[_0x4d755e(0x159)](this[_0x4d755e(0x1b5)]['commentUpdate$'][_0x4d755e(0x1ca)](_0x1285ee['bufferTime'](0x10))[_0x4d755e(0x18a)](_0x131f16=>{const _0x3146c2=_0x4d755e,_0x33f600=new Set();_0x131f16[_0x3146c2(0x18e)](_0x122cb3=>{const _0x580f93=_0x3146c2;if(_0x122cb3[_0x580f93(0x153)]==='add'){const _0x202c83=_0x122cb3[_0x580f93(0x18c)]['personId'];_0x33f600['add'](_0x202c83);}}),_0x495435(this[_0x3146c2(0x1c0)],_0x33f600);}));}[_0x4373a9(0x1c5)](){const _0x56db6b=_0x4373a9;this['disposeWithMe'](this['_commentService'][_0x56db6b(0x173)][_0x56db6b(0x18a)](async _0x44854e=>{const _0x37bf90=_0x56db6b;var _0x2335e3,_0x3ab7de,_0x113862,_0x1d779b;const _0x45427d=(_0x2335e3=this[_0x37bf90(0x1b5)][_0x37bf90(0x1a2)](_0x44854e['unitId'])[_0x37bf90(0x176)](_0x84f00b=>_0x84f00b[_0x37bf90(0x163)]===_0x44854e[_0x37bf90(0x163)]))==null?void 0x0:_0x2335e3[_0x37bf90(0x14a)];if(!_0x45427d)return;const {unitId:_0x2c98d9,subUnitId:_0x139dfb}=_0x45427d;switch(_0x44854e[_0x37bf90(0x18d)]&&this[_0x37bf90(0x1be)][_0x37bf90(0x188)](_0x44854e[_0x37bf90(0x18d)]),_0x44854e['type']){case _0x326c94[_0x37bf90(0x1af)]:break;case _0x326c94[_0x37bf90(0x15f)]:{this['_threadCommentModel'][_0x37bf90(0x1a9)](_0x2c98d9,_0x139dfb,{'unitId':_0x2c98d9,'subUnitId':_0x139dfb,'ref':'','id':_0x44854e[_0x37bf90(0x1c4)],'dT':_0x13581b(+_0x44854e[_0x37bf90(0x18f)]),'threadId':_0x44854e[_0x37bf90(0x163)],'personId':(_0x113862=(_0x3ab7de=_0x44854e[_0x37bf90(0x18d)])==null?void 0x0:_0x3ab7de[_0x37bf90(0x154)])!=null?_0x113862:_0x44854e[_0x37bf90(0x14b)],'text':JSON[_0x37bf90(0x156)](_0x44854e[_0x37bf90(0x186)]),'parentId':_0x45427d['id']});break;}case _0x326c94[_0x37bf90(0x1a7)]:{const _0x2635e7=this[_0x37bf90(0x1b5)]['getComment'](_0x2c98d9,_0x139dfb,_0x44854e[_0x37bf90(0x1c4)]);_0x2635e7&&_0x2635e7[_0x37bf90(0x1bc)]&&this[_0x37bf90(0x1b5)][_0x37bf90(0x1b6)](_0x2c98d9,_0x139dfb,_0x44854e[_0x37bf90(0x1c4)]);break;}case _0x326c94[_0x37bf90(0x152)]:{this['_threadCommentModel']['updateComment'](_0x2c98d9,_0x139dfb,{'commentId':_0x44854e[_0x37bf90(0x1c4)],'text':JSON[_0x37bf90(0x156)](_0x44854e[_0x37bf90(0x186)])});break;}case _0x326c94[_0x37bf90(0x1c8)]:{const _0x329ab9=(_0x1d779b=this['_threadCommentModel'][_0x37bf90(0x1a2)](_0x44854e['unitId'])[_0x37bf90(0x176)](_0x3e7e52=>_0x3e7e52[_0x37bf90(0x163)]===_0x44854e['threadId']))==null?void 0x0:_0x1d779b['root'];_0x329ab9&&this[_0x37bf90(0x1b5)][_0x37bf90(0x14d)](_0x2c98d9,_0x139dfb,_0x329ab9['id'],_0x44854e['solved']===_0x218eec[_0x37bf90(0x17d)]);break;}}}));}};_0x24ae9a=_0xe2f9db([_0x15616c(0x0,_0x10ea32['Inject'](_0x317786[_0x4373a9(0x14e)])),_0x15616c(0x1,_0x10ea32['Inject'](_0x42f536[_0x4373a9(0x1ba)])),_0x15616c(0x2,_0x10ea32[_0x4373a9(0x17a)](_0x10ea32[_0x4373a9(0x19b)])),_0x15616c(0x3,_0x10ea32['Inject'](_0x10ea32[_0x4373a9(0x148)]))],_0x24ae9a);const _0x3be234='thread-comment-data-source.config',_0xf11ab8={};var _0xb56cbb=Object[_0x4373a9(0x151)],_0x2054dc=(_0x2e5645,_0x408ef8,_0x4bd86b,_0x89b10c)=>{const _0x4d28a6=_0x4373a9;for(var _0x3b20e5=_0x89b10c>0x1?void 0x0:_0x89b10c?_0xb56cbb(_0x408ef8,_0x4bd86b):_0x408ef8,_0x3885ef=_0x2e5645[_0x4d28a6(0x16e)]-0x1,_0x46204f;_0x3885ef>=0x0;_0x3885ef--)(_0x46204f=_0x2e5645[_0x3885ef])&&(_0x3b20e5=_0x46204f(_0x3b20e5)||_0x3b20e5);return _0x3b20e5;},_0x165ba6=(_0x238640,_0x38a573)=>(_0x5a5d05,_0x3677a5)=>_0x38a573(_0x5a5d05,_0x3677a5,_0x238640);function _0x1b7402(_0x2168ef,_0x4c50eb){const _0x219e05=_0x4373a9,_0x196808=_0x2168ef[_0x219e05(0x17c)][0x0];return{..._0x4c50eb,'id':_0x196808[_0x219e05(0x1c4)],'resolved':_0x2168ef[_0x219e05(0x1b9)]===0x1,'dT':_0x13581b(_0x196808[_0x219e05(0x18f)]),'personId':_0x196808[_0x219e05(0x14b)],'threadId':_0x196808[_0x219e05(0x163)]};}function _0x2ce489(_0x2517a6,_0x40f8de,_0x4797f9){const _0x33b244=_0x4373a9;var _0x3a1244,_0x36af60;if(((_0x36af60=(_0x3a1244=_0x2517a6==null?void 0x0:_0x2517a6[_0x33b244(0x17c)])==null?void 0x0:_0x3a1244['length'])!=null?_0x36af60:0x0)>0x0){const _0x45eb27=(_0x117b9b,_0x2be5ab)=>({'id':_0x117b9b['replyId'],'threadId':_0x117b9b[_0x33b244(0x163)],'dT':_0x13581b(_0x117b9b['createTimestamp']),'personId':_0x117b9b[_0x33b244(0x14b)],'resolved':_0x2517a6[_0x33b244(0x1b9)]===_0x218eec[_0x33b244(0x17d)],'unitId':_0x40f8de,'subUnitId':_0x4797f9,'text':JSON[_0x33b244(0x156)](_0x117b9b[_0x33b244(0x186)]),'parentId':_0x2be5ab}),_0x5bc555=_0x45eb27(_0x2517a6[_0x33b244(0x17c)][0x0]);return{..._0x5bc555,'children':_0x2517a6[_0x33b244(0x17c)][_0x33b244(0x182)](0x1)[_0x33b244(0x192)](_0x545e94=>_0x45eb27(_0x545e94,_0x5bc555['id']))};}return null;}let _0x2d1e1d=class{constructor(_0x84b1e9,_0x23077b,_0x414190){const _0x49912c=_0x4373a9;this[_0x49912c(0x17e)]=_0x84b1e9,this[_0x49912c(0x1be)]=_0x23077b,this[_0x49912c(0x15c)]=_0x414190;}async[_0x4373a9(0x1a9)](_0x251b05){const _0x150bc0=_0x4373a9;var _0x4adba0,_0x521b08;const {parentId:_0x1e3dd0,unitId:_0x23a6c0,text:_0x481fbc,threadId:_0x2802cb}=_0x251b05,_0x1d507a=(_0x521b08=(_0x4adba0=_0x481fbc[_0x150bc0(0x169)])==null?void 0x0:_0x4adba0[_0x150bc0(0x1c6)](_0x2eddfe=>_0x2eddfe[_0x150bc0(0x170)]===_0x10ea32[_0x150bc0(0x1b3)][_0x150bc0(0x191)])[_0x150bc0(0x192)](_0x4c6f79=>_0x4c6f79[_0x150bc0(0x177)]))!=null?_0x521b08:[],_0x35df9c=JSON[_0x150bc0(0x150)](_0x481fbc),_0x5600db=(await this[_0x150bc0(0x15c)]['requireSession'](_0x23a6c0))[_0x150bc0(0x16c)]();if(_0x1e3dd0){const _0x24398d={'memberId':_0x5600db,'unitId':_0x23a6c0,'content':_0x35df9c,'mention':_0x1d507a,'threadId':_0x2802cb},_0x2b1079=(await this[_0x150bc0(0x17e)][_0x150bc0(0x179)](_0x150bc0(0x1ae)+_0x23a6c0+'/reply',{'body':_0x24398d}))[_0x150bc0(0x1a5)][_0x150bc0(0x171)];return{..._0x251b05,'id':_0x2b1079[_0x150bc0(0x1c4)],'dT':_0x10ea32['dayjs'](+_0x2b1079[_0x150bc0(0x18f)])['format'](_0x150bc0(0x15a)),'personId':_0x2b1079['userId']};}else{const _0x18f5ac={'memberId':_0x5600db,'unitId':_0x23a6c0,'content':_0x35df9c,'mention':_0x1d507a},_0xf3acbe=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x23a6c0+_0x150bc0(0x19f),{'body':_0x18f5ac});return _0x1b7402(_0xf3acbe[_0x150bc0(0x1a5)][_0x150bc0(0x1c9)],_0x251b05);}}async[_0x4373a9(0x1ac)](_0x3ce1ba){const _0x3fb6b2=_0x4373a9;var _0x3b3ca0,_0x4272fc;const {text:_0x8eb9e7,unitId:_0xa8447c}=_0x3ce1ba,_0xfd590e=(_0x4272fc=(_0x3b3ca0=_0x8eb9e7[_0x3fb6b2(0x169)])==null?void 0x0:_0x3b3ca0[_0x3fb6b2(0x1c6)](_0x7529b9=>_0x7529b9[_0x3fb6b2(0x170)]===_0x10ea32[_0x3fb6b2(0x1b3)][_0x3fb6b2(0x191)])[_0x3fb6b2(0x192)](_0x11e924=>_0x11e924[_0x3fb6b2(0x177)]))!=null?_0x4272fc:[],_0x2b1bbb=JSON['stringify'](_0x8eb9e7),_0x53731d=_0x3ce1ba[_0x3fb6b2(0x163)],_0x181ac0=_0x3ce1ba['id'],_0x1f7557={'memberId':(await this[_0x3fb6b2(0x15c)][_0x3fb6b2(0x1a4)](_0xa8447c))[_0x3fb6b2(0x16c)](),'unitId':_0xa8447c,'threadId':_0x53731d,'mention':_0xfd590e,'content':_0x2b1bbb,'replyId':_0x181ac0},_0x284027=await this['_httpService'][_0x3fb6b2(0x179)](_0x3fb6b2(0x1ae)+_0xa8447c+_0x3fb6b2(0x15b),{'body':_0x1f7557});return!_0x284027['body'][_0x3fb6b2(0x161)]||_0x284027[_0x3fb6b2(0x1a5)][_0x3fb6b2(0x161)]['code']===0x1;}async['resolveComment'](_0x16c9a9){const _0x298efb=_0x4373a9,{unitId:_0x28b88e}=_0x16c9a9,_0x410f40=_0x16c9a9[_0x298efb(0x163)],_0x5326f8={'memberId':this[_0x298efb(0x1be)][_0x298efb(0x167)]()[_0x298efb(0x154)],'unitId':_0x28b88e,'threadId':_0x410f40,'solved':_0x16c9a9[_0x298efb(0x14f)]?_0x218eec[_0x298efb(0x17d)]:_0x218eec[_0x298efb(0x172)]},_0x21d3ba=await this['_httpService'][_0x298efb(0x179)](_0x298efb(0x1ae)+_0x28b88e+_0x298efb(0x180),{'body':_0x5326f8});return!_0x21d3ba[_0x298efb(0x1a5)][_0x298efb(0x161)]||_0x21d3ba['body'][_0x298efb(0x161)][_0x298efb(0x166)]===0x1;}async[_0x4373a9(0x1b6)](_0x31e64d,_0x1c41ff,_0xb3dc1a,_0x1dc124){const _0xbe9d7e=_0x4373a9,_0x415070={'memberId':(await this['_sessionService'][_0xbe9d7e(0x1a4)](_0x31e64d))[_0xbe9d7e(0x16c)](),'threadId':_0xb3dc1a,'replyId':_0x1dc124,'unitId':_0x31e64d},_0x31afba=await this[_0xbe9d7e(0x17e)][_0xbe9d7e(0x179)](_0xbe9d7e(0x1ae)+_0x31e64d+'/delete',{'body':_0x415070});return!_0x31afba[_0xbe9d7e(0x1a5)]['error']||_0x31afba[_0xbe9d7e(0x1a5)][_0xbe9d7e(0x161)][_0xbe9d7e(0x166)]===0x1;}async['listComments'](_0x4b93bb,_0x3aca0f,_0x3b002c){const _0x5b1208=_0x4373a9,_0x3c9cd0={'unitId':_0x4b93bb,'threadId':_0x3b002c},_0x5024c6=await this[_0x5b1208(0x17e)]['post'](_0x5b1208(0x1ae)+_0x4b93bb+_0x5b1208(0x174),{'body':_0x3c9cd0}),_0x2ca616=_0x3b002c['map'](_0x3eb376=>_0x2ce489(_0x5024c6[_0x5b1208(0x1a5)][_0x5b1208(0x1a6)][_0x3eb376],_0x4b93bb,_0x3aca0f))[_0x5b1208(0x1c6)](Boolean);return Object['values'](_0x5024c6['body'][_0x5b1208(0x1a3)])['forEach'](_0x37bc16=>{const _0x40dbef=_0x5b1208;this[_0x40dbef(0x1be)]['addUser'](_0x37bc16);}),_0x2ca616;}[_0x4373a9(0x196)](_0x4a3a8d){const _0x55868a=_0x4373a9;return{'id':_0x4a3a8d['id'],'threadId':_0x4a3a8d[_0x55868a(0x163)],'ref':_0x4a3a8d[_0x55868a(0x194)]};}};_0x2d1e1d=_0x2054dc([_0x165ba6(0x0,_0x10ea32['Inject'](_0x2fcb1d[_0x4373a9(0x18b)])),_0x165ba6(0x1,_0x10ea32[_0x4373a9(0x17a)](_0x10ea32[_0x4373a9(0x19b)])),_0x165ba6(0x2,_0x10ea32[_0x4373a9(0x17a)](_0x317786[_0x4373a9(0x1b2)]))],_0x2d1e1d);var _0x27e748=Object[_0x4373a9(0x151)],_0x4074c9=(_0x4e33fc,_0x313cb8,_0x1738e0,_0xae0f18)=>{const _0x1f785c=_0x4373a9;for(var _0x2c2bd4=_0xae0f18>0x1?void 0x0:_0xae0f18?_0x27e748(_0x313cb8,_0x1738e0):_0x313cb8,_0x41879b=_0x4e33fc[_0x1f785c(0x16e)]-0x1,_0x5a31b8;_0x41879b>=0x0;_0x41879b--)(_0x5a31b8=_0x4e33fc[_0x41879b])&&(_0x2c2bd4=_0x5a31b8(_0x2c2bd4)||_0x2c2bd4);return _0x2c2bd4;},_0x201909=(_0xea92e,_0x58f383)=>(_0x36ce65,_0xd80b81)=>_0x58f383(_0x36ce65,_0xd80b81,_0xea92e);let _0x42d057=class extends _0x10ea32[_0x4373a9(0x147)]{constructor(_0x37ceff,_0x2f1061){const _0x4148ae=_0x4373a9;super(),this['_threadCommentDataSourceService']=_0x37ceff,this[_0x4148ae(0x193)]=_0x2f1061,this[_0x4148ae(0x187)]();}['_initDataSource'](){const _0xfba3da=_0x4373a9;this['_threadCommentDataSourceService'][_0xfba3da(0x1bb)]=this[_0xfba3da(0x193)],this['_threadCommentDataSourceService'][_0xfba3da(0x19a)]=!0x1;}};_0x42d057=_0x4074c9([_0x201909(0x0,_0x42f536['IThreadCommentDataSourceService']),_0x201909(0x1,_0x10ea32[_0x4373a9(0x17a)](_0x2d1e1d))],_0x42d057);var _0x39907a=Object[_0x4373a9(0x1c7)],_0x3cee3f=Object[_0x4373a9(0x151)],_0x390b02=(_0x1a569b,_0x1e284f,_0x57e5eb)=>_0x1e284f in _0x1a569b?_0x39907a(_0x1a569b,_0x1e284f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x57e5eb}):_0x1a569b[_0x1e284f]=_0x57e5eb,_0x504bb6=(_0x4af3e7,_0x3ccb41,_0x587998,_0x43e63b)=>{for(var _0x10afdd=_0x43e63b>0x1?void 0x0:_0x43e63b?_0x3cee3f(_0x3ccb41,_0x587998):_0x3ccb41,_0x22c556=_0x4af3e7['length']-0x1,_0x45edea;_0x22c556>=0x0;_0x22c556--)(_0x45edea=_0x4af3e7[_0x22c556])&&(_0x10afdd=_0x45edea(_0x10afdd)||_0x10afdd);return _0x10afdd;},_0x3fc6b3=(_0xacfae,_0x1c44f8)=>(_0x428c60,_0x5a3a3f)=>_0x1c44f8(_0x428c60,_0x5a3a3f,_0xacfae),_0x2d0242=(_0x33f61a,_0xf6b1aa,_0x2bdbfa)=>_0x390b02(_0x33f61a,typeof _0xf6b1aa!='symbol'?_0xf6b1aa+'':_0xf6b1aa,_0x2bdbfa);_0x1e705a[_0x4373a9(0x199)]=class extends _0x10ea32[_0x4373a9(0x17f)]{constructor(_0x462523=_0xf11ab8,_0x2d700c,_0x2b386e){const _0x117748=_0x4373a9;super(),this[_0x117748(0x15e)]=_0x462523,this['_injector']=_0x2d700c,this[_0x117748(0x183)]=_0x2b386e;const {..._0x2780c8}=_0x10ea32[_0x117748(0x16b)]({},_0xf11ab8,this['_config']);this[_0x117748(0x183)][_0x117748(0x1a0)](_0x3be234,_0x2780c8);}[_0x4373a9(0x16a)](){const _0x4bbe70=_0x4373a9;[[_0x2d1e1d],[_0x42d057],[_0x24ae9a]][_0x4bbe70(0x18e)](_0x2cd11d=>{this['_injector']['add'](_0x2cd11d);});}[_0x4373a9(0x178)](){const _0x2f8458=_0x4373a9;this[_0x2f8458(0x1c0)]['get'](_0x42d057),this[_0x2f8458(0x1c0)][_0x2f8458(0x1b1)](_0x24ae9a);}},_0x2d0242(_0x1e705a[_0x4373a9(0x199)],_0x4373a9(0x1a1),_0x1ba1e2),_0x2d0242(_0x1e705a[_0x4373a9(0x199)],_0x4373a9(0x153),_0x10ea32[_0x4373a9(0x16d)][_0x4373a9(0x158)]),_0x1e705a['UniverThreadCommentDataSourcePlugin']=_0x504bb6([_0x10ea32[_0x4373a9(0x190)](_0x1a52ab[_0x4373a9(0x164)],_0x317786[_0x4373a9(0x160)],_0x4df1b5[_0x4373a9(0x155)]),_0x3fc6b3(0x1,_0x10ea32[_0x4373a9(0x17a)](_0x10ea32[_0x4373a9(0x148)])),_0x3fc6b3(0x2,_0x10ea32[_0x4373a9(0x1ad)])],_0x1e705a[_0x4373a9(0x199)]),Object[_0x4373a9(0x1c7)](_0x1e705a,Symbol[_0x4373a9(0x1b8)],{'value':_0x4373a9(0x1bf)});}));function _0x4de0(_0x31e11e,_0x4d921e){_0x31e11e=_0x31e11e-0x147;const _0x51cc64=_0x51cc();let _0x4de091=_0x51cc64[_0x31e11e];return _0x4de091;}function _0x51cc(){const _0x17d8b5=['format','customRanges','onStarting','merge','getMemberID','UniverInstanceType','length','UniverNetwork','rangeType','reply','OpenOrReOpen','commentUpdate$','/list','@univerjs/thread-comment','find','rangeId','onReady','post','Inject','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','Solved','_httpService','Plugin','/solved','getUser','slice','_configService','UNRECOGNIZED','46422bFRCXg','content','_initDataSource','addUser','rxjs','subscribe','HTTPService','payload','user','forEach','createTimestamp','DependentOn','COMMENT','map','_threadCommentDataSource','ref','amd','saveCommentToSnapshot','@univerjs/core','@univerjs-pro/license','UniverThreadCommentDataSourcePlugin','syncUpdateMutationToColla','UserManagerService','5569740ppOIsl','dayjs','5YZSmOd','/add','setConfig','pluginName','getUnit','users','requireSession','body','comments','Delete','UniverProLicense','addComment','610984UBeKmh','UniverProThreadCommentDatasource','updateComment','IConfigService','/universer-api/comment/unit/','Add','/universer-api/user/list','get','CollaborationSessionService','CustomRangeType','UniverProCollaborationClient','_threadCommentModel','deleteComment','1169smQVVX','toStringTag','solved','ThreadCommentModel','dataSource','parentId','981372YCXdkq','_userService','Module','_injector','1420NrDzQw','9512AiRFFu','object','replyId','_init','filter','defineProperty','Solve','comment','pipe','Disposable','Injector','2532540yPdYzG','root','userId','size','resolveComment','CommentService','resolved','stringify','getOwnPropertyDescriptor','Edit','type','userID','UniverLicensePlugin','parse','Unknown','UNIVER_UNKNOWN','disposeWithMe','YYYY/MM/DD\x20HH:mm','/edit','_sessionService','UniverCore','_config','Reply','UniverCollaborationClientPlugin','error','1122352QePCru','threadId','UniverThreadCommentUIPlugin','delete','code','getCurrentUser'];_0x51cc=function(){return _0x17d8b5;};return _0x51cc();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0-insiders.20260302-b09f1e4",
|
|
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.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.15.5",
|
|
52
|
-
"@univerjs/thread-comment": "0.15.5",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.16.0-insiders.20260302-b09f1e4",
|
|
49
|
+
"@univerjs-pro/license": "0.16.0-insiders.20260302-b09f1e4",
|
|
50
|
+
"@univerjs/core": "0.16.0-insiders.20260302-b09f1e4",
|
|
53
51
|
"@univerjs/protocol": "0.1.48",
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/network": "0.16.0-insiders.20260302-b09f1e4",
|
|
53
|
+
"@univerjs/thread-comment": "0.16.0-insiders.20260302-b09f1e4",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.16.0-insiders.20260302-b09f1e4"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.1",
|
|
60
60
|
"vitest": "^4.0.18",
|
|
61
|
-
"@univerjs-infra/shared": "0.
|
|
61
|
+
"@univerjs-infra/shared": "0.16.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|