@univerjs-pro/thread-comment-datasource 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x5a3c69=_0x140b;(function(_0x9012e,_0x204477){const _0x36e73f=_0x140b,_0x507a66=_0x9012e();while(!![]){try{const _0x10dafb=-parseInt(_0x36e73f(0x146))/0x1*(-parseInt(_0x36e73f(0x15a))/0x2)+-parseInt(_0x36e73f(0x183))/0x3*(-parseInt(_0x36e73f(0x196))/0x4)+-parseInt(_0x36e73f(0x1b5))/0x5+-parseInt(_0x36e73f(0x16c))/0x6*(-parseInt(_0x36e73f(0x1ae))/0x7)+-parseInt(_0x36e73f(0x187))/0x8+parseInt(_0x36e73f(0x172))/0x9+parseInt(_0x36e73f(0x149))/0xa*(-parseInt(_0x36e73f(0x14e))/0xb);if(_0x10dafb===_0x204477)break;else _0x507a66['push'](_0x507a66['shift']());}catch(_0x41bf0f){_0x507a66['push'](_0x507a66['shift']());}}}(_0x44a1,0x4c4fb));Object[_0x5a3c69(0x142)](exports,Symbol['toStringTag'],{'value':_0x5a3c69(0x1b6)});const b=require(_0x5a3c69(0x152)),T=require(_0x5a3c69(0x164)),c=require(_0x5a3c69(0x1a1)),j=require(_0x5a3c69(0x169)),M=require(_0x5a3c69(0x16d)),w=require(_0x5a3c69(0x153)),P=require(_0x5a3c69(0x1a4)),U=_0x5a3c69(0x14c);var I=(_0x5613f4=>(_0x5613f4[_0x5613f4[_0x5a3c69(0x168)]=0x0]=_0x5a3c69(0x168),_0x5613f4[_0x5613f4[_0x5a3c69(0x1ac)]=0x1]=_0x5a3c69(0x1ac),_0x5613f4[_0x5613f4[_0x5a3c69(0x1a3)]=-0x1]=_0x5a3c69(0x1a3),_0x5613f4))(I||{}),v=(_0x25dc11=>(_0x25dc11[_0x25dc11[_0x5a3c69(0x16b)]=0x0]=_0x5a3c69(0x16b),_0x25dc11[_0x25dc11[_0x5a3c69(0x14f)]=0x1]=_0x5a3c69(0x14f),_0x25dc11[_0x25dc11[_0x5a3c69(0x148)]=0x2]='Reply',_0x25dc11[_0x25dc11[_0x5a3c69(0x18b)]=0x3]=_0x5a3c69(0x18b),_0x25dc11[_0x25dc11[_0x5a3c69(0x15b)]=0x4]=_0x5a3c69(0x15b),_0x25dc11[_0x25dc11[_0x5a3c69(0x190)]=0x5]=_0x5a3c69(0x190),_0x25dc11[_0x25dc11[_0x5a3c69(0x1a3)]=-0x1]=_0x5a3c69(0x1a3),_0x25dc11))(v||{});function _0x140b(_0x1bfa92,_0x4a4b39){const _0x44a1b6=_0x44a1();return _0x140b=function(_0x140baa,_0x344645){_0x140baa=_0x140baa-0x137;let _0x433faf=_0x44a1b6[_0x140baa];return _0x433faf;},_0x140b(_0x1bfa92,_0x4a4b39);}const f=_0x4e7c01=>c['dayjs'](new Date(+_0x4e7c01))[_0x5a3c69(0x155)](_0x5a3c69(0x1b4)),R=async(_0x2da711,_0x4818d1)=>{const _0x6bc081=_0x5a3c69,_0x5ed615=_0x2da711[_0x6bc081(0x178)](c[_0x6bc081(0x15f)]),_0x3bb68f=_0x2da711['get'](P[_0x6bc081(0x15d)]);_0x4818d1[_0x6bc081(0x199)](_0x3b299e=>{const _0x2f7cca=_0x6bc081;_0x5ed615[_0x2f7cca(0x19e)](_0x3b299e)&&_0x4818d1[_0x2f7cca(0x163)](_0x3b299e);}),_0x4818d1[_0x6bc081(0x197)]&&(await _0x3bb68f[_0x6bc081(0x178)](_0x6bc081(0x1b1),{'params':{'userIDs':[..._0x4818d1]}}))[_0x6bc081(0x175)][_0x6bc081(0x160)][_0x6bc081(0x199)](_0x612d55=>{_0x612d55&&_0x5ed615['addUser'](_0x612d55);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x35898e,_0x24bb16,_0x83c1d0,_0x3dd96c)=>{const _0x2cc4f0=_0x5a3c69;for(var _0x514db0=_0x3dd96c>0x1?void 0x0:_0x3dd96c?$(_0x24bb16,_0x83c1d0):_0x24bb16,_0x34e430=_0x35898e[_0x2cc4f0(0x1b9)]-0x1,_0x77ef43;_0x34e430>=0x0;_0x34e430--)(_0x77ef43=_0x35898e[_0x34e430])&&(_0x514db0=_0x77ef43(_0x514db0)||_0x514db0);return _0x514db0;},S=(_0x155c37,_0x22d6ac)=>(_0x51bdfd,_0x63127c)=>_0x22d6ac(_0x51bdfd,_0x63127c,_0x155c37);function _0x44a1(){const _0x17d45d=['1978587jKpDpD','getMemberID','pipe','body','comments','rangeId','get','replyId','addComment','dataSource','type','getComment','_injector','find','saveCommentToSnapshot','add','/reply','92310jdhjIF','CommentService','_commentService','CustomRangeType','4419120mYmKON','createTimestamp','resolveComment','symbol','Edit','dayjs','setConfig','_userService','personId','Solve','merge','/delete','rangeType','onReady','getOwnPropertyDescriptor','48KwYzEF','size','disposeWithMe','forEach','userId','subscribe','UniverThreadCommentDataSourcePlugin','solved','getUser','/add','replies','@univerjs/core','slice','UNRECOGNIZED','@univerjs/network','ThreadCommentModel','commentUpdate$','Plugin','onStarting','UniverInstanceType','_initUserSync','COMMENT','Solved','payload','2472428lAjaRM','_threadCommentDataSource','_configService','/universer-api/user/list','deleteComment','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','2229515NmAtYU','Module','userID','user','length','threadId','parse','Injector','addUser','IConfigService','UniverLicensePlugin','getUnit','UniverThreadCommentUIPlugin','comment','post','resolved','updateComment','defineProperty','/universer-api/comment/unit/','Inject','UNIVER_UNKNOWN','2158jToTEr','stringify','Reply','50QyCSHa','syncUpdateMutationToColla','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','228855iligto','Add','code','content','@univerjs-pro/collaboration-client','rxjs','values','format','error','_config','_threadCommentModel','map','438DTWEkZ','Delete','_init','HTTPService','/edit','UserManagerService','users','customRanges','CollaborationSessionService','delete','@univerjs-pro/license','unitId','_initDataSource','requireSession','OpenOrReOpen','@univerjs/thread-comment-ui','Disposable','Unknown','6WjsdTP','@univerjs/thread-comment','filter','_threadCommentDataSourceService','_httpService','/list'];_0x44a1=function(){return _0x17d45d;};return _0x44a1();}let p=class extends c[_0x5a3c69(0x16a)]{constructor(_0x230a78,_0x247e51,_0x107d1f,_0x59ad24){const _0x14c1c0=_0x5a3c69;super(),this['_commentService']=_0x230a78,this['_threadCommentModel']=_0x247e51,this[_0x14c1c0(0x18e)]=_0x107d1f,this['_injector']=_0x59ad24,this[_0x14c1c0(0x15c)](),this[_0x14c1c0(0x1aa)]();}[_0x5a3c69(0x1aa)](){const _0x45fab4=_0x5a3c69;this[_0x45fab4(0x198)](this[_0x45fab4(0x158)][_0x45fab4(0x1a6)][_0x45fab4(0x174)](w['bufferTime'](0x10))[_0x45fab4(0x19b)](_0x2ec14e=>{const _0x440dd1=_0x45fab4,_0x1ee88d=new Set();_0x2ec14e['forEach'](_0x50b414=>{const _0x4e94a4=_0x140b;switch(_0x50b414[_0x4e94a4(0x17c)]){case _0x4e94a4(0x181):{const _0x5a1663=_0x50b414[_0x4e94a4(0x1ad)][_0x4e94a4(0x18f)];_0x1ee88d[_0x4e94a4(0x181)](_0x5a1663);break;}}}),R(this[_0x440dd1(0x17e)],_0x1ee88d);}));}[_0x5a3c69(0x15c)](){const _0x12431d=_0x5a3c69;this[_0x12431d(0x198)](this[_0x12431d(0x185)][_0x12431d(0x1a6)][_0x12431d(0x19b)](async _0xb45c68=>{const _0x4a2d0c=_0x12431d;var _0x5daba8,_0x4b67a5,_0x3340ef,_0xf98eed;const _0x32b7c5=(_0x5daba8=this['_threadCommentModel'][_0x4a2d0c(0x13c)](_0xb45c68[_0x4a2d0c(0x165)])['find'](_0x10192e=>_0x10192e[_0x4a2d0c(0x1ba)]===_0xb45c68[_0x4a2d0c(0x1ba)]))==null?void 0x0:_0x5daba8['root'];if(!_0x32b7c5)return;const {unitId:_0x519560,subUnitId:_0x405374}=_0x32b7c5;switch(_0xb45c68[_0x4a2d0c(0x1b8)]&&this[_0x4a2d0c(0x18e)][_0x4a2d0c(0x139)](_0xb45c68[_0x4a2d0c(0x1b8)]),_0xb45c68[_0x4a2d0c(0x17c)]){case v['Add']:break;case v[_0x4a2d0c(0x148)]:{this[_0x4a2d0c(0x158)][_0x4a2d0c(0x17a)](_0x519560,_0x405374,{'unitId':_0x519560,'subUnitId':_0x405374,'ref':'','id':_0xb45c68[_0x4a2d0c(0x179)],'dT':f(+_0xb45c68[_0x4a2d0c(0x188)]),'threadId':_0xb45c68[_0x4a2d0c(0x1ba)],'personId':(_0x3340ef=(_0x4b67a5=_0xb45c68['user'])==null?void 0x0:_0x4b67a5[_0x4a2d0c(0x1b7)])!=null?_0x3340ef:_0xb45c68[_0x4a2d0c(0x19a)],'text':JSON[_0x4a2d0c(0x137)](_0xb45c68[_0x4a2d0c(0x151)]),'parentId':_0x32b7c5['id']});break;}case v[_0x4a2d0c(0x15b)]:{const _0x1a6c7e=this[_0x4a2d0c(0x158)][_0x4a2d0c(0x17d)](_0x519560,_0x405374,_0xb45c68[_0x4a2d0c(0x179)]);_0x1a6c7e&&_0x1a6c7e['parentId']&&this[_0x4a2d0c(0x158)][_0x4a2d0c(0x1b2)](_0x519560,_0x405374,_0xb45c68[_0x4a2d0c(0x179)]);break;}case v['Edit']:{this[_0x4a2d0c(0x158)]['updateComment'](_0x519560,_0x405374,{'commentId':_0xb45c68['replyId'],'text':JSON[_0x4a2d0c(0x137)](_0xb45c68[_0x4a2d0c(0x151)])});break;}case v['Solve']:{const _0x131cc2=(_0xf98eed=this[_0x4a2d0c(0x158)][_0x4a2d0c(0x13c)](_0xb45c68[_0x4a2d0c(0x165)])[_0x4a2d0c(0x17f)](_0x41c1f1=>_0x41c1f1[_0x4a2d0c(0x1ba)]===_0xb45c68[_0x4a2d0c(0x1ba)]))==null?void 0x0:_0xf98eed['root'];_0x131cc2&&this['_threadCommentModel'][_0x4a2d0c(0x189)](_0x519560,_0x405374,_0x131cc2['id'],_0xb45c68[_0x4a2d0c(0x19d)]===I[_0x4a2d0c(0x1ac)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x5a3c69(0x184)])),S(0x1,c[_0x5a3c69(0x144)](M[_0x5a3c69(0x1a5)])),S(0x2,c[_0x5a3c69(0x144)](c[_0x5a3c69(0x15f)])),S(0x3,c['Inject'](c[_0x5a3c69(0x138)]))],p);const q=_0x5a3c69(0x1b3),D={};var A=Object[_0x5a3c69(0x195)],x=(_0x1914ba,_0x355a4c,_0x4b1bf4,_0x2bd67e)=>{const _0x4ab245=_0x5a3c69;for(var _0x2df12e=_0x2bd67e>0x1?void 0x0:_0x2bd67e?A(_0x355a4c,_0x4b1bf4):_0x355a4c,_0x41d072=_0x1914ba[_0x4ab245(0x1b9)]-0x1,_0x135dee;_0x41d072>=0x0;_0x41d072--)(_0x135dee=_0x1914ba[_0x41d072])&&(_0x2df12e=_0x135dee(_0x2df12e)||_0x2df12e);return _0x2df12e;},_=(_0x35d003,_0x4b7c0f)=>(_0x227a18,_0x564a25)=>_0x4b7c0f(_0x227a18,_0x564a25,_0x35d003);function Y(_0x296a60,_0x64cd8e){const _0xb8db59=_0x5a3c69,_0x2ac498=_0x296a60['replies'][0x0];return{..._0x64cd8e,'id':_0x2ac498[_0xb8db59(0x179)],'resolved':_0x296a60['solved']===0x1,'dT':f(_0x2ac498[_0xb8db59(0x188)]),'personId':_0x2ac498['userId'],'threadId':_0x2ac498[_0xb8db59(0x1ba)]};}function G(_0x56f3c5,_0x3a4ce7,_0x379027){const _0x2902db=_0x5a3c69;var _0x25c30f,_0x274656;if(((_0x274656=(_0x25c30f=_0x56f3c5==null?void 0x0:_0x56f3c5[_0x2902db(0x1a0)])==null?void 0x0:_0x25c30f['length'])!=null?_0x274656:0x0)>0x0){const _0x21ecc1=(_0x5c7676,_0x4515b6)=>({'id':_0x5c7676[_0x2902db(0x179)],'threadId':_0x5c7676[_0x2902db(0x1ba)],'dT':f(_0x5c7676[_0x2902db(0x188)]),'personId':_0x5c7676['userId'],'resolved':_0x56f3c5[_0x2902db(0x19d)]===I['Solved'],'unitId':_0x3a4ce7,'subUnitId':_0x379027,'text':JSON['parse'](_0x5c7676[_0x2902db(0x151)]),'parentId':_0x4515b6}),_0x2ad800=_0x21ecc1(_0x56f3c5['replies'][0x0]);return{..._0x2ad800,'children':_0x56f3c5[_0x2902db(0x1a0)][_0x2902db(0x1a2)](0x1)[_0x2902db(0x159)](_0x33ecdc=>_0x21ecc1(_0x33ecdc,_0x2ad800['id']))};}return null;}let g=class{constructor(_0xdac1f,_0x53a2ed,_0x394c78,_0x4dc251){const _0x27e153=_0x5a3c69;this[_0x27e153(0x170)]=_0xdac1f,this['_userService']=_0x53a2ed,this['_sessionService']=_0x394c78,this[_0x27e153(0x17e)]=_0x4dc251;}async[_0x5a3c69(0x17a)](_0x41eac4){const _0x1a286f=_0x5a3c69;var _0x564753,_0x3a472d;const {parentId:_0x57d912,unitId:_0x42403f,text:_0x52ec1d,threadId:_0x2fc566}=_0x41eac4,_0x46083b=(_0x3a472d=(_0x564753=_0x52ec1d[_0x1a286f(0x161)])==null?void 0x0:_0x564753['filter'](_0x3f9187=>_0x3f9187[_0x1a286f(0x193)]===c[_0x1a286f(0x186)][_0x1a286f(0x1ab)])[_0x1a286f(0x159)](_0x271d42=>_0x271d42[_0x1a286f(0x177)]))!=null?_0x3a472d:[],_0x6129a7=JSON[_0x1a286f(0x147)](_0x52ec1d),_0x25a5c4=(await this[_0x1a286f(0x14b)]['requireSession'](_0x42403f))['getMemberID']();if(_0x57d912){const _0x590163={'memberId':_0x25a5c4,'unitId':_0x42403f,'content':_0x6129a7,'mention':_0x46083b,'threadId':_0x2fc566},_0x5c3823=(await this[_0x1a286f(0x170)]['post'](_0x1a286f(0x143)+_0x42403f+_0x1a286f(0x182),{'body':_0x590163}))[_0x1a286f(0x175)]['reply'];return{..._0x41eac4,'id':_0x5c3823[_0x1a286f(0x179)],'dT':c[_0x1a286f(0x18c)](+_0x5c3823[_0x1a286f(0x188)])[_0x1a286f(0x155)](_0x1a286f(0x1b4)),'personId':_0x5c3823[_0x1a286f(0x19a)]};}else{const _0x515097={'memberId':_0x25a5c4,'unitId':_0x42403f,'content':_0x6129a7,'mention':_0x46083b},_0x5b0cc3=await this[_0x1a286f(0x170)][_0x1a286f(0x13f)]('/universer-api/comment/unit/'+_0x42403f+_0x1a286f(0x19f),{'body':_0x515097});return Y(_0x5b0cc3[_0x1a286f(0x175)][_0x1a286f(0x13e)],_0x41eac4);}}async[_0x5a3c69(0x141)](_0x5f0576){const _0x3d44f4=_0x5a3c69;var _0x287cdb,_0x718189;const {text:_0xd1f03,unitId:_0x4ccb6c}=_0x5f0576,_0x5c0ab0=(_0x718189=(_0x287cdb=_0xd1f03[_0x3d44f4(0x161)])==null?void 0x0:_0x287cdb[_0x3d44f4(0x16e)](_0x39e58b=>_0x39e58b[_0x3d44f4(0x193)]===c[_0x3d44f4(0x186)][_0x3d44f4(0x1ab)])['map'](_0x1b3659=>_0x1b3659[_0x3d44f4(0x177)]))!=null?_0x718189:[],_0x12b1f3=JSON['stringify'](_0xd1f03),_0x24a8a4=_0x5f0576[_0x3d44f4(0x1ba)],_0x5e0d7d=_0x5f0576['id'],_0x64dfac={'memberId':(await this['_sessionService'][_0x3d44f4(0x167)](_0x4ccb6c))['getMemberID'](),'unitId':_0x4ccb6c,'threadId':_0x24a8a4,'mention':_0x5c0ab0,'content':_0x12b1f3,'replyId':_0x5e0d7d},_0x14dfc8=await this[_0x3d44f4(0x170)][_0x3d44f4(0x13f)](_0x3d44f4(0x143)+_0x4ccb6c+_0x3d44f4(0x15e),{'body':_0x64dfac});return!_0x14dfc8[_0x3d44f4(0x175)]['error']||_0x14dfc8[_0x3d44f4(0x175)][_0x3d44f4(0x156)]['code']===0x1;}async[_0x5a3c69(0x189)](_0x443223){const _0x7f5f4c=_0x5a3c69,{unitId:_0x53736a}=_0x443223,_0x342f13=_0x443223[_0x7f5f4c(0x1ba)],_0x43eb0c={'memberId':this[_0x7f5f4c(0x18e)][_0x7f5f4c(0x14d)]()[_0x7f5f4c(0x1b7)],'unitId':_0x53736a,'threadId':_0x342f13,'solved':_0x443223[_0x7f5f4c(0x140)]?I['Solved']:I[_0x7f5f4c(0x168)]},_0xe447d3=await this[_0x7f5f4c(0x170)]['post']('/universer-api/comment/unit/'+_0x53736a+'/solved',{'body':_0x43eb0c});return!_0xe447d3[_0x7f5f4c(0x175)][_0x7f5f4c(0x156)]||_0xe447d3[_0x7f5f4c(0x175)][_0x7f5f4c(0x156)][_0x7f5f4c(0x150)]===0x1;}async[_0x5a3c69(0x1b2)](_0x2cb015,_0x45d1cc,_0x599693,_0x2516e0){const _0x57d02e=_0x5a3c69,_0x25f0f7={'memberId':(await this[_0x57d02e(0x14b)]['requireSession'](_0x2cb015))[_0x57d02e(0x173)](),'threadId':_0x599693,'replyId':_0x2516e0,'unitId':_0x2cb015},_0x4ff191=await this[_0x57d02e(0x170)]['post'](_0x57d02e(0x143)+_0x2cb015+_0x57d02e(0x192),{'body':_0x25f0f7});return!_0x4ff191['body'][_0x57d02e(0x156)]||_0x4ff191[_0x57d02e(0x175)]['error'][_0x57d02e(0x150)]===0x1;}async['listComments'](_0x17bc2f,_0x5df002,_0x4eabc1){const _0x1afb95=_0x5a3c69,_0x540399={'unitId':_0x17bc2f,'threadId':_0x4eabc1},_0x47c451=await this[_0x1afb95(0x170)][_0x1afb95(0x13f)]('/universer-api/comment/unit/'+_0x17bc2f+_0x1afb95(0x171),{'body':_0x540399}),_0x33e5f3=_0x4eabc1[_0x1afb95(0x159)](_0x1b1db3=>G(_0x47c451['body'][_0x1afb95(0x176)][_0x1b1db3],_0x17bc2f,_0x5df002))[_0x1afb95(0x16e)](Boolean);return Object[_0x1afb95(0x154)](_0x47c451[_0x1afb95(0x175)][_0x1afb95(0x160)])['forEach'](_0x29a291=>{const _0x2b7c12=_0x1afb95;this[_0x2b7c12(0x18e)][_0x2b7c12(0x139)](_0x29a291);}),_0x33e5f3;}[_0x5a3c69(0x180)](_0x31caeb){return{'id':_0x31caeb['id'],'threadId':_0x31caeb['threadId'],'ref':_0x31caeb['ref']};}};g=x([_(0x0,c[_0x5a3c69(0x144)](P['HTTPService'])),_(0x1,c[_0x5a3c69(0x144)](c[_0x5a3c69(0x15f)])),_(0x2,c[_0x5a3c69(0x144)](b[_0x5a3c69(0x162)])),_(0x3,c['Inject'](c[_0x5a3c69(0x138)]))],g);var H=Object[_0x5a3c69(0x195)],J=(_0x40bbe8,_0x5521d0,_0x2042db,_0x531283)=>{const _0x33d6ee=_0x5a3c69;for(var _0x5140b1=_0x531283>0x1?void 0x0:_0x531283?H(_0x5521d0,_0x2042db):_0x5521d0,_0x530bf0=_0x40bbe8[_0x33d6ee(0x1b9)]-0x1,_0x3001c2;_0x530bf0>=0x0;_0x530bf0--)(_0x3001c2=_0x40bbe8[_0x530bf0])&&(_0x5140b1=_0x3001c2(_0x5140b1)||_0x5140b1);return _0x5140b1;},y=(_0x2dc495,_0x4f80cd)=>(_0x8c703b,_0xb9ded0)=>_0x4f80cd(_0x8c703b,_0xb9ded0,_0x2dc495);let C=class extends c[_0x5a3c69(0x16a)]{constructor(_0x195b02,_0x18d848){const _0x16baf0=_0x5a3c69;super(),this[_0x16baf0(0x16f)]=_0x195b02,this[_0x16baf0(0x1af)]=_0x18d848,this[_0x16baf0(0x166)]();}[_0x5a3c69(0x166)](){const _0x128821=_0x5a3c69;this[_0x128821(0x16f)][_0x128821(0x17b)]=this[_0x128821(0x1af)],this[_0x128821(0x16f)][_0x128821(0x14a)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x5a3c69(0x142)],L=Object[_0x5a3c69(0x195)],Z=(_0x14e2f7,_0x411723,_0x2c3e00)=>_0x411723 in _0x14e2f7?F(_0x14e2f7,_0x411723,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c3e00}):_0x14e2f7[_0x411723]=_0x2c3e00,W=(_0x443807,_0x5baa14,_0x61a9e,_0x538994)=>{for(var _0x58f92e=_0x538994>0x1?void 0x0:_0x538994?L(_0x5baa14,_0x61a9e):_0x5baa14,_0x1d45b2=_0x443807['length']-0x1,_0x19d1ee;_0x1d45b2>=0x0;_0x1d45b2--)(_0x19d1ee=_0x443807[_0x1d45b2])&&(_0x58f92e=_0x19d1ee(_0x58f92e)||_0x58f92e);return _0x58f92e;},O=(_0x29d310,_0x144710)=>(_0x3c5370,_0x36ddfe)=>_0x144710(_0x3c5370,_0x36ddfe,_0x29d310),N=(_0x195bf6,_0x145681,_0x31f596)=>Z(_0x195bf6,typeof _0x145681!=_0x5a3c69(0x18a)?_0x145681+'':_0x145681,_0x31f596);exports[_0x5a3c69(0x19c)]=class extends c[_0x5a3c69(0x1a7)]{constructor(_0x59b77f=D,_0x169bab,_0x40b0be){const _0x52de6c=_0x5a3c69;super(),this[_0x52de6c(0x157)]=_0x59b77f,this[_0x52de6c(0x17e)]=_0x169bab,this[_0x52de6c(0x1b0)]=_0x40b0be;const {..._0x466abc}=c[_0x52de6c(0x191)]({},D,this['_config']);this[_0x52de6c(0x1b0)][_0x52de6c(0x18d)](q,_0x466abc);}[_0x5a3c69(0x1a8)](){const _0x51507e=_0x5a3c69;[[g],[C],[p]][_0x51507e(0x199)](_0x38429e=>{const _0x142474=_0x51507e;this[_0x142474(0x17e)][_0x142474(0x181)](_0x38429e);});}[_0x5a3c69(0x194)](){const _0x15a9e3=_0x5a3c69;this[_0x15a9e3(0x17e)][_0x15a9e3(0x178)](C),this[_0x15a9e3(0x17e)][_0x15a9e3(0x178)](p);}},N(exports[_0x5a3c69(0x19c)],'pluginName',U),N(exports[_0x5a3c69(0x19c)],_0x5a3c69(0x17c),c[_0x5a3c69(0x1a9)][_0x5a3c69(0x145)]),exports[_0x5a3c69(0x19c)]=W([c['DependentOn'](j[_0x5a3c69(0x13d)],b['UniverCollaborationClientPlugin'],T[_0x5a3c69(0x13b)]),O(0x1,c[_0x5a3c69(0x144)](c['Injector'])),O(0x2,c[_0x5a3c69(0x13a)])],exports[_0x5a3c69(0x19c)]);
|
|
1
|
+
'use strict';const _0x24ddea=_0x4779;(function(_0x27e2f2,_0x9e0fa3){const _0x320a03=_0x4779,_0x401b8b=_0x27e2f2();while(!![]){try{const _0x2d5556=-parseInt(_0x320a03(0xd0))/0x1+parseInt(_0x320a03(0xca))/0x2*(-parseInt(_0x320a03(0x97))/0x3)+-parseInt(_0x320a03(0xba))/0x4*(parseInt(_0x320a03(0xf1))/0x5)+parseInt(_0x320a03(0x80))/0x6*(-parseInt(_0x320a03(0xa7))/0x7)+-parseInt(_0x320a03(0xb0))/0x8*(parseInt(_0x320a03(0x8e))/0x9)+-parseInt(_0x320a03(0xe2))/0xa*(parseInt(_0x320a03(0x8a))/0xb)+parseInt(_0x320a03(0xef))/0xc;if(_0x2d5556===_0x9e0fa3)break;else _0x401b8b['push'](_0x401b8b['shift']());}catch(_0xbc85b1){_0x401b8b['push'](_0x401b8b['shift']());}}}(_0x225e,0xe31f2));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x24ddea(0x84)});const b=require(_0x24ddea(0xa1)),T=require(_0x24ddea(0xd9)),c=require(_0x24ddea(0x8b)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x24ddea(0x77)),P=require('@univerjs/network'),U=_0x24ddea(0xb3);var I=(_0x1b0785=>(_0x1b0785[_0x1b0785[_0x24ddea(0x93)]=0x0]='OpenOrReOpen',_0x1b0785[_0x1b0785['Solved']=0x1]=_0x24ddea(0x89),_0x1b0785[_0x1b0785[_0x24ddea(0xee)]=-0x1]='UNRECOGNIZED',_0x1b0785))(I||{}),v=(_0x27064a=>(_0x27064a[_0x27064a[_0x24ddea(0xec)]=0x0]=_0x24ddea(0xec),_0x27064a[_0x27064a[_0x24ddea(0x98)]=0x1]=_0x24ddea(0x98),_0x27064a[_0x27064a['Reply']=0x2]=_0x24ddea(0xab),_0x27064a[_0x27064a[_0x24ddea(0x7c)]=0x3]='Edit',_0x27064a[_0x27064a['Delete']=0x4]=_0x24ddea(0x7a),_0x27064a[_0x27064a[_0x24ddea(0xad)]=0x5]=_0x24ddea(0xad),_0x27064a[_0x27064a[_0x24ddea(0xee)]=-0x1]=_0x24ddea(0xee),_0x27064a))(v||{});const f=_0x4e1b1f=>c[_0x24ddea(0xbb)](new Date(+_0x4e1b1f))['format'](_0x24ddea(0xc7)),R=async(_0x4c1c1c,_0x5e97ad)=>{const _0x195404=_0x24ddea,_0x2b251b=_0x4c1c1c['get'](c[_0x195404(0xb6)]),_0x2f40bc=_0x4c1c1c['get'](P[_0x195404(0x82)]);_0x5e97ad[_0x195404(0xd5)](_0x4144d1=>{const _0x2af893=_0x195404;_0x2b251b[_0x2af893(0x7b)](_0x4144d1)&&_0x5e97ad[_0x2af893(0xc9)](_0x4144d1);}),_0x5e97ad['size']&&(await _0x2f40bc['get'](_0x195404(0x90),{'params':{'userIDs':[..._0x5e97ad]}}))[_0x195404(0xe3)][_0x195404(0xac)][_0x195404(0xd5)](_0x5ea363=>{_0x5ea363&&_0x2b251b['addUser'](_0x5ea363);});};var $=Object[_0x24ddea(0x79)],E=(_0x493e15,_0x2bad7f,_0x9c5919,_0x289fba)=>{for(var _0x1a5a53=_0x289fba>0x1?void 0x0:_0x289fba?$(_0x2bad7f,_0x9c5919):_0x2bad7f,_0x5e4588=_0x493e15['length']-0x1,_0xd2b976;_0x5e4588>=0x0;_0x5e4588--)(_0xd2b976=_0x493e15[_0x5e4588])&&(_0x1a5a53=_0xd2b976(_0x1a5a53)||_0x1a5a53);return _0x1a5a53;},S=(_0x8547d3,_0x1956eb)=>(_0x509fdc,_0x2f8d6e)=>_0x1956eb(_0x509fdc,_0x2f8d6e,_0x8547d3);let p=class extends c[_0x24ddea(0xdd)]{constructor(_0x18c770,_0x25b8a0,_0x1de6cc,_0x34c784){const _0x2f3fc1=_0x24ddea;super(),this[_0x2f3fc1(0xd1)]=_0x18c770,this[_0x2f3fc1(0x88)]=_0x25b8a0,this[_0x2f3fc1(0x8c)]=_0x1de6cc,this[_0x2f3fc1(0xcf)]=_0x34c784,this[_0x2f3fc1(0xda)](),this[_0x2f3fc1(0xa9)]();}['_initUserSync'](){const _0x29a2f0=_0x24ddea;this['disposeWithMe'](this[_0x29a2f0(0x88)][_0x29a2f0(0x8f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x59ef59=>{const _0x451e5e=_0x29a2f0,_0x2689fe=new Set();_0x59ef59['forEach'](_0x35fde3=>{const _0x55992b=_0x4779;switch(_0x35fde3[_0x55992b(0x85)]){case _0x55992b(0x7e):{const _0x1b3822=_0x35fde3[_0x55992b(0xf2)]['personId'];_0x2689fe['add'](_0x1b3822);break;}}}),R(this[_0x451e5e(0xcf)],_0x2689fe);}));}[_0x24ddea(0xda)](){const _0x3cb995=_0x24ddea;this[_0x3cb995(0xb1)](this[_0x3cb995(0xd1)][_0x3cb995(0x8f)][_0x3cb995(0xc0)](async _0x1420cc=>{const _0x5ed338=_0x3cb995;var _0x3761e0,_0x287c32,_0x57cec6,_0x208271;const _0x577e88=(_0x3761e0=this[_0x5ed338(0x88)][_0x5ed338(0x9d)](_0x1420cc[_0x5ed338(0xc1)])[_0x5ed338(0xce)](_0x15fd82=>_0x15fd82['threadId']===_0x1420cc[_0x5ed338(0xd8)]))==null?void 0x0:_0x3761e0[_0x5ed338(0xf3)];if(!_0x577e88)return;const {unitId:_0x5e8087,subUnitId:_0x476669}=_0x577e88;switch(_0x1420cc[_0x5ed338(0xcb)]&&this['_userService'][_0x5ed338(0xde)](_0x1420cc[_0x5ed338(0xcb)]),_0x1420cc[_0x5ed338(0x85)]){case v[_0x5ed338(0x98)]:break;case v[_0x5ed338(0xab)]:{this['_threadCommentModel'][_0x5ed338(0xd3)](_0x5e8087,_0x476669,{'unitId':_0x5e8087,'subUnitId':_0x476669,'ref':'','id':_0x1420cc[_0x5ed338(0xa3)],'dT':f(+_0x1420cc[_0x5ed338(0xc8)]),'threadId':_0x1420cc[_0x5ed338(0xd8)],'personId':(_0x57cec6=(_0x287c32=_0x1420cc[_0x5ed338(0xcb)])==null?void 0x0:_0x287c32[_0x5ed338(0x9b)])!=null?_0x57cec6:_0x1420cc['userId'],'text':JSON[_0x5ed338(0x81)](_0x1420cc[_0x5ed338(0x8d)]),'parentId':_0x577e88['id']});break;}case v[_0x5ed338(0x7a)]:{const _0x55854d=this[_0x5ed338(0x88)][_0x5ed338(0xc6)](_0x5e8087,_0x476669,_0x1420cc[_0x5ed338(0xa3)]);_0x55854d&&_0x55854d[_0x5ed338(0xdb)]&&this[_0x5ed338(0x88)]['deleteComment'](_0x5e8087,_0x476669,_0x1420cc['replyId']);break;}case v[_0x5ed338(0x7c)]:{this[_0x5ed338(0x88)]['updateComment'](_0x5e8087,_0x476669,{'commentId':_0x1420cc[_0x5ed338(0xa3)],'text':JSON[_0x5ed338(0x81)](_0x1420cc[_0x5ed338(0x8d)])});break;}case v[_0x5ed338(0xad)]:{const _0x56354b=(_0x208271=this[_0x5ed338(0x88)]['getUnit'](_0x1420cc[_0x5ed338(0xc1)])[_0x5ed338(0xce)](_0x12b6f8=>_0x12b6f8[_0x5ed338(0xd8)]===_0x1420cc[_0x5ed338(0xd8)]))==null?void 0x0:_0x208271[_0x5ed338(0xf3)];_0x56354b&&this['_threadCommentModel']['resolveComment'](_0x5e8087,_0x476669,_0x56354b['id'],_0x1420cc[_0x5ed338(0x74)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x24ddea(0x91)](b[_0x24ddea(0xcd)])),S(0x1,c[_0x24ddea(0x91)](M[_0x24ddea(0xb9)])),S(0x2,c[_0x24ddea(0x91)](c[_0x24ddea(0xb6)])),S(0x3,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3ea938,_0x4217d6,_0x30fcb5,_0x10eab3)=>{for(var _0x989668=_0x10eab3>0x1?void 0x0:_0x10eab3?A(_0x4217d6,_0x30fcb5):_0x4217d6,_0x4a3eaa=_0x3ea938['length']-0x1,_0x1cf881;_0x4a3eaa>=0x0;_0x4a3eaa--)(_0x1cf881=_0x3ea938[_0x4a3eaa])&&(_0x989668=_0x1cf881(_0x989668)||_0x989668);return _0x989668;},_=(_0x5ad083,_0x225241)=>(_0x4f977c,_0x1a67e9)=>_0x225241(_0x4f977c,_0x1a67e9,_0x5ad083);function Y(_0x98ef9f,_0x303756){const _0x25847d=_0x24ddea,_0x34ae3e=_0x98ef9f['replies'][0x0];return{..._0x303756,'id':_0x34ae3e['replyId'],'resolved':_0x98ef9f[_0x25847d(0x74)]===0x1,'dT':f(_0x34ae3e[_0x25847d(0xc8)]),'personId':_0x34ae3e['userId'],'threadId':_0x34ae3e[_0x25847d(0xd8)]};}function G(_0x1b4057,_0x579bfa,_0x2f1151){const _0x1e93e6=_0x24ddea;var _0x56aa91,_0x28a954;if(((_0x28a954=(_0x56aa91=_0x1b4057==null?void 0x0:_0x1b4057[_0x1e93e6(0xb8)])==null?void 0x0:_0x56aa91[_0x1e93e6(0xdf)])!=null?_0x28a954:0x0)>0x0){const _0x488f52=(_0x26524c,_0x44ee8f)=>({'id':_0x26524c['replyId'],'threadId':_0x26524c[_0x1e93e6(0xd8)],'dT':f(_0x26524c['createTimestamp']),'personId':_0x26524c[_0x1e93e6(0xbe)],'resolved':_0x1b4057[_0x1e93e6(0x74)]===I[_0x1e93e6(0x89)],'unitId':_0x579bfa,'subUnitId':_0x2f1151,'text':JSON[_0x1e93e6(0x81)](_0x26524c[_0x1e93e6(0x8d)]),'parentId':_0x44ee8f}),_0x1d5229=_0x488f52(_0x1b4057[_0x1e93e6(0xb8)][0x0]);return{..._0x1d5229,'children':_0x1b4057['replies'][_0x1e93e6(0xc3)](0x1)['map'](_0x4e1a0a=>_0x488f52(_0x4e1a0a,_0x1d5229['id']))};}return null;}function _0x4779(_0x4639dc,_0x2298f9){const _0x225e6f=_0x225e();return _0x4779=function(_0x477965,_0x116306){_0x477965=_0x477965-0x74;let _0x131c3f=_0x225e6f[_0x477965];return _0x131c3f;},_0x4779(_0x4639dc,_0x2298f9);}let g=class{constructor(_0x4d8e5c,_0x27bd20,_0x4ba226,_0xa2fe8f){const _0x2bb43f=_0x24ddea;this['_httpService']=_0x4d8e5c,this[_0x2bb43f(0x8c)]=_0x27bd20,this[_0x2bb43f(0xdc)]=_0x4ba226,this[_0x2bb43f(0xcf)]=_0xa2fe8f;}async[_0x24ddea(0xd3)](_0x48730c){const _0x3fff31=_0x24ddea;var _0x13c916,_0x175e5f;const {parentId:_0x5208fc,unitId:_0x1ee425,text:_0x47fd3a,threadId:_0x31080f}=_0x48730c,_0x15f24a=(_0x175e5f=(_0x13c916=_0x47fd3a[_0x3fff31(0xae)])==null?void 0x0:_0x13c916[_0x3fff31(0x95)](_0x4a983d=>_0x4a983d[_0x3fff31(0xe8)]===c['CustomRangeType'][_0x3fff31(0x7f)])[_0x3fff31(0xd7)](_0x3f1a02=>_0x3f1a02[_0x3fff31(0x78)]))!=null?_0x175e5f:[],_0x10c53c=JSON[_0x3fff31(0xe1)](_0x47fd3a),_0x596620=(await this[_0x3fff31(0xdc)][_0x3fff31(0x75)](_0x1ee425))['getMemberID']();if(_0x5208fc){const _0x29c89f={'memberId':_0x596620,'unitId':_0x1ee425,'content':_0x10c53c,'mention':_0x15f24a,'threadId':_0x31080f},_0x35eddb=(await this[_0x3fff31(0xb4)][_0x3fff31(0xbc)](_0x3fff31(0xd2)+_0x1ee425+'/reply',{'body':_0x29c89f}))['body'][_0x3fff31(0xa6)];return{..._0x48730c,'id':_0x35eddb[_0x3fff31(0xa3)],'dT':c[_0x3fff31(0xbb)](+_0x35eddb['createTimestamp'])[_0x3fff31(0xe5)](_0x3fff31(0xc7)),'personId':_0x35eddb[_0x3fff31(0xbe)]};}else{const _0x2101c2={'memberId':_0x596620,'unitId':_0x1ee425,'content':_0x10c53c,'mention':_0x15f24a},_0x2d0744=await this['_httpService'][_0x3fff31(0xbc)](_0x3fff31(0xd2)+_0x1ee425+_0x3fff31(0xc5),{'body':_0x2101c2});return Y(_0x2d0744[_0x3fff31(0xe3)][_0x3fff31(0x86)],_0x48730c);}}async[_0x24ddea(0xe9)](_0x4bbcef){const _0xf15da9=_0x24ddea;var _0x18ac65,_0x12189b;const {text:_0x17aad2,unitId:_0x2712fc}=_0x4bbcef,_0x5ec04b=(_0x12189b=(_0x18ac65=_0x17aad2[_0xf15da9(0xae)])==null?void 0x0:_0x18ac65[_0xf15da9(0x95)](_0x3d0345=>_0x3d0345[_0xf15da9(0xe8)]===c['CustomRangeType'][_0xf15da9(0x7f)])[_0xf15da9(0xd7)](_0x2d9847=>_0x2d9847[_0xf15da9(0x78)]))!=null?_0x12189b:[],_0x181fc8=JSON['stringify'](_0x17aad2),_0x424324=_0x4bbcef[_0xf15da9(0xd8)],_0x1282ed=_0x4bbcef['id'],_0x1946e3={'memberId':(await this['_sessionService']['requireSession'](_0x2712fc))['getMemberID'](),'unitId':_0x2712fc,'threadId':_0x424324,'mention':_0x5ec04b,'content':_0x181fc8,'replyId':_0x1282ed},_0x113652=await this['_httpService'][_0xf15da9(0xbc)](_0xf15da9(0xd2)+_0x2712fc+_0xf15da9(0xd4),{'body':_0x1946e3});return!_0x113652['body'][_0xf15da9(0xe0)]||_0x113652[_0xf15da9(0xe3)]['error'][_0xf15da9(0xc2)]===0x1;}async[_0x24ddea(0x99)](_0x51b357){const _0x1ed4a2=_0x24ddea,{unitId:_0x3c2878}=_0x51b357,_0xf90e35=_0x51b357['threadId'],_0x4e906f={'memberId':this[_0x1ed4a2(0x8c)]['getCurrentUser']()[_0x1ed4a2(0x9b)],'unitId':_0x3c2878,'threadId':_0xf90e35,'solved':_0x51b357[_0x1ed4a2(0xed)]?I[_0x1ed4a2(0x89)]:I[_0x1ed4a2(0x93)]},_0x3e4bb0=await this[_0x1ed4a2(0xb4)]['post'](_0x1ed4a2(0xd2)+_0x3c2878+'/solved',{'body':_0x4e906f});return!_0x3e4bb0[_0x1ed4a2(0xe3)][_0x1ed4a2(0xe0)]||_0x3e4bb0[_0x1ed4a2(0xe3)]['error'][_0x1ed4a2(0xc2)]===0x1;}async[_0x24ddea(0x9e)](_0x2220fe,_0x23b3fb,_0x3a9319,_0x58ac35){const _0x5a1418=_0x24ddea,_0x1447fd={'memberId':(await this['_sessionService'][_0x5a1418(0x75)](_0x2220fe))[_0x5a1418(0xd6)](),'threadId':_0x3a9319,'replyId':_0x58ac35,'unitId':_0x2220fe},_0x2d0b33=await this[_0x5a1418(0xb4)][_0x5a1418(0xbc)](_0x5a1418(0xd2)+_0x2220fe+_0x5a1418(0xe6),{'body':_0x1447fd});return!_0x2d0b33[_0x5a1418(0xe3)]['error']||_0x2d0b33['body'][_0x5a1418(0xe0)]['code']===0x1;}async[_0x24ddea(0x9a)](_0x280c3b,_0x47136e,_0x5516bd){const _0x598aeb=_0x24ddea,_0x2aae12={'unitId':_0x280c3b,'threadId':_0x5516bd},_0xf3ccb9=await this[_0x598aeb(0xb4)]['post'](_0x598aeb(0xd2)+_0x280c3b+_0x598aeb(0x76),{'body':_0x2aae12}),_0x1f8727=_0x5516bd[_0x598aeb(0xd7)](_0x432cc1=>G(_0xf3ccb9[_0x598aeb(0xe3)][_0x598aeb(0xe7)][_0x432cc1],_0x280c3b,_0x47136e))['filter'](Boolean);return Object[_0x598aeb(0xbf)](_0xf3ccb9[_0x598aeb(0xe3)][_0x598aeb(0xac)])[_0x598aeb(0xd5)](_0xd45459=>{this['_userService']['addUser'](_0xd45459);}),_0x1f8727;}['saveCommentToSnapshot'](_0x20bf5c){const _0x580168=_0x24ddea;return{'id':_0x20bf5c['id'],'threadId':_0x20bf5c[_0x580168(0xd8)],'ref':_0x20bf5c[_0x580168(0xbd)]};}};function _0x225e(){const _0x5d3d15=['add','COMMENT','12xGysNv','parse','HTTPService','CollaborationSessionService','Module','type','comment','UniverThreadCommentDataSourcePlugin','_threadCommentModel','Solved','11uzsjuu','@univerjs/core','_userService','content','9LvdUIk','commentUpdate$','/universer-api/user/list','Inject','UniverInstanceType','OpenOrReOpen','_initDataSource','filter','dataSource','30pWYNGC','Add','resolveComment','listComments','userID','merge','getUnit','deleteComment','UNIVER_UNKNOWN','Injector','@univerjs-pro/collaboration-client','DependentOn','replyId','_configService','UniverLicensePlugin','reply','405629ARPBlJ','_threadCommentDataSourceService','_initUserSync','get','Reply','users','Solve','customRanges','syncUpdateMutationToColla','4926488AKDVqh','disposeWithMe','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','IThreadCommentDataSourceService','UserManagerService','Plugin','replies','ThreadCommentModel','356ggtenQ','dayjs','post','ref','userId','values','subscribe','unitId','code','slice','_threadCommentDataSource','/add','getComment','YYYY/MM/DD\x20HH:mm','createTimestamp','delete','240766ywHTBY','user','_config','CommentService','find','_injector','1570768VPxMtb','_commentService','/universer-api/comment/unit/','addComment','/edit','forEach','getMemberID','map','threadId','@univerjs-pro/license','_init','parentId','_sessionService','Disposable','addUser','length','error','stringify','11542460yVyzcP','body','IConfigService','format','/delete','comments','rangeType','updateComment','onStarting','UniverThreadCommentUIPlugin','Unknown','resolved','UNRECOGNIZED','87309444lJVbnM','onReady','94660MulhwM','payload','root','solved','requireSession','/list','rxjs','rangeId','getOwnPropertyDescriptor','Delete','getUser','Edit','setConfig'];_0x225e=function(){return _0x5d3d15;};return _0x225e();}g=x([_(0x0,c[_0x24ddea(0x91)](P['HTTPService'])),_(0x1,c[_0x24ddea(0x91)](c[_0x24ddea(0xb6)])),_(0x2,c[_0x24ddea(0x91)](b[_0x24ddea(0x83)])),_(0x3,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)]))],g);var H=Object[_0x24ddea(0x79)],J=(_0x1ac2e1,_0x238708,_0x40a37b,_0x18bf20)=>{for(var _0x17f0f1=_0x18bf20>0x1?void 0x0:_0x18bf20?H(_0x238708,_0x40a37b):_0x238708,_0x13185a=_0x1ac2e1['length']-0x1,_0x5a00d5;_0x13185a>=0x0;_0x13185a--)(_0x5a00d5=_0x1ac2e1[_0x13185a])&&(_0x17f0f1=_0x5a00d5(_0x17f0f1)||_0x17f0f1);return _0x17f0f1;},y=(_0x10037a,_0xa89fa)=>(_0x347da0,_0x5560a5)=>_0xa89fa(_0x347da0,_0x5560a5,_0x10037a);let C=class extends c[_0x24ddea(0xdd)]{constructor(_0x5084ee,_0x3e4c74){const _0xf31e9e=_0x24ddea;super(),this[_0xf31e9e(0xa8)]=_0x5084ee,this[_0xf31e9e(0xc4)]=_0x3e4c74,this[_0xf31e9e(0x94)]();}[_0x24ddea(0x94)](){const _0x5b6c04=_0x24ddea;this['_threadCommentDataSourceService'][_0x5b6c04(0x96)]=this[_0x5b6c04(0xc4)],this['_threadCommentDataSourceService'][_0x5b6c04(0xaf)]=!0x1;}};C=J([y(0x0,M[_0x24ddea(0xb5)]),y(0x1,c[_0x24ddea(0x91)](g))],C);var F=Object[_0x24ddea(0xb2)],L=Object[_0x24ddea(0x79)],Z=(_0x5d285d,_0x277e88,_0x53c705)=>_0x277e88 in _0x5d285d?F(_0x5d285d,_0x277e88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x53c705}):_0x5d285d[_0x277e88]=_0x53c705,W=(_0x290b4c,_0x18cc11,_0x229627,_0x78b9bc)=>{const _0x3bf288=_0x24ddea;for(var _0x361519=_0x78b9bc>0x1?void 0x0:_0x78b9bc?L(_0x18cc11,_0x229627):_0x18cc11,_0xa42ca1=_0x290b4c[_0x3bf288(0xdf)]-0x1,_0x4ae1ef;_0xa42ca1>=0x0;_0xa42ca1--)(_0x4ae1ef=_0x290b4c[_0xa42ca1])&&(_0x361519=_0x4ae1ef(_0x361519)||_0x361519);return _0x361519;},O=(_0x5dc3fe,_0x1cdbe8)=>(_0x2f76a7,_0x9477e3)=>_0x1cdbe8(_0x2f76a7,_0x9477e3,_0x5dc3fe),N=(_0x1dd854,_0x416377,_0x32ca8f)=>Z(_0x1dd854,typeof _0x416377!='symbol'?_0x416377+'':_0x416377,_0x32ca8f);exports[_0x24ddea(0x87)]=class extends c[_0x24ddea(0xb7)]{constructor(_0x40667c=D,_0x5d9eae,_0x145f14){const _0x1a42f8=_0x24ddea;super(),this[_0x1a42f8(0xcc)]=_0x40667c,this[_0x1a42f8(0xcf)]=_0x5d9eae,this[_0x1a42f8(0xa4)]=_0x145f14;const {..._0x4da845}=c[_0x1a42f8(0x9c)]({},D,this['_config']);this[_0x1a42f8(0xa4)][_0x1a42f8(0x7d)](q,_0x4da845);}[_0x24ddea(0xea)](){const _0xa67942=_0x24ddea;[[g],[C],[p]][_0xa67942(0xd5)](_0x1fdf7e=>{const _0x32be77=_0xa67942;this['_injector'][_0x32be77(0x7e)](_0x1fdf7e);});}[_0x24ddea(0xf0)](){const _0x21743a=_0x24ddea;this[_0x21743a(0xcf)][_0x21743a(0xaa)](C),this['_injector'][_0x21743a(0xaa)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x24ddea(0x85),c[_0x24ddea(0x92)][_0x24ddea(0x9f)]),exports[_0x24ddea(0x87)]=W([c[_0x24ddea(0xa2)](j[_0x24ddea(0xeb)],b['UniverCollaborationClientPlugin'],T[_0x24ddea(0xa5)]),O(0x1,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)])),O(0x2,c[_0x24ddea(0xe4)])],exports[_0x24ddea(0x87)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5f5545=_0x1831;(function(_0x1eb6dc,_0x5de806){const _0x335203=_0x1831,_0x5086e1=_0x1eb6dc();while(!![]){try{const _0x22987a=-parseInt(_0x335203(0xc3))/0x1*(parseInt(_0x335203(0x91))/0x2)+-parseInt(_0x335203(0xb0))/0x3*(parseInt(_0x335203(0xa5))/0x4)+-parseInt(_0x335203(0xeb))/0x5+-parseInt(_0x335203(0xbd))/0x6+parseInt(_0x335203(0xcb))/0x7+parseInt(_0x335203(0xab))/0x8+parseInt(_0x335203(0xad))/0x9*(parseInt(_0x335203(0xf1))/0xa);if(_0x22987a===_0x5de806)break;else _0x5086e1['push'](_0x5086e1['shift']());}catch(_0x481641){_0x5086e1['push'](_0x5086e1['shift']());}}}(_0x4695,0x4d4f0));import{CommentService as _0x15a9b5,CollaborationSessionService as _0x500a18,UniverCollaborationClientPlugin as _0x2ffb99}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42875c}from'@univerjs-pro/license';import{dayjs as _0x48433f,UserManagerService as _0x25f664,Inject as _0x40680a,Injector as _0x57ef01,Disposable as _0x272377,CustomRangeType as _0x2b2672,UniverInstanceType as _0x408419,DependentOn as _0x2c6962,IConfigService as _0x3260d3,Plugin as _0x43489b,merge as _0x32f219}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3407d6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5e5ade,IThreadCommentDataSourceService as _0xf97d9d}from'@univerjs/thread-comment';import{bufferTime as _0x2add9b}from'rxjs';import{HTTPService as _0x470e80}from'@univerjs/network';const W=_0x5f5545(0xae);function _0x1831(_0x481add,_0x451078){const _0x469514=_0x4695();return _0x1831=function(_0x183183,_0x4a9da1){_0x183183=_0x183183-0x8f;let _0xb00138=_0x469514[_0x183183];return _0xb00138;},_0x1831(_0x481add,_0x451078);}var I=(_0x2a67c7=>(_0x2a67c7[_0x2a67c7[_0x5f5545(0x9c)]=0x0]='OpenOrReOpen',_0x2a67c7[_0x2a67c7[_0x5f5545(0x9d)]=0x1]=_0x5f5545(0x9d),_0x2a67c7[_0x2a67c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2a67c7))(I||{}),v=(_0x16f714=>(_0x16f714[_0x16f714[_0x5f5545(0xb6)]=0x0]=_0x5f5545(0xb6),_0x16f714[_0x16f714['Add']=0x1]='Add',_0x16f714[_0x16f714['Reply']=0x2]=_0x5f5545(0xd0),_0x16f714[_0x16f714[_0x5f5545(0x92)]=0x3]=_0x5f5545(0x92),_0x16f714[_0x16f714[_0x5f5545(0x94)]=0x4]=_0x5f5545(0x94),_0x16f714[_0x16f714[_0x5f5545(0xde)]=0x5]='Solve',_0x16f714[_0x16f714[_0x5f5545(0x8f)]=-0x1]=_0x5f5545(0x8f),_0x16f714))(v||{});const D=_0xc1d100=>_0x48433f(new Date(+_0xc1d100))[_0x5f5545(0xa6)](_0x5f5545(0xb1)),B=async(_0x2a49cb,_0x53c868)=>{const _0x16b647=_0x5f5545,_0x231d78=_0x2a49cb[_0x16b647(0xc5)](_0x25f664),_0x85d9e5=_0x2a49cb['get'](_0x470e80);_0x53c868[_0x16b647(0xef)](_0x385ef3=>{const _0x52ed65=_0x16b647;_0x231d78[_0x52ed65(0xe9)](_0x385ef3)&&_0x53c868[_0x52ed65(0xb2)](_0x385ef3);}),_0x53c868['size']&&(await _0x85d9e5['get'](_0x16b647(0xe6),{'params':{'userIDs':[..._0x53c868]}}))[_0x16b647(0xb3)]['users'][_0x16b647(0xef)](_0x1e90fd=>{const _0x19075c=_0x16b647;_0x1e90fd&&_0x231d78[_0x19075c(0xd9)](_0x1e90fd);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2c349b,_0x5887a2,_0x4fdd97,_0x2988da)=>{for(var _0x237d11=_0x2988da>0x1?void 0x0:_0x2988da?K(_0x5887a2,_0x4fdd97):_0x5887a2,_0x512315=_0x2c349b['length']-0x1,_0x44b818;_0x512315>=0x0;_0x512315--)(_0x44b818=_0x2c349b[_0x512315])&&(_0x237d11=_0x44b818(_0x237d11)||_0x237d11);return _0x237d11;},p=(_0x151ad7,_0xc5ce70)=>(_0x2a1fec,_0x1ee09f)=>_0xc5ce70(_0x2a1fec,_0x1ee09f,_0x151ad7);let S=class extends _0x272377{constructor(_0x69d3d5,_0x1884d3,_0x3b4d93,_0x4c6a7b){const _0x14e4b9=_0x5f5545;super(),this[_0x14e4b9(0xdb)]=_0x69d3d5,this['_threadCommentModel']=_0x1884d3,this[_0x14e4b9(0xe3)]=_0x3b4d93,this['_injector']=_0x4c6a7b,this[_0x14e4b9(0xbc)](),this[_0x14e4b9(0x96)]();}[_0x5f5545(0x96)](){const _0x516eed=_0x5f5545;this[_0x516eed(0xbb)](this['_threadCommentModel']['commentUpdate$'][_0x516eed(0xa4)](_0x2add9b(0x10))['subscribe'](_0x1d57ab=>{const _0x56d4e1=_0x516eed,_0x1d3825=new Set();_0x1d57ab[_0x56d4e1(0xef)](_0x238a85=>{const _0x17231d=_0x56d4e1;switch(_0x238a85[_0x17231d(0xa0)]){case _0x17231d(0xa8):{const _0x5dfb2b=_0x238a85[_0x17231d(0xb9)][_0x17231d(0xe7)];_0x1d3825[_0x17231d(0xa8)](_0x5dfb2b);break;}}}),B(this['_injector'],_0x1d3825);}));}[_0x5f5545(0xbc)](){const _0x569450=_0x5f5545;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x569450(0xb8)](async _0x3528fc=>{const _0xde0344=_0x569450;var _0x1b8409,_0x4e1602,_0x16706b,_0x3b6e32;const _0x2389f0=(_0x1b8409=this['_threadCommentModel']['getUnit'](_0x3528fc[_0xde0344(0xd1)])[_0xde0344(0xa7)](_0xd1a1bb=>_0xd1a1bb['threadId']===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x1b8409[_0xde0344(0x9b)];if(!_0x2389f0)return;const {unitId:_0x2b8a39,subUnitId:_0x3700b5}=_0x2389f0;switch(_0x3528fc[_0xde0344(0xdd)]&&this[_0xde0344(0xe3)][_0xde0344(0xd9)](_0x3528fc[_0xde0344(0xdd)]),_0x3528fc['type']){case v['Add']:break;case v['Reply']:{this[_0xde0344(0xdf)][_0xde0344(0xd6)](_0x2b8a39,_0x3700b5,{'unitId':_0x2b8a39,'subUnitId':_0x3700b5,'ref':'','id':_0x3528fc['replyId'],'dT':D(+_0x3528fc[_0xde0344(0xd4)]),'threadId':_0x3528fc['threadId'],'personId':(_0x16706b=(_0x4e1602=_0x3528fc[_0xde0344(0xdd)])==null?void 0x0:_0x4e1602['userID'])!=null?_0x16706b:_0x3528fc[_0xde0344(0xc8)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)]),'parentId':_0x2389f0['id']});break;}case v[_0xde0344(0x94)]:{const _0x3263d4=this[_0xde0344(0xdf)][_0xde0344(0xd8)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);_0x3263d4&&_0x3263d4['parentId']&&this[_0xde0344(0xdf)][_0xde0344(0x97)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);break;}case v[_0xde0344(0x92)]:{this['_threadCommentModel'][_0xde0344(0xcd)](_0x2b8a39,_0x3700b5,{'commentId':_0x3528fc[_0xde0344(0xac)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)])});break;}case v[_0xde0344(0xde)]:{const _0x2f3532=(_0x3b6e32=this[_0xde0344(0xdf)]['getUnit'](_0x3528fc['unitId'])[_0xde0344(0xa7)](_0x5d27b2=>_0x5d27b2[_0xde0344(0xba)]===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x3b6e32[_0xde0344(0x9b)];_0x2f3532&&this[_0xde0344(0xdf)]['resolveComment'](_0x2b8a39,_0x3700b5,_0x2f3532['id'],_0x3528fc['solved']===I[_0xde0344(0x9d)]);break;}}}));}};S=V([p(0x0,_0x40680a(_0x15a9b5)),p(0x1,_0x40680a(_0x5e5ade)),p(0x2,_0x40680a(_0x25f664)),p(0x3,_0x40680a(_0x57ef01))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x5f5545(0xc1)],Q=(_0x34d57d,_0x36d811,_0x4fdc03,_0x241a19)=>{for(var _0x17ce6a=_0x241a19>0x1?void 0x0:_0x241a19?k(_0x36d811,_0x4fdc03):_0x36d811,_0x3a7411=_0x34d57d['length']-0x1,_0x181bfe;_0x3a7411>=0x0;_0x3a7411--)(_0x181bfe=_0x34d57d[_0x3a7411])&&(_0x17ce6a=_0x181bfe(_0x17ce6a)||_0x17ce6a);return _0x17ce6a;},_=(_0x55136f,_0x1a4648)=>(_0x194e55,_0x33710f)=>_0x1a4648(_0x194e55,_0x33710f,_0x55136f);function X(_0x3956ba,_0x8b482d){const _0x54c237=_0x5f5545,_0x5df23e=_0x3956ba[_0x54c237(0xc6)][0x0];return{..._0x8b482d,'id':_0x5df23e[_0x54c237(0xac)],'resolved':_0x3956ba[_0x54c237(0xb4)]===0x1,'dT':D(_0x5df23e[_0x54c237(0xd4)]),'personId':_0x5df23e[_0x54c237(0xc8)],'threadId':_0x5df23e[_0x54c237(0xba)]};}function ee(_0x369cf,_0x4b7f75,_0x6cea36){const _0x345c25=_0x5f5545;var _0x371ae6,_0x3c41ee;if(((_0x3c41ee=(_0x371ae6=_0x369cf==null?void 0x0:_0x369cf[_0x345c25(0xc6)])==null?void 0x0:_0x371ae6[_0x345c25(0x9f)])!=null?_0x3c41ee:0x0)>0x0){const _0x2d070e=(_0x8a14db,_0x16d296)=>({'id':_0x8a14db[_0x345c25(0xac)],'threadId':_0x8a14db['threadId'],'dT':D(_0x8a14db[_0x345c25(0xd4)]),'personId':_0x8a14db[_0x345c25(0xc8)],'resolved':_0x369cf[_0x345c25(0xb4)]===I[_0x345c25(0x9d)],'unitId':_0x4b7f75,'subUnitId':_0x6cea36,'text':JSON[_0x345c25(0x93)](_0x8a14db[_0x345c25(0xaa)]),'parentId':_0x16d296}),_0x2e7fc1=_0x2d070e(_0x369cf[_0x345c25(0xc6)][0x0]);return{..._0x2e7fc1,'children':_0x369cf[_0x345c25(0xc6)][_0x345c25(0xe4)](0x1)[_0x345c25(0xce)](_0x11a7c8=>_0x2d070e(_0x11a7c8,_0x2e7fc1['id']))};}return null;}let f=class{constructor(_0x4f6ac7,_0x5b5df2,_0x337650,_0x47dbad){const _0x55f29d=_0x5f5545;this[_0x55f29d(0x98)]=_0x4f6ac7,this[_0x55f29d(0xe3)]=_0x5b5df2,this[_0x55f29d(0xf0)]=_0x337650,this[_0x55f29d(0xe1)]=_0x47dbad;}async[_0x5f5545(0xd6)](_0x2c6d25){const _0x5a447d=_0x5f5545;var _0x26db16,_0xf3a1cf;const {parentId:_0x41dbd0,unitId:_0x3788a5,text:_0x2093c5,threadId:_0x13707a}=_0x2c6d25,_0x456d67=(_0xf3a1cf=(_0x26db16=_0x2093c5[_0x5a447d(0xa9)])==null?void 0x0:_0x26db16[_0x5a447d(0xc7)](_0x32fa4d=>_0x32fa4d[_0x5a447d(0xe0)]===_0x2b2672['COMMENT'])[_0x5a447d(0xce)](_0x7f2307=>_0x7f2307[_0x5a447d(0xcf)]))!=null?_0xf3a1cf:[],_0x394ffb=JSON[_0x5a447d(0xf2)](_0x2093c5),_0x55e8f6=(await this[_0x5a447d(0xf0)][_0x5a447d(0xb5)](_0x3788a5))[_0x5a447d(0xc0)]();if(_0x41dbd0){const _0x19970a={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67,'threadId':_0x13707a},_0x18c3ff=(await this[_0x5a447d(0x98)]['post'](_0x5a447d(0xec)+_0x3788a5+'/reply',{'body':_0x19970a}))[_0x5a447d(0xb3)][_0x5a447d(0x90)];return{..._0x2c6d25,'id':_0x18c3ff[_0x5a447d(0xac)],'dT':_0x48433f(+_0x18c3ff[_0x5a447d(0xd4)])[_0x5a447d(0xa6)](_0x5a447d(0xb1)),'personId':_0x18c3ff['userId']};}else{const _0x2d6d65={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67},_0x100e62=await this[_0x5a447d(0x98)]['post']('/universer-api/comment/unit/'+_0x3788a5+_0x5a447d(0xd5),{'body':_0x2d6d65});return X(_0x100e62[_0x5a447d(0xb3)][_0x5a447d(0xd3)],_0x2c6d25);}}async[_0x5f5545(0xcd)](_0x4ae5b4){const _0x372399=_0x5f5545;var _0x595a1b,_0x28b748;const {text:_0x4e05b3,unitId:_0x469f2c}=_0x4ae5b4,_0x3b5016=(_0x28b748=(_0x595a1b=_0x4e05b3[_0x372399(0xa9)])==null?void 0x0:_0x595a1b[_0x372399(0xc7)](_0x33a85a=>_0x33a85a[_0x372399(0xe0)]===_0x2b2672[_0x372399(0xa1)])[_0x372399(0xce)](_0x1186ee=>_0x1186ee[_0x372399(0xcf)]))!=null?_0x28b748:[],_0x5b9f30=JSON['stringify'](_0x4e05b3),_0x59e1c4=_0x4ae5b4[_0x372399(0xba)],_0xc72f0d=_0x4ae5b4['id'],_0x55d1d0={'memberId':(await this[_0x372399(0xf0)]['requireSession'](_0x469f2c))[_0x372399(0xc0)](),'unitId':_0x469f2c,'threadId':_0x59e1c4,'mention':_0x3b5016,'content':_0x5b9f30,'replyId':_0xc72f0d},_0x2dd45f=await this['_httpService'][_0x372399(0xd2)](_0x372399(0xec)+_0x469f2c+'/edit',{'body':_0x55d1d0});return!_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)]||_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)][_0x372399(0xb7)]===0x1;}async[_0x5f5545(0xdc)](_0x425b99){const _0x363dc4=_0x5f5545,{unitId:_0x47f27f}=_0x425b99,_0x5862e7=_0x425b99[_0x363dc4(0xba)],_0x323139={'memberId':this[_0x363dc4(0xe3)][_0x363dc4(0xee)]()['userID'],'unitId':_0x47f27f,'threadId':_0x5862e7,'solved':_0x425b99[_0x363dc4(0x95)]?I[_0x363dc4(0x9d)]:I[_0x363dc4(0x9c)]},_0x2b33e5=await this[_0x363dc4(0x98)][_0x363dc4(0xd2)](_0x363dc4(0xec)+_0x47f27f+_0x363dc4(0xbe),{'body':_0x323139});return!_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]||_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]['code']===0x1;}async[_0x5f5545(0x97)](_0x5883ba,_0x54c3bd,_0x22f0d3,_0x569f0d){const _0x48f910=_0x5f5545,_0x34b05a={'memberId':(await this['_sessionService']['requireSession'](_0x5883ba))[_0x48f910(0xc0)](),'threadId':_0x22f0d3,'replyId':_0x569f0d,'unitId':_0x5883ba},_0x591e34=await this[_0x48f910(0x98)][_0x48f910(0xd2)]('/universer-api/comment/unit/'+_0x5883ba+_0x48f910(0xe2),{'body':_0x34b05a});return!_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)]||_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)][_0x48f910(0xb7)]===0x1;}async['listComments'](_0x33333f,_0x545a05,_0x35d1f1){const _0x52d7e1=_0x5f5545,_0x39a092={'unitId':_0x33333f,'threadId':_0x35d1f1},_0x2d3a40=await this['_httpService'][_0x52d7e1(0xd2)](_0x52d7e1(0xec)+_0x33333f+_0x52d7e1(0xda),{'body':_0x39a092}),_0x239596=_0x35d1f1[_0x52d7e1(0xce)](_0x1920a0=>ee(_0x2d3a40['body']['comments'][_0x1920a0],_0x33333f,_0x545a05))[_0x52d7e1(0xc7)](Boolean);return Object[_0x52d7e1(0x99)](_0x2d3a40[_0x52d7e1(0xb3)][_0x52d7e1(0xc9)])[_0x52d7e1(0xef)](_0x2d69ff=>{const _0x2cc1ce=_0x52d7e1;this['_userService'][_0x2cc1ce(0xd9)](_0x2d69ff);}),_0x239596;}[_0x5f5545(0xca)](_0x2cdc3a){const _0x55e12a=_0x5f5545;return{'id':_0x2cdc3a['id'],'threadId':_0x2cdc3a['threadId'],'ref':_0x2cdc3a[_0x55e12a(0xa3)]};}};f=Q([_(0x0,_0x40680a(_0x470e80)),_(0x1,_0x40680a(_0x25f664)),_(0x2,_0x40680a(_0x500a18)),_(0x3,_0x40680a(_0x57ef01))],f);var re=Object[_0x5f5545(0xc1)],te=(_0x3cc6a9,_0x5bd1c1,_0xe8b522,_0x419de4)=>{const _0x2eee61=_0x5f5545;for(var _0x587ff7=_0x419de4>0x1?void 0x0:_0x419de4?re(_0x5bd1c1,_0xe8b522):_0x5bd1c1,_0x3128aa=_0x3cc6a9[_0x2eee61(0x9f)]-0x1,_0x3f195e;_0x3128aa>=0x0;_0x3128aa--)(_0x3f195e=_0x3cc6a9[_0x3128aa])&&(_0x587ff7=_0x3f195e(_0x587ff7)||_0x587ff7);return _0x587ff7;},N=(_0x27b4ca,_0x17e376)=>(_0x1d33e2,_0x2a1fe7)=>_0x17e376(_0x1d33e2,_0x2a1fe7,_0x27b4ca);let g=class extends _0x272377{constructor(_0xc98618,_0x24a201){const _0x55ea7f=_0x5f5545;super(),this[_0x55ea7f(0xc4)]=_0xc98618,this['_threadCommentDataSource']=_0x24a201,this[_0x55ea7f(0xe8)]();}[_0x5f5545(0xe8)](){const _0x4a5051=_0x5f5545;this[_0x4a5051(0xc4)][_0x4a5051(0xed)]=this[_0x4a5051(0xe5)],this['_threadCommentDataSourceService'][_0x4a5051(0x9a)]=!0x1;}};g=te([N(0x0,_0xf97d9d),N(0x1,_0x40680a(f))],g);var se=Object[_0x5f5545(0xcc)],oe=Object[_0x5f5545(0xc1)],ne=(_0x36d24d,_0x17dc88,_0x225aba)=>_0x17dc88 in _0x36d24d?se(_0x36d24d,_0x17dc88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x225aba}):_0x36d24d[_0x17dc88]=_0x225aba,ie=(_0x42ca3a,_0x15b84c,_0x3473d2,_0x16a8ae)=>{const _0x27f953=_0x5f5545;for(var _0x4aff39=_0x16a8ae>0x1?void 0x0:_0x16a8ae?oe(_0x15b84c,_0x3473d2):_0x15b84c,_0x4be5d5=_0x42ca3a[_0x27f953(0x9f)]-0x1,_0x2c9e73;_0x4be5d5>=0x0;_0x4be5d5--)(_0x2c9e73=_0x42ca3a[_0x4be5d5])&&(_0x4aff39=_0x2c9e73(_0x4aff39)||_0x4aff39);return _0x4aff39;},w=(_0x5a96ae,_0x191494)=>(_0x3bf13d,_0x5b50aa)=>_0x191494(_0x3bf13d,_0x5b50aa,_0x5a96ae),$=(_0x7b1bc6,_0x3a5f6b,_0x1445ae)=>ne(_0x7b1bc6,typeof _0x3a5f6b!=_0x5f5545(0xea)?_0x3a5f6b+'':_0x3a5f6b,_0x1445ae);let b=class extends _0x43489b{constructor(_0x7cb831=M,_0x427f97,_0x3ff48d){const _0x6107da=_0x5f5545;super(),this[_0x6107da(0xa2)]=_0x7cb831,this[_0x6107da(0xe1)]=_0x427f97,this['_configService']=_0x3ff48d;const {..._0x257046}=_0x32f219({},M,this[_0x6107da(0xa2)]);this[_0x6107da(0xbf)][_0x6107da(0xc2)](z,_0x257046);}[_0x5f5545(0xaf)](){[[f],[g],[S]]['forEach'](_0x20913b=>{this['_injector']['add'](_0x20913b);});}[_0x5f5545(0x9e)](){const _0x31ad69=_0x5f5545;this[_0x31ad69(0xe1)][_0x31ad69(0xc5)](g),this['_injector'][_0x31ad69(0xc5)](S);}};$(b,'pluginName',W),$(b,_0x5f5545(0xa0),_0x408419['UNIVER_UNKNOWN']),b=ie([_0x2c6962(_0x3407d6,_0x2ffb99,_0x42875c),w(0x1,_0x40680a(_0x57ef01)),w(0x2,_0x3260d3)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4695(){const _0x1cf8df=['dataSource','getCurrentUser','forEach','_sessionService','12130dWJNmV','stringify','UNRECOGNIZED','reply','458xeYoVm','Edit','parse','Delete','resolved','_initUserSync','deleteComment','_httpService','values','syncUpdateMutationToColla','root','OpenOrReOpen','Solved','onReady','length','type','COMMENT','_config','ref','pipe','1842664ykFBRW','format','find','add','customRanges','content','3166856DkSZqX','replyId','9423QbISLI','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onStarting','3zevDcf','YYYY/MM/DD\x20HH:mm','delete','body','solved','requireSession','Unknown','code','subscribe','payload','threadId','disposeWithMe','_init','3397572YxxFUV','/solved','_configService','getMemberID','getOwnPropertyDescriptor','setConfig','379TrZnsL','_threadCommentDataSourceService','get','replies','filter','userId','users','saveCommentToSnapshot','2307676gmLsKV','defineProperty','updateComment','map','rangeId','Reply','unitId','post','comment','createTimestamp','/add','addComment','error','getComment','addUser','/list','_commentService','resolveComment','user','Solve','_threadCommentModel','rangeType','_injector','/delete','_userService','slice','_threadCommentDataSource','/universer-api/user/list','personId','_initDataSource','getUser','symbol','2825805beJAlX','/universer-api/comment/unit/'];_0x4695=function(){return _0x1cf8df;};return _0x4695();}
|
|
1
|
+
const _0x5af817=_0x52b1;(function(_0x18099e,_0x4eb9f0){const _0x4d06d5=_0x52b1,_0x2e5aed=_0x18099e();while(!![]){try{const _0x511d4=-parseInt(_0x4d06d5(0x1be))/0x1*(parseInt(_0x4d06d5(0x1e7))/0x2)+-parseInt(_0x4d06d5(0x20f))/0x3+parseInt(_0x4d06d5(0x1c0))/0x4+-parseInt(_0x4d06d5(0x1e6))/0x5+parseInt(_0x4d06d5(0x1cf))/0x6+-parseInt(_0x4d06d5(0x1d2))/0x7*(-parseInt(_0x4d06d5(0x1ce))/0x8)+-parseInt(_0x4d06d5(0x1ed))/0x9;if(_0x511d4===_0x4eb9f0)break;else _0x2e5aed['push'](_0x2e5aed['shift']());}catch(_0x34f9a9){_0x2e5aed['push'](_0x2e5aed['shift']());}}}(_0x4617,0xa3da2));import{CommentService as _0x498a04,CollaborationSessionService as _0x339043,UniverCollaborationClientPlugin as _0x2a0745}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40a7c8}from'@univerjs-pro/license';import{dayjs as _0x146095,UserManagerService as _0x253cfc,Inject as _0x1024f5,Injector as _0x500c18,Disposable as _0x1a58c4,CustomRangeType as _0x1b28c6,UniverInstanceType as _0x175b10,DependentOn as _0x17566a,IConfigService as _0x51ffa0,Plugin as _0x4977e9,merge as _0x1a1e5e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x513b47}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x532a04,IThreadCommentDataSourceService as _0x31e088}from'@univerjs/thread-comment';import{bufferTime as _0x58b843}from'rxjs';import{HTTPService as _0x375401}from'@univerjs/network';const W=_0x5af817(0x1b2);function _0x4617(){const _0x295def=['_threadCommentDataSourceService','addUser','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','/delete','2326395nqrXDu','2MYDwgB','deleteComment','Edit','requireSession','rangeId','content','2871621akjyaW','userID','users','Add','resolveComment','onStarting','length','post','rangeType','commentUpdate$','/universer-api/user/list','pluginName','thread-comment-data-source.config','map','saveCommentToSnapshot','pipe','/list','createTimestamp','find','onReady','_config','UNRECOGNIZED','defineProperty','_initDataSource','getUser','unitId','getOwnPropertyDescriptor','forEach','/universer-api/comment/unit/','replyId','error','Reply','format','userId','474558EnrPEW','getCurrentUser','add','symbol','comments','syncUpdateMutationToColla','OpenOrReOpen','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','root','Delete','resolved','disposeWithMe','_injector','user','_commentService','getMemberID','Solve','/reply','1299806ZdSTAs','reply','1368984BsnSMN','threadId','getUnit','filter','Unknown','get','replies','_httpService','_configService','COMMENT','addComment','listComments','slice','body','10174552MwuSby','7796478BGxbrT','_userService','stringify','7mLRzZi','values','parentId','subscribe','setConfig','type','comment','solved','Solved','parse','delete','dataSource','getComment'];_0x4617=function(){return _0x295def;};return _0x4617();}var I=(_0x40a8c3=>(_0x40a8c3[_0x40a8c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x40a8c3[_0x40a8c3[_0x5af817(0x1da)]=0x1]=_0x5af817(0x1da),_0x40a8c3[_0x40a8c3[_0x5af817(0x202)]=-0x1]=_0x5af817(0x202),_0x40a8c3))(I||{}),v=(_0x31ed0c=>(_0x31ed0c[_0x31ed0c['Unknown']=0x0]=_0x5af817(0x1c4),_0x31ed0c[_0x31ed0c[_0x5af817(0x1f0)]=0x1]=_0x5af817(0x1f0),_0x31ed0c[_0x31ed0c[_0x5af817(0x20c)]=0x2]=_0x5af817(0x20c),_0x31ed0c[_0x31ed0c['Edit']=0x3]=_0x5af817(0x1e9),_0x31ed0c[_0x31ed0c[_0x5af817(0x1b5)]=0x4]='Delete',_0x31ed0c[_0x31ed0c['Solve']=0x5]=_0x5af817(0x1bc),_0x31ed0c[_0x31ed0c[_0x5af817(0x202)]=-0x1]='UNRECOGNIZED',_0x31ed0c))(v||{});const D=_0xdda57d=>_0x146095(new Date(+_0xdda57d))[_0x5af817(0x20d)](_0x5af817(0x1e2)),B=async(_0xa1b7d4,_0x1a05fb)=>{const _0x530eae=_0x5af817,_0x4e4670=_0xa1b7d4[_0x530eae(0x1c5)](_0x253cfc),_0x338d95=_0xa1b7d4[_0x530eae(0x1c5)](_0x375401);_0x1a05fb[_0x530eae(0x208)](_0x26c221=>{const _0x431492=_0x530eae;_0x4e4670[_0x431492(0x205)](_0x26c221)&&_0x1a05fb[_0x431492(0x1dc)](_0x26c221);}),_0x1a05fb['size']&&(await _0x338d95[_0x530eae(0x1c5)](_0x530eae(0x1f7),{'params':{'userIDs':[..._0x1a05fb]}}))[_0x530eae(0x1cd)][_0x530eae(0x1ef)][_0x530eae(0x208)](_0x4da052=>{const _0x3dbbc9=_0x530eae;_0x4da052&&_0x4e4670[_0x3dbbc9(0x1e0)](_0x4da052);});};var K=Object[_0x5af817(0x207)],V=(_0x20b6e8,_0x57a2bd,_0x298383,_0x55291f)=>{const _0x1b2834=_0x5af817;for(var _0xdbec4d=_0x55291f>0x1?void 0x0:_0x55291f?K(_0x57a2bd,_0x298383):_0x57a2bd,_0x597d86=_0x20b6e8[_0x1b2834(0x1f3)]-0x1,_0x41f298;_0x597d86>=0x0;_0x597d86--)(_0x41f298=_0x20b6e8[_0x597d86])&&(_0xdbec4d=_0x41f298(_0xdbec4d)||_0xdbec4d);return _0xdbec4d;},p=(_0x5749c8,_0x1bcf80)=>(_0x5d3b03,_0x9ae975)=>_0x1bcf80(_0x5d3b03,_0x9ae975,_0x5749c8);let S=class extends _0x1a58c4{constructor(_0x44d963,_0x2b937d,_0x59e383,_0x18c454){const _0x136d5a=_0x5af817;super(),this[_0x136d5a(0x1ba)]=_0x44d963,this[_0x136d5a(0x1b3)]=_0x2b937d,this[_0x136d5a(0x1d0)]=_0x59e383,this[_0x136d5a(0x1b8)]=_0x18c454,this[_0x136d5a(0x1b1)](),this['_initUserSync']();}['_initUserSync'](){const _0x114fcb=_0x5af817;this[_0x114fcb(0x1b7)](this['_threadCommentModel'][_0x114fcb(0x1f6)][_0x114fcb(0x1fc)](_0x58b843(0x10))[_0x114fcb(0x1d5)](_0x429217=>{const _0x423583=_0x114fcb,_0x31f1de=new Set();_0x429217['forEach'](_0x3898d9=>{const _0x12717f=_0x52b1;switch(_0x3898d9['type']){case _0x12717f(0x211):{const _0xbf14cd=_0x3898d9['payload']['personId'];_0x31f1de[_0x12717f(0x211)](_0xbf14cd);break;}}}),B(this[_0x423583(0x1b8)],_0x31f1de);}));}[_0x5af817(0x1b1)](){const _0x5ce26e=_0x5af817;this[_0x5ce26e(0x1b7)](this[_0x5ce26e(0x1ba)][_0x5ce26e(0x1f6)][_0x5ce26e(0x1d5)](async _0x1224dd=>{const _0x100fe0=_0x5ce26e;var _0x2dcbcc,_0xcf9636,_0x2783ae,_0x4da040;const _0x2ce041=(_0x2dcbcc=this[_0x100fe0(0x1b3)]['getUnit'](_0x1224dd[_0x100fe0(0x206)])[_0x100fe0(0x1ff)](_0x5df0ed=>_0x5df0ed['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x2dcbcc[_0x100fe0(0x1b4)];if(!_0x2ce041)return;const {unitId:_0x44d994,subUnitId:_0x584b37}=_0x2ce041;switch(_0x1224dd[_0x100fe0(0x1b9)]&&this['_userService'][_0x100fe0(0x1e0)](_0x1224dd[_0x100fe0(0x1b9)]),_0x1224dd['type']){case v[_0x100fe0(0x1f0)]:break;case v[_0x100fe0(0x20c)]:{this[_0x100fe0(0x1b3)][_0x100fe0(0x1ca)](_0x44d994,_0x584b37,{'unitId':_0x44d994,'subUnitId':_0x584b37,'ref':'','id':_0x1224dd[_0x100fe0(0x20a)],'dT':D(+_0x1224dd[_0x100fe0(0x1fe)]),'threadId':_0x1224dd[_0x100fe0(0x1c1)],'personId':(_0x2783ae=(_0xcf9636=_0x1224dd[_0x100fe0(0x1b9)])==null?void 0x0:_0xcf9636[_0x100fe0(0x1ee)])!=null?_0x2783ae:_0x1224dd[_0x100fe0(0x20e)],'text':JSON['parse'](_0x1224dd[_0x100fe0(0x1ec)]),'parentId':_0x2ce041['id']});break;}case v[_0x100fe0(0x1b5)]:{const _0x4c3ae0=this[_0x100fe0(0x1b3)][_0x100fe0(0x1de)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);_0x4c3ae0&&_0x4c3ae0[_0x100fe0(0x1d4)]&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1e8)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);break;}case v[_0x100fe0(0x1e9)]:{this[_0x100fe0(0x1b3)]['updateComment'](_0x44d994,_0x584b37,{'commentId':_0x1224dd[_0x100fe0(0x20a)],'text':JSON[_0x100fe0(0x1db)](_0x1224dd['content'])});break;}case v[_0x100fe0(0x1bc)]:{const _0x14f0ba=(_0x4da040=this['_threadCommentModel'][_0x100fe0(0x1c2)](_0x1224dd['unitId'])['find'](_0x294c9a=>_0x294c9a['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x4da040[_0x100fe0(0x1b4)];_0x14f0ba&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1f1)](_0x44d994,_0x584b37,_0x14f0ba['id'],_0x1224dd[_0x100fe0(0x1d9)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1024f5(_0x498a04)),p(0x1,_0x1024f5(_0x532a04)),p(0x2,_0x1024f5(_0x253cfc)),p(0x3,_0x1024f5(_0x500c18))],S);const z=_0x5af817(0x1f9),M={};var k=Object[_0x5af817(0x207)],Q=(_0x2787e9,_0x2a84de,_0x40082e,_0x3cea38)=>{for(var _0x294357=_0x3cea38>0x1?void 0x0:_0x3cea38?k(_0x2a84de,_0x40082e):_0x2a84de,_0x43f81f=_0x2787e9['length']-0x1,_0x8d983a;_0x43f81f>=0x0;_0x43f81f--)(_0x8d983a=_0x2787e9[_0x43f81f])&&(_0x294357=_0x8d983a(_0x294357)||_0x294357);return _0x294357;},_=(_0x53befe,_0x10ebfb)=>(_0x260bbb,_0x7ddaff)=>_0x10ebfb(_0x260bbb,_0x7ddaff,_0x53befe);function X(_0xf02a6a,_0x19896b){const _0x6eb1a3=_0x5af817,_0x25efa7=_0xf02a6a['replies'][0x0];return{..._0x19896b,'id':_0x25efa7[_0x6eb1a3(0x20a)],'resolved':_0xf02a6a[_0x6eb1a3(0x1d9)]===0x1,'dT':D(_0x25efa7['createTimestamp']),'personId':_0x25efa7[_0x6eb1a3(0x20e)],'threadId':_0x25efa7[_0x6eb1a3(0x1c1)]};}function ee(_0x53718d,_0x47e15a,_0x2ec43d){const _0x1e4213=_0x5af817;var _0x5d485c,_0x9f0f78;if(((_0x9f0f78=(_0x5d485c=_0x53718d==null?void 0x0:_0x53718d['replies'])==null?void 0x0:_0x5d485c[_0x1e4213(0x1f3)])!=null?_0x9f0f78:0x0)>0x0){const _0x231253=(_0x779f3e,_0x41a5aa)=>({'id':_0x779f3e[_0x1e4213(0x20a)],'threadId':_0x779f3e[_0x1e4213(0x1c1)],'dT':D(_0x779f3e[_0x1e4213(0x1fe)]),'personId':_0x779f3e[_0x1e4213(0x20e)],'resolved':_0x53718d[_0x1e4213(0x1d9)]===I[_0x1e4213(0x1da)],'unitId':_0x47e15a,'subUnitId':_0x2ec43d,'text':JSON[_0x1e4213(0x1db)](_0x779f3e[_0x1e4213(0x1ec)]),'parentId':_0x41a5aa}),_0x236f50=_0x231253(_0x53718d[_0x1e4213(0x1c6)][0x0]);return{..._0x236f50,'children':_0x53718d[_0x1e4213(0x1c6)][_0x1e4213(0x1cc)](0x1)[_0x1e4213(0x1fa)](_0x6e3739=>_0x231253(_0x6e3739,_0x236f50['id']))};}return null;}let f=class{constructor(_0x59d1dc,_0x58580d,_0x47d25f,_0x1162ca){const _0x2c1b46=_0x5af817;this['_httpService']=_0x59d1dc,this['_userService']=_0x58580d,this[_0x2c1b46(0x1e4)]=_0x47d25f,this[_0x2c1b46(0x1b8)]=_0x1162ca;}async['addComment'](_0x4b49eb){const _0x17e06f=_0x5af817;var _0x21d4ab,_0x2d710b;const {parentId:_0x385a6e,unitId:_0x2b81ff,text:_0x2f9e47,threadId:_0x3312cf}=_0x4b49eb,_0x317f95=(_0x2d710b=(_0x21d4ab=_0x2f9e47['customRanges'])==null?void 0x0:_0x21d4ab[_0x17e06f(0x1c3)](_0x224cd9=>_0x224cd9[_0x17e06f(0x1f5)]===_0x1b28c6[_0x17e06f(0x1c9)])['map'](_0x22641d=>_0x22641d[_0x17e06f(0x1eb)]))!=null?_0x2d710b:[],_0x1555a1=JSON['stringify'](_0x2f9e47),_0x2ec2d7=(await this[_0x17e06f(0x1e4)][_0x17e06f(0x1ea)](_0x2b81ff))[_0x17e06f(0x1bb)]();if(_0x385a6e){const _0x39bb5e={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95,'threadId':_0x3312cf},_0x323498=(await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)]('/universer-api/comment/unit/'+_0x2b81ff+_0x17e06f(0x1bd),{'body':_0x39bb5e}))[_0x17e06f(0x1cd)][_0x17e06f(0x1bf)];return{..._0x4b49eb,'id':_0x323498['replyId'],'dT':_0x146095(+_0x323498[_0x17e06f(0x1fe)])['format'](_0x17e06f(0x1e2)),'personId':_0x323498[_0x17e06f(0x20e)]};}else{const _0x50c778={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95},_0x2a7732=await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)](_0x17e06f(0x209)+_0x2b81ff+'/add',{'body':_0x50c778});return X(_0x2a7732[_0x17e06f(0x1cd)][_0x17e06f(0x1d8)],_0x4b49eb);}}async['updateComment'](_0x4945ee){const _0x2de3fd=_0x5af817;var _0x48ebc6,_0x1c88ec;const {text:_0x485f86,unitId:_0x5a5ef4}=_0x4945ee,_0x254042=(_0x1c88ec=(_0x48ebc6=_0x485f86['customRanges'])==null?void 0x0:_0x48ebc6[_0x2de3fd(0x1c3)](_0x43c832=>_0x43c832[_0x2de3fd(0x1f5)]===_0x1b28c6['COMMENT'])[_0x2de3fd(0x1fa)](_0x12552d=>_0x12552d[_0x2de3fd(0x1eb)]))!=null?_0x1c88ec:[],_0x19e35f=JSON[_0x2de3fd(0x1d1)](_0x485f86),_0x1151a4=_0x4945ee[_0x2de3fd(0x1c1)],_0x33b77e=_0x4945ee['id'],_0x49cdaf={'memberId':(await this['_sessionService'][_0x2de3fd(0x1ea)](_0x5a5ef4))[_0x2de3fd(0x1bb)](),'unitId':_0x5a5ef4,'threadId':_0x1151a4,'mention':_0x254042,'content':_0x19e35f,'replyId':_0x33b77e},_0x2e1826=await this[_0x2de3fd(0x1c7)][_0x2de3fd(0x1f4)]('/universer-api/comment/unit/'+_0x5a5ef4+'/edit',{'body':_0x49cdaf});return!_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)]||_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)][_0x2de3fd(0x1e1)]===0x1;}async[_0x5af817(0x1f1)](_0x49d58a){const _0x3de162=_0x5af817,{unitId:_0x354fdb}=_0x49d58a,_0x33a349=_0x49d58a[_0x3de162(0x1c1)],_0x4d20b9={'memberId':this[_0x3de162(0x1d0)][_0x3de162(0x210)]()[_0x3de162(0x1ee)],'unitId':_0x354fdb,'threadId':_0x33a349,'solved':_0x49d58a[_0x3de162(0x1b6)]?I[_0x3de162(0x1da)]:I[_0x3de162(0x215)]},_0x35ffa2=await this[_0x3de162(0x1c7)][_0x3de162(0x1f4)]('/universer-api/comment/unit/'+_0x354fdb+'/solved',{'body':_0x4d20b9});return!_0x35ffa2['body'][_0x3de162(0x20b)]||_0x35ffa2['body']['error'][_0x3de162(0x1e1)]===0x1;}async[_0x5af817(0x1e8)](_0x23f4ec,_0x52bdba,_0x44a5eb,_0x3466f5){const _0x6ebf77=_0x5af817,_0x3cf0a8={'memberId':(await this[_0x6ebf77(0x1e4)]['requireSession'](_0x23f4ec))['getMemberID'](),'threadId':_0x44a5eb,'replyId':_0x3466f5,'unitId':_0x23f4ec},_0x3d309f=await this[_0x6ebf77(0x1c7)][_0x6ebf77(0x1f4)](_0x6ebf77(0x209)+_0x23f4ec+_0x6ebf77(0x1e5),{'body':_0x3cf0a8});return!_0x3d309f['body'][_0x6ebf77(0x20b)]||_0x3d309f[_0x6ebf77(0x1cd)]['error'][_0x6ebf77(0x1e1)]===0x1;}async[_0x5af817(0x1cb)](_0x4cd549,_0x2044f3,_0x182bf6){const _0xba06cb=_0x5af817,_0x726cb1={'unitId':_0x4cd549,'threadId':_0x182bf6},_0x2c2fd0=await this[_0xba06cb(0x1c7)][_0xba06cb(0x1f4)](_0xba06cb(0x209)+_0x4cd549+_0xba06cb(0x1fd),{'body':_0x726cb1}),_0x12e1d4=_0x182bf6['map'](_0x4dbb08=>ee(_0x2c2fd0['body'][_0xba06cb(0x213)][_0x4dbb08],_0x4cd549,_0x2044f3))[_0xba06cb(0x1c3)](Boolean);return Object[_0xba06cb(0x1d3)](_0x2c2fd0[_0xba06cb(0x1cd)][_0xba06cb(0x1ef)])['forEach'](_0x4b10db=>{const _0x4e4f29=_0xba06cb;this[_0x4e4f29(0x1d0)][_0x4e4f29(0x1e0)](_0x4b10db);}),_0x12e1d4;}[_0x5af817(0x1fb)](_0x4598dd){return{'id':_0x4598dd['id'],'threadId':_0x4598dd['threadId'],'ref':_0x4598dd['ref']};}};f=Q([_(0x0,_0x1024f5(_0x375401)),_(0x1,_0x1024f5(_0x253cfc)),_(0x2,_0x1024f5(_0x339043)),_(0x3,_0x1024f5(_0x500c18))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x54645e,_0x2f4f82,_0x119bd0,_0x4a8e0a)=>{const _0x753257=_0x5af817;for(var _0x3e084c=_0x4a8e0a>0x1?void 0x0:_0x4a8e0a?re(_0x2f4f82,_0x119bd0):_0x2f4f82,_0x5cb717=_0x54645e[_0x753257(0x1f3)]-0x1,_0x520c50;_0x5cb717>=0x0;_0x5cb717--)(_0x520c50=_0x54645e[_0x5cb717])&&(_0x3e084c=_0x520c50(_0x3e084c)||_0x3e084c);return _0x3e084c;},N=(_0x349013,_0x563dfd)=>(_0x518fd4,_0x2d68db)=>_0x563dfd(_0x518fd4,_0x2d68db,_0x349013);function _0x52b1(_0xa09449,_0x1cd1a7){const _0x461703=_0x4617();return _0x52b1=function(_0x52b153,_0x57cb9f){_0x52b153=_0x52b153-0x1b1;let _0x188f23=_0x461703[_0x52b153];return _0x188f23;},_0x52b1(_0xa09449,_0x1cd1a7);}let g=class extends _0x1a58c4{constructor(_0x101963,_0x458e6c){const _0x155773=_0x5af817;super(),this[_0x155773(0x1df)]=_0x101963,this[_0x155773(0x1e3)]=_0x458e6c,this['_initDataSource']();}[_0x5af817(0x204)](){const _0x25041d=_0x5af817;this['_threadCommentDataSourceService'][_0x25041d(0x1dd)]=this[_0x25041d(0x1e3)],this[_0x25041d(0x1df)][_0x25041d(0x214)]=!0x1;}};g=te([N(0x0,_0x31e088),N(0x1,_0x1024f5(f))],g);var se=Object[_0x5af817(0x203)],oe=Object[_0x5af817(0x207)],ne=(_0x4a1aae,_0x9989d2,_0x451eba)=>_0x9989d2 in _0x4a1aae?se(_0x4a1aae,_0x9989d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x451eba}):_0x4a1aae[_0x9989d2]=_0x451eba,ie=(_0x32358a,_0x5c1f3e,_0x35a4b7,_0x1125f0)=>{const _0x37a8cd=_0x5af817;for(var _0x512706=_0x1125f0>0x1?void 0x0:_0x1125f0?oe(_0x5c1f3e,_0x35a4b7):_0x5c1f3e,_0x567da2=_0x32358a[_0x37a8cd(0x1f3)]-0x1,_0x5be124;_0x567da2>=0x0;_0x567da2--)(_0x5be124=_0x32358a[_0x567da2])&&(_0x512706=_0x5be124(_0x512706)||_0x512706);return _0x512706;},w=(_0x18562c,_0x2c2433)=>(_0x4da58c,_0xcc80e)=>_0x2c2433(_0x4da58c,_0xcc80e,_0x18562c),$=(_0x1e39da,_0x2cf86d,_0x597d82)=>ne(_0x1e39da,typeof _0x2cf86d!=_0x5af817(0x212)?_0x2cf86d+'':_0x2cf86d,_0x597d82);let b=class extends _0x4977e9{constructor(_0xe46c66=M,_0x27c311,_0xed5db9){const _0x157754=_0x5af817;super(),this[_0x157754(0x201)]=_0xe46c66,this[_0x157754(0x1b8)]=_0x27c311,this[_0x157754(0x1c8)]=_0xed5db9;const {..._0x41be85}=_0x1a1e5e({},M,this[_0x157754(0x201)]);this['_configService'][_0x157754(0x1d6)](z,_0x41be85);}[_0x5af817(0x1f2)](){const _0x4636ac=_0x5af817;[[f],[g],[S]][_0x4636ac(0x208)](_0x3a33ad=>{this['_injector']['add'](_0x3a33ad);});}[_0x5af817(0x200)](){const _0xc29a83=_0x5af817;this[_0xc29a83(0x1b8)]['get'](g),this[_0xc29a83(0x1b8)][_0xc29a83(0x1c5)](S);}};$(b,_0x5af817(0x1f8),W),$(b,_0x5af817(0x1d7),_0x175b10['UNIVER_UNKNOWN']),b=ie([_0x17566a(_0x513b47,_0x2a0745,_0x40a7c8),w(0x1,_0x1024f5(_0x500c18)),w(0x2,_0x51ffa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5f5545=_0x1831;(function(_0x1eb6dc,_0x5de806){const _0x335203=_0x1831,_0x5086e1=_0x1eb6dc();while(!![]){try{const _0x22987a=-parseInt(_0x335203(0xc3))/0x1*(parseInt(_0x335203(0x91))/0x2)+-parseInt(_0x335203(0xb0))/0x3*(parseInt(_0x335203(0xa5))/0x4)+-parseInt(_0x335203(0xeb))/0x5+-parseInt(_0x335203(0xbd))/0x6+parseInt(_0x335203(0xcb))/0x7+parseInt(_0x335203(0xab))/0x8+parseInt(_0x335203(0xad))/0x9*(parseInt(_0x335203(0xf1))/0xa);if(_0x22987a===_0x5de806)break;else _0x5086e1['push'](_0x5086e1['shift']());}catch(_0x481641){_0x5086e1['push'](_0x5086e1['shift']());}}}(_0x4695,0x4d4f0));import{CommentService as _0x15a9b5,CollaborationSessionService as _0x500a18,UniverCollaborationClientPlugin as _0x2ffb99}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42875c}from'@univerjs-pro/license';import{dayjs as _0x48433f,UserManagerService as _0x25f664,Inject as _0x40680a,Injector as _0x57ef01,Disposable as _0x272377,CustomRangeType as _0x2b2672,UniverInstanceType as _0x408419,DependentOn as _0x2c6962,IConfigService as _0x3260d3,Plugin as _0x43489b,merge as _0x32f219}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3407d6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5e5ade,IThreadCommentDataSourceService as _0xf97d9d}from'@univerjs/thread-comment';import{bufferTime as _0x2add9b}from'rxjs';import{HTTPService as _0x470e80}from'@univerjs/network';const W=_0x5f5545(0xae);function _0x1831(_0x481add,_0x451078){const _0x469514=_0x4695();return _0x1831=function(_0x183183,_0x4a9da1){_0x183183=_0x183183-0x8f;let _0xb00138=_0x469514[_0x183183];return _0xb00138;},_0x1831(_0x481add,_0x451078);}var I=(_0x2a67c7=>(_0x2a67c7[_0x2a67c7[_0x5f5545(0x9c)]=0x0]='OpenOrReOpen',_0x2a67c7[_0x2a67c7[_0x5f5545(0x9d)]=0x1]=_0x5f5545(0x9d),_0x2a67c7[_0x2a67c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2a67c7))(I||{}),v=(_0x16f714=>(_0x16f714[_0x16f714[_0x5f5545(0xb6)]=0x0]=_0x5f5545(0xb6),_0x16f714[_0x16f714['Add']=0x1]='Add',_0x16f714[_0x16f714['Reply']=0x2]=_0x5f5545(0xd0),_0x16f714[_0x16f714[_0x5f5545(0x92)]=0x3]=_0x5f5545(0x92),_0x16f714[_0x16f714[_0x5f5545(0x94)]=0x4]=_0x5f5545(0x94),_0x16f714[_0x16f714[_0x5f5545(0xde)]=0x5]='Solve',_0x16f714[_0x16f714[_0x5f5545(0x8f)]=-0x1]=_0x5f5545(0x8f),_0x16f714))(v||{});const D=_0xc1d100=>_0x48433f(new Date(+_0xc1d100))[_0x5f5545(0xa6)](_0x5f5545(0xb1)),B=async(_0x2a49cb,_0x53c868)=>{const _0x16b647=_0x5f5545,_0x231d78=_0x2a49cb[_0x16b647(0xc5)](_0x25f664),_0x85d9e5=_0x2a49cb['get'](_0x470e80);_0x53c868[_0x16b647(0xef)](_0x385ef3=>{const _0x52ed65=_0x16b647;_0x231d78[_0x52ed65(0xe9)](_0x385ef3)&&_0x53c868[_0x52ed65(0xb2)](_0x385ef3);}),_0x53c868['size']&&(await _0x85d9e5['get'](_0x16b647(0xe6),{'params':{'userIDs':[..._0x53c868]}}))[_0x16b647(0xb3)]['users'][_0x16b647(0xef)](_0x1e90fd=>{const _0x19075c=_0x16b647;_0x1e90fd&&_0x231d78[_0x19075c(0xd9)](_0x1e90fd);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2c349b,_0x5887a2,_0x4fdd97,_0x2988da)=>{for(var _0x237d11=_0x2988da>0x1?void 0x0:_0x2988da?K(_0x5887a2,_0x4fdd97):_0x5887a2,_0x512315=_0x2c349b['length']-0x1,_0x44b818;_0x512315>=0x0;_0x512315--)(_0x44b818=_0x2c349b[_0x512315])&&(_0x237d11=_0x44b818(_0x237d11)||_0x237d11);return _0x237d11;},p=(_0x151ad7,_0xc5ce70)=>(_0x2a1fec,_0x1ee09f)=>_0xc5ce70(_0x2a1fec,_0x1ee09f,_0x151ad7);let S=class extends _0x272377{constructor(_0x69d3d5,_0x1884d3,_0x3b4d93,_0x4c6a7b){const _0x14e4b9=_0x5f5545;super(),this[_0x14e4b9(0xdb)]=_0x69d3d5,this['_threadCommentModel']=_0x1884d3,this[_0x14e4b9(0xe3)]=_0x3b4d93,this['_injector']=_0x4c6a7b,this[_0x14e4b9(0xbc)](),this[_0x14e4b9(0x96)]();}[_0x5f5545(0x96)](){const _0x516eed=_0x5f5545;this[_0x516eed(0xbb)](this['_threadCommentModel']['commentUpdate$'][_0x516eed(0xa4)](_0x2add9b(0x10))['subscribe'](_0x1d57ab=>{const _0x56d4e1=_0x516eed,_0x1d3825=new Set();_0x1d57ab[_0x56d4e1(0xef)](_0x238a85=>{const _0x17231d=_0x56d4e1;switch(_0x238a85[_0x17231d(0xa0)]){case _0x17231d(0xa8):{const _0x5dfb2b=_0x238a85[_0x17231d(0xb9)][_0x17231d(0xe7)];_0x1d3825[_0x17231d(0xa8)](_0x5dfb2b);break;}}}),B(this['_injector'],_0x1d3825);}));}[_0x5f5545(0xbc)](){const _0x569450=_0x5f5545;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x569450(0xb8)](async _0x3528fc=>{const _0xde0344=_0x569450;var _0x1b8409,_0x4e1602,_0x16706b,_0x3b6e32;const _0x2389f0=(_0x1b8409=this['_threadCommentModel']['getUnit'](_0x3528fc[_0xde0344(0xd1)])[_0xde0344(0xa7)](_0xd1a1bb=>_0xd1a1bb['threadId']===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x1b8409[_0xde0344(0x9b)];if(!_0x2389f0)return;const {unitId:_0x2b8a39,subUnitId:_0x3700b5}=_0x2389f0;switch(_0x3528fc[_0xde0344(0xdd)]&&this[_0xde0344(0xe3)][_0xde0344(0xd9)](_0x3528fc[_0xde0344(0xdd)]),_0x3528fc['type']){case v['Add']:break;case v['Reply']:{this[_0xde0344(0xdf)][_0xde0344(0xd6)](_0x2b8a39,_0x3700b5,{'unitId':_0x2b8a39,'subUnitId':_0x3700b5,'ref':'','id':_0x3528fc['replyId'],'dT':D(+_0x3528fc[_0xde0344(0xd4)]),'threadId':_0x3528fc['threadId'],'personId':(_0x16706b=(_0x4e1602=_0x3528fc[_0xde0344(0xdd)])==null?void 0x0:_0x4e1602['userID'])!=null?_0x16706b:_0x3528fc[_0xde0344(0xc8)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)]),'parentId':_0x2389f0['id']});break;}case v[_0xde0344(0x94)]:{const _0x3263d4=this[_0xde0344(0xdf)][_0xde0344(0xd8)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);_0x3263d4&&_0x3263d4['parentId']&&this[_0xde0344(0xdf)][_0xde0344(0x97)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);break;}case v[_0xde0344(0x92)]:{this['_threadCommentModel'][_0xde0344(0xcd)](_0x2b8a39,_0x3700b5,{'commentId':_0x3528fc[_0xde0344(0xac)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)])});break;}case v[_0xde0344(0xde)]:{const _0x2f3532=(_0x3b6e32=this[_0xde0344(0xdf)]['getUnit'](_0x3528fc['unitId'])[_0xde0344(0xa7)](_0x5d27b2=>_0x5d27b2[_0xde0344(0xba)]===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x3b6e32[_0xde0344(0x9b)];_0x2f3532&&this[_0xde0344(0xdf)]['resolveComment'](_0x2b8a39,_0x3700b5,_0x2f3532['id'],_0x3528fc['solved']===I[_0xde0344(0x9d)]);break;}}}));}};S=V([p(0x0,_0x40680a(_0x15a9b5)),p(0x1,_0x40680a(_0x5e5ade)),p(0x2,_0x40680a(_0x25f664)),p(0x3,_0x40680a(_0x57ef01))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x5f5545(0xc1)],Q=(_0x34d57d,_0x36d811,_0x4fdc03,_0x241a19)=>{for(var _0x17ce6a=_0x241a19>0x1?void 0x0:_0x241a19?k(_0x36d811,_0x4fdc03):_0x36d811,_0x3a7411=_0x34d57d['length']-0x1,_0x181bfe;_0x3a7411>=0x0;_0x3a7411--)(_0x181bfe=_0x34d57d[_0x3a7411])&&(_0x17ce6a=_0x181bfe(_0x17ce6a)||_0x17ce6a);return _0x17ce6a;},_=(_0x55136f,_0x1a4648)=>(_0x194e55,_0x33710f)=>_0x1a4648(_0x194e55,_0x33710f,_0x55136f);function X(_0x3956ba,_0x8b482d){const _0x54c237=_0x5f5545,_0x5df23e=_0x3956ba[_0x54c237(0xc6)][0x0];return{..._0x8b482d,'id':_0x5df23e[_0x54c237(0xac)],'resolved':_0x3956ba[_0x54c237(0xb4)]===0x1,'dT':D(_0x5df23e[_0x54c237(0xd4)]),'personId':_0x5df23e[_0x54c237(0xc8)],'threadId':_0x5df23e[_0x54c237(0xba)]};}function ee(_0x369cf,_0x4b7f75,_0x6cea36){const _0x345c25=_0x5f5545;var _0x371ae6,_0x3c41ee;if(((_0x3c41ee=(_0x371ae6=_0x369cf==null?void 0x0:_0x369cf[_0x345c25(0xc6)])==null?void 0x0:_0x371ae6[_0x345c25(0x9f)])!=null?_0x3c41ee:0x0)>0x0){const _0x2d070e=(_0x8a14db,_0x16d296)=>({'id':_0x8a14db[_0x345c25(0xac)],'threadId':_0x8a14db['threadId'],'dT':D(_0x8a14db[_0x345c25(0xd4)]),'personId':_0x8a14db[_0x345c25(0xc8)],'resolved':_0x369cf[_0x345c25(0xb4)]===I[_0x345c25(0x9d)],'unitId':_0x4b7f75,'subUnitId':_0x6cea36,'text':JSON[_0x345c25(0x93)](_0x8a14db[_0x345c25(0xaa)]),'parentId':_0x16d296}),_0x2e7fc1=_0x2d070e(_0x369cf[_0x345c25(0xc6)][0x0]);return{..._0x2e7fc1,'children':_0x369cf[_0x345c25(0xc6)][_0x345c25(0xe4)](0x1)[_0x345c25(0xce)](_0x11a7c8=>_0x2d070e(_0x11a7c8,_0x2e7fc1['id']))};}return null;}let f=class{constructor(_0x4f6ac7,_0x5b5df2,_0x337650,_0x47dbad){const _0x55f29d=_0x5f5545;this[_0x55f29d(0x98)]=_0x4f6ac7,this[_0x55f29d(0xe3)]=_0x5b5df2,this[_0x55f29d(0xf0)]=_0x337650,this[_0x55f29d(0xe1)]=_0x47dbad;}async[_0x5f5545(0xd6)](_0x2c6d25){const _0x5a447d=_0x5f5545;var _0x26db16,_0xf3a1cf;const {parentId:_0x41dbd0,unitId:_0x3788a5,text:_0x2093c5,threadId:_0x13707a}=_0x2c6d25,_0x456d67=(_0xf3a1cf=(_0x26db16=_0x2093c5[_0x5a447d(0xa9)])==null?void 0x0:_0x26db16[_0x5a447d(0xc7)](_0x32fa4d=>_0x32fa4d[_0x5a447d(0xe0)]===_0x2b2672['COMMENT'])[_0x5a447d(0xce)](_0x7f2307=>_0x7f2307[_0x5a447d(0xcf)]))!=null?_0xf3a1cf:[],_0x394ffb=JSON[_0x5a447d(0xf2)](_0x2093c5),_0x55e8f6=(await this[_0x5a447d(0xf0)][_0x5a447d(0xb5)](_0x3788a5))[_0x5a447d(0xc0)]();if(_0x41dbd0){const _0x19970a={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67,'threadId':_0x13707a},_0x18c3ff=(await this[_0x5a447d(0x98)]['post'](_0x5a447d(0xec)+_0x3788a5+'/reply',{'body':_0x19970a}))[_0x5a447d(0xb3)][_0x5a447d(0x90)];return{..._0x2c6d25,'id':_0x18c3ff[_0x5a447d(0xac)],'dT':_0x48433f(+_0x18c3ff[_0x5a447d(0xd4)])[_0x5a447d(0xa6)](_0x5a447d(0xb1)),'personId':_0x18c3ff['userId']};}else{const _0x2d6d65={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67},_0x100e62=await this[_0x5a447d(0x98)]['post']('/universer-api/comment/unit/'+_0x3788a5+_0x5a447d(0xd5),{'body':_0x2d6d65});return X(_0x100e62[_0x5a447d(0xb3)][_0x5a447d(0xd3)],_0x2c6d25);}}async[_0x5f5545(0xcd)](_0x4ae5b4){const _0x372399=_0x5f5545;var _0x595a1b,_0x28b748;const {text:_0x4e05b3,unitId:_0x469f2c}=_0x4ae5b4,_0x3b5016=(_0x28b748=(_0x595a1b=_0x4e05b3[_0x372399(0xa9)])==null?void 0x0:_0x595a1b[_0x372399(0xc7)](_0x33a85a=>_0x33a85a[_0x372399(0xe0)]===_0x2b2672[_0x372399(0xa1)])[_0x372399(0xce)](_0x1186ee=>_0x1186ee[_0x372399(0xcf)]))!=null?_0x28b748:[],_0x5b9f30=JSON['stringify'](_0x4e05b3),_0x59e1c4=_0x4ae5b4[_0x372399(0xba)],_0xc72f0d=_0x4ae5b4['id'],_0x55d1d0={'memberId':(await this[_0x372399(0xf0)]['requireSession'](_0x469f2c))[_0x372399(0xc0)](),'unitId':_0x469f2c,'threadId':_0x59e1c4,'mention':_0x3b5016,'content':_0x5b9f30,'replyId':_0xc72f0d},_0x2dd45f=await this['_httpService'][_0x372399(0xd2)](_0x372399(0xec)+_0x469f2c+'/edit',{'body':_0x55d1d0});return!_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)]||_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)][_0x372399(0xb7)]===0x1;}async[_0x5f5545(0xdc)](_0x425b99){const _0x363dc4=_0x5f5545,{unitId:_0x47f27f}=_0x425b99,_0x5862e7=_0x425b99[_0x363dc4(0xba)],_0x323139={'memberId':this[_0x363dc4(0xe3)][_0x363dc4(0xee)]()['userID'],'unitId':_0x47f27f,'threadId':_0x5862e7,'solved':_0x425b99[_0x363dc4(0x95)]?I[_0x363dc4(0x9d)]:I[_0x363dc4(0x9c)]},_0x2b33e5=await this[_0x363dc4(0x98)][_0x363dc4(0xd2)](_0x363dc4(0xec)+_0x47f27f+_0x363dc4(0xbe),{'body':_0x323139});return!_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]||_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]['code']===0x1;}async[_0x5f5545(0x97)](_0x5883ba,_0x54c3bd,_0x22f0d3,_0x569f0d){const _0x48f910=_0x5f5545,_0x34b05a={'memberId':(await this['_sessionService']['requireSession'](_0x5883ba))[_0x48f910(0xc0)](),'threadId':_0x22f0d3,'replyId':_0x569f0d,'unitId':_0x5883ba},_0x591e34=await this[_0x48f910(0x98)][_0x48f910(0xd2)]('/universer-api/comment/unit/'+_0x5883ba+_0x48f910(0xe2),{'body':_0x34b05a});return!_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)]||_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)][_0x48f910(0xb7)]===0x1;}async['listComments'](_0x33333f,_0x545a05,_0x35d1f1){const _0x52d7e1=_0x5f5545,_0x39a092={'unitId':_0x33333f,'threadId':_0x35d1f1},_0x2d3a40=await this['_httpService'][_0x52d7e1(0xd2)](_0x52d7e1(0xec)+_0x33333f+_0x52d7e1(0xda),{'body':_0x39a092}),_0x239596=_0x35d1f1[_0x52d7e1(0xce)](_0x1920a0=>ee(_0x2d3a40['body']['comments'][_0x1920a0],_0x33333f,_0x545a05))[_0x52d7e1(0xc7)](Boolean);return Object[_0x52d7e1(0x99)](_0x2d3a40[_0x52d7e1(0xb3)][_0x52d7e1(0xc9)])[_0x52d7e1(0xef)](_0x2d69ff=>{const _0x2cc1ce=_0x52d7e1;this['_userService'][_0x2cc1ce(0xd9)](_0x2d69ff);}),_0x239596;}[_0x5f5545(0xca)](_0x2cdc3a){const _0x55e12a=_0x5f5545;return{'id':_0x2cdc3a['id'],'threadId':_0x2cdc3a['threadId'],'ref':_0x2cdc3a[_0x55e12a(0xa3)]};}};f=Q([_(0x0,_0x40680a(_0x470e80)),_(0x1,_0x40680a(_0x25f664)),_(0x2,_0x40680a(_0x500a18)),_(0x3,_0x40680a(_0x57ef01))],f);var re=Object[_0x5f5545(0xc1)],te=(_0x3cc6a9,_0x5bd1c1,_0xe8b522,_0x419de4)=>{const _0x2eee61=_0x5f5545;for(var _0x587ff7=_0x419de4>0x1?void 0x0:_0x419de4?re(_0x5bd1c1,_0xe8b522):_0x5bd1c1,_0x3128aa=_0x3cc6a9[_0x2eee61(0x9f)]-0x1,_0x3f195e;_0x3128aa>=0x0;_0x3128aa--)(_0x3f195e=_0x3cc6a9[_0x3128aa])&&(_0x587ff7=_0x3f195e(_0x587ff7)||_0x587ff7);return _0x587ff7;},N=(_0x27b4ca,_0x17e376)=>(_0x1d33e2,_0x2a1fe7)=>_0x17e376(_0x1d33e2,_0x2a1fe7,_0x27b4ca);let g=class extends _0x272377{constructor(_0xc98618,_0x24a201){const _0x55ea7f=_0x5f5545;super(),this[_0x55ea7f(0xc4)]=_0xc98618,this['_threadCommentDataSource']=_0x24a201,this[_0x55ea7f(0xe8)]();}[_0x5f5545(0xe8)](){const _0x4a5051=_0x5f5545;this[_0x4a5051(0xc4)][_0x4a5051(0xed)]=this[_0x4a5051(0xe5)],this['_threadCommentDataSourceService'][_0x4a5051(0x9a)]=!0x1;}};g=te([N(0x0,_0xf97d9d),N(0x1,_0x40680a(f))],g);var se=Object[_0x5f5545(0xcc)],oe=Object[_0x5f5545(0xc1)],ne=(_0x36d24d,_0x17dc88,_0x225aba)=>_0x17dc88 in _0x36d24d?se(_0x36d24d,_0x17dc88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x225aba}):_0x36d24d[_0x17dc88]=_0x225aba,ie=(_0x42ca3a,_0x15b84c,_0x3473d2,_0x16a8ae)=>{const _0x27f953=_0x5f5545;for(var _0x4aff39=_0x16a8ae>0x1?void 0x0:_0x16a8ae?oe(_0x15b84c,_0x3473d2):_0x15b84c,_0x4be5d5=_0x42ca3a[_0x27f953(0x9f)]-0x1,_0x2c9e73;_0x4be5d5>=0x0;_0x4be5d5--)(_0x2c9e73=_0x42ca3a[_0x4be5d5])&&(_0x4aff39=_0x2c9e73(_0x4aff39)||_0x4aff39);return _0x4aff39;},w=(_0x5a96ae,_0x191494)=>(_0x3bf13d,_0x5b50aa)=>_0x191494(_0x3bf13d,_0x5b50aa,_0x5a96ae),$=(_0x7b1bc6,_0x3a5f6b,_0x1445ae)=>ne(_0x7b1bc6,typeof _0x3a5f6b!=_0x5f5545(0xea)?_0x3a5f6b+'':_0x3a5f6b,_0x1445ae);let b=class extends _0x43489b{constructor(_0x7cb831=M,_0x427f97,_0x3ff48d){const _0x6107da=_0x5f5545;super(),this[_0x6107da(0xa2)]=_0x7cb831,this[_0x6107da(0xe1)]=_0x427f97,this['_configService']=_0x3ff48d;const {..._0x257046}=_0x32f219({},M,this[_0x6107da(0xa2)]);this[_0x6107da(0xbf)][_0x6107da(0xc2)](z,_0x257046);}[_0x5f5545(0xaf)](){[[f],[g],[S]]['forEach'](_0x20913b=>{this['_injector']['add'](_0x20913b);});}[_0x5f5545(0x9e)](){const _0x31ad69=_0x5f5545;this[_0x31ad69(0xe1)][_0x31ad69(0xc5)](g),this['_injector'][_0x31ad69(0xc5)](S);}};$(b,'pluginName',W),$(b,_0x5f5545(0xa0),_0x408419['UNIVER_UNKNOWN']),b=ie([_0x2c6962(_0x3407d6,_0x2ffb99,_0x42875c),w(0x1,_0x40680a(_0x57ef01)),w(0x2,_0x3260d3)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4695(){const _0x1cf8df=['dataSource','getCurrentUser','forEach','_sessionService','12130dWJNmV','stringify','UNRECOGNIZED','reply','458xeYoVm','Edit','parse','Delete','resolved','_initUserSync','deleteComment','_httpService','values','syncUpdateMutationToColla','root','OpenOrReOpen','Solved','onReady','length','type','COMMENT','_config','ref','pipe','1842664ykFBRW','format','find','add','customRanges','content','3166856DkSZqX','replyId','9423QbISLI','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onStarting','3zevDcf','YYYY/MM/DD\x20HH:mm','delete','body','solved','requireSession','Unknown','code','subscribe','payload','threadId','disposeWithMe','_init','3397572YxxFUV','/solved','_configService','getMemberID','getOwnPropertyDescriptor','setConfig','379TrZnsL','_threadCommentDataSourceService','get','replies','filter','userId','users','saveCommentToSnapshot','2307676gmLsKV','defineProperty','updateComment','map','rangeId','Reply','unitId','post','comment','createTimestamp','/add','addComment','error','getComment','addUser','/list','_commentService','resolveComment','user','Solve','_threadCommentModel','rangeType','_injector','/delete','_userService','slice','_threadCommentDataSource','/universer-api/user/list','personId','_initDataSource','getUser','symbol','2825805beJAlX','/universer-api/comment/unit/'];_0x4695=function(){return _0x1cf8df;};return _0x4695();}
|
|
1
|
+
const _0x5af817=_0x52b1;(function(_0x18099e,_0x4eb9f0){const _0x4d06d5=_0x52b1,_0x2e5aed=_0x18099e();while(!![]){try{const _0x511d4=-parseInt(_0x4d06d5(0x1be))/0x1*(parseInt(_0x4d06d5(0x1e7))/0x2)+-parseInt(_0x4d06d5(0x20f))/0x3+parseInt(_0x4d06d5(0x1c0))/0x4+-parseInt(_0x4d06d5(0x1e6))/0x5+parseInt(_0x4d06d5(0x1cf))/0x6+-parseInt(_0x4d06d5(0x1d2))/0x7*(-parseInt(_0x4d06d5(0x1ce))/0x8)+-parseInt(_0x4d06d5(0x1ed))/0x9;if(_0x511d4===_0x4eb9f0)break;else _0x2e5aed['push'](_0x2e5aed['shift']());}catch(_0x34f9a9){_0x2e5aed['push'](_0x2e5aed['shift']());}}}(_0x4617,0xa3da2));import{CommentService as _0x498a04,CollaborationSessionService as _0x339043,UniverCollaborationClientPlugin as _0x2a0745}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40a7c8}from'@univerjs-pro/license';import{dayjs as _0x146095,UserManagerService as _0x253cfc,Inject as _0x1024f5,Injector as _0x500c18,Disposable as _0x1a58c4,CustomRangeType as _0x1b28c6,UniverInstanceType as _0x175b10,DependentOn as _0x17566a,IConfigService as _0x51ffa0,Plugin as _0x4977e9,merge as _0x1a1e5e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x513b47}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x532a04,IThreadCommentDataSourceService as _0x31e088}from'@univerjs/thread-comment';import{bufferTime as _0x58b843}from'rxjs';import{HTTPService as _0x375401}from'@univerjs/network';const W=_0x5af817(0x1b2);function _0x4617(){const _0x295def=['_threadCommentDataSourceService','addUser','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','/delete','2326395nqrXDu','2MYDwgB','deleteComment','Edit','requireSession','rangeId','content','2871621akjyaW','userID','users','Add','resolveComment','onStarting','length','post','rangeType','commentUpdate$','/universer-api/user/list','pluginName','thread-comment-data-source.config','map','saveCommentToSnapshot','pipe','/list','createTimestamp','find','onReady','_config','UNRECOGNIZED','defineProperty','_initDataSource','getUser','unitId','getOwnPropertyDescriptor','forEach','/universer-api/comment/unit/','replyId','error','Reply','format','userId','474558EnrPEW','getCurrentUser','add','symbol','comments','syncUpdateMutationToColla','OpenOrReOpen','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','root','Delete','resolved','disposeWithMe','_injector','user','_commentService','getMemberID','Solve','/reply','1299806ZdSTAs','reply','1368984BsnSMN','threadId','getUnit','filter','Unknown','get','replies','_httpService','_configService','COMMENT','addComment','listComments','slice','body','10174552MwuSby','7796478BGxbrT','_userService','stringify','7mLRzZi','values','parentId','subscribe','setConfig','type','comment','solved','Solved','parse','delete','dataSource','getComment'];_0x4617=function(){return _0x295def;};return _0x4617();}var I=(_0x40a8c3=>(_0x40a8c3[_0x40a8c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x40a8c3[_0x40a8c3[_0x5af817(0x1da)]=0x1]=_0x5af817(0x1da),_0x40a8c3[_0x40a8c3[_0x5af817(0x202)]=-0x1]=_0x5af817(0x202),_0x40a8c3))(I||{}),v=(_0x31ed0c=>(_0x31ed0c[_0x31ed0c['Unknown']=0x0]=_0x5af817(0x1c4),_0x31ed0c[_0x31ed0c[_0x5af817(0x1f0)]=0x1]=_0x5af817(0x1f0),_0x31ed0c[_0x31ed0c[_0x5af817(0x20c)]=0x2]=_0x5af817(0x20c),_0x31ed0c[_0x31ed0c['Edit']=0x3]=_0x5af817(0x1e9),_0x31ed0c[_0x31ed0c[_0x5af817(0x1b5)]=0x4]='Delete',_0x31ed0c[_0x31ed0c['Solve']=0x5]=_0x5af817(0x1bc),_0x31ed0c[_0x31ed0c[_0x5af817(0x202)]=-0x1]='UNRECOGNIZED',_0x31ed0c))(v||{});const D=_0xdda57d=>_0x146095(new Date(+_0xdda57d))[_0x5af817(0x20d)](_0x5af817(0x1e2)),B=async(_0xa1b7d4,_0x1a05fb)=>{const _0x530eae=_0x5af817,_0x4e4670=_0xa1b7d4[_0x530eae(0x1c5)](_0x253cfc),_0x338d95=_0xa1b7d4[_0x530eae(0x1c5)](_0x375401);_0x1a05fb[_0x530eae(0x208)](_0x26c221=>{const _0x431492=_0x530eae;_0x4e4670[_0x431492(0x205)](_0x26c221)&&_0x1a05fb[_0x431492(0x1dc)](_0x26c221);}),_0x1a05fb['size']&&(await _0x338d95[_0x530eae(0x1c5)](_0x530eae(0x1f7),{'params':{'userIDs':[..._0x1a05fb]}}))[_0x530eae(0x1cd)][_0x530eae(0x1ef)][_0x530eae(0x208)](_0x4da052=>{const _0x3dbbc9=_0x530eae;_0x4da052&&_0x4e4670[_0x3dbbc9(0x1e0)](_0x4da052);});};var K=Object[_0x5af817(0x207)],V=(_0x20b6e8,_0x57a2bd,_0x298383,_0x55291f)=>{const _0x1b2834=_0x5af817;for(var _0xdbec4d=_0x55291f>0x1?void 0x0:_0x55291f?K(_0x57a2bd,_0x298383):_0x57a2bd,_0x597d86=_0x20b6e8[_0x1b2834(0x1f3)]-0x1,_0x41f298;_0x597d86>=0x0;_0x597d86--)(_0x41f298=_0x20b6e8[_0x597d86])&&(_0xdbec4d=_0x41f298(_0xdbec4d)||_0xdbec4d);return _0xdbec4d;},p=(_0x5749c8,_0x1bcf80)=>(_0x5d3b03,_0x9ae975)=>_0x1bcf80(_0x5d3b03,_0x9ae975,_0x5749c8);let S=class extends _0x1a58c4{constructor(_0x44d963,_0x2b937d,_0x59e383,_0x18c454){const _0x136d5a=_0x5af817;super(),this[_0x136d5a(0x1ba)]=_0x44d963,this[_0x136d5a(0x1b3)]=_0x2b937d,this[_0x136d5a(0x1d0)]=_0x59e383,this[_0x136d5a(0x1b8)]=_0x18c454,this[_0x136d5a(0x1b1)](),this['_initUserSync']();}['_initUserSync'](){const _0x114fcb=_0x5af817;this[_0x114fcb(0x1b7)](this['_threadCommentModel'][_0x114fcb(0x1f6)][_0x114fcb(0x1fc)](_0x58b843(0x10))[_0x114fcb(0x1d5)](_0x429217=>{const _0x423583=_0x114fcb,_0x31f1de=new Set();_0x429217['forEach'](_0x3898d9=>{const _0x12717f=_0x52b1;switch(_0x3898d9['type']){case _0x12717f(0x211):{const _0xbf14cd=_0x3898d9['payload']['personId'];_0x31f1de[_0x12717f(0x211)](_0xbf14cd);break;}}}),B(this[_0x423583(0x1b8)],_0x31f1de);}));}[_0x5af817(0x1b1)](){const _0x5ce26e=_0x5af817;this[_0x5ce26e(0x1b7)](this[_0x5ce26e(0x1ba)][_0x5ce26e(0x1f6)][_0x5ce26e(0x1d5)](async _0x1224dd=>{const _0x100fe0=_0x5ce26e;var _0x2dcbcc,_0xcf9636,_0x2783ae,_0x4da040;const _0x2ce041=(_0x2dcbcc=this[_0x100fe0(0x1b3)]['getUnit'](_0x1224dd[_0x100fe0(0x206)])[_0x100fe0(0x1ff)](_0x5df0ed=>_0x5df0ed['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x2dcbcc[_0x100fe0(0x1b4)];if(!_0x2ce041)return;const {unitId:_0x44d994,subUnitId:_0x584b37}=_0x2ce041;switch(_0x1224dd[_0x100fe0(0x1b9)]&&this['_userService'][_0x100fe0(0x1e0)](_0x1224dd[_0x100fe0(0x1b9)]),_0x1224dd['type']){case v[_0x100fe0(0x1f0)]:break;case v[_0x100fe0(0x20c)]:{this[_0x100fe0(0x1b3)][_0x100fe0(0x1ca)](_0x44d994,_0x584b37,{'unitId':_0x44d994,'subUnitId':_0x584b37,'ref':'','id':_0x1224dd[_0x100fe0(0x20a)],'dT':D(+_0x1224dd[_0x100fe0(0x1fe)]),'threadId':_0x1224dd[_0x100fe0(0x1c1)],'personId':(_0x2783ae=(_0xcf9636=_0x1224dd[_0x100fe0(0x1b9)])==null?void 0x0:_0xcf9636[_0x100fe0(0x1ee)])!=null?_0x2783ae:_0x1224dd[_0x100fe0(0x20e)],'text':JSON['parse'](_0x1224dd[_0x100fe0(0x1ec)]),'parentId':_0x2ce041['id']});break;}case v[_0x100fe0(0x1b5)]:{const _0x4c3ae0=this[_0x100fe0(0x1b3)][_0x100fe0(0x1de)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);_0x4c3ae0&&_0x4c3ae0[_0x100fe0(0x1d4)]&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1e8)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);break;}case v[_0x100fe0(0x1e9)]:{this[_0x100fe0(0x1b3)]['updateComment'](_0x44d994,_0x584b37,{'commentId':_0x1224dd[_0x100fe0(0x20a)],'text':JSON[_0x100fe0(0x1db)](_0x1224dd['content'])});break;}case v[_0x100fe0(0x1bc)]:{const _0x14f0ba=(_0x4da040=this['_threadCommentModel'][_0x100fe0(0x1c2)](_0x1224dd['unitId'])['find'](_0x294c9a=>_0x294c9a['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x4da040[_0x100fe0(0x1b4)];_0x14f0ba&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1f1)](_0x44d994,_0x584b37,_0x14f0ba['id'],_0x1224dd[_0x100fe0(0x1d9)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1024f5(_0x498a04)),p(0x1,_0x1024f5(_0x532a04)),p(0x2,_0x1024f5(_0x253cfc)),p(0x3,_0x1024f5(_0x500c18))],S);const z=_0x5af817(0x1f9),M={};var k=Object[_0x5af817(0x207)],Q=(_0x2787e9,_0x2a84de,_0x40082e,_0x3cea38)=>{for(var _0x294357=_0x3cea38>0x1?void 0x0:_0x3cea38?k(_0x2a84de,_0x40082e):_0x2a84de,_0x43f81f=_0x2787e9['length']-0x1,_0x8d983a;_0x43f81f>=0x0;_0x43f81f--)(_0x8d983a=_0x2787e9[_0x43f81f])&&(_0x294357=_0x8d983a(_0x294357)||_0x294357);return _0x294357;},_=(_0x53befe,_0x10ebfb)=>(_0x260bbb,_0x7ddaff)=>_0x10ebfb(_0x260bbb,_0x7ddaff,_0x53befe);function X(_0xf02a6a,_0x19896b){const _0x6eb1a3=_0x5af817,_0x25efa7=_0xf02a6a['replies'][0x0];return{..._0x19896b,'id':_0x25efa7[_0x6eb1a3(0x20a)],'resolved':_0xf02a6a[_0x6eb1a3(0x1d9)]===0x1,'dT':D(_0x25efa7['createTimestamp']),'personId':_0x25efa7[_0x6eb1a3(0x20e)],'threadId':_0x25efa7[_0x6eb1a3(0x1c1)]};}function ee(_0x53718d,_0x47e15a,_0x2ec43d){const _0x1e4213=_0x5af817;var _0x5d485c,_0x9f0f78;if(((_0x9f0f78=(_0x5d485c=_0x53718d==null?void 0x0:_0x53718d['replies'])==null?void 0x0:_0x5d485c[_0x1e4213(0x1f3)])!=null?_0x9f0f78:0x0)>0x0){const _0x231253=(_0x779f3e,_0x41a5aa)=>({'id':_0x779f3e[_0x1e4213(0x20a)],'threadId':_0x779f3e[_0x1e4213(0x1c1)],'dT':D(_0x779f3e[_0x1e4213(0x1fe)]),'personId':_0x779f3e[_0x1e4213(0x20e)],'resolved':_0x53718d[_0x1e4213(0x1d9)]===I[_0x1e4213(0x1da)],'unitId':_0x47e15a,'subUnitId':_0x2ec43d,'text':JSON[_0x1e4213(0x1db)](_0x779f3e[_0x1e4213(0x1ec)]),'parentId':_0x41a5aa}),_0x236f50=_0x231253(_0x53718d[_0x1e4213(0x1c6)][0x0]);return{..._0x236f50,'children':_0x53718d[_0x1e4213(0x1c6)][_0x1e4213(0x1cc)](0x1)[_0x1e4213(0x1fa)](_0x6e3739=>_0x231253(_0x6e3739,_0x236f50['id']))};}return null;}let f=class{constructor(_0x59d1dc,_0x58580d,_0x47d25f,_0x1162ca){const _0x2c1b46=_0x5af817;this['_httpService']=_0x59d1dc,this['_userService']=_0x58580d,this[_0x2c1b46(0x1e4)]=_0x47d25f,this[_0x2c1b46(0x1b8)]=_0x1162ca;}async['addComment'](_0x4b49eb){const _0x17e06f=_0x5af817;var _0x21d4ab,_0x2d710b;const {parentId:_0x385a6e,unitId:_0x2b81ff,text:_0x2f9e47,threadId:_0x3312cf}=_0x4b49eb,_0x317f95=(_0x2d710b=(_0x21d4ab=_0x2f9e47['customRanges'])==null?void 0x0:_0x21d4ab[_0x17e06f(0x1c3)](_0x224cd9=>_0x224cd9[_0x17e06f(0x1f5)]===_0x1b28c6[_0x17e06f(0x1c9)])['map'](_0x22641d=>_0x22641d[_0x17e06f(0x1eb)]))!=null?_0x2d710b:[],_0x1555a1=JSON['stringify'](_0x2f9e47),_0x2ec2d7=(await this[_0x17e06f(0x1e4)][_0x17e06f(0x1ea)](_0x2b81ff))[_0x17e06f(0x1bb)]();if(_0x385a6e){const _0x39bb5e={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95,'threadId':_0x3312cf},_0x323498=(await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)]('/universer-api/comment/unit/'+_0x2b81ff+_0x17e06f(0x1bd),{'body':_0x39bb5e}))[_0x17e06f(0x1cd)][_0x17e06f(0x1bf)];return{..._0x4b49eb,'id':_0x323498['replyId'],'dT':_0x146095(+_0x323498[_0x17e06f(0x1fe)])['format'](_0x17e06f(0x1e2)),'personId':_0x323498[_0x17e06f(0x20e)]};}else{const _0x50c778={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95},_0x2a7732=await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)](_0x17e06f(0x209)+_0x2b81ff+'/add',{'body':_0x50c778});return X(_0x2a7732[_0x17e06f(0x1cd)][_0x17e06f(0x1d8)],_0x4b49eb);}}async['updateComment'](_0x4945ee){const _0x2de3fd=_0x5af817;var _0x48ebc6,_0x1c88ec;const {text:_0x485f86,unitId:_0x5a5ef4}=_0x4945ee,_0x254042=(_0x1c88ec=(_0x48ebc6=_0x485f86['customRanges'])==null?void 0x0:_0x48ebc6[_0x2de3fd(0x1c3)](_0x43c832=>_0x43c832[_0x2de3fd(0x1f5)]===_0x1b28c6['COMMENT'])[_0x2de3fd(0x1fa)](_0x12552d=>_0x12552d[_0x2de3fd(0x1eb)]))!=null?_0x1c88ec:[],_0x19e35f=JSON[_0x2de3fd(0x1d1)](_0x485f86),_0x1151a4=_0x4945ee[_0x2de3fd(0x1c1)],_0x33b77e=_0x4945ee['id'],_0x49cdaf={'memberId':(await this['_sessionService'][_0x2de3fd(0x1ea)](_0x5a5ef4))[_0x2de3fd(0x1bb)](),'unitId':_0x5a5ef4,'threadId':_0x1151a4,'mention':_0x254042,'content':_0x19e35f,'replyId':_0x33b77e},_0x2e1826=await this[_0x2de3fd(0x1c7)][_0x2de3fd(0x1f4)]('/universer-api/comment/unit/'+_0x5a5ef4+'/edit',{'body':_0x49cdaf});return!_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)]||_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)][_0x2de3fd(0x1e1)]===0x1;}async[_0x5af817(0x1f1)](_0x49d58a){const _0x3de162=_0x5af817,{unitId:_0x354fdb}=_0x49d58a,_0x33a349=_0x49d58a[_0x3de162(0x1c1)],_0x4d20b9={'memberId':this[_0x3de162(0x1d0)][_0x3de162(0x210)]()[_0x3de162(0x1ee)],'unitId':_0x354fdb,'threadId':_0x33a349,'solved':_0x49d58a[_0x3de162(0x1b6)]?I[_0x3de162(0x1da)]:I[_0x3de162(0x215)]},_0x35ffa2=await this[_0x3de162(0x1c7)][_0x3de162(0x1f4)]('/universer-api/comment/unit/'+_0x354fdb+'/solved',{'body':_0x4d20b9});return!_0x35ffa2['body'][_0x3de162(0x20b)]||_0x35ffa2['body']['error'][_0x3de162(0x1e1)]===0x1;}async[_0x5af817(0x1e8)](_0x23f4ec,_0x52bdba,_0x44a5eb,_0x3466f5){const _0x6ebf77=_0x5af817,_0x3cf0a8={'memberId':(await this[_0x6ebf77(0x1e4)]['requireSession'](_0x23f4ec))['getMemberID'](),'threadId':_0x44a5eb,'replyId':_0x3466f5,'unitId':_0x23f4ec},_0x3d309f=await this[_0x6ebf77(0x1c7)][_0x6ebf77(0x1f4)](_0x6ebf77(0x209)+_0x23f4ec+_0x6ebf77(0x1e5),{'body':_0x3cf0a8});return!_0x3d309f['body'][_0x6ebf77(0x20b)]||_0x3d309f[_0x6ebf77(0x1cd)]['error'][_0x6ebf77(0x1e1)]===0x1;}async[_0x5af817(0x1cb)](_0x4cd549,_0x2044f3,_0x182bf6){const _0xba06cb=_0x5af817,_0x726cb1={'unitId':_0x4cd549,'threadId':_0x182bf6},_0x2c2fd0=await this[_0xba06cb(0x1c7)][_0xba06cb(0x1f4)](_0xba06cb(0x209)+_0x4cd549+_0xba06cb(0x1fd),{'body':_0x726cb1}),_0x12e1d4=_0x182bf6['map'](_0x4dbb08=>ee(_0x2c2fd0['body'][_0xba06cb(0x213)][_0x4dbb08],_0x4cd549,_0x2044f3))[_0xba06cb(0x1c3)](Boolean);return Object[_0xba06cb(0x1d3)](_0x2c2fd0[_0xba06cb(0x1cd)][_0xba06cb(0x1ef)])['forEach'](_0x4b10db=>{const _0x4e4f29=_0xba06cb;this[_0x4e4f29(0x1d0)][_0x4e4f29(0x1e0)](_0x4b10db);}),_0x12e1d4;}[_0x5af817(0x1fb)](_0x4598dd){return{'id':_0x4598dd['id'],'threadId':_0x4598dd['threadId'],'ref':_0x4598dd['ref']};}};f=Q([_(0x0,_0x1024f5(_0x375401)),_(0x1,_0x1024f5(_0x253cfc)),_(0x2,_0x1024f5(_0x339043)),_(0x3,_0x1024f5(_0x500c18))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x54645e,_0x2f4f82,_0x119bd0,_0x4a8e0a)=>{const _0x753257=_0x5af817;for(var _0x3e084c=_0x4a8e0a>0x1?void 0x0:_0x4a8e0a?re(_0x2f4f82,_0x119bd0):_0x2f4f82,_0x5cb717=_0x54645e[_0x753257(0x1f3)]-0x1,_0x520c50;_0x5cb717>=0x0;_0x5cb717--)(_0x520c50=_0x54645e[_0x5cb717])&&(_0x3e084c=_0x520c50(_0x3e084c)||_0x3e084c);return _0x3e084c;},N=(_0x349013,_0x563dfd)=>(_0x518fd4,_0x2d68db)=>_0x563dfd(_0x518fd4,_0x2d68db,_0x349013);function _0x52b1(_0xa09449,_0x1cd1a7){const _0x461703=_0x4617();return _0x52b1=function(_0x52b153,_0x57cb9f){_0x52b153=_0x52b153-0x1b1;let _0x188f23=_0x461703[_0x52b153];return _0x188f23;},_0x52b1(_0xa09449,_0x1cd1a7);}let g=class extends _0x1a58c4{constructor(_0x101963,_0x458e6c){const _0x155773=_0x5af817;super(),this[_0x155773(0x1df)]=_0x101963,this[_0x155773(0x1e3)]=_0x458e6c,this['_initDataSource']();}[_0x5af817(0x204)](){const _0x25041d=_0x5af817;this['_threadCommentDataSourceService'][_0x25041d(0x1dd)]=this[_0x25041d(0x1e3)],this[_0x25041d(0x1df)][_0x25041d(0x214)]=!0x1;}};g=te([N(0x0,_0x31e088),N(0x1,_0x1024f5(f))],g);var se=Object[_0x5af817(0x203)],oe=Object[_0x5af817(0x207)],ne=(_0x4a1aae,_0x9989d2,_0x451eba)=>_0x9989d2 in _0x4a1aae?se(_0x4a1aae,_0x9989d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x451eba}):_0x4a1aae[_0x9989d2]=_0x451eba,ie=(_0x32358a,_0x5c1f3e,_0x35a4b7,_0x1125f0)=>{const _0x37a8cd=_0x5af817;for(var _0x512706=_0x1125f0>0x1?void 0x0:_0x1125f0?oe(_0x5c1f3e,_0x35a4b7):_0x5c1f3e,_0x567da2=_0x32358a[_0x37a8cd(0x1f3)]-0x1,_0x5be124;_0x567da2>=0x0;_0x567da2--)(_0x5be124=_0x32358a[_0x567da2])&&(_0x512706=_0x5be124(_0x512706)||_0x512706);return _0x512706;},w=(_0x18562c,_0x2c2433)=>(_0x4da58c,_0xcc80e)=>_0x2c2433(_0x4da58c,_0xcc80e,_0x18562c),$=(_0x1e39da,_0x2cf86d,_0x597d82)=>ne(_0x1e39da,typeof _0x2cf86d!=_0x5af817(0x212)?_0x2cf86d+'':_0x2cf86d,_0x597d82);let b=class extends _0x4977e9{constructor(_0xe46c66=M,_0x27c311,_0xed5db9){const _0x157754=_0x5af817;super(),this[_0x157754(0x201)]=_0xe46c66,this[_0x157754(0x1b8)]=_0x27c311,this[_0x157754(0x1c8)]=_0xed5db9;const {..._0x41be85}=_0x1a1e5e({},M,this[_0x157754(0x201)]);this['_configService'][_0x157754(0x1d6)](z,_0x41be85);}[_0x5af817(0x1f2)](){const _0x4636ac=_0x5af817;[[f],[g],[S]][_0x4636ac(0x208)](_0x3a33ad=>{this['_injector']['add'](_0x3a33ad);});}[_0x5af817(0x200)](){const _0xc29a83=_0x5af817;this[_0xc29a83(0x1b8)]['get'](g),this[_0xc29a83(0x1b8)][_0xc29a83(0x1c5)](S);}};$(b,_0x5af817(0x1f8),W),$(b,_0x5af817(0x1d7),_0x175b10['UNIVER_UNKNOWN']),b=ie([_0x17566a(_0x513b47,_0x2a0745,_0x40a7c8),w(0x1,_0x1024f5(_0x500c18)),w(0x2,_0x51ffa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1886(_0x5e0cba,_0x33f3d9){const _0x2ddd80=_0x2ddd();return _0x1886=function(_0x188607,_0x35377b){_0x188607=_0x188607-0x1e0;let _0x5a85f3=_0x2ddd80[_0x188607];return _0x5a85f3;},_0x1886(_0x5e0cba,_0x33f3d9);}function _0x2ddd(){const _0x5e8a1d=['/universer-api/user/list','find','UNRECOGNIZED','@univerjs-pro/collaboration-client','stringify','Inject','slice','Unknown','getComment','Plugin','onStarting','_configService','730863woHWtd','type','3knshiU','UserManagerService','@univerjs/core','UniverCollaborationClientPlugin','symbol','_initDataSource','getUser','customRanges','195BAnPMF','UniverThreadCommentUi','addUser','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','_initUserSync','5870zVQKGA','OpenOrReOpen','/add','addComment','content','16969AWoEyo','@univerjs/network','3448cLQQnS','post','rangeType','reply','pluginName','dataSource','disposeWithMe','Add','Disposable','UniverLicensePlugin','forEach','length','filter','map','Solved','@univerjs/thread-comment-ui','solved','replies','get','863308AkRiXS','IThreadCommentDataSourceService','3311QxOsJK','listComments','UniverThreadComment','_httpService','YYYY/MM/DD\x20HH:mm','getUnit','commentUpdate$','UniverCore','values','personId','rxjs','parentId','onReady','merge','Delete','/universer-api/comment/unit/','/list','syncUpdateMutationToColla','_threadCommentDataSourceService','updateComment','code','_config','@univerjs-pro/license','179158DXkWhn','subscribe','_threadCommentModel','rangeId','/solved','amd','dayjs','4807iMsoRb','comment','user','@univerjs/thread-comment','UNIVER_UNKNOWN','thread-comment-data-source.config','/edit','requireSession','pipe','_userService','bufferTime','Solve','userID','getOwnPropertyDescriptor','/reply','size','deleteComment','root','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ref','setConfig','resolved','saveCommentToSnapshot','threadId','HTTPService','error','comments','exports','parse','UniverProLicense','toStringTag','_sessionService','UniverInstanceType','CustomRangeType','function','createTimestamp','Module','Reply','7218wAvFEq','_init','getMemberID','replyId','_injector','add','body','Edit','object','users','Injector','COMMENT','resolveComment','DependentOn','delete'];_0x2ddd=function(){return _0x5e8a1d;};return _0x2ddd();}(function(_0x300401,_0x1cff33){const _0x5e9c95=_0x1886,_0x589ae3=_0x300401();while(!![]){try{const _0x310316=parseInt(_0x5e9c95(0x251))/0x1+-parseInt(_0x5e9c95(0x1f3))/0x2+parseInt(_0x5e9c95(0x23e))/0x3*(parseInt(_0x5e9c95(0x266))/0x4)+parseInt(_0x5e9c95(0x246))/0x5*(-parseInt(_0x5e9c95(0x221))/0x6)+-parseInt(_0x5e9c95(0x268))/0x7*(-parseInt(_0x5e9c95(0x253))/0x8)+parseInt(_0x5e9c95(0x23c))/0x9+-parseInt(_0x5e9c95(0x24c))/0xa*(parseInt(_0x5e9c95(0x1fa))/0xb);if(_0x310316===_0x1cff33)break;else _0x589ae3['push'](_0x589ae3['shift']());}catch(_0x19b070){_0x589ae3['push'](_0x589ae3['shift']());}}}(_0x2ddd,0x1e7b3),function(_0x369f64,_0x5511c7){const _0x25f841=_0x1886;typeof exports==_0x25f841(0x229)&&typeof module<'u'?_0x5511c7(exports,require('@univerjs-pro/collaboration-client'),require(_0x25f841(0x1f2)),require(_0x25f841(0x240)),require(_0x25f841(0x262)),require(_0x25f841(0x1fd)),require(_0x25f841(0x1e6)),require(_0x25f841(0x252))):typeof define==_0x25f841(0x21d)&&define[_0x25f841(0x1f8)]?define([_0x25f841(0x216),_0x25f841(0x233),_0x25f841(0x1f2),_0x25f841(0x240),'@univerjs/thread-comment-ui',_0x25f841(0x1fd),_0x25f841(0x1e6),_0x25f841(0x252)],_0x5511c7):(_0x369f64=typeof globalThis<'u'?globalThis:_0x369f64||self,_0x5511c7(_0x369f64['UniverProThreadCommentDatasource']={},_0x369f64['UniverProCollaborationClient'],_0x369f64[_0x25f841(0x218)],_0x369f64[_0x25f841(0x1e3)],_0x369f64[_0x25f841(0x247)],_0x369f64[_0x25f841(0x26a)],_0x369f64[_0x25f841(0x1e6)],_0x369f64['UniverNetwork']));}(this,function(_0x196c1b,_0x2ed30a,_0x4644ff,_0x53ea67,_0x32dfc5,_0x4d3a93,_0x3107a4,_0x1e6624){'use strict';const _0x8d8e3d=_0x1886;const _0x35b4e4=_0x8d8e3d(0x20d);var _0x5a5666=(_0x293727=>(_0x293727[_0x293727[_0x8d8e3d(0x24d)]=0x0]='OpenOrReOpen',_0x293727[_0x293727[_0x8d8e3d(0x261)]=0x1]='Solved',_0x293727[_0x293727[_0x8d8e3d(0x232)]=-0x1]=_0x8d8e3d(0x232),_0x293727))(_0x5a5666||{}),_0x2d65d6=(_0x45f08b=>(_0x45f08b[_0x45f08b['Unknown']=0x0]=_0x8d8e3d(0x237),_0x45f08b[_0x45f08b['Add']=0x1]='Add',_0x45f08b[_0x45f08b[_0x8d8e3d(0x220)]=0x2]='Reply',_0x45f08b[_0x45f08b[_0x8d8e3d(0x228)]=0x3]=_0x8d8e3d(0x228),_0x45f08b[_0x45f08b[_0x8d8e3d(0x1ea)]=0x4]=_0x8d8e3d(0x1ea),_0x45f08b[_0x45f08b['Solve']=0x5]=_0x8d8e3d(0x205),_0x45f08b[_0x45f08b[_0x8d8e3d(0x232)]=-0x1]=_0x8d8e3d(0x232),_0x45f08b))(_0x2d65d6||{});const _0x45ccb4=_0x519299=>_0x53ea67[_0x8d8e3d(0x1f9)](new Date(+_0x519299))['format'](_0x8d8e3d(0x1e0)),_0x4a4ee9=async(_0x95deda,_0x4ca90e)=>{const _0x4e1ab2=_0x8d8e3d,_0x1f929e=_0x95deda[_0x4e1ab2(0x265)](_0x53ea67[_0x4e1ab2(0x23f)]),_0x2cdfa3=_0x95deda['get'](_0x1e6624[_0x4e1ab2(0x213)]);_0x4ca90e[_0x4e1ab2(0x25d)](_0x401e8e=>{const _0x2b4d87=_0x4e1ab2;_0x1f929e[_0x2b4d87(0x244)](_0x401e8e)&&_0x4ca90e[_0x2b4d87(0x22f)](_0x401e8e);}),_0x4ca90e[_0x4e1ab2(0x209)]&&(await _0x2cdfa3['get'](_0x4e1ab2(0x230),{'params':{'userIDs':[..._0x4ca90e]}}))[_0x4e1ab2(0x227)][_0x4e1ab2(0x22a)][_0x4e1ab2(0x25d)](_0x5eb121=>{const _0x3c503b=_0x4e1ab2;_0x5eb121&&_0x1f929e[_0x3c503b(0x248)](_0x5eb121);});};var _0x2086ac=Object['getOwnPropertyDescriptor'],_0x1a23da=(_0x2b2786,_0x3b8e43,_0x6ddc9f,_0x56a35d)=>{const _0x404826=_0x8d8e3d;for(var _0x12c580=_0x56a35d>0x1?void 0x0:_0x56a35d?_0x2086ac(_0x3b8e43,_0x6ddc9f):_0x3b8e43,_0x5ac9fc=_0x2b2786[_0x404826(0x25e)]-0x1,_0x4aaf8c;_0x5ac9fc>=0x0;_0x5ac9fc--)(_0x4aaf8c=_0x2b2786[_0x5ac9fc])&&(_0x12c580=_0x4aaf8c(_0x12c580)||_0x12c580);return _0x12c580;},_0x18b178=(_0x13f69d,_0x2a2906)=>(_0x1e3ba9,_0x34587e)=>_0x2a2906(_0x1e3ba9,_0x34587e,_0x13f69d);let _0x40513c=class extends _0x53ea67[_0x8d8e3d(0x25b)]{constructor(_0xa12e6b,_0x2ea3f0,_0x56d5c2,_0x4ab0fd){const _0x347ba5=_0x8d8e3d;super(),this['_commentService']=_0xa12e6b,this[_0x347ba5(0x1f5)]=_0x2ea3f0,this[_0x347ba5(0x203)]=_0x56d5c2,this[_0x347ba5(0x225)]=_0x4ab0fd,this[_0x347ba5(0x222)](),this[_0x347ba5(0x24b)]();}[_0x8d8e3d(0x24b)](){const _0x1ad9a3=_0x8d8e3d;this[_0x1ad9a3(0x259)](this[_0x1ad9a3(0x1f5)][_0x1ad9a3(0x1e2)][_0x1ad9a3(0x202)](_0x3107a4[_0x1ad9a3(0x204)](0x10))[_0x1ad9a3(0x1f4)](_0xfe9991=>{const _0x20d8c9=_0x1ad9a3,_0x228835=new Set();_0xfe9991[_0x20d8c9(0x25d)](_0x4a0391=>{const _0x5cf748=_0x20d8c9;switch(_0x4a0391[_0x5cf748(0x23d)]){case _0x5cf748(0x226):{const _0x55dcc5=_0x4a0391['payload'][_0x5cf748(0x1e5)];_0x228835[_0x5cf748(0x226)](_0x55dcc5);break;}}}),_0x4a4ee9(this[_0x20d8c9(0x225)],_0x228835);}));}[_0x8d8e3d(0x222)](){const _0x354d97=_0x8d8e3d;this[_0x354d97(0x259)](this['_commentService'][_0x354d97(0x1e2)][_0x354d97(0x1f4)](async _0x3d73ee=>{const _0xea572b=_0x354d97;var _0x513ad1,_0x2420be,_0x581dd4,_0x362012;const _0x293775=(_0x513ad1=this['_threadCommentModel'][_0xea572b(0x1e1)](_0x3d73ee['unitId'])['find'](_0xb4229d=>_0xb4229d['threadId']===_0x3d73ee[_0xea572b(0x212)]))==null?void 0x0:_0x513ad1[_0xea572b(0x20b)];if(!_0x293775)return;const {unitId:_0x4d1554,subUnitId:_0x108128}=_0x293775;switch(_0x3d73ee['user']&&this['_userService'][_0xea572b(0x248)](_0x3d73ee['user']),_0x3d73ee[_0xea572b(0x23d)]){case _0x2d65d6[_0xea572b(0x25a)]:break;case _0x2d65d6[_0xea572b(0x220)]:{this[_0xea572b(0x1f5)][_0xea572b(0x24f)](_0x4d1554,_0x108128,{'unitId':_0x4d1554,'subUnitId':_0x108128,'ref':'','id':_0x3d73ee[_0xea572b(0x224)],'dT':_0x45ccb4(+_0x3d73ee[_0xea572b(0x21e)]),'threadId':_0x3d73ee[_0xea572b(0x212)],'personId':(_0x581dd4=(_0x2420be=_0x3d73ee[_0xea572b(0x1fc)])==null?void 0x0:_0x2420be[_0xea572b(0x206)])!=null?_0x581dd4:_0x3d73ee[_0xea572b(0x20c)],'text':JSON[_0xea572b(0x217)](_0x3d73ee['content']),'parentId':_0x293775['id']});break;}case _0x2d65d6['Delete']:{const _0x43cda5=this[_0xea572b(0x1f5)][_0xea572b(0x238)](_0x4d1554,_0x108128,_0x3d73ee[_0xea572b(0x224)]);_0x43cda5&&_0x43cda5[_0xea572b(0x1e7)]&&this[_0xea572b(0x1f5)][_0xea572b(0x20a)](_0x4d1554,_0x108128,_0x3d73ee['replyId']);break;}case _0x2d65d6[_0xea572b(0x228)]:{this['_threadCommentModel'][_0xea572b(0x1ef)](_0x4d1554,_0x108128,{'commentId':_0x3d73ee[_0xea572b(0x224)],'text':JSON[_0xea572b(0x217)](_0x3d73ee['content'])});break;}case _0x2d65d6['Solve']:{const _0x30e102=(_0x362012=this[_0xea572b(0x1f5)][_0xea572b(0x1e1)](_0x3d73ee['unitId'])[_0xea572b(0x231)](_0x2b29f1=>_0x2b29f1['threadId']===_0x3d73ee[_0xea572b(0x212)]))==null?void 0x0:_0x362012[_0xea572b(0x20b)];_0x30e102&&this[_0xea572b(0x1f5)][_0xea572b(0x22d)](_0x4d1554,_0x108128,_0x30e102['id'],_0x3d73ee[_0xea572b(0x263)]===_0x5a5666[_0xea572b(0x261)]);break;}}}));}};_0x40513c=_0x1a23da([_0x18b178(0x0,_0x53ea67[_0x8d8e3d(0x235)](_0x2ed30a['CommentService'])),_0x18b178(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x4d3a93['ThreadCommentModel'])),_0x18b178(0x2,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x23f)])),_0x18b178(0x3,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x22b)]))],_0x40513c);const _0x269bef=_0x8d8e3d(0x1ff),_0x4f14c7={};var _0x2d560b=Object[_0x8d8e3d(0x207)],_0xa7fee2=(_0x678999,_0x3c8462,_0x5a7df7,_0x16df7e)=>{const _0x2d5b38=_0x8d8e3d;for(var _0x288621=_0x16df7e>0x1?void 0x0:_0x16df7e?_0x2d560b(_0x3c8462,_0x5a7df7):_0x3c8462,_0x895872=_0x678999[_0x2d5b38(0x25e)]-0x1,_0x3bf4de;_0x895872>=0x0;_0x895872--)(_0x3bf4de=_0x678999[_0x895872])&&(_0x288621=_0x3bf4de(_0x288621)||_0x288621);return _0x288621;},_0x489a18=(_0x3009f3,_0x4fd032)=>(_0x12e650,_0x23e3e0)=>_0x4fd032(_0x12e650,_0x23e3e0,_0x3009f3);function _0xa66f79(_0x208436,_0x3f445e){const _0x45cc2c=_0x8d8e3d,_0x5bb00b=_0x208436[_0x45cc2c(0x264)][0x0];return{..._0x3f445e,'id':_0x5bb00b[_0x45cc2c(0x224)],'resolved':_0x208436[_0x45cc2c(0x263)]===0x1,'dT':_0x45ccb4(_0x5bb00b['createTimestamp']),'personId':_0x5bb00b[_0x45cc2c(0x20c)],'threadId':_0x5bb00b[_0x45cc2c(0x212)]};}function _0x1deb81(_0x284ffc,_0x19eb47,_0x2513cb){const _0x3fd048=_0x8d8e3d;var _0x3137c4,_0x5e8511;if(((_0x5e8511=(_0x3137c4=_0x284ffc==null?void 0x0:_0x284ffc[_0x3fd048(0x264)])==null?void 0x0:_0x3137c4[_0x3fd048(0x25e)])!=null?_0x5e8511:0x0)>0x0){const _0x2ef2f4=(_0x2deb92,_0x40fddf)=>({'id':_0x2deb92[_0x3fd048(0x224)],'threadId':_0x2deb92[_0x3fd048(0x212)],'dT':_0x45ccb4(_0x2deb92[_0x3fd048(0x21e)]),'personId':_0x2deb92[_0x3fd048(0x20c)],'resolved':_0x284ffc[_0x3fd048(0x263)]===_0x5a5666[_0x3fd048(0x261)],'unitId':_0x19eb47,'subUnitId':_0x2513cb,'text':JSON[_0x3fd048(0x217)](_0x2deb92[_0x3fd048(0x250)]),'parentId':_0x40fddf}),_0x4dc30c=_0x2ef2f4(_0x284ffc[_0x3fd048(0x264)][0x0]);return{..._0x4dc30c,'children':_0x284ffc[_0x3fd048(0x264)][_0x3fd048(0x236)](0x1)[_0x3fd048(0x260)](_0x1e6c55=>_0x2ef2f4(_0x1e6c55,_0x4dc30c['id']))};}return null;}let _0x309cac=class{constructor(_0x20b2e4,_0x39c8f9,_0x27ccc8,_0x8774c4){const _0x36b956=_0x8d8e3d;this['_httpService']=_0x20b2e4,this[_0x36b956(0x203)]=_0x39c8f9,this[_0x36b956(0x21a)]=_0x27ccc8,this[_0x36b956(0x225)]=_0x8774c4;}async[_0x8d8e3d(0x24f)](_0x536a37){const _0x871a3a=_0x8d8e3d;var _0x1dd18e,_0x50e4b8;const {parentId:_0x5aec9c,unitId:_0x102a3f,text:_0x54485b,threadId:_0x3738b7}=_0x536a37,_0x104b8c=(_0x50e4b8=(_0x1dd18e=_0x54485b[_0x871a3a(0x245)])==null?void 0x0:_0x1dd18e['filter'](_0x5ed00e=>_0x5ed00e[_0x871a3a(0x255)]===_0x53ea67[_0x871a3a(0x21c)][_0x871a3a(0x22c)])[_0x871a3a(0x260)](_0x479efd=>_0x479efd[_0x871a3a(0x1f6)]))!=null?_0x50e4b8:[],_0x518544=JSON[_0x871a3a(0x234)](_0x54485b),_0x2c0255=(await this[_0x871a3a(0x21a)][_0x871a3a(0x201)](_0x102a3f))[_0x871a3a(0x223)]();if(_0x5aec9c){const _0x34094c={'memberId':_0x2c0255,'unitId':_0x102a3f,'content':_0x518544,'mention':_0x104b8c,'threadId':_0x3738b7},_0x418e65=(await this[_0x871a3a(0x26b)][_0x871a3a(0x254)]('/universer-api/comment/unit/'+_0x102a3f+_0x871a3a(0x208),{'body':_0x34094c}))['body'][_0x871a3a(0x256)];return{..._0x536a37,'id':_0x418e65[_0x871a3a(0x224)],'dT':_0x53ea67[_0x871a3a(0x1f9)](+_0x418e65['createTimestamp'])['format'](_0x871a3a(0x1e0)),'personId':_0x418e65[_0x871a3a(0x20c)]};}else{const _0x1134d9={'memberId':_0x2c0255,'unitId':_0x102a3f,'content':_0x518544,'mention':_0x104b8c},_0x4cbe3d=await this[_0x871a3a(0x26b)][_0x871a3a(0x254)](_0x871a3a(0x1eb)+_0x102a3f+_0x871a3a(0x24e),{'body':_0x1134d9});return _0xa66f79(_0x4cbe3d[_0x871a3a(0x227)][_0x871a3a(0x1fb)],_0x536a37);}}async[_0x8d8e3d(0x1ef)](_0x33e6a1){const _0x197984=_0x8d8e3d;var _0xd58beb,_0x142023;const {text:_0x4e8a20,unitId:_0x1e9337}=_0x33e6a1,_0x2728fa=(_0x142023=(_0xd58beb=_0x4e8a20['customRanges'])==null?void 0x0:_0xd58beb['filter'](_0x3306aa=>_0x3306aa[_0x197984(0x255)]===_0x53ea67[_0x197984(0x21c)]['COMMENT'])[_0x197984(0x260)](_0x1a46e9=>_0x1a46e9[_0x197984(0x1f6)]))!=null?_0x142023:[],_0x1f869b=JSON[_0x197984(0x234)](_0x4e8a20),_0x2e75e1=_0x33e6a1[_0x197984(0x212)],_0x15d194=_0x33e6a1['id'],_0x460dd6={'memberId':(await this[_0x197984(0x21a)][_0x197984(0x201)](_0x1e9337))[_0x197984(0x223)](),'unitId':_0x1e9337,'threadId':_0x2e75e1,'mention':_0x2728fa,'content':_0x1f869b,'replyId':_0x15d194},_0x2a5f81=await this['_httpService'][_0x197984(0x254)](_0x197984(0x1eb)+_0x1e9337+_0x197984(0x200),{'body':_0x460dd6});return!_0x2a5f81[_0x197984(0x227)]['error']||_0x2a5f81[_0x197984(0x227)][_0x197984(0x214)][_0x197984(0x1f0)]===0x1;}async[_0x8d8e3d(0x22d)](_0x483376){const _0x173fac=_0x8d8e3d,{unitId:_0x3dbb49}=_0x483376,_0x11d1ba=_0x483376[_0x173fac(0x212)],_0x56535e={'memberId':this[_0x173fac(0x203)]['getCurrentUser']()[_0x173fac(0x206)],'unitId':_0x3dbb49,'threadId':_0x11d1ba,'solved':_0x483376[_0x173fac(0x210)]?_0x5a5666['Solved']:_0x5a5666[_0x173fac(0x24d)]},_0x321d57=await this[_0x173fac(0x26b)][_0x173fac(0x254)](_0x173fac(0x1eb)+_0x3dbb49+_0x173fac(0x1f7),{'body':_0x56535e});return!_0x321d57[_0x173fac(0x227)]['error']||_0x321d57[_0x173fac(0x227)]['error'][_0x173fac(0x1f0)]===0x1;}async[_0x8d8e3d(0x20a)](_0x59b818,_0x1e73fe,_0x346667,_0x32ee47){const _0x5b3e84=_0x8d8e3d,_0x27cb76={'memberId':(await this['_sessionService']['requireSession'](_0x59b818))['getMemberID'](),'threadId':_0x346667,'replyId':_0x32ee47,'unitId':_0x59b818},_0x4ed956=await this[_0x5b3e84(0x26b)][_0x5b3e84(0x254)](_0x5b3e84(0x1eb)+_0x59b818+'/delete',{'body':_0x27cb76});return!_0x4ed956[_0x5b3e84(0x227)][_0x5b3e84(0x214)]||_0x4ed956['body'][_0x5b3e84(0x214)]['code']===0x1;}async[_0x8d8e3d(0x269)](_0x39fdc2,_0x2289b5,_0x30db5d){const _0x699f1f=_0x8d8e3d,_0x569ee4={'unitId':_0x39fdc2,'threadId':_0x30db5d},_0x5f49ae=await this[_0x699f1f(0x26b)][_0x699f1f(0x254)]('/universer-api/comment/unit/'+_0x39fdc2+_0x699f1f(0x1ec),{'body':_0x569ee4}),_0x222862=_0x30db5d['map'](_0x25925e=>_0x1deb81(_0x5f49ae[_0x699f1f(0x227)][_0x699f1f(0x215)][_0x25925e],_0x39fdc2,_0x2289b5))[_0x699f1f(0x25f)](Boolean);return Object[_0x699f1f(0x1e4)](_0x5f49ae[_0x699f1f(0x227)][_0x699f1f(0x22a)])[_0x699f1f(0x25d)](_0x4225e8=>{const _0x4ca643=_0x699f1f;this[_0x4ca643(0x203)][_0x4ca643(0x248)](_0x4225e8);}),_0x222862;}[_0x8d8e3d(0x211)](_0x4c5b61){const _0x2d854c=_0x8d8e3d;return{'id':_0x4c5b61['id'],'threadId':_0x4c5b61[_0x2d854c(0x212)],'ref':_0x4c5b61[_0x2d854c(0x20e)]};}};_0x309cac=_0xa7fee2([_0x489a18(0x0,_0x53ea67[_0x8d8e3d(0x235)](_0x1e6624[_0x8d8e3d(0x213)])),_0x489a18(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x23f)])),_0x489a18(0x2,_0x53ea67[_0x8d8e3d(0x235)](_0x2ed30a['CollaborationSessionService'])),_0x489a18(0x3,_0x53ea67['Inject'](_0x53ea67[_0x8d8e3d(0x22b)]))],_0x309cac);var _0x5e2c06=Object[_0x8d8e3d(0x207)],_0x2177c4=(_0xfbb8b8,_0x3f5db0,_0x30b707,_0x225dcb)=>{const _0x40ba87=_0x8d8e3d;for(var _0x56f477=_0x225dcb>0x1?void 0x0:_0x225dcb?_0x5e2c06(_0x3f5db0,_0x30b707):_0x3f5db0,_0x48f39a=_0xfbb8b8[_0x40ba87(0x25e)]-0x1,_0x505a64;_0x48f39a>=0x0;_0x48f39a--)(_0x505a64=_0xfbb8b8[_0x48f39a])&&(_0x56f477=_0x505a64(_0x56f477)||_0x56f477);return _0x56f477;},_0xe4d41f=(_0x221f06,_0x26e419)=>(_0x18aeec,_0x5db64a)=>_0x26e419(_0x18aeec,_0x5db64a,_0x221f06);let _0x2219be=class extends _0x53ea67[_0x8d8e3d(0x25b)]{constructor(_0x515812,_0xe87665){const _0x531c26=_0x8d8e3d;super(),this[_0x531c26(0x1ee)]=_0x515812,this[_0x531c26(0x249)]=_0xe87665,this[_0x531c26(0x243)]();}[_0x8d8e3d(0x243)](){const _0x4973dc=_0x8d8e3d;this[_0x4973dc(0x1ee)][_0x4973dc(0x258)]=this['_threadCommentDataSource'],this[_0x4973dc(0x1ee)][_0x4973dc(0x1ed)]=!0x1;}};_0x2219be=_0x2177c4([_0xe4d41f(0x0,_0x4d3a93[_0x8d8e3d(0x267)]),_0xe4d41f(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x309cac))],_0x2219be);var _0x9be933=Object['defineProperty'],_0xdbe7bc=Object[_0x8d8e3d(0x207)],_0x3f13c1=(_0x4dcf6e,_0x424319,_0x8dd5ce)=>_0x424319 in _0x4dcf6e?_0x9be933(_0x4dcf6e,_0x424319,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8dd5ce}):_0x4dcf6e[_0x424319]=_0x8dd5ce,_0x817ce2=(_0x3db1e6,_0x220de8,_0x2ab4df,_0x4898b5)=>{const _0x58190a=_0x8d8e3d;for(var _0x44df17=_0x4898b5>0x1?void 0x0:_0x4898b5?_0xdbe7bc(_0x220de8,_0x2ab4df):_0x220de8,_0x607ecc=_0x3db1e6[_0x58190a(0x25e)]-0x1,_0x43b042;_0x607ecc>=0x0;_0x607ecc--)(_0x43b042=_0x3db1e6[_0x607ecc])&&(_0x44df17=_0x43b042(_0x44df17)||_0x44df17);return _0x44df17;},_0x20b68c=(_0x310fb6,_0xd74139)=>(_0x3dbd7c,_0x5f2054)=>_0xd74139(_0x3dbd7c,_0x5f2054,_0x310fb6),_0x1dc1a9=(_0x4981dc,_0x58444f,_0x16732f)=>_0x3f13c1(_0x4981dc,typeof _0x58444f!=_0x8d8e3d(0x242)?_0x58444f+'':_0x58444f,_0x16732f);_0x196c1b[_0x8d8e3d(0x24a)]=class extends _0x53ea67[_0x8d8e3d(0x239)]{constructor(_0x511919=_0x4f14c7,_0x5ece5a,_0x2bc700){const _0x1a1526=_0x8d8e3d;super(),this[_0x1a1526(0x1f1)]=_0x511919,this[_0x1a1526(0x225)]=_0x5ece5a,this[_0x1a1526(0x23b)]=_0x2bc700;const {..._0x5d10a7}=_0x53ea67[_0x1a1526(0x1e9)]({},_0x4f14c7,this[_0x1a1526(0x1f1)]);this[_0x1a1526(0x23b)][_0x1a1526(0x20f)](_0x269bef,_0x5d10a7);}[_0x8d8e3d(0x23a)](){const _0x54ac1b=_0x8d8e3d;[[_0x309cac],[_0x2219be],[_0x40513c]][_0x54ac1b(0x25d)](_0x309e3a=>{const _0x29ba6a=_0x54ac1b;this[_0x29ba6a(0x225)][_0x29ba6a(0x226)](_0x309e3a);});}[_0x8d8e3d(0x1e8)](){const _0x500209=_0x8d8e3d;this[_0x500209(0x225)][_0x500209(0x265)](_0x2219be),this[_0x500209(0x225)][_0x500209(0x265)](_0x40513c);}},_0x1dc1a9(_0x196c1b[_0x8d8e3d(0x24a)],_0x8d8e3d(0x257),_0x35b4e4),_0x1dc1a9(_0x196c1b['UniverThreadCommentDataSourcePlugin'],'type',_0x53ea67[_0x8d8e3d(0x21b)][_0x8d8e3d(0x1fe)]),_0x196c1b[_0x8d8e3d(0x24a)]=_0x817ce2([_0x53ea67[_0x8d8e3d(0x22e)](_0x32dfc5['UniverThreadCommentUIPlugin'],_0x2ed30a[_0x8d8e3d(0x241)],_0x4644ff[_0x8d8e3d(0x25c)]),_0x20b68c(0x1,_0x53ea67['Inject'](_0x53ea67[_0x8d8e3d(0x22b)])),_0x20b68c(0x2,_0x53ea67['IConfigService'])],_0x196c1b[_0x8d8e3d(0x24a)]),Object['defineProperty'](_0x196c1b,Symbol[_0x8d8e3d(0x219)],{'value':_0x8d8e3d(0x21f)});}));
|
|
1
|
+
function _0x3487(){const _0x3163c0=['Disposable','disposeWithMe','Inject','COMMENT','UniverInstanceType','userID','UniverProThreadCommentDatasource','3322066cBVOte','pipe','createTimestamp','/list','content','delete','replies','Unknown','parse','@univerjs-pro/collaboration-client','type','get','_injector','function','users','getUser','unitId','_init','addComment','Add','UniverProCollaborationClient','UNRECOGNIZED','@univerjs-pro/license','UniverNetwork','deleteComment','add','UniverProLicense','552lnOzGs','syncUpdateMutationToColla','_threadCommentDataSource','UniverCore','_threadCommentDataSourceService','OpenOrReOpen','63265MeawpW','ThreadCommentModel','@univerjs/network','replyId','CollaborationSessionService','UserManagerService','filter','885768cSrkmF','Solve','solved','bufferTime','UniverThreadCommentDataSourcePlugin','resolveComment','ref','userId','format','Reply','_sessionService','map','rxjs','customRanges','commentUpdate$','35lQEKLq','HTTPService','object','/edit','63NVTcui','DependentOn','1618932NotOwv','CommentService','/solved','1781454GRKHZt','_initUserSync','requireSession','onStarting','/universer-api/user/list','Injector','@univerjs/thread-comment','IThreadCommentDataSourceService','rangeId','Edit','subscribe','_config','UniverThreadCommentUi','setConfig','toStringTag','Plugin','user','_threadCommentModel','threadId','UNIVER_UNKNOWN','_configService','UniverLicensePlugin','Solved','Module','_httpService','error','dayjs','getOwnPropertyDescriptor','/universer-api/comment/unit/','Delete','length','personId','_userService','stringify','CustomRangeType','code','getUnit','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','dataSource','exports','@univerjs/thread-comment-ui','/delete','rangeType','getMemberID','addUser','find','resolved','comment','YYYY/MM/DD\x20HH:mm','payload','_commentService','1121032XrEGoc','comments','updateComment','_initDataSource','post','body','18827260JMkbij','/add','@univerjs/core','IConfigService','saveCommentToSnapshot'];_0x3487=function(){return _0x3163c0;};return _0x3487();}function _0x1c40(_0xb18155,_0x2426f1){const _0x34878=_0x3487();return _0x1c40=function(_0x1c4017,_0x47ba14){_0x1c4017=_0x1c4017-0x1e6;let _0x283407=_0x34878[_0x1c4017];return _0x283407;},_0x1c40(_0xb18155,_0x2426f1);}(function(_0x328de8,_0x4c849d){const _0x5348e9=_0x1c40,_0x4517c6=_0x328de8();while(!![]){try{const _0x1bb978=parseInt(_0x5348e9(0x211))/0x1+-parseInt(_0x5348e9(0x1e9))/0x2+parseInt(_0x5348e9(0x226))/0x3+parseInt(_0x5348e9(0x204))/0x4*(parseInt(_0x5348e9(0x20a))/0x5)+-parseInt(_0x5348e9(0x229))/0x6*(parseInt(_0x5348e9(0x220))/0x7)+parseInt(_0x5348e9(0x25e))/0x8*(-parseInt(_0x5348e9(0x224))/0x9)+parseInt(_0x5348e9(0x264))/0xa;if(_0x1bb978===_0x4c849d)break;else _0x4517c6['push'](_0x4517c6['shift']());}catch(_0x399d1c){_0x4517c6['push'](_0x4517c6['shift']());}}}(_0x3487,0xe281b),function(_0xb5a40b,_0x2dd89a){const _0x25e210=_0x1c40;typeof exports==_0x25e210(0x222)&&typeof module<'u'?_0x2dd89a(exports,require(_0x25e210(0x1f2)),require(_0x25e210(0x1ff)),require('@univerjs/core'),require(_0x25e210(0x253)),require(_0x25e210(0x22f)),require(_0x25e210(0x21d)),require(_0x25e210(0x20c))):typeof define==_0x25e210(0x1f6)&&define['amd']?define([_0x25e210(0x252),_0x25e210(0x1f2),_0x25e210(0x1ff),_0x25e210(0x266),_0x25e210(0x253),'@univerjs/thread-comment',_0x25e210(0x21d),_0x25e210(0x20c)],_0x2dd89a):(_0xb5a40b=typeof globalThis<'u'?globalThis:_0xb5a40b||self,_0x2dd89a(_0xb5a40b[_0x25e210(0x1e8)]={},_0xb5a40b[_0x25e210(0x1fd)],_0xb5a40b[_0x25e210(0x203)],_0xb5a40b[_0x25e210(0x207)],_0xb5a40b[_0x25e210(0x235)],_0xb5a40b['UniverThreadComment'],_0xb5a40b[_0x25e210(0x21d)],_0xb5a40b[_0x25e210(0x200)]));}(this,function(_0x21899b,_0x83ca68,_0x4f112c,_0x4b52b9,_0x573dab,_0x2c735f,_0xe71d3e,_0x1aa170){'use strict';const _0x4f1928=_0x1c40;const _0x2b103d=_0x4f1928(0x24f);var _0x45bf40=(_0x158283=>(_0x158283[_0x158283[_0x4f1928(0x209)]=0x0]='OpenOrReOpen',_0x158283[_0x158283[_0x4f1928(0x23f)]=0x1]=_0x4f1928(0x23f),_0x158283[_0x158283[_0x4f1928(0x1fe)]=-0x1]=_0x4f1928(0x1fe),_0x158283))(_0x45bf40||{}),_0x519e78=(_0x17ba78=>(_0x17ba78[_0x17ba78[_0x4f1928(0x1f0)]=0x0]=_0x4f1928(0x1f0),_0x17ba78[_0x17ba78['Add']=0x1]=_0x4f1928(0x1fc),_0x17ba78[_0x17ba78[_0x4f1928(0x21a)]=0x2]='Reply',_0x17ba78[_0x17ba78[_0x4f1928(0x232)]=0x3]=_0x4f1928(0x232),_0x17ba78[_0x17ba78[_0x4f1928(0x246)]=0x4]='Delete',_0x17ba78[_0x17ba78[_0x4f1928(0x212)]=0x5]='Solve',_0x17ba78[_0x17ba78[_0x4f1928(0x1fe)]=-0x1]='UNRECOGNIZED',_0x17ba78))(_0x519e78||{});const _0x2a7f10=_0x36d0f3=>_0x4b52b9[_0x4f1928(0x243)](new Date(+_0x36d0f3))[_0x4f1928(0x219)]('YYYY/MM/DD\x20HH:mm'),_0x53230c=async(_0x343527,_0xc3c108)=>{const _0x313b0a=_0x4f1928,_0xbfac9f=_0x343527[_0x313b0a(0x1f4)](_0x4b52b9[_0x313b0a(0x20f)]),_0x34c43b=_0x343527['get'](_0x1aa170[_0x313b0a(0x221)]);_0xc3c108[_0x313b0a(0x24e)](_0xd07989=>{const _0x1a71d5=_0x313b0a;_0xbfac9f[_0x1a71d5(0x1f8)](_0xd07989)&&_0xc3c108[_0x1a71d5(0x1ee)](_0xd07989);}),_0xc3c108['size']&&(await _0x34c43b['get'](_0x313b0a(0x22d),{'params':{'userIDs':[..._0xc3c108]}}))[_0x313b0a(0x263)][_0x313b0a(0x1f7)][_0x313b0a(0x24e)](_0x23f885=>{const _0x17b2fa=_0x313b0a;_0x23f885&&_0xbfac9f[_0x17b2fa(0x257)](_0x23f885);});};var _0x5a952a=Object[_0x4f1928(0x244)],_0x1f898b=(_0x53818f,_0x4a0e4b,_0x26006b,_0x58baf7)=>{const _0x53766c=_0x4f1928;for(var _0x447679=_0x58baf7>0x1?void 0x0:_0x58baf7?_0x5a952a(_0x4a0e4b,_0x26006b):_0x4a0e4b,_0x2281de=_0x53818f[_0x53766c(0x247)]-0x1,_0x168812;_0x2281de>=0x0;_0x2281de--)(_0x168812=_0x53818f[_0x2281de])&&(_0x447679=_0x168812(_0x447679)||_0x447679);return _0x447679;},_0x55953f=(_0x1d8d2f,_0x4335a5)=>(_0x4e2867,_0x4c72e3)=>_0x4335a5(_0x4e2867,_0x4c72e3,_0x1d8d2f);let _0x3ba491=class extends _0x4b52b9[_0x4f1928(0x269)]{constructor(_0x561d26,_0x5775ed,_0xa5e5a1,_0x481091){const _0x4593ed=_0x4f1928;super(),this['_commentService']=_0x561d26,this[_0x4593ed(0x23a)]=_0x5775ed,this['_userService']=_0xa5e5a1,this[_0x4593ed(0x1f5)]=_0x481091,this['_init'](),this[_0x4593ed(0x22a)]();}[_0x4f1928(0x22a)](){const _0x5dc787=_0x4f1928;this[_0x5dc787(0x26a)](this[_0x5dc787(0x23a)]['commentUpdate$'][_0x5dc787(0x1ea)](_0xe71d3e[_0x5dc787(0x214)](0x10))[_0x5dc787(0x233)](_0x3af76e=>{const _0x5c46aa=_0x5dc787,_0x32b327=new Set();_0x3af76e['forEach'](_0x275330=>{const _0x774056=_0x1c40;switch(_0x275330['type']){case'add':{const _0xe6e794=_0x275330[_0x774056(0x25c)][_0x774056(0x248)];_0x32b327['add'](_0xe6e794);break;}}}),_0x53230c(this[_0x5c46aa(0x1f5)],_0x32b327);}));}[_0x4f1928(0x1fa)](){const _0x594ccc=_0x4f1928;this[_0x594ccc(0x26a)](this[_0x594ccc(0x25d)][_0x594ccc(0x21f)][_0x594ccc(0x233)](async _0x394bf0=>{const _0x29cd07=_0x594ccc;var _0x202136,_0xc741c9,_0x1611aa,_0x24be9a;const _0x3d5eca=(_0x202136=this[_0x29cd07(0x23a)][_0x29cd07(0x24d)](_0x394bf0[_0x29cd07(0x1f9)])[_0x29cd07(0x258)](_0x1a6163=>_0x1a6163[_0x29cd07(0x23b)]===_0x394bf0[_0x29cd07(0x23b)]))==null?void 0x0:_0x202136['root'];if(!_0x3d5eca)return;const {unitId:_0x461af1,subUnitId:_0xab02a9}=_0x3d5eca;switch(_0x394bf0[_0x29cd07(0x239)]&&this[_0x29cd07(0x249)][_0x29cd07(0x257)](_0x394bf0[_0x29cd07(0x239)]),_0x394bf0['type']){case _0x519e78[_0x29cd07(0x1fc)]:break;case _0x519e78[_0x29cd07(0x21a)]:{this['_threadCommentModel']['addComment'](_0x461af1,_0xab02a9,{'unitId':_0x461af1,'subUnitId':_0xab02a9,'ref':'','id':_0x394bf0[_0x29cd07(0x20d)],'dT':_0x2a7f10(+_0x394bf0[_0x29cd07(0x1eb)]),'threadId':_0x394bf0['threadId'],'personId':(_0x1611aa=(_0xc741c9=_0x394bf0[_0x29cd07(0x239)])==null?void 0x0:_0xc741c9[_0x29cd07(0x1e7)])!=null?_0x1611aa:_0x394bf0[_0x29cd07(0x218)],'text':JSON[_0x29cd07(0x1f1)](_0x394bf0['content']),'parentId':_0x3d5eca['id']});break;}case _0x519e78[_0x29cd07(0x246)]:{const _0x4c1501=this[_0x29cd07(0x23a)]['getComment'](_0x461af1,_0xab02a9,_0x394bf0[_0x29cd07(0x20d)]);_0x4c1501&&_0x4c1501['parentId']&&this[_0x29cd07(0x23a)][_0x29cd07(0x201)](_0x461af1,_0xab02a9,_0x394bf0[_0x29cd07(0x20d)]);break;}case _0x519e78[_0x29cd07(0x232)]:{this[_0x29cd07(0x23a)][_0x29cd07(0x260)](_0x461af1,_0xab02a9,{'commentId':_0x394bf0[_0x29cd07(0x20d)],'text':JSON[_0x29cd07(0x1f1)](_0x394bf0[_0x29cd07(0x1ed)])});break;}case _0x519e78[_0x29cd07(0x212)]:{const _0x1deec4=(_0x24be9a=this['_threadCommentModel']['getUnit'](_0x394bf0[_0x29cd07(0x1f9)])['find'](_0x109925=>_0x109925[_0x29cd07(0x23b)]===_0x394bf0[_0x29cd07(0x23b)]))==null?void 0x0:_0x24be9a['root'];_0x1deec4&&this[_0x29cd07(0x23a)][_0x29cd07(0x216)](_0x461af1,_0xab02a9,_0x1deec4['id'],_0x394bf0[_0x29cd07(0x213)]===_0x45bf40[_0x29cd07(0x23f)]);break;}}}));}};_0x3ba491=_0x1f898b([_0x55953f(0x0,_0x4b52b9[_0x4f1928(0x26b)](_0x83ca68[_0x4f1928(0x227)])),_0x55953f(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x2c735f[_0x4f1928(0x20b)])),_0x55953f(0x2,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x20f)])),_0x55953f(0x3,_0x4b52b9['Inject'](_0x4b52b9[_0x4f1928(0x22e)]))],_0x3ba491);const _0x3a0c95='thread-comment-data-source.config',_0x579913={};var _0x8b7eb5=Object[_0x4f1928(0x244)],_0x4f7e4d=(_0x443d3f,_0x100040,_0x659cc0,_0x38f699)=>{const _0x4bfad7=_0x4f1928;for(var _0x2dba2b=_0x38f699>0x1?void 0x0:_0x38f699?_0x8b7eb5(_0x100040,_0x659cc0):_0x100040,_0x4df26d=_0x443d3f[_0x4bfad7(0x247)]-0x1,_0x2d83eb;_0x4df26d>=0x0;_0x4df26d--)(_0x2d83eb=_0x443d3f[_0x4df26d])&&(_0x2dba2b=_0x2d83eb(_0x2dba2b)||_0x2dba2b);return _0x2dba2b;},_0x364744=(_0x2444d5,_0x366597)=>(_0x1fb914,_0x537a73)=>_0x366597(_0x1fb914,_0x537a73,_0x2444d5);function _0x4af0b4(_0x2fcd28,_0x1b107b){const _0x5709cd=_0x4f1928,_0x3c52c5=_0x2fcd28['replies'][0x0];return{..._0x1b107b,'id':_0x3c52c5[_0x5709cd(0x20d)],'resolved':_0x2fcd28[_0x5709cd(0x213)]===0x1,'dT':_0x2a7f10(_0x3c52c5[_0x5709cd(0x1eb)]),'personId':_0x3c52c5[_0x5709cd(0x218)],'threadId':_0x3c52c5[_0x5709cd(0x23b)]};}function _0x368d2f(_0x374488,_0x4e2c40,_0x41ccde){const _0x1a3881=_0x4f1928;var _0x3586c7,_0x46f883;if(((_0x46f883=(_0x3586c7=_0x374488==null?void 0x0:_0x374488[_0x1a3881(0x1ef)])==null?void 0x0:_0x3586c7['length'])!=null?_0x46f883:0x0)>0x0){const _0x364c1=(_0x5d155c,_0x1b4aa8)=>({'id':_0x5d155c[_0x1a3881(0x20d)],'threadId':_0x5d155c[_0x1a3881(0x23b)],'dT':_0x2a7f10(_0x5d155c[_0x1a3881(0x1eb)]),'personId':_0x5d155c[_0x1a3881(0x218)],'resolved':_0x374488['solved']===_0x45bf40['Solved'],'unitId':_0x4e2c40,'subUnitId':_0x41ccde,'text':JSON[_0x1a3881(0x1f1)](_0x5d155c[_0x1a3881(0x1ed)]),'parentId':_0x1b4aa8}),_0x30a47b=_0x364c1(_0x374488[_0x1a3881(0x1ef)][0x0]);return{..._0x30a47b,'children':_0x374488[_0x1a3881(0x1ef)]['slice'](0x1)[_0x1a3881(0x21c)](_0x4bb9f3=>_0x364c1(_0x4bb9f3,_0x30a47b['id']))};}return null;}let _0x2ffaf1=class{constructor(_0x5838cf,_0x414a58,_0xda22a1,_0x28d5d6){const _0x7add01=_0x4f1928;this[_0x7add01(0x241)]=_0x5838cf,this['_userService']=_0x414a58,this[_0x7add01(0x21b)]=_0xda22a1,this[_0x7add01(0x1f5)]=_0x28d5d6;}async[_0x4f1928(0x1fb)](_0x516b41){const _0x32b555=_0x4f1928;var _0x1a0463,_0x4d4921;const {parentId:_0x1ac395,unitId:_0x181067,text:_0x357cca,threadId:_0x2fa1a8}=_0x516b41,_0x12dea8=(_0x4d4921=(_0x1a0463=_0x357cca[_0x32b555(0x21e)])==null?void 0x0:_0x1a0463[_0x32b555(0x210)](_0x556e3c=>_0x556e3c[_0x32b555(0x255)]===_0x4b52b9['CustomRangeType'][_0x32b555(0x26c)])[_0x32b555(0x21c)](_0x317392=>_0x317392[_0x32b555(0x231)]))!=null?_0x4d4921:[],_0x4fa72c=JSON[_0x32b555(0x24a)](_0x357cca),_0x16d0b0=(await this['_sessionService'][_0x32b555(0x22b)](_0x181067))[_0x32b555(0x256)]();if(_0x1ac395){const _0x4c782f={'memberId':_0x16d0b0,'unitId':_0x181067,'content':_0x4fa72c,'mention':_0x12dea8,'threadId':_0x2fa1a8},_0x15aabb=(await this[_0x32b555(0x241)][_0x32b555(0x262)](_0x32b555(0x245)+_0x181067+'/reply',{'body':_0x4c782f}))[_0x32b555(0x263)]['reply'];return{..._0x516b41,'id':_0x15aabb['replyId'],'dT':_0x4b52b9[_0x32b555(0x243)](+_0x15aabb[_0x32b555(0x1eb)])[_0x32b555(0x219)](_0x32b555(0x25b)),'personId':_0x15aabb['userId']};}else{const _0x4c16b5={'memberId':_0x16d0b0,'unitId':_0x181067,'content':_0x4fa72c,'mention':_0x12dea8},_0x226818=await this[_0x32b555(0x241)]['post']('/universer-api/comment/unit/'+_0x181067+_0x32b555(0x265),{'body':_0x4c16b5});return _0x4af0b4(_0x226818[_0x32b555(0x263)][_0x32b555(0x25a)],_0x516b41);}}async[_0x4f1928(0x260)](_0x4c9ba0){const _0x168b1a=_0x4f1928;var _0x13f2af,_0x679827;const {text:_0x3e96db,unitId:_0x4d5599}=_0x4c9ba0,_0x24fb22=(_0x679827=(_0x13f2af=_0x3e96db['customRanges'])==null?void 0x0:_0x13f2af[_0x168b1a(0x210)](_0x188c9d=>_0x188c9d[_0x168b1a(0x255)]===_0x4b52b9[_0x168b1a(0x24b)][_0x168b1a(0x26c)])[_0x168b1a(0x21c)](_0x1d8eb=>_0x1d8eb[_0x168b1a(0x231)]))!=null?_0x679827:[],_0x3bb01a=JSON[_0x168b1a(0x24a)](_0x3e96db),_0x2891c8=_0x4c9ba0[_0x168b1a(0x23b)],_0x32a917=_0x4c9ba0['id'],_0x1513c3={'memberId':(await this[_0x168b1a(0x21b)][_0x168b1a(0x22b)](_0x4d5599))[_0x168b1a(0x256)](),'unitId':_0x4d5599,'threadId':_0x2891c8,'mention':_0x24fb22,'content':_0x3bb01a,'replyId':_0x32a917},_0x4518b0=await this[_0x168b1a(0x241)][_0x168b1a(0x262)](_0x168b1a(0x245)+_0x4d5599+_0x168b1a(0x223),{'body':_0x1513c3});return!_0x4518b0[_0x168b1a(0x263)][_0x168b1a(0x242)]||_0x4518b0['body']['error'][_0x168b1a(0x24c)]===0x1;}async[_0x4f1928(0x216)](_0x2dfc20){const _0x5ba600=_0x4f1928,{unitId:_0x165a20}=_0x2dfc20,_0x3fa8b5=_0x2dfc20['threadId'],_0x3a0268={'memberId':this[_0x5ba600(0x249)]['getCurrentUser']()['userID'],'unitId':_0x165a20,'threadId':_0x3fa8b5,'solved':_0x2dfc20[_0x5ba600(0x259)]?_0x45bf40[_0x5ba600(0x23f)]:_0x45bf40[_0x5ba600(0x209)]},_0x2d890=await this['_httpService'][_0x5ba600(0x262)](_0x5ba600(0x245)+_0x165a20+_0x5ba600(0x228),{'body':_0x3a0268});return!_0x2d890[_0x5ba600(0x263)]['error']||_0x2d890[_0x5ba600(0x263)][_0x5ba600(0x242)][_0x5ba600(0x24c)]===0x1;}async[_0x4f1928(0x201)](_0x4cb890,_0x4f288b,_0x23a3c4,_0x41bf13){const _0x4a8570=_0x4f1928,_0x1dee95={'memberId':(await this['_sessionService']['requireSession'](_0x4cb890))[_0x4a8570(0x256)](),'threadId':_0x23a3c4,'replyId':_0x41bf13,'unitId':_0x4cb890},_0x535fc2=await this[_0x4a8570(0x241)][_0x4a8570(0x262)](_0x4a8570(0x245)+_0x4cb890+_0x4a8570(0x254),{'body':_0x1dee95});return!_0x535fc2[_0x4a8570(0x263)][_0x4a8570(0x242)]||_0x535fc2[_0x4a8570(0x263)]['error'][_0x4a8570(0x24c)]===0x1;}async['listComments'](_0x2b962a,_0x6ef4ef,_0x3aeca1){const _0x28981d=_0x4f1928,_0x463a16={'unitId':_0x2b962a,'threadId':_0x3aeca1},_0x1baee2=await this[_0x28981d(0x241)][_0x28981d(0x262)]('/universer-api/comment/unit/'+_0x2b962a+_0x28981d(0x1ec),{'body':_0x463a16}),_0x233572=_0x3aeca1[_0x28981d(0x21c)](_0x3bceb5=>_0x368d2f(_0x1baee2['body'][_0x28981d(0x25f)][_0x3bceb5],_0x2b962a,_0x6ef4ef))[_0x28981d(0x210)](Boolean);return Object['values'](_0x1baee2['body'][_0x28981d(0x1f7)])['forEach'](_0x5bfcb6=>{const _0x5a5533=_0x28981d;this[_0x5a5533(0x249)]['addUser'](_0x5bfcb6);}),_0x233572;}[_0x4f1928(0x268)](_0x32fc64){const _0x3b738b=_0x4f1928;return{'id':_0x32fc64['id'],'threadId':_0x32fc64['threadId'],'ref':_0x32fc64[_0x3b738b(0x217)]};}};_0x2ffaf1=_0x4f7e4d([_0x364744(0x0,_0x4b52b9[_0x4f1928(0x26b)](_0x1aa170[_0x4f1928(0x221)])),_0x364744(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x20f)])),_0x364744(0x2,_0x4b52b9['Inject'](_0x83ca68[_0x4f1928(0x20e)])),_0x364744(0x3,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x22e)]))],_0x2ffaf1);var _0x3060a5=Object[_0x4f1928(0x244)],_0x33f9fe=(_0x41e35f,_0x5bf352,_0x383b5b,_0x1ef93d)=>{const _0x42d8bf=_0x4f1928;for(var _0x277e38=_0x1ef93d>0x1?void 0x0:_0x1ef93d?_0x3060a5(_0x5bf352,_0x383b5b):_0x5bf352,_0x520994=_0x41e35f[_0x42d8bf(0x247)]-0x1,_0x5c92fe;_0x520994>=0x0;_0x520994--)(_0x5c92fe=_0x41e35f[_0x520994])&&(_0x277e38=_0x5c92fe(_0x277e38)||_0x277e38);return _0x277e38;},_0x4123e1=(_0x58bf51,_0x332ef6)=>(_0x595241,_0x253983)=>_0x332ef6(_0x595241,_0x253983,_0x58bf51);let _0x2e91ed=class extends _0x4b52b9[_0x4f1928(0x269)]{constructor(_0x39cf27,_0x2f067f){const _0x300524=_0x4f1928;super(),this['_threadCommentDataSourceService']=_0x39cf27,this[_0x300524(0x206)]=_0x2f067f,this[_0x300524(0x261)]();}[_0x4f1928(0x261)](){const _0x193773=_0x4f1928;this[_0x193773(0x208)][_0x193773(0x251)]=this['_threadCommentDataSource'],this[_0x193773(0x208)][_0x193773(0x205)]=!0x1;}};_0x2e91ed=_0x33f9fe([_0x4123e1(0x0,_0x2c735f[_0x4f1928(0x230)]),_0x4123e1(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x2ffaf1))],_0x2e91ed);var _0x2b67d5=Object['defineProperty'],_0x518bd9=Object['getOwnPropertyDescriptor'],_0x516d46=(_0x45829b,_0x52e461,_0x48f3cb)=>_0x52e461 in _0x45829b?_0x2b67d5(_0x45829b,_0x52e461,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48f3cb}):_0x45829b[_0x52e461]=_0x48f3cb,_0x25a3b2=(_0xda98de,_0x52bbdf,_0x2485df,_0x1e2b0e)=>{const _0x23a33c=_0x4f1928;for(var _0x98c622=_0x1e2b0e>0x1?void 0x0:_0x1e2b0e?_0x518bd9(_0x52bbdf,_0x2485df):_0x52bbdf,_0x379ff8=_0xda98de[_0x23a33c(0x247)]-0x1,_0x3f3baa;_0x379ff8>=0x0;_0x379ff8--)(_0x3f3baa=_0xda98de[_0x379ff8])&&(_0x98c622=_0x3f3baa(_0x98c622)||_0x98c622);return _0x98c622;},_0x19f10e=(_0x4a8cc1,_0x5e6f9d)=>(_0x342257,_0x21fe12)=>_0x5e6f9d(_0x342257,_0x21fe12,_0x4a8cc1),_0x2db56a=(_0xb1d47f,_0x2a40ff,_0x468f99)=>_0x516d46(_0xb1d47f,typeof _0x2a40ff!='symbol'?_0x2a40ff+'':_0x2a40ff,_0x468f99);_0x21899b[_0x4f1928(0x215)]=class extends _0x4b52b9[_0x4f1928(0x238)]{constructor(_0xa69be9=_0x579913,_0x109f99,_0x2af70d){const _0x116912=_0x4f1928;super(),this[_0x116912(0x234)]=_0xa69be9,this[_0x116912(0x1f5)]=_0x109f99,this[_0x116912(0x23d)]=_0x2af70d;const {..._0x3ecf7b}=_0x4b52b9['merge']({},_0x579913,this[_0x116912(0x234)]);this['_configService'][_0x116912(0x236)](_0x3a0c95,_0x3ecf7b);}[_0x4f1928(0x22c)](){[[_0x2ffaf1],[_0x2e91ed],[_0x3ba491]]['forEach'](_0x145de4=>{const _0x3341fd=_0x1c40;this[_0x3341fd(0x1f5)][_0x3341fd(0x202)](_0x145de4);});}['onReady'](){const _0x13d1bc=_0x4f1928;this[_0x13d1bc(0x1f5)][_0x13d1bc(0x1f4)](_0x2e91ed),this['_injector'][_0x13d1bc(0x1f4)](_0x3ba491);}},_0x2db56a(_0x21899b['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2b103d),_0x2db56a(_0x21899b[_0x4f1928(0x215)],_0x4f1928(0x1f3),_0x4b52b9[_0x4f1928(0x1e6)][_0x4f1928(0x23c)]),_0x21899b[_0x4f1928(0x215)]=_0x25a3b2([_0x4b52b9[_0x4f1928(0x225)](_0x573dab['UniverThreadCommentUIPlugin'],_0x83ca68['UniverCollaborationClientPlugin'],_0x4f112c[_0x4f1928(0x23e)]),_0x19f10e(0x1,_0x4b52b9['Inject'](_0x4b52b9[_0x4f1928(0x22e)])),_0x19f10e(0x2,_0x4b52b9[_0x4f1928(0x267)])],_0x21899b[_0x4f1928(0x215)]),Object[_0x4f1928(0x250)](_0x21899b,Symbol[_0x4f1928(0x237)],{'value':_0x4f1928(0x240)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
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/
|
|
49
|
-
"@univerjs-pro/
|
|
50
|
-
"@univerjs/core": "0.6.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.9",
|
|
49
|
+
"@univerjs-pro/license": "0.6.9",
|
|
50
|
+
"@univerjs/core": "0.6.9",
|
|
51
|
+
"@univerjs/network": "0.6.9",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.9",
|
|
51
53
|
"@univerjs/protocol": "0.1.45",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.8",
|
|
54
|
-
"@univerjs/thread-comment": "0.6.8"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.9"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
59
|
"vite": "^6.2.2",
|
|
60
60
|
"vitest": "^3.0.9",
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
61
|
+
"@univerjs-infra/shared": "0.6.9"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|