@univerjs-pro/thread-comment-datasource 0.6.8 → 0.6.9-experimental.20250406-d422c87
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 _0x2f010a=_0x8638;(function(_0xe8e210,_0x552ba6){const _0x28d707=_0x8638,_0x589dd0=_0xe8e210();while(!![]){try{const _0x2cb65d=-parseInt(_0x28d707(0x1bc))/0x1+parseInt(_0x28d707(0x19f))/0x2+parseInt(_0x28d707(0x1ee))/0x3*(parseInt(_0x28d707(0x1ad))/0x4)+-parseInt(_0x28d707(0x1cb))/0x5+parseInt(_0x28d707(0x1c4))/0x6*(-parseInt(_0x28d707(0x1c2))/0x7)+-parseInt(_0x28d707(0x1eb))/0x8*(-parseInt(_0x28d707(0x1f2))/0x9)+parseInt(_0x28d707(0x205))/0xa*(parseInt(_0x28d707(0x1b2))/0xb);if(_0x2cb65d===_0x552ba6)break;else _0x589dd0['push'](_0x589dd0['shift']());}catch(_0x39bd5c){_0x589dd0['push'](_0x589dd0['shift']());}}}(_0x186d,0x1e288));Object[_0x2f010a(0x1f3)](exports,Symbol[_0x2f010a(0x1e2)],{'value':'Module'});const b=require(_0x2f010a(0x1db)),T=require(_0x2f010a(0x194)),c=require(_0x2f010a(0x1b1)),j=require(_0x2f010a(0x1bb)),M=require(_0x2f010a(0x1b7)),w=require('rxjs'),P=require('@univerjs/network'),U=_0x2f010a(0x1d3);var I=(_0x5446ee=>(_0x5446ee[_0x5446ee[_0x2f010a(0x1ab)]=0x0]=_0x2f010a(0x1ab),_0x5446ee[_0x5446ee[_0x2f010a(0x1e5)]=0x1]=_0x2f010a(0x1e5),_0x5446ee[_0x5446ee[_0x2f010a(0x1ce)]=-0x1]='UNRECOGNIZED',_0x5446ee))(I||{}),v=(_0x540e8e=>(_0x540e8e[_0x540e8e[_0x2f010a(0x1ef)]=0x0]=_0x2f010a(0x1ef),_0x540e8e[_0x540e8e['Add']=0x1]=_0x2f010a(0x1b5),_0x540e8e[_0x540e8e[_0x2f010a(0x19b)]=0x2]=_0x2f010a(0x19b),_0x540e8e[_0x540e8e[_0x2f010a(0x1e1)]=0x3]=_0x2f010a(0x1e1),_0x540e8e[_0x540e8e['Delete']=0x4]=_0x2f010a(0x19d),_0x540e8e[_0x540e8e[_0x2f010a(0x1cc)]=0x5]=_0x2f010a(0x1cc),_0x540e8e[_0x540e8e['UNRECOGNIZED']=-0x1]=_0x2f010a(0x1ce),_0x540e8e))(v||{});const f=_0x40dcfa=>c[_0x2f010a(0x198)](new Date(+_0x40dcfa))['format'](_0x2f010a(0x1ec)),R=async(_0x368214,_0x359c3e)=>{const _0x2391b1=_0x2f010a,_0x82f93=_0x368214['get'](c[_0x2391b1(0x197)]),_0x288f10=_0x368214[_0x2391b1(0x209)](P[_0x2391b1(0x1d5)]);_0x359c3e[_0x2391b1(0x1a4)](_0xcfd964=>{const _0x1ab426=_0x2391b1;_0x82f93[_0x1ab426(0x1a7)](_0xcfd964)&&_0x359c3e[_0x1ab426(0x1b6)](_0xcfd964);}),_0x359c3e[_0x2391b1(0x196)]&&(await _0x288f10[_0x2391b1(0x209)](_0x2391b1(0x1af),{'params':{'userIDs':[..._0x359c3e]}}))['body'][_0x2391b1(0x1b0)]['forEach'](_0x29f538=>{_0x29f538&&_0x82f93['addUser'](_0x29f538);});};var $=Object[_0x2f010a(0x1c9)],E=(_0x555486,_0x26749c,_0x1d763e,_0x5b8d8e)=>{for(var _0x5cbb8f=_0x5b8d8e>0x1?void 0x0:_0x5b8d8e?$(_0x26749c,_0x1d763e):_0x26749c,_0x332c19=_0x555486['length']-0x1,_0x52611;_0x332c19>=0x0;_0x332c19--)(_0x52611=_0x555486[_0x332c19])&&(_0x5cbb8f=_0x52611(_0x5cbb8f)||_0x5cbb8f);return _0x5cbb8f;},S=(_0xe37a0e,_0xa53b01)=>(_0x269ae7,_0x422022)=>_0xa53b01(_0x269ae7,_0x422022,_0xe37a0e);let p=class extends c[_0x2f010a(0x1d8)]{constructor(_0x26c478,_0x3f407e,_0x5d2f20,_0x5b6e06){const _0x125f1a=_0x2f010a;super(),this[_0x125f1a(0x1f7)]=_0x26c478,this[_0x125f1a(0x1a2)]=_0x3f407e,this[_0x125f1a(0x1ae)]=_0x5d2f20,this[_0x125f1a(0x200)]=_0x5b6e06,this['_init'](),this[_0x125f1a(0x1d6)]();}[_0x2f010a(0x1d6)](){const _0xa4d844=_0x2f010a;this[_0xa4d844(0x1df)](this['_threadCommentModel'][_0xa4d844(0x1f6)][_0xa4d844(0x1e6)](w[_0xa4d844(0x195)](0x10))['subscribe'](_0xca32cd=>{const _0x1e41a9=_0xa4d844,_0x1bd7e8=new Set();_0xca32cd[_0x1e41a9(0x1a4)](_0x50b54f=>{const _0xbf294c=_0x1e41a9;switch(_0x50b54f[_0xbf294c(0x1cf)]){case _0xbf294c(0x20b):{const _0xa748a4=_0x50b54f['payload'][_0xbf294c(0x1c3)];_0x1bd7e8[_0xbf294c(0x20b)](_0xa748a4);break;}}}),R(this['_injector'],_0x1bd7e8);}));}[_0x2f010a(0x1ff)](){const _0x54996c=_0x2f010a;this[_0x54996c(0x1df)](this['_commentService'][_0x54996c(0x1f6)][_0x54996c(0x19a)](async _0x3894f2=>{const _0xc3782b=_0x54996c;var _0x550f95,_0x2597e3,_0x30b044,_0xddbe35;const _0x341b98=(_0x550f95=this[_0xc3782b(0x1a2)][_0xc3782b(0x206)](_0x3894f2[_0xc3782b(0x1f4)])[_0xc3782b(0x203)](_0x9752ed=>_0x9752ed['threadId']===_0x3894f2['threadId']))==null?void 0x0:_0x550f95['root'];if(!_0x341b98)return;const {unitId:_0x38e269,subUnitId:_0x18f145}=_0x341b98;switch(_0x3894f2['user']&&this[_0xc3782b(0x1ae)][_0xc3782b(0x1fa)](_0x3894f2['user']),_0x3894f2[_0xc3782b(0x1cf)]){case v[_0xc3782b(0x1b5)]:break;case v[_0xc3782b(0x19b)]:{this['_threadCommentModel']['addComment'](_0x38e269,_0x18f145,{'unitId':_0x38e269,'subUnitId':_0x18f145,'ref':'','id':_0x3894f2[_0xc3782b(0x20d)],'dT':f(+_0x3894f2[_0xc3782b(0x1f5)]),'threadId':_0x3894f2['threadId'],'personId':(_0x30b044=(_0x2597e3=_0x3894f2[_0xc3782b(0x1a5)])==null?void 0x0:_0x2597e3[_0xc3782b(0x1da)])!=null?_0x30b044:_0x3894f2['userId'],'text':JSON[_0xc3782b(0x1e9)](_0x3894f2[_0xc3782b(0x1c7)]),'parentId':_0x341b98['id']});break;}case v[_0xc3782b(0x19d)]:{const _0x476045=this[_0xc3782b(0x1a2)]['getComment'](_0x38e269,_0x18f145,_0x3894f2[_0xc3782b(0x20d)]);_0x476045&&_0x476045[_0xc3782b(0x1a8)]&&this[_0xc3782b(0x1a2)][_0xc3782b(0x1b3)](_0x38e269,_0x18f145,_0x3894f2[_0xc3782b(0x20d)]);break;}case v[_0xc3782b(0x1e1)]:{this['_threadCommentModel'][_0xc3782b(0x1d4)](_0x38e269,_0x18f145,{'commentId':_0x3894f2[_0xc3782b(0x20d)],'text':JSON[_0xc3782b(0x1e9)](_0x3894f2['content'])});break;}case v[_0xc3782b(0x1cc)]:{const _0x4c8e36=(_0xddbe35=this['_threadCommentModel'][_0xc3782b(0x206)](_0x3894f2[_0xc3782b(0x1f4)])['find'](_0x3f9f63=>_0x3f9f63[_0xc3782b(0x19c)]===_0x3894f2[_0xc3782b(0x19c)]))==null?void 0x0:_0xddbe35[_0xc3782b(0x1f0)];_0x4c8e36&&this['_threadCommentModel'][_0xc3782b(0x1f9)](_0x38e269,_0x18f145,_0x4c8e36['id'],_0x3894f2[_0xc3782b(0x1d2)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x2f010a(0x1a3)](b['CommentService'])),S(0x1,c[_0x2f010a(0x1a3)](M[_0x2f010a(0x1e0)])),S(0x2,c['Inject'](c[_0x2f010a(0x197)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x2f010a(0x1c8),D={};function _0x8638(_0x847270,_0x34f883){const _0x186dc8=_0x186d();return _0x8638=function(_0x8638fd,_0x3478c1){_0x8638fd=_0x8638fd-0x193;let _0x278dff=_0x186dc8[_0x8638fd];return _0x278dff;},_0x8638(_0x847270,_0x34f883);}var A=Object[_0x2f010a(0x1c9)],x=(_0x38cc53,_0x59013e,_0x3b7b0c,_0x12d92b)=>{const _0x34c48d=_0x2f010a;for(var _0x4bd794=_0x12d92b>0x1?void 0x0:_0x12d92b?A(_0x59013e,_0x3b7b0c):_0x59013e,_0x19a2ce=_0x38cc53[_0x34c48d(0x1b9)]-0x1,_0x324fde;_0x19a2ce>=0x0;_0x19a2ce--)(_0x324fde=_0x38cc53[_0x19a2ce])&&(_0x4bd794=_0x324fde(_0x4bd794)||_0x4bd794);return _0x4bd794;},_=(_0x8862af,_0x5cdecd)=>(_0x4fe411,_0x261268)=>_0x5cdecd(_0x4fe411,_0x261268,_0x8862af);function Y(_0x4cdf8e,_0x5b08a3){const _0x5b6c17=_0x2f010a,_0x5063d1=_0x4cdf8e[_0x5b6c17(0x1fb)][0x0];return{..._0x5b08a3,'id':_0x5063d1[_0x5b6c17(0x20d)],'resolved':_0x4cdf8e[_0x5b6c17(0x1d2)]===0x1,'dT':f(_0x5063d1[_0x5b6c17(0x1f5)]),'personId':_0x5063d1[_0x5b6c17(0x1ed)],'threadId':_0x5063d1[_0x5b6c17(0x19c)]};}function G(_0x4081cf,_0x3a5919,_0xd5e4cb){const _0x4a8c94=_0x2f010a;var _0x25e53b,_0x374017;if(((_0x374017=(_0x25e53b=_0x4081cf==null?void 0x0:_0x4081cf[_0x4a8c94(0x1fb)])==null?void 0x0:_0x25e53b[_0x4a8c94(0x1b9)])!=null?_0x374017:0x0)>0x0){const _0x29b254=(_0x492250,_0x3f98c6)=>({'id':_0x492250[_0x4a8c94(0x20d)],'threadId':_0x492250['threadId'],'dT':f(_0x492250[_0x4a8c94(0x1f5)]),'personId':_0x492250[_0x4a8c94(0x1ed)],'resolved':_0x4081cf[_0x4a8c94(0x1d2)]===I['Solved'],'unitId':_0x3a5919,'subUnitId':_0xd5e4cb,'text':JSON[_0x4a8c94(0x1e9)](_0x492250[_0x4a8c94(0x1c7)]),'parentId':_0x3f98c6}),_0x210fe5=_0x29b254(_0x4081cf['replies'][0x0]);return{..._0x210fe5,'children':_0x4081cf['replies'][_0x4a8c94(0x20e)](0x1)[_0x4a8c94(0x1cd)](_0x134f37=>_0x29b254(_0x134f37,_0x210fe5['id']))};}return null;}let g=class{constructor(_0x299f45,_0x473f3b,_0x54e14a,_0x12d20a){const _0x28ab41=_0x2f010a;this[_0x28ab41(0x208)]=_0x299f45,this[_0x28ab41(0x1ae)]=_0x473f3b,this[_0x28ab41(0x1f8)]=_0x54e14a,this['_injector']=_0x12d20a;}async['addComment'](_0x607227){const _0x84d354=_0x2f010a;var _0x529dba,_0x30118b;const {parentId:_0xb239bb,unitId:_0x4894a7,text:_0x534e0b,threadId:_0x371dcb}=_0x607227,_0x4af36d=(_0x30118b=(_0x529dba=_0x534e0b[_0x84d354(0x1d1)])==null?void 0x0:_0x529dba[_0x84d354(0x20c)](_0x59bb34=>_0x59bb34[_0x84d354(0x1d7)]===c[_0x84d354(0x1ea)][_0x84d354(0x1c6)])[_0x84d354(0x1cd)](_0xca4857=>_0xca4857[_0x84d354(0x1e4)]))!=null?_0x30118b:[],_0x3786ce=JSON['stringify'](_0x534e0b),_0x2bc7e2=(await this['_sessionService'][_0x84d354(0x1b4)](_0x4894a7))[_0x84d354(0x1fe)]();if(_0xb239bb){const _0x381927={'memberId':_0x2bc7e2,'unitId':_0x4894a7,'content':_0x3786ce,'mention':_0x4af36d,'threadId':_0x371dcb},_0xebbf2a=(await this['_httpService'][_0x84d354(0x1f1)]('/universer-api/comment/unit/'+_0x4894a7+_0x84d354(0x199),{'body':_0x381927}))['body'][_0x84d354(0x207)];return{..._0x607227,'id':_0xebbf2a[_0x84d354(0x20d)],'dT':c[_0x84d354(0x198)](+_0xebbf2a['createTimestamp'])[_0x84d354(0x1e7)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xebbf2a['userId']};}else{const _0x32a9da={'memberId':_0x2bc7e2,'unitId':_0x4894a7,'content':_0x3786ce,'mention':_0x4af36d},_0x4e3e11=await this[_0x84d354(0x208)][_0x84d354(0x1f1)](_0x84d354(0x204)+_0x4894a7+_0x84d354(0x1ca),{'body':_0x32a9da});return Y(_0x4e3e11[_0x84d354(0x1de)]['comment'],_0x607227);}}async[_0x2f010a(0x1d4)](_0x2cbd32){const _0x4e0bab=_0x2f010a;var _0x261a67,_0x29afe1;const {text:_0xfec009,unitId:_0x1e3332}=_0x2cbd32,_0x700e7b=(_0x29afe1=(_0x261a67=_0xfec009[_0x4e0bab(0x1d1)])==null?void 0x0:_0x261a67[_0x4e0bab(0x20c)](_0x3c93c1=>_0x3c93c1[_0x4e0bab(0x1d7)]===c[_0x4e0bab(0x1ea)]['COMMENT'])[_0x4e0bab(0x1cd)](_0x287e0b=>_0x287e0b['rangeId']))!=null?_0x29afe1:[],_0x1dbc2b=JSON[_0x4e0bab(0x19e)](_0xfec009),_0x44b4ad=_0x2cbd32[_0x4e0bab(0x19c)],_0x15ab54=_0x2cbd32['id'],_0xd05a77={'memberId':(await this[_0x4e0bab(0x1f8)]['requireSession'](_0x1e3332))[_0x4e0bab(0x1fe)](),'unitId':_0x1e3332,'threadId':_0x44b4ad,'mention':_0x700e7b,'content':_0x1dbc2b,'replyId':_0x15ab54},_0x383f2b=await this[_0x4e0bab(0x208)][_0x4e0bab(0x1f1)]('/universer-api/comment/unit/'+_0x1e3332+'/edit',{'body':_0xd05a77});return!_0x383f2b[_0x4e0bab(0x1de)]['error']||_0x383f2b[_0x4e0bab(0x1de)][_0x4e0bab(0x1a9)][_0x4e0bab(0x1bf)]===0x1;}async[_0x2f010a(0x1f9)](_0x273375){const _0x3eb63b=_0x2f010a,{unitId:_0x356267}=_0x273375,_0x5ecd1f=_0x273375[_0x3eb63b(0x19c)],_0x39b2df={'memberId':this[_0x3eb63b(0x1ae)]['getCurrentUser']()['userID'],'unitId':_0x356267,'threadId':_0x5ecd1f,'solved':_0x273375['resolved']?I[_0x3eb63b(0x1e5)]:I[_0x3eb63b(0x1ab)]},_0x56f43f=await this[_0x3eb63b(0x208)][_0x3eb63b(0x1f1)](_0x3eb63b(0x204)+_0x356267+_0x3eb63b(0x202),{'body':_0x39b2df});return!_0x56f43f[_0x3eb63b(0x1de)][_0x3eb63b(0x1a9)]||_0x56f43f[_0x3eb63b(0x1de)]['error']['code']===0x1;}async[_0x2f010a(0x1b3)](_0x22c059,_0x1e695a,_0x3ec861,_0x1eb36a){const _0x2d18cf=_0x2f010a,_0xcd5968={'memberId':(await this[_0x2d18cf(0x1f8)]['requireSession'](_0x22c059))[_0x2d18cf(0x1fe)](),'threadId':_0x3ec861,'replyId':_0x1eb36a,'unitId':_0x22c059},_0x599050=await this[_0x2d18cf(0x208)][_0x2d18cf(0x1f1)](_0x2d18cf(0x204)+_0x22c059+_0x2d18cf(0x1ba),{'body':_0xcd5968});return!_0x599050[_0x2d18cf(0x1de)][_0x2d18cf(0x1a9)]||_0x599050['body']['error'][_0x2d18cf(0x1bf)]===0x1;}async['listComments'](_0x4815af,_0x316957,_0x44c8e5){const _0x1a1625=_0x2f010a,_0x31ee4b={'unitId':_0x4815af,'threadId':_0x44c8e5},_0x45401b=await this['_httpService'][_0x1a1625(0x1f1)](_0x1a1625(0x204)+_0x4815af+_0x1a1625(0x1dd),{'body':_0x31ee4b}),_0x6df6e3=_0x44c8e5[_0x1a1625(0x1cd)](_0x3c35d7=>G(_0x45401b[_0x1a1625(0x1de)]['comments'][_0x3c35d7],_0x4815af,_0x316957))[_0x1a1625(0x20c)](Boolean);return Object[_0x1a1625(0x1a6)](_0x45401b[_0x1a1625(0x1de)][_0x1a1625(0x1b0)])[_0x1a1625(0x1a4)](_0x351e99=>{const _0x1dd09b=_0x1a1625;this[_0x1dd09b(0x1ae)][_0x1dd09b(0x1fa)](_0x351e99);}),_0x6df6e3;}['saveCommentToSnapshot'](_0x56f251){const _0x3c9c60=_0x2f010a;return{'id':_0x56f251['id'],'threadId':_0x56f251[_0x3c9c60(0x19c)],'ref':_0x56f251['ref']};}};g=x([_(0x0,c[_0x2f010a(0x1a3)](P[_0x2f010a(0x1d5)])),_(0x1,c[_0x2f010a(0x1a3)](c[_0x2f010a(0x197)])),_(0x2,c[_0x2f010a(0x1a3)](b[_0x2f010a(0x1d0)])),_(0x3,c[_0x2f010a(0x1a3)](c['Injector']))],g);var H=Object[_0x2f010a(0x1c9)],J=(_0x48fafc,_0x20e1f7,_0x858031,_0x1e137c)=>{const _0x2f0dd9=_0x2f010a;for(var _0x5c705c=_0x1e137c>0x1?void 0x0:_0x1e137c?H(_0x20e1f7,_0x858031):_0x20e1f7,_0x559ad4=_0x48fafc[_0x2f0dd9(0x1b9)]-0x1,_0x240f0b;_0x559ad4>=0x0;_0x559ad4--)(_0x240f0b=_0x48fafc[_0x559ad4])&&(_0x5c705c=_0x240f0b(_0x5c705c)||_0x5c705c);return _0x5c705c;},y=(_0xdc28e7,_0xa1758f)=>(_0x152fa7,_0x120ebd)=>_0xa1758f(_0x152fa7,_0x120ebd,_0xdc28e7);function _0x186d(){const _0x5d1844=['/solved','find','/universer-api/comment/unit/','170oKtMtk','getUnit','reply','_httpService','get','onReady','add','filter','replyId','slice','_threadCommentDataSourceService','@univerjs-pro/license','bufferTime','size','UserManagerService','dayjs','/reply','subscribe','Reply','threadId','Delete','stringify','322646wFQxsW','UniverLicensePlugin','setConfig','_threadCommentModel','Inject','forEach','user','values','getUser','parentId','error','UNIVER_UNKNOWN','OpenOrReOpen','symbol','8cYnhEq','_userService','/universer-api/user/list','users','@univerjs/core','144397nZJQGD','deleteComment','requireSession','Add','delete','@univerjs/thread-comment','IConfigService','length','/delete','@univerjs/thread-comment-ui','149646kfTmGR','UniverInstanceType','onStarting','code','Injector','syncUpdateMutationToColla','21pqoYKu','personId','396906NJjoBp','_initDataSource','COMMENT','content','thread-comment-data-source.config','getOwnPropertyDescriptor','/add','150685Ziqmzl','Solve','map','UNRECOGNIZED','type','CollaborationSessionService','customRanges','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','HTTPService','_initUserSync','rangeType','Disposable','Plugin','userID','@univerjs-pro/collaboration-client','UniverThreadCommentUIPlugin','/list','body','disposeWithMe','ThreadCommentModel','Edit','toStringTag','_configService','rangeId','Solved','pipe','format','UniverThreadCommentDataSourcePlugin','parse','CustomRangeType','3296enDgWc','YYYY/MM/DD\x20HH:mm','userId','132045dnCZoS','Unknown','root','post','639rAJcEp','defineProperty','unitId','createTimestamp','commentUpdate$','_commentService','_sessionService','resolveComment','addUser','replies','pluginName','_threadCommentDataSource','getMemberID','_init','_injector','_config'];_0x186d=function(){return _0x5d1844;};return _0x186d();}let C=class extends c[_0x2f010a(0x1d8)]{constructor(_0x17839e,_0x3cab56){const _0x418604=_0x2f010a;super(),this['_threadCommentDataSourceService']=_0x17839e,this[_0x418604(0x1fd)]=_0x3cab56,this[_0x418604(0x1c5)]();}[_0x2f010a(0x1c5)](){const _0x24f9f8=_0x2f010a;this['_threadCommentDataSourceService']['dataSource']=this[_0x24f9f8(0x1fd)],this[_0x24f9f8(0x193)][_0x24f9f8(0x1c1)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x2f010a(0x1f3)],L=Object[_0x2f010a(0x1c9)],Z=(_0x35b96f,_0xa97875,_0x137992)=>_0xa97875 in _0x35b96f?F(_0x35b96f,_0xa97875,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x137992}):_0x35b96f[_0xa97875]=_0x137992,W=(_0x55fd58,_0x2425b4,_0x63da9e,_0x5c37c5)=>{const _0x18cb98=_0x2f010a;for(var _0xdd93f5=_0x5c37c5>0x1?void 0x0:_0x5c37c5?L(_0x2425b4,_0x63da9e):_0x2425b4,_0x26832c=_0x55fd58[_0x18cb98(0x1b9)]-0x1,_0x5e75b8;_0x26832c>=0x0;_0x26832c--)(_0x5e75b8=_0x55fd58[_0x26832c])&&(_0xdd93f5=_0x5e75b8(_0xdd93f5)||_0xdd93f5);return _0xdd93f5;},O=(_0x21e7e4,_0x2695b9)=>(_0x517925,_0xd2a927)=>_0x2695b9(_0x517925,_0xd2a927,_0x21e7e4),N=(_0xa48415,_0x1ffe1d,_0x4244b1)=>Z(_0xa48415,typeof _0x1ffe1d!=_0x2f010a(0x1ac)?_0x1ffe1d+'':_0x1ffe1d,_0x4244b1);exports[_0x2f010a(0x1e8)]=class extends c[_0x2f010a(0x1d9)]{constructor(_0x113970=D,_0x53ffa6,_0x5415eb){const _0x462257=_0x2f010a;super(),this['_config']=_0x113970,this[_0x462257(0x200)]=_0x53ffa6,this[_0x462257(0x1e3)]=_0x5415eb;const {..._0x411c73}=c['merge']({},D,this[_0x462257(0x201)]);this[_0x462257(0x1e3)][_0x462257(0x1a1)](q,_0x411c73);}[_0x2f010a(0x1be)](){const _0x4b7f0a=_0x2f010a;[[g],[C],[p]][_0x4b7f0a(0x1a4)](_0x491e0e=>{this['_injector']['add'](_0x491e0e);});}[_0x2f010a(0x20a)](){const _0x479690=_0x2f010a;this['_injector'][_0x479690(0x209)](C),this['_injector'][_0x479690(0x209)](p);}},N(exports[_0x2f010a(0x1e8)],_0x2f010a(0x1fc),U),N(exports[_0x2f010a(0x1e8)],_0x2f010a(0x1cf),c[_0x2f010a(0x1bd)][_0x2f010a(0x1aa)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x2f010a(0x1dc)],b['UniverCollaborationClientPlugin'],T[_0x2f010a(0x1a0)]),O(0x1,c[_0x2f010a(0x1a3)](c[_0x2f010a(0x1c0)])),O(0x2,c[_0x2f010a(0x1b8)])],exports[_0x2f010a(0x1e8)]);
|
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 _0x33d644=_0x3a35;function _0x3a35(_0x150874,_0x1eb55d){const _0x2ef728=_0x2ef7();return _0x3a35=function(_0x3a3583,_0x55d0cc){_0x3a3583=_0x3a3583-0x138;let _0x77acf0=_0x2ef728[_0x3a3583];return _0x77acf0;},_0x3a35(_0x150874,_0x1eb55d);}(function(_0x55aea0,_0x4a6d8e){const _0x4dcfec=_0x3a35,_0x297afe=_0x55aea0();while(!![]){try{const _0x1b2a56=-parseInt(_0x4dcfec(0x147))/0x1*(parseInt(_0x4dcfec(0x16f))/0x2)+-parseInt(_0x4dcfec(0x13f))/0x3*(-parseInt(_0x4dcfec(0x14b))/0x4)+parseInt(_0x4dcfec(0x186))/0x5*(parseInt(_0x4dcfec(0x188))/0x6)+-parseInt(_0x4dcfec(0x169))/0x7*(-parseInt(_0x4dcfec(0x178))/0x8)+-parseInt(_0x4dcfec(0x13c))/0x9*(-parseInt(_0x4dcfec(0x13a))/0xa)+parseInt(_0x4dcfec(0x172))/0xb+-parseInt(_0x4dcfec(0x18f))/0xc;if(_0x1b2a56===_0x4a6d8e)break;else _0x297afe['push'](_0x297afe['shift']());}catch(_0x4feb3f){_0x297afe['push'](_0x297afe['shift']());}}}(_0x2ef7,0x25631));import{CommentService as _0x681dc0,CollaborationSessionService as _0x17fadb,UniverCollaborationClientPlugin as _0x1e3255}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x463632}from'@univerjs-pro/license';import{dayjs as _0x5494b3,UserManagerService as _0x4930a9,Inject as _0x95e9bd,Injector as _0x4afbc0,Disposable as _0x2f47ee,CustomRangeType as _0xd002c0,UniverInstanceType as _0xcd8d2e,DependentOn as _0xe7ac41,IConfigService as _0x420ead,Plugin as _0x47fa42,merge as _0x5b7abd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4797a1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f5d61,IThreadCommentDataSourceService as _0x15a7e7}from'@univerjs/thread-comment';import{bufferTime as _0x741089}from'rxjs';import{HTTPService as _0x96cbc4}from'@univerjs/network';const W=_0x33d644(0x15c);var I=(_0x3c8cb2=>(_0x3c8cb2[_0x3c8cb2[_0x33d644(0x150)]=0x0]=_0x33d644(0x150),_0x3c8cb2[_0x3c8cb2[_0x33d644(0x13d)]=0x1]=_0x33d644(0x13d),_0x3c8cb2[_0x3c8cb2['UNRECOGNIZED']=-0x1]=_0x33d644(0x15d),_0x3c8cb2))(I||{}),v=(_0x4c35f8=>(_0x4c35f8[_0x4c35f8['Unknown']=0x0]=_0x33d644(0x144),_0x4c35f8[_0x4c35f8[_0x33d644(0x15e)]=0x1]=_0x33d644(0x15e),_0x4c35f8[_0x4c35f8[_0x33d644(0x195)]=0x2]=_0x33d644(0x195),_0x4c35f8[_0x4c35f8['Edit']=0x3]='Edit',_0x4c35f8[_0x4c35f8[_0x33d644(0x16e)]=0x4]=_0x33d644(0x16e),_0x4c35f8[_0x4c35f8[_0x33d644(0x19c)]=0x5]='Solve',_0x4c35f8[_0x4c35f8[_0x33d644(0x15d)]=-0x1]='UNRECOGNIZED',_0x4c35f8))(v||{});const D=_0x53b067=>_0x5494b3(new Date(+_0x53b067))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ee1f6,_0x4a1823)=>{const _0x33e193=_0x33d644,_0x52285d=_0x1ee1f6[_0x33e193(0x165)](_0x4930a9),_0x237e3c=_0x1ee1f6[_0x33e193(0x165)](_0x96cbc4);_0x4a1823[_0x33e193(0x14c)](_0x35ed18=>{const _0x55c04b=_0x33e193;_0x52285d[_0x55c04b(0x16d)](_0x35ed18)&&_0x4a1823['delete'](_0x35ed18);}),_0x4a1823[_0x33e193(0x143)]&&(await _0x237e3c[_0x33e193(0x165)](_0x33e193(0x175),{'params':{'userIDs':[..._0x4a1823]}}))[_0x33e193(0x142)][_0x33e193(0x15b)]['forEach'](_0xa32e4c=>{const _0x5f2603=_0x33e193;_0xa32e4c&&_0x52285d[_0x5f2603(0x182)](_0xa32e4c);});};var K=Object[_0x33d644(0x187)],V=(_0x5dd277,_0x2ea170,_0x2ee336,_0x34d9d4)=>{const _0x39749d=_0x33d644;for(var _0x5aaa58=_0x34d9d4>0x1?void 0x0:_0x34d9d4?K(_0x2ea170,_0x2ee336):_0x2ea170,_0x3291f4=_0x5dd277[_0x39749d(0x163)]-0x1,_0x4d4930;_0x3291f4>=0x0;_0x3291f4--)(_0x4d4930=_0x5dd277[_0x3291f4])&&(_0x5aaa58=_0x4d4930(_0x5aaa58)||_0x5aaa58);return _0x5aaa58;},p=(_0x1f225d,_0x4a9e41)=>(_0x4dfd14,_0x38ea9d)=>_0x4a9e41(_0x4dfd14,_0x38ea9d,_0x1f225d);let S=class extends _0x2f47ee{constructor(_0x33b6ea,_0x21c4cf,_0x310ba3,_0x23e066){const _0x47855a=_0x33d644;super(),this[_0x47855a(0x17a)]=_0x33b6ea,this[_0x47855a(0x138)]=_0x21c4cf,this[_0x47855a(0x173)]=_0x310ba3,this[_0x47855a(0x183)]=_0x23e066,this[_0x47855a(0x13e)](),this[_0x47855a(0x19a)]();}[_0x33d644(0x19a)](){const _0x54584f=_0x33d644;this[_0x54584f(0x152)](this['_threadCommentModel'][_0x54584f(0x16b)]['pipe'](_0x741089(0x10))[_0x54584f(0x14d)](_0x134162=>{const _0x20400f=_0x54584f,_0x363ee3=new Set();_0x134162['forEach'](_0x2cb0b4=>{const _0xe7fb8e=_0x3a35;switch(_0x2cb0b4[_0xe7fb8e(0x191)]){case _0xe7fb8e(0x16c):{const _0x48f2cb=_0x2cb0b4[_0xe7fb8e(0x139)][_0xe7fb8e(0x17c)];_0x363ee3[_0xe7fb8e(0x16c)](_0x48f2cb);break;}}}),B(this[_0x20400f(0x183)],_0x363ee3);}));}[_0x33d644(0x13e)](){const _0x55206b=_0x33d644;this['disposeWithMe'](this['_commentService'][_0x55206b(0x16b)]['subscribe'](async _0x22fdcd=>{const _0x3e0785=_0x55206b;var _0xdc4c33,_0x2884d9,_0x3d66f8,_0x4fc251;const _0x1777f9=(_0xdc4c33=this[_0x3e0785(0x138)][_0x3e0785(0x177)](_0x22fdcd[_0x3e0785(0x170)])[_0x3e0785(0x193)](_0x16dcf9=>_0x16dcf9[_0x3e0785(0x149)]===_0x22fdcd[_0x3e0785(0x149)]))==null?void 0x0:_0xdc4c33[_0x3e0785(0x156)];if(!_0x1777f9)return;const {unitId:_0x4e7f0b,subUnitId:_0x3743b2}=_0x1777f9;switch(_0x22fdcd[_0x3e0785(0x18e)]&&this[_0x3e0785(0x173)][_0x3e0785(0x182)](_0x22fdcd[_0x3e0785(0x18e)]),_0x22fdcd[_0x3e0785(0x191)]){case v[_0x3e0785(0x15e)]:break;case v[_0x3e0785(0x195)]:{this[_0x3e0785(0x138)][_0x3e0785(0x140)](_0x4e7f0b,_0x3743b2,{'unitId':_0x4e7f0b,'subUnitId':_0x3743b2,'ref':'','id':_0x22fdcd[_0x3e0785(0x167)],'dT':D(+_0x22fdcd[_0x3e0785(0x14a)]),'threadId':_0x22fdcd[_0x3e0785(0x149)],'personId':(_0x3d66f8=(_0x2884d9=_0x22fdcd['user'])==null?void 0x0:_0x2884d9[_0x3e0785(0x14e)])!=null?_0x3d66f8:_0x22fdcd[_0x3e0785(0x176)],'text':JSON[_0x3e0785(0x168)](_0x22fdcd[_0x3e0785(0x19b)]),'parentId':_0x1777f9['id']});break;}case v['Delete']:{const _0x5ba1a9=this['_threadCommentModel']['getComment'](_0x4e7f0b,_0x3743b2,_0x22fdcd[_0x3e0785(0x167)]);_0x5ba1a9&&_0x5ba1a9['parentId']&&this[_0x3e0785(0x138)][_0x3e0785(0x180)](_0x4e7f0b,_0x3743b2,_0x22fdcd[_0x3e0785(0x167)]);break;}case v[_0x3e0785(0x160)]:{this[_0x3e0785(0x138)][_0x3e0785(0x17b)](_0x4e7f0b,_0x3743b2,{'commentId':_0x22fdcd[_0x3e0785(0x167)],'text':JSON[_0x3e0785(0x168)](_0x22fdcd['content'])});break;}case v['Solve']:{const _0x4ccfbd=(_0x4fc251=this[_0x3e0785(0x138)][_0x3e0785(0x177)](_0x22fdcd[_0x3e0785(0x170)])[_0x3e0785(0x193)](_0x5796e5=>_0x5796e5[_0x3e0785(0x149)]===_0x22fdcd[_0x3e0785(0x149)]))==null?void 0x0:_0x4fc251[_0x3e0785(0x156)];_0x4ccfbd&&this['_threadCommentModel'][_0x3e0785(0x194)](_0x4e7f0b,_0x3743b2,_0x4ccfbd['id'],_0x22fdcd[_0x3e0785(0x18b)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x95e9bd(_0x681dc0)),p(0x1,_0x95e9bd(_0x4f5d61)),p(0x2,_0x95e9bd(_0x4930a9)),p(0x3,_0x95e9bd(_0x4afbc0))],S);const z=_0x33d644(0x146),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x19d45b,_0x44b85c,_0x33e7f5,_0x53305a)=>{const _0x3eb078=_0x33d644;for(var _0x24d689=_0x53305a>0x1?void 0x0:_0x53305a?k(_0x44b85c,_0x33e7f5):_0x44b85c,_0x52162c=_0x19d45b[_0x3eb078(0x163)]-0x1,_0x2f03e7;_0x52162c>=0x0;_0x52162c--)(_0x2f03e7=_0x19d45b[_0x52162c])&&(_0x24d689=_0x2f03e7(_0x24d689)||_0x24d689);return _0x24d689;},_=(_0x3d4647,_0x4b5069)=>(_0x5d5db1,_0x3bcb1e)=>_0x4b5069(_0x5d5db1,_0x3bcb1e,_0x3d4647);function X(_0x5d2c41,_0x495c01){const _0x4f06c8=_0x33d644,_0x1f8954=_0x5d2c41[_0x4f06c8(0x171)][0x0];return{..._0x495c01,'id':_0x1f8954[_0x4f06c8(0x167)],'resolved':_0x5d2c41[_0x4f06c8(0x18b)]===0x1,'dT':D(_0x1f8954[_0x4f06c8(0x14a)]),'personId':_0x1f8954[_0x4f06c8(0x176)],'threadId':_0x1f8954['threadId']};}function ee(_0x54cc1b,_0xa022a1,_0x58efac){const _0x4ba3e0=_0x33d644;var _0x4e8aa8,_0x1b8b18;if(((_0x1b8b18=(_0x4e8aa8=_0x54cc1b==null?void 0x0:_0x54cc1b[_0x4ba3e0(0x171)])==null?void 0x0:_0x4e8aa8[_0x4ba3e0(0x163)])!=null?_0x1b8b18:0x0)>0x0){const _0x58c7ff=(_0x3da4ba,_0x10f6f3)=>({'id':_0x3da4ba[_0x4ba3e0(0x167)],'threadId':_0x3da4ba[_0x4ba3e0(0x149)],'dT':D(_0x3da4ba['createTimestamp']),'personId':_0x3da4ba[_0x4ba3e0(0x176)],'resolved':_0x54cc1b[_0x4ba3e0(0x18b)]===I[_0x4ba3e0(0x13d)],'unitId':_0xa022a1,'subUnitId':_0x58efac,'text':JSON[_0x4ba3e0(0x168)](_0x3da4ba[_0x4ba3e0(0x19b)]),'parentId':_0x10f6f3}),_0x34b7ed=_0x58c7ff(_0x54cc1b[_0x4ba3e0(0x171)][0x0]);return{..._0x34b7ed,'children':_0x54cc1b[_0x4ba3e0(0x171)]['slice'](0x1)[_0x4ba3e0(0x199)](_0x50767f=>_0x58c7ff(_0x50767f,_0x34b7ed['id']))};}return null;}let f=class{constructor(_0x6b302b,_0x4c397f,_0x47eba4,_0x4b76a7){const _0x156522=_0x33d644;this['_httpService']=_0x6b302b,this[_0x156522(0x173)]=_0x4c397f,this[_0x156522(0x181)]=_0x47eba4,this['_injector']=_0x4b76a7;}async[_0x33d644(0x140)](_0x3e4255){const _0x3c8524=_0x33d644;var _0x211d82,_0x6e97c9;const {parentId:_0x30af35,unitId:_0xabe0cf,text:_0x4ebf47,threadId:_0x15bcf4}=_0x3e4255,_0x196f9f=(_0x6e97c9=(_0x211d82=_0x4ebf47[_0x3c8524(0x190)])==null?void 0x0:_0x211d82[_0x3c8524(0x174)](_0xf22aa4=>_0xf22aa4[_0x3c8524(0x161)]===_0xd002c0[_0x3c8524(0x17d)])[_0x3c8524(0x199)](_0x5eb343=>_0x5eb343[_0x3c8524(0x15a)]))!=null?_0x6e97c9:[],_0x565aa4=JSON['stringify'](_0x4ebf47),_0x4a1195=(await this[_0x3c8524(0x181)]['requireSession'](_0xabe0cf))['getMemberID']();if(_0x30af35){const _0x483ee5={'memberId':_0x4a1195,'unitId':_0xabe0cf,'content':_0x565aa4,'mention':_0x196f9f,'threadId':_0x15bcf4},_0xe266df=(await this[_0x3c8524(0x141)][_0x3c8524(0x16a)](_0x3c8524(0x179)+_0xabe0cf+'/reply',{'body':_0x483ee5}))['body']['reply'];return{..._0x3e4255,'id':_0xe266df[_0x3c8524(0x167)],'dT':_0x5494b3(+_0xe266df[_0x3c8524(0x14a)])[_0x3c8524(0x184)](_0x3c8524(0x155)),'personId':_0xe266df[_0x3c8524(0x176)]};}else{const _0x537cac={'memberId':_0x4a1195,'unitId':_0xabe0cf,'content':_0x565aa4,'mention':_0x196f9f},_0xea6c65=await this[_0x3c8524(0x141)][_0x3c8524(0x16a)]('/universer-api/comment/unit/'+_0xabe0cf+'/add',{'body':_0x537cac});return X(_0xea6c65[_0x3c8524(0x142)][_0x3c8524(0x164)],_0x3e4255);}}async['updateComment'](_0xdf1c55){const _0x7dfed6=_0x33d644;var _0x842914,_0x1ca8e0;const {text:_0x33e53e,unitId:_0x2bdf4a}=_0xdf1c55,_0x479524=(_0x1ca8e0=(_0x842914=_0x33e53e[_0x7dfed6(0x190)])==null?void 0x0:_0x842914[_0x7dfed6(0x174)](_0x14ca0b=>_0x14ca0b[_0x7dfed6(0x161)]===_0xd002c0[_0x7dfed6(0x17d)])[_0x7dfed6(0x199)](_0xf41afd=>_0xf41afd[_0x7dfed6(0x15a)]))!=null?_0x1ca8e0:[],_0x588927=JSON[_0x7dfed6(0x17f)](_0x33e53e),_0x831ddc=_0xdf1c55[_0x7dfed6(0x149)],_0x339c96=_0xdf1c55['id'],_0x2650d4={'memberId':(await this[_0x7dfed6(0x181)][_0x7dfed6(0x162)](_0x2bdf4a))[_0x7dfed6(0x17e)](),'unitId':_0x2bdf4a,'threadId':_0x831ddc,'mention':_0x479524,'content':_0x588927,'replyId':_0x339c96},_0x3a3511=await this[_0x7dfed6(0x141)][_0x7dfed6(0x16a)](_0x7dfed6(0x179)+_0x2bdf4a+'/edit',{'body':_0x2650d4});return!_0x3a3511['body'][_0x7dfed6(0x154)]||_0x3a3511[_0x7dfed6(0x142)]['error'][_0x7dfed6(0x18d)]===0x1;}async[_0x33d644(0x194)](_0x3887bb){const _0x39e077=_0x33d644,{unitId:_0x446c43}=_0x3887bb,_0x1aa42d=_0x3887bb['threadId'],_0x5676fe={'memberId':this[_0x39e077(0x173)][_0x39e077(0x197)]()[_0x39e077(0x14e)],'unitId':_0x446c43,'threadId':_0x1aa42d,'solved':_0x3887bb[_0x39e077(0x18a)]?I[_0x39e077(0x13d)]:I[_0x39e077(0x150)]},_0x51a70d=await this['_httpService'][_0x39e077(0x16a)]('/universer-api/comment/unit/'+_0x446c43+_0x39e077(0x15f),{'body':_0x5676fe});return!_0x51a70d[_0x39e077(0x142)]['error']||_0x51a70d['body'][_0x39e077(0x154)][_0x39e077(0x18d)]===0x1;}async[_0x33d644(0x180)](_0x35dec5,_0x443486,_0x54ae47,_0x5743d6){const _0x59d236=_0x33d644,_0x2d8a26={'memberId':(await this[_0x59d236(0x181)][_0x59d236(0x162)](_0x35dec5))[_0x59d236(0x17e)](),'threadId':_0x54ae47,'replyId':_0x5743d6,'unitId':_0x35dec5},_0x4b399d=await this[_0x59d236(0x141)]['post'](_0x59d236(0x179)+_0x35dec5+'/delete',{'body':_0x2d8a26});return!_0x4b399d['body'][_0x59d236(0x154)]||_0x4b399d['body'][_0x59d236(0x154)][_0x59d236(0x18d)]===0x1;}async[_0x33d644(0x148)](_0x5324fa,_0x242706,_0x1fb500){const _0x38cf15=_0x33d644,_0x18c325={'unitId':_0x5324fa,'threadId':_0x1fb500},_0x1491e3=await this[_0x38cf15(0x141)]['post'](_0x38cf15(0x179)+_0x5324fa+_0x38cf15(0x157),{'body':_0x18c325}),_0x26196f=_0x1fb500[_0x38cf15(0x199)](_0x53ca14=>ee(_0x1491e3[_0x38cf15(0x142)][_0x38cf15(0x198)][_0x53ca14],_0x5324fa,_0x242706))[_0x38cf15(0x174)](Boolean);return Object[_0x38cf15(0x145)](_0x1491e3[_0x38cf15(0x142)]['users'])[_0x38cf15(0x14c)](_0x5b60a0=>{const _0x1e4b8a=_0x38cf15;this[_0x1e4b8a(0x173)][_0x1e4b8a(0x182)](_0x5b60a0);}),_0x26196f;}[_0x33d644(0x192)](_0x551888){const _0x2c0a15=_0x33d644;return{'id':_0x551888['id'],'threadId':_0x551888[_0x2c0a15(0x149)],'ref':_0x551888[_0x2c0a15(0x153)]};}};f=Q([_(0x0,_0x95e9bd(_0x96cbc4)),_(0x1,_0x95e9bd(_0x4930a9)),_(0x2,_0x95e9bd(_0x17fadb)),_(0x3,_0x95e9bd(_0x4afbc0))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x473908,_0x32967a,_0x56f188,_0x1ad545)=>{const _0x36f2c8=_0x33d644;for(var _0x7ca771=_0x1ad545>0x1?void 0x0:_0x1ad545?re(_0x32967a,_0x56f188):_0x32967a,_0x53c017=_0x473908[_0x36f2c8(0x163)]-0x1,_0x4b379b;_0x53c017>=0x0;_0x53c017--)(_0x4b379b=_0x473908[_0x53c017])&&(_0x7ca771=_0x4b379b(_0x7ca771)||_0x7ca771);return _0x7ca771;},N=(_0x154477,_0x217811)=>(_0x6c6bca,_0x544afa)=>_0x217811(_0x6c6bca,_0x544afa,_0x154477);let g=class extends _0x2f47ee{constructor(_0x3ad421,_0x459c15){const _0x21baa8=_0x33d644;super(),this[_0x21baa8(0x13b)]=_0x3ad421,this[_0x21baa8(0x185)]=_0x459c15,this[_0x21baa8(0x158)]();}[_0x33d644(0x158)](){const _0x5cf215=_0x33d644;this[_0x5cf215(0x13b)][_0x5cf215(0x166)]=this['_threadCommentDataSource'],this[_0x5cf215(0x13b)][_0x5cf215(0x196)]=!0x1;}};g=te([N(0x0,_0x15a7e7),N(0x1,_0x95e9bd(f))],g);function _0x2ef7(){const _0xbfd1e1=['Reply','syncUpdateMutationToColla','getCurrentUser','comments','map','_initUserSync','content','Solve','_threadCommentModel','payload','30550PzTJgt','_threadCommentDataSourceService','459PhNutO','Solved','_init','79719InfORr','addComment','_httpService','body','size','Unknown','values','thread-comment-data-source.config','1GoEVhn','listComments','threadId','createTimestamp','12AZMIOF','forEach','subscribe','userID','_configService','OpenOrReOpen','UNIVER_UNKNOWN','disposeWithMe','ref','error','YYYY/MM/DD\x20HH:mm','root','/list','_initDataSource','_config','rangeId','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UNRECOGNIZED','Add','/solved','Edit','rangeType','requireSession','length','comment','get','dataSource','replyId','parse','14vMaDDw','post','commentUpdate$','add','getUser','Delete','323806RuSAUS','unitId','replies','1430374Oiqjxl','_userService','filter','/universer-api/user/list','userId','getUnit','1090184iUheal','/universer-api/comment/unit/','_commentService','updateComment','personId','COMMENT','getMemberID','stringify','deleteComment','_sessionService','addUser','_injector','format','_threadCommentDataSource','227485riivcN','getOwnPropertyDescriptor','36TxxeZu','setConfig','resolved','solved','onStarting','code','user','7152552Fhpvrr','customRanges','type','saveCommentToSnapshot','find','resolveComment'];_0x2ef7=function(){return _0xbfd1e1;};return _0x2ef7();}var se=Object['defineProperty'],oe=Object[_0x33d644(0x187)],ne=(_0x147cad,_0x1305bb,_0x562e8f)=>_0x1305bb in _0x147cad?se(_0x147cad,_0x1305bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x562e8f}):_0x147cad[_0x1305bb]=_0x562e8f,ie=(_0x5a4789,_0x2c875b,_0x3315e1,_0x4993f3)=>{const _0x4dbad9=_0x33d644;for(var _0x2cac79=_0x4993f3>0x1?void 0x0:_0x4993f3?oe(_0x2c875b,_0x3315e1):_0x2c875b,_0x2094d6=_0x5a4789[_0x4dbad9(0x163)]-0x1,_0x3b6151;_0x2094d6>=0x0;_0x2094d6--)(_0x3b6151=_0x5a4789[_0x2094d6])&&(_0x2cac79=_0x3b6151(_0x2cac79)||_0x2cac79);return _0x2cac79;},w=(_0x537a0a,_0x32b238)=>(_0x38e94d,_0x5a96a7)=>_0x32b238(_0x38e94d,_0x5a96a7,_0x537a0a),$=(_0x308aa5,_0x2ad061,_0x35669b)=>ne(_0x308aa5,typeof _0x2ad061!='symbol'?_0x2ad061+'':_0x2ad061,_0x35669b);let b=class extends _0x47fa42{constructor(_0x5c1ccc=M,_0x4642a8,_0x5b8886){const _0x39961c=_0x33d644;super(),this[_0x39961c(0x159)]=_0x5c1ccc,this['_injector']=_0x4642a8,this[_0x39961c(0x14f)]=_0x5b8886;const {..._0x2024a4}=_0x5b7abd({},M,this[_0x39961c(0x159)]);this[_0x39961c(0x14f)][_0x39961c(0x189)](z,_0x2024a4);}[_0x33d644(0x18c)](){const _0x10debe=_0x33d644;[[f],[g],[S]][_0x10debe(0x14c)](_0x2da394=>{const _0x4a5020=_0x10debe;this[_0x4a5020(0x183)][_0x4a5020(0x16c)](_0x2da394);});}['onReady'](){const _0x13880c=_0x33d644;this[_0x13880c(0x183)]['get'](g),this[_0x13880c(0x183)]['get'](S);}};$(b,'pluginName',W),$(b,_0x33d644(0x191),_0xcd8d2e[_0x33d644(0x151)]),b=ie([_0xe7ac41(_0x4797a1,_0x1e3255,_0x463632),w(0x1,_0x95e9bd(_0x4afbc0)),w(0x2,_0x420ead)],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 _0x33d644=_0x3a35;function _0x3a35(_0x150874,_0x1eb55d){const _0x2ef728=_0x2ef7();return _0x3a35=function(_0x3a3583,_0x55d0cc){_0x3a3583=_0x3a3583-0x138;let _0x77acf0=_0x2ef728[_0x3a3583];return _0x77acf0;},_0x3a35(_0x150874,_0x1eb55d);}(function(_0x55aea0,_0x4a6d8e){const _0x4dcfec=_0x3a35,_0x297afe=_0x55aea0();while(!![]){try{const _0x1b2a56=-parseInt(_0x4dcfec(0x147))/0x1*(parseInt(_0x4dcfec(0x16f))/0x2)+-parseInt(_0x4dcfec(0x13f))/0x3*(-parseInt(_0x4dcfec(0x14b))/0x4)+parseInt(_0x4dcfec(0x186))/0x5*(parseInt(_0x4dcfec(0x188))/0x6)+-parseInt(_0x4dcfec(0x169))/0x7*(-parseInt(_0x4dcfec(0x178))/0x8)+-parseInt(_0x4dcfec(0x13c))/0x9*(-parseInt(_0x4dcfec(0x13a))/0xa)+parseInt(_0x4dcfec(0x172))/0xb+-parseInt(_0x4dcfec(0x18f))/0xc;if(_0x1b2a56===_0x4a6d8e)break;else _0x297afe['push'](_0x297afe['shift']());}catch(_0x4feb3f){_0x297afe['push'](_0x297afe['shift']());}}}(_0x2ef7,0x25631));import{CommentService as _0x681dc0,CollaborationSessionService as _0x17fadb,UniverCollaborationClientPlugin as _0x1e3255}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x463632}from'@univerjs-pro/license';import{dayjs as _0x5494b3,UserManagerService as _0x4930a9,Inject as _0x95e9bd,Injector as _0x4afbc0,Disposable as _0x2f47ee,CustomRangeType as _0xd002c0,UniverInstanceType as _0xcd8d2e,DependentOn as _0xe7ac41,IConfigService as _0x420ead,Plugin as _0x47fa42,merge as _0x5b7abd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4797a1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f5d61,IThreadCommentDataSourceService as _0x15a7e7}from'@univerjs/thread-comment';import{bufferTime as _0x741089}from'rxjs';import{HTTPService as _0x96cbc4}from'@univerjs/network';const W=_0x33d644(0x15c);var I=(_0x3c8cb2=>(_0x3c8cb2[_0x3c8cb2[_0x33d644(0x150)]=0x0]=_0x33d644(0x150),_0x3c8cb2[_0x3c8cb2[_0x33d644(0x13d)]=0x1]=_0x33d644(0x13d),_0x3c8cb2[_0x3c8cb2['UNRECOGNIZED']=-0x1]=_0x33d644(0x15d),_0x3c8cb2))(I||{}),v=(_0x4c35f8=>(_0x4c35f8[_0x4c35f8['Unknown']=0x0]=_0x33d644(0x144),_0x4c35f8[_0x4c35f8[_0x33d644(0x15e)]=0x1]=_0x33d644(0x15e),_0x4c35f8[_0x4c35f8[_0x33d644(0x195)]=0x2]=_0x33d644(0x195),_0x4c35f8[_0x4c35f8['Edit']=0x3]='Edit',_0x4c35f8[_0x4c35f8[_0x33d644(0x16e)]=0x4]=_0x33d644(0x16e),_0x4c35f8[_0x4c35f8[_0x33d644(0x19c)]=0x5]='Solve',_0x4c35f8[_0x4c35f8[_0x33d644(0x15d)]=-0x1]='UNRECOGNIZED',_0x4c35f8))(v||{});const D=_0x53b067=>_0x5494b3(new Date(+_0x53b067))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ee1f6,_0x4a1823)=>{const _0x33e193=_0x33d644,_0x52285d=_0x1ee1f6[_0x33e193(0x165)](_0x4930a9),_0x237e3c=_0x1ee1f6[_0x33e193(0x165)](_0x96cbc4);_0x4a1823[_0x33e193(0x14c)](_0x35ed18=>{const _0x55c04b=_0x33e193;_0x52285d[_0x55c04b(0x16d)](_0x35ed18)&&_0x4a1823['delete'](_0x35ed18);}),_0x4a1823[_0x33e193(0x143)]&&(await _0x237e3c[_0x33e193(0x165)](_0x33e193(0x175),{'params':{'userIDs':[..._0x4a1823]}}))[_0x33e193(0x142)][_0x33e193(0x15b)]['forEach'](_0xa32e4c=>{const _0x5f2603=_0x33e193;_0xa32e4c&&_0x52285d[_0x5f2603(0x182)](_0xa32e4c);});};var K=Object[_0x33d644(0x187)],V=(_0x5dd277,_0x2ea170,_0x2ee336,_0x34d9d4)=>{const _0x39749d=_0x33d644;for(var _0x5aaa58=_0x34d9d4>0x1?void 0x0:_0x34d9d4?K(_0x2ea170,_0x2ee336):_0x2ea170,_0x3291f4=_0x5dd277[_0x39749d(0x163)]-0x1,_0x4d4930;_0x3291f4>=0x0;_0x3291f4--)(_0x4d4930=_0x5dd277[_0x3291f4])&&(_0x5aaa58=_0x4d4930(_0x5aaa58)||_0x5aaa58);return _0x5aaa58;},p=(_0x1f225d,_0x4a9e41)=>(_0x4dfd14,_0x38ea9d)=>_0x4a9e41(_0x4dfd14,_0x38ea9d,_0x1f225d);let S=class extends _0x2f47ee{constructor(_0x33b6ea,_0x21c4cf,_0x310ba3,_0x23e066){const _0x47855a=_0x33d644;super(),this[_0x47855a(0x17a)]=_0x33b6ea,this[_0x47855a(0x138)]=_0x21c4cf,this[_0x47855a(0x173)]=_0x310ba3,this[_0x47855a(0x183)]=_0x23e066,this[_0x47855a(0x13e)](),this[_0x47855a(0x19a)]();}[_0x33d644(0x19a)](){const _0x54584f=_0x33d644;this[_0x54584f(0x152)](this['_threadCommentModel'][_0x54584f(0x16b)]['pipe'](_0x741089(0x10))[_0x54584f(0x14d)](_0x134162=>{const _0x20400f=_0x54584f,_0x363ee3=new Set();_0x134162['forEach'](_0x2cb0b4=>{const _0xe7fb8e=_0x3a35;switch(_0x2cb0b4[_0xe7fb8e(0x191)]){case _0xe7fb8e(0x16c):{const _0x48f2cb=_0x2cb0b4[_0xe7fb8e(0x139)][_0xe7fb8e(0x17c)];_0x363ee3[_0xe7fb8e(0x16c)](_0x48f2cb);break;}}}),B(this[_0x20400f(0x183)],_0x363ee3);}));}[_0x33d644(0x13e)](){const _0x55206b=_0x33d644;this['disposeWithMe'](this['_commentService'][_0x55206b(0x16b)]['subscribe'](async _0x22fdcd=>{const _0x3e0785=_0x55206b;var _0xdc4c33,_0x2884d9,_0x3d66f8,_0x4fc251;const _0x1777f9=(_0xdc4c33=this[_0x3e0785(0x138)][_0x3e0785(0x177)](_0x22fdcd[_0x3e0785(0x170)])[_0x3e0785(0x193)](_0x16dcf9=>_0x16dcf9[_0x3e0785(0x149)]===_0x22fdcd[_0x3e0785(0x149)]))==null?void 0x0:_0xdc4c33[_0x3e0785(0x156)];if(!_0x1777f9)return;const {unitId:_0x4e7f0b,subUnitId:_0x3743b2}=_0x1777f9;switch(_0x22fdcd[_0x3e0785(0x18e)]&&this[_0x3e0785(0x173)][_0x3e0785(0x182)](_0x22fdcd[_0x3e0785(0x18e)]),_0x22fdcd[_0x3e0785(0x191)]){case v[_0x3e0785(0x15e)]:break;case v[_0x3e0785(0x195)]:{this[_0x3e0785(0x138)][_0x3e0785(0x140)](_0x4e7f0b,_0x3743b2,{'unitId':_0x4e7f0b,'subUnitId':_0x3743b2,'ref':'','id':_0x22fdcd[_0x3e0785(0x167)],'dT':D(+_0x22fdcd[_0x3e0785(0x14a)]),'threadId':_0x22fdcd[_0x3e0785(0x149)],'personId':(_0x3d66f8=(_0x2884d9=_0x22fdcd['user'])==null?void 0x0:_0x2884d9[_0x3e0785(0x14e)])!=null?_0x3d66f8:_0x22fdcd[_0x3e0785(0x176)],'text':JSON[_0x3e0785(0x168)](_0x22fdcd[_0x3e0785(0x19b)]),'parentId':_0x1777f9['id']});break;}case v['Delete']:{const _0x5ba1a9=this['_threadCommentModel']['getComment'](_0x4e7f0b,_0x3743b2,_0x22fdcd[_0x3e0785(0x167)]);_0x5ba1a9&&_0x5ba1a9['parentId']&&this[_0x3e0785(0x138)][_0x3e0785(0x180)](_0x4e7f0b,_0x3743b2,_0x22fdcd[_0x3e0785(0x167)]);break;}case v[_0x3e0785(0x160)]:{this[_0x3e0785(0x138)][_0x3e0785(0x17b)](_0x4e7f0b,_0x3743b2,{'commentId':_0x22fdcd[_0x3e0785(0x167)],'text':JSON[_0x3e0785(0x168)](_0x22fdcd['content'])});break;}case v['Solve']:{const _0x4ccfbd=(_0x4fc251=this[_0x3e0785(0x138)][_0x3e0785(0x177)](_0x22fdcd[_0x3e0785(0x170)])[_0x3e0785(0x193)](_0x5796e5=>_0x5796e5[_0x3e0785(0x149)]===_0x22fdcd[_0x3e0785(0x149)]))==null?void 0x0:_0x4fc251[_0x3e0785(0x156)];_0x4ccfbd&&this['_threadCommentModel'][_0x3e0785(0x194)](_0x4e7f0b,_0x3743b2,_0x4ccfbd['id'],_0x22fdcd[_0x3e0785(0x18b)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x95e9bd(_0x681dc0)),p(0x1,_0x95e9bd(_0x4f5d61)),p(0x2,_0x95e9bd(_0x4930a9)),p(0x3,_0x95e9bd(_0x4afbc0))],S);const z=_0x33d644(0x146),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x19d45b,_0x44b85c,_0x33e7f5,_0x53305a)=>{const _0x3eb078=_0x33d644;for(var _0x24d689=_0x53305a>0x1?void 0x0:_0x53305a?k(_0x44b85c,_0x33e7f5):_0x44b85c,_0x52162c=_0x19d45b[_0x3eb078(0x163)]-0x1,_0x2f03e7;_0x52162c>=0x0;_0x52162c--)(_0x2f03e7=_0x19d45b[_0x52162c])&&(_0x24d689=_0x2f03e7(_0x24d689)||_0x24d689);return _0x24d689;},_=(_0x3d4647,_0x4b5069)=>(_0x5d5db1,_0x3bcb1e)=>_0x4b5069(_0x5d5db1,_0x3bcb1e,_0x3d4647);function X(_0x5d2c41,_0x495c01){const _0x4f06c8=_0x33d644,_0x1f8954=_0x5d2c41[_0x4f06c8(0x171)][0x0];return{..._0x495c01,'id':_0x1f8954[_0x4f06c8(0x167)],'resolved':_0x5d2c41[_0x4f06c8(0x18b)]===0x1,'dT':D(_0x1f8954[_0x4f06c8(0x14a)]),'personId':_0x1f8954[_0x4f06c8(0x176)],'threadId':_0x1f8954['threadId']};}function ee(_0x54cc1b,_0xa022a1,_0x58efac){const _0x4ba3e0=_0x33d644;var _0x4e8aa8,_0x1b8b18;if(((_0x1b8b18=(_0x4e8aa8=_0x54cc1b==null?void 0x0:_0x54cc1b[_0x4ba3e0(0x171)])==null?void 0x0:_0x4e8aa8[_0x4ba3e0(0x163)])!=null?_0x1b8b18:0x0)>0x0){const _0x58c7ff=(_0x3da4ba,_0x10f6f3)=>({'id':_0x3da4ba[_0x4ba3e0(0x167)],'threadId':_0x3da4ba[_0x4ba3e0(0x149)],'dT':D(_0x3da4ba['createTimestamp']),'personId':_0x3da4ba[_0x4ba3e0(0x176)],'resolved':_0x54cc1b[_0x4ba3e0(0x18b)]===I[_0x4ba3e0(0x13d)],'unitId':_0xa022a1,'subUnitId':_0x58efac,'text':JSON[_0x4ba3e0(0x168)](_0x3da4ba[_0x4ba3e0(0x19b)]),'parentId':_0x10f6f3}),_0x34b7ed=_0x58c7ff(_0x54cc1b[_0x4ba3e0(0x171)][0x0]);return{..._0x34b7ed,'children':_0x54cc1b[_0x4ba3e0(0x171)]['slice'](0x1)[_0x4ba3e0(0x199)](_0x50767f=>_0x58c7ff(_0x50767f,_0x34b7ed['id']))};}return null;}let f=class{constructor(_0x6b302b,_0x4c397f,_0x47eba4,_0x4b76a7){const _0x156522=_0x33d644;this['_httpService']=_0x6b302b,this[_0x156522(0x173)]=_0x4c397f,this[_0x156522(0x181)]=_0x47eba4,this['_injector']=_0x4b76a7;}async[_0x33d644(0x140)](_0x3e4255){const _0x3c8524=_0x33d644;var _0x211d82,_0x6e97c9;const {parentId:_0x30af35,unitId:_0xabe0cf,text:_0x4ebf47,threadId:_0x15bcf4}=_0x3e4255,_0x196f9f=(_0x6e97c9=(_0x211d82=_0x4ebf47[_0x3c8524(0x190)])==null?void 0x0:_0x211d82[_0x3c8524(0x174)](_0xf22aa4=>_0xf22aa4[_0x3c8524(0x161)]===_0xd002c0[_0x3c8524(0x17d)])[_0x3c8524(0x199)](_0x5eb343=>_0x5eb343[_0x3c8524(0x15a)]))!=null?_0x6e97c9:[],_0x565aa4=JSON['stringify'](_0x4ebf47),_0x4a1195=(await this[_0x3c8524(0x181)]['requireSession'](_0xabe0cf))['getMemberID']();if(_0x30af35){const _0x483ee5={'memberId':_0x4a1195,'unitId':_0xabe0cf,'content':_0x565aa4,'mention':_0x196f9f,'threadId':_0x15bcf4},_0xe266df=(await this[_0x3c8524(0x141)][_0x3c8524(0x16a)](_0x3c8524(0x179)+_0xabe0cf+'/reply',{'body':_0x483ee5}))['body']['reply'];return{..._0x3e4255,'id':_0xe266df[_0x3c8524(0x167)],'dT':_0x5494b3(+_0xe266df[_0x3c8524(0x14a)])[_0x3c8524(0x184)](_0x3c8524(0x155)),'personId':_0xe266df[_0x3c8524(0x176)]};}else{const _0x537cac={'memberId':_0x4a1195,'unitId':_0xabe0cf,'content':_0x565aa4,'mention':_0x196f9f},_0xea6c65=await this[_0x3c8524(0x141)][_0x3c8524(0x16a)]('/universer-api/comment/unit/'+_0xabe0cf+'/add',{'body':_0x537cac});return X(_0xea6c65[_0x3c8524(0x142)][_0x3c8524(0x164)],_0x3e4255);}}async['updateComment'](_0xdf1c55){const _0x7dfed6=_0x33d644;var _0x842914,_0x1ca8e0;const {text:_0x33e53e,unitId:_0x2bdf4a}=_0xdf1c55,_0x479524=(_0x1ca8e0=(_0x842914=_0x33e53e[_0x7dfed6(0x190)])==null?void 0x0:_0x842914[_0x7dfed6(0x174)](_0x14ca0b=>_0x14ca0b[_0x7dfed6(0x161)]===_0xd002c0[_0x7dfed6(0x17d)])[_0x7dfed6(0x199)](_0xf41afd=>_0xf41afd[_0x7dfed6(0x15a)]))!=null?_0x1ca8e0:[],_0x588927=JSON[_0x7dfed6(0x17f)](_0x33e53e),_0x831ddc=_0xdf1c55[_0x7dfed6(0x149)],_0x339c96=_0xdf1c55['id'],_0x2650d4={'memberId':(await this[_0x7dfed6(0x181)][_0x7dfed6(0x162)](_0x2bdf4a))[_0x7dfed6(0x17e)](),'unitId':_0x2bdf4a,'threadId':_0x831ddc,'mention':_0x479524,'content':_0x588927,'replyId':_0x339c96},_0x3a3511=await this[_0x7dfed6(0x141)][_0x7dfed6(0x16a)](_0x7dfed6(0x179)+_0x2bdf4a+'/edit',{'body':_0x2650d4});return!_0x3a3511['body'][_0x7dfed6(0x154)]||_0x3a3511[_0x7dfed6(0x142)]['error'][_0x7dfed6(0x18d)]===0x1;}async[_0x33d644(0x194)](_0x3887bb){const _0x39e077=_0x33d644,{unitId:_0x446c43}=_0x3887bb,_0x1aa42d=_0x3887bb['threadId'],_0x5676fe={'memberId':this[_0x39e077(0x173)][_0x39e077(0x197)]()[_0x39e077(0x14e)],'unitId':_0x446c43,'threadId':_0x1aa42d,'solved':_0x3887bb[_0x39e077(0x18a)]?I[_0x39e077(0x13d)]:I[_0x39e077(0x150)]},_0x51a70d=await this['_httpService'][_0x39e077(0x16a)]('/universer-api/comment/unit/'+_0x446c43+_0x39e077(0x15f),{'body':_0x5676fe});return!_0x51a70d[_0x39e077(0x142)]['error']||_0x51a70d['body'][_0x39e077(0x154)][_0x39e077(0x18d)]===0x1;}async[_0x33d644(0x180)](_0x35dec5,_0x443486,_0x54ae47,_0x5743d6){const _0x59d236=_0x33d644,_0x2d8a26={'memberId':(await this[_0x59d236(0x181)][_0x59d236(0x162)](_0x35dec5))[_0x59d236(0x17e)](),'threadId':_0x54ae47,'replyId':_0x5743d6,'unitId':_0x35dec5},_0x4b399d=await this[_0x59d236(0x141)]['post'](_0x59d236(0x179)+_0x35dec5+'/delete',{'body':_0x2d8a26});return!_0x4b399d['body'][_0x59d236(0x154)]||_0x4b399d['body'][_0x59d236(0x154)][_0x59d236(0x18d)]===0x1;}async[_0x33d644(0x148)](_0x5324fa,_0x242706,_0x1fb500){const _0x38cf15=_0x33d644,_0x18c325={'unitId':_0x5324fa,'threadId':_0x1fb500},_0x1491e3=await this[_0x38cf15(0x141)]['post'](_0x38cf15(0x179)+_0x5324fa+_0x38cf15(0x157),{'body':_0x18c325}),_0x26196f=_0x1fb500[_0x38cf15(0x199)](_0x53ca14=>ee(_0x1491e3[_0x38cf15(0x142)][_0x38cf15(0x198)][_0x53ca14],_0x5324fa,_0x242706))[_0x38cf15(0x174)](Boolean);return Object[_0x38cf15(0x145)](_0x1491e3[_0x38cf15(0x142)]['users'])[_0x38cf15(0x14c)](_0x5b60a0=>{const _0x1e4b8a=_0x38cf15;this[_0x1e4b8a(0x173)][_0x1e4b8a(0x182)](_0x5b60a0);}),_0x26196f;}[_0x33d644(0x192)](_0x551888){const _0x2c0a15=_0x33d644;return{'id':_0x551888['id'],'threadId':_0x551888[_0x2c0a15(0x149)],'ref':_0x551888[_0x2c0a15(0x153)]};}};f=Q([_(0x0,_0x95e9bd(_0x96cbc4)),_(0x1,_0x95e9bd(_0x4930a9)),_(0x2,_0x95e9bd(_0x17fadb)),_(0x3,_0x95e9bd(_0x4afbc0))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x473908,_0x32967a,_0x56f188,_0x1ad545)=>{const _0x36f2c8=_0x33d644;for(var _0x7ca771=_0x1ad545>0x1?void 0x0:_0x1ad545?re(_0x32967a,_0x56f188):_0x32967a,_0x53c017=_0x473908[_0x36f2c8(0x163)]-0x1,_0x4b379b;_0x53c017>=0x0;_0x53c017--)(_0x4b379b=_0x473908[_0x53c017])&&(_0x7ca771=_0x4b379b(_0x7ca771)||_0x7ca771);return _0x7ca771;},N=(_0x154477,_0x217811)=>(_0x6c6bca,_0x544afa)=>_0x217811(_0x6c6bca,_0x544afa,_0x154477);let g=class extends _0x2f47ee{constructor(_0x3ad421,_0x459c15){const _0x21baa8=_0x33d644;super(),this[_0x21baa8(0x13b)]=_0x3ad421,this[_0x21baa8(0x185)]=_0x459c15,this[_0x21baa8(0x158)]();}[_0x33d644(0x158)](){const _0x5cf215=_0x33d644;this[_0x5cf215(0x13b)][_0x5cf215(0x166)]=this['_threadCommentDataSource'],this[_0x5cf215(0x13b)][_0x5cf215(0x196)]=!0x1;}};g=te([N(0x0,_0x15a7e7),N(0x1,_0x95e9bd(f))],g);function _0x2ef7(){const _0xbfd1e1=['Reply','syncUpdateMutationToColla','getCurrentUser','comments','map','_initUserSync','content','Solve','_threadCommentModel','payload','30550PzTJgt','_threadCommentDataSourceService','459PhNutO','Solved','_init','79719InfORr','addComment','_httpService','body','size','Unknown','values','thread-comment-data-source.config','1GoEVhn','listComments','threadId','createTimestamp','12AZMIOF','forEach','subscribe','userID','_configService','OpenOrReOpen','UNIVER_UNKNOWN','disposeWithMe','ref','error','YYYY/MM/DD\x20HH:mm','root','/list','_initDataSource','_config','rangeId','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UNRECOGNIZED','Add','/solved','Edit','rangeType','requireSession','length','comment','get','dataSource','replyId','parse','14vMaDDw','post','commentUpdate$','add','getUser','Delete','323806RuSAUS','unitId','replies','1430374Oiqjxl','_userService','filter','/universer-api/user/list','userId','getUnit','1090184iUheal','/universer-api/comment/unit/','_commentService','updateComment','personId','COMMENT','getMemberID','stringify','deleteComment','_sessionService','addUser','_injector','format','_threadCommentDataSource','227485riivcN','getOwnPropertyDescriptor','36TxxeZu','setConfig','resolved','solved','onStarting','code','user','7152552Fhpvrr','customRanges','type','saveCommentToSnapshot','find','resolveComment'];_0x2ef7=function(){return _0xbfd1e1;};return _0x2ef7();}var se=Object['defineProperty'],oe=Object[_0x33d644(0x187)],ne=(_0x147cad,_0x1305bb,_0x562e8f)=>_0x1305bb in _0x147cad?se(_0x147cad,_0x1305bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x562e8f}):_0x147cad[_0x1305bb]=_0x562e8f,ie=(_0x5a4789,_0x2c875b,_0x3315e1,_0x4993f3)=>{const _0x4dbad9=_0x33d644;for(var _0x2cac79=_0x4993f3>0x1?void 0x0:_0x4993f3?oe(_0x2c875b,_0x3315e1):_0x2c875b,_0x2094d6=_0x5a4789[_0x4dbad9(0x163)]-0x1,_0x3b6151;_0x2094d6>=0x0;_0x2094d6--)(_0x3b6151=_0x5a4789[_0x2094d6])&&(_0x2cac79=_0x3b6151(_0x2cac79)||_0x2cac79);return _0x2cac79;},w=(_0x537a0a,_0x32b238)=>(_0x38e94d,_0x5a96a7)=>_0x32b238(_0x38e94d,_0x5a96a7,_0x537a0a),$=(_0x308aa5,_0x2ad061,_0x35669b)=>ne(_0x308aa5,typeof _0x2ad061!='symbol'?_0x2ad061+'':_0x2ad061,_0x35669b);let b=class extends _0x47fa42{constructor(_0x5c1ccc=M,_0x4642a8,_0x5b8886){const _0x39961c=_0x33d644;super(),this[_0x39961c(0x159)]=_0x5c1ccc,this['_injector']=_0x4642a8,this[_0x39961c(0x14f)]=_0x5b8886;const {..._0x2024a4}=_0x5b7abd({},M,this[_0x39961c(0x159)]);this[_0x39961c(0x14f)][_0x39961c(0x189)](z,_0x2024a4);}[_0x33d644(0x18c)](){const _0x10debe=_0x33d644;[[f],[g],[S]][_0x10debe(0x14c)](_0x2da394=>{const _0x4a5020=_0x10debe;this[_0x4a5020(0x183)][_0x4a5020(0x16c)](_0x2da394);});}['onReady'](){const _0x13880c=_0x33d644;this[_0x13880c(0x183)]['get'](g),this[_0x13880c(0x183)]['get'](S);}};$(b,'pluginName',W),$(b,_0x33d644(0x191),_0xcd8d2e[_0x33d644(0x151)]),b=ie([_0xe7ac41(_0x4797a1,_0x1e3255,_0x463632),w(0x1,_0x95e9bd(_0x4afbc0)),w(0x2,_0x420ead)],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 _0x1168(_0x5aed00,_0x210555){const _0x3d04fe=_0x3d04();return _0x1168=function(_0x1168a0,_0x11a78a){_0x1168a0=_0x1168a0-0xcd;let _0x296b73=_0x3d04fe[_0x1168a0];return _0x296b73;},_0x1168(_0x5aed00,_0x210555);}function _0x3d04(){const _0x74c219=['@univerjs-pro/license','Injector','merge','/reply','_commentService','Disposable','_threadCommentModel','Add','updateComment','rxjs','Solved','root','_initUserSync','@univerjs-pro/collaboration-client','getMemberID','add','dayjs','UniverCore','object','_userService','UniverThreadCommentUIPlugin','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','getUnit','error','body','replies','COMMENT','Solve','parse','threadId','resolved','_httpService','length','UniverProThreadCommentDatasource','CollaborationSessionService','ThreadCommentModel','4044852cyJwyM','code','defineProperty','@univerjs/thread-comment','1516520EuSHzA','448696VrJzNK','/list','Inject','UniverCollaborationClientPlugin','payload','getUser','rangeType','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','@univerjs/core','Plugin','36vhwOHL','_config','thread-comment-data-source.config','/edit','rangeId','25750604pqIBbp','/solved','CustomRangeType','unitId','OpenOrReOpen','deleteComment','Unknown','getCurrentUser','_init','_injector','UNRECOGNIZED','createTimestamp','solved','userID','_configService','exports','UniverThreadCommentDataSourcePlugin','360732fSKcgQ','45CdLTrA','syncUpdateMutationToColla','onStarting','parentId','_threadCommentDataSourceService','_threadCommentDataSource','get','addUser','replyId','requireSession','23UUATRi','pluginName','IConfigService','Reply','Delete','UniverInstanceType','saveCommentToSnapshot','16171050VdpBnt','post','map','commentUpdate$','format','/delete','resolveComment','UNIVER_UNKNOWN','forEach','UniverProCollaborationClient','ref','onReady','customRanges','filter','@univerjs/thread-comment-ui','content','getComment','UserManagerService','subscribe','_sessionService','user','121174dSMiVW','Module','toStringTag','Edit','@univerjs/network','pipe','find','DependentOn','userId','147dSupDw','dataSource','/add','function','personId','addComment','getOwnPropertyDescriptor','_initDataSource','stringify'];_0x3d04=function(){return _0x74c219;};return _0x3d04();}(function(_0x4d8331,_0x12d771){const _0x47b7cb=_0x1168,_0x3d413a=_0x4d8331();while(!![]){try{const _0x5ea584=parseInt(_0x47b7cb(0x114))/0x1*(-parseInt(_0x47b7cb(0x130))/0x2)+parseInt(_0x47b7cb(0xe3))/0x3+parseInt(_0x47b7cb(0xe8))/0x4*(-parseInt(_0x47b7cb(0x10a))/0x5)+parseInt(_0x47b7cb(0x109))/0x6*(-parseInt(_0x47b7cb(0x139))/0x7)+-parseInt(_0x47b7cb(0xe7))/0x8*(parseInt(_0x47b7cb(0xf3))/0x9)+parseInt(_0x47b7cb(0x11b))/0xa+parseInt(_0x47b7cb(0xf8))/0xb;if(_0x5ea584===_0x12d771)break;else _0x3d413a['push'](_0x3d413a['shift']());}catch(_0x4b5ea8){_0x3d413a['push'](_0x3d413a['shift']());}}}(_0x3d04,0xd7720),function(_0x1d8539,_0x295b50){const _0x1c2211=_0x1168;typeof exports==_0x1c2211(0xcf)&&typeof module<'u'?_0x295b50(exports,require(_0x1c2211(0x14f)),require(_0x1c2211(0x142)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x1c2211(0xe6)),require(_0x1c2211(0x14b)),require(_0x1c2211(0x134))):typeof define==_0x1c2211(0x13c)&&define['amd']?define([_0x1c2211(0x107),'@univerjs-pro/collaboration-client',_0x1c2211(0x142),_0x1c2211(0xf1),_0x1c2211(0x129),_0x1c2211(0xe6),_0x1c2211(0x14b),_0x1c2211(0x134)],_0x295b50):(_0x1d8539=typeof globalThis<'u'?globalThis:_0x1d8539||self,_0x295b50(_0x1d8539[_0x1c2211(0xe0)]={},_0x1d8539[_0x1c2211(0x124)],_0x1d8539['UniverProLicense'],_0x1d8539[_0x1c2211(0xce)],_0x1d8539['UniverThreadCommentUi'],_0x1d8539['UniverThreadComment'],_0x1d8539['rxjs'],_0x1d8539['UniverNetwork']));}(this,function(_0x4e9597,_0x4761c5,_0x126d0a,_0x451ef0,_0x4852d2,_0x42be73,_0x35639e,_0x3ccd5f){'use strict';const _0x5de164=_0x1168;const _0x15c9f3=_0x5de164(0xd3);var _0x19b8ce=(_0x2a0b2f=>(_0x2a0b2f[_0x2a0b2f[_0x5de164(0xfc)]=0x0]=_0x5de164(0xfc),_0x2a0b2f[_0x2a0b2f['Solved']=0x1]=_0x5de164(0x14c),_0x2a0b2f[_0x2a0b2f[_0x5de164(0x102)]=-0x1]='UNRECOGNIZED',_0x2a0b2f))(_0x19b8ce||{}),_0x4557b1=(_0x1973f8=>(_0x1973f8[_0x1973f8['Unknown']=0x0]=_0x5de164(0xfe),_0x1973f8[_0x1973f8['Add']=0x1]='Add',_0x1973f8[_0x1973f8[_0x5de164(0x117)]=0x2]=_0x5de164(0x117),_0x1973f8[_0x1973f8[_0x5de164(0x133)]=0x3]=_0x5de164(0x133),_0x1973f8[_0x1973f8[_0x5de164(0x118)]=0x4]='Delete',_0x1973f8[_0x1973f8[_0x5de164(0xda)]=0x5]=_0x5de164(0xda),_0x1973f8[_0x1973f8[_0x5de164(0x102)]=-0x1]=_0x5de164(0x102),_0x1973f8))(_0x4557b1||{});const _0x55926d=_0x4a40f5=>_0x451ef0['dayjs'](new Date(+_0x4a40f5))['format'](_0x5de164(0xf0)),_0x52e0d8=async(_0x1fd1b5,_0x40d489)=>{const _0x4feb63=_0x5de164,_0x2c001f=_0x1fd1b5[_0x4feb63(0x110)](_0x451ef0[_0x4feb63(0x12c)]),_0x19dccd=_0x1fd1b5[_0x4feb63(0x110)](_0x3ccd5f['HTTPService']);_0x40d489[_0x4feb63(0x123)](_0xe78877=>{const _0x2cf0d2=_0x4feb63;_0x2c001f[_0x2cf0d2(0xed)](_0xe78877)&&_0x40d489['delete'](_0xe78877);}),_0x40d489['size']&&(await _0x19dccd[_0x4feb63(0x110)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40d489]}}))[_0x4feb63(0xd7)][_0x4feb63(0xd4)][_0x4feb63(0x123)](_0x266133=>{const _0x25e771=_0x4feb63;_0x266133&&_0x2c001f[_0x25e771(0x111)](_0x266133);});};var _0x478938=Object[_0x5de164(0x13f)],_0x555085=(_0x41a01c,_0x1ecfb4,_0x2153d2,_0x50a54c)=>{const _0xe33256=_0x5de164;for(var _0x3ab21e=_0x50a54c>0x1?void 0x0:_0x50a54c?_0x478938(_0x1ecfb4,_0x2153d2):_0x1ecfb4,_0x40e7c9=_0x41a01c[_0xe33256(0xdf)]-0x1,_0x318b52;_0x40e7c9>=0x0;_0x40e7c9--)(_0x318b52=_0x41a01c[_0x40e7c9])&&(_0x3ab21e=_0x318b52(_0x3ab21e)||_0x3ab21e);return _0x3ab21e;},_0x26bc06=(_0xa9fa47,_0x4cbd15)=>(_0x1946b2,_0x5b5da9)=>_0x4cbd15(_0x1946b2,_0x5b5da9,_0xa9fa47);let _0xee9069=class extends _0x451ef0[_0x5de164(0x147)]{constructor(_0x104a3f,_0x3f1b96,_0x1399d3,_0x1de3a3){const _0x268fcd=_0x5de164;super(),this[_0x268fcd(0x146)]=_0x104a3f,this[_0x268fcd(0x148)]=_0x3f1b96,this[_0x268fcd(0xd0)]=_0x1399d3,this['_injector']=_0x1de3a3,this[_0x268fcd(0x100)](),this[_0x268fcd(0x14e)]();}[_0x5de164(0x14e)](){const _0x7f41ba=_0x5de164;this['disposeWithMe'](this[_0x7f41ba(0x148)][_0x7f41ba(0x11e)][_0x7f41ba(0x135)](_0x35639e['bufferTime'](0x10))[_0x7f41ba(0x12d)](_0x525c8e=>{const _0x373da1=_0x7f41ba,_0x3a8c20=new Set();_0x525c8e[_0x373da1(0x123)](_0x3200ae=>{const _0x22c124=_0x373da1;switch(_0x3200ae['type']){case _0x22c124(0x151):{const _0x560308=_0x3200ae[_0x22c124(0xec)][_0x22c124(0x13d)];_0x3a8c20[_0x22c124(0x151)](_0x560308);break;}}}),_0x52e0d8(this[_0x373da1(0x101)],_0x3a8c20);}));}[_0x5de164(0x100)](){const _0x5a5edd=_0x5de164;this['disposeWithMe'](this[_0x5a5edd(0x146)][_0x5a5edd(0x11e)][_0x5a5edd(0x12d)](async _0x20b2d2=>{const _0x5b0d8c=_0x5a5edd;var _0x5c1f85,_0x4fb39b,_0xe82105,_0x1c8b8c;const _0x2ed2c5=(_0x5c1f85=this[_0x5b0d8c(0x148)][_0x5b0d8c(0xd5)](_0x20b2d2[_0x5b0d8c(0xfb)])[_0x5b0d8c(0x136)](_0x53682c=>_0x53682c[_0x5b0d8c(0xdc)]===_0x20b2d2[_0x5b0d8c(0xdc)]))==null?void 0x0:_0x5c1f85[_0x5b0d8c(0x14d)];if(!_0x2ed2c5)return;const {unitId:_0x3bc8d8,subUnitId:_0x17dc5a}=_0x2ed2c5;switch(_0x20b2d2[_0x5b0d8c(0x12f)]&&this[_0x5b0d8c(0xd0)][_0x5b0d8c(0x111)](_0x20b2d2[_0x5b0d8c(0x12f)]),_0x20b2d2['type']){case _0x4557b1[_0x5b0d8c(0x149)]:break;case _0x4557b1['Reply']:{this['_threadCommentModel']['addComment'](_0x3bc8d8,_0x17dc5a,{'unitId':_0x3bc8d8,'subUnitId':_0x17dc5a,'ref':'','id':_0x20b2d2[_0x5b0d8c(0x112)],'dT':_0x55926d(+_0x20b2d2[_0x5b0d8c(0x103)]),'threadId':_0x20b2d2[_0x5b0d8c(0xdc)],'personId':(_0xe82105=(_0x4fb39b=_0x20b2d2['user'])==null?void 0x0:_0x4fb39b[_0x5b0d8c(0x105)])!=null?_0xe82105:_0x20b2d2[_0x5b0d8c(0x138)],'text':JSON['parse'](_0x20b2d2[_0x5b0d8c(0x12a)]),'parentId':_0x2ed2c5['id']});break;}case _0x4557b1[_0x5b0d8c(0x118)]:{const _0x3e7a4c=this[_0x5b0d8c(0x148)][_0x5b0d8c(0x12b)](_0x3bc8d8,_0x17dc5a,_0x20b2d2[_0x5b0d8c(0x112)]);_0x3e7a4c&&_0x3e7a4c[_0x5b0d8c(0x10d)]&&this['_threadCommentModel'][_0x5b0d8c(0xfd)](_0x3bc8d8,_0x17dc5a,_0x20b2d2[_0x5b0d8c(0x112)]);break;}case _0x4557b1['Edit']:{this[_0x5b0d8c(0x148)][_0x5b0d8c(0x14a)](_0x3bc8d8,_0x17dc5a,{'commentId':_0x20b2d2[_0x5b0d8c(0x112)],'text':JSON[_0x5b0d8c(0xdb)](_0x20b2d2[_0x5b0d8c(0x12a)])});break;}case _0x4557b1[_0x5b0d8c(0xda)]:{const _0x5710a9=(_0x1c8b8c=this[_0x5b0d8c(0x148)][_0x5b0d8c(0xd5)](_0x20b2d2['unitId'])[_0x5b0d8c(0x136)](_0x1b82ed=>_0x1b82ed['threadId']===_0x20b2d2[_0x5b0d8c(0xdc)]))==null?void 0x0:_0x1c8b8c[_0x5b0d8c(0x14d)];_0x5710a9&&this[_0x5b0d8c(0x148)][_0x5b0d8c(0x121)](_0x3bc8d8,_0x17dc5a,_0x5710a9['id'],_0x20b2d2[_0x5b0d8c(0x104)]===_0x19b8ce[_0x5b0d8c(0x14c)]);break;}}}));}};_0xee9069=_0x555085([_0x26bc06(0x0,_0x451ef0[_0x5de164(0xea)](_0x4761c5['CommentService'])),_0x26bc06(0x1,_0x451ef0[_0x5de164(0xea)](_0x42be73[_0x5de164(0xe2)])),_0x26bc06(0x2,_0x451ef0[_0x5de164(0xea)](_0x451ef0[_0x5de164(0x12c)])),_0x26bc06(0x3,_0x451ef0[_0x5de164(0xea)](_0x451ef0[_0x5de164(0x143)]))],_0xee9069);const _0x2dc12a=_0x5de164(0xf5),_0x40e2dd={};var _0x4232d7=Object[_0x5de164(0x13f)],_0x3522d9=(_0x1f84ab,_0x285f24,_0x3960e0,_0x194a2c)=>{for(var _0xcf3562=_0x194a2c>0x1?void 0x0:_0x194a2c?_0x4232d7(_0x285f24,_0x3960e0):_0x285f24,_0x37984a=_0x1f84ab['length']-0x1,_0x4eeac5;_0x37984a>=0x0;_0x37984a--)(_0x4eeac5=_0x1f84ab[_0x37984a])&&(_0xcf3562=_0x4eeac5(_0xcf3562)||_0xcf3562);return _0xcf3562;},_0x17f847=(_0x4ed7c9,_0x561e42)=>(_0x3e4b36,_0x37de0b)=>_0x561e42(_0x3e4b36,_0x37de0b,_0x4ed7c9);function _0x45ff83(_0xcaa925,_0x44f972){const _0x2e33cd=_0x5de164,_0x3a9eed=_0xcaa925[_0x2e33cd(0xd8)][0x0];return{..._0x44f972,'id':_0x3a9eed[_0x2e33cd(0x112)],'resolved':_0xcaa925[_0x2e33cd(0x104)]===0x1,'dT':_0x55926d(_0x3a9eed[_0x2e33cd(0x103)]),'personId':_0x3a9eed[_0x2e33cd(0x138)],'threadId':_0x3a9eed[_0x2e33cd(0xdc)]};}function _0x5e477d(_0x213c20,_0x380c02,_0x3e11dd){const _0x387f29=_0x5de164;var _0x103394,_0x187809;if(((_0x187809=(_0x103394=_0x213c20==null?void 0x0:_0x213c20[_0x387f29(0xd8)])==null?void 0x0:_0x103394[_0x387f29(0xdf)])!=null?_0x187809:0x0)>0x0){const _0xe66c5c=(_0xdc430b,_0xdfb658)=>({'id':_0xdc430b[_0x387f29(0x112)],'threadId':_0xdc430b[_0x387f29(0xdc)],'dT':_0x55926d(_0xdc430b[_0x387f29(0x103)]),'personId':_0xdc430b[_0x387f29(0x138)],'resolved':_0x213c20['solved']===_0x19b8ce[_0x387f29(0x14c)],'unitId':_0x380c02,'subUnitId':_0x3e11dd,'text':JSON['parse'](_0xdc430b[_0x387f29(0x12a)]),'parentId':_0xdfb658}),_0x47cd7b=_0xe66c5c(_0x213c20[_0x387f29(0xd8)][0x0]);return{..._0x47cd7b,'children':_0x213c20[_0x387f29(0xd8)]['slice'](0x1)[_0x387f29(0x11d)](_0x4feb30=>_0xe66c5c(_0x4feb30,_0x47cd7b['id']))};}return null;}let _0x4d202f=class{constructor(_0x3ce4ca,_0x40c197,_0x348cf4,_0x21a857){const _0xe543e1=_0x5de164;this[_0xe543e1(0xde)]=_0x3ce4ca,this['_userService']=_0x40c197,this[_0xe543e1(0x12e)]=_0x348cf4,this[_0xe543e1(0x101)]=_0x21a857;}async[_0x5de164(0x13e)](_0x452783){const _0x584cb8=_0x5de164;var _0x510b1a,_0x18d275;const {parentId:_0x59fa7d,unitId:_0x4a7b63,text:_0x136b2d,threadId:_0x424b0b}=_0x452783,_0x4cad36=(_0x18d275=(_0x510b1a=_0x136b2d[_0x584cb8(0x127)])==null?void 0x0:_0x510b1a[_0x584cb8(0x128)](_0x361572=>_0x361572[_0x584cb8(0xee)]===_0x451ef0['CustomRangeType'][_0x584cb8(0xd9)])[_0x584cb8(0x11d)](_0x354f1=>_0x354f1[_0x584cb8(0xf7)]))!=null?_0x18d275:[],_0x58d4b7=JSON[_0x584cb8(0x141)](_0x136b2d),_0x12d8bf=(await this[_0x584cb8(0x12e)]['requireSession'](_0x4a7b63))['getMemberID']();if(_0x59fa7d){const _0x5d2f12={'memberId':_0x12d8bf,'unitId':_0x4a7b63,'content':_0x58d4b7,'mention':_0x4cad36,'threadId':_0x424b0b},_0x58e0ee=(await this[_0x584cb8(0xde)]['post'](_0x584cb8(0xef)+_0x4a7b63+_0x584cb8(0x145),{'body':_0x5d2f12}))[_0x584cb8(0xd7)][_0x584cb8(0xd2)];return{..._0x452783,'id':_0x58e0ee[_0x584cb8(0x112)],'dT':_0x451ef0[_0x584cb8(0xcd)](+_0x58e0ee['createTimestamp'])[_0x584cb8(0x11f)](_0x584cb8(0xf0)),'personId':_0x58e0ee[_0x584cb8(0x138)]};}else{const _0x2f3634={'memberId':_0x12d8bf,'unitId':_0x4a7b63,'content':_0x58d4b7,'mention':_0x4cad36},_0x37e938=await this[_0x584cb8(0xde)][_0x584cb8(0x11c)]('/universer-api/comment/unit/'+_0x4a7b63+_0x584cb8(0x13b),{'body':_0x2f3634});return _0x45ff83(_0x37e938[_0x584cb8(0xd7)]['comment'],_0x452783);}}async[_0x5de164(0x14a)](_0x3f9477){const _0x19562e=_0x5de164;var _0x4653da,_0x2a2c5d;const {text:_0x41651c,unitId:_0x4a5287}=_0x3f9477,_0x3cb550=(_0x2a2c5d=(_0x4653da=_0x41651c[_0x19562e(0x127)])==null?void 0x0:_0x4653da[_0x19562e(0x128)](_0x14edfd=>_0x14edfd[_0x19562e(0xee)]===_0x451ef0[_0x19562e(0xfa)][_0x19562e(0xd9)])['map'](_0x14ed20=>_0x14ed20[_0x19562e(0xf7)]))!=null?_0x2a2c5d:[],_0xecb591=JSON[_0x19562e(0x141)](_0x41651c),_0x1bdcd5=_0x3f9477[_0x19562e(0xdc)],_0x4012f6=_0x3f9477['id'],_0x5aed2e={'memberId':(await this[_0x19562e(0x12e)][_0x19562e(0x113)](_0x4a5287))[_0x19562e(0x150)](),'unitId':_0x4a5287,'threadId':_0x1bdcd5,'mention':_0x3cb550,'content':_0xecb591,'replyId':_0x4012f6},_0x46adf9=await this[_0x19562e(0xde)][_0x19562e(0x11c)](_0x19562e(0xef)+_0x4a5287+_0x19562e(0xf6),{'body':_0x5aed2e});return!_0x46adf9[_0x19562e(0xd7)][_0x19562e(0xd6)]||_0x46adf9['body'][_0x19562e(0xd6)][_0x19562e(0xe4)]===0x1;}async[_0x5de164(0x121)](_0x32494d){const _0x519c5e=_0x5de164,{unitId:_0x3bdffb}=_0x32494d,_0x364637=_0x32494d[_0x519c5e(0xdc)],_0x14ef6d={'memberId':this[_0x519c5e(0xd0)][_0x519c5e(0xff)]()['userID'],'unitId':_0x3bdffb,'threadId':_0x364637,'solved':_0x32494d[_0x519c5e(0xdd)]?_0x19b8ce[_0x519c5e(0x14c)]:_0x19b8ce[_0x519c5e(0xfc)]},_0x55c667=await this[_0x519c5e(0xde)][_0x519c5e(0x11c)](_0x519c5e(0xef)+_0x3bdffb+_0x519c5e(0xf9),{'body':_0x14ef6d});return!_0x55c667[_0x519c5e(0xd7)][_0x519c5e(0xd6)]||_0x55c667[_0x519c5e(0xd7)][_0x519c5e(0xd6)][_0x519c5e(0xe4)]===0x1;}async[_0x5de164(0xfd)](_0x518618,_0x5ca0a1,_0x203e7a,_0x18ca47){const _0x168059=_0x5de164,_0x3fbe28={'memberId':(await this[_0x168059(0x12e)][_0x168059(0x113)](_0x518618))[_0x168059(0x150)](),'threadId':_0x203e7a,'replyId':_0x18ca47,'unitId':_0x518618},_0x1e565=await this[_0x168059(0xde)][_0x168059(0x11c)]('/universer-api/comment/unit/'+_0x518618+_0x168059(0x120),{'body':_0x3fbe28});return!_0x1e565[_0x168059(0xd7)]['error']||_0x1e565['body']['error']['code']===0x1;}async['listComments'](_0x18baf1,_0x8d63ea,_0x2134b8){const _0x4372b9=_0x5de164,_0x5cd8a7={'unitId':_0x18baf1,'threadId':_0x2134b8},_0x3fad93=await this[_0x4372b9(0xde)][_0x4372b9(0x11c)](_0x4372b9(0xef)+_0x18baf1+_0x4372b9(0xe9),{'body':_0x5cd8a7}),_0x55f021=_0x2134b8[_0x4372b9(0x11d)](_0x130560=>_0x5e477d(_0x3fad93['body']['comments'][_0x130560],_0x18baf1,_0x8d63ea))['filter'](Boolean);return Object['values'](_0x3fad93[_0x4372b9(0xd7)][_0x4372b9(0xd4)])['forEach'](_0x69baeb=>{const _0x496a96=_0x4372b9;this[_0x496a96(0xd0)]['addUser'](_0x69baeb);}),_0x55f021;}[_0x5de164(0x11a)](_0xae0d40){const _0x122c73=_0x5de164;return{'id':_0xae0d40['id'],'threadId':_0xae0d40[_0x122c73(0xdc)],'ref':_0xae0d40[_0x122c73(0x125)]};}};_0x4d202f=_0x3522d9([_0x17f847(0x0,_0x451ef0[_0x5de164(0xea)](_0x3ccd5f['HTTPService'])),_0x17f847(0x1,_0x451ef0[_0x5de164(0xea)](_0x451ef0['UserManagerService'])),_0x17f847(0x2,_0x451ef0[_0x5de164(0xea)](_0x4761c5[_0x5de164(0xe1)])),_0x17f847(0x3,_0x451ef0[_0x5de164(0xea)](_0x451ef0[_0x5de164(0x143)]))],_0x4d202f);var _0x5647a2=Object[_0x5de164(0x13f)],_0x3dc6b7=(_0x1daf25,_0x167e81,_0x5bd1f9,_0x2ae36b)=>{const _0xf53d31=_0x5de164;for(var _0x40e3d8=_0x2ae36b>0x1?void 0x0:_0x2ae36b?_0x5647a2(_0x167e81,_0x5bd1f9):_0x167e81,_0x55c477=_0x1daf25[_0xf53d31(0xdf)]-0x1,_0x537923;_0x55c477>=0x0;_0x55c477--)(_0x537923=_0x1daf25[_0x55c477])&&(_0x40e3d8=_0x537923(_0x40e3d8)||_0x40e3d8);return _0x40e3d8;},_0x665ee3=(_0x2e0778,_0x10a461)=>(_0x389deb,_0x4c658e)=>_0x10a461(_0x389deb,_0x4c658e,_0x2e0778);let _0x3d8574=class extends _0x451ef0[_0x5de164(0x147)]{constructor(_0x199a96,_0x1b66d3){const _0x5dd4b4=_0x5de164;super(),this[_0x5dd4b4(0x10e)]=_0x199a96,this['_threadCommentDataSource']=_0x1b66d3,this[_0x5dd4b4(0x140)]();}[_0x5de164(0x140)](){const _0x3627d0=_0x5de164;this['_threadCommentDataSourceService'][_0x3627d0(0x13a)]=this[_0x3627d0(0x10f)],this[_0x3627d0(0x10e)][_0x3627d0(0x10b)]=!0x1;}};_0x3d8574=_0x3dc6b7([_0x665ee3(0x0,_0x42be73['IThreadCommentDataSourceService']),_0x665ee3(0x1,_0x451ef0[_0x5de164(0xea)](_0x4d202f))],_0x3d8574);var _0x38e7e3=Object[_0x5de164(0xe5)],_0x3d274b=Object['getOwnPropertyDescriptor'],_0x41c73e=(_0x1921a0,_0x3fc82f,_0x4f7203)=>_0x3fc82f in _0x1921a0?_0x38e7e3(_0x1921a0,_0x3fc82f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4f7203}):_0x1921a0[_0x3fc82f]=_0x4f7203,_0xf71aec=(_0x4aa31a,_0xb093cf,_0x13400e,_0x21899b)=>{for(var _0x497569=_0x21899b>0x1?void 0x0:_0x21899b?_0x3d274b(_0xb093cf,_0x13400e):_0xb093cf,_0x2d4a0c=_0x4aa31a['length']-0x1,_0x4235e7;_0x2d4a0c>=0x0;_0x2d4a0c--)(_0x4235e7=_0x4aa31a[_0x2d4a0c])&&(_0x497569=_0x4235e7(_0x497569)||_0x497569);return _0x497569;},_0x590a57=(_0x55d91e,_0x35517a)=>(_0xe4e161,_0x2ecd90)=>_0x35517a(_0xe4e161,_0x2ecd90,_0x55d91e),_0x516d51=(_0x82be3e,_0x553e69,_0x429bd7)=>_0x41c73e(_0x82be3e,typeof _0x553e69!='symbol'?_0x553e69+'':_0x553e69,_0x429bd7);_0x4e9597[_0x5de164(0x108)]=class extends _0x451ef0[_0x5de164(0xf2)]{constructor(_0x28d364=_0x40e2dd,_0x4d92c3,_0x40e65e){const _0x5365c2=_0x5de164;super(),this[_0x5365c2(0xf4)]=_0x28d364,this['_injector']=_0x4d92c3,this[_0x5365c2(0x106)]=_0x40e65e;const {..._0x39caa2}=_0x451ef0[_0x5365c2(0x144)]({},_0x40e2dd,this[_0x5365c2(0xf4)]);this[_0x5365c2(0x106)]['setConfig'](_0x2dc12a,_0x39caa2);}[_0x5de164(0x10c)](){const _0x3b663e=_0x5de164;[[_0x4d202f],[_0x3d8574],[_0xee9069]][_0x3b663e(0x123)](_0x52096e=>{const _0x2ba676=_0x3b663e;this[_0x2ba676(0x101)]['add'](_0x52096e);});}[_0x5de164(0x126)](){const _0x417192=_0x5de164;this[_0x417192(0x101)]['get'](_0x3d8574),this[_0x417192(0x101)][_0x417192(0x110)](_0xee9069);}},_0x516d51(_0x4e9597['UniverThreadCommentDataSourcePlugin'],_0x5de164(0x115),_0x15c9f3),_0x516d51(_0x4e9597['UniverThreadCommentDataSourcePlugin'],'type',_0x451ef0[_0x5de164(0x119)][_0x5de164(0x122)]),_0x4e9597[_0x5de164(0x108)]=_0xf71aec([_0x451ef0[_0x5de164(0x137)](_0x4852d2[_0x5de164(0xd1)],_0x4761c5[_0x5de164(0xeb)],_0x126d0a['UniverLicensePlugin']),_0x590a57(0x1,_0x451ef0[_0x5de164(0xea)](_0x451ef0['Injector'])),_0x590a57(0x2,_0x451ef0[_0x5de164(0x116)])],_0x4e9597[_0x5de164(0x108)]),Object['defineProperty'](_0x4e9597,Symbol[_0x5de164(0x132)],{'value':_0x5de164(0x131)});}));
|
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-experimental.20250406-d422c87",
|
|
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-experimental.20250406-d422c87",
|
|
49
|
+
"@univerjs-pro/license": "0.6.9-experimental.20250406-d422c87",
|
|
50
|
+
"@univerjs/core": "0.6.9-experimental.20250406-d422c87",
|
|
51
|
+
"@univerjs/network": "0.6.9-experimental.20250406-d422c87",
|
|
51
52
|
"@univerjs/protocol": "0.1.45",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.
|
|
54
|
-
"@univerjs/thread-comment": "0.6.8"
|
|
53
|
+
"@univerjs/thread-comment": "0.6.9-experimental.20250406-d422c87",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.9-experimental.20250406-d422c87"
|
|
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",
|