@univerjs-pro/thread-comment-datasource 0.9.1-nightly.202507061606 → 0.9.1

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 _0x890958=_0x417b;(function(_0x44e61a,_0x5f33ff){const _0x36b721=_0x417b,_0x5d30af=_0x44e61a();while(!![]){try{const _0x3a3860=parseInt(_0x36b721(0x162))/0x1+parseInt(_0x36b721(0x1ae))/0x2+-parseInt(_0x36b721(0x174))/0x3+parseInt(_0x36b721(0x19e))/0x4+parseInt(_0x36b721(0x190))/0x5*(-parseInt(_0x36b721(0x170))/0x6)+-parseInt(_0x36b721(0x16f))/0x7*(-parseInt(_0x36b721(0x148))/0x8)+-parseInt(_0x36b721(0x19a))/0x9;if(_0x3a3860===_0x5f33ff)break;else _0x5d30af['push'](_0x5d30af['shift']());}catch(_0x1df6a1){_0x5d30af['push'](_0x5d30af['shift']());}}}(_0xdf44,0x2b859));function _0x417b(_0x264f03,_0x1df089){const _0xdf443=_0xdf44();return _0x417b=function(_0x417b1c,_0x3b5e43){_0x417b1c=_0x417b1c-0x142;let _0x1bc91f=_0xdf443[_0x417b1c];return _0x1bc91f;},_0x417b(_0x264f03,_0x1df089);}Object[_0x890958(0x156)](exports,Symbol[_0x890958(0x164)],{'value':_0x890958(0x194)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5355ab=>(_0x5355ab[_0x5355ab[_0x890958(0x15b)]=0x0]=_0x890958(0x15b),_0x5355ab[_0x5355ab['Solved']=0x1]=_0x890958(0x1b7),_0x5355ab[_0x5355ab['UNRECOGNIZED']=-0x1]=_0x890958(0x1b3),_0x5355ab))(I||{}),v=(_0x4a69ec=>(_0x4a69ec[_0x4a69ec['Unknown']=0x0]=_0x890958(0x15c),_0x4a69ec[_0x4a69ec[_0x890958(0x15e)]=0x1]='Add',_0x4a69ec[_0x4a69ec[_0x890958(0x14d)]=0x2]=_0x890958(0x14d),_0x4a69ec[_0x4a69ec['Edit']=0x3]=_0x890958(0x152),_0x4a69ec[_0x4a69ec[_0x890958(0x15a)]=0x4]=_0x890958(0x15a),_0x4a69ec[_0x4a69ec[_0x890958(0x18c)]=0x5]='Solve',_0x4a69ec[_0x4a69ec[_0x890958(0x1b3)]=-0x1]=_0x890958(0x1b3),_0x4a69ec))(v||{});const f=_0x3e90b0=>c[_0x890958(0x1ab)](new Date(+_0x3e90b0))['format'](_0x890958(0x1a0)),R=async(_0x319305,_0x237818)=>{const _0x5b5677=_0x890958,_0x55d863=_0x319305['get'](c[_0x5b5677(0x160)]),_0x5f234f=_0x319305['get'](P[_0x5b5677(0x165)]);_0x237818[_0x5b5677(0x1ba)](_0x5042cd=>{const _0x1e5a68=_0x5b5677;_0x55d863[_0x1e5a68(0x178)](_0x5042cd)&&_0x237818[_0x1e5a68(0x1a1)](_0x5042cd);}),_0x237818[_0x5b5677(0x14b)]&&(await _0x5f234f[_0x5b5677(0x197)](_0x5b5677(0x1a3),{'params':{'userIDs':[..._0x237818]}}))[_0x5b5677(0x19d)]['users'][_0x5b5677(0x1ba)](_0x20b485=>{_0x20b485&&_0x55d863['addUser'](_0x20b485);});};var $=Object[_0x890958(0x1b5)],E=(_0x3b39ff,_0xee7aff,_0x58b200,_0x14888e)=>{const _0xd51139=_0x890958;for(var _0x1c2bd2=_0x14888e>0x1?void 0x0:_0x14888e?$(_0xee7aff,_0x58b200):_0xee7aff,_0x1b5f7c=_0x3b39ff[_0xd51139(0x15d)]-0x1,_0x117af0;_0x1b5f7c>=0x0;_0x1b5f7c--)(_0x117af0=_0x3b39ff[_0x1b5f7c])&&(_0x1c2bd2=_0x117af0(_0x1c2bd2)||_0x1c2bd2);return _0x1c2bd2;},S=(_0x278449,_0x4a1ede)=>(_0x5a6097,_0x57d322)=>_0x4a1ede(_0x5a6097,_0x57d322,_0x278449);let p=class extends c['Disposable']{constructor(_0x2ce659,_0x1b6646,_0x871be9,_0x49cb2a){const _0x3c19e1=_0x890958;super(),this[_0x3c19e1(0x158)]=_0x2ce659,this[_0x3c19e1(0x146)]=_0x1b6646,this['_userService']=_0x871be9,this['_injector']=_0x49cb2a,this[_0x3c19e1(0x142)](),this['_initUserSync']();}[_0x890958(0x145)](){const _0xcf502d=_0x890958;this[_0xcf502d(0x1af)](this['_threadCommentModel']['commentUpdate$'][_0xcf502d(0x143)](w['bufferTime'](0x10))[_0xcf502d(0x182)](_0xceb536=>{const _0x472d5e=_0xcf502d,_0x1635f1=new Set();_0xceb536[_0x472d5e(0x1ba)](_0x4eafe4=>{const _0x159813=_0x472d5e;switch(_0x4eafe4[_0x159813(0x161)]){case _0x159813(0x181):{const _0x344f88=_0x4eafe4[_0x159813(0x176)]['personId'];_0x1635f1[_0x159813(0x181)](_0x344f88);break;}}}),R(this['_injector'],_0x1635f1);}));}['_init'](){const _0x12a772=_0x890958;this['disposeWithMe'](this[_0x12a772(0x158)][_0x12a772(0x1b0)][_0x12a772(0x182)](async _0x2cfcf1=>{const _0x47a79a=_0x12a772;var _0x5c749f,_0x542354,_0x12557e,_0x2e86de;const _0x2fecf8=(_0x5c749f=this['_threadCommentModel'][_0x47a79a(0x172)](_0x2cfcf1[_0x47a79a(0x187)])[_0x47a79a(0x177)](_0x204f12=>_0x204f12[_0x47a79a(0x17f)]===_0x2cfcf1[_0x47a79a(0x17f)]))==null?void 0x0:_0x5c749f[_0x47a79a(0x16b)];if(!_0x2fecf8)return;const {unitId:_0x500a45,subUnitId:_0x38ae18}=_0x2fecf8;switch(_0x2cfcf1[_0x47a79a(0x1b8)]&&this['_userService'][_0x47a79a(0x19b)](_0x2cfcf1[_0x47a79a(0x1b8)]),_0x2cfcf1[_0x47a79a(0x161)]){case v[_0x47a79a(0x15e)]:break;case v['Reply']:{this['_threadCommentModel'][_0x47a79a(0x171)](_0x500a45,_0x38ae18,{'unitId':_0x500a45,'subUnitId':_0x38ae18,'ref':'','id':_0x2cfcf1[_0x47a79a(0x179)],'dT':f(+_0x2cfcf1[_0x47a79a(0x150)]),'threadId':_0x2cfcf1['threadId'],'personId':(_0x12557e=(_0x542354=_0x2cfcf1['user'])==null?void 0x0:_0x542354[_0x47a79a(0x1a4)])!=null?_0x12557e:_0x2cfcf1[_0x47a79a(0x16a)],'text':JSON['parse'](_0x2cfcf1['content']),'parentId':_0x2fecf8['id']});break;}case v[_0x47a79a(0x15a)]:{const _0x147814=this[_0x47a79a(0x146)][_0x47a79a(0x151)](_0x500a45,_0x38ae18,_0x2cfcf1[_0x47a79a(0x179)]);_0x147814&&_0x147814['parentId']&&this[_0x47a79a(0x146)]['deleteComment'](_0x500a45,_0x38ae18,_0x2cfcf1[_0x47a79a(0x179)]);break;}case v[_0x47a79a(0x152)]:{this[_0x47a79a(0x146)]['updateComment'](_0x500a45,_0x38ae18,{'commentId':_0x2cfcf1[_0x47a79a(0x179)],'text':JSON['parse'](_0x2cfcf1['content'])});break;}case v[_0x47a79a(0x18c)]:{const _0x18ab0a=(_0x2e86de=this[_0x47a79a(0x146)][_0x47a79a(0x172)](_0x2cfcf1[_0x47a79a(0x187)])[_0x47a79a(0x177)](_0x474270=>_0x474270[_0x47a79a(0x17f)]===_0x2cfcf1[_0x47a79a(0x17f)]))==null?void 0x0:_0x2e86de['root'];_0x18ab0a&&this[_0x47a79a(0x146)][_0x47a79a(0x175)](_0x500a45,_0x38ae18,_0x18ab0a['id'],_0x2cfcf1[_0x47a79a(0x199)]===I[_0x47a79a(0x1b7)]);break;}}}));}};p=E([S(0x0,c[_0x890958(0x184)](b[_0x890958(0x16c)])),S(0x1,c[_0x890958(0x184)](M['ThreadCommentModel'])),S(0x2,c[_0x890958(0x184)](c[_0x890958(0x160)])),S(0x3,c['Inject'](c[_0x890958(0x18a)]))],p);const q=_0x890958(0x17c),D={};var A=Object[_0x890958(0x1b5)],x=(_0x53dd59,_0x36a0ad,_0x459d2e,_0x49fb4b)=>{for(var _0x281e54=_0x49fb4b>0x1?void 0x0:_0x49fb4b?A(_0x36a0ad,_0x459d2e):_0x36a0ad,_0x3e1478=_0x53dd59['length']-0x1,_0x3ab942;_0x3e1478>=0x0;_0x3e1478--)(_0x3ab942=_0x53dd59[_0x3e1478])&&(_0x281e54=_0x3ab942(_0x281e54)||_0x281e54);return _0x281e54;},_=(_0x21f623,_0x17304c)=>(_0x41d446,_0xb024c3)=>_0x17304c(_0x41d446,_0xb024c3,_0x21f623);function Y(_0xc2402f,_0x34f536){const _0x28cc23=_0x890958,_0x2a3a67=_0xc2402f[_0x28cc23(0x17e)][0x0];return{..._0x34f536,'id':_0x2a3a67[_0x28cc23(0x179)],'resolved':_0xc2402f[_0x28cc23(0x199)]===0x1,'dT':f(_0x2a3a67[_0x28cc23(0x150)]),'personId':_0x2a3a67['userId'],'threadId':_0x2a3a67[_0x28cc23(0x17f)]};}function G(_0x226c30,_0x5f2f2c,_0x3443e1){const _0x50c32e=_0x890958;var _0x1919b7,_0x2eee68;if(((_0x2eee68=(_0x1919b7=_0x226c30==null?void 0x0:_0x226c30[_0x50c32e(0x17e)])==null?void 0x0:_0x1919b7[_0x50c32e(0x15d)])!=null?_0x2eee68:0x0)>0x0){const _0x352d10=(_0x44b6e2,_0xb1e77e)=>({'id':_0x44b6e2[_0x50c32e(0x179)],'threadId':_0x44b6e2[_0x50c32e(0x17f)],'dT':f(_0x44b6e2['createTimestamp']),'personId':_0x44b6e2[_0x50c32e(0x16a)],'resolved':_0x226c30['solved']===I[_0x50c32e(0x1b7)],'unitId':_0x5f2f2c,'subUnitId':_0x3443e1,'text':JSON[_0x50c32e(0x16e)](_0x44b6e2[_0x50c32e(0x195)]),'parentId':_0xb1e77e}),_0x45ca8f=_0x352d10(_0x226c30[_0x50c32e(0x17e)][0x0]);return{..._0x45ca8f,'children':_0x226c30['replies'][_0x50c32e(0x1a6)](0x1)[_0x50c32e(0x183)](_0x460808=>_0x352d10(_0x460808,_0x45ca8f['id']))};}return null;}let g=class{constructor(_0x3f9716,_0x55c54b,_0x2b4b1f,_0x15161d){const _0x4dc0aa=_0x890958;this[_0x4dc0aa(0x18b)]=_0x3f9716,this['_userService']=_0x55c54b,this[_0x4dc0aa(0x196)]=_0x2b4b1f,this[_0x4dc0aa(0x192)]=_0x15161d;}async[_0x890958(0x171)](_0x1b5ca8){const _0x464cfe=_0x890958;var _0x25e19d,_0x34f889;const {parentId:_0x207732,unitId:_0x450b05,text:_0x196328,threadId:_0x355fd8}=_0x1b5ca8,_0x52aef1=(_0x34f889=(_0x25e19d=_0x196328[_0x464cfe(0x1b9)])==null?void 0x0:_0x25e19d[_0x464cfe(0x163)](_0xc5ee7=>_0xc5ee7[_0x464cfe(0x14c)]===c['CustomRangeType'][_0x464cfe(0x153)])['map'](_0xa046ce=>_0xa046ce[_0x464cfe(0x1b2)]))!=null?_0x34f889:[],_0x631f66=JSON[_0x464cfe(0x1bb)](_0x196328),_0x411a7a=(await this['_sessionService'][_0x464cfe(0x19f)](_0x450b05))['getMemberID']();if(_0x207732){const _0x56e696={'memberId':_0x411a7a,'unitId':_0x450b05,'content':_0x631f66,'mention':_0x52aef1,'threadId':_0x355fd8},_0x926433=(await this[_0x464cfe(0x18b)]['post'](_0x464cfe(0x186)+_0x450b05+_0x464cfe(0x144),{'body':_0x56e696}))[_0x464cfe(0x19d)][_0x464cfe(0x18d)];return{..._0x1b5ca8,'id':_0x926433[_0x464cfe(0x179)],'dT':c[_0x464cfe(0x1ab)](+_0x926433[_0x464cfe(0x150)])[_0x464cfe(0x18f)](_0x464cfe(0x1a0)),'personId':_0x926433[_0x464cfe(0x16a)]};}else{const _0xf9b030={'memberId':_0x411a7a,'unitId':_0x450b05,'content':_0x631f66,'mention':_0x52aef1},_0x43f38d=await this['_httpService'][_0x464cfe(0x173)](_0x464cfe(0x186)+_0x450b05+'/add',{'body':_0xf9b030});return Y(_0x43f38d[_0x464cfe(0x19d)][_0x464cfe(0x1a2)],_0x1b5ca8);}}async[_0x890958(0x15f)](_0x3edcfc){const _0x4011d6=_0x890958;var _0x5c7eb1,_0x54b951;const {text:_0x1764d2,unitId:_0x33dbe4}=_0x3edcfc,_0x31756e=(_0x54b951=(_0x5c7eb1=_0x1764d2['customRanges'])==null?void 0x0:_0x5c7eb1[_0x4011d6(0x163)](_0x3da741=>_0x3da741[_0x4011d6(0x14c)]===c[_0x4011d6(0x149)][_0x4011d6(0x153)])[_0x4011d6(0x183)](_0x23c317=>_0x23c317[_0x4011d6(0x1b2)]))!=null?_0x54b951:[],_0x38187c=JSON[_0x4011d6(0x1bb)](_0x1764d2),_0x2c7717=_0x3edcfc['threadId'],_0x1a61ad=_0x3edcfc['id'],_0x5d9d8a={'memberId':(await this[_0x4011d6(0x196)][_0x4011d6(0x19f)](_0x33dbe4))[_0x4011d6(0x157)](),'unitId':_0x33dbe4,'threadId':_0x2c7717,'mention':_0x31756e,'content':_0x38187c,'replyId':_0x1a61ad},_0x52ad01=await this['_httpService'][_0x4011d6(0x173)]('/universer-api/comment/unit/'+_0x33dbe4+'/edit',{'body':_0x5d9d8a});return!_0x52ad01[_0x4011d6(0x19d)][_0x4011d6(0x14f)]||_0x52ad01[_0x4011d6(0x19d)][_0x4011d6(0x14f)][_0x4011d6(0x1ad)]===0x1;}async[_0x890958(0x175)](_0x20c641){const _0x4d724d=_0x890958,{unitId:_0x3740a1}=_0x20c641,_0x4e4e28=_0x20c641['threadId'],_0x24b838={'memberId':this['_userService'][_0x4d724d(0x14e)]()[_0x4d724d(0x1a4)],'unitId':_0x3740a1,'threadId':_0x4e4e28,'solved':_0x20c641[_0x4d724d(0x17d)]?I['Solved']:I['OpenOrReOpen']},_0x5812e3=await this[_0x4d724d(0x18b)][_0x4d724d(0x173)]('/universer-api/comment/unit/'+_0x3740a1+_0x4d724d(0x188),{'body':_0x24b838});return!_0x5812e3[_0x4d724d(0x19d)][_0x4d724d(0x14f)]||_0x5812e3[_0x4d724d(0x19d)][_0x4d724d(0x14f)][_0x4d724d(0x1ad)]===0x1;}async[_0x890958(0x180)](_0x576a25,_0x3acbbe,_0x2f7f44,_0x34c115){const _0x1291eb=_0x890958,_0x262ce3={'memberId':(await this['_sessionService'][_0x1291eb(0x19f)](_0x576a25))[_0x1291eb(0x157)](),'threadId':_0x2f7f44,'replyId':_0x34c115,'unitId':_0x576a25},_0x1fbaf5=await this['_httpService']['post'](_0x1291eb(0x186)+_0x576a25+_0x1291eb(0x17a),{'body':_0x262ce3});return!_0x1fbaf5['body'][_0x1291eb(0x14f)]||_0x1fbaf5['body']['error']['code']===0x1;}async['listComments'](_0x327767,_0x33d3e6,_0x37534e){const _0x2bd181=_0x890958,_0x3dd4fe={'unitId':_0x327767,'threadId':_0x37534e},_0x4eab4c=await this['_httpService'][_0x2bd181(0x173)]('/universer-api/comment/unit/'+_0x327767+_0x2bd181(0x1ac),{'body':_0x3dd4fe}),_0x557235=_0x37534e['map'](_0xe9752=>G(_0x4eab4c[_0x2bd181(0x19d)][_0x2bd181(0x1b4)][_0xe9752],_0x327767,_0x33d3e6))[_0x2bd181(0x163)](Boolean);return Object[_0x2bd181(0x166)](_0x4eab4c[_0x2bd181(0x19d)][_0x2bd181(0x17b)])['forEach'](_0x2379ea=>{const _0x2e57c7=_0x2bd181;this[_0x2e57c7(0x18e)][_0x2e57c7(0x19b)](_0x2379ea);}),_0x557235;}[_0x890958(0x198)](_0x582861){const _0x118b46=_0x890958;return{'id':_0x582861['id'],'threadId':_0x582861[_0x118b46(0x17f)],'ref':_0x582861[_0x118b46(0x1a9)]};}};g=x([_(0x0,c[_0x890958(0x184)](P[_0x890958(0x165)])),_(0x1,c['Inject'](c[_0x890958(0x160)])),_(0x2,c[_0x890958(0x184)](b[_0x890958(0x1a8)])),_(0x3,c[_0x890958(0x184)](c[_0x890958(0x18a)]))],g);var H=Object[_0x890958(0x1b5)],J=(_0x5506f4,_0x1be645,_0x2d1eb7,_0x233eb6)=>{const _0x560946=_0x890958;for(var _0x3d44cc=_0x233eb6>0x1?void 0x0:_0x233eb6?H(_0x1be645,_0x2d1eb7):_0x1be645,_0x24f273=_0x5506f4[_0x560946(0x15d)]-0x1,_0xe9da49;_0x24f273>=0x0;_0x24f273--)(_0xe9da49=_0x5506f4[_0x24f273])&&(_0x3d44cc=_0xe9da49(_0x3d44cc)||_0x3d44cc);return _0x3d44cc;},y=(_0x11d915,_0x4ae6e4)=>(_0x2dd823,_0x37abf5)=>_0x4ae6e4(_0x2dd823,_0x37abf5,_0x11d915);let C=class extends c[_0x890958(0x191)]{constructor(_0xdf97d1,_0x1de124){const _0x1e70f1=_0x890958;super(),this[_0x1e70f1(0x14a)]=_0xdf97d1,this['_threadCommentDataSource']=_0x1de124,this['_initDataSource']();}[_0x890958(0x185)](){const _0x48dfee=_0x890958;this[_0x48dfee(0x14a)]['dataSource']=this[_0x48dfee(0x1b1)],this[_0x48dfee(0x14a)][_0x48dfee(0x147)]=!0x1;}};C=J([y(0x0,M[_0x890958(0x169)]),y(0x1,c[_0x890958(0x184)](g))],C);function _0xdf44(){const _0x33517e=['/universer-api/comment/unit/','unitId','/solved','UniverThreadCommentUIPlugin','Injector','_httpService','Solve','reply','_userService','format','42145BizHem','Disposable','_injector','setConfig','Module','content','_sessionService','get','saveCommentToSnapshot','solved','2109969wJqxWR','addUser','_config','body','307940BaLVtc','requireSession','YYYY/MM/DD\x20HH:mm','delete','comment','/universer-api/user/list','userID','UniverThreadCommentDataSourcePlugin','slice','DependentOn','CollaborationSessionService','ref','UNIVER_UNKNOWN','dayjs','/list','code','68742UBPzLJ','disposeWithMe','commentUpdate$','_threadCommentDataSource','rangeId','UNRECOGNIZED','comments','getOwnPropertyDescriptor','UniverInstanceType','Solved','user','customRanges','forEach','stringify','_init','pipe','/reply','_initUserSync','_threadCommentModel','syncUpdateMutationToColla','26472xZAbvz','CustomRangeType','_threadCommentDataSourceService','size','rangeType','Reply','getCurrentUser','error','createTimestamp','getComment','Edit','COMMENT','merge','Plugin','defineProperty','getMemberID','_commentService','_configService','Delete','OpenOrReOpen','Unknown','length','Add','updateComment','UserManagerService','type','149658RPWZCA','filter','toStringTag','HTTPService','values','IConfigService','symbol','IThreadCommentDataSourceService','userId','root','CommentService','UniverLicensePlugin','parse','630AkqPSQ','12PBEqBZ','addComment','getUnit','post','387780TiQXbL','resolveComment','payload','find','getUser','replyId','/delete','users','thread-comment-data-source.config','resolved','replies','threadId','deleteComment','add','subscribe','map','Inject','_initDataSource'];_0xdf44=function(){return _0x33517e;};return _0xdf44();}var F=Object[_0x890958(0x156)],L=Object[_0x890958(0x1b5)],Z=(_0x120979,_0x27f50c,_0x165d2d)=>_0x27f50c in _0x120979?F(_0x120979,_0x27f50c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165d2d}):_0x120979[_0x27f50c]=_0x165d2d,W=(_0x46e418,_0x5052aa,_0x4061f9,_0x293215)=>{const _0x3dc0d9=_0x890958;for(var _0x891663=_0x293215>0x1?void 0x0:_0x293215?L(_0x5052aa,_0x4061f9):_0x5052aa,_0x29d688=_0x46e418[_0x3dc0d9(0x15d)]-0x1,_0x5a072b;_0x29d688>=0x0;_0x29d688--)(_0x5a072b=_0x46e418[_0x29d688])&&(_0x891663=_0x5a072b(_0x891663)||_0x891663);return _0x891663;},O=(_0x1dda03,_0x5407e4)=>(_0x5a4fee,_0x53b60e)=>_0x5407e4(_0x5a4fee,_0x53b60e,_0x1dda03),N=(_0x5ea4e4,_0x833d8e,_0x25bf42)=>Z(_0x5ea4e4,typeof _0x833d8e!=_0x890958(0x168)?_0x833d8e+'':_0x833d8e,_0x25bf42);exports[_0x890958(0x1a5)]=class extends c[_0x890958(0x155)]{constructor(_0x22b6de=D,_0x1556fe,_0x551ea6){const _0x3a9ced=_0x890958;super(),this['_config']=_0x22b6de,this[_0x3a9ced(0x192)]=_0x1556fe,this['_configService']=_0x551ea6;const {..._0x156a68}=c[_0x3a9ced(0x154)]({},D,this[_0x3a9ced(0x19c)]);this[_0x3a9ced(0x159)][_0x3a9ced(0x193)](q,_0x156a68);}['onStarting'](){const _0x3d513b=_0x890958;[[g],[C],[p]][_0x3d513b(0x1ba)](_0x1d4a67=>{const _0x168edb=_0x3d513b;this[_0x168edb(0x192)][_0x168edb(0x181)](_0x1d4a67);});}['onReady'](){const _0x515ea4=_0x890958;this[_0x515ea4(0x192)][_0x515ea4(0x197)](C),this[_0x515ea4(0x192)]['get'](p);}},N(exports[_0x890958(0x1a5)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x890958(0x161),c[_0x890958(0x1b6)][_0x890958(0x1aa)]),exports[_0x890958(0x1a5)]=W([c[_0x890958(0x1a7)](j[_0x890958(0x189)],b['UniverCollaborationClientPlugin'],T[_0x890958(0x16d)]),O(0x1,c[_0x890958(0x184)](c[_0x890958(0x18a)])),O(0x2,c[_0x890958(0x167)])],exports[_0x890958(0x1a5)]);
1
+ 'use strict';const _0x1e9314=_0x5e46;(function(_0x2f3e2e,_0x5bcc74){const _0x12000a=_0x5e46,_0x894438=_0x2f3e2e();while(!![]){try{const _0x4e5094=-parseInt(_0x12000a(0x108))/0x1+parseInt(_0x12000a(0x159))/0x2+-parseInt(_0x12000a(0x152))/0x3+parseInt(_0x12000a(0x121))/0x4+parseInt(_0x12000a(0x160))/0x5*(parseInt(_0x12000a(0x10f))/0x6)+-parseInt(_0x12000a(0x136))/0x7+parseInt(_0x12000a(0x137))/0x8*(parseInt(_0x12000a(0x10d))/0x9);if(_0x4e5094===_0x5bcc74)break;else _0x894438['push'](_0x894438['shift']());}catch(_0x1e257b){_0x894438['push'](_0x894438['shift']());}}}(_0x361b,0x6e79e));Object[_0x1e9314(0x176)](exports,Symbol[_0x1e9314(0x118)],{'value':_0x1e9314(0x163)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1e9314(0x12d);var I=(_0x152616=>(_0x152616[_0x152616['OpenOrReOpen']=0x0]=_0x1e9314(0x144),_0x152616[_0x152616[_0x1e9314(0x149)]=0x1]=_0x1e9314(0x149),_0x152616[_0x152616[_0x1e9314(0x17a)]=-0x1]=_0x1e9314(0x17a),_0x152616))(I||{}),v=(_0x59e69d=>(_0x59e69d[_0x59e69d['Unknown']=0x0]='Unknown',_0x59e69d[_0x59e69d[_0x1e9314(0x140)]=0x1]=_0x1e9314(0x140),_0x59e69d[_0x59e69d[_0x1e9314(0x12a)]=0x2]=_0x1e9314(0x12a),_0x59e69d[_0x59e69d[_0x1e9314(0x126)]=0x3]=_0x1e9314(0x126),_0x59e69d[_0x59e69d['Delete']=0x4]=_0x1e9314(0x165),_0x59e69d[_0x59e69d['Solve']=0x5]=_0x1e9314(0x148),_0x59e69d[_0x59e69d[_0x1e9314(0x17a)]=-0x1]='UNRECOGNIZED',_0x59e69d))(v||{});function _0x361b(){const _0x2b5e44=['unitId','IThreadCommentDataSourceService','_init','customRanges','defineProperty','syncUpdateMutationToColla','ref','reply','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','/add','error','ThreadCommentModel','size','resolveComment','_threadCommentDataSource','updateComment','createTimestamp','330474VGRbXF','Disposable','_config','pluginName','getUnit','54VTFVhi','UniverLicensePlugin','1486920zpOsmr','addUser','subscribe','user','forEach','type','_configService','setConfig','UserManagerService','toStringTag','_sessionService','post','delete','CustomRangeType','_userService','/delete','parse','COMMENT','615252RSTUQN','CollaborationSessionService','rangeType','UniverThreadCommentDataSourcePlugin','/reply','Edit','/universer-api/user/list','CommentService','getUser','Reply','find','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','payload','Plugin','getOwnPropertyDescriptor','_threadCommentDataSourceService','solved','getMemberID','replyId','2469159kGeSTq','1255288gYgemx','listComments','onReady','commentUpdate$','values','resolved','merge','disposeWithMe','content','Add','Injector','getCurrentUser','dataSource','OpenOrReOpen','code','IConfigService','bufferTime','Solve','Solved','stringify','threadId','userID','/universer-api/comment/unit/','_commentService','root','/edit','getComment','2389800kZaJPf','UniverThreadCommentUIPlugin','DependentOn','_initUserSync','deleteComment','requireSession','_httpService','187164uGhpdf','filter','length','addComment','get','rangeId','_injector','15OhihrX','Inject','personId','Module','/solved','Delete','users','dayjs','comment','_threadCommentModel','userId','body','comments','format','_initDataSource','add','HTTPService','/list'];_0x361b=function(){return _0x2b5e44;};return _0x361b();}const f=_0x11c072=>c[_0x1e9314(0x167)](new Date(+_0x11c072))[_0x1e9314(0x16d)](_0x1e9314(0x17b)),R=async(_0x1a9db0,_0x49001f)=>{const _0x3fb6a3=_0x1e9314,_0x3cf243=_0x1a9db0['get'](c[_0x3fb6a3(0x117)]),_0x723248=_0x1a9db0['get'](P[_0x3fb6a3(0x170)]);_0x49001f[_0x3fb6a3(0x113)](_0x5d4083=>{const _0x6698b=_0x3fb6a3;_0x3cf243[_0x6698b(0x129)](_0x5d4083)&&_0x49001f[_0x6698b(0x11b)](_0x5d4083);}),_0x49001f[_0x3fb6a3(0x103)]&&(await _0x723248['get'](_0x3fb6a3(0x127),{'params':{'userIDs':[..._0x49001f]}}))[_0x3fb6a3(0x16b)][_0x3fb6a3(0x166)]['forEach'](_0x2d17ea=>{const _0x5ef07e=_0x3fb6a3;_0x2d17ea&&_0x3cf243[_0x5ef07e(0x110)](_0x2d17ea);});};var $=Object[_0x1e9314(0x131)],E=(_0x277d53,_0x4059f5,_0x25497e,_0x4e01ce)=>{const _0x44b582=_0x1e9314;for(var _0x309280=_0x4e01ce>0x1?void 0x0:_0x4e01ce?$(_0x4059f5,_0x25497e):_0x4059f5,_0x239c95=_0x277d53[_0x44b582(0x15b)]-0x1,_0x3dccd1;_0x239c95>=0x0;_0x239c95--)(_0x3dccd1=_0x277d53[_0x239c95])&&(_0x309280=_0x3dccd1(_0x309280)||_0x309280);return _0x309280;},S=(_0x1deb17,_0x550c41)=>(_0x5cd719,_0x52dd6b)=>_0x550c41(_0x5cd719,_0x52dd6b,_0x1deb17);let p=class extends c['Disposable']{constructor(_0x168490,_0x2eb82e,_0x5b667e,_0x56a0c6){const _0x226415=_0x1e9314;super(),this['_commentService']=_0x168490,this['_threadCommentModel']=_0x2eb82e,this['_userService']=_0x5b667e,this[_0x226415(0x15f)]=_0x56a0c6,this[_0x226415(0x174)](),this['_initUserSync']();}[_0x1e9314(0x155)](){const _0x214f82=_0x1e9314;this[_0x214f82(0x13e)](this[_0x214f82(0x169)][_0x214f82(0x13a)]['pipe'](w[_0x214f82(0x147)](0x10))[_0x214f82(0x111)](_0x79a2ac=>{const _0x346ee6=_0x214f82,_0x18cee4=new Set();_0x79a2ac[_0x346ee6(0x113)](_0x2fdf93=>{const _0x2ad8a6=_0x346ee6;switch(_0x2fdf93[_0x2ad8a6(0x114)]){case _0x2ad8a6(0x16f):{const _0x564a96=_0x2fdf93[_0x2ad8a6(0x12f)][_0x2ad8a6(0x162)];_0x18cee4[_0x2ad8a6(0x16f)](_0x564a96);break;}}}),R(this[_0x346ee6(0x15f)],_0x18cee4);}));}[_0x1e9314(0x174)](){const _0x2ad317=_0x1e9314;this[_0x2ad317(0x13e)](this[_0x2ad317(0x14e)][_0x2ad317(0x13a)]['subscribe'](async _0x313fc=>{const _0x575d42=_0x2ad317;var _0x59c769,_0x5a0af7,_0x3c7571,_0x25e750;const _0x1a6435=(_0x59c769=this[_0x575d42(0x169)]['getUnit'](_0x313fc[_0x575d42(0x172)])[_0x575d42(0x12b)](_0x41e380=>_0x41e380[_0x575d42(0x14b)]===_0x313fc['threadId']))==null?void 0x0:_0x59c769[_0x575d42(0x14f)];if(!_0x1a6435)return;const {unitId:_0x1c96c1,subUnitId:_0xd22d7a}=_0x1a6435;switch(_0x313fc[_0x575d42(0x112)]&&this[_0x575d42(0x11d)][_0x575d42(0x110)](_0x313fc[_0x575d42(0x112)]),_0x313fc[_0x575d42(0x114)]){case v[_0x575d42(0x140)]:break;case v[_0x575d42(0x12a)]:{this[_0x575d42(0x169)][_0x575d42(0x15c)](_0x1c96c1,_0xd22d7a,{'unitId':_0x1c96c1,'subUnitId':_0xd22d7a,'ref':'','id':_0x313fc[_0x575d42(0x135)],'dT':f(+_0x313fc[_0x575d42(0x107)]),'threadId':_0x313fc['threadId'],'personId':(_0x3c7571=(_0x5a0af7=_0x313fc[_0x575d42(0x112)])==null?void 0x0:_0x5a0af7['userID'])!=null?_0x3c7571:_0x313fc['userId'],'text':JSON[_0x575d42(0x11f)](_0x313fc[_0x575d42(0x13f)]),'parentId':_0x1a6435['id']});break;}case v[_0x575d42(0x165)]:{const _0x45d0af=this[_0x575d42(0x169)][_0x575d42(0x151)](_0x1c96c1,_0xd22d7a,_0x313fc[_0x575d42(0x135)]);_0x45d0af&&_0x45d0af['parentId']&&this['_threadCommentModel'][_0x575d42(0x156)](_0x1c96c1,_0xd22d7a,_0x313fc[_0x575d42(0x135)]);break;}case v[_0x575d42(0x126)]:{this['_threadCommentModel'][_0x575d42(0x106)](_0x1c96c1,_0xd22d7a,{'commentId':_0x313fc[_0x575d42(0x135)],'text':JSON[_0x575d42(0x11f)](_0x313fc[_0x575d42(0x13f)])});break;}case v[_0x575d42(0x148)]:{const _0x21484e=(_0x25e750=this[_0x575d42(0x169)][_0x575d42(0x10c)](_0x313fc['unitId'])[_0x575d42(0x12b)](_0x598ef0=>_0x598ef0[_0x575d42(0x14b)]===_0x313fc['threadId']))==null?void 0x0:_0x25e750[_0x575d42(0x14f)];_0x21484e&&this[_0x575d42(0x169)][_0x575d42(0x104)](_0x1c96c1,_0xd22d7a,_0x21484e['id'],_0x313fc['solved']===I[_0x575d42(0x149)]);break;}}}));}};p=E([S(0x0,c[_0x1e9314(0x161)](b[_0x1e9314(0x128)])),S(0x1,c[_0x1e9314(0x161)](M[_0x1e9314(0x102)])),S(0x2,c[_0x1e9314(0x161)](c[_0x1e9314(0x117)])),S(0x3,c['Inject'](c[_0x1e9314(0x141)]))],p);const q='thread-comment-data-source.config',D={};function _0x5e46(_0x703422,_0x1222bb){const _0x361b1c=_0x361b();return _0x5e46=function(_0x5e464b,_0x101627){_0x5e464b=_0x5e464b-0x101;let _0x52190c=_0x361b1c[_0x5e464b];return _0x52190c;},_0x5e46(_0x703422,_0x1222bb);}var A=Object[_0x1e9314(0x131)],x=(_0x5bb9fd,_0x182c85,_0x29efe6,_0x540375)=>{const _0x48174f=_0x1e9314;for(var _0x152e8c=_0x540375>0x1?void 0x0:_0x540375?A(_0x182c85,_0x29efe6):_0x182c85,_0x3452a3=_0x5bb9fd[_0x48174f(0x15b)]-0x1,_0x15c249;_0x3452a3>=0x0;_0x3452a3--)(_0x15c249=_0x5bb9fd[_0x3452a3])&&(_0x152e8c=_0x15c249(_0x152e8c)||_0x152e8c);return _0x152e8c;},_=(_0x451dde,_0x23c884)=>(_0x3b305e,_0x13e2a8)=>_0x23c884(_0x3b305e,_0x13e2a8,_0x451dde);function Y(_0x31fcbc,_0x325e65){const _0x2ccb0d=_0x1e9314,_0x20904a=_0x31fcbc[_0x2ccb0d(0x12c)][0x0];return{..._0x325e65,'id':_0x20904a['replyId'],'resolved':_0x31fcbc[_0x2ccb0d(0x133)]===0x1,'dT':f(_0x20904a[_0x2ccb0d(0x107)]),'personId':_0x20904a[_0x2ccb0d(0x16a)],'threadId':_0x20904a[_0x2ccb0d(0x14b)]};}function G(_0x495cb5,_0x32700c,_0x2f965f){const _0x3161ef=_0x1e9314;var _0x26a3f4,_0x3578b5;if(((_0x3578b5=(_0x26a3f4=_0x495cb5==null?void 0x0:_0x495cb5[_0x3161ef(0x12c)])==null?void 0x0:_0x26a3f4[_0x3161ef(0x15b)])!=null?_0x3578b5:0x0)>0x0){const _0x131d98=(_0x4d1d2f,_0x1c2e85)=>({'id':_0x4d1d2f['replyId'],'threadId':_0x4d1d2f[_0x3161ef(0x14b)],'dT':f(_0x4d1d2f[_0x3161ef(0x107)]),'personId':_0x4d1d2f[_0x3161ef(0x16a)],'resolved':_0x495cb5[_0x3161ef(0x133)]===I[_0x3161ef(0x149)],'unitId':_0x32700c,'subUnitId':_0x2f965f,'text':JSON['parse'](_0x4d1d2f[_0x3161ef(0x13f)]),'parentId':_0x1c2e85}),_0x50a9e8=_0x131d98(_0x495cb5[_0x3161ef(0x12c)][0x0]);return{..._0x50a9e8,'children':_0x495cb5[_0x3161ef(0x12c)]['slice'](0x1)[_0x3161ef(0x12e)](_0x1adb2c=>_0x131d98(_0x1adb2c,_0x50a9e8['id']))};}return null;}let g=class{constructor(_0x43fd45,_0x19efc9,_0x1b6283,_0x1de839){const _0x53f835=_0x1e9314;this[_0x53f835(0x158)]=_0x43fd45,this['_userService']=_0x19efc9,this['_sessionService']=_0x1b6283,this['_injector']=_0x1de839;}async[_0x1e9314(0x15c)](_0x34bfa7){const _0x5729e0=_0x1e9314;var _0x3e943a,_0x346153;const {parentId:_0x3ba379,unitId:_0x2d8a91,text:_0x2baf1a,threadId:_0xdf2e29}=_0x34bfa7,_0x5a68e4=(_0x346153=(_0x3e943a=_0x2baf1a[_0x5729e0(0x175)])==null?void 0x0:_0x3e943a[_0x5729e0(0x15a)](_0x406dd9=>_0x406dd9[_0x5729e0(0x123)]===c[_0x5729e0(0x11c)][_0x5729e0(0x120)])['map'](_0x459204=>_0x459204[_0x5729e0(0x15e)]))!=null?_0x346153:[],_0x1a009a=JSON[_0x5729e0(0x14a)](_0x2baf1a),_0x4fe5ed=(await this[_0x5729e0(0x119)][_0x5729e0(0x157)](_0x2d8a91))[_0x5729e0(0x134)]();if(_0x3ba379){const _0x4b6451={'memberId':_0x4fe5ed,'unitId':_0x2d8a91,'content':_0x1a009a,'mention':_0x5a68e4,'threadId':_0xdf2e29},_0x5f2120=(await this[_0x5729e0(0x158)][_0x5729e0(0x11a)](_0x5729e0(0x14d)+_0x2d8a91+_0x5729e0(0x125),{'body':_0x4b6451}))[_0x5729e0(0x16b)][_0x5729e0(0x179)];return{..._0x34bfa7,'id':_0x5f2120['replyId'],'dT':c[_0x5729e0(0x167)](+_0x5f2120['createTimestamp'])[_0x5729e0(0x16d)](_0x5729e0(0x17b)),'personId':_0x5f2120[_0x5729e0(0x16a)]};}else{const _0x574e4d={'memberId':_0x4fe5ed,'unitId':_0x2d8a91,'content':_0x1a009a,'mention':_0x5a68e4},_0x2def8f=await this[_0x5729e0(0x158)][_0x5729e0(0x11a)](_0x5729e0(0x14d)+_0x2d8a91+_0x5729e0(0x17c),{'body':_0x574e4d});return Y(_0x2def8f[_0x5729e0(0x16b)][_0x5729e0(0x168)],_0x34bfa7);}}async['updateComment'](_0x2c8b22){const _0x424515=_0x1e9314;var _0x476746,_0x345e05;const {text:_0xc23e54,unitId:_0x2f54fc}=_0x2c8b22,_0x19e6d3=(_0x345e05=(_0x476746=_0xc23e54['customRanges'])==null?void 0x0:_0x476746[_0x424515(0x15a)](_0x47b28f=>_0x47b28f['rangeType']===c[_0x424515(0x11c)][_0x424515(0x120)])[_0x424515(0x12e)](_0x5089f7=>_0x5089f7[_0x424515(0x15e)]))!=null?_0x345e05:[],_0x5b511d=JSON['stringify'](_0xc23e54),_0x11d3d6=_0x2c8b22['threadId'],_0x285f34=_0x2c8b22['id'],_0x3ff0a1={'memberId':(await this[_0x424515(0x119)]['requireSession'](_0x2f54fc))[_0x424515(0x134)](),'unitId':_0x2f54fc,'threadId':_0x11d3d6,'mention':_0x19e6d3,'content':_0x5b511d,'replyId':_0x285f34},_0x58b1bb=await this['_httpService'][_0x424515(0x11a)](_0x424515(0x14d)+_0x2f54fc+_0x424515(0x150),{'body':_0x3ff0a1});return!_0x58b1bb['body'][_0x424515(0x101)]||_0x58b1bb['body'][_0x424515(0x101)][_0x424515(0x145)]===0x1;}async['resolveComment'](_0x28562d){const _0x42ded9=_0x1e9314,{unitId:_0x58828a}=_0x28562d,_0x8ce24f=_0x28562d[_0x42ded9(0x14b)],_0x569ab5={'memberId':this[_0x42ded9(0x11d)][_0x42ded9(0x142)]()[_0x42ded9(0x14c)],'unitId':_0x58828a,'threadId':_0x8ce24f,'solved':_0x28562d[_0x42ded9(0x13c)]?I[_0x42ded9(0x149)]:I['OpenOrReOpen']},_0x488e42=await this[_0x42ded9(0x158)]['post']('/universer-api/comment/unit/'+_0x58828a+_0x42ded9(0x164),{'body':_0x569ab5});return!_0x488e42[_0x42ded9(0x16b)]['error']||_0x488e42[_0x42ded9(0x16b)][_0x42ded9(0x101)][_0x42ded9(0x145)]===0x1;}async[_0x1e9314(0x156)](_0x4c64f3,_0xd7e628,_0x148e08,_0x4a2007){const _0x216d06=_0x1e9314,_0xb4866c={'memberId':(await this['_sessionService']['requireSession'](_0x4c64f3))[_0x216d06(0x134)](),'threadId':_0x148e08,'replyId':_0x4a2007,'unitId':_0x4c64f3},_0x3df7e6=await this[_0x216d06(0x158)][_0x216d06(0x11a)](_0x216d06(0x14d)+_0x4c64f3+_0x216d06(0x11e),{'body':_0xb4866c});return!_0x3df7e6['body'][_0x216d06(0x101)]||_0x3df7e6[_0x216d06(0x16b)]['error']['code']===0x1;}async[_0x1e9314(0x138)](_0x44f603,_0x52d27c,_0x1bc3f5){const _0x3c214c=_0x1e9314,_0x3cea4e={'unitId':_0x44f603,'threadId':_0x1bc3f5},_0x1ca529=await this[_0x3c214c(0x158)][_0x3c214c(0x11a)](_0x3c214c(0x14d)+_0x44f603+_0x3c214c(0x171),{'body':_0x3cea4e}),_0xcf90b7=_0x1bc3f5[_0x3c214c(0x12e)](_0x2c8fbb=>G(_0x1ca529[_0x3c214c(0x16b)][_0x3c214c(0x16c)][_0x2c8fbb],_0x44f603,_0x52d27c))[_0x3c214c(0x15a)](Boolean);return Object[_0x3c214c(0x13b)](_0x1ca529['body'][_0x3c214c(0x166)])[_0x3c214c(0x113)](_0x413bb5=>{const _0x5639dc=_0x3c214c;this['_userService'][_0x5639dc(0x110)](_0x413bb5);}),_0xcf90b7;}['saveCommentToSnapshot'](_0x58fa41){const _0x35c243=_0x1e9314;return{'id':_0x58fa41['id'],'threadId':_0x58fa41[_0x35c243(0x14b)],'ref':_0x58fa41[_0x35c243(0x178)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x1e9314(0x161)](c[_0x1e9314(0x117)])),_(0x2,c[_0x1e9314(0x161)](b[_0x1e9314(0x122)])),_(0x3,c[_0x1e9314(0x161)](c[_0x1e9314(0x141)]))],g);var H=Object[_0x1e9314(0x131)],J=(_0x108360,_0x20e6ff,_0x5de8b2,_0x4612b1)=>{for(var _0x1dcb8d=_0x4612b1>0x1?void 0x0:_0x4612b1?H(_0x20e6ff,_0x5de8b2):_0x20e6ff,_0x277fc4=_0x108360['length']-0x1,_0x147591;_0x277fc4>=0x0;_0x277fc4--)(_0x147591=_0x108360[_0x277fc4])&&(_0x1dcb8d=_0x147591(_0x1dcb8d)||_0x1dcb8d);return _0x1dcb8d;},y=(_0x3b11a5,_0x40c937)=>(_0x15e444,_0x3b300)=>_0x40c937(_0x15e444,_0x3b300,_0x3b11a5);let C=class extends c[_0x1e9314(0x109)]{constructor(_0x372c23,_0xadee69){const _0x3fb0c9=_0x1e9314;super(),this[_0x3fb0c9(0x132)]=_0x372c23,this['_threadCommentDataSource']=_0xadee69,this[_0x3fb0c9(0x16e)]();}[_0x1e9314(0x16e)](){const _0x114202=_0x1e9314;this[_0x114202(0x132)][_0x114202(0x143)]=this[_0x114202(0x105)],this[_0x114202(0x132)][_0x114202(0x177)]=!0x1;}};C=J([y(0x0,M[_0x1e9314(0x173)]),y(0x1,c[_0x1e9314(0x161)](g))],C);var F=Object[_0x1e9314(0x176)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5b730d,_0x3eabf9,_0x4932ba)=>_0x3eabf9 in _0x5b730d?F(_0x5b730d,_0x3eabf9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4932ba}):_0x5b730d[_0x3eabf9]=_0x4932ba,W=(_0x5b2431,_0x112437,_0x2091a9,_0x4d53ce)=>{for(var _0x159d67=_0x4d53ce>0x1?void 0x0:_0x4d53ce?L(_0x112437,_0x2091a9):_0x112437,_0x37459a=_0x5b2431['length']-0x1,_0x3e93bf;_0x37459a>=0x0;_0x37459a--)(_0x3e93bf=_0x5b2431[_0x37459a])&&(_0x159d67=_0x3e93bf(_0x159d67)||_0x159d67);return _0x159d67;},O=(_0x52e4d2,_0x3a7278)=>(_0x55e56d,_0x1373e1)=>_0x3a7278(_0x55e56d,_0x1373e1,_0x52e4d2),N=(_0x1b026e,_0x2c1c43,_0x2188fe)=>Z(_0x1b026e,typeof _0x2c1c43!='symbol'?_0x2c1c43+'':_0x2c1c43,_0x2188fe);exports[_0x1e9314(0x124)]=class extends c[_0x1e9314(0x130)]{constructor(_0x2d1009=D,_0x32c2de,_0x463977){const _0x1096bd=_0x1e9314;super(),this[_0x1096bd(0x10a)]=_0x2d1009,this[_0x1096bd(0x15f)]=_0x32c2de,this[_0x1096bd(0x115)]=_0x463977;const {..._0x454c70}=c[_0x1096bd(0x13d)]({},D,this[_0x1096bd(0x10a)]);this[_0x1096bd(0x115)][_0x1096bd(0x116)](q,_0x454c70);}['onStarting'](){const _0x27d8a0=_0x1e9314;[[g],[C],[p]][_0x27d8a0(0x113)](_0x563cac=>{const _0x4db930=_0x27d8a0;this[_0x4db930(0x15f)][_0x4db930(0x16f)](_0x563cac);});}[_0x1e9314(0x139)](){const _0x8b67ce=_0x1e9314;this['_injector'][_0x8b67ce(0x15d)](C),this[_0x8b67ce(0x15f)]['get'](p);}},N(exports[_0x1e9314(0x124)],_0x1e9314(0x10b),U),N(exports[_0x1e9314(0x124)],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x1e9314(0x124)]=W([c[_0x1e9314(0x154)](j[_0x1e9314(0x153)],b['UniverCollaborationClientPlugin'],T[_0x1e9314(0x10e)]),O(0x1,c[_0x1e9314(0x161)](c['Injector'])),O(0x2,c[_0x1e9314(0x146)])],exports[_0x1e9314(0x124)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x17b82a=_0x715e;(function(_0x4e841e,_0x5093c3){const _0x4231f1=_0x715e,_0x5cf7e7=_0x4e841e();while(!![]){try{const _0x599098=parseInt(_0x4231f1(0x101))/0x1*(parseInt(_0x4231f1(0x119))/0x2)+-parseInt(_0x4231f1(0x10a))/0x3+parseInt(_0x4231f1(0x10e))/0x4*(-parseInt(_0x4231f1(0xdb))/0x5)+parseInt(_0x4231f1(0xfc))/0x6+parseInt(_0x4231f1(0x11d))/0x7+parseInt(_0x4231f1(0x125))/0x8+parseInt(_0x4231f1(0x11a))/0x9;if(_0x599098===_0x5093c3)break;else _0x5cf7e7['push'](_0x5cf7e7['shift']());}catch(_0x44dfb1){_0x5cf7e7['push'](_0x5cf7e7['shift']());}}}(_0x3526,0x3a148));import{CommentService as _0x3a2a96,CollaborationSessionService as _0x19d43c,UniverCollaborationClientPlugin as _0x19e911}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x219f24}from'@univerjs-pro/license';import{dayjs as _0x3a7d70,UserManagerService as _0x350584,Inject as _0x4128a6,Injector as _0x4d52d5,Disposable as _0x546ddf,CustomRangeType as _0x25d92a,UniverInstanceType as _0x4c85bc,DependentOn as _0x5b1abb,IConfigService as _0x17181b,Plugin as _0x235c2b,merge as _0x5886d2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21ed2e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37d2c5,IThreadCommentDataSourceService as _0xc19607}from'@univerjs/thread-comment';function _0x3526(){const _0x59ec1b=['userID','Edit','payload','_userService','pipe','parentId','addUser','content','getOwnPropertyDescriptor','_commentService','_configService','createTimestamp','218005HGGnsY','_initUserSync','UNRECOGNIZED','customRanges','format','stringify','_injector','resolveComment','symbol','code','Reply','COMMENT','_threadCommentModel','Solved','_sessionService','saveCommentToSnapshot','comment','/universer-api/comment/unit/','/add','threadId','root','unitId','deleteComment','reply','find','replies','commentUpdate$','thread-comment-data-source.config','_initDataSource','resolved','map','error','_threadCommentDataSource','20688TWdKlp','getMemberID','defineProperty','forEach','delete','17707HmUuaf','getUnit','addComment','body','_httpService','parse','type','subscribe','length','821046oVofEj','_threadCommentDataSourceService','solved','rangeId','4DzEzvr','listComments','/solved','rangeType','onReady','getUser','post','OpenOrReOpen','slice','Solve','_init','16sYPKRz','460431WaNFex','userId','YYYY/MM/DD\x20HH:mm','1138473wXHXfj','updateComment','/reply','filter','/list','_config','requireSession','disposeWithMe','1570216iBNWBR','Delete','getCurrentUser','/edit','Add','personId','users','get','getComment','add','setConfig','replyId','syncUpdateMutationToColla','size','UNIVER_UNKNOWN'];_0x3526=function(){return _0x59ec1b;};return _0x3526();}import{bufferTime as _0x2badf2}from'rxjs';import{HTTPService as _0x2b51a3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4d95d1=>(_0x4d95d1[_0x4d95d1['OpenOrReOpen']=0x0]=_0x17b82a(0x115),_0x4d95d1[_0x4d95d1['Solved']=0x1]=_0x17b82a(0xe8),_0x4d95d1[_0x4d95d1[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x4d95d1))(I||{}),v=(_0x205eb5=>(_0x205eb5[_0x205eb5['Unknown']=0x0]='Unknown',_0x205eb5[_0x205eb5[_0x17b82a(0x129)]=0x1]=_0x17b82a(0x129),_0x205eb5[_0x205eb5[_0x17b82a(0xe5)]=0x2]=_0x17b82a(0xe5),_0x205eb5[_0x205eb5[_0x17b82a(0x135)]=0x3]=_0x17b82a(0x135),_0x205eb5[_0x205eb5[_0x17b82a(0x126)]=0x4]='Delete',_0x205eb5[_0x205eb5[_0x17b82a(0x117)]=0x5]='Solve',_0x205eb5[_0x205eb5[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x205eb5))(v||{});const D=_0x4ccf30=>_0x3a7d70(new Date(+_0x4ccf30))[_0x17b82a(0xdf)](_0x17b82a(0x11c)),B=async(_0xa869a1,_0x425d4a)=>{const _0x4e4138=_0x17b82a,_0x3b1afa=_0xa869a1['get'](_0x350584),_0xc624f5=_0xa869a1[_0x4e4138(0x12c)](_0x2b51a3);_0x425d4a[_0x4e4138(0xff)](_0x4623d6=>{const _0x511586=_0x4e4138;_0x3b1afa[_0x511586(0x113)](_0x4623d6)&&_0x425d4a[_0x511586(0x100)](_0x4623d6);}),_0x425d4a[_0x4e4138(0x132)]&&(await _0xc624f5['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x425d4a]}}))[_0x4e4138(0x104)][_0x4e4138(0x12b)][_0x4e4138(0xff)](_0x17cfb7=>{const _0xe8d197=_0x4e4138;_0x17cfb7&&_0x3b1afa[_0xe8d197(0x13a)](_0x17cfb7);});};var K=Object[_0x17b82a(0x13c)],V=(_0x4f079f,_0x162339,_0x41a461,_0x53c732)=>{const _0x5a1243=_0x17b82a;for(var _0x5628fd=_0x53c732>0x1?void 0x0:_0x53c732?K(_0x162339,_0x41a461):_0x162339,_0x46943f=_0x4f079f[_0x5a1243(0x109)]-0x1,_0x25b76c;_0x46943f>=0x0;_0x46943f--)(_0x25b76c=_0x4f079f[_0x46943f])&&(_0x5628fd=_0x25b76c(_0x5628fd)||_0x5628fd);return _0x5628fd;},p=(_0x4df034,_0x284f92)=>(_0x2a035c,_0x370215)=>_0x284f92(_0x2a035c,_0x370215,_0x4df034);let S=class extends _0x546ddf{constructor(_0xbc44d0,_0xd291ec,_0x1e5fdf,_0x55c841){const _0x2ff66b=_0x17b82a;super(),this[_0x2ff66b(0x13d)]=_0xbc44d0,this[_0x2ff66b(0xe7)]=_0xd291ec,this[_0x2ff66b(0x137)]=_0x1e5fdf,this[_0x2ff66b(0xe1)]=_0x55c841,this[_0x2ff66b(0x118)](),this[_0x2ff66b(0xdc)]();}['_initUserSync'](){const _0x42d530=_0x17b82a;this[_0x42d530(0x124)](this[_0x42d530(0xe7)][_0x42d530(0xf5)][_0x42d530(0x138)](_0x2badf2(0x10))[_0x42d530(0x108)](_0xec9880=>{const _0x5b74a0=_0x42d530,_0x1f3630=new Set();_0xec9880[_0x5b74a0(0xff)](_0x5b5c63=>{const _0x83a605=_0x5b74a0;switch(_0x5b5c63[_0x83a605(0x107)]){case'add':{const _0x23a8e9=_0x5b5c63[_0x83a605(0x136)][_0x83a605(0x12a)];_0x1f3630['add'](_0x23a8e9);break;}}}),B(this[_0x5b74a0(0xe1)],_0x1f3630);}));}[_0x17b82a(0x118)](){const _0x1649d0=_0x17b82a;this[_0x1649d0(0x124)](this[_0x1649d0(0x13d)][_0x1649d0(0xf5)]['subscribe'](async _0x5a4c20=>{const _0x9c2efe=_0x1649d0;var _0x3c4970,_0x44043c,_0x46a65a,_0x35900c;const _0x46d982=(_0x3c4970=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x3d8083=>_0x3d8083['threadId']===_0x5a4c20['threadId']))==null?void 0x0:_0x3c4970[_0x9c2efe(0xef)];if(!_0x46d982)return;const {unitId:_0x34a78a,subUnitId:_0x5ab8bb}=_0x46d982;switch(_0x5a4c20['user']&&this['_userService'][_0x9c2efe(0x13a)](_0x5a4c20['user']),_0x5a4c20['type']){case v[_0x9c2efe(0x129)]:break;case v[_0x9c2efe(0xe5)]:{this['_threadCommentModel']['addComment'](_0x34a78a,_0x5ab8bb,{'unitId':_0x34a78a,'subUnitId':_0x5ab8bb,'ref':'','id':_0x5a4c20[_0x9c2efe(0x130)],'dT':D(+_0x5a4c20[_0x9c2efe(0x13f)]),'threadId':_0x5a4c20['threadId'],'personId':(_0x46a65a=(_0x44043c=_0x5a4c20['user'])==null?void 0x0:_0x44043c[_0x9c2efe(0x134)])!=null?_0x46a65a:_0x5a4c20[_0x9c2efe(0x11b)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)]),'parentId':_0x46d982['id']});break;}case v[_0x9c2efe(0x126)]:{const _0x16c9db=this[_0x9c2efe(0xe7)][_0x9c2efe(0x12d)](_0x34a78a,_0x5ab8bb,_0x5a4c20['replyId']);_0x16c9db&&_0x16c9db[_0x9c2efe(0x139)]&&this['_threadCommentModel'][_0x9c2efe(0xf1)](_0x34a78a,_0x5ab8bb,_0x5a4c20[_0x9c2efe(0x130)]);break;}case v[_0x9c2efe(0x135)]:{this['_threadCommentModel'][_0x9c2efe(0x11e)](_0x34a78a,_0x5ab8bb,{'commentId':_0x5a4c20[_0x9c2efe(0x130)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)])});break;}case v[_0x9c2efe(0x117)]:{const _0x1041e3=(_0x35900c=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x567ac2=>_0x567ac2[_0x9c2efe(0xee)]===_0x5a4c20['threadId']))==null?void 0x0:_0x35900c['root'];_0x1041e3&&this['_threadCommentModel']['resolveComment'](_0x34a78a,_0x5ab8bb,_0x1041e3['id'],_0x5a4c20['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4128a6(_0x3a2a96)),p(0x1,_0x4128a6(_0x37d2c5)),p(0x2,_0x4128a6(_0x350584)),p(0x3,_0x4128a6(_0x4d52d5))],S);const z=_0x17b82a(0xf6),M={};var k=Object[_0x17b82a(0x13c)],Q=(_0x201cde,_0x5b6cfc,_0x6091a1,_0x30641c)=>{for(var _0x5bde4f=_0x30641c>0x1?void 0x0:_0x30641c?k(_0x5b6cfc,_0x6091a1):_0x5b6cfc,_0x546446=_0x201cde['length']-0x1,_0x58c55f;_0x546446>=0x0;_0x546446--)(_0x58c55f=_0x201cde[_0x546446])&&(_0x5bde4f=_0x58c55f(_0x5bde4f)||_0x5bde4f);return _0x5bde4f;},_=(_0x168ac4,_0x4eaac1)=>(_0x44c667,_0x13dbaa)=>_0x4eaac1(_0x44c667,_0x13dbaa,_0x168ac4);function X(_0x44002b,_0x531905){const _0x357b0a=_0x17b82a,_0x412638=_0x44002b['replies'][0x0];return{..._0x531905,'id':_0x412638[_0x357b0a(0x130)],'resolved':_0x44002b[_0x357b0a(0x10c)]===0x1,'dT':D(_0x412638[_0x357b0a(0x13f)]),'personId':_0x412638[_0x357b0a(0x11b)],'threadId':_0x412638[_0x357b0a(0xee)]};}function ee(_0x2a5ea5,_0x33d41a,_0x518030){const _0x1eb974=_0x17b82a;var _0x42278c,_0x1f360d;if(((_0x1f360d=(_0x42278c=_0x2a5ea5==null?void 0x0:_0x2a5ea5[_0x1eb974(0xf4)])==null?void 0x0:_0x42278c['length'])!=null?_0x1f360d:0x0)>0x0){const _0x799fcf=(_0x440e38,_0x4b6841)=>({'id':_0x440e38['replyId'],'threadId':_0x440e38[_0x1eb974(0xee)],'dT':D(_0x440e38['createTimestamp']),'personId':_0x440e38['userId'],'resolved':_0x2a5ea5['solved']===I[_0x1eb974(0xe8)],'unitId':_0x33d41a,'subUnitId':_0x518030,'text':JSON[_0x1eb974(0x106)](_0x440e38[_0x1eb974(0x13b)]),'parentId':_0x4b6841}),_0x4c7cd2=_0x799fcf(_0x2a5ea5[_0x1eb974(0xf4)][0x0]);return{..._0x4c7cd2,'children':_0x2a5ea5[_0x1eb974(0xf4)][_0x1eb974(0x116)](0x1)[_0x1eb974(0xf9)](_0x4b8de7=>_0x799fcf(_0x4b8de7,_0x4c7cd2['id']))};}return null;}let f=class{constructor(_0x11b759,_0x162509,_0x1b9be4,_0x3e3a17){const _0x3ec8dd=_0x17b82a;this[_0x3ec8dd(0x105)]=_0x11b759,this['_userService']=_0x162509,this['_sessionService']=_0x1b9be4,this[_0x3ec8dd(0xe1)]=_0x3e3a17;}async[_0x17b82a(0x103)](_0x239561){const _0x526c73=_0x17b82a;var _0x4d0b4b,_0x326e59;const {parentId:_0x2c42fe,unitId:_0x2c695e,text:_0x4990f4,threadId:_0x589601}=_0x239561,_0x515fc7=(_0x326e59=(_0x4d0b4b=_0x4990f4[_0x526c73(0xde)])==null?void 0x0:_0x4d0b4b[_0x526c73(0x120)](_0x15d9e5=>_0x15d9e5[_0x526c73(0x111)]===_0x25d92a['COMMENT'])[_0x526c73(0xf9)](_0x4aa213=>_0x4aa213[_0x526c73(0x10d)]))!=null?_0x326e59:[],_0x2866f1=JSON['stringify'](_0x4990f4),_0x4e53c9=(await this['_sessionService'][_0x526c73(0x123)](_0x2c695e))[_0x526c73(0xfd)]();if(_0x2c42fe){const _0x4660e8={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7,'threadId':_0x589601},_0x3b052c=(await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0x11f),{'body':_0x4660e8}))['body'][_0x526c73(0xf2)];return{..._0x239561,'id':_0x3b052c[_0x526c73(0x130)],'dT':_0x3a7d70(+_0x3b052c[_0x526c73(0x13f)])[_0x526c73(0xdf)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b052c[_0x526c73(0x11b)]};}else{const _0x1545b0={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7},_0x315eef=await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0xed),{'body':_0x1545b0});return X(_0x315eef[_0x526c73(0x104)][_0x526c73(0xeb)],_0x239561);}}async['updateComment'](_0x31f3e6){const _0x3e815c=_0x17b82a;var _0xc710d5,_0x123d96;const {text:_0x3c1cfb,unitId:_0x579cbb}=_0x31f3e6,_0x66ea90=(_0x123d96=(_0xc710d5=_0x3c1cfb[_0x3e815c(0xde)])==null?void 0x0:_0xc710d5[_0x3e815c(0x120)](_0x261fa0=>_0x261fa0['rangeType']===_0x25d92a[_0x3e815c(0xe6)])[_0x3e815c(0xf9)](_0x2801ed=>_0x2801ed[_0x3e815c(0x10d)]))!=null?_0x123d96:[],_0x2650db=JSON[_0x3e815c(0xe0)](_0x3c1cfb),_0x320fd1=_0x31f3e6[_0x3e815c(0xee)],_0x5cfc65=_0x31f3e6['id'],_0x20cf92={'memberId':(await this['_sessionService'][_0x3e815c(0x123)](_0x579cbb))[_0x3e815c(0xfd)](),'unitId':_0x579cbb,'threadId':_0x320fd1,'mention':_0x66ea90,'content':_0x2650db,'replyId':_0x5cfc65},_0x3d8281=await this[_0x3e815c(0x105)]['post'](_0x3e815c(0xec)+_0x579cbb+_0x3e815c(0x128),{'body':_0x20cf92});return!_0x3d8281[_0x3e815c(0x104)][_0x3e815c(0xfa)]||_0x3d8281['body'][_0x3e815c(0xfa)][_0x3e815c(0xe4)]===0x1;}async[_0x17b82a(0xe2)](_0x160dc3){const _0x3a08bf=_0x17b82a,{unitId:_0x54ec44}=_0x160dc3,_0x561c86=_0x160dc3['threadId'],_0x3929b8={'memberId':this[_0x3a08bf(0x137)][_0x3a08bf(0x127)]()[_0x3a08bf(0x134)],'unitId':_0x54ec44,'threadId':_0x561c86,'solved':_0x160dc3[_0x3a08bf(0xf8)]?I[_0x3a08bf(0xe8)]:I['OpenOrReOpen']},_0x2bcc31=await this['_httpService']['post'](_0x3a08bf(0xec)+_0x54ec44+_0x3a08bf(0x110),{'body':_0x3929b8});return!_0x2bcc31['body']['error']||_0x2bcc31[_0x3a08bf(0x104)][_0x3a08bf(0xfa)][_0x3a08bf(0xe4)]===0x1;}async[_0x17b82a(0xf1)](_0x2c537b,_0x1769e2,_0xd79cf0,_0xae8210){const _0x277173=_0x17b82a,_0x517b21={'memberId':(await this[_0x277173(0xe9)]['requireSession'](_0x2c537b))[_0x277173(0xfd)](),'threadId':_0xd79cf0,'replyId':_0xae8210,'unitId':_0x2c537b},_0x2c754c=await this[_0x277173(0x105)][_0x277173(0x114)](_0x277173(0xec)+_0x2c537b+'/delete',{'body':_0x517b21});return!_0x2c754c[_0x277173(0x104)][_0x277173(0xfa)]||_0x2c754c[_0x277173(0x104)]['error'][_0x277173(0xe4)]===0x1;}async[_0x17b82a(0x10f)](_0xd04887,_0x20e1a7,_0x4d8c57){const _0x4a02e8=_0x17b82a,_0x46a642={'unitId':_0xd04887,'threadId':_0x4d8c57},_0x2218f1=await this[_0x4a02e8(0x105)][_0x4a02e8(0x114)](_0x4a02e8(0xec)+_0xd04887+_0x4a02e8(0x121),{'body':_0x46a642}),_0x291b60=_0x4d8c57['map'](_0x5c9938=>ee(_0x2218f1[_0x4a02e8(0x104)]['comments'][_0x5c9938],_0xd04887,_0x20e1a7))['filter'](Boolean);return Object['values'](_0x2218f1[_0x4a02e8(0x104)][_0x4a02e8(0x12b)])[_0x4a02e8(0xff)](_0x2ae379=>{const _0x248b37=_0x4a02e8;this['_userService'][_0x248b37(0x13a)](_0x2ae379);}),_0x291b60;}[_0x17b82a(0xea)](_0x2ef80f){const _0x3ba083=_0x17b82a;return{'id':_0x2ef80f['id'],'threadId':_0x2ef80f[_0x3ba083(0xee)],'ref':_0x2ef80f['ref']};}};f=Q([_(0x0,_0x4128a6(_0x2b51a3)),_(0x1,_0x4128a6(_0x350584)),_(0x2,_0x4128a6(_0x19d43c)),_(0x3,_0x4128a6(_0x4d52d5))],f);var re=Object[_0x17b82a(0x13c)],te=(_0x3237b3,_0x46db88,_0x317ff0,_0x56def5)=>{const _0x26e7a3=_0x17b82a;for(var _0x21217a=_0x56def5>0x1?void 0x0:_0x56def5?re(_0x46db88,_0x317ff0):_0x46db88,_0x38599d=_0x3237b3[_0x26e7a3(0x109)]-0x1,_0x31a63f;_0x38599d>=0x0;_0x38599d--)(_0x31a63f=_0x3237b3[_0x38599d])&&(_0x21217a=_0x31a63f(_0x21217a)||_0x21217a);return _0x21217a;},N=(_0x44bb67,_0x1c0ee4)=>(_0x4307ff,_0x11b61d)=>_0x1c0ee4(_0x4307ff,_0x11b61d,_0x44bb67);let g=class extends _0x546ddf{constructor(_0x17ec65,_0x2e1056){const _0x1360f4=_0x17b82a;super(),this['_threadCommentDataSourceService']=_0x17ec65,this[_0x1360f4(0xfb)]=_0x2e1056,this[_0x1360f4(0xf7)]();}['_initDataSource'](){const _0x51b820=_0x17b82a;this['_threadCommentDataSourceService']['dataSource']=this[_0x51b820(0xfb)],this[_0x51b820(0x10b)][_0x51b820(0x131)]=!0x1;}};g=te([N(0x0,_0xc19607),N(0x1,_0x4128a6(f))],g);var se=Object[_0x17b82a(0xfe)],oe=Object[_0x17b82a(0x13c)],ne=(_0x143215,_0xa11d85,_0x40d424)=>_0xa11d85 in _0x143215?se(_0x143215,_0xa11d85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40d424}):_0x143215[_0xa11d85]=_0x40d424,ie=(_0x14492c,_0x2b7a57,_0x515b3a,_0x1e5748)=>{const _0x34b283=_0x17b82a;for(var _0x7ac608=_0x1e5748>0x1?void 0x0:_0x1e5748?oe(_0x2b7a57,_0x515b3a):_0x2b7a57,_0x29c895=_0x14492c[_0x34b283(0x109)]-0x1,_0x2acb9c;_0x29c895>=0x0;_0x29c895--)(_0x2acb9c=_0x14492c[_0x29c895])&&(_0x7ac608=_0x2acb9c(_0x7ac608)||_0x7ac608);return _0x7ac608;},w=(_0x73ddf8,_0x2e2ce9)=>(_0x326606,_0x41f52e)=>_0x2e2ce9(_0x326606,_0x41f52e,_0x73ddf8),$=(_0x20fb44,_0x3a98f1,_0x3d057b)=>ne(_0x20fb44,typeof _0x3a98f1!=_0x17b82a(0xe3)?_0x3a98f1+'':_0x3a98f1,_0x3d057b);let b=class extends _0x235c2b{constructor(_0xf7fdcd=M,_0x152b1f,_0xad410a){const _0x4108e=_0x17b82a;super(),this['_config']=_0xf7fdcd,this[_0x4108e(0xe1)]=_0x152b1f,this[_0x4108e(0x13e)]=_0xad410a;const {..._0x2e14f7}=_0x5886d2({},M,this[_0x4108e(0x122)]);this[_0x4108e(0x13e)][_0x4108e(0x12f)](z,_0x2e14f7);}['onStarting'](){const _0x1d298c=_0x17b82a;[[f],[g],[S]][_0x1d298c(0xff)](_0xc98e7e=>{const _0x119e64=_0x1d298c;this[_0x119e64(0xe1)][_0x119e64(0x12e)](_0xc98e7e);});}[_0x17b82a(0x112)](){const _0x45abec=_0x17b82a;this[_0x45abec(0xe1)][_0x45abec(0x12c)](g),this[_0x45abec(0xe1)]['get'](S);}};function _0x715e(_0x1869f7,_0x394278){const _0x352680=_0x3526();return _0x715e=function(_0x715e5a,_0x59550c){_0x715e5a=_0x715e5a-0xdb;let _0x2ef194=_0x352680[_0x715e5a];return _0x2ef194;},_0x715e(_0x1869f7,_0x394278);}$(b,'pluginName',W),$(b,_0x17b82a(0x107),_0x4c85bc[_0x17b82a(0x133)]),b=ie([_0x5b1abb(_0x21ed2e,_0x19e911,_0x219f24),w(0x1,_0x4128a6(_0x4d52d5)),w(0x2,_0x17181b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x15af(_0x1519cd,_0x2e06c6){const _0x1cb5e7=_0x1cb5();return _0x15af=function(_0x15af2c,_0x5d3c68){_0x15af2c=_0x15af2c-0x1a9;let _0x1ed7ba=_0x1cb5e7[_0x15af2c];return _0x1ed7ba;},_0x15af(_0x1519cd,_0x2e06c6);}const _0x5bf03e=_0x15af;(function(_0x345d13,_0x4eb6c8){const _0x59fd78=_0x15af,_0x2f5581=_0x345d13();while(!![]){try{const _0x55b865=-parseInt(_0x59fd78(0x1c4))/0x1*(parseInt(_0x59fd78(0x1e7))/0x2)+-parseInt(_0x59fd78(0x1f3))/0x3+-parseInt(_0x59fd78(0x1a9))/0x4+parseInt(_0x59fd78(0x201))/0x5+parseInt(_0x59fd78(0x1c5))/0x6+parseInt(_0x59fd78(0x1cb))/0x7+-parseInt(_0x59fd78(0x200))/0x8;if(_0x55b865===_0x4eb6c8)break;else _0x2f5581['push'](_0x2f5581['shift']());}catch(_0x2ee43f){_0x2f5581['push'](_0x2f5581['shift']());}}}(_0x1cb5,0xd6be2));import{CommentService as _0x210c37,CollaborationSessionService as _0x220e28,UniverCollaborationClientPlugin as _0x1095dd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf4a461}from'@univerjs-pro/license';function _0x1cb5(){const _0x2331af=['Delete','forEach','getUnit','/list','commentUpdate$','defineProperty','COMMENT','UNRECOGNIZED','rangeId','size','replies','replyId','length','1245212BggkpG','resolved','add','_commentService','YYYY/MM/DD\x20HH:mm','get','_threadCommentDataSource','_httpService','UNIVER_UNKNOWN','symbol','map','values','addUser','comment','onStarting','comments','type','thread-comment-data-source.config','onReady','Solve','dataSource','_threadCommentDataSourceService','OpenOrReOpen','userID','_configService','post','updateComment','527TOcWJj','8607570ErrZfg','body','threadId','ref','Edit','_userService','1768179MNmVAH','rangeType','reply','_injector','pluginName','_initUserSync','parse','user','_init','_initDataSource','unitId','/universer-api/comment/unit/','getComment','parentId','deleteComment','solved','/edit','format','root','find','users','getMemberID','syncUpdateMutationToColla','customRanges','slice','subscribe','delete','resolveComment','382nProKU','getOwnPropertyDescriptor','Solved','content','createTimestamp','filter','code','error','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','Unknown','4299519TCVrll','getCurrentUser','requireSession','_threadCommentModel','_config','Add','/add','saveCommentToSnapshot','addComment','stringify','_sessionService','Reply','/universer-api/user/list','795960EnqPlm','5685110mJsRJb'];_0x1cb5=function(){return _0x2331af;};return _0x1cb5();}import{dayjs as _0x2bfba6,UserManagerService as _0x48dccf,Inject as _0xc780c5,Injector as _0x394220,Disposable as _0x5da964,CustomRangeType as _0x1bd652,UniverInstanceType as _0x27d52f,DependentOn as _0x5b752f,IConfigService as _0x1aa97b,Plugin as _0x4175ae,merge as _0x29f660}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ce1e2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5208a,IThreadCommentDataSourceService as _0x51bd43}from'@univerjs/thread-comment';import{bufferTime as _0x3dce6d}from'rxjs';import{HTTPService as _0x2353b4}from'@univerjs/network';const W=_0x5bf03e(0x1f0);var I=(_0x244959=>(_0x244959[_0x244959[_0x5bf03e(0x1bf)]=0x0]=_0x5bf03e(0x1bf),_0x244959[_0x244959[_0x5bf03e(0x1e9)]=0x1]=_0x5bf03e(0x1e9),_0x244959[_0x244959[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0x244959))(I||{}),v=(_0xb1669d=>(_0xb1669d[_0xb1669d[_0x5bf03e(0x1f2)]=0x0]=_0x5bf03e(0x1f2),_0xb1669d[_0xb1669d[_0x5bf03e(0x1f8)]=0x1]=_0x5bf03e(0x1f8),_0xb1669d[_0xb1669d[_0x5bf03e(0x1fe)]=0x2]=_0x5bf03e(0x1fe),_0xb1669d[_0xb1669d[_0x5bf03e(0x1c9)]=0x3]='Edit',_0xb1669d[_0xb1669d[_0x5bf03e(0x202)]=0x4]=_0x5bf03e(0x202),_0xb1669d[_0xb1669d['Solve']=0x5]=_0x5bf03e(0x1bc),_0xb1669d[_0xb1669d[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0xb1669d))(v||{});const D=_0x38cee2=>_0x2bfba6(new Date(+_0x38cee2))[_0x5bf03e(0x1dc)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1cfc19,_0x25af0b)=>{const _0x5e5260=_0x5bf03e,_0x18d93e=_0x1cfc19['get'](_0x48dccf),_0x40ee04=_0x1cfc19[_0x5e5260(0x1ae)](_0x2353b4);_0x25af0b[_0x5e5260(0x203)](_0x36f700=>{const _0xfb8e08=_0x5e5260;_0x18d93e['getUser'](_0x36f700)&&_0x25af0b[_0xfb8e08(0x1e5)](_0x36f700);}),_0x25af0b[_0x5e5260(0x20b)]&&(await _0x40ee04[_0x5e5260(0x1ae)](_0x5e5260(0x1ff),{'params':{'userIDs':[..._0x25af0b]}}))[_0x5e5260(0x1c6)][_0x5e5260(0x1df)]['forEach'](_0x5e43f0=>{const _0x46243d=_0x5e5260;_0x5e43f0&&_0x18d93e[_0x46243d(0x1b5)](_0x5e43f0);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x20bdc8,_0x37d360,_0xde6f02,_0x1616e9)=>{const _0x108a23=_0x5bf03e;for(var _0x1c5c74=_0x1616e9>0x1?void 0x0:_0x1616e9?K(_0x37d360,_0xde6f02):_0x37d360,_0xca633a=_0x20bdc8[_0x108a23(0x20e)]-0x1,_0x25bd6d;_0xca633a>=0x0;_0xca633a--)(_0x25bd6d=_0x20bdc8[_0xca633a])&&(_0x1c5c74=_0x25bd6d(_0x1c5c74)||_0x1c5c74);return _0x1c5c74;},p=(_0x312205,_0x1ee512)=>(_0xaf8f32,_0x129af2)=>_0x1ee512(_0xaf8f32,_0x129af2,_0x312205);let S=class extends _0x5da964{constructor(_0x44a03a,_0x16edca,_0x39bc82,_0x4fa082){const _0x34bce1=_0x5bf03e;super(),this[_0x34bce1(0x1ac)]=_0x44a03a,this[_0x34bce1(0x1f6)]=_0x16edca,this['_userService']=_0x39bc82,this['_injector']=_0x4fa082,this[_0x34bce1(0x1d3)](),this[_0x34bce1(0x1d0)]();}[_0x5bf03e(0x1d0)](){const _0x341f6d=_0x5bf03e;this['disposeWithMe'](this[_0x341f6d(0x1f6)][_0x341f6d(0x206)]['pipe'](_0x3dce6d(0x10))[_0x341f6d(0x1e4)](_0x377ae3=>{const _0x5754f9=_0x341f6d,_0x20e697=new Set();_0x377ae3[_0x5754f9(0x203)](_0x5a7286=>{const _0x506def=_0x5754f9;switch(_0x5a7286['type']){case _0x506def(0x1ab):{const _0x5e3632=_0x5a7286['payload']['personId'];_0x20e697[_0x506def(0x1ab)](_0x5e3632);break;}}}),B(this[_0x5754f9(0x1ce)],_0x20e697);}));}['_init'](){const _0x5a4610=_0x5bf03e;this['disposeWithMe'](this[_0x5a4610(0x1ac)][_0x5a4610(0x206)][_0x5a4610(0x1e4)](async _0xf45214=>{const _0x33bb2e=_0x5a4610;var _0x2b852c,_0x50d7a9,_0x2a5ea1,_0x25fc25;const _0x38fe38=(_0x2b852c=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])[_0x33bb2e(0x1de)](_0x393a87=>_0x393a87['threadId']===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x2b852c[_0x33bb2e(0x1dd)];if(!_0x38fe38)return;const {unitId:_0x5e09ee,subUnitId:_0x31cb78}=_0x38fe38;switch(_0xf45214[_0x33bb2e(0x1d2)]&&this['_userService'][_0x33bb2e(0x1b5)](_0xf45214[_0x33bb2e(0x1d2)]),_0xf45214[_0x33bb2e(0x1b9)]){case v['Add']:break;case v[_0x33bb2e(0x1fe)]:{this[_0x33bb2e(0x1f6)]['addComment'](_0x5e09ee,_0x31cb78,{'unitId':_0x5e09ee,'subUnitId':_0x31cb78,'ref':'','id':_0xf45214[_0x33bb2e(0x20d)],'dT':D(+_0xf45214[_0x33bb2e(0x1eb)]),'threadId':_0xf45214[_0x33bb2e(0x1c7)],'personId':(_0x2a5ea1=(_0x50d7a9=_0xf45214['user'])==null?void 0x0:_0x50d7a9[_0x33bb2e(0x1c0)])!=null?_0x2a5ea1:_0xf45214[_0x33bb2e(0x1ef)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)]),'parentId':_0x38fe38['id']});break;}case v[_0x33bb2e(0x202)]:{const _0x73e2cd=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d7)](_0x5e09ee,_0x31cb78,_0xf45214['replyId']);_0x73e2cd&&_0x73e2cd[_0x33bb2e(0x1d8)]&&this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d9)](_0x5e09ee,_0x31cb78,_0xf45214[_0x33bb2e(0x20d)]);break;}case v[_0x33bb2e(0x1c9)]:{this['_threadCommentModel'][_0x33bb2e(0x1c3)](_0x5e09ee,_0x31cb78,{'commentId':_0xf45214[_0x33bb2e(0x20d)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)])});break;}case v['Solve']:{const _0x586f1c=(_0x25fc25=this['_threadCommentModel'][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])['find'](_0x47b0ba=>_0x47b0ba[_0x33bb2e(0x1c7)]===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x25fc25[_0x33bb2e(0x1dd)];_0x586f1c&&this[_0x33bb2e(0x1f6)]['resolveComment'](_0x5e09ee,_0x31cb78,_0x586f1c['id'],_0xf45214[_0x33bb2e(0x1da)]===I[_0x33bb2e(0x1e9)]);break;}}}));}};S=V([p(0x0,_0xc780c5(_0x210c37)),p(0x1,_0xc780c5(_0x5208a)),p(0x2,_0xc780c5(_0x48dccf)),p(0x3,_0xc780c5(_0x394220))],S);const z=_0x5bf03e(0x1ba),M={};var k=Object[_0x5bf03e(0x1e8)],Q=(_0x327b80,_0x56553b,_0x4eda03,_0x4db94d)=>{const _0x2bef10=_0x5bf03e;for(var _0x5c7386=_0x4db94d>0x1?void 0x0:_0x4db94d?k(_0x56553b,_0x4eda03):_0x56553b,_0x1f6ea3=_0x327b80[_0x2bef10(0x20e)]-0x1,_0x4c936b;_0x1f6ea3>=0x0;_0x1f6ea3--)(_0x4c936b=_0x327b80[_0x1f6ea3])&&(_0x5c7386=_0x4c936b(_0x5c7386)||_0x5c7386);return _0x5c7386;},_=(_0x388db6,_0x22d905)=>(_0xd30b02,_0x393e89)=>_0x22d905(_0xd30b02,_0x393e89,_0x388db6);function X(_0x29e57f,_0x5ae59b){const _0xf84ef1=_0x5bf03e,_0x592c0f=_0x29e57f[_0xf84ef1(0x20c)][0x0];return{..._0x5ae59b,'id':_0x592c0f[_0xf84ef1(0x20d)],'resolved':_0x29e57f[_0xf84ef1(0x1da)]===0x1,'dT':D(_0x592c0f[_0xf84ef1(0x1eb)]),'personId':_0x592c0f[_0xf84ef1(0x1ef)],'threadId':_0x592c0f['threadId']};}function ee(_0x35f872,_0x29cbcc,_0x45bad0){const _0x353495=_0x5bf03e;var _0x555605,_0x1df5ef;if(((_0x1df5ef=(_0x555605=_0x35f872==null?void 0x0:_0x35f872[_0x353495(0x20c)])==null?void 0x0:_0x555605[_0x353495(0x20e)])!=null?_0x1df5ef:0x0)>0x0){const _0x32af3f=(_0x475295,_0x4b3bc0)=>({'id':_0x475295[_0x353495(0x20d)],'threadId':_0x475295[_0x353495(0x1c7)],'dT':D(_0x475295[_0x353495(0x1eb)]),'personId':_0x475295[_0x353495(0x1ef)],'resolved':_0x35f872[_0x353495(0x1da)]===I[_0x353495(0x1e9)],'unitId':_0x29cbcc,'subUnitId':_0x45bad0,'text':JSON[_0x353495(0x1d1)](_0x475295[_0x353495(0x1ea)]),'parentId':_0x4b3bc0}),_0x1d4391=_0x32af3f(_0x35f872[_0x353495(0x20c)][0x0]);return{..._0x1d4391,'children':_0x35f872[_0x353495(0x20c)][_0x353495(0x1e3)](0x1)['map'](_0x18a175=>_0x32af3f(_0x18a175,_0x1d4391['id']))};}return null;}let f=class{constructor(_0x53f406,_0x1d89ff,_0xeb5d11,_0x1b3914){const _0x5a8022=_0x5bf03e;this['_httpService']=_0x53f406,this[_0x5a8022(0x1ca)]=_0x1d89ff,this[_0x5a8022(0x1fd)]=_0xeb5d11,this[_0x5a8022(0x1ce)]=_0x1b3914;}async[_0x5bf03e(0x1fb)](_0x4b7126){const _0x3324f2=_0x5bf03e;var _0x2c0177,_0x2c9e64;const {parentId:_0xea5e6c,unitId:_0x1ab178,text:_0x55e48e,threadId:_0xcd0d4b}=_0x4b7126,_0x5a6654=(_0x2c9e64=(_0x2c0177=_0x55e48e[_0x3324f2(0x1e2)])==null?void 0x0:_0x2c0177[_0x3324f2(0x1ec)](_0x169a59=>_0x169a59[_0x3324f2(0x1cc)]===_0x1bd652['COMMENT'])[_0x3324f2(0x1b3)](_0x384d59=>_0x384d59[_0x3324f2(0x20a)]))!=null?_0x2c9e64:[],_0x3656ee=JSON[_0x3324f2(0x1fc)](_0x55e48e),_0x555e36=(await this['_sessionService'][_0x3324f2(0x1f5)](_0x1ab178))[_0x3324f2(0x1e0)]();if(_0xea5e6c){const _0x1c3ed8={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654,'threadId':_0xcd0d4b},_0x57dbb7=(await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+'/reply',{'body':_0x1c3ed8}))[_0x3324f2(0x1c6)][_0x3324f2(0x1cd)];return{..._0x4b7126,'id':_0x57dbb7[_0x3324f2(0x20d)],'dT':_0x2bfba6(+_0x57dbb7[_0x3324f2(0x1eb)])[_0x3324f2(0x1dc)](_0x3324f2(0x1ad)),'personId':_0x57dbb7[_0x3324f2(0x1ef)]};}else{const _0x1f4c66={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654},_0x51d893=await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+_0x3324f2(0x1f9),{'body':_0x1f4c66});return X(_0x51d893['body'][_0x3324f2(0x1b6)],_0x4b7126);}}async[_0x5bf03e(0x1c3)](_0xa79ba){const _0x194343=_0x5bf03e;var _0x4f9d1a,_0x2c822c;const {text:_0x30482c,unitId:_0x491b2f}=_0xa79ba,_0x41775d=(_0x2c822c=(_0x4f9d1a=_0x30482c['customRanges'])==null?void 0x0:_0x4f9d1a['filter'](_0xd7bd87=>_0xd7bd87[_0x194343(0x1cc)]===_0x1bd652[_0x194343(0x208)])[_0x194343(0x1b3)](_0x45f868=>_0x45f868[_0x194343(0x20a)]))!=null?_0x2c822c:[],_0x39bcb6=JSON[_0x194343(0x1fc)](_0x30482c),_0x107c06=_0xa79ba[_0x194343(0x1c7)],_0x48c58b=_0xa79ba['id'],_0x14bea9={'memberId':(await this[_0x194343(0x1fd)][_0x194343(0x1f5)](_0x491b2f))[_0x194343(0x1e0)](),'unitId':_0x491b2f,'threadId':_0x107c06,'mention':_0x41775d,'content':_0x39bcb6,'replyId':_0x48c58b},_0x2f1b2e=await this['_httpService'][_0x194343(0x1c2)]('/universer-api/comment/unit/'+_0x491b2f+_0x194343(0x1db),{'body':_0x14bea9});return!_0x2f1b2e['body'][_0x194343(0x1ee)]||_0x2f1b2e['body'][_0x194343(0x1ee)][_0x194343(0x1ed)]===0x1;}async[_0x5bf03e(0x1e6)](_0x19380d){const _0x4c2e14=_0x5bf03e,{unitId:_0x226eb3}=_0x19380d,_0x220999=_0x19380d[_0x4c2e14(0x1c7)],_0x869398={'memberId':this['_userService'][_0x4c2e14(0x1f4)]()[_0x4c2e14(0x1c0)],'unitId':_0x226eb3,'threadId':_0x220999,'solved':_0x19380d[_0x4c2e14(0x1aa)]?I[_0x4c2e14(0x1e9)]:I[_0x4c2e14(0x1bf)]},_0x3f3afb=await this[_0x4c2e14(0x1b0)][_0x4c2e14(0x1c2)](_0x4c2e14(0x1d6)+_0x226eb3+'/solved',{'body':_0x869398});return!_0x3f3afb[_0x4c2e14(0x1c6)][_0x4c2e14(0x1ee)]||_0x3f3afb[_0x4c2e14(0x1c6)]['error']['code']===0x1;}async['deleteComment'](_0x1d1fed,_0x5b24c0,_0x458bf2,_0x37a8d6){const _0x5e448e=_0x5bf03e,_0x4a0dd0={'memberId':(await this[_0x5e448e(0x1fd)]['requireSession'](_0x1d1fed))['getMemberID'](),'threadId':_0x458bf2,'replyId':_0x37a8d6,'unitId':_0x1d1fed},_0x48b2c7=await this[_0x5e448e(0x1b0)][_0x5e448e(0x1c2)](_0x5e448e(0x1d6)+_0x1d1fed+_0x5e448e(0x1f1),{'body':_0x4a0dd0});return!_0x48b2c7['body'][_0x5e448e(0x1ee)]||_0x48b2c7[_0x5e448e(0x1c6)]['error'][_0x5e448e(0x1ed)]===0x1;}async['listComments'](_0x283833,_0x229f4a,_0x449010){const _0x3e6ed4=_0x5bf03e,_0x469d54={'unitId':_0x283833,'threadId':_0x449010},_0x3b84a4=await this[_0x3e6ed4(0x1b0)][_0x3e6ed4(0x1c2)](_0x3e6ed4(0x1d6)+_0x283833+_0x3e6ed4(0x205),{'body':_0x469d54}),_0x4b2575=_0x449010[_0x3e6ed4(0x1b3)](_0x3b38f6=>ee(_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1b8)][_0x3b38f6],_0x283833,_0x229f4a))[_0x3e6ed4(0x1ec)](Boolean);return Object[_0x3e6ed4(0x1b4)](_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1df)])[_0x3e6ed4(0x203)](_0x4dd442=>{const _0x28239b=_0x3e6ed4;this['_userService'][_0x28239b(0x1b5)](_0x4dd442);}),_0x4b2575;}[_0x5bf03e(0x1fa)](_0x4faf28){const _0x4e2ed0=_0x5bf03e;return{'id':_0x4faf28['id'],'threadId':_0x4faf28['threadId'],'ref':_0x4faf28[_0x4e2ed0(0x1c8)]};}};f=Q([_(0x0,_0xc780c5(_0x2353b4)),_(0x1,_0xc780c5(_0x48dccf)),_(0x2,_0xc780c5(_0x220e28)),_(0x3,_0xc780c5(_0x394220))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2fdda9,_0xfef264,_0x9014a5,_0x33ac1e)=>{const _0x35d59d=_0x5bf03e;for(var _0x78004f=_0x33ac1e>0x1?void 0x0:_0x33ac1e?re(_0xfef264,_0x9014a5):_0xfef264,_0x3ceeaf=_0x2fdda9[_0x35d59d(0x20e)]-0x1,_0x4416f8;_0x3ceeaf>=0x0;_0x3ceeaf--)(_0x4416f8=_0x2fdda9[_0x3ceeaf])&&(_0x78004f=_0x4416f8(_0x78004f)||_0x78004f);return _0x78004f;},N=(_0x26ff3f,_0x24cc19)=>(_0xbb7509,_0x34b1af)=>_0x24cc19(_0xbb7509,_0x34b1af,_0x26ff3f);let g=class extends _0x5da964{constructor(_0x2f98bf,_0x5d88e1){const _0x4520be=_0x5bf03e;super(),this[_0x4520be(0x1be)]=_0x2f98bf,this[_0x4520be(0x1af)]=_0x5d88e1,this['_initDataSource']();}[_0x5bf03e(0x1d4)](){const _0xe3c2a1=_0x5bf03e;this[_0xe3c2a1(0x1be)][_0xe3c2a1(0x1bd)]=this[_0xe3c2a1(0x1af)],this['_threadCommentDataSourceService'][_0xe3c2a1(0x1e1)]=!0x1;}};g=te([N(0x0,_0x51bd43),N(0x1,_0xc780c5(f))],g);var se=Object[_0x5bf03e(0x207)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xeed73c,_0x2f4b7e,_0x577f20)=>_0x2f4b7e in _0xeed73c?se(_0xeed73c,_0x2f4b7e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x577f20}):_0xeed73c[_0x2f4b7e]=_0x577f20,ie=(_0x56191b,_0x3fcbe9,_0x212778,_0x54c9d2)=>{const _0x580589=_0x5bf03e;for(var _0x20f033=_0x54c9d2>0x1?void 0x0:_0x54c9d2?oe(_0x3fcbe9,_0x212778):_0x3fcbe9,_0x44d354=_0x56191b[_0x580589(0x20e)]-0x1,_0x1a87bd;_0x44d354>=0x0;_0x44d354--)(_0x1a87bd=_0x56191b[_0x44d354])&&(_0x20f033=_0x1a87bd(_0x20f033)||_0x20f033);return _0x20f033;},w=(_0x47190c,_0x3b3699)=>(_0x37fba2,_0x5ef8e4)=>_0x3b3699(_0x37fba2,_0x5ef8e4,_0x47190c),$=(_0x17ba0b,_0x3c483f,_0x13ed47)=>ne(_0x17ba0b,typeof _0x3c483f!=_0x5bf03e(0x1b2)?_0x3c483f+'':_0x3c483f,_0x13ed47);let b=class extends _0x4175ae{constructor(_0x13bf0e=M,_0x341dc6,_0x22d683){const _0x4a18fa=_0x5bf03e;super(),this['_config']=_0x13bf0e,this[_0x4a18fa(0x1ce)]=_0x341dc6,this[_0x4a18fa(0x1c1)]=_0x22d683;const {..._0x5516d0}=_0x29f660({},M,this[_0x4a18fa(0x1f7)]);this[_0x4a18fa(0x1c1)]['setConfig'](z,_0x5516d0);}[_0x5bf03e(0x1b7)](){const _0x35f776=_0x5bf03e;[[f],[g],[S]][_0x35f776(0x203)](_0x1b919b=>{const _0x2d9448=_0x35f776;this[_0x2d9448(0x1ce)][_0x2d9448(0x1ab)](_0x1b919b);});}[_0x5bf03e(0x1bb)](){const _0x2396ab=_0x5bf03e;this['_injector'][_0x2396ab(0x1ae)](g),this[_0x2396ab(0x1ce)][_0x2396ab(0x1ae)](S);}};$(b,_0x5bf03e(0x1cf),W),$(b,'type',_0x27d52f[_0x5bf03e(0x1b1)]),b=ie([_0x5b752f(_0x1ce1e2,_0x1095dd,_0xf4a461),w(0x1,_0xc780c5(_0x394220)),w(0x2,_0x1aa97b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x17b82a=_0x715e;(function(_0x4e841e,_0x5093c3){const _0x4231f1=_0x715e,_0x5cf7e7=_0x4e841e();while(!![]){try{const _0x599098=parseInt(_0x4231f1(0x101))/0x1*(parseInt(_0x4231f1(0x119))/0x2)+-parseInt(_0x4231f1(0x10a))/0x3+parseInt(_0x4231f1(0x10e))/0x4*(-parseInt(_0x4231f1(0xdb))/0x5)+parseInt(_0x4231f1(0xfc))/0x6+parseInt(_0x4231f1(0x11d))/0x7+parseInt(_0x4231f1(0x125))/0x8+parseInt(_0x4231f1(0x11a))/0x9;if(_0x599098===_0x5093c3)break;else _0x5cf7e7['push'](_0x5cf7e7['shift']());}catch(_0x44dfb1){_0x5cf7e7['push'](_0x5cf7e7['shift']());}}}(_0x3526,0x3a148));import{CommentService as _0x3a2a96,CollaborationSessionService as _0x19d43c,UniverCollaborationClientPlugin as _0x19e911}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x219f24}from'@univerjs-pro/license';import{dayjs as _0x3a7d70,UserManagerService as _0x350584,Inject as _0x4128a6,Injector as _0x4d52d5,Disposable as _0x546ddf,CustomRangeType as _0x25d92a,UniverInstanceType as _0x4c85bc,DependentOn as _0x5b1abb,IConfigService as _0x17181b,Plugin as _0x235c2b,merge as _0x5886d2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21ed2e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37d2c5,IThreadCommentDataSourceService as _0xc19607}from'@univerjs/thread-comment';function _0x3526(){const _0x59ec1b=['userID','Edit','payload','_userService','pipe','parentId','addUser','content','getOwnPropertyDescriptor','_commentService','_configService','createTimestamp','218005HGGnsY','_initUserSync','UNRECOGNIZED','customRanges','format','stringify','_injector','resolveComment','symbol','code','Reply','COMMENT','_threadCommentModel','Solved','_sessionService','saveCommentToSnapshot','comment','/universer-api/comment/unit/','/add','threadId','root','unitId','deleteComment','reply','find','replies','commentUpdate$','thread-comment-data-source.config','_initDataSource','resolved','map','error','_threadCommentDataSource','20688TWdKlp','getMemberID','defineProperty','forEach','delete','17707HmUuaf','getUnit','addComment','body','_httpService','parse','type','subscribe','length','821046oVofEj','_threadCommentDataSourceService','solved','rangeId','4DzEzvr','listComments','/solved','rangeType','onReady','getUser','post','OpenOrReOpen','slice','Solve','_init','16sYPKRz','460431WaNFex','userId','YYYY/MM/DD\x20HH:mm','1138473wXHXfj','updateComment','/reply','filter','/list','_config','requireSession','disposeWithMe','1570216iBNWBR','Delete','getCurrentUser','/edit','Add','personId','users','get','getComment','add','setConfig','replyId','syncUpdateMutationToColla','size','UNIVER_UNKNOWN'];_0x3526=function(){return _0x59ec1b;};return _0x3526();}import{bufferTime as _0x2badf2}from'rxjs';import{HTTPService as _0x2b51a3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4d95d1=>(_0x4d95d1[_0x4d95d1['OpenOrReOpen']=0x0]=_0x17b82a(0x115),_0x4d95d1[_0x4d95d1['Solved']=0x1]=_0x17b82a(0xe8),_0x4d95d1[_0x4d95d1[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x4d95d1))(I||{}),v=(_0x205eb5=>(_0x205eb5[_0x205eb5['Unknown']=0x0]='Unknown',_0x205eb5[_0x205eb5[_0x17b82a(0x129)]=0x1]=_0x17b82a(0x129),_0x205eb5[_0x205eb5[_0x17b82a(0xe5)]=0x2]=_0x17b82a(0xe5),_0x205eb5[_0x205eb5[_0x17b82a(0x135)]=0x3]=_0x17b82a(0x135),_0x205eb5[_0x205eb5[_0x17b82a(0x126)]=0x4]='Delete',_0x205eb5[_0x205eb5[_0x17b82a(0x117)]=0x5]='Solve',_0x205eb5[_0x205eb5[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x205eb5))(v||{});const D=_0x4ccf30=>_0x3a7d70(new Date(+_0x4ccf30))[_0x17b82a(0xdf)](_0x17b82a(0x11c)),B=async(_0xa869a1,_0x425d4a)=>{const _0x4e4138=_0x17b82a,_0x3b1afa=_0xa869a1['get'](_0x350584),_0xc624f5=_0xa869a1[_0x4e4138(0x12c)](_0x2b51a3);_0x425d4a[_0x4e4138(0xff)](_0x4623d6=>{const _0x511586=_0x4e4138;_0x3b1afa[_0x511586(0x113)](_0x4623d6)&&_0x425d4a[_0x511586(0x100)](_0x4623d6);}),_0x425d4a[_0x4e4138(0x132)]&&(await _0xc624f5['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x425d4a]}}))[_0x4e4138(0x104)][_0x4e4138(0x12b)][_0x4e4138(0xff)](_0x17cfb7=>{const _0xe8d197=_0x4e4138;_0x17cfb7&&_0x3b1afa[_0xe8d197(0x13a)](_0x17cfb7);});};var K=Object[_0x17b82a(0x13c)],V=(_0x4f079f,_0x162339,_0x41a461,_0x53c732)=>{const _0x5a1243=_0x17b82a;for(var _0x5628fd=_0x53c732>0x1?void 0x0:_0x53c732?K(_0x162339,_0x41a461):_0x162339,_0x46943f=_0x4f079f[_0x5a1243(0x109)]-0x1,_0x25b76c;_0x46943f>=0x0;_0x46943f--)(_0x25b76c=_0x4f079f[_0x46943f])&&(_0x5628fd=_0x25b76c(_0x5628fd)||_0x5628fd);return _0x5628fd;},p=(_0x4df034,_0x284f92)=>(_0x2a035c,_0x370215)=>_0x284f92(_0x2a035c,_0x370215,_0x4df034);let S=class extends _0x546ddf{constructor(_0xbc44d0,_0xd291ec,_0x1e5fdf,_0x55c841){const _0x2ff66b=_0x17b82a;super(),this[_0x2ff66b(0x13d)]=_0xbc44d0,this[_0x2ff66b(0xe7)]=_0xd291ec,this[_0x2ff66b(0x137)]=_0x1e5fdf,this[_0x2ff66b(0xe1)]=_0x55c841,this[_0x2ff66b(0x118)](),this[_0x2ff66b(0xdc)]();}['_initUserSync'](){const _0x42d530=_0x17b82a;this[_0x42d530(0x124)](this[_0x42d530(0xe7)][_0x42d530(0xf5)][_0x42d530(0x138)](_0x2badf2(0x10))[_0x42d530(0x108)](_0xec9880=>{const _0x5b74a0=_0x42d530,_0x1f3630=new Set();_0xec9880[_0x5b74a0(0xff)](_0x5b5c63=>{const _0x83a605=_0x5b74a0;switch(_0x5b5c63[_0x83a605(0x107)]){case'add':{const _0x23a8e9=_0x5b5c63[_0x83a605(0x136)][_0x83a605(0x12a)];_0x1f3630['add'](_0x23a8e9);break;}}}),B(this[_0x5b74a0(0xe1)],_0x1f3630);}));}[_0x17b82a(0x118)](){const _0x1649d0=_0x17b82a;this[_0x1649d0(0x124)](this[_0x1649d0(0x13d)][_0x1649d0(0xf5)]['subscribe'](async _0x5a4c20=>{const _0x9c2efe=_0x1649d0;var _0x3c4970,_0x44043c,_0x46a65a,_0x35900c;const _0x46d982=(_0x3c4970=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x3d8083=>_0x3d8083['threadId']===_0x5a4c20['threadId']))==null?void 0x0:_0x3c4970[_0x9c2efe(0xef)];if(!_0x46d982)return;const {unitId:_0x34a78a,subUnitId:_0x5ab8bb}=_0x46d982;switch(_0x5a4c20['user']&&this['_userService'][_0x9c2efe(0x13a)](_0x5a4c20['user']),_0x5a4c20['type']){case v[_0x9c2efe(0x129)]:break;case v[_0x9c2efe(0xe5)]:{this['_threadCommentModel']['addComment'](_0x34a78a,_0x5ab8bb,{'unitId':_0x34a78a,'subUnitId':_0x5ab8bb,'ref':'','id':_0x5a4c20[_0x9c2efe(0x130)],'dT':D(+_0x5a4c20[_0x9c2efe(0x13f)]),'threadId':_0x5a4c20['threadId'],'personId':(_0x46a65a=(_0x44043c=_0x5a4c20['user'])==null?void 0x0:_0x44043c[_0x9c2efe(0x134)])!=null?_0x46a65a:_0x5a4c20[_0x9c2efe(0x11b)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)]),'parentId':_0x46d982['id']});break;}case v[_0x9c2efe(0x126)]:{const _0x16c9db=this[_0x9c2efe(0xe7)][_0x9c2efe(0x12d)](_0x34a78a,_0x5ab8bb,_0x5a4c20['replyId']);_0x16c9db&&_0x16c9db[_0x9c2efe(0x139)]&&this['_threadCommentModel'][_0x9c2efe(0xf1)](_0x34a78a,_0x5ab8bb,_0x5a4c20[_0x9c2efe(0x130)]);break;}case v[_0x9c2efe(0x135)]:{this['_threadCommentModel'][_0x9c2efe(0x11e)](_0x34a78a,_0x5ab8bb,{'commentId':_0x5a4c20[_0x9c2efe(0x130)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)])});break;}case v[_0x9c2efe(0x117)]:{const _0x1041e3=(_0x35900c=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x567ac2=>_0x567ac2[_0x9c2efe(0xee)]===_0x5a4c20['threadId']))==null?void 0x0:_0x35900c['root'];_0x1041e3&&this['_threadCommentModel']['resolveComment'](_0x34a78a,_0x5ab8bb,_0x1041e3['id'],_0x5a4c20['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4128a6(_0x3a2a96)),p(0x1,_0x4128a6(_0x37d2c5)),p(0x2,_0x4128a6(_0x350584)),p(0x3,_0x4128a6(_0x4d52d5))],S);const z=_0x17b82a(0xf6),M={};var k=Object[_0x17b82a(0x13c)],Q=(_0x201cde,_0x5b6cfc,_0x6091a1,_0x30641c)=>{for(var _0x5bde4f=_0x30641c>0x1?void 0x0:_0x30641c?k(_0x5b6cfc,_0x6091a1):_0x5b6cfc,_0x546446=_0x201cde['length']-0x1,_0x58c55f;_0x546446>=0x0;_0x546446--)(_0x58c55f=_0x201cde[_0x546446])&&(_0x5bde4f=_0x58c55f(_0x5bde4f)||_0x5bde4f);return _0x5bde4f;},_=(_0x168ac4,_0x4eaac1)=>(_0x44c667,_0x13dbaa)=>_0x4eaac1(_0x44c667,_0x13dbaa,_0x168ac4);function X(_0x44002b,_0x531905){const _0x357b0a=_0x17b82a,_0x412638=_0x44002b['replies'][0x0];return{..._0x531905,'id':_0x412638[_0x357b0a(0x130)],'resolved':_0x44002b[_0x357b0a(0x10c)]===0x1,'dT':D(_0x412638[_0x357b0a(0x13f)]),'personId':_0x412638[_0x357b0a(0x11b)],'threadId':_0x412638[_0x357b0a(0xee)]};}function ee(_0x2a5ea5,_0x33d41a,_0x518030){const _0x1eb974=_0x17b82a;var _0x42278c,_0x1f360d;if(((_0x1f360d=(_0x42278c=_0x2a5ea5==null?void 0x0:_0x2a5ea5[_0x1eb974(0xf4)])==null?void 0x0:_0x42278c['length'])!=null?_0x1f360d:0x0)>0x0){const _0x799fcf=(_0x440e38,_0x4b6841)=>({'id':_0x440e38['replyId'],'threadId':_0x440e38[_0x1eb974(0xee)],'dT':D(_0x440e38['createTimestamp']),'personId':_0x440e38['userId'],'resolved':_0x2a5ea5['solved']===I[_0x1eb974(0xe8)],'unitId':_0x33d41a,'subUnitId':_0x518030,'text':JSON[_0x1eb974(0x106)](_0x440e38[_0x1eb974(0x13b)]),'parentId':_0x4b6841}),_0x4c7cd2=_0x799fcf(_0x2a5ea5[_0x1eb974(0xf4)][0x0]);return{..._0x4c7cd2,'children':_0x2a5ea5[_0x1eb974(0xf4)][_0x1eb974(0x116)](0x1)[_0x1eb974(0xf9)](_0x4b8de7=>_0x799fcf(_0x4b8de7,_0x4c7cd2['id']))};}return null;}let f=class{constructor(_0x11b759,_0x162509,_0x1b9be4,_0x3e3a17){const _0x3ec8dd=_0x17b82a;this[_0x3ec8dd(0x105)]=_0x11b759,this['_userService']=_0x162509,this['_sessionService']=_0x1b9be4,this[_0x3ec8dd(0xe1)]=_0x3e3a17;}async[_0x17b82a(0x103)](_0x239561){const _0x526c73=_0x17b82a;var _0x4d0b4b,_0x326e59;const {parentId:_0x2c42fe,unitId:_0x2c695e,text:_0x4990f4,threadId:_0x589601}=_0x239561,_0x515fc7=(_0x326e59=(_0x4d0b4b=_0x4990f4[_0x526c73(0xde)])==null?void 0x0:_0x4d0b4b[_0x526c73(0x120)](_0x15d9e5=>_0x15d9e5[_0x526c73(0x111)]===_0x25d92a['COMMENT'])[_0x526c73(0xf9)](_0x4aa213=>_0x4aa213[_0x526c73(0x10d)]))!=null?_0x326e59:[],_0x2866f1=JSON['stringify'](_0x4990f4),_0x4e53c9=(await this['_sessionService'][_0x526c73(0x123)](_0x2c695e))[_0x526c73(0xfd)]();if(_0x2c42fe){const _0x4660e8={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7,'threadId':_0x589601},_0x3b052c=(await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0x11f),{'body':_0x4660e8}))['body'][_0x526c73(0xf2)];return{..._0x239561,'id':_0x3b052c[_0x526c73(0x130)],'dT':_0x3a7d70(+_0x3b052c[_0x526c73(0x13f)])[_0x526c73(0xdf)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b052c[_0x526c73(0x11b)]};}else{const _0x1545b0={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7},_0x315eef=await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0xed),{'body':_0x1545b0});return X(_0x315eef[_0x526c73(0x104)][_0x526c73(0xeb)],_0x239561);}}async['updateComment'](_0x31f3e6){const _0x3e815c=_0x17b82a;var _0xc710d5,_0x123d96;const {text:_0x3c1cfb,unitId:_0x579cbb}=_0x31f3e6,_0x66ea90=(_0x123d96=(_0xc710d5=_0x3c1cfb[_0x3e815c(0xde)])==null?void 0x0:_0xc710d5[_0x3e815c(0x120)](_0x261fa0=>_0x261fa0['rangeType']===_0x25d92a[_0x3e815c(0xe6)])[_0x3e815c(0xf9)](_0x2801ed=>_0x2801ed[_0x3e815c(0x10d)]))!=null?_0x123d96:[],_0x2650db=JSON[_0x3e815c(0xe0)](_0x3c1cfb),_0x320fd1=_0x31f3e6[_0x3e815c(0xee)],_0x5cfc65=_0x31f3e6['id'],_0x20cf92={'memberId':(await this['_sessionService'][_0x3e815c(0x123)](_0x579cbb))[_0x3e815c(0xfd)](),'unitId':_0x579cbb,'threadId':_0x320fd1,'mention':_0x66ea90,'content':_0x2650db,'replyId':_0x5cfc65},_0x3d8281=await this[_0x3e815c(0x105)]['post'](_0x3e815c(0xec)+_0x579cbb+_0x3e815c(0x128),{'body':_0x20cf92});return!_0x3d8281[_0x3e815c(0x104)][_0x3e815c(0xfa)]||_0x3d8281['body'][_0x3e815c(0xfa)][_0x3e815c(0xe4)]===0x1;}async[_0x17b82a(0xe2)](_0x160dc3){const _0x3a08bf=_0x17b82a,{unitId:_0x54ec44}=_0x160dc3,_0x561c86=_0x160dc3['threadId'],_0x3929b8={'memberId':this[_0x3a08bf(0x137)][_0x3a08bf(0x127)]()[_0x3a08bf(0x134)],'unitId':_0x54ec44,'threadId':_0x561c86,'solved':_0x160dc3[_0x3a08bf(0xf8)]?I[_0x3a08bf(0xe8)]:I['OpenOrReOpen']},_0x2bcc31=await this['_httpService']['post'](_0x3a08bf(0xec)+_0x54ec44+_0x3a08bf(0x110),{'body':_0x3929b8});return!_0x2bcc31['body']['error']||_0x2bcc31[_0x3a08bf(0x104)][_0x3a08bf(0xfa)][_0x3a08bf(0xe4)]===0x1;}async[_0x17b82a(0xf1)](_0x2c537b,_0x1769e2,_0xd79cf0,_0xae8210){const _0x277173=_0x17b82a,_0x517b21={'memberId':(await this[_0x277173(0xe9)]['requireSession'](_0x2c537b))[_0x277173(0xfd)](),'threadId':_0xd79cf0,'replyId':_0xae8210,'unitId':_0x2c537b},_0x2c754c=await this[_0x277173(0x105)][_0x277173(0x114)](_0x277173(0xec)+_0x2c537b+'/delete',{'body':_0x517b21});return!_0x2c754c[_0x277173(0x104)][_0x277173(0xfa)]||_0x2c754c[_0x277173(0x104)]['error'][_0x277173(0xe4)]===0x1;}async[_0x17b82a(0x10f)](_0xd04887,_0x20e1a7,_0x4d8c57){const _0x4a02e8=_0x17b82a,_0x46a642={'unitId':_0xd04887,'threadId':_0x4d8c57},_0x2218f1=await this[_0x4a02e8(0x105)][_0x4a02e8(0x114)](_0x4a02e8(0xec)+_0xd04887+_0x4a02e8(0x121),{'body':_0x46a642}),_0x291b60=_0x4d8c57['map'](_0x5c9938=>ee(_0x2218f1[_0x4a02e8(0x104)]['comments'][_0x5c9938],_0xd04887,_0x20e1a7))['filter'](Boolean);return Object['values'](_0x2218f1[_0x4a02e8(0x104)][_0x4a02e8(0x12b)])[_0x4a02e8(0xff)](_0x2ae379=>{const _0x248b37=_0x4a02e8;this['_userService'][_0x248b37(0x13a)](_0x2ae379);}),_0x291b60;}[_0x17b82a(0xea)](_0x2ef80f){const _0x3ba083=_0x17b82a;return{'id':_0x2ef80f['id'],'threadId':_0x2ef80f[_0x3ba083(0xee)],'ref':_0x2ef80f['ref']};}};f=Q([_(0x0,_0x4128a6(_0x2b51a3)),_(0x1,_0x4128a6(_0x350584)),_(0x2,_0x4128a6(_0x19d43c)),_(0x3,_0x4128a6(_0x4d52d5))],f);var re=Object[_0x17b82a(0x13c)],te=(_0x3237b3,_0x46db88,_0x317ff0,_0x56def5)=>{const _0x26e7a3=_0x17b82a;for(var _0x21217a=_0x56def5>0x1?void 0x0:_0x56def5?re(_0x46db88,_0x317ff0):_0x46db88,_0x38599d=_0x3237b3[_0x26e7a3(0x109)]-0x1,_0x31a63f;_0x38599d>=0x0;_0x38599d--)(_0x31a63f=_0x3237b3[_0x38599d])&&(_0x21217a=_0x31a63f(_0x21217a)||_0x21217a);return _0x21217a;},N=(_0x44bb67,_0x1c0ee4)=>(_0x4307ff,_0x11b61d)=>_0x1c0ee4(_0x4307ff,_0x11b61d,_0x44bb67);let g=class extends _0x546ddf{constructor(_0x17ec65,_0x2e1056){const _0x1360f4=_0x17b82a;super(),this['_threadCommentDataSourceService']=_0x17ec65,this[_0x1360f4(0xfb)]=_0x2e1056,this[_0x1360f4(0xf7)]();}['_initDataSource'](){const _0x51b820=_0x17b82a;this['_threadCommentDataSourceService']['dataSource']=this[_0x51b820(0xfb)],this[_0x51b820(0x10b)][_0x51b820(0x131)]=!0x1;}};g=te([N(0x0,_0xc19607),N(0x1,_0x4128a6(f))],g);var se=Object[_0x17b82a(0xfe)],oe=Object[_0x17b82a(0x13c)],ne=(_0x143215,_0xa11d85,_0x40d424)=>_0xa11d85 in _0x143215?se(_0x143215,_0xa11d85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40d424}):_0x143215[_0xa11d85]=_0x40d424,ie=(_0x14492c,_0x2b7a57,_0x515b3a,_0x1e5748)=>{const _0x34b283=_0x17b82a;for(var _0x7ac608=_0x1e5748>0x1?void 0x0:_0x1e5748?oe(_0x2b7a57,_0x515b3a):_0x2b7a57,_0x29c895=_0x14492c[_0x34b283(0x109)]-0x1,_0x2acb9c;_0x29c895>=0x0;_0x29c895--)(_0x2acb9c=_0x14492c[_0x29c895])&&(_0x7ac608=_0x2acb9c(_0x7ac608)||_0x7ac608);return _0x7ac608;},w=(_0x73ddf8,_0x2e2ce9)=>(_0x326606,_0x41f52e)=>_0x2e2ce9(_0x326606,_0x41f52e,_0x73ddf8),$=(_0x20fb44,_0x3a98f1,_0x3d057b)=>ne(_0x20fb44,typeof _0x3a98f1!=_0x17b82a(0xe3)?_0x3a98f1+'':_0x3a98f1,_0x3d057b);let b=class extends _0x235c2b{constructor(_0xf7fdcd=M,_0x152b1f,_0xad410a){const _0x4108e=_0x17b82a;super(),this['_config']=_0xf7fdcd,this[_0x4108e(0xe1)]=_0x152b1f,this[_0x4108e(0x13e)]=_0xad410a;const {..._0x2e14f7}=_0x5886d2({},M,this[_0x4108e(0x122)]);this[_0x4108e(0x13e)][_0x4108e(0x12f)](z,_0x2e14f7);}['onStarting'](){const _0x1d298c=_0x17b82a;[[f],[g],[S]][_0x1d298c(0xff)](_0xc98e7e=>{const _0x119e64=_0x1d298c;this[_0x119e64(0xe1)][_0x119e64(0x12e)](_0xc98e7e);});}[_0x17b82a(0x112)](){const _0x45abec=_0x17b82a;this[_0x45abec(0xe1)][_0x45abec(0x12c)](g),this[_0x45abec(0xe1)]['get'](S);}};function _0x715e(_0x1869f7,_0x394278){const _0x352680=_0x3526();return _0x715e=function(_0x715e5a,_0x59550c){_0x715e5a=_0x715e5a-0xdb;let _0x2ef194=_0x352680[_0x715e5a];return _0x2ef194;},_0x715e(_0x1869f7,_0x394278);}$(b,'pluginName',W),$(b,_0x17b82a(0x107),_0x4c85bc[_0x17b82a(0x133)]),b=ie([_0x5b1abb(_0x21ed2e,_0x19e911,_0x219f24),w(0x1,_0x4128a6(_0x4d52d5)),w(0x2,_0x17181b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x15af(_0x1519cd,_0x2e06c6){const _0x1cb5e7=_0x1cb5();return _0x15af=function(_0x15af2c,_0x5d3c68){_0x15af2c=_0x15af2c-0x1a9;let _0x1ed7ba=_0x1cb5e7[_0x15af2c];return _0x1ed7ba;},_0x15af(_0x1519cd,_0x2e06c6);}const _0x5bf03e=_0x15af;(function(_0x345d13,_0x4eb6c8){const _0x59fd78=_0x15af,_0x2f5581=_0x345d13();while(!![]){try{const _0x55b865=-parseInt(_0x59fd78(0x1c4))/0x1*(parseInt(_0x59fd78(0x1e7))/0x2)+-parseInt(_0x59fd78(0x1f3))/0x3+-parseInt(_0x59fd78(0x1a9))/0x4+parseInt(_0x59fd78(0x201))/0x5+parseInt(_0x59fd78(0x1c5))/0x6+parseInt(_0x59fd78(0x1cb))/0x7+-parseInt(_0x59fd78(0x200))/0x8;if(_0x55b865===_0x4eb6c8)break;else _0x2f5581['push'](_0x2f5581['shift']());}catch(_0x2ee43f){_0x2f5581['push'](_0x2f5581['shift']());}}}(_0x1cb5,0xd6be2));import{CommentService as _0x210c37,CollaborationSessionService as _0x220e28,UniverCollaborationClientPlugin as _0x1095dd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf4a461}from'@univerjs-pro/license';function _0x1cb5(){const _0x2331af=['Delete','forEach','getUnit','/list','commentUpdate$','defineProperty','COMMENT','UNRECOGNIZED','rangeId','size','replies','replyId','length','1245212BggkpG','resolved','add','_commentService','YYYY/MM/DD\x20HH:mm','get','_threadCommentDataSource','_httpService','UNIVER_UNKNOWN','symbol','map','values','addUser','comment','onStarting','comments','type','thread-comment-data-source.config','onReady','Solve','dataSource','_threadCommentDataSourceService','OpenOrReOpen','userID','_configService','post','updateComment','527TOcWJj','8607570ErrZfg','body','threadId','ref','Edit','_userService','1768179MNmVAH','rangeType','reply','_injector','pluginName','_initUserSync','parse','user','_init','_initDataSource','unitId','/universer-api/comment/unit/','getComment','parentId','deleteComment','solved','/edit','format','root','find','users','getMemberID','syncUpdateMutationToColla','customRanges','slice','subscribe','delete','resolveComment','382nProKU','getOwnPropertyDescriptor','Solved','content','createTimestamp','filter','code','error','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','Unknown','4299519TCVrll','getCurrentUser','requireSession','_threadCommentModel','_config','Add','/add','saveCommentToSnapshot','addComment','stringify','_sessionService','Reply','/universer-api/user/list','795960EnqPlm','5685110mJsRJb'];_0x1cb5=function(){return _0x2331af;};return _0x1cb5();}import{dayjs as _0x2bfba6,UserManagerService as _0x48dccf,Inject as _0xc780c5,Injector as _0x394220,Disposable as _0x5da964,CustomRangeType as _0x1bd652,UniverInstanceType as _0x27d52f,DependentOn as _0x5b752f,IConfigService as _0x1aa97b,Plugin as _0x4175ae,merge as _0x29f660}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ce1e2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5208a,IThreadCommentDataSourceService as _0x51bd43}from'@univerjs/thread-comment';import{bufferTime as _0x3dce6d}from'rxjs';import{HTTPService as _0x2353b4}from'@univerjs/network';const W=_0x5bf03e(0x1f0);var I=(_0x244959=>(_0x244959[_0x244959[_0x5bf03e(0x1bf)]=0x0]=_0x5bf03e(0x1bf),_0x244959[_0x244959[_0x5bf03e(0x1e9)]=0x1]=_0x5bf03e(0x1e9),_0x244959[_0x244959[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0x244959))(I||{}),v=(_0xb1669d=>(_0xb1669d[_0xb1669d[_0x5bf03e(0x1f2)]=0x0]=_0x5bf03e(0x1f2),_0xb1669d[_0xb1669d[_0x5bf03e(0x1f8)]=0x1]=_0x5bf03e(0x1f8),_0xb1669d[_0xb1669d[_0x5bf03e(0x1fe)]=0x2]=_0x5bf03e(0x1fe),_0xb1669d[_0xb1669d[_0x5bf03e(0x1c9)]=0x3]='Edit',_0xb1669d[_0xb1669d[_0x5bf03e(0x202)]=0x4]=_0x5bf03e(0x202),_0xb1669d[_0xb1669d['Solve']=0x5]=_0x5bf03e(0x1bc),_0xb1669d[_0xb1669d[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0xb1669d))(v||{});const D=_0x38cee2=>_0x2bfba6(new Date(+_0x38cee2))[_0x5bf03e(0x1dc)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1cfc19,_0x25af0b)=>{const _0x5e5260=_0x5bf03e,_0x18d93e=_0x1cfc19['get'](_0x48dccf),_0x40ee04=_0x1cfc19[_0x5e5260(0x1ae)](_0x2353b4);_0x25af0b[_0x5e5260(0x203)](_0x36f700=>{const _0xfb8e08=_0x5e5260;_0x18d93e['getUser'](_0x36f700)&&_0x25af0b[_0xfb8e08(0x1e5)](_0x36f700);}),_0x25af0b[_0x5e5260(0x20b)]&&(await _0x40ee04[_0x5e5260(0x1ae)](_0x5e5260(0x1ff),{'params':{'userIDs':[..._0x25af0b]}}))[_0x5e5260(0x1c6)][_0x5e5260(0x1df)]['forEach'](_0x5e43f0=>{const _0x46243d=_0x5e5260;_0x5e43f0&&_0x18d93e[_0x46243d(0x1b5)](_0x5e43f0);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x20bdc8,_0x37d360,_0xde6f02,_0x1616e9)=>{const _0x108a23=_0x5bf03e;for(var _0x1c5c74=_0x1616e9>0x1?void 0x0:_0x1616e9?K(_0x37d360,_0xde6f02):_0x37d360,_0xca633a=_0x20bdc8[_0x108a23(0x20e)]-0x1,_0x25bd6d;_0xca633a>=0x0;_0xca633a--)(_0x25bd6d=_0x20bdc8[_0xca633a])&&(_0x1c5c74=_0x25bd6d(_0x1c5c74)||_0x1c5c74);return _0x1c5c74;},p=(_0x312205,_0x1ee512)=>(_0xaf8f32,_0x129af2)=>_0x1ee512(_0xaf8f32,_0x129af2,_0x312205);let S=class extends _0x5da964{constructor(_0x44a03a,_0x16edca,_0x39bc82,_0x4fa082){const _0x34bce1=_0x5bf03e;super(),this[_0x34bce1(0x1ac)]=_0x44a03a,this[_0x34bce1(0x1f6)]=_0x16edca,this['_userService']=_0x39bc82,this['_injector']=_0x4fa082,this[_0x34bce1(0x1d3)](),this[_0x34bce1(0x1d0)]();}[_0x5bf03e(0x1d0)](){const _0x341f6d=_0x5bf03e;this['disposeWithMe'](this[_0x341f6d(0x1f6)][_0x341f6d(0x206)]['pipe'](_0x3dce6d(0x10))[_0x341f6d(0x1e4)](_0x377ae3=>{const _0x5754f9=_0x341f6d,_0x20e697=new Set();_0x377ae3[_0x5754f9(0x203)](_0x5a7286=>{const _0x506def=_0x5754f9;switch(_0x5a7286['type']){case _0x506def(0x1ab):{const _0x5e3632=_0x5a7286['payload']['personId'];_0x20e697[_0x506def(0x1ab)](_0x5e3632);break;}}}),B(this[_0x5754f9(0x1ce)],_0x20e697);}));}['_init'](){const _0x5a4610=_0x5bf03e;this['disposeWithMe'](this[_0x5a4610(0x1ac)][_0x5a4610(0x206)][_0x5a4610(0x1e4)](async _0xf45214=>{const _0x33bb2e=_0x5a4610;var _0x2b852c,_0x50d7a9,_0x2a5ea1,_0x25fc25;const _0x38fe38=(_0x2b852c=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])[_0x33bb2e(0x1de)](_0x393a87=>_0x393a87['threadId']===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x2b852c[_0x33bb2e(0x1dd)];if(!_0x38fe38)return;const {unitId:_0x5e09ee,subUnitId:_0x31cb78}=_0x38fe38;switch(_0xf45214[_0x33bb2e(0x1d2)]&&this['_userService'][_0x33bb2e(0x1b5)](_0xf45214[_0x33bb2e(0x1d2)]),_0xf45214[_0x33bb2e(0x1b9)]){case v['Add']:break;case v[_0x33bb2e(0x1fe)]:{this[_0x33bb2e(0x1f6)]['addComment'](_0x5e09ee,_0x31cb78,{'unitId':_0x5e09ee,'subUnitId':_0x31cb78,'ref':'','id':_0xf45214[_0x33bb2e(0x20d)],'dT':D(+_0xf45214[_0x33bb2e(0x1eb)]),'threadId':_0xf45214[_0x33bb2e(0x1c7)],'personId':(_0x2a5ea1=(_0x50d7a9=_0xf45214['user'])==null?void 0x0:_0x50d7a9[_0x33bb2e(0x1c0)])!=null?_0x2a5ea1:_0xf45214[_0x33bb2e(0x1ef)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)]),'parentId':_0x38fe38['id']});break;}case v[_0x33bb2e(0x202)]:{const _0x73e2cd=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d7)](_0x5e09ee,_0x31cb78,_0xf45214['replyId']);_0x73e2cd&&_0x73e2cd[_0x33bb2e(0x1d8)]&&this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d9)](_0x5e09ee,_0x31cb78,_0xf45214[_0x33bb2e(0x20d)]);break;}case v[_0x33bb2e(0x1c9)]:{this['_threadCommentModel'][_0x33bb2e(0x1c3)](_0x5e09ee,_0x31cb78,{'commentId':_0xf45214[_0x33bb2e(0x20d)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)])});break;}case v['Solve']:{const _0x586f1c=(_0x25fc25=this['_threadCommentModel'][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])['find'](_0x47b0ba=>_0x47b0ba[_0x33bb2e(0x1c7)]===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x25fc25[_0x33bb2e(0x1dd)];_0x586f1c&&this[_0x33bb2e(0x1f6)]['resolveComment'](_0x5e09ee,_0x31cb78,_0x586f1c['id'],_0xf45214[_0x33bb2e(0x1da)]===I[_0x33bb2e(0x1e9)]);break;}}}));}};S=V([p(0x0,_0xc780c5(_0x210c37)),p(0x1,_0xc780c5(_0x5208a)),p(0x2,_0xc780c5(_0x48dccf)),p(0x3,_0xc780c5(_0x394220))],S);const z=_0x5bf03e(0x1ba),M={};var k=Object[_0x5bf03e(0x1e8)],Q=(_0x327b80,_0x56553b,_0x4eda03,_0x4db94d)=>{const _0x2bef10=_0x5bf03e;for(var _0x5c7386=_0x4db94d>0x1?void 0x0:_0x4db94d?k(_0x56553b,_0x4eda03):_0x56553b,_0x1f6ea3=_0x327b80[_0x2bef10(0x20e)]-0x1,_0x4c936b;_0x1f6ea3>=0x0;_0x1f6ea3--)(_0x4c936b=_0x327b80[_0x1f6ea3])&&(_0x5c7386=_0x4c936b(_0x5c7386)||_0x5c7386);return _0x5c7386;},_=(_0x388db6,_0x22d905)=>(_0xd30b02,_0x393e89)=>_0x22d905(_0xd30b02,_0x393e89,_0x388db6);function X(_0x29e57f,_0x5ae59b){const _0xf84ef1=_0x5bf03e,_0x592c0f=_0x29e57f[_0xf84ef1(0x20c)][0x0];return{..._0x5ae59b,'id':_0x592c0f[_0xf84ef1(0x20d)],'resolved':_0x29e57f[_0xf84ef1(0x1da)]===0x1,'dT':D(_0x592c0f[_0xf84ef1(0x1eb)]),'personId':_0x592c0f[_0xf84ef1(0x1ef)],'threadId':_0x592c0f['threadId']};}function ee(_0x35f872,_0x29cbcc,_0x45bad0){const _0x353495=_0x5bf03e;var _0x555605,_0x1df5ef;if(((_0x1df5ef=(_0x555605=_0x35f872==null?void 0x0:_0x35f872[_0x353495(0x20c)])==null?void 0x0:_0x555605[_0x353495(0x20e)])!=null?_0x1df5ef:0x0)>0x0){const _0x32af3f=(_0x475295,_0x4b3bc0)=>({'id':_0x475295[_0x353495(0x20d)],'threadId':_0x475295[_0x353495(0x1c7)],'dT':D(_0x475295[_0x353495(0x1eb)]),'personId':_0x475295[_0x353495(0x1ef)],'resolved':_0x35f872[_0x353495(0x1da)]===I[_0x353495(0x1e9)],'unitId':_0x29cbcc,'subUnitId':_0x45bad0,'text':JSON[_0x353495(0x1d1)](_0x475295[_0x353495(0x1ea)]),'parentId':_0x4b3bc0}),_0x1d4391=_0x32af3f(_0x35f872[_0x353495(0x20c)][0x0]);return{..._0x1d4391,'children':_0x35f872[_0x353495(0x20c)][_0x353495(0x1e3)](0x1)['map'](_0x18a175=>_0x32af3f(_0x18a175,_0x1d4391['id']))};}return null;}let f=class{constructor(_0x53f406,_0x1d89ff,_0xeb5d11,_0x1b3914){const _0x5a8022=_0x5bf03e;this['_httpService']=_0x53f406,this[_0x5a8022(0x1ca)]=_0x1d89ff,this[_0x5a8022(0x1fd)]=_0xeb5d11,this[_0x5a8022(0x1ce)]=_0x1b3914;}async[_0x5bf03e(0x1fb)](_0x4b7126){const _0x3324f2=_0x5bf03e;var _0x2c0177,_0x2c9e64;const {parentId:_0xea5e6c,unitId:_0x1ab178,text:_0x55e48e,threadId:_0xcd0d4b}=_0x4b7126,_0x5a6654=(_0x2c9e64=(_0x2c0177=_0x55e48e[_0x3324f2(0x1e2)])==null?void 0x0:_0x2c0177[_0x3324f2(0x1ec)](_0x169a59=>_0x169a59[_0x3324f2(0x1cc)]===_0x1bd652['COMMENT'])[_0x3324f2(0x1b3)](_0x384d59=>_0x384d59[_0x3324f2(0x20a)]))!=null?_0x2c9e64:[],_0x3656ee=JSON[_0x3324f2(0x1fc)](_0x55e48e),_0x555e36=(await this['_sessionService'][_0x3324f2(0x1f5)](_0x1ab178))[_0x3324f2(0x1e0)]();if(_0xea5e6c){const _0x1c3ed8={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654,'threadId':_0xcd0d4b},_0x57dbb7=(await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+'/reply',{'body':_0x1c3ed8}))[_0x3324f2(0x1c6)][_0x3324f2(0x1cd)];return{..._0x4b7126,'id':_0x57dbb7[_0x3324f2(0x20d)],'dT':_0x2bfba6(+_0x57dbb7[_0x3324f2(0x1eb)])[_0x3324f2(0x1dc)](_0x3324f2(0x1ad)),'personId':_0x57dbb7[_0x3324f2(0x1ef)]};}else{const _0x1f4c66={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654},_0x51d893=await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+_0x3324f2(0x1f9),{'body':_0x1f4c66});return X(_0x51d893['body'][_0x3324f2(0x1b6)],_0x4b7126);}}async[_0x5bf03e(0x1c3)](_0xa79ba){const _0x194343=_0x5bf03e;var _0x4f9d1a,_0x2c822c;const {text:_0x30482c,unitId:_0x491b2f}=_0xa79ba,_0x41775d=(_0x2c822c=(_0x4f9d1a=_0x30482c['customRanges'])==null?void 0x0:_0x4f9d1a['filter'](_0xd7bd87=>_0xd7bd87[_0x194343(0x1cc)]===_0x1bd652[_0x194343(0x208)])[_0x194343(0x1b3)](_0x45f868=>_0x45f868[_0x194343(0x20a)]))!=null?_0x2c822c:[],_0x39bcb6=JSON[_0x194343(0x1fc)](_0x30482c),_0x107c06=_0xa79ba[_0x194343(0x1c7)],_0x48c58b=_0xa79ba['id'],_0x14bea9={'memberId':(await this[_0x194343(0x1fd)][_0x194343(0x1f5)](_0x491b2f))[_0x194343(0x1e0)](),'unitId':_0x491b2f,'threadId':_0x107c06,'mention':_0x41775d,'content':_0x39bcb6,'replyId':_0x48c58b},_0x2f1b2e=await this['_httpService'][_0x194343(0x1c2)]('/universer-api/comment/unit/'+_0x491b2f+_0x194343(0x1db),{'body':_0x14bea9});return!_0x2f1b2e['body'][_0x194343(0x1ee)]||_0x2f1b2e['body'][_0x194343(0x1ee)][_0x194343(0x1ed)]===0x1;}async[_0x5bf03e(0x1e6)](_0x19380d){const _0x4c2e14=_0x5bf03e,{unitId:_0x226eb3}=_0x19380d,_0x220999=_0x19380d[_0x4c2e14(0x1c7)],_0x869398={'memberId':this['_userService'][_0x4c2e14(0x1f4)]()[_0x4c2e14(0x1c0)],'unitId':_0x226eb3,'threadId':_0x220999,'solved':_0x19380d[_0x4c2e14(0x1aa)]?I[_0x4c2e14(0x1e9)]:I[_0x4c2e14(0x1bf)]},_0x3f3afb=await this[_0x4c2e14(0x1b0)][_0x4c2e14(0x1c2)](_0x4c2e14(0x1d6)+_0x226eb3+'/solved',{'body':_0x869398});return!_0x3f3afb[_0x4c2e14(0x1c6)][_0x4c2e14(0x1ee)]||_0x3f3afb[_0x4c2e14(0x1c6)]['error']['code']===0x1;}async['deleteComment'](_0x1d1fed,_0x5b24c0,_0x458bf2,_0x37a8d6){const _0x5e448e=_0x5bf03e,_0x4a0dd0={'memberId':(await this[_0x5e448e(0x1fd)]['requireSession'](_0x1d1fed))['getMemberID'](),'threadId':_0x458bf2,'replyId':_0x37a8d6,'unitId':_0x1d1fed},_0x48b2c7=await this[_0x5e448e(0x1b0)][_0x5e448e(0x1c2)](_0x5e448e(0x1d6)+_0x1d1fed+_0x5e448e(0x1f1),{'body':_0x4a0dd0});return!_0x48b2c7['body'][_0x5e448e(0x1ee)]||_0x48b2c7[_0x5e448e(0x1c6)]['error'][_0x5e448e(0x1ed)]===0x1;}async['listComments'](_0x283833,_0x229f4a,_0x449010){const _0x3e6ed4=_0x5bf03e,_0x469d54={'unitId':_0x283833,'threadId':_0x449010},_0x3b84a4=await this[_0x3e6ed4(0x1b0)][_0x3e6ed4(0x1c2)](_0x3e6ed4(0x1d6)+_0x283833+_0x3e6ed4(0x205),{'body':_0x469d54}),_0x4b2575=_0x449010[_0x3e6ed4(0x1b3)](_0x3b38f6=>ee(_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1b8)][_0x3b38f6],_0x283833,_0x229f4a))[_0x3e6ed4(0x1ec)](Boolean);return Object[_0x3e6ed4(0x1b4)](_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1df)])[_0x3e6ed4(0x203)](_0x4dd442=>{const _0x28239b=_0x3e6ed4;this['_userService'][_0x28239b(0x1b5)](_0x4dd442);}),_0x4b2575;}[_0x5bf03e(0x1fa)](_0x4faf28){const _0x4e2ed0=_0x5bf03e;return{'id':_0x4faf28['id'],'threadId':_0x4faf28['threadId'],'ref':_0x4faf28[_0x4e2ed0(0x1c8)]};}};f=Q([_(0x0,_0xc780c5(_0x2353b4)),_(0x1,_0xc780c5(_0x48dccf)),_(0x2,_0xc780c5(_0x220e28)),_(0x3,_0xc780c5(_0x394220))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2fdda9,_0xfef264,_0x9014a5,_0x33ac1e)=>{const _0x35d59d=_0x5bf03e;for(var _0x78004f=_0x33ac1e>0x1?void 0x0:_0x33ac1e?re(_0xfef264,_0x9014a5):_0xfef264,_0x3ceeaf=_0x2fdda9[_0x35d59d(0x20e)]-0x1,_0x4416f8;_0x3ceeaf>=0x0;_0x3ceeaf--)(_0x4416f8=_0x2fdda9[_0x3ceeaf])&&(_0x78004f=_0x4416f8(_0x78004f)||_0x78004f);return _0x78004f;},N=(_0x26ff3f,_0x24cc19)=>(_0xbb7509,_0x34b1af)=>_0x24cc19(_0xbb7509,_0x34b1af,_0x26ff3f);let g=class extends _0x5da964{constructor(_0x2f98bf,_0x5d88e1){const _0x4520be=_0x5bf03e;super(),this[_0x4520be(0x1be)]=_0x2f98bf,this[_0x4520be(0x1af)]=_0x5d88e1,this['_initDataSource']();}[_0x5bf03e(0x1d4)](){const _0xe3c2a1=_0x5bf03e;this[_0xe3c2a1(0x1be)][_0xe3c2a1(0x1bd)]=this[_0xe3c2a1(0x1af)],this['_threadCommentDataSourceService'][_0xe3c2a1(0x1e1)]=!0x1;}};g=te([N(0x0,_0x51bd43),N(0x1,_0xc780c5(f))],g);var se=Object[_0x5bf03e(0x207)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xeed73c,_0x2f4b7e,_0x577f20)=>_0x2f4b7e in _0xeed73c?se(_0xeed73c,_0x2f4b7e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x577f20}):_0xeed73c[_0x2f4b7e]=_0x577f20,ie=(_0x56191b,_0x3fcbe9,_0x212778,_0x54c9d2)=>{const _0x580589=_0x5bf03e;for(var _0x20f033=_0x54c9d2>0x1?void 0x0:_0x54c9d2?oe(_0x3fcbe9,_0x212778):_0x3fcbe9,_0x44d354=_0x56191b[_0x580589(0x20e)]-0x1,_0x1a87bd;_0x44d354>=0x0;_0x44d354--)(_0x1a87bd=_0x56191b[_0x44d354])&&(_0x20f033=_0x1a87bd(_0x20f033)||_0x20f033);return _0x20f033;},w=(_0x47190c,_0x3b3699)=>(_0x37fba2,_0x5ef8e4)=>_0x3b3699(_0x37fba2,_0x5ef8e4,_0x47190c),$=(_0x17ba0b,_0x3c483f,_0x13ed47)=>ne(_0x17ba0b,typeof _0x3c483f!=_0x5bf03e(0x1b2)?_0x3c483f+'':_0x3c483f,_0x13ed47);let b=class extends _0x4175ae{constructor(_0x13bf0e=M,_0x341dc6,_0x22d683){const _0x4a18fa=_0x5bf03e;super(),this['_config']=_0x13bf0e,this[_0x4a18fa(0x1ce)]=_0x341dc6,this[_0x4a18fa(0x1c1)]=_0x22d683;const {..._0x5516d0}=_0x29f660({},M,this[_0x4a18fa(0x1f7)]);this[_0x4a18fa(0x1c1)]['setConfig'](z,_0x5516d0);}[_0x5bf03e(0x1b7)](){const _0x35f776=_0x5bf03e;[[f],[g],[S]][_0x35f776(0x203)](_0x1b919b=>{const _0x2d9448=_0x35f776;this[_0x2d9448(0x1ce)][_0x2d9448(0x1ab)](_0x1b919b);});}[_0x5bf03e(0x1bb)](){const _0x2396ab=_0x5bf03e;this['_injector'][_0x2396ab(0x1ae)](g),this[_0x2396ab(0x1ce)][_0x2396ab(0x1ae)](S);}};$(b,_0x5bf03e(0x1cf),W),$(b,'type',_0x27d52f[_0x5bf03e(0x1b1)]),b=ie([_0x5b752f(_0x1ce1e2,_0x1095dd,_0xf4a461),w(0x1,_0xc780c5(_0x394220)),w(0x2,_0x1aa97b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3d7f(_0x2b9b9f,_0x5755f0){const _0x4815b8=_0x4815();return _0x3d7f=function(_0x3d7ffc,_0x13ee08){_0x3d7ffc=_0x3d7ffc-0x1b1;let _0x497f36=_0x4815b8[_0x3d7ffc];return _0x497f36;},_0x3d7f(_0x2b9b9f,_0x5755f0);}(function(_0x26b3a1,_0x4f1513){const _0x142b9c=_0x3d7f,_0x1cb5e9=_0x26b3a1();while(!![]){try{const _0x42234f=-parseInt(_0x142b9c(0x1cc))/0x1*(parseInt(_0x142b9c(0x1bb))/0x2)+parseInt(_0x142b9c(0x211))/0x3*(-parseInt(_0x142b9c(0x1dc))/0x4)+parseInt(_0x142b9c(0x20c))/0x5*(parseInt(_0x142b9c(0x232))/0x6)+-parseInt(_0x142b9c(0x1df))/0x7+parseInt(_0x142b9c(0x1f3))/0x8+parseInt(_0x142b9c(0x1b7))/0x9+-parseInt(_0x142b9c(0x1f9))/0xa*(parseInt(_0x142b9c(0x1ce))/0xb);if(_0x42234f===_0x4f1513)break;else _0x1cb5e9['push'](_0x1cb5e9['shift']());}catch(_0x2d272b){_0x1cb5e9['push'](_0x1cb5e9['shift']());}}}(_0x4815,0xc5348),function(_0x892da8,_0x4f7f2c){const _0x30e703=_0x3d7f;typeof exports==_0x30e703(0x1c9)&&typeof module<'u'?_0x4f7f2c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x30e703(0x1ea)&&define[_0x30e703(0x1ef)]?define([_0x30e703(0x1b5),_0x30e703(0x230),_0x30e703(0x20a),_0x30e703(0x206),_0x30e703(0x1ff),'@univerjs/thread-comment',_0x30e703(0x21d),'@univerjs/network'],_0x4f7f2c):(_0x892da8=typeof globalThis<'u'?globalThis:_0x892da8||self,_0x4f7f2c(_0x892da8['UniverProThreadCommentDatasource']={},_0x892da8[_0x30e703(0x236)],_0x892da8[_0x30e703(0x1fa)],_0x892da8[_0x30e703(0x234)],_0x892da8[_0x30e703(0x215)],_0x892da8['UniverThreadComment'],_0x892da8[_0x30e703(0x21d)],_0x892da8['UniverNetwork']));}(this,function(_0x60b3fd,_0x6e9407,_0x34bfcd,_0xa28331,_0x41e30c,_0x38a43b,_0x1087b2,_0x54e878){'use strict';const _0x582b18=_0x3d7f;const _0x7ff09c=_0x582b18(0x1ee);var _0x2fd73b=(_0x3a1ecf=>(_0x3a1ecf[_0x3a1ecf[_0x582b18(0x202)]=0x0]=_0x582b18(0x202),_0x3a1ecf[_0x3a1ecf[_0x582b18(0x1ca)]=0x1]=_0x582b18(0x1ca),_0x3a1ecf[_0x3a1ecf[_0x582b18(0x1da)]=-0x1]=_0x582b18(0x1da),_0x3a1ecf))(_0x2fd73b||{}),_0xb79733=(_0x5d822b=>(_0x5d822b[_0x5d822b[_0x582b18(0x1ed)]=0x0]='Unknown',_0x5d822b[_0x5d822b['Add']=0x1]='Add',_0x5d822b[_0x5d822b['Reply']=0x2]='Reply',_0x5d822b[_0x5d822b[_0x582b18(0x20e)]=0x3]=_0x582b18(0x20e),_0x5d822b[_0x5d822b[_0x582b18(0x1d4)]=0x4]=_0x582b18(0x1d4),_0x5d822b[_0x5d822b[_0x582b18(0x1d7)]=0x5]='Solve',_0x5d822b[_0x5d822b[_0x582b18(0x1da)]=-0x1]=_0x582b18(0x1da),_0x5d822b))(_0xb79733||{});const _0x37eb6c=_0x5b84b4=>_0xa28331[_0x582b18(0x22d)](new Date(+_0x5b84b4))[_0x582b18(0x1d2)](_0x582b18(0x1d5)),_0x415ebf=async(_0x2e0899,_0x77408c)=>{const _0xb2c134=_0x582b18,_0xc52bb8=_0x2e0899['get'](_0xa28331['UserManagerService']),_0x18a4ff=_0x2e0899['get'](_0x54e878[_0xb2c134(0x1bc)]);_0x77408c[_0xb2c134(0x218)](_0x565c6d=>{const _0x3e9ac5=_0xb2c134;_0xc52bb8[_0x3e9ac5(0x20b)](_0x565c6d)&&_0x77408c[_0x3e9ac5(0x1b9)](_0x565c6d);}),_0x77408c[_0xb2c134(0x1f5)]&&(await _0x18a4ff[_0xb2c134(0x223)]('/universer-api/user/list',{'params':{'userIDs':[..._0x77408c]}}))[_0xb2c134(0x21b)][_0xb2c134(0x1b2)][_0xb2c134(0x218)](_0x34d416=>{_0x34d416&&_0xc52bb8['addUser'](_0x34d416);});};var _0x3db9ed=Object[_0x582b18(0x23a)],_0x4ba6dd=(_0x39f761,_0x20b5bc,_0x172774,_0x26c5ef)=>{const _0x3cf95d=_0x582b18;for(var _0x1612d5=_0x26c5ef>0x1?void 0x0:_0x26c5ef?_0x3db9ed(_0x20b5bc,_0x172774):_0x20b5bc,_0x553b3c=_0x39f761[_0x3cf95d(0x212)]-0x1,_0x3ef59a;_0x553b3c>=0x0;_0x553b3c--)(_0x3ef59a=_0x39f761[_0x553b3c])&&(_0x1612d5=_0x3ef59a(_0x1612d5)||_0x1612d5);return _0x1612d5;},_0x13d6dd=(_0x4747bd,_0x3f2a5f)=>(_0x5d861b,_0x51a2d1)=>_0x3f2a5f(_0x5d861b,_0x51a2d1,_0x4747bd);let _0xed5d36=class extends _0xa28331[_0x582b18(0x1cb)]{constructor(_0x685724,_0x33a134,_0x4d0d39,_0x4fbfbd){const _0x541843=_0x582b18;super(),this['_commentService']=_0x685724,this[_0x541843(0x1e5)]=_0x33a134,this['_userService']=_0x4d0d39,this[_0x541843(0x1fb)]=_0x4fbfbd,this[_0x541843(0x1c4)](),this[_0x541843(0x22f)]();}[_0x582b18(0x22f)](){const _0x2e0ef8=_0x582b18;this['disposeWithMe'](this[_0x2e0ef8(0x1e5)][_0x2e0ef8(0x20f)][_0x2e0ef8(0x23b)](_0x1087b2[_0x2e0ef8(0x1bd)](0x10))[_0x2e0ef8(0x228)](_0x2e97e1=>{const _0x5977ba=_0x2e0ef8,_0x243945=new Set();_0x2e97e1[_0x5977ba(0x218)](_0x383534=>{const _0x29572b=_0x5977ba;switch(_0x383534[_0x29572b(0x1d6)]){case _0x29572b(0x220):{const _0x2529ab=_0x383534[_0x29572b(0x1be)]['personId'];_0x243945[_0x29572b(0x220)](_0x2529ab);break;}}}),_0x415ebf(this['_injector'],_0x243945);}));}[_0x582b18(0x1c4)](){const _0xe80763=_0x582b18;this[_0xe80763(0x1cd)](this[_0xe80763(0x1f6)][_0xe80763(0x20f)][_0xe80763(0x228)](async _0x3a6ba5=>{const _0x326ef8=_0xe80763;var _0x5b7b08,_0x7e7f59,_0x4d4fc5,_0x242622;const _0x482a61=(_0x5b7b08=this[_0x326ef8(0x1e5)]['getUnit'](_0x3a6ba5[_0x326ef8(0x204)])[_0x326ef8(0x201)](_0x5cc4ed=>_0x5cc4ed[_0x326ef8(0x1fd)]===_0x3a6ba5[_0x326ef8(0x1fd)]))==null?void 0x0:_0x5b7b08['root'];if(!_0x482a61)return;const {unitId:_0x36f029,subUnitId:_0xff0c7d}=_0x482a61;switch(_0x3a6ba5['user']&&this['_userService'][_0x326ef8(0x21e)](_0x3a6ba5['user']),_0x3a6ba5[_0x326ef8(0x1d6)]){case _0xb79733[_0x326ef8(0x1c0)]:break;case _0xb79733[_0x326ef8(0x200)]:{this[_0x326ef8(0x1e5)][_0x326ef8(0x205)](_0x36f029,_0xff0c7d,{'unitId':_0x36f029,'subUnitId':_0xff0c7d,'ref':'','id':_0x3a6ba5['replyId'],'dT':_0x37eb6c(+_0x3a6ba5['createTimestamp']),'threadId':_0x3a6ba5['threadId'],'personId':(_0x4d4fc5=(_0x7e7f59=_0x3a6ba5['user'])==null?void 0x0:_0x7e7f59[_0x326ef8(0x225)])!=null?_0x4d4fc5:_0x3a6ba5[_0x326ef8(0x22a)],'text':JSON[_0x326ef8(0x1bf)](_0x3a6ba5[_0x326ef8(0x1ec)]),'parentId':_0x482a61['id']});break;}case _0xb79733[_0x326ef8(0x1d4)]:{const _0x1d547f=this[_0x326ef8(0x1e5)]['getComment'](_0x36f029,_0xff0c7d,_0x3a6ba5[_0x326ef8(0x1c5)]);_0x1d547f&&_0x1d547f['parentId']&&this[_0x326ef8(0x1e5)][_0x326ef8(0x1c1)](_0x36f029,_0xff0c7d,_0x3a6ba5[_0x326ef8(0x1c5)]);break;}case _0xb79733['Edit']:{this['_threadCommentModel']['updateComment'](_0x36f029,_0xff0c7d,{'commentId':_0x3a6ba5['replyId'],'text':JSON[_0x326ef8(0x1bf)](_0x3a6ba5['content'])});break;}case _0xb79733[_0x326ef8(0x1d7)]:{const _0x2f59dc=(_0x242622=this[_0x326ef8(0x1e5)][_0x326ef8(0x1e8)](_0x3a6ba5[_0x326ef8(0x204)])[_0x326ef8(0x201)](_0x429ca4=>_0x429ca4[_0x326ef8(0x1fd)]===_0x3a6ba5[_0x326ef8(0x1fd)]))==null?void 0x0:_0x242622[_0x326ef8(0x22c)];_0x2f59dc&&this[_0x326ef8(0x1e5)]['resolveComment'](_0x36f029,_0xff0c7d,_0x2f59dc['id'],_0x3a6ba5[_0x326ef8(0x20d)]===_0x2fd73b[_0x326ef8(0x1ca)]);break;}}}));}};_0xed5d36=_0x4ba6dd([_0x13d6dd(0x0,_0xa28331[_0x582b18(0x1c2)](_0x6e9407[_0x582b18(0x1b4)])),_0x13d6dd(0x1,_0xa28331[_0x582b18(0x1c2)](_0x38a43b['ThreadCommentModel'])),_0x13d6dd(0x2,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x1c3)])),_0x13d6dd(0x3,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x233)]))],_0xed5d36);const _0x568bed=_0x582b18(0x1b3),_0x24add3={};var _0x55ec85=Object['getOwnPropertyDescriptor'],_0xec324c=(_0x2b1e4b,_0x3219fc,_0x178f6f,_0x58074a)=>{for(var _0x497c45=_0x58074a>0x1?void 0x0:_0x58074a?_0x55ec85(_0x3219fc,_0x178f6f):_0x3219fc,_0x423a66=_0x2b1e4b['length']-0x1,_0x2f9857;_0x423a66>=0x0;_0x423a66--)(_0x2f9857=_0x2b1e4b[_0x423a66])&&(_0x497c45=_0x2f9857(_0x497c45)||_0x497c45);return _0x497c45;},_0x204198=(_0x243425,_0x5921c9)=>(_0xc6f15,_0x4539c4)=>_0x5921c9(_0xc6f15,_0x4539c4,_0x243425);function _0x532c2d(_0x37a0b4,_0x20c245){const _0x26d4cc=_0x582b18,_0x1597a8=_0x37a0b4['replies'][0x0];return{..._0x20c245,'id':_0x1597a8[_0x26d4cc(0x1c5)],'resolved':_0x37a0b4[_0x26d4cc(0x20d)]===0x1,'dT':_0x37eb6c(_0x1597a8[_0x26d4cc(0x1f4)]),'personId':_0x1597a8['userId'],'threadId':_0x1597a8[_0x26d4cc(0x1fd)]};}function _0x348e21(_0x17568f,_0x18536f,_0x3d2bb7){const _0x290365=_0x582b18;var _0x468a8e,_0x4235e1;if(((_0x4235e1=(_0x468a8e=_0x17568f==null?void 0x0:_0x17568f[_0x290365(0x1cf)])==null?void 0x0:_0x468a8e[_0x290365(0x212)])!=null?_0x4235e1:0x0)>0x0){const _0x30abfa=(_0x5aaf8f,_0xdd7716)=>({'id':_0x5aaf8f['replyId'],'threadId':_0x5aaf8f[_0x290365(0x1fd)],'dT':_0x37eb6c(_0x5aaf8f[_0x290365(0x1f4)]),'personId':_0x5aaf8f[_0x290365(0x22a)],'resolved':_0x17568f[_0x290365(0x20d)]===_0x2fd73b[_0x290365(0x1ca)],'unitId':_0x18536f,'subUnitId':_0x3d2bb7,'text':JSON[_0x290365(0x1bf)](_0x5aaf8f['content']),'parentId':_0xdd7716}),_0x4f282e=_0x30abfa(_0x17568f['replies'][0x0]);return{..._0x4f282e,'children':_0x17568f[_0x290365(0x1cf)][_0x290365(0x1e0)](0x1)[_0x290365(0x1db)](_0x570ffa=>_0x30abfa(_0x570ffa,_0x4f282e['id']))};}return null;}let _0x16cc64=class{constructor(_0x5acc71,_0x168d49,_0xbe40e7,_0x22def6){const _0x326cd8=_0x582b18;this[_0x326cd8(0x1b6)]=_0x5acc71,this['_userService']=_0x168d49,this[_0x326cd8(0x1dd)]=_0xbe40e7,this[_0x326cd8(0x1fb)]=_0x22def6;}async[_0x582b18(0x205)](_0x399dcf){const _0x16740d=_0x582b18;var _0x497a80,_0x7b8c82;const {parentId:_0x46461e,unitId:_0x3a7723,text:_0x6b7c5,threadId:_0x1abed4}=_0x399dcf,_0x265dec=(_0x7b8c82=(_0x497a80=_0x6b7c5[_0x16740d(0x229)])==null?void 0x0:_0x497a80['filter'](_0x29e71c=>_0x29e71c['rangeType']===_0xa28331[_0x16740d(0x1b8)][_0x16740d(0x226)])[_0x16740d(0x1db)](_0x50a7bd=>_0x50a7bd['rangeId']))!=null?_0x7b8c82:[],_0x1df9f9=JSON['stringify'](_0x6b7c5),_0x2a0171=(await this[_0x16740d(0x1dd)]['requireSession'](_0x3a7723))['getMemberID']();if(_0x46461e){const _0x4273dd={'memberId':_0x2a0171,'unitId':_0x3a7723,'content':_0x1df9f9,'mention':_0x265dec,'threadId':_0x1abed4},_0x2042c9=(await this[_0x16740d(0x1b6)]['post'](_0x16740d(0x1eb)+_0x3a7723+'/reply',{'body':_0x4273dd}))[_0x16740d(0x21b)][_0x16740d(0x214)];return{..._0x399dcf,'id':_0x2042c9[_0x16740d(0x1c5)],'dT':_0xa28331['dayjs'](+_0x2042c9[_0x16740d(0x1f4)])[_0x16740d(0x1d2)](_0x16740d(0x1d5)),'personId':_0x2042c9[_0x16740d(0x22a)]};}else{const _0x146224={'memberId':_0x2a0171,'unitId':_0x3a7723,'content':_0x1df9f9,'mention':_0x265dec},_0x4412ac=await this[_0x16740d(0x1b6)]['post'](_0x16740d(0x1eb)+_0x3a7723+_0x16740d(0x1c6),{'body':_0x146224});return _0x532c2d(_0x4412ac[_0x16740d(0x21b)][_0x16740d(0x237)],_0x399dcf);}}async[_0x582b18(0x210)](_0x32bf14){const _0xa2c1e2=_0x582b18;var _0x448d8f,_0x320f30;const {text:_0x5eaaba,unitId:_0x4db669}=_0x32bf14,_0x291649=(_0x320f30=(_0x448d8f=_0x5eaaba[_0xa2c1e2(0x229)])==null?void 0x0:_0x448d8f[_0xa2c1e2(0x22b)](_0x155073=>_0x155073[_0xa2c1e2(0x216)]===_0xa28331['CustomRangeType'][_0xa2c1e2(0x226)])[_0xa2c1e2(0x1db)](_0x553ccf=>_0x553ccf[_0xa2c1e2(0x1de)]))!=null?_0x320f30:[],_0x35268c=JSON[_0xa2c1e2(0x1e7)](_0x5eaaba),_0x38a2b4=_0x32bf14[_0xa2c1e2(0x1fd)],_0x1d7fdd=_0x32bf14['id'],_0xddac34={'memberId':(await this[_0xa2c1e2(0x1dd)][_0xa2c1e2(0x227)](_0x4db669))[_0xa2c1e2(0x222)](),'unitId':_0x4db669,'threadId':_0x38a2b4,'mention':_0x291649,'content':_0x35268c,'replyId':_0x1d7fdd},_0x6269f2=await this[_0xa2c1e2(0x1b6)][_0xa2c1e2(0x239)]('/universer-api/comment/unit/'+_0x4db669+_0xa2c1e2(0x1e3),{'body':_0xddac34});return!_0x6269f2[_0xa2c1e2(0x21b)][_0xa2c1e2(0x1ba)]||_0x6269f2[_0xa2c1e2(0x21b)][_0xa2c1e2(0x1ba)][_0xa2c1e2(0x22e)]===0x1;}async[_0x582b18(0x1f8)](_0x1b9469){const _0x4b1f01=_0x582b18,{unitId:_0xfe1560}=_0x1b9469,_0x1c68ae=_0x1b9469['threadId'],_0xc7ef6c={'memberId':this[_0x4b1f01(0x1fe)][_0x4b1f01(0x21a)]()[_0x4b1f01(0x225)],'unitId':_0xfe1560,'threadId':_0x1c68ae,'solved':_0x1b9469[_0x4b1f01(0x209)]?_0x2fd73b[_0x4b1f01(0x1ca)]:_0x2fd73b[_0x4b1f01(0x202)]},_0x475d0e=await this['_httpService'][_0x4b1f01(0x239)](_0x4b1f01(0x1eb)+_0xfe1560+_0x4b1f01(0x208),{'body':_0xc7ef6c});return!_0x475d0e[_0x4b1f01(0x21b)]['error']||_0x475d0e[_0x4b1f01(0x21b)][_0x4b1f01(0x1ba)][_0x4b1f01(0x22e)]===0x1;}async['deleteComment'](_0x133e3f,_0x23cc2d,_0x3dc67d,_0x409045){const _0x20d244=_0x582b18,_0x2b88e6={'memberId':(await this[_0x20d244(0x1dd)][_0x20d244(0x227)](_0x133e3f))[_0x20d244(0x222)](),'threadId':_0x3dc67d,'replyId':_0x409045,'unitId':_0x133e3f},_0x4873f8=await this[_0x20d244(0x1b6)][_0x20d244(0x239)]('/universer-api/comment/unit/'+_0x133e3f+_0x20d244(0x224),{'body':_0x2b88e6});return!_0x4873f8[_0x20d244(0x21b)][_0x20d244(0x1ba)]||_0x4873f8['body'][_0x20d244(0x1ba)][_0x20d244(0x22e)]===0x1;}async[_0x582b18(0x1f2)](_0xb9e6d0,_0x2fce59,_0x28929e){const _0x32558d=_0x582b18,_0x491124={'unitId':_0xb9e6d0,'threadId':_0x28929e},_0x32a2cc=await this['_httpService'][_0x32558d(0x239)](_0x32558d(0x1eb)+_0xb9e6d0+_0x32558d(0x21c),{'body':_0x491124}),_0x4e2096=_0x28929e[_0x32558d(0x1db)](_0x4e6a7d=>_0x348e21(_0x32a2cc[_0x32558d(0x21b)][_0x32558d(0x1f0)][_0x4e6a7d],_0xb9e6d0,_0x2fce59))[_0x32558d(0x22b)](Boolean);return Object[_0x32558d(0x1c7)](_0x32a2cc[_0x32558d(0x21b)][_0x32558d(0x1b2)])['forEach'](_0x427ded=>{const _0x4fba7a=_0x32558d;this['_userService'][_0x4fba7a(0x21e)](_0x427ded);}),_0x4e2096;}[_0x582b18(0x1d0)](_0x387228){const _0x5cf562=_0x582b18;return{'id':_0x387228['id'],'threadId':_0x387228[_0x5cf562(0x1fd)],'ref':_0x387228[_0x5cf562(0x238)]};}};_0x16cc64=_0xec324c([_0x204198(0x0,_0xa28331[_0x582b18(0x1c2)](_0x54e878[_0x582b18(0x1bc)])),_0x204198(0x1,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x1c3)])),_0x204198(0x2,_0xa28331[_0x582b18(0x1c2)](_0x6e9407[_0x582b18(0x219)])),_0x204198(0x3,_0xa28331['Inject'](_0xa28331[_0x582b18(0x233)]))],_0x16cc64);var _0x1d1cbf=Object[_0x582b18(0x23a)],_0x34ebe1=(_0x44d5b0,_0xb52f5f,_0x4eeaca,_0x59d957)=>{for(var _0x19617e=_0x59d957>0x1?void 0x0:_0x59d957?_0x1d1cbf(_0xb52f5f,_0x4eeaca):_0xb52f5f,_0x3bcb2b=_0x44d5b0['length']-0x1,_0x2e6864;_0x3bcb2b>=0x0;_0x3bcb2b--)(_0x2e6864=_0x44d5b0[_0x3bcb2b])&&(_0x19617e=_0x2e6864(_0x19617e)||_0x19617e);return _0x19617e;},_0x145a3a=(_0x4abf5a,_0x29ac9a)=>(_0x146a68,_0x5df69e)=>_0x29ac9a(_0x146a68,_0x5df69e,_0x4abf5a);let _0x9f643a=class extends _0xa28331[_0x582b18(0x1cb)]{constructor(_0x5b7ebf,_0x228675){const _0x1af1e8=_0x582b18;super(),this[_0x1af1e8(0x203)]=_0x5b7ebf,this[_0x1af1e8(0x231)]=_0x228675,this['_initDataSource']();}[_0x582b18(0x1f7)](){const _0x34cfcb=_0x582b18;this[_0x34cfcb(0x203)]['dataSource']=this[_0x34cfcb(0x231)],this[_0x34cfcb(0x203)][_0x34cfcb(0x1e9)]=!0x1;}};_0x9f643a=_0x34ebe1([_0x145a3a(0x0,_0x38a43b[_0x582b18(0x1d1)]),_0x145a3a(0x1,_0xa28331['Inject'](_0x16cc64))],_0x9f643a);var _0x5ed0b6=Object[_0x582b18(0x1c8)],_0x905294=Object[_0x582b18(0x23a)],_0x13ca15=(_0x5bbc9f,_0x4776ab,_0x1567c5)=>_0x4776ab in _0x5bbc9f?_0x5ed0b6(_0x5bbc9f,_0x4776ab,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1567c5}):_0x5bbc9f[_0x4776ab]=_0x1567c5,_0x4bdd15=(_0x488d8a,_0x6987f4,_0x4845eb,_0x28e9bd)=>{const _0x31b037=_0x582b18;for(var _0x2d8d43=_0x28e9bd>0x1?void 0x0:_0x28e9bd?_0x905294(_0x6987f4,_0x4845eb):_0x6987f4,_0x10b3c9=_0x488d8a[_0x31b037(0x212)]-0x1,_0x22cb77;_0x10b3c9>=0x0;_0x10b3c9--)(_0x22cb77=_0x488d8a[_0x10b3c9])&&(_0x2d8d43=_0x22cb77(_0x2d8d43)||_0x2d8d43);return _0x2d8d43;},_0x13d8b9=(_0x5ebbd3,_0xa2a926)=>(_0x4480ba,_0x40d39e)=>_0xa2a926(_0x4480ba,_0x40d39e,_0x5ebbd3),_0x3bdd4d=(_0x390415,_0x5a482f,_0x70e610)=>_0x13ca15(_0x390415,typeof _0x5a482f!=_0x582b18(0x1f1)?_0x5a482f+'':_0x5a482f,_0x70e610);_0x60b3fd[_0x582b18(0x207)]=class extends _0xa28331[_0x582b18(0x1e2)]{constructor(_0x4c89f7=_0x24add3,_0xe7258d,_0x3ec3fa){const _0x54e347=_0x582b18;super(),this[_0x54e347(0x221)]=_0x4c89f7,this['_injector']=_0xe7258d,this[_0x54e347(0x1d3)]=_0x3ec3fa;const {..._0x719231}=_0xa28331['merge']({},_0x24add3,this[_0x54e347(0x221)]);this['_configService'][_0x54e347(0x1e1)](_0x568bed,_0x719231);}[_0x582b18(0x21f)](){const _0x48f955=_0x582b18;[[_0x16cc64],[_0x9f643a],[_0xed5d36]][_0x48f955(0x218)](_0x8d94eb=>{const _0x572a69=_0x48f955;this[_0x572a69(0x1fb)][_0x572a69(0x220)](_0x8d94eb);});}[_0x582b18(0x235)](){const _0xc8aa0=_0x582b18;this[_0xc8aa0(0x1fb)][_0xc8aa0(0x223)](_0x9f643a),this[_0xc8aa0(0x1fb)][_0xc8aa0(0x223)](_0xed5d36);}},_0x3bdd4d(_0x60b3fd['UniverThreadCommentDataSourcePlugin'],_0x582b18(0x1e6),_0x7ff09c),_0x3bdd4d(_0x60b3fd[_0x582b18(0x207)],'type',_0xa28331[_0x582b18(0x1fc)]['UNIVER_UNKNOWN']),_0x60b3fd['UniverThreadCommentDataSourcePlugin']=_0x4bdd15([_0xa28331[_0x582b18(0x1e4)](_0x41e30c[_0x582b18(0x217)],_0x6e9407[_0x582b18(0x1d8)],_0x34bfcd['UniverLicensePlugin']),_0x13d8b9(0x1,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x233)])),_0x13d8b9(0x2,_0xa28331[_0x582b18(0x213)])],_0x60b3fd[_0x582b18(0x207)]),Object[_0x582b18(0x1c8)](_0x60b3fd,Symbol[_0x582b18(0x1d9)],{'value':_0x582b18(0x1b1)});}));function _0x4815(){const _0x3685ad=['/edit','DependentOn','_threadCommentModel','pluginName','stringify','getUnit','syncUpdateMutationToColla','function','/universer-api/comment/unit/','content','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','amd','comments','symbol','listComments','12856608dTMoDW','createTimestamp','size','_commentService','_initDataSource','resolveComment','10mXRqDC','UniverProLicense','_injector','UniverInstanceType','threadId','_userService','@univerjs/thread-comment-ui','Reply','find','OpenOrReOpen','_threadCommentDataSourceService','unitId','addComment','@univerjs/core','UniverThreadCommentDataSourcePlugin','/solved','resolved','@univerjs-pro/license','getUser','1585zVKqsp','solved','Edit','commentUpdate$','updateComment','57rKmtiv','length','IConfigService','reply','UniverThreadCommentUi','rangeType','UniverThreadCommentUIPlugin','forEach','CollaborationSessionService','getCurrentUser','body','/list','rxjs','addUser','onStarting','add','_config','getMemberID','get','/delete','userID','COMMENT','requireSession','subscribe','customRanges','userId','filter','root','dayjs','code','_initUserSync','@univerjs-pro/collaboration-client','_threadCommentDataSource','18372HCVKFN','Injector','UniverCore','onReady','UniverProCollaborationClient','comment','ref','post','getOwnPropertyDescriptor','pipe','Module','users','thread-comment-data-source.config','CommentService','exports','_httpService','1775673wmIDNi','CustomRangeType','delete','error','134fkeaKC','HTTPService','bufferTime','payload','parse','Add','deleteComment','Inject','UserManagerService','_init','replyId','/add','values','defineProperty','object','Solved','Disposable','3785IWXQWQ','disposeWithMe','8086529ddaggn','replies','saveCommentToSnapshot','IThreadCommentDataSourceService','format','_configService','Delete','YYYY/MM/DD\x20HH:mm','type','Solve','UniverCollaborationClientPlugin','toStringTag','UNRECOGNIZED','map','57544HTzDyE','_sessionService','rangeId','4936449werYiN','slice','setConfig','Plugin'];_0x4815=function(){return _0x3685ad;};return _0x4815();}
1
+ function _0x3622(_0x1e2cb5,_0x46c6a0){const _0x181acb=_0x181a();return _0x3622=function(_0x36228b,_0x3499ef){_0x36228b=_0x36228b-0x1a1;let _0x17ff40=_0x181acb[_0x36228b];return _0x17ff40;},_0x3622(_0x1e2cb5,_0x46c6a0);}(function(_0xdb2ffd,_0x484c73){const _0x550ebb=_0x3622,_0x564bf1=_0xdb2ffd();while(!![]){try{const _0x29c10f=-parseInt(_0x550ebb(0x1fb))/0x1*(-parseInt(_0x550ebb(0x1ab))/0x2)+-parseInt(_0x550ebb(0x1ae))/0x3+-parseInt(_0x550ebb(0x1eb))/0x4*(parseInt(_0x550ebb(0x211))/0x5)+parseInt(_0x550ebb(0x1a4))/0x6+-parseInt(_0x550ebb(0x1b9))/0x7+-parseInt(_0x550ebb(0x1fe))/0x8+parseInt(_0x550ebb(0x1db))/0x9;if(_0x29c10f===_0x484c73)break;else _0x564bf1['push'](_0x564bf1['shift']());}catch(_0x1f6048){_0x564bf1['push'](_0x564bf1['shift']());}}}(_0x181a,0xcf493),function(_0x40f899,_0x3fccb3){const _0x365f25=_0x3622;typeof exports=='object'&&typeof module<'u'?_0x3fccb3(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x365f25(0x212)&&define[_0x365f25(0x1f8)]?define(['exports',_0x365f25(0x1b1),'@univerjs-pro/license','@univerjs/core',_0x365f25(0x1e0),_0x365f25(0x215),'rxjs','@univerjs/network'],_0x3fccb3):(_0x40f899=typeof globalThis<'u'?globalThis:_0x40f899||self,_0x3fccb3(_0x40f899[_0x365f25(0x210)]={},_0x40f899[_0x365f25(0x216)],_0x40f899[_0x365f25(0x1ec)],_0x40f899[_0x365f25(0x1cf)],_0x40f899['UniverThreadCommentUi'],_0x40f899[_0x365f25(0x1c2)],_0x40f899[_0x365f25(0x1c1)],_0x40f899[_0x365f25(0x21c)]));}(this,function(_0x42ffda,_0x1f6c36,_0x20cd49,_0x593136,_0x1d8ca7,_0x3d1e2c,_0x5d43a5,_0x31a79b){'use strict';const _0xff7c46=_0x3622;const _0x211e0a=_0xff7c46(0x1d1);var _0x2614a7=(_0x384200=>(_0x384200[_0x384200['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x384200[_0x384200[_0xff7c46(0x1a5)]=0x1]=_0xff7c46(0x1a5),_0x384200[_0x384200['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x384200))(_0x2614a7||{}),_0x3fd1be=(_0x12f6a0=>(_0x12f6a0[_0x12f6a0[_0xff7c46(0x1b4)]=0x0]=_0xff7c46(0x1b4),_0x12f6a0[_0x12f6a0[_0xff7c46(0x224)]=0x1]=_0xff7c46(0x224),_0x12f6a0[_0x12f6a0[_0xff7c46(0x1a7)]=0x2]=_0xff7c46(0x1a7),_0x12f6a0[_0x12f6a0['Edit']=0x3]=_0xff7c46(0x21d),_0x12f6a0[_0x12f6a0[_0xff7c46(0x1f4)]=0x4]=_0xff7c46(0x1f4),_0x12f6a0[_0x12f6a0['Solve']=0x5]=_0xff7c46(0x202),_0x12f6a0[_0x12f6a0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x12f6a0))(_0x3fd1be||{});const _0x3fcb9d=_0x7fbc80=>_0x593136['dayjs'](new Date(+_0x7fbc80))[_0xff7c46(0x213)](_0xff7c46(0x214)),_0x1ce138=async(_0x8ffdcf,_0x68a2eb)=>{const _0x7eaac1=_0xff7c46,_0x3d24b8=_0x8ffdcf[_0x7eaac1(0x1bd)](_0x593136[_0x7eaac1(0x21f)]),_0x1e31ca=_0x8ffdcf['get'](_0x31a79b['HTTPService']);_0x68a2eb[_0x7eaac1(0x1a9)](_0x175a7a=>{const _0x7d4469=_0x7eaac1;_0x3d24b8[_0x7d4469(0x1ff)](_0x175a7a)&&_0x68a2eb['delete'](_0x175a7a);}),_0x68a2eb[_0x7eaac1(0x201)]&&(await _0x1e31ca[_0x7eaac1(0x1bd)](_0x7eaac1(0x1a6),{'params':{'userIDs':[..._0x68a2eb]}}))[_0x7eaac1(0x200)]['users'][_0x7eaac1(0x1a9)](_0x29770d=>{_0x29770d&&_0x3d24b8['addUser'](_0x29770d);});};var _0x31486e=Object[_0xff7c46(0x1b6)],_0x5b35e0=(_0x39c387,_0x4c0a13,_0x5e378b,_0x5a3ab4)=>{const _0x56d6fa=_0xff7c46;for(var _0x7a97c6=_0x5a3ab4>0x1?void 0x0:_0x5a3ab4?_0x31486e(_0x4c0a13,_0x5e378b):_0x4c0a13,_0x14c32d=_0x39c387[_0x56d6fa(0x1c5)]-0x1,_0x4296b4;_0x14c32d>=0x0;_0x14c32d--)(_0x4296b4=_0x39c387[_0x14c32d])&&(_0x7a97c6=_0x4296b4(_0x7a97c6)||_0x7a97c6);return _0x7a97c6;},_0x27dd48=(_0x1ca601,_0x5daa51)=>(_0x40d32e,_0x1edf39)=>_0x5daa51(_0x40d32e,_0x1edf39,_0x1ca601);let _0x13f5da=class extends _0x593136['Disposable']{constructor(_0x99fb8b,_0x1a1cff,_0x1dac8b,_0x5df93a){const _0x3ea74a=_0xff7c46;super(),this[_0x3ea74a(0x227)]=_0x99fb8b,this[_0x3ea74a(0x1fa)]=_0x1a1cff,this[_0x3ea74a(0x1d5)]=_0x1dac8b,this[_0x3ea74a(0x204)]=_0x5df93a,this[_0x3ea74a(0x1f1)](),this[_0x3ea74a(0x1ee)]();}['_initUserSync'](){const _0x50aa7c=_0xff7c46;this[_0x50aa7c(0x1f2)](this['_threadCommentModel'][_0x50aa7c(0x1e1)][_0x50aa7c(0x1e2)](_0x5d43a5['bufferTime'](0x10))[_0x50aa7c(0x223)](_0x18be80=>{const _0x33ee7d=_0x50aa7c,_0x335a8e=new Set();_0x18be80['forEach'](_0xb25225=>{const _0x309d95=_0x3622;switch(_0xb25225['type']){case _0x309d95(0x1c4):{const _0x31eb09=_0xb25225[_0x309d95(0x1a8)][_0x309d95(0x218)];_0x335a8e['add'](_0x31eb09);break;}}}),_0x1ce138(this[_0x33ee7d(0x204)],_0x335a8e);}));}[_0xff7c46(0x1f1)](){const _0x48dfd4=_0xff7c46;this[_0x48dfd4(0x1f2)](this['_commentService'][_0x48dfd4(0x1e1)][_0x48dfd4(0x223)](async _0xff9059=>{const _0x328489=_0x48dfd4;var _0x56ac70,_0x311519,_0x285a1a,_0x39ae17;const _0x89a12a=(_0x56ac70=this[_0x328489(0x1fa)][_0x328489(0x1dc)](_0xff9059[_0x328489(0x226)])[_0x328489(0x1ba)](_0x5d0ce1=>_0x5d0ce1['threadId']===_0xff9059[_0x328489(0x1d2)]))==null?void 0x0:_0x56ac70['root'];if(!_0x89a12a)return;const {unitId:_0xdb7052,subUnitId:_0xf3aea6}=_0x89a12a;switch(_0xff9059[_0x328489(0x1c6)]&&this[_0x328489(0x1d5)][_0x328489(0x1ed)](_0xff9059[_0x328489(0x1c6)]),_0xff9059[_0x328489(0x21e)]){case _0x3fd1be[_0x328489(0x224)]:break;case _0x3fd1be['Reply']:{this[_0x328489(0x1fa)][_0x328489(0x1e8)](_0xdb7052,_0xf3aea6,{'unitId':_0xdb7052,'subUnitId':_0xf3aea6,'ref':'','id':_0xff9059[_0x328489(0x1b8)],'dT':_0x3fcb9d(+_0xff9059[_0x328489(0x1d8)]),'threadId':_0xff9059[_0x328489(0x1d2)],'personId':(_0x285a1a=(_0x311519=_0xff9059['user'])==null?void 0x0:_0x311519[_0x328489(0x1ef)])!=null?_0x285a1a:_0xff9059[_0x328489(0x1c0)],'text':JSON[_0x328489(0x1d4)](_0xff9059[_0x328489(0x1d3)]),'parentId':_0x89a12a['id']});break;}case _0x3fd1be[_0x328489(0x1f4)]:{const _0x4d3fdc=this[_0x328489(0x1fa)][_0x328489(0x1c3)](_0xdb7052,_0xf3aea6,_0xff9059[_0x328489(0x1b8)]);_0x4d3fdc&&_0x4d3fdc[_0x328489(0x1f0)]&&this[_0x328489(0x1fa)][_0x328489(0x20f)](_0xdb7052,_0xf3aea6,_0xff9059[_0x328489(0x1b8)]);break;}case _0x3fd1be[_0x328489(0x21d)]:{this[_0x328489(0x1fa)][_0x328489(0x207)](_0xdb7052,_0xf3aea6,{'commentId':_0xff9059['replyId'],'text':JSON[_0x328489(0x1d4)](_0xff9059[_0x328489(0x1d3)])});break;}case _0x3fd1be[_0x328489(0x202)]:{const _0x476795=(_0x39ae17=this['_threadCommentModel']['getUnit'](_0xff9059[_0x328489(0x226)])['find'](_0x11f5b6=>_0x11f5b6['threadId']===_0xff9059[_0x328489(0x1d2)]))==null?void 0x0:_0x39ae17[_0x328489(0x1b0)];_0x476795&&this[_0x328489(0x1fa)][_0x328489(0x206)](_0xdb7052,_0xf3aea6,_0x476795['id'],_0xff9059[_0x328489(0x20d)]===_0x2614a7[_0x328489(0x1a5)]);break;}}}));}};_0x13f5da=_0x5b35e0([_0x27dd48(0x0,_0x593136[_0xff7c46(0x1ad)](_0x1f6c36[_0xff7c46(0x20a)])),_0x27dd48(0x1,_0x593136[_0xff7c46(0x1ad)](_0x3d1e2c[_0xff7c46(0x1ca)])),_0x27dd48(0x2,_0x593136[_0xff7c46(0x1ad)](_0x593136[_0xff7c46(0x21f)])),_0x27dd48(0x3,_0x593136[_0xff7c46(0x1ad)](_0x593136['Injector']))],_0x13f5da);const _0x56aa3b=_0xff7c46(0x1e5),_0x367ff1={};var _0x499845=Object[_0xff7c46(0x1b6)],_0x37003b=(_0x386b66,_0x1b14d7,_0x38acb1,_0x18b3c3)=>{for(var _0x5eb927=_0x18b3c3>0x1?void 0x0:_0x18b3c3?_0x499845(_0x1b14d7,_0x38acb1):_0x1b14d7,_0x3d8143=_0x386b66['length']-0x1,_0x297b23;_0x3d8143>=0x0;_0x3d8143--)(_0x297b23=_0x386b66[_0x3d8143])&&(_0x5eb927=_0x297b23(_0x5eb927)||_0x5eb927);return _0x5eb927;},_0x121997=(_0x19fd09,_0x1ff08c)=>(_0x52d0cc,_0xf2687f)=>_0x1ff08c(_0x52d0cc,_0xf2687f,_0x19fd09);function _0xa9e9a(_0x5e805e,_0x37cea4){const _0x35c037=_0xff7c46,_0x27fadc=_0x5e805e[_0x35c037(0x1ce)][0x0];return{..._0x37cea4,'id':_0x27fadc[_0x35c037(0x1b8)],'resolved':_0x5e805e[_0x35c037(0x20d)]===0x1,'dT':_0x3fcb9d(_0x27fadc[_0x35c037(0x1d8)]),'personId':_0x27fadc[_0x35c037(0x1c0)],'threadId':_0x27fadc[_0x35c037(0x1d2)]};}function _0x1e201c(_0x57a03d,_0x279abe,_0x1fd7b8){const _0x22ef3f=_0xff7c46;var _0x5e21ac,_0x5ac466;if(((_0x5ac466=(_0x5e21ac=_0x57a03d==null?void 0x0:_0x57a03d[_0x22ef3f(0x1ce)])==null?void 0x0:_0x5e21ac[_0x22ef3f(0x1c5)])!=null?_0x5ac466:0x0)>0x0){const _0x1a8560=(_0x51b871,_0x5cfa58)=>({'id':_0x51b871[_0x22ef3f(0x1b8)],'threadId':_0x51b871[_0x22ef3f(0x1d2)],'dT':_0x3fcb9d(_0x51b871[_0x22ef3f(0x1d8)]),'personId':_0x51b871[_0x22ef3f(0x1c0)],'resolved':_0x57a03d['solved']===_0x2614a7[_0x22ef3f(0x1a5)],'unitId':_0x279abe,'subUnitId':_0x1fd7b8,'text':JSON[_0x22ef3f(0x1d4)](_0x51b871[_0x22ef3f(0x1d3)]),'parentId':_0x5cfa58}),_0x22a2ae=_0x1a8560(_0x57a03d[_0x22ef3f(0x1ce)][0x0]);return{..._0x22a2ae,'children':_0x57a03d['replies']['slice'](0x1)[_0x22ef3f(0x1e7)](_0x290dcf=>_0x1a8560(_0x290dcf,_0x22a2ae['id']))};}return null;}let _0x33920d=class{constructor(_0x531e9a,_0x2842a5,_0x3c5c6b,_0x27d920){const _0x32687b=_0xff7c46;this[_0x32687b(0x1d0)]=_0x531e9a,this[_0x32687b(0x1d5)]=_0x2842a5,this[_0x32687b(0x1e9)]=_0x3c5c6b,this[_0x32687b(0x204)]=_0x27d920;}async[_0xff7c46(0x1e8)](_0x3c07b7){const _0x17c58f=_0xff7c46;var _0x567a27,_0x58ee70;const {parentId:_0x5021c8,unitId:_0x200d5a,text:_0x2bcf3e,threadId:_0x223cc4}=_0x3c07b7,_0xb991e6=(_0x58ee70=(_0x567a27=_0x2bcf3e[_0x17c58f(0x1cc)])==null?void 0x0:_0x567a27[_0x17c58f(0x1b7)](_0x275bdc=>_0x275bdc[_0x17c58f(0x1f6)]===_0x593136[_0x17c58f(0x20c)][_0x17c58f(0x21b)])[_0x17c58f(0x1e7)](_0x3669d6=>_0x3669d6['rangeId']))!=null?_0x58ee70:[],_0x12cd7d=JSON[_0x17c58f(0x219)](_0x2bcf3e),_0x5a3467=(await this[_0x17c58f(0x1e9)][_0x17c58f(0x1ac)](_0x200d5a))['getMemberID']();if(_0x5021c8){const _0x23a4ef={'memberId':_0x5a3467,'unitId':_0x200d5a,'content':_0x12cd7d,'mention':_0xb991e6,'threadId':_0x223cc4},_0x210201=(await this[_0x17c58f(0x1d0)][_0x17c58f(0x1c7)](_0x17c58f(0x1aa)+_0x200d5a+_0x17c58f(0x225),{'body':_0x23a4ef}))[_0x17c58f(0x200)][_0x17c58f(0x1f3)];return{..._0x3c07b7,'id':_0x210201[_0x17c58f(0x1b8)],'dT':_0x593136[_0x17c58f(0x20e)](+_0x210201[_0x17c58f(0x1d8)])[_0x17c58f(0x213)](_0x17c58f(0x214)),'personId':_0x210201[_0x17c58f(0x1c0)]};}else{const _0x1c41c8={'memberId':_0x5a3467,'unitId':_0x200d5a,'content':_0x12cd7d,'mention':_0xb991e6},_0x329da7=await this[_0x17c58f(0x1d0)][_0x17c58f(0x1c7)]('/universer-api/comment/unit/'+_0x200d5a+_0x17c58f(0x203),{'body':_0x1c41c8});return _0xa9e9a(_0x329da7[_0x17c58f(0x200)]['comment'],_0x3c07b7);}}async['updateComment'](_0x24aeec){const _0x2a7192=_0xff7c46;var _0x280d3b,_0x4bc8b0;const {text:_0x4149b8,unitId:_0x3eacb4}=_0x24aeec,_0x11cb9c=(_0x4bc8b0=(_0x280d3b=_0x4149b8[_0x2a7192(0x1cc)])==null?void 0x0:_0x280d3b[_0x2a7192(0x1b7)](_0x58b531=>_0x58b531[_0x2a7192(0x1f6)]===_0x593136[_0x2a7192(0x20c)][_0x2a7192(0x21b)])[_0x2a7192(0x1e7)](_0x3dd139=>_0x3dd139[_0x2a7192(0x1bb)]))!=null?_0x4bc8b0:[],_0x294e79=JSON[_0x2a7192(0x219)](_0x4149b8),_0x34a5c7=_0x24aeec[_0x2a7192(0x1d2)],_0x564a69=_0x24aeec['id'],_0x4800a9={'memberId':(await this[_0x2a7192(0x1e9)]['requireSession'](_0x3eacb4))[_0x2a7192(0x1a3)](),'unitId':_0x3eacb4,'threadId':_0x34a5c7,'mention':_0x11cb9c,'content':_0x294e79,'replyId':_0x564a69},_0xd4fb0f=await this[_0x2a7192(0x1d0)][_0x2a7192(0x1c7)](_0x2a7192(0x1aa)+_0x3eacb4+'/edit',{'body':_0x4800a9});return!_0xd4fb0f[_0x2a7192(0x200)][_0x2a7192(0x1e3)]||_0xd4fb0f[_0x2a7192(0x200)][_0x2a7192(0x1e3)][_0x2a7192(0x20b)]===0x1;}async[_0xff7c46(0x206)](_0x55355f){const _0x488a5b=_0xff7c46,{unitId:_0x30874e}=_0x55355f,_0x1089c4=_0x55355f[_0x488a5b(0x1d2)],_0x2d8c1f={'memberId':this['_userService'][_0x488a5b(0x1c8)]()[_0x488a5b(0x1ef)],'unitId':_0x30874e,'threadId':_0x1089c4,'solved':_0x55355f[_0x488a5b(0x1b3)]?_0x2614a7[_0x488a5b(0x1a5)]:_0x2614a7['OpenOrReOpen']},_0x410849=await this[_0x488a5b(0x1d0)][_0x488a5b(0x1c7)]('/universer-api/comment/unit/'+_0x30874e+_0x488a5b(0x1cd),{'body':_0x2d8c1f});return!_0x410849[_0x488a5b(0x200)]['error']||_0x410849[_0x488a5b(0x200)]['error'][_0x488a5b(0x20b)]===0x1;}async['deleteComment'](_0x2e848d,_0xa74a4f,_0x158a51,_0x42afad){const _0x321495=_0xff7c46,_0x19ffb4={'memberId':(await this[_0x321495(0x1e9)][_0x321495(0x1ac)](_0x2e848d))[_0x321495(0x1a3)](),'threadId':_0x158a51,'replyId':_0x42afad,'unitId':_0x2e848d},_0x4ee411=await this[_0x321495(0x1d0)][_0x321495(0x1c7)](_0x321495(0x1aa)+_0x2e848d+_0x321495(0x1df),{'body':_0x19ffb4});return!_0x4ee411[_0x321495(0x200)][_0x321495(0x1e3)]||_0x4ee411[_0x321495(0x200)][_0x321495(0x1e3)]['code']===0x1;}async[_0xff7c46(0x220)](_0x36ef29,_0x54236e,_0x2e1bcf){const _0x762d43=_0xff7c46,_0x2de55e={'unitId':_0x36ef29,'threadId':_0x2e1bcf},_0x36c7d5=await this[_0x762d43(0x1d0)][_0x762d43(0x1c7)](_0x762d43(0x1aa)+_0x36ef29+_0x762d43(0x1e6),{'body':_0x2de55e}),_0x335f97=_0x2e1bcf[_0x762d43(0x1e7)](_0xcd4e6f=>_0x1e201c(_0x36c7d5['body'][_0x762d43(0x222)][_0xcd4e6f],_0x36ef29,_0x54236e))[_0x762d43(0x1b7)](Boolean);return Object['values'](_0x36c7d5[_0x762d43(0x200)][_0x762d43(0x1f5)])['forEach'](_0x144d16=>{const _0x33eb81=_0x762d43;this[_0x33eb81(0x1d5)][_0x33eb81(0x1ed)](_0x144d16);}),_0x335f97;}[_0xff7c46(0x1c9)](_0x54028a){const _0x3ee006=_0xff7c46;return{'id':_0x54028a['id'],'threadId':_0x54028a[_0x3ee006(0x1d2)],'ref':_0x54028a['ref']};}};_0x33920d=_0x37003b([_0x121997(0x0,_0x593136[_0xff7c46(0x1ad)](_0x31a79b[_0xff7c46(0x1d6)])),_0x121997(0x1,_0x593136['Inject'](_0x593136[_0xff7c46(0x21f)])),_0x121997(0x2,_0x593136[_0xff7c46(0x1ad)](_0x1f6c36[_0xff7c46(0x1dd)])),_0x121997(0x3,_0x593136[_0xff7c46(0x1ad)](_0x593136['Injector']))],_0x33920d);var _0x3e13f1=Object[_0xff7c46(0x1b6)],_0x4ae154=(_0x4ecb74,_0x3dfef1,_0x46e467,_0x58bf01)=>{const _0x5b8239=_0xff7c46;for(var _0x449f1d=_0x58bf01>0x1?void 0x0:_0x58bf01?_0x3e13f1(_0x3dfef1,_0x46e467):_0x3dfef1,_0x5566a0=_0x4ecb74[_0x5b8239(0x1c5)]-0x1,_0x5ed04d;_0x5566a0>=0x0;_0x5566a0--)(_0x5ed04d=_0x4ecb74[_0x5566a0])&&(_0x449f1d=_0x5ed04d(_0x449f1d)||_0x449f1d);return _0x449f1d;},_0x21c94c=(_0x116d77,_0x3a8159)=>(_0x31254c,_0x459ef4)=>_0x3a8159(_0x31254c,_0x459ef4,_0x116d77);let _0x4f56af=class extends _0x593136[_0xff7c46(0x1ea)]{constructor(_0x5b7e55,_0x1005cb){const _0xc1a51e=_0xff7c46;super(),this[_0xc1a51e(0x1bc)]=_0x5b7e55,this['_threadCommentDataSource']=_0x1005cb,this[_0xc1a51e(0x217)]();}[_0xff7c46(0x217)](){const _0x1f950f=_0xff7c46;this[_0x1f950f(0x1bc)][_0x1f950f(0x1b5)]=this[_0x1f950f(0x1de)],this[_0x1f950f(0x1bc)][_0x1f950f(0x1a2)]=!0x1;}};_0x4f56af=_0x4ae154([_0x21c94c(0x0,_0x3d1e2c[_0xff7c46(0x21a)]),_0x21c94c(0x1,_0x593136[_0xff7c46(0x1ad)](_0x33920d))],_0x4f56af);var _0x18b3bb=Object[_0xff7c46(0x205)],_0x3c2ce7=Object[_0xff7c46(0x1b6)],_0x24b042=(_0x12091c,_0x3fef45,_0x208b79)=>_0x3fef45 in _0x12091c?_0x18b3bb(_0x12091c,_0x3fef45,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x208b79}):_0x12091c[_0x3fef45]=_0x208b79,_0x2f2e2c=(_0xddc872,_0x4ef00c,_0x100f7f,_0x3f92af)=>{const _0x840ddb=_0xff7c46;for(var _0x51d41e=_0x3f92af>0x1?void 0x0:_0x3f92af?_0x3c2ce7(_0x4ef00c,_0x100f7f):_0x4ef00c,_0x45a571=_0xddc872[_0x840ddb(0x1c5)]-0x1,_0x21833e;_0x45a571>=0x0;_0x45a571--)(_0x21833e=_0xddc872[_0x45a571])&&(_0x51d41e=_0x21833e(_0x51d41e)||_0x51d41e);return _0x51d41e;},_0x4a261f=(_0x6d1a06,_0x5edd60)=>(_0x129c70,_0x46a653)=>_0x5edd60(_0x129c70,_0x46a653,_0x6d1a06),_0x5078de=(_0x563df4,_0x54ff2a,_0x2b62d6)=>_0x24b042(_0x563df4,typeof _0x54ff2a!=_0xff7c46(0x1f7)?_0x54ff2a+'':_0x54ff2a,_0x2b62d6);_0x42ffda['UniverThreadCommentDataSourcePlugin']=class extends _0x593136[_0xff7c46(0x1fc)]{constructor(_0x1cf7ee=_0x367ff1,_0xc92118,_0x43a457){const _0x5edf24=_0xff7c46;super(),this[_0x5edf24(0x1d9)]=_0x1cf7ee,this[_0x5edf24(0x204)]=_0xc92118,this['_configService']=_0x43a457;const {..._0x2c12d7}=_0x593136[_0x5edf24(0x1bf)]({},_0x367ff1,this[_0x5edf24(0x1d9)]);this[_0x5edf24(0x1da)][_0x5edf24(0x1fd)](_0x56aa3b,_0x2c12d7);}[_0xff7c46(0x1cb)](){const _0x178b1a=_0xff7c46;[[_0x33920d],[_0x4f56af],[_0x13f5da]][_0x178b1a(0x1a9)](_0x3ce8c2=>{const _0x5a9dd6=_0x178b1a;this[_0x5a9dd6(0x204)][_0x5a9dd6(0x1c4)](_0x3ce8c2);});}['onReady'](){const _0x58261e=_0xff7c46;this[_0x58261e(0x204)][_0x58261e(0x1bd)](_0x4f56af),this[_0x58261e(0x204)][_0x58261e(0x1bd)](_0x13f5da);}},_0x5078de(_0x42ffda[_0xff7c46(0x1b2)],_0xff7c46(0x208),_0x211e0a),_0x5078de(_0x42ffda['UniverThreadCommentDataSourcePlugin'],_0xff7c46(0x21e),_0x593136['UniverInstanceType'][_0xff7c46(0x1af)]),_0x42ffda[_0xff7c46(0x1b2)]=_0x2f2e2c([_0x593136[_0xff7c46(0x221)](_0x1d8ca7[_0xff7c46(0x1d7)],_0x1f6c36[_0xff7c46(0x1f9)],_0x20cd49[_0xff7c46(0x209)]),_0x4a261f(0x1,_0x593136[_0xff7c46(0x1ad)](_0x593136[_0xff7c46(0x1e4)])),_0x4a261f(0x2,_0x593136['IConfigService'])],_0x42ffda[_0xff7c46(0x1b2)]),Object['defineProperty'](_0x42ffda,Symbol[_0xff7c46(0x1be)],{'value':_0xff7c46(0x1a1)});}));function _0x181a(){const _0x3c426=['UniverProLicense','addUser','_initUserSync','userID','parentId','_init','disposeWithMe','reply','Delete','users','rangeType','symbol','amd','UniverCollaborationClientPlugin','_threadCommentModel','1FkdVPm','Plugin','setConfig','12843648ruNMBx','getUser','body','size','Solve','/add','_injector','defineProperty','resolveComment','updateComment','pluginName','UniverLicensePlugin','CommentService','code','CustomRangeType','solved','dayjs','deleteComment','UniverProThreadCommentDatasource','421815sOrIsY','function','format','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','UniverProCollaborationClient','_initDataSource','personId','stringify','IThreadCommentDataSourceService','COMMENT','UniverNetwork','Edit','type','UserManagerService','listComments','DependentOn','comments','subscribe','Add','/reply','unitId','_commentService','Module','syncUpdateMutationToColla','getMemberID','8448882qzLATW','Solved','/universer-api/user/list','Reply','payload','forEach','/universer-api/comment/unit/','2505842tPXPCL','requireSession','Inject','4352877lRwIQu','UNIVER_UNKNOWN','root','@univerjs-pro/collaboration-client','UniverThreadCommentDataSourcePlugin','resolved','Unknown','dataSource','getOwnPropertyDescriptor','filter','replyId','384657sSodAU','find','rangeId','_threadCommentDataSourceService','get','toStringTag','merge','userId','rxjs','UniverThreadComment','getComment','add','length','user','post','getCurrentUser','saveCommentToSnapshot','ThreadCommentModel','onStarting','customRanges','/solved','replies','UniverCore','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','content','parse','_userService','HTTPService','UniverThreadCommentUIPlugin','createTimestamp','_config','_configService','14731137ECENxj','getUnit','CollaborationSessionService','_threadCommentDataSource','/delete','@univerjs/thread-comment-ui','commentUpdate$','pipe','error','Injector','thread-comment-data-source.config','/list','map','addComment','_sessionService','Disposable','16TauciR'];_0x181a=function(){return _0x3c426;};return _0x181a();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.1-nightly.202507061606",
3
+ "version": "0.9.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507061606",
49
- "@univerjs-pro/license": "0.9.1-nightly.202507061606",
50
- "@univerjs/core": "0.9.1-nightly.202507061606",
51
- "@univerjs/network": "0.9.1-nightly.202507061606",
48
+ "@univerjs-pro/collaboration-client": "0.9.1",
49
+ "@univerjs-pro/license": "0.9.1",
52
50
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment-ui": "0.9.1-nightly.202507061606",
54
- "@univerjs/thread-comment": "0.9.1-nightly.202507061606"
51
+ "@univerjs/thread-comment": "0.9.1",
52
+ "@univerjs/thread-comment-ui": "0.9.1",
53
+ "@univerjs/core": "0.9.1",
54
+ "@univerjs/network": "0.9.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",