@univerjs-pro/thread-comment-datasource 0.6.8 → 0.6.9-experimental.20250403-d914ddc

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 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 _0x50241b=_0x37c3;(function(_0x15892d,_0x572d4a){const _0x29f803=_0x37c3,_0x1cbdb1=_0x15892d();while(!![]){try{const _0x42cc38=-parseInt(_0x29f803(0x1eb))/0x1+parseInt(_0x29f803(0x1e0))/0x2*(parseInt(_0x29f803(0x1f5))/0x3)+-parseInt(_0x29f803(0x19e))/0x4*(-parseInt(_0x29f803(0x1da))/0x5)+-parseInt(_0x29f803(0x1e3))/0x6+parseInt(_0x29f803(0x1e5))/0x7*(parseInt(_0x29f803(0x1dd))/0x8)+-parseInt(_0x29f803(0x1c0))/0x9+parseInt(_0x29f803(0x1c1))/0xa*(parseInt(_0x29f803(0x197))/0xb);if(_0x42cc38===_0x572d4a)break;else _0x1cbdb1['push'](_0x1cbdb1['shift']());}catch(_0x239cf4){_0x1cbdb1['push'](_0x1cbdb1['shift']());}}}(_0x51d5,0xe4e98));Object[_0x50241b(0x194)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require(_0x50241b(0x183)),T=require(_0x50241b(0x19a)),c=require(_0x50241b(0x1d4)),j=require('@univerjs/thread-comment-ui'),M=require(_0x50241b(0x1af)),w=require('rxjs'),P=require(_0x50241b(0x1ab)),U=_0x50241b(0x184);var I=(_0x573e76=>(_0x573e76[_0x573e76[_0x50241b(0x1a4)]=0x0]=_0x50241b(0x1a4),_0x573e76[_0x573e76[_0x50241b(0x1b3)]=0x1]='Solved',_0x573e76[_0x573e76[_0x50241b(0x1a3)]=-0x1]=_0x50241b(0x1a3),_0x573e76))(I||{}),v=(_0x29f7fd=>(_0x29f7fd[_0x29f7fd['Unknown']=0x0]='Unknown',_0x29f7fd[_0x29f7fd[_0x50241b(0x199)]=0x1]=_0x50241b(0x199),_0x29f7fd[_0x29f7fd[_0x50241b(0x1e7)]=0x2]=_0x50241b(0x1e7),_0x29f7fd[_0x29f7fd[_0x50241b(0x1a9)]=0x3]=_0x50241b(0x1a9),_0x29f7fd[_0x29f7fd[_0x50241b(0x17e)]=0x4]=_0x50241b(0x17e),_0x29f7fd[_0x29f7fd[_0x50241b(0x1de)]=0x5]=_0x50241b(0x1de),_0x29f7fd[_0x29f7fd[_0x50241b(0x1a3)]=-0x1]=_0x50241b(0x1a3),_0x29f7fd))(v||{});const f=_0xd013d5=>c[_0x50241b(0x1e9)](new Date(+_0xd013d5))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x10ed43,_0xb030e0)=>{const _0x4f52a1=_0x50241b,_0x1dbc32=_0x10ed43[_0x4f52a1(0x1e4)](c[_0x4f52a1(0x1b9)]),_0xc353e7=_0x10ed43['get'](P[_0x4f52a1(0x188)]);_0xb030e0['forEach'](_0x1d7d8a=>{const _0x3134f2=_0x4f52a1;_0x1dbc32[_0x3134f2(0x1f3)](_0x1d7d8a)&&_0xb030e0['delete'](_0x1d7d8a);}),_0xb030e0[_0x4f52a1(0x1d7)]&&(await _0xc353e7[_0x4f52a1(0x1e4)]('/universer-api/user/list',{'params':{'userIDs':[..._0xb030e0]}}))[_0x4f52a1(0x185)]['users']['forEach'](_0x1d05b2=>{const _0x2484c1=_0x4f52a1;_0x1d05b2&&_0x1dbc32[_0x2484c1(0x1a7)](_0x1d05b2);});};var $=Object[_0x50241b(0x1c2)],E=(_0xc03d73,_0xf9cd7c,_0x108cae,_0x1b11b3)=>{for(var _0x9dce69=_0x1b11b3>0x1?void 0x0:_0x1b11b3?$(_0xf9cd7c,_0x108cae):_0xf9cd7c,_0x31ff0f=_0xc03d73['length']-0x1,_0x34cdcc;_0x31ff0f>=0x0;_0x31ff0f--)(_0x34cdcc=_0xc03d73[_0x31ff0f])&&(_0x9dce69=_0x34cdcc(_0x9dce69)||_0x9dce69);return _0x9dce69;},S=(_0x56a064,_0x22d9ce)=>(_0x5e76fa,_0x40e2b3)=>_0x22d9ce(_0x5e76fa,_0x40e2b3,_0x56a064);let p=class extends c[_0x50241b(0x1ca)]{constructor(_0x2a69b9,_0x127902,_0x31d055,_0xf229ec){const _0x258de8=_0x50241b;super(),this[_0x258de8(0x18c)]=_0x2a69b9,this['_threadCommentModel']=_0x127902,this['_userService']=_0x31d055,this[_0x258de8(0x187)]=_0xf229ec,this[_0x258de8(0x17d)](),this[_0x258de8(0x19f)]();}[_0x50241b(0x19f)](){const _0x1a6984=_0x50241b;this[_0x1a6984(0x190)](this[_0x1a6984(0x1cc)][_0x1a6984(0x1ad)]['pipe'](w[_0x1a6984(0x1b1)](0x10))[_0x1a6984(0x1f4)](_0x193022=>{const _0x45645e=_0x1a6984,_0x40aea9=new Set();_0x193022[_0x45645e(0x1cd)](_0x332924=>{const _0x52f947=_0x45645e;switch(_0x332924[_0x52f947(0x1f1)]){case _0x52f947(0x1f0):{const _0x49183d=_0x332924['payload'][_0x52f947(0x1db)];_0x40aea9[_0x52f947(0x1f0)](_0x49183d);break;}}}),R(this[_0x45645e(0x187)],_0x40aea9);}));}[_0x50241b(0x17d)](){const _0x1ddc4e=_0x50241b;this[_0x1ddc4e(0x190)](this[_0x1ddc4e(0x18c)]['commentUpdate$'][_0x1ddc4e(0x1f4)](async _0x4fe9c1=>{const _0x44c0d7=_0x1ddc4e;var _0x874fb,_0x36b2e9,_0x538c32,_0x3692fc;const _0x5646e9=(_0x874fb=this[_0x44c0d7(0x1cc)][_0x44c0d7(0x1f7)](_0x4fe9c1['unitId'])[_0x44c0d7(0x1e8)](_0xfb3f26=>_0xfb3f26[_0x44c0d7(0x186)]===_0x4fe9c1[_0x44c0d7(0x186)]))==null?void 0x0:_0x874fb[_0x44c0d7(0x1c9)];if(!_0x5646e9)return;const {unitId:_0x574f10,subUnitId:_0x52b10e}=_0x5646e9;switch(_0x4fe9c1['user']&&this[_0x44c0d7(0x1d1)][_0x44c0d7(0x1a7)](_0x4fe9c1[_0x44c0d7(0x1b6)]),_0x4fe9c1[_0x44c0d7(0x1f1)]){case v[_0x44c0d7(0x199)]:break;case v['Reply']:{this[_0x44c0d7(0x1cc)][_0x44c0d7(0x1a6)](_0x574f10,_0x52b10e,{'unitId':_0x574f10,'subUnitId':_0x52b10e,'ref':'','id':_0x4fe9c1[_0x44c0d7(0x1bc)],'dT':f(+_0x4fe9c1[_0x44c0d7(0x1b5)]),'threadId':_0x4fe9c1['threadId'],'personId':(_0x538c32=(_0x36b2e9=_0x4fe9c1[_0x44c0d7(0x1b6)])==null?void 0x0:_0x36b2e9[_0x44c0d7(0x18e)])!=null?_0x538c32:_0x4fe9c1['userId'],'text':JSON[_0x44c0d7(0x1a0)](_0x4fe9c1[_0x44c0d7(0x1d5)]),'parentId':_0x5646e9['id']});break;}case v['Delete']:{const _0x269bdc=this['_threadCommentModel']['getComment'](_0x574f10,_0x52b10e,_0x4fe9c1['replyId']);_0x269bdc&&_0x269bdc[_0x44c0d7(0x1d8)]&&this['_threadCommentModel'][_0x44c0d7(0x189)](_0x574f10,_0x52b10e,_0x4fe9c1[_0x44c0d7(0x1bc)]);break;}case v[_0x44c0d7(0x1a9)]:{this[_0x44c0d7(0x1cc)]['updateComment'](_0x574f10,_0x52b10e,{'commentId':_0x4fe9c1[_0x44c0d7(0x1bc)],'text':JSON[_0x44c0d7(0x1a0)](_0x4fe9c1['content'])});break;}case v[_0x44c0d7(0x1de)]:{const _0x43755c=(_0x3692fc=this[_0x44c0d7(0x1cc)]['getUnit'](_0x4fe9c1[_0x44c0d7(0x1c3)])[_0x44c0d7(0x1e8)](_0x30691f=>_0x30691f['threadId']===_0x4fe9c1[_0x44c0d7(0x186)]))==null?void 0x0:_0x3692fc[_0x44c0d7(0x1c9)];_0x43755c&&this[_0x44c0d7(0x1cc)][_0x44c0d7(0x1df)](_0x574f10,_0x52b10e,_0x43755c['id'],_0x4fe9c1[_0x44c0d7(0x18a)]===I[_0x44c0d7(0x1b3)]);break;}}}));}};p=E([S(0x0,c[_0x50241b(0x1b4)](b['CommentService'])),S(0x1,c[_0x50241b(0x1b4)](M[_0x50241b(0x1e6)])),S(0x2,c['Inject'](c[_0x50241b(0x1b9)])),S(0x3,c[_0x50241b(0x1b4)](c['Injector']))],p);const q=_0x50241b(0x193),D={};var A=Object[_0x50241b(0x1c2)],x=(_0x3711c0,_0x3f8e73,_0x3d0a67,_0xc3e4b9)=>{for(var _0x4063f5=_0xc3e4b9>0x1?void 0x0:_0xc3e4b9?A(_0x3f8e73,_0x3d0a67):_0x3f8e73,_0x3319bf=_0x3711c0['length']-0x1,_0x214129;_0x3319bf>=0x0;_0x3319bf--)(_0x214129=_0x3711c0[_0x3319bf])&&(_0x4063f5=_0x214129(_0x4063f5)||_0x4063f5);return _0x4063f5;},_=(_0x3e1bef,_0x287151)=>(_0x2fdda4,_0x22c5ed)=>_0x287151(_0x2fdda4,_0x22c5ed,_0x3e1bef);function _0x37c3(_0x2e8b34,_0x144c0d){const _0x51d529=_0x51d5();return _0x37c3=function(_0x37c353,_0x32b3d9){_0x37c353=_0x37c353-0x17d;let _0x1084be=_0x51d529[_0x37c353];return _0x1084be;},_0x37c3(_0x2e8b34,_0x144c0d);}function _0x51d5(){const _0x2ec4f4=['@univerjs-pro/license','_threadCommentDataSource','stringify','slice','37864thPPiu','_initUserSync','parse','setConfig','UniverInstanceType','UNRECOGNIZED','OpenOrReOpen','/add','addComment','addUser','requireSession','Edit','format','@univerjs/network','/delete','commentUpdate$','UniverLicensePlugin','@univerjs/thread-comment','ref','bufferTime','rangeType','Solved','Inject','createTimestamp','user','map','listComments','UserManagerService','_sessionService','UNIVER_UNKNOWN','replyId','Plugin','comment','COMMENT','10365768aiNDPj','3939930cfigBH','getOwnPropertyDescriptor','unitId','_threadCommentDataSourceService','/edit','values','resolved','comments','root','Disposable','UniverCollaborationClientPlugin','_threadCommentModel','forEach','/solved','post','getMemberID','_userService','pluginName','saveCommentToSnapshot','@univerjs/core','content','replies','size','parentId','/reply','815GBqDKl','personId','code','1816976TRWVtH','Solve','resolveComment','386768sFyUfA','customRanges','getCurrentUser','4474338SbbKRX','get','35KoHthy','ThreadCommentModel','Reply','find','dayjs','merge','1806209JNFMAG','error','_config','length','filter','add','type','IConfigService','getUser','subscribe','6QxPXks','CustomRangeType','getUnit','_init','Delete','dataSource','_initDataSource','UniverThreadCommentDataSourcePlugin','reply','@univerjs-pro/collaboration-client','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','threadId','_injector','HTTPService','deleteComment','solved','userId','_commentService','_httpService','userID','_configService','disposeWithMe','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','thread-comment-data-source.config','defineProperty','Injector','onStarting','44ZvzRrj','DependentOn','Add'];_0x51d5=function(){return _0x2ec4f4;};return _0x51d5();}function Y(_0x371851,_0x47ad44){const _0x2b14ea=_0x50241b,_0x9554e8=_0x371851['replies'][0x0];return{..._0x47ad44,'id':_0x9554e8[_0x2b14ea(0x1bc)],'resolved':_0x371851['solved']===0x1,'dT':f(_0x9554e8[_0x2b14ea(0x1b5)]),'personId':_0x9554e8[_0x2b14ea(0x18b)],'threadId':_0x9554e8[_0x2b14ea(0x186)]};}function G(_0x579e60,_0x10d969,_0x581e12){const _0x1b40eb=_0x50241b;var _0x4846d6,_0x179aac;if(((_0x179aac=(_0x4846d6=_0x579e60==null?void 0x0:_0x579e60[_0x1b40eb(0x1d6)])==null?void 0x0:_0x4846d6[_0x1b40eb(0x1ee)])!=null?_0x179aac:0x0)>0x0){const _0x471f04=(_0x1bce84,_0x570632)=>({'id':_0x1bce84['replyId'],'threadId':_0x1bce84[_0x1b40eb(0x186)],'dT':f(_0x1bce84[_0x1b40eb(0x1b5)]),'personId':_0x1bce84[_0x1b40eb(0x18b)],'resolved':_0x579e60[_0x1b40eb(0x18a)]===I[_0x1b40eb(0x1b3)],'unitId':_0x10d969,'subUnitId':_0x581e12,'text':JSON[_0x1b40eb(0x1a0)](_0x1bce84['content']),'parentId':_0x570632}),_0x594474=_0x471f04(_0x579e60['replies'][0x0]);return{..._0x594474,'children':_0x579e60[_0x1b40eb(0x1d6)][_0x1b40eb(0x19d)](0x1)[_0x1b40eb(0x1b7)](_0x2f359a=>_0x471f04(_0x2f359a,_0x594474['id']))};}return null;}let g=class{constructor(_0x9655b4,_0x4254a7,_0x575d68,_0x4c3b68){const _0x2bb037=_0x50241b;this[_0x2bb037(0x18d)]=_0x9655b4,this['_userService']=_0x4254a7,this[_0x2bb037(0x1ba)]=_0x575d68,this[_0x2bb037(0x187)]=_0x4c3b68;}async['addComment'](_0x4a7957){const _0x4a3a6e=_0x50241b;var _0x53517b,_0x10ebab;const {parentId:_0x63ed07,unitId:_0x2529fe,text:_0x26fa81,threadId:_0x237292}=_0x4a7957,_0x171617=(_0x10ebab=(_0x53517b=_0x26fa81[_0x4a3a6e(0x1e1)])==null?void 0x0:_0x53517b[_0x4a3a6e(0x1ef)](_0x11bf98=>_0x11bf98[_0x4a3a6e(0x1b2)]===c[_0x4a3a6e(0x1f6)][_0x4a3a6e(0x1bf)])[_0x4a3a6e(0x1b7)](_0x2edfbe=>_0x2edfbe['rangeId']))!=null?_0x10ebab:[],_0x1ae871=JSON[_0x4a3a6e(0x19c)](_0x26fa81),_0x2066fc=(await this[_0x4a3a6e(0x1ba)]['requireSession'](_0x2529fe))[_0x4a3a6e(0x1d0)]();if(_0x63ed07){const _0xf142f9={'memberId':_0x2066fc,'unitId':_0x2529fe,'content':_0x1ae871,'mention':_0x171617,'threadId':_0x237292},_0xdc9cb9=(await this['_httpService']['post'](_0x4a3a6e(0x192)+_0x2529fe+_0x4a3a6e(0x1d9),{'body':_0xf142f9}))['body'][_0x4a3a6e(0x182)];return{..._0x4a7957,'id':_0xdc9cb9[_0x4a3a6e(0x1bc)],'dT':c[_0x4a3a6e(0x1e9)](+_0xdc9cb9[_0x4a3a6e(0x1b5)])[_0x4a3a6e(0x1aa)](_0x4a3a6e(0x191)),'personId':_0xdc9cb9[_0x4a3a6e(0x18b)]};}else{const _0x3ec6a0={'memberId':_0x2066fc,'unitId':_0x2529fe,'content':_0x1ae871,'mention':_0x171617},_0xde2a15=await this[_0x4a3a6e(0x18d)][_0x4a3a6e(0x1cf)](_0x4a3a6e(0x192)+_0x2529fe+_0x4a3a6e(0x1a5),{'body':_0x3ec6a0});return Y(_0xde2a15[_0x4a3a6e(0x185)][_0x4a3a6e(0x1be)],_0x4a7957);}}async['updateComment'](_0x5843db){const _0x5ce308=_0x50241b;var _0x2b583a,_0x541a35;const {text:_0x1a03d4,unitId:_0x4a3bcb}=_0x5843db,_0x151d47=(_0x541a35=(_0x2b583a=_0x1a03d4['customRanges'])==null?void 0x0:_0x2b583a[_0x5ce308(0x1ef)](_0x388b23=>_0x388b23[_0x5ce308(0x1b2)]===c[_0x5ce308(0x1f6)]['COMMENT'])[_0x5ce308(0x1b7)](_0x549faf=>_0x549faf['rangeId']))!=null?_0x541a35:[],_0x465797=JSON['stringify'](_0x1a03d4),_0xa91f20=_0x5843db[_0x5ce308(0x186)],_0x1d8a75=_0x5843db['id'],_0x37ad59={'memberId':(await this[_0x5ce308(0x1ba)][_0x5ce308(0x1a8)](_0x4a3bcb))['getMemberID'](),'unitId':_0x4a3bcb,'threadId':_0xa91f20,'mention':_0x151d47,'content':_0x465797,'replyId':_0x1d8a75},_0x2c421c=await this[_0x5ce308(0x18d)][_0x5ce308(0x1cf)]('/universer-api/comment/unit/'+_0x4a3bcb+_0x5ce308(0x1c5),{'body':_0x37ad59});return!_0x2c421c[_0x5ce308(0x185)][_0x5ce308(0x1ec)]||_0x2c421c[_0x5ce308(0x185)][_0x5ce308(0x1ec)]['code']===0x1;}async[_0x50241b(0x1df)](_0x20ad96){const _0x3938b6=_0x50241b,{unitId:_0xb7e8be}=_0x20ad96,_0x3b3351=_0x20ad96[_0x3938b6(0x186)],_0x4f480f={'memberId':this['_userService'][_0x3938b6(0x1e2)]()[_0x3938b6(0x18e)],'unitId':_0xb7e8be,'threadId':_0x3b3351,'solved':_0x20ad96[_0x3938b6(0x1c7)]?I['Solved']:I[_0x3938b6(0x1a4)]},_0x3928fb=await this[_0x3938b6(0x18d)]['post'](_0x3938b6(0x192)+_0xb7e8be+_0x3938b6(0x1ce),{'body':_0x4f480f});return!_0x3928fb['body'][_0x3938b6(0x1ec)]||_0x3928fb[_0x3938b6(0x185)]['error'][_0x3938b6(0x1dc)]===0x1;}async[_0x50241b(0x189)](_0x1c1670,_0x1d1081,_0x28969a,_0x10eecb){const _0x44f8cb=_0x50241b,_0x1d93d5={'memberId':(await this[_0x44f8cb(0x1ba)][_0x44f8cb(0x1a8)](_0x1c1670))[_0x44f8cb(0x1d0)](),'threadId':_0x28969a,'replyId':_0x10eecb,'unitId':_0x1c1670},_0x3a70b5=await this['_httpService'][_0x44f8cb(0x1cf)]('/universer-api/comment/unit/'+_0x1c1670+_0x44f8cb(0x1ac),{'body':_0x1d93d5});return!_0x3a70b5['body'][_0x44f8cb(0x1ec)]||_0x3a70b5[_0x44f8cb(0x185)][_0x44f8cb(0x1ec)][_0x44f8cb(0x1dc)]===0x1;}async[_0x50241b(0x1b8)](_0x4940ff,_0x5118fb,_0x29d73b){const _0x2ec649=_0x50241b,_0x306e79={'unitId':_0x4940ff,'threadId':_0x29d73b},_0x40dbc1=await this[_0x2ec649(0x18d)][_0x2ec649(0x1cf)](_0x2ec649(0x192)+_0x4940ff+'/list',{'body':_0x306e79}),_0x41d82d=_0x29d73b[_0x2ec649(0x1b7)](_0x3c8a2c=>G(_0x40dbc1[_0x2ec649(0x185)][_0x2ec649(0x1c8)][_0x3c8a2c],_0x4940ff,_0x5118fb))[_0x2ec649(0x1ef)](Boolean);return Object[_0x2ec649(0x1c6)](_0x40dbc1['body']['users'])[_0x2ec649(0x1cd)](_0x877a32=>{const _0x5eaebf=_0x2ec649;this[_0x5eaebf(0x1d1)]['addUser'](_0x877a32);}),_0x41d82d;}[_0x50241b(0x1d3)](_0x4f78c2){const _0x4eb93c=_0x50241b;return{'id':_0x4f78c2['id'],'threadId':_0x4f78c2['threadId'],'ref':_0x4f78c2[_0x4eb93c(0x1b0)]};}};g=x([_(0x0,c[_0x50241b(0x1b4)](P['HTTPService'])),_(0x1,c[_0x50241b(0x1b4)](c[_0x50241b(0x1b9)])),_(0x2,c[_0x50241b(0x1b4)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x50241b(0x195)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x38f4eb,_0x7affe7,_0xdcfc96,_0xe62cc7)=>{for(var _0x5a2c09=_0xe62cc7>0x1?void 0x0:_0xe62cc7?H(_0x7affe7,_0xdcfc96):_0x7affe7,_0x20a717=_0x38f4eb['length']-0x1,_0x13d45f;_0x20a717>=0x0;_0x20a717--)(_0x13d45f=_0x38f4eb[_0x20a717])&&(_0x5a2c09=_0x13d45f(_0x5a2c09)||_0x5a2c09);return _0x5a2c09;},y=(_0x3992c8,_0x338c28)=>(_0x4bcbc5,_0x382196)=>_0x338c28(_0x4bcbc5,_0x382196,_0x3992c8);let C=class extends c['Disposable']{constructor(_0xaaf72b,_0x55de09){const _0x2dce05=_0x50241b;super(),this['_threadCommentDataSourceService']=_0xaaf72b,this[_0x2dce05(0x19b)]=_0x55de09,this[_0x2dce05(0x180)]();}[_0x50241b(0x180)](){const _0x200465=_0x50241b;this[_0x200465(0x1c4)][_0x200465(0x17f)]=this[_0x200465(0x19b)],this[_0x200465(0x1c4)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x50241b(0x1b4)](g))],C);var F=Object[_0x50241b(0x194)],L=Object['getOwnPropertyDescriptor'],Z=(_0x119e4d,_0x17273d,_0x2d901f)=>_0x17273d in _0x119e4d?F(_0x119e4d,_0x17273d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d901f}):_0x119e4d[_0x17273d]=_0x2d901f,W=(_0x42a00e,_0x149fef,_0x231eba,_0x16734d)=>{for(var _0x12a90f=_0x16734d>0x1?void 0x0:_0x16734d?L(_0x149fef,_0x231eba):_0x149fef,_0x53fa69=_0x42a00e['length']-0x1,_0x58849f;_0x53fa69>=0x0;_0x53fa69--)(_0x58849f=_0x42a00e[_0x53fa69])&&(_0x12a90f=_0x58849f(_0x12a90f)||_0x12a90f);return _0x12a90f;},O=(_0x5df2a4,_0x4d709c)=>(_0x38691e,_0x3ad729)=>_0x4d709c(_0x38691e,_0x3ad729,_0x5df2a4),N=(_0x1e81eb,_0x47dec2,_0x58826c)=>Z(_0x1e81eb,typeof _0x47dec2!='symbol'?_0x47dec2+'':_0x47dec2,_0x58826c);exports[_0x50241b(0x181)]=class extends c[_0x50241b(0x1bd)]{constructor(_0x275e9e=D,_0x413eb0,_0x262074){const _0x5eee8a=_0x50241b;super(),this['_config']=_0x275e9e,this[_0x5eee8a(0x187)]=_0x413eb0,this[_0x5eee8a(0x18f)]=_0x262074;const {..._0x274f48}=c[_0x5eee8a(0x1ea)]({},D,this[_0x5eee8a(0x1ed)]);this[_0x5eee8a(0x18f)][_0x5eee8a(0x1a1)](q,_0x274f48);}[_0x50241b(0x196)](){const _0xb13186=_0x50241b;[[g],[C],[p]][_0xb13186(0x1cd)](_0x9c8792=>{this['_injector']['add'](_0x9c8792);});}['onReady'](){const _0x4f7c2f=_0x50241b;this['_injector']['get'](C),this['_injector'][_0x4f7c2f(0x1e4)](p);}},N(exports[_0x50241b(0x181)],_0x50241b(0x1d2),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x50241b(0x1a2)][_0x50241b(0x1bb)]),exports[_0x50241b(0x181)]=W([c[_0x50241b(0x198)](j['UniverThreadCommentUIPlugin'],b[_0x50241b(0x1cb)],T[_0x50241b(0x1ae)]),O(0x1,c[_0x50241b(0x1b4)](c[_0x50241b(0x195)])),O(0x2,c[_0x50241b(0x1f2)])],exports[_0x50241b(0x181)]);
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 _0x1b63d2=_0x1578;(function(_0x5431e3,_0xd6a9ca){const _0xa3f024=_0x1578,_0x207776=_0x5431e3();while(!![]){try{const _0x25ba84=-parseInt(_0xa3f024(0x13d))/0x1*(parseInt(_0xa3f024(0xf2))/0x2)+parseInt(_0xa3f024(0xf1))/0x3+parseInt(_0xa3f024(0x10d))/0x4+parseInt(_0xa3f024(0x115))/0x5+parseInt(_0xa3f024(0x109))/0x6+-parseInt(_0xa3f024(0x13a))/0x7+-parseInt(_0xa3f024(0x118))/0x8;if(_0x25ba84===_0xd6a9ca)break;else _0x207776['push'](_0x207776['shift']());}catch(_0x57cc54){_0x207776['push'](_0x207776['shift']());}}}(_0xfba9,0x92efd));import{CommentService as _0x1efde7,CollaborationSessionService as _0x1b2657,UniverCollaborationClientPlugin as _0x29d8d6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x314a4b}from'@univerjs-pro/license';import{dayjs as _0x8cd0d1,UserManagerService as _0x50aa43,Inject as _0x1f1d44,Injector as _0x37d13d,Disposable as _0x3a39fe,CustomRangeType as _0x590602,UniverInstanceType as _0x2bdad0,DependentOn as _0x284154,IConfigService as _0x4d3760,Plugin as _0x3e09ee,merge as _0x3b8c01}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29e253}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x153911,IThreadCommentDataSourceService as _0x4bf1ef}from'@univerjs/thread-comment';import{bufferTime as _0x426407}from'rxjs';import{HTTPService as _0x1f9932}from'@univerjs/network';const W=_0x1b63d2(0xf8);var I=(_0x2cf4d9=>(_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0xe6)]=0x0]=_0x1b63d2(0xe6),_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0x12d)]=0x1]='Solved',_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0x131)]=-0x1]=_0x1b63d2(0x131),_0x2cf4d9))(I||{}),v=(_0x4fec35=>(_0x4fec35[_0x4fec35[_0x1b63d2(0xdd)]=0x0]=_0x1b63d2(0xdd),_0x4fec35[_0x4fec35[_0x1b63d2(0x117)]=0x1]=_0x1b63d2(0x117),_0x4fec35[_0x4fec35[_0x1b63d2(0x129)]=0x2]='Reply',_0x4fec35[_0x4fec35['Edit']=0x3]='Edit',_0x4fec35[_0x4fec35[_0x1b63d2(0x132)]=0x4]=_0x1b63d2(0x132),_0x4fec35[_0x4fec35['Solve']=0x5]=_0x1b63d2(0xde),_0x4fec35[_0x4fec35[_0x1b63d2(0x131)]=-0x1]=_0x1b63d2(0x131),_0x4fec35))(v||{});const D=_0x2a37cc=>_0x8cd0d1(new Date(+_0x2a37cc))[_0x1b63d2(0xf4)](_0x1b63d2(0x10e)),B=async(_0x28fc55,_0x34c8ed)=>{const _0x4d46f7=_0x1b63d2,_0x72a9f3=_0x28fc55[_0x4d46f7(0xe8)](_0x50aa43),_0x8311af=_0x28fc55[_0x4d46f7(0xe8)](_0x1f9932);_0x34c8ed['forEach'](_0x131182=>{const _0x5b2f45=_0x4d46f7;_0x72a9f3[_0x5b2f45(0xe7)](_0x131182)&&_0x34c8ed[_0x5b2f45(0xed)](_0x131182);}),_0x34c8ed[_0x4d46f7(0xe9)]&&(await _0x8311af[_0x4d46f7(0xe8)](_0x4d46f7(0x12f),{'params':{'userIDs':[..._0x34c8ed]}}))['body'][_0x4d46f7(0x12a)][_0x4d46f7(0x110)](_0x116a67=>{const _0x5e22d0=_0x4d46f7;_0x116a67&&_0x72a9f3[_0x5e22d0(0xdb)](_0x116a67);});};var K=Object[_0x1b63d2(0x10f)],V=(_0x5a09ab,_0x240573,_0x1a9479,_0x11f1eb)=>{for(var _0x1c7a36=_0x11f1eb>0x1?void 0x0:_0x11f1eb?K(_0x240573,_0x1a9479):_0x240573,_0x3ed78f=_0x5a09ab['length']-0x1,_0x58b219;_0x3ed78f>=0x0;_0x3ed78f--)(_0x58b219=_0x5a09ab[_0x3ed78f])&&(_0x1c7a36=_0x58b219(_0x1c7a36)||_0x1c7a36);return _0x1c7a36;},p=(_0x412509,_0xb6238d)=>(_0x2d1c3a,_0x55d765)=>_0xb6238d(_0x2d1c3a,_0x55d765,_0x412509);let S=class extends _0x3a39fe{constructor(_0x14f531,_0x4b7826,_0xd6e308,_0x449742){const _0x29c25b=_0x1b63d2;super(),this[_0x29c25b(0x11b)]=_0x14f531,this[_0x29c25b(0x13b)]=_0x4b7826,this[_0x29c25b(0x134)]=_0xd6e308,this[_0x29c25b(0xd8)]=_0x449742,this[_0x29c25b(0x137)](),this[_0x29c25b(0x133)]();}[_0x1b63d2(0x133)](){const _0x14e99e=_0x1b63d2;this[_0x14e99e(0x106)](this[_0x14e99e(0x13b)][_0x14e99e(0xe5)][_0x14e99e(0xfe)](_0x426407(0x10))['subscribe'](_0x45fbe3=>{const _0x49b6a3=_0x14e99e,_0x358fbc=new Set();_0x45fbe3[_0x49b6a3(0x110)](_0x599637=>{const _0x5b2001=_0x49b6a3;switch(_0x599637[_0x5b2001(0x122)]){case'add':{const _0xd8a688=_0x599637['payload'][_0x5b2001(0x10a)];_0x358fbc['add'](_0xd8a688);break;}}}),B(this[_0x49b6a3(0xd8)],_0x358fbc);}));}[_0x1b63d2(0x137)](){const _0x188efe=_0x1b63d2;this[_0x188efe(0x106)](this[_0x188efe(0x11b)]['commentUpdate$'][_0x188efe(0xf9)](async _0x37e2d4=>{const _0xc63fe0=_0x188efe;var _0x1b16de,_0x3261a1,_0x434e51,_0xbec997;const _0x1a9d2c=(_0x1b16de=this['_threadCommentModel'][_0xc63fe0(0xf5)](_0x37e2d4[_0xc63fe0(0x11d)])[_0xc63fe0(0xdf)](_0x561aad=>_0x561aad[_0xc63fe0(0x136)]===_0x37e2d4[_0xc63fe0(0x136)]))==null?void 0x0:_0x1b16de['root'];if(!_0x1a9d2c)return;const {unitId:_0x2a1173,subUnitId:_0x78a3f4}=_0x1a9d2c;switch(_0x37e2d4[_0xc63fe0(0xf6)]&&this[_0xc63fe0(0x134)]['addUser'](_0x37e2d4[_0xc63fe0(0xf6)]),_0x37e2d4['type']){case v[_0xc63fe0(0x117)]:break;case v[_0xc63fe0(0x129)]:{this['_threadCommentModel']['addComment'](_0x2a1173,_0x78a3f4,{'unitId':_0x2a1173,'subUnitId':_0x78a3f4,'ref':'','id':_0x37e2d4[_0xc63fe0(0x108)],'dT':D(+_0x37e2d4[_0xc63fe0(0x12c)]),'threadId':_0x37e2d4[_0xc63fe0(0x136)],'personId':(_0x434e51=(_0x3261a1=_0x37e2d4['user'])==null?void 0x0:_0x3261a1[_0xc63fe0(0xf0)])!=null?_0x434e51:_0x37e2d4['userId'],'text':JSON[_0xc63fe0(0x126)](_0x37e2d4[_0xc63fe0(0x12b)]),'parentId':_0x1a9d2c['id']});break;}case v['Delete']:{const _0xb9e28f=this[_0xc63fe0(0x13b)][_0xc63fe0(0xe1)](_0x2a1173,_0x78a3f4,_0x37e2d4[_0xc63fe0(0x108)]);_0xb9e28f&&_0xb9e28f[_0xc63fe0(0xea)]&&this[_0xc63fe0(0x13b)][_0xc63fe0(0x119)](_0x2a1173,_0x78a3f4,_0x37e2d4[_0xc63fe0(0x108)]);break;}case v[_0xc63fe0(0xda)]:{this[_0xc63fe0(0x13b)][_0xc63fe0(0xeb)](_0x2a1173,_0x78a3f4,{'commentId':_0x37e2d4[_0xc63fe0(0x108)],'text':JSON[_0xc63fe0(0x126)](_0x37e2d4[_0xc63fe0(0x12b)])});break;}case v[_0xc63fe0(0xde)]:{const _0x82479=(_0xbec997=this[_0xc63fe0(0x13b)]['getUnit'](_0x37e2d4[_0xc63fe0(0x11d)])[_0xc63fe0(0xdf)](_0xf53bd6=>_0xf53bd6[_0xc63fe0(0x136)]===_0x37e2d4[_0xc63fe0(0x136)]))==null?void 0x0:_0xbec997[_0xc63fe0(0x124)];_0x82479&&this[_0xc63fe0(0x13b)][_0xc63fe0(0x107)](_0x2a1173,_0x78a3f4,_0x82479['id'],_0x37e2d4['solved']===I[_0xc63fe0(0x12d)]);break;}}}));}};S=V([p(0x0,_0x1f1d44(_0x1efde7)),p(0x1,_0x1f1d44(_0x153911)),p(0x2,_0x1f1d44(_0x50aa43)),p(0x3,_0x1f1d44(_0x37d13d))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1b63d2(0x10f)],Q=(_0x453d60,_0x1035bd,_0x3cadbd,_0x1afb87)=>{const _0x53ba2e=_0x1b63d2;for(var _0x2d1bbf=_0x1afb87>0x1?void 0x0:_0x1afb87?k(_0x1035bd,_0x3cadbd):_0x1035bd,_0x2c3e49=_0x453d60[_0x53ba2e(0x139)]-0x1,_0x4270a3;_0x2c3e49>=0x0;_0x2c3e49--)(_0x4270a3=_0x453d60[_0x2c3e49])&&(_0x2d1bbf=_0x4270a3(_0x2d1bbf)||_0x2d1bbf);return _0x2d1bbf;},_=(_0x35eb53,_0x3cdcf6)=>(_0x2d11b1,_0xff17e)=>_0x3cdcf6(_0x2d11b1,_0xff17e,_0x35eb53);function _0x1578(_0x42b4a1,_0x583ca4){const _0xfba9bc=_0xfba9();return _0x1578=function(_0x157888,_0xa6824){_0x157888=_0x157888-0xd7;let _0x26eb3d=_0xfba9bc[_0x157888];return _0x26eb3d;},_0x1578(_0x42b4a1,_0x583ca4);}function X(_0x22d0b4,_0x32a958){const _0x10d340=_0x1b63d2,_0x1899d2=_0x22d0b4[_0x10d340(0x11e)][0x0];return{..._0x32a958,'id':_0x1899d2[_0x10d340(0x108)],'resolved':_0x22d0b4[_0x10d340(0xff)]===0x1,'dT':D(_0x1899d2[_0x10d340(0x12c)]),'personId':_0x1899d2[_0x10d340(0x127)],'threadId':_0x1899d2[_0x10d340(0x136)]};}function ee(_0x49a07f,_0xca14b8,_0x3ab95d){const _0x137da6=_0x1b63d2;var _0x281e00,_0x52347c;if(((_0x52347c=(_0x281e00=_0x49a07f==null?void 0x0:_0x49a07f[_0x137da6(0x11e)])==null?void 0x0:_0x281e00[_0x137da6(0x139)])!=null?_0x52347c:0x0)>0x0){const _0x3738e0=(_0x89f30a,_0x49e8bf)=>({'id':_0x89f30a[_0x137da6(0x108)],'threadId':_0x89f30a[_0x137da6(0x136)],'dT':D(_0x89f30a[_0x137da6(0x12c)]),'personId':_0x89f30a[_0x137da6(0x127)],'resolved':_0x49a07f[_0x137da6(0xff)]===I[_0x137da6(0x12d)],'unitId':_0xca14b8,'subUnitId':_0x3ab95d,'text':JSON[_0x137da6(0x126)](_0x89f30a['content']),'parentId':_0x49e8bf}),_0x39a866=_0x3738e0(_0x49a07f[_0x137da6(0x11e)][0x0]);return{..._0x39a866,'children':_0x49a07f[_0x137da6(0x11e)][_0x137da6(0x103)](0x1)[_0x137da6(0x113)](_0x18717b=>_0x3738e0(_0x18717b,_0x39a866['id']))};}return null;}let f=class{constructor(_0x3048c6,_0x20bfbe,_0x1a2128,_0x3a7f7b){this['_httpService']=_0x3048c6,this['_userService']=_0x20bfbe,this['_sessionService']=_0x1a2128,this['_injector']=_0x3a7f7b;}async[_0x1b63d2(0xe3)](_0x4ac19c){const _0x289498=_0x1b63d2;var _0x48c935,_0x47f404;const {parentId:_0x2f65a2,unitId:_0x408e88,text:_0x2ff9d3,threadId:_0x758987}=_0x4ac19c,_0x48d83c=(_0x47f404=(_0x48c935=_0x2ff9d3[_0x289498(0xee)])==null?void 0x0:_0x48c935[_0x289498(0x125)](_0x55e0cc=>_0x55e0cc['rangeType']===_0x590602[_0x289498(0xfd)])['map'](_0x19f725=>_0x19f725[_0x289498(0x123)]))!=null?_0x47f404:[],_0x1029e6=JSON[_0x289498(0x11f)](_0x2ff9d3),_0x10b909=(await this[_0x289498(0xe2)]['requireSession'](_0x408e88))[_0x289498(0xec)]();if(_0x2f65a2){const _0x1a7730={'memberId':_0x10b909,'unitId':_0x408e88,'content':_0x1029e6,'mention':_0x48d83c,'threadId':_0x758987},_0x37f8b2=(await this['_httpService'][_0x289498(0x121)](_0x289498(0xfa)+_0x408e88+'/reply',{'body':_0x1a7730}))[_0x289498(0xd9)][_0x289498(0x116)];return{..._0x4ac19c,'id':_0x37f8b2['replyId'],'dT':_0x8cd0d1(+_0x37f8b2[_0x289498(0x12c)])[_0x289498(0xf4)](_0x289498(0x10e)),'personId':_0x37f8b2[_0x289498(0x127)]};}else{const _0x4d24cf={'memberId':_0x10b909,'unitId':_0x408e88,'content':_0x1029e6,'mention':_0x48d83c},_0x14b85c=await this[_0x289498(0x135)][_0x289498(0x121)](_0x289498(0xfa)+_0x408e88+_0x289498(0xe4),{'body':_0x4d24cf});return X(_0x14b85c[_0x289498(0xd9)][_0x289498(0x12e)],_0x4ac19c);}}async[_0x1b63d2(0xeb)](_0x339605){const _0x1a653e=_0x1b63d2;var _0x47c22c,_0x3ef7f4;const {text:_0x527f01,unitId:_0xaf5f68}=_0x339605,_0x2a569d=(_0x3ef7f4=(_0x47c22c=_0x527f01[_0x1a653e(0xee)])==null?void 0x0:_0x47c22c['filter'](_0x4bcd50=>_0x4bcd50['rangeType']===_0x590602[_0x1a653e(0xfd)])['map'](_0x117cfa=>_0x117cfa[_0x1a653e(0x123)]))!=null?_0x3ef7f4:[],_0x2c0242=JSON[_0x1a653e(0x11f)](_0x527f01),_0xd3145b=_0x339605[_0x1a653e(0x136)],_0x566c92=_0x339605['id'],_0x234bd1={'memberId':(await this['_sessionService']['requireSession'](_0xaf5f68))[_0x1a653e(0xec)](),'unitId':_0xaf5f68,'threadId':_0xd3145b,'mention':_0x2a569d,'content':_0x2c0242,'replyId':_0x566c92},_0x4a2109=await this[_0x1a653e(0x135)][_0x1a653e(0x121)](_0x1a653e(0xfa)+_0xaf5f68+_0x1a653e(0x100),{'body':_0x234bd1});return!_0x4a2109['body'][_0x1a653e(0x102)]||_0x4a2109[_0x1a653e(0xd9)][_0x1a653e(0x102)][_0x1a653e(0x138)]===0x1;}async[_0x1b63d2(0x107)](_0x23f1f6){const _0x8aa3f4=_0x1b63d2,{unitId:_0x28e0ce}=_0x23f1f6,_0x1dbca8=_0x23f1f6[_0x8aa3f4(0x136)],_0x29a476={'memberId':this[_0x8aa3f4(0x134)]['getCurrentUser']()[_0x8aa3f4(0xf0)],'unitId':_0x28e0ce,'threadId':_0x1dbca8,'solved':_0x23f1f6[_0x8aa3f4(0x104)]?I['Solved']:I[_0x8aa3f4(0xe6)]},_0xb8c5ef=await this['_httpService'][_0x8aa3f4(0x121)](_0x8aa3f4(0xfa)+_0x28e0ce+_0x8aa3f4(0x10c),{'body':_0x29a476});return!_0xb8c5ef[_0x8aa3f4(0xd9)][_0x8aa3f4(0x102)]||_0xb8c5ef[_0x8aa3f4(0xd9)][_0x8aa3f4(0x102)][_0x8aa3f4(0x138)]===0x1;}async['deleteComment'](_0x3f6c3e,_0x31d976,_0x22dae2,_0xd02e8c){const _0x3d9fd4=_0x1b63d2,_0x1e3707={'memberId':(await this[_0x3d9fd4(0xe2)][_0x3d9fd4(0x11a)](_0x3f6c3e))[_0x3d9fd4(0xec)](),'threadId':_0x22dae2,'replyId':_0xd02e8c,'unitId':_0x3f6c3e},_0xbdddf7=await this[_0x3d9fd4(0x135)][_0x3d9fd4(0x121)]('/universer-api/comment/unit/'+_0x3f6c3e+_0x3d9fd4(0x11c),{'body':_0x1e3707});return!_0xbdddf7['body'][_0x3d9fd4(0x102)]||_0xbdddf7[_0x3d9fd4(0xd9)]['error'][_0x3d9fd4(0x138)]===0x1;}async[_0x1b63d2(0xf3)](_0x432f70,_0x2c301f,_0x3ade9f){const _0x250ee3=_0x1b63d2,_0x12742b={'unitId':_0x432f70,'threadId':_0x3ade9f},_0x1cd2b2=await this[_0x250ee3(0x135)][_0x250ee3(0x121)](_0x250ee3(0xfa)+_0x432f70+_0x250ee3(0xf7),{'body':_0x12742b}),_0x1af759=_0x3ade9f[_0x250ee3(0x113)](_0x40c5d7=>ee(_0x1cd2b2[_0x250ee3(0xd9)][_0x250ee3(0x111)][_0x40c5d7],_0x432f70,_0x2c301f))[_0x250ee3(0x125)](Boolean);return Object[_0x250ee3(0x120)](_0x1cd2b2[_0x250ee3(0xd9)][_0x250ee3(0x12a)])[_0x250ee3(0x110)](_0x25e561=>{const _0x236a0e=_0x250ee3;this[_0x236a0e(0x134)][_0x236a0e(0xdb)](_0x25e561);}),_0x1af759;}[_0x1b63d2(0x130)](_0x4955ae){const _0x210ab0=_0x1b63d2;return{'id':_0x4955ae['id'],'threadId':_0x4955ae[_0x210ab0(0x136)],'ref':_0x4955ae['ref']};}};f=Q([_(0x0,_0x1f1d44(_0x1f9932)),_(0x1,_0x1f1d44(_0x50aa43)),_(0x2,_0x1f1d44(_0x1b2657)),_(0x3,_0x1f1d44(_0x37d13d))],f);var re=Object[_0x1b63d2(0x10f)],te=(_0x263e91,_0x5ecfe5,_0x2f168b,_0x35def6)=>{const _0x41b960=_0x1b63d2;for(var _0x413aee=_0x35def6>0x1?void 0x0:_0x35def6?re(_0x5ecfe5,_0x2f168b):_0x5ecfe5,_0x2cd164=_0x263e91[_0x41b960(0x139)]-0x1,_0x2cd06c;_0x2cd164>=0x0;_0x2cd164--)(_0x2cd06c=_0x263e91[_0x2cd164])&&(_0x413aee=_0x2cd06c(_0x413aee)||_0x413aee);return _0x413aee;},N=(_0x489731,_0x1e01d9)=>(_0x28a08c,_0x2f9626)=>_0x1e01d9(_0x28a08c,_0x2f9626,_0x489731);function _0xfba9(){const _0x2bf505=['getUnit','user','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','/universer-api/comment/unit/','_threadCommentDataSourceService','_configService','COMMENT','pipe','solved','/edit','onStarting','error','slice','resolved','_initDataSource','disposeWithMe','resolveComment','replyId','6338838HviQuS','personId','pluginName','/solved','4211868wttVTZ','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','comments','_threadCommentDataSource','map','symbol','3668980qfjQNm','reply','Add','12610432nzXeGX','deleteComment','requireSession','_commentService','/delete','unitId','replies','stringify','values','post','type','rangeId','root','filter','parse','userId','UNIVER_UNKNOWN','Reply','users','content','createTimestamp','Solved','comment','/universer-api/user/list','saveCommentToSnapshot','UNRECOGNIZED','Delete','_initUserSync','_userService','_httpService','threadId','_init','code','length','3565982qajZxx','_threadCommentModel','_config','785661hOKPUE','add','_injector','body','Edit','addUser','onReady','Unknown','Solve','find','dataSource','getComment','_sessionService','addComment','/add','commentUpdate$','OpenOrReOpen','getUser','get','size','parentId','updateComment','getMemberID','delete','customRanges','setConfig','userID','1890024LdKSjp','2iPCWvR','listComments','format'];_0xfba9=function(){return _0x2bf505;};return _0xfba9();}let g=class extends _0x3a39fe{constructor(_0x38a4fa,_0x111500){const _0xfd3f1b=_0x1b63d2;super(),this['_threadCommentDataSourceService']=_0x38a4fa,this[_0xfd3f1b(0x112)]=_0x111500,this['_initDataSource']();}[_0x1b63d2(0x105)](){const _0x16ec98=_0x1b63d2;this[_0x16ec98(0xfb)][_0x16ec98(0xe0)]=this[_0x16ec98(0x112)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4bf1ef),N(0x1,_0x1f1d44(f))],g);var se=Object['defineProperty'],oe=Object[_0x1b63d2(0x10f)],ne=(_0x5a342d,_0x2810b9,_0x54928b)=>_0x2810b9 in _0x5a342d?se(_0x5a342d,_0x2810b9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54928b}):_0x5a342d[_0x2810b9]=_0x54928b,ie=(_0x3de797,_0x421b53,_0x1f05ea,_0x2875a4)=>{const _0x2dad89=_0x1b63d2;for(var _0x3e394d=_0x2875a4>0x1?void 0x0:_0x2875a4?oe(_0x421b53,_0x1f05ea):_0x421b53,_0x4d63c6=_0x3de797[_0x2dad89(0x139)]-0x1,_0x50698f;_0x4d63c6>=0x0;_0x4d63c6--)(_0x50698f=_0x3de797[_0x4d63c6])&&(_0x3e394d=_0x50698f(_0x3e394d)||_0x3e394d);return _0x3e394d;},w=(_0x3ec69d,_0x466188)=>(_0x591ba9,_0x3b9278)=>_0x466188(_0x591ba9,_0x3b9278,_0x3ec69d),$=(_0x57ae81,_0x20131d,_0x9ae2f1)=>ne(_0x57ae81,typeof _0x20131d!=_0x1b63d2(0x114)?_0x20131d+'':_0x20131d,_0x9ae2f1);let b=class extends _0x3e09ee{constructor(_0x2b56d2=M,_0x12ed5a,_0x21be15){const _0x5c649c=_0x1b63d2;super(),this[_0x5c649c(0x13c)]=_0x2b56d2,this['_injector']=_0x12ed5a,this[_0x5c649c(0xfc)]=_0x21be15;const {..._0x575b49}=_0x3b8c01({},M,this[_0x5c649c(0x13c)]);this[_0x5c649c(0xfc)][_0x5c649c(0xef)](z,_0x575b49);}[_0x1b63d2(0x101)](){[[f],[g],[S]]['forEach'](_0x8a592a=>{const _0x381d2c=_0x1578;this[_0x381d2c(0xd8)][_0x381d2c(0xd7)](_0x8a592a);});}[_0x1b63d2(0xdc)](){const _0x3db257=_0x1b63d2;this['_injector'][_0x3db257(0xe8)](g),this['_injector'][_0x3db257(0xe8)](S);}};$(b,_0x1b63d2(0x10b),W),$(b,_0x1b63d2(0x122),_0x2bdad0[_0x1b63d2(0x128)]),b=ie([_0x284154(_0x29e253,_0x29d8d6,_0x314a4b),w(0x1,_0x1f1d44(_0x37d13d)),w(0x2,_0x4d3760)],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 _0x1b63d2=_0x1578;(function(_0x5431e3,_0xd6a9ca){const _0xa3f024=_0x1578,_0x207776=_0x5431e3();while(!![]){try{const _0x25ba84=-parseInt(_0xa3f024(0x13d))/0x1*(parseInt(_0xa3f024(0xf2))/0x2)+parseInt(_0xa3f024(0xf1))/0x3+parseInt(_0xa3f024(0x10d))/0x4+parseInt(_0xa3f024(0x115))/0x5+parseInt(_0xa3f024(0x109))/0x6+-parseInt(_0xa3f024(0x13a))/0x7+-parseInt(_0xa3f024(0x118))/0x8;if(_0x25ba84===_0xd6a9ca)break;else _0x207776['push'](_0x207776['shift']());}catch(_0x57cc54){_0x207776['push'](_0x207776['shift']());}}}(_0xfba9,0x92efd));import{CommentService as _0x1efde7,CollaborationSessionService as _0x1b2657,UniverCollaborationClientPlugin as _0x29d8d6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x314a4b}from'@univerjs-pro/license';import{dayjs as _0x8cd0d1,UserManagerService as _0x50aa43,Inject as _0x1f1d44,Injector as _0x37d13d,Disposable as _0x3a39fe,CustomRangeType as _0x590602,UniverInstanceType as _0x2bdad0,DependentOn as _0x284154,IConfigService as _0x4d3760,Plugin as _0x3e09ee,merge as _0x3b8c01}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29e253}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x153911,IThreadCommentDataSourceService as _0x4bf1ef}from'@univerjs/thread-comment';import{bufferTime as _0x426407}from'rxjs';import{HTTPService as _0x1f9932}from'@univerjs/network';const W=_0x1b63d2(0xf8);var I=(_0x2cf4d9=>(_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0xe6)]=0x0]=_0x1b63d2(0xe6),_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0x12d)]=0x1]='Solved',_0x2cf4d9[_0x2cf4d9[_0x1b63d2(0x131)]=-0x1]=_0x1b63d2(0x131),_0x2cf4d9))(I||{}),v=(_0x4fec35=>(_0x4fec35[_0x4fec35[_0x1b63d2(0xdd)]=0x0]=_0x1b63d2(0xdd),_0x4fec35[_0x4fec35[_0x1b63d2(0x117)]=0x1]=_0x1b63d2(0x117),_0x4fec35[_0x4fec35[_0x1b63d2(0x129)]=0x2]='Reply',_0x4fec35[_0x4fec35['Edit']=0x3]='Edit',_0x4fec35[_0x4fec35[_0x1b63d2(0x132)]=0x4]=_0x1b63d2(0x132),_0x4fec35[_0x4fec35['Solve']=0x5]=_0x1b63d2(0xde),_0x4fec35[_0x4fec35[_0x1b63d2(0x131)]=-0x1]=_0x1b63d2(0x131),_0x4fec35))(v||{});const D=_0x2a37cc=>_0x8cd0d1(new Date(+_0x2a37cc))[_0x1b63d2(0xf4)](_0x1b63d2(0x10e)),B=async(_0x28fc55,_0x34c8ed)=>{const _0x4d46f7=_0x1b63d2,_0x72a9f3=_0x28fc55[_0x4d46f7(0xe8)](_0x50aa43),_0x8311af=_0x28fc55[_0x4d46f7(0xe8)](_0x1f9932);_0x34c8ed['forEach'](_0x131182=>{const _0x5b2f45=_0x4d46f7;_0x72a9f3[_0x5b2f45(0xe7)](_0x131182)&&_0x34c8ed[_0x5b2f45(0xed)](_0x131182);}),_0x34c8ed[_0x4d46f7(0xe9)]&&(await _0x8311af[_0x4d46f7(0xe8)](_0x4d46f7(0x12f),{'params':{'userIDs':[..._0x34c8ed]}}))['body'][_0x4d46f7(0x12a)][_0x4d46f7(0x110)](_0x116a67=>{const _0x5e22d0=_0x4d46f7;_0x116a67&&_0x72a9f3[_0x5e22d0(0xdb)](_0x116a67);});};var K=Object[_0x1b63d2(0x10f)],V=(_0x5a09ab,_0x240573,_0x1a9479,_0x11f1eb)=>{for(var _0x1c7a36=_0x11f1eb>0x1?void 0x0:_0x11f1eb?K(_0x240573,_0x1a9479):_0x240573,_0x3ed78f=_0x5a09ab['length']-0x1,_0x58b219;_0x3ed78f>=0x0;_0x3ed78f--)(_0x58b219=_0x5a09ab[_0x3ed78f])&&(_0x1c7a36=_0x58b219(_0x1c7a36)||_0x1c7a36);return _0x1c7a36;},p=(_0x412509,_0xb6238d)=>(_0x2d1c3a,_0x55d765)=>_0xb6238d(_0x2d1c3a,_0x55d765,_0x412509);let S=class extends _0x3a39fe{constructor(_0x14f531,_0x4b7826,_0xd6e308,_0x449742){const _0x29c25b=_0x1b63d2;super(),this[_0x29c25b(0x11b)]=_0x14f531,this[_0x29c25b(0x13b)]=_0x4b7826,this[_0x29c25b(0x134)]=_0xd6e308,this[_0x29c25b(0xd8)]=_0x449742,this[_0x29c25b(0x137)](),this[_0x29c25b(0x133)]();}[_0x1b63d2(0x133)](){const _0x14e99e=_0x1b63d2;this[_0x14e99e(0x106)](this[_0x14e99e(0x13b)][_0x14e99e(0xe5)][_0x14e99e(0xfe)](_0x426407(0x10))['subscribe'](_0x45fbe3=>{const _0x49b6a3=_0x14e99e,_0x358fbc=new Set();_0x45fbe3[_0x49b6a3(0x110)](_0x599637=>{const _0x5b2001=_0x49b6a3;switch(_0x599637[_0x5b2001(0x122)]){case'add':{const _0xd8a688=_0x599637['payload'][_0x5b2001(0x10a)];_0x358fbc['add'](_0xd8a688);break;}}}),B(this[_0x49b6a3(0xd8)],_0x358fbc);}));}[_0x1b63d2(0x137)](){const _0x188efe=_0x1b63d2;this[_0x188efe(0x106)](this[_0x188efe(0x11b)]['commentUpdate$'][_0x188efe(0xf9)](async _0x37e2d4=>{const _0xc63fe0=_0x188efe;var _0x1b16de,_0x3261a1,_0x434e51,_0xbec997;const _0x1a9d2c=(_0x1b16de=this['_threadCommentModel'][_0xc63fe0(0xf5)](_0x37e2d4[_0xc63fe0(0x11d)])[_0xc63fe0(0xdf)](_0x561aad=>_0x561aad[_0xc63fe0(0x136)]===_0x37e2d4[_0xc63fe0(0x136)]))==null?void 0x0:_0x1b16de['root'];if(!_0x1a9d2c)return;const {unitId:_0x2a1173,subUnitId:_0x78a3f4}=_0x1a9d2c;switch(_0x37e2d4[_0xc63fe0(0xf6)]&&this[_0xc63fe0(0x134)]['addUser'](_0x37e2d4[_0xc63fe0(0xf6)]),_0x37e2d4['type']){case v[_0xc63fe0(0x117)]:break;case v[_0xc63fe0(0x129)]:{this['_threadCommentModel']['addComment'](_0x2a1173,_0x78a3f4,{'unitId':_0x2a1173,'subUnitId':_0x78a3f4,'ref':'','id':_0x37e2d4[_0xc63fe0(0x108)],'dT':D(+_0x37e2d4[_0xc63fe0(0x12c)]),'threadId':_0x37e2d4[_0xc63fe0(0x136)],'personId':(_0x434e51=(_0x3261a1=_0x37e2d4['user'])==null?void 0x0:_0x3261a1[_0xc63fe0(0xf0)])!=null?_0x434e51:_0x37e2d4['userId'],'text':JSON[_0xc63fe0(0x126)](_0x37e2d4[_0xc63fe0(0x12b)]),'parentId':_0x1a9d2c['id']});break;}case v['Delete']:{const _0xb9e28f=this[_0xc63fe0(0x13b)][_0xc63fe0(0xe1)](_0x2a1173,_0x78a3f4,_0x37e2d4[_0xc63fe0(0x108)]);_0xb9e28f&&_0xb9e28f[_0xc63fe0(0xea)]&&this[_0xc63fe0(0x13b)][_0xc63fe0(0x119)](_0x2a1173,_0x78a3f4,_0x37e2d4[_0xc63fe0(0x108)]);break;}case v[_0xc63fe0(0xda)]:{this[_0xc63fe0(0x13b)][_0xc63fe0(0xeb)](_0x2a1173,_0x78a3f4,{'commentId':_0x37e2d4[_0xc63fe0(0x108)],'text':JSON[_0xc63fe0(0x126)](_0x37e2d4[_0xc63fe0(0x12b)])});break;}case v[_0xc63fe0(0xde)]:{const _0x82479=(_0xbec997=this[_0xc63fe0(0x13b)]['getUnit'](_0x37e2d4[_0xc63fe0(0x11d)])[_0xc63fe0(0xdf)](_0xf53bd6=>_0xf53bd6[_0xc63fe0(0x136)]===_0x37e2d4[_0xc63fe0(0x136)]))==null?void 0x0:_0xbec997[_0xc63fe0(0x124)];_0x82479&&this[_0xc63fe0(0x13b)][_0xc63fe0(0x107)](_0x2a1173,_0x78a3f4,_0x82479['id'],_0x37e2d4['solved']===I[_0xc63fe0(0x12d)]);break;}}}));}};S=V([p(0x0,_0x1f1d44(_0x1efde7)),p(0x1,_0x1f1d44(_0x153911)),p(0x2,_0x1f1d44(_0x50aa43)),p(0x3,_0x1f1d44(_0x37d13d))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1b63d2(0x10f)],Q=(_0x453d60,_0x1035bd,_0x3cadbd,_0x1afb87)=>{const _0x53ba2e=_0x1b63d2;for(var _0x2d1bbf=_0x1afb87>0x1?void 0x0:_0x1afb87?k(_0x1035bd,_0x3cadbd):_0x1035bd,_0x2c3e49=_0x453d60[_0x53ba2e(0x139)]-0x1,_0x4270a3;_0x2c3e49>=0x0;_0x2c3e49--)(_0x4270a3=_0x453d60[_0x2c3e49])&&(_0x2d1bbf=_0x4270a3(_0x2d1bbf)||_0x2d1bbf);return _0x2d1bbf;},_=(_0x35eb53,_0x3cdcf6)=>(_0x2d11b1,_0xff17e)=>_0x3cdcf6(_0x2d11b1,_0xff17e,_0x35eb53);function _0x1578(_0x42b4a1,_0x583ca4){const _0xfba9bc=_0xfba9();return _0x1578=function(_0x157888,_0xa6824){_0x157888=_0x157888-0xd7;let _0x26eb3d=_0xfba9bc[_0x157888];return _0x26eb3d;},_0x1578(_0x42b4a1,_0x583ca4);}function X(_0x22d0b4,_0x32a958){const _0x10d340=_0x1b63d2,_0x1899d2=_0x22d0b4[_0x10d340(0x11e)][0x0];return{..._0x32a958,'id':_0x1899d2[_0x10d340(0x108)],'resolved':_0x22d0b4[_0x10d340(0xff)]===0x1,'dT':D(_0x1899d2[_0x10d340(0x12c)]),'personId':_0x1899d2[_0x10d340(0x127)],'threadId':_0x1899d2[_0x10d340(0x136)]};}function ee(_0x49a07f,_0xca14b8,_0x3ab95d){const _0x137da6=_0x1b63d2;var _0x281e00,_0x52347c;if(((_0x52347c=(_0x281e00=_0x49a07f==null?void 0x0:_0x49a07f[_0x137da6(0x11e)])==null?void 0x0:_0x281e00[_0x137da6(0x139)])!=null?_0x52347c:0x0)>0x0){const _0x3738e0=(_0x89f30a,_0x49e8bf)=>({'id':_0x89f30a[_0x137da6(0x108)],'threadId':_0x89f30a[_0x137da6(0x136)],'dT':D(_0x89f30a[_0x137da6(0x12c)]),'personId':_0x89f30a[_0x137da6(0x127)],'resolved':_0x49a07f[_0x137da6(0xff)]===I[_0x137da6(0x12d)],'unitId':_0xca14b8,'subUnitId':_0x3ab95d,'text':JSON[_0x137da6(0x126)](_0x89f30a['content']),'parentId':_0x49e8bf}),_0x39a866=_0x3738e0(_0x49a07f[_0x137da6(0x11e)][0x0]);return{..._0x39a866,'children':_0x49a07f[_0x137da6(0x11e)][_0x137da6(0x103)](0x1)[_0x137da6(0x113)](_0x18717b=>_0x3738e0(_0x18717b,_0x39a866['id']))};}return null;}let f=class{constructor(_0x3048c6,_0x20bfbe,_0x1a2128,_0x3a7f7b){this['_httpService']=_0x3048c6,this['_userService']=_0x20bfbe,this['_sessionService']=_0x1a2128,this['_injector']=_0x3a7f7b;}async[_0x1b63d2(0xe3)](_0x4ac19c){const _0x289498=_0x1b63d2;var _0x48c935,_0x47f404;const {parentId:_0x2f65a2,unitId:_0x408e88,text:_0x2ff9d3,threadId:_0x758987}=_0x4ac19c,_0x48d83c=(_0x47f404=(_0x48c935=_0x2ff9d3[_0x289498(0xee)])==null?void 0x0:_0x48c935[_0x289498(0x125)](_0x55e0cc=>_0x55e0cc['rangeType']===_0x590602[_0x289498(0xfd)])['map'](_0x19f725=>_0x19f725[_0x289498(0x123)]))!=null?_0x47f404:[],_0x1029e6=JSON[_0x289498(0x11f)](_0x2ff9d3),_0x10b909=(await this[_0x289498(0xe2)]['requireSession'](_0x408e88))[_0x289498(0xec)]();if(_0x2f65a2){const _0x1a7730={'memberId':_0x10b909,'unitId':_0x408e88,'content':_0x1029e6,'mention':_0x48d83c,'threadId':_0x758987},_0x37f8b2=(await this['_httpService'][_0x289498(0x121)](_0x289498(0xfa)+_0x408e88+'/reply',{'body':_0x1a7730}))[_0x289498(0xd9)][_0x289498(0x116)];return{..._0x4ac19c,'id':_0x37f8b2['replyId'],'dT':_0x8cd0d1(+_0x37f8b2[_0x289498(0x12c)])[_0x289498(0xf4)](_0x289498(0x10e)),'personId':_0x37f8b2[_0x289498(0x127)]};}else{const _0x4d24cf={'memberId':_0x10b909,'unitId':_0x408e88,'content':_0x1029e6,'mention':_0x48d83c},_0x14b85c=await this[_0x289498(0x135)][_0x289498(0x121)](_0x289498(0xfa)+_0x408e88+_0x289498(0xe4),{'body':_0x4d24cf});return X(_0x14b85c[_0x289498(0xd9)][_0x289498(0x12e)],_0x4ac19c);}}async[_0x1b63d2(0xeb)](_0x339605){const _0x1a653e=_0x1b63d2;var _0x47c22c,_0x3ef7f4;const {text:_0x527f01,unitId:_0xaf5f68}=_0x339605,_0x2a569d=(_0x3ef7f4=(_0x47c22c=_0x527f01[_0x1a653e(0xee)])==null?void 0x0:_0x47c22c['filter'](_0x4bcd50=>_0x4bcd50['rangeType']===_0x590602[_0x1a653e(0xfd)])['map'](_0x117cfa=>_0x117cfa[_0x1a653e(0x123)]))!=null?_0x3ef7f4:[],_0x2c0242=JSON[_0x1a653e(0x11f)](_0x527f01),_0xd3145b=_0x339605[_0x1a653e(0x136)],_0x566c92=_0x339605['id'],_0x234bd1={'memberId':(await this['_sessionService']['requireSession'](_0xaf5f68))[_0x1a653e(0xec)](),'unitId':_0xaf5f68,'threadId':_0xd3145b,'mention':_0x2a569d,'content':_0x2c0242,'replyId':_0x566c92},_0x4a2109=await this[_0x1a653e(0x135)][_0x1a653e(0x121)](_0x1a653e(0xfa)+_0xaf5f68+_0x1a653e(0x100),{'body':_0x234bd1});return!_0x4a2109['body'][_0x1a653e(0x102)]||_0x4a2109[_0x1a653e(0xd9)][_0x1a653e(0x102)][_0x1a653e(0x138)]===0x1;}async[_0x1b63d2(0x107)](_0x23f1f6){const _0x8aa3f4=_0x1b63d2,{unitId:_0x28e0ce}=_0x23f1f6,_0x1dbca8=_0x23f1f6[_0x8aa3f4(0x136)],_0x29a476={'memberId':this[_0x8aa3f4(0x134)]['getCurrentUser']()[_0x8aa3f4(0xf0)],'unitId':_0x28e0ce,'threadId':_0x1dbca8,'solved':_0x23f1f6[_0x8aa3f4(0x104)]?I['Solved']:I[_0x8aa3f4(0xe6)]},_0xb8c5ef=await this['_httpService'][_0x8aa3f4(0x121)](_0x8aa3f4(0xfa)+_0x28e0ce+_0x8aa3f4(0x10c),{'body':_0x29a476});return!_0xb8c5ef[_0x8aa3f4(0xd9)][_0x8aa3f4(0x102)]||_0xb8c5ef[_0x8aa3f4(0xd9)][_0x8aa3f4(0x102)][_0x8aa3f4(0x138)]===0x1;}async['deleteComment'](_0x3f6c3e,_0x31d976,_0x22dae2,_0xd02e8c){const _0x3d9fd4=_0x1b63d2,_0x1e3707={'memberId':(await this[_0x3d9fd4(0xe2)][_0x3d9fd4(0x11a)](_0x3f6c3e))[_0x3d9fd4(0xec)](),'threadId':_0x22dae2,'replyId':_0xd02e8c,'unitId':_0x3f6c3e},_0xbdddf7=await this[_0x3d9fd4(0x135)][_0x3d9fd4(0x121)]('/universer-api/comment/unit/'+_0x3f6c3e+_0x3d9fd4(0x11c),{'body':_0x1e3707});return!_0xbdddf7['body'][_0x3d9fd4(0x102)]||_0xbdddf7[_0x3d9fd4(0xd9)]['error'][_0x3d9fd4(0x138)]===0x1;}async[_0x1b63d2(0xf3)](_0x432f70,_0x2c301f,_0x3ade9f){const _0x250ee3=_0x1b63d2,_0x12742b={'unitId':_0x432f70,'threadId':_0x3ade9f},_0x1cd2b2=await this[_0x250ee3(0x135)][_0x250ee3(0x121)](_0x250ee3(0xfa)+_0x432f70+_0x250ee3(0xf7),{'body':_0x12742b}),_0x1af759=_0x3ade9f[_0x250ee3(0x113)](_0x40c5d7=>ee(_0x1cd2b2[_0x250ee3(0xd9)][_0x250ee3(0x111)][_0x40c5d7],_0x432f70,_0x2c301f))[_0x250ee3(0x125)](Boolean);return Object[_0x250ee3(0x120)](_0x1cd2b2[_0x250ee3(0xd9)][_0x250ee3(0x12a)])[_0x250ee3(0x110)](_0x25e561=>{const _0x236a0e=_0x250ee3;this[_0x236a0e(0x134)][_0x236a0e(0xdb)](_0x25e561);}),_0x1af759;}[_0x1b63d2(0x130)](_0x4955ae){const _0x210ab0=_0x1b63d2;return{'id':_0x4955ae['id'],'threadId':_0x4955ae[_0x210ab0(0x136)],'ref':_0x4955ae['ref']};}};f=Q([_(0x0,_0x1f1d44(_0x1f9932)),_(0x1,_0x1f1d44(_0x50aa43)),_(0x2,_0x1f1d44(_0x1b2657)),_(0x3,_0x1f1d44(_0x37d13d))],f);var re=Object[_0x1b63d2(0x10f)],te=(_0x263e91,_0x5ecfe5,_0x2f168b,_0x35def6)=>{const _0x41b960=_0x1b63d2;for(var _0x413aee=_0x35def6>0x1?void 0x0:_0x35def6?re(_0x5ecfe5,_0x2f168b):_0x5ecfe5,_0x2cd164=_0x263e91[_0x41b960(0x139)]-0x1,_0x2cd06c;_0x2cd164>=0x0;_0x2cd164--)(_0x2cd06c=_0x263e91[_0x2cd164])&&(_0x413aee=_0x2cd06c(_0x413aee)||_0x413aee);return _0x413aee;},N=(_0x489731,_0x1e01d9)=>(_0x28a08c,_0x2f9626)=>_0x1e01d9(_0x28a08c,_0x2f9626,_0x489731);function _0xfba9(){const _0x2bf505=['getUnit','user','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','/universer-api/comment/unit/','_threadCommentDataSourceService','_configService','COMMENT','pipe','solved','/edit','onStarting','error','slice','resolved','_initDataSource','disposeWithMe','resolveComment','replyId','6338838HviQuS','personId','pluginName','/solved','4211868wttVTZ','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','comments','_threadCommentDataSource','map','symbol','3668980qfjQNm','reply','Add','12610432nzXeGX','deleteComment','requireSession','_commentService','/delete','unitId','replies','stringify','values','post','type','rangeId','root','filter','parse','userId','UNIVER_UNKNOWN','Reply','users','content','createTimestamp','Solved','comment','/universer-api/user/list','saveCommentToSnapshot','UNRECOGNIZED','Delete','_initUserSync','_userService','_httpService','threadId','_init','code','length','3565982qajZxx','_threadCommentModel','_config','785661hOKPUE','add','_injector','body','Edit','addUser','onReady','Unknown','Solve','find','dataSource','getComment','_sessionService','addComment','/add','commentUpdate$','OpenOrReOpen','getUser','get','size','parentId','updateComment','getMemberID','delete','customRanges','setConfig','userID','1890024LdKSjp','2iPCWvR','listComments','format'];_0xfba9=function(){return _0x2bf505;};return _0xfba9();}let g=class extends _0x3a39fe{constructor(_0x38a4fa,_0x111500){const _0xfd3f1b=_0x1b63d2;super(),this['_threadCommentDataSourceService']=_0x38a4fa,this[_0xfd3f1b(0x112)]=_0x111500,this['_initDataSource']();}[_0x1b63d2(0x105)](){const _0x16ec98=_0x1b63d2;this[_0x16ec98(0xfb)][_0x16ec98(0xe0)]=this[_0x16ec98(0x112)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4bf1ef),N(0x1,_0x1f1d44(f))],g);var se=Object['defineProperty'],oe=Object[_0x1b63d2(0x10f)],ne=(_0x5a342d,_0x2810b9,_0x54928b)=>_0x2810b9 in _0x5a342d?se(_0x5a342d,_0x2810b9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54928b}):_0x5a342d[_0x2810b9]=_0x54928b,ie=(_0x3de797,_0x421b53,_0x1f05ea,_0x2875a4)=>{const _0x2dad89=_0x1b63d2;for(var _0x3e394d=_0x2875a4>0x1?void 0x0:_0x2875a4?oe(_0x421b53,_0x1f05ea):_0x421b53,_0x4d63c6=_0x3de797[_0x2dad89(0x139)]-0x1,_0x50698f;_0x4d63c6>=0x0;_0x4d63c6--)(_0x50698f=_0x3de797[_0x4d63c6])&&(_0x3e394d=_0x50698f(_0x3e394d)||_0x3e394d);return _0x3e394d;},w=(_0x3ec69d,_0x466188)=>(_0x591ba9,_0x3b9278)=>_0x466188(_0x591ba9,_0x3b9278,_0x3ec69d),$=(_0x57ae81,_0x20131d,_0x9ae2f1)=>ne(_0x57ae81,typeof _0x20131d!=_0x1b63d2(0x114)?_0x20131d+'':_0x20131d,_0x9ae2f1);let b=class extends _0x3e09ee{constructor(_0x2b56d2=M,_0x12ed5a,_0x21be15){const _0x5c649c=_0x1b63d2;super(),this[_0x5c649c(0x13c)]=_0x2b56d2,this['_injector']=_0x12ed5a,this[_0x5c649c(0xfc)]=_0x21be15;const {..._0x575b49}=_0x3b8c01({},M,this[_0x5c649c(0x13c)]);this[_0x5c649c(0xfc)][_0x5c649c(0xef)](z,_0x575b49);}[_0x1b63d2(0x101)](){[[f],[g],[S]]['forEach'](_0x8a592a=>{const _0x381d2c=_0x1578;this[_0x381d2c(0xd8)][_0x381d2c(0xd7)](_0x8a592a);});}[_0x1b63d2(0xdc)](){const _0x3db257=_0x1b63d2;this['_injector'][_0x3db257(0xe8)](g),this['_injector'][_0x3db257(0xe8)](S);}};$(b,_0x1b63d2(0x10b),W),$(b,_0x1b63d2(0x122),_0x2bdad0[_0x1b63d2(0x128)]),b=ie([_0x284154(_0x29e253,_0x29d8d6,_0x314a4b),w(0x1,_0x1f1d44(_0x37d13d)),w(0x2,_0x4d3760)],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 _0x1d71(_0x35b4c9,_0x1f14a5){const _0x3ca37b=_0x3ca3();return _0x1d71=function(_0x1d712f,_0x20cfc7){_0x1d712f=_0x1d712f-0x14e;let _0x19ca1a=_0x3ca37b[_0x1d712f];return _0x19ca1a;},_0x1d71(_0x35b4c9,_0x1f14a5);}(function(_0x5d3e81,_0x1b4c87){const _0x48ebbb=_0x1d71,_0x2fa0e8=_0x5d3e81();while(!![]){try{const _0x3c46c3=parseInt(_0x48ebbb(0x16b))/0x1+-parseInt(_0x48ebbb(0x19a))/0x2*(parseInt(_0x48ebbb(0x1ae))/0x3)+parseInt(_0x48ebbb(0x1af))/0x4+-parseInt(_0x48ebbb(0x1a0))/0x5+-parseInt(_0x48ebbb(0x1b6))/0x6*(-parseInt(_0x48ebbb(0x16d))/0x7)+parseInt(_0x48ebbb(0x160))/0x8+parseInt(_0x48ebbb(0x187))/0x9*(-parseInt(_0x48ebbb(0x1b7))/0xa);if(_0x3c46c3===_0x1b4c87)break;else _0x2fa0e8['push'](_0x2fa0e8['shift']());}catch(_0x586423){_0x2fa0e8['push'](_0x2fa0e8['shift']());}}}(_0x3ca3,0x1e2c0),function(_0x1b18ad,_0x3f92a9){const _0x1ffe43=_0x1d71;typeof exports==_0x1ffe43(0x171)&&typeof module<'u'?_0x3f92a9(exports,require(_0x1ffe43(0x18c)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x1ffe43(0x1cd)),require(_0x1ffe43(0x19e)),require(_0x1ffe43(0x153)),require('@univerjs/network')):typeof define==_0x1ffe43(0x1c6)&&define['amd']?define(['exports',_0x1ffe43(0x18c),_0x1ffe43(0x196),_0x1ffe43(0x189),'@univerjs/thread-comment-ui',_0x1ffe43(0x19e),_0x1ffe43(0x153),_0x1ffe43(0x172)],_0x3f92a9):(_0x1b18ad=typeof globalThis<'u'?globalThis:_0x1b18ad||self,_0x3f92a9(_0x1b18ad['UniverProThreadCommentDatasource']={},_0x1b18ad[_0x1ffe43(0x1a2)],_0x1b18ad[_0x1ffe43(0x1a6)],_0x1b18ad['UniverCore'],_0x1b18ad[_0x1ffe43(0x179)],_0x1b18ad['UniverThreadComment'],_0x1b18ad[_0x1ffe43(0x153)],_0x1b18ad[_0x1ffe43(0x15a)]));}(this,function(_0x4bb04a,_0x231508,_0x58ba6e,_0x51fa93,_0x1a4e41,_0x11221a,_0x5323bf,_0x5f50e0){'use strict';const _0x1a890b=_0x1d71;const _0x358dee=_0x1a890b(0x165);var _0x358345=(_0x23fb2a=>(_0x23fb2a[_0x23fb2a['OpenOrReOpen']=0x0]=_0x1a890b(0x16e),_0x23fb2a[_0x23fb2a[_0x1a890b(0x154)]=0x1]=_0x1a890b(0x154),_0x23fb2a[_0x23fb2a['UNRECOGNIZED']=-0x1]=_0x1a890b(0x1ba),_0x23fb2a))(_0x358345||{}),_0x7b9b6b=(_0x1c8e35=>(_0x1c8e35[_0x1c8e35[_0x1a890b(0x157)]=0x0]=_0x1a890b(0x157),_0x1c8e35[_0x1c8e35[_0x1a890b(0x1b2)]=0x1]='Add',_0x1c8e35[_0x1c8e35[_0x1a890b(0x1b8)]=0x2]=_0x1a890b(0x1b8),_0x1c8e35[_0x1c8e35[_0x1a890b(0x150)]=0x3]=_0x1a890b(0x150),_0x1c8e35[_0x1c8e35[_0x1a890b(0x1cb)]=0x4]=_0x1a890b(0x1cb),_0x1c8e35[_0x1c8e35[_0x1a890b(0x1a3)]=0x5]=_0x1a890b(0x1a3),_0x1c8e35[_0x1c8e35['UNRECOGNIZED']=-0x1]=_0x1a890b(0x1ba),_0x1c8e35))(_0x7b9b6b||{});const _0x1d2abd=_0x12a52c=>_0x51fa93[_0x1a890b(0x18a)](new Date(+_0x12a52c))[_0x1a890b(0x15f)](_0x1a890b(0x168)),_0x48c9de=async(_0x4c7bfa,_0x1729c8)=>{const _0x211020=_0x1a890b,_0x59c121=_0x4c7bfa[_0x211020(0x1d0)](_0x51fa93[_0x211020(0x1b9)]),_0x56f4e0=_0x4c7bfa['get'](_0x5f50e0['HTTPService']);_0x1729c8[_0x211020(0x1d6)](_0x1f4bb2=>{const _0x52dd3a=_0x211020;_0x59c121[_0x52dd3a(0x1c8)](_0x1f4bb2)&&_0x1729c8[_0x52dd3a(0x17e)](_0x1f4bb2);}),_0x1729c8[_0x211020(0x169)]&&(await _0x56f4e0[_0x211020(0x1d0)](_0x211020(0x151),{'params':{'userIDs':[..._0x1729c8]}}))['body'][_0x211020(0x1d2)][_0x211020(0x1d6)](_0x2ee77e=>{const _0x147319=_0x211020;_0x2ee77e&&_0x59c121[_0x147319(0x17a)](_0x2ee77e);});};var _0x5271ec=Object[_0x1a890b(0x161)],_0x426765=(_0x469070,_0x857ef0,_0x3bb69e,_0x2e722f)=>{const _0x5eb309=_0x1a890b;for(var _0x4abfff=_0x2e722f>0x1?void 0x0:_0x2e722f?_0x5271ec(_0x857ef0,_0x3bb69e):_0x857ef0,_0x4483c2=_0x469070[_0x5eb309(0x188)]-0x1,_0x1db081;_0x4483c2>=0x0;_0x4483c2--)(_0x1db081=_0x469070[_0x4483c2])&&(_0x4abfff=_0x1db081(_0x4abfff)||_0x4abfff);return _0x4abfff;},_0xc4c72e=(_0x4ec054,_0x4d33fd)=>(_0x5092ed,_0x3f4bc7)=>_0x4d33fd(_0x5092ed,_0x3f4bc7,_0x4ec054);let _0x49d52b=class extends _0x51fa93[_0x1a890b(0x1c7)]{constructor(_0x248723,_0x3f1814,_0x4fc229,_0x3937b5){const _0x3a099e=_0x1a890b;super(),this['_commentService']=_0x248723,this[_0x3a099e(0x1c5)]=_0x3f1814,this['_userService']=_0x4fc229,this[_0x3a099e(0x18e)]=_0x3937b5,this[_0x3a099e(0x19d)](),this[_0x3a099e(0x1d8)]();}[_0x1a890b(0x1d8)](){const _0x3529e9=_0x1a890b;this['disposeWithMe'](this['_threadCommentModel'][_0x3529e9(0x1aa)]['pipe'](_0x5323bf['bufferTime'](0x10))[_0x3529e9(0x18b)](_0xcdf9a=>{const _0x4bb08f=_0x3529e9,_0x165cc8=new Set();_0xcdf9a[_0x4bb08f(0x1d6)](_0x5d1511=>{const _0x340531=_0x4bb08f;switch(_0x5d1511[_0x340531(0x170)]){case _0x340531(0x1cc):{const _0x59a14b=_0x5d1511[_0x340531(0x1b0)][_0x340531(0x1a1)];_0x165cc8[_0x340531(0x1cc)](_0x59a14b);break;}}}),_0x48c9de(this[_0x4bb08f(0x18e)],_0x165cc8);}));}[_0x1a890b(0x19d)](){const _0x4477a6=_0x1a890b;this[_0x4477a6(0x1be)](this[_0x4477a6(0x14e)]['commentUpdate$'][_0x4477a6(0x18b)](async _0x28b9c8=>{const _0x2e0c15=_0x4477a6;var _0x36504a,_0x2f5193,_0x304432,_0x17e4c9;const _0x2b5169=(_0x36504a=this[_0x2e0c15(0x1c5)][_0x2e0c15(0x19c)](_0x28b9c8[_0x2e0c15(0x190)])[_0x2e0c15(0x1d3)](_0x2d72fb=>_0x2d72fb[_0x2e0c15(0x191)]===_0x28b9c8[_0x2e0c15(0x191)]))==null?void 0x0:_0x36504a[_0x2e0c15(0x19f)];if(!_0x2b5169)return;const {unitId:_0x2fdf4c,subUnitId:_0x111498}=_0x2b5169;switch(_0x28b9c8[_0x2e0c15(0x19b)]&&this[_0x2e0c15(0x15c)][_0x2e0c15(0x17a)](_0x28b9c8[_0x2e0c15(0x19b)]),_0x28b9c8[_0x2e0c15(0x170)]){case _0x7b9b6b[_0x2e0c15(0x1b2)]:break;case _0x7b9b6b['Reply']:{this[_0x2e0c15(0x1c5)]['addComment'](_0x2fdf4c,_0x111498,{'unitId':_0x2fdf4c,'subUnitId':_0x111498,'ref':'','id':_0x28b9c8['replyId'],'dT':_0x1d2abd(+_0x28b9c8[_0x2e0c15(0x1ab)]),'threadId':_0x28b9c8[_0x2e0c15(0x191)],'personId':(_0x304432=(_0x2f5193=_0x28b9c8[_0x2e0c15(0x19b)])==null?void 0x0:_0x2f5193[_0x2e0c15(0x1c2)])!=null?_0x304432:_0x28b9c8[_0x2e0c15(0x1a5)],'text':JSON[_0x2e0c15(0x177)](_0x28b9c8[_0x2e0c15(0x175)]),'parentId':_0x2b5169['id']});break;}case _0x7b9b6b['Delete']:{const _0x393844=this[_0x2e0c15(0x1c5)][_0x2e0c15(0x192)](_0x2fdf4c,_0x111498,_0x28b9c8[_0x2e0c15(0x197)]);_0x393844&&_0x393844[_0x2e0c15(0x1c4)]&&this[_0x2e0c15(0x1c5)]['deleteComment'](_0x2fdf4c,_0x111498,_0x28b9c8[_0x2e0c15(0x197)]);break;}case _0x7b9b6b[_0x2e0c15(0x150)]:{this['_threadCommentModel'][_0x2e0c15(0x198)](_0x2fdf4c,_0x111498,{'commentId':_0x28b9c8[_0x2e0c15(0x197)],'text':JSON[_0x2e0c15(0x177)](_0x28b9c8[_0x2e0c15(0x175)])});break;}case _0x7b9b6b[_0x2e0c15(0x1a3)]:{const _0x438ed1=(_0x17e4c9=this[_0x2e0c15(0x1c5)]['getUnit'](_0x28b9c8[_0x2e0c15(0x190)])[_0x2e0c15(0x1d3)](_0x5b0d13=>_0x5b0d13[_0x2e0c15(0x191)]===_0x28b9c8[_0x2e0c15(0x191)]))==null?void 0x0:_0x17e4c9['root'];_0x438ed1&&this[_0x2e0c15(0x1c5)][_0x2e0c15(0x173)](_0x2fdf4c,_0x111498,_0x438ed1['id'],_0x28b9c8[_0x2e0c15(0x162)]===_0x358345[_0x2e0c15(0x154)]);break;}}}));}};_0x49d52b=_0x426765([_0xc4c72e(0x0,_0x51fa93[_0x1a890b(0x1ad)](_0x231508[_0x1a890b(0x183)])),_0xc4c72e(0x1,_0x51fa93[_0x1a890b(0x1ad)](_0x11221a[_0x1a890b(0x199)])),_0xc4c72e(0x2,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93['UserManagerService'])),_0xc4c72e(0x3,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93['Injector']))],_0x49d52b);const _0x2d2a41=_0x1a890b(0x1a9),_0xe7c797={};var _0x5707e4=Object[_0x1a890b(0x161)],_0x245ee6=(_0x571c93,_0x18b03f,_0x50ba2c,_0xd66515)=>{const _0x100bda=_0x1a890b;for(var _0x100c6c=_0xd66515>0x1?void 0x0:_0xd66515?_0x5707e4(_0x18b03f,_0x50ba2c):_0x18b03f,_0x6b794=_0x571c93[_0x100bda(0x188)]-0x1,_0x39ebff;_0x6b794>=0x0;_0x6b794--)(_0x39ebff=_0x571c93[_0x6b794])&&(_0x100c6c=_0x39ebff(_0x100c6c)||_0x100c6c);return _0x100c6c;},_0x7dede2=(_0x2ffbf6,_0x51b56)=>(_0x3ca1e8,_0x35ccba)=>_0x51b56(_0x3ca1e8,_0x35ccba,_0x2ffbf6);function _0x5316c2(_0x16ebc7,_0x25684b){const _0x1d647d=_0x1a890b,_0x1be0e7=_0x16ebc7[_0x1d647d(0x18f)][0x0];return{..._0x25684b,'id':_0x1be0e7[_0x1d647d(0x197)],'resolved':_0x16ebc7[_0x1d647d(0x162)]===0x1,'dT':_0x1d2abd(_0x1be0e7[_0x1d647d(0x1ab)]),'personId':_0x1be0e7['userId'],'threadId':_0x1be0e7[_0x1d647d(0x191)]};}function _0x471ce5(_0x322c58,_0x24ad29,_0x1b9b93){const _0x48779b=_0x1a890b;var _0x1aaeb4,_0x1193ce;if(((_0x1193ce=(_0x1aaeb4=_0x322c58==null?void 0x0:_0x322c58[_0x48779b(0x18f)])==null?void 0x0:_0x1aaeb4[_0x48779b(0x188)])!=null?_0x1193ce:0x0)>0x0){const _0x3dc01c=(_0x7e6b35,_0x57b259)=>({'id':_0x7e6b35[_0x48779b(0x197)],'threadId':_0x7e6b35['threadId'],'dT':_0x1d2abd(_0x7e6b35[_0x48779b(0x1ab)]),'personId':_0x7e6b35[_0x48779b(0x1a5)],'resolved':_0x322c58[_0x48779b(0x162)]===_0x358345[_0x48779b(0x154)],'unitId':_0x24ad29,'subUnitId':_0x1b9b93,'text':JSON['parse'](_0x7e6b35[_0x48779b(0x175)]),'parentId':_0x57b259}),_0x5dd364=_0x3dc01c(_0x322c58[_0x48779b(0x18f)][0x0]);return{..._0x5dd364,'children':_0x322c58[_0x48779b(0x18f)][_0x48779b(0x194)](0x1)['map'](_0x580174=>_0x3dc01c(_0x580174,_0x5dd364['id']))};}return null;}let _0x5e0620=class{constructor(_0x31f484,_0x3d758d,_0x3bf14c,_0x4b3a95){const _0x5a7cec=_0x1a890b;this[_0x5a7cec(0x184)]=_0x31f484,this[_0x5a7cec(0x15c)]=_0x3d758d,this['_sessionService']=_0x3bf14c,this[_0x5a7cec(0x18e)]=_0x4b3a95;}async[_0x1a890b(0x1d5)](_0x354617){const _0x394aeb=_0x1a890b;var _0x26e8f3,_0x42490f;const {parentId:_0x2fa80d,unitId:_0x3d930b,text:_0x172b9e,threadId:_0x36e593}=_0x354617,_0x353a75=(_0x42490f=(_0x26e8f3=_0x172b9e[_0x394aeb(0x1bb)])==null?void 0x0:_0x26e8f3[_0x394aeb(0x185)](_0x597e30=>_0x597e30[_0x394aeb(0x1bc)]===_0x51fa93[_0x394aeb(0x1a4)][_0x394aeb(0x1ce)])[_0x394aeb(0x164)](_0x20ca55=>_0x20ca55[_0x394aeb(0x1b3)]))!=null?_0x42490f:[],_0x43ea16=JSON[_0x394aeb(0x17d)](_0x172b9e),_0xdbb8a1=(await this['_sessionService'][_0x394aeb(0x1a7)](_0x3d930b))['getMemberID']();if(_0x2fa80d){const _0x3b88fe={'memberId':_0xdbb8a1,'unitId':_0x3d930b,'content':_0x43ea16,'mention':_0x353a75,'threadId':_0x36e593},_0x1b3273=(await this['_httpService'][_0x394aeb(0x152)]('/universer-api/comment/unit/'+_0x3d930b+_0x394aeb(0x195),{'body':_0x3b88fe}))[_0x394aeb(0x155)][_0x394aeb(0x17f)];return{..._0x354617,'id':_0x1b3273[_0x394aeb(0x197)],'dT':_0x51fa93[_0x394aeb(0x18a)](+_0x1b3273['createTimestamp'])[_0x394aeb(0x15f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b3273[_0x394aeb(0x1a5)]};}else{const _0x594183={'memberId':_0xdbb8a1,'unitId':_0x3d930b,'content':_0x43ea16,'mention':_0x353a75},_0x3b74fe=await this['_httpService'][_0x394aeb(0x152)](_0x394aeb(0x176)+_0x3d930b+_0x394aeb(0x174),{'body':_0x594183});return _0x5316c2(_0x3b74fe[_0x394aeb(0x155)][_0x394aeb(0x181)],_0x354617);}}async[_0x1a890b(0x198)](_0x1eb411){const _0x356a36=_0x1a890b;var _0x27e9c7,_0x58bd49;const {text:_0x2464a4,unitId:_0x1cab8e}=_0x1eb411,_0x331395=(_0x58bd49=(_0x27e9c7=_0x2464a4['customRanges'])==null?void 0x0:_0x27e9c7[_0x356a36(0x185)](_0x959539=>_0x959539['rangeType']===_0x51fa93[_0x356a36(0x1a4)][_0x356a36(0x1ce)])[_0x356a36(0x164)](_0x1f4819=>_0x1f4819['rangeId']))!=null?_0x58bd49:[],_0x515c18=JSON[_0x356a36(0x17d)](_0x2464a4),_0x214694=_0x1eb411[_0x356a36(0x191)],_0x58189d=_0x1eb411['id'],_0x301fce={'memberId':(await this['_sessionService'][_0x356a36(0x1a7)](_0x1cab8e))[_0x356a36(0x16a)](),'unitId':_0x1cab8e,'threadId':_0x214694,'mention':_0x331395,'content':_0x515c18,'replyId':_0x58189d},_0x7abaf6=await this[_0x356a36(0x184)]['post'](_0x356a36(0x176)+_0x1cab8e+'/edit',{'body':_0x301fce});return!_0x7abaf6[_0x356a36(0x155)][_0x356a36(0x1b1)]||_0x7abaf6[_0x356a36(0x155)]['error']['code']===0x1;}async[_0x1a890b(0x173)](_0x5c8bbd){const _0x86a8b8=_0x1a890b,{unitId:_0x4bdcb6}=_0x5c8bbd,_0x139503=_0x5c8bbd['threadId'],_0x4772ae={'memberId':this['_userService'][_0x86a8b8(0x182)]()[_0x86a8b8(0x1c2)],'unitId':_0x4bdcb6,'threadId':_0x139503,'solved':_0x5c8bbd[_0x86a8b8(0x1c9)]?_0x358345['Solved']:_0x358345[_0x86a8b8(0x16e)]},_0x5ca9ca=await this[_0x86a8b8(0x184)]['post'](_0x86a8b8(0x176)+_0x4bdcb6+'/solved',{'body':_0x4772ae});return!_0x5ca9ca['body']['error']||_0x5ca9ca[_0x86a8b8(0x155)][_0x86a8b8(0x1b1)]['code']===0x1;}async[_0x1a890b(0x180)](_0x1d6e2c,_0x53137c,_0x5772c0,_0x515d86){const _0x6a9f3d=_0x1a890b,_0x154b2e={'memberId':(await this[_0x6a9f3d(0x1ca)][_0x6a9f3d(0x1a7)](_0x1d6e2c))[_0x6a9f3d(0x16a)](),'threadId':_0x5772c0,'replyId':_0x515d86,'unitId':_0x1d6e2c},_0x21fb1f=await this[_0x6a9f3d(0x184)][_0x6a9f3d(0x152)](_0x6a9f3d(0x176)+_0x1d6e2c+_0x6a9f3d(0x14f),{'body':_0x154b2e});return!_0x21fb1f[_0x6a9f3d(0x155)]['error']||_0x21fb1f['body'][_0x6a9f3d(0x1b1)][_0x6a9f3d(0x193)]===0x1;}async[_0x1a890b(0x1d1)](_0x5c4920,_0x5b581a,_0x1c5eea){const _0x534bc3=_0x1a890b,_0x5bdad3={'unitId':_0x5c4920,'threadId':_0x1c5eea},_0x5a6d6d=await this['_httpService'][_0x534bc3(0x152)](_0x534bc3(0x176)+_0x5c4920+_0x534bc3(0x166),{'body':_0x5bdad3}),_0x3a1d18=_0x1c5eea[_0x534bc3(0x164)](_0x2ce17b=>_0x471ce5(_0x5a6d6d[_0x534bc3(0x155)][_0x534bc3(0x15d)][_0x2ce17b],_0x5c4920,_0x5b581a))[_0x534bc3(0x185)](Boolean);return Object[_0x534bc3(0x1b5)](_0x5a6d6d[_0x534bc3(0x155)][_0x534bc3(0x1d2)])[_0x534bc3(0x1d6)](_0x3bd3a2=>{const _0x20edc5=_0x534bc3;this[_0x20edc5(0x15c)][_0x20edc5(0x17a)](_0x3bd3a2);}),_0x3a1d18;}[_0x1a890b(0x1bf)](_0x4fa6c8){const _0x5c9df2=_0x1a890b;return{'id':_0x4fa6c8['id'],'threadId':_0x4fa6c8[_0x5c9df2(0x191)],'ref':_0x4fa6c8['ref']};}};_0x5e0620=_0x245ee6([_0x7dede2(0x0,_0x51fa93['Inject'](_0x5f50e0[_0x1a890b(0x15b)])),_0x7dede2(0x1,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93[_0x1a890b(0x1b9)])),_0x7dede2(0x2,_0x51fa93['Inject'](_0x231508[_0x1a890b(0x1d4)])),_0x7dede2(0x3,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93['Injector']))],_0x5e0620);var _0x4f3f68=Object['getOwnPropertyDescriptor'],_0x50dfbc=(_0x261130,_0xcdbff9,_0x1d1c7c,_0x28dd91)=>{const _0x3ca55e=_0x1a890b;for(var _0x17ffcb=_0x28dd91>0x1?void 0x0:_0x28dd91?_0x4f3f68(_0xcdbff9,_0x1d1c7c):_0xcdbff9,_0x2872ad=_0x261130[_0x3ca55e(0x188)]-0x1,_0x3878b1;_0x2872ad>=0x0;_0x2872ad--)(_0x3878b1=_0x261130[_0x2872ad])&&(_0x17ffcb=_0x3878b1(_0x17ffcb)||_0x17ffcb);return _0x17ffcb;},_0x46dbe4=(_0xf73938,_0x377cd0)=>(_0x58ff43,_0x30c4d6)=>_0x377cd0(_0x58ff43,_0x30c4d6,_0xf73938);let _0x94cf98=class extends _0x51fa93[_0x1a890b(0x1c7)]{constructor(_0x416422,_0x2e474b){const _0xb06615=_0x1a890b;super(),this['_threadCommentDataSourceService']=_0x416422,this[_0xb06615(0x186)]=_0x2e474b,this[_0xb06615(0x1b4)]();}[_0x1a890b(0x1b4)](){const _0x5a4482=_0x1a890b;this[_0x5a4482(0x1d7)][_0x5a4482(0x17b)]=this[_0x5a4482(0x186)],this[_0x5a4482(0x1d7)][_0x5a4482(0x1ac)]=!0x1;}};_0x94cf98=_0x50dfbc([_0x46dbe4(0x0,_0x11221a[_0x1a890b(0x158)]),_0x46dbe4(0x1,_0x51fa93['Inject'](_0x5e0620))],_0x94cf98);var _0xa802e9=Object[_0x1a890b(0x17c)],_0x40054e=Object[_0x1a890b(0x161)],_0x138cbd=(_0x4c942c,_0x1d769e,_0xe8082e)=>_0x1d769e in _0x4c942c?_0xa802e9(_0x4c942c,_0x1d769e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe8082e}):_0x4c942c[_0x1d769e]=_0xe8082e,_0x36b0f7=(_0x8fc20b,_0x51e8ca,_0x45a0f4,_0x654798)=>{const _0x283bad=_0x1a890b;for(var _0x434566=_0x654798>0x1?void 0x0:_0x654798?_0x40054e(_0x51e8ca,_0x45a0f4):_0x51e8ca,_0x141d39=_0x8fc20b[_0x283bad(0x188)]-0x1,_0x1c4f2c;_0x141d39>=0x0;_0x141d39--)(_0x1c4f2c=_0x8fc20b[_0x141d39])&&(_0x434566=_0x1c4f2c(_0x434566)||_0x434566);return _0x434566;},_0x109467=(_0x476619,_0x2e388e)=>(_0x350e1b,_0x26b329)=>_0x2e388e(_0x350e1b,_0x26b329,_0x476619),_0x158acc=(_0x3a18af,_0xf99cd,_0x59f257)=>_0x138cbd(_0x3a18af,typeof _0xf99cd!='symbol'?_0xf99cd+'':_0xf99cd,_0x59f257);_0x4bb04a[_0x1a890b(0x1c3)]=class extends _0x51fa93['Plugin']{constructor(_0x1fe90a=_0xe7c797,_0x5499dd,_0x3f6921){const _0x140fcc=_0x1a890b;super(),this[_0x140fcc(0x163)]=_0x1fe90a,this[_0x140fcc(0x18e)]=_0x5499dd,this[_0x140fcc(0x1c0)]=_0x3f6921;const {..._0x4b13bb}=_0x51fa93[_0x140fcc(0x1c1)]({},_0xe7c797,this[_0x140fcc(0x163)]);this[_0x140fcc(0x1c0)]['setConfig'](_0x2d2a41,_0x4b13bb);}[_0x1a890b(0x167)](){const _0x2b108a=_0x1a890b;[[_0x5e0620],[_0x94cf98],[_0x49d52b]][_0x2b108a(0x1d6)](_0x1ab1d8=>{const _0x387e2c=_0x2b108a;this[_0x387e2c(0x18e)][_0x387e2c(0x1cc)](_0x1ab1d8);});}[_0x1a890b(0x178)](){const _0x13e3b9=_0x1a890b;this['_injector'][_0x13e3b9(0x1d0)](_0x94cf98),this[_0x13e3b9(0x18e)]['get'](_0x49d52b);}},_0x158acc(_0x4bb04a[_0x1a890b(0x1c3)],'pluginName',_0x358dee),_0x158acc(_0x4bb04a['UniverThreadCommentDataSourcePlugin'],_0x1a890b(0x170),_0x51fa93['UniverInstanceType'][_0x1a890b(0x18d)]),_0x4bb04a[_0x1a890b(0x1c3)]=_0x36b0f7([_0x51fa93[_0x1a890b(0x1cf)](_0x1a4e41[_0x1a890b(0x159)],_0x231508[_0x1a890b(0x16c)],_0x58ba6e[_0x1a890b(0x1a8)]),_0x109467(0x1,_0x51fa93[_0x1a890b(0x1ad)](_0x51fa93[_0x1a890b(0x15e)])),_0x109467(0x2,_0x51fa93[_0x1a890b(0x156)])],_0x4bb04a['UniverThreadCommentDataSourcePlugin']),Object[_0x1a890b(0x17c)](_0x4bb04a,Symbol[_0x1a890b(0x16f)],{'value':_0x1a890b(0x1bd)});}));function _0x3ca3(){const _0x29f9fb=['resolveComment','/add','content','/universer-api/comment/unit/','parse','onReady','UniverThreadCommentUi','addUser','dataSource','defineProperty','stringify','delete','reply','deleteComment','comment','getCurrentUser','CommentService','_httpService','filter','_threadCommentDataSource','1482993PlctLC','length','@univerjs/core','dayjs','subscribe','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','_injector','replies','unitId','threadId','getComment','code','slice','/reply','@univerjs-pro/license','replyId','updateComment','ThreadCommentModel','15402GVCrQG','user','getUnit','_init','@univerjs/thread-comment','root','924300fCYChi','personId','UniverProCollaborationClient','Solve','CustomRangeType','userId','UniverProLicense','requireSession','UniverLicensePlugin','thread-comment-data-source.config','commentUpdate$','createTimestamp','syncUpdateMutationToColla','Inject','9OxZmZM','66200ewqoLq','payload','error','Add','rangeId','_initDataSource','values','12yPrGvp','10ZjCeMq','Reply','UserManagerService','UNRECOGNIZED','customRanges','rangeType','Module','disposeWithMe','saveCommentToSnapshot','_configService','merge','userID','UniverThreadCommentDataSourcePlugin','parentId','_threadCommentModel','function','Disposable','getUser','resolved','_sessionService','Delete','add','@univerjs/thread-comment-ui','COMMENT','DependentOn','get','listComments','users','find','CollaborationSessionService','addComment','forEach','_threadCommentDataSourceService','_initUserSync','_commentService','/delete','Edit','/universer-api/user/list','post','rxjs','Solved','body','IConfigService','Unknown','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','UniverNetwork','HTTPService','_userService','comments','Injector','format','1593344Tbhncn','getOwnPropertyDescriptor','solved','_config','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','onStarting','YYYY/MM/DD\x20HH:mm','size','getMemberID','159900TWHjNS','UniverCollaborationClientPlugin','422471VnwHRZ','OpenOrReOpen','toStringTag','type','object','@univerjs/network'];_0x3ca3=function(){return _0x29f9fb;};return _0x3ca3();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.8",
3
+ "version": "0.6.9-experimental.20250403-d914ddc",
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/license": "0.6.8",
49
- "@univerjs-pro/collaboration-client": "0.6.8",
50
- "@univerjs/core": "0.6.8",
48
+ "@univerjs-pro/collaboration-client": "0.6.9-experimental.20250403-d914ddc",
49
+ "@univerjs/core": "0.6.9-experimental.20250403-d914ddc",
50
+ "@univerjs-pro/license": "0.6.9-experimental.20250403-d914ddc",
51
51
  "@univerjs/protocol": "0.1.45",
52
- "@univerjs/network": "0.6.8",
53
- "@univerjs/thread-comment-ui": "0.6.8",
54
- "@univerjs/thread-comment": "0.6.8"
52
+ "@univerjs/thread-comment": "0.6.9-experimental.20250403-d914ddc",
53
+ "@univerjs/network": "0.6.9-experimental.20250403-d914ddc",
54
+ "@univerjs/thread-comment-ui": "0.6.9-experimental.20250403-d914ddc"
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.8"
61
+ "@univerjs-infra/shared": "0.6.9"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",